From b118b1301aee61ea04fae6cd7ea0848e779beb45 Mon Sep 17 00:00:00 2001 From: Anant Sujatanagarjuna Date: Wed, 28 Feb 2024 11:17:14 +0100 Subject: [PATCH] Change Exercise 07->08 --- adapt.css | 2 +- adapt/js/adapt.min.js | 2 +- adapt/js/build.min.js | 2 +- adapt/js/scriptLoader.js | 262 +- course/config.json | 4 +- course/en/articles.json | 48 +- course/en/assets.json | 20 +- course/en/blocks.json | 384 +- course/en/components.json | 576 +- course/en/contentObjects.json | 16 +- course/en/course.json | 3 +- libraries/backbone.controller.js | 64 +- libraries/backbone.controller.results.js | 78 +- libraries/backbone.es6.js | 236 +- libraries/backbone.min.js | 2 +- libraries/bowser.js | 4 +- libraries/core-js.min.js | 4 +- libraries/enum.js | 127 +- libraries/handlebars.min.js | 58 +- libraries/html-react-parser.min.js | 4 +- libraries/imageReady.js | 396 +- libraries/inview.js | 1184 +- libraries/jquery.min.js | 4 +- libraries/jquery.mobile.custom.min.js | 20 +- libraries/jquery.resize.js | 540 +- libraries/modernizr.js | 6 +- libraries/react-dom.development.js | 52584 ++++++++++----------- libraries/react-dom.production.min.js | 490 +- libraries/react.development.js | 6714 +-- libraries/react.production.min.js | 62 +- libraries/regenerator-runtime.min.js | 16 +- libraries/require.min.js | 72 +- libraries/scrollTo.min.js | 12 +- libraries/semver.js | 3176 +- libraries/underscore.min.js | 10 +- libraries/underscore.results.js | 172 +- libraries/velocity.min.js | 8 +- log_output.html | 2 +- templates.js | 540 +- 39 files changed, 33974 insertions(+), 33930 deletions(-) diff --git a/adapt.css b/adapt.css index 15abe56..fcf74d1 100644 --- a/adapt.css +++ b/adapt.css @@ -1 +1 @@ -:root{--adapt-device-small:32.5em;--adapt-device-medium:47.5em;--adapt-device-large:56.25em;--adapt-device-xlarge:80em}/*! normalize.css v8.0.1 | MIT License | github.com/necolas/normalize.css */html{line-height:1.15;-webkit-text-size-adjust:100%}body{margin:0}main{display:block}h1{font-size:2em;margin:.67em 0}hr{box-sizing:content-box;height:0;overflow:visible}pre{font-family:monospace, monospace;font-size:1em}a{background-color:transparent}abbr[title]{border-bottom:none;text-decoration:underline;text-decoration:underline dotted}b,strong{font-weight:bolder}code,kbd,samp{font-family:monospace, monospace;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-0.25em}sup{top:-0.5em}img{border-style:none}button,input,optgroup,select,textarea{font-family:inherit;font-size:100%;line-height:1.15;margin:0}button,input{overflow:visible}button,select{text-transform:none}button,[type="button"],[type="reset"],[type="submit"]{-webkit-appearance:button}button::-moz-focus-inner,[type="button"]::-moz-focus-inner,[type="reset"]::-moz-focus-inner,[type="submit"]::-moz-focus-inner{border-style:none;padding:0}button:-moz-focusring,[type="button"]:-moz-focusring,[type="reset"]:-moz-focusring,[type="submit"]:-moz-focusring{outline:1px dotted ButtonText}fieldset{padding:.35em .75em .625em}legend{box-sizing:border-box;color:inherit;display:table;max-width:100%;padding:0;white-space:normal}progress{vertical-align:baseline}textarea{overflow:auto}[type="checkbox"],[type="radio"]{box-sizing:border-box;padding:0}[type="number"]::-webkit-inner-spin-button,[type="number"]::-webkit-outer-spin-button{height:auto}[type="search"]{-webkit-appearance:textfield;outline-offset:-2px}[type="search"]::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}details{display:block}summary{display:list-item}template{display:none}[hidden]{display:none}:root{--adapt-viewport-height:100vh;--adapt-navigation-height:calc(1.5rem + (1rem * 2))}html{box-sizing:border-box}*,*:before,*:after{box-sizing:inherit}html{overflow-y:scroll}img,object,embed{max-width:100%}img{display:block;min-width:100%}@media screen and (-ms-high-contrast:active),(-ms-high-contrast:none){img[src$=".svg"]{width:100%}}button{border:0;padding:0}button:not(.is-disabled):not(.is-locked){cursor:pointer}.dir-rtl body{direction:rtl}zw{display:inline-block;width:0}nb{white-space:nowrap}@font-face{font-family:"vanilla";src:url('fonts/vanilla.woff2') format('woff2'),url('fonts/vanilla.woff') format('woff');font-weight:normal;font-style:normal;font-display:block}.icon:before{display:block;font-family:"vanilla";speak:none;font-style:normal;font-weight:normal;font-variant:normal;text-transform:none;line-height:1;font-size:1.5rem;text-align:center;text-decoration:none;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.icon-arrow-with-circle-down:before{content:"\e900"}.icon-arrow-with-circle-left:before{content:"\e901"}.dir-rtl .icon-arrow-with-circle-left:before{content:"\e902"}.icon-arrow-with-circle-right:before{content:"\e902"}.dir-rtl .icon-arrow-with-circle-right:before{content:"\e901"}.icon-arrow-with-circle-up:before{content:"\e903"}.icon-chevron-with-circle-down:before{content:"\e904"}.icon-chevron-with-circle-left:before{content:"\e905"}.dir-rtl .icon-chevron-with-circle-left:before{content:"\e906"}.icon-chevron-with-circle-right:before{content:"\e906"}.dir-rtl .icon-chevron-with-circle-right:before{content:"\e905"}.icon-chevron-with-circle-up:before{content:"\e907"}.icon-info-with-circle:before{content:"\e908"}.icon-location:before{content:"\e909"}.icon-medal:before{content:"\e90a"}.icon-price-ribbon:before{content:"\e90b"}.icon-shield:before{content:"\e90c"}.icon-stopwatch:before{content:"\e90d"}.icon-text-document-inverted:before{content:"\e90e"}.icon-text-document:before{content:"\e90f"}.icon-trophy:before{content:"\e910"}.icon-arrow-down:before{content:"\e911"}.icon-arrow-left:before{content:"\e912"}.dir-rtl .icon-arrow-left:before{content:"\e913"}.icon-arrow-right:before{content:"\e913"}.dir-rtl .icon-arrow-right:before{content:"\e912"}.icon-arrow-up:before{content:"\e914"}.icon-bookmark:before{content:"\e915"}.icon-message:before{content:"\e916"}.icon-mouse:before{content:"\e917"}.icon-mobile:before{content:"\e918"}.icon-desktop:before{content:"\e919"}.icon-pencil:before{content:"\e91a"}.icon-forward-arrow:before{content:"\e91b"}.dir-rtl .icon-forward-arrow:before{content:"\e91c"}.icon-backwards-arrow:before{content:"\e91c"}.dir-rtl .icon-backwards-arrow:before{content:"\e91b"}.icon-person:before{content:"\e91d"}.icon-persons:before{content:"\e91e"}.icon-profile:before{content:"\e91f"}.icon-pin:before{content:"\e920"}.icon-map:before{content:"\e921"}.icon-point:before{content:"\e922"}.icon-star:before{content:"\e923"}.icon-star-hollow:before{content:"\e924"}.icon-comments:before{content:"\e925"}.icon-comment:before{content:"\e926"}.icon-home:before{content:"\e927"}.icon-popup:before{content:"\e928"}.icon-search:before{content:"\e929"}.icon-printer:before{content:"\e92a"}.icon-link:before{content:"\e92b"}.icon-flag:before{content:"\e92c"}.icon-cog:before{content:"\e92d"}.icon-tools:before{content:"\e92e"}.icon-tag:before{content:"\e92f"}.icon-camera:before{content:"\e930"}.icon-feedback:before{content:"\e931"}.icon-book:before{content:"\e932"}.icon-article:before{content:"\e933"}.icon-eye:before{content:"\e934"}.icon-time:before{content:"\e935"}.icon-microphone:before{content:"\e936"}.icon-calendar:before{content:"\e937"}.icon-timer:before{content:"\e938"}.icon-drag:before{content:"\e939"}.icon-light-bulb:before{content:"\e93a"}.icon-checklist:before{content:"\e93b"}.icon-ticket:before{content:"\e93c"}.icon-wi-fi:before{content:"\e93d"}.icon-line-graph:before{content:"\e93e"}.icon-pie-chart:before{content:"\e93f"}.icon-bar-graph:before{content:"\e940"}.icon-scatter-graph:before{content:"\e941"}.icon-padlock-locked:before{content:"\e942"}.icon-padlock-unlocked:before{content:"\e943"}.icon-tick:before{content:"\e944"}.icon-cross:before{content:"\e945"}.icon-minus:before{content:"\e946"}.icon-plus:before{content:"\e947"}.icon-info:before{content:"\e948"}.icon-question:before{content:"\e949"}.icon-warning:before{content:"\e94a"}.icon-list:before{content:"\e94b"}.icon-add-to-list:before{content:"\e94c"}.icon-menu:before{content:"\e94d"}.icon-grid:before{content:"\e94e"}.icon-portrait:before{content:"\e94f"}.icon-screens:before{content:"\e950"}.icon-landscape:before{content:"\e951"}.icon-images:before{content:"\e952"}.icon-media:before{content:"\e953"}.icon-folder:before{content:"\e954"}.icon-documents:before{content:"\e955"}.icon-delete:before{content:"\e956"}.icon-save:before{content:"\e957"}.icon-download:before{content:"\e958"}.icon-upload:before{content:"\e959"}.icon-expand:before{content:"\e95a"}.icon-shrink:before{content:"\e95b"}.icon-volume:before{content:"\e95c"}.icon-sound:before{content:"\e95d"}.icon-sound-mute:before{content:"\e95e"}.icon-controls-down:before{content:"\e95f"}.icon-controls-left:before{content:"\e960"}.dir-rtl .icon-controls-left:before{content:"\e961"}.icon-controls-right:before{content:"\e961"}.dir-rtl .icon-controls-right:before{content:"\e960"}.icon-controls-up:before{content:"\e962"}.icon-triangle-down:before{content:"\e963"}.icon-triangle-left:before{content:"\e964"}.dir-rtl .icon-triangle-left:before{content:"\e965"}.icon-triangle-right:before{content:"\e965"}.dir-rtl .icon-triangle-right:before{content:"\e964"}.icon-triangle-up:before{content:"\e966"}.icon-dot:before{content:"\e967"}.icon-ellipsis:before{content:"\e968"}.icon-up-down:before{content:"\e969"}.icon-controls-small-down:before{content:"\e96a"}.icon-controls-small-left:before{content:"\e96b"}.dir-rtl .icon-controls-small-left:before{content:"\e96c"}.icon-controls-small-right:before{content:"\e96c"}.dir-rtl .icon-controls-small-right:before{content:"\e96b"}.icon-controls-small-up:before{content:"\e96d"}.icon-radio-checked:before{content:"\e96e"}.icon-radio-unchecked:before{content:"\e96f"}.icon-language-1:before{content:"\e970"}.icon-accessibility:before{content:"\e971"}.icon-globe:before{content:"\e972"}.icon-language-2:before{content:"\e973"}.icon-checkbox-checked:before{content:"\e974"}.icon-checkbox-unchecked:before{content:"\e975"}.icon-accessibility-2:before{content:"\e976"}.icon-alert:before{content:"\e977"}.icon-arrow-down-2:before{content:"\e978"}.icon-arrow-left-2:before{content:"\e979"}.dir-rtl .icon-arrow-left-2:before{content:"\e97a"}.icon-arrow-right-2:before{content:"\e97a"}.dir-rtl .icon-arrow-right-2:before{content:"\e979"}.icon-arrow-up-2:before{content:"\e97b"}.icon-arrow-down-3:before{content:"\e97c"}.icon-arrow-left-3:before{content:"\e97d"}.dir-rtl .icon-arrow-left-3:before{content:"\e97e"}.icon-arrow-right-3:before{content:"\e97e"}.dir-rtl .icon-arrow-right-3:before{content:"\e97d"}.icon-arrow-up-3:before{content:"\e97f"}.icon-attachment:before{content:"\e980"}.icon-block:before{content:"\e981"}.icon-camera-off:before{content:"\e982"}.icon-camera-on:before{content:"\e983"}.icon-cloud:before{content:"\e984"}.icon-compass:before{content:"\e985"}.icon-copy-file:before{content:"\e986"}.icon-copyright:before{content:"\e987"}.icon-crop:before{content:"\e988"}.icon-devices:before{content:"\e989"}.icon-down-up:before{content:"\e98a"}.icon-ellipsis-vertical:before{content:"\e98b"}.icon-exclamation:before{content:"\e98c"}.icon-expand_1:before{content:"\e98d"}.icon-extension:before{content:"\e98e"}.icon-favourite:before{content:"\e98f"}.icon-google-translate:before{content:"\e990"}.icon-hand:before{content:"\e991"}.icon-lightning:before{content:"\e992"}.icon-list-2:before{content:"\e993"}.icon-microphone-off:before{content:"\e994"}.icon-move:before{content:"\e995"}.icon-mute:before{content:"\e996"}.icon-ordered-list:before{content:"\e997"}.icon-question-circle:before{content:"\e998"}.icon-quote-close:before{content:"\e999"}.icon-quote-open:before{content:"\e99a"}.icon-refresh:before{content:"\e99b"}.icon-send:before{content:"\e99c"}.icon-sound-down:before{content:"\e99d"}.icon-sync:before{content:"\e99e"}.icon-tablet:before{content:"\e99f"}.icon-thumb-down:before{content:"\e9a0"}.icon-thumb-up:before{content:"\e9a1"}.icon-timer-empty:before{content:"\e9a2"}.icon-timer-full:before{content:"\e9a3"}.icon-video-captions-off-2:before{content:"\e9a4"}.icon-video-captions-off:before{content:"\e9a5"}.icon-video-captions:before{content:"\e9a6"}.icon-video-exit-fullscreen:before{content:"\e9a7"}.icon-video-fast-forward:before{content:"\e9a8"}.icon-video-fullscreen:before{content:"\e9a9"}.icon-video-loop:before{content:"\e9aa"}.icon-video-pause-circle:before{content:"\e9ab"}.icon-video-pause:before{content:"\e9ac"}.icon-video-play-circle:before{content:"\e9ad"}.icon-video-play:before{content:"\e9ae"}.icon-video-replay:before{content:"\e9af"}.icon-video-rewind:before{content:"\e9b0"}.icon-video-skip-back:before{content:"\e9b1"}.icon-video-skip-forward:before{content:"\e9b2"}.icon-video-stop:before{content:"\e9b3"}.icon-quote-close-2:before{content:"\e9b4"}.icon-quote-open-2:before{content:"\e9b5"}.icon-emotion-happy:before{content:"\e9b6"}.icon-emotion-not-ok:before{content:"\e9b7"}.icon-emotion-ok:before{content:"\e9b8"}.icon-emotion-sad:before{content:"\e9b9"}.icon-emotion-very-happy:before{content:"\e9ba"}.icon-emotion-very-unhappy:before{content:"\e9bb"}.icon-blogger-2:before{content:"\e9bc"}.icon-blogger:before{content:"\e9bd"}.icon-deviantart-2:before{content:"\e9be"}.icon-deviantart:before{content:"\e9bf"}.icon-doc-excel:before{content:"\e9c0"}.icon-doc-pdf:before{content:"\e9c1"}.icon-doc-word:before{content:"\e9c2"}.icon-facebook-2:before{content:"\e9c3"}.icon-facebook:before{content:"\e9c4"}.icon-flickr-2:before{content:"\e9c5"}.icon-flickr:before{content:"\e9c6"}.icon-github:before{content:"\e9c7"}.icon-instagram-2:before{content:"\e9c8"}.icon-instagram:before{content:"\e9c9"}.icon-linkedin-2:before{content:"\e9ca"}.icon-linkedin:before{content:"\e9cb"}.icon-paypal:before{content:"\e9cc"}.icon-pintrest-2:before{content:"\e9cd"}.icon-pintrest:before{content:"\e9ce"}.icon-qq-2:before{content:"\e9cf"}.icon-qq:before{content:"\e9d0"}.icon-reddit-2:before{content:"\e9d1"}.icon-reddit:before{content:"\e9d2"}.icon-rss-2:before{content:"\e9d3"}.icon-rss:before{content:"\e9d4"}.icon-sina-weibo-2:before{content:"\e9d5"}.icon-sina-weibo:before{content:"\e9d6"}.icon-soundcloud-2:before{content:"\e9d7"}.icon-soundcloud:before{content:"\e9d8"}.icon-steam-2:before{content:"\e9d9"}.icon-steam:before{content:"\e9da"}.icon-trello-2:before{content:"\e9db"}.icon-trello:before{content:"\e9dc"}.icon-tumbler-2:before{content:"\e9dd"}.icon-tumblr:before{content:"\e9de"}.icon-twitch:before{content:"\e9df"}.icon-twitter-2:before{content:"\e9e0"}.icon-twitter:before{content:"\e9e1"}.icon-vimeo-2:before{content:"\e9e2"}.icon-vimeo:before{content:"\e9e3"}.icon-wechat-2:before{content:"\e9e4"}.icon-wechat:before{content:"\e9e5"}.icon-weibo-2:before{content:"\e9e6"}.icon-weibo:before{content:"\e9e7"}.icon-xing-2:before{content:"\e9e8"}.icon-xing:before{content:"\e9e9"}.icon-youku-2:before{content:"\e9ea"}.icon-youku:before{content:"\e9eb"}.icon-youtube-2:before{content:"\e9ec"}.icon-youtube:before{content:"\e9ed"}.u-clearfix:before,.u-clearfix:after{content:"\0020";display:block;height:0;overflow:hidden;visibility:hidden}.u-clearfix:after{clear:both}.u-clearfix{zoom:1}.u-display-none{display:none !important}.u-visibility-hidden{visibility:hidden !important}.u-no-select{-webkit-touch-callout:none;-webkit-user-select:none;-khtml-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.component{position:relative}.block{position:relative}.aria-label{position:absolute !important;left:0 !important;width:auto !important;height:auto !important;overflow:auto !important;color:rgba(0,0,0,0) !important;background:rgba(0,0,0,0) !important;font-size:1px !important;padding:0 !important;margin:0 !important;line-height:normal !important;z-index:1}.aria-label.relative{position:relative !important}.aria-label.aria-hidden{display:none !important}.a11y-focusguard{left:0 !important;bottom:0 !important;width:auto !important;height:auto !important;overflow:auto !important;color:rgba(0,0,0,0) !important;background:rgba(0,0,0,0) !important;font-size:1px !important;padding:0 !important;margin:0 !important;line-height:normal !important;z-index:1}.touchevents .a11y-focusguard{position:absolute !important}.no-touchevents .a11y-focusguard{position:fixed !important}#a11y-focuser{bottom:0 !important;position:fixed !important;left:0 !important;width:auto !important;height:auto !important;overflow:auto !important;color:rgba(0,0,0,0) !important;background:rgba(0,0,0,0) !important;font-size:1px !important;padding:0 !important;margin:0 !important;line-height:normal !important;z-index:1}.a11y-disable-focusoutline *:focus{outline:none !important}.article__header-inner{margin:0 auto;max-width:56.25rem}.block__inner{margin:0 auto;max-width:56.25rem}.btn-icon{padding:1rem;border:0}.btn-text{padding:.5rem 1rem}.btn__response-container{display:flex;flex-wrap:wrap;position:relative}.btn__action:not(.is-full-width){width:calc(50% - 1rem);margin-right:1rem}.dir-rtl .btn__action:not(.is-full-width){margin-right:inherit;margin-left:1rem}.btn__feedback:not(.is-full-width){width:calc(50% - 1rem);margin-left:1rem}.dir-rtl .btn__feedback:not(.is-full-width){margin-left:inherit;margin-right:1rem}.btn__action.is-full-width,.btn__feedback.is-full-width{width:100%}.can-show-marking .btn__action.is-full-width,.can-show-marking .btn__feedback.is-full-width{margin-right:2.5rem}.dir-rtl .can-show-marking .btn__action.is-full-width,.dir-rtl .can-show-marking .btn__feedback.is-full-width{margin-right:inherit;margin-left:2.5rem}.btn__marking{position:absolute;left:50%;top:50%;transform:translate(-50%, -50%)}.dir-rtl .btn__marking{left:inherit;right:50%;transform:translate(50%, -50%)}.btn__marking.is-full-width{left:inherit;right:.5rem;transform:translate(0, -50%)}.dir-rtl .btn__marking.is-full-width{left:.5rem;right:inherit}.btn__marking.is-correct{background-color:#065f28;color:#ffffff}.btn__marking.is-correct .icon:before{content:"\e944"}.btn__marking.is-incorrect{background-color:#ff0000;color:#ffffff}.btn__marking.is-incorrect .icon:before{content:"\e945"}.component{width:100%}.component__container{display:flex;flex-direction:column;flex-wrap:wrap;align-items:flex-start}@media (min-width:47.5rem){.component__container{flex-direction:row}}@media (min-width:47.5rem){.component.is-left{width:50%}.component.is-right{margin-left:auto;width:50%}.dir-rtl .component.is-right{margin-left:0;margin-right:auto}}.drawer{position:fixed;top:0;height:100%;width:20rem;z-index:100}.drawer.is-position-auto,.drawer.is-position-right{left:inherit;right:-20rem}.dir-rtl .drawer:not(.is-position-right),.drawer.is-position-left{right:inherit;left:-20rem}.drawer__inner{position:relative;height:100%;padding-top:var(--adapt-navigation-height)}.drawer__holder{height:100%;overflow-y:auto;overflow-x:hidden;-webkit-overflow-scrolling:touch}.drawer__toolbar{position:absolute;top:0;width:100%;height:var(--adapt-navigation-height);display:flex;align-items:center;justify-content:flex-end}.drawer__back{margin-right:auto}.drawer__back .icon:before{content:"\e96b"}.dir-rtl .drawer__back .icon:before{content:"\e96c"}.drawer__close .icon:before{content:"\e945"}.drawer__item-btn{width:100%}.drawer__item-title,.drawer__item-body{display:block}.menu__title-inner,.menu-item__title-inner,.page__title-inner,.article__title-inner,.block__title-inner,.component__title-inner{display:inline;vertical-align:middle}.loading{position:fixed;top:0;bottom:0;left:0;right:0;margin:auto;height:100%;width:100%;z-index:100}html.is-nav-top #wrapper{padding-top:var(--adapt-navigation-height)}html.is-nav-bottom #wrapper{padding-bottom:var(--adapt-navigation-height)}.nav{position:fixed;width:100%;z-index:80}html.is-nav-top .nav{top:0}html.is-nav-bottom .nav{bottom:0}.nav__inner{margin:0 auto;max-width:90rem;display:flex;align-items:stretch}.nav__btn{display:inline-flex;align-items:center;justify-content:center;float:none !important}.nav.hide-label .nav__btn-label,.nav__btn.hide-label .nav__btn-label{display:none}.nav.show-label.show-label-small .nav__btn-label{display:none}@media (min-width:32.5rem){.nav.show-label.show-label-small .nav__btn:not(.hide-label) .nav__btn-label{display:initial}}.nav.show-label.show-label-medium .nav__btn-label{display:none}@media (min-width:47.5rem){.nav.show-label.show-label-medium .nav__btn:not(.hide-label) .nav__btn-label{display:initial}}.nav.show-label.show-label-large .nav__btn-label{display:none}@media (min-width:56.25rem){.nav.show-label.show-label-large .nav__btn:not(.hide-label) .nav__btn-label{display:initial}}.nav.has-label-right .nav__btn-label{margin-left:.5rem}.nav.has-label-bottom .nav__btn{flex-direction:column}.nav.has-label-bottom .nav__btn-label{margin-top:.5rem}.nav.has-label-top .nav__btn{flex-direction:column}.nav.has-label-top .nav__btn-label{order:-1;margin-bottom:.5rem}.has-label-left .nav__btn-label{order:-1}.nav.has-label-left .nav__btn-label{margin-right:.5rem}.dir-rtl .nav.has-label-auto .nav__btn-label{margin-right:.5rem}.dir-ltr .nav.has-label-auto .nav__btn-label{margin-left:.5rem}.nav__spacer{flex-grow:1}.nav__skip-btn{position:absolute;left:0;top:0;z-index:100}html:not(.has-accessibility) .nav__skip-btn{display:none !important}.nav__skip-btn:not(:focus-visible){height:0;padding:0;margin:0;overflow:hidden}.nav__back-btn .icon:before{content:"\e96b"}.dir-rtl .nav__back-btn .icon:before{content:"\e96c"}.nav__drawer-btn .icon:before{content:"\e94b"}.notify{position:relative;z-index:100}.notify__popup{position:fixed;top:50%;width:100%;visibility:hidden;z-index:100;background-color:#ffffff}.notify__popup-inner{margin:0 auto;max-width:56.25rem}.notify__close-btn .icon:before{content:"\e945"}.notify__icon .icon.is-prompt:before{content:"\e949"}.notify__icon .icon.is-alert:before{content:"\e94a"}.notify__popup.has-image .notify__section-inner{display:flex;flex-direction:column;row-gap:1rem}@media (min-width:47.5rem){.notify__popup.has-image.align-image-left .notify__section-inner,.notify__popup.has-image.align-image-right .notify__section-inner{flex-direction:row;column-gap:1rem}.notify__popup.has-image.align-image-left .notify__section-inner .notify__body,.notify__popup.has-image.align-image-right .notify__section-inner .notify__body{width:60%}.notify__popup.has-image.align-image-left .notify__section-inner .notify__image-container,.notify__popup.has-image.align-image-right .notify__section-inner .notify__image-container{width:40%}}.notify-push{position:fixed;right:0;width:20rem;opacity:0;z-index:100;background-color:#ffffff}.notify-push.is-active{opacity:1}.dir-rtl .notify-push{right:auto;left:0}.notify-push__inner{cursor:pointer}.notify-push__close-btn .icon:before{content:"\e945"}.page{margin:0 auto;max-width:90rem}.page__header-inner{margin:0 auto;max-width:56.25rem}html.adapt-scrolling{height:100%;overflow:auto}html.adapt-scrolling .nav{width:calc(100% - 18px);width:calc(100% - var(--adapt-scrollbar-width))}html.adapt-scrolling body{height:100%;overflow:hidden;position:relative;overflow-y:scroll;-webkit-overflow-scrolling:touch}.shadow{position:fixed;top:0;bottom:0;left:0;right:0;margin:auto;opacity:0;z-index:90}:root{--adapt-tooltip-offset:.35rem;--adapt-tooltip-distance:1rem;--adapt-tooltip-viewport-padding:8px;--adapt-tooltip-target-position-left:0;--adapt-tooltip-target-position-top:0;--adapt-tooltip-target-position-right:0;--adapt-tooltip-target-position-bottom:0;--adapt-tooltip-target-position-width:0;--adapt-tooltip-target-position-height:0;--adapt-tooltip-target-distancetoedge-left:0;--adapt-tooltip-target-distancetoedge-top:0;--adapt-tooltip-target-distancetoedge-right:0;--adapt-tooltip-target-distancetoedge-bottom:0;--adapt-tooltip-scroll-top:0;--adapt-tooltip-scroll-left:0}.test{color:transparent !important}.test .tooltip__body{pointer-events:all !important;background-color:transparent !important;outline:1px solid black !important}.test .tooltip__body:hover{background-color:red !important;color:white !important}.tooltip__container{overflow:hidden}.tooltip{position:absolute;left:calc(var(--adapt-tooltip-target-position-left) + var(--adapt-tooltip-scroll-left));top:calc(var(--adapt-tooltip-target-position-top) + var(--adapt-tooltip-scroll-top));width:var(--adapt-tooltip-target-position-width);height:var(--adapt-tooltip-target-position-height);pointer-events:none;opacity:0;z-index:0}.is-shown.tooltip{opacity:1}.is-loading.tooltip{visibility:hidden}.is-fixed.tooltip{position:fixed;z-index:82}.tooltip__body{position:absolute;overflow:hidden;text-overflow:ellipsis;width:max-content;min-width:3rem;max-width:20rem;color:white;font-size:.9rem;line-height:1.5;padding:.5rem .75rem .55rem;background-color:rgba(0,0,0,0.85);border-radius:.35rem}@media (min-width:47.5rem){.tooltip__body{max-width:30rem}}.tooltip__arrow{position:absolute;width:.7rem;height:.7rem}.tooltip__arrow:before{content:"";position:absolute;top:0;left:0;width:.7rem;height:.7rem;transform-origin:50% 50%;border-width:0 .35rem .35rem;border-style:solid;border-color:transparent;border-bottom-color:rgba(0,0,0,0.85)}.is-top.is-outside.is-vertical-axis .tooltip__body{bottom:100%;margin-bottom:1rem}.is-bottom.is-outside.is-vertical-axis .tooltip__body{top:100%;margin-top:1rem}.is-center.is-outside.is-vertical-axis .tooltip__body{top:50%;transform:translateY(-50%)}.is-left.is-arrow-start.is-outside.is-vertical-axis .tooltip__body{right:calc(100% - .7rem - (.35rem * 2))}.dir-rtl .is-left.is-arrow-start.is-outside.is-vertical-axis .tooltip__body{left:calc(100% - .7rem - (.35rem * 2));right:initial}.is-left.is-arrow-middle.is-outside.is-vertical-axis .tooltip__body{right:calc(50% - (.7rem / 2) - .35rem)}.dir-rtl .is-left.is-arrow-middle.is-outside.is-vertical-axis .tooltip__body{left:calc(50% - (.7rem / 2) - .35rem);right:initial}.is-left.is-arrow-end.is-outside.is-vertical-axis .tooltip__body{right:0%}.dir-rtl .is-left.is-arrow-end.is-outside.is-vertical-axis .tooltip__body{left:0%;right:initial}.is-middle.is-arrow-start.is-outside.is-vertical-axis .tooltip__body{left:calc(0% + .7rem);transform:translate(-50%)}.dir-rtl .is-middle.is-arrow-start.is-outside.is-vertical-axis .tooltip__body{right:calc(0% + .7rem);left:initial;transform:translate(50%)}.is-middle.is-arrow-middle.is-outside.is-vertical-axis .tooltip__body{left:50%;transform:translate(-50%)}.is-middle.is-arrow-end.is-outside.is-vertical-axis .tooltip__body{left:calc(100% - .7rem);transform:translate(-50%)}.dir-rtl .is-middle.is-arrow-end.is-outside.is-vertical-axis .tooltip__body{right:calc(100% - .7rem);left:initial;transform:translate(50%)}.is-right.is-arrow-start.is-outside.is-vertical-axis .tooltip__body{left:0%}.dir-rtl .is-right.is-arrow-start.is-outside.is-vertical-axis .tooltip__body{right:0%;left:initial}.is-right.is-arrow-middle.is-outside.is-vertical-axis .tooltip__body{left:calc(50% - (.7rem / 2) - .35rem)}.dir-rtl .is-right.is-arrow-middle.is-outside.is-vertical-axis .tooltip__body{right:calc(50% - (.7rem / 2) - .35rem);left:initial}.is-right.is-arrow-end.is-outside.is-vertical-axis .tooltip__body{left:calc(100% - .7rem - (.35rem * 2))}.dir-rtl .is-right.is-arrow-end.is-outside.is-vertical-axis .tooltip__body{right:calc(100% - .7rem - (.35rem * 2));left:initial}.is-middle.is-center.is-arrow-start.is-outside.is-vertical-axis .tooltip__body,.is-middle.is-center.is-arrow-middle.is-outside.is-vertical-axis .tooltip__body,.is-middle.is-center.is-arrow-end.is-outside.is-vertical-axis .tooltip__body{transform:translate(-50%, -50%)}.dir-rtl .is-middle.is-center.is-arrow-start.is-outside.is-vertical-axis .tooltip__body,.dir-rtl .is-middle.is-center.is-arrow-middle.is-outside.is-vertical-axis .tooltip__body,.dir-rtl .is-middle.is-center.is-arrow-end.is-outside.is-vertical-axis .tooltip__body{transform:translate(50%, -50%)}.is-fill-width.is-arrow-start.is-outside.is-vertical-axis .tooltip__body,.is-fill-width.is-arrow-middle.is-outside.is-vertical-axis .tooltip__body,.is-fill-width.is-arrow-end.is-outside.is-vertical-axis .tooltip__body{left:calc(var(--adapt-tooltip-target-distancetoedge-left) * -1);right:calc(var(--adapt-tooltip-target-distancetoedge-right) * -1);max-width:56.25rem;margin-left:auto;margin-right:auto;width:initial;transform:initial}.dir-rtl .is-fill-width.is-arrow-start.is-outside.is-vertical-axis .tooltip__body,.dir-rtl .is-fill-width.is-arrow-middle.is-outside.is-vertical-axis .tooltip__body,.dir-rtl .is-fill-width.is-arrow-end.is-outside.is-vertical-axis .tooltip__body{left:calc(var(--adapt-tooltip-target-distancetoedge-left) * -1);right:calc(var(--adapt-tooltip-target-distancetoedge-right) * -1)}.is-top.is-fill-width.is-outside.is-vertical-axis .tooltip__body{max-height:calc(var(--adapt-tooltip-target-distancetoedge-top) - 1rem)}.is-bottom.is-fill-width.is-outside.is-vertical-axis .tooltip__body{max-height:calc(var(--adapt-tooltip-target-distancetoedge-bottom) - 1rem)}.tooltip__container .is-snap-left.is-outside.is-vertical-axis .tooltip__body{left:calc(var(--adapt-tooltip-target-distancetoedge-left) * -1);transform:none;right:initial}.tooltip__container .is-snap-right.is-outside.is-vertical-axis .tooltip__body{right:calc(var(--adapt-tooltip-target-distancetoedge-right) * -1);transform:none;left:initial}.is-left.is-outside.is-horizontal-axis .tooltip__body{right:100%;margin-right:1rem}.dir-rtl .is-left.is-outside.is-horizontal-axis .tooltip__body{left:100%;right:initial;margin-left:1rem;margin-right:initial}.is-right.is-outside.is-horizontal-axis .tooltip__body{left:100%;margin-left:1rem}.dir-rtl .is-right.is-outside.is-horizontal-axis .tooltip__body{right:100%;left:initial;margin-right:1rem;margin-left:initial}.is-middle.is-outside.is-horizontal-axis .tooltip__body{left:50%;transform:translateX(-50%)}.dir-rtl .is-middle.is-outside.is-horizontal-axis .tooltip__body{right:50%;transform:translateX(50%);left:initial}.is-top.is-arrow-start.is-outside.is-horizontal-axis .tooltip__body{bottom:calc(100% - .7rem - (.35rem * 2))}.is-top.is-arrow-middle.is-outside.is-horizontal-axis .tooltip__body{bottom:calc(50% - (.7rem / 2) - .35rem)}.is-top.is-arrow-end.is-outside.is-horizontal-axis .tooltip__body{bottom:0%}.is-center.is-arrow-start.is-outside.is-horizontal-axis .tooltip__body{top:calc(0% + .7rem);transform:translateY(-50%)}.is-center.is-arrow-middle.is-outside.is-horizontal-axis .tooltip__body{top:50%;transform:translateY(-50%)}.is-center.is-arrow-end.is-outside.is-horizontal-axis .tooltip__body{top:calc(100% - .7rem);transform:translateY(-50%)}.is-bottom.is-arrow-start.is-outside.is-horizontal-axis .tooltip__body{top:0%}.is-bottom.is-arrow-middle.is-outside.is-horizontal-axis .tooltip__body{top:calc(50% - (.7rem / 2) - .35rem)}.is-bottom.is-arrow-end.is-outside.is-horizontal-axis .tooltip__body{top:calc(100% - .7rem - (.35rem * 2))}.is-left.is-fill-height.is-outside.is-horizontal-axis .tooltip__body{left:calc(var(--adapt-tooltip-target-distancetoedge-left) * -1);max-height:var(--adapt-tooltip-viewport-constrained-height);max-width:unset;width:unset}.dir-rtl .is-left.is-fill-height.is-outside.is-horizontal-axis .tooltip__body{right:calc(var(--adapt-tooltip-target-distancetoedge-right) * -1);left:100%}.is-right.is-fill-height.is-outside.is-horizontal-axis .tooltip__body{right:calc(var(--adapt-tooltip-target-distancetoedge-right) * -1);max-height:var(--adapt-tooltip-viewport-constrained-height);max-width:unset;width:unset}.dir-rtl .is-right.is-fill-height.is-outside.is-horizontal-axis .tooltip__body{left:calc(var(--adapt-tooltip-target-distancetoedge-left) * -1);right:100%}.is-center.is-middle.is-arrow-start.is-outside.is-horizontal-axis .tooltip__body,.is-center.is-middle.is-arrow-middle.is-outside.is-horizontal-axis .tooltip__body,.is-center.is-middle.is-arrow-end.is-outside.is-horizontal-axis .tooltip__body{transform:translate(-50%, -50%)}.dir-rtl .is-center.is-middle.is-arrow-start.is-outside.is-horizontal-axis .tooltip__body,.dir-rtl .is-center.is-middle.is-arrow-middle.is-outside.is-horizontal-axis .tooltip__body,.dir-rtl .is-center.is-middle.is-arrow-end.is-outside.is-horizontal-axis .tooltip__body{transform:translate(50%, -50%)}.tooltip__container .is-snap-top.is-outside.is-horizontal-axis .tooltip__body{top:calc(var(--adapt-tooltip-target-distancetoedge-top) * -1);transform:none;bottom:initial}.tooltip__container .is-snap-bottom.is-outside.is-horizontal-axis .tooltip__body{bottom:calc(var(--adapt-tooltip-target-distancetoedge-bottom) * -1);transform:none;top:initial}.is-top.is-inside.is-vertical-axis .tooltip__body{top:0%;margin-top:var(--adapt-tooltip-viewport-padding)}.is-bottom.is-inside.is-vertical-axis .tooltip__body{bottom:0%;margin-bottom:var(--adapt-tooltip-viewport-padding)}.is-center.is-inside.is-vertical-axis .tooltip__body{top:50%;transform:translateY(-50%)}.is-left.is-arrow-start.is-inside.is-vertical-axis .tooltip__body{right:calc(100% - .7rem - (.35rem * 2) - var(--adapt-tooltip-viewport-padding))}.dir-rtl .is-left.is-arrow-start.is-inside.is-vertical-axis .tooltip__body{left:calc(100% - .7rem - (.35rem * 2) - var(--adapt-tooltip-viewport-padding));right:initial}.is-left.is-arrow-middle.is-inside.is-vertical-axis .tooltip__body{right:calc(50% - (.7rem / 2) - .35rem)}.dir-rtl .is-left.is-arrow-middle.is-inside.is-vertical-axis .tooltip__body{left:calc(50% - (.7rem / 2) - .35rem);right:initial}.is-left.is-arrow-end.is-inside.is-vertical-axis .tooltip__body{right:var(--adapt-tooltip-viewport-padding)}.dir-rtl .is-left.is-arrow-end.is-inside.is-vertical-axis .tooltip__body{left:var(--adapt-tooltip-viewport-padding);right:initial}.is-middle.is-arrow-start.is-inside.is-vertical-axis .tooltip__body{left:calc(0% + .7rem + var(--adapt-tooltip-viewport-padding));transform:translate(-50%)}.dir-rtl .is-middle.is-arrow-start.is-inside.is-vertical-axis .tooltip__body{right:calc(0% + .7rem + var(--adapt-tooltip-viewport-padding));left:initial;transform:translate(50%)}.is-middle.is-arrow-middle.is-inside.is-vertical-axis .tooltip__body{left:50%;transform:translate(-50%)}.is-middle.is-arrow-end.is-inside.is-vertical-axis .tooltip__body{left:calc(100% - .7rem - var(--adapt-tooltip-viewport-padding));transform:translate(-50%)}.dir-rtl .is-middle.is-arrow-end.is-inside.is-vertical-axis .tooltip__body{right:calc(100% - .7rem - var(--adapt-tooltip-viewport-padding));left:initial;transform:translate(50%)}.is-right.is-arrow-start.is-inside.is-vertical-axis .tooltip__body{left:var(--adapt-tooltip-viewport-padding)}.dir-rtl .is-right.is-arrow-start.is-inside.is-vertical-axis .tooltip__body{right:var(--adapt-tooltip-viewport-padding);left:initial}.is-right.is-arrow-middle.is-inside.is-vertical-axis .tooltip__body{left:calc(50% - (.7rem / 2) - .35rem)}.dir-rtl .is-right.is-arrow-middle.is-inside.is-vertical-axis .tooltip__body{right:calc(50% - (.7rem / 2) - .35rem);left:initial}.is-right.is-arrow-end.is-inside.is-vertical-axis .tooltip__body{left:calc(100% - .7rem - (.35rem * 2) - var(--adapt-tooltip-viewport-padding))}.dir-rtl .is-right.is-arrow-end.is-inside.is-vertical-axis .tooltip__body{right:calc(100% - .7rem - (.35rem * 2) - var(--adapt-tooltip-viewport-padding));left:initial}.is-middle.is-center.is-arrow-start.is-inside.is-vertical-axis .tooltip__body,.is-middle.is-center.is-arrow-middle.is-inside.is-vertical-axis .tooltip__body,.is-middle.is-center.is-arrow-end.is-inside.is-vertical-axis .tooltip__body{transform:translate(-50%, -50%)}.is-left.is-inside.is-horizontal-axis .tooltip__body{left:0%;margin-left:var(--adapt-tooltip-viewport-padding)}.dir-rtl .is-left.is-inside.is-horizontal-axis .tooltip__body{right:0%;left:initial;margin-right:var(--adapt-tooltip-viewport-padding);margin-left:initial}.is-right.is-inside.is-horizontal-axis .tooltip__body{right:0%;margin-right:var(--adapt-tooltip-viewport-padding)}.dir-rtl .is-right.is-inside.is-horizontal-axis .tooltip__body{left:100%;right:initial;margin-left:var(--adapt-tooltip-viewport-padding);margin-right:initial}.is-middle.is-inside.is-horizontal-axis .tooltip__body{left:50%;transform:translateX(-50%)}.is-top.is-arrow-start.is-inside.is-horizontal-axis .tooltip__body{bottom:calc(100% - .7rem - (.35rem * 2) - var(--adapt-tooltip-viewport-padding))}.is-top.is-arrow-middle.is-inside.is-horizontal-axis .tooltip__body{bottom:calc(50% - (.7rem / 2) - .35rem)}.is-top.is-arrow-end.is-inside.is-horizontal-axis .tooltip__body{bottom:var(--adapt-tooltip-viewport-padding)}.is-center.is-arrow-start.is-inside.is-horizontal-axis .tooltip__body{top:calc(0% + .7rem + var(--adapt-tooltip-viewport-padding));transform:translateY(-50%)}.is-center.is-arrow-middle.is-inside.is-horizontal-axis .tooltip__body{top:50%;transform:translateY(-50%)}.is-center.is-arrow-end.is-inside.is-horizontal-axis .tooltip__body{top:calc(100% - .7rem - var(--adapt-tooltip-viewport-padding));transform:translateY(-50%)}.is-bottom.is-arrow-start.is-inside.is-horizontal-axis .tooltip__body{top:var(--adapt-tooltip-viewport-padding)}.is-bottom.is-arrow-middle.is-inside.is-horizontal-axis .tooltip__body{top:calc(50% - (.7rem / 2) - .35rem)}.is-bottom.is-arrow-end.is-inside.is-horizontal-axis .tooltip__body{top:calc(100% - .7rem - (.35rem * 2) - var(--adapt-tooltip-viewport-padding))}.is-center.is-middle.is-arrow-start.is-inside.is-horizontal-axis .tooltip__body,.is-center.is-middle.is-arrow-middle.is-inside.is-horizontal-axis .tooltip__body,.is-center.is-middle.is-arrow-end.is-inside.is-horizontal-axis .tooltip__body{transform:translate(-50%, -50%)}.is-top.is-outside.is-vertical-axis .tooltip__arrow{bottom:100%;margin-bottom:1rem}.is-top.is-outside.is-vertical-axis .tooltip__arrow::before{transform:translateY(99%) rotate(180deg)}.is-bottom.is-outside.is-vertical-axis .tooltip__arrow{top:100%;margin-top:1rem}.is-bottom.is-outside.is-vertical-axis .tooltip__arrow::before{transform:translateY(-99%)}.is-fill-height.is-arrow-start.is-outside.is-vertical-axis .tooltip__arrow,.is-fill-width.is-arrow-start.is-outside.is-vertical-axis .tooltip__arrow,.is-left.is-arrow-start.is-outside.is-vertical-axis .tooltip__arrow{right:calc(100% - .7rem - .35rem)}.dir-rtl .is-fill-height.is-arrow-start.is-outside.is-vertical-axis .tooltip__arrow,.dir-rtl .is-fill-width.is-arrow-start.is-outside.is-vertical-axis .tooltip__arrow,.dir-rtl .is-left.is-arrow-start.is-outside.is-vertical-axis .tooltip__arrow{left:calc(100% - .7rem - .35rem);right:initial}.is-fill-height.is-arrow-middle.is-outside.is-vertical-axis .tooltip__arrow,.is-fill-width.is-arrow-middle.is-outside.is-vertical-axis .tooltip__arrow,.is-left.is-arrow-middle.is-outside.is-vertical-axis .tooltip__arrow{right:calc(50% - (.7rem / 2))}.is-fill-height.is-arrow-end.is-outside.is-vertical-axis .tooltip__arrow,.is-fill-width.is-arrow-end.is-outside.is-vertical-axis .tooltip__arrow,.is-left.is-arrow-end.is-outside.is-vertical-axis .tooltip__arrow{right:calc(0% + .35rem)}.dir-rtl .is-fill-height.is-arrow-end.is-outside.is-vertical-axis .tooltip__arrow,.dir-rtl .is-fill-width.is-arrow-end.is-outside.is-vertical-axis .tooltip__arrow,.dir-rtl .is-left.is-arrow-end.is-outside.is-vertical-axis .tooltip__arrow{left:calc(0% + .35rem);right:initial}.is-middle.is-arrow-start.is-outside.is-vertical-axis .tooltip__arrow{left:calc(0% + .35rem)}.dir-rtl .is-middle.is-arrow-start.is-outside.is-vertical-axis .tooltip__arrow{right:calc(0% + .35rem);left:initial}.is-middle.is-arrow-middle.is-outside.is-vertical-axis .tooltip__arrow{left:50%;transform:translate(-50%)}.is-middle.is-arrow-end.is-outside.is-vertical-axis .tooltip__arrow{left:calc(100% - .7rem - .35rem)}.dir-rtl .is-middle.is-arrow-end.is-outside.is-vertical-axis .tooltip__arrow{right:calc(100% - .7rem - .35rem);left:initial}.is-right.is-arrow-start.is-outside.is-vertical-axis .tooltip__arrow{left:calc(0% + .35rem)}.dir-rtl .is-right.is-arrow-start.is-outside.is-vertical-axis .tooltip__arrow{right:calc(0% + .35rem);left:initial}.is-right.is-arrow-middle.is-outside.is-vertical-axis .tooltip__arrow{left:calc(50% - (.7rem / 2))}.is-right.is-arrow-end.is-outside.is-vertical-axis .tooltip__arrow{left:calc(100% - .7rem - .35rem)}.dir-rtl .is-right.is-arrow-end.is-outside.is-vertical-axis .tooltip__arrow{right:calc(100% - .7rem - .35rem);left:initial}.tooltip__container .is-arrow-snap.is-arrow-start.is-outside.is-vertical-axis .tooltip__arrow{left:calc((var(--adapt-tooltip-target-distancetoedge-left) * -1) + .35rem);transform:none;right:initial}.dir-rtl .tooltip__container .is-arrow-snap.is-arrow-start.is-outside.is-vertical-axis .tooltip__arrow{right:calc((var(--adapt-tooltip-target-distancetoedge-right) * -1) + .35rem);transform:none;left:initial}.tooltip__container .is-arrow-snap.is-arrow-end.is-outside.is-vertical-axis .tooltip__arrow{right:calc((var(--adapt-tooltip-target-distancetoedge-right) * -1) + .35rem);transform:none;left:initial}.dir-rtl .tooltip__container .is-arrow-snap.is-arrow-end.is-outside.is-vertical-axis .tooltip__arrow{left:calc((var(--adapt-tooltip-target-distancetoedge-left) * -1) + .35rem);transform:none;right:initial}.is-left.is-outside.is-horizontal-axis .tooltip__arrow{right:100%;margin-right:1rem}.is-left.is-outside.is-horizontal-axis .tooltip__arrow::before{transform:translateX(99%) rotate(90deg)}.dir-rtl .is-left.is-outside.is-horizontal-axis .tooltip__arrow{left:100%;right:initial;margin-left:1rem;margin-right:initial}.dir-rtl .is-left.is-outside.is-horizontal-axis .tooltip__arrow::before{transform:translateX(-99%) rotate(270deg)}.is-right.is-outside.is-horizontal-axis .tooltip__arrow{left:100%;margin-left:1rem}.is-right.is-outside.is-horizontal-axis .tooltip__arrow::before{transform:translateX(-99%) rotate(270deg)}.dir-rtl .is-right.is-outside.is-horizontal-axis .tooltip__arrow{right:100%;left:initial;margin-right:1rem;margin-left:initial}.dir-rtl .is-right.is-outside.is-horizontal-axis .tooltip__arrow::before{transform:translateX(99%) rotate(90deg)}.is-fill-height.is-arrow-start.is-outside.is-horizontal-axis .tooltip__arrow,.is-fill-width.is-arrow-start.is-outside.is-horizontal-axis .tooltip__arrow,.is-top.is-arrow-start.is-outside.is-horizontal-axis .tooltip__arrow{bottom:calc(100% - .7rem - .35rem)}.is-fill-height.is-arrow-middle.is-outside.is-horizontal-axis .tooltip__arrow,.is-fill-width.is-arrow-middle.is-outside.is-horizontal-axis .tooltip__arrow,.is-top.is-arrow-middle.is-outside.is-horizontal-axis .tooltip__arrow{bottom:calc(50% - (.7rem / 2))}.is-fill-height.is-arrow-end.is-outside.is-horizontal-axis .tooltip__arrow,.is-fill-width.is-arrow-end.is-outside.is-horizontal-axis .tooltip__arrow,.is-top.is-arrow-end.is-outside.is-horizontal-axis .tooltip__arrow{bottom:calc(0% + .35rem)}.is-center.is-arrow-start.is-outside.is-horizontal-axis .tooltip__arrow{top:calc(0% + .35rem)}.is-center.is-arrow-middle.is-outside.is-horizontal-axis .tooltip__arrow{top:calc(50% - (.7rem / 2))}.is-center.is-arrow-end.is-outside.is-horizontal-axis .tooltip__arrow{top:calc(100% - .7rem - .35rem)}.is-bottom.is-arrow-start.is-outside.is-horizontal-axis .tooltip__arrow{top:calc(0% + .35rem)}.is-bottom.is-arrow-middle.is-outside.is-horizontal-axis .tooltip__arrow{top:calc(50% - (.7rem / 2))}.is-bottom.is-arrow-end.is-outside.is-horizontal-axis .tooltip__arrow{top:calc(100% - .7rem - .35rem)}.tooltip__container .is-arrow-snap.is-arrow-start.is-outside.is-horizontal-axis .tooltip__arrow{top:calc((var(--adapt-tooltip-target-distancetoedge-top) * -1) + .35rem);transform:none;bottom:initial}.tooltip__container .is-arrow-snap.is-arrow-end.is-outside.is-horizontal-axis .tooltip__arrow{bottom:calc((var(--adapt-tooltip-target-distancetoedge-bottom) * -1) + .35rem);transform:none;top:initial}.is-inside .tooltip__arrow{display:none}.is-shown.tooltip{animation:toolTip--fadeScaleIn .4s forwards}.is-top.is-left.is-inside .tooltip__body{transform-origin:top left}.dir-rtl .is-top.is-left.is-inside .tooltip__body{transform-origin:top right}.is-top.is-middle.is-inside .tooltip__body{transform-origin:top center}.is-top.is-right.is-inside .tooltip__body{transform-origin:top right}.dir-rtl .is-top.is-right.is-inside .tooltip__body{transform-origin:top left}.is-center.is-left.is-inside .tooltip__body{transform-origin:center left}.dir-rtl .is-center.is-left.is-inside .tooltip__body{transform-origin:center right}.is-center.is-middle.is-inside .tooltip__body{transform-origin:center}.is-center.is-right.is-inside .tooltip__body{transform-origin:center right}.dir-rtl .is-center.is-right.is-inside .tooltip__body{transform-origin:center left}.is-bottom.is-left.is-inside .tooltip__body{transform-origin:bottom left}.dir-rtl .is-bottom.is-left.is-inside .tooltip__body{transform-origin:bottom right}.is-bottom.is-middle.is-inside .tooltip__body{transform-origin:bottom center}.is-bottom.is-right.is-inside .tooltip__body{transform-origin:bottom right}.dir-rtl .is-bottom.is-right.is-inside .tooltip__body{transform-origin:bottom left}@media (prefers-reduced-motion){.tooltip.is-shown{animation:none}}@keyframes toolTip--fadeScaleIn{0%{opacity:0;transform:scale(.9)}40%{opacity:1}100%{opacity:1;transform:scale(1)}}.graphic.is-scrollable .graphic__image-container{display:block;width:100%;overflow-x:scroll;overflow-y:hidden}.graphic.is-scrollable .graphic__image-container img{max-width:initial}.mcq__widget:not(.is-complete) .mcq-item__answer-icon{display:block}.mcq__widget.show-user-answer .is-correct .is-selected .mcq-item__correct-icon,.mcq__widget.show-user-answer .is-incorrect .is-selected .mcq-item__incorrect-icon{display:block}.mcq__widget.show-user-answer .mcq-item:not(.is-correct):not(.is-incorrect) .is-selected .mcq-item__answer-icon{display:block}.mcq__widget.show-correct-answer .is-correct .is-selected .mcq-item__correct-icon,.mcq__widget.show-correct-answer .is-incorrect .is-selected .mcq-item__correct-icon{display:block}.mcq__widget.show-correct-answer .mcq-item:not(.is-correct):not(.is-incorrect) .is-selected .mcq-item__answer-icon{display:block}.mcq-item{position:relative}.mcq-item__input{position:absolute;top:50%;left:50%;opacity:0;z-index:-1;transform:translate(-50%, -50%)}.mcq-item__label{display:block;z-index:1}.mcq-item__label:not(.is-disabled){cursor:pointer}.mcq-item__icon{display:none}.mcq-item__text{display:block}.mcq-item__answer-icon.is-radio .icon:before{content:"\e96f"}.mcq-item__answer-icon.is-checkbox .icon:before{content:"\e975"}.mcq-item__label.is-selected .mcq-item__answer-icon.is-radio .icon:before{content:"\e96e"}.mcq-item__label.is-selected .mcq-item__answer-icon.is-checkbox .icon:before{content:"\e974"}.mcq-item__correct-icon .icon:before{content:"\e944"}.mcq-item__incorrect-icon .icon:before{content:"\e945"}.resources__filter-inner{display:flex}.resources__filter.has-extra-types .resources__filter-inner{flex-wrap:wrap}.resources__filter-btn{flex-grow:1;white-space:nowrap}html:not(.ie) .resources__filter-btn{flex-basis:0}.article{position:relative}.trickle__inner{z-index:80}.trickle__btn{position:relative;display:block;margin:auto}.trickle.is-full-width .trickle__btn{width:100%}.trickle__btn-icon .icon:before{content:"\e96a"}.trickle.is-locked{position:absolute;bottom:0;left:0;right:0}.trickle.is-full-width .trickle__inner{position:fixed;left:0;right:0}html.is-nav-top .trickle.is-full-width .trickle__inner{bottom:0}html.is-nav-bottom .trickle.is-full-width .trickle__inner{bottom:var(--adapt-navigation-height)}.tutor__inner{position:relative;display:none;min-height:100%}.tutor__btn-icon{position:absolute;top:0;right:0}.dir-rtl .tutor__btn-icon{right:inherit;left:0}.tutor__btn-icon .icon:before{content:"\e945"}.tutor-type-overlay{position:absolute;z-index:1;top:0;left:0;overflow:auto;width:100%;height:101%}.boxmenu{margin:0 auto;max-width:90rem}.boxmenu__header-inner{margin:0 auto;max-width:56.25rem}.boxmenu__image{min-width:auto}.boxmenu__item-container .boxmenu__item-container-inner{display:flex;flex-wrap:wrap;margin:0 auto;max-width:56.25rem}.boxmenu.title-align-left .boxmenu__title,.boxmenu.body-align-left .boxmenu__body,.boxmenu.instruction-align-left .boxmenu__instruction{text-align:left}.dir-rtl .boxmenu.title-align-left .boxmenu__title,.dir-rtl .boxmenu.body-align-left .boxmenu__body,.dir-rtl .boxmenu.instruction-align-left .boxmenu__instruction{text-align:right}.boxmenu.title-align-center .boxmenu__title,.boxmenu.body-align-center .boxmenu__body,.boxmenu.instruction-align-center .boxmenu__instruction{text-align:center}.boxmenu.title-align-right .boxmenu__title,.boxmenu.body-align-right .boxmenu__body,.boxmenu.instruction-align-right .boxmenu__instruction{text-align:right}.dir-rtl .boxmenu.title-align-right .boxmenu__title,.dir-rtl .boxmenu.body-align-right .boxmenu__body,.dir-rtl .boxmenu.instruction-align-right .boxmenu__instruction{text-align:left}.boxmenu-group__header-inner{margin:0 auto;max-width:56.25rem}.boxmenu-group__item-container-inner{display:flex;flex-wrap:wrap}.boxmenu-item{width:100%}.boxmenu-item.is-locked .boxmenu-item__status .icon:before{content:"\e942"}@media (min-width:47.5rem){.boxmenu-item{width:50%}}.has-animation{overflow:hidden}.fade-in-before>div{opacity:0;transition:all 2000ms cubic-bezier(.23, 1, .32, 1),visibility 0s linear 0s}.fade-in-after>div{opacity:1}.fade-in-top-before>div{opacity:0;transform:translateY(-100px);transition:all 2000ms cubic-bezier(.23, 1, .32, 1),visibility 0s linear 0s;transition-delay:1s}.fade-in-top-after>div{opacity:1;transform:translateY(0)}.fade-in-bottom-before>div{opacity:0;transform:translateY(100px);transition:all 2000ms cubic-bezier(.23, 1, .32, 1),visibility 0s linear 0s;transition-delay:1s}.fade-in-bottom-after>div{opacity:1;transform:translateY(0)}.fade-in-left-before>div{opacity:0;transform:translateX(-100px);transition:all 2000ms cubic-bezier(.23, 1, .32, 1),visibility 0s linear 0s;transition-delay:1s}.fade-in-left-after>div{opacity:1;transform:translateX(0)}.fade-in-right-before>div{opacity:0;transform:translateX(100px);transition:all 2000ms cubic-bezier(.23, 1, .32, 1),visibility 0s linear 0s;transition-delay:1s}.fade-in-right-after>div{opacity:1;transform:translateX(0)}@font-face{font-family:'Open Sans';font-style:italic;font-weight:400;font-stretch:normal;src:url(https://fonts.gstatic.com/s/opensans/v36/memQYaGs126MiZpBA-UFUIcVXSCEkx2cmqvXlWq8tWZ0Pw86hd0Rk8ZkWVAexQ.ttf) format('truetype')}@font-face{font-family:'Open Sans';font-style:normal;font-weight:300;font-stretch:normal;src:url(https://fonts.gstatic.com/s/opensans/v36/memSYaGs126MiZpBA-UvWbX2vVnXBbObj2OVZyOOSr4dVJWUgsiH0B4gaVc.ttf) format('truetype')}@font-face{font-family:'Open Sans';font-style:normal;font-weight:400;font-stretch:normal;src:url(https://fonts.gstatic.com/s/opensans/v36/memSYaGs126MiZpBA-UvWbX2vVnXBbObj2OVZyOOSr4dVJWUgsjZ0B4gaVc.ttf) format('truetype')}@font-face{font-family:'Open Sans';font-style:normal;font-weight:700;font-stretch:normal;src:url(https://fonts.gstatic.com/s/opensans/v36/memSYaGs126MiZpBA-UvWbX2vVnXBbObj2OVZyOOSr4dVJWUgsg-1x4gaVc.ttf) format('truetype')}body{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-family:'Open Sans',sans-serif;font-size:1rem;font-weight:400;line-height:1.5;color:#4d4d4d}b,strong{font-weight:700}.background-blend-mode.soft-light{background-blend-mode:soft-light}.mix-blend-mode.soft-light{mix-blend-mode:soft-light}.background-blend-mode.screen{background-blend-mode:screen}.mix-blend-mode.screen{mix-blend-mode:screen}.background-blend-mode.saturation{background-blend-mode:saturation}.mix-blend-mode.saturation{mix-blend-mode:saturation}.background-blend-mode.overlay{background-blend-mode:overlay}.mix-blend-mode.overlay{mix-blend-mode:overlay}.background-blend-mode.multiply{background-blend-mode:multiply}.mix-blend-mode.multiply{mix-blend-mode:multiply}.background-blend-mode.luminosity{background-blend-mode:luminosity}.mix-blend-mode.luminosity{mix-blend-mode:luminosity}.background-blend-mode.lighten{background-blend-mode:lighten}.mix-blend-mode.lighten{mix-blend-mode:lighten}.background-blend-mode.hue{background-blend-mode:hue}.mix-blend-mode.hue{mix-blend-mode:hue}.background-blend-mode.hard-light{background-blend-mode:hard-light}.mix-blend-mode.hard-light{mix-blend-mode:hard-light}.background-blend-mode.exclusion{background-blend-mode:exclusion}.mix-blend-mode.exclusion{mix-blend-mode:exclusion}.background-blend-mode.difference{background-blend-mode:difference}.mix-blend-mode.difference{mix-blend-mode:difference}.background-blend-mode.darken{background-blend-mode:darken}.mix-blend-mode.darken{mix-blend-mode:darken}.background-blend-mode.color-dodge{background-blend-mode:color-dodge}.mix-blend-mode.color-dodge{mix-blend-mode:color-dodge}.background-blend-mode.color-burn{background-blend-mode:color-burn}.mix-blend-mode.color-burn{mix-blend-mode:color-burn}.background-blend-mode.color{background-blend-mode:color}.mix-blend-mode.color{mix-blend-mode:color}.filter.grayscale img{filter:grayscale(1)}.filter.invert img{filter:invert(1)}.filter.sepia img{filter:sepia(1)}.article{position:relative}.article.has-bg-image>.background{position:absolute;top:0;left:0;height:100%;width:100%;background-repeat:no-repeat;background-size:cover;background-position:center top}.article__inner{position:relative}.article__header-inner{padding:0 1rem}.article__title{margin-bottom:1rem;font-family:'Open Sans',sans-serif;font-size:1.875rem;font-weight:400;line-height:1.2;letter-spacing:normal;color:#115d7f}@media (min-width:47.5rem){.article__title{font-size:2.5rem}}.article__body{margin-bottom:1rem}.article__instruction{margin-bottom:1rem;font-family:'Open Sans',sans-serif;font-size:1rem;font-weight:700;line-height:1.5;font-style:normal}.article__body a,.article__instruction a{font-family:'Open Sans',sans-serif;font-size:inherit;font-weight:400;line-height:1.5;color:#4d4d4d}.no-touch .article__body a:hover,.no-touch .article__instruction a:hover{color:#4d4d4d;transition:color .2s ease-in}.has-attribution{position:relative;display:block}.component__attribution{position:absolute;bottom:0;left:0;width:100%;padding:1rem;background-color:rgba(0,0,0,0.5);color:#ffffff;transform:translate3d(0, 0, 0)}.gmcq__attribution{position:relative;display:flex}.block{position:relative}.block.has-bg-image>.background{position:absolute;top:0;left:0;height:100%;width:100%;background-repeat:no-repeat;background-size:cover;background-position:center top}.block__inner{position:relative;padding:4rem 1rem}.block__title{margin-bottom:1rem;font-family:'Open Sans',sans-serif;font-size:1.875rem;font-weight:400;line-height:1.2;letter-spacing:normal;color:#115d7f}@media (min-width:47.5rem){.block__title{font-size:2.5rem}}.block__body{margin-bottom:1rem}.block__instruction{margin-bottom:1rem;font-family:'Open Sans',sans-serif;font-size:1rem;font-weight:700;line-height:1.5;font-style:normal}.block__body a,.block__instruction a{font-family:'Open Sans',sans-serif;font-size:inherit;font-weight:400;line-height:1.5;color:#4d4d4d}.no-touch .block__body a:hover,.no-touch .block__instruction a:hover{color:#4d4d4d;transition:color .2s ease-in}.block.double-padding-top .block__inner{padding-top:8rem}.block.double-padding-bottom .block__inner{padding-bottom:8rem}.block.half-padding-top .block__inner{padding-top:2rem}.block.half-padding-bottom .block__inner{padding-bottom:2rem}.block.remove-padding-top .block__inner{padding-top:0}.block.remove-padding-bottom .block__inner{padding-bottom:0}.block.align-vert-center .block__inner,.block.align-vert-center .component__container{min-height:inherit}.block.align-vert-center .component__container{align-items:center}.block.align-vert-bottom .component__container{align-items:flex-end}.block.align-horz-center .component__container{justify-content:center}.block.align-horz-right .component__container{justify-content:flex-end}.btn__container{margin-top:1rem}.btn-icon{background-color:#ffffff;color:#115d7f}.no-touch .btn-icon:not(.is-disabled):not(.is-locked):hover{background-color:#eceaea;color:#115d7f;transition:background-color .2s ease-in,color .2s ease-in}.btn-text{font-family:'Open Sans',sans-serif;font-size:1rem;font-weight:400;line-height:1.5;letter-spacing:normal}.btn-text{background-color:#115d7f;color:#ffffff;border-radius:.25rem}.no-touch .btn-text:not(.is-disabled):not(.is-locked):hover{background-color:#74a6bd;color:#ffffff;transition:background-color .2s ease-in,color .2s ease-in}.btn-icon.is-disabled,.btn-text.is-disabled{background-color:#dddddd;color:#000}.btn-icon.is-locked,.btn-text.is-locked{background-color:#dddddd;color:#000;cursor:not-allowed}.btn__marking{padding:.75rem;border-radius:50%}.can-show-marking .btn__action.is-full-width,.can-show-marking .btn__feedback.is-full-width{margin-right:4rem}.dir-rtl .can-show-marking .btn__action.is-full-width,.dir-rtl .can-show-marking .btn__feedback.is-full-width{margin-right:inherit;margin-left:4rem}.component__container{flex-direction:unset;margin-left:-1rem;margin-right:-1rem}.component__inner{padding:1rem 1rem}.component__title{margin-bottom:1rem;font-family:'Open Sans',sans-serif;font-size:1.875rem;font-weight:400;line-height:1.2;letter-spacing:normal;color:#115d7f}@media (min-width:47.5rem){.component__title{font-size:2.5rem}}.component__body{margin-bottom:1rem}.component__instruction{margin-bottom:1rem;font-family:'Open Sans',sans-serif;font-size:1rem;font-weight:700;line-height:1.5;font-style:normal}.component__body a,.component__instruction a{font-family:'Open Sans',sans-serif;font-size:inherit;font-weight:400;line-height:1.5;color:#4d4d4d}.no-touch .component__body a:hover,.no-touch .component__instruction a:hover{color:#4d4d4d;transition:color .2s ease-in}.drawer{background-color:#263944;color:#ffffff}.drawer__toolbar{border-bottom:1px solid #141e23}.drawer__btn{margin:.5rem;padding:.5rem;background-color:#263944;color:#ffffff;border-radius:50%}.no-touch .drawer__btn:not(.is-disabled):not(.is-locked):hover{background-color:#141e23;color:#ffffff;transition:background-color .2s ease-in,color .2s ease-in}.drawer__item-btn{display:block;padding:1rem;background-color:#263944;border-bottom:1px solid #141e23;color:#ffffff}.no-touch .drawer__item-btn:not(.is-disabled):not(.is-locked):hover{background-color:#141e23;color:#ffffff;transition:background-color .2s ease-in,color .2s ease-in}.drawer__item-btn.is-disabled{background-color:#dddddd;color:#000}.drawer__item-btn.is-selected{background-color:#010203;color:#ffffff}.drawer__item-title{margin-bottom:.25rem;font-family:'Open Sans',sans-serif;font-size:1rem;font-weight:400;line-height:1.2;letter-spacing:normal;text-align:left}.dir-rtl .drawer__item-title{text-align:right}.drawer__item-body{margin-bottom:0;font-family:'Open Sans',sans-serif;font-size:.875rem;font-weight:400;line-height:1.5;text-align:left}.dir-rtl .drawer__item-body{text-align:right}body{background-color:#fff}.inline-icon{display:inline-block;vertical-align:middle}blockquote,figure{margin:1rem}.figure-quote{margin:0;font-size:1.25rem;font-family:'Open Sans',sans-serif;font-weight:400;line-height:1.5;font-style:normal;letter-spacing:normal}.figure-quote figcaption{margin:1rem;font-size:1rem;font-family:'Open Sans',sans-serif;font-weight:400;line-height:1.5;font-style:normal;letter-spacing:normal}.aside-pull-quote{margin:1rem;padding:1rem;border-bottom:2px solid #117F93;background-color:#f9f9f9;color:#4d4d4d;font-size:1.5rem;font-family:'Open Sans',sans-serif;font-weight:700;line-height:1.5;font-style:normal;letter-spacing:normal}@media (min-width:47.5rem){.aside-pull-quote{font-size:2rem}}@media (min-width:47.5rem){.aside-pull-quote{margin:2rem;padding:2rem}}.is-bold{font-weight:700}.is-italic{font-style:italic}.loading{background-color:rgba(0,0,0,0.5);color:#ffffff}.loading__inner,.loading__inner:before,.loading__inner:after{width:2rem;height:2rem;border-radius:50%;animation-fill-mode:both;animation:loading 1.25s infinite ease-in-out}.loading__inner{position:absolute;top:51%;left:0;right:0;margin:auto;text-indent:-9999rem;animation-delay:-0.16s;transform:translateZ(0)}.loading__inner:before,.loading__inner:after{content:"";position:absolute;top:0}.loading__inner:before{left:-3rem;animation-delay:-0.32s}.loading__inner:after{left:3rem}@keyframes loading{0%,80%,100%{box-shadow:0 2.5rem 0 -1.3rem}40%{box-shadow:0 2.5rem 0 0}}.nav{background-color:#115d7f}.nav__inner{max-width:inherit}.nav__btn{background-color:#ffffff;color:#115d7f}.no-touch .nav__btn:not(.is-disabled):not(.is-locked):hover{background-color:#eceaea;color:#115d7f;transition:background-color .2s ease-in,color .2s ease-in}.nav__btn-label{font-size:.875rem}.notify__popup{background-color:#36cde8;color:#ffffff;transition:margin-top .2s,top .2s}.notify__popup-inner{position:relative;padding:4rem 1rem}.notify__icon{display:none}.notify__title{margin-bottom:1rem;font-family:'Open Sans',sans-serif;font-size:1.875rem;font-weight:400;line-height:1.2;letter-spacing:normal;padding-right:3.5rem}@media (min-width:47.5rem){.notify__title{font-size:2.5rem}}.dir-rtl .notify__title{padding-right:inherit;padding-left:3.5rem}@media (min-width:47.5rem){.notify__title{padding-right:inherit}.dir-rtl .notify__title{padding-left:inherit}}.notify__body{margin-bottom:1rem}.notify__instruction{margin-bottom:0;font-family:'Open Sans',sans-serif;font-size:1rem;font-weight:700;line-height:1.5;font-style:normal}.notify__body a,.notify__instruction a{font-family:'Open Sans',sans-serif;font-size:inherit;font-weight:400;line-height:1.5;color:#4d4d4d;color:#ffffff}.no-touch .notify__body a:hover,.no-touch .notify__instruction a:hover{color:#4d4d4d;transition:color .2s ease-in}.no-touch .notify__body a:hover,.no-touch .notify__instruction a:hover{color:#ffffff;transition:color .2s ease-in}.notify__btn-container{margin-top:1rem}.notify__btn{background-color:#ffffff;color:#115d7f}.no-touch .notify__btn:not(.is-disabled):hover{background-color:#e6e6e6;color:#115d7f;transition:background-color .2s ease-in,color .2s ease-in}.notify__btn-icon{margin:.5rem;padding:.5rem;background-color:#18b7d3;color:#ffffff;border-radius:50%}.no-touch .notify__btn-icon:not(.is-disabled):not(.is-locked):hover{background-color:#16a3bc;color:#ffffff;transition:background-color .2s ease-in,color .2s ease-in}.notify__close-btn{position:absolute;top:0;right:0}.dir-rtl .notify__close-btn{right:inherit;left:0}.notify-push{background-color:#36cde8;color:#ffffff;transform:translateY(25px);transition:opacity .2s ease-in-out,transform .2s ease-in-out}.notify-push.is-active{transform:translateY(0)}.notify-push__inner{padding:1rem;padding-right:4.5rem}.dir-rtl .notify-push__inner{padding-right:1rem;padding-left:4.5rem}.notify-push__title{margin-bottom:1rem;font-family:'Open Sans',sans-serif;font-size:1.875rem;font-weight:400;line-height:1.2;letter-spacing:normal}@media (min-width:47.5rem){.notify-push__title{font-size:2.5rem}}.notify-push__body a{font-family:'Open Sans',sans-serif;font-size:inherit;font-weight:400;line-height:1.5;color:#4d4d4d;color:#ffffff}.no-touch .notify-push__body a:hover{color:#4d4d4d;transition:color .2s ease-in}.no-touch .notify-push__body a:hover{color:#ffffff;transition:color .2s ease-in}.notify-push__close-btn{position:absolute;top:0;right:0;margin:.5rem;padding:.5rem;background-color:#18b7d3;color:#ffffff;border-radius:50%}.no-touch .notify-push__close-btn:not(.is-disabled):not(.is-locked):hover{background-color:#16a3bc;color:#ffffff;transition:background-color .2s ease-in,color .2s ease-in}.dir-rtl .notify-push__close-btn{right:auto;left:0}.page{position:relative;max-width:inherit;padding:0 0}.page.has-bg-image>.background{position:absolute;top:0;left:0;height:100%;width:100%;background-repeat:no-repeat;background-size:cover;background-position:center top}.page__inner{position:relative}.page__header{position:relative}.page__header.has-bg-image>.background{position:absolute;top:0;left:0;height:100%;width:100%;background-repeat:no-repeat;background-size:cover;background-position:center top}.page__header-inner{position:relative;padding:2rem 1rem}.page__title{margin-bottom:.5rem;font-family:'Open Sans',sans-serif;font-size:2.25rem;font-weight:400;line-height:1.2;letter-spacing:normal;color:#115d7f}@media (min-width:47.5rem){.page__title{font-size:3rem}}.page__subtitle{margin-bottom:1rem;font-family:'Open Sans',sans-serif;font-size:1.5rem;font-weight:300;line-height:1.2;letter-spacing:normal}@media (min-width:47.5rem){.page__subtitle{font-size:2rem}}.page__body{margin-bottom:1rem;font-family:'Open Sans',sans-serif;font-size:1.25rem;font-weight:400;line-height:1.5}.page__instruction{margin-bottom:1rem;font-family:'Open Sans',sans-serif;font-size:1.25rem;font-weight:700;line-height:1.5;font-style:normal}.page__body a,.page__instruction a{font-family:'Open Sans',sans-serif;font-size:inherit;font-weight:400;line-height:1.5;color:#4d4d4d}.no-touch .page__body a:hover,.no-touch .page__instruction a:hover{color:#4d4d4d;transition:color .2s ease-in}.shadow{background-color:rgba(0,0,0,0.5)}.assessmentresults__retry-feedback{margin-bottom:1rem}.boxmenu{position:relative;max-width:inherit;padding:0 0}.boxmenu.has-bg-image>.background{position:absolute;top:0;left:0;height:100%;width:100%;background-repeat:no-repeat;background-size:cover;background-position:center top}.boxmenu__inner{position:relative}.boxmenu__header{position:relative}.boxmenu__header.has-bg-image>.background{position:absolute;top:0;left:0;height:100%;width:100%;background-repeat:no-repeat;background-size:cover;background-position:center top}.boxmenu__header-inner{position:relative;padding:2rem 1rem;background-color:transparent}.boxmenu__title{margin-bottom:1rem;font-family:'Open Sans',sans-serif;font-size:2.25rem;font-weight:400;line-height:1.2;letter-spacing:normal;color:#115d7f}@media (min-width:47.5rem){.boxmenu__title{font-size:3rem}}.boxmenu__subtitle{margin-bottom:1rem;font-family:'Open Sans',sans-serif;font-size:1.5rem;font-weight:300;line-height:1.2;letter-spacing:normal}@media (min-width:47.5rem){.boxmenu__subtitle{font-size:2rem}}.boxmenu__body{margin-bottom:1rem;font-family:'Open Sans',sans-serif;font-size:1.25rem;font-weight:400;line-height:1.5;color:#4d4d4d}.boxmenu__instruction{margin-bottom:1rem;font-family:'Open Sans',sans-serif;font-size:1.25rem;font-weight:700;line-height:1.5;font-style:normal;color:#4d4d4d}.boxmenu__body a,.boxmenu__instruction a{font-family:'Open Sans',sans-serif;font-size:inherit;font-weight:400;line-height:1.5;color:#4d4d4d}.no-touch .boxmenu__body a:hover,.no-touch .boxmenu__instruction a:hover{color:#4d4d4d;transition:color .2s ease-in}.boxmenu__item-container{margin-top:1.5rem}.boxmenu-group__header-inner{padding:2rem 1rem}.boxmenu-group__title{margin-bottom:1rem;font-family:'Open Sans',sans-serif;font-size:1.5rem;font-weight:300;line-height:1.2;letter-spacing:normal}@media (min-width:47.5rem){.boxmenu-group__title{font-size:2rem}}.boxmenu-group__body{margin-bottom:1rem;font-family:'Open Sans',sans-serif;font-size:1.25rem;font-weight:400;line-height:1.5}.boxmenu-group__instruction{margin-bottom:1rem;font-family:'Open Sans',sans-serif;font-size:1.25rem;font-weight:700;line-height:1.5;font-style:normal}.boxmenu-group__body a,.boxmenu-group__instruction a{font-family:'Open Sans',sans-serif;font-size:inherit;font-weight:400;line-height:1.5;color:#4d4d4d}.no-touch .boxmenu-group__body a:hover,.no-touch .boxmenu-group__instruction a:hover{color:#4d4d4d;transition:color .2s ease-in}.boxmenu-item__inner{margin:0 .5rem 1rem;padding:1rem;background-color:#fff;color:#4d4d4d;border:1px solid #115d7f;border-radius:.25rem}.boxmenu-item__image-container{margin-bottom:1rem}.boxmenu-item__title{margin-bottom:.75rem;font-family:'Open Sans',sans-serif;font-size:1.25rem;font-weight:400;line-height:1.2;letter-spacing:normal}.boxmenu-item__body{margin-bottom:1rem;font-family:'Open Sans',sans-serif;font-size:1rem;font-weight:300;line-height:1.5}.boxmenu-item__body a{font-family:'Open Sans',sans-serif;font-size:inherit;font-weight:400;line-height:1.5;color:#4d4d4d}.no-touch .boxmenu-item__body a:hover{color:#4d4d4d;transition:color .2s ease-in}.boxmenu-item__duration{margin-bottom:1rem;font-family:'Open Sans',sans-serif;font-size:1rem;font-weight:300;line-height:1.5}.boxmenu-item__progress{margin-bottom:1rem}.boxmenu-item__button-container{display:flex;align-items:center;margin-bottom:1rem}.boxmenu-item__button{background-color:#115d7f;color:#ffffff}.no-touch .boxmenu-item__button:not(.is-disabled):not(.is-locked):hover{background-color:#74a6bd;color:#ffffff;transition:background-color .2s ease-in,color .2s ease-in}.boxmenu-item__button.is-locked,.boxmenu-item__button.is-disabled{background-color:#dddddd;color:#000}.boxmenu-item__status{margin-left:.5rem}.boxmenu-item.has-img-zoom .boxmenu-item__image-container{overflow:hidden}.boxmenu-item.has-img-zoom .boxmenu-item__image-container img{transition:transform .75s ease-in-out}.no-touch .boxmenu-item.has-img-zoom .boxmenu-item__image-container img:hover{transform:scale(1.1)}.graphic.has-img-zoom .graphic__image-container{overflow:hidden}.graphic.has-img-zoom .graphic__image-container img{transition:transform .75s ease-in-out}.no-touch .graphic.has-img-zoom .graphic__image-container img:hover{transform:scale(1.1)}.mcq-item__label{margin-bottom:.25rem;background-color:#115d7f;color:#ffffff;border-radius:.25rem}.no-touch .mcq-item__label:not(.is-disabled):not(.is-selected):hover,html:not(.a11y-disable-focusoutline) .mcq-item__input:focus-visible+.mcq-item__label{background-color:#0b3c52;color:#ffffff;transition:background-color .2s ease-in,color .2s ease-in}.no-touch .mcq-item__label:not(.is-disabled):not(.is-selected):hover .mcq-item__icon{animation:scalePulse .5s 0s 1 normal ease-in-out none}@keyframes scalePulse{0%{transform:none}50%{transform:scale(1.2, 1.2)}100%{transform:none}}.mcq-item__label.is-disabled{background-color:#dddddd;color:#000}.mcq-item__label.is-selected{background-color:#74a6bd;color:#ffffff}.mcq-item__state{position:absolute;top:50%;left:1rem;transform:translateY(-50%)}.dir-rtl .mcq-item__state{left:inherit;right:1rem}.mcq-item__text{padding:1rem 1rem 1rem 3.5rem}.dir-rtl .mcq-item__text{padding-left:1rem;padding-right:3.5rem}.resources__filter-btn{padding:1rem .5rem;font-family:'Open Sans',sans-serif;font-size:1rem;font-weight:400;line-height:1.5;background-color:#263944;border-bottom:1px solid #141e23;border-right:1px solid #141e23;color:#ffffff}.no-touch .resources__filter-btn:not(.is-disabled):not(.is-selected):hover{background-color:#141e23;color:#ffffff;transition:background-color .2s ease-in,color .2s ease-in}.resources__filter-btn:last-child{border-right:none}.resources__filter-btn.is-selected{background-color:#010203;color:#ffffff;box-shadow:inset 0 -0.625rem 0 -0.4375rem #ffffff}.resources__item-btn{text-decoration:none}.trickle__btn-icon{display:inline-block;vertical-align:middle}.trickle__btn-text{display:inline-block;vertical-align:middle}.tutor__content-inner{padding:4rem 1rem;padding:1rem}.tutor__title{font-family:'Open Sans',sans-serif;font-size:1.875rem;font-weight:400;line-height:1.2;letter-spacing:normal;margin-bottom:1rem}@media (min-width:47.5rem){.tutor__title{font-size:2.5rem}}.tutor__body{margin-bottom:1rem}.tutor__btn{margin-top:1rem}.tutor__btn-icon{margin:.5rem;padding:.5rem;background-color:#18b7d3;color:#ffffff;border-radius:50%}.no-touch .tutor__btn-icon:not(.is-disabled):not(.is-locked):hover{background-color:#16a3bc;color:#ffffff;transition:background-color .2s ease-in,color .2s ease-in}.tutor-type-overlay .tutor__inner{background-color:#36cde8;color:#ffffff}.tutor-type-overlay .tutor__title{padding-right:2.5rem}.dir-rtl .tutor-type-overlay .tutor__title{padding-right:inherit;padding-left:2.5rem}.tutor-type-overlay .tutor__body a{font-family:'Open Sans',sans-serif;font-size:inherit;font-weight:400;line-height:1.5;color:#4d4d4d;color:#ffffff}.no-touch .tutor-type-overlay .tutor__body a:hover{color:#4d4d4d;transition:color .2s ease-in}.no-touch .tutor-type-overlay .tutor__body a:hover{color:#ffffff;transition:color .2s ease-in}.tutor-type-overlay .tutor__btn{background-color:#ffffff;color:#115d7f}.no-touch .tutor-type-overlay .tutor__btn:hover{background-color:#e6e6e6;color:#115d7f;transition:background-color .2s ease-in,color .2s ease-in}.tutor-type-overlay .tutor__btn-icon{background-color:#18b7d3;color:#ffffff}.no-touch .tutor-type-overlay .tutor__btn-icon:hover{background-color:#16a3bc;color:#ffffff}@media (min-width:0){.boxmenu-item.col-xs-1{width:8.33333333%}.component.col-xs-1{width:8.33333333%}}@media (min-width:0){.boxmenu-item.col-xs-2{width:16.66666667%}.component.col-xs-2{width:16.66666667%}}@media (min-width:0){.boxmenu-item.col-xs-3{width:25%}.component.col-xs-3{width:25%}}@media (min-width:0){.boxmenu-item.col-xs-4{width:33.33333333%}.component.col-xs-4{width:33.33333333%}}@media (min-width:0){.boxmenu-item.col-xs-5{width:41.66666667%}.component.col-xs-5{width:41.66666667%}}@media (min-width:0){.boxmenu-item.col-xs-6{width:50%}.component.col-xs-6{width:50%}}@media (min-width:0){.boxmenu-item.col-xs-7{width:58.33333333%}.component.col-xs-7{width:58.33333333%}}@media (min-width:0){.boxmenu-item.col-xs-8{width:66.66666667%}.component.col-xs-8{width:66.66666667%}}@media (min-width:0){.boxmenu-item.col-xs-9{width:75%}.component.col-xs-9{width:75%}}@media (min-width:0){.boxmenu-item.col-xs-10{width:83.33333333%}.component.col-xs-10{width:83.33333333%}}@media (min-width:0){.boxmenu-item.col-xs-11{width:91.66666667%}.component.col-xs-11{width:91.66666667%}}@media (min-width:0){.boxmenu-item.col-xs-12{width:100%}.component.col-xs-12{width:100%}}@media (min-width:32.5rem){.boxmenu-item.col-sm-1{width:8.33333333%}.component.col-sm-1{width:8.33333333%}}@media (min-width:32.5rem){.boxmenu-item.col-sm-2{width:16.66666667%}.component.col-sm-2{width:16.66666667%}}@media (min-width:32.5rem){.boxmenu-item.col-sm-3{width:25%}.component.col-sm-3{width:25%}}@media (min-width:32.5rem){.boxmenu-item.col-sm-4{width:33.33333333%}.component.col-sm-4{width:33.33333333%}}@media (min-width:32.5rem){.boxmenu-item.col-sm-5{width:41.66666667%}.component.col-sm-5{width:41.66666667%}}@media (min-width:32.5rem){.boxmenu-item.col-sm-6{width:50%}.component.col-sm-6{width:50%}}@media (min-width:32.5rem){.boxmenu-item.col-sm-7{width:58.33333333%}.component.col-sm-7{width:58.33333333%}}@media (min-width:32.5rem){.boxmenu-item.col-sm-8{width:66.66666667%}.component.col-sm-8{width:66.66666667%}}@media (min-width:32.5rem){.boxmenu-item.col-sm-9{width:75%}.component.col-sm-9{width:75%}}@media (min-width:32.5rem){.boxmenu-item.col-sm-10{width:83.33333333%}.component.col-sm-10{width:83.33333333%}}@media (min-width:32.5rem){.boxmenu-item.col-sm-11{width:91.66666667%}.component.col-sm-11{width:91.66666667%}}@media (min-width:32.5rem){.boxmenu-item.col-sm-12{width:100%}.component.col-sm-12{width:100%}}@media (min-width:47.5rem){.boxmenu-item.col-md-1{width:8.33333333%}.component.col-md-1{width:8.33333333%}}@media (min-width:47.5rem){.boxmenu-item.col-md-2{width:16.66666667%}.component.col-md-2{width:16.66666667%}}@media (min-width:47.5rem){.boxmenu-item.col-md-3{width:25%}.component.col-md-3{width:25%}}@media (min-width:47.5rem){.boxmenu-item.col-md-4{width:33.33333333%}.component.col-md-4{width:33.33333333%}}@media (min-width:47.5rem){.boxmenu-item.col-md-5{width:41.66666667%}.component.col-md-5{width:41.66666667%}}@media (min-width:47.5rem){.boxmenu-item.col-md-6{width:50%}.component.col-md-6{width:50%}}@media (min-width:47.5rem){.boxmenu-item.col-md-7{width:58.33333333%}.component.col-md-7{width:58.33333333%}}@media (min-width:47.5rem){.boxmenu-item.col-md-8{width:66.66666667%}.component.col-md-8{width:66.66666667%}}@media (min-width:47.5rem){.boxmenu-item.col-md-9{width:75%}.component.col-md-9{width:75%}}@media (min-width:47.5rem){.boxmenu-item.col-md-10{width:83.33333333%}.component.col-md-10{width:83.33333333%}}@media (min-width:47.5rem){.boxmenu-item.col-md-11{width:91.66666667%}.component.col-md-11{width:91.66666667%}}@media (min-width:47.5rem){.boxmenu-item.col-md-12{width:100%}.component.col-md-12{width:100%}}@media (min-width:56.25rem){.boxmenu-item.col-lg-1{width:8.33333333%}.component.col-lg-1{width:8.33333333%}}@media (min-width:56.25rem){.boxmenu-item.col-lg-2{width:16.66666667%}.component.col-lg-2{width:16.66666667%}}@media (min-width:56.25rem){.boxmenu-item.col-lg-3{width:25%}.component.col-lg-3{width:25%}}@media (min-width:56.25rem){.boxmenu-item.col-lg-4{width:33.33333333%}.component.col-lg-4{width:33.33333333%}}@media (min-width:56.25rem){.boxmenu-item.col-lg-5{width:41.66666667%}.component.col-lg-5{width:41.66666667%}}@media (min-width:56.25rem){.boxmenu-item.col-lg-6{width:50%}.component.col-lg-6{width:50%}}@media (min-width:56.25rem){.boxmenu-item.col-lg-7{width:58.33333333%}.component.col-lg-7{width:58.33333333%}}@media (min-width:56.25rem){.boxmenu-item.col-lg-8{width:66.66666667%}.component.col-lg-8{width:66.66666667%}}@media (min-width:56.25rem){.boxmenu-item.col-lg-9{width:75%}.component.col-lg-9{width:75%}}@media (min-width:56.25rem){.boxmenu-item.col-lg-10{width:83.33333333%}.component.col-lg-10{width:83.33333333%}}@media (min-width:56.25rem){.boxmenu-item.col-lg-11{width:91.66666667%}.component.col-lg-11{width:91.66666667%}}@media (min-width:56.25rem){.boxmenu-item.col-lg-12{width:100%}.component.col-lg-12{width:100%}}@media (min-width:80rem){.boxmenu-item.col-xl-1{width:8.33333333%}.component.col-xl-1{width:8.33333333%}}@media (min-width:80rem){.boxmenu-item.col-xl-2{width:16.66666667%}.component.col-xl-2{width:16.66666667%}}@media (min-width:80rem){.boxmenu-item.col-xl-3{width:25%}.component.col-xl-3{width:25%}}@media (min-width:80rem){.boxmenu-item.col-xl-4{width:33.33333333%}.component.col-xl-4{width:33.33333333%}}@media (min-width:80rem){.boxmenu-item.col-xl-5{width:41.66666667%}.component.col-xl-5{width:41.66666667%}}@media (min-width:80rem){.boxmenu-item.col-xl-6{width:50%}.component.col-xl-6{width:50%}}@media (min-width:80rem){.boxmenu-item.col-xl-7{width:58.33333333%}.component.col-xl-7{width:58.33333333%}}@media (min-width:80rem){.boxmenu-item.col-xl-8{width:66.66666667%}.component.col-xl-8{width:66.66666667%}}@media (min-width:80rem){.boxmenu-item.col-xl-9{width:75%}.component.col-xl-9{width:75%}}@media (min-width:80rem){.boxmenu-item.col-xl-10{width:83.33333333%}.component.col-xl-10{width:83.33333333%}}@media (min-width:80rem){.boxmenu-item.col-xl-11{width:91.66666667%}.component.col-xl-11{width:91.66666667%}}@media (min-width:80rem){.boxmenu-item.col-xl-12{width:100%}.component.col-xl-12{width:100%}}@media (min-width:47.5rem){.block.reverse-desktop-order .component__container{flex-direction:row-reverse}}.block.extend-content-container .block__inner{max-width:70rem}.block.extend-container .block__inner{max-width:90rem}.bg-color.black{background-color:#000;color:#fff}.bg-color.black .block__title,.bg-color.black .component__title,.bg-color.black .block__body a,.bg-color.black .component__body a,.bg-color.black .block__instruction a,.bg-color.black .component__instruction a{color:#fff}.bg-color.black .pagelevelprogress__indicator{border-color:#fff}.bg-color.black .pagelevelprogress__indicator-inner{background-color:#000}.bg-color.black .pagelevelprogress__indicator-bar{background-color:#fff}.bg-color.black .narrative__progress{background-color:rgba(255,255,255,0.5)}.bg-color.black .narrative__progress.is-selected{background-color:#fff}.bg-color.white{background-color:#fff;color:#000}.bg-color.white .block__title,.bg-color.white .component__title,.bg-color.white .block__body a,.bg-color.white .component__body a,.bg-color.white .block__instruction a,.bg-color.white .component__instruction a{color:#000}.bg-color.white .pagelevelprogress__indicator{border-color:#000}.bg-color.white .pagelevelprogress__indicator-inner{background-color:#fff}.bg-color.white .pagelevelprogress__indicator-bar{background-color:#000}.bg-color.white .narrative__progress{background-color:rgba(0,0,0,0.5)}.bg-color.white .narrative__progress.is-selected{background-color:#000}.bg-color.background{background-color:#000;color:#ffffff}.bg-color.background .block__title,.bg-color.background .component__title,.bg-color.background .block__body a,.bg-color.background .component__body a,.bg-color.background .block__instruction a,.bg-color.background .component__instruction a{color:#ffffff}.bg-color.background .pagelevelprogress__indicator{border-color:#ffffff}.bg-color.background .pagelevelprogress__indicator-inner{background-color:#000}.bg-color.background .pagelevelprogress__indicator-bar{background-color:#ffffff}.bg-color.background .narrative__progress{background-color:rgba(255,255,255,0.5)}.bg-color.background .narrative__progress.is-selected{background-color:#ffffff}.bg-color.transparent-light{background-color:transparent;color:#000}.bg-color.transparent-light .block__title,.bg-color.transparent-light .component__title,.bg-color.transparent-light .block__body a,.bg-color.transparent-light .component__body a,.bg-color.transparent-light .block__instruction a,.bg-color.transparent-light .component__instruction a{color:#000}.bg-color.transparent-light .pagelevelprogress__indicator{border-color:#000}.bg-color.transparent-light .pagelevelprogress__indicator-inner{background-color:transparent}.bg-color.transparent-light .pagelevelprogress__indicator-bar{background-color:#000}.bg-color.transparent-light .narrative__progress{background-color:rgba(0,0,0,0.5)}.bg-color.transparent-light .narrative__progress.is-selected{background-color:#000}.bg-color.transparent-dark{background-color:transparent;color:#fff}.bg-color.transparent-dark .block__title,.bg-color.transparent-dark .component__title,.bg-color.transparent-dark .block__body a,.bg-color.transparent-dark .component__body a,.bg-color.transparent-dark .block__instruction a,.bg-color.transparent-dark .component__instruction a{color:#fff}.bg-color.transparent-dark .pagelevelprogress__indicator{border-color:#fff}.bg-color.transparent-dark .pagelevelprogress__indicator-inner{background-color:transparent}.bg-color.transparent-dark .pagelevelprogress__indicator-bar{background-color:#fff}.bg-color.transparent-dark .narrative__progress{background-color:rgba(255,255,255,0.5)}.bg-color.transparent-dark .narrative__progress.is-selected{background-color:#fff}.page.title-align-left .page__title,.page.body-align-left .page__body,.page.instruction-align-left .page__instruction{text-align:left}.dir-rtl .page.title-align-left .page__title,.dir-rtl .page.body-align-left .page__body,.dir-rtl .page.instruction-align-left .page__instruction{text-align:right}.page.title-align-center .page__title,.page.body-align-center .page__body,.page.instruction-align-center .page__instruction{text-align:center}.page.title-align-right .page__title,.page.body-align-right .page__body,.page.instruction-align-right .page__instruction{text-align:right}.dir-rtl .page.title-align-right .page__title,.dir-rtl .page.body-align-right .page__body,.dir-rtl .page.instruction-align-right .page__instruction{text-align:left}.article.title-align-left .article__title,.article.body-align-left .article__body,.article.instruction-align-left .article__instruction{text-align:left}.dir-rtl .article.title-align-left .article__title,.dir-rtl .article.body-align-left .article__body,.dir-rtl .article.instruction-align-left .article__instruction{text-align:right}.article.title-align-center .article__title,.article.body-align-center .article__body,.article.instruction-align-center .article__instruction{text-align:center}.article.title-align-right .article__title,.article.body-align-right .article__body,.article.instruction-align-right .article__instruction{text-align:right}.dir-rtl .article.title-align-right .article__title,.dir-rtl .article.body-align-right .article__body,.dir-rtl .article.instruction-align-right .article__instruction{text-align:left}.block.title-align-left .block__title,.block.body-align-left .block__body,.block.instruction-align-left .block__instruction{text-align:left}.dir-rtl .block.title-align-left .block__title,.dir-rtl .block.body-align-left .block__body,.dir-rtl .block.instruction-align-left .block__instruction{text-align:right}.block.title-align-center .block__title,.block.body-align-center .block__body,.block.instruction-align-center .block__instruction{text-align:center}.block.title-align-right .block__title,.block.body-align-right .block__body,.block.instruction-align-right .block__instruction{text-align:right}.dir-rtl .block.title-align-right .block__title,.dir-rtl .block.body-align-right .block__body,.dir-rtl .block.instruction-align-right .block__instruction{text-align:left}.component.title-align-left .component__title,.component.body-align-left .component__body,.component.instruction-align-left .component__instruction{text-align:left}.dir-rtl .component.title-align-left .component__title,.dir-rtl .component.body-align-left .component__body,.dir-rtl .component.instruction-align-left .component__instruction{text-align:right}.component.title-align-center .component__title,.component.body-align-center .component__body,.component.instruction-align-center .component__instruction{text-align:center}.component.title-align-right .component__title,.component.body-align-right .component__body,.component.instruction-align-right .component__instruction{text-align:right}.dir-rtl .component.title-align-right .component__title,.dir-rtl .component.body-align-right .component__body,.dir-rtl .component.instruction-align-right .component__instruction{text-align:left}@media (min-width:47.5rem){.hide-on-desktop{display:none}}@media (max-width:47.5rem){.hide-on-mobile{display:none}}.comp-header-bg-color.black .component__inner{margin:-1rem -1rem}.comp-header-bg-color.black .component__header{padding:1rem 1rem;background-color:#000;color:#fff}.comp-header-bg-color.black .component__title,.comp-header-bg-color.black .component__body a,.comp-header-bg-color.black .component__instruction a{color:#fff}.comp-header-bg-color.black .pagelevelprogress__indicator{border-color:#fff}.comp-header-bg-color.black .pagelevelprogress__indicator-inner{background-color:#000}.comp-header-bg-color.black .pagelevelprogress__indicator-bar{background-color:#fff}.comp-header-bg-color.background .component__inner{margin:-1rem -1rem}.comp-header-bg-color.background .component__header{padding:1rem 1rem;background-color:#000;color:#ffffff}.comp-header-bg-color.background .component__title,.comp-header-bg-color.background .component__body a,.comp-header-bg-color.background .component__instruction a{color:#ffffff}.comp-header-bg-color.background .pagelevelprogress__indicator{border-color:#ffffff}.comp-header-bg-color.background .pagelevelprogress__indicator-inner{background-color:#000}.comp-header-bg-color.background .pagelevelprogress__indicator-bar{background-color:#ffffff}.comp-header-bg-color.transparent-light .component__inner{margin:-1rem -1rem}.comp-header-bg-color.transparent-light .component__header{padding:1rem 1rem;background-color:transparent;color:#4d4d4d}.comp-header-bg-color.transparent-light .component__title,.comp-header-bg-color.transparent-light .component__body a,.comp-header-bg-color.transparent-light .component__instruction a{color:#4d4d4d}.comp-header-bg-color.transparent-light .pagelevelprogress__indicator{border-color:#4d4d4d}.comp-header-bg-color.transparent-light .pagelevelprogress__indicator-inner{background-color:transparent}.comp-header-bg-color.transparent-light .pagelevelprogress__indicator-bar{background-color:#4d4d4d}.comp-header-bg-color.transparent-dark .component__inner{margin:-1rem -1rem}.comp-header-bg-color.transparent-dark .component__header{padding:1rem 1rem;background-color:transparent;color:#ffffff}.comp-header-bg-color.transparent-dark .component__title,.comp-header-bg-color.transparent-dark .component__body a,.comp-header-bg-color.transparent-dark .component__instruction a{color:#ffffff}.comp-header-bg-color.transparent-dark .pagelevelprogress__indicator{border-color:#ffffff}.comp-header-bg-color.transparent-dark .pagelevelprogress__indicator-inner{background-color:transparent}.comp-header-bg-color.transparent-dark .pagelevelprogress__indicator-bar{background-color:#ffffff}.hide-nav-back-btn .nav__back-btn{display:none !important}.hide-page-header .page__header{display:none !important}.header-color.black .menu__header,.header-color.black .page__header{background-color:#000}.header-color.black .menu__title,.header-color.black .page__title,.header-color.black .menu__subtitle,.header-color.black .page__subtitle,.header-color.black .menu__body,.header-color.black .page__body,.header-color.black .menu__body a,.header-color.black .page__body a,.header-color.black .menu__instruction,.header-color.black .page__instruction,.header-color.black .menu__instruction a,.header-color.black .page__instruction a{color:#fff}.header-color.background .menu__header,.header-color.background .page__header{background-color:#000}.header-color.background .menu__title,.header-color.background .page__title,.header-color.background .menu__subtitle,.header-color.background .page__subtitle,.header-color.background .menu__body,.header-color.background .page__body,.header-color.background .menu__body a,.header-color.background .page__body a,.header-color.background .menu__instruction,.header-color.background .page__instruction,.header-color.background .menu__instruction a,.header-color.background .page__instruction a{color:#ffffff}.header-color.transparent-light .menu__header,.header-color.transparent-light .page__header{background-color:transparent}.header-color.transparent-light .menu__title,.header-color.transparent-light .page__title,.header-color.transparent-light .menu__subtitle,.header-color.transparent-light .page__subtitle,.header-color.transparent-light .menu__body,.header-color.transparent-light .page__body,.header-color.transparent-light .menu__body a,.header-color.transparent-light .page__body a,.header-color.transparent-light .menu__instruction,.header-color.transparent-light .page__instruction,.header-color.transparent-light .menu__instruction a,.header-color.transparent-light .page__instruction a{color:#4d4d4d}.header-color.transparent-dark .menu__header,.header-color.transparent-dark .page__header{background-color:transparent}.header-color.transparent-dark .menu__title,.header-color.transparent-dark .page__title,.header-color.transparent-dark .menu__subtitle,.header-color.transparent-dark .page__subtitle,.header-color.transparent-dark .menu__body,.header-color.transparent-dark .page__body,.header-color.transparent-dark .menu__body a,.header-color.transparent-dark .page__body a,.header-color.transparent-dark .menu__instruction,.header-color.transparent-dark .page__instruction,.header-color.transparent-dark .menu__instruction a,.header-color.transparent-dark .page__instruction a{color:#ffffff} \ No newline at end of file +:root{--adapt-device-small:32.5em;--adapt-device-medium:47.5em;--adapt-device-large:56.25em;--adapt-device-xlarge:80em}/*! normalize.css v8.0.1 | MIT License | github.com/necolas/normalize.css */html{line-height:1.15;-webkit-text-size-adjust:100%}body{margin:0}main{display:block}h1{font-size:2em;margin:.67em 0}hr{box-sizing:content-box;height:0;overflow:visible}pre{font-family:monospace, monospace;font-size:1em}a{background-color:transparent}abbr[title]{border-bottom:none;text-decoration:underline;text-decoration:underline dotted}b,strong{font-weight:bolder}code,kbd,samp{font-family:monospace, monospace;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-0.25em}sup{top:-0.5em}img{border-style:none}button,input,optgroup,select,textarea{font-family:inherit;font-size:100%;line-height:1.15;margin:0}button,input{overflow:visible}button,select{text-transform:none}button,[type="button"],[type="reset"],[type="submit"]{-webkit-appearance:button}button::-moz-focus-inner,[type="button"]::-moz-focus-inner,[type="reset"]::-moz-focus-inner,[type="submit"]::-moz-focus-inner{border-style:none;padding:0}button:-moz-focusring,[type="button"]:-moz-focusring,[type="reset"]:-moz-focusring,[type="submit"]:-moz-focusring{outline:1px dotted ButtonText}fieldset{padding:.35em .75em .625em}legend{box-sizing:border-box;color:inherit;display:table;max-width:100%;padding:0;white-space:normal}progress{vertical-align:baseline}textarea{overflow:auto}[type="checkbox"],[type="radio"]{box-sizing:border-box;padding:0}[type="number"]::-webkit-inner-spin-button,[type="number"]::-webkit-outer-spin-button{height:auto}[type="search"]{-webkit-appearance:textfield;outline-offset:-2px}[type="search"]::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}details{display:block}summary{display:list-item}template{display:none}[hidden]{display:none}:root{--adapt-viewport-height:100vh;--adapt-navigation-height:calc(1.5rem + (1rem * 2))}html{box-sizing:border-box}*,*:before,*:after{box-sizing:inherit}html{overflow-y:scroll}img,object,embed{max-width:100%}img{display:block;min-width:100%}@media screen and (-ms-high-contrast:active),(-ms-high-contrast:none){img[src$=".svg"]{width:100%}}button{border:0;padding:0}button:not(.is-disabled):not(.is-locked){cursor:pointer}.dir-rtl body{direction:rtl}zw{display:inline-block;width:0}nb{white-space:nowrap}@font-face{font-family:"vanilla";src:url('fonts/vanilla.woff2') format('woff2'),url('fonts/vanilla.woff') format('woff');font-weight:normal;font-style:normal;font-display:block}.icon:before{display:block;font-family:"vanilla";speak:none;font-style:normal;font-weight:normal;font-variant:normal;text-transform:none;line-height:1;font-size:1.5rem;text-align:center;text-decoration:none;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.icon-arrow-with-circle-down:before{content:"\e900"}.icon-arrow-with-circle-left:before{content:"\e901"}.dir-rtl .icon-arrow-with-circle-left:before{content:"\e902"}.icon-arrow-with-circle-right:before{content:"\e902"}.dir-rtl .icon-arrow-with-circle-right:before{content:"\e901"}.icon-arrow-with-circle-up:before{content:"\e903"}.icon-chevron-with-circle-down:before{content:"\e904"}.icon-chevron-with-circle-left:before{content:"\e905"}.dir-rtl .icon-chevron-with-circle-left:before{content:"\e906"}.icon-chevron-with-circle-right:before{content:"\e906"}.dir-rtl .icon-chevron-with-circle-right:before{content:"\e905"}.icon-chevron-with-circle-up:before{content:"\e907"}.icon-info-with-circle:before{content:"\e908"}.icon-location:before{content:"\e909"}.icon-medal:before{content:"\e90a"}.icon-price-ribbon:before{content:"\e90b"}.icon-shield:before{content:"\e90c"}.icon-stopwatch:before{content:"\e90d"}.icon-text-document-inverted:before{content:"\e90e"}.icon-text-document:before{content:"\e90f"}.icon-trophy:before{content:"\e910"}.icon-arrow-down:before{content:"\e911"}.icon-arrow-left:before{content:"\e912"}.dir-rtl .icon-arrow-left:before{content:"\e913"}.icon-arrow-right:before{content:"\e913"}.dir-rtl .icon-arrow-right:before{content:"\e912"}.icon-arrow-up:before{content:"\e914"}.icon-bookmark:before{content:"\e915"}.icon-message:before{content:"\e916"}.icon-mouse:before{content:"\e917"}.icon-mobile:before{content:"\e918"}.icon-desktop:before{content:"\e919"}.icon-pencil:before{content:"\e91a"}.icon-forward-arrow:before{content:"\e91b"}.dir-rtl .icon-forward-arrow:before{content:"\e91c"}.icon-backwards-arrow:before{content:"\e91c"}.dir-rtl .icon-backwards-arrow:before{content:"\e91b"}.icon-person:before{content:"\e91d"}.icon-persons:before{content:"\e91e"}.icon-profile:before{content:"\e91f"}.icon-pin:before{content:"\e920"}.icon-map:before{content:"\e921"}.icon-point:before{content:"\e922"}.icon-star:before{content:"\e923"}.icon-star-hollow:before{content:"\e924"}.icon-comments:before{content:"\e925"}.icon-comment:before{content:"\e926"}.icon-home:before{content:"\e927"}.icon-popup:before{content:"\e928"}.icon-search:before{content:"\e929"}.icon-printer:before{content:"\e92a"}.icon-link:before{content:"\e92b"}.icon-flag:before{content:"\e92c"}.icon-cog:before{content:"\e92d"}.icon-tools:before{content:"\e92e"}.icon-tag:before{content:"\e92f"}.icon-camera:before{content:"\e930"}.icon-feedback:before{content:"\e931"}.icon-book:before{content:"\e932"}.icon-article:before{content:"\e933"}.icon-eye:before{content:"\e934"}.icon-time:before{content:"\e935"}.icon-microphone:before{content:"\e936"}.icon-calendar:before{content:"\e937"}.icon-timer:before{content:"\e938"}.icon-drag:before{content:"\e939"}.icon-light-bulb:before{content:"\e93a"}.icon-checklist:before{content:"\e93b"}.icon-ticket:before{content:"\e93c"}.icon-wi-fi:before{content:"\e93d"}.icon-line-graph:before{content:"\e93e"}.icon-pie-chart:before{content:"\e93f"}.icon-bar-graph:before{content:"\e940"}.icon-scatter-graph:before{content:"\e941"}.icon-padlock-locked:before{content:"\e942"}.icon-padlock-unlocked:before{content:"\e943"}.icon-tick:before{content:"\e944"}.icon-cross:before{content:"\e945"}.icon-minus:before{content:"\e946"}.icon-plus:before{content:"\e947"}.icon-info:before{content:"\e948"}.icon-question:before{content:"\e949"}.icon-warning:before{content:"\e94a"}.icon-list:before{content:"\e94b"}.icon-add-to-list:before{content:"\e94c"}.icon-menu:before{content:"\e94d"}.icon-grid:before{content:"\e94e"}.icon-portrait:before{content:"\e94f"}.icon-screens:before{content:"\e950"}.icon-landscape:before{content:"\e951"}.icon-images:before{content:"\e952"}.icon-media:before{content:"\e953"}.icon-folder:before{content:"\e954"}.icon-documents:before{content:"\e955"}.icon-delete:before{content:"\e956"}.icon-save:before{content:"\e957"}.icon-download:before{content:"\e958"}.icon-upload:before{content:"\e959"}.icon-expand:before{content:"\e95a"}.icon-shrink:before{content:"\e95b"}.icon-volume:before{content:"\e95c"}.icon-sound:before{content:"\e95d"}.icon-sound-mute:before{content:"\e95e"}.icon-controls-down:before{content:"\e95f"}.icon-controls-left:before{content:"\e960"}.dir-rtl .icon-controls-left:before{content:"\e961"}.icon-controls-right:before{content:"\e961"}.dir-rtl .icon-controls-right:before{content:"\e960"}.icon-controls-up:before{content:"\e962"}.icon-triangle-down:before{content:"\e963"}.icon-triangle-left:before{content:"\e964"}.dir-rtl .icon-triangle-left:before{content:"\e965"}.icon-triangle-right:before{content:"\e965"}.dir-rtl .icon-triangle-right:before{content:"\e964"}.icon-triangle-up:before{content:"\e966"}.icon-dot:before{content:"\e967"}.icon-ellipsis:before{content:"\e968"}.icon-up-down:before{content:"\e969"}.icon-controls-small-down:before{content:"\e96a"}.icon-controls-small-left:before{content:"\e96b"}.dir-rtl .icon-controls-small-left:before{content:"\e96c"}.icon-controls-small-right:before{content:"\e96c"}.dir-rtl .icon-controls-small-right:before{content:"\e96b"}.icon-controls-small-up:before{content:"\e96d"}.icon-radio-checked:before{content:"\e96e"}.icon-radio-unchecked:before{content:"\e96f"}.icon-language-1:before{content:"\e970"}.icon-accessibility:before{content:"\e971"}.icon-globe:before{content:"\e972"}.icon-language-2:before{content:"\e973"}.icon-checkbox-checked:before{content:"\e974"}.icon-checkbox-unchecked:before{content:"\e975"}.icon-accessibility-2:before{content:"\e976"}.icon-alert:before{content:"\e977"}.icon-arrow-down-2:before{content:"\e978"}.icon-arrow-left-2:before{content:"\e979"}.dir-rtl .icon-arrow-left-2:before{content:"\e97a"}.icon-arrow-right-2:before{content:"\e97a"}.dir-rtl .icon-arrow-right-2:before{content:"\e979"}.icon-arrow-up-2:before{content:"\e97b"}.icon-arrow-down-3:before{content:"\e97c"}.icon-arrow-left-3:before{content:"\e97d"}.dir-rtl .icon-arrow-left-3:before{content:"\e97e"}.icon-arrow-right-3:before{content:"\e97e"}.dir-rtl .icon-arrow-right-3:before{content:"\e97d"}.icon-arrow-up-3:before{content:"\e97f"}.icon-attachment:before{content:"\e980"}.icon-block:before{content:"\e981"}.icon-camera-off:before{content:"\e982"}.icon-camera-on:before{content:"\e983"}.icon-cloud:before{content:"\e984"}.icon-compass:before{content:"\e985"}.icon-copy-file:before{content:"\e986"}.icon-copyright:before{content:"\e987"}.icon-crop:before{content:"\e988"}.icon-devices:before{content:"\e989"}.icon-down-up:before{content:"\e98a"}.icon-ellipsis-vertical:before{content:"\e98b"}.icon-exclamation:before{content:"\e98c"}.icon-expand_1:before{content:"\e98d"}.icon-extension:before{content:"\e98e"}.icon-favourite:before{content:"\e98f"}.icon-google-translate:before{content:"\e990"}.icon-hand:before{content:"\e991"}.icon-lightning:before{content:"\e992"}.icon-list-2:before{content:"\e993"}.icon-microphone-off:before{content:"\e994"}.icon-move:before{content:"\e995"}.icon-mute:before{content:"\e996"}.icon-ordered-list:before{content:"\e997"}.icon-question-circle:before{content:"\e998"}.icon-quote-close:before{content:"\e999"}.icon-quote-open:before{content:"\e99a"}.icon-refresh:before{content:"\e99b"}.icon-send:before{content:"\e99c"}.icon-sound-down:before{content:"\e99d"}.icon-sync:before{content:"\e99e"}.icon-tablet:before{content:"\e99f"}.icon-thumb-down:before{content:"\e9a0"}.icon-thumb-up:before{content:"\e9a1"}.icon-timer-empty:before{content:"\e9a2"}.icon-timer-full:before{content:"\e9a3"}.icon-video-captions-off-2:before{content:"\e9a4"}.icon-video-captions-off:before{content:"\e9a5"}.icon-video-captions:before{content:"\e9a6"}.icon-video-exit-fullscreen:before{content:"\e9a7"}.icon-video-fast-forward:before{content:"\e9a8"}.icon-video-fullscreen:before{content:"\e9a9"}.icon-video-loop:before{content:"\e9aa"}.icon-video-pause-circle:before{content:"\e9ab"}.icon-video-pause:before{content:"\e9ac"}.icon-video-play-circle:before{content:"\e9ad"}.icon-video-play:before{content:"\e9ae"}.icon-video-replay:before{content:"\e9af"}.icon-video-rewind:before{content:"\e9b0"}.icon-video-skip-back:before{content:"\e9b1"}.icon-video-skip-forward:before{content:"\e9b2"}.icon-video-stop:before{content:"\e9b3"}.icon-quote-close-2:before{content:"\e9b4"}.icon-quote-open-2:before{content:"\e9b5"}.icon-emotion-happy:before{content:"\e9b6"}.icon-emotion-not-ok:before{content:"\e9b7"}.icon-emotion-ok:before{content:"\e9b8"}.icon-emotion-sad:before{content:"\e9b9"}.icon-emotion-very-happy:before{content:"\e9ba"}.icon-emotion-very-unhappy:before{content:"\e9bb"}.icon-blogger-2:before{content:"\e9bc"}.icon-blogger:before{content:"\e9bd"}.icon-deviantart-2:before{content:"\e9be"}.icon-deviantart:before{content:"\e9bf"}.icon-doc-excel:before{content:"\e9c0"}.icon-doc-pdf:before{content:"\e9c1"}.icon-doc-word:before{content:"\e9c2"}.icon-facebook-2:before{content:"\e9c3"}.icon-facebook:before{content:"\e9c4"}.icon-flickr-2:before{content:"\e9c5"}.icon-flickr:before{content:"\e9c6"}.icon-github:before{content:"\e9c7"}.icon-instagram-2:before{content:"\e9c8"}.icon-instagram:before{content:"\e9c9"}.icon-linkedin-2:before{content:"\e9ca"}.icon-linkedin:before{content:"\e9cb"}.icon-paypal:before{content:"\e9cc"}.icon-pintrest-2:before{content:"\e9cd"}.icon-pintrest:before{content:"\e9ce"}.icon-qq-2:before{content:"\e9cf"}.icon-qq:before{content:"\e9d0"}.icon-reddit-2:before{content:"\e9d1"}.icon-reddit:before{content:"\e9d2"}.icon-rss-2:before{content:"\e9d3"}.icon-rss:before{content:"\e9d4"}.icon-sina-weibo-2:before{content:"\e9d5"}.icon-sina-weibo:before{content:"\e9d6"}.icon-soundcloud-2:before{content:"\e9d7"}.icon-soundcloud:before{content:"\e9d8"}.icon-steam-2:before{content:"\e9d9"}.icon-steam:before{content:"\e9da"}.icon-trello-2:before{content:"\e9db"}.icon-trello:before{content:"\e9dc"}.icon-tumbler-2:before{content:"\e9dd"}.icon-tumblr:before{content:"\e9de"}.icon-twitch:before{content:"\e9df"}.icon-twitter-2:before{content:"\e9e0"}.icon-twitter:before{content:"\e9e1"}.icon-vimeo-2:before{content:"\e9e2"}.icon-vimeo:before{content:"\e9e3"}.icon-wechat-2:before{content:"\e9e4"}.icon-wechat:before{content:"\e9e5"}.icon-weibo-2:before{content:"\e9e6"}.icon-weibo:before{content:"\e9e7"}.icon-xing-2:before{content:"\e9e8"}.icon-xing:before{content:"\e9e9"}.icon-youku-2:before{content:"\e9ea"}.icon-youku:before{content:"\e9eb"}.icon-youtube-2:before{content:"\e9ec"}.icon-youtube:before{content:"\e9ed"}.u-clearfix:before,.u-clearfix:after{content:"\0020";display:block;height:0;overflow:hidden;visibility:hidden}.u-clearfix:after{clear:both}.u-clearfix{zoom:1}.u-display-none{display:none !important}.u-visibility-hidden{visibility:hidden !important}.u-no-select{-webkit-touch-callout:none;-webkit-user-select:none;-khtml-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.component{position:relative}.block{position:relative}.aria-label{position:absolute !important;left:0 !important;width:auto !important;height:auto !important;overflow:auto !important;color:rgba(0,0,0,0) !important;background:rgba(0,0,0,0) !important;font-size:1px !important;padding:0 !important;margin:0 !important;line-height:normal !important;z-index:1}.aria-label.relative{position:relative !important}.aria-label.aria-hidden{display:none !important}.a11y-focusguard{left:0 !important;bottom:0 !important;width:auto !important;height:auto !important;overflow:auto !important;color:rgba(0,0,0,0) !important;background:rgba(0,0,0,0) !important;font-size:1px !important;padding:0 !important;margin:0 !important;line-height:normal !important;z-index:1}.touchevents .a11y-focusguard{position:absolute !important}.no-touchevents .a11y-focusguard{position:fixed !important}#a11y-focuser{bottom:0 !important;position:fixed !important;left:0 !important;width:auto !important;height:auto !important;overflow:auto !important;color:rgba(0,0,0,0) !important;background:rgba(0,0,0,0) !important;font-size:1px !important;padding:0 !important;margin:0 !important;line-height:normal !important;z-index:1}.a11y-disable-focusoutline *:focus{outline:none !important}.article__header-inner{margin:0 auto;max-width:56.25rem}.block__inner{margin:0 auto;max-width:56.25rem}.btn-icon{padding:1rem;border:0}.btn-text{padding:.5rem 1rem}.btn__response-container{display:flex;flex-wrap:wrap;position:relative}.btn__action:not(.is-full-width){width:calc(50% - 1rem);margin-right:1rem}.dir-rtl .btn__action:not(.is-full-width){margin-right:inherit;margin-left:1rem}.btn__feedback:not(.is-full-width){width:calc(50% - 1rem);margin-left:1rem}.dir-rtl .btn__feedback:not(.is-full-width){margin-left:inherit;margin-right:1rem}.btn__action.is-full-width,.btn__feedback.is-full-width{width:100%}.can-show-marking .btn__action.is-full-width,.can-show-marking .btn__feedback.is-full-width{margin-right:2.5rem}.dir-rtl .can-show-marking .btn__action.is-full-width,.dir-rtl .can-show-marking .btn__feedback.is-full-width{margin-right:inherit;margin-left:2.5rem}.btn__marking{position:absolute;left:50%;top:50%;transform:translate(-50%, -50%)}.dir-rtl .btn__marking{left:inherit;right:50%;transform:translate(50%, -50%)}.btn__marking.is-full-width{left:inherit;right:.5rem;transform:translate(0, -50%)}.dir-rtl .btn__marking.is-full-width{left:.5rem;right:inherit}.btn__marking.is-correct{background-color:#065f28;color:#ffffff}.btn__marking.is-correct .icon:before{content:"\e944"}.btn__marking.is-incorrect{background-color:#ff0000;color:#ffffff}.btn__marking.is-incorrect .icon:before{content:"\e945"}.component{width:100%}.component__container{display:flex;flex-direction:column;flex-wrap:wrap;align-items:flex-start}@media (min-width:47.5rem){.component__container{flex-direction:row}}@media (min-width:47.5rem){.component.is-left{width:50%}.component.is-right{margin-left:auto;width:50%}.dir-rtl .component.is-right{margin-left:0;margin-right:auto}}.drawer{position:fixed;top:0;height:100%;width:20rem;z-index:100}.drawer.is-position-auto,.drawer.is-position-right{left:inherit;right:-20rem}.dir-rtl .drawer:not(.is-position-right),.drawer.is-position-left{right:inherit;left:-20rem}.drawer__inner{position:relative;height:100%;padding-top:var(--adapt-navigation-height)}.drawer__holder{height:100%;overflow-y:auto;overflow-x:hidden;-webkit-overflow-scrolling:touch}.drawer__toolbar{position:absolute;top:0;width:100%;height:var(--adapt-navigation-height);display:flex;align-items:center;justify-content:flex-end}.drawer__back{margin-right:auto}.dir-rtl .drawer__back{margin-right:inherit;margin-left:auto}.drawer__back .icon:before{content:"\e96b"}.dir-rtl .drawer__back .icon:before{content:"\e96c"}.drawer__close .icon:before{content:"\e945"}.drawer__item-btn{width:100%}.drawer__item-title,.drawer__item-body{display:block}.menu__title-inner,.menu-item__title-inner,.page__title-inner,.article__title-inner,.block__title-inner,.component__title-inner{display:inline;vertical-align:middle}.loading{position:fixed;top:0;bottom:0;left:0;right:0;margin:auto;height:100%;width:100%;z-index:100}html.is-nav-top #wrapper{padding-top:var(--adapt-navigation-height)}html.is-nav-bottom #wrapper{padding-bottom:var(--adapt-navigation-height)}.nav{position:fixed;width:100%;z-index:80}html.is-nav-top .nav{top:0}html.is-nav-bottom .nav{bottom:0}.nav__inner{margin:0 auto;max-width:90rem;display:flex;align-items:stretch}.nav__btn{display:inline-flex;align-items:center;justify-content:center;float:none !important}.nav.hide-label .nav__btn-label,.nav__btn.hide-label .nav__btn-label{display:none}.nav.show-label.show-label-small .nav__btn-label{display:none}@media (min-width:32.5rem){.nav.show-label.show-label-small .nav__btn:not(.hide-label) .nav__btn-label{display:initial}}.nav.show-label.show-label-medium .nav__btn-label{display:none}@media (min-width:47.5rem){.nav.show-label.show-label-medium .nav__btn:not(.hide-label) .nav__btn-label{display:initial}}.nav.show-label.show-label-large .nav__btn-label{display:none}@media (min-width:56.25rem){.nav.show-label.show-label-large .nav__btn:not(.hide-label) .nav__btn-label{display:initial}}.nav.has-label-right .nav__btn-label{margin-left:.5rem}.nav.has-label-bottom .nav__btn{flex-direction:column}.nav.has-label-bottom .nav__btn-label{margin-top:.5rem}.nav.has-label-top .nav__btn{flex-direction:column}.nav.has-label-top .nav__btn-label{order:-1;margin-bottom:.5rem}.has-label-left .nav__btn-label{order:-1}.nav.has-label-left .nav__btn-label{margin-right:.5rem}.dir-rtl .nav.has-label-auto .nav__btn-label{margin-right:.5rem}.dir-ltr .nav.has-label-auto .nav__btn-label{margin-left:.5rem}.nav__spacer{flex-grow:1}.nav__skip-btn{position:absolute;left:0;top:0;z-index:100}html:not(.has-accessibility) .nav__skip-btn{display:none !important}.nav__skip-btn:not(:focus-visible){height:0;padding:0;margin:0;overflow:hidden}.nav__back-btn .icon:before{content:"\e96b"}.dir-rtl .nav__back-btn .icon:before{content:"\e96c"}.nav__drawer-btn .icon:before{content:"\e94b"}.notify{position:relative;z-index:100}.notify__popup{position:fixed;top:50%;width:100%;visibility:hidden;z-index:100;background-color:#ffffff}.notify__popup-inner{margin:0 auto;max-width:56.25rem}.notify__close-btn .icon:before{content:"\e945"}.notify__icon .icon.is-prompt:before{content:"\e949"}.notify__icon .icon.is-alert:before{content:"\e94a"}.notify__popup.has-image .notify__section-inner{display:flex;flex-direction:column;row-gap:1rem}@media (min-width:47.5rem){.notify__popup.has-image.align-image-left .notify__section-inner,.notify__popup.has-image.align-image-right .notify__section-inner{flex-direction:row;column-gap:1rem}.notify__popup.has-image.align-image-left .notify__section-inner .notify__body,.notify__popup.has-image.align-image-right .notify__section-inner .notify__body{width:60%}.notify__popup.has-image.align-image-left .notify__section-inner .notify__image-container,.notify__popup.has-image.align-image-right .notify__section-inner .notify__image-container{width:40%}}.notify-push{position:fixed;right:0;width:20rem;opacity:0;z-index:100;background-color:#ffffff}.notify-push.is-active{opacity:1}.dir-rtl .notify-push{right:auto;left:0}.notify-push__inner{cursor:pointer}.notify-push__close-btn .icon:before{content:"\e945"}.page{margin:0 auto;max-width:90rem}.page__header-inner{margin:0 auto;max-width:56.25rem}html.adapt-scrolling{height:100%;overflow:auto}html.adapt-scrolling .nav{width:calc(100% - 18px);width:calc(100% - var(--adapt-scrollbar-width))}html.adapt-scrolling body{height:100%;overflow:hidden;position:relative;overflow-y:scroll;-webkit-overflow-scrolling:touch}.shadow{position:fixed;top:0;bottom:0;left:0;right:0;margin:auto;opacity:0;z-index:90}:root{--adapt-tooltip-offset:.35rem;--adapt-tooltip-distance:1rem;--adapt-tooltip-viewport-padding:8px;--adapt-tooltip-target-position-left:0;--adapt-tooltip-target-position-top:0;--adapt-tooltip-target-position-right:0;--adapt-tooltip-target-position-bottom:0;--adapt-tooltip-target-position-width:0;--adapt-tooltip-target-position-height:0;--adapt-tooltip-target-distancetoedge-left:0;--adapt-tooltip-target-distancetoedge-top:0;--adapt-tooltip-target-distancetoedge-right:0;--adapt-tooltip-target-distancetoedge-bottom:0;--adapt-tooltip-scroll-top:0;--adapt-tooltip-scroll-left:0}.test{color:transparent !important}.test .tooltip__body{pointer-events:all !important;background-color:transparent !important;outline:1px solid black !important}.test .tooltip__body:hover{background-color:red !important;color:white !important}.tooltip__container{overflow:hidden}.tooltip{position:absolute;left:calc(var(--adapt-tooltip-target-position-left) + var(--adapt-tooltip-scroll-left));top:calc(var(--adapt-tooltip-target-position-top) + var(--adapt-tooltip-scroll-top));width:var(--adapt-tooltip-target-position-width);height:var(--adapt-tooltip-target-position-height);pointer-events:none;opacity:0;z-index:0}.is-shown.tooltip{opacity:1}.is-loading.tooltip{visibility:hidden}.is-fixed.tooltip{position:fixed;z-index:82}.tooltip__body{position:absolute;overflow:hidden;text-overflow:ellipsis;width:max-content;min-width:3rem;max-width:20rem;color:white;font-size:.9rem;line-height:1.5;padding:.5rem .75rem .55rem;background-color:rgba(0,0,0,0.85);border-radius:.35rem}@media (min-width:47.5rem){.tooltip__body{max-width:30rem}}.tooltip__arrow{position:absolute;width:.7rem;height:.7rem}.tooltip__arrow:before{content:"";position:absolute;top:0;left:0;width:.7rem;height:.7rem;transform-origin:50% 50%;border-width:0 .35rem .35rem;border-style:solid;border-color:transparent;border-bottom-color:rgba(0,0,0,0.85)}.is-top.is-outside.is-vertical-axis .tooltip__body{bottom:100%;margin-bottom:1rem}.is-bottom.is-outside.is-vertical-axis .tooltip__body{top:100%;margin-top:1rem}.is-center.is-outside.is-vertical-axis .tooltip__body{top:50%;transform:translateY(-50%)}.is-left.is-arrow-start.is-outside.is-vertical-axis .tooltip__body{right:calc(100% - .7rem - (.35rem * 2))}.dir-rtl .is-left.is-arrow-start.is-outside.is-vertical-axis .tooltip__body{left:calc(100% - .7rem - (.35rem * 2));right:initial}.is-left.is-arrow-middle.is-outside.is-vertical-axis .tooltip__body{right:calc(50% - (.7rem / 2) - .35rem)}.dir-rtl .is-left.is-arrow-middle.is-outside.is-vertical-axis .tooltip__body{left:calc(50% - (.7rem / 2) - .35rem);right:initial}.is-left.is-arrow-end.is-outside.is-vertical-axis .tooltip__body{right:0%}.dir-rtl .is-left.is-arrow-end.is-outside.is-vertical-axis .tooltip__body{left:0%;right:initial}.is-middle.is-arrow-start.is-outside.is-vertical-axis .tooltip__body{left:calc(0% + .7rem);transform:translate(-50%)}.dir-rtl .is-middle.is-arrow-start.is-outside.is-vertical-axis .tooltip__body{right:calc(0% + .7rem);left:initial;transform:translate(50%)}.is-middle.is-arrow-middle.is-outside.is-vertical-axis .tooltip__body{left:50%;transform:translate(-50%)}.is-middle.is-arrow-end.is-outside.is-vertical-axis .tooltip__body{left:calc(100% - .7rem);transform:translate(-50%)}.dir-rtl .is-middle.is-arrow-end.is-outside.is-vertical-axis .tooltip__body{right:calc(100% - .7rem);left:initial;transform:translate(50%)}.is-right.is-arrow-start.is-outside.is-vertical-axis .tooltip__body{left:0%}.dir-rtl .is-right.is-arrow-start.is-outside.is-vertical-axis .tooltip__body{right:0%;left:initial}.is-right.is-arrow-middle.is-outside.is-vertical-axis .tooltip__body{left:calc(50% - (.7rem / 2) - .35rem)}.dir-rtl .is-right.is-arrow-middle.is-outside.is-vertical-axis .tooltip__body{right:calc(50% - (.7rem / 2) - .35rem);left:initial}.is-right.is-arrow-end.is-outside.is-vertical-axis .tooltip__body{left:calc(100% - .7rem - (.35rem * 2))}.dir-rtl .is-right.is-arrow-end.is-outside.is-vertical-axis .tooltip__body{right:calc(100% - .7rem - (.35rem * 2));left:initial}.is-middle.is-center.is-arrow-start.is-outside.is-vertical-axis .tooltip__body,.is-middle.is-center.is-arrow-middle.is-outside.is-vertical-axis .tooltip__body,.is-middle.is-center.is-arrow-end.is-outside.is-vertical-axis .tooltip__body{transform:translate(-50%, -50%)}.dir-rtl .is-middle.is-center.is-arrow-start.is-outside.is-vertical-axis .tooltip__body,.dir-rtl .is-middle.is-center.is-arrow-middle.is-outside.is-vertical-axis .tooltip__body,.dir-rtl .is-middle.is-center.is-arrow-end.is-outside.is-vertical-axis .tooltip__body{transform:translate(50%, -50%)}.is-fill-width.is-arrow-start.is-outside.is-vertical-axis .tooltip__body,.is-fill-width.is-arrow-middle.is-outside.is-vertical-axis .tooltip__body,.is-fill-width.is-arrow-end.is-outside.is-vertical-axis .tooltip__body{left:calc(var(--adapt-tooltip-target-distancetoedge-left) * -1);right:calc(var(--adapt-tooltip-target-distancetoedge-right) * -1);max-width:56.25rem;margin-left:auto;margin-right:auto;width:initial;transform:initial}.dir-rtl .is-fill-width.is-arrow-start.is-outside.is-vertical-axis .tooltip__body,.dir-rtl .is-fill-width.is-arrow-middle.is-outside.is-vertical-axis .tooltip__body,.dir-rtl .is-fill-width.is-arrow-end.is-outside.is-vertical-axis .tooltip__body{left:calc(var(--adapt-tooltip-target-distancetoedge-left) * -1);right:calc(var(--adapt-tooltip-target-distancetoedge-right) * -1)}.is-top.is-fill-width.is-outside.is-vertical-axis .tooltip__body{max-height:calc(var(--adapt-tooltip-target-distancetoedge-top) - 1rem)}.is-bottom.is-fill-width.is-outside.is-vertical-axis .tooltip__body{max-height:calc(var(--adapt-tooltip-target-distancetoedge-bottom) - 1rem)}.tooltip__container .is-snap-left.is-outside.is-vertical-axis .tooltip__body{left:calc(var(--adapt-tooltip-target-distancetoedge-left) * -1);transform:none;right:initial}.tooltip__container .is-snap-right.is-outside.is-vertical-axis .tooltip__body{right:calc(var(--adapt-tooltip-target-distancetoedge-right) * -1);transform:none;left:initial}.is-left.is-outside.is-horizontal-axis .tooltip__body{right:100%;margin-right:1rem}.dir-rtl .is-left.is-outside.is-horizontal-axis .tooltip__body{left:100%;right:initial;margin-left:1rem;margin-right:initial}.is-right.is-outside.is-horizontal-axis .tooltip__body{left:100%;margin-left:1rem}.dir-rtl .is-right.is-outside.is-horizontal-axis .tooltip__body{right:100%;left:initial;margin-right:1rem;margin-left:initial}.is-middle.is-outside.is-horizontal-axis .tooltip__body{left:50%;transform:translateX(-50%)}.dir-rtl .is-middle.is-outside.is-horizontal-axis .tooltip__body{right:50%;transform:translateX(50%);left:initial}.is-top.is-arrow-start.is-outside.is-horizontal-axis .tooltip__body{bottom:calc(100% - .7rem - (.35rem * 2))}.is-top.is-arrow-middle.is-outside.is-horizontal-axis .tooltip__body{bottom:calc(50% - (.7rem / 2) - .35rem)}.is-top.is-arrow-end.is-outside.is-horizontal-axis .tooltip__body{bottom:0%}.is-center.is-arrow-start.is-outside.is-horizontal-axis .tooltip__body{top:calc(0% + .7rem);transform:translateY(-50%)}.is-center.is-arrow-middle.is-outside.is-horizontal-axis .tooltip__body{top:50%;transform:translateY(-50%)}.is-center.is-arrow-end.is-outside.is-horizontal-axis .tooltip__body{top:calc(100% - .7rem);transform:translateY(-50%)}.is-bottom.is-arrow-start.is-outside.is-horizontal-axis .tooltip__body{top:0%}.is-bottom.is-arrow-middle.is-outside.is-horizontal-axis .tooltip__body{top:calc(50% - (.7rem / 2) - .35rem)}.is-bottom.is-arrow-end.is-outside.is-horizontal-axis .tooltip__body{top:calc(100% - .7rem - (.35rem * 2))}.is-left.is-fill-height.is-outside.is-horizontal-axis .tooltip__body{left:calc(var(--adapt-tooltip-target-distancetoedge-left) * -1);max-height:var(--adapt-tooltip-viewport-constrained-height);max-width:unset;width:unset}.dir-rtl .is-left.is-fill-height.is-outside.is-horizontal-axis .tooltip__body{right:calc(var(--adapt-tooltip-target-distancetoedge-right) * -1);left:100%}.is-right.is-fill-height.is-outside.is-horizontal-axis .tooltip__body{right:calc(var(--adapt-tooltip-target-distancetoedge-right) * -1);max-height:var(--adapt-tooltip-viewport-constrained-height);max-width:unset;width:unset}.dir-rtl .is-right.is-fill-height.is-outside.is-horizontal-axis .tooltip__body{left:calc(var(--adapt-tooltip-target-distancetoedge-left) * -1);right:100%}.is-center.is-middle.is-arrow-start.is-outside.is-horizontal-axis .tooltip__body,.is-center.is-middle.is-arrow-middle.is-outside.is-horizontal-axis .tooltip__body,.is-center.is-middle.is-arrow-end.is-outside.is-horizontal-axis .tooltip__body{transform:translate(-50%, -50%)}.dir-rtl .is-center.is-middle.is-arrow-start.is-outside.is-horizontal-axis .tooltip__body,.dir-rtl .is-center.is-middle.is-arrow-middle.is-outside.is-horizontal-axis .tooltip__body,.dir-rtl .is-center.is-middle.is-arrow-end.is-outside.is-horizontal-axis .tooltip__body{transform:translate(50%, -50%)}.tooltip__container .is-snap-top.is-outside.is-horizontal-axis .tooltip__body{top:calc(var(--adapt-tooltip-target-distancetoedge-top) * -1);transform:none;bottom:initial}.tooltip__container .is-snap-bottom.is-outside.is-horizontal-axis .tooltip__body{bottom:calc(var(--adapt-tooltip-target-distancetoedge-bottom) * -1);transform:none;top:initial}.is-top.is-inside.is-vertical-axis .tooltip__body{top:0%;margin-top:var(--adapt-tooltip-viewport-padding)}.is-bottom.is-inside.is-vertical-axis .tooltip__body{bottom:0%;margin-bottom:var(--adapt-tooltip-viewport-padding)}.is-center.is-inside.is-vertical-axis .tooltip__body{top:50%;transform:translateY(-50%)}.is-left.is-arrow-start.is-inside.is-vertical-axis .tooltip__body{right:calc(100% - .7rem - (.35rem * 2) - var(--adapt-tooltip-viewport-padding))}.dir-rtl .is-left.is-arrow-start.is-inside.is-vertical-axis .tooltip__body{left:calc(100% - .7rem - (.35rem * 2) - var(--adapt-tooltip-viewport-padding));right:initial}.is-left.is-arrow-middle.is-inside.is-vertical-axis .tooltip__body{right:calc(50% - (.7rem / 2) - .35rem)}.dir-rtl .is-left.is-arrow-middle.is-inside.is-vertical-axis .tooltip__body{left:calc(50% - (.7rem / 2) - .35rem);right:initial}.is-left.is-arrow-end.is-inside.is-vertical-axis .tooltip__body{right:var(--adapt-tooltip-viewport-padding)}.dir-rtl .is-left.is-arrow-end.is-inside.is-vertical-axis .tooltip__body{left:var(--adapt-tooltip-viewport-padding);right:initial}.is-middle.is-arrow-start.is-inside.is-vertical-axis .tooltip__body{left:calc(0% + .7rem + var(--adapt-tooltip-viewport-padding));transform:translate(-50%)}.dir-rtl .is-middle.is-arrow-start.is-inside.is-vertical-axis .tooltip__body{right:calc(0% + .7rem + var(--adapt-tooltip-viewport-padding));left:initial;transform:translate(50%)}.is-middle.is-arrow-middle.is-inside.is-vertical-axis .tooltip__body{left:50%;transform:translate(-50%)}.is-middle.is-arrow-end.is-inside.is-vertical-axis .tooltip__body{left:calc(100% - .7rem - var(--adapt-tooltip-viewport-padding));transform:translate(-50%)}.dir-rtl .is-middle.is-arrow-end.is-inside.is-vertical-axis .tooltip__body{right:calc(100% - .7rem - var(--adapt-tooltip-viewport-padding));left:initial;transform:translate(50%)}.is-right.is-arrow-start.is-inside.is-vertical-axis .tooltip__body{left:var(--adapt-tooltip-viewport-padding)}.dir-rtl .is-right.is-arrow-start.is-inside.is-vertical-axis .tooltip__body{right:var(--adapt-tooltip-viewport-padding);left:initial}.is-right.is-arrow-middle.is-inside.is-vertical-axis .tooltip__body{left:calc(50% - (.7rem / 2) - .35rem)}.dir-rtl .is-right.is-arrow-middle.is-inside.is-vertical-axis .tooltip__body{right:calc(50% - (.7rem / 2) - .35rem);left:initial}.is-right.is-arrow-end.is-inside.is-vertical-axis .tooltip__body{left:calc(100% - .7rem - (.35rem * 2) - var(--adapt-tooltip-viewport-padding))}.dir-rtl .is-right.is-arrow-end.is-inside.is-vertical-axis .tooltip__body{right:calc(100% - .7rem - (.35rem * 2) - var(--adapt-tooltip-viewport-padding));left:initial}.is-middle.is-center.is-arrow-start.is-inside.is-vertical-axis .tooltip__body,.is-middle.is-center.is-arrow-middle.is-inside.is-vertical-axis .tooltip__body,.is-middle.is-center.is-arrow-end.is-inside.is-vertical-axis .tooltip__body{transform:translate(-50%, -50%)}.is-left.is-inside.is-horizontal-axis .tooltip__body{left:0%;margin-left:var(--adapt-tooltip-viewport-padding)}.dir-rtl .is-left.is-inside.is-horizontal-axis .tooltip__body{right:0%;left:initial;margin-right:var(--adapt-tooltip-viewport-padding);margin-left:initial}.is-right.is-inside.is-horizontal-axis .tooltip__body{right:0%;margin-right:var(--adapt-tooltip-viewport-padding)}.dir-rtl .is-right.is-inside.is-horizontal-axis .tooltip__body{left:100%;right:initial;margin-left:var(--adapt-tooltip-viewport-padding);margin-right:initial}.is-middle.is-inside.is-horizontal-axis .tooltip__body{left:50%;transform:translateX(-50%)}.is-top.is-arrow-start.is-inside.is-horizontal-axis .tooltip__body{bottom:calc(100% - .7rem - (.35rem * 2) - var(--adapt-tooltip-viewport-padding))}.is-top.is-arrow-middle.is-inside.is-horizontal-axis .tooltip__body{bottom:calc(50% - (.7rem / 2) - .35rem)}.is-top.is-arrow-end.is-inside.is-horizontal-axis .tooltip__body{bottom:var(--adapt-tooltip-viewport-padding)}.is-center.is-arrow-start.is-inside.is-horizontal-axis .tooltip__body{top:calc(0% + .7rem + var(--adapt-tooltip-viewport-padding));transform:translateY(-50%)}.is-center.is-arrow-middle.is-inside.is-horizontal-axis .tooltip__body{top:50%;transform:translateY(-50%)}.is-center.is-arrow-end.is-inside.is-horizontal-axis .tooltip__body{top:calc(100% - .7rem - var(--adapt-tooltip-viewport-padding));transform:translateY(-50%)}.is-bottom.is-arrow-start.is-inside.is-horizontal-axis .tooltip__body{top:var(--adapt-tooltip-viewport-padding)}.is-bottom.is-arrow-middle.is-inside.is-horizontal-axis .tooltip__body{top:calc(50% - (.7rem / 2) - .35rem)}.is-bottom.is-arrow-end.is-inside.is-horizontal-axis .tooltip__body{top:calc(100% - .7rem - (.35rem * 2) - var(--adapt-tooltip-viewport-padding))}.is-center.is-middle.is-arrow-start.is-inside.is-horizontal-axis .tooltip__body,.is-center.is-middle.is-arrow-middle.is-inside.is-horizontal-axis .tooltip__body,.is-center.is-middle.is-arrow-end.is-inside.is-horizontal-axis .tooltip__body{transform:translate(-50%, -50%)}.is-top.is-outside.is-vertical-axis .tooltip__arrow{bottom:100%;margin-bottom:1rem}.is-top.is-outside.is-vertical-axis .tooltip__arrow::before{transform:translateY(99%) rotate(180deg)}.is-bottom.is-outside.is-vertical-axis .tooltip__arrow{top:100%;margin-top:1rem}.is-bottom.is-outside.is-vertical-axis .tooltip__arrow::before{transform:translateY(-99%)}.is-fill-height.is-arrow-start.is-outside.is-vertical-axis .tooltip__arrow,.is-fill-width.is-arrow-start.is-outside.is-vertical-axis .tooltip__arrow,.is-left.is-arrow-start.is-outside.is-vertical-axis .tooltip__arrow{right:calc(100% - .7rem - .35rem)}.dir-rtl .is-fill-height.is-arrow-start.is-outside.is-vertical-axis .tooltip__arrow,.dir-rtl .is-fill-width.is-arrow-start.is-outside.is-vertical-axis .tooltip__arrow,.dir-rtl .is-left.is-arrow-start.is-outside.is-vertical-axis .tooltip__arrow{left:calc(100% - .7rem - .35rem);right:initial}.is-fill-height.is-arrow-middle.is-outside.is-vertical-axis .tooltip__arrow,.is-fill-width.is-arrow-middle.is-outside.is-vertical-axis .tooltip__arrow,.is-left.is-arrow-middle.is-outside.is-vertical-axis .tooltip__arrow{right:calc(50% - (.7rem / 2))}.is-fill-height.is-arrow-end.is-outside.is-vertical-axis .tooltip__arrow,.is-fill-width.is-arrow-end.is-outside.is-vertical-axis .tooltip__arrow,.is-left.is-arrow-end.is-outside.is-vertical-axis .tooltip__arrow{right:calc(0% + .35rem)}.dir-rtl .is-fill-height.is-arrow-end.is-outside.is-vertical-axis .tooltip__arrow,.dir-rtl .is-fill-width.is-arrow-end.is-outside.is-vertical-axis .tooltip__arrow,.dir-rtl .is-left.is-arrow-end.is-outside.is-vertical-axis .tooltip__arrow{left:calc(0% + .35rem);right:initial}.is-middle.is-arrow-start.is-outside.is-vertical-axis .tooltip__arrow{left:calc(0% + .35rem)}.dir-rtl .is-middle.is-arrow-start.is-outside.is-vertical-axis .tooltip__arrow{right:calc(0% + .35rem);left:initial}.is-middle.is-arrow-middle.is-outside.is-vertical-axis .tooltip__arrow{left:50%;transform:translate(-50%)}.is-middle.is-arrow-end.is-outside.is-vertical-axis .tooltip__arrow{left:calc(100% - .7rem - .35rem)}.dir-rtl .is-middle.is-arrow-end.is-outside.is-vertical-axis .tooltip__arrow{right:calc(100% - .7rem - .35rem);left:initial}.is-right.is-arrow-start.is-outside.is-vertical-axis .tooltip__arrow{left:calc(0% + .35rem)}.dir-rtl .is-right.is-arrow-start.is-outside.is-vertical-axis .tooltip__arrow{right:calc(0% + .35rem);left:initial}.is-right.is-arrow-middle.is-outside.is-vertical-axis .tooltip__arrow{left:calc(50% - (.7rem / 2))}.is-right.is-arrow-end.is-outside.is-vertical-axis .tooltip__arrow{left:calc(100% - .7rem - .35rem)}.dir-rtl .is-right.is-arrow-end.is-outside.is-vertical-axis .tooltip__arrow{right:calc(100% - .7rem - .35rem);left:initial}.tooltip__container .is-arrow-snap.is-arrow-start.is-outside.is-vertical-axis .tooltip__arrow{left:calc((var(--adapt-tooltip-target-distancetoedge-left) * -1) + .35rem);transform:none;right:initial}.dir-rtl .tooltip__container .is-arrow-snap.is-arrow-start.is-outside.is-vertical-axis .tooltip__arrow{right:calc((var(--adapt-tooltip-target-distancetoedge-right) * -1) + .35rem);transform:none;left:initial}.tooltip__container .is-arrow-snap.is-arrow-end.is-outside.is-vertical-axis .tooltip__arrow{right:calc((var(--adapt-tooltip-target-distancetoedge-right) * -1) + .35rem);transform:none;left:initial}.dir-rtl .tooltip__container .is-arrow-snap.is-arrow-end.is-outside.is-vertical-axis .tooltip__arrow{left:calc((var(--adapt-tooltip-target-distancetoedge-left) * -1) + .35rem);transform:none;right:initial}.is-left.is-outside.is-horizontal-axis .tooltip__arrow{right:100%;margin-right:1rem}.is-left.is-outside.is-horizontal-axis .tooltip__arrow::before{transform:translateX(99%) rotate(90deg)}.dir-rtl .is-left.is-outside.is-horizontal-axis .tooltip__arrow{left:100%;right:initial;margin-left:1rem;margin-right:initial}.dir-rtl .is-left.is-outside.is-horizontal-axis .tooltip__arrow::before{transform:translateX(-99%) rotate(270deg)}.is-right.is-outside.is-horizontal-axis .tooltip__arrow{left:100%;margin-left:1rem}.is-right.is-outside.is-horizontal-axis .tooltip__arrow::before{transform:translateX(-99%) rotate(270deg)}.dir-rtl .is-right.is-outside.is-horizontal-axis .tooltip__arrow{right:100%;left:initial;margin-right:1rem;margin-left:initial}.dir-rtl .is-right.is-outside.is-horizontal-axis .tooltip__arrow::before{transform:translateX(99%) rotate(90deg)}.is-fill-height.is-arrow-start.is-outside.is-horizontal-axis .tooltip__arrow,.is-fill-width.is-arrow-start.is-outside.is-horizontal-axis .tooltip__arrow,.is-top.is-arrow-start.is-outside.is-horizontal-axis .tooltip__arrow{bottom:calc(100% - .7rem - .35rem)}.is-fill-height.is-arrow-middle.is-outside.is-horizontal-axis .tooltip__arrow,.is-fill-width.is-arrow-middle.is-outside.is-horizontal-axis .tooltip__arrow,.is-top.is-arrow-middle.is-outside.is-horizontal-axis .tooltip__arrow{bottom:calc(50% - (.7rem / 2))}.is-fill-height.is-arrow-end.is-outside.is-horizontal-axis .tooltip__arrow,.is-fill-width.is-arrow-end.is-outside.is-horizontal-axis .tooltip__arrow,.is-top.is-arrow-end.is-outside.is-horizontal-axis .tooltip__arrow{bottom:calc(0% + .35rem)}.is-center.is-arrow-start.is-outside.is-horizontal-axis .tooltip__arrow{top:calc(0% + .35rem)}.is-center.is-arrow-middle.is-outside.is-horizontal-axis .tooltip__arrow{top:calc(50% - (.7rem / 2))}.is-center.is-arrow-end.is-outside.is-horizontal-axis .tooltip__arrow{top:calc(100% - .7rem - .35rem)}.is-bottom.is-arrow-start.is-outside.is-horizontal-axis .tooltip__arrow{top:calc(0% + .35rem)}.is-bottom.is-arrow-middle.is-outside.is-horizontal-axis .tooltip__arrow{top:calc(50% - (.7rem / 2))}.is-bottom.is-arrow-end.is-outside.is-horizontal-axis .tooltip__arrow{top:calc(100% - .7rem - .35rem)}.tooltip__container .is-arrow-snap.is-arrow-start.is-outside.is-horizontal-axis .tooltip__arrow{top:calc((var(--adapt-tooltip-target-distancetoedge-top) * -1) + .35rem);transform:none;bottom:initial}.tooltip__container .is-arrow-snap.is-arrow-end.is-outside.is-horizontal-axis .tooltip__arrow{bottom:calc((var(--adapt-tooltip-target-distancetoedge-bottom) * -1) + .35rem);transform:none;top:initial}.is-inside .tooltip__arrow{display:none}.is-shown.tooltip{animation:toolTip--fadeScaleIn .4s forwards}.is-top.is-left.is-inside .tooltip__body{transform-origin:top left}.dir-rtl .is-top.is-left.is-inside .tooltip__body{transform-origin:top right}.is-top.is-middle.is-inside .tooltip__body{transform-origin:top center}.is-top.is-right.is-inside .tooltip__body{transform-origin:top right}.dir-rtl .is-top.is-right.is-inside .tooltip__body{transform-origin:top left}.is-center.is-left.is-inside .tooltip__body{transform-origin:center left}.dir-rtl .is-center.is-left.is-inside .tooltip__body{transform-origin:center right}.is-center.is-middle.is-inside .tooltip__body{transform-origin:center}.is-center.is-right.is-inside .tooltip__body{transform-origin:center right}.dir-rtl .is-center.is-right.is-inside .tooltip__body{transform-origin:center left}.is-bottom.is-left.is-inside .tooltip__body{transform-origin:bottom left}.dir-rtl .is-bottom.is-left.is-inside .tooltip__body{transform-origin:bottom right}.is-bottom.is-middle.is-inside .tooltip__body{transform-origin:bottom center}.is-bottom.is-right.is-inside .tooltip__body{transform-origin:bottom right}.dir-rtl .is-bottom.is-right.is-inside .tooltip__body{transform-origin:bottom left}@media (prefers-reduced-motion){.tooltip.is-shown{animation:none}}@keyframes toolTip--fadeScaleIn{0%{opacity:0;transform:scale(.9)}40%{opacity:1}100%{opacity:1;transform:scale(1)}}.graphic.is-scrollable .graphic__image-container{display:block;width:100%;overflow-x:scroll;overflow-y:hidden}.graphic.is-scrollable .graphic__image-container img{max-width:initial}.mcq__widget:not(.is-complete) .mcq-item__answer-icon{display:block}.mcq__widget.show-user-answer .is-correct .is-selected .mcq-item__correct-icon,.mcq__widget.show-user-answer .is-incorrect .is-selected .mcq-item__incorrect-icon{display:block}.mcq__widget.show-user-answer .mcq-item:not(.is-correct):not(.is-incorrect) .is-selected .mcq-item__answer-icon{display:block}.mcq__widget.show-correct-answer .is-correct .is-selected .mcq-item__correct-icon,.mcq__widget.show-correct-answer .is-incorrect .is-selected .mcq-item__correct-icon{display:block}.mcq__widget.show-correct-answer .mcq-item:not(.is-correct):not(.is-incorrect) .is-selected .mcq-item__answer-icon{display:block}.mcq-item{position:relative}.mcq-item__input{position:absolute;top:50%;left:50%;opacity:0;z-index:-1;transform:translate(-50%, -50%)}.mcq-item__label{display:block;z-index:1}.mcq-item__label:not(.is-disabled){cursor:pointer}.mcq-item__icon{display:none}.mcq-item__text{display:block}.mcq-item__answer-icon.is-radio .icon:before{content:"\e96f"}.mcq-item__answer-icon.is-checkbox .icon:before{content:"\e975"}.mcq-item__label.is-selected .mcq-item__answer-icon.is-radio .icon:before{content:"\e96e"}.mcq-item__label.is-selected .mcq-item__answer-icon.is-checkbox .icon:before{content:"\e974"}.mcq-item__correct-icon .icon:before{content:"\e944"}.mcq-item__incorrect-icon .icon:before{content:"\e945"}.resources__filter-inner{display:flex}.resources__filter.has-extra-types .resources__filter-inner{flex-wrap:wrap}.resources__filter-btn{flex-grow:1;white-space:nowrap}html:not(.ie) .resources__filter-btn{flex-basis:0}.article{position:relative}.trickle__inner{z-index:80}.trickle__btn{position:relative;display:block;margin:auto}.trickle.is-full-width .trickle__btn{width:100%}.trickle__btn-icon .icon:before{content:"\e96a"}.trickle.is-locked{position:absolute;bottom:0;left:0;right:0}.trickle.is-full-width .trickle__inner{position:fixed;left:0;right:0}html.is-nav-top .trickle.is-full-width .trickle__inner{bottom:0}html.is-nav-bottom .trickle.is-full-width .trickle__inner{bottom:var(--adapt-navigation-height)}.tutor__inner{position:relative;display:none;min-height:100%}.tutor__btn-icon{position:absolute;top:0;right:0}.dir-rtl .tutor__btn-icon{right:inherit;left:0}.tutor__btn-icon .icon:before{content:"\e945"}.tutor-type-overlay{position:absolute;z-index:1;top:0;left:0;overflow:auto;width:100%;height:101%}.boxmenu{margin:0 auto;max-width:90rem}.boxmenu__header-inner{margin:0 auto;max-width:56.25rem}.boxmenu__image{min-width:auto}.boxmenu__item-container .boxmenu__item-container-inner{display:flex;flex-wrap:wrap;margin:0 auto;max-width:56.25rem}.boxmenu.title-align-left .boxmenu__title,.boxmenu.body-align-left .boxmenu__body,.boxmenu.instruction-align-left .boxmenu__instruction{text-align:start}.boxmenu.title-align-center .boxmenu__title,.boxmenu.body-align-center .boxmenu__body,.boxmenu.instruction-align-center .boxmenu__instruction{text-align:center}.boxmenu.title-align-right .boxmenu__title,.boxmenu.body-align-right .boxmenu__body,.boxmenu.instruction-align-right .boxmenu__instruction{text-align:end}.boxmenu-group__header-inner{margin:0 auto;max-width:56.25rem}.boxmenu-group__item-container-inner{display:flex;flex-wrap:wrap}.boxmenu-item{width:100%}.boxmenu-item.is-locked .boxmenu-item__status .icon:before{content:"\e942"}@media (min-width:47.5rem){.boxmenu-item{width:50%}}.has-animation{overflow:hidden}.fade-in-before>div{opacity:0;transition:all 2000ms cubic-bezier(.23, 1, .32, 1),visibility 0s linear 0s}.fade-in-after>div{opacity:1}.fade-in-top-before>div{opacity:0;transform:translateY(-100px);transition:all 2000ms cubic-bezier(.23, 1, .32, 1),visibility 0s linear 0s;transition-delay:1s}.fade-in-top-after>div{opacity:1;transform:translateY(0)}.fade-in-bottom-before>div{opacity:0;transform:translateY(100px);transition:all 2000ms cubic-bezier(.23, 1, .32, 1),visibility 0s linear 0s;transition-delay:1s}.fade-in-bottom-after>div{opacity:1;transform:translateY(0)}.fade-in-left-before>div{opacity:0;transform:translateX(-100px);transition:all 2000ms cubic-bezier(.23, 1, .32, 1),visibility 0s linear 0s;transition-delay:1s}.fade-in-left-after>div{opacity:1;transform:translateX(0)}.fade-in-right-before>div{opacity:0;transform:translateX(100px);transition:all 2000ms cubic-bezier(.23, 1, .32, 1),visibility 0s linear 0s;transition-delay:1s}.fade-in-right-after>div{opacity:1;transform:translateX(0)}@font-face{font-family:'Open Sans';font-style:italic;font-weight:400;font-stretch:normal;src:url(https://fonts.gstatic.com/s/opensans/v40/memQYaGs126MiZpBA-UFUIcVXSCEkx2cmqvXlWq8tWZ0Pw86hd0Rk8ZkWVAexQ.ttf) format('truetype')}@font-face{font-family:'Open Sans';font-style:normal;font-weight:300;font-stretch:normal;src:url(https://fonts.gstatic.com/s/opensans/v40/memSYaGs126MiZpBA-UvWbX2vVnXBbObj2OVZyOOSr4dVJWUgsiH0B4gaVc.ttf) format('truetype')}@font-face{font-family:'Open Sans';font-style:normal;font-weight:400;font-stretch:normal;src:url(https://fonts.gstatic.com/s/opensans/v40/memSYaGs126MiZpBA-UvWbX2vVnXBbObj2OVZyOOSr4dVJWUgsjZ0B4gaVc.ttf) format('truetype')}@font-face{font-family:'Open Sans';font-style:normal;font-weight:700;font-stretch:normal;src:url(https://fonts.gstatic.com/s/opensans/v40/memSYaGs126MiZpBA-UvWbX2vVnXBbObj2OVZyOOSr4dVJWUgsg-1x4gaVc.ttf) format('truetype')}body{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-family:'Open Sans',sans-serif;font-size:1rem;font-weight:400;line-height:1.5;color:#4d4d4d}b,strong{font-weight:700}.background-blend-mode.soft-light{background-blend-mode:soft-light}.mix-blend-mode.soft-light{mix-blend-mode:soft-light}.background-blend-mode.screen{background-blend-mode:screen}.mix-blend-mode.screen{mix-blend-mode:screen}.background-blend-mode.saturation{background-blend-mode:saturation}.mix-blend-mode.saturation{mix-blend-mode:saturation}.background-blend-mode.overlay{background-blend-mode:overlay}.mix-blend-mode.overlay{mix-blend-mode:overlay}.background-blend-mode.multiply{background-blend-mode:multiply}.mix-blend-mode.multiply{mix-blend-mode:multiply}.background-blend-mode.luminosity{background-blend-mode:luminosity}.mix-blend-mode.luminosity{mix-blend-mode:luminosity}.background-blend-mode.lighten{background-blend-mode:lighten}.mix-blend-mode.lighten{mix-blend-mode:lighten}.background-blend-mode.hue{background-blend-mode:hue}.mix-blend-mode.hue{mix-blend-mode:hue}.background-blend-mode.hard-light{background-blend-mode:hard-light}.mix-blend-mode.hard-light{mix-blend-mode:hard-light}.background-blend-mode.exclusion{background-blend-mode:exclusion}.mix-blend-mode.exclusion{mix-blend-mode:exclusion}.background-blend-mode.difference{background-blend-mode:difference}.mix-blend-mode.difference{mix-blend-mode:difference}.background-blend-mode.darken{background-blend-mode:darken}.mix-blend-mode.darken{mix-blend-mode:darken}.background-blend-mode.color-dodge{background-blend-mode:color-dodge}.mix-blend-mode.color-dodge{mix-blend-mode:color-dodge}.background-blend-mode.color-burn{background-blend-mode:color-burn}.mix-blend-mode.color-burn{mix-blend-mode:color-burn}.background-blend-mode.color{background-blend-mode:color}.mix-blend-mode.color{mix-blend-mode:color}.filter.grayscale img{filter:grayscale(1)}.filter.invert img{filter:invert(1)}.filter.sepia img{filter:sepia(1)}.article{position:relative}.article.has-bg-image>.background{position:absolute;top:0;left:0;height:100%;width:100%;background-repeat:no-repeat;background-size:cover;background-position:center top}.article__inner{position:relative}.article__header-inner{padding:0 1rem}.article__title{margin-bottom:1rem;font-family:'Open Sans',sans-serif;font-size:1.875rem;font-weight:400;line-height:1.2;letter-spacing:normal;color:#115d7f}@media (min-width:47.5rem){.article__title{font-size:2.5rem}}.article__body{margin-bottom:1rem}.article__instruction{margin-bottom:1rem;font-family:'Open Sans',sans-serif;font-size:1rem;font-weight:700;line-height:1.5;font-style:normal}.article__body a,.article__instruction a{font-family:'Open Sans',sans-serif;font-size:inherit;font-weight:400;line-height:1.5;color:#4d4d4d}.no-touch .article__body a:hover,.no-touch .article__instruction a:hover{color:#4d4d4d;transition:color .2s ease-in}.has-attribution{position:relative;display:block}.component__attribution{position:absolute;bottom:0;left:0;width:100%;padding:1rem;background-color:rgba(0,0,0,0.5);color:#ffffff;transform:translate3d(0, 0, 0)}.gmcq__attribution{position:relative;display:flex}.block{position:relative}.block.has-bg-image>.background{position:absolute;top:0;left:0;height:100%;width:100%;background-repeat:no-repeat;background-size:cover;background-position:center top}.block__inner{position:relative;padding:4rem 1rem}.block__title{margin-bottom:1rem;font-family:'Open Sans',sans-serif;font-size:1.875rem;font-weight:400;line-height:1.2;letter-spacing:normal;color:#115d7f}@media (min-width:47.5rem){.block__title{font-size:2.5rem}}.block__body{margin-bottom:1rem}.block__instruction{margin-bottom:1rem;font-family:'Open Sans',sans-serif;font-size:1rem;font-weight:700;line-height:1.5;font-style:normal}.block__body a,.block__instruction a{font-family:'Open Sans',sans-serif;font-size:inherit;font-weight:400;line-height:1.5;color:#4d4d4d}.no-touch .block__body a:hover,.no-touch .block__instruction a:hover{color:#4d4d4d;transition:color .2s ease-in}.block.double-padding-top .block__inner{padding-top:8rem}.block.double-padding-bottom .block__inner{padding-bottom:8rem}.block.half-padding-top .block__inner{padding-top:2rem}.block.half-padding-bottom .block__inner{padding-bottom:2rem}.block.remove-padding-top .block__inner{padding-top:0}.block.remove-padding-bottom .block__inner{padding-bottom:0}.block.align-vert-center .block__inner,.block.align-vert-center .component__container{min-height:inherit}.block.align-vert-center .component__container{align-items:center}.block.align-vert-bottom .component__container{align-items:flex-end}.block.align-horz-center .component__container{justify-content:center}.block.align-horz-right .component__container{justify-content:flex-end}.btn__container{margin-top:1rem}.btn-icon{background-color:#ffffff;color:#115d7f}.no-touch .btn-icon:not(.is-disabled):not(.is-locked):hover{background-color:#eceaea;color:#115d7f;transition:background-color .2s ease-in,color .2s ease-in}.btn-text{font-family:'Open Sans',sans-serif;font-size:1rem;font-weight:400;line-height:1.5;letter-spacing:normal}.btn-text{background-color:#115d7f;color:#ffffff;border-radius:.25rem}.no-touch .btn-text:not(.is-disabled):not(.is-locked):hover{background-color:#74a6bd;color:#ffffff;transition:background-color .2s ease-in,color .2s ease-in}.btn-icon.is-disabled,.btn-text.is-disabled{background-color:#dddddd;color:#000000}.btn-icon.is-locked,.btn-text.is-locked{background-color:#dddddd;color:#000000;cursor:not-allowed}.btn__marking{padding:.75rem;border-radius:50%}.can-show-marking .btn__action.is-full-width,.can-show-marking .btn__feedback.is-full-width{margin-inline-end:4rem}.component__container{flex-direction:unset;margin-left:-1rem;margin-right:-1rem}.component__inner{padding:1rem 1rem}.component__title{margin-bottom:1rem;font-family:'Open Sans',sans-serif;font-size:1.875rem;font-weight:400;line-height:1.2;letter-spacing:normal;color:#115d7f}@media (min-width:47.5rem){.component__title{font-size:2.5rem}}.component__body{margin-bottom:1rem}.component__instruction{margin-bottom:1rem;font-family:'Open Sans',sans-serif;font-size:1rem;font-weight:700;line-height:1.5;font-style:normal}.component__body a,.component__instruction a{font-family:'Open Sans',sans-serif;font-size:inherit;font-weight:400;line-height:1.5;color:#4d4d4d}.no-touch .component__body a:hover,.no-touch .component__instruction a:hover{color:#4d4d4d;transition:color .2s ease-in}.drawer{background-color:#263944;color:#ffffff}.drawer__toolbar{border-bottom:1px solid #141e23}.drawer__btn{margin:.5rem;padding:.5rem;background-color:#263944;color:#ffffff;border-radius:50%}.no-touch .drawer__btn:not(.is-disabled):not(.is-locked):hover{background-color:#141e23;color:#ffffff;transition:background-color .2s ease-in,color .2s ease-in}.drawer__item-btn{display:block;padding:1rem;background-color:#263944;border-bottom:1px solid #141e23;color:#ffffff}.no-touch .drawer__item-btn:not(.is-disabled):not(.is-locked):hover{background-color:#141e23;color:#ffffff;transition:background-color .2s ease-in,color .2s ease-in}.drawer__item-btn.is-locked,.drawer__item-btn.is-disabled{background-color:#dddddd;color:#000000}.drawer__item-btn.is-selected{background-color:#010203;color:#ffffff}.drawer__item-title{font-family:'Open Sans',sans-serif;font-size:1rem;font-weight:400;line-height:1.2;letter-spacing:normal;text-align:start}.drawer__item-title+.drawer__item-body{margin-top:.25rem}.drawer__item-body{margin-bottom:0;font-family:'Open Sans',sans-serif;font-size:.875rem;font-weight:400;line-height:1.5;text-align:start}body{background-color:#fff}.inline-icon{display:inline-block;vertical-align:middle}blockquote,figure{margin:1rem}.figure-quote{margin:0;font-size:1.25rem;font-family:'Open Sans',sans-serif;font-weight:400;line-height:1.5;font-style:normal;letter-spacing:normal}.figure-quote figcaption{margin:1rem;font-size:1rem;font-family:'Open Sans',sans-serif;font-weight:400;line-height:1.5;font-style:normal;letter-spacing:normal}.aside-pull-quote{margin:1rem;padding:1rem;border-bottom:2px solid #117F93;background-color:#f9f9f9;color:#4d4d4d;font-size:1.5rem;font-family:'Open Sans',sans-serif;font-weight:700;line-height:1.5;font-style:normal;letter-spacing:normal}@media (min-width:47.5rem){.aside-pull-quote{font-size:2rem}}@media (min-width:47.5rem){.aside-pull-quote{margin:2rem;padding:2rem}}.is-bold{font-weight:700}.is-italic{font-style:italic}.loading{background-color:rgba(0,0,0,0.5);color:#ffffff}.loading__inner,.loading__inner:before,.loading__inner:after{width:2rem;height:2rem;border-radius:50%;animation-fill-mode:both;animation:loading 1.25s infinite ease-in-out}.loading__inner{position:absolute;top:51%;left:0;right:0;margin:auto;text-indent:-9999rem;animation-delay:-0.16s;transform:translateZ(0)}.loading__inner:before,.loading__inner:after{content:"";position:absolute;top:0}.loading__inner:before{left:-3rem;animation-delay:-0.32s}.loading__inner:after{left:3rem}@keyframes loading{0%,80%,100%{box-shadow:0 2.5rem 0 -1.3rem}40%{box-shadow:0 2.5rem 0 0}}.nav{background-color:#115d7f}.nav__inner{max-width:inherit}.nav__inner{padding-left:0;padding-right:0}.nav__btn{margin:0 0;background-color:#ffffff;color:#115d7f;border-radius:0}.no-touch .nav__btn:not(.is-disabled):not(.is-locked):hover{background-color:#eceaea;color:#115d7f;transition:background-color .2s ease-in,color .2s ease-in}.nav__btn-label{font-size:.875rem}.notify__popup{background-color:#36cde8;color:#ffffff;transition:margin-top .2s,top .2s}.notify__popup-inner{position:relative;padding:4rem 1rem}.notify__icon{display:none}.notify__title{margin-bottom:1rem;font-family:'Open Sans',sans-serif;font-size:1.875rem;font-weight:400;line-height:1.2;letter-spacing:normal;padding-inline-end:3.5rem}@media (min-width:47.5rem){.notify__title{font-size:2.5rem}}@media (min-width:47.5rem){.notify__title{padding-inline-end:inherit}}.notify__body{margin-bottom:1rem}.notify__instruction{margin-bottom:0;font-family:'Open Sans',sans-serif;font-size:1rem;font-weight:700;line-height:1.5;font-style:normal}.notify__body a,.notify__instruction a{font-family:'Open Sans',sans-serif;font-size:inherit;font-weight:400;line-height:1.5;color:#4d4d4d;color:#ffffff}.no-touch .notify__body a:hover,.no-touch .notify__instruction a:hover{color:#4d4d4d;transition:color .2s ease-in}.no-touch .notify__body a:hover,.no-touch .notify__instruction a:hover{color:#ffffff;transition:color .2s ease-in}.notify__btn-container{margin-top:1rem}.notify__btn{background-color:#ffffff;color:#115d7f}.no-touch .notify__btn:not(.is-disabled):not(.is-locked):hover{background-color:#e6e6e6;color:#115d7f;transition:background-color .2s ease-in,color .2s ease-in}.notify__btn-icon{margin:.5rem;padding:.5rem;background-color:#18b7d3;color:#ffffff;border-radius:50%}.no-touch .notify__btn-icon:not(.is-disabled):not(.is-locked):hover{background-color:#16a3bc;color:#ffffff;transition:background-color .2s ease-in,color .2s ease-in}.notify__close-btn{position:absolute;top:0;right:0}.dir-rtl .notify__close-btn{right:inherit;left:0}.notify-push{background-color:#36cde8;color:#ffffff;transform:translateY(25px);transition:opacity .2s ease-in-out,transform .2s ease-in-out}.notify-push.is-active{transform:translateY(0)}.notify-push__inner{padding-top:1rem;padding-bottom:1rem;padding-inline:1rem 4.5rem}.notify-push__title{margin-bottom:1rem;font-family:'Open Sans',sans-serif;font-size:1.875rem;font-weight:400;line-height:1.2;letter-spacing:normal}@media (min-width:47.5rem){.notify-push__title{font-size:2.5rem}}.notify-push__body a{font-family:'Open Sans',sans-serif;font-size:inherit;font-weight:400;line-height:1.5;color:#4d4d4d;color:#ffffff}.no-touch .notify-push__body a:hover{color:#4d4d4d;transition:color .2s ease-in}.no-touch .notify-push__body a:hover{color:#ffffff;transition:color .2s ease-in}.notify-push__close-btn{position:absolute;top:0;right:0;margin:.5rem;padding:.5rem;background-color:#18b7d3;color:#ffffff;border-radius:50%}.no-touch .notify-push__close-btn:not(.is-disabled):not(.is-locked):hover{background-color:#16a3bc;color:#ffffff;transition:background-color .2s ease-in,color .2s ease-in}.dir-rtl .notify-push__close-btn{right:auto;left:0}.page{position:relative;max-width:inherit;padding:0 0}.page.has-bg-image>.background{position:absolute;top:0;left:0;height:100%;width:100%;background-repeat:no-repeat;background-size:cover;background-position:center top}.page__inner{position:relative}.page__header{position:relative}.page__header.has-bg-image>.background{position:absolute;top:0;left:0;height:100%;width:100%;background-repeat:no-repeat;background-size:cover;background-position:center top}.page__header-inner{position:relative;padding:2rem 1rem}.page__title{margin-bottom:.5rem;font-family:'Open Sans',sans-serif;font-size:2.25rem;font-weight:400;line-height:1.2;letter-spacing:normal;color:#115d7f}@media (min-width:47.5rem){.page__title{font-size:3rem}}.page__subtitle{margin-bottom:1rem;font-family:'Open Sans',sans-serif;font-size:1.5rem;font-weight:300;line-height:1.2;letter-spacing:normal}@media (min-width:47.5rem){.page__subtitle{font-size:2rem}}.page__body{margin-bottom:1rem;font-family:'Open Sans',sans-serif;font-size:1.25rem;font-weight:400;line-height:1.5}.page__instruction{margin-bottom:1rem;font-family:'Open Sans',sans-serif;font-size:1.25rem;font-weight:700;line-height:1.5;font-style:normal}.page__body a,.page__instruction a{font-family:'Open Sans',sans-serif;font-size:inherit;font-weight:400;line-height:1.5;color:#4d4d4d}.no-touch .page__body a:hover,.no-touch .page__instruction a:hover{color:#4d4d4d;transition:color .2s ease-in}.shadow{background-color:rgba(0,0,0,0.5)}.assessmentresults__retry-feedback{margin-bottom:1rem}.boxmenu{position:relative;max-width:inherit;padding:0 0}.boxmenu.has-bg-image>.background{position:absolute;top:0;left:0;height:100%;width:100%;background-repeat:no-repeat;background-size:cover;background-position:center top}.boxmenu__inner{position:relative}.boxmenu__header{position:relative}.boxmenu__header.has-bg-image>.background{position:absolute;top:0;left:0;height:100%;width:100%;background-repeat:no-repeat;background-size:cover;background-position:center top}.boxmenu__header-inner{position:relative;padding:2rem 1rem;background-color:transparent}.boxmenu__title{margin-bottom:1rem;font-family:'Open Sans',sans-serif;font-size:2.25rem;font-weight:400;line-height:1.2;letter-spacing:normal;color:#115d7f}@media (min-width:47.5rem){.boxmenu__title{font-size:3rem}}.boxmenu__subtitle{margin-bottom:1rem;font-family:'Open Sans',sans-serif;font-size:1.5rem;font-weight:300;line-height:1.2;letter-spacing:normal}@media (min-width:47.5rem){.boxmenu__subtitle{font-size:2rem}}.boxmenu__body{margin-bottom:1rem;font-family:'Open Sans',sans-serif;font-size:1.25rem;font-weight:400;line-height:1.5;color:#4d4d4d}.boxmenu__instruction{margin-bottom:1rem;font-family:'Open Sans',sans-serif;font-size:1.25rem;font-weight:700;line-height:1.5;font-style:normal;color:#4d4d4d}.boxmenu__body a,.boxmenu__instruction a{font-family:'Open Sans',sans-serif;font-size:inherit;font-weight:400;line-height:1.5;color:#4d4d4d}.no-touch .boxmenu__body a:hover,.no-touch .boxmenu__instruction a:hover{color:#4d4d4d;transition:color .2s ease-in}.boxmenu__item-container{margin-top:1.5rem}.boxmenu-group__header-inner{padding:2rem 1rem}.boxmenu-group__title{margin-bottom:1rem;font-family:'Open Sans',sans-serif;font-size:1.5rem;font-weight:300;line-height:1.2;letter-spacing:normal}@media (min-width:47.5rem){.boxmenu-group__title{font-size:2rem}}.boxmenu-group__body{margin-bottom:1rem;font-family:'Open Sans',sans-serif;font-size:1.25rem;font-weight:400;line-height:1.5}.boxmenu-group__instruction{margin-bottom:1rem;font-family:'Open Sans',sans-serif;font-size:1.25rem;font-weight:700;line-height:1.5;font-style:normal}.boxmenu-group__body a,.boxmenu-group__instruction a{font-family:'Open Sans',sans-serif;font-size:inherit;font-weight:400;line-height:1.5;color:#4d4d4d}.no-touch .boxmenu-group__body a:hover,.no-touch .boxmenu-group__instruction a:hover{color:#4d4d4d;transition:color .2s ease-in}.boxmenu-item{display:flex}.boxmenu-item__inner{width:100%;margin:0 .5rem 1rem;padding:1rem;background-color:#fff;color:#4d4d4d;border:1px solid #115d7f;border-radius:.25rem}.boxmenu-item__image-container{margin-bottom:1rem}.boxmenu-item__title{margin-bottom:.75rem;font-family:'Open Sans',sans-serif;font-size:1.25rem;font-weight:400;line-height:1.2;letter-spacing:normal}.boxmenu-item__body{margin-bottom:1rem;font-family:'Open Sans',sans-serif;font-size:1rem;font-weight:300;line-height:1.5}.boxmenu-item__body a{font-family:'Open Sans',sans-serif;font-size:inherit;font-weight:400;line-height:1.5;color:#4d4d4d}.no-touch .boxmenu-item__body a:hover{color:#4d4d4d;transition:color .2s ease-in}.boxmenu-item__duration{margin-bottom:1rem;font-family:'Open Sans',sans-serif;font-size:1rem;font-weight:300;line-height:1.5}.boxmenu-item__progress{margin-bottom:1rem}.boxmenu-item__button-container{display:flex;align-items:center}.boxmenu-item__button{background-color:#115d7f;color:#ffffff}.no-touch .boxmenu-item__button:not(.is-disabled):not(.is-locked):hover{background-color:#74a6bd;color:#ffffff;transition:background-color .2s ease-in,color .2s ease-in}.boxmenu-item__button.is-locked,.boxmenu-item__button.is-disabled{background-color:#dddddd;color:#000000}.boxmenu-item__status{margin-left:.5rem}.boxmenu-item.has-img-zoom .boxmenu-item__image-container{overflow:hidden}.boxmenu-item.has-img-zoom .boxmenu-item__image-container img{transition:transform .75s ease-in-out}.no-touch .boxmenu-item.has-img-zoom .boxmenu-item__image-container img:hover{transform:scale(1.1)}.graphic.has-img-zoom .graphic__image-container{overflow:hidden}.graphic.has-img-zoom .graphic__image-container img{transition:transform .75s ease-in-out}.no-touch .graphic.has-img-zoom .graphic__image-container img:hover{transform:scale(1.1)}.mcq-item__label{margin-bottom:.25rem;background-color:#115d7f;color:#ffffff;border-radius:.25rem}.no-touch .mcq-item__label:not(.is-disabled):not(.is-selected):hover,html:not(.a11y-disable-focusoutline) .mcq-item__input:focus-visible+.mcq-item__label{background-color:#0b3c52;color:#ffffff;transition:background-color .2s ease-in,color .2s ease-in}.no-touch .mcq-item__label:not(.is-disabled):not(.is-selected):hover .mcq-item__icon{animation:scalePulse .5s 0s 1 normal ease-in-out none}@keyframes scalePulse{0%{transform:none}50%{transform:scale(1.2, 1.2)}100%{transform:none}}.mcq-item__label.is-disabled{background-color:#dddddd;color:#000000}.mcq-item__label.is-selected{background-color:#74a6bd;color:#ffffff}.mcq-item__state{position:absolute;top:50%;left:1rem;transform:translateY(-50%)}.dir-rtl .mcq-item__state{left:inherit;right:1rem}.mcq-item__text{padding-top:1rem;padding-bottom:1rem;padding-inline:3.5rem 1rem}.resources__filter-btn{padding:1rem .5rem;font-family:'Open Sans',sans-serif;font-size:1rem;font-weight:400;line-height:1.5;background-color:#263944;border-bottom:1px solid #141e23;border-right:1px solid #141e23;color:#ffffff}.no-touch .resources__filter-btn:not(.is-disabled):not(.is-selected):hover{background-color:#141e23;color:#ffffff;transition:background-color .2s ease-in,color .2s ease-in}.resources__filter-btn:last-child{border-right:none}.resources__filter-btn.is-selected{background-color:#010203;color:#ffffff;box-shadow:inset 0 -0.625rem 0 -0.4375rem #ffffff}.resources__item-btn{text-decoration:none}.trickle__btn-icon{display:inline-block;vertical-align:middle}.trickle__btn-text{display:inline-block;vertical-align:middle}.tutor__content-inner{padding:4rem 1rem;padding:1rem}.tutor__title{font-family:'Open Sans',sans-serif;font-size:1.875rem;font-weight:400;line-height:1.2;letter-spacing:normal;margin-bottom:1rem}@media (min-width:47.5rem){.tutor__title{font-size:2.5rem}}.tutor__body{margin-bottom:1rem}.tutor__btn{margin-top:1rem}.tutor__btn-icon{margin:.5rem;padding:.5rem;background-color:#18b7d3;color:#ffffff;border-radius:50%}.no-touch .tutor__btn-icon:not(.is-disabled):not(.is-locked):hover{background-color:#16a3bc;color:#ffffff;transition:background-color .2s ease-in,color .2s ease-in}.tutor-type-overlay .tutor__inner{background-color:#36cde8;color:#ffffff}.tutor-type-overlay .tutor__title{padding-inline-end:2.5rem}.tutor-type-overlay .tutor__body a{font-family:'Open Sans',sans-serif;font-size:inherit;font-weight:400;line-height:1.5;color:#4d4d4d;color:#ffffff}.no-touch .tutor-type-overlay .tutor__body a:hover{color:#4d4d4d;transition:color .2s ease-in}.no-touch .tutor-type-overlay .tutor__body a:hover{color:#ffffff;transition:color .2s ease-in}.tutor-type-overlay .tutor__btn{background-color:#ffffff;color:#115d7f}.no-touch .tutor-type-overlay .tutor__btn:hover{background-color:#e6e6e6;color:#115d7f;transition:background-color .2s ease-in,color .2s ease-in}.tutor-type-overlay .tutor__btn-icon{background-color:#18b7d3;color:#ffffff}.no-touch .tutor-type-overlay .tutor__btn-icon:hover{background-color:#16a3bc;color:#ffffff}@media (min-width:0){.boxmenu-item.col-xs-1{width:8.33333333%}.component.col-xs-1{width:8.33333333%}}@media (min-width:0){.boxmenu-item.col-xs-2{width:16.66666667%}.component.col-xs-2{width:16.66666667%}}@media (min-width:0){.boxmenu-item.col-xs-3{width:25%}.component.col-xs-3{width:25%}}@media (min-width:0){.boxmenu-item.col-xs-4{width:33.33333333%}.component.col-xs-4{width:33.33333333%}}@media (min-width:0){.boxmenu-item.col-xs-5{width:41.66666667%}.component.col-xs-5{width:41.66666667%}}@media (min-width:0){.boxmenu-item.col-xs-6{width:50%}.component.col-xs-6{width:50%}}@media (min-width:0){.boxmenu-item.col-xs-7{width:58.33333333%}.component.col-xs-7{width:58.33333333%}}@media (min-width:0){.boxmenu-item.col-xs-8{width:66.66666667%}.component.col-xs-8{width:66.66666667%}}@media (min-width:0){.boxmenu-item.col-xs-9{width:75%}.component.col-xs-9{width:75%}}@media (min-width:0){.boxmenu-item.col-xs-10{width:83.33333333%}.component.col-xs-10{width:83.33333333%}}@media (min-width:0){.boxmenu-item.col-xs-11{width:91.66666667%}.component.col-xs-11{width:91.66666667%}}@media (min-width:0){.boxmenu-item.col-xs-12{width:100%}.component.col-xs-12{width:100%}}@media (min-width:32.5rem){.boxmenu-item.col-sm-1{width:8.33333333%}.component.col-sm-1{width:8.33333333%}}@media (min-width:32.5rem){.boxmenu-item.col-sm-2{width:16.66666667%}.component.col-sm-2{width:16.66666667%}}@media (min-width:32.5rem){.boxmenu-item.col-sm-3{width:25%}.component.col-sm-3{width:25%}}@media (min-width:32.5rem){.boxmenu-item.col-sm-4{width:33.33333333%}.component.col-sm-4{width:33.33333333%}}@media (min-width:32.5rem){.boxmenu-item.col-sm-5{width:41.66666667%}.component.col-sm-5{width:41.66666667%}}@media (min-width:32.5rem){.boxmenu-item.col-sm-6{width:50%}.component.col-sm-6{width:50%}}@media (min-width:32.5rem){.boxmenu-item.col-sm-7{width:58.33333333%}.component.col-sm-7{width:58.33333333%}}@media (min-width:32.5rem){.boxmenu-item.col-sm-8{width:66.66666667%}.component.col-sm-8{width:66.66666667%}}@media (min-width:32.5rem){.boxmenu-item.col-sm-9{width:75%}.component.col-sm-9{width:75%}}@media (min-width:32.5rem){.boxmenu-item.col-sm-10{width:83.33333333%}.component.col-sm-10{width:83.33333333%}}@media (min-width:32.5rem){.boxmenu-item.col-sm-11{width:91.66666667%}.component.col-sm-11{width:91.66666667%}}@media (min-width:32.5rem){.boxmenu-item.col-sm-12{width:100%}.component.col-sm-12{width:100%}}@media (min-width:47.5rem){.boxmenu-item.col-md-1{width:8.33333333%}.component.col-md-1{width:8.33333333%}}@media (min-width:47.5rem){.boxmenu-item.col-md-2{width:16.66666667%}.component.col-md-2{width:16.66666667%}}@media (min-width:47.5rem){.boxmenu-item.col-md-3{width:25%}.component.col-md-3{width:25%}}@media (min-width:47.5rem){.boxmenu-item.col-md-4{width:33.33333333%}.component.col-md-4{width:33.33333333%}}@media (min-width:47.5rem){.boxmenu-item.col-md-5{width:41.66666667%}.component.col-md-5{width:41.66666667%}}@media (min-width:47.5rem){.boxmenu-item.col-md-6{width:50%}.component.col-md-6{width:50%}}@media (min-width:47.5rem){.boxmenu-item.col-md-7{width:58.33333333%}.component.col-md-7{width:58.33333333%}}@media (min-width:47.5rem){.boxmenu-item.col-md-8{width:66.66666667%}.component.col-md-8{width:66.66666667%}}@media (min-width:47.5rem){.boxmenu-item.col-md-9{width:75%}.component.col-md-9{width:75%}}@media (min-width:47.5rem){.boxmenu-item.col-md-10{width:83.33333333%}.component.col-md-10{width:83.33333333%}}@media (min-width:47.5rem){.boxmenu-item.col-md-11{width:91.66666667%}.component.col-md-11{width:91.66666667%}}@media (min-width:47.5rem){.boxmenu-item.col-md-12{width:100%}.component.col-md-12{width:100%}}@media (min-width:56.25rem){.boxmenu-item.col-lg-1{width:8.33333333%}.component.col-lg-1{width:8.33333333%}}@media (min-width:56.25rem){.boxmenu-item.col-lg-2{width:16.66666667%}.component.col-lg-2{width:16.66666667%}}@media (min-width:56.25rem){.boxmenu-item.col-lg-3{width:25%}.component.col-lg-3{width:25%}}@media (min-width:56.25rem){.boxmenu-item.col-lg-4{width:33.33333333%}.component.col-lg-4{width:33.33333333%}}@media (min-width:56.25rem){.boxmenu-item.col-lg-5{width:41.66666667%}.component.col-lg-5{width:41.66666667%}}@media (min-width:56.25rem){.boxmenu-item.col-lg-6{width:50%}.component.col-lg-6{width:50%}}@media (min-width:56.25rem){.boxmenu-item.col-lg-7{width:58.33333333%}.component.col-lg-7{width:58.33333333%}}@media (min-width:56.25rem){.boxmenu-item.col-lg-8{width:66.66666667%}.component.col-lg-8{width:66.66666667%}}@media (min-width:56.25rem){.boxmenu-item.col-lg-9{width:75%}.component.col-lg-9{width:75%}}@media (min-width:56.25rem){.boxmenu-item.col-lg-10{width:83.33333333%}.component.col-lg-10{width:83.33333333%}}@media (min-width:56.25rem){.boxmenu-item.col-lg-11{width:91.66666667%}.component.col-lg-11{width:91.66666667%}}@media (min-width:56.25rem){.boxmenu-item.col-lg-12{width:100%}.component.col-lg-12{width:100%}}@media (min-width:80rem){.boxmenu-item.col-xl-1{width:8.33333333%}.component.col-xl-1{width:8.33333333%}}@media (min-width:80rem){.boxmenu-item.col-xl-2{width:16.66666667%}.component.col-xl-2{width:16.66666667%}}@media (min-width:80rem){.boxmenu-item.col-xl-3{width:25%}.component.col-xl-3{width:25%}}@media (min-width:80rem){.boxmenu-item.col-xl-4{width:33.33333333%}.component.col-xl-4{width:33.33333333%}}@media (min-width:80rem){.boxmenu-item.col-xl-5{width:41.66666667%}.component.col-xl-5{width:41.66666667%}}@media (min-width:80rem){.boxmenu-item.col-xl-6{width:50%}.component.col-xl-6{width:50%}}@media (min-width:80rem){.boxmenu-item.col-xl-7{width:58.33333333%}.component.col-xl-7{width:58.33333333%}}@media (min-width:80rem){.boxmenu-item.col-xl-8{width:66.66666667%}.component.col-xl-8{width:66.66666667%}}@media (min-width:80rem){.boxmenu-item.col-xl-9{width:75%}.component.col-xl-9{width:75%}}@media (min-width:80rem){.boxmenu-item.col-xl-10{width:83.33333333%}.component.col-xl-10{width:83.33333333%}}@media (min-width:80rem){.boxmenu-item.col-xl-11{width:91.66666667%}.component.col-xl-11{width:91.66666667%}}@media (min-width:80rem){.boxmenu-item.col-xl-12{width:100%}.component.col-xl-12{width:100%}}@media (min-width:47.5rem){.block.reverse-desktop-order .component__container{flex-direction:row-reverse}}.block.extend-content-container .block__inner{max-width:70rem}.block.extend-container .block__inner{max-width:90rem}.bg-color.black{background-color:#000;color:#fff}.bg-color.black .block__title,.bg-color.black .component__title,.bg-color.black .block__body a,.bg-color.black .component__body a,.bg-color.black .block__instruction a,.bg-color.black .component__instruction a{color:#fff}.bg-color.black .pagelevelprogress__indicator{border-color:#fff}.bg-color.black .pagelevelprogress__indicator-inner{background-color:#000}.bg-color.black .pagelevelprogress__indicator-bar{background-color:#fff}.bg-color.black .narrative__progress{background-color:rgba(255,255,255,0.5)}.bg-color.black .narrative__progress.is-selected{background-color:#fff}.bg-color.white{background-color:#fff;color:#000}.bg-color.white .block__title,.bg-color.white .component__title,.bg-color.white .block__body a,.bg-color.white .component__body a,.bg-color.white .block__instruction a,.bg-color.white .component__instruction a{color:#000}.bg-color.white .pagelevelprogress__indicator{border-color:#000}.bg-color.white .pagelevelprogress__indicator-inner{background-color:#fff}.bg-color.white .pagelevelprogress__indicator-bar{background-color:#000}.bg-color.white .narrative__progress{background-color:rgba(0,0,0,0.5)}.bg-color.white .narrative__progress.is-selected{background-color:#000}.bg-color.background{background-color:#000000;color:#ffffff}.bg-color.background .block__title,.bg-color.background .component__title,.bg-color.background .block__body a,.bg-color.background .component__body a,.bg-color.background .block__instruction a,.bg-color.background .component__instruction a{color:#ffffff}.bg-color.background .pagelevelprogress__indicator{border-color:#ffffff}.bg-color.background .pagelevelprogress__indicator-inner{background-color:#000000}.bg-color.background .pagelevelprogress__indicator-bar{background-color:#ffffff}.bg-color.background .narrative__progress{background-color:rgba(255,255,255,0.5)}.bg-color.background .narrative__progress.is-selected{background-color:#ffffff}.bg-color.transparent-light{background-color:transparent;color:#000}.bg-color.transparent-light .block__title,.bg-color.transparent-light .component__title,.bg-color.transparent-light .block__body a,.bg-color.transparent-light .component__body a,.bg-color.transparent-light .block__instruction a,.bg-color.transparent-light .component__instruction a{color:#000}.bg-color.transparent-light .pagelevelprogress__indicator{border-color:#000}.bg-color.transparent-light .pagelevelprogress__indicator-inner{background-color:transparent}.bg-color.transparent-light .pagelevelprogress__indicator-bar{background-color:#000}.bg-color.transparent-light .narrative__progress{background-color:rgba(0,0,0,0.5)}.bg-color.transparent-light .narrative__progress.is-selected{background-color:#000}.bg-color.transparent-dark{background-color:transparent;color:#fff}.bg-color.transparent-dark .block__title,.bg-color.transparent-dark .component__title,.bg-color.transparent-dark .block__body a,.bg-color.transparent-dark .component__body a,.bg-color.transparent-dark .block__instruction a,.bg-color.transparent-dark .component__instruction a{color:#fff}.bg-color.transparent-dark .pagelevelprogress__indicator{border-color:#fff}.bg-color.transparent-dark .pagelevelprogress__indicator-inner{background-color:transparent}.bg-color.transparent-dark .pagelevelprogress__indicator-bar{background-color:#fff}.bg-color.transparent-dark .narrative__progress{background-color:rgba(255,255,255,0.5)}.bg-color.transparent-dark .narrative__progress.is-selected{background-color:#fff}.page.title-align-left .page__title,.page.body-align-left .page__body,.page.instruction-align-left .page__instruction{text-align:start}.page.title-align-center .page__title,.page.body-align-center .page__body,.page.instruction-align-center .page__instruction{text-align:center}.page.title-align-right .page__title,.page.body-align-right .page__body,.page.instruction-align-right .page__instruction{text-align:end}.article.title-align-left .article__title,.article.body-align-left .article__body,.article.instruction-align-left .article__instruction{text-align:start}.article.title-align-center .article__title,.article.body-align-center .article__body,.article.instruction-align-center .article__instruction{text-align:center}.article.title-align-right .article__title,.article.body-align-right .article__body,.article.instruction-align-right .article__instruction{text-align:end}.block.title-align-left .block__title,.block.body-align-left .block__body,.block.instruction-align-left .block__instruction{text-align:start}.block.title-align-center .block__title,.block.body-align-center .block__body,.block.instruction-align-center .block__instruction{text-align:center}.block.title-align-right .block__title,.block.body-align-right .block__body,.block.instruction-align-right .block__instruction{text-align:end}.component.title-align-left .component__title,.component.body-align-left .component__body,.component.instruction-align-left .component__instruction{text-align:start}.component.title-align-center .component__title,.component.body-align-center .component__body,.component.instruction-align-center .component__instruction{text-align:center}.component.title-align-right .component__title,.component.body-align-right .component__body,.component.instruction-align-right .component__instruction{text-align:end}@media (min-width:47.5rem){.hide-on-desktop{display:none}}@media (max-width:47.5rem){.hide-on-mobile{display:none}}.comp-header-bg-color.black .component__inner{margin:-1rem -1rem}.comp-header-bg-color.black .component__header{padding:1rem 1rem;background-color:#000;color:#fff}.comp-header-bg-color.black .component__title,.comp-header-bg-color.black .component__body a,.comp-header-bg-color.black .component__instruction a{color:#fff}.comp-header-bg-color.black .pagelevelprogress__indicator{border-color:#fff}.comp-header-bg-color.black .pagelevelprogress__indicator-inner{background-color:#000}.comp-header-bg-color.black .pagelevelprogress__indicator-bar{background-color:#fff}.comp-header-bg-color.background .component__inner{margin:-1rem -1rem}.comp-header-bg-color.background .component__header{padding:1rem 1rem;background-color:#000000;color:#ffffff}.comp-header-bg-color.background .component__title,.comp-header-bg-color.background .component__body a,.comp-header-bg-color.background .component__instruction a{color:#ffffff}.comp-header-bg-color.background .pagelevelprogress__indicator{border-color:#ffffff}.comp-header-bg-color.background .pagelevelprogress__indicator-inner{background-color:#000000}.comp-header-bg-color.background .pagelevelprogress__indicator-bar{background-color:#ffffff}.comp-header-bg-color.transparent-light .component__inner{margin:-1rem -1rem}.comp-header-bg-color.transparent-light .component__header{padding:1rem 1rem;background-color:transparent;color:#4d4d4d}.comp-header-bg-color.transparent-light .component__title,.comp-header-bg-color.transparent-light .component__body a,.comp-header-bg-color.transparent-light .component__instruction a{color:#4d4d4d}.comp-header-bg-color.transparent-light .pagelevelprogress__indicator{border-color:#4d4d4d}.comp-header-bg-color.transparent-light .pagelevelprogress__indicator-inner{background-color:transparent}.comp-header-bg-color.transparent-light .pagelevelprogress__indicator-bar{background-color:#4d4d4d}.comp-header-bg-color.transparent-dark .component__inner{margin:-1rem -1rem}.comp-header-bg-color.transparent-dark .component__header{padding:1rem 1rem;background-color:transparent;color:#ffffff}.comp-header-bg-color.transparent-dark .component__title,.comp-header-bg-color.transparent-dark .component__body a,.comp-header-bg-color.transparent-dark .component__instruction a{color:#ffffff}.comp-header-bg-color.transparent-dark .pagelevelprogress__indicator{border-color:#ffffff}.comp-header-bg-color.transparent-dark .pagelevelprogress__indicator-inner{background-color:transparent}.comp-header-bg-color.transparent-dark .pagelevelprogress__indicator-bar{background-color:#ffffff}.hide-nav-back-btn .nav__back-btn{display:none !important}.hide-page-header .page__header{display:none !important}.header-color.black .menu__header,.header-color.black .page__header{background-color:#000}.header-color.black .menu__title,.header-color.black .page__title,.header-color.black .menu__subtitle,.header-color.black .page__subtitle,.header-color.black .menu__body,.header-color.black .page__body,.header-color.black .menu__body a,.header-color.black .page__body a,.header-color.black .menu__instruction,.header-color.black .page__instruction,.header-color.black .menu__instruction a,.header-color.black .page__instruction a{color:#fff}.header-color.background .menu__header,.header-color.background .page__header{background-color:#000000}.header-color.background .menu__title,.header-color.background .page__title,.header-color.background .menu__subtitle,.header-color.background .page__subtitle,.header-color.background .menu__body,.header-color.background .page__body,.header-color.background .menu__body a,.header-color.background .page__body a,.header-color.background .menu__instruction,.header-color.background .page__instruction,.header-color.background .menu__instruction a,.header-color.background .page__instruction a{color:#ffffff}.header-color.transparent-light .menu__header,.header-color.transparent-light .page__header{background-color:transparent}.header-color.transparent-light .menu__title,.header-color.transparent-light .page__title,.header-color.transparent-light .menu__subtitle,.header-color.transparent-light .page__subtitle,.header-color.transparent-light .menu__body,.header-color.transparent-light .page__body,.header-color.transparent-light .menu__body a,.header-color.transparent-light .page__body a,.header-color.transparent-light .menu__instruction,.header-color.transparent-light .page__instruction,.header-color.transparent-light .menu__instruction a,.header-color.transparent-light .page__instruction a{color:#4d4d4d}.header-color.transparent-dark .menu__header,.header-color.transparent-dark .page__header{background-color:transparent}.header-color.transparent-dark .menu__title,.header-color.transparent-dark .page__title,.header-color.transparent-dark .menu__subtitle,.header-color.transparent-dark .page__subtitle,.header-color.transparent-dark .menu__body,.header-color.transparent-dark .page__body,.header-color.transparent-dark .menu__body a,.header-color.transparent-dark .page__body a,.header-color.transparent-dark .menu__instruction,.header-color.transparent-dark .page__instruction,.header-color.transparent-dark .menu__instruction a,.header-color.transparent-dark .page__instruction a{color:#ffffff} \ No newline at end of file diff --git a/adapt/js/adapt.min.js b/adapt/js/adapt.min.js index 0cd43ca..7f1eae8 100644 --- a/adapt/js/adapt.min.js +++ b/adapt/js/adapt.min.js @@ -1 +1 @@ -require(["bowser","underscore","backbone","semver","react","react-dom","html-react-parser","libraries/SCORM_API_wrapper","libraries/lzma-min","libraries/lzma_worker-min.js","libraries/js-cookie.js","libraries/jquery.keycombo"],(function(Bowser,_$1,Backbone$1,semver,React,ReactDOM,HTMLReactParser,pipwerks,lzmaMin,lzma_workerMin_js,Cookies,jquery_keycombo){function _interopDefaultLegacy(e){return e&&typeof e==="object"&&"default"in e?e:{default:e}}var Bowser__default=_interopDefaultLegacy(Bowser);var ___default=_interopDefaultLegacy(_$1);var Backbone__default=_interopDefaultLegacy(Backbone$1);var semver__default=_interopDefaultLegacy(semver);var React__default=_interopDefaultLegacy(React);var ReactDOM__default=_interopDefaultLegacy(ReactDOM);var HTMLReactParser__default=_interopDefaultLegacy(HTMLReactParser);var pipwerks__default=_interopDefaultLegacy(pipwerks);var Cookies__default=_interopDefaultLegacy(Cookies);class Wait extends Backbone.Controller{initialize(){this._waitCount=0;this._callbackHandle=null;this.being=this.begin.bind(this);this.end=this.end.bind(this)}isWaiting(){return this._waitCount!==0}begin(){if(!this.isWaiting())this.trigger("wait");this._waitCount++;if(this._callbackHandle){clearTimeout(this._callbackHandle);this._callbackHandle=null}return this}end(){if(!this.isWaiting())return this;this._waitCount--;if(this.isWaiting()||this._callbackHandle)return this;this._callbackHandle=setTimeout(function(){this._callbackHandle=null;this.trigger("ready")}.bind(this),0);return this}queue(callback){if(!callback){this.begin();return new Promise((resolve=>{this.once("ready",resolve);this.end()}))}this.begin();this.once("ready",callback);this.end();return this}for(callback){this.begin();_.defer((()=>callback(_.once(this.end))));return this}}const wait=new Wait;var wait$1=__AMD("core/js/wait",wait);var LockingModel=__AMD("core/js/models/lockingModel",class LockingModel extends Backbone.Model{lockedAttributes(){return null}set(){for(var _len=arguments.length,args=new Array(_len),_key=0;_key<_len;_key++){args[_key]=arguments[_key]}if(typeof args[0]!=="object"){const[name,value]=args.splice(0,2);args.unshift({[name]:value})}const options=args[1]??{};const attrValues=args[0];const newValues={};for(const attrName in attrValues){const attrVal=attrValues[attrName];const willChange=this.attributes[attrName]!==attrValues[attrName];if(!willChange)continue;const isNotLocking=typeof attrVal!=="boolean"||!this.isLocking(attrName);if(isNotLocking){newValues[attrName]=attrVal;continue}const defaults=_.result(this,"defaults");const isDefault=defaults[attrName]!==undefined;const isInitialDefault=isDefault&&!this.changed;if(isInitialDefault){this._lockedAttributes[attrName]=!defaults[attrName]}const isSettingValueForSpecificPlugin=options?.pluginName;if(!isSettingValueForSpecificPlugin){if(!isInitialDefault){console.error("Must supply a pluginName to change a locked attribute")}options.pluginName="compatibility"}const pluginName=options.pluginName;const lockingValue=this._lockedAttributes[attrName];const isAttemptingToLock=lockingValue===attrVal;if(isAttemptingToLock){this.setLockState(attrName,true,{pluginName:pluginName,skipcheck:true});newValues[attrName]=lockingValue;continue}this.setLockState(attrName,false,{pluginName:pluginName,skipcheck:true});const totalLockValue=this.getLockCount(attrName,{skipcheck:true});if(totalLockValue===0){newValues[attrName]=!lockingValue;continue}}if(!Object.keys(newValues))return this;super.set(newValues,options);return this}setLocking(attrName,defaultLockValue){if(this.isLocking(attrName))return;if(!this._lockedAttributes)this._lockedAttributes={};this._lockedAttributes[attrName]=defaultLockValue}unsetLocking(attrName){if(!this.isLocking(attrName))return;if(!this._lockedAttributes)return;delete this._lockedAttributes[attrName];delete this._lockedAttributesValues[attrName];if(Object.keys(this._lockedAttributes).length===0){delete this._lockedAttributes;delete this._lockedAttributesValues}}isLocking(attrName){const isCheckingGeneralLockingState=attrName===undefined;let hasDerivedLockedAttributes=Object.prototype.hasOwnProperty.call(this,"_lockedAttributes");if(!hasDerivedLockedAttributes){this._lockedAttributes=_.result(this,"lockedAttributes");hasDerivedLockedAttributes=true}const isUsingLockedAttributes=Boolean(this._lockedAttributes);if(isCheckingGeneralLockingState){return isUsingLockedAttributes}if(!isUsingLockedAttributes)return false;const isAttributeALockingAttribute=Object.prototype.hasOwnProperty.call(this._lockedAttributes,attrName);if(!isAttributeALockingAttribute)return false;if(!this._lockedAttributesValues){this._lockedAttributesValues={}}if(!this._lockedAttributesValues[attrName]){this._lockedAttributesValues[attrName]={}}return true}isLocked(attrName,options){const shouldSkipCheck=options?.skipcheck;if(!shouldSkipCheck){const stopProcessing=!this.isLocking(attrName);if(stopProcessing)return}return this.getLockCount(attrName)>0}getLockCount(attrName,options){const shouldSkipCheck=options?.skipcheck;if(!shouldSkipCheck){const stopProcessing=!this.isLocking(attrName);if(stopProcessing)return}const isGettingValueForSpecificPlugin=options?.pluginName;if(isGettingValueForSpecificPlugin){return this._lockedAttributesValues[attrName][options.pluginName]?1:0}const lockingAttributeValues=Object.values(this._lockedAttributesValues[attrName]);const lockingAttributeValuesSum=lockingAttributeValues.reduce(((sum,value)=>sum+(value?1:0)),0);return lockingAttributeValuesSum}setLockState(attrName,value,options){const shouldSkipCheck=options?.skipcheck;if(!shouldSkipCheck){const stopProcessing=!this.isLocking(attrName);if(stopProcessing)return this}const isSettingValueForSpecificPlugin=options?.pluginName;if(!isSettingValueForSpecificPlugin){console.error("Must supply a pluginName to set a locked attribute lock value");options.pluginName="compatibility"}if(value){this._lockedAttributesValues[attrName][options.pluginName]=value}else{delete this._lockedAttributesValues[attrName][options.pluginName]}return this}});class AdaptSingleton extends LockingModel{initialize(){this.loadScript=window.__loadScript}defaults(){return{_canScroll:true,_outstandingCompletionChecks:0,_pluginWaitCount:0,_isStarted:false,_shouldDestroyContentObjects:true}}lockedAttributes(){return{_canScroll:false}}async init(){this.addDirection();this.disableAnimation();this.trigger("adapt:preInitialize");await wait$1.queue();this.deferUntilCompletionChecked((async()=>{this.trigger("adapt:start");await wait$1.queue();if(!Backbone.History.started){Backbone.history.start()}this.set("_isStarted",true);this.trigger("adapt:initialize");await wait$1.queue()}))}checkingCompletion(){const outstandingChecks=this.get("_outstandingCompletionChecks");this.set("_outstandingCompletionChecks",outstandingChecks+1)}checkedCompletion(){const outstandingChecks=this.get("_outstandingCompletionChecks");this.set("_outstandingCompletionChecks",outstandingChecks-1)}async deferUntilCompletionChecked(){let callback=arguments.length>0&&arguments[0]!==undefined?arguments[0]:()=>{};if(this.get("_outstandingCompletionChecks")===0)return callback();return new Promise((resolve=>{const checkIfAnyChecksOutstanding=(model,outstandingChecks)=>{if(outstandingChecks!==0)return;this.off("change:_outstandingCompletionChecks",checkIfAnyChecksOutstanding);callback();resolve()};this.on("change:_outstandingCompletionChecks",checkIfAnyChecksOutstanding)}))}isWaitingForPlugins(){this.log.deprecated("Use wait.isWaiting() as Adapt.isWaitingForPlugins() will be removed in the future");return wait$1.isWaiting()}checkPluginsReady(){this.log.deprecated("Use wait.isWaiting() as Adapt.checkPluginsReady() will be removed in the future");if(this.isWaitingForPlugins()){return}this.trigger("plugins:ready")}parseRelativeString(relativeString){const parts=relativeString.replace(/\s*([+\-=]+\d+){1}/g,"$1").split(/[@ ]/).filter(Boolean);const parsed=parts.map((part=>{let splitIndex=part.search(/[+\-=\d]{1}/);if(splitIndex===-1)splitIndex=part.length;const symbol=part.slice(splitIndex,splitIndex+1);const type=part.slice(0,splitIndex).replace(/^@/,"");let offset=null;let inset=null;switch(symbol){case"=":inset=parseInt(part.slice(splitIndex+1).trim()||0);break;default:offset=parseInt(part.slice(splitIndex).trim()||0);break}return{type:type,offset:offset,inset:inset}}));return parsed.length===1?parsed[0]:parsed}addDirection(){const defaultDirection=this.config.get("_defaultDirection");$("html").addClass("dir-"+defaultDirection).attr("dir",defaultDirection)}disableAnimation(){const disableAnimationArray=this.config.get("_disableAnimationFor");const disableAnimation=this.config.get("_disableAnimation");if(disableAnimationArray){for(let i=0,l=disableAnimationArray.length;i=this.screenHeight?"landscape":"portrait"}get aspectRatio(){return this.screenWidth/this.screenHeight}onConfigDataLoaded(){this.screenSize=this.checkScreenSize();this.$html.addClass("size-"+this.screenSize);if(this.orientation){this.$html.addClass("orientation-"+this.orientation)}this.$window.on("resize orientationchange",this.onWindowResize)}get screenSizes(){const screenSizes={...Adapt$1.config.get("screenSize")};const screenSizesList=Object.entries(screenSizes);const screensizeEmThreshold=300;const baseFontSize=16;for(const[name,value]of screenSizesList){screenSizes[name]=value>screensizeEmThreshold?value/baseFontSize:value}return screenSizes}isScreenSizeMin(name){return Boolean(window.matchMedia(`(min-width: ${this.screenSizes[name]}em)`)?.matches)}checkScreenSize(){const screenSizesList=Object.entries(this.screenSizes);screenSizesList.sort(((a,b)=>a[1]-b[1]));const fontSize=parseFloat($("html").css("font-size"));const screenSizeEmWidth=window.innerWidth/fontSize;const smallestScreenSize=screenSizesList[0][0];const screenSize=screenSizesList.reduce(((screenSize,_ref)=>{let[name,value]=_ref;if(screenSizeEmWidth>=value)return name;return screenSize}),smallestScreenSize);return screenSize}getScreenWidth(){return this.isAppleDevice()?this.getAppleScreenWidth():window.innerWidth||this.$window.width()}getScreenHeight(){return this.isAppleDevice()?this.getAppleScreenHeight():window.innerHeight||this.$window.height()}setViewportHeight(){document.documentElement.style.setProperty("--adapt-viewport-height",`${window.innerHeight}px`)}setNavigationHeight(){document.documentElement.style.setProperty("--adapt-navigation-height",`${$(".nav").height()}px`)}getOperatingSystem(){let os=this.bowser.os.name.toLowerCase()||"";if(os===""){const platform=navigator.platform.toLowerCase();const match=platform.match(/win|mac|linux/);if(match)os=match[0];if(os==="win")os="windows";if(!os)os=""}if(!os)os="platformunknown";return os}getRenderingEngine(){return this.bowser.engine.name||""}onWindowResize(){if(this.hasWindowResized)return;requestAnimationFrame(this.calculateResize);this.hasWindowResized=true}calculateResize(){this.hasWindowResized=false;const previousWidth=this.screenWidth;const previousHeight=this.screenHeight;this.screenWidth=this.getScreenWidth();this.screenHeight=this.getScreenHeight();this.setViewportHeight();this.setNavigationHeight();if(previousWidth===this.screenWidth&&previousHeight===this.screenHeight){return}if(this.orientation){this.$html.toggleClass("orientation-landscape",this.orientation==="landscape");this.$html.toggleClass("orientation-portrait",this.orientation==="portrait")}const newScreenSize=this.checkScreenSize();if(newScreenSize!==this.screenSize){this.screenSize=newScreenSize;const screenSizes=this.screenSizes;for(const name in screenSizes){if(name===this.screenSize)continue;this.$html.removeClass(`size-${name}`)}this.$html.toggleClass(`size-${this.screenSize}`,true);Adapt$1.trigger("device:changed",this.screenSize)}Adapt$1.trigger("device:preResize device:resize device:postResize",this.screenWidth)}isAppleDevice(){return/iPad|iPhone|iPod/.test(navigator.userAgent)&&!window.MSStream||navigator.userAgent.match(/Mac/)&&navigator?.maxTouchPoints>2}get shouldReportInvertedAppleScreenSize(){const windowRatio=window.innerWidth/window.innerHeight;const screenRatio=window.screen.width/window.screen.height;const isWindowPortrait=windowRatio<1;const isScreenPortrait=screenRatio<1;const isDeviceBadlyReportingScreenOrientation=isWindowPortrait!==isScreenPortrait;return isDeviceBadlyReportingScreenOrientation}getAppleScreenWidth(){return this.shouldReportInvertedAppleScreenSize?window.screen.height:window.screen.width}getAppleScreenHeight(){return this.shouldReportInvertedAppleScreenSize?window.screen.width:window.screen.height}getAppleDeviceType(){const platformType=this.bowser.platform.type?.toLowerCase()||"";const browserName=this.bowser.browser.name?.toLowerCase()||"";const isIPhone=platformType==="mobile"&&browserName==="safari";const isIPad=platformType==="tablet"&&browserName==="safari";if(isIPhone)return"iphone";if(isIPad)return"ipad";return""}pixelDensity(){const pixelDensity=window.devicePixelRatio||1;if(pixelDensity>=3){return"ultra-high"}else if(pixelDensity>=2){return"high"}else if(pixelDensity>=1.5){return"medium"}else{return"low"}}}const device=new Device;var device$1=__AMD("core/js/device",device);class Location extends Backbone__default["default"].Controller{initialize(){this._previousId=null;this._previousContentType=null;this._previousModel=null;this._previousClasses=null;this._lastVisitedType=null;this._lastVisitedMenu=null;this._lastVisitedPage=null;this._currentId=null;this._currentModel=null;this._currentLocation=null;this._contentType=null}}const location=new Location;var location$1=__AMD("core/js/location",location);var BrowserConfig=__AMD("core/js/a11y/browserConfig",class BrowserConfig extends Backbone.Controller{initialize(_ref){let{a11y:a11y}=_ref;this.a11y=a11y;this.listenTo(Adapt$1,{"accessibility:ready":this._onReady})}_onReady(){if(this.a11y.config._options._isPrefersReducedMotionEnabled)this._enablePrefersReducedMotion()}_enablePrefersReducedMotion(){if(!window.matchMedia)return;const isEnabledInBrowser=window.matchMedia("(prefers-reduced-motion: reduce");$("html").toggleClass("is-prefers-reduced-motion",Boolean(isEnabledInBrowser?.matches))}});var BrowserFocus=__AMD("core/js/a11y/browserFocus",class BrowserFocus extends Backbone.Controller{initialize(_ref){let{a11y:a11y}=_ref;this.a11y=a11y;this._onBlur=this._onBlur.bind(this);this._onClick=this._onClick.bind(this);this.$body=$("body");this.listenTo(Adapt$1,{"accessibility:ready":this._attachEventListeners})}_attachEventListeners(){this.$body.on("blur","*",this._onBlur).on("blur",this._onBlur);this.$body[0].addEventListener("click",this._onClick,true)}_onBlur(event){const config=this.a11y.config;if(!config._isEnabled||!config._options._isFocusNextOnDisabled){return}const $element=$(event.target);if($element.is("[data-a11y-force-focus]")){$element.removeAttr("tabindex data-a11y-force-focus")}if(event.target!==event.currentTarget){return}if(!$element.is("[disabled]")&&$element.css("display")!=="none"&&$element.css("visibility")!=="hidden"){return}this.a11y.focusNext($element)}_onClick(event){if(!event.isTrusted)return;const $element=$(event.target);const isAriaDisabled=$element.closest("[aria-disabled=true]").length===1;if(isAriaDisabled){event.preventDefault();event.stopImmediatePropagation()}const config=this.a11y.config;if(!config._isEnabled||!config._options._isFocusOnClickEnabled){return}const $stack=$([...$element.toArray(),...$element.parents().toArray()]);const $focusable=$stack.filter(config._options._tabbableElements);if(!$focusable.length){return}const $closestFocusable=$element.closest(config._options._tabbableElements);if($closestFocusable[0]!==document.activeElement){this.a11y._isForcedFocus=true;$closestFocusable[0].focus();this.a11y._isForcedFocus=false}if(!config._options._isClickDelayedAfterFocusEnabled)return;event.preventDefault();event.stopImmediatePropagation();setTimeout((()=>{$element[0].click()}),50)}});var FocusOptions=__AMD("core/js/a11y/focusOptions",class FocusOptions{constructor(){let{preventScroll:preventScroll=false,defer:defer=false}=arguments.length>0&&arguments[0]!==undefined?arguments[0]:{};this.preventScroll=preventScroll;this.defer=defer}});var KeyboardFocusOutline=__AMD("core/js/a11y/keyboardFocusOutline",class KeyboardFocusOutline extends Backbone.Controller{initialize(_ref){let{a11y:a11y}=_ref;this.a11y=a11y;this._onKeyDown=this._onKeyDown.bind(this);this.$html=$("html");this.showOnKeys={9:true,13:true,32:true,37:true,38:true,39:true,40:true};this.listenTo(Adapt$1,{"accessibility:ready":this._attachEventListeners})}_attachEventListeners(){document.addEventListener("keydown",this._onKeyDown);this._start()}_start(){const config=this.a11y.config;if(config._options._isFocusOutlineDisabled){this.$html.addClass("a11y-disable-focusoutline");return}if(!config._isEnabled||!config._options._isFocusOutlineKeyboardOnlyEnabled){return}this.$html.addClass("a11y-disable-focusoutline")}_onKeyDown(event){const config=this.a11y.config;if(config._options._isFocusOutlineDisabled){this.$html.addClass("a11y-disable-focusoutline");return}if(!config._isEnabled||!config._options._isFocusOutlineKeyboardOnlyEnabled||!this.showOnKeys[event.keyCode]){return}const $element=$(event.target);if(!$element.is(config._options._tabbableElements)||$element.is(config._options._focusOutlineKeyboardOnlyIgnore)){return}this.$html.removeClass("a11y-disable-focusoutline")}});const LOG_LEVEL=ENUM(["DEBUG","INFO","WARN","ERROR","FATAL"]);var LOG_LEVEL$1=__AMD("core/js/enums/logLevelEnum",LOG_LEVEL);class Logging extends Backbone.Controller{initialize(){this._config={_isEnabled:true,_level:LOG_LEVEL$1.INFO.asLowerCase,_console:true,_warnFirstOnly:true};this._warned={};this.listenToOnce(Adapt$1,"configModel:dataLoaded",this.onLoadConfigData)}onLoadConfigData(){this.loadConfig();this.debug("Logging config loaded");this.trigger("log:ready")}loadConfig(){if(Adapt$1.config.has("_logging")){this._config=Adapt$1.config.get("_logging")}this.checkQueryStringOverride()}checkQueryStringOverride(){const matches=window.location.search.match(/[?&]loglevel=([a-z]*)/i);if(!matches||matches.length<2)return;const override=LOG_LEVEL$1(matches[1].toUpperCase());if(!override)return;this._config._level=override.asLowerCase;this.debug("Loglevel override in query string:",this._config._level)}debug(){for(var _len=arguments.length,args=new Array(_len),_key=0;_key<_len;_key++){args[_key]=arguments[_key]}this._log(LOG_LEVEL$1.DEBUG,args)}info(){for(var _len2=arguments.length,args=new Array(_len2),_key2=0;_key2<_len2;_key2++){args[_key2]=arguments[_key2]}this._log(LOG_LEVEL$1.INFO,args)}warn(){for(var _len3=arguments.length,args=new Array(_len3),_key3=0;_key3<_len3;_key3++){args[_key3]=arguments[_key3]}this._log(LOG_LEVEL$1.WARN,args)}error(){for(var _len4=arguments.length,args=new Array(_len4),_key4=0;_key4<_len4;_key4++){args[_key4]=arguments[_key4]}this._log(LOG_LEVEL$1.ERROR,args)}fatal(){for(var _len5=arguments.length,args=new Array(_len5),_key5=0;_key5<_len5;_key5++){args[_key5]=arguments[_key5]}this._log(LOG_LEVEL$1.FATAL,args)}removed(){for(var _len6=arguments.length,args=new Array(_len6),_key6=0;_key6<_len6;_key6++){args[_key6]=arguments[_key6]}args=["REMOVED"].concat(args);this.warnOnce(...args)}deprecated(){for(var _len7=arguments.length,args=new Array(_len7),_key7=0;_key7<_len7;_key7++){args[_key7]=arguments[_key7]}args=["DEPRECATED"].concat(args);this.warnOnce(...args)}warnOnce(){for(var _len8=arguments.length,args=new Array(_len8),_key8=0;_key8<_len8;_key8++){args[_key8]=arguments[_key8]}if(this._hasWarned(args)){return}this._log(LOG_LEVEL$1.WARN,args)}_log(level,data){const isEnabled=this._config._isEnabled;if(!isEnabled)return;const configLevel=LOG_LEVEL$1(this._config._level.toUpperCase());const isLogLevelAllowed=level>=configLevel;if(!isLogLevelAllowed)return;this._logToConsole(level,data);this.trigger("log",level,data);this.trigger("log:"+level.asLowerCase,level,data)}_logToConsole(level,data){const shouldLogToConsole=this._config._console;if(!shouldLogToConsole)return;const log=[level.asUpperCase+":"];data&&log.push(...data);if(console[level.asLowerCase]){console[level.asLowerCase](...log)}else{console.log(...log)}}_hasWarned(args){if(!this._config._warnFirstOnly){return false}const hash=args.map(String).join(":");if(this._warned[hash]){return true}this._warned[hash]=true;return false}}const logging=new Logging;var logging$1=__AMD("core/js/logging",logging);var Log=__AMD("core/js/a11y/log",class Log extends Backbone.Controller{initialize(_ref){let{a11y:a11y}=_ref;this.a11y=a11y;this._warned={}}_hasWarned(args){const config=this.a11y.config;if(!config._options._warnFirstOnly){return false}const hash=args.map(String).join(":");if(this._warned[hash]){return true}this._warned[hash]=true;return false}_canWarn(){const config=this.a11y.config;return Boolean(config._options._warn)}removed(){for(var _len=arguments.length,args=new Array(_len),_key=0;_key<_len;_key++){args[_key]=arguments[_key]}if(!this._canWarn){return}args=["A11Y"].concat(args);if(this._hasWarned(args)){return}logging$1.removed(...args);return this}deprecated(){for(var _len2=arguments.length,args=new Array(_len2),_key2=0;_key2<_len2;_key2++){args[_key2]=arguments[_key2]}if(!this._canWarn){return}args=["A11Y"].concat(args);if(this._hasWarned(args)){return}logging$1.deprecated(...args);return this}});var Scroll=__AMD("core/js/a11y/scroll",class Scroll extends Backbone.Controller{initialize(_ref){let{a11y:a11y}=_ref;this._a11y=a11y;this._onTouchStart=this._onTouchStart.bind(this);this._onTouchEnd=this._onTouchEnd.bind(this);this._onScrollEvent=this._onScrollEvent.bind(this);this._onKeyDown=this._onKeyDown.bind(this);this._scrollDisabledElements=$([]);this.$window=$(window);this.$body=$("body");this._preventScrollOnKeys={33:true,34:true,35:true,36:true,37:true,38:true,39:true,40:true};this._arrowKeys={37:true,38:true,39:true,40:true};this._ignoreKeysOnElementsMatching="textarea, input[type=radio], select";this._isRunning=false;this._touchStartEventObject=null;window.addEventListener("touchstart",this._onTouchStart);window.addEventListener("touchend",this._onTouchEnd);window.addEventListener("touchmove",this._onScrollEvent,{passive:false});window.addEventListener("wheel",this._onScrollEvent,{passive:false});document.addEventListener("wheel",this._onScrollEvent,{passive:false});document.addEventListener("keydown",this._onKeyDown)}disable($elements){$elements=$($elements);this._scrollDisabledElements=this._scrollDisabledElements.add($elements);this._checkRunning();return this}enable($elements){$elements=$($elements);if(!$elements.length){this.clear();return this}this._scrollDisabledElements=this._scrollDisabledElements.not($elements);this._checkRunning();return this}clear(){this._scrollDisabledElements=$([]);this._checkRunning();return this}_checkRunning(){if(!this._scrollDisabledElements.length){this._stop();return}this._start()}_start(){if(this._isRunning){return}this._isRunning=true}_onTouchStart(event){if(!this._isRunning)return;event=$.event.fix(event);this._touchStartEventObject=event;return true}_onTouchEnd(){if(!this._isRunning)return;this._touchStartEventObject=null;return true}_onScrollEvent(event){if(!this._isRunning)return;event=$.event.fix(event);return this._preventScroll(event)}_onKeyDown(event){if(!this._isRunning)return;event=$.event.fix(event);if(this._arrowKeys[event.which]&&this._a11y.isArrowable(event.target)){return}if(!this._preventScrollOnKeys[event.which]){return}if(this._a11y.isPopupOpen&&!this._isScrollable($(event.target))){const $openPopup=this._a11y.popupStack[this._a11y.popupStack.length-1];const $firstScrollable=this._isScrollable($openPopup)?$openPopup:this._a11y._findFirstForwardDescendant($openPopup,this._isScrollable);if($firstScrollable.length){event.target=$firstScrollable}}const $target=$(event.target);if($target.is(this._ignoreKeysOnElementsMatching)){return}return this._preventScroll(event)}_preventScroll(event){const isGesture=event.touches?.length>1;if(isGesture){return}const $target=$(event.target);if(this._scrollDisabledElements.length){const scrollingParent=this._getScrollingParent(event,$target);if(scrollingParent.filter(this._scrollDisabledElements).length===0){this.$window.scroll();return}}event.preventDefault();return false}_getScrollingParent(event,$target){const isTouchEvent=event.type==="touchmove";const isKeyDownEvent=event.type==="keydown";const hasTouchStartEvent=this._touchStartEventObject?.originalEvent;if(isTouchEvent&&!hasTouchStartEvent&&!isKeyDownEvent){return $target}const directionY=this._getScrollDirection(event);if(directionY==="none"){return this.$body}const parents=[$target[0],...$target.parents()];for(let i=0,l=parents.length;i0;if(hasScrollingSpace){return true}break}return false}_getScrollDirection(event){const deltaY=this._getScrollDelta(event);if(deltaY===0){return"none"}return deltaY>0?"up":"down"}_getScrollDelta(event){let deltaY=0;const isTouchEvent=event.type==="touchmove";const isKeyDownEvent=event.type==="keydown";const originalEvent=event.originalEvent;if(isTouchEvent){const startOriginalEvent=this._touchStartEventObject.originalEvent;let currentY=originalEvent.pageY;let previousY=startOriginalEvent.pageY;if(currentY===0||currentY===previousY){currentY=originalEvent.touches[0].pageY;previousY=startOriginalEvent.touches[0].pageY}deltaY=currentY-previousY}else if(isKeyDownEvent){deltaY=[33,36,38].includes(event.which)?1:[34,35,40].includes(event.which)?-1:0}else{const hasDeltaY=originalEvent.wheelDeltaY||originalEvent.deltaY!==undefined;if(hasDeltaY){deltaY=-originalEvent.deltaY}else{deltaY=originalEvent.wheelDelta||0}}return deltaY}_stop(){if(!this._isRunning){return}this._isRunning=false}});var WrapFocus=__AMD("core/js/a11y/wrapFocus",class WrapFocus extends Backbone.Controller{initialize(_ref){let{a11y:a11y}=_ref;this.a11y=a11y;_.bindAll(this,"_onWrapAround");this.listenTo(Adapt$1,{"accessibility:ready":this._attachEventListeners})}_attachEventListeners(){const config=this.a11y.config;$("body").on("click focus",config._options._focusguard,this._onWrapAround)}_onWrapAround(event){const config=this.a11y.config;if(!config._isEnabled||!config._options._isPopupWrapFocusEnabled){return}event.preventDefault();event.stopPropagation();this.a11y.focusFirst("body",{defer:false})}});var Popup=__AMD("core/js/a11y/popup",class Popup extends Backbone.Controller{initialize(_ref){let{a11y:a11y}=_ref;this.a11y=a11y;this._floorStack=[$("body")];this._focusStack=[];this._tabIndexes={};this._ariaHiddens={};this._elementUIDIndex=0;this.listenTo(Adapt$1,{"popup:opened"($element,ignoreInternalTrigger){if(ignoreInternalTrigger){return}this.a11y.log.deprecated('Adapt.trigger("popup:opened", $element) is replaced with a11y.popupOpened($element);');this.opened($element,true)},"popup:closed"($target,ignoreInternalTrigger){if(ignoreInternalTrigger){return}this.a11y.log.deprecated('Adapt.trigger("popup:closed", $target) is replaced with a11y.popupClosed($target);');this.closed($target,true)}})}get isOpen(){return this._floorStack.length>1}get stack(){return this._floorStack.slice(1)}opened($popupElement,silent){$popupElement=$popupElement||$(document.activeElement);this._addPopupLayer($popupElement);if(!silent){Adapt$1.trigger("popup:opened",$popupElement,true)}return this}_addPopupLayer($popupElement){$popupElement=$($popupElement);const config=this.a11y.config;if(!config._isEnabled||!config._options._isPopupManagementEnabled||$popupElement.length===0){return $popupElement}this._floorStack.push($popupElement);this._focusStack.push($(document.activeElement));let $elements=$(config._options._tabbableElements).filter(config._options._tabbableElementsExcludes);const $branch=$popupElement.add($popupElement.parents());const $siblings=$branch.siblings().filter(config._options._tabbableElementsExcludes);$elements=$elements.add($siblings);$elements.each(((index,item)=>{const $item=$(item);if(typeof item.a11y_uid==="undefined"){item.a11y_uid="UID"+ ++this._elementUIDIndex}const elementUID=item.a11y_uid;if(this._tabIndexes[elementUID]===undefined){this._tabIndexes[elementUID]=[]}if(this._ariaHiddens[elementUID]===undefined){this._ariaHiddens[elementUID]=[]}const tabindex=$item.attr("tabindex");const ariaHidden=$item.attr("aria-hidden");this._tabIndexes[elementUID].push(tabindex===undefined?"":tabindex);this._ariaHiddens[elementUID].push(ariaHidden===undefined?"":ariaHidden);if(config._options._isPopupTabIndexManagementEnabled){$item.attr("tabindex",-1)}if(config._options._isPopupAriaHiddenManagementEnabled){$item.attr("aria-hidden",true)}}));const $items=$popupElement.find(config._options._tabbableElements).filter(config._options._tabbableElementsExcludes);if(config._options._isPopupTabIndexManagementEnabled){$items.attr("tabindex",0)}if(config._options._isPopupAriaHiddenManagementEnabled){$items.removeAttr("aria-hidden").removeClass("aria-hidden").parents(config._options._ariaHiddenExcludes).removeAttr("aria-hidden").removeClass("aria-hidden")}}closed($focusElement,silent){const $previousFocusElement=this._removeLastPopupLayer();$focusElement=$focusElement||$previousFocusElement||$("body");if(!silent){Adapt$1.trigger("popup:closed",$focusElement,true)}this.a11y.focusFirst($($focusElement),{preventScroll:true});return this}_removeLastPopupLayer(){const config=this.a11y.config;if(!config._isEnabled||!config._options._isPopupManagementEnabled){return $(document.activeElement)}if(this._floorStack.length<=1){return}this._floorStack.pop();$(config._options._tabbableElements).filter(config._options._tabbableElementsExcludes).each(((index,item)=>{const $item=$(item);let previousTabIndex="";let previousAriaHidden="";if(typeof item.a11y_uid==="undefined"){item.a11y_uid="UID"+ ++this._elementUIDIndex}const elementUID=item.a11y_uid;if(this._tabIndexes[elementUID]?.length){previousTabIndex=this._tabIndexes[elementUID].pop();previousAriaHidden=this._ariaHiddens[elementUID].pop()}if(this._tabIndexes[elementUID]?.length){delete this._tabIndexes[elementUID];delete this._ariaHiddens[elementUID]}if(config._options._isPopupTabIndexManagementEnabled){if(previousTabIndex===""){$item.removeAttr("tabindex")}else{$item.attr({tabindex:previousTabIndex})}}if(config._options._isPopupAriaHiddenManagementEnabled){if(previousAriaHidden===""){$item.removeAttr("aria-hidden")}else{$item.attr({"aria-hidden":previousAriaHidden})}}}));return this._focusStack.pop()}setCloseTo($focusElement){const $original=this._focusStack.pop();this._focusStack.push($focusElement);return $original}});var defaultAriaLevels=__AMD("core/js/enums/defaultAriaLevels",{_menu:1,_menuGroup:2,_menuItem:2,_page:1,_article:2,_block:3,_component:4,_componentItem:5,_notify:1});var deprecated=__AMD("core/js/a11y/deprecated",(function(a11y){Object.assign($.fn,{isFixedPostion(){a11y.log.removed('$("..").isFixedPostion was unneeded and has been removed, let us know if you need it back.');return false},a11y_aria_label(){a11y.log.removed('$("..").a11y_aria_label was incorrect behaviour.');return this},limitedScrollTo(){a11y.log.removed("$.limitedScrollTo had no impact on the screen reader cursor.");return this},a11y_text(){a11y.log.removed("a11y_text is no longer required. https://tink.uk/understanding-screen-reader-interaction-modes/");return this},a11y_selected(){a11y.log.removed('$("..").a11y_selected is removed. Please use aria-live instead.');return this},a11y_on(isOn){a11y.log.deprecated('$("..").a11y_on, use a11y.findTabbable($element); and a11y.toggleAccessible($elements, isAccessible); instead.');const $tabbable=a11y.findTabbable(this);a11y.toggleAccessible($tabbable,isOn);return this},a11y_only(){a11y.log.removed('$("..").a11y_only, use a11y.popupOpened($popupElement); instead.');return this},scrollDisable(){if(a11y.config._options._isScrollDisableEnabled===false){return this}a11y.log.deprecated('$("..").scrollDisable, use a11y.scrollDisable($elements); instead.');a11y.scrollDisable(this);return this},scrollEnable(){if(a11y.config._options._isScrollDisableEnabled===false){return this}a11y.log.deprecated('$("..").scrollEnable, use a11y.scrollEnable($elements); instead.');a11y.scrollEnable(this);return this},a11y_popup(){a11y.log.deprecated('$("..").a11y_popup, use a11y.popupOpened($popupElement); instead.');return a11y.popupOpened(this)},a11y_cntrl(isOn,withDisabled){a11y.log.deprecated('$("..").a11y_cntrl, use a11y.toggleAccessible($elements, isAccessible); and if needed a11y.toggleEnabled($elements, isEnabled); instead.');a11y.toggleAccessible(this,isOn);if(withDisabled)a11y.toggleEnabled(this,isOn);return this},a11y_cntrl_enabled(isOn){a11y.log.deprecated('$("..").a11y_cntrl_enabled, use a11y.toggleAccessibleEnabled($elements, isAccessibleEnabled); instead.');a11y.toggleAccessibleEnabled(this,isOn);return this},isReadable(){a11y.log.deprecated('$("..").isReadable, use a11y.isReadable($element); instead.');return a11y.isReadable(this)},findForward(selector){a11y.log.removed('$("..").findForward has been removed as the use cases are very small, let us know if you need it back.');return a11y._findFirstForward(this,selector)},findWalk(selector){a11y.log.removed('$("..").findWalk has been removed as the use cases are very small, let us know if you need it back.');return a11y._findFindForwardDescendant(this,selector)},focusNoScroll(){a11y.log.deprecated('$("..").focusNoScroll, use a11y.focus($element); instead.');return a11y.focus(this)},focusNext(returnOnly){a11y.log.deprecated('$("..").focusNext, use a11y.focusNext($element); or if needed a11y.findFirstReadable($element); instead.');if(returnOnly){return a11y.findFirstReadable(this)}return a11y.focusNext(this)},focusOrNext(returnOnly){a11y.log.deprecated('$("..").focusOrNext, use a11y.focusFirst($element); or if needed a11y.findFirstReadable($element); or a11y.isReadable($element); instead.');if(returnOnly){if(a11y.isReadable(this))return this;return a11y.findFirstReadable(this)}return a11y.focusFirst(this)},a11y_focus(dontDefer){a11y.log.deprecated('$("..").a11y_focus, use a11y.focusFirst($element, { defer: true }); instead.');a11y.focusFirst(this,{defer:!dontDefer});return this}});Object.assign($,{a11y_alert(){a11y.log.removed("$.a11y_alert is removed. Please use aria-live instead.");return this},a11y_update(){a11y.log.removed("a11y_update is no longer required.");return this},a11y_text(text){a11y.log.removed("a11y_text is no longer required. https://tink.uk/understanding-screen-reader-interaction-modes/");return text},a11y_on(isOn,selector){a11y.log.deprecated('$("..").a11y_on, use a11y.toggleHidden($elements, isHidden); instead.');return a11y.toggleHidden(selector,!isOn)},a11y_popdown($focusTarget){a11y.log.removed("$.a11y_popdown, use a11y.popupClosed($focusTarget); instead.");return a11y.popupClosed($focusTarget)},a11y_focus(dontDefer){a11y.log.deprecated('$.a11y_focus, use a11y.focusFirst("body", { defer: true }); instead.');a11y.focusFirst("body",{defer:!dontDefer});return this},a11y_normalize(html){a11y.log.deprecated('$.a11y_normalize, use a11y.normalize("html"); instead.');return a11y.normalize(html)},a11y_remove_breaks(html){a11y.log.deprecated('$.a11y_remove_breaks, use a11y.removeBreaks("html"); instead.');return a11y.removeBreaks(html)}})}));class Components extends Backbone__default["default"].Controller{initialize(){this._register={};this.register=this.register.bind(this);this.getViewName=this.getViewName.bind(this);this.getViewClass=this.getViewClass.bind(this);this.getModelName=this.getModelName.bind(this);this.getModelClass=this.getModelClass.bind(this)}register(name,object){if(Array.isArray(name)){name.forEach((name=>this.register(name,object)));return object}if(name.split(" ").length>1){this.register(name.split(" "),object);return object}if(!object.view&&!object.model||object instanceof Backbone__default["default"].View){logging$1.deprecated("View-only registrations are no longer supported");object={view:object}}if(object.view&&!object.view.template){object.view.template=name}const isModelSetAndInvalid=object.model&&!(object.model.prototype instanceof Backbone__default["default"].Model)&&!(object.model instanceof Function);if(isModelSetAndInvalid){throw new Error("The registered model is not a Backbone.Model or Function")}const isViewSetAndInvalid=object.view&&!(object.view.prototype instanceof Backbone__default["default"].View)&&!(object.view instanceof Function);if(isViewSetAndInvalid){throw new Error("The registered view is not a Backbone.View or Function")}this._register[name]=Object.assign({},this._register[name],object);return object}getViewName(nameModelViewOrData){if(typeof nameModelViewOrData==="string"){return nameModelViewOrData}if(nameModelViewOrData instanceof Backbone__default["default"].Model){nameModelViewOrData=nameModelViewOrData.toJSON()}if(nameModelViewOrData instanceof Backbone__default["default"].View){let foundName;Object.entries(this._register).forEach((_ref=>{let[key,entry]=_ref;if(!entry?.view)return;if(!(nameModelViewOrData instanceof entry.view))return;foundName=key;return true}));return foundName}if(nameModelViewOrData instanceof Object){const names=[typeof nameModelViewOrData._view==="string"&&nameModelViewOrData._view,typeof nameModelViewOrData._component==="string"&&nameModelViewOrData._component,typeof nameModelViewOrData._type==="string"&&nameModelViewOrData._type].filter(Boolean);if(names.length){const name=names.find((name=>this._register[name]?.view));return name||names.pop()}}throw new Error("Cannot derive view class name from input")}getViewClass(nameModelViewOrData){const name=this.getViewName(nameModelViewOrData);const object=this._register[name];if(!object){logging$1.error(`A view for '${name}' isn't registered in your project`);return}const isBackboneView=object.view?.prototype instanceof Backbone__default["default"].View;if(!isBackboneView&&object.view instanceof Function){return object.view()}return object.view}getModelName(nameModelOrData){if(typeof nameModelOrData==="string"){return nameModelOrData}if(nameModelOrData instanceof Backbone__default["default"].Model){nameModelOrData=nameModelOrData.toJSON()}if(nameModelOrData instanceof Object){const name=nameModelOrData._component;const entry=this._register[name];const isViewOnlyQuestion=entry&&!entry.model&&entry.view?._isQuestionType;if(isViewOnlyQuestion){logging$1.deprecated(`Assuming a question model for a view-only question: ${name}`);return"question"}const names=[typeof nameModelOrData._model==="string"&&nameModelOrData._model,typeof nameModelOrData._component==="string"&&nameModelOrData._component,typeof nameModelOrData._type==="string"&&nameModelOrData._type].filter(Boolean);if(names.length){const name=names.find((name=>this._register[name]?.model));return name||names.pop()}}throw new Error("Cannot derive model class name from input")}getModelClass(nameModelOrData){const name=this.getModelName(nameModelOrData);const object=this._register[name];if(!object){logging$1.error(`A model for '${name}' isn't registered in your project`);return}const isBackboneModel=object.model?.prototype instanceof Backbone__default["default"].Model;if(!isBackboneModel&&object.model instanceof Function){return object.model()}return object.model}}const components=new Components;var components$1=__AMD("core/js/components",components);var AdaptCollection=__AMD("core/js/collections/adaptCollection",class AdaptCollection extends Backbone.Collection{initialize(models,options){this.once("reset",this.loadedData,this)}loadedData(){Adapt$1.trigger("adaptCollection:dataLoaded")}});var BuildModel=__AMD("core/js/models/buildModel",class BuildModel extends LockingModel{defaults(){return{jsonext:"json"}}initialize(attrs,options){this.url=options.url;this.fetch({success:()=>{this.isLoaded=true;Adapt$1.trigger("buildModel:dataLoaded")},error:()=>{console.log("Unable to load adapt/js/build.js");Adapt$1.trigger("buildModel:dataLoaded")}})}isFrameworkVersion(version){return semver__default["default"].satisfies(this.get("package").version,version,{includePrerelease:true})}isPluginInstalled(name){let version=arguments.length>1&&arguments[1]!==undefined?arguments[1]:"*";const plugin=this.get("plugins").find((plugin=>{if(plugin.name!==name)return false;return semver__default["default"].satisfies(plugin.version,version,{includePrerelease:true})}));return Boolean(plugin)}whenReady(){if(this.isLoaded)return Promise.resolve();return new Promise((resolve=>{Adapt$1.once("buildModel:dataLoaded",resolve)}))}});var ConfigModel=__AMD("core/js/models/configModel",class ConfigModel extends LockingModel{defaults(){return{screenSize:null,_forceRouteLocking:false,_canLoadData:true,_disableAnimation:false}}setValuesFromURLParams(){const paramMappings={dir:"_defaultDirection",lang:"_defaultLanguage"};const params=new URLSearchParams(window.location.search);Object.entries(paramMappings).forEach((_ref=>{let[key,value]=_ref;const passedVal=params.get(key);if(!passedVal)return;if(key==="lang"&&Adapt$1.build.get("availableLanguageNames")?.includes(passedVal)===false)return;this.set(value,passedVal)}))}initialize(attrs,options){this.url=options.url;this.fetch({success:()=>{this.setValuesFromURLParams();Adapt$1.trigger("offlineStorage:prepare");wait$1.queue((()=>{Adapt$1.trigger("configModel:dataLoaded");if(!this.get("_canLoadData"))return;Adapt$1.trigger("configModel:loadCourseData")}))},error:()=>logging$1.error("Unable to load course/config.json")})}loadData(){}});class Data extends AdaptCollection{model(json){const ModelClass=components$1.getModelClass(json);if(!ModelClass){return new LockingModel(json)}return new ModelClass(json,{parse:true})}initialize(){super.initialize();this.findById=this.findById.bind(this);this.findViewByModelId=this.findViewByModelId.bind(this);this.findByTrackingPosition=this.findByTrackingPosition.bind(this);this.on({add:this.onAdded,remove:this.onRemoved})}async init(){this.reset();this._byAdaptID={};Adapt$1.build=new BuildModel(null,{url:"adapt/js/build.min.js",reset:true});await Adapt$1.build.whenReady();$("html").attr("data-adapt-framework-version",Adapt$1.build.get("package").version);this.loadConfigData()}onAdded(model){this._byAdaptID[model.get("_id")]=model}onRemoved(model){delete this._byAdaptID[model.get("_id")]}loadConfigData(){Adapt$1.config=new ConfigModel(null,{url:Adapt$1.build.get("coursedir")+"/config."+Adapt$1.build.get("jsonext"),reset:true});this.listenToOnce(Adapt$1,"configModel:loadCourseData",this.onLoadCourseData);this.listenTo(Adapt$1.config,{"change:_activeLanguage":this.onLanguageChange,"change:_defaultDirection":this.onDirectionChange})}onDirectionChange(model,direction){if(direction==="rtl"){$("html").removeClass("dir-ltr").addClass("dir-rtl").attr("dir","rtl")}else{$("html").removeClass("dir-rtl").addClass("dir-ltr").attr("dir","ltr")}}onLoadCourseData(){if(!Adapt$1.config.get("_activeLanguage")){Adapt$1.config.set("_activeLanguage",Adapt$1.config.get("_defaultLanguage"));return}this.loadCourseData()}async onLanguageChange(model,language){await wait$1.queue();const previousAttributes=model.previousAttributes();const previousLanguage=previousAttributes._activeLanguage;offlineStorage$1.set("lang",language);if(Adapt$1.get("_isStarted")){Adapt$1.set("_isStarted",false)}this.loadCourseData(language,previousLanguage)}async loadCourseData(newLanguage,previousLanguage){const language=Adapt$1.config.get("_activeLanguage");const courseFolder=Adapt$1.build.get("coursedir")+"/"+language+"/";$("html").attr("lang",language);await this.loadManifestFiles(courseFolder);await this.triggerDataLoaded();await this.triggerDataReady(newLanguage,previousLanguage);this.triggerInit()}getJSON(path){return new Promise(((resolve,reject)=>{$.getJSON(path,(data=>{data.__path__=path;resolve(data)})).fail((()=>{reject(new Error(`Unable to load ${path}`))}))}))}async loadManifestFiles(languagePath){this.trigger("loading");this.reset();this._byAdaptID={};const manifestPath=languagePath+"language_data_manifest.js";let manifest;try{manifest=await this.getJSON(manifestPath)}catch(err){manifest=["course.json","contentObjects.json","articles.json","blocks.json","components.json"];logging$1.error(`Manifest path '${manifestPath} not found. Using traditional files: ${manifest.join(", ")}`)}let allFileData;try{allFileData=await Promise.all(manifest.map((filePath=>this.getJSON(`${languagePath}${filePath}`))))}catch(error){logging$1.error(error);return}const allModelData=allFileData.reduce(((result,fileData)=>{if(Array.isArray(fileData)){fileData.forEach(((datum,index)=>{datum.__path__=fileData.__path__;datum.__index__=index}));result.push(...fileData)}else if(fileData instanceof Object){result.push(fileData)}else{logging$1.warnOnce(`File data isn't an array or object: ${fileData.__path__}`)}return result}),[]);const course=allModelData.find((modelData=>modelData._type==="course"));if(!course){throw new Error('Expected a model data with "_type": "course", none found.')}Adapt$1.trigger("courseModel:dataLoading");Adapt$1.course=this.push(course);Adapt$1.trigger("courseModel:dataLoaded");allModelData.forEach((modelData=>{if(modelData._type==="course"){return}try{components$1.getModelName(modelData)}catch(error){logging$1.error(`Failed to load object ${modelData.__path__}${Object.hasOwn(modelData,"__index__")?`[${modelData.__index__}]`:""}`);logging$1.error(error);return}this.push(modelData)}));this.checkData();this.trigger("reset");this.trigger("loaded");await wait$1.queue()}async triggerDataLoaded(){logging$1.debug("Firing app:dataLoaded");try{this.forEach((model=>model.setupModel?.()));Adapt$1.trigger("app:dataLoaded")}catch(e){logging$1.error("Error during app:dataLoading trigger",e)}await wait$1.queue()}async triggerDataReady(newLanguage,previousLanguage){if(newLanguage){Adapt$1.trigger("app:languageChanged",newLanguage,previousLanguage);await wait$1.queue()}logging$1.debug("Firing app:dataReady");try{Adapt$1.trigger("app:dataReady")}catch(e){logging$1.error("Error during app:dataReady trigger",e)}await wait$1.queue()}triggerInit(){this.isReady=true;this.trigger("ready")}whenReady(){if(this.isReady)return Promise.resolve();return new Promise((resolve=>{this.once("ready",resolve)}))}hasId(id){return Boolean(this._byAdaptID[id])}findById(id){const model=this._byAdaptID[id];if(!model){logging$1.warn(`data.findById() unable to find id: ${id}`);return}return model}findViewByModelId(id){const model=this.findById(id);if(!model||!Adapt$1.parentView)return;const idPathToView=[id];const currentLocationId=location$1._currentId;const currentLocationModel=model.getAncestorModels().find((model=>{const modelId=model.get("_id");if(modelId===currentLocationId)return true;idPathToView.unshift(modelId);return false}));if(!currentLocationModel){return logging$1.warn(`data.findViewByModelId() unable to find view for model id: ${id}`)}const foundView=idPathToView.reduce(((view,currentId)=>{if(!view)return null;const childViews=view.getChildViews();return childViews?.find((view=>view.model.get("_id")===currentId))}),Adapt$1.parentView);return foundView}findByTrackingPosition(trackingPosition){const[trackingId,indexInTrackingIdDescendants]=trackingPosition;const trackingIdModel=this.find((model=>model.get("_trackingId")===trackingId));if(!trackingIdModel){logging$1.warn(`data.findByTrackingPosition() unable to find trackingPosition: ${trackingPosition}`);return}if(indexInTrackingIdDescendants>=0){let trackingIdDescendants=[trackingIdModel].concat(trackingIdModel.getAllDescendantModels(true));trackingIdDescendants=trackingIdDescendants.filter((model=>!(model.isTypeGroup("component")&&model.get("_isTrackable")===false)));return trackingIdDescendants[indexInTrackingIdDescendants]}const trackingIdAncestors=trackingIdModel.getAncestorModels();const ancestorDistance=Math.abs(indexInTrackingIdDescendants)-1;return trackingIdAncestors[ancestorDistance]}logReadyError(view){const notReadyDescendants=view.model.getAllDescendantModels(true).filter((model=>!model.get("_isReady")));logging$1.error(`View ${notReadyDescendants.map((model=>`${model.get("_id")} (${model.get("_component")??model.get("_type")})`)).join(", ")} failed to become ready, forcing ready status.`);notReadyDescendants.reverse().forEach((model=>model.set("_isReady",true)))}checkData(){this.checkIds();this.checkTrackingIds()}checkIds(){const items=this.toJSON();const idIndex=___default["default"].indexBy(items,"_id");const idGroups=___default["default"].groupBy(items,"_id");const parentIdGroups=___default["default"].groupBy(items,"_parentId");let orphanedIds={};let emptyIds={};let duplicateIds={};let missingIds={};items.forEach((o=>{const isCourseType=o._type==="course";const isComponentType=o._type==="component";if(idGroups[o._id].length>1){duplicateIds[o._id]=true}if(!isComponentType&&!parentIdGroups[o._id]){emptyIds[o._id]=true}if(!isCourseType&&(!o._parentId||!idIndex[o._parentId])){orphanedIds[o._id]=true}if(!isCourseType&&o._parentId&&!idIndex[o._parentId]){missingIds[o._parentId]=true}}));orphanedIds=Object.keys(orphanedIds);emptyIds=Object.keys(emptyIds);duplicateIds=Object.keys(duplicateIds);missingIds=Object.keys(missingIds);const hasErrored=orphanedIds.length||emptyIds.length||duplicateIds.length||missingIds.length;if(orphanedIds.length){logging$1.error(`Orphaned _ids: ${orphanedIds.join(", ")}`)}if(missingIds.length){logging$1.error(`Missing _ids: ${missingIds.join(", ")}`)}if(emptyIds.length){logging$1.error(`Empty _ids: ${emptyIds.join(", ")}`)}if(duplicateIds.length){logging$1.error(`Duplicate _ids: ${duplicateIds.join(", ")}`)}if(hasErrored){const err=new Error("Oops, looks like you have some json errors.");err.number=10011;throw err}}checkTrackingIds(){const items=this.toJSON();const trackingIdType=Adapt$1.build.get("trackingIdType")||"block";const trackingIdCounts=___default["default"].groupBy(items.filter((item=>item._type===trackingIdType)),"_trackingId");const missingTrackingIds=items.filter((item=>item._type===trackingIdType&&item._trackingId===undefined)).map((item=>item._id));if(missingTrackingIds.length){logging$1.error(`Missing _trackingIds: ${missingTrackingIds.join(", ")}`)}const duplicateTrackingIds=Object.entries(trackingIdCounts).filter((_ref=>{let[id,group]=_ref;return group.length>1})).map((_ref2=>{let[id,group]=_ref2;return`${id}:[${group.map((item=>item._id)).join(", ")}]`}));if(duplicateTrackingIds.length){logging$1.error(`Duplicate _trackingIds: ${duplicateTrackingIds.join(", ")}`)}const hasErrored=missingTrackingIds.length||duplicateTrackingIds.length;if(hasErrored){const err=new Error("Oops, looks like you have some json errors with trackingIds.");err.number=10011;throw err}}}const data=new Data;var data$1=__AMD("core/js/data",data);class A11y extends Backbone.Controller{defaults(){return{_isPrefersReducedMotionEnabled:true,_isFocusOutlineKeyboardOnlyEnabled:true,_isFocusOutlineDisabled:false,_isFocusAssignmentEnabled:true,_isFocusOnClickEnabled:true,_isClickDelayedAfterFocusEnabled:false,_isFocusNextOnDisabled:true,_isScrollDisableEnabled:true,_isAriaHiddenManagementEnabled:true,_isPopupManagementEnabled:true,_isPopupWrapFocusEnabled:true,_isPopupAriaHiddenManagementEnabled:true,_isPopupTabIndexManagementEnabled:true,_ariaHiddenExcludes:":not(#wrapper):not(body)",_tabbableElements:"a,button,input,select,textarea,[tabindex]:not([data-a11y-force-focus])",_focusOutlineKeyboardOnlyIgnore:"input,textarea",_tabbableElementsExcludes:":not(.a11y-ignore):not([data-a11y-force-focus])",_focusableElements:"a,button,input,select,textarea,[tabindex],label",_readableElements:"[role=heading],[aria-label],[aria-labelledby],[alt]",_focusForwardElementsExcludes:":not([aria-labelledby][role=dialog],[aria-labelledby][role=main],[aria-labelledby][role=region],[aria-labelledby][role=radiogroup],[aria-labelledby][role=group],[aria-labelledby][role=tablist],[aria-labelledby][role=list],[aria-labelledby][role=tree],[aria-labelledby][role=treegrid],[aria-labelledby][role=table],[aria-labelledby][role=grid][aria-labelledby],[role=menu],[aria-labelledby][role=rowgroup])",_focusguard:".a11y-focusguard",_wrapStyleElements:"b,i,abbr,strong,em,small,sub,sup,ins,del,mark,zw,nb",_arrowElements:"input[type=radio]",_warnFirstOnly:true,_warn:true}}initialize(){this.isFocusable=this.isFocusable.bind(this);this.isReadable=this.isReadable.bind(this);this.isTabbable=this.isTabbable.bind(this);this.$html=$("html");this._htmlCharRegex=/&.*;/g;this.config=null;this._browserConfig=new BrowserConfig({a11y:this});this._browserFocus=new BrowserFocus({a11y:this});this._keyboardFocusOutline=new KeyboardFocusOutline({a11y:this});this._wrapFocus=new WrapFocus({a11y:this});this._popup=new Popup({a11y:this});this._scroll=new Scroll({a11y:this});this._isForcedFocus=false;this.log=new Log({a11y:this});deprecated(this);this._removeLegacyElements();this.listenToOnce(Adapt$1,{"configModel:dataLoaded":this._onConfigDataLoaded,"navigationView:postRender":this._removeLegacyElements},this);Adapt$1.on("device:changed",this._setupNoSelect);this.listenTo(Adapt$1,{"router:location":this._onNavigationStart,"contentObjectView:ready router:plugin":this._onNavigationEnd})}_onConfigDataLoaded(){this.config=Adapt$1.config.get("_accessibility");this.config._isActive=false;this.config._options=_.defaults(this.config._options||{},this.defaults());offlineStorage$1.set("a11y",false);this.$html.toggleClass("has-accessibility",this.isEnabled());this._setupNoSelect();this._addFocuserDiv();if(this._isReady){return}this._isReady=true;Adapt$1.trigger("accessibility:ready")}_setupNoSelect(){if(!this.config?._disableTextSelectOnClasses){return}const classes=this.config._disableTextSelectOnClasses.split(" ");const isMatch=classes.some((className=>this.$html.is(className)));this.$html.toggleClass("u-no-select",isMatch)}_addFocuserDiv(){if($("#a11y-focuser").length){return}$("body").append($('
 
'))}_removeLegacyElements(){const $legacyElements=$("body").children("#accessibility-toggle, #accessibility-instructions");const $navigationElements=$(".nav").find("#accessibility-toggle, #accessibility-instructions");if(!$legacyElements.length&&!$navigationElements.length){return}logging$1.warn("REMOVED: #accessibility-toggle and #accessibility-instructions have been removed. Please remove them from all of your .html files.");$legacyElements.remove();$navigationElements.remove()}_onNavigationStart(){if(!this.isEnabled()){return}_.defer((()=>this.toggleHidden(".contentobject",true)))}_onNavigationEnd(view){if(view?.model?.get("_id")!==location$1._currentId||!this.isEnabled()){return}this.toggleHidden(".contentobject",false)}isActive(){this.log.removed("Accessibility is now always active when enabled. Please unify your user experiences.");return false}isEnabled(){return this.config?._isEnabled}ariaLevel(){let{id:id=null,level:level="1",override:override=null}=arguments.length>0&&arguments[0]!==undefined?arguments[0]:{};if(arguments.length===2){level=arguments[0];override=arguments[1];id=null}const ariaLevels=Adapt$1.config.get("_accessibility")?._ariaLevels??defaultAriaLevels;if(override===0)override=null;function calculateLevel(){let id=arguments.length>0&&arguments[0]!==undefined?arguments[0]:null;let level=arguments.length>1?arguments[1]:undefined;let offset=arguments.length>2&&arguments[2]!==undefined?arguments[2]:0;const isNumber=!isNaN(level);const isTypeName=/[a-zA-z]/.test(level);if(!isTypeName&&isNumber){return parseInt(level)+offset}const relativeDescriptor=Adapt$1.parseRelativeString(level);const nextLevel=ariaLevels?.["_"+relativeDescriptor.type];const hasModelId=Boolean(id);if(!hasModelId){logging$1.warnOnce("Cannot calculate appropriate heading level, no model id was specified");return calculateLevel(id,nextLevel,offset+relativeDescriptor.offset)}const nextModel=data$1.findById(id)?.findAncestor(relativeDescriptor.type?.toLowerCase())??data$1.findById(id);const nextModelId=nextModel?.get("_id")??id;const hasNextTitle=Boolean(nextModel.get("displayTitle"));let nextModelOverride=nextModel.get("_ariaLevel");if(nextModelOverride===0)nextModelOverride=null;const accumulatedOffset=offset+(hasNextTitle?relativeDescriptor.offset:0);const resolvedLevel=nextModelOverride??nextLevel;return calculateLevel(nextModelId,resolvedLevel,accumulatedOffset)}return calculateLevel(id,override??level)}toggleHidden($elements){let isHidden=arguments.length>1&&arguments[1]!==undefined?arguments[1]:true;$elements=$($elements);const config=this.config;if(!config._isEnabled||!config._options._isAriaHiddenManagementEnabled){return this}if(isHidden===true){$elements.attr("aria-hidden",true)}else{$elements.removeAttr("aria-hidden")}return this}toggleAccessibleEnabled($elements,isAccessibleEnabled){this.toggleAccessible($elements,isAccessibleEnabled);this.toggleEnabled($elements,isAccessibleEnabled);return this}toggleAccessible($elements){let isReadable=arguments.length>1&&arguments[1]!==undefined?arguments[1]:true;$elements=$($elements);const config=this.config;if(!config._isEnabled||!config._options._isAriaHiddenManagementEnabled||$elements.length===0){return this}if(!isReadable){$elements.attr({tabindex:"-1","aria-hidden":"true"}).addClass("aria-hidden")}else{$elements.removeAttr("aria-hidden tabindex").removeClass("aria-hidden");$elements.parents(config._options._ariaHiddenExcludes).removeAttr("aria-hidden").removeClass("aria-hidden")}return this}toggleEnabled($elements){let isEnabled=arguments.length>1&&arguments[1]!==undefined?arguments[1]:true;$elements=$($elements);if($elements.length===0){return this}if(!isEnabled){$elements.attr({"aria-disabled":"true"}).addClass("is-disabled")}else{$elements.removeAttr("aria-disabled").removeClass("is-disabled")}return this}toggleTabbableDescendants($element){let isTabbable=arguments.length>1&&arguments[1]!==undefined?arguments[1]:true;const $tabbable=this.findTabbable($element);if(!isTabbable){$tabbable.each(((index,element)=>{if(element.isAdaptTabHidden)return;const $element=$(element);element.isAdaptTabHidden=true;element.adaptPreviousTabIndex=$element.attr("tabindex")??null;$element.attr("tabindex",-1)}));return this}$tabbable.each(((index,element)=>{if(!element.isAdaptTabHidden)return;const $element=$(element);if(element.adaptPreviousTabIndex===null)$element.removeAttr("tabindex");else $element.attr("tabindex",element.adaptPreviousTabIndex);delete element.isAdaptTabHidden;delete element.adaptPreviousTabIndex}));return this}findFirstTabbable($element){$element=$($element).first();return this._findFirstForward($element,this.isTabbable)}findFirstReadable($element){$element=$($element).first();return this._findFirstForward($element,this.isReadable)}findFirstFocusable($element){$element=$($element).first();return this._findFirstForward($element,this.isFocusable)}findTabbable($element){const config=this.config;return $($element).find(config._options._tabbableElements).filter(config._options._tabbableElementsExcludes)}findReadable($element){return $($element).find("*").filter(((index,element)=>this.isReadable(element)))}findFocusable($element){return $($element).find("*").filter(((index,element)=>this.isFocusable(element)))}isTabbable($element){const config=this.config;const value=$($element).is(config._options._tabbableElements).is(config._options._tabbableElementsExcludes);if(!value){return null}return value}isReadable($element){let checkParents=arguments.length>1&&arguments[1]!==undefined?arguments[1]:true;const config=this.config;$element=$($element).first();const $branch=checkParents?$element.add($element.parents()):$element;const isNotVisible=$branch.toArray().some((item=>{const style=window.getComputedStyle(item);return style.display==="none"||style.visibility==="hidden"||item.getAttribute("aria-hidden")==="true"}));if(isNotVisible){return false}const hasReadableContent=!/^\s*$/.test($element.text())||!/^\s*$/.test($element.attr("aria-label")??"")||!/^\s*$/.test($element.attr("aria-labelledby")??"");const hasNativeFocusOrIsScreenReadable=($element.is(config._options._focusableElements)||$element.is(config._options._readableElements))&&hasReadableContent;if(hasNativeFocusOrIsScreenReadable){return true}const childNodes=$element[0].childNodes;for(let c=0,cl=childNodes.length;c1&&arguments[1]!==undefined?arguments[1]:true;const config=this.config;$element=$($element).first();if(!$element.is(config._options._focusForwardElementsExcludes))return null;return this.isReadable($element,checkParents)}isArrowable($element){const config=this.config;$element=$($element).first();return $element.is(config._options._arrowElements)}_findFirstForward($element,selector){$element=$($element).first();let iterator;switch(typeof selector){case"string":iterator=function($tag){return $tag.is(selector)||undefined};break;case"function":iterator=selector;break;case"undefined":iterator=Boolean}if($element.length===0){return $element.not("*")}let $found=this._findFirstForwardDescendant($element,iterator);if($found.length){return $found}$element.nextAll().toArray().some((sibling=>{const $sibling=$(sibling);const value=iterator($sibling);if(value===false){return false}if(value){$found=$sibling;return true}$found=this._findFirstForwardDescendant($sibling,iterator);return Boolean($found.length)}));if($found.length){return $found}$element.add($element.parents()).toArray().reverse().some((parent=>{const $parent=$(parent);if(iterator($parent)===false){return false}return $parent.nextAll().toArray().some((sibling=>{const $sibling=$(sibling);const value=iterator($sibling);if(value===false){return false}if(value){$found=$sibling;return true}$found=this._findFirstForwardDescendant($sibling,iterator);return Boolean($found.length)}))}));if(!$found.length){return $element.not("*")}return $found}_findFirstForwardDescendant($element,selector){$element=$($element).first();let iterator;switch(typeof selector){case"string":iterator=function($tag){return $tag.is(selector)||undefined};break;case"function":iterator=selector;break;case"undefined":iterator=Boolean}const $notFound=$element.not("*");if($element.length===0){return $notFound}const stack=[{item:$element[0],value:undefined}];let stackIndexPosition=0;let childIndexPosition=stackIndexPosition+1;do{const stackEntry=stack[stackIndexPosition];const $stackItem=$(stackEntry.item);switch(stackEntry.value){case true:return $stackItem;case false:return $notFound}$stackItem.children().toArray().forEach((item=>{const $item=$(item);const value=iterator($item);if(value===false){return}stack.splice(childIndexPosition++,0,{item:item,value:value})}));stackIndexPosition++;childIndexPosition=stackIndexPosition+1}while(stackIndexPosition{if($element.attr("tabindex")===undefined){$element.attr({tabindex:"0","data-a11y-force-focus":"true"})}if(options.preventScroll){const y=$(window).scrollTop();try{this._isForcedFocus=true;$element[0].focus({preventScroll:true});this._isForcedFocus=false}catch(e){}switch(device$1.browser){case"internet explorer":case"microsoft edge":case"safari":window.scrollTo(null,y)}}else{this._isForcedFocus=true;$element[0].focus();this._isForcedFocus=false}};if(options.defer){_.defer(perform)}else{perform()}return this}get isForcedFocus(){return this._isForcedFocus}normalize(htmls){htmls=[...arguments].filter(Boolean).filter(_.isString).join(" ");const text=$("
"+htmls+"
").text();return text.replace(this._htmlCharRegex,"")}removeBreaks(htmls){htmls=[...arguments].filter(Boolean).filter(_.isString).join(" ");const $div=$("
"+htmls+"
");const stack=[$div[0]];let stackIndex=0;const outputs=[];do{if(stack[stackIndex].childNodes.length){const nodes=stack[stackIndex].childNodes;const usable=nodes.filter((node=>{const isTextNode=node.nodeType===3;if(isTextNode){return true}const isStyleElement=$(node).is(this.config._options._wrapStyleElements);if(isStyleElement){return true}return false}));outputs.push.apply(outputs,usable);stack.push.apply(stack,nodes)}stackIndex++}while(stackIndex1&&arguments[1]!==undefined?arguments[1]:true;let position=arguments.length>2?arguments[2]:undefined;this.$(".js-drawer-holder").removeAttr("role");this._hasBackButton=hasBackButton;this._isCustomViewVisible=true;this._customView=view;Adapt$1.trigger("drawer:empty");this.showDrawer(null,position);this.$(".drawer__holder").html(view instanceof Backbone__default["default"].View?view.$el:view)}checkIfDrawerIsAvailable(){const isEmptyDrawer=this.collection.length===0;$(".js-nav-drawer-btn").toggleClass("u-display-none",isEmptyDrawer);if(isEmptyDrawer){Adapt$1.trigger("drawer:noItems")}}onBackButtonClicked(event){event.preventDefault();this.showDrawer(true)}onCloseClicked(event){event.preventDefault();this.hideDrawer()}get isOpen(){return this._isVisible&&this._isCustomViewVisible===false}showDrawer(emptyDrawer){let position=arguments.length>1&&arguments[1]!==undefined?arguments[1]:null;this.setDrawerPosition(position);this.$el.removeClass("u-display-none").attr("aria-hidden","false").attr("aria-expanded","true");if(!this._isVisible){a11y$1.popupOpened(this.$el);a11y$1.scrollDisable("body");this._isVisible=true}this.$("a, button, input, select, textarea").attr("tabindex",0);if(emptyDrawer){this.$(".drawer__back").addClass("u-display-none");this._isCustomViewVisible=false;this.emptyDrawer();if(this.collection.models.length===1){Adapt$1.trigger(this.collection.models[0].get("eventCallback"));this._isCustomViewVisible=false}else{this._useMenuPosition=true;this.renderItems();Adapt$1.trigger("drawer:openedItemView")}}else{const hideDrawerBackButton=!this._hasBackButton||this.collection.models.length<=1;this.$(".drawer__back").toggleClass("u-display-none",hideDrawerBackButton);Adapt$1.trigger("drawer:openedCustomView")}$(".js-shadow").removeClass("u-display-none");$(".js-drawer-holder").scrollTop(0);const direction={};direction[this.drawerAnimationDir]=0;const complete=()=>{this.addShadowEvent();$(".js-nav-drawer-btn").attr("aria-expanded",true);Adapt$1.trigger("drawer:opened");a11y$1.focusFirst(this.$el,{defer:true})};if(this.disableAnimation){this.$el.css(direction);complete()}else{const easing=Adapt$1.config.get("_drawer")?._showEasing||"easeOutQuart";this.$el.velocity(direction,this.drawerDuration,easing);$(".js-shadow").velocity({opacity:1},{duration:this.drawerDuration,begin:()=>{complete()}})}}emptyDrawer(){this.$(".drawer__holder").empty()}renderItems(){Adapt$1.trigger("drawer:empty");this.emptyDrawer();const isList=this.collection.length>1;if(isList)this.$(".js-drawer-holder").attr("role","list");else this.$(".js-drawer-holder").removeAttr("role");this.collection.forEach((model=>new DrawerItemView$1({model:model})))}hideDrawer($toElement){if(!this._isVisible)return;this._useMenuPosition=false;const direction={};a11y$1.popupClosed($toElement);this._isVisible=false;a11y$1.scrollEnable("body");direction[this.drawerAnimationDir]=-this.$el.width();const complete=()=>{this.$el.removeAttr("style").addClass("u-display-none").attr("aria-hidden","true").attr("aria-expanded","false");this.$(".js-drawer-holder").removeAttr("role");this._customView=null;$(".js-nav-drawer-btn").attr("aria-expanded",false);Adapt$1.trigger("drawer:closed");this.setDrawerPosition(this._globalDrawerPosition)};if(this.disableAnimation){this.$el.css(direction);$(".js-shadow").addClass("u-display-none");complete()}else{const easing=Adapt$1.config.get("_drawer")?._hideEasing||"easeInQuart";this.$el.velocity(direction,this.drawerDuration,easing,(()=>{complete()}));$(".js-shadow").velocity({opacity:0},{duration:this.drawerDuration,complete(){$(".js-shadow").addClass("u-display-none")}})}this._isCustomViewVisible=false;this.removeShadowEvent()}addShadowEvent(){$(".js-shadow").one("click touchstart",(()=>this.hideDrawer()))}removeShadowEvent(){$(".js-shadow").off("click touchstart")}remove(){this.hideDrawer();super.remove();$(window).off("keyup",this.onKeyUp);Adapt$1.trigger("drawer:empty");this.collection.reset();$(".js-shadow").remove()}}Object.assign(DrawerView,{childContainer:".js-drawer-holder",childView:DrawerItemView$1});var DrawerView$1=__AMD("core/js/views/drawerView",DrawerView);var TemplateRenderEvent=__AMD("core/js/templateRenderEvent",class TemplateRenderEvent{constructor(type,name,mode,value,args){this.type=type;this.name=name;this.mode=mode;this.value=value;this.args=args}});var register=__AMD("core/js/reactHelpers",(function register(name,component){templates[name]=function(){const mode="reactTemplate";for(var _len=arguments.length,args=new Array(_len),_key=0;_key<_len;_key++){args[_key]=arguments[_key]}const preRenderEvent=new TemplateRenderEvent(`${mode}:preRender`,name,mode,null,args);Adapt$1.trigger(preRenderEvent.type,preRenderEvent);const value=component(...preRenderEvent.args);const postRenderEvent=new TemplateRenderEvent(`${mode}:postRender`,name,mode,value,preRenderEvent.args);Adapt$1.trigger(postRenderEvent.type,postRenderEvent);return postRenderEvent.value}}));(function(){const original=React__default["default"].createElement;React__default["default"].createElement=function(){for(var _len2=arguments.length,args=new Array(_len2),_key2=0;_key2<_len2;_key2++){args[_key2]=arguments[_key2]}const name=args[0];const mode="reactElement";const preRenderEvent=new TemplateRenderEvent(`${mode}:preRender`,name,mode,null,args);Adapt$1.trigger(preRenderEvent.type,preRenderEvent);const value=original(...preRenderEvent.args);const postRenderEvent=new TemplateRenderEvent(`${mode}:postRender`,name,mode,value,preRenderEvent.args);Adapt$1.trigger(postRenderEvent.type,postRenderEvent);return postRenderEvent.value}})();const templates={};function html(html){if(!html)return;logging$1.deprecated("reactHelpers.html please use react dangerouslySetInnerHTML instead: https://reactjs.org/docs/dom-elements.html#dangerouslysetinnerhtml");return{__html:html}}function compile(template){for(var _len3=arguments.length,args=new Array(_len3>1?_len3-1:0),_key3=1;_key3<_len3;_key3++){args[_key3-1]=arguments[_key3]}const output=Handlebars.compile(template)(...args);return output}function classes(){for(var _len5=arguments.length,args=new Array(_len5),_key5=0;_key5<_len5;_key5++){args[_key5]=arguments[_key5]}return _.uniq(_.flatten(args).filter(Boolean).join(" ").split(" ")).join(" ")}function prefixClasses(prefixes){for(var _len6=arguments.length,args=new Array(_len6>1?_len6-1:0),_key6=1;_key6<_len6;_key6++){args[_key6-1]=arguments[_key6]}const classes=_.flatten(args).filter(Boolean);const prefixed=_.flatten(prefixes.map((prefix=>classes.map((className=>`${prefix}${className}`)))));return _.uniq(prefixed.join(" ").split(" ")).join(" ")}const FIRST_PASS=1;const SECOND_PASS=2;const THIRD_PASS=3;var TooltipItemView=__AMD("core/js/views/TooltipItemView",class TooltipItemView extends Backbone.View{className(){return["tooltip",this.model.get("isTargetFixedPosition")&&"is-fixed",this.model.get("tooltipClasses")||"is-vertical-axis is-arrow-middle is-bottom is-middle",this.model.get("isShown")&&"is-shown",this.model.get("_classes")].filter(Boolean).join(" ")}attributes(){return{id:`tooltip-${this.model.get("_id")}`,style:Object.entries(this.model.get("tooltipStyles")??{}).map((_ref=>{let[name,value]=_ref;return`${name}: ${value};`})).join(" ")}}updateViewProperties(){const classesToAdd=_.result(this,"className").trim().split(/\s+/);classesToAdd.forEach((i=>this._classSet.add(i)));const classesToRemove=[...this._classSet].filter((i=>!classesToAdd.includes(i)));classesToRemove.forEach((i=>this._classSet.delete(i)));this._setAttributes({..._.result(this,"attributes"),id:_.result(this,"id")});this.$el.removeClass(classesToRemove).addClass(classesToAdd)}initialize(_ref2){let{$target:$target,parent:parent}=_ref2;_.bindAll(this,"onDeviceResize","onMouseOut","doSubsequentPasses");this._classSet=new Set(_.result(this,"className").trim().split(/\s+/));this.$target=$target;this.parent=parent;this.$target.attr("aria-describedby",`tooltip-${this.model.get("_id")}`);this.model.set("ariaLabel",this.$target.attr("aria-label")||this.$target.find(".aria-label").text());this.listenTo(Adapt$1,"device:resize",this.onDeviceResize);$(document).on("mouseleave blur","[data-tooltip-id]",this.onMouseOut);this.doFirstPass();setTimeout(this.doSubsequentPasses,17)}get environment(){const navigationAlignment=Adapt$1.course.get("_navigation")?._navigationAlignment??"top";const navHeight=$(".nav").outerHeight(true);const $target=this.$target;return{position:this.model.get("_position")||"outside bottom middle right",isDisabled:$target.attr("aria-disabled")!==undefined||$target.hasClass("is-disabled")||$target.is(":disabled"),isTargetFixedPosition:Boolean(this.$target.add(this.$target.parents()).filter(((index,el)=>$(el).css("position")==="fixed")).length),isRTL:Adapt$1.config.get("_defaultDirection")==="rtl",topNavOffset:navigationAlignment==="top"?navHeight:0,bottomNavOffset:navigationAlignment==="bottom"?navHeight:0,targetDOMRect:$target[0]?.getBoundingClientRect(),clientDOMRect:{width:parseInt(getComputedStyle(document.body).width),height:$("html")[0].clientHeight},tooltipDOMRect:this.$(".tooltip__body")[0]?.getBoundingClientRect(),arrowDOMRect:this.$(".tooltip__arrow")[0]?.getBoundingClientRect(),ariaHidden:document.activeElement===this.$target[0]}}doFirstPass(){this.model.set("isShown",false);const environment=this.environment;const positions=position(environment,{},FIRST_PASS);const{isDisabled:isDisabled,isTargetFixedPosition:isTargetFixedPosition,ariaHidden:ariaHidden}=environment;this.model.set({isDisabled:isDisabled,isTargetFixedPosition:isTargetFixedPosition,ariaHidden:ariaHidden,...positions});this.render()}doSubsequentPasses(){if(!this.model)return;this.model.set("hasLoaded",true);const multipassCache={};for(let pass=SECOND_PASS,l=THIRD_PASS;pass<=l;pass++){const environment=this.environment;const positions=position(this.environment,multipassCache,pass);const{isDisabled:isDisabled,isTargetFixedPosition:isTargetFixedPosition,ariaHidden:ariaHidden}=environment;this.model.set({isDisabled:isDisabled,isTargetFixedPosition:isTargetFixedPosition,ariaHidden:ariaHidden,...positions});this.render()}this.model.set("isShown",true);this.render()}render(){if(!this.model)return;const Template=templates.tooltip;this.updateViewProperties();ReactDOM__default["default"].render(React__default["default"].createElement(Template,this.model.toJSON()),this.el)}onDeviceResize(){this.remove()}onMouseOut(){this.remove()}remove(){if(this.$el.hasClass("test"))return;this.stopListening(Adapt$1);$(document).off("mouseleave blur","[data-tooltip-id]",this.onMouseOut);this.model?.set("isShown",false);this.render();this.model=null;this.$target=null;if(this.$target)this.$target.removeAttr("aria-describedby");const rem=super.remove.bind(this);setTimeout((()=>{rem();this.parent.removeItem(this)}),1e3)}});function fetchCSSVariables(){const computed=getComputedStyle(document.documentElement);return{offset:lengthToPx("@tooltip-offset",computed.getPropertyValue("--adapt-tooltip-offset")),distance:lengthToPx("@tooltip-distance",computed.getPropertyValue("--adapt-tooltip-distance")),viewPortPadding:lengthToPx("@tooltip-viewport-padding",computed.getPropertyValue("--adapt-tooltip-viewport-padding"))}}function lengthToPx(name,length){const unit=String(length).replaceAll(/[\d.]+/g,"").trim();const value=parseFloat(length);if(unit==="rem")return value*parseInt(getComputedStyle(document.body).fontSize);if(unit==="px")return value;throw new Error(`Cannot convert ${name} ${length} to pixels`)}function parseRelativePosition(_ref3){let{position:position}=_ref3;function fixConditions(positions,item1,item2,type){positions=positions.slice(0);const indexOf1=positions.indexOf(item1);const indexOf2=positions.indexOf(item2);let has1=indexOf1!==-1;let has2=indexOf2!==-1;let assume3=false;let specifiedAtIndex=null;if(has1&&has2){const isItem1=has1{if(index<=specifiedAtIndex)return true;return item!==item1&&item!==item2}))}const hasSpecified=has1||has2;return[positions,has1,has2,assume3,hasSpecified,specifiedAtIndex]}position=position.toLowerCase().split(" ").filter(Boolean).join(" ");let positions=position.split(" ");let isArrowStart=null;let isArrowEnd=null;let isArrowMiddle=null;let isTop=null;let isCenter=null;let isBottom=null;let isLeft=null;let isMiddle=null;let isRight=null;let isOutside=null;let isInside=null;let isAreaAuto=null;let hasArrowSpecified=null;let hasVerticalSpecified=null;let verticalIndex=null;let hasHorizontalSpecified=null;let horizontalIndex=null;[positions,isOutside,isInside,isAreaAuto]=fixConditions(positions,"outside","inside","area");if(isAreaAuto)positions.unshift("area");[positions,isArrowStart,isArrowEnd,isArrowMiddle,hasArrowSpecified]=fixConditions(positions,"start","end","arrow");[positions,isTop,isBottom,isCenter,hasVerticalSpecified,verticalIndex]=fixConditions(positions,"top","bottom","vertical");[positions,isLeft,isRight,isMiddle,hasHorizontalSpecified,horizontalIndex]=fixConditions(positions,"left","right","horizontal");if(positions.length>4){positions.length=4}if(positions.length<4){const start=positions.length;positions.length=4;positions.fill("auto",start)}let specifiedCount=[hasArrowSpecified,hasHorizontalSpecified,hasVerticalSpecified].reduce(((sum,bool)=>sum+(bool?1:0)),0);let wasVerticalFilled=false;let wasHorizontalFilled=false;let wasArrowFilled=false;while(true){let isAuto=false;const indexOfMiddle=positions.indexOf("middle");const indexOfAuto=positions.indexOf("auto");const hasMiddleSpecified=indexOfMiddle!==-1;const hasAutoSpecified=indexOfAuto!==-1;let indexOf;let hasValue=false;if(hasMiddleSpecified&&hasAutoSpecified){isAuto=indexOfAuto0&&arguments[0]!==undefined?arguments[0]:{};let multipassCache=arguments.length>1?arguments[1]:undefined;let pass=arguments.length>2?arguments[2]:undefined;const{offset:offset,distance:distance,viewPortPadding:viewPortPadding}=fetchCSSVariables();const targetDistRect=convertToDistanceRect(targetDOMRect,clientDOMRect);const constrainedClientDistRect={width:clientDOMRect.width-viewPortPadding*2,height:clientDOMRect.height-viewPortPadding*2-(isTargetFixedPosition?0:topNavOffset+bottomNavOffset)};let{isOutside:isOutside,isInside:isInside,isVerticalAxis:isVerticalAxis,isHorizontalAxis:isHorizontalAxis,isLeft:isLeft,isMiddle:isMiddle,isRight:isRight,isFillWidth:isFillWidth=false,isTop:isTop,isCenter:isCenter,isBottom:isBottom,isFillHeight:isFillHeight=false,isArrowStart:isArrowStart,isArrowMiddle:isArrowMiddle,isArrowEnd:isArrowEnd}=parseRelativePosition({position:position});if(pass>=THIRD_PASS){({isOutside:isOutside,isInside:isInside,isVerticalAxis:isVerticalAxis,isHorizontalAxis:isHorizontalAxis,isLeft:isLeft,isMiddle:isMiddle,isRight:isRight,isFillWidth:isFillWidth=false,isTop:isTop,isCenter:isCenter,isBottom:isBottom,isFillHeight:isFillHeight=false}=multipassCache)}let isSnapTop=false;let isSnapLeft=false;let isSnapBottom=false;let isSnapRight=false;let isArrowSnap=false;const tooltipStyles={};if(pass>=SECOND_PASS){const tooltipDistRect=convertToDistanceRect(tooltipDOMRect,clientDOMRect);const arrowDistRect=convertToDistanceRect(arrowDOMRect,clientDOMRect);const constrainedTargetDistRect=constrainDimensions(targetDistRect,viewPortPadding,isTargetFixedPosition,topNavOffset,bottomNavOffset);const constrainedTooltipDistRect=constrainDimensions(tooltipDistRect,viewPortPadding,isTargetFixedPosition,topNavOffset,bottomNavOffset);const constrainedArrowDistRect=constrainDimensions(arrowDistRect,viewPortPadding,isTargetFixedPosition,topNavOffset,bottomNavOffset);const overallHeight=isOutside&&isVerticalAxis?constrainedTooltipDistRect.height+constrainedArrowDistRect.height+distance:constrainedTooltipDistRect.height;const overallWidth=isOutside&&isHorizontalAxis?constrainedTooltipDistRect.width+constrainedArrowDistRect.width+distance:constrainedTooltipDistRect.width;const isOverflowTop=constrainedTooltipDistRect.top<0;const isOverflowBottom=constrainedTooltipDistRect.bottom<0;const isOverflowLeft=constrainedTooltipDistRect.left<0;const isOverflowRight=constrainedTooltipDistRect.right<0;const isOverflowHorizontal=isOverflowLeft||isOverflowRight;const isOverflowVertical=isOverflowTop||isOverflowBottom;const isOverflow=isOverflowHorizontal||isOverflowVertical;const tooltipArea=overallHeight*overallWidth;const topArea=constrainedTargetDistRect.top*constrainedClientDistRect.width;const bottomArea=constrainedTargetDistRect.bottom*constrainedClientDistRect.width;const leftArea=constrainedTargetDistRect.left*constrainedClientDistRect.height;const rightArea=constrainedTargetDistRect.right*constrainedClientDistRect.height;const maxHorizontalArea=Math.max(leftArea,rightArea);const maxVerticalArea=Math.max(topArea,bottomArea);const isVerticalAreaLarger=maxVerticalArea>=maxHorizontalArea;const isHorizontalAreaLarger=maxHorizontalArea>=maxVerticalArea;const canFitWidthLength=isVerticalAxis?overallWidth<=constrainedClientDistRect.width:overallWidth<=constrainedTargetDistRect.left||overallWidth<=constrainedTargetDistRect.right;const canFitHeightLength=isHorizontalAxis?overallHeight<=constrainedClientDistRect.height:overallHeight<=constrainedTargetDistRect.top||overallHeight<=constrainedTargetDistRect.bottom;const canFitInLeftArea=tooltipArea=constrainedTargetDistRect.bottom;isBottom=constrainedTargetDistRect.top=constrainedTargetDistRect.right,isRTL);isRight=invertRTL(constrainedTargetDistRect.left=2){Object.assign(multipassCache,{isOutside:isOutside,isInside:isInside,isVerticalAxis:isVerticalAxis,isHorizontalAxis:isHorizontalAxis,isLeft:isLeft,isMiddle:isMiddle,isRight:isRight,isFillWidth:isFillWidth,isTop:isTop,isCenter:isCenter,isBottom:isBottom,isFillHeight:isFillHeight})}}const tooltipClasses=[isOutside&&"is-outside",isInside&&"is-inside",isArrowSnap&&"is-arrow-snap",isVerticalAxis&&"is-vertical-axis",isHorizontalAxis&&"is-horizontal-axis",isLeft&&"is-left",isMiddle&&"is-middle",isRight&&"is-right",isFillWidth&&"is-fill-width",isSnapLeft&&"is-snap-left",isSnapRight&&"is-snap-right",isTop&&"is-top",isCenter&&"is-center",isBottom&&"is-bottom",isFillHeight&&"is-fill-height",isSnapTop&&"is-snap-top",isSnapBottom&&"is-snap-bottom",isArrowStart&&"is-arrow-start",isArrowMiddle&&"is-arrow-middle",isArrowEnd&&"is-arrow-end"].filter(Boolean).join(" ");const{scrollOffsetLeft:scrollOffsetLeft,scrollOffsetTop:scrollOffsetTop}=calculateScrollOffset({isTargetFixedPosition:isTargetFixedPosition});Object.assign(tooltipStyles,{"--adapt-tooltip-viewport-constrained-height":`${constrainedClientDistRect.height}px`,"--adapt-tooltip-viewport-constrained-width":`${constrainedClientDistRect.width}px`,"--adapt-tooltip-scroll-top":`${scrollOffsetTop}px`,"--adapt-tooltip-scroll-left":`${scrollOffsetLeft}px`,"--adapt-tooltip-target-position-top":`${targetDistRect.top}px`,"--adapt-tooltip-target-position-left":`${targetDistRect.left}px`,"--adapt-tooltip-target-position-width":`${targetDistRect.width}px`,"--adapt-tooltip-target-position-height":`${targetDistRect.height}px`});return{tooltipClasses:tooltipClasses,tooltipStyles:tooltipStyles}}var TooltipItemModel=__AMD("core/js/models/TooltipItemModel",class TooltipItemModel extends Backbone__default["default"].Model{defaults(){return{...Adapt$1.course.get("_tooltips")||{},_id:null,_isEnabled:true,_classes:"",disabledText:"{{text}}",text:""}}});var TooltipView=__AMD("core/js/views/TooltipView",class TooltipView extends Backbone.View{className(){return"tooltip__container"}attributes(){return{role:"region","aria-live":"assertive"}}initialize(){_.bindAll(this,"onMouseOver","onKeyDown","onMouseOut");this._tooltipData={};this._tooltips=[];this.listenToOnce(Adapt$1,"adapt:preInitialize",this.onAdaptPreInitialize);this.render()}onAdaptPreInitialize(){var _this=this;if(this.config?._isEnabled===false)return;this.onMouseOver=_.debounce(this.onMouseOver,500);$(document).on("keydown",this.onKeyDown);$(document).on("focus","[data-tooltip-id]",(function(){if(a11y$1.isForcedFocus)return;_this.onMouseOver(...arguments)}));$(document).on("mouseenter","[data-tooltip-id]",this.onMouseOver);$(document).on("mouseleave blur","[data-tooltip-id]",this.onMouseOut)}get config(){return{_position:"outside bottom middle right",...Adapt$1.course.get("_tooltips")}}onKeyDown(event){if(event.key!=="Escape")return;this.hide()}onMouseOver(event){const $mouseoverEl=$(event.currentTarget);if(!a11y$1.isFocusable($mouseoverEl))return;const id=$mouseoverEl.data("tooltip-id");if(this._currentId===id&&event.name==="focusin")return;this._currentId=id;const tooltip=this.getTooltip(id);if(!tooltip?.get("_isEnabled"))return this.hide();if(event.ctrlKey&&this.config._allowTest){this.showTest(tooltip,$mouseoverEl)}else{this.show(tooltip,$mouseoverEl)}$(document).on("scroll",this.onScroll)}onMouseOut(){this.onMouseOver.cancel()}render(){this.$el.appendTo("body")}show(tooltip,$mouseoverEl){const tooltipItem=new TooltipItemView({model:tooltip,$target:$mouseoverEl,parent:this});this._tooltips.push(tooltipItem);this.$el.append(tooltipItem.$el)}hide(){let tooltipItem=arguments.length>0&&arguments[0]!==undefined?arguments[0]:null;tooltipItem=tooltipItem??this._tooltips.pop();this.removeItem(tooltipItem);if(!tooltipItem)return;tooltipItem.remove()}removeItem(tooltipItem){const currentIndex=this._tooltips.findIndex((item=>tooltipItem===item));if(currentIndex===-1)return;this._tooltips.splice(currentIndex,1)}register(tooltipData){if(!tooltipData._id)return logging$1.warn("Tooltip cannot be registered with no id");this._tooltipData[tooltipData._id]=new TooltipItemModel(tooltipData)}getTooltip(id){return this._tooltipData[id]}showTest(tooltip,$target){const produce=parts=>{const lastIndex=parts.length-1;const partIndex=new Array(parts.length).fill(0);const tooltips=[];const json=tooltip.toJSON();while(true){const position=parts.map(((part,index)=>part[partIndex[index]])).join(" ");tooltips.push(new TooltipItemModel({...json,disabledText:`D ${position}`,text:`T ${position}`,_position:position,_classes:"test"}));for(let i=lastIndex;i>=0;i--){partIndex[i]+=1;if(partIndex[i]=parts[0].length)break}tooltips.forEach((model=>{const tooltipItem=new TooltipItemView({model:model,$target:$target,parent:this});this._tooltips.push(tooltipItem);this.$el.append(tooltipItem.$el)}))};const areaOutside=["outside"];const areaInside=["inside"];const arrowPosition=["middle","start","end",""];const vertical=["middle","top","bottom",""];const horizontal=["middle","right","left",""];const partsVertical=[areaOutside,vertical,arrowPosition,horizontal];const partsHorizontal=[areaOutside,horizontal,arrowPosition,vertical];const partsVerticalInside=[areaInside,vertical,arrowPosition,horizontal];const partsHorizontalInside=[areaInside,horizontal,arrowPosition,vertical];produce(partsVertical);produce(partsHorizontal);produce(partsVerticalInside);produce(partsHorizontalInside)}});const tooltips=new TooltipView;var tooltips$1=__AMD("core/js/tooltips",tooltips);const DrawerCollection=new Backbone__default["default"].Collection(null,{comparator:"drawerOrder"});class Drawer extends Backbone__default["default"].Controller{initialize(){this.listenTo(Adapt$1,{"adapt:start":this.onAdaptStart,"app:languageChanged":this.onLanguageChanged,"navigation:toggleDrawer":this.toggle})}onAdaptStart(){this._drawerView=new DrawerView$1({collection:DrawerCollection})}onLanguageChanged(){tooltips$1.register({_id:"drawer",...Adapt$1.course.get("_globals")?._extensions?._drawer?._navTooltip||{}});this.remove()}toggle(){this.isOpen?this.close():this.open()}get isOpen(){return this._drawerView?.isOpen??false}open(){this._drawerView?.showDrawer(true)}openCustomView(view,hasBackButton,position){this._drawerView?.openCustomView(view,hasBackButton,position)}addItem(drawerObject,eventCallback){if(this.hasItem(eventCallback)){DrawerCollection.remove(DrawerCollection.find((item=>item.eventCallback===eventCallback)))}drawerObject.eventCallback=eventCallback;DrawerCollection.add(drawerObject)}hasItem(eventCallback){return Boolean(DrawerCollection.find((item=>item.eventCallback===eventCallback)))}close(){let $toElement=arguments.length>0&&arguments[0]!==undefined?arguments[0]:null;this._drawerView?.hideDrawer($toElement)}remove(){this._drawerView?.remove();this._drawerView=null}}var drawer=__AMD("core/js/drawer",new Drawer);var AdaptSubsetCollection=__AMD("core/js/collections/adaptSubsetCollection",class AdaptSubsetCollection extends AdaptCollection{initialize(models,options){super.initialize(models,options);this.parent=options.parent;this.listenTo(this.parent,"reset",this.loadSubset)}loadSubset(){this.set(this.parent.filter((model=>model instanceof this.model)));this._byAdaptID=this.groupBy("_id")}});var ModelEvent=__AMD("core/js/modelEvent",class ModelEvent extends Backbone.Controller{initialize(type,target,value){this.type=type;this.target=target;this.value=value;this.canBubble=true;this.deepPath=[target];this.timeStamp=null}stopPropagation(){this.canBubble=false}addPath(target){this.deepPath.unshift(target)}});var AdaptModel=__AMD("core/js/models/adaptModel",class AdaptModel extends LockingModel{toJSON(){const json={...this.attributes};delete json._children;delete json._parent;return $.extend(true,{},json)}get(name){switch(name){case"_parent":case"_children":logging$1.deprecated("Use model.getChildren() or model.getParent() instead of model.get('_children') or model.get('_parent')")}return super.get(name)}defaults(){return{_canShowFeedback:true,_classes:"",_canReset:true,_canRequestChild:false,_isComplete:false,_isInteractionComplete:false,_isA11yRegionEnabled:false,_isA11yCompletionDescriptionEnabled:true,_requireCompletionOf:-1,_isEnabled:true,_isResetOnRevisit:false,_isAvailable:true,_isOptional:false,_isRendered:false,_isReady:false,_isVisible:true,_isVisited:false,_isLocked:false,_isHidden:false}}get trackingPosition(){const firstDescendant=this.getAllDescendantModels(false).concat([this])[0];const nearestTrackingIdModel=[firstDescendant].concat(firstDescendant.getAncestorModels()).find((model=>model.has("_trackingId")));if(!nearestTrackingIdModel)return;const trackingId=nearestTrackingIdModel.get("_trackingId");let trackingIdDescendants=[nearestTrackingIdModel].concat(nearestTrackingIdModel.getAllDescendantModels(true));trackingIdDescendants=trackingIdDescendants.filter((model=>!(model.isTypeGroup("component")&&model.get("_isTrackable")===false)));const indexInTrackingIdDescendants=trackingIdDescendants.findIndex((descendant=>descendant===this));if(indexInTrackingIdDescendants>=0){return[trackingId,indexInTrackingIdDescendants]}const trackingIdAncestors=nearestTrackingIdModel.getAncestorModels();const ancestorDistance=trackingIdAncestors.findIndex((ancestor=>ancestor===this));return[trackingId,-(ancestorDistance+1)]}parse(data){if(data._isResetOnRevisit==="false"){data._isResetOnRevisit=false}return data}trackable(){return["_id","_isComplete","_isInteractionComplete","_isVisited"]}trackableType(){return[String,Boolean,Boolean,Boolean]}bubblingEvents(){return["change:_isComplete","change:_isInteractionComplete","change:_isActive","change:_isVisited"]}setupModel(){if(this.hasManagedChildren){this.setupChildListeners()}this.init();_.defer((()=>{if(this.hasManagedChildren){this.checkCompletionStatus();this.checkInteractionCompletionStatus();this.checkLocking();this.checkVisitedStatus()}this.setupTrackables()}))}setupTrackables(){const originalTrackableStateFunction=this.triggerTrackableState;this.triggerTrackableState=_.compose((()=>{this.triggerTrackableState.isQueued=true}),_.debounce((()=>{originalTrackableStateFunction.apply(this);this.triggerTrackableState.isQueued=false}),17));this.listenTo(this,"change",(_ref=>{let{changed:changed}=_ref;if(this.triggerTrackableState.isQueued||!Adapt$1.attributes._isStarted){return}const trackablePropertyNames=_.result(this,"trackable",[]);const changedPropertyNames=Object.keys(changed);const isTrackable=changedPropertyNames.find((item=>trackablePropertyNames.includes(item)));if(isTrackable){this.triggerTrackableState()}}))}setupChildListeners(){const children=this.getChildren();if(!children.length){return}this.listenTo(children,{all:this.onAll,bubble:this.bubble,"change:_isVisited":this.checkVisitedStatus,"change:_isReady":this.checkReadyStatus,"change:_isComplete":this.onIsComplete,"change:_isInteractionComplete":this.checkInteractionCompletionStatus})}init(){}getTrackableState(){const trackable=this.resultExtend("trackable",[]);const json=this.toJSON();const args=trackable;args.unshift(json);return _.pick(...args)}setTrackableState(state){const trackable=this.resultExtend("trackable",[]);const args=trackable;args.unshift(state);state=_.pick(...args);this.set(state);return this}triggerTrackableState(){Adapt$1.trigger("state:change",this,this.getTrackableState())}reset(){let type=arguments.length>0&&arguments[0]!==undefined?arguments[0]:"hard";let canReset=arguments.length>1&&arguments[1]!==undefined?arguments[1]:this.get("_canReset");if(!canReset)return false;const isHardReset=type==="hard"||type===true;const isSoftReset=type==="soft";if(!isHardReset&&!isSoftReset)return false;const resetData={_isEnabled:true,_isInteractionComplete:false};if(isHardReset)resetData._isComplete=false;this.set(resetData);this.trigger("reset");return true}checkReadyStatus(model,value){if(value===false){return false}const children=this.getAvailableChildModels();if(children.find((child=>child.get("_isReady")===false&&child.get("_isRendered")))){return false}this.set("_isReady",true);return true}setReadyStatus(){this.set("_isReady",true)}checkVisitedStatus(){const children=this.getAvailableChildModels();const isVisited=children.some((child=>child.get("_isVisited")||child.get("_isComplete")||child.get("_isInteractionComplete")));if(isVisited)this.set("_isVisited",true);return isVisited}setVisitedStatus(){if(!this.get("_isReady")||!this.get("_isRendered"))return;this.set("_isVisited",true)}setCompletionStatus(){if(!this.get("_isVisible"))return;this.set({_isComplete:true,_isInteractionComplete:true,_isVisited:true})}checkCompletionStatus(){Adapt$1.checkingCompletion();_.defer(this.checkCompletionStatusFor.bind(this),"_isComplete")}checkInteractionCompletionStatus(){Adapt$1.checkingCompletion();_.defer(this.checkCompletionStatusFor.bind(this),"_isInteractionComplete")}checkCompletionStatusFor(){let completionAttribute=arguments.length>0&&arguments[0]!==undefined?arguments[0]:"_isComplete";let completed=false;const children=this.getAvailableChildModels();const requireCompletionOf=this.get("_requireCompletionOf");const isOptional=this.get("_isOptional");const isEveryChildOptional=children.every((child=>child.get("_isOptional")));if(isOptional&&isEveryChildOptional){completed=children.every((child=>child.get(completionAttribute)))}else if(requireCompletionOf===-1){completed=children.every((child=>child.get(completionAttribute)||child.get("_isOptional")))}else{completed=children.filter((child=>child.get(completionAttribute)&&!child.get("_isOptional"))).length>=requireCompletionOf}this.set(completionAttribute,completed);Adapt$1.checkedCompletion()}getTypeGroup(){}isTypeGroup(typeGroup){const hasUpperCase=/[A-Z]+/.test(typeGroup);const isPluralized=typeGroup.slice(-1)==="s";const lowerCased=typeGroup.toLowerCase();const singular=isPluralized&&lowerCased.slice(0,-1);const singularLowerCased=(singular||lowerCased).toLowerCase();if(isPluralized||hasUpperCase){logging$1.deprecated(`'${typeGroup}' appears pluralized or contains uppercase characters, suggest using the singular, lowercase type group '${singularLowerCased}'.`)}const pluralizedLowerCaseTypes=[singularLowerCased,!isPluralized&&`${lowerCased}s`].filter(Boolean);const typeGroups=this.getTypeGroups();if(_.intersection(pluralizedLowerCaseTypes,typeGroups).length){return true}return false}getTypeGroups(){if(this._typeGroups)return this._typeGroups;const typeGroups=[this.get("_type")];let parentClass=this;while(parentClass=Object.getPrototypeOf(parentClass)){if(!Object.prototype.hasOwnProperty.call(parentClass,"getTypeGroup"))continue;typeGroups.push(parentClass.getTypeGroup.call(this))}return this._typeGroups=_.uniq(typeGroups.filter(Boolean).map((s=>s.toLowerCase())))}findAncestor(ancestorType){const parent=this.getParent();if(!parent)return;if(!ancestorType||parent.isTypeGroup(ancestorType)){return parent}return parent.findAncestor(ancestorType)}findDescendantModels(descendants,options){const allDescendantsModels=this.getAllDescendantModels();const returnedDescendants=allDescendantsModels.filter((model=>model.isTypeGroup(descendants)));if(!options){return returnedDescendants}if(options.where){return returnedDescendants.filter((descendant=>{for(const property in options.where){const value=options.where[property];if(descendant.get(property)!==value){return false}}return true}))}}getAllDescendantModels(isParentFirst){const descendants=[];if(!this.hasManagedChildren){return descendants}const children=this.getChildren();children.models.forEach((child=>{if(!child.hasManagedChildren){descendants.push(child);return}const subDescendants=child.getAllDescendantModels(isParentFirst);if(isParentFirst===true){descendants.push(child)}descendants.push(...subDescendants);if(isParentFirst!==true){descendants.push(child)}}));return descendants}findRelativeModel(relativeString){let options=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{};if(!relativeString)return this;let relativeDescriptorObjects=Adapt$1.parseRelativeString(relativeString);if(!Array.isArray(relativeDescriptorObjects))relativeDescriptorObjects=[relativeDescriptorObjects];const find=_ref2=>{let{type:type,offset:offset,inset:inset}=_ref2;const isInset=inset!==null;const isOffset=offset!==null;const rootModel=options.limitParentId?data$1.findById(options.limitParentId):isInset?this:Adapt$1.course;const increment=isOffset?offset:inset;const searchBackwards=increment<0;let moveBy=Math.abs(increment);let movementCount=0;const hasDescendantsOfType=Boolean(this.findDescendantModels(type).length);if(isInset&&!hasDescendantsOfType)return undefined;if(isOffset&&hasDescendantsOfType){moveBy--}if(isInset&&searchBackwards){moveBy--}const searchDescendants=searchBackwards?[rootModel,...rootModel.getAllDescendantModels(true)].reverse():[...rootModel.getAllDescendantModels(false),rootModel];const modelId=this.get("_id");const searchFromIndex=isInset?0:searchDescendants.findIndex((searchDescendant=>searchDescendant.get("_id")===modelId));const hasFilterFunction=typeof options.filter==="function";if(options.loop){const totalOfType=searchDescendants.reduce(((count,model)=>{if(!model.isTypeGroup(type))return count;return++count}),0);moveBy=moveBy%totalOfType;searchDescendants.push(...searchDescendants.slice(0))}for(let i=searchFromIndex,l=searchDescendants.length;imoveBy){break}if(movementCount===moveBy){return descendant}movementCount++}};const nextDescriptor=relativeDescriptorObjects.slice(1).reduce(((output,_ref3)=>{let{type:type,offset:offset,inset:inset}=_ref3;const isInset=inset!==null;const isOffset=offset!==null;if(isOffset)return`${output}@${type}${offset<0?offset:`+${offset}`}`;if(isInset)return`${output}@${type}=${inset}`;return`${output}@${type}`}),"");const foundModel=find(relativeDescriptorObjects[0]);if(nextDescriptor){return foundModel?.findRelativeModel(nextDescriptor)}return foundModel}get hasManagedChildren(){return true}getChildren(){if(this._childrenCollection){return this._childrenCollection}let childrenCollection;if(!this.hasManagedChildren){childrenCollection=new Backbone.Collection}else{const id=this.get("_id");const children=data$1.filter((model=>model.get("_parentId")===id));childrenCollection=new Backbone.Collection(children)}if(this.get("_type")==="block"&&childrenCollection.length===2&&childrenCollection.models[0].get("_layout")!=="left"){childrenCollection.comparator="_layout";childrenCollection.sort()}this.setChildren(childrenCollection);return this._childrenCollection}setChildren(children){this._childrenCollection=children;this.set("_children",children)}getAvailableChildModels(){return this.getChildren().where({_isAvailable:true})}getParent(){if(this._parentModel){return this._parentModel}const parentId=this.get("_parentId");if(!parentId)return;const parent=data$1.findById(parentId);if(!parent){logging$1.warn("adaptModel.getParent(): parent is empty");return}this.setParent(parent);return this._parentModel}setParent(parent){this._parentModel=parent;this.set("_parentId",this._parentModel.get("_id"));this.set("_parent",this._parentModel)}getAncestorModels(shouldIncludeChild){const parents=[];let context=this;if(shouldIncludeChild)parents.push(context);while(context.has("_parentId")){context=context.getParent();parents.push(context)}return parents.length?parents:null}getSiblings(passSiblingsAndIncludeSelf){const id=this.get("_id");const parentId=this.get("_parentId");let siblings;if(!passSiblingsAndIncludeSelf){if(this._hasSiblingsAndSelf===false){return this.get("_siblings")}siblings=data$1.filter((model=>model.get("_parentId")===parentId&&model.get("_id")!==id));this._hasSiblingsAndSelf=false}else{if(this._hasSiblingsAndSelf){return this.get("_siblings")}siblings=data$1.filter((model=>model.get("_parentId")===parentId));this._hasSiblingsAndSelf=true}const siblingsCollection=new Backbone.Collection(siblings);this.set("_siblings",siblingsCollection);return siblingsCollection}setOnChildren(){for(var _len=arguments.length,args=new Array(_len),_key=0;_key<_len;_key++){args[_key]=arguments[_key]}this.set(...args);if(!this.hasManagedChildren)return;const children=this.getChildren();children.models.forEach((child=>child.setOnChildren(...args)))}setOptional(value){logging$1.deprecated("Use model.set('_isOptional', value) as setOptional() may be removed in the future");this.set({_isOptional:value})}checkLocking(){const lockType=this.get("_lockType");if(!lockType)return;switch(lockType){case"sequential":this.setSequentialLocking();break;case"unlockFirst":this.setUnlockFirstLocking();break;case"lockLast":this.setLockLastLocking();break;case"custom":this.setCustomLocking();break;default:logging$1.warn(`AdaptModel.checkLocking: unknown _lockType '${lockType}' found on ${this.get("_id")}`)}}setSequentialLocking(){const children=this.getAvailableChildModels();children.slice(1).forEach(((child,index)=>{const previousChild=children[index];const isLockedByPreviousChild=previousChild.get("_isLocked")||!previousChild.get("_isComplete")&&!previousChild.get("_isOptional");child.set("_isLocked",isLockedByPreviousChild)}),false)}setUnlockFirstLocking(){const children=this.getAvailableChildModels();const firstChild=children.shift();const isLockedByFirstChild=!firstChild.get("_isComplete")&&!firstChild.get("_isOptional");children.forEach((child=>child.set("_isLocked",isLockedByFirstChild)))}setLockLastLocking(){const children=this.getAvailableChildModels();const lastChild=children.pop();const isLockedByChildren=children.some((child=>!child.get("_isComplete")&&!child.get("_isOptional")));lastChild.set("_isLocked",isLockedByChildren)}setCustomLocking(){const children=this.getAvailableChildModels();children.forEach((child=>child.set("_isLocked",this.shouldLock(child))))}shouldLock(child){const lockedBy=child.get("_lockedBy");if(!lockedBy)return false;return lockedBy.some((id=>{try{const anotherModel=data$1.findById(id);return anotherModel.get("_isAvailable")&&(anotherModel.get("_isLocked")||!anotherModel.get("_isComplete")&&!anotherModel.get("_isOptional"))}catch(e){logging$1.warn(`AdaptModel.shouldLock: unknown _lockedBy ID '${id}' found on ${child.get("_id")}`);return false}}))}onIsComplete(){this.checkCompletionStatus();this.checkLocking()}checkIfResetOnRevisit(){const isResetOnRevisit=this.get("_isResetOnRevisit");this.reset(isResetOnRevisit)}deepClone(){let modifier=arguments.length>0&&arguments[0]!==undefined?arguments[0]:null;const ModelClass=this.constructor;const clonedModel=new ModelClass(this.toJSON());if(modifier){modifier(clonedModel,this)}let clonedId=clonedModel.get("_id");const hasId=Boolean(clonedId);const shouldAssignUniqueId=this.get("_id")===clonedId;if(hasId&&shouldAssignUniqueId){const cid=_.uniqueId(ModelClass.prototype.cidPrefix||"c");clonedId=`${clonedId}_${cid}`;clonedModel.set("_id",clonedId)}if(hasId){data$1.add(clonedModel)}if(this.hasManagedChildren){this.getChildren().each((child=>{if(!child.deepClone){throw new Error("Cannot deepClone child.")}child.deepClone(((clone,child)=>{if(hasId){clone.set("_parentId",clonedId)}if(modifier){modifier(clone,child)}}))}))}clonedModel.getParent().getChildren().add(clonedModel);clonedModel.setupModel();return clonedModel}onAll(type,model,value){if(!_.result(this,"bubblingEvents").includes(type))return;const event=new ModelEvent(type,model,value);this.bubble(event)}bubble(event){if(!event.canBubble)return;event.addPath(this);this.trigger(`bubble:${event.type} bubble`,event)}});var ContentObjectModel=__AMD("core/js/models/contentObjectModel",class ContentObjectModel extends AdaptModel{get _parent(){logging$1.deprecated("contentObjectModel._parent, use contentObjectModel.getParent() instead, parent models are defined by the JSON");const isParentCourse=this.get("_parentId")===Adapt$1.course.get("_id");if(isParentCourse){return"course"}return"contentObjects"}get _siblings(){logging$1.deprecated("contentObjectModel._siblings, use contentObjectModel.getSiblings() instead, sibling models are defined by the JSON");return"contentObjects"}get _children(){logging$1.deprecated("contentObjectModel._children, use contentObjectModel.hasManagedChildren instead, child models are defined by the JSON");return null}getTypeGroup(){return"contentobject"}});class ArticleModel extends AdaptModel{get _parent(){logging$1.deprecated("articleModel._parent, use articleModel.getParent() instead, parent models are defined by the JSON");return"contentObjects"}get _siblings(){logging$1.deprecated("articleModel._siblings, use articleModel.getSiblings() instead, sibling models are defined by the JSON");return"articles"}get _children(){logging$1.deprecated("articleModel._children, use articleModel.hasManagedChildren instead, child models are defined by the JSON");return"blocks"}getTypeGroup(){return"article"}}components$1.register("article",{model:ArticleModel});var ArticleModel$1=__AMD("core/js/models/articleModel",ArticleModel);class BlockModel extends AdaptModel{get _parent(){logging$1.deprecated("blockModel._parent, use blockModel.getParent() instead, parent models are defined by the JSON");return"articles"}get _siblings(){logging$1.deprecated("blockModel._siblings, use blockModel.getSiblings() instead, sibling models are defined by the JSON");return"blocks"}get _children(){logging$1.deprecated("blockModel._children, use blockModel.hasManagedChildren instead, child models are defined by the JSON");return"components"}getTypeGroup(){return"block"}}components$1.register("block",{model:BlockModel});var BlockModel$1=__AMD("core/js/models/blockModel",BlockModel);class ComponentModel extends AdaptModel{get _parent(){logging$1.deprecated("componentModel._parent, use componentModel.getParent() instead, parent models are defined by the JSON");return"blocks"}get _siblings(){logging$1.deprecated("componentModel._siblings, use componentModel.getSiblings() instead, sibling models are defined by the JSON");return"components"}getTypeGroup(){return"component"}defaults(){return AdaptModel.resultExtend("defaults",{_isA11yComponentDescriptionEnabled:true,_shouldStoreAttempts:true,_userAnswer:null,_attemptStates:null})}trackable(){return AdaptModel.resultExtend("trackable",["_userAnswer","_attemptStates"])}trackableType(){return AdaptModel.resultExtend("trackableType",[Array,Array])}get hasManagedChildren(){return false}init(){if(Adapt$1.get("_isStarted")){this.onAdaptInitialize();return}this.listenToOnce(Adapt$1,"adapt:initialize",this.onAdaptInitialize)}onAdaptInitialize(){this.restoreUserAnswers()}restoreUserAnswers(){}storeUserAnswer(){}resetUserAnswer(){this.set("_userAnswer",null)}reset(){let type=arguments.length>0&&arguments[0]!==undefined?arguments[0]:"hard";let canReset=arguments.length>1&&arguments[1]!==undefined?arguments[1]:this.get("_canReset");const wasReset=super.reset(type,canReset);if(!wasReset)return false;this.resetUserAnswer();return true}getAttemptState(){let object=arguments.length>0&&arguments[0]!==undefined?arguments[0]:this.toJSON();const trackables=this.trackable();const types=this.trackableType();trackables.find(((name,index)=>{if(name!=="_attemptStates")return false;trackables.splice(index,1);types.splice(index,1);return true}));const values=trackables.map((n=>object[n]));const booleans=values.filter(((v,i)=>types[i]===Boolean)).map(Boolean);const numbers=values.filter(((v,i)=>types[i]===Number)).map((v=>Number(v)||0));const arrays=values.filter(((v,i)=>types[i]===Array));return[numbers,booleans,arrays]}getAttemptObject(){let state=arguments.length>0&&arguments[0]!==undefined?arguments[0]:this.getAttemptState();const trackables=this.trackable();const types=this.trackableType();trackables.find(((name,index)=>{if(name!=="_attemptStates")return false;trackables.splice(index,1);types.splice(index,1);return true}));const numbers=(state[0]||[]).slice(0);const booleans=(state[1]||[]).slice(0);const arrays=(state[2]||[]).slice(0);const object={};trackables.forEach(((n,i)=>{if(n==="_id")return;switch(types[i]){case Number:object[n]=numbers.shift();break;case Boolean:object[n]=booleans.shift();break;case Array:object[n]=arrays.shift();break}}));return object}setAttemptObject(object){let silent=arguments.length>1&&arguments[1]!==undefined?arguments[1]:true;this.set(object,{silent:silent})}addAttemptObject(){let object=arguments.length>0&&arguments[0]!==undefined?arguments[0]:this.getAttemptObject();const attemptStates=this.get("_attemptStates")||[];const state=this.getAttemptState(object);attemptStates.push(state);this.set("_attemptStates",attemptStates)}getAttemptObjects(){const states=this.get("_attemptStates")||[];return states.map((state=>this.getAttemptObject(state)))}}components$1.register("component",{model:ComponentModel});var ComponentModel$1=__AMD("core/js/models/componentModel",ComponentModel);class MenuModel extends ContentObjectModel{get _children(){logging$1.deprecated("menuModel._children, use menuModel.hasManagedChildren instead, child models are defined by the JSON");return"contentObjects"}getTypeGroup(){return"menu"}setCustomLocking(){const children=this.getAvailableChildModels();children.forEach((child=>{child.set("_isLocked",this.shouldLock(child));if(!(child instanceof MenuModel))return;child.checkLocking()}))}}components$1.register("menu",{model:MenuModel});var MenuModel$1=__AMD("core/js/models/menuModel",MenuModel);class CourseModel extends MenuModel$1{get _parent(){logging$1.deprecated("courseModel._parent, use courseModel.getParent() instead, parent models are defined by the JSON");return null}get _siblings(){logging$1.deprecated("courseModel._siblings, use courseModel.getSiblings() instead, sibling models are defined by the JSON");return null}getTypeGroup(){return"course"}}components$1.register("course",{model:CourseModel});var CourseModel$1=__AMD("core/js/models/courseModel",CourseModel);class PageModel extends ContentObjectModel{get _children(){logging$1.deprecated("pageModel._children, use menuModel.hasManagedChildren instead, child models are defined by the JSON");return"articles"}getTypeGroup(){return"page"}}components$1.register("page",{model:PageModel});__AMD("core/js/models/pageModel",PageModel);var ChildEvent=__AMD("core/js/childEvent",class ChildEvent extends Backbone.Controller{initialize(type,target,model){this.type=type;this.target=target;this.isForced=false;this.isStoppedImmediate=false;this.isStoppedNext=false;this.hasRequestChild=false;this._model=model}get model(){return this._model}set model(model){if(this.type!=="requestChild"){logging$1.warn(`Cannot change model in ${this.type} event.`);return}if(this._model){logging$1.warn(`Cannot inject two models in one sitting. ${model.get("_id")} attempts to overwrite ${this._model.get("_id")}`);return}this._model=model;this.hasRequestChild=true}reset(){this.isStoppedImmediate=false;this.isStoppedNext=false}force(){this.isForced=true}stop(){let immediate=arguments.length>0&&arguments[0]!==undefined?arguments[0]:true;if(!immediate){return this.stopNext()}this.isStoppedImmediate=true}stopNext(){this.isStoppedNext=true}close(){this.trigger("closed")}});class AdaptView extends Backbone.View{attributes(){return{"data-adapt-id":this.model.get("_id"),role:"presentation"}}initialize(){this._jsxIgnoreChanges=0;this.listenTo(this.model,{"change:_isVisible":this.toggleVisibility,"change:_isHidden":this.toggleHidden,"change:_isComplete":this.onIsCompleteChange});this.isJSX=(this.constructor.template||"").includes(".jsx");if(this.isJSX){this._classSet=new Set(_.result(this,"className").trim().split(/\s+/));this.listenTo(this.model,"change",this.changed);const children=this.model?.getChildren?.();children&&this.listenTo(children,"change",this.changed);this.listenTo(Adapt$1,"device:changed",this.changed)}this.model.set({_globals:Adapt$1.course.get("_globals"),_isReady:false});this._isRemoved=false;if(location$1._currentId===this.model.get("_id")){Adapt$1.parentView=this}this.preRender();this.render();this.setupOnScreenHandler()}preRender(){}async postRender(){await this.addChildren()}render(){const type=this.constructor.type;Adapt$1.trigger(`${type}View:preRender view:preRender`,this);if(this.isJSX){this.changed()}else{const data=this.model.toJSON();data.view=this;const template=Handlebars.templates[this.constructor.template];this.$el.html(template(data))}Adapt$1.trigger(`${type}View:render view:render`,this);_.defer((async()=>{if(this._isRemoved)return;await this.postRender();Adapt$1.trigger(`${type}View:postRender view:postRender`,this)}));return this}changed(){let eventName=arguments.length>0&&arguments[0]!==undefined?arguments[0]:null;if(this._jsxIgnoreChanges!==0)return;if(!this.isJSX)return;if(typeof eventName==="string"&&eventName.startsWith("bubble")){return}if(!this.model.get("_isRendered"))return;const props={...this,...this.model.toJSON(),_globals:Adapt$1.course.get("_globals")};const Template=templates[this.constructor.template.replace(".jsx","")];this.updateViewProperties();ReactDOM__default["default"].render(React__default["default"].createElement(Template,props),this.el)}stopRendering(){this._jsxIgnoreChanges++}startRendering(){this._jsxIgnoreChanges--;if(this._jsxIgnoreChanges<0){this._jsxIgnoreChanges=0}}updateViewProperties(){const classesToAdd=_.result(this,"className").trim().split(/\s+/);classesToAdd.forEach((i=>this._classSet.add(i)));const classesToRemove=[...this._classSet].filter((i=>!classesToAdd.includes(i)));classesToRemove.forEach((i=>this._classSet.delete(i)));this._setAttributes({..._.result(this,"attributes"),id:_.result(this,"id")});this.$el.removeClass(classesToRemove).addClass(classesToAdd)}setupOnScreenHandler(){const onscreen=this.model.get("_onScreen");if(!onscreen?._isEnabled)return;this.$el.addClass(`has-animation ${onscreen._classes}-before`);this.$el.on("onscreen.adaptView",((e,m)=>{if(!m.onscreen)return;const minVerticalInview=onscreen._percentInviewVertical||33;if(m.percentInviewVerticalmodel.setOnChildren("_isRendered",false)));break}const model=event.model;model.set({_isRendered:true,_nthChild:++this.nthChild});const ChildView=this.constructor.childView||components$1.getViewClass(model);if(!ChildView){throw new Error(`The component '${model.attributes._id}' ('${model.attributes._component}') has not been installed, and so is not available in your project.`)}const childView=new ChildView({model:model});this.addChildView(childView);addedCount++;if(event.isStoppedNext){break}}if(!addedCount){return addedCount}this.model.set("_isReady",false);return addedCount}addChildView(childView){const childModel=childView.model;const type=childModel.get("_type");const childViews=this.getChildViews()||[];childViews.push(childView);this.setChildViews(childViews);const $parentContainer=this.$(this.constructor.childContainer);switch(childModel.get("_renderPosition")){case"outer-append":this.$el.append(childView.$el);break;case"inner-append":default:$parentContainer.append(childView.$el);break}Adapt$1.trigger(`${type}View:childAdded view:childAdded`,this,childView);return childView}async addDescendants(){let addedDescendantCount=0;const childViews=this.getChildViews();if(!childViews){return addedDescendantCount}for(let i=0,l=childViews.length;i{const onReadyChange=(model,value)=>{if(!value)return;this.stopListening(this.model,"change:_isReady",onReadyChange);resolve()};this.listenTo(this.model,"change:_isReady",onReadyChange);this.model.checkReadyStatus()}))}_getAddChildEvent(model){const isRequestChild=!model;const event=new ChildEvent(null,this,model);if(isRequestChild){const canRequestChild=this.model.get("_canRequestChild");if(!canRequestChild){return}event.type="requestChild";Adapt$1.trigger("view:requestChild",event);if(!event.hasRequestChild){event.close();return}model=event.model}const type=model.get("_type");event.type="addChild";Adapt$1.trigger(`${type}View:addChild view:addChild`,event);event.close();return event}findDescendantViews(isParentFirst){const descendants=[];const childViews=this.getChildViews();childViews?.forEach((view=>{if(isParentFirst)descendants.push(view);const children=view.findDescendantViews?.(isParentFirst);if(children)descendants.push(...children);if(!isParentFirst)descendants.push(view)}));return descendants}setReadyStatus(){this.model.setReadyStatus()}setCompletionStatus(){this.model.setCompletionStatus()}resetCompletionStatus(type){if(!this.model.get("_canReset"))return;const descendantComponents=this.model.findDescendantModels("component");if(descendantComponents.length===0){this.model.reset(type)}else{descendantComponents.forEach((model=>model.reset(type)))}}preRemove(){const type=this.constructor.type;Adapt$1.trigger(`${type}View:preRemove view:preRemove`,this)}remove(){const type=this.constructor.type;this.preRemove();Adapt$1.trigger(`${type}View:remove view:remove`,this);this._isRemoved=true;this.stopListening();wait$1.for((end=>{if(this.isJSX){ReactDOM__default["default"].unmountComponentAtNode(this.el)}this.$el.off("onscreen.adaptView");super.remove();_.defer((()=>{Adapt$1.trigger(`${type}View:postRemove view:postRemove`,this)}));end()}));return this}setVisibility(){return this.model.get("_isVisible")?"":"u-visibility-hidden"}toggleVisibility(){this.$el.toggleClass("u-visibility-hidden",!this.model.get("_isVisible"))}setHidden(){return this.model.get("_isHidden")?"u-display-none":""}toggleHidden(){this.$el.toggleClass("u-display-none",this.model.get("_isHidden"))}onIsCompleteChange(model,isComplete){this.$el.toggleClass("is-complete",isComplete)}getChildViews(){if(!this._childViews)return null;return Object.entries(this._childViews).map((_ref=>{let[key,value]=_ref;return value}))}setChildViews(value){this._childViews=value}get childViews(){logging$1.deprecated("view.childViews use view.getChildViews() and view.setChildViews([])");if(Array.isArray(this._childViews)){return _.indexBy(this._childViews,(view=>view.model.get("_id")))}return this._childViews}set childViews(value){logging$1.deprecated("view.childViews use view.getChildViews() and view.setChildViews([])");this.setChildViews(value)}}AdaptView.className="";var AdaptView$1=__AMD("core/js/views/adaptView",AdaptView);var ContentObjectView=__AMD("core/js/views/contentObjectView",class ContentObjectView extends AdaptView$1{attributes(){return AdaptView$1.resultExtend("attributes",{role:"main"},this)}className(){return[this.constructor.type,"contentobject",this.constructor.className,this.model.get("_id"),this.model.get("_classes"),this.setVisibility(),this.model.get("_isComplete")?"is-complete":"",this.model.get("_isOptional")?"is-optional":""].filter(Boolean).join(" ")}preRender(){$.inview.lock(this.constructor.type+"View");this.disableAnimation=Adapt$1.config.has("_disableAnimation")?Adapt$1.config.get("_disableAnimation"):false;this.$el.css("opacity",0);this.listenTo(this.model,"change:_isReady",this.isReady);this._loadingErrorTimeout=setTimeout((()=>data$1.logReadyError(this)),1e4)}render(){const type=this.constructor.type;Adapt$1.trigger(`${type}View:preRender contentObjectView:preRender view:preRender`,this);if(this.isJSX){this.changed()}else{const data=this.model.toJSON();data.view=this;const template=Handlebars.templates[this.constructor.template];this.$el.html(template(data))}Adapt$1.trigger(`${type}View:render contentObjectView:render view:render`,this);_.defer((()=>{if(this._isRemoved)return;this.postRender();Adapt$1.trigger(`${type}View:postRender contentObjectView:postRender view:postRender`,this)}));return this}async isReady(){if(!this.model.get("_isReady")||this._isTriggeredReady)return;this._isTriggeredReady=true;clearTimeout(this._loadingErrorTimeout);delete this._loadingErrorTimeout;const type=this.constructor.type;const performIsReady=async()=>{Adapt$1.trigger(`${type}View:preReady contentObjectView:preReady view:preReady`,this);await wait$1.queue();$(".js-loading").hide();if(Adapt$1.get("_shouldContentObjectScrollTop")!==false){$(window).scrollTop(0)}Adapt$1.trigger(`${type}View:ready contentObjectView:ready view:ready`,this);$.inview.unlock(`${type}View`);const styleOptions={opacity:1};if(this.disableAnimation){this.$el.css(styleOptions);$.inview();_.defer((()=>{Adapt$1.trigger(`${type}View:postReady contentObjectView:postReady view:postReady`,this)}))}else{this.$el.velocity(styleOptions,{duration:"fast",complete:()=>{$.inview();Adapt$1.trigger(`${type}View:postReady contentObjectView:postReady view:postReady`,this)}})}$(window).scroll()};_.defer(performIsReady)}async renderTo(id){const isRenderToSelf=id===this.model.get("_id");if(isRenderToSelf)return;let models=this.model.getAllDescendantModels(true).filter((model=>model.get("_isAvailable")));const index=models.findIndex((model=>model.get("_id")===id));if(index===-1){throw new Error(`Cannot renderTo "${id}" as it isn't a descendant.`)}const model=models[index];if(model.get("_isRendered")&&model.get("_isReady")){return}models=models.slice(0,index+1);const isLocked=models.some((model=>model.get("_isLocked")));if(isLocked)throw new Error(`Cannot renderTo ${id} as it is preceded by locked content`);const ids=_.indexBy(models,(model=>model.get("_id")));const forceUntilId=event=>{const addingId=event.model.get("_id");if(!ids[addingId])return;event.force();if(addingId!==id)return;Adapt$1.off("view:addChild",forceUntilId)};Adapt$1.on("view:addChild",forceUntilId);await this.addChildren();await this.whenReady();if(!model.get("_isRendered")||!model.get("_isReady")){throw new Error(`Cannot renderTo "${id}".`)}}preRemove(){const type=this.constructor.type;Adapt$1.trigger(`${type}View:preRemove contentObjectView:preRemove view:preRemove`,this)}remove(){const type=this.constructor.type;this.preRemove();Adapt$1.trigger(`${type}View:remove contentObjectView:remove view:remove`,this);this._isRemoved=true;wait$1.for((end=>{if(this.isJSX){ReactDOM__default["default"].unmountComponentAtNode(this.el)}this.$el.off("onscreen.adaptView");this.findDescendantViews().reverse().forEach((view=>{view.remove()}));this.setChildViews(null);super.remove();_.defer((()=>{Adapt$1.trigger(`${type}View:postRemove contentObjectView:postRemove view:postRemove`,this);this.trigger("postRemove")}));end()}));return this}destroy(){this.remove();if(Adapt$1.parentView===this){Adapt$1.parentView=null}}});class PageView extends ContentObjectView{remove(){if(this.$pageLabel){this.$pageLabel.remove()}super.remove()}}Object.assign(PageView,{childContainer:".article__container",type:"page",template:"page"});components$1.register("page",{view:PageView});__AMD("core/js/views/pageView",PageView);class ArticleView extends AdaptView$1{className(){return["article",this.model.get("_id"),this.model.get("_classes"),this.setVisibility(),this.setHidden(),this.model.get("_isComplete")?"is-complete":"",this.model.get("_isOptional")?"is-optional":""].join(" ")}}Object.assign(ArticleView,{childContainer:".block__container",type:"article",template:"article"});components$1.register("article",{view:ArticleView});var ArticleView$1=__AMD("core/js/views/articleView",ArticleView);class BlockView extends AdaptView$1{className(){return["block",this.model.get("_id"),this.model.get("_classes"),this.setVisibility(),this.setHidden(),this.model.get("_isComplete")?"is-complete":"",this.model.get("_isOptional")?"is-optional":""].join(" ")}}Object.assign(BlockView,{childContainer:".component__container",type:"block",template:"block"});components$1.register("block",{view:BlockView});__AMD("core/js/views/blockView",BlockView);class MPABC extends Backbone.Controller{initialize(){this.listenTo(data$1,{loading:this.waitForDataLoaded,loaded:this.onDataLoaded});this.setupSubsetCollections()}waitForDataLoaded(){wait$1.begin()}onDataLoaded(){wait$1.end()}setupSubsetCollections(){Adapt$1.contentObjects=new AdaptSubsetCollection(null,{parent:data$1,model:ContentObjectModel});Adapt$1.articles=new AdaptSubsetCollection(null,{parent:data$1,model:ArticleModel$1});Adapt$1.blocks=new AdaptSubsetCollection(null,{parent:data$1,model:BlockModel$1});Adapt$1.components=new AdaptSubsetCollection(null,{parent:data$1,model:ComponentModel$1})}}const mpabc=new MPABC;var mpabc$1=__AMD("core/js/mpabc",mpabc);var NotifyPushView=__AMD("core/js/views/notifyPushView",class NotifyPushView extends Backbone.View{className(){const classes=["notify-push",this.model.get("_classes"),this.model.get("_type")==="a11y-push"&&"aria-label"].filter(Boolean).join(" ");return classes}attributes(){return{role:"dialog","aria-labelledby":"notify-push-heading","aria-modal":"false"}}initialize(){this.listenTo(Adapt$1,{"notify:pushShown notify:pushRemoved":this.updateIndexPosition,remove:this.remove});this.listenTo(this.model.collection,{remove:this.updateIndexPosition,"change:_index":this.updatePushPosition});this.preRender();this.render()}events(){return{"click .js-notify-push-close-btn":"closePush","click .js-notify-push-inner":"triggerEvent"}}preRender(){this.hasBeenRemoved=false}render(){const data=this.model.toJSON();const template=Handlebars.templates.notifyPush;this.$el.html(template(data)).appendTo(".notify__push-container");_.defer(this.postRender.bind(this));return this}postRender(){this.$el.addClass("is-active");_.delay(this.closePush.bind(this),this.model.get("_timeout"));Adapt$1.trigger("notify:pushShown")}closePush(event){if(event){event.preventDefault()}if(this.hasBeenRemoved===false){this.hasBeenRemoved=true;this.$el.removeClass("is-active");_.delay((()=>{this.model.collection.remove(this.model);Adapt$1.trigger("notify:pushRemoved",this);this.remove()}),600)}}triggerEvent(event){Adapt$1.trigger(this.model.get("_callbackEvent"));this.closePush()}updateIndexPosition(){if(this.hasBeenRemoved)return;const models=this.model.collection.models;models.forEach(((model,index)=>{if(!model.get("_isActive"))return;model.set("_index",index);this.updatePushPosition()}))}updatePushPosition(){if(this.hasBeenRemoved){return}if(typeof this.model.get("_index")!=="undefined"){const elementHeight=this.$el.height();const offset=20;const navigationHeight=$(".nav").height();const currentIndex=this.model.get("_index");let flippedIndex=currentIndex===0?1:0;if(this.model.collection.where({_isActive:true}).length===1){flippedIndex=0}const positionLowerPush=(elementHeight+offset)*flippedIndex+navigationHeight+offset;this.$el.css("top",positionLowerPush)}}});var NotifyModel=__AMD("core/js/models/notifyModel",class NotifyModel extends LockingModel{defaults(){return{_isActive:false,_showIcon:false,_timeout:3e3}}});var NotifyPushCollection=__AMD("core/js/collections/notifyPushCollection",class NotifyPushCollection extends Backbone.Collection{initialize(){this.model=NotifyModel;this.listenTo(this,"add",this.onPushAdded);this.listenTo(Adapt$1,"notify:pushRemoved",this.onRemovePush)}onPushAdded(model){this.checkPushCanShow(model)}checkPushCanShow(model){if(!this.canShowPush())return;model.set("_isActive",true);this.showPush(model)}canShowPush(){const availablePushNotifications=this.where({_isActive:true});return availablePushNotifications.length<2}showPush(model){new NotifyPushView({model:model})}onRemovePush(view){const inactivePushNotifications=this.where({_isActive:false});if(inactivePushNotifications.length>0){this.checkPushCanShow(inactivePushNotifications[0])}}});var NotifyPopupView=__AMD("core/js/views/notifyPopupView",class NotifyPopupView extends Backbone__default["default"].View{className(){return`notify ${this.model.get("_classes")||""}`}attributes(){return Object.assign({role:"dialog","aria-labelledby":"notify-heading","aria-modal":"true"},this.model.get("_attributes"))}events(){return{"click .js-notify-btn-alert":"onAlertButtonClicked","click .js-notify-btn-prompt":"onPromptButtonClicked","click .js-notify-close-btn":"onCloseButtonClicked","click .js-notify-shadow-click":"onShadowClicked"}}initialize(_ref){let{notify:notify}=_ref;this.notify=notify;_.bindAll(this,"resetNotifySize","onKeyUp");this.disableAnimation=Adapt$1.config.get("_disableAnimation")||false;this.isOpen=false;this.hasOpened=false;this.setupEventListeners();this.render()}setupEventListeners(){this.listenTo(Adapt$1,{remove:this.closeNotify,"notify:resize":this.resetNotifySize,"notify:cancel":this.cancelNotify,"notify:close":this.closeNotify,"device:resize":this.resetNotifySize});this.setupEscapeKey()}setupEscapeKey(){$(window).on("keyup",this.onKeyUp)}onKeyUp(event){if(event.which!==27)return;event.preventDefault();this.cancelNotify()}render(){const data=this.model.toJSON();const template=Handlebars.templates.notifyPopup;this.$el.css("visibility","hidden");this.$el.html(template(data)).appendTo(".notify__popup-container");this.$(".notify__popup").css("visibility","hidden");this.$el.css("visibility","visible");this.showNotify();return this}onAlertButtonClicked(event){event.preventDefault();this.closeNotify();Adapt$1.trigger(this.model.get("_callbackEvent"),this)}onPromptButtonClicked(event){event.preventDefault();this.closeNotify();Adapt$1.trigger($(event.currentTarget).attr("data-event"),this)}onCloseButtonClicked(event){event.preventDefault();this.cancelNotify()}onShadowClicked(event){event.preventDefault();if(this.model.get("_closeOnShadowClick")===false)return;this.cancelNotify()}cancelNotify(){if(this.model.get("_isCancellable")===false)return;this.closeNotify();Adapt$1.trigger("notify:cancelled",this)}resetNotifySize(){if(!this.hasOpened)return;this.resizeNotify()}resizeNotify(){const windowHeight=$(window).height();const notifyHeight=this.$(".notify__popup-inner").outerHeight();const isFullWindow=notifyHeight>=windowHeight;this.$(".notify__popup").css({height:isFullWindow?"100%":"auto",top:isFullWindow?0:"","margin-top":isFullWindow?"":-(notifyHeight/2),"overflow-y":isFullWindow?"scroll":"","-webkit-overflow-scrolling":isFullWindow?"touch":""})}async showNotify(){this.isOpen=true;await this.addSubView();this.notify.stack.push(this);this.$previousActiveElement=$(document.activeElement);Adapt$1.trigger("notify:opened",this);this.$el.imageready(this.onLoaded.bind(this))}onLoaded(){if(this.disableAnimation){this.$(".notify__shadow").css("display","block")}else{this.$(".notify__shadow").velocity({opacity:0},{duration:0}).velocity({opacity:1},{duration:400,begin:()=>{this.$(".notify__shadow").css("display","block")}})}this.resizeNotify();if(this.disableAnimation){this.$(".notify__popup").css("visibility","visible");this.onOpened()}else{this.$(".notify__popup").velocity({opacity:0},{duration:0}).velocity({opacity:1},{duration:400,begin:()=>{this.$(".notify__popup").css("visibility","visible");this.onOpened()}})}}onOpened(){$.inview();this.hasOpened=true;a11y$1.popupOpened(this.$el);a11y$1.scrollDisable("body");$("html").addClass("notify");a11y$1.focusFirst(this.$(".notify__popup"),{defer:false})}async addSubView(){this.subView=this.model.get("_view");if(this.model.get("_shouldRenderId")&&this.model.get("_id")){const model=data$1.findById(this.model.get("_id"));const View=components$1.getViewClass(model);this.subView=new View({model:model})}if(!this.subView)return;this.subView.$el.on("resize",this.resetNotifySize);this.$(".notify__content-inner").append(this.subView.$el);if(!(this.subView instanceof AdaptView$1)||this.subView.model.get("_isReady"))return;return new Promise((resolve=>{const check=(model,value)=>{if(!value)return;this.subView.model.off("change:_isReady",check);resolve()};this.subView.model.on("change:_isReady",check)}))}closeNotify(){const stackItem=this.notify.stack[this.notify.stack.length-1];if(this!==stackItem)return;this.notify.stack.pop();if(!this.isOpen)return;this.isOpen=false;if(this.hasOpened){this.onCloseReady();return}this.listenToOnce(Adapt$1,"popup:opened",(()=>{_.defer(this.onCloseReady.bind(this))}))}onCloseReady(){if(this.disableAnimation){this.$(".notify__popup").css("visibility","hidden");this.$el.css("visibility","hidden");this.remove()}else{this.$(".notify__popup").velocity({opacity:0},{duration:400,complete:()=>{this.$(".notify__popup").css("visibility","hidden")}});this.$(".notify__shadow").velocity({opacity:0},{duration:400,complete:()=>{this.$el.css("visibility","hidden");this.remove()}})}a11y$1.scrollEnable("body");$("html").removeClass("notify");a11y$1.popupClosed(this.$previousActiveElement);Adapt$1.trigger("notify:closed",this)}remove(){this.removeSubView();$(window).off("keyup",this.onKeyUp);super.remove(...arguments)}removeSubView(){if(!this.subView)return;this.subView.$el.off("resize",this.resetNotifySize);if(this.subView instanceof AdaptView$1){const views=[...this.subView.findDescendantViews(),this.subView];views.forEach((view=>{view.model.set("_isReady",false);view.remove()}))}else{this.subView.remove()}this.subView=null}});var NotifyView=__AMD("core/js/views/notifyView",class NotifyView extends Backbone.View{className(){return"notify__container"}initialize(){this._stack=[];this.notifyPushes=new NotifyPushCollection;this.listenTo(Adapt$1,{"notify:popup":this._deprecated.bind(this,"popup"),"notify:alert":this._deprecated.bind(this,"alert"),"notify:prompt":this._deprecated.bind(this,"prompt"),"notify:push":this._deprecated.bind(this,"push")});this.render()}get stack(){return this._stack}get isOpen(){return this.stack.length>0}_deprecated(type,notifyObject){logging$1.deprecated(`NOTIFY DEPRECATED: Adapt.trigger('notify:${type}', notifyObject); is no longer supported, please use notify.${type}(notifyObject);`);return this.create(notifyObject,{_type:type})}render(){const notifyTemplate=Handlebars.templates.notify;this.$el.html(notifyTemplate());this.$el.appendTo("body")}create(notifyObject,defaults){notifyObject=_.defaults({},notifyObject,defaults,{_type:"popup",_shouldRenderId:false,_isCancellable:true,_showCloseButton:true,_closeOnShadowClick:true});if(notifyObject._type==="a11y-push")notifyObject._showCloseButton=false;switch(notifyObject._type){case"a11y-push":case"push":this.notifyPushes.push(notifyObject);return}return new NotifyPopupView({model:new NotifyModel(notifyObject),notify:this})}popup(notifyObject){return this.create(notifyObject,{_type:"popup"})}alert(notifyObject){return this.create(notifyObject,{_type:"alert"})}prompt(notifyObject){return this.create(notifyObject,{_type:"prompt"})}push(notifyObject){return this.create(notifyObject,{_type:"push"})}});const notify=new NotifyView;var notify$1=__AMD("core/js/notify",notify);var RouterModel=__AMD("core/js/models/routerModel",class RouterModel extends LockingModel{defaults(){return{_canNavigate:true,_shouldNavigateFocus:true}}lockedAttributes(){return{_canNavigate:false,_shouldNavigateFocus:false}}});class Router extends Backbone.Router{routes(){return{"":"handleRoute","id/:id":"handleRoute",":pluginName(/*location)(/*action)":"handleRoute"}}initialize(_ref){let{model:model}=_ref;this.navigateToElement=this.navigateToElement.bind(this);this._isBackward=false;this.model=model;this._navigationRoot=null;this._isCircularNavigationInProgress=false;this.showLoading();this.$wrapper=$("#wrapper");this.$html=$("html");this.listenToOnce(Adapt$1,"app:dataReady",this.setDocumentTitle);this.listenTo(Adapt$1,"router:navigateTo",this.navigateToArguments)}get rootModel(){return this._navigationRoot||Adapt$1.course}set rootModel(model){this._navigationRoot=model}showLoading(){$(".js-loading").show()}hideLoading(){$(".js-loading").hide()}setDocumentTitle(){const currentModel=location$1._currentModel;const hasSubTitle=currentModel&¤tModel!==router.rootModel&¤tModel.get("title");const title=[this.rootModel.get("title"),hasSubTitle&¤tModel.get("title")].filter(Boolean).join(" | ");this.listenToOnce(Adapt$1,"contentObjectView:preRender",(()=>{const escapedTitle=$(`
${title}
`).text();document.title=escapedTitle}))}navigateToArguments(args){args=args.filter((v=>v!==null));const options={trigger:false,replace:false};if(args.length===1&&data$1.findById(args[0])){this.navigate("#/id/"+args[0],options);return}if(args.length<=3){this.navigate("#/"+args.join("/"),options);return}logging$1.deprecated("Use Backbone.history.navigate or window.location.href instead of Adapt.trigger('router:navigateTo')");this.handleRoute(...args)}handleRoute(){for(var _len=arguments.length,args=new Array(_len),_key=0;_key<_len;_key++){args[_key]=arguments[_key]}args=args.filter((v=>v!==null));if(this.model.get("_canNavigate")){this._isCircularNavigationInProgress=false}if(this._isCircularNavigationInProgress===false){Adapt$1.trigger("router:navigate",args)}if(this.model.get("_canNavigate")){this.model.set("_canNavigate",false,{pluginName:"adapt"});this._isBackward=false;if(args.length<=1){return this.handleId(...args)}return this.handlePluginRouter(...args)}if(this._isCircularNavigationInProgress){this._isCircularNavigationInProgress=false;return}this._isCircularNavigationInProgress=true;Adapt$1.trigger("router:navigationCancelled",args);Backbone.history.history[this._isBackward?"forward":"back"]();this._isBackward=false}async handlePluginRouter(pluginName,location,action){const pluginLocation=[pluginName,location&&`-${location}`,action&&`-${action}`].filter(Boolean).join("");await this.updateLocation(pluginLocation,null,null,null);Adapt$1.trigger("router:plugin:"+pluginName,pluginName,location,action);Adapt$1.trigger("router:plugin",pluginName,location,action);this.model.set("_canNavigate",true,{pluginName:"adapt"})}async handleId(id){const rootModel=router.rootModel;let model=!id?rootModel:data$1.findById(id);if(!model){this.model.set("_canNavigate",true,{pluginName:"adapt"});return}const isContentObject=model.isTypeGroup?.("contentobject");const navigateToId=model.get("_id");model=isContentObject?model:model.findAncestor("contentobject");id=model.get("_id");const isRoot=model===rootModel;if(isRoot&&Adapt$1.course.has("_start")){const startController=Adapt$1.course.get("_start");if(startController._isEnabled===true&&startController._isMenuDisabled===true){return}}if(model.get("_isLocked")&&Adapt$1.config.get("_forceRouteLocking")){logging$1.warn("Unable to navigate to locked id: "+id);this.model.set("_canNavigate",true,{pluginName:"adapt"});if(location$1._previousId===undefined){return this.navigate("#/",{trigger:true,replace:true})}return this.navigateBack()}this.showLoading();await Adapt$1.remove();const isCourse=model.isTypeGroup?.("course");const type=isCourse?"menu":model.get("_type");const newLocation=isCourse?"course":`${type}-${id}`;model.set({_isVisited:true,_isRendered:true});await this.updateLocation(newLocation,type,id,model);Adapt$1.once("contentObjectView:ready",(()=>{this.model.set("_canNavigate",true,{pluginName:"adapt"});this.handleNavigationFocus()}));Adapt$1.trigger(`router:${type} router:contentObject`,model);const ViewClass=components$1.getViewClass(model);const isMenu=model.isTypeGroup?.("menu");if(!ViewClass&&isMenu){logging$1.deprecated(`Using event based menu view instantiation for '${components$1.getViewName(model)}'`);return}if(!isMenu){_.invoke(model.getAllDescendantModels(),"checkIfResetOnRevisit");await Adapt$1.deferUntilCompletionChecked()}this.$wrapper.append(new ViewClass({model:model}).$el);if(!isContentObject&&!this.isScrolling){await this.navigateToElement("."+navigateToId,{replace:true,duration:400})}}async updateLocation(currentLocation,type,id,currentModel){location$1._previousModel=location$1._currentModel;location$1._previousId=location$1._currentId;location$1._previousContentType=location$1._contentType;location$1._currentModel=currentModel;location$1._currentId=id;location$1._contentType=type;location$1._currentLocation=currentLocation;if(type==="menu"){location$1._lastVisitedType="menu";location$1._lastVisitedMenu=id}else if(type==="page"){location$1._lastVisitedType="page";location$1._lastVisitedPage=id}this.setDocumentTitle();this.setGlobalClasses();Adapt$1.trigger("router:location",location$1);await wait$1.queue()}setGlobalClasses(){const currentModel=location$1._currentModel;const htmlClasses=currentModel?.get("_htmlClasses")||"";const classes=location$1._currentId?`location-${location$1._contentType} location-id-${location$1._currentId}`:`location-${location$1._currentLocation}`;const currentClasses=`${classes} ${htmlClasses}`;this.$html.removeClass(location$1._previousClasses).addClass(currentClasses).attr("data-location",location$1._currentLocation);this.$wrapper.removeClass().addClass(classes).attr("data-location",location$1._currentLocation);location$1._previousClasses=currentClasses}handleNavigationFocus(){if(!this.model.get("_shouldNavigateFocus"))return;a11y$1.focus("body")}navigateBack(){this._isBackward=true;Backbone.history.history.back()}navigateToCurrentRoute(force){if(!this.model.get("_canNavigate")&&!force){return}if(!location$1._currentId){return}const currentId=location$1._currentModel.get("_id");const isRoot=location$1._currentModel===this.rootModel;const route=isRoot?"#/":"#/id/"+currentId;this.navigate(route,{trigger:true,replace:true})}navigateToPreviousRoute(force){if(!this.model.get("_canNavigate")&&!force){return}const currentModel=location$1._currentModel;const previousModel=location$1._previousModel;if(!currentModel){return this.navigateBack()}if(location$1._currentModel?.isTypeGroup("menu")){return this.navigateToParent()}if(previousModel){return this.navigateBack()}this.navigateToParent()}navigateToParent(force){if(!this.model.get("_canNavigate")&&!force){return}const parentId=location$1._currentModel.get("_parentId");const parentModel=data$1.findById(parentId);const isRoot=parentModel===this.rootModel;const route=isRoot?"#/":"#/id/"+parentId;this.navigate(route,{trigger:true})}navigateToHomeRoute(force){if(!this.model.get("_canNavigate")&&!force){return}this.navigate("#/",{trigger:true})}async navigateToElement(selector){let settings=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{};const currentModelId=typeof selector==="string"&&selector.replace(/\./g,"").split(" ")[0];const isSelectorAnId=data$1.hasId(currentModelId);if(isSelectorAnId){const currentModel=data$1.findById(currentModelId);const contentObject=currentModel.isTypeGroup?.("contentobject")?currentModel:currentModel.findAncestor("contentobject");const contentObjectId=contentObject.get("_id");const isNotInCurrentContentObject=contentObjectId!==location$1._currentId;if(currentModel&&(!currentModel.get("_isRendered")||!currentModel.get("_isReady")||isNotInCurrentContentObject)){const shouldReplace=settings.replace||false;if(isNotInCurrentContentObject){this.isScrolling=true;this.navigate(`#/id/${currentModelId}`,{trigger:true,replace:shouldReplace});this.model.set("_shouldNavigateFocus",false,{pluginName:"adapt"});await new Promise((resolve=>Adapt$1.once("contentObjectView:ready",_.debounce((()=>{this.model.set("_shouldNavigateFocus",true,{pluginName:"adapt"});resolve()}),1))));this.isScrolling=false}await Adapt$1.parentView.renderTo(currentModelId)}if(currentModel&&selector===currentModel.get("_id")){selector=`.${selector}`}}const isElementUnavailable=!$(selector).length;if(isElementUnavailable){logging$1.warn(`router.navigateToElement, selector not found in document: ${selector}`);return}const newLocation=location$1._contentType?location$1._contentType:location$1._currentLocation;Adapt$1.trigger(`${newLocation}:scrollTo`,selector);const disableScrollToAnimation=Adapt$1.config.has("_disableAnimation")?Adapt$1.config.get("_disableAnimation"):false;if(disableScrollToAnimation){settings.duration=0}else if(!settings.duration){settings.duration=$.scrollTo.defaults.duration}const $wrapper=$("#wrapper");let offsetTop=-parseInt($wrapper.css("padding-top"));if($(selector).hasClass("component")){offsetTop-=$(selector).find(".aria-label").height()||0}if(!settings.offset)settings.offset={top:offsetTop,left:0};if(settings.offset.top===undefined)settings.offset.top=offsetTop;if(settings.offset.left===undefined)settings.offset.left=0;if(settings.offset.left===0)settings.axis="y";if(Adapt$1.get("_canScroll")!==false){$.scrollTo(selector,settings)}await new Promise((resolve=>{_.delay((()=>{a11y$1.focusNext(selector);Adapt$1.trigger(`${location$1}:scrolledTo`,selector);resolve()}),settings.duration+300)}))}get(){logging$1.deprecated("router.get, please use router.model.get");return this.model.get(...arguments)}set(){logging$1.deprecated("router.set, please use router.model.set");return this.model.set(...arguments)}}const router=new Router({model:new RouterModel(null,{reset:true})});var router$1=__AMD("core/js/router",router);class Scrolling extends Backbone.Controller{initialize(){this.scrollTo=this.scrollTo.bind(this);this.$html=$("html");this.isLegacyScrolling=true;Adapt$1.once("configModel:dataLoaded",this._loadConfig.bind(this))}_loadConfig(){const config=Adapt$1.config.get("_scrollingContainer");if(!config?._isEnabled)return;const limitTo=config._limitToSelector;const isIncluded=!limitTo||this.$html.is(limitTo)||this.$html.hasClass(limitTo);if(!isIncluded)return;this.isLegacyScrolling=false;this._windowScrollFix();this._addStyling();this._updateScrollbarWidth();this.listenTo(Adapt$1,"device:resize",this._updateScrollbarWidth)}_addStyling(){this.$html.addClass("adapt-scrolling")}_updateScrollbarWidth(){const $tester=$('"');$("body").append($tester);const scrollBarWidth=$tester.outerWidth()-$tester.find(".inner").outerWidth();$tester.remove();const documentStyle=document.documentElement.style;documentStyle.setProperty("--adapt-scrollbar-width",`${scrollBarWidth}px`)}_windowScrollFix(){const body=document.body;const html=Adapt$1.scrolling.$html[0];const scrollY={get:()=>body.scrollTop,set:value=>body.scrollTop=value};const scrollX={get:()=>body.scrollLeft,set:value=>body.scrollLeft=value};const scrollHeight={get:()=>body.scrollHeight,set:value=>body.scrollHeight=value};const scrollWidth={get:()=>body.scrollWidth,set:value=>body.scrollWidth=value};Object.defineProperties(window,{scrollY:scrollY,scrollX:scrollX,pageYOffset:scrollY,pageXOffset:scrollX});Object.defineProperties(html,{scrollHeight:scrollHeight,scrollWidth:scrollWidth});window.scrollTo=function(){for(var _len=arguments.length,args=new Array(_len),_key=0;_key<_len;_key++){args[_key]=arguments[_key]}const isObject=args.length===1&&typeof args[0]==="object"&&args[0]!==null;const left=(isObject?args[0].left:args[0])??null;const top=(isObject?args[0].top:args[1])??null;left!==null&&(body.scrollLeft=left);top!==null&&(body.scrollTop=top)};const MouseEvent=window.MouseEvent;Object.defineProperties(MouseEvent.prototype,{pageX:{get:function(){return this.clientX+scrollX.get()}},pageY:{get:function(){return this.clientY+scrollY.get()}}});const $window=$(window);$(document.body).on("scroll",(()=>$window.scroll()))}async scrollTo(selector){let settings=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{};logging$1.deprecated("Adapt.scrollTo and Adapt.scrolling.scrollTo, use router.navigateToElement instead.");return router$1.navigateToElement(selector,settings)}}const scrolling=new Scrolling;var scrolling$1=__AMD("core/js/scrolling",scrolling);class StartController extends Backbone.Controller{initialize(){super.initialize(...arguments);this._isSessionInProgress=false;this.model=null;this.setupListeners()}setupListeners(){this.listenTo(Adapt$1,{"adapt:start":this.onAdaptStart,"navigation:returnToStart":this.returnToStartLocation})}loadCourseData(){this.model=new LockingModel(Adapt$1.course.get("_start"))}setStartLocation(){if(!this._isSessionInProgress){this._isSessionInProgress=true;if(!this.isEnabled())return;return window.history.replaceState("","",this.getStartHash())}const hash=this.isEnabled()?this.getStartHash(false):"#/";router$1.navigate(hash,{trigger:true,replace:true})}returnToStartLocation(){const startIds=this.model.get("_startIds");if(startIds){startIds.forEach((startId=>startId._skipIfComplete=false))}window.location.hash=this.getStartHash(true)}getStartHash(alwaysForce){const startId=this.getStartId();const isRouteSpecified=window.location.href.indexOf("#")>-1;const shouldForceStartId=alwaysForce||this.model.get("_force");const shouldNavigateToStartId=startId&&(!isRouteSpecified||shouldForceStartId);if(shouldNavigateToStartId&&startId!==Adapt$1.course.get("_id"))return`#/id/${startId}`;return window.location.hash||"#/"}isEnabled(){return Boolean(this.model?.get("_isEnabled"))}getStartId(){let startId=this.model.get("_id");const startIds=this.model.get("_startIds");if(!startIds?.length)return startId;const $html=$("html");for(let i=0,l=startIds.length;i{logging$1.deprecated("Use wait.begin() as Adapt.trigger('plugin:beginWait') will be removed in the future");wait$1.begin()};const endWait=()=>{logging$1.deprecated("Use wait.end() as Adapt.trigger('plugin:endWait') will be removed in the future");wait$1.end()};const ready=()=>{if(wait$1.isWaiting()){return}const isEventListening=Adapt$1._events["plugins:ready"];if(!isEventListening){return}logging$1.deprecated("Use wait.queue(callback) as Adapt.on('plugins:ready', callback) will be removed in the future");Adapt$1.trigger("plugins:ready")};Adapt$1.listenTo(wait$1,"ready",ready);Adapt$1.on({"plugin:beginWait":beginWait,"plugin:endWait":endWait});Adapt$1.on({"drawer:remove"(){logging$1.deprecated("Use drawer.remove, Adapt.trigger('drawer:remove') will be removed in the future");drawer.remove()},"drawer:closeDrawer"(){logging$1.deprecated("Use drawer.close, Adapt.trigger('drawer:closeDrawer') will be removed in the future");drawer.close()},"drawer:triggerCustomView"(){logging$1.deprecated("Use drawer.triggerCustomView(), Adapt.trigger('drawer:triggerCustomView') will be removed in the future");drawer.triggerCustomView()}});Object.defineProperties(drawer,{triggerCustomView:{get(){a11y$1.log.deprecated("drawer.triggerCustomView has moved to drawer.openCustomView");return drawer.openCustomView}}});Object.defineProperties(Adapt$1,{accessibility:{get(){a11y$1.log.deprecated("Adapt.accessibility has moved to a11y");return a11y$1}},a11y:{get(){logging$1.deprecated("Adapt.a11y, please use core/js/a11y directly");return a11y$1}},componentStore:{get(){logging$1.deprecated("Adapt.componentStore, please use core/js/components directly");return components$1._register}},data:{get(){logging$1.deprecated("Adapt.data, please use core/js/data directly");return data$1}},device:{get(){logging$1.deprecated("device, please use core/js/device directly");return device$1}},drawer:{get(){logging$1.deprecated("Adapt.drawer, please use core/js/drawer directly");return drawer}},findById:{get(){logging$1.deprecated("Adapt.findById, please use data.findById directly");return data$1.findById}},findViewByModelId:{get(){logging$1.deprecated("Adapt.findViewByModelId, please use data.findViewByModelId directly");return data$1.findViewByModelId}},findByTrackingPosition:{get(){logging$1.deprecated("Adapt.findByTrackingPosition, please use data.findByTrackingPosition directly");return data$1.findByTrackingPosition}},getViewName:{get(){logging$1.deprecated("Adapt.getViewName, please use components.getViewName instead");return components$1.getViewName}},getViewClass:{get(){logging$1.deprecated("Adapt.getViewClass, please use components.getViewClass instead");return components$1.getViewClass}},getModelName:{get(){logging$1.deprecated("Adapt.getModelName, please use components.getModelName instead");return components$1.getModelName}},getModelClass:{get(){logging$1.deprecated("Adapt.getModelClass, please use components.getModelClass instead");return components$1.getModelClass}},location:{get(){logging$1.deprecated("Adapt.location, please use core/js/location directly");return location$1}},log:{get(){logging$1.deprecated("Adapt.log, please use core/js/logging directly");return logging$1}},mpabc:{get(){logging$1.deprecated("Adapt.mpabc, please use core/js/mpabc directly");return mpabc$1}},notify:{get(){logging$1.deprecated("Adapt.notify, please use core/js/notify directly");return notify$1}},offlineStorage:{get(){logging$1.deprecated("offlineStorage, please use src/core/offlineStorage instead");return offlineStorage$1}},navigateToElement:{get(){logging$1.deprecated("Adapt.navigateToElement, please use router.navigateToElement");return router$1.navigateToElement}},register:{get(){logging$1.deprecated("Adapt.register, please use components.register instead");return components$1.register}},router:{get(){logging$1.deprecated("Adapt.router, please use core/js/router directly");return router$1}},scrolling:{get(){logging$1.deprecated("Adapt.scrolling, please use core/js/scrolling directly");return scrolling$1}},scrollTo:{get(){logging$1.deprecated("Adapt.scrollTo, please use router.navigateToElement");return scrolling$1.scrollTo}},startController:{get(){logging$1.deprecated("Adapt.startController, please use core/js/startController directly");return startController$1}},store:{get(){logging$1.deprecated("Adapt.store, please use core/js/components directly");return components$1._register}},tracking:{get(){logging$1.deprecated("Adapt.tracking, please use core/js/tracking directly");return tracking$1}},wait:{get(){logging$1.deprecated("Adapt.wait, please use src/core/wait instead");return wait$1}}});function onRender(cb){const intercept=(object,name,mode,cb)=>object[name]=cb.bind(object,object[name],name,mode);Object.keys(Handlebars.templates).forEach((name=>{intercept(Handlebars.templates,name,"template",cb)}));Object.keys(Handlebars.partials).forEach((name=>{intercept(Handlebars.partials,name,"partial",cb)}))}onRender((function(template,name,mode){for(var _len=arguments.length,args=new Array(_len>3?_len-3:0),_key=3;_key<_len;_key++){args[_key-3]=arguments[_key]}const preRenderEvent=new TemplateRenderEvent(`${mode}:preRender`,name,mode,null,args);Adapt$1.trigger(preRenderEvent.type,preRenderEvent);const value=template(...preRenderEvent.args);const postRenderEvent=new TemplateRenderEvent(`${mode}:postRender`,name,mode,value,preRenderEvent.args);Adapt$1.trigger(postRenderEvent.type,postRenderEvent);return postRenderEvent.value}));Adapt$1.on("app:dataReady",(()=>{const config=Adapt$1.config.get("_fixes");if(config?._imgLazyLoad===false)return;applyImgLoadingFix()}));function applyImgLoadingFix(){const findImgTag=/]*)>/gi;const hasLoadingAttr=/ loading=/gi;Adapt$1.on("template:postRender partial:postRender",(event=>{const imgTagsFound=event.value.match(findImgTag);if(!imgTagsFound){return}event.value=imgTagsFound.reduce(((value,img)=>{if(hasLoadingAttr.test(img)){return value}return value.replace(img,img.replace(findImgTag,''))}),event.value)}));Adapt$1.on("reactElement:preRender",(event=>{if(event.name!=="img")return;const options=event.args[1]=event.args[1]||{};if(options&&options.hasOwnProperty("loading"))return;options.loading="eager"}))}Adapt$1.on("app:dataReady",(()=>{const config=Adapt$1.config.get("_fixes");if(config?._jsxReactHelpersHTML===false)return;applyReactHelpersHTML()}));function applyReactHelpersHTML(){Adapt$1.on("reactElement:preRender",(event=>{let[tagName,props,...children]=event.args;if(!children)return;if(!Array.isArray(children))children=[children];children=children.filter(Boolean);const hasSomeUnsafeConversions=children.some((c=>c?.__html));if(!hasSomeUnsafeConversions)return;const hasManyChildren=children.length>1;if(hasManyChildren){event.args=event.args.map((child=>{if(!child||!child.__html)return child;const attributes=Object.entries(props).map((_ref=>{let[name,value]=_ref;return`${name}="${value}"`})).join(" ");logging$1.warnOnce(`html() call should be the only child in its parent <${tagName} ${attributes}>`);return child.__html?HTMLReactParser__default["default"](child.__html):undefined}));return}props=event.args[1]=event.args[1]||{};props.dangerouslySetInnerHTML=children[0];event.args.length=2}))}Adapt$1.on("app:dataReady",(()=>{const config=Adapt$1.config.get("_fixes");if(config?._safariLabelClickBlur===false)return;applySafariLabelClickBlur()}));function onLabelClick(event){const input=document.querySelector(`[id="${event.currentTarget.getAttribute("for")}"]`);if(!input)return;event.preventDefault();input.click()}function applySafariLabelClickBlur(){Adapt$1.on("reactElement:preRender",(event=>{const[tagName,props]=event.args;if(tagName!=="label"||!Object.hasOwn(props,"htmlFor")||Object.hasOwn(props,"onClick"))return;props.onClick=onLabelClick}))}const helpers={lowercase(text){return text.toLowerCase()},capitalise(text){return text.charAt(0).toUpperCase()+text.slice(1)},inc(index){return index+1},dec(index){return index-1},odd(index){return(index+1)%2===0?"even":"odd"},equals(value,text,block){return helpers.compare.call(this,value,"==",text,block)},compare(value,operator,text,block){switch(operator){case"===":if(value===text)return block.fn?block.fn(this):true;break;case"=":case"==":if(value==text)return block.fn?block.fn(this):true;break;case">=":if(value>=text)return block.fn?block.fn(this):true;break;case"<=":if(value<=text)return block.fn?block.fn(this):true;break;case">":if(value>text)return block.fn?block.fn(this):true;break;case"<":if(value1;let description;if(hasOverride){description=override;description=helpers.compile(description,context)}else{description=this._globals._components["_"+this._component].ariaRegion;description=helpers.compile(description,override)}if(!description){return}return new Handlebars.SafeString('
'+description+"
")},a11y_text(text){logging$1.deprecated("a11y_text is no longer required. https://tink.uk/understanding-screen-reader-interaction-modes/");return text},a11y_normalize(htmls){return a11y$1.normalize.apply(a11y$1,arguments)},a11y_remove_breaks(htmls){return a11y$1.removeBreaks.apply(a11y$1,arguments)},a11y_aria_label(htmls){let values=Array.prototype.slice.call(arguments,0,-1);values=values.filter(Boolean);return new Handlebars.SafeString('
'+values.join(" ")+"
")},a11y_aria_label_relative(htmls){let values=Array.prototype.slice.call(arguments,0,-1);values=values.filter(Boolean);return new Handlebars.SafeString('
'+values.join(" ")+"
")},a11y_aria_image(texts){let values=Array.prototype.slice.call(arguments,0,-1);values=values.filter(Boolean);return new Handlebars.SafeString('')},a11y_wrap_focus(){const cfg=Adapt$1.config.get("_accessibility");if(cfg._isPopupWrapFocusEnabled===false)return"";return new Handlebars.SafeString(' ')},a11y_attrs_heading(level){logging$1.deprecated("a11y_attrs_heading, please use a11y_aria_level or a11y.ariaLevel");const resolvedLevel=a11y$1.ariaLevel({id:this._id??Array.from(arguments).lastItem?.data?.root?._id,level:level,override:this._ariaLevel});return new Handlebars.SafeString(` role="heading" aria-level="${resolvedLevel}" `)},a11y_aria_level(id,level){let override=arguments.length>2&&arguments[2]!==undefined?arguments[2]:null;const resolvedLevel=a11y$1.ariaLevel({id:id,level:level,override:override});return resolvedLevel},a11y_attrs_tabbable(){logging$1.deprecated("a11y_attrs_tabbable should not be used. tabbable elements should be natively tabbable.");return new Handlebars.SafeString(' role="region" tabindex="0" ')},a11y_alt_text(visible,alternatives){let values=Array.prototype.slice.call(arguments,1,-1);values=values.filter(Boolean);return new Handlebars.SafeString(''+values.join(" ")+"")}};Object.assign(helpers,{if_value_equals(){logging$1.deprecated("if_value_equals, use equals instead.");return helpers.equals.apply(this,arguments)},numbers(){logging$1.deprecated("numbers, use inc instead.");return helpers.inc.apply(this,arguments)},lowerCase(){logging$1.deprecated("lowerCase, use lowercase instead.");return helpers.lowercase.apply(this,arguments)}});for(const name in helpers){Handlebars.registerHelper(name,helpers[name])}__AMD("core/js/helpers",helpers);class HeadingView extends Backbone.View{initialize(){this.listenTo(Adapt$1.parentView,"postRemove",this.remove);this.listenTo(this.model,"change:_isComplete",this.updateAria);this.render()}render(){const template=Handlebars.templates[this.constructor.template];const data=this.model.toJSON();const customHeadingType=this.$el.attr("data-a11y-heading-type");const isBackwardCompatible=[...this.$el[0].classList].every((name=>!name.includes("-inner")));data._isBackwardCompatible=isBackwardCompatible;if(customHeadingType)data._type=customHeadingType;if(data._type==="course")data._type="menu";this.$el.html(template(data));this.checkCompletion()}updateAria(){const template=Handlebars.templates[this.constructor.template];const data=this.model.toJSON();const $rendered=$(`
${template(data)}
`);this.$(".aria-label").html($rendered.find(".aria-label").html());this.checkCompletion()}checkCompletion(){const isComplete=this.model.get("_isComplete");if(isComplete===undefined)return;this.$el.toggleClass("is-complete",isComplete).toggleClass("is-incomplete",!isComplete)}}HeadingView.template="heading";var HeadingView$1=__AMD("core/js/views/headingView",HeadingView);class Headings extends Backbone.Controller{initialize(){this.listenTo(Adapt$1,"view:render",this.onViewRender)}onViewRender(view){const $headingSeats=view.$(".js-heading");$headingSeats.each(((index,el)=>new HeadingView$1({el:el,model:view.model})))}}__AMD("core/js/headings",new Headings);var NavigationButtonView=__AMD("core/js/views/NavigationButtonView",class NavigationButtonView extends Backbone.View{tagName(){return"button"}events(){return{click:"triggerEvent"}}className(){if(this.isInjectedButton){return[this.model.get("_showLabel")===false&&"hide-label"].filter(Boolean).join(" ")}return["btn-icon nav__btn",this.model.get("_classes"),this.model.get("_showLabel")===false&&"hide-label"].filter(Boolean).join(" ")}attributes(){const attributes=this.model.toJSON();if(this.isInjectedButton){return{name:attributes._id,"data-order":attributes._order,"data-event":attributes._event}}return{name:attributes._id,role:attributes._role==="button"?undefined:attributes._role,"aria-label":attributes.ariaLabel,"data-order":attributes._order,"data-event":attributes._event}}initialize(_ref){let{el:el}=_ref;if(el){this.isInjectedButton=true}else{this.isJSX=(this.constructor.template||"").includes(".jsx")}this._classSet=new Set(_.result(this,"className").trim().split(/\s+/));this._attributes=_.result(this,"attributes");this.listenTo(this.model,"change",this.changed);this.render()}static get template(){return"navButton.jsx"}render(){if(this.isInjectedButton){this.changed()}else if(this.isJSX){this.changed()}else{const data=this.model.toJSON();data.view=this;const template=Handlebars.templates[this.constructor.template];this.$el.html(template(data))}return this}updateViewProperties(){const classesToAdd=_.result(this,"className").trim().split(/\s+/);classesToAdd.forEach((i=>this._classSet.add(i)));const classesToRemove=[...this._classSet].filter((i=>!classesToAdd.includes(i)));classesToRemove.forEach((i=>this._classSet.delete(i)));Object.keys(this._attributes).forEach((name=>this.$el.removeAttr(name)));Object.entries(_.result(this,"attributes")).forEach((_ref2=>{let[name,value]=_ref2;return this.$el.attr(name,value)}));this.$el.removeClass(classesToRemove).addClass(classesToAdd)}injectLabel(){const textLabel=this.$el.find("> .nav__btn-label");const ariaLabel=this.$el.attr("aria-label")??this.$el.find(".aria-label").text();const text=this.model.get("text");const output=compile(text??"",{ariaLabel:ariaLabel});if(!textLabel.length){this.$el.append(``);return}textLabel.html(output)}changed(){let eventName=arguments.length>0&&arguments[0]!==undefined?arguments[0]:null;if(typeof eventName==="string"&&eventName.startsWith("bubble")){return}if(this.isInjectedButton){this.updateViewProperties();this.injectLabel();return}if(!this.isJSX){this.updateViewProperties();return}const props={...this,...this.model.toJSON(),_globals:Adapt$1.course?.get("_globals")};const Template=templates[this.constructor.template.replace(".jsx","")];this.updateViewProperties();ReactDOM__default["default"].render(React__default["default"].createElement(Template,props),this.el)}triggerEvent(event){event.preventDefault();const currentEvent=$(event.currentTarget).attr("data-event");if(!currentEvent)return;Adapt$1.trigger("navigation:"+currentEvent);switch(currentEvent){case"backButton":router$1.navigateToPreviousRoute();break;case"homeButton":router$1.navigateToHomeRoute();break;case"parentButton":router$1.navigateToParent();break;case"skipNavigation":_.delay((()=>{a11y$1.focusFirst("."+location$1._contentType)}),250);break;case"returnToStart":startController$1.returnToStartLocation();break}}remove(){this._isRemoved=true;this.stopListening();wait$1.for((end=>{if(this.isJSX){ReactDOM__default["default"].unmountComponentAtNode(this.el)}super.remove();end()}));return this}});var NavigationButtonModel=__AMD("core/js/models/NavigationButtonModel",class NavigationButtonModel extends LockingModel{defaults(){return{_id:"",_classes:"",_iconClasses:"",_order:0,_event:"",_showLabel:null,_role:"button",ariaLabel:"",text:"{{ariaLabel}}"}}});class NavigationView extends Backbone.View{className(){return["nav",this.model?.get("_showLabel")===true?"show-label":"hide-label",`show-label-${this.model?.get("_showLabelAtWidth")||"medium"}`,`has-label-${this.model?.get("_labelPosition")||"auto"}`].filter(Boolean).join(" ")}attributes(){return{role:"navigation"}}get buttons(){return this._buttons=this._buttons||[]}set buttons(value){this._buttons=value}initialize(){___default["default"].bindAll(this,"sortNavigationButtons");this._classSet=new Set(___default["default"].result(this,"className").trim().split(/\s+/))}start(model){tooltips$1.register({_id:"back",...Adapt$1.course.get("_globals")?._extensions?._navigation?._backNavTooltip||{}});this.model=model;this.listenTo(model,"change",this.update);this.listenToOnce(Adapt$1,"courseModel:dataLoading",this.remove);this.listenTo(Adapt$1,{"router:contentObject":this.hideNavigationButton,"adapt:preInitialize device:resize":this.onDeviceResize});this.update();this.preRender()}update(){this.updateViewProperties();this.onDeviceResize()}onDeviceResize(){let{_navigationAlignment:_navigationAlignment="top",_isBottomOnTouchDevices:_isBottomOnTouchDevices=false}=this.model.toJSON();const $html=$("html");const isBottomOnTouchDevices=device$1.touch&&_isBottomOnTouchDevices;if(isBottomOnTouchDevices)_navigationAlignment="bottom";$html.removeClass("is-nav-top is-nav-bottom").addClass("is-nav-"+_navigationAlignment)}preRender(){Adapt$1.trigger("navigationView:preRender",this);this.render()}render(){const template=Handlebars.templates[this.constructor.template];this.$el.html(template({_config:Adapt$1.config.toJSON(),_globals:Adapt$1.course.get("_globals"),_accessibility:Adapt$1.config.get("_accessibility")})).insertBefore("#app");this.sortNavigationButtons();___default["default"].defer((()=>{Adapt$1.trigger("navigationView:postRender navigation:ready",this)}));return this}updateViewProperties(){const classesToAdd=___default["default"].result(this,"className").trim().split(/\s+/);classesToAdd.forEach((i=>this._classSet.add(i)));const classesToRemove=[...this._classSet].filter((i=>!classesToAdd.includes(i)));classesToRemove.forEach((i=>this._classSet.delete(i)));this._setAttributes({...___default["default"].result(this,"attributes"),id:___default["default"].result(this,"id")});this.$el.removeClass(classesToRemove).addClass(classesToAdd)}listenForInjectedButtons(){this.observer=this.observer||new MutationObserver(this.sortNavigationButtons);this.observer.observe(this.$(".nav__inner")[0],{childList:true,attributes:true,subtree:true})}sortNavigationButtons(changed){if(Array.isArray(changed)){const changes=Object.entries(changed.reduce(((changes,change)=>{const changeTypeName=`${change.type}.${change.attributeName}`;changes[changeTypeName]=changes[changeTypeName]||0;changes[changeTypeName]++;return changes}),{}));const shouldIgnore=changes.every((_ref=>{let[key]=_ref;return["attributes.data-a11y-force-focus","attributes.tabindex","attributes.aria-hidden","attributes.aria-expanded"].includes(key)}));if(shouldIgnore)return}this.observer?.disconnect();const $container=this.$(".nav__inner");const items=[...$container[0].children];const identifiers={".js-nav-drawer-btn":"drawer",".js-nav-back-btn":"back",".js-nav-home-btn":"home","*":null};items.forEach((el=>{const $el=$(el);if($el.is(".nav__spacer"))return;const foundId=($el.attr("name")??Object.entries(identifiers).find((_ref2=>{let[classes]=_ref2;return $el.is(classes)}))?.[1])||$el.attr("class");const attributes={_id:foundId,_order:parseFloat($el.attr("data-order")||0),_event:$el.attr("data-event")};const existingButton=this.getButton(attributes._id);if(existingButton){if(!existingButton.isInjectedButton)return;if(existingButton.el!==el){existingButton.undelegateEvents();existingButton.el=el;existingButton.$el=$(el);existingButton.delegateEvents()}existingButton.model.set(attributes);existingButton.changed();return}const navigationButtonModel=new NavigationButtonModel(attributes);this.addButton(new NavigationButtonView({el:el,model:navigationButtonModel}))}));const focusElement=document.activeElement;items.sort(((a,b)=>parseFloat($(a).attr("data-order")||0)-parseFloat($(b).attr("data-order")||0)));let indexOfFocused=items.findIndex((el=>el===focusElement));if(indexOfFocused===-1)indexOfFocused=Infinity;const before=items.slice(0,indexOfFocused);const after=items.slice(indexOfFocused+1);before.reverse().forEach((el=>$container.prepend(el)));after.forEach((el=>$container.append(el)));this.observer?.takeRecords();this.listenForInjectedButtons()}hideNavigationButton(contentObjectModel){const shouldHide=contentObjectModel.get("_type")==="course";this.$(".nav__back-btn, .nav__home-btn").toggleClass("u-display-none",shouldHide)}showNavigationButton(){this.$(".nav__back-btn, .nav__home-btn").removeClass("u-display-none")}addButton(buttonView){this.buttons.push(buttonView);const container=this.$(".nav__inner");container.append(buttonView.$el);this.listenTo(buttonView.model,"change",this.sortNavigationButtons);if(buttonView.isInjectedButton)return;this.sortNavigationButtons()}getButton(id){return this.buttons.find((button=>button.model.get("_id")===id))}removeButton(buttonView){this.buttons=this.buttons.filter((view=>view!==buttonView));this.stopListening(buttonView.model,"change",this.sortNavigationButtons);if(buttonView.isInjectedButton){buttonView.$el.remove();return}buttonView.remove()}}NavigationView.template="nav";var NavigationView$1=__AMD("core/js/views/navigationView",NavigationView);var NavigationModel=__AMD("core/js/models/NavigationModel",class NavigationModel extends LockingModel{defaults(){return{_navigationAlignment:"top",_isBottomOnTouchDevices:false,_showLabel:false,_showLabelAtWidth:"medium",_labelPosition:"auto"}}});class NavigationController extends Backbone.Controller{initialize(){this.navigation=new NavigationView$1;this.listenTo(Adapt$1,"adapt:preInitialize",this.addNavigationBar)}addNavigationBar(){const adaptConfig=Adapt$1.course.get("_navigation");if(adaptConfig?._isDefaultNavigationDisabled){Adapt$1.trigger("navigation:initialize");return}this.navigation.start(new NavigationModel(adaptConfig))}}__AMD("core/js/navigation",Adapt$1.navigation=(new NavigationController).navigation);class DOMElementModificationEventObject{constructor(){let{type:type,target:target,changedAttributes:changedAttributes,previousAttributes:previousAttributes}=arguments.length>0&&arguments[0]!==undefined?arguments[0]:{};this.type=type;this.target=target;this.changedAttributes=changedAttributes;this.previousAttributes=previousAttributes}}class DOMElementModifications extends Backbone__default["default"].View{initialize(){let{el:el=document.documentElement,watchImmediateChildrenOnly:watchImmediateChildrenOnly=true,watchAttributes:watchAttributes=false}=arguments.length>0&&arguments[0]!==undefined?arguments[0]:{};this._onMutation=this._onMutation.bind(this);this.el=el;this._watch={childList:true,subtree:!watchImmediateChildrenOnly,attributes:watchAttributes,attributeOldValue:watchAttributes}}startWatching(){this._calculateElementFilters();if(this._observer)return this;this._observer=new MutationObserver(this._onMutation);this._observer.observe(this.el,this._watch);return this}static calculateEventNames(eventNames){const firstEvent=eventNames[0];const isNew=firstEvent==="added";const lastRemovedIndex=eventNames.lastIndexOf("removed");const lastAddedIndex=eventNames.lastIndexOf("added");const hasReAdded=lastRemovedIndex!==-1&&lastAddedIndex!==-1&&lastRemovedIndex{let addedNodes=Array.from(item.addedNodes);let removedNodes=Array.from(item.removedNodes);const allNodes=[...addedNodes,...removedNodes];const isTextChange=allNodes.some((node=>node.nodeType===Node.TEXT_NODE));const isAttributeChange=this._watch.attributes&&item.type==="attributes";addedNodes=addedNodes.filter((node=>node.nodeType===Node.ELEMENT_NODE));removedNodes=removedNodes.filter((node=>node.nodeType===Node.ELEMENT_NODE));const isAddedEvent=Boolean(addedNodes.length);const isRemovedEvent=Boolean(removedNodes.length);const isChangedEvent=Boolean(isAttributeChange||isTextChange);if(!isAddedEvent&&!isRemovedEvent&&!isChangedEvent)return changes;const targetNodes=isChangedEvent?[item.target]:Array.from(isAddedEvent?addedNodes:removedNodes).flatMap((node=>this._watch.subtree?[node,...node.querySelectorAll("*")]:[node]));const eventName=isAddedEvent?"added":isRemovedEvent?"removed":"changed";targetNodes.forEach((target=>{const value=changes.get(target)??{eventNames:[],previousAttributes:this._watch.attributes?{}:null};value.eventNames.push(eventName);const shouldRecordAttribute=isChangedEvent&&item.attributeName;if(shouldRecordAttribute)value.previousAttributes[item.attributeName]??=item.oldValue;changes.set(target,value)}));return changes}),new Map);for(let[target,{eventNames:eventNames,previousAttributes:previousAttributes}]of reducedChanges.entries()){eventNames=DOMElementModifications.calculateEventNames(eventNames);eventNames.forEach((eventName=>{const isNodeAdded=eventName==="added";const isNodeRemoved=eventName==="removed";const selectorFilters=isNodeAdded?this._addedFilters:isNodeRemoved?this._removedFilters:this._changedFilters;if(!selectorFilters.length)return;const selectors=selectorFilters.map((filter=>filter(target))).filter(Boolean);if(!selectors.length)return;const changedAttributes=this._watch.attributes?Object.keys(previousAttributes).reduce(((attributes,attrName)=>{attributes[attrName]=target.getAttribute(attrName);return attributes}),{}):null;const EventObject=new DOMElementModificationEventObject({type:eventName,target:target,changedAttributes:changedAttributes,previousAttributes:previousAttributes});selectors.forEach((selector=>{if(selector&&selector!==true){if(eventName!=="changed")this.trigger(`${eventName}:${selector}`,EventObject);this.trigger(`changed:${selector}`,EventObject)}if(eventName!=="changed")this.trigger(`${eventName}`,EventObject);this.trigger("changed",EventObject)}))}))}}stopWatching(){this._calculateElementFilters();if(!this._observer)return this;this._observer.disconnect();this._observer=null;return this}_calculateElementFilters(){const selectorFilter=selector=>{const eventWithNoSelector=selector===undefined;if(eventWithNoSelector)return()=>true;if(Element.prototype.matches){return new Function("el",`return el.matches("${selector}") && "${selector}";`)}return new Function("el",`return $(el).is("${selector}") && "${selector}";`)};const eventNames=Object.keys(this._events);const eventNameParts=eventNames.map((name=>name.split(":")));const changedSelectors=eventNameParts.filter((parts=>parts[0]==="changed")).map((parts=>parts[1]));const addedSelectors=eventNameParts.filter((parts=>parts[0]==="added")).map((parts=>parts[1]));const removedSelectors=eventNameParts.filter((parts=>parts[0]==="removed")).map((parts=>parts[1]));this._changedFilters=changedSelectors.map(selectorFilter);this._addedFilters=addedSelectors.map(selectorFilter).concat(this._changedFilters);this._removedFilters=removedSelectors.map(selectorFilter).concat(this._changedFilters)}on(){const rtn=super.on(...arguments);if(this.shouldListen)this.startWatching();return rtn}once(){const rtn=super.once(...arguments);if(this.shouldListen)this.startWatching();return rtn}listenToOnce(){const rtn=super.listenToOnce(...arguments);if(this.shouldListen)this.startWatching();return rtn}off(){const rtn=super.off(...arguments);if(!this.shouldListen)this.stopWatching();return rtn}stopListening(){const rtn=super.stopListening(...arguments);if(!this.shouldListen)this.stopWatching();return rtn}get shouldListen(){return Boolean(Object.keys(this._events).length||Object.keys(this._listeners).length)}}const documentModifications=new DOMElementModifications({el:document.documentElement,watchImmediateChildrenOnly:false,watchAttributes:true});documentModifications.DOMElementModifications=DOMElementModifications;__AMD("core/js/DOMElementModifications",documentModifications);var AssessmentResultsModel=__AMD("components/adapt-contrib-assessmentResults/js/assessmentResultsModel",class AssessmentResultsModel extends ComponentModel$1{init(){this.set("originalBody",this.get("body"));this.listenTo(Adapt$1,{"assessments:complete":this.onAssessmentComplete,"assessments:reset":this.onAssessmentReset});super.init(...arguments)}checkIfAssessmentComplete(){if(!Adapt$1.assessment||this.get("_assessmentId")===undefined){return}const assessmentModel=Adapt$1.assessment.get(this.get("_assessmentId"));if(!assessmentModel||assessmentModel.length===0)return;const state=assessmentModel.getState();const isResetOnRevisit=assessmentModel.get("_assessment")._isResetOnRevisit;if(state.isComplete&&(!state.allowResetIfPassed||!isResetOnRevisit)){this.onAssessmentComplete(state);return}this.setVisibility()}onAssessmentComplete(state){if(this.get("_assessmentId")===undefined||this.get("_assessmentId")!==state.id)return;this._state=state;this.set({attempts:state.attempts,attemptsSpent:state.attemptsSpent,attemptsLeft:state.attemptsLeft,score:state.score,scoreAsPercent:state.scoreAsPercent,maxScore:state.maxScore,isPass:state.isPass});this.setFeedbackBand(state);this.checkRetryEnabled(state);this.setFeedbackText();this.toggleVisibility(true)}setFeedbackBand(state){const scoreProp=state.isPercentageBased?"scoreAsPercent":"score";const bands=_.sortBy(this.get("_bands"),"_score");for(let i=bands.length-1;i>=0;i--){const isScoreInBandRange=state[scoreProp]>=bands[i]._score;if(!isScoreInBandRange)continue;this.set("_feedbackBand",bands[i]);break}}checkRetryEnabled(state){const assessmentModel=Adapt$1.assessment.get(state.id);if(!assessmentModel.canResetInPage())return false;const feedbackBand=this.get("_feedbackBand");const isRetryEnabled=(feedbackBand&&feedbackBand._allowRetry)!==false;const isAttemptsLeft=state.attemptsLeft>0||state.attemptsLeft==="infinite";const showRetry=isRetryEnabled&&isAttemptsLeft&&(!state.isPass||state.allowResetIfPassed);this.set({_isRetryEnabled:showRetry,retryFeedback:showRetry?this.get("_retry").feedback:""})}setFeedbackText(){const feedbackBand=this.get("_feedbackBand");const feedback=feedbackBand?Handlebars.compile(feedbackBand.feedback)(this.toJSON()):"";this.set({feedback:feedback,body:this.get("_completionBody")})}setVisibility(){if(!Adapt$1.assessment)return;const assessmentModel=Adapt$1.assessment.get(this.get("_assessmentId"));if(!assessmentModel||assessmentModel.length===0)return;const state=assessmentModel.getState();const isAttemptInProgress=state.attemptInProgress;const isComplete=!isAttemptInProgress&&state.isComplete;const isVisibleBeforeCompletion=this.get("_isVisibleBeforeCompletion")||false;const isVisible=isVisibleBeforeCompletion||isComplete;this.toggleVisibility(isVisible)}toggleVisibility(isVisible){if(isVisible===undefined){isVisible=!this.get("_isVisible")}this.set("_isVisible",isVisible,{pluginName:"assessmentResults"})}checkCompletion(){if(this.get("_setCompletionOn")==="pass"&&!this.get("isPass")){return}this.setCompletionStatus()}onAssessmentReset(state){if(this.get("_assessmentId")===undefined||this.get("_assessmentId")!==state.id)return;let resetType=this.get("_resetType");if(!resetType||resetType==="inherit"){resetType=state.resetType||"hard"}this.reset(resetType,true)}reset(){this.set({body:this.get("originalBody"),state:null,feedback:"",_feedbackBand:null,retryFeedback:"",_isRetryEnabled:false});super.reset(...arguments)}});class ComponentView extends AdaptView$1{attributes(){if(!this.model.get("_isA11yRegionEnabled")){return AdaptView$1.resultExtend("attributes",{},this)}return AdaptView$1.resultExtend("attributes",{"aria-labelledby":this.model.get("_id")+"-heading",role:"region"},this)}className(){return["component",this.model.get("_component").toLowerCase(),this.model.get("_id"),this.model.get("_classes"),this.setVisibility(),this.setHidden(),"is-"+this.model.get("_layout"),this.model.get("_isComplete")?"is-complete":"",this.model.get("_isOptional")?"is-optional":""].join(" ")}renderState(){logging$1.removed("renderState is removed and moved to item title")}setupInviewCompletion(){let inviewElementSelector=arguments.length>0&&arguments[0]!==undefined?arguments[0]:".component__inner";let callback=arguments.length>1&&arguments[1]!==undefined?arguments[1]:this.setCompletionStatus;this.$inviewElement=this.$(inviewElementSelector);this.inviewCallback=callback;this.$inviewElement.on("inview.componentView",this.onInview.bind(this))}removeInviewListener(){if(!this.$inviewElement)return;this.$inviewElement.off("inview.componentView");this.$inviewElement=null}onInview(event,visible,visiblePartX,visiblePartY){if(!visible)return;switch(visiblePartY){case"top":this.hasSeenTop=true;break;case"bottom":this.hasSeenBottom=true;break;case"both":this.hasSeenTop=this.hasSeenBottom=true}if(!this.hasSeenTop||!this.hasSeenBottom)return;this.inviewCallback();if(this.model.get("_isComplete")){this.removeInviewListener()}}postRender(){}remove(){this.removeInviewListener();super.remove()}}ComponentView.type="component";var ComponentView$1=__AMD("core/js/views/componentView",ComponentView);class AssessmentResultsView extends ComponentView$1{events(){return{"click .js-assessment-retry-btn":"onRetryClicked"}}preRender(){this.model.setLocking("_isVisible",false);this.listenTo(Adapt$1.parentView,"preRemove",(()=>{this.model.unsetLocking("_isVisible")}));this.listenTo(this.model,{"change:_feedbackBand":this.addClassesToArticle,"change:body":this.render})}postRender(){this.model.checkIfAssessmentComplete();this.setReadyStatus();this.setupInviewCompletion(".component__inner",this.model.checkCompletion.bind(this.model))}onRetryClicked(){const state=this.model._state;Adapt$1.assessment.get(state.id).reset(null,(wasReset=>{if(!wasReset)return;if(this.model.get("_retry")._routeToAssessment!==true)return;router$1.navigateToElement(`.${state.articleId}`)}))}addClassesToArticle(model,value){if(!value?._classes)return;this.$el.parents(".article").addClass(value._classes)}}AssessmentResultsView.template="assessmentResults.jsx";var AssessmentResultsView$1=__AMD("components/adapt-contrib-assessmentResults/js/assessmentResultsView",AssessmentResultsView);__AMD("components/adapt-contrib-assessmentResults/js/adapt-contrib-assessmentResults",components$1.register("assessmentResults",{model:AssessmentResultsModel,view:AssessmentResultsView$1}));class GraphicView extends ComponentView$1{className(){return[super.className(),this.model.get("_isScrollable")&&"is-scrollable"].filter(Boolean).join(" ")}events(){return{"click .js-graphic-link":"onClick","keydown .js-graphic-scrollbar":"onKeyDown"}}postRender(){this.$(".graphic__widget").imageready((()=>{this.setReadyStatus();this.setupInviewCompletion(".graphic__widget");this.setupScrollable()}))}setupScrollable(){if(!this.model.get("_isScrollable"))return;this.onScroll=_.debounce(this.onScroll.bind(this),17);const $scrollbar=this.$(".js-graphic-scrollbar");const $scrollContainer=this.$(`#${$scrollbar.attr("aria-controls")}`);$scrollContainer.on("scroll",this.onScroll);this.onKeyDown()}onScroll(event){if(!this.model.get("_isScrollable"))return;const $scrollbar=this.$(".js-graphic-scrollbar");const $scrollContainer=this.$(`#${$scrollbar.attr("aria-controls")}`);const{clientWidth:clientWidth,scrollWidth:scrollWidth}=$scrollContainer[0];const scrollableWidth=scrollWidth-clientWidth;const left=$scrollContainer.scrollLeft();const calculatedScrollPercent=parseInt(left/scrollableWidth*100);this.model.set("_scrollPercent",calculatedScrollPercent)}onKeyDown(event){if(!this.model.get("_isScrollable"))return;const $scrollbar=this.$(".js-graphic-scrollbar");const $scrollContainer=this.$(`#${$scrollbar.attr("aria-controls")}`);const{clientWidth:clientWidth,scrollWidth:scrollWidth}=$scrollContainer[0];const scrollableWidth=scrollWidth-clientWidth;const step=clientWidth*.1;let left=$scrollContainer.scrollLeft();const calculatedScrollPercent=parseInt(left/scrollableWidth*100);const definedScrollPercent=this.model.get("_scrollPercent")??0;if(definedScrollPercent!==calculatedScrollPercent){left=definedScrollPercent/100*scrollableWidth}switch(event?.which){case 37:left-=step;break;case 39:left+=step;break}left=_.max([0,_.min([scrollableWidth,left])]);$scrollContainer.scrollLeft(left)}onClick(event){if(event)event.preventDefault();const item=this.model.get("_graphic");const{_url:url,_target:target="_blank"}=item;const isNewWindow=target!=="_self";if(isNewWindow)return window.open(url,target);const isRouterNavigation=url.substr(0,1)==="#";if(isRouterNavigation)return Backbone.history.navigate(url,{trigger:true});window.location.href=url}preRemove(){if(!this.model.get("_isScrollable"))return;const $scrollbar=this.$(".js-graphic-scrollbar");const $scrollContainer=this.$(`#${$scrollbar.attr("aria-controls")}`);$scrollContainer.off("scroll",this.onScroll)}}GraphicView.template="graphic.jsx";var GraphicView$1=__AMD("components/adapt-contrib-graphic/js/GraphicView",GraphicView);var GraphicModel=__AMD("components/adapt-contrib-graphic/js/GraphicModel",class GraphicModel extends ComponentModel$1{init(){this.set("_scrollPercent",this.get("_defaultScrollPercent"))}});__AMD("components/adapt-contrib-graphic/js/adapt-contrib-graphic",components$1.register("graphic",{model:GraphicModel,view:GraphicView$1}));const BUTTON_STATE=ENUM(["SUBMIT","CORRECT","INCORRECT","SHOW_CORRECT_ANSWER","HIDE_CORRECT_ANSWER","SHOW_FEEDBACK","RESET"]);var BUTTON_STATE$1=__AMD("core/js/enums/buttonStateEnum",BUTTON_STATE);const textPropertyName={SUBMIT:"submit",CORRECT:"correct",INCORRECT:"incorrect",SHOW_CORRECT_ANSWER:"showCorrectAnswer",HIDE_CORRECT_ANSWER:"hideCorrectAnswer",SHOW_FEEDBACK:"showFeedback",RESET:"reset"};var ButtonsView=__AMD("core/js/views/buttonsView",class ButtonsView extends Backbone.View{initialize(options){this.parent=options.parent;this.listenTo(Adapt$1.parentView,"postRemove",this.remove);this.listenTo(this.model,{"change:_buttonState":this.onButtonStateChanged,"change:feedbackMessage":this.onFeedbackMessageChanged,"change:feedbackTitle":this.onFeedbackMessageChanged,"change:_attemptsLeft":this.onAttemptsChanged,"change:_canSubmit":this.onCanSubmitChange});this.render()}events(){return{"click .js-btn-action":"onActionClicked","click .js-btn-feedback":"onFeedbackClicked"}}render(){const data=this.model.toJSON();const template=Handlebars.templates.buttons;_.defer((()=>{this.postRender();Adapt$1.trigger("buttonsView:postRender",this)}));this.$el.html(template(data))}postRender(){this.refresh()}checkResetSubmittedState(){const isSubmitted=this.model.get("_isSubmitted");if(isSubmitted){this.$el.addClass("is-submitted");return}this.$(".js-btn-marking, .js-btn-marking-label").removeClass("is-incorrect is-correct").addClass("u-display-none");this.$el.removeClass("is-submitted");this.model.set("feedbackMessage",undefined);this.disableFeedbackButton()}onActionClicked(){const buttonState=BUTTON_STATE$1(this.model.get("_buttonState"));this.trigger("buttons:stateUpdate",buttonState);this.checkResetSubmittedState();if(buttonState===BUTTON_STATE$1.SHOW_CORRECT_ANSWER){const correctAnswer=this.model.getCorrectAnswerAsText?.();this.updateAnswerLiveRegion(correctAnswer)}if(buttonState===BUTTON_STATE$1.HIDE_CORRECT_ANSWER){const userAnswer=this.model.getUserAnswerAsText?.();this.updateAnswerLiveRegion(userAnswer)}}onFeedbackClicked(){this.trigger("buttons:stateUpdate",BUTTON_STATE$1.SHOW_FEEDBACK)}onFeedbackMessageChanged(model,changedAttribute){if(!changedAttribute)return;this.enableFeedbackButton()}enableFeedbackButton(){if(!this.model.get("_canShowFeedback"))return;a11y$1.toggleEnabled(this.$(".js-btn-feedback"),true)}disableFeedbackButton(){a11y$1.toggleEnabled(this.$(".js-btn-feedback"),false)}onCanSubmitChange(){this.onButtonStateChanged(this.model,this.model.get("_buttonState"))}onButtonStateChanged(model,changedAttribute){this.updateAttemptsCount();const $buttonsAction=this.$(".js-btn-action");const buttonState=BUTTON_STATE$1(changedAttribute);if(!buttonState){return logging$1.error(`No button state found for '${changedAttribute}'`)}if(changedAttribute===BUTTON_STATE$1.CORRECT||changedAttribute===BUTTON_STATE$1.INCORRECT){a11y$1.toggleEnabled($buttonsAction,false);return}const propertyName=textPropertyName[buttonState.asString];const ariaLabel=this.model.get("_buttons")["_"+propertyName].ariaLabel;const buttonText=this.model.get("_buttons")["_"+propertyName].buttonText;a11y$1.toggleEnabled($buttonsAction,this.model.get("_canSubmit"));$buttonsAction.html(buttonText).attr("aria-label",ariaLabel)}checkFeedbackState(){const canShowFeedback=this.model.get("_canShowFeedback");const canShowMarking=this.model.get("_canShowMarking");this.$(".js-btn-action, .js-btn-marking").toggleClass("is-full-width",!canShowFeedback);this.$(".js-btn-feedback").toggleClass("u-display-none",!canShowFeedback);this.$(".js-btn-marking, .js-btn-marking-label").toggleClass("u-display-none",!canShowMarking)}updateAttemptsCount(){const isInteractionComplete=this.model.get("_isInteractionComplete");const attemptsLeft=this.model.get("_attemptsLeft")?this.model.get("_attemptsLeft"):this.model.get("_attempts");const shouldDisplayAttempts=this.model.get("_shouldDisplayAttempts");let attemptsString;this.checkResetSubmittedState();if(!isInteractionComplete&&attemptsLeft>=0){attemptsString=attemptsLeft+" ";attemptsString+=attemptsLeft===1?this.model.get("_buttons").remainingAttemptText:this.model.get("_buttons").remainingAttemptsText}else{this.$(".js-display-attempts").addClass("u-visibility-hidden");this.showMarking()}if(shouldDisplayAttempts){this.$(".js-insert-attempts-string").html(attemptsString)}}updateAnswerLiveRegion(answer){if(!answer)return;this.$(".js-answer-live-region").html(answer)}showMarking(){if(!this.model.shouldShowMarking)return;const isCorrect=this.model.get("_isCorrect");const ariaLabels=Adapt$1.course.get("_globals")._accessibility._ariaLabels;const $marking=this.$(".js-btn-marking, .js-btn-marking-label").removeClass("u-display-none").addClass(isCorrect?"is-correct":"is-incorrect");const $ariaLabel=this.$(".js-btn-marking-label");const hasSpanAriaLabel=Boolean($ariaLabel.length);if(!hasSpanAriaLabel){$marking.attr("aria-label",isCorrect?ariaLabels.answeredCorrectly:ariaLabels.answeredIncorrectly);return}$ariaLabel.html(isCorrect?ariaLabels.answeredCorrectly:ariaLabels.answeredIncorrectly)}refresh(){this.updateAttemptsCount();this.checkResetSubmittedState();this.checkFeedbackState();this.onButtonStateChanged(null,this.model.get("_buttonState"));this.onFeedbackMessageChanged(null,this.model.get("_isSubmitted"))}});class QuestionModel extends ComponentModel$1{defaults(){return ComponentModel$1.resultExtend("defaults",{_isQuestionType:true,_shouldDisplayAttempts:false,_shouldShowMarking:false,_canShowModelAnswer:true,_canShowFeedback:true,_canShowMarking:true,_canSubmit:true,_isSubmitted:false,_isCorrectAnswerShown:false,_questionWeight:Adapt$1.config.get("_questionWeight"),_hasItemScoring:false,_items:[]})}trackable(){return ComponentModel$1.resultExtend("trackable",["_isSubmitted","_score","_isCorrect","_attemptsLeft"])}trackableType(){return ComponentModel$1.resultExtend("trackableType",[Boolean,Number,Boolean,Number])}getTypeGroup(){return"question"}init(){this.setupDefaultSettings();this.setLocking("_canSubmit",true);this.updateRawScore();super.init()}setupDefaultSettings(){this.setupWeightSettings();this.setupButtonSettings()}setupButtonSettings(){const globalButtons=Adapt$1.course.get("_buttons");if(!this.has("_buttons")){this.set("_buttons",globalButtons)}else{const componentButtons=this.get("_buttons");for(const key in componentButtons){if(typeof componentButtons[key]==="object"){if(!componentButtons[key].buttonText&&globalButtons[key].buttonText){componentButtons[key].buttonText=globalButtons[key].buttonText}if(!componentButtons[key].ariaLabel&&globalButtons[key].ariaLabel){componentButtons[key].ariaLabel=globalButtons[key].ariaLabel}}if(!componentButtons[key]&&globalButtons[key]){componentButtons[key]=globalButtons[key]}}}}setupWeightSettings(){}canSubmit(){}checkCanSubmit(){this.set("_canSubmit",this.canSubmit(),{pluginName:"adapt"})}updateAttempts(){const attemptsLeft=this.get("_attemptsLeft")||this.get("_attempts");this.set("_attemptsLeft",attemptsLeft-1)}setQuestionAsSubmitted(){this.set({_isEnabled:false,_isSubmitted:true,_shouldShowMarking:this.shouldShowMarking})}markQuestion(){this.set({_isCorrect:this.isCorrect(),_isPartlyCorrect:this.isPartlyCorrect()});this.updateRawScore()}isCorrect(){}isPartlyCorrect(){}setScore(){const questionWeight=this.get("_questionWeight");const answeredCorrectly=this.get("_isCorrect");const score=answeredCorrectly?questionWeight:0;this.set("_score",score)}updateRawScore(){this.set({_rawScore:this.score,_maxScore:this.maxScore,_minScore:this.minScore})}get score(){return this.get("_isCorrect")?this.maxScore:0}get maxScore(){return this.get("_questionWeight")}get minScore(){return 0}checkQuestionCompletion(){const isComplete=this.get("_isCorrect")||this.get("_attemptsLeft")===0;if(isComplete){this.setCompletionStatus()}return isComplete}updateButtons(){const isInteractionComplete=this.get("_isInteractionComplete");const isCorrect=this.get("_isCorrect");const isEnabled=this.get("_isEnabled");const buttonState=this.get("_buttonState");const canShowModelAnswer=this.get("_canShowModelAnswer");if(isInteractionComplete){if(isCorrect||!canShowModelAnswer){this.set("_buttonState",BUTTON_STATE$1.CORRECT)}else{switch(buttonState){case BUTTON_STATE$1.SUBMIT:case BUTTON_STATE$1.HIDE_CORRECT_ANSWER:this.set("_buttonState",BUTTON_STATE$1.SHOW_CORRECT_ANSWER);break;default:this.set("_buttonState",BUTTON_STATE$1.HIDE_CORRECT_ANSWER)}}}else{if(isEnabled){this.set("_buttonState",BUTTON_STATE$1.SUBMIT)}else{this.set("_buttonState",BUTTON_STATE$1.RESET)}}}getFeedback(){let feedback=arguments.length>0&&arguments[0]!==undefined?arguments[0]:this.get("_feedback");if(!feedback)return{};const isFinal=this.get("_attemptsLeft")===0;const isCorrect=this.get("_isCorrect");const correctness=isCorrect?"correct":this.isPartlyCorrect()?"partlyCorrect":"incorrect";const isLegacyConfig=typeof feedback.correct==="string"||typeof feedback._partlyCorrect==="object"||typeof feedback._incorrect==="object";const getLegacyConfigObject=()=>{const subPart=isFinal?"final":"notFinal";return{body:(isCorrect?feedback.correct:feedback[`_${correctness}`]?.[subPart]||feedback[`_${correctness}`]?.final||feedback._incorrect?.final)||""}};const getConfigObject=()=>{const subPart=isFinal?"Final":"NotFinal";return(isCorrect?feedback._correct:feedback[`_${correctness}${subPart}`]||feedback[`_${correctness}Final`]||feedback._incorrectFinal)||{}};const feedbackConfig={altTitle:feedback.altTitle||Adapt$1.course.get("_globals")._accessibility.altFeedbackTitle||"",title:feedback.title||"",_classes:feedback._classes,...isLegacyConfig?getLegacyConfigObject():getConfigObject()};if(feedbackConfig?._graphic?._src&&!feedbackConfig?._imageAlignment){feedbackConfig._imageAlignment="right"}return feedbackConfig}setupFeedback(){if(!this.has("_feedback"))return;const{altTitle:altTitle="",title:title="",body:body=""}=this.getFeedback();this.set({altFeedbackTitle:Handlebars.compile(altTitle)(this.toJSON()),feedbackTitle:Handlebars.compile(title)(this.toJSON()),feedbackMessage:Handlebars.compile(body)(this.toJSON())})}isInteractive(){return!this.get("_isComplete")||this.get("_isEnabled")&&!this.get("_isSubmitted")}checkIfResetOnRevisit(){super.checkIfResetOnRevisit();this.set("_buttonState",this.get("_isInteractionComplete")?BUTTON_STATE$1.HIDE_CORRECT_ANSWER:BUTTON_STATE$1.SUBMIT)}reset(){let type=arguments.length>0&&arguments[0]!==undefined?arguments[0]:"hard";let canReset=arguments.length>1&&arguments[1]!==undefined?arguments[1]:this.get("_canReset");const wasReset=super.reset(type,canReset);if(!wasReset)return false;const attempts=this.get("_attempts");this.set({_attemptsLeft:attempts,_isCorrect:undefined,_isPartlyCorrect:undefined,_isCorrectAnswerShown:false,_isSubmitted:false,_buttonState:BUTTON_STATE$1.SUBMIT,_shouldShowMarking:this.shouldShowMarking});return true}setQuestionAsReset(){this.set({_isEnabled:true,_isSubmitted:false,_shouldShowMarking:this.shouldShowMarking});this.resetQuestion()}resetQuestion(){}refresh(){this.trigger("question:refresh")}getButtonState(){if(this.get("_isCorrect")){return BUTTON_STATE$1.CORRECT}if(this.get("_attemptsLeft")===0){return this.get("_canShowModelAnswer")?BUTTON_STATE$1.SHOW_CORRECT_ANSWER:BUTTON_STATE$1.INCORRECT}return this.get("_isSubmitted")?BUTTON_STATE$1.RESET:BUTTON_STATE$1.SUBMIT}getInteractionObject(){return{}}getResponse(){}getResponseType(){}onSubmitted(){if(this.get("_shouldStoreAttempts"))this.addAttemptObject();this.set("_shouldShowMarking",this.shouldShowMarking)}get shouldShowMarking(){return!this.isInteractive()&&this.get("_canShowMarking")&&this.get("_isInteractionComplete")}}components$1.register("question",{model:QuestionModel});var QuestionModel$1=__AMD("core/js/models/questionModel",QuestionModel);class QuestionView extends ComponentView$1{className(){return["component","is-question",this.model.get("_component").toLowerCase(),this.model.get("_id"),this.model.get("_classes"),this.setVisibility(),"is-"+this.model.get("_layout"),this.model.get("_isComplete")?"is-complete":"",this.model.get("_isOptional")?"is-optional":"",this.model.get("_canShowModelAnswer")?"can-show-model-answer":"",this.model.get("_canShowFeedback")?"can-show-feedback":"",this.model.get("_canShowMarking")?"can-show-marking":""].join(" ")}initialize(){this.isInteractive=this.isInteractive.bind(this);super.initialize(...arguments)}isInteractive(){logging$1.deprecated("questionView.isInteractive please use this.model.isInteractive, this.model.get('_shouldShowMarking') or this.model.shouldShowMarking");return this.model.isInteractive()}preRender(){this.listenTo(this.model,"change:_isEnabled",this.onEnabledChanged);this.listenTo(this.model,"question:refresh",this.refresh);if(this.checkIfResetOnRevisit!==QuestionView.prototype.checkIfResetOnRevisit){logging$1.deprecated("QuestionView.checkIfResetOnRevisit, please use QuestionModel.checkIfResetOnRevisit")}this.checkIfResetOnRevisit();_.defer((()=>this.ensureLegacyLifecycleState()));this._runModelCompatibleFunction("setupDefaultSettings");this.setupQuestion()}onEnabledChanged(model,changedAttribute){if(!changedAttribute){this.$(".component__widget").addClass("is-disabled");this.disableQuestion()}else{this.$(".component__widget").removeClass("is-disabled");this.enableQuestion()}}disableQuestion(){}enableQuestion(){}checkIfResetOnRevisit(){const canReset=this.model.get("_canReset")!==false;const isResetOnRevisit=this.model.get("_isResetOnRevisit");if(!canReset||!isResetOnRevisit)return;if(this.resetQuestionOnRevisit===QuestionView.prototype.resetQuestionOnRevisit)return;logging$1.deprecated("QuestionView.resetQuestionOnRevisit, please QuestionModel.reset");_.defer((()=>{this.resetQuestionOnRevisit(isResetOnRevisit)}))}ensureLegacyLifecycleState(){if(this.model.get("_isSubmitted")){this.onHideCorrectAnswerClicked();return}this.onResetClicked()}resetQuestionOnRevisit(type){}setupQuestion(){}postRender(){this.addButtonsView();this.onQuestionRendered()}addButtonsView(){this.buttonsView=new ButtonsView({model:this.model,el:this.$(".btn__container")});this.listenTo(this.buttonsView,"buttons:stateUpdate",this.onButtonStateUpdate)}onButtonStateUpdate(buttonState){switch(buttonState){case BUTTON_STATE$1.SUBMIT:this.onSubmitClicked();break;case BUTTON_STATE$1.RESET:this.onResetClicked();break;case BUTTON_STATE$1.SHOW_CORRECT_ANSWER:this.onShowCorrectAnswerClicked();break;case BUTTON_STATE$1.HIDE_CORRECT_ANSWER:this.onHideCorrectAnswerClicked();break;case BUTTON_STATE$1.SHOW_FEEDBACK:this.showFeedback();break}}onQuestionRendered(){}onSubmitClicked(){const canSubmit=this._runModelCompatibleFunction("canSubmit");if(!canSubmit){this.showInstructionError();this.onCannotSubmit();return}this.stopRendering();this._runModelCompatibleFunction("updateAttempts");this._runModelCompatibleFunction("setQuestionAsSubmitted");this._runModelCompatibleFunction("storeUserAnswer");this._runModelCompatibleFunction("markQuestion","isCorrect");this._runModelCompatibleFunction("setScore");this._runModelCompatibleFunction("checkQuestionCompletion");if(this.model.shouldShowMarking){this.showMarking()}this.recordInteraction();this._runModelCompatibleFunction("setupFeedback");this.showFeedback();$(window).resize();this._runModelCompatibleFunction("updateButtons");this.startRendering();this.changed();this.model.onSubmitted();this.onSubmitted();Adapt$1.trigger("questionView:submitted",this)}showInstructionError(){Adapt$1.trigger("questionView:showInstructionError",this)}onCannotSubmit(){}onSubmitted(){}setQuestionAsSubmitted(){this.model.setQuestionAsSubmitted();this.$(".component__widget").addClass("is-submitted")}showMarking(){}checkQuestionCompletion(){const isComplete=this.model.checkQuestionCompletion();if(isComplete){this.$(".component__widget").addClass("is-complete show-user-answer")}}recordInteraction(){if(this.model.get("_recordInteraction")===true||!this.model.has("_recordInteraction")){Adapt$1.trigger("questionView:recordInteraction",this)}}showFeedback(){if(this.model.get("_canShowFeedback")){Adapt$1.trigger("questionView:showFeedback",this)}else{Adapt$1.trigger("questionView:disabledFeedback",this)}}onResetClicked(){this.setQuestionAsReset();this._runModelCompatibleFunction("resetUserAnswer");this.model.checkCanSubmit();this._runModelCompatibleFunction("updateButtons");if(!this.model.get("_isReady"))return;const currentModel=data$1.findById(location$1._currentId);if(!currentModel?.get("_isReady"))return;this.focusAfterReset()}setQuestionAsReset(){this.model.setQuestionAsReset();this.resetQuestion();this.$(".component__widget").removeClass("is-submitted")}focusAfterReset(){a11y$1.focusNext(this.$el)}resetQuestion(){}refresh(){this.model.set("_buttonState",this.model.getButtonState());if(this.model.shouldShowMarking){this.showMarking()}if(this.buttonsView){_.defer(this.buttonsView.refresh.bind(this.buttonsView))}}onShowCorrectAnswerClicked(){this.setQuestionAsShowCorrect();this._runModelCompatibleFunction("updateButtons");this.showCorrectAnswer()}setQuestionAsShowCorrect(){this.$(".component__widget").addClass("is-submitted show-correct-answer").removeClass("show-user-answer")}showCorrectAnswer(){this.model.set("_isCorrectAnswerShown",true)}onHideCorrectAnswerClicked(){this.setQuestionAsHideCorrect();this._runModelCompatibleFunction("updateButtons");this.hideCorrectAnswer()}setQuestionAsHideCorrect(){this.$(".component__widget").addClass("is-submitted show-user-answer").removeClass("show-correct-answer")}hideCorrectAnswer(){this.model.set("_isCorrectAnswerShown",false)}getLatency(){return null}_runModelCompatibleFunction(name,lookForViewOnlyFunction){return this.model[name]()}}QuestionView._isQuestionType=true;class ViewOnlyQuestionViewCompatibilityLayer extends QuestionView{getInteractionObject(){logging$1.deprecated("QuestionView.getInteractionObject, please use QuestionModel.getInteractionObject");return this.model.getInteractionObject()}getResponse(){logging$1.deprecated("QuestionView.getInteractionObject, please use QuestionModel.getInteractionObject");return this.model.getResponse()}getResponseType(){logging$1.deprecated("QuestionView.getResponseType, please use QuestionModel.getResponseType");return this.model.getResponseType()}setupDefaultSettings(){logging$1.deprecated("QuestionView.setupDefaultSettings, please use QuestionModel.setupDefaultSettings");return this.model.setupDefaultSettings()}setupButtonSettings(){logging$1.deprecated("QuestionView.setupButtonSettings, please use QuestionModel.setupButtonSettings");return this.model.setupButtonSettings()}setupWeightSettings(){logging$1.deprecated("QuestionView.setupWeightSettings, please use QuestionModel.setupWeightSettings");return this.model.setupWeightSettings()}canSubmit(){logging$1.deprecated("QuestionView.canSubmit, please use QuestionModel.canSubmit");return this.model.canSubmit()}updateAttempts(){logging$1.deprecated("QuestionView.updateAttempts, please use QuestionModel.updateAttempts");return this.model.updateAttempts()}storeUserAnswer(){logging$1.deprecated("QuestionView.storeUserAnswer, please use QuestionModel.storeUserAnswer");return this.model.storeUserAnswer()}resetUserAnswer(){logging$1.deprecated("QuestionView.resetUserAnswer, please use QuestionModel.resetUserAnswer");return this.model.resetUserAnswer()}markQuestion(){if(this._isInViewOnlyCompatibleMode("isCorrect")){if(this.isCorrect()){this.model.set("_isCorrect",true)}else{this.model.set("_isCorrect",false)}this.model.set({_rawScore:this.model.get("_isCorrect")?this.model.get("_questionWeight"):0,_maxScore:this.model.get("_questionWeight"),_minScore:0})}else{return this.model.markQuestion()}}isCorrect(){logging$1.deprecated("QuestionView.isCorrect, please use QuestionModel.isCorrect");return this.model.isCorrect()}setScore(){logging$1.deprecated("QuestionView.setScore, please use QuestionModel.setScore");return this.model.setScore()}updateButtons(){logging$1.deprecated("QuestionView.updateButtons, please use QuestionModel.updateButtons");return this.model.updateButtons()}setupFeedback(){if(this._isInViewOnlyCompatibleMode("isPartlyCorrect")){if(this.model.get("_isCorrect")){this._runModelCompatibleFunction("setupCorrectFeedback")}else if(this.isPartlyCorrect()){this._runModelCompatibleFunction("setupPartlyCorrectFeedback")}else{this._runModelCompatibleFunction("setupIncorrectFeedback")}}else{this.model.setupFeedback()}}isPartlyCorrect(){logging$1.deprecated("QuestionView.isPartlyCorrect, please use QuestionModel.isPartlyCorrect");return this.model.isPartlyCorrect()}setupCorrectFeedback(){logging$1.deprecated("QuestionView.setupCorrectFeedback, please use QuestionModel.setupCorrectFeedback");return this.model.setupCorrectFeedback()}setupPartlyCorrectFeedback(){logging$1.deprecated("QuestionView.setupPartlyCorrectFeedback, please use QuestionModel.setupPartlyCorrectFeedback");return this.model.setupPartlyCorrectFeedback()}setupIncorrectFeedback(){logging$1.deprecated("QuestionView.setupIncorrectFeedback, please use QuestionModel.setupIncorrectFeedback");return this.model.setupIncorrectFeedback()}_runModelCompatibleFunction(name,lookForViewOnlyFunction){if(this._isInViewOnlyCompatibleMode(name,lookForViewOnlyFunction)){return this[name]()}else{return this.model[name]()}}_isInViewOnlyCompatibleMode(name,lookForViewOnlyFunction){const checkForFunction=lookForViewOnlyFunction||name;if(!this.constructor.prototype[checkForFunction])return false;const hasCompatibleVersion=Object.prototype.hasOwnProperty.call(ViewOnlyQuestionViewCompatibilityLayer.prototype,checkForFunction);const usingCompatibleVersion=this.constructor.prototype[checkForFunction]===ViewOnlyQuestionViewCompatibilityLayer.prototype[checkForFunction];if(hasCompatibleVersion&&usingCompatibleVersion){switch(checkForFunction){case"setupFeedback":case"markQuestion":return true}return false}return true}}var QuestionView$1=__AMD("core/js/views/questionView",ViewOnlyQuestionViewCompatibilityLayer);class McqView extends QuestionView$1{initialize(){this.onKeyPress=this.onKeyPress.bind(this);this.onItemSelect=this.onItemSelect.bind(this);this.onItemFocus=this.onItemFocus.bind(this);this.onItemBlur=this.onItemBlur.bind(this);super.initialize(...arguments)}setupQuestion(){this.model.setupRandomisation()}onQuestionRendered(){this.setReadyStatus()}onKeyPress(event){if(event.which!==13)return;this.onItemSelect(event)}onItemFocus(event){if(!this.model.isInteractive())return;if(this.model.get("_isRadio")){this.onItemSelect(event);return}const index=parseInt($(event.currentTarget).data("adapt-index"));const item=this.model.getChildren().findWhere({_index:index});item.set("_isHighlighted",true)}onItemBlur(event){const index=$(event.currentTarget).data("adapt-index");const item=this.model.getChildren().findWhere({_index:index});item.set("_isHighlighted",false)}onItemSelect(event){if(!this.model.isInteractive())return;const index=$(event.currentTarget).data("adapt-index");const itemModel=this.model.getItem(index);let shouldSelect=!itemModel.get("_isActive");if(this.model.isSingleSelect()){shouldSelect=true;this.model.resetActiveItems()}else if(shouldSelect&&this.model.isAtActiveLimit()){this.model.getLastActiveItem().toggleActive(false)}itemModel.toggleActive(shouldSelect)}resetQuestion(){this.model.resetItems()}}McqView.template="mcq.jsx";var McqView$1=__AMD("components/adapt-contrib-mcq/js/McqView",McqView);var ItemModel=__AMD("core/js/models/itemModel",class ItemModel extends LockingModel{defaults(){return{_isActive:false,_isVisited:false,_score:0}}reset(){this.set({_isActive:false,_isVisited:false})}toggleActive(){let isActive=arguments.length>0&&arguments[0]!==undefined?arguments[0]:!this.get("_isActive");this.set("_isActive",isActive)}toggleVisited(){let isVisited=arguments.length>0&&arguments[0]!==undefined?arguments[0]:!this.get("_isVisited");this.set("_isVisited",isVisited)}});var ItemsComponentModel=__AMD("core/js/models/itemsComponentModel",class ItemsComponentModel extends ComponentModel$1{toJSON(){const json=super.toJSON();json._items=this.getChildren().toJSON();return json}init(){this.setUpItems();this.listenTo(this.getChildren(),{all:this.onAll,"change:_isActive":this.setVisitedStatus,"change:_isVisited":this.checkCompletionStatus});super.init()}restoreUserAnswers(){const booleanArray=this.get("_userAnswer");if(!booleanArray)return;this.getChildren().forEach(((child,index)=>child.set("_isVisited",booleanArray[index])))}storeUserAnswer(){const booleanArray=this.getChildren().map((child=>child.get("_isVisited")));this.set("_userAnswer",booleanArray)}setUpItems(){const items=this.get("_items")||[];items.forEach(((item,index)=>item._index=index));this.setChildren(new Backbone.Collection(items,{model:ItemModel}))}getItem(index){return this.getChildren().findWhere({_index:index})}getVisitedItems(){return this.getChildren().where({_isVisited:true})}getActiveItems(){return this.getChildren().where({_isActive:true})}getActiveItem(){return this.getChildren().findWhere({_isActive:true})}areAllItemsCompleted(){return this.getVisitedItems().length===this.getChildren().length}checkCompletionStatus(){this.setVisitedStatus();this.storeUserAnswer();if(!this.areAllItemsCompleted())return;this.setCompletionStatus()}reset(){let type=arguments.length>0&&arguments[0]!==undefined?arguments[0]:"hard";let canReset=arguments.length>1&&arguments[1]!==undefined?arguments[1]:this.get("_canReset");const wasReset=super.reset(type,canReset);if(!wasReset)return false;this.getChildren().each((item=>item.reset()));return true}resetActiveItems(){this.getChildren().each((item=>item.toggleActive(false)))}setActiveItem(index){const item=this.getItem(index);if(!item)return;const activeItem=this.getActiveItem();if(activeItem)activeItem.toggleActive(false);item.toggleActive(true)}});class BlendedItemsComponentQuestionModel extends QuestionModel$1{init(){ItemsComponentModel.prototype.init.call(this);super.init()}reset(){let type=arguments.length>0&&arguments[0]!==undefined?arguments[0]:"hard";let canReset=arguments.length>1&&arguments[1]!==undefined?arguments[1]:this.get("_canReset");ItemsComponentModel.prototype.reset.call(this,type,canReset);return super.reset(type,canReset)}}Object.getOwnPropertyNames(ItemsComponentModel.prototype).forEach((name=>{if(name==="constructor"||name==="init"||name==="reset")return;Object.defineProperty(BlendedItemsComponentQuestionModel.prototype,name,{value:ItemsComponentModel.prototype[name]})}));var ItemsQuestionModel=__AMD("core/js/models/itemsQuestionModel",class ItemsQuestionModel extends BlendedItemsComponentQuestionModel{init(){super.init();this.set("_isRadio",this.isSingleSelect());this.listenTo(this.getChildren(),"change:_isActive",this.checkCanSubmit);this.checkCanSubmit()}restoreUserAnswers(){if(!this.get("_isSubmitted"))return;const itemModels=this.getChildren();const userAnswer=this.get("_userAnswer");itemModels.each((item=>{item.toggleActive(userAnswer[item.get("_index")])}));this.setQuestionAsSubmitted();this.markQuestion();this.setScore();this.setupFeedback()}setupRandomisation(){if(!this.get("_isRandom")||!this.get("_isEnabled"))return;const children=this.getChildren();children.set(children.shuffle())}canSubmit(){const activeItems=this.getActiveItems();return activeItems.length>0}storeUserAnswer(){const items=this.getChildren().slice(0);items.sort(((a,b)=>a.get("_index")-b.get("_index")));const userAnswer=items.map((itemModel=>itemModel.get("_isActive")));this.set("_userAnswer",userAnswer)}isCorrect(){const allChildren=this.getChildren();const activeChildren=allChildren.filter((itemModel=>itemModel.get("_isActive")));const isItemCorrect=itemModel=>itemModel.get("_shouldBeSelected")&&!itemModel.get("_isPartlyCorrect");const isItemPartlyCorrect=itemModel=>itemModel.get("_isPartlyCorrect");const isItemIncorrect=itemModel=>!itemModel.get("_shouldBeSelected")&&!itemModel.get("_isPartlyCorrect");const sum=(list,predicate)=>list.reduce(((sum,item)=>sum+(predicate(item)?1:0)),0);const props={_numberOfRequiredAnswers:sum(allChildren,isItemCorrect),_numberOfCorrectAnswers:sum(activeChildren,isItemCorrect),_numberOfPartlyCorrectAnswers:sum(activeChildren,isItemPartlyCorrect),_numberOfIncorrectAnswers:sum(activeChildren,isItemIncorrect)};activeChildren.forEach((itemModel=>itemModel.set("_isCorrect",itemModel.get("_shouldBeSelected"))));props._isAtLeastOneCorrectSelection=props._numberOfCorrectAnswers||props._numberOfPartlyCorrectAnswers;const numberOfSelectableAnswers=this.get("_selectable");const hasSelectableCorrectAnswers=props._numberOfCorrectAnswers===numberOfSelectableAnswers;const hasAllCorrectAnswers=props._numberOfCorrectAnswers===props._numberOfRequiredAnswers;const hasCorrectAnswers=hasSelectableCorrectAnswers||hasAllCorrectAnswers;const hasIncorrectAnswers=props._numberOfIncorrectAnswers;const hasPartlyCorrectAnswers=props._numberOfPartlyCorrectAnswers;this.set(props);return hasCorrectAnswers&&!hasIncorrectAnswers&&!hasPartlyCorrectAnswers}setScore(){const questionWeight=this.get("_questionWeight");const answeredCorrectly=this.get("_isCorrect");const score=answeredCorrectly?questionWeight:0;this.set("_score",score)}get score(){if(!this.get("_hasItemScoring"))return super.score;const children=this.getChildren()?.toArray()||[];return children.reduce(((score,child)=>score+=child.get("_isActive")?child.get("_score")||0:0),0)}get maxScore(){if(!this.get("_hasItemScoring"))return super.maxScore;const children=this.getChildren()?.toArray()||[];const scores=children.map((child=>child.get("_score")||0));scores.sort(((a,b)=>a-b));return scores.reverse().slice(0,this.get("_selectable")).filter((score=>score>0)).reduce(((maxScore,score)=>maxScore+=score),0)}get minScore(){if(!this.get("_hasItemScoring"))return super.minScore;const children=this.getChildren()?.toArray()||[];const scores=children.map((child=>child.get("_score")||0));scores.sort(((a,b)=>a-b));return scores.slice(0,this.get("_selectable")).filter((score=>score<0)).reduce(((minScore,score)=>minScore+=score),0)}getFeedback(){let _feedback=arguments.length>0&&arguments[0]!==undefined?arguments[0]:this.get("_feedback");if(!_feedback)return{};const activeItem=this.getActiveItem();const activeItemFeedback=activeItem.get("feedback");const isIndividualFeedback=!this.isCorrect()&&!this.isPartlyCorrect()&&this.isSingleSelect()&&activeItemFeedback;const feedback=super.getFeedback(_feedback);if(!isIndividualFeedback)return feedback;if(typeof activeItemFeedback==="string"){return{...feedback,body:activeItemFeedback||""}}const feedbackConfig={...feedback,...activeItemFeedback};if(feedbackConfig?._graphic?._src&&!feedbackConfig?._imageAlignment){feedbackConfig._imageAlignment="right"}return feedbackConfig}isPartlyCorrect(){return this.get("_isAtLeastOneCorrectSelection")}resetUserAnswer(){this.set("_userAnswer",[])}isAtActiveLimit(){const selectedItems=this.getActiveItems();return selectedItems.length===this.get("_selectable")}isSingleSelect(){return this.get("_selectable")===1}getLastActiveItem(){const selectedItems=this.getActiveItems();return selectedItems[selectedItems.length-1]}resetQuestion(){this.resetItems()}resetItems(){if(this.get("_shouldResetAllAnswers")===false){this.resetIncorrectItems();return}this.resetActiveItems();this.set("_isAtLeastOneCorrectSelection",false)}resetIncorrectItems(){this.getChildren().each((item=>{const isCorrect=item.get("_shouldBeSelected")||item.get("_isCorrect");if(isCorrect)return;item.toggleActive(false)}));this.set("_isAtLeastOneCorrectSelection",Boolean(this.getLastActiveItem()))}getInteractionObject(){const interactions={correctResponsesPattern:[],choices:[]};interactions.choices=this.getChildren().map((itemModel=>({id:(itemModel.get("_index")+1).toString(),description:itemModel.get("text")})));const correctItems=this.getChildren().filter((itemModel=>itemModel.get("_shouldBeSelected")));interactions.correctResponsesPattern=[correctItems.map((itemModel=>String(itemModel.get("_index")+1))).join("[,]")];return interactions}getResponse(){const activeItems=this.getActiveItems();const activeIndexes=activeItems.map((itemModel=>itemModel.get("_index")+1));return activeIndexes.join(",")}getResponseType(){return"choice"}getCorrectAnswerAsText(){const globals=Adapt$1.course.get("_globals")._components["_"+this.get("_component")];const isSingleSelect=this.isSingleSelect();const ariaAnswer=isSingleSelect?globals?.ariaCorrectAnswer:globals?.ariaCorrectAnswers;if(!ariaAnswer)return;const correctOptions=this.getChildren().where({_shouldBeSelected:true});const correctAnswer=isSingleSelect?correctOptions[0]?.get("text"):correctOptions.map((correctOption=>correctOption.get("text"))).join("
");return Handlebars.compile(ariaAnswer)({correctAnswer:correctAnswer})}getUserAnswerAsText(){const globals=Adapt$1.course.get("_globals")._components["_"+this.get("_component")];const isSingleSelect=this.isSingleSelect();const ariaAnswer=isSingleSelect?globals?.ariaUserAnswer:globals?.ariaUserAnswers;if(!ariaAnswer)return;const selectedItems=this.getActiveItems();const userAnswer=isSingleSelect?selectedItems[0].get("text"):selectedItems.map((selectedItem=>selectedItem.get("text"))).join("
");return Handlebars.compile(ariaAnswer)({userAnswer:userAnswer})}});var McqModel=__AMD("components/adapt-contrib-mcq/js/McqModel",class McqModel extends ItemsQuestionModel{});__AMD("components/adapt-contrib-mcq/js/adapt-contrib-mcq",components$1.register("mcq",{model:McqModel,view:McqView$1}));const AssessmentView={postRender(){ArticleView$1.prototype.postRender.call(this);if(this.model.isAssessmentEnabled()){this._setupEventListeners();const config=this.model.getConfig();if(config?._questions?._canShowMarking===false){this.$el.addClass("has-no-marking")}}this.$el.addClass("is-assessment")},_setupEventListeners(){this.listenTo(Adapt$1,{"assessments:complete":this._onAssessmentComplete,"assessments:reset":this._onAssessmentReset,remove:this._onRemove})},_removeEventListeners(){this.stopListening(Adapt$1,{"assessments:complete":this._onAssessmentComplete,"assessments:reset":this._onAssessmentReset})},_onAssessmentComplete(state,model){if(state.id!==this.model.get("_assessment")._id)return;logging$1.info("assessment complete",state,model)},_onAssessmentReset(state,model){if(state.id!==this.model.get("_assessment")._id)return;logging$1.info("assessment reset",state,model)},_onRemove(){this._removeEventListeners()}};var AdaptAssessmentArticleView=__AMD("extensions/adapt-contrib-assessment/js/adapt-assessmentArticleView",AssessmentView);class QuestionBank{constructor(quizBankId,articleId){this._bankId=quizBankId;this._articleId=articleId;this._unusedQuestionBlocks=null;this._count=null}calculateAvailableQuestionBlocks(count){this._count=parseInt(count);const articleModel=data$1.findById(this._articleId);const children=articleModel.getAvailableChildModels();this._availableQuestionBlocks=children.map((blockModel=>{if(blockModel.get("_assessment")?._quizBankID!==this._bankId)return null;return blockModel})).filter(Boolean);const availableQuestionBlockIds=this._availableQuestionBlocks?.map((block=>block.get("_id")))||[];const unusedQuestionBlockIds=this._unusedQuestionBlocks?.map((block=>block.get("_id")))||[];const haveBlocksChanged=Boolean(_.difference(unusedQuestionBlockIds,availableQuestionBlockIds).length);if(!haveBlocksChanged)return;this._unusedQuestionBlocks=null}getRandomQuestionBlocks(){let count=this._count;if(count>this.unusedQuestionBlocks.length){logging$1.warn(`Bank ID ${this._bankId}: Attempting to display ${count} question(s), but only ${this.unusedQuestionBlocks.length} available`);count=this.unusedQuestionBlocks.length}const questionBlocks=[];let i=0;while(i++block.get("_isAvailable"))).reduce(((questions,block)=>questions.concat(block.findDescendantModels("question"))),[])},_getAllQuestionComponents(){return this.findDescendantModels("question")},_postInitialize(){if(!this.isAssessmentEnabled())return;const assessmentConfig=this.getConfig();Object.assign(this,{_originalChildModels:null,_questionBanks:null,_forceResetOnRevisit:false});let attemptsLeft;switch(assessmentConfig._attempts){case"infinite":case 0:case undefined:case-1:case null:attemptsLeft="infinite";break;default:attemptsLeft=assessmentConfig._attempts;break}this.set({_assessmentCompleteInSession:false,_attemptInProgress:false,_isAssessmentComplete:false,_numberOfQuestionsAnswered:0,_lastAttemptScoreAsPercent:0,_attempts:attemptsLeft,_attemptsLeft:attemptsLeft,_attemptsSpent:0});this.listenToOnce(Adapt$1,"app:dataReady",this._onDataReady);this.listenTo(Adapt$1,"remove",this._onRemove)},init(){this._originalChildModels=this.getChildren().models;this.setupCurrentQuestionComponents();this._setAssessmentOwnershipOnChildrenModels();this._updateQuestionsState()},setupCurrentQuestionComponents(){const assessmentQuestionsConfig=this.getConfig()._questions;this._getAllQuestionComponents().forEach((component=>{component.set({_canShowFeedback:assessmentQuestionsConfig._canShowFeedback,_canShowMarking:assessmentQuestionsConfig._canShowMarking,_canShowModelAnswer:assessmentQuestionsConfig._canShowModelAnswer})}))},_setAssessmentOwnershipOnChildrenModels(){const assessmentConfig=this.get("_assessment");const childConfig={_isPartOfAssessment:true,_assessmentId:assessmentConfig._id};for(const blockModel of this._originalChildModels){blockModel.set(childConfig);blockModel.setOnChildren(childConfig)}},checkIfResetOnRevisit(){},_onDataReady(){Adapt$1.assessment.register(this);const questions=this._getCurrentQuestionComponents();if(this.get("_attemptInProgress")&&questions.every((q=>q.get("_isSubmitted")))&&this.get("_requireCompletionOf")!==Number.POSITIVE_INFINITY){this.set("_attemptInProgress",false);logging$1.warn(`Assessment ${this.get("_id")} _attemptInProgress corrected as all questions are submitted`)}},_setupAssessmentData(force,callback){const assessmentConfig=this.getConfig();const state=this.getState();const hasAttemptsLeft=state.attemptsLeft>0||state.attemptsLeft==="infinite";const isFirstAttempt=state.attemptsSpent===0;const shouldResetOnRevisit=(isFirstAttempt||assessmentConfig._isResetOnRevisit)&&!this.get("_attemptInProgress");const shouldResetAssessment=shouldResetOnRevisit&&!state.isPass&&hasAttemptsLeft||force===true;const shouldResetQuestions=shouldResetOnRevisit&&(state.allowResetIfPassed||!state.isPass)||force===true;if(shouldResetAssessment||shouldResetQuestions){Adapt$1.trigger("assessments:preReset",this.getState(),this)}let quizModels;if(shouldResetAssessment){if(isFirstAttempt||assessmentConfig?._questions?._resetType==="hard"){this.set({_numberOfQuestionsAnswered:0,_isAssessmentComplete:false,_assessmentCompleteInSession:false,_score:0})}else{this.set({_assessmentCompleteInSession:false})}this.getChildren().reset(this._originalChildModels);if(assessmentConfig?._banks._isEnabled&&assessmentConfig?._banks._split.length>1){quizModels=this._setupBankedAssessment()}else if(assessmentConfig?._randomisation._isEnabled){quizModels=this._setupRandomisedAssessment()}}if(!quizModels){quizModels=this.getChildren().models}else if(quizModels.length===0){quizModels=this.getChildren().models;logging$1.warn("assessment: Not enough unique questions to create a fresh assessment, using last selection")}this.getChildren().reset(quizModels);this.setupCurrentQuestionComponents();if(shouldResetAssessment||shouldResetQuestions){this._resetQuestions();this.set("_attemptInProgress",true);Adapt$1.trigger("assessments:reset",this.getState(),this)}if(!state.isComplete){this.set("_attemptInProgress",true)}this._overrideQuestionComponentSettings();this._setupQuestionListeners();this._checkNumberOfQuestionsAnswered();this._updateQuestionsState();Adapt$1.assessment.saveState();this.trigger("reset");if(shouldResetAssessment||shouldResetQuestions){Adapt$1.trigger("assessments:postReset",this.getState(),this)}},_setupBankedAssessment(){const assessmentConfig=this.getConfig();this._setupBanks();let questionModels=this._questionBanks.flatMap((questionBank=>questionBank.getRandomQuestionBlocks()));if(assessmentConfig._banks._randomisation){questionModels=_.shuffle(questionModels)}return questionModels},_setupBanks(){const assessmentConfig=this.getConfig();const bankSplits=assessmentConfig._banks._split.split(",");this.findDescendantModels("block").filter((block=>block.get("_isAvailable")&&block.findDescendantModels("question").length>0)).forEach((block=>{const quizBankId=block.get("_assessment")?._quizBankId;const isInvalidNumber=isNaN(quizBankId)||quizBankId<1;const isOutOfBounds=quizBankId>bankSplits.length;if(isInvalidNumber)logging$1.warn(`Bank ID ${quizBankId} is not a valid number`);if(isOutOfBounds)logging$1.warn(`Bank ID ${quizBankId} exceeds the number of available splits (${bankSplits.length})`)}));const hasBankSplitsChanged=bankSplits.length!==this._questionBanks?.length;if(hasBankSplitsChanged){this._questionBanks=[]}bankSplits.forEach(((count,index)=>{const bankId=index+1;const articleId=this.get("_id");this._questionBanks[bankId]=this._questionBanks[bankId]||new QuestionBank$1(bankId,articleId);this._questionBanks[bankId].calculateAvailableQuestionBlocks(count)}))},_setupRandomisedAssessment(){const assessmentConfig=this.getConfig();const randomisationModel=assessmentConfig._randomisation;const blockModels=this.getChildren().models;let questionModels=_.shuffle(blockModels);if(randomisationModel._blockCount>0){questionModels=questionModels.slice(0,randomisationModel._blockCount)}return questionModels},_overrideQuestionComponentSettings(){const newSettings=this._getMarkingSettings();const questionConfig=this.getConfig()._questions;if(Object.prototype.hasOwnProperty.call(questionConfig,"_canShowFeedback")){newSettings._canShowFeedback=questionConfig._canShowFeedback}if(!_.isEmpty(newSettings)){const questionComponents=this._getAllQuestionComponents();questionComponents.forEach((model=>model.set(newSettings,{pluginName:"_assessment"})))}},_setupQuestionListeners(){this._removeQuestionListeners();this.listenTo(this,"bubble:change:_isInteractionComplete",this._onCompletionEvent)},_checkNumberOfQuestionsAnswered(){const questionComponents=this._getCurrentQuestionComponents();const numberOfQuestionsAnswered=questionComponents.filter((model=>model.get("_isInteractionComplete"))).length;this.set("_numberOfQuestionsAnswered",numberOfQuestionsAnswered)},_removeQuestionListeners(){this.stopListening(this,"bubble:change:_isInteractionComplete",this._onCompletionEvent)},_onCompletionEvent(event){if(event.target?.isTypeGroup("block"))return this._onBlockCompleted(event.target,event.value);if(event.target?.isTypeGroup("question"))return this._onQuestionCompleted(event.target,event.value)},_onBlockCompleted(blockModel,value){if(value===false)return;const questionModels=blockModel.findDescendantModels("question");questionModels.forEach((questionModel=>{this._onQuestionCompleted(questionModel,value)}));if(!blockModel.get("_isInteractionComplete"))return;this._checkAssessmentComplete()},_onQuestionCompleted(questionModel,value){if(value===false)return;if(!questionModel.get("_isInteractionComplete"))return;const numberOfQuestionsAnswered=this._getCurrentQuestionComponents().reduce(((count,question)=>count+=question.get("_isSubmitted")?1:0),0);this.set("_numberOfQuestionsAnswered",numberOfQuestionsAnswered);this._updateQuestionsState();Adapt$1.assessment.saveState();this._checkAssessmentComplete()},_checkAssessmentComplete(){const allQuestionsAdded=this.get("_requireCompletionOf")!==Number.POSITIVE_INFINITY;if(!allQuestionsAdded)return;const numberOfQuestionsAnswered=this.get("_numberOfQuestionsAnswered");const allQuestionsAnswered=numberOfQuestionsAnswered>=this._getCurrentQuestionComponents().length;if(!allQuestionsAnswered)return;this._onAssessmentComplete()},_onAssessmentComplete(){const wasAttemptInProgess=this.get("_attemptInProgress");if(!wasAttemptInProgess)return;this.set("_attemptInProgress",false);this._spendAttempt();const _scoreAsPercent=this._getScoreAsPercent();const _score=this._getScore();const _maxScore=this._getMaxScore();const _minScore=this._getMinScore();const _correctCount=this._getCorrectCount();const _correctAsPercent=this._getCorrectAsPercent();const _questionCount=this._getQuestionCount();this.set({_scoreAsPercent:_scoreAsPercent,_score:_score,_maxScore:_maxScore,_minScore:_minScore,_correctAsPercent:_correctAsPercent,_correctCount:_correctCount,_questionCount:_questionCount,_lastAttemptScoreAsPercent:_scoreAsPercent,_assessmentCompleteInSession:true,_isAssessmentComplete:true});this._updateQuestionsState();this._checkIsPass();this._removeQuestionListeners();if(this._isMarkingSuppressionEnabled()&&(!this._isAttemptsLeft()||this._isPassed())){_.defer((()=>{this._overrideMarkingSettings();this._refreshQuestions()}))}Adapt$1.trigger("assessments:complete",this.getState(),this)},_updateQuestionsState(){const questionComponents=this._getCurrentQuestionComponents();const questions=questionComponents.map((model=>({_id:model.get("_id"),_isCorrect:model.get("_isCorrect")??null})));this.set("_questions",questions)},_checkIsPass(){const assessmentConfig=this.getConfig();const isPercentageBased=assessmentConfig._isPercentageBased;const scoreToPass=assessmentConfig._scoreToPass;const correctToPass=assessmentConfig._correctToPass||0;const scoreAsPercent=this.get("_scoreAsPercent");const score=this.get("_score");const correctAsPercent=this.get("_correctAsPercent");const correctCount=this.get("_correctCount");const isPass=isPercentageBased?scoreAsPercent>=scoreToPass&&correctAsPercent>=correctToPass:score>=scoreToPass&&correctCount>=correctToPass;this.set("_isPass",isPass)},_getMarkingSettings(){let markingSettings={};if(this._shouldSuppressMarking()){markingSettings={_canShowMarking:false,_canShowModelAnswer:false}}else{const questionConfig=this.getConfig()._questions;if(Object.prototype.hasOwnProperty.call(questionConfig,"_canShowModelAnswer")){markingSettings._canShowModelAnswer=questionConfig._canShowModelAnswer}if(Object.prototype.hasOwnProperty.call(questionConfig,"_canShowMarking")){markingSettings._canShowMarking=questionConfig._canShowMarking}}return markingSettings},_overrideMarkingSettings(){const newMarkingSettings=this._getMarkingSettings();const questionComponents=this._getAllQuestionComponents();questionComponents.forEach((model=>model.set(newMarkingSettings,{pluginName:"_assessment"})))},_refreshQuestions(){const questionComponents=this._getCurrentQuestionComponents();questionComponents.forEach((model=>model.refresh()))},_shouldSuppressMarking(){return this._isMarkingSuppressionEnabled()&&this._isAttemptsLeft()&&!this._isPassed()},_isMarkingSuppressionEnabled(){const assessmentConfig=this.getConfig();return assessmentConfig._suppressMarking},_isAttemptsLeft(){if(this.get("_attemptsLeft")===0)return false;return true},_isPassed(){return this.get("_isAssessmentComplete")&&this.get("_isPass")},_spendAttempt(){if(!this._isAttemptsLeft())return false;let attemptsSpent=this.get("_attemptsSpent");this.set("_attemptsSpent",++attemptsSpent);if(this.get("_attempts")==="infinite")return true;let attemptsLeft=this.get("_attemptsLeft");this.set("_attemptsLeft",--attemptsLeft);return true},_getScore(){const questionComponents=this._getCurrentQuestionComponents();const score=questionComponents.reduce(((score,model)=>score+=model.score||0),0);return score},_getMaxScore(){const questionComponents=this._getCurrentQuestionComponents();const maxScore=questionComponents.reduce(((maxScore,model)=>maxScore+=model.maxScore||0),0);return maxScore},_getMinScore(){const questionComponents=this._getCurrentQuestionComponents();const minScore=questionComponents.reduce(((minScore,model)=>minScore+=model.minScore||0),0);return minScore},_getScoreAsPercent(){const minScore=this._getMinScore();const maxScore=this._getMaxScore();const score=this._getScore();const range=maxScore-minScore;return range===0?0:Math.round((score-minScore)/range*100)},_getCorrectCount(){return this._getCurrentQuestionComponents().reduce(((count,model)=>count+=model.get("_isCorrect")?1:0),0)},_getQuestionCount(){return this._getCurrentQuestionComponents().length},_getCorrectAsPercent(){const questionCount=this._getQuestionCount();return questionCount===0?0:Math.round(this._getCorrectCount()/questionCount*100)},_getLastAttemptScoreAsPercent(){return this.get("_lastAttemptScoreAsPercent")},_checkReloadPage(){if(!this.canResetInPage())return false;const parentId=this.getParent().get("_id");const currentLocation=location$1._currentId;if(currentLocation!==parentId)return false;if(!this.get("_isReady"))return false;return true},_reloadPage(callback){const assessmentConfig=this.getConfig();this._forceResetOnRevisit=true;this.listenToOnce(Adapt$1,"pageView:ready",(async()=>{if(assessmentConfig._scrollToOnReset){await router$1.navigateToElement(this.get("_id"))}callback()}));_.delay((()=>{Backbone.history.navigate("#/id/"+location$1._currentId,{replace:true,trigger:true})}),250)},_resetQuestions(){const assessmentConfig=this.getConfig();const questionModels=this._getCurrentQuestionComponents();questionModels.forEach((model=>model.reset(assessmentConfig._questions._resetType,true)))},_onRemove(){this._removeQuestionListeners()},_setCompletionStatus(){this.set({_isComplete:true,_isInteractionComplete:true})},_checkIfQuestionsWereRestored(){if(this.get("_assessmentCompleteInSession"))return;if(!this.get("_isAssessmentComplete"))return;let wereQuestionsRestored=true;const questions=this.get("_questions");for(const question of questions){const questionModel=data$1.findById(question._id);if(questionModel.get("_isAvailable")&&!questionModel.get("_isSubmitted")){wereQuestionsRestored=false;break}}if(!wereQuestionsRestored){this.set("_assessmentCompleteInSession",true);return true}return false},isAssessmentEnabled(){if(this.get("_assessment")?._isEnabled)return true;return false},canResetInPage(){const assessmentConfig=this.getConfig();if(assessmentConfig._reloadPageOnReset===false)return false;return true},reset(force,callback){const assessmentConfig=this.getConfig();force=this._forceResetOnRevisit||force===true;this._forceResetOnRevisit=false;const isPageReload=this._checkReloadPage();if(this.get("_assessmentCompleteInSession")&&!assessmentConfig._isResetOnRevisit&&!isPageReload&&!force){if(typeof callback==="function")callback(false);return false}const wereQuestionsRestored=this._checkIfQuestionsWereRestored();force=force||wereQuestionsRestored;if(force&&!this._isAttemptsLeft()){this.set({_attemptsLeft:this.get("_attempts"),_attemptsSpent:0})}const allowResetIfPassed=this.get("_assessment")._allowResetIfPassed;if(!this._isAttemptsLeft()&&!force&&!allowResetIfPassed){if(typeof callback==="function")callback(false);return false}if(!isPageReload){this._setupAssessmentData(force);if(typeof callback==="function")callback(true)}else{this._reloadPage((()=>{if(typeof callback==="function")callback(true)}))}return true},getSaveState(){const state=this.getState();let blocks;const cfg=this.getConfig();const banksActive=cfg._banks?._isEnabled&&cfg._banks._split.length>1;const randomisationActive=cfg._randomisation?._isEnabled;if(!banksActive&&!randomisationActive){blocks=this.findDescendantModels("block")}else{blocks=state.questions.map((question=>data$1.findById(question._id).getParent()))}blocks=[...new Set(blocks)].filter((block=>block.trackingPosition));const blockTrackingPositions=blocks.map((block=>block.trackingPosition));const blockCompletion=blocks.map((block=>{const questions=block.findDescendantModels("question");return questions.map((question=>question.get("_isCorrect")||false))}));const blockData=[blockTrackingPositions,blockCompletion];const saveState=[state.isComplete?1:0,state.attemptsSpent,state.maxScore||0,state.score,state.attemptInProgress?1:0,state.minScore||0,state.correctAsPercent||0,state.correctCount||0,state.questionCount||0];const dataPackage=[saveState,blockData];return dataPackage},setRestoreState(dataPackage){const restoreState=dataPackage[0];const blockData=dataPackage[1];const _isAssessmentComplete=restoreState[0]===1;const attempts=this.get("_attempts");const _attemptsSpent=restoreState[1];const maxScore=restoreState[2];const score=restoreState[3];const _scoreAsPercent=score?Math.round(score/maxScore*100):0;const _attemptInProgress=restoreState[4]===1;const minScore=restoreState[5];const correctAsPercent=restoreState[6];const correctCount=restoreState[7];const questionCount=restoreState[8];const blocks=blockData[0].map((trackingPosition=>{if(typeof trackingPosition==="number"){return data$1.findWhere({_trackingId:trackingPosition})}return data$1.findByTrackingPosition(trackingPosition)}));if(blocks.length){const nonBlockChildren=this.getChildren().models.filter((model=>!model.isTypeGroup("block")));this.getChildren().reset(blocks.concat(nonBlockChildren))}const _questions=[];blocks.forEach(((block,blockIndex)=>{const blockQuestions=block.findDescendantModels("question");blockQuestions.forEach(((question,questionIndex)=>{_questions.push({_id:question.get("_id"),_isCorrect:blockData[1][blockIndex][questionIndex]})}))}));this.set({_isAssessmentComplete:_isAssessmentComplete,_assessmentCompleteInSession:false,_attemptsSpent:_attemptsSpent,_attemptInProgress:_attemptInProgress,_attemptsLeft:attempts==="infinite"?attempts:attempts-_attemptsSpent,_maxScore:maxScore||this._getMaxScore(),_minScore:minScore||this._getMinScore(),_score:score||0,_scoreAsPercent:_scoreAsPercent,_correctAsPercent:correctAsPercent||0,_correctCount:correctCount||0,_questions:_questions,_questionCount:questionCount||0,_lastAttemptScoreAsPercent:_scoreAsPercent});if(_isAssessmentComplete)this._checkIsPass();Adapt$1.trigger("assessments:restored",this.getState(),this)},getState(){const assessmentConfig=this.getConfig();const state={id:assessmentConfig._id,type:"article-assessment",pageId:this.getParent().get("_id"),articleId:this.get("_id"),isEnabled:assessmentConfig._isEnabled,isComplete:this.get("_isAssessmentComplete"),isPercentageBased:assessmentConfig._isPercentageBased,scoreToPass:assessmentConfig._scoreToPass,score:this.get("_score"),scoreAsPercent:this.get("_scoreAsPercent"),maxScore:this.get("_maxScore"),minScore:this.get("_minScore"),correctCount:this.get("_correctCount"),correctAsPercent:this.get("_correctAsPercent"),correctToPass:assessmentConfig._correctToPass,questionCount:this.get("_questionCount"),isPass:this.get("_isPass"),includeInTotalScore:assessmentConfig._includeInTotalScore,assessmentWeight:assessmentConfig._assessmentWeight,attempts:this.get("_attempts"),attemptsSpent:this.get("_attemptsSpent"),attemptsLeft:this.get("_attemptsLeft"),attemptInProgress:this.get("_attemptInProgress"),lastAttemptScoreAsPercent:this.get("_lastAttemptScoreAsPercent"),questions:this.get("_questions"),resetType:assessmentConfig._questions._resetType,allowResetIfPassed:assessmentConfig._allowResetIfPassed,questionModels:new Backbone.Collection(this._getCurrentQuestionComponents())};return state},getConfig(){let assessmentConfig=this.get("_assessment");if(!assessmentConfig){assessmentConfig=$.extend(true,{},assessmentConfigDefaults)}else{assessmentConfig=$.extend(true,{},assessmentConfigDefaults,assessmentConfig)}if(assessmentConfig._id===undefined){assessmentConfig._id="givenId"+givenIdCount++}this.set("_assessment",assessmentConfig);return assessmentConfig}};var AdaptAssessmentArticleModel=__AMD("extensions/adapt-contrib-assessment/js/adapt-assessmentArticleModel",AssessmentModel);const assessmentsConfigDefaults={_isPercentageBased:true,_scoreToPass:100,_isDefaultsLoaded:true};class Assessment extends Backbone.Controller{initialize(){this._assessments=Object.assign([],{_byPageId:{},_byAssessmentId:{}});this.listenTo(Adapt$1,{"assessments:complete":this._onAssessmentsComplete,"router:location":this._checkResetAssessmentsOnRevisit,"router:plugin":this._handleRoute,"app:dataReady":this._onDataReady})}_onAssessmentsComplete(state){const assessmentId=state.id;state.isComplete=true;if(assessmentId===undefined)return;if(!this._getStateByAssessmentId(assessmentId)){logging$1.warn("assessments: state was not registered when assessment was created")}this.saveState();this._setPageProgress();this._checkAssessmentsComplete()}_restoreModelState(assessmentModel){if(!this._saveStateModel){this._saveStateModel=offlineStorage$1.get("a")}if(this._saveStateModel){const state=assessmentModel.getState();if(this._saveStateModel[state.id]){assessmentModel.setRestoreState(offlineStorage$1.deserialize(this._saveStateModel[state.id]))}}}_handleRoute(plugin,id){if(plugin!=="assessment"&&plugin!=="article-assessment"||id===undefined){return}if(!data$1.findById(id)){const assessment=Adapt$1.assessment._assessments._byAssessmentId[id];if(assessment){id=assessment.get("_id")}else{logging$1.warn("Assessment not found with _id: "+id);return}}_.defer((()=>{Backbone.history.navigate("#/id/"+id,{trigger:true,replace:true})}))}_checkResetAssessmentsOnRevisit(toObject){if(toObject._contentType!=="page")return;const pageAssessmentModels=this._getAssessmentByPageId(toObject._currentId);if(pageAssessmentModels===undefined)return;wait$1.for((function resetAllAssessments(allAssessmentHaveReset){const numberOfAssessments=pageAssessmentModels.length;let numberOfResetAssessments=0;const forceAssessmentReset=false;pageAssessmentModels.forEach((model=>{model.reset(forceAssessmentReset,(()=>{numberOfResetAssessments++;const haveAllModelsReset=numberOfResetAssessments===numberOfAssessments;if(!haveAllModelsReset){return}allAssessmentHaveReset()}))}))}));this._setPageProgress()}_onDataReady(){this._assessments=Object.assign([],{_byPageId:{},_byAssessmentId:{}});this._restoredCount=0}_checkAssessmentsComplete(){let allAssessmentsComplete=true;let assessmentToPostBack=0;const states=this._getStatesByAssessmentId();const assessmentStates=[];for(const id in states){const state=states[id];if(!state.includeInTotalScore)continue;if(!state.isComplete){allAssessmentsComplete=false;break}assessmentToPostBack++;assessmentStates.push(state)}if(!allAssessmentsComplete||assessmentToPostBack===0)return false;if(assessmentToPostBack===1){this._setupSingleAssessmentConfiguration(assessmentStates[0])}_.defer((()=>Adapt$1.trigger("assessment:complete",this.getState())));return true}_setupSingleAssessmentConfiguration(assessmentState){const assessmentsConfig=Adapt$1.course.get("_assessment");$.extend(true,assessmentsConfig,{_isPercentageBased:assessmentState.isPercentageBased,_scoreToPass:assessmentState.scoreToPass});Adapt$1.course.set("_assessment",assessmentsConfig)}_getAssessmentByPageId(pageId){return this._assessments._byPageId[pageId]}_getStateByAssessmentId(assessmentId){if(assessmentId===undefined){return null}return this._assessments._byAssessmentId[assessmentId].getState()}_getStatesByAssessmentId(){const states={};for(const assessmentModel of this._assessments){if(!assessmentModel.get("_isAvailable"))continue;const state=assessmentModel.getState();states[state.id]=state}return states}_setPageProgress(){for(const[id,assessments]of Object.entries(this._assessments._byPageId)){const availableAssessments=assessments.filter((model=>model.get("_isAvailable")));const assessmentsTotal=availableAssessments.length;let assessmentsPassed=0;for(const assessment of availableAssessments){const assessmentState=assessment.getState();if(assessmentState.includeInTotalScore&&!assessmentState.isPass)continue;if(assessmentState.isComplete){assessmentsPassed++}}const pageModel=data$1.findById(id);pageModel?.set({_subProgressTotal:assessmentsTotal,_subProgressComplete:assessmentsPassed})}}_addToAssessmentIdMap(id,model){if(id===undefined){logging$1.warn('An assessment has been registered with an undefined value for "_id"');return}if(id===""){logging$1.warn('An assessment has been registered with an empty value for "_id"')}if(!this._assessments._byAssessmentId[id]){this._assessments._byAssessmentId[id]=model}else{logging$1.warn('An assessment with an _id of "'+id+'" already exists!')}}_setupQuestionNumbering(){const getRelatedQuestions=data=>{const currentAssessmentId=data._assessmentId;const currentAssessment=Adapt$1.assessment.get(currentAssessmentId);return currentAssessment.getState().questions};Handlebars.registerHelper("questionNumber",(function getQuestionNumber(){const data=this.view?.model.toJSON()||this;if(!data._isPartOfAssessment)return;const related=_.pluck(getRelatedQuestions(data),"_id");return related.indexOf(data._id)+1}));Handlebars.registerHelper("questionCount",(function getTotalQuestions(){const data=this.view?this.view.model.toJSON():this;if(!data._isPartOfAssessment)return;return getRelatedQuestions(data).length}))}register(assessmentModel){const state=assessmentModel.getState();const assessmentId=state.id;const pageId=state.pageId;if(this._assessments._byPageId[pageId]===undefined){this._assessments._byPageId[pageId]=[]}this._assessments._byPageId[pageId].push(assessmentModel);this._addToAssessmentIdMap(assessmentId,assessmentModel);this._assessments.push(assessmentModel);this._restoreModelState(assessmentModel);this._restoredCount++;Adapt$1.trigger("assessments:register",state,assessmentModel);this._setPageProgress();this._setupQuestionNumbering();if(this._restoredCount===this._assessments.length){Adapt$1.trigger("assessment:restored",this.getState())}}get(id){return id===undefined?this._assessments.slice(0):this._assessments._byAssessmentId[id]}saveState(){this._saveStateModel={};for(const assessmentModel of this._assessments){const state=assessmentModel.getState();this._saveStateModel[state.id]=offlineStorage$1.serialize(assessmentModel.getSaveState())}offlineStorage$1.set("a",this._saveStateModel)}getConfig(){let assessmentsConfig=Adapt$1.course.get("_assessment");if(assessmentsConfig?._isDefaultsLoaded){return assessmentsConfig}if(assessmentsConfig===undefined){assessmentsConfig=$.extend(true,{},assessmentsConfigDefaults)}else{assessmentsConfig=$.extend(true,{},assessmentsConfigDefaults,assessmentsConfig)}Adapt$1.course.set("_assessment",assessmentsConfig);return assessmentsConfig}getState(){const assessmentsConfig=this.getConfig();let score=0;let maxScore=0;let minScore=0;let correctCount=0;let questionCount=0;let assessments=0;const states=this._getStatesByAssessmentId();let assessmentsComplete=0;for(const id in states){const state=states[id];if(!state.includeInTotalScore)continue;if(state.isComplete)assessmentsComplete++;assessments++;maxScore+=state.maxScore/state.assessmentWeight;minScore+=state.minScore/state.assessmentWeight;score+=state.score/state.assessmentWeight;correctCount+=state.correctCount/state.assessmentWeight;questionCount+=state.questionCount/state.assessmentWeight}const isComplete=assessmentsComplete===assessments;const scoreRange=maxScore-minScore;const scoreAsPercent=scoreRange===0?0:Math.round((score-minScore)/scoreRange*100);const correctAsPercent=questionCount===0?0:Math.round(correctCount/questionCount*100);if(assessmentsConfig._correctToPass===undefined){logging$1.warnOnce("Assessment course config is missing _correctToPass")}const scoreToPass=assessmentsConfig._scoreToPass;const correctToPass=assessmentsConfig._correctToPass||scoreToPass;const isPercentageBased=assessmentsConfig._isPercentageBased;const isPass=isComplete&&(isPercentageBased?scoreAsPercent>=scoreToPass&&correctAsPercent>=correctToPass:score>=scoreToPass&&correctCount>=correctToPass);const canRetry=Object.values(states).some((state=>{const isFailed=!state.isPass;const hasAttemptsLeft=state.attemptsLeft>0||state.attemptsLeft==="infinite";return isFailed&&hasAttemptsLeft}));return{isComplete:isComplete,isPercentageBased:isPercentageBased,isPass:isPass,maxScore:maxScore,minScore:minScore,score:score,scoreToPass:scoreToPass,scoreAsPercent:scoreAsPercent,correctCount:correctCount,correctAsPercent:correctAsPercent,correctToPass:correctToPass,questionCount:questionCount,assessmentsComplete:assessmentsComplete,assessments:assessments,canRetry:canRetry}}}__AMD("extensions/adapt-contrib-assessment/js/assessment",Adapt$1.assessment=new Assessment);const ArticleViewInitialize=ArticleView$1.prototype.initialize;ArticleView$1.prototype.initialize=function(options){if(this.model.get("_assessment")?._isEnabled===true){Object.assign(this,AdaptAssessmentArticleView)}return ArticleViewInitialize.apply(this,arguments)};const ArticleModelInitialize=ArticleModel$1.prototype.initialize;ArticleModel$1.prototype.initialize=function(options){if(this.get("_assessment")?._isEnabled===true){Object.assign(this,AdaptAssessmentArticleModel);const returnValue=ArticleModelInitialize.apply(this,arguments);this._postInitialize();return returnValue}return ArticleModelInitialize.apply(this,arguments)};class Bookmarking extends Backbone.Controller{initialize(){this.bookmarkLevel=null;this.restoredLocationID=null;this.currentLocationID=null;this.listenToOnce(Adapt$1,"router:location",this.onAdaptInitialize)}onAdaptInitialize(){if(!this.checkCourseIsEnabled())return;this.setupEventListeners();this.checkRestoreLocation()}checkCourseIsEnabled(){const courseBookmarkModel=Adapt$1.course.get("_bookmarking");if(!courseBookmarkModel||!courseBookmarkModel._isEnabled)return false;return true}setupEventListeners(){this._onInview=this.onInview.bind(this);this._debouncedCheckLocation=_.debounce(this.checkLocation.bind(this),250);this.listenTo(Adapt$1,{"menuView:ready":this.setupMenu,"pageView:preRender":this.setupPage,"view:childAdded":this.onChildViewAdded,"view:preRemove":this.onChildViewPreRemove})}checkRestoreLocation(){this.restoredLocationID=offlineStorage$1.get("location");if(!this.restoredLocationID||this.restoredLocationID==="undefined"||!data$1.findById(this.restoredLocationID))return;this.listenToOnce(Adapt$1,"pageView:ready menuView:ready",this.restoreLocation)}restoreLocation(){this.stopListening(Adapt$1,"pageView:ready menuView:ready",this.restoreLocation);_.delay((()=>{if(this.isAlreadyOnScreen(this.restoredLocationID))return;if(Adapt$1.course.get("_bookmarking")._showPrompt===false){this.navigateToPrevious();return}this.showPrompt()}),500)}isAlreadyOnScreen(id){if(id===location$1._currentId)return true;const type=data$1.findById(id).getTypeGroup();if(type==="menu"||type==="page")return false;const measurements=$(`.${id}`).onscreen();const isLocationOnscreen=measurements?.onscreen??false;const isLocationFullyInview=measurements?.percentInview===100??false;return isLocationOnscreen&&isLocationFullyInview}showPrompt(){const courseBookmarkModel=Adapt$1.course.get("_bookmarking");const buttons=courseBookmarkModel._buttons||{yes:"Yes",no:"No"};this.listenToOnce(Adapt$1,{"bookmarking:continue":this.navigateToPrevious,"bookmarking:cancel":this.navigateCancel});notify$1.prompt({_classes:"is-bookmarking",_showIcon:true,title:courseBookmarkModel.title,body:courseBookmarkModel.body,_prompts:[{promptText:buttons.yes||"Yes",_callbackEvent:"bookmarking:continue"},{promptText:buttons.no||"No",_callbackEvent:"bookmarking:cancel"}]})}navigateToPrevious(){_.defer((async()=>{const isSinglePage=Adapt$1.contentObjects.models.length===1;try{await router$1.navigateToElement(this.restoredLocationID,{trigger:true,replace:isSinglePage,duration:400})}catch(err){logging$1.warn(`Bookmarking cannot navigate to id: ${this.restoredLocationID}\n`,err)}}));this.stopListening(Adapt$1,"bookmarking:cancel")}navigateCancel(){this.stopListening(Adapt$1,"bookmarking:continue")}resetLocationID(){this.setLocationID("")}setupMenu(menuView){const menuModel=menuView.model;if(!menuModel.get("_parentId")){this.resetLocationID();return}this.setLocationID(menuModel.get("_id"))}getBookmarkLevel(pageModel){const defaultLevel=Adapt$1.course.get("_bookmarking")._level||"component";const bookmarkModel=pageModel.get("_bookmarking");const isInherit=!bookmarkModel||!bookmarkModel._level||bookmarkModel._level==="inherit";return isInherit?defaultLevel:bookmarkModel._level}setupPage(pageView){const pageBookmarkModel=pageView.model.get("_bookmarking");if(pageBookmarkModel?._isEnabled===false){this.resetLocationID();return}this.setLocationID(pageView.model.get("_id"));this.bookmarkLevel=this.getBookmarkLevel(pageView.model);if(this.bookmarkLevel==="page")return}setLocationID(id){if(this.currentLocationID===id)return;offlineStorage$1.set("location",id);this.currentLocationID=id}checkLocation(){const contentObjectBookmarkModel=Adapt$1.parentView?.model?.get("_bookmarking");if(contentObjectBookmarkModel?._isEnabled===false){this.resetLocationID();return}const currentModel=location$1._currentModel;if(!currentModel||!this.bookmarkLevel)return;const possibleViewIds=currentModel.findDescendantModels(this.bookmarkLevel).filter((desc=>desc.get("_isTrackable")!==false)).map((desc=>desc.get("_id")));let highestOnscreen=0;let highestOnscreenLocation="";possibleViewIds.forEach((id=>{const element=$(`[data-adapt-id=${id}]`);if(!element.length)return;const measurements=element.onscreen();if(!measurements.onscreen)return;if(measurements.percentInview<=highestOnscreen)return;highestOnscreen=measurements.percentInview;highestOnscreenLocation=id}));if(highestOnscreenLocation)this.setLocationID(highestOnscreenLocation)}onChildViewAdded(view,childView){if(!this.bookmarkLevel||!childView.model.isTypeGroup(this.bookmarkLevel))return;childView.$el.on("inview",this._onInview)}onChildViewPreRemove(childView){if(!this.bookmarkLevel||!childView.model.isTypeGroup(this.bookmarkLevel))return;childView.$el.off("inview",this._onInview)}onInview(event,visible){if(!visible)return;this._debouncedCheckLocation()}}__AMD("extensions/adapt-contrib-bookmarking/js/adapt-contrib-bookmarking",new Bookmarking);var ResourcesView=__AMD("extensions/adapt-contrib-resources/js/ResourcesView",class ResourcesView extends Backbone.View{className(){return"resources"}initialize(){this.onResourceItemClicked=this.onResourceItemClicked.bind(this);this.listenTo(Adapt$1,"remove",this.remove);this.render()}render(){const data={...this,model:this.model.toJSON(),resources:this.model.get("_resources"),resourceTypes:this.model.get("_resourceTypes")};ReactDOM__default["default"].render(React__default["default"].createElement(templates.resources,data),this.el);_.defer((()=>{Adapt$1.trigger("view:render",this);this.listenTo(Adapt$1,"drawer:closed",this.remove)}));return this}onResourceItemClicked(e){const index=$(e.currentTarget).attr("data-index");const resourceItemData=this.model.get("_resourcesItems")[index];Adapt$1.trigger("resources:itemClicked",resourceItemData)}});class Resources extends Backbone.Controller{initialize(){this.listenTo(Adapt$1,"adapt:start",this.initResources)}initResources(){const courseResources=Adapt$1.course.get("_resources");if(!courseResources||courseResources._isEnabled===false)return;const drawerObject={title:courseResources.title,description:courseResources.description,className:"is-resources",drawerOrder:courseResources._drawerOrder||0};drawer.addItem(drawerObject,"resources:showResources");Object.assign(courseResources,{_isA11yComponentDescriptionEnabled:true,_id:"resources",_extension:"resources",_ariaLevel:1});this.setupResources(courseResources)}setupResources(resourcesData){this.listenTo(Adapt$1,"resources:showResources",(()=>{const model=new Backbone.Model(resourcesData);let resources=model.get("_resourcesItems");const contentObjectModel=Adapt$1.parentView?.model;const contentObjectConfig=contentObjectModel?.get("_resources");const isContentObjectNotCourseModel=contentObjectModel!==Adapt$1.course;const contentObjectResourceItems=isContentObjectNotCourseModel&&contentObjectConfig?._isEnabled&&contentObjectConfig?._resourcesItems;if(contentObjectResourceItems)resources=resources.concat(contentObjectResourceItems??[]);if(isContentObjectNotCourseModel){resources=resources.filter((resource=>resource._isGlobal!==false))}model.set("_resources",resources);this.setupTypes(model,resourcesData);drawer.triggerCustomView(new ResourcesView({model:model}).$el)}))}setupTypes(model,resourcesData){const configuredTypes=Object.keys(resourcesData._filterButtons).filter((type=>type!=="all"));const allTypes=["all",...configuredTypes];model.set("_resourceTypes",allTypes)}}__AMD("extensions/adapt-contrib-resources/js/adapt-contrib-resources",new Resources);class Logger{constructor(){this.logArr=[];this.registeredViews=[]}static getInstance(){if(Logger.instance===null){Logger.instance=new Logger}return Logger.instance}getEntries(){return this.logArr}getLastEntry(){return this.logArr[this.logArr.length-1]}info(str){this.logArr[this.logArr.length]={str:str,type:Logger.LOG_TYPE_INFO,time:Date.now()};this.updateViews()}warn(str){this.logArr[this.logArr.length]={str:str,type:Logger.LOG_TYPE_WARN,time:Date.now()};this.updateViews()}error(str){this.logArr[this.logArr.length]={str:str,type:Logger.LOG_TYPE_ERROR,time:Date.now()};this.updateViews()}debug(str){this.logArr[this.logArr.length]={str:str,type:Logger.LOG_TYPE_DEBUG,time:Date.now()};this.updateViews()}registerView(_view){this.registeredViews[this.registeredViews.length]=_view}unregisterView(_view){for(let i=0,l=this.registeredViews.length;i1&&arguments[1]!==undefined?arguments[1]:{};this.name=name;this.data=data}}ScormError.CLIENT_COULD_NOT_CONNECT="CLIENT_COULD_NOT_CONNECT";ScormError.SERVER_STATUS_UNSUPPORTED="SERVER_STATUS_UNSUPPORTED";ScormError.CLIENT_STATUS_UNSUPPORTED="CLIENT_STATUS_UNSUPPORTED";ScormError.CLIENT_COULD_NOT_COMMIT="CLIENT_COULD_NOT_COMMIT";ScormError.CLIENT_NOT_CONNECTED="CLIENT_NOT_CONNECTED";ScormError.CLIENT_COULD_NOT_FINISH="CLIENT_COULD_NOT_FINISH";ScormError.CLIENT_COULD_NOT_GET_PROPERTY="CLIENT_COULD_NOT_GET_PROPERTY";ScormError.CLIENT_COULD_NOT_SET_PROPERTY="CLIENT_COULD_NOT_SET_PROPERTY";ScormError.CLIENT_INVALID_CHOICE_VALUE="CLIENT_INVALID_CHOICE_VALUE";ScormError.defaultMessages={title:"An error has occurred",pressOk:"Press 'OK' to view detailed debug information to send to technical support.",CLIENT_COULD_NOT_CONNECT:"The course could not connect to the Learning Management System",SERVER_STATUS_UNSUPPORTED:"An invalid lesson status of '{{{status}}}' was received from Learning Management System",CLIENT_STATUS_UNSUPPORTED:"The status '{{{status}}}' is not supported.",CLIENT_COULD_NOT_COMMIT:"There was a problem saving data to the Learning Management System\n\nError: {{errorCode}} - {{{errorInfo}}}\nLMS Error Info: {{{diagnosticInfo}}}",CLIENT_NOT_CONNECTED:"The course is not connected to the Learning Management System",CLIENT_COULD_NOT_FINISH:"The course was unable to terminate the learning session\n\nError: {{errorCode}} - {{{errorInfo}}}\nLMS Error Info: {{{diagnosticInfo}}}",CLIENT_COULD_NOT_GET_PROPERTY:"Unable to get the value of {{property}} from the Learning Management System\n\nError: {{errorCode}} - {{{errorInfo}}}\nLMS Error Info: {{{diagnosticInfo}}}",CLIENT_COULD_NOT_SET_PROPERTY:"Unable to set {{property}} to: '{{{value}}}'\n\nError: {{errorCode}} - {{{errorInfo}}}\nLMS Error Info: {{{diagnosticInfo}}}",CLIENT_INVALID_CHOICE_VALUE:"Numeric choice/matching response elements must use a value from 0 to 35 in SCORM 1.2"};var ScormError$1=__AMD("extensions/adapt-contrib-spoor/js/scorm/error",ScormError);var Connection=__AMD("extensions/adapt-contrib-spoor/js/scorm/Connection",class Connection{constructor(){let{_isEnabled:_isEnabled=true,_silentRetryLimit:_silentRetryLimit=2,_silentRetryDelay:_silentRetryDelay=1e3,_testOnSetValue:_testOnSetValue=true}=arguments.length>0&&arguments[0]!==undefined?arguments[0]:{};let ScormWrapper=arguments.length>1?arguments[1]:undefined;this.test=this.test.bind(this);this._isEnabled=_isEnabled;this._isInProgress=false;this._isSilentDisconnection=false;this._isDisconnected=false;this._silentRetryLimit=_silentRetryLimit;this._silentRetryDelay=_silentRetryDelay;this._silentRetryTimeout=null;this._silentRetryCount=0;this._testOnSetValue=_testOnSetValue;this._scorm=ScormWrapper}async test(){if(!this._isEnabled||this._isInProgress)return;this._isInProgress=true;try{const response=await fetch(`connection.txt?nocache=${Date.now()}`);if(response?.ok)return this.onConnectionSuccess()}catch(err){}this.onConnectionError()}async testOnSetValue(){if(!this._isEnabled||!this._testOnSetValue)return;return this.test()}reset(){this._silentRetryCount=0;this._isSilentDisconnection=false;if(this._silentRetryTimeout===null)return;window.clearTimeout(this._silentRetryTimeout);this._silentRetryTimeout=null}stop(){this.reset();this._isEnabled=false}onConnectionSuccess(){if(this._isDisconnected){this._scorm.commit();if(!this._isSilentDisconnection)Adapt$1.trigger("tracking:connectionSuccess")}this._isInProgress=false;this._isDisconnected=false;this.reset()}onConnectionError(){if(!this._isEnabled)return;this._isInProgress=false;this._isDisconnected=true;if(this._silentRetryCount0){this.maxCharLimitOverride=settings._maxCharLimitOverride}}this.logger.debug("ScormWrapper::initialize");this.lmsConnected=this.scorm.init();if(!this.lmsConnected){this.handleInitializeError();return this.lmsConnected}if(settings?._connectionTest?._isEnabled!==false){this._connection=new Connection(settings?._connectionTest,this)}this.startTime=new Date;this.initTimedCommit();return this.lmsConnected}isFirstSession(){return this.getValue(this.isSCORM2004()?"cmi.entry":"cmi.core.entry")==="ab-initio"}setIncomplete(){this.setValue(this.isSCORM2004()?"cmi.completion_status":"cmi.core.lesson_status","incomplete");if(this.commitOnStatusChange&&!this.commitOnAnyChange)this.commit()}setCompleted(){this.setValue(this.isSCORM2004()?"cmi.completion_status":"cmi.core.lesson_status","completed");if(this.commitOnStatusChange&&!this.commitOnAnyChange)this.commit()}setPassed(){if(this.isSCORM2004()){this.setValue("cmi.completion_status","completed");this.setValue("cmi.success_status","passed")}else{this.setValue("cmi.core.lesson_status","passed")}if(this.commitOnStatusChange&&!this.commitOnAnyChange)this.commit()}setFailed(){if(this.isSCORM2004()){this.setValue("cmi.success_status","failed");if(this.setCompletedWhenFailed){this.setValue("cmi.completion_status","completed")}}else{this.setValue("cmi.core.lesson_status","failed")}if(this.commitOnStatusChange&&!this.commitOnAnyChange)this.commit()}getStatus(){const status=this.getValue(this.isSCORM2004()?"cmi.completion_status":"cmi.core.lesson_status");switch(status.toLowerCase()){case"passed":case"completed":case"incomplete":case"failed":case"browsed":case"not attempted":case"not_attempted":case"unknown":return status;default:this.handleDataError(new ScormError$1(SERVER_STATUS_UNSUPPORTED,{status:status}));return null}}setStatus(status){switch(status.toLowerCase()){case"incomplete":this.setIncomplete();break;case"completed":this.setCompleted();break;case"passed":this.setPassed();break;case"failed":this.setFailed();break;default:this.handleDataError(new ScormError$1(CLIENT_STATUS_UNSUPPORTED,{status:status}))}}getScore(){return this.getValue(this.isSCORM2004()?"cmi.score.raw":"cmi.core.score.raw")}setScore(score){let minScore=arguments.length>1&&arguments[1]!==undefined?arguments[1]:0;let maxScore=arguments.length>2&&arguments[2]!==undefined?arguments[2]:100;let isPercentageBased=arguments.length>3&&arguments[3]!==undefined?arguments[3]:true;if(this.isSCORM2004()){this.setValue("cmi.score.raw",score);this.setValue("cmi.score.min",minScore);this.setValue("cmi.score.max",maxScore);const range=score<0?Math.abs(minScore):maxScore;const scaledScore=score/range;this.setValue("cmi.score.scaled",scaledScore.toFixed(7));return}if(isPercentageBased){score=score<0?0:Math.round(score/maxScore*100);minScore=0;maxScore=100}else{const validate=(attribute,value)=>{const isValid=value>=0&&score<=100;if(!isValid)this.logger.warn(`${attribute} must be between 0-100.`)};validate("cmi.core.score.raw",score);validate("cmi.core.score.min",minScore);validate("cmi.core.score.max",maxScore)}this.setValue("cmi.core.score.raw",score);if(this.isSupported("cmi.core.score.min"))this.setValue("cmi.core.score.min",minScore);if(this.isSupported("cmi.core.score.max"))this.setValue("cmi.core.score.max",maxScore)}getLessonLocation(){return this.getValue(this.isSCORM2004()?"cmi.location":"cmi.core.lesson_location")}setLessonLocation(location){this.setValue(this.isSCORM2004()?"cmi.location":"cmi.core.lesson_location",location)}getSuspendData(){return this.getValue("cmi.suspend_data")}setSuspendData(data){this.setValue("cmi.suspend_data",data)}getStudentName(){return this.getValue(this.isSCORM2004()?"cmi.learner_name":"cmi.core.student_name")}getStudentId(){return this.getValue(this.isSCORM2004()?"cmi.learner_id":"cmi.core.student_id")}setLanguage(lang){if(this.isSCORM2004()){this.setValue("cmi.learner_preference.language",lang);return}if(!this.isSupported("cmi.student_preference.language"))return;this.setValue("cmi.student_preference.language",lang)}commit(){this.logger.debug("ScormWrapper::commit");if(!this.lmsConnected){this.handleConnectionError();return}if(this.commitRetryPending){this.logger.debug("ScormWrapper::commit: skipping this commit call as one is already pending.");return}if(this.scorm.save()){this.commitRetries=0;this.lastCommitSuccessTime=new Date;if(this._connection)this._connection.test();Adapt$1.trigger("spoor:commit",this);return}if(this.commitRetries0){const delay=this.timedCommitFrequency*(60*1e3);this.timedCommitIntervalID=window.setInterval(this.commit,delay)}}initRetryCommit(){this.logger.debug(`ScormWrapper::initRetryCommit ${this.commitRetries} out of ${this.maxCommitRetries}`);this.commitRetryPending=true;this.retryCommitTimeoutID=window.setTimeout(this.doRetryCommit,this.commitRetryDelay)}doRetryCommit(){this.logger.debug("ScormWrapper::doRetryCommit");this.commitRetryPending=false;this.commit()}async handleInitializeError(){if(!data$1.isReady)await data$1.whenReady();Adapt$1.trigger("tracking:initializeError");_.defer((()=>this.handleError(new ScormError$1(CLIENT_COULD_NOT_CONNECT))))}handleConnectionError(){let callback=arguments.length>0&&arguments[0]!==undefined?arguments[0]:null;Adapt$1.trigger("tracking:connectionError",callback);this.handleError(new ScormError$1(CLIENT_NOT_CONNECTED))}handleDataError(error){Adapt$1.trigger("tracking:dataError");this.handleError(error)}handleFinishError(error){Adapt$1.trigger("tracking:terminationError");this.handleError(error)}handleError(error){if("value"in error.data){if(error.data.value.length&&error.data.value.length>80)error.data.value=error.data.value.slice(0,80)+"...";if(error.data.value==="")error.data.value="''"}if(!Adapt$1.course)return;const config=Adapt$1.course.get("_spoor");const messages=Object.assign({},ScormError$1.defaultMessages,config&&config._messages);const message=Handlebars.compile(messages[error.name])(error.data);switch(error.name){case CLIENT_COULD_NOT_CONNECT:if(!notify$1.isOpen){wait$1.begin();$(".js-loading").hide();notify$1.popup({_isCancellable:false,title:messages.title,body:message})}}this.logger.error(message);if(!this.suppressErrors&&(!this.logOutputWin||this.logOutputWin.closed)&&confirm(`${messages.title}:\n\n${message}\n\n${messages.pressOk}`)){this.showDebugWindow()}}getInteractionCount(){const count=this.getValue("cmi.interactions._count");return count===""?0:count}recordInteractionScorm12(id,response,correct,latency,type){id=id.trim();const cmiPrefix=`cmi.interactions.${this.getInteractionCount()}`;this.setValue(`${cmiPrefix}.id`,id);this.setValue(`${cmiPrefix}.type`,type);this.setValue(`${cmiPrefix}.student_response`,response);this.setValue(`${cmiPrefix}.result`,correct?"correct":"wrong");if(latency!==null&&latency!==undefined)this.setValue(`${cmiPrefix}.latency`,this.convertToSCORM12Time(latency));this.setValue(`${cmiPrefix}.time`,this.getCMITime())}recordInteractionScorm2004(id,response,correct,latency,type){id=id.trim();const cmiPrefix=`cmi.interactions.${this.getInteractionCount()}`;this.setValue(`${cmiPrefix}.id`,id);this.setValue(`${cmiPrefix}.type`,type);this.setValue(`${cmiPrefix}.learner_response`,response);this.setValue(`${cmiPrefix}.result`,correct?"correct":"incorrect");if(latency!==null&&latency!==undefined)this.setValue(`${cmiPrefix}.latency`,this.convertToSCORM2004Time(latency));this.setValue(`${cmiPrefix}.timestamp`,this.getISO8601Timestamp())}recordInteractionMultipleChoice(id,response,correct,latency,type){if(this.isSCORM2004()){response=response.replace(/,|#/g,"[,]")}else{response=response.replace(/#/g,",");response=this.checkResponse(response,"choice")}const scormRecordInteraction=this.isSCORM2004()?this.recordInteractionScorm2004:this.recordInteractionScorm12;scormRecordInteraction.call(this,id,response,correct,latency,type)}recordInteractionMatching(id,response,correct,latency,type){response=response.replace(/#/g,",");if(this.isSCORM2004()){response=response.replace(/,/g,"[,]");response=response.replace(/\./g,"[.]")}else{response=this.checkResponse(response,"matching")}const scormRecordInteraction=this.isSCORM2004()?this.recordInteractionScorm2004:this.recordInteractionScorm12;scormRecordInteraction.call(this,id,response,correct,latency,type)}recordInteractionFillIn(id,response,correct,latency,type){let maxLength=this.isSCORM2004()?250:255;maxLength=this.maxCharLimitOverride??maxLength;if(response.length>maxLength){response=response.substr(0,maxLength);this.logger.warn(`ScormWrapper::recordInteractionFillIn: response data for ${id} is longer than the maximum allowed length of ${maxLength} characters; data will be truncated to avoid an error.`)}const scormRecordInteraction=this.isSCORM2004()?this.recordInteractionScorm2004:this.recordInteractionScorm12;scormRecordInteraction.call(this,id,response,correct,latency,type)}showDebugWindow(){if(this.logOutputWin&&!this.logOutputWin.closed){this.logOutputWin.close()}this.logOutputWin=window.open("log_output.html","Log","width=600,height=300,status=no,scrollbars=yes,resizable=yes,menubar=yes,toolbar=yes,location=yes,top=0,left=0");if(!this.logOutputWin)return;this.logOutputWin.focus()}convertToSCORM12Time(msConvert){const msPerSec=1e3;const msPerMin=msPerSec*60;const msPerHour=msPerMin*60;const ms=msConvert%msPerSec;msConvert=msConvert-ms;let secs=msConvert%msPerMin;msConvert=msConvert-secs;secs=secs/msPerSec;let mins=msConvert%msPerHour;msConvert=msConvert-mins;mins=mins/msPerMin;const hrs=msConvert/msPerHour;if(hrs>9999){return"9999:99:99.99"}const str=[this.padWithZeroes(hrs,4),this.padWithZeroes(mins,2),this.padWithZeroes(secs,2)].join(":");return`${str}.${Math.floor(ms/10)}`}convertToSCORM2004Time(msConvert){let csConvert=Math.floor(msConvert/10);const csPerSec=100;const csPerMin=csPerSec*60;const csPerHour=csPerMin*60;const csPerDay=csPerHour*24;let days=Math.floor(csConvert/csPerDay);csConvert-=days*csPerDay;days=days?days+"D":"";let hours=Math.floor(csConvert/csPerHour);csConvert-=hours*csPerHour;hours=hours?hours+"H":"";let mins=Math.floor(csConvert/csPerMin);csConvert-=mins*csPerMin;mins=mins?mins+"M":"";let secs=Math.floor(csConvert/csPerSec);csConvert-=secs*csPerSec;secs=secs||"0";let cs=csConvert;cs=cs?"."+cs:"";const seconds=secs+cs+"S";const hms=[hours,mins,seconds].join("");return"P"+days+"T"+hms}getCMITime(){const date=new Date;const hours=this.padWithZeroes(date.getHours(),2);const min=this.padWithZeroes(date.getMinutes(),2);const sec=this.padWithZeroes(date.getSeconds(),2);return[hours,min,sec].join(":")}getISO8601Timestamp(){const date=(new Date).toISOString();return date.replace(/.\d\d\dZ/,"")}padWithZeroes(numToPad,padBy){let len=padBy;while(--len){numToPad="0"+numToPad}return numToPad.slice(-padBy)}isSCORM2004(){return this.scorm.version==="2004"}checkResponse(response,responseType){if(!response)return response;if(responseType!=="choice"&&responseType!=="matching")return response;response=response.split(/,|#/);const self=this;if(responseType==="choice"){response=response.map(checkIdentifier)}else{response=response.map((r=>{const identifiers=r.split(".");return checkIdentifier(identifiers[0])+"."+checkIdentifier(identifiers[1])}))}function checkIdentifier(r){if(r.length===1&&r>="0"&&r<="9")return r;if(r.length===1&&r>="a"&&r<="z")return r;const i=parseInt(r);if(isNaN(i)||i<10||i>35){self.handleError(new ScormError$1(CLIENT_INVALID_CHOICE_VALUE))}return Number(i).toString(36)}return response.join(",")}getExitState(){const completionStatus=this.scorm.data.completionStatus;const isIncomplete=completionStatus==="incomplete"||completionStatus==="not attempted";const exitState=isIncomplete?this.exitStateIfIncomplete:this.exitStateIfComplete;if(exitState!=="auto")return exitState;if(this.isSCORM2004())return isIncomplete?"suspend":"normal";return""}}ScormWrapper.instance=null;var ScormWrapper$1=__AMD("extensions/adapt-contrib-spoor/js/scorm/wrapper",ScormWrapper);const LZMAWorker=window.LZMAFactory("./libraries/lzma_worker-min.js");const ZeroString={};function makeZeroString(length){ZeroString[length]=ZeroString[length]||new Array(length+1).join("0");return ZeroString[length]}for(let i=1,l=64;i<=l;i++){makeZeroString(i)}function zeroPadRightToLength(string,length){const padLength=length-string.length;if(padLength>0){string+=makeZeroString(padLength)}return string}function zeroPadLeftToLength(string,length){const padLength=length-string.length;if(padLength>0){string=makeZeroString(padLength)+string}return string}function zeroPadRightToMultiple(string,multiple){const padLength=multiple-string.length%multiple;if(padLength!==multiple){string+=makeZeroString(padLength)}return string}function binaryToUnsignedInteger(binary,binaryLength){if(binaryLength===0){return 0}binary=zeroPadLeftToLength(binary,binaryLength);const integer=parseInt(binary.slice(0,binaryLength),2);return integer}function shiftUnsignedIntegerFromBinary(binary,binaryLength){if(binaryLength===0){return[0,binary]}binary=zeroPadLeftToLength(binary,binaryLength);const integer=parseInt(binary.slice(0,binaryLength),2);binary=binary.slice(binaryLength);return[integer,binary]}function shiftBinary(binary,binaryLength){if(binaryLength===0){return["",binary]}binary=zeroPadLeftToLength(binary,binaryLength);const shifted=binary.slice(0,binaryLength);binary=binary.slice(binaryLength);return[shifted,binary]}function unsignedIntegerToBinary(integer,binaryLength){if(binaryLength===0){return""}let binary=Math.abs(integer).toString(2);if(typeof binaryLength==="undefined"){return binary}const length=binary.length;if(length>binaryLength){throw new Error(`Integer too big for specified binary length. integer: ${integer} binarylen: ${binaryLength}`)}binary=zeroPadLeftToLength(binary,binaryLength);return binary}function byteArrayToString(array){const arrayLength=array.length;let string=new Array(arrayLength);for(let i=0,l=arrayLength;i1&&arguments[1]!==undefined?arguments[1]:null;let binary=unsignedIntegerToBinary(integer,this.valueBinaryLength);if(logStats){this.log(binary)}binary=[binary];return binary}shiftValueFromBinary(binary){let integer;[integer,binary]=shiftUnsignedIntegerFromBinary(binary,this.valueBinaryLength);return[integer,binary]}}class FixedBooleanType extends FixedIntegerType{constructor(options){options.valueBinaryLength=1;super(options);this.esType="boolean"}shiftValueFromBinary(binary){const bool=binary[0]==="1";binary=binary.slice(1);return[bool,binary]}}class LengthAndValueBinary{constructor(parent,name,bitSizes){this.parent=parent;this.name=name;this.bitSizes=bitSizes;this.maxValues=___default["default"].flatten(this.bitSizes).map((value=>Math.pow(2,value)-1));this.maxValue=this.maxValues[this.maxValues.length-1];this.sizeBinaryLength=unsignedIntegerToBinary(this.bitSizes.length-1).length}valueToBinary(integer){let logStats=arguments.length>1&&arguments[1]!==undefined?arguments[1]:null;const parentName=this.parent.name;const sizeIndex=this.maxValues.findIndex((maxValue=>integer<=maxValue));if(sizeIndex===-1){throw new Error(`Value is too large for type: ${parentName} value: ${integer} max: ${this.maxValue}`)}const sizeBinary=unsignedIntegerToBinary(sizeIndex,this.sizeBinaryLength);const valueLength=this.bitSizes[sizeIndex];const name=this.name;if(logStats){logs.typeLengths[parentName]=logs.typeLengths[parentName]||{};logs.typeLengths[parentName][name]=logs.typeLengths[parentName][name]||{};logs.typeLengths[parentName][name][valueLength]=logs.typeLengths[parentName][name][valueLength]||0;logs.typeLengths[parentName][name][valueLength]++}const integerBinary=unsignedIntegerToBinary(integer,valueLength);const binary=[sizeBinary,integerBinary];return binary}shiftValueFromBinary(binary){let sizeBinary;[sizeBinary,binary]=shiftBinary(binary,this.sizeBinaryLength);const sizeIndex=binaryToUnsignedInteger(sizeBinary);const valueLength=this.bitSizes[sizeIndex];let integer;[integer,binary]=shiftUnsignedIntegerFromBinary(binary,valueLength);return[integer,binary]}}class VariableIntegerType extends FixedIntegerType{constructor(options){super(options);this.isNegative=this.minValue<0&&this.maxValue===0;this.integer=new LengthAndValueBinary(this,"integer",options.integerBitSizes)}valueToBinary(integer){let logStats=arguments.length>1&&arguments[1]!==undefined?arguments[1]:null;integer=integer.toFixed(0);const binary=this.integer.valueToBinary(Math.abs(integer),logStats);if(logStats){this.log(binary)}return binary}shiftValueFromBinary(binary){let integer;[integer,binary]=this.integer.shiftValueFromBinary(binary);if(this.isNegative){integer=-integer}return[integer,binary]}}class VariableArrayType extends VariableIntegerType{constructor(options){super(options);this.esType="array"}valueToBinary(array){let logStats=arguments.length>1&&arguments[1]!==undefined?arguments[1]:null;const arrayLength=array.length;const binary=super.valueToBinary(arrayLength);if(arrayLength){const valueType=findValueTypeFromValues(array);binary.push(valueType.binaryType);binary.type=valueType.name;binary.push(array.map((value=>valueType.valueToBinary(value,logStats))))}if(logStats){this.log(binary)}return binary}shiftValueFromBinary(binary){let arrayLength;[arrayLength,binary]=super.shiftValueFromBinary(binary);const value=new Array(arrayLength);if(arrayLength){let valueType;[valueType,binary]=shiftValueTypeFromBinary(binary);for(let i=0,l=arrayLength;i1&&arguments[1]!==undefined?arguments[1]:null;integer=integer.toFixed(0);const isNegative=integer<0;const signBinary=isNegative?"1":"0";const integerBinary=this.integer.valueToBinary(Math.abs(integer),logStats);const binary=[signBinary,integerBinary];if(logStats){this.log(binary)}return binary}shiftValueFromBinary(binary){let isNegative;[isNegative,binary]=shiftUnsignedIntegerFromBinary(binary,1);let integer;[integer,binary]=this.integer.shiftValueFromBinary(binary);if(isNegative){integer=-integer}return[integer,binary]}}class VariableDecimalType extends VariableIntegerType{constructor(options){super(options);this.isFloat=true;this.decimal=new LengthAndValueBinary(this,"decimal",options.decimalBitSizes)}valueToBinary(float){let logStats=arguments.length>1&&arguments[1]!==undefined?arguments[1]:null;float=float.toFixed(2);const isNegative=float<0;float=Math.abs(float);const parts=String(float).split(".");const higherInteger=parseInt(parts[0]);const lowerInteger=parseInt(zeroPadRightToLength(parts[1]||0,2));const signBinary=isNegative?"1":"0";const integerValueBinary=this.integer.valueToBinary(higherInteger,logStats);const decimalValueBinary=this.decimal.valueToBinary(lowerInteger,logStats);const binary=[signBinary,integerValueBinary,decimalValueBinary];if(logStats){this.log(binary)}return binary}shiftValueFromBinary(binary){let isNegative;[isNegative,binary]=shiftUnsignedIntegerFromBinary(binary,1);let higherInteger;[higherInteger,binary]=this.integer.shiftValueFromBinary(binary);let lowerInteger;[lowerInteger,binary]=this.decimal.shiftValueFromBinary(binary);lowerInteger=zeroPadLeftToLength(String(lowerInteger),2);let float=parseFloat(higherInteger+"."+lowerInteger);if(isNegative){float=-float}return[float,binary]}}const arrayType=new VariableArrayType({name:"array",binaryType:"10",integerBitSizes:[4,16]});const booleanType=new FixedBooleanType({name:"boolean",binaryType:"0"});const integerTypes=[new FixedIntegerType({name:"uint3",binaryType:"1110",valueBinaryLength:3}),new VariableIntegerType({name:"vint8+",binaryType:"110",minValue:0,maxValue:255,integerBitSizes:[2,8]}),new VariableIntegerType({name:"vint8-",binaryType:"111100",minValue:-255,maxValue:0,integerBitSizes:[2,8]}),new VariableSignedIntegerType({name:"sint32",binaryType:"111110",minValue:-4294967295,maxValue:4294967295,integerBitSizes:[2,4,16,32]})];const decimalTypes=[new VariableDecimalType({name:"sdec15",binaryType:"111101",minValue:-255.99,maxValue:255.99,integerBitSizes:[2,8],decimalBitSizes:[0,7]}),new VariableDecimalType({name:"sdec39",binaryType:"111111",minValue:-4294967295.99,maxValue:4294967295.99,integerBitSizes:[2,4,16,32],decimalBitSizes:[0,7]})];const ValueTypes=[booleanType,arrayType].concat(integerTypes).concat(decimalTypes);ValueTypes.nameIndex={};ValueTypes.forEach((valueType=>ValueTypes.nameIndex[valueType.name]=valueType));function esTypeOf(value){if(Array.isArray(value)){return"array"}if(value===null){return"null"}return typeof value}function findValueTypeFromName(name){return ValueTypes.nameIndex[name.toLowerCase()]}function findValueTypeFromValue(value){const esType=esTypeOf(value);switch(esType){case"array":return arrayType;case"boolean":return booleanType}value=value.toFixed(2);const isFloat=!Number.isInteger(value);const isValueInValueTypeRange=valueType=>value>=valueType.minValue&&value<=valueType.maxValue;const valueType=isFloat?decimalTypes.find(isValueInValueTypeRange):integerTypes.find(isValueInValueTypeRange);if(!valueType){throw new Error(`Cannot find type from value: ${value}`)}return valueType}function findValueTypeFromValues(values){if(!values.length){return}let minValue=0;let maxValue=0;let isFloat=false;const esTypes=values.map((value=>{const valueType=findValueTypeFromValue(value);if(valueType.esType==="number"){minValue=Math.min(value,minValue);maxValue=Math.max(value,maxValue);isFloat=isFloat||!Number.isInteger(value)}return valueType.esType}));const uniqESTypes=[...new Set(esTypes)];if(uniqESTypes.length>1){throw new Error(`Cannot resolve array to one type: ${uniqESTypes.join()}`)}const esType=uniqESTypes[0];switch(esType){case"array":return arrayType;case"boolean":return booleanType}const isRangeInValueTypeRange=valueType=>minValue>=valueType.minValue&&maxValue<=valueType.maxValue;const valueType=isFloat?decimalTypes.find(isRangeInValueTypeRange):integerTypes.find(isRangeInValueTypeRange);if(!valueType){throw new Error(`Cannot find type from value. min: ${minValue} max: ${maxValue} isfloat: ${isFloat}`)}return valueType}function shiftValueTypeFromBinary(binary){const valueType=ValueTypes.find((valueType=>{const binaryType=binary.slice(0,valueType.binaryTypeLength);return binaryType===valueType.binaryType}));if(!valueType){throw new Error(`Cannot find type from binary: ${binary.slice(0,6)}...`)}binary=binary.slice(valueType.binaryTypeLength);return[valueType,binary]}function convertValuesToNumbers(value){const esType=esTypeOf(value);switch(esType){case"array":return value.map(convertValuesToNumbers);case"undefined":case"null":return value?1:0;case"boolean":case"number":return value}throw new Error(`Cannot convert ${esType} to number`)}class Converter{getInvalidTypeError(value){try{value=convertValuesToNumbers(value);esTypeOf(value)==="array"?findValueTypeFromValues(value):findValueTypeFromValue(value);return}catch(err){return err}}valueToBinary(value){let typeName=arguments.length>1&&arguments[1]!==undefined?arguments[1]:null;let logStats=arguments.length>2&&arguments[2]!==undefined?arguments[2]:null;this.clearLog();const hasInitialType=typeof typeName==="string";value=convertValuesToNumbers(value);const valueType=hasInitialType?findValueTypeFromName(typeName):findValueTypeFromValue(value);if(!valueType){throw new Error(`Could not find value type from ${hasInitialType?`name ${typeName}`:`value ${value}`} accepts: ${Object.keys(ValueTypes.nameIndex)}. Leave typeName empty for auto-detect.`)}const binary=valueType.valueToBinary(value,logStats);if(!hasInitialType){binary.unshift(valueType.binaryType)}if(logStats){this.printLog()}return binary}valueFromBinary(binary){let typeName=arguments.length>1&&arguments[1]!==undefined?arguments[1]:null;binary=___default["default"].flatten(binary).join("");const hasInitialType=typeof typeName==="string";let valueType;if(hasInitialType){valueType=findValueTypeFromName(typeName)}else{[valueType,binary]=shiftValueTypeFromBinary(binary)}if(!valueType||!(valueType instanceof AbstractValueType)){throw new Error(`Could not find value type from ${hasInitialType?`name "${typeName}"`:`binary "${binary.slice(0,8)}"...`} accepts: ${Object.keys(ValueTypes.nameIndex)}. Leave typeName empty for auto-detect.`)}const[value]=valueType.shiftValueFromBinary(binary);return value}clearLog(){logs.usedTypes={};logs.typeLengths={};logs.binarySamples={}}printLog(){console.log("Types used count:",logs.usedTypes);console.log("Type lengths used count:",logs.typeLengths);console.log("Type binary samples:",logs.binarySamples)}serialize(value){let typeName=arguments.length>1&&arguments[1]!==undefined?arguments[1]:null;let logStats=arguments.length>2&&arguments[2]!==undefined?arguments[2]:null;const binary=this.valueToBinary(value,typeName,logStats);const base64=binaryToBase64(binary);return base64}async serializeAsync(value){const binary=this.valueToBinary(value,null,null);const base64=binaryToBase64(binary);const isLargeArray=Array.isArray(value)&&value.length>10;if(isLargeArray){return new Promise((resolve=>{LZMAWorker.compress(JSON.stringify(value),1,(data=>{const compressedBase64=`#${window.btoa(data.map((i=>String.fromCharCode(i+128))).join("")).replace(/=/g,"")}`;const isCompressedSmaller=compressedBase64.length1&&arguments[1]!==undefined?arguments[1]:null;const isLZMACompressed=base64[0]==="#";if(isLZMACompressed)return JSON.parse(window.LZMA.decompress(window.atob(base64.slice(1)).split("").map((c=>c.charCodeAt(0)-128))));const binary=base64ToBinary(base64);const value=this.valueFromBinary(binary,typeName);return value}}var SCORMSuspendData=__AMD("extensions/adapt-contrib-spoor/js/serializers/SCORMSuspendData",window.SCORMSuspendData=new Converter);var ComponentSerializer=__AMD("extensions/adapt-contrib-spoor/js/serializers/ComponentSerializer",class ComponentSerializer extends Backbone.Controller{initialize(trackingIdType,shouldCompress){this.trackingIdType=trackingIdType;this.shouldCompress=shouldCompress}async serialize(shouldStoreResponses,shouldStoreAttempts){if(shouldStoreAttempts&&!shouldStoreResponses){logging$1.warnOnce("SPOOR configuration error, cannot use '_shouldStoreAttempts' without '_shouldStoreResponses'")}const states=[];data$1.each((model=>{if(model.get("_type")!==this.trackingIdType){return}const trackingId=model.get("_trackingId");if(typeof trackingId==="undefined"){return}const isContainer=model.hasManagedChildren;let components=isContainer?model.findDescendantModels("component"):[model];components=components.filter((component=>component.get("_isTrackable")!==false));components.forEach(((component,index)=>{if(component.get("_isTrackable")===false){return}if(!shouldStoreResponses){const state=[[trackingId,index],[component.get("_isComplete")]];states.push(state);return}let modelState=null;if(!component.getAttemptState){modelState=component.get("_isQuestionType")?[[component.get("_score")||0,component.get("_attemptsLeft")||0],[component.get("_isComplete")||false,component.get("_isInteractionComplete")||false,component.get("_isSubmitted")||false,component.get("_isCorrect")||false],[component.get("_userAnswer")]]:[[],[component.get("_isComplete")||false,component.get("_isInteractionComplete")||false],[component.get("_userAnswer")]]}else{modelState=component.getAttemptState()}const userAnswer=modelState[2][0];const hasUserAnswer=typeof userAnswer!=="undefined"&&userAnswer!==null;const isUserAnswerArray=Array.isArray(userAnswer);if(!hasUserAnswer){modelState[2][0]=[]}else if(!isUserAnswerArray){modelState[2][0]=[modelState[2][0]]}const attemptStates=component.get("_attemptStates");const hasAttemptStates=shouldStoreAttempts&&Array.isArray(attemptStates);if(hasAttemptStates){modelState[2][1]=attemptStates}const state=[[trackingId,index],[hasUserAnswer,isUserAnswerArray,hasAttemptStates],modelState];states.push(state)}))}));if(this.shouldCompress)return await SCORMSuspendData.serializeAsync(states);return SCORMSuspendData.serialize(states)}deserialize(binary){const trackingIdMap=data$1.toArray().reduce(((trackingIdMap,model)=>{const trackingId=model.get("_trackingId");if(typeof trackingId==="undefined")return trackingIdMap;trackingIdMap[trackingId]=model;return trackingIdMap}),{});const states=SCORMSuspendData.deserialize(binary);const shouldStoreResponses=states[0].length>2;states.forEach((state=>{const[trackingId,index]=state[0];const model=trackingIdMap[trackingId];if(!model){return}const isContainer=model.hasManagedChildren;let components=isContainer?model.findDescendantModels("component"):[model];components=components.filter((component=>component.get("_isTrackable")!==false));const component=components[index];if(!component){logging$1.warn(`SPOOR could not restore tracking id: ${trackingId}, index: ${index}`);return}if(!shouldStoreResponses){const isComplete=state[1][0];component.set("_isComplete",isComplete);return}const[hasUserAnswer,isUserAnswerArray,hasAttemptStates]=state[1];const modelState=state[2];if(!hasUserAnswer){modelState[2][0]=null}else if(!isUserAnswerArray){modelState[2][0]=modelState[2][0][0]}if(!hasAttemptStates){modelState[2][1]=null}if(component.setAttemptObject){component.set("_attemptStates",modelState[2][1]);const attemptObject=component.getAttemptObject(modelState);component.setAttemptObject(attemptObject,false);return}component.get("_isQuestionType")?component.set({_score:modelState[0][0],_attemptsLeft:modelState[0][1],_isComplete:modelState[1][0],_isInteractionComplete:modelState[1][1],_isSubmitted:modelState[1][2],_isCorrect:modelState[1][3],_userAnswer:modelState[2][0],_attemptStates:modelState[2][1]}):component.set({_isComplete:modelState[1][0],_isInteractionComplete:modelState[1][1],_userAnswer:modelState[2][0],_attemptStates:modelState[2][1]})}))}});var StatefulSession=__AMD("extensions/adapt-contrib-spoor/js/adapt-stateful-session",class StatefulSession extends Backbone.Controller{initialize(){_.bindAll(this,"beginSession","onVisibilityChange","endSession");this.debouncedSaveSession=_.debounce(this.saveSessionState.bind(this),1);this.scorm=ScormWrapper$1.getInstance();this._trackingIdType="block";this._componentSerializer=null;this._shouldCompress=false;this._shouldStoreResponses=true;this._shouldStoreAttempts=false;this._shouldRecordInteractions=true;this._uniqueInteractionIds=false;this.beginSession()}beginSession(){this.listenTo(Adapt$1,"app:dataReady",this.restoreSession);this._trackingIdType=Adapt$1.build.get("trackingIdType")||"block";if(window.location.search.indexOf("nolmserrors")!==-1){this.scorm.suppressErrors=true}const config=Adapt$1.spoor.config;if(!config)return;const tracking=config._tracking;this._shouldStoreResponses=tracking&&tracking._shouldStoreResponses||false;this._shouldStoreAttempts=tracking&&tracking._shouldStoreAttempts||false;this._shouldCompress=tracking&&tracking._shouldCompress||false;this._componentSerializer=new ComponentSerializer(this._trackingIdType,this._shouldCompress);if(tracking?._shouldRecordInteractions===false){this._shouldRecordInteractions=false}const settings=config._advancedSettings;if(!settings){this.scorm.setVersion("1.2");this.scorm.initialize();return}this._uniqueInteractionIds=settings._uniqueInteractionIds||false;this.scorm.initialize(settings)}restoreSession(){this.setupLearnerInfo();this.restoreSessionState();_.defer(this.setupEventListeners.bind(this))}setupLearnerInfo(){const globals=Adapt$1.course.get("_globals");if(!globals._learnerInfo){globals._learnerInfo={}}Object.assign(globals._learnerInfo,offlineStorage$1.get("learnerinfo"))}restoreSessionState(){const sessionPairs=offlineStorage$1.get();const hasNoPairs=!Object.keys(sessionPairs).length;if(hasNoPairs)return;if(sessionPairs.c){const[_isComplete,_isAssessmentPassed]=SCORMSuspendData.deserialize(sessionPairs.c);Adapt$1.course.set({_isComplete:_isComplete,_isAssessmentPassed:_isAssessmentPassed})}if(!sessionPairs.q)return;this._componentSerializer?.deserialize(sessionPairs.q)}setupEventListeners(){this.removeEventListeners();this.listenTo(Adapt$1.components,"change:_isComplete",this.debouncedSaveSession);this.listenTo(Adapt$1.course,"change:_isComplete",this.debouncedSaveSession);if(this._shouldStoreResponses){this.listenTo(data$1,"change:_isSubmitted change:_userAnswer",this.debouncedSaveSession)}this.listenTo(Adapt$1,{"app:dataReady":this.restoreSession,"app:languageChanged":this.onLanguageChanged,"questionView:recordInteraction":this.onQuestionRecordInteraction,"tracking:complete":this.onTrackingComplete});const config=Adapt$1.spoor.config;const advancedSettings=config._advancedSettings;const shouldCommitOnVisibilityChange=!advancedSettings||advancedSettings._commitOnVisibilityChangeHidden!==false;if(shouldCommitOnVisibilityChange){document.addEventListener("visibilitychange",this.onVisibilityChange)}$(window).on("beforeunload unload",this.endSession)}async saveSessionState(){const isMidRender=!Adapt$1.parentView?.model.get("_isReady");if(isMidRender)return this.debouncedSaveSession();const courseState=SCORMSuspendData.serialize([Boolean(Adapt$1.course.get("_isComplete")),Boolean(Adapt$1.course.get("_isAssessmentPassed"))]);const componentStates=await(this._componentSerializer?.serialize(this._shouldStoreResponses,this._shouldStoreAttempts));const sessionPairs={c:courseState,q:componentStates};offlineStorage$1.set(sessionPairs);this.printCompletionInformation(sessionPairs)}printCompletionInformation(suspendData){if(typeof suspendData==="string"){suspendData=JSON.parse(suspendData)}const courseState=SCORMSuspendData.deserialize(suspendData.c);const courseComplete=courseState[0];const assessmentPassed=courseState[1];const trackingIdModels=data$1.filter((model=>model.get("_type")===this._trackingIdType&&model.has("_trackingId")));const trackingIds=trackingIdModels.map((model=>model.get("_trackingId")));if(!trackingIds.length){logging$1.info(`course._isComplete: ${courseComplete}, course._isAssessmentPassed: ${assessmentPassed}, ${this._trackingIdType} completion: no tracking ids found`);return}const completionData=SCORMSuspendData.deserialize(suspendData.q);const max=Math.max(...completionData.map((item=>item[0][0])));const shouldStoreResponses=completionData[0].length===3;const completionString=completionData.reduce(((markers,item)=>{const trackingId=item[0][0];const isComplete=shouldStoreResponses?item[2][1][0]:item[1][0];const mark=isComplete?"1":"0";markers[trackingId]=markers[trackingId]==="-"||markers[trackingId]==="1"?mark:"0";return markers}),new Array(max+1).fill("-")).join("");logging$1.info(`course._isComplete: ${courseComplete}, course._isAssessmentPassed: ${assessmentPassed}, ${this._trackingIdType} completion: ${completionString}`)}onLanguageChanged(){const config=Adapt$1.spoor.config;if(config?._reporting?._resetStatusOnLanguageChange!==true)return;offlineStorage$1.set("status","incomplete")}onVisibilityChange(){if(document.visibilityState==="hidden")this.scorm.commit()}onQuestionRecordInteraction(questionView){if(!this._shouldRecordInteractions)return;const questionModel=questionView.model;const responseType=questionModel.getResponseType?questionModel.getResponseType():questionView.getResponseType();if(_.isEmpty(responseType))return;const id=this._uniqueInteractionIds?`${this.scorm.getInteractionCount()}-${questionModel.get("_id")}`:questionModel.get("_id");const response=questionModel.getResponse?questionModel.getResponse():questionView.getResponse();const result=questionModel.isCorrect?questionModel.isCorrect():questionView.isCorrect();const latency=questionModel.getLatency?questionModel.getLatency():questionView.getLatency();offlineStorage$1.set("interaction",id,response,result,latency,responseType)}onTrackingComplete(completionData){const config=Adapt$1.spoor.config;this.saveSessionState();let completionStatus=completionData.status.asLowerCase;switch(completionData.status){case COMPLETION_STATE$1.COMPLETED:case COMPLETION_STATE$1.PASSED:{if(!config?._reporting?._onTrackingCriteriaMet){logging$1.warn(`No value defined for '_onTrackingCriteriaMet', so defaulting to '${completionStatus}'`)}else{completionStatus=config._reporting._onTrackingCriteriaMet}break}case COMPLETION_STATE$1.FAILED:{if(!config?._reporting?._onAssessmentFailure){logging$1.warn(`No value defined for '_onAssessmentFailure', so defaulting to '${completionStatus}'`)}else{completionStatus=config._reporting._onAssessmentFailure}}}offlineStorage$1.set("status",completionStatus)}endSession(){if(!this.scorm.finishCalled){this.scorm.finish()}this.removeEventListeners()}removeEventListeners(){$(window).off("beforeunload unload",this.endSession);document.removeEventListener("visibilitychange",this.onVisibilityChange);this.stopListening()}});var OfflineStorage=__AMD("extensions/adapt-contrib-spoor/js/adapt-offlineStorage-scorm",class OfflineStorageScorm extends Backbone.Controller{initialize(statefulSession){this.offlineStorage=offlineStorage$1;this.scorm=ScormWrapper$1.getInstance();this.statefulSession=statefulSession;this.temporaryStore={};this.suspendDataStore={};this.suspendDataRestored=false;offlineStorage$1.initialize(this)}save(){this.statefulSession.saveSessionState();this.scorm.commit()}serialize(){return SCORMSuspendData.serialize(...arguments)}deserialize(){return SCORMSuspendData.deserialize(...arguments)}get(name){if(name===undefined){if(this.useTemporaryStore())return this.temporaryStore;this.suspendDataStore=this.getCustomStates();const data=Object.assign(_.clone(this.suspendDataStore),{location:this.scorm.getLessonLocation(),score:this.scorm.getScore(),status:this.scorm.getStatus(),student:this.scorm.getStudentName(),learnerInfo:this.getLearnerInfo()});this.suspendDataRestored=true;return data}if(this.useTemporaryStore())return this.temporaryStore[name];let courseState;switch(name.toLowerCase()){case"location":return this.scorm.getLessonLocation();case"score":return this.scorm.getScore();case"status":return this.scorm.getStatus();case"student":return this.scorm.getStudentName();case"learnerinfo":return this.getLearnerInfo();case"coursestate":{courseState=this.getCustomState("c");const stateArray=courseState&&SCORMSuspendData.deserialize(courseState)||[];return{_isCourseComplete:Boolean(stateArray.slice(0,1).map(Number)[0]),_isAssessmentPassed:Boolean(stateArray.slice(1,2).map(Number)[0]),completion:stateArray.slice(2).map(Number).map(String).join("")||""}}case"completion":courseState=this.getCustomState("c");return courseState&&SCORMSuspendData.deserialize(courseState).slice(2).map(Number).map(String).join("")||"";case"_iscoursecomplete":courseState=this.getCustomState("c");return Boolean(courseState&&SCORMSuspendData.deserialize(courseState).slice(0,1).map(Number)[0]);case"_isassessmentpassed":courseState=this.getCustomState("c");return Boolean(courseState&&SCORMSuspendData.deserialize(courseState).slice(1,2).map(Number)[0]);case"questions":{const questionsState=this.getCustomState("q");return questionsState||""}default:return this.getCustomState(name)}}set(name,value){const args=[...arguments].slice(1);const isObject=typeof name==="object";if(isObject){value=name;name="suspendData"}if(this.useTemporaryStore()){if(isObject){Object.assign(this.temporaryStore,value)}else{this.temporaryStore[name]=value}return true}switch(name.toLowerCase()){case"interaction":return this.scorm.recordInteraction(...args);case"location":return this.scorm.setLessonLocation(...args);case"score":return this.scorm.setScore(...args);case"status":return this.scorm.setStatus(...args);case"student":case"learnerinfo":return false;case"lang":this.scorm.setLanguage(value);break}if(isObject){Object.assign(this.suspendDataStore,value)}else{this.suspendDataStore[name]=value}const dataAsString=JSON.stringify(this.suspendDataStore);return this.suspendDataRestored?this.scorm.setSuspendData(dataAsString):false}clear(){this.temporaryStore={};this.suspendDataStore={};const dataAsString=JSON.stringify(this.suspendDataStore);this.scorm.setSuspendData(dataAsString)}getCustomStates(){const isSuspendDataStoreEmpty=_.isEmpty(this.suspendDataStore);if(!isSuspendDataStoreEmpty&&this.suspendDataRestored){return _.clone(this.suspendDataStore)}const dataAsString=this.scorm.getSuspendData();if(dataAsString===""||dataAsString===" "||dataAsString===undefined){return{}}const dataAsJSON=JSON.parse(dataAsString);if(!isSuspendDataStoreEmpty&&!this.suspendDataRestored){Object.assign(dataAsJSON,this.suspendDataStore)}return dataAsJSON}getCustomState(name){const dataAsJSON=this.getCustomStates();return dataAsJSON[name]}useTemporaryStore(){const cfg=Adapt$1.config.get("_spoor");if(!this.scorm.lmsConnected||cfg?._isEnabled===false)return true;return false}getLearnerInfo(){const id=this.scorm.getStudentId();let name=this.scorm.getStudentName();let firstname="";let lastname="";let hasName=name&&name!=="undefined";const isNameCommaSeparated=hasName&&name.includes(",");const isNameSpaceSeparated=hasName&&name.includes(" ");hasName=hasName&&(isNameCommaSeparated||isNameSpaceSeparated);if(!hasName){console.log("SPOOR: LMS learner_name not in 'lastname, firstname' or 'firstname lastname' format");return{id:id,name:name,firstname:firstname,lastname:lastname}}const separator=isNameCommaSeparated?",":" ";const nameParts=name.split(separator);if(isNameCommaSeparated){nameParts.reverse()}[firstname,lastname]=nameParts.map((part=>part.trim()));name=`${firstname} ${lastname}`;return{id:id,name:name,firstname:firstname,lastname:lastname}}});const shouldStart=Object.prototype.hasOwnProperty.call(window,"ISCOOKIELMS")&&window.ISCOOKIELMS!==null;const isStoringData=window.ISCOOKIELMS===true;const set=(object,path,value)=>{const keys=path.split(".");const initialKeys=keys.slice(0,-1);const lastKey=keys[keys.length-1];const finalObject=initialKeys.reduce(((object,key)=>object[key]=object?.[key]||{}),object);finalObject[lastKey]=value};const get=(object,path)=>{const keys=path.split(".");return keys.reduce(((object,key)=>object?.[key]),object)};function createResetButton(){const resetButtonStyle='';const resetButton='';$("body").append($(resetButtonStyle));const $button=$(resetButton);$("body").append($button);$button.on("click",(e=>{if(!e.shiftKey){Cookies__default["default"].remove("_spoor");alert("SCORM tracking cookie has been deleted! Tip: shift-click reset to preserve cookie.")}window.location=window.location.pathname}))}function configure(){if(!isStoringData)return;const spoorConfig=Adapt$1.config.get("_spoor");if(spoorConfig?._showCookieLmsResetButton)createResetButton();if(!spoorConfig?._shouldPersistCookieLMSData){Cookies__default["default"].defaults={sameSite:"strict"}}}function postStorageWarning(){if(postStorageWarning.__storageWarningTimeoutId!==null)return;postStorageWarning.__storageWarningTimeoutId=setTimeout((()=>{const notificationMethod=Adapt$1.config.get("_spoor")?._advancedSettings?._suppressErrors===true?console.error:alert;postStorageWarning.__storageWarningTimeoutId=null;notificationMethod("Warning: possible cookie storage limit exceeded - tracking may malfunction")}),1e3)}function start(){const GenericAPI={__offlineAPIWrapper:true,store(force){if(!isStoringData)return;if(!force&&Cookies__default["default"].get("_spoor")===undefined)return;Cookies__default["default"].set("_spoor",this.data);if(Cookies__default["default"].get("_spoor").length!==JSON.stringify(this.data).length)postStorageWarning()},initialize(){let defaults=arguments.length>0&&arguments[0]!==undefined?arguments[0]:{};if(!isStoringData){this.data={};Object.entries(defaults).forEach((_ref=>{let[path,value]=_ref;return set(this.data,path,value)}));return}this.data=Cookies__default["default"].getJSON("_spoor");if(!this.data){this.data={};Object.entries(defaults).forEach((_ref2=>{let[path,value]=_ref2;return set(this.data,path,value)}));this.store(true);return false}const entries=Object.entries(this.data);const isUsingLegacyKeys=entries[0][0].includes(".");if(isUsingLegacyKeys){const reworked={};Object.entries(defaults).forEach((_ref3=>{let[path,value]=_ref3;return set(reworked,path,value)}));Object.entries(entries).forEach((_ref4=>{let[path,value]=_ref4;return set(reworked,path,value)}));this.data=reworked;this.store(true)}return true}};const SCORM1_2=window.API={...GenericAPI,LMSInitialize(){configure();this.initialize({"cmi.interactions":[],"cmi.core.lesson_status":"not attempted","cmi.suspend_data":"","cmi.core.student_name":"Surname, Sam","cmi.core.student_id":"sam.surname@example.org"});return"true"},LMSFinish(){return"true"},LMSGetValue(path){const value=get(this.data,path);const keys=path.split(".");const firstKey=keys[0];const lastKey=keys[keys.length-1];if(firstKey==="cmi"&&lastKey==="_count"){const arrayPath=keys.slice(0,-1).join(".");return get(this.data,arrayPath)?.length??0}return value},LMSSetValue(path,value){const keys=path.split(".");const firstKey=keys[0];const lastKey=keys[keys.length-1];if(firstKey==="cmi"&&lastKey==="_count"){return"true"}set(this.data,path,value);this.store();return"true"},LMSCommit(){return"true"},LMSGetLastError(){return 0},LMSGetErrorString(){return"Fake error string."},LMSGetDiagnostic(){return"Fake diagnostic information."}};window.API_1484_11={...GenericAPI,Initialize(){configure();this.initialize({"cmi.interactions":[],"cmi.completion_status":"not attempted","cmi.suspend_data":"","cmi.learner_name":"Surname, Sam","cmi.learner_id":"sam.surname@example.org"});return"true"},Terminate:SCORM1_2.LMSFinish,GetValue:SCORM1_2.LMSGetValue,SetValue:SCORM1_2.LMSSetValue,Commit:SCORM1_2.LMSCommit,GetLastError:SCORM1_2.LMSGetLastError,GetErrorString:SCORM1_2.LMSGetErrorString,GetDiagnostic:SCORM1_2.LMSGetDiagnostic}}class Spoor extends Backbone.Controller{initialize(){this.config=null;if(shouldStart)start();this.scorm=ScormWrapper$1.getInstance();this.listenToOnce(Adapt$1,"offlineStorage:prepare",this._prepare)}_prepare(){this.config=Adapt$1.config.get("_spoor");if(!this.isEnabled){offlineStorage$1.setReadyStatus();return}this.statefulSession=new StatefulSession;this.offlineStorage=new OfflineStorage(this.statefulSession);offlineStorage$1.get();offlineStorage$1.setReadyStatus();$.onKeyCombo([68,69,86],(()=>{Adapt$1.spoor.scorm.showDebugWindow()}))}get isEnabled(){return this.config&&this.config._isEnabled}}Adapt$1.spoor=new Spoor;__AMD("extensions/adapt-contrib-spoor/js/adapt-contrib-spoor",Adapt$1.spoor);function _deepDefaults(original){for(var _len=arguments.length,defaultObjects=new Array(_len>1?_len-1:0),_key=1;_key<_len;_key++){defaultObjects[_key-1]=arguments[_key]}defaultObjects.reverse();defaultObjects.forEach((defaults=>{const keyValuePairs=Object.entries(defaults);keyValuePairs.forEach((_ref=>{let[key,defaultValue]=_ref;const isRecursiveObject=typeof defaultValue==="object"&&!Array.isArray(defaultValue)&&defaultValue!==null;if(isRecursiveObject){original[key]=_deepDefaults(original[key]||{},defaultValue);return}const isValueAlreadySet=Object.prototype.hasOwnProperty.call(original,key);if(isValueAlreadySet)return;original[key]=defaultValue}))}));return original}const configDefaults={_isEnabled:false,_isInherited:false,_autoScroll:true,_scrollTo:"@block +1",_onChildren:false,_button:{_isEnabled:true,_isFullWidth:true,_autoHide:false,_hasIcon:false,_styleBeforeCompletion:"hidden",_styleAfterClick:"hidden",_component:"trickle-button",_className:"",text:"Continue",ariaLabel:"",startText:"",startAriaLabel:"",finalText:"",finalAriaLabel:""},_stepLocking:{_isEnabled:true,_isCompletionRequired:true,_isLockedOnRevisit:false}};function isModelArticleWithOnChildren(model){const type=model.get("_type");const trickleConfig=model.get("_trickle");return type==="article"&&trickleConfig?._onChildren!==false}function isModelBlockWithArticleNotChildren(model){const type=model.get("_type");const parentTrickleConfig=model.getParent()?.get("_trickle");return type==="block"&&parentTrickleConfig?._isEnabled===true&&parentTrickleConfig?._onChildren===false}function getModelConfigDefaults(model){const type=model.get("_type");const config={};_deepDefaults(config,configDefaults,{_onChildren:type==="article"});if(config._onChildren){config._button.startText=config._button.startText??"Begin";config._button.startAriaLabel=config._button.startAriaLabel??"";config._button.finalText=config._button.finalText??"Finish";config._button.finalAriaLabel=config._button.finalAriaLabel??""}if(config._button._isFullWidth){config._stepLocking._isEnabled=true}return config}function getModelInheritanceChain(configModel){if(!data$1.isReady)throw new Error("Trickle cannot resolve inheritance chains until data is ready");const type=configModel.get("_type");if(type==="block"){const parentModel=configModel.getParent();const parentConfig=parentModel.get("_trickle");const blockConfig=configModel.get("_trickle");const isParentEnabledNotOnChildren=parentConfig?._isEnabled&&parentConfig._onChildren===false;const isNoChildConfig=!blockConfig?._isEnabled;if(isParentEnabledNotOnChildren&&isNoChildConfig){return null}return[configModel,parentModel].filter((ancestor=>{const config=ancestor.get("_trickle");return config&&!config._isInherited}))}if(type==="article"){return[configModel]}return null}function getModelConfig(model){const inheritance=getModelInheritanceChain(model);if(!inheritance?.length||isModelArticleWithOnChildren(model)||isModelBlockWithArticleNotChildren(model))return null;const config=$.extend(true,{},...inheritance.reverse().map(((inheritModel,index,arr)=>{const isLast=index===arr.length-1;const defaults=isLast?getModelConfigDefaults(inheritModel):null;return $.extend(true,{},defaults,inheritModel.get("_trickle"))})));if(!config._isEnabled)return null;return config}function getModelContainer(model){const inheritance=getModelInheritanceChain(model);return inheritance?.find((inheritModel=>{const defaults=getModelConfigDefaults(inheritModel);const config=$.extend(true,{},defaults,inheritModel.get("_trickle"));return config._onChildren}))??inheritance?.[0]}function getCompletionAttribute(){let model=arguments.length>0&&arguments[0]!==undefined?arguments[0]:null;return getModelConfig(model)?._completionAttribute||Adapt$1.config.get("_trickle")?._completionAttribute||"_isComplete"}function checkApplyLocks(model){if(!data$1.isReady)return;const completionAttribute=getCompletionAttribute(model);const hasCompletionChanged=Object.prototype.hasOwnProperty.call(model.changed,completionAttribute);const hasAvailabilityChanged=Object.prototype.hasOwnProperty.call(model.changed,"_isAvailable");if(!hasCompletionChanged&&!hasAvailabilityChanged)return;debouncedApplyLocks()}function applyLocks(){if(!data$1.isReady)return;const locks={};const modelsById={};const TrickleButtonModel=components$1.getModelClass("trickle-button");Adapt$1.course.getAllDescendantModels(true).filter((model=>model.get("_isAvailable"))).forEach((siteModel=>{const trickleConfig=getModelConfig(siteModel);if(!isEnabled(siteModel,{trickleConfig:trickleConfig}))return;const isModelLocked=isLocked(siteModel,{trickleConfig:trickleConfig});const id=siteModel.get("_id");modelsById[id]=siteModel;locks[id]=locks[id]||false;const subsequentLockingModels=_getAncestorNextSiblings(siteModel);subsequentLockingModels.forEach(((model,index)=>{const id=model.get("_id");const isButtonModel=model instanceof TrickleButtonModel;const isTrickled=model.get("_isTrickled");if(isTrickled!==isButtonModel)model.set("_isTrickled",!isButtonModel);modelsById[id]=model;locks[id]=locks[id]||isModelLocked;if(model.get("_lockType"))return;model.getAllDescendantModels().forEach((descendant=>{const descendantId=descendant.get("_id");modelsById[descendantId]=descendant;locks[descendantId]=locks[id]}))}))}));Object.entries(locks).forEach((_ref2=>{let[id,isModelLocked]=_ref2;const model=modelsById[id];const wasLocked=model.get("_isLocked");if(wasLocked===isModelLocked)return;model.set("_isLocked",isModelLocked)}));logTrickleState()}function isEnabled(model){let{trickleConfig:trickleConfig=getModelConfig(model)}=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{};return trickleConfig?._isEnabled===true}function isLocked(model){let{trickleConfig:trickleConfig=getModelConfig(model)}=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{};const isStepLocked=Boolean(trickleConfig?._stepLocking?._isEnabled);if(!isStepLocked)return false;const isCompletionRequired=Boolean(trickleConfig?._stepLocking?._isCompletionRequired);const completionAttribute=getCompletionAttribute(model);if(!isCompletionRequired){const TrickleModel=components$1.getModelClass("trickle-button");const trickleButton=model.getAvailableChildModels().find((model=>model instanceof TrickleModel));const isTrickleButtonComplete=Boolean(trickleButton?.get(completionAttribute));return!isTrickleButtonComplete}const isModelLocked=!model?.get(completionAttribute)&&!model?.get("_isOptional");return isModelLocked}const debouncedApplyLocks=_.debounce(applyLocks,1);function _getAncestorNextSiblings(fromModel){if(!fromModel)return[];const allSiblings=fromModel.getParent().getAvailableChildModels();const subsequentSiblings=allSiblings.slice(allSiblings.findIndex((sibling=>sibling===fromModel))+1);const allAncestors=fromModel.getAncestorModels();const inPageAncestors=allAncestors.slice(0,allAncestors.findIndex((parent=>parent instanceof ContentObjectModel))+1);const subsequentInPageAncestors=[];inPageAncestors.slice(1).forEach(((grandParent,previousIndex)=>{const parent=inPageAncestors[previousIndex];const allGrandParentChildren=grandParent.getAvailableChildModels();const subsequentAncestorSiblings=allGrandParentChildren.slice(allGrandParentChildren.findIndex((child=>child===parent))+1);subsequentInPageAncestors.push(...subsequentAncestorSiblings)}));const subsequentContentObjectDescendantModels=subsequentSiblings.concat(subsequentInPageAncestors);return subsequentContentObjectDescendantModels}function addButtonComponents(){const TrickleButtonModel=components$1.getModelClass("trickle-button");let uid=0;data$1.forEach((buttonModelSite=>{if(buttonModelSite instanceof CourseModel$1)return;const trickleConfig=getModelConfig(buttonModelSite);if(!trickleConfig||!trickleConfig?._isEnabled||buttonModelSite.get("_isTrickleSiteConfigured"))return;buttonModelSite.set("_isTrickleSiteConfigured",true);const parentId=buttonModelSite.get("_id");const trickleButtonModel=new TrickleButtonModel({_id:`trickle-${uid++}`,_type:"component",_component:"trickle-button",_parentId:parentId,_isAvailable:true,_layout:"full",_trickle:{_isEnabled:true},_renderPosition:"outer-append",_isTrackable:false});trickleButtonModel.setupModel();buttonModelSite.getChildren().add(trickleButtonModel)}))}function logTrickleState(){if(logging$1._config?._level!=="debug")return;if(!Adapt$1.parentView?.model?.isTypeGroup("page")){logging$1.debug("TRICKLE GLOBAL STATE");Adapt$1.course.getAllDescendantModels(true).filter((model=>model.get("_isAvailable"))).forEach((model=>{const isLocked=model.get("_isLocked");const isTrickled=model.get("_isTrickled");logging$1.debug(`${" ".repeat(model.getAncestorModels().length)}${model.get("_type")} ${model.get("_id")} isLocked: ${isLocked} isTrickled: ${isTrickled}`)}));return}logging$1.debug("TRICKLE STATE");Adapt$1.parentView.model.getAllDescendantModels(true).filter((model=>model.get("_isAvailable"))).forEach((model=>{const isLocked=model.get("_isLocked");const isTrickled=model.get("_isTrickled");logging$1.debug(`${" ".repeat(model.getAncestorModels().length)}${model.get("_type")} ${model.get("_id")} isLocked: ${isLocked} isTrickled: ${isTrickled}`)}))}__AMD("extensions/adapt-contrib-trickle/js/models",{_deepDefaults:_deepDefaults,configDefaults:configDefaults,getModelConfigDefaults:getModelConfigDefaults,getModelInheritanceChain:getModelInheritanceChain,getModelConfig:getModelConfig,getModelContainer:getModelContainer,getCompletionAttribute:getCompletionAttribute,checkApplyLocks:checkApplyLocks,applyLocks:applyLocks,debouncedApplyLocks:debouncedApplyLocks,_getAncestorNextSiblings:_getAncestorNextSiblings,addButtonComponents:addButtonComponents,logTrickleState:logTrickleState});class TrickleController extends Backbone.Controller{initialize(){this.checkIsFinished=_.debounce(this.checkIsFinished,1);this.listenTo(Adapt$1,{"adapt:start":this.onAdaptStart})}async onAdaptStart(){const trickleConfig=Adapt$1.config.get("_trickle");if(trickleConfig?._isEnabled===false)return;this.setUpEventListeners();wait$1.for((done=>{addButtonComponents();applyLocks();done()}))}setUpEventListeners(){this.stopListening();this.listenTo(data$1,{"change:_isInteractionComplete change:_isComplete change:_isAvailable add remove":checkApplyLocks,"change:_isLocked":this.checkIsFinished});this.listenTo(Adapt$1,{"adapt:start":this.onAdaptStart,"assessments:reset":this.onAssessmentReset,"contentObjectView:preRender":this.reset,"view:addChild":this.onAddChildView,"trickle:kill":this.kill})}onAssessmentReset(){const isMidRender=!Adapt$1.parentView?.model.get("_isReady");if(isMidRender)return applyLocks();debouncedApplyLocks()}get isStarted(){return Boolean(Adapt$1.parentView?.model.get("_isTrickleStarted"))}set isStarted(value){if(!Adapt$1.parentView)return;Adapt$1.parentView.model.set("_isTrickleStarted",value);if(!value)return;Adapt$1.trigger("trickle:started")}onAddChildView(event){if(this.isKilled)return;if(event.hasRequestChild)applyLocks();const isManagedByTrickleAndLocked=event.model.get("_isTrickled")&&event.model.get("_isLocked");if(!isManagedByTrickleAndLocked)return;event.stop()}get isTrickling(){const isTrickling=Adapt$1.parentView.model.getAllDescendantModels().some((model=>model.get("_isAvailable")&&model.get("_isTrickled")&&model.get("_isLocked")));return isTrickling}async continue(){applyLocks();await Adapt$1.parentView.addChildren();await Adapt$1.parentView.whenReady()}async scroll(fromModel){const trickleConfig=getModelConfig(fromModel);if(!trickleConfig?._isEnabled)return false;if(isModelArticleWithOnChildren(fromModel))return false;const isAutoScrollOff=!trickleConfig._autoScroll;const hasTrickleButton=trickleConfig._button._isEnabled;if(isAutoScrollOff&&!hasTrickleButton){return}const getScrollToId=()=>{const scrollTo=trickleConfig._scrollTo;const firstCharacter=scrollTo.substr(0,1);switch(firstCharacter){case"@":{const relativeModel=fromModel.findRelativeModel(scrollTo,{filter:model=>model.get("_isAvailable")});if(relativeModel===undefined)return;return relativeModel.get("_id")}case".":return scrollTo.substr(1,scrollTo.length-1);default:return scrollTo}};let scrollToId=getScrollToId();if(!scrollToId){logging$1.error(`Cannot scroll to the next id as none was found at id: "${fromModel.get("_id")}" with _scrollTo: "${trickleConfig._scrollTo}". Suggestion: Set _showEndOfPage to false.`);return}const isDescendant=Adapt$1.parentView.model.getAllDescendantModels().some((model=>model.get("_id")===scrollToId));if(!isDescendant){applyLocks();const model=data$1.findById(scrollToId);const contentObject=model.isTypeGroup("contentobject")?model:model.findAncestor("contentobject");await router$1.navigateToElement(contentObject.get("_id"));scrollToId=getScrollToId();await router$1.navigateToElement(scrollToId);return}await Adapt$1.parentView.renderTo(scrollToId);if(hasTrickleButton){a11y$1.focusFirst($("."+scrollToId),{preventScroll:true})}if(isAutoScrollOff)return false;const duration=trickleConfig._scrollDuration||500;router$1.navigateToElement("."+scrollToId,{duration:duration})}get isFinished(){if(!Adapt$1.parentView)return false;return Boolean(!this.isStarted||Adapt$1.parentView.model.get("_isTrickleFinished")||this.isKilled)}set isFinished(value){if(!Adapt$1.parentView)return;Adapt$1.parentView.model.set("_isTrickleFinished",value);if(!value)return;Adapt$1.trigger("trickle:finished")}checkIsFinished(){if(!this.isStarted)return;if(this.isKilled||this.isFinished)return;if(this.isTrickling)return;this.isFinished=true}async kill(){const TrickleModel=components$1.getModelClass("trickle-button");this.isKilled=true;Adapt$1.parentView.model.getAllDescendantModels().forEach((model=>{const isButtonModel=model instanceof TrickleModel;if(isButtonModel){model.setCompletionStatus()}if(!model.get("_isTrickled"))return;model.set("_isLocked",false)}));await this.continue()}get isKilled(){if(!Adapt$1.parentView)return false;return!this.isStarted||Adapt$1.parentView.model.get("_isTrickleKilled")}set isKilled(value){if(!Adapt$1.parentView)return;Adapt$1.parentView.model.set("_isTrickleKilled",value);if(!value)return;Adapt$1.trigger("trickle:killed")}async reset(){await wait$1.queue();this.isKilled=false;this.isStarted=this.isTrickling;this.isFinished=false}}var controller=__AMD("extensions/adapt-contrib-trickle/js/controller",new TrickleController);class TrickleButtonView extends ComponentView$1{className(){const config=getModelConfig(this.model.getParent());return["trickle",this.model.get("_id"),config._button._component,config._button._isFullWidth&&"is-full-width",config._button._className].filter(Boolean).join(" ")}events(){return{"click .js-trickle-btn":"onButtonClick"}}initialize(){this.openPopupCount=0;this.isAwaitingPopupClose=false;this.wasButtonClicked=false;this.model.calculateButtonText();this.calculateButtonState();this.setupEventListeners();this.render();if(!this.model.isEnabled()){this.setCompletionStatus()}_.defer(this.setReadyStatus.bind(this))}calculateButtonState(){const isDisabledByPopups=this.openPopupCount>0;this.model.calculateButtonState(isDisabledByPopups,this.wasButtonClicked)}render(){const data=this.model.toJSON();data._globals=Adapt$1.course.get("_globals");data._trickle=getModelConfig(this.model.getParent());this.$el.html(Handlebars.templates[TrickleButtonView.template](data))}setupEventListeners(){this.tryButtonAutoHide=this.tryButtonAutoHide.bind(this);const onParentComplete=this.onParentComplete.bind(this);this.onParentComplete=function(){for(var _len=arguments.length,args=new Array(_len),_key=0;_key<_len;_key++){args[_key]=arguments[_key]}return _.delay((()=>onParentComplete(...args)),100)};this.listenTo(Adapt$1.parentView,"postRemove",this.onRemove);this.listenTo(Adapt$1,"trickle:killed",this.updateButtonState);if(this.model.isStepUnlocked()&&this.model.isFinished()){return}this.$el.on("onscreen",this.tryButtonAutoHide);this.listenTo(Adapt$1,{"popup:opened":this.onPopupOpened,"popup:closed":this.onPopupClosed});const parentModel=this.model.getParent();const completionAttribute=getCompletionAttribute(parentModel);this.listenTo(parentModel,{"change:_requireCompletionOf":this.onStepUnlocked,[`bubble:change:${completionAttribute}`]:this.onStepUnlocked,[`change:${completionAttribute}`]:this.onParentComplete})}onPopupOpened(){this.openPopupCount++;const shouldUserInteractWithButton=this.model.isStepUnlocked()&&!this.model.isFinished();if(!shouldUserInteractWithButton)return;this.updateButtonState()}async onPopupClosed(){this.openPopupCount--;if(this.openPopupCount)return;if(this.isAwaitingPopupClose){return this.finish()}const shouldUserInteractWithButton=this.model.isStepUnlocked()&&!this.model.isFinished();if(!shouldUserInteractWithButton)return;this.updateButtonState();await Adapt$1.parentView.addChildren()}updateButtonState(){this.calculateButtonState();const isButtonHidden=!(this.model.get("_isButtonVisible")&&!this.model.get("_isButtonAutoHidden"));this.$(".js-trickle-btn-container").toggleClass("u-display-none",isButtonHidden);const isButtonDisabled=this.model.get("_isButtonDisabled");const $button=this.$(".js-trickle-btn");const $ariaLabel=this.$(".aria-label");a11y$1.toggleEnabled($button,!isButtonDisabled);if(!isButtonDisabled){if(document.activeElement instanceof HTMLElement&&document.activeElement.isSameNode($ariaLabel[0])){a11y$1.focusNext($ariaLabel)}a11y$1.toggleAccessibleEnabled($ariaLabel,false)}const $buttonText=this.$(".js-trickle-btn-text");const text=this.model.get("buttonText");const ariaLabel=this.model.get("buttonAriaLabel");$buttonText.html(text);$button.attr("aria-label",ariaLabel)}async onStepUnlocked(event){if(event.value===false)return;_.defer(this.updateButtonState.bind(this))}async onButtonClick(){const wasComplete=this.model.get("_isComplete");this.model.setCompletionStatus();this.wasButtonClicked=true;const isStepLockingCompletionRequired=this.model.isStepLockingCompletionRequired();if(isStepLockingCompletionRequired&&!wasComplete)return;await this.continue()}async onParentComplete(model,value){if(!value)return;const parentModel=this.model.getParent();const completionAttribute=getCompletionAttribute(parentModel);this.stopListening(parentModel,{[`bubble:change:${completionAttribute}`]:this.onStepUnlocked,[`change:${completionAttribute}`]:this.onParentComplete});if(controller.isKilled)return;if(this.openPopupCount>0){this.isAwaitingPopupClose=true;return}await this.finish()}async finish(){this.stopListening(Adapt$1,{"popup:opened":this.onPopupOpened,"popup:closed":this.onPopupClosed});this.updateButtonState();const isStepLockingCompletionRequired=this.model.isStepLockingCompletionRequired();if(!isStepLockingCompletionRequired)return;await this.continue()}async continue(){const parent=this.model.getParent();await controller.continue();await controller.scroll(parent)}tryButtonAutoHide(){if(!this.model.get("_isButtonVisible"))return;const trickleConfig=getModelConfig(this.model.getParent());if(!trickleConfig._button._autoHide){this.model.set("_isButtonAutoHidden",false);return}const measurements=this.$el.onscreen();const isJustOffscreen=measurements.bottom>-100;const isButtonAutoHidden=!measurements.onscreen&&!isJustOffscreen;this.model.set("_isButtonAutoHidden",isButtonAutoHidden);this.updateButtonState()}onRemove(){this.$el.off("onscreen",this.tryButtonAutoHide);this.remove()}}TrickleButtonView.template="trickle-button";var TrickleButtonView$1=__AMD("extensions/adapt-contrib-trickle/js/TrickleButtonView",TrickleButtonView);var TrickleButtonModel=__AMD("extensions/adapt-contrib-trickle/js/TrickleButtonModel",class TrickleButtonModel extends ComponentModel$1{init(){super.init();if(!this.isStepComplete())return;this.setCompletionStatus()}isEnabled(){const trickleConfig=getModelConfig(this.getParent());const isEnabled=trickleConfig._isEnabled&&trickleConfig._button?._isEnabled;return isEnabled}isStepLocking(){const config=getModelConfig(this.getParent());const isStepLocking=config._stepLocking?._isEnabled;return isStepLocking}isStepLockingCompletionRequired(){const config=getModelConfig(this.getParent());const isStepLockingCompletionRequired=config._stepLocking&&config._stepLocking._isEnabled&&config._stepLocking._isCompletionRequired;return isStepLockingCompletionRequired}isStepUnlocked(){const parentModel=this.getParent();const completionAttribute=getCompletionAttribute(parentModel);const isCompletionBlocked=parentModel.get("_requireCompletionOf")===Number.POSITIVE_INFINITY;if(isCompletionBlocked)return;return this.getSiblings().every((sibling=>{if(sibling===this){return true}return sibling.get(completionAttribute)||sibling.get("_isOptional")||!sibling.get("_isAvailable")}))}isStepComplete(){const parentModel=this.getParent();const completionAttribute=getCompletionAttribute(parentModel);const isParentComplete=parentModel.get(completionAttribute);return isParentComplete}isStepLockedOnRevisit(){const trickleConfig=getModelConfig(this.getParent());return Boolean(trickleConfig._stepLocking._isLockedOnRevisit)}isFinished(){const isStepUnlocked=this.isStepUnlocked();const isStepLockingCompletionRequired=this.isStepLockingCompletionRequired();const isButtonComplete=this.get("_isComplete");const isFinished=(isStepUnlocked||!isStepLockingCompletionRequired)&&isButtonComplete;return isFinished}isLastInContentObject(){const contentObject=this.findAncestor("contentobject");const allDescendants=contentObject.getAllDescendantModels(true);const lastDescendant=allDescendants[allDescendants.length-1];const parentModel=this.getParent();const trickleParent=getModelContainer(parentModel);const isParentFinished=trickleParent.get("_requireCompletionOf")!==Number.POSITIVE_INFINITY;return isParentFinished&&this===lastDescendant}calculateButtonText(){const parentModel=this.getParent();const trickleConfig=getModelConfig(parentModel);let isStart=false;let isFinal=false;if(trickleConfig._onChildren){const parentId=parentModel.get("_id");const trickleParent=getModelContainer(parentModel);const trickleSiblings=trickleParent.getAllDescendantModels(true).filter((model=>model.get("_isAvailable")&&model.get("_isTrickled")));const index=trickleSiblings.findIndex((model=>model.get("_id")===parentId));isStart=index===0;isFinal=index===trickleSiblings.length-1&&!trickleParent.get("_canRequestChild")}const text=isStart&&trickleConfig._button.startText?trickleConfig._button.startText:isFinal&&trickleConfig._button.finalText?trickleConfig._button.finalText:trickleConfig._button.text;const ariaLabel=isStart&&trickleConfig._button.startAriaLabel?trickleConfig._button.startAriaLabel:isFinal&&trickleConfig._button.finalAriaLabel?trickleConfig._button.finalAriaLabel:trickleConfig._button.ariaLabel;this.set({buttonText:text,buttonAriaLabel:ariaLabel})}checkIfResetOnRevisit(){if(this.isFinished()&&!this.isStepLockedOnRevisit())return;if(!this.get("_isComplete")&&!this.get("_isInteractionComplete"))return;this.set({_isComplete:false,_isInteractionComplete:false});applyLocks()}calculateButtonState(){let isButtonDisableForced=arguments.length>0&&arguments[0]!==undefined?arguments[0]:false;let isButtonHiddenForced=arguments.length>1&&arguments[1]!==undefined?arguments[1]:false;if(!this.isEnabled()){this.set({_isButtonVisible:false,_isButtonDisabled:!this.isStepUnlocked()});return}const trickleConfig=getModelConfig(this.getParent());if(this.isLastInContentObject()&&trickleConfig._button._showEndOfPage===false){return this.set({_isButtonVisible:false,_isButtonDisabled:true})}const isTrickleKilled=controller.isKilled;const isStepUnlocked=this.isStepUnlocked()||isTrickleKilled;const isFinished=this.isFinished()||isTrickleKilled;const isButtonVisibleBeforeCompletion=trickleConfig._button._styleBeforeCompletion!=="hidden";const isButtonVisibleAfterCompletion=trickleConfig._button._styleAfterClick!=="hidden"&&!trickleConfig._button._isFullWidth;const isStepLockingCompletionRequired=this.isStepLockingCompletionRequired();const isNoCompletionRequiredAndLockedVisible=!isStepLockingCompletionRequired&&!isFinished&&isButtonVisibleBeforeCompletion;const isNoCompletionRequiredAndUnlockedVisible=!isStepLockingCompletionRequired&&isStepUnlocked&&!isFinished;const isNoCompletionRequiredAndFinishedVisible=!isStepLockingCompletionRequired&&isFinished&&isButtonVisibleAfterCompletion;const isStepLockedAndVisibleBeforeCompletion=isStepLockingCompletionRequired&&!isStepUnlocked&&isButtonVisibleBeforeCompletion&&!isButtonHiddenForced;const isFinishedAndVisibleAfterCompletion=isStepLockingCompletionRequired&&isFinished&&isButtonVisibleAfterCompletion;const isStepUnlockedAndButtonIncomplete=isStepLockingCompletionRequired&&isStepUnlocked&&!isFinished;const isButtonVisible=isNoCompletionRequiredAndLockedVisible||isNoCompletionRequiredAndUnlockedVisible||isNoCompletionRequiredAndFinishedVisible||isStepLockedAndVisibleBeforeCompletion||isFinishedAndVisibleAfterCompletion||isStepUnlockedAndButtonIncomplete;const isButtonEnabledBeforeCompletion=trickleConfig._button._styleBeforeCompletion!=="disabled";const isButtonEnabledAfterCompletion=trickleConfig._button._styleAfterClick!=="disabled";const isNoCompletionRequiredAndLockedEnabled=!isStepLockingCompletionRequired&&!isFinished&&isButtonEnabledBeforeCompletion;const isNoCompletionRequiredAndUnlockedEnabled=!isStepLockingCompletionRequired&&isStepUnlocked&&!isFinished;const isNoCompletionRequiredAndFinishedEnabled=!isStepLockingCompletionRequired&&isFinished&&isButtonEnabledAfterCompletion;const isStepUnlockedAndButtonIncompleteWithoutButtonDisabledForced=isStepLockingCompletionRequired&&isStepUnlockedAndButtonIncomplete&&!isButtonDisableForced;const isFinishedAndEnabledAfterCompletion=isStepLockingCompletionRequired&&isFinished&&isButtonEnabledAfterCompletion;const isButtonEnabled=isNoCompletionRequiredAndLockedEnabled||isNoCompletionRequiredAndUnlockedEnabled||isNoCompletionRequiredAndFinishedEnabled||isStepUnlockedAndButtonIncompleteWithoutButtonDisabledForced||isFinishedAndEnabledAfterCompletion||false;this.set({_isButtonVisible:isButtonVisible,_isButtonDisabled:!isButtonEnabled})}});__AMD("extensions/adapt-contrib-trickle/js/trickleButton",components$1.register("trickle-button",{view:TrickleButtonView$1,model:TrickleButtonModel}));__AMD("extensions/adapt-contrib-trickle/js/adapt-contrib-trickle",Adapt$1.trickle=controller);const TUTOR_TYPE=ENUM(["NOTIFY","INLINE","OVERLAY","NONE"]);var TUTOR_TYPE$1=__AMD("extensions/adapt-contrib-tutor/js/TUTOR_TYPE",TUTOR_TYPE);var TutorModel=__AMD("extensions/adapt-contrib-tutor/js/TutorModel",class TutorModel extends Backbone.Model{defaults(){return{_type:TUTOR_TYPE$1.NOTIFY.asLowerCase,_classes:"",_hasNotifyBottomButton:false,_button:{text:"{{_globals._extensions._tutor.hideFeedback}}",ariaLabel:"{{_globals._extensions._tutor.hideFeedback}}"},...Adapt$1.course.get("_tutor")}}initialize(data,parentModel){data=$.extend(true,this.defaults(),data?._isInherited===true?null:data,{_attributes:{"data-adapt-id":parentModel.get("_id")},_id:parentModel.get("_id"),_shouldRenderId:false,...parentModel.getFeedback?.()||{altTitle:parentModel.get("altFeedbackTitle"),title:parentModel.get("feedbackTitle"),body:parentModel.get("feedbackMessage")}});data._classes+=` tutor ${this.getOriginClasses(parentModel)}`;this.set(data)}getOriginClasses(model){const component=model.get("_component");const extension=model.get("_extension");return[model.get("_isCorrect")?"is-correct":model.get("_isAtLeastOneCorrectSelection")?"is-partially-correct":"is-incorrect",component&&`is-component is-${component}`,extension&&`is-extension is-${extension}`].filter(Boolean).join(" ")}});var TutorNotify=__AMD("extensions/adapt-contrib-tutor/js/TutorNotify",class TutorNotify extends Backbone.Controller{initialize(options){this.parentView=options.parentView;this.listenToOnce(Adapt$1,"notify:closed",this.onNotifyClosed);this.triggerNotify()}triggerNotify(){const{_hasNotifyBottomButton:isButtonEnabled,_button:{text:promptText}}=this.model.toJSON();this.notifyOptions={...this.model.toJSON(),_prompts:isButtonEnabled&&[{promptText:Handlebars.compile(promptText)({_globals:Adapt$1.course.get("_globals")})}],_type:isButtonEnabled?"prompt":"popup"};notify$1.create(this.notifyOptions);Adapt$1.trigger("tutor:opened",this.parentView,this.notifyOptions)}onNotifyClosed(){Adapt$1.trigger("tutor:closed",this.parentView,this.notifyOptions)}});var TutorView=__AMD("extensions/adapt-contrib-tutor/js/TutorView",class TutorView extends Backbone.View{className(){return["tutor",`tutor-type-${this.model.get("_type")}`,this.model.get("_classes")].join(" ")}events(){return{"click .js-tutor-btn":"onCloseClick"}}initialize(options){this.parentView=options.parentView;this.buttonsView=this.parentView.buttonsView;this.listenTo(this.parentView,"postRemove",this.onTutorClosed);this.listenTo(this.buttonsView,"buttons:stateUpdate",this.onButtonsStateUpdate);this.render()}render(){this.$el.html(Handlebars.templates.tutor(this.model.toJSON()));_.defer(this.postRender.bind(this))}postRender(){this.toggleFeedback({shouldOpen:true})}toggleFeedback(){let{shouldOpen:shouldOpen,shouldManageFocus:shouldManageFocus=true}=arguments.length>0&&arguments[0]!==undefined?arguments[0]:{};const animation=this.model.get("_type")==="inline"?"slide":"fade";const onAnimationEnd=shouldOpen?this.onTutorOpened.bind(this,shouldManageFocus):this.onTutorClosed.bind(this,shouldManageFocus);if(shouldManageFocus){a11y$1.toggleEnabled(this.buttonsView.$(".js-btn-feedback"),!shouldOpen)}this.$(".tutor__inner").stop()[`${animation}Toggle`](200,onAnimationEnd)}onCloseClick(){this.toggleFeedback({shouldOpen:false})}onTutorOpened(shouldManageFocus){if(shouldManageFocus){a11y$1.focus(this.$(".tutor__inner"),{defer:true,preventScroll:true})}Adapt$1.trigger("tutor:opened",this.parentView,this.model.toJSON())}onTutorClosed(shouldManageFocus){if(shouldManageFocus){const $showFeedbackButton=this.buttonsView.$(".js-btn-feedback");a11y$1.focus($showFeedbackButton,{defer:true,preventScroll:true})}Adapt$1.trigger("tutor:closed",this.parentView,this.model.toJSON());this.remove()}onButtonsStateUpdate(state){if(state!==BUTTON_STATE$1.RESET)return;this.toggleFeedback({shouldOpen:false,shouldManageFocus:false})}});class Tutor extends Backbone.Controller{initialize(){this.listenTo(Adapt$1,{"componentView:postRender":this.onComponentViewPostRender,"questionView:showFeedback":this.onQuestionViewShowFeedback,"buttonsView:postRender":this.onButtonsViewPostRender})}getTutorType(model){const config=model.get("_tutor")?._isInherited??true?Adapt$1.course.get("_tutor"):model.get("_tutor");if(!config)return;return TUTOR_TYPE$1(config._type?.toUpperCase())}onComponentViewPostRender(view){const{model:model}=view;if(!model.isTypeGroup("question"))return;const type=this.getTutorType(model);if(!type)return;const shouldShowFeedback=model.get("_canShowFeedback")&&model.get("_isSubmitted")&&type===TUTOR_TYPE$1.INLINE;if(!shouldShowFeedback)return;model.setupFeedback();Adapt$1.trigger("questionView:showFeedback",view)}onButtonsViewPostRender(view){const{model:model}=view;const type=this.getTutorType(model);if(type!==TUTOR_TYPE$1.INLINE)return;const $btnAction=view.$(".js-btn-action");const $btnFeedback=view.$(".js-btn-feedback");const $btnMarking=view.$(".js-btn-marking");$btnAction.addClass("is-full-width");$btnFeedback.addClass("u-display-none");$btnMarking.addClass("is-full-width")}onQuestionViewShowFeedback(view){const parentModel=view.model;const tutorModel=new TutorModel(parentModel.get("_tutor"),parentModel);const options={model:tutorModel,parentView:view};switch(TUTOR_TYPE$1(tutorModel.get("_type").toUpperCase())){case TUTOR_TYPE$1.NOTIFY:new TutorNotify(options);break;case TUTOR_TYPE$1.INLINE:case TUTOR_TYPE$1.OVERLAY:view.$(".component__inner").append(new TutorView(options).$el);break;case TUTOR_TYPE$1.NONE:}}}__AMD("extensions/adapt-contrib-tutor/js/adapt-contrib-tutor",Adapt$1.tutor=new Tutor);class MenuItemView extends AdaptView$1{attributes(){return AdaptView$1.resultExtend("attributes",{role:"listitem","aria-labelledby":this.model.get("_id")+"-heading"},this)}className(){return["menu-item",this.constructor.className,this.model.get("_id"),this.model.get("_classes"),this.setVisibility(),this.setHidden(),this.model.get("_isVisited")?"is-visited":"",this.model.get("_isComplete")?"is-complete":"",this.model.get("_isLocked")?"is-locked":"",this.model.get("_isOptional")?"is-optional":""].join(" ")}preRender(){this.model.checkCompletionStatus();this.model.checkInteractionCompletionStatus()}postRender(){this.$el.imageready(this.setReadyStatus.bind(this))}}MenuItemView.type="menuItem";var MenuItemView$1=__AMD("core/js/views/menuItemView",MenuItemView);class MenuView extends ContentObjectView{}Object.assign(MenuView,{childContainer:".js-children",childView:MenuItemView$1,type:"menu",template:"menu"});var MenuView$1=__AMD("core/js/views/menuView",MenuView);class BoxMenuItemView extends MenuItemView$1{className(){return`${super.className()} boxmenu-item`}events(){return{"click .js-btn-click":"onClickMenuItemButton"}}onClickMenuItemButton(event){if(event&&event.preventDefault)event.preventDefault();if(this.model.get("_isLocked"))return;router$1.navigateToElement(this.model.get("_id"))}}BoxMenuItemView.template="boxMenuItem";var BoxMenuItemView$1=__AMD("menu/adapt-contrib-boxMenu/js/BoxMenuItemView",BoxMenuItemView);class BoxMenuGroupView extends MenuItemView$1{className(){return`${super.className()} boxmenu-group`}postRender(){_.defer(this.addChildren.bind(this));this.$el.imageready(this.setReadyStatus.bind(this));this.$el.parents(".boxmenu__item-container").addClass("has-groups")}}BoxMenuGroupView.template="boxMenuGroup";BoxMenuGroupView.childContainer=".js-group-children";BoxMenuGroupView.childView=BoxMenuItemView$1;var BoxMenuGroupView$1=__AMD("menu/adapt-contrib-boxMenu/js/BoxMenuGroupView",BoxMenuGroupView);class BoxMenuView extends MenuView$1{className(){return`${super.className()} boxmenu`}initialize(){super.initialize();this.setStyles();this.listenTo(Adapt$1,"device:changed",this.onDeviceResize)}onDeviceResize(){this.setStyles()}addChildren(){let nthChild=0;const models=this.model.getChildren().models;const childViews=[];models.forEach((model=>{if(!model.get("_isAvailable"))return;if(model.get("_isHidden")){model.set("_isReady",true);return}nthChild++;model.set({_nthChild:nthChild,_totalChild:models.length});const ChildView=model.get("_type")==="menu"&&model.get("_boxMenu")&&model.get("_boxMenu")._renderAsGroup?BoxMenuGroupView$1:BoxMenuItemView$1;const $parentContainer=this.$(this.constructor.childContainer);const childView=new ChildView({model:model});childViews.push(childView);$parentContainer.append(childView.$el)}));this.setChildViews(childViews)}setStyles(){this.addBackgroundLayer();this.setBackgroundImage();this.setBackgroundStyles();this.processHeader()}addBackgroundLayer(){if(this.$el.find(" > .background").length)return;this.$background=$('').prependTo(this.$el)}setBackgroundImage(){const config=this.model.get("_boxMenu");const backgroundImages=config?._backgroundImage;if(!backgroundImages)return;const backgroundImage=backgroundImages[`_${Adapt$1.device.screenSize}`]??backgroundImages._small;this.$el.toggleClass("has-bg-image",Boolean(backgroundImage));this.$background.css("background-image",backgroundImage?"url("+backgroundImage+")":"")}setBackgroundStyles(){const config=this.model.get("_boxMenu");const styles=config?._backgroundStyles;if(!styles)return;this.$background.css({"background-repeat":styles._backgroundRepeat,"background-size":styles._backgroundSize,"background-position":styles._backgroundPosition})}processHeader(){const config=this.model.get("_boxMenu");const header=config?._menuHeader;if(!header)return;const $header=this.$(".menu__header");this.setHeaderTextAlignment(header);this.addHeaderBackgroundLayer($header);this.setHeaderBackgroundImage(header,$header);this.setHeaderBackgroundStyles(header,$header);this.setHeaderMinimumHeight(header,$header)}setHeaderTextAlignment(config){const textAlignment=config._textAlignment;if(!textAlignment)return;if(textAlignment._title)this.$el.addClass(`title-align-${textAlignment._title}`);if(textAlignment._body)this.$el.addClass(`body-align-${textAlignment._body}`);if(textAlignment._instruction)this.$el.addClass(`instruction-align-${textAlignment._instruction}`)}addHeaderBackgroundLayer($header){if($header.find(" > .background").length)return;this.$headerBackground=$('').prependTo($header)}setHeaderBackgroundImage(config,$header){const backgroundImages=config._backgroundImage;if(!backgroundImages)return;const backgroundImage=backgroundImages[`_${Adapt$1.device.screenSize}`]??backgroundImages._small;$header.toggleClass("has-bg-image",Boolean(backgroundImage));this.$headerBackground.css("background-image",backgroundImage?"url("+backgroundImage+")":"")}setHeaderBackgroundStyles(config,$header){const styles=config._backgroundStyles;if(!styles)return;this.$headerBackground.css({"background-repeat":styles._backgroundRepeat,"background-size":styles._backgroundSize,"background-position":styles._backgroundPosition})}setHeaderMinimumHeight(config,$header){const minimumHeights=config._minimumHeights;if(!minimumHeights)return;const minimumHeight=minimumHeights[`_${Adapt$1.device.screenSize}`]??minimumHeights._small;$header.toggleClass("has-min-height",Boolean(minimumHeight)).css("min-height",minimumHeight?minimumHeight+"px":"")}}BoxMenuView.template="boxMenu";var BoxMenuView$1=__AMD("menu/adapt-contrib-boxMenu/js/BoxMenuView",BoxMenuView);components$1.register("course menu",{view:BoxMenuView$1});components$1.register("boxMenu",{view:BoxMenuView$1,model:MenuModel$1.extend({})});var ThemeView=__AMD("theme/64b66dd816e5991c8012f733/js/themeView",class ThemeView extends Backbone.View{className(){}initialize(){this.setStyles();this.listenTo(Adapt$1,{"device:changed":this.onDeviceResize,remove:this.remove})}onDeviceResize(){this.setStyles()}remove(){super.remove();this.onRemove()}setStyles(){this.setClasses();this.setTextAlignment();this.addBackgroundLayer();this.setBackgroundImage();this.setBackgroundStyles();this.setMinimumHeight();this.setResponsiveClasses();this.setCustomStyles()}setClasses(){this.$el.addClass(this.className())}setTextAlignment(){const textAlignment=this.model.get("_textAlignment");if(!textAlignment)return;if(textAlignment._title)this.$el.addClass(`title-align-${textAlignment._title}`);if(textAlignment._body)this.$el.addClass(`body-align-${textAlignment._body}`);if(textAlignment._instruction)this.$el.addClass(`instruction-align-${textAlignment._instruction}`)}addBackgroundLayer(){if(this.$el.find(" > .background").length)return;this.$background=$('').prependTo(this.$el)}setBackgroundImage(){const backgroundImages=this.model.get("_backgroundImage");if(!backgroundImages||!this.$background)return;const backgroundImage=backgroundImages[`_${device$1.screenSize}`]??backgroundImages._small;this.$el.toggleClass("has-bg-image",Boolean(backgroundImage));this.$background.css("background-image",backgroundImage?"url("+backgroundImage+")":"")}setBackgroundStyles(){const styles=this.model.get("_backgroundStyles");if(!styles||!this.$background)return;this.$background.css({"background-repeat":styles._backgroundRepeat,"background-size":styles._backgroundSize,"background-position":styles._backgroundPosition})}setMinimumHeight(){const minimumHeights=this.model.get("_minimumHeights");if(!minimumHeights)return;const minimumHeight=minimumHeights[`_${device$1.screenSize}`]??minimumHeights._small;this.$el.toggleClass("has-min-height",Boolean(minimumHeight)).css("min-height",minimumHeight?minimumHeight+"px":"")}setResponsiveClasses(){const responsiveClasses=this.model.get("_responsiveClasses");if(!responsiveClasses)return;this.$el.removeClass(Object.values(responsiveClasses)).addClass(responsiveClasses[`_${device$1.screenSize}`])}setCustomStyles(){}onRemove(){}});var ThemePageView=__AMD("theme/64b66dd816e5991c8012f733/js/themePageView",class ThemePageView extends ThemeView{className(){}setCustomStyles(){this.processHeader()}processHeader(){const header=this.model.get("_pageHeader");if(!header)return;const $header=this.$(".page__header");this.setHeaderTextAlignment(header);this.addHeaderBackgroundLayer($header);this.setHeaderBackgroundImage(header,$header);this.setHeaderBackgroundStyles(header,$header);this.setHeaderMinimumHeight(header,$header)}setHeaderTextAlignment(config){const textAlignment=config._textAlignment;if(!textAlignment)return;if(textAlignment._title)this.$el.addClass(`title-align-${textAlignment._title}`);if(textAlignment._body)this.$el.addClass(`body-align-${textAlignment._body}`);if(textAlignment._instruction)this.$el.addClass(`instruction-align-${textAlignment._instruction}`)}addHeaderBackgroundLayer($header){if($header.find(" > .background").length)return;this.$headerBackground=$('').prependTo($header)}setHeaderBackgroundImage(config,$header){const backgroundImages=config._backgroundImage;if(!backgroundImages||!this.$headerBackground)return;const backgroundImage=backgroundImages[`_${device$1.screenSize}`]??backgroundImages._small;$header.toggleClass("has-bg-image",Boolean(backgroundImage));this.$headerBackground.css("background-image",backgroundImage?"url("+backgroundImage+")":"")}setHeaderBackgroundStyles(config,$header){const styles=config._backgroundStyles;if(!styles||!this.$headerBackground)return;this.$headerBackground.css({"background-repeat":styles._backgroundRepeat,"background-size":styles._backgroundSize,"background-position":styles._backgroundPosition})}setHeaderMinimumHeight(config,$header){const minimumHeights=config._minimumHeights;if(!minimumHeights)return;const minimumHeight=minimumHeights[`_${device$1.screenSize}`]??minimumHeights._small;$header.toggleClass("has-min-height",Boolean(minimumHeight)).css("min-height",minimumHeight?minimumHeight+"px":"")}});var ThemeArticleView=__AMD("theme/64b66dd816e5991c8012f733/js/themeArticleView",class ThemeArticleView extends ThemeView{className(){}setCustomStyles(){}onRemove(){}});var ThemeBlockView=__AMD("theme/64b66dd816e5991c8012f733/js/themeBlockView",class ThemeBlockView extends ThemeView{className(){return this.model.get("_isDividerBlock")?"is-divider-block":""}setCustomStyles(){this.setPaddingTop();this.setPaddingBottom();this.setComponentVerticalAlignment();this.setComponentHorizontalAlignment()}setPaddingTop(){const paddingTop=this.model.get("_paddingTop");if(!paddingTop)return;this.$el.addClass(`${paddingTop}-padding-top`)}setPaddingBottom(){const paddingBottom=this.model.get("_paddingBottom");if(!paddingBottom)return;this.$el.addClass(`${paddingBottom}-padding-bottom`)}setComponentVerticalAlignment(){const componentVerticalAlignment=this.model.get("_componentVerticalAlignment");if(!componentVerticalAlignment)return;this.$el.addClass(`align-vert-${componentVerticalAlignment}`)}setComponentHorizontalAlignment(){const componentHorizontalAlignment=this.model.get("_componentHorizontalAlignment");if(!componentHorizontalAlignment)return;this.$el.addClass(`align-horz-${componentHorizontalAlignment}`)}onRemove(){}});var ThemeComponentView=__AMD("theme/64b66dd816e5991c8012f733/js/themeComponentView",class ThemeComponentView extends ThemeView{className(){}setCustomStyles(){}onRemove(){}});class Theme extends Backbone.Controller{initialize(){this.listenTo(Adapt$1,{"app:dataReady":this.onDataReady,"pageView:postRender articleView:postRender blockView:postRender componentView:postRender":this.onPostRender})}onDataReady(){$("html").addClass(Adapt$1.course.get("_courseStyle"));this.addFavIcon()}addFavIcon(){const theme=Adapt$1.course.get("_vanilla");if(!theme?._favIcon?._src)return;const $linkStandard=$(``);const $linkApple=$(``);$("head").append($linkStandard).append($linkApple)}onPostRender(view){const viewModel=view.model;const theme=viewModel.get("_vanilla");if(!theme)return;const model=new Backbone.Model(theme);const el=view.$el;switch(viewModel.get("_type")){case"page":new ThemePageView({model:model,el:el});break;case"article":new ThemeArticleView({model:model,el:el});break;case"block":new ThemeBlockView({model:model,el:el});break;case"component":new ThemeComponentView({model:model,el:el});break;default:new ThemeView({model:model,el:el})}}}__AMD("theme/64b66dd816e5991c8012f733/js/theme",new Theme);register("header",(function Header(props){const jsxHeading=React.useRef(null);const{_id:_id,displayTitle:displayTitle,body:body,instruction:instruction,mobileInstruction:mobileInstruction,_type:_type,_component:_component,_extension:_extension,_isA11yComponentDescriptionEnabled:_isA11yComponentDescriptionEnabled,classNamePrefixes:classNamePrefixes=[_type&&_type.toLowerCase(),_component&&_component.toLowerCase(),_extension&&_extension.toLowerCase()].filter(Boolean)}=props;const sizedInstruction=mobileInstruction&&!device$1.isScreenSizeMin("medium")?mobileInstruction:instruction;const _globals=Adapt$1.course.get("_globals");const ariaRegion=_globals?._components?.[`_${_component}`]?.ariaRegion??_globals?._extensions?.[`_${_extension}`]?.ariaRegion;const isSet=displayTitle||body||sizedInstruction;if(!isSet&&_isA11yComponentDescriptionEnabled&&ariaRegion){return React__default["default"].createElement("div",{className:"aria-label",dangerouslySetInnerHTML:{__html:compile(ariaRegion)}})}if(!isSet)return null;return React__default["default"].createElement("div",{id:`${_id}-header`,className:classes([prefixClasses(classNamePrefixes,["__header"]),props.classes])},React__default["default"].createElement("div",{className:prefixClasses(classNamePrefixes,["__header-inner"])},displayTitle&&React__default["default"].createElement("div",{className:prefixClasses(classNamePrefixes,["__title"])},React__default["default"].createElement("div",{className:prefixClasses(classNamePrefixes,["__title-inner"])+" js-heading",ref:jsxHeading})),_isA11yComponentDescriptionEnabled&&ariaRegion&&React__default["default"].createElement("div",{className:"aria-label",dangerouslySetInnerHTML:{__html:compile(ariaRegion,props)}}),body&&React__default["default"].createElement("div",{className:prefixClasses(classNamePrefixes,["__body"])},React__default["default"].createElement("div",{className:prefixClasses(classNamePrefixes,["__body-inner"]),dangerouslySetInnerHTML:{__html:compile(body,props)}})),sizedInstruction&&React__default["default"].createElement("div",{className:prefixClasses(classNamePrefixes,["__instruction"])},React__default["default"].createElement("span",{className:"icon","aria-hidden":"true"}),React__default["default"].createElement("div",{className:prefixClasses(classNamePrefixes,["__instruction-inner"]),dangerouslySetInnerHTML:{__html:compile(sizedInstruction,props)}}))))}));register("image",(function Image(props){const hasMatchingSetting=Object.hasOwn(props,`_${device$1.screenSize}`)||Object.hasOwn(props,device$1.screenSize);const screenSize=hasMatchingSetting?device$1.screenSize:device$1.isScreenSizeMin("medium")?"large":"small";const src=props[`_${screenSize}`]||props[`${screenSize}`]||props._src||props.src;const hasSource=Boolean(src);if(!hasSource)return null;const attributionClassNamePrefixes=props.attributionClassNamePrefixes||props.classNamePrefixes;return React__default["default"].createElement("span",{id:props.id,className:classes([prefixClasses(props.classNamePrefixes,["__image-container"]),props.classes,props.attribution&&"has-attribution"])},React__default["default"].createElement("img",{className:classes([prefixClasses(props.classNamePrefixes,["__image"]),props?._srcFocalPoint&&`object-position-${props?._srcFocalPoint}`]),src:src,"aria-label":a11y$1.normalize(props.alt),"aria-hidden":!props.alt,loading:"eager","aria-describedby":props.longdescription?props.longDescriptionId:undefined,draggable:props.draggable??null}),props.attribution&&React__default["default"].createElement("span",{className:prefixClasses(attributionClassNamePrefixes,["__attribution"])},React__default["default"].createElement("span",{className:prefixClasses(attributionClassNamePrefixes,["__attribution-inner"])},html(props.attribution))))}));register("navButton",(function NavButton(props){const{text:text,_iconClasses:_iconClasses}=props;return React__default["default"].createElement(React__default["default"].Fragment,null,React__default["default"].createElement("span",{className:classes(["icon",_iconClasses]),"aria-hidden":"true"}),React__default["default"].createElement("span",{className:"nav__btn-label","aria-hidden":"true"},compile(text,props)))}));register("tooltip",(function Tooltip(props){const{text:text,disabledText:disabledText,isDisabled:isDisabled,ariaHidden:ariaHidden}=props;return React__default["default"].createElement(React__default["default"].Fragment,null,React__default["default"].createElement("div",{className:classes(["tooltip__arrow"]),"aria-hidden":"true"}),React__default["default"].createElement("div",{className:classes(["tooltip__body"]),"aria-hidden":ariaHidden},React__default["default"].createElement("div",{className:"tooltip__body-inner",dangerouslySetInnerHTML:{__html:compile((isDisabled?disabledText:text)||"",props)}})))}));register("assessmentResults",(function AssessmentResults(props){const{_globals:_globals,_retry:_retry,retryFeedback:retryFeedback,_isRetryEnabled:_isRetryEnabled}=props;return React__default["default"].createElement("div",{className:"component__inner assessmentresults__inner"},React__default["default"].createElement(templates.header,props),React__default["default"].createElement("div",{className:"component__widget assessmentresults__widget"},_isRetryEnabled&&React__default["default"].createElement("div",{className:"component__feedback assessmentresults__feedback"},React__default["default"].createElement("div",{className:"component__feedback-inner assessmentresults__feedback-inner"},retryFeedback&&React__default["default"].createElement("div",{className:"assessmentresults__retry-feedback"},React__default["default"].createElement("div",{className:"assessmentresults__retry-feedback-inner",dangerouslySetInnerHTML:{__html:compile(retryFeedback,props)}})),React__default["default"].createElement("button",{className:"btn-text assessmentresults__retry-btn js-assessment-retry-btn"},React__default["default"].createElement("span",null,_retry.button||_globals._components._assessmentResults.retryText))))))}));function _extends(){_extends=Object.assign?Object.assign.bind():function(target){for(var i=1;i{let{href:href,children:children,target:target,className:className,role:role}=_ref;return href?React__default["default"].createElement("a",{href:href,target:target,className:className,role:role},children):children};register("graphic",(function Graphic(props){const{_id:_id,_isScrollable:_isScrollable,_scrollPercent:_scrollPercent,_graphic:_graphic,_globals:_globals}=props;const scrollableProperties=_isScrollable?{role:"slider",className:"component__widget graphic__widget js-graphic-scrollbar","aria-controls":`graphic__scroll__container__${_id}`,"aria-orientation":"horizontal","aria-valuemax":"100","aria-valuemin":"0","aria-valuenow":_scrollPercent,"aria-label":Handlebars.compile(_globals._components._graphic.scrollAriaLabel)(props),"aria-describedby":_graphic.longdescription?`graphic__longdescription__${_id}`:undefined,tabIndex:"0"}:{};return React__default["default"].createElement("div",{className:"component__inner graphic__inner"},React__default["default"].createElement(templates.header,props),React__default["default"].createElement("div",_extends({className:"component__widget graphic__widget"},scrollableProperties),React__default["default"].createElement(LinkWrapper,{href:_graphic._url,target:_graphic._target,className:"graphic__link js-graphic-link",role:"link"},React__default["default"].createElement(templates.image,_extends({},_graphic,{"aria-hidden":_isScrollable,id:`graphic__scroll__container__${_id}`,longDescriptionId:`graphic__longdescription__${_id}`,classes:"js-graphic-scroll-container",classNamePrefixes:["component","graphic"]})),_graphic.longdescription&&React__default["default"].createElement("div",{id:`graphic__longdescription__${_id}`,className:"graphic__longdescription"},React__default["default"].createElement("div",{className:"graphic__longdescription-inner"},_graphic.longdescription)))))}));register("mcq",(function Mcq(props){const ariaLabels=Adapt$1.course.get("_globals")._accessibility._ariaLabels;const{_id:_id,_isEnabled:_isEnabled,_isInteractionComplete:_isInteractionComplete,_isCorrect:_isCorrect,_isCorrectAnswerShown:_isCorrectAnswerShown,_shouldShowMarking:_shouldShowMarking,_isRadio:_isRadio,displayTitle:displayTitle,body:body,instruction:instruction,ariaQuestion:ariaQuestion,onKeyPress:onKeyPress,onItemSelect:onItemSelect,onItemFocus:onItemFocus,onItemBlur:onItemBlur}=props;return React__default["default"].createElement("div",{className:"component__inner mcq__inner"},React__default["default"].createElement(templates.header,props),React__default["default"].createElement("div",{className:classes(["component__widget","mcq__widget",!_isEnabled&&"is-disabled",_isInteractionComplete&&"is-complete is-submitted show-user-answer",_isCorrect&&"is-correct"]),role:_isRadio?"radiogroup":"group","aria-labelledby":ariaQuestion?null:(displayTitle||body||instruction)&&`${_id}-header`,"aria-label":ariaQuestion||null},props._items.map(((_ref,index)=>{let{text:text,_index:_index,_isActive:_isActive,_shouldBeSelected:_shouldBeSelected,_isHighlighted:_isHighlighted}=_ref;return React__default["default"].createElement("div",{className:classes([`mcq-item item-${index}`,_shouldShowMarking&&_shouldBeSelected&&"is-correct",_shouldShowMarking&&!_shouldBeSelected&&"is-incorrect"]),key:_index},React__default["default"].createElement("input",{className:"mcq-item__input",id:`${_id}-${index}-input`,name:_isRadio?`${_id}-item`:null,type:_isRadio?"radio":"checkbox",disabled:!_isEnabled,checked:_isActive,"aria-label":!_shouldShowMarking?a11y$1.normalize(text):`${_shouldBeSelected?ariaLabels.correct:ariaLabels.incorrect}, ${_isActive?ariaLabels.selectedAnswer:ariaLabels.unselectedAnswer}. ${a11y$1.normalize(text)}`,"data-adapt-index":_index,onKeyPress:onKeyPress,onChange:onItemSelect,onFocus:onItemFocus,onBlur:onItemBlur}),React__default["default"].createElement("label",{className:classes(["mcq-item__label","u-no-select",!_isEnabled&&"is-disabled",_isHighlighted&&"is-highlighted",(_isCorrectAnswerShown?_shouldBeSelected:_isActive)&&"is-selected"]),"aria-hidden":true,htmlFor:`${_id}-${index}-input`,"data-adapt-index":_index},React__default["default"].createElement("span",{className:"mcq-item__state"},React__default["default"].createElement("span",{className:classes(["mcq-item__icon","mcq-item__answer-icon",_isRadio?"is-radio":"is-checkbox"])},React__default["default"].createElement("span",{className:"icon"})),React__default["default"].createElement("span",{className:"mcq-item__icon mcq-item__correct-icon"},React__default["default"].createElement("span",{className:"icon"})),React__default["default"].createElement("span",{className:"mcq-item__icon mcq-item__incorrect-icon"},React__default["default"].createElement("span",{className:"icon"}))),React__default["default"].createElement("span",{className:"mcq-item__text"},React__default["default"].createElement("span",{className:"mcq-item__text-inner",dangerouslySetInnerHTML:{__html:compile(text)}}))))}))),React__default["default"].createElement("div",{className:"btn__container"}))}));register("resources",(function Resources(props){const{resources:resources,resourceTypes:resourceTypes}=props;const _globals=Adapt$1.course.get("_globals");function resourcesHasMultipleTypes(resources){if(resources.length===1)return false;const allSameType=resources.every(_.matcher({_type:resources[0]._type}));return!allSameType}function resourcesGetColumnCount(resources){return _.uniq(_.pluck(resources,"_type")).length+1}const[selectedFilter,setSelectedFilter]=React.useState("all");const[selectedId,setSelectedId]=React.useState("resources__show-all");const[focusFlag,setFocusFlag]=React.useState(false);React.useEffect((()=>{if(focusFlag){let $items;if(selectedFilter==="all"){$items=$(".resources__item")}else{$items=$(".resources__item.is-"+selectedFilter)}if($items.length<0)return;a11y$1.focusFirst($items);setFocusFlag(false)}}),[focusFlag]);const onFilterClicked=e=>{if(e&&e.preventDefault)e.preventDefault();const $clickedButton=$(e.currentTarget);const filter=$clickedButton.data("filter");const id=$clickedButton.attr("id");setSelectedFilter(filter);setSelectedId(id);setFocusFlag(true)};return React__default["default"].createElement("div",{className:"resources__inner"},React__default["default"].createElement(templates.header,props.model),resourcesHasMultipleTypes(resources)&&React__default["default"].createElement("div",{className:classes(["resources__filter",`has-${resourcesGetColumnCount(resources)}-columns`,resourcesGetColumnCount(resources)>4&&"has-extra-types"])},React__default["default"].createElement("div",{className:"resources__filter-inner",role:"tablist"},React__default["default"].createElement("div",{className:"aria-label","aria-label":_globals._extensions._resources.resources}),resourceTypes.map(((type,index)=>React__default["default"].createElement(templates.resourcesFilterButton,_extends({},props,{key:index,resources:resources,_filter:type,onClick:onFilterClicked,selected:selectedFilter})))))),React__default["default"].createElement("div",{id:"resources",className:"resources__item-container",role:"tabpanel","aria-labelledby":selectedId},React__default["default"].createElement("div",{role:"list"},resources.map(((_ref,index)=>{let{title:title,description:description,_link:_link,_type:_type,_isGlobal:_isGlobal,filename:filename,_forceDownload:_forceDownload}=_ref;return React__default["default"].createElement(templates.resourcesItem,_extends({},props,{key:index,_index:index,title:title,description:description,_link:_link,_type:_type,_isGlobal:_isGlobal,selectedFilter:selectedFilter,filename:filename,_forceDownload:_forceDownload}))})))))}));register("resourcesFilterButton",(function ResourcesFilterButton(props){const{model:model,onClick:onClick,resources:resources,selected:selected,_filter:_filter}=props;const buttonText=model._filterButtons[_filter];const ariaLabel=model._filterAria[`${_filter}Aria`];function resourcesHasType(resources,type){return resources.some(_.matcher({_type:type}))}if(!resourcesHasType(resources,_filter)&&_filter!=="all")return null;return React__default["default"].createElement("button",{id:`resources__show-${_filter}`,className:classes(["resources__filter-btn",selected===_filter&&"is-selected"]),onClick:onClick,"data-filter":_filter,"aria-label":ariaLabel,role:"tab","aria-selected":selected===_filter,"aria-controls":"resources",dangerouslySetInnerHTML:{__html:buttonText}})}));register("resourcesItem",(function ResourcesItem(props){const{_forceDownload:_forceDownload,_isGlobal:_isGlobal,_link:_link,_type:_type,_index:_index,description:description,filename:filename,selectedFilter:selectedFilter,title:title,onResourceItemClicked:onResourceItemClicked}=props;function resourcesForceDownload(filename,_forceDownload){if(device$1.browser==="internet explorer"||device$1.OS==="ios"){return false}return _forceDownload||filename}return React__default["default"].createElement("div",{className:classes(["resources__item drawer__item",`is-${_type}`,_isGlobal&&"is-global",!["all",_type].includes(selectedFilter)&&"u-display-none"]),role:"listitem"},React__default["default"].createElement("a",{href:_link,className:"resources__item-btn drawer__item-btn","data-type":_type,"data-index":_index,download:resourcesForceDownload(filename,_forceDownload)&&filename,onClick:onResourceItemClicked,target:"_blank",rel:"noreferrer","aria-label":title},title&&React__default["default"].createElement("div",{className:"resources__item-title drawer__item-title"},React__default["default"].createElement("div",{className:"resources__item-title-inner drawer__item-title-inner",dangerouslySetInnerHTML:{__html:title}})),description&&React__default["default"].createElement("div",{className:"resources__item-body drawer__item-body"},React__default["default"].createElement("div",{className:"resources__item-body-inner drawer__item-body-inner",dangerouslySetInnerHTML:{__html:description}}))))}));$("body").append(Handlebars.templates.loading());data$1.on("ready",(()=>{logging$1.debug("Calling Adapt.init");Adapt$1.init();Adapt$1.off("adaptCollection:dataLoaded courseModel:dataLoaded")})).init()}));window.__AMD=function(id,value){window.define(id,(function(){return value}));window.require([id]);return value}; +require(["bowser","underscore","backbone","semver","react","react-dom","html-react-parser","libraries/SCORM_API_wrapper","libraries/lzma-min","libraries/lzma_worker-min.js","libraries/js-cookie.js","libraries/jquery.keycombo"],(function(Bowser,_$1,Backbone$1,semver,React,ReactDOM,HTMLReactParser,pipwerks,lzmaMin,lzma_workerMin_js,Cookies,jquery_keycombo){function _interopDefaultLegacy(e){return e&&typeof e==="object"&&"default"in e?e:{default:e}}var Bowser__default=_interopDefaultLegacy(Bowser);var ___default=_interopDefaultLegacy(_$1);var Backbone__default=_interopDefaultLegacy(Backbone$1);var semver__default=_interopDefaultLegacy(semver);var React__default=_interopDefaultLegacy(React);var ReactDOM__default=_interopDefaultLegacy(ReactDOM);var HTMLReactParser__default=_interopDefaultLegacy(HTMLReactParser);var pipwerks__default=_interopDefaultLegacy(pipwerks);var Cookies__default=_interopDefaultLegacy(Cookies);class Wait extends Backbone.Controller{initialize(){this._waitCount=0;this._callbackHandle=null;this.being=this.begin.bind(this);this.end=this.end.bind(this)}isWaiting(){return this._waitCount!==0}begin(){if(!this.isWaiting())this.trigger("wait");this._waitCount++;if(this._callbackHandle){clearTimeout(this._callbackHandle);this._callbackHandle=null}return this}end(){if(!this.isWaiting())return this;this._waitCount--;if(this.isWaiting()||this._callbackHandle)return this;this._callbackHandle=setTimeout(function(){this._callbackHandle=null;this.trigger("ready")}.bind(this),0);return this}queue(callback){if(!callback){this.begin();return new Promise((resolve=>{this.once("ready",resolve);this.end()}))}this.begin();this.once("ready",callback);this.end();return this}for(callback){this.begin();_.defer((()=>callback(_.once(this.end))));return this}}const wait=new Wait;var wait$1=__AMD("core/js/wait",wait);var LockingModel=__AMD("core/js/models/lockingModel",class LockingModel extends Backbone.Model{lockedAttributes(){return null}set(...args){if(typeof args[0]!=="object"){const[name,value]=args.splice(0,2);args.unshift({[name]:value})}const options=args[1]??{};const attrValues=args[0];const newValues={};for(const attrName in attrValues){const attrVal=attrValues[attrName];const willChange=this.attributes[attrName]!==attrValues[attrName];if(!willChange)continue;const isNotLocking=typeof attrVal!=="boolean"||!this.isLocking(attrName);if(isNotLocking){newValues[attrName]=attrVal;continue}const defaults=_.result(this,"defaults");const isDefault=defaults[attrName]!==undefined;const isInitialDefault=isDefault&&!this.changed;if(isInitialDefault){this._lockedAttributes[attrName]=!defaults[attrName]}const isSettingValueForSpecificPlugin=options?.pluginName;if(!isSettingValueForSpecificPlugin){if(!isInitialDefault){console.error("Must supply a pluginName to change a locked attribute")}options.pluginName="compatibility"}const pluginName=options.pluginName;const lockingValue=this._lockedAttributes[attrName];const isAttemptingToLock=lockingValue===attrVal;if(isAttemptingToLock){this.setLockState(attrName,true,{pluginName:pluginName,skipcheck:true});newValues[attrName]=lockingValue;continue}this.setLockState(attrName,false,{pluginName:pluginName,skipcheck:true});const totalLockValue=this.getLockCount(attrName,{skipcheck:true});if(totalLockValue===0){newValues[attrName]=!lockingValue;continue}}if(!Object.keys(newValues))return this;super.set(newValues,options);return this}setLocking(attrName,defaultLockValue){if(this.isLocking(attrName))return;if(!this._lockedAttributes)this._lockedAttributes={};this._lockedAttributes[attrName]=defaultLockValue}unsetLocking(attrName){if(!this.isLocking(attrName))return;if(!this._lockedAttributes)return;delete this._lockedAttributes[attrName];delete this._lockedAttributesValues[attrName];if(Object.keys(this._lockedAttributes).length===0){delete this._lockedAttributes;delete this._lockedAttributesValues}}isLocking(attrName){const isCheckingGeneralLockingState=attrName===undefined;let hasDerivedLockedAttributes=Object.prototype.hasOwnProperty.call(this,"_lockedAttributes");if(!hasDerivedLockedAttributes){this._lockedAttributes=_.result(this,"lockedAttributes");hasDerivedLockedAttributes=true}const isUsingLockedAttributes=Boolean(this._lockedAttributes);if(isCheckingGeneralLockingState){return isUsingLockedAttributes}if(!isUsingLockedAttributes)return false;const isAttributeALockingAttribute=Object.prototype.hasOwnProperty.call(this._lockedAttributes,attrName);if(!isAttributeALockingAttribute)return false;if(!this._lockedAttributesValues){this._lockedAttributesValues={}}if(!this._lockedAttributesValues[attrName]){this._lockedAttributesValues[attrName]={}}return true}isLocked(attrName,options){const shouldSkipCheck=options?.skipcheck;if(!shouldSkipCheck){const stopProcessing=!this.isLocking(attrName);if(stopProcessing)return}return this.getLockCount(attrName)>0}getLockCount(attrName,options){const shouldSkipCheck=options?.skipcheck;if(!shouldSkipCheck){const stopProcessing=!this.isLocking(attrName);if(stopProcessing)return}const isGettingValueForSpecificPlugin=options?.pluginName;if(isGettingValueForSpecificPlugin){return this._lockedAttributesValues[attrName][options.pluginName]?1:0}const lockingAttributeValues=Object.values(this._lockedAttributesValues[attrName]);const lockingAttributeValuesSum=lockingAttributeValues.reduce(((sum,value)=>sum+(value?1:0)),0);return lockingAttributeValuesSum}setLockState(attrName,value,options){const shouldSkipCheck=options?.skipcheck;if(!shouldSkipCheck){const stopProcessing=!this.isLocking(attrName);if(stopProcessing)return this}const isSettingValueForSpecificPlugin=options?.pluginName;if(!isSettingValueForSpecificPlugin){console.error("Must supply a pluginName to set a locked attribute lock value");options.pluginName="compatibility"}if(value){this._lockedAttributesValues[attrName][options.pluginName]=value}else{delete this._lockedAttributesValues[attrName][options.pluginName]}return this}});class AdaptSingleton extends LockingModel{initialize(){this.loadScript=window.__loadScript}defaults(){return{_canScroll:true,_outstandingCompletionChecks:0,_pluginWaitCount:0,_isStarted:false,_shouldDestroyContentObjects:true}}lockedAttributes(){return{_canScroll:false}}async init(){this.addDirection();this.disableAnimation();this.trigger("adapt:preInitialize");await wait$1.queue();this.deferUntilCompletionChecked((async()=>{this.trigger("adapt:start");await wait$1.queue();if(!Backbone.History.started){Backbone.history.start()}this.set("_isStarted",true);this.trigger("adapt:initialize");await wait$1.queue()}))}checkingCompletion(){const outstandingChecks=this.get("_outstandingCompletionChecks");this.set("_outstandingCompletionChecks",outstandingChecks+1)}checkedCompletion(){const outstandingChecks=this.get("_outstandingCompletionChecks");this.set("_outstandingCompletionChecks",outstandingChecks-1)}async deferUntilCompletionChecked(callback=(()=>{})){if(this.get("_outstandingCompletionChecks")===0)return callback();return new Promise((resolve=>{const checkIfAnyChecksOutstanding=(model,outstandingChecks)=>{if(outstandingChecks!==0)return;this.off("change:_outstandingCompletionChecks",checkIfAnyChecksOutstanding);callback();resolve()};this.on("change:_outstandingCompletionChecks",checkIfAnyChecksOutstanding)}))}isWaitingForPlugins(){this.log.deprecated("Use wait.isWaiting() as Adapt.isWaitingForPlugins() will be removed in the future");return wait$1.isWaiting()}checkPluginsReady(){this.log.deprecated("Use wait.isWaiting() as Adapt.checkPluginsReady() will be removed in the future");if(this.isWaitingForPlugins()){return}this.trigger("plugins:ready")}parseRelativeString(relativeString){const parts=relativeString.replace(/\s*([+\-=]+\d+){1}/g,"$1").split(/[@ ]/).filter(Boolean);const parsed=parts.map((part=>{let splitIndex=part.search(/[+\-=\d]{1}/);if(splitIndex===-1)splitIndex=part.length;const symbol=part.slice(splitIndex,splitIndex+1);const type=part.slice(0,splitIndex).replace(/^@/,"");let offset=null;let inset=null;switch(symbol){case"=":inset=parseInt(part.slice(splitIndex+1).trim()||0);break;default:offset=parseInt(part.slice(splitIndex).trim()||0);break}return{type:type,offset:offset,inset:inset}}));return parsed.length===1?parsed[0]:parsed}addDirection(){const defaultDirection=this.config.get("_defaultDirection");$("html").addClass("dir-"+defaultDirection).attr("dir",defaultDirection)}disableAnimation(){const disableAnimationArray=this.config.get("_disableAnimationFor");const disableAnimation=this.config.get("_disableAnimation");if(disableAnimationArray){for(let i=0,l=disableAnimationArray.length;i=this.screenHeight?"landscape":"portrait"}get aspectRatio(){return this.screenWidth/this.screenHeight}onConfigDataLoaded(){this.screenSize=this.checkScreenSize();this.$html.addClass("size-"+this.screenSize);if(this.orientation){this.$html.addClass("orientation-"+this.orientation)}this.$window.on("resize orientationchange",this.onWindowResize)}get screenSizes(){const screenSizes={...Adapt$1.config.get("screenSize")};const screenSizesList=Object.entries(screenSizes);const screensizeEmThreshold=300;const baseFontSize=16;for(const[name,value]of screenSizesList){screenSizes[name]=value>screensizeEmThreshold?value/baseFontSize:value}return screenSizes}isScreenSizeMin(name){return Boolean(window.matchMedia(`(min-width: ${this.screenSizes[name]}em)`)?.matches)}checkScreenSize(){const screenSizesList=Object.entries(this.screenSizes);screenSizesList.sort(((a,b)=>a[1]-b[1]));const fontSize=parseFloat($("html").css("font-size"));const screenSizeEmWidth=window.innerWidth/fontSize;const smallestScreenSize=screenSizesList[0][0];const screenSize=screenSizesList.reduce(((screenSize,[name,value])=>{if(screenSizeEmWidth>=value)return name;return screenSize}),smallestScreenSize);return screenSize}getScreenWidth(){return this.isAppleDevice()?this.getAppleScreenWidth():window.innerWidth||this.$window.width()}getScreenHeight(){return this.isAppleDevice()?this.getAppleScreenHeight():window.innerHeight||this.$window.height()}setViewportHeight(){document.documentElement.style.setProperty("--adapt-viewport-height",`${window.innerHeight}px`)}setNavigationHeight(){document.documentElement.style.setProperty("--adapt-navigation-height",`${$(".nav").height()}px`)}getOperatingSystem(){let os=this.bowser.os.name.toLowerCase()||"";if(os===""){const platform=navigator.platform.toLowerCase();const match=platform.match(/win|mac|linux/);if(match)os=match[0];if(os==="win")os="windows";if(!os)os=""}if(!os)os="platformunknown";return os}getRenderingEngine(){return this.bowser.engine.name||""}onWindowResize(){if(this.hasWindowResized)return;requestAnimationFrame(this.calculateResize);this.hasWindowResized=true}calculateResize(){this.hasWindowResized=false;const previousWidth=this.screenWidth;const previousHeight=this.screenHeight;this.screenWidth=this.getScreenWidth();this.screenHeight=this.getScreenHeight();this.setViewportHeight();this.setNavigationHeight();if(previousWidth===this.screenWidth&&previousHeight===this.screenHeight){return}if(this.orientation){this.$html.toggleClass("orientation-landscape",this.orientation==="landscape");this.$html.toggleClass("orientation-portrait",this.orientation==="portrait")}const newScreenSize=this.checkScreenSize();if(newScreenSize!==this.screenSize){this.screenSize=newScreenSize;const screenSizes=this.screenSizes;for(const name in screenSizes){if(name===this.screenSize)continue;this.$html.removeClass(`size-${name}`)}this.$html.toggleClass(`size-${this.screenSize}`,true);Adapt$1.trigger("device:changed",this.screenSize)}Adapt$1.trigger("device:preResize device:resize device:postResize",this.screenWidth)}isAppleDevice(){return/iPad|iPhone|iPod/.test(navigator.userAgent)&&!window.MSStream||navigator.userAgent.match(/Mac/)&&navigator?.maxTouchPoints>2}get shouldReportInvertedAppleScreenSize(){const windowRatio=window.innerWidth/window.innerHeight;const screenRatio=window.screen.width/window.screen.height;const isWindowPortrait=windowRatio<1;const isScreenPortrait=screenRatio<1;const isDeviceBadlyReportingScreenOrientation=isWindowPortrait!==isScreenPortrait;return isDeviceBadlyReportingScreenOrientation}getAppleScreenWidth(){return this.shouldReportInvertedAppleScreenSize?window.screen.height:window.screen.width}getAppleScreenHeight(){return this.shouldReportInvertedAppleScreenSize?window.screen.width:window.screen.height}getAppleDeviceType(){const platformType=this.bowser.platform.type?.toLowerCase()||"";const browserName=this.bowser.browser.name?.toLowerCase()||"";const isIPhone=platformType==="mobile"&&browserName==="safari";const isIPad=platformType==="tablet"&&browserName==="safari";if(isIPhone)return"iphone";if(isIPad)return"ipad";return""}pixelDensity(){const pixelDensity=window.devicePixelRatio||1;if(pixelDensity>=3){return"ultra-high"}else if(pixelDensity>=2){return"high"}else if(pixelDensity>=1.5){return"medium"}else{return"low"}}}const device=new Device;var device$1=__AMD("core/js/device",device);class Location extends Backbone__default["default"].Controller{initialize(){this._previousId=null;this._previousContentType=null;this._previousModel=null;this._previousClasses=null;this._lastVisitedType=null;this._lastVisitedMenu=null;this._lastVisitedPage=null;this._currentId=null;this._currentModel=null;this._currentLocation=null;this._contentType=null}}const location=new Location;var location$1=__AMD("core/js/location",location);var BrowserConfig=__AMD("core/js/a11y/browserConfig",class BrowserConfig extends Backbone.Controller{initialize({a11y:a11y}){this.a11y=a11y;this.listenTo(Adapt$1,{"accessibility:ready":this._onReady})}_onReady(){if(this.a11y.config._options._isPrefersReducedMotionEnabled)this._enablePrefersReducedMotion()}_enablePrefersReducedMotion(){if(!window.matchMedia)return;const isEnabledInBrowser=window.matchMedia("(prefers-reduced-motion: reduce");$("html").toggleClass("is-prefers-reduced-motion",Boolean(isEnabledInBrowser?.matches))}});var BrowserFocus=__AMD("core/js/a11y/browserFocus",class BrowserFocus extends Backbone.Controller{initialize({a11y:a11y}){this.a11y=a11y;this._onBlur=this._onBlur.bind(this);this._onClick=this._onClick.bind(this);this.$body=$("body");this.listenTo(Adapt$1,{"accessibility:ready":this._attachEventListeners})}_attachEventListeners(){this.$body.on("blur","*",this._onBlur).on("blur",this._onBlur);this.$body[0].addEventListener("click",this._onClick,true)}_onBlur(event){const config=this.a11y.config;if(!config._isEnabled||!config._options._isFocusNextOnDisabled){return}const $element=$(event.target);if($element.is("[data-a11y-force-focus]")){$element.removeAttr("tabindex data-a11y-force-focus")}if(event.target!==event.currentTarget){return}if(!$element.is("[disabled]")&&$element.css("display")!=="none"&&$element.css("visibility")!=="hidden"){return}this.a11y.focusNext($element)}_onClick(event){if(!event.isTrusted)return;const $element=$(event.target);const isAriaDisabled=$element.closest("[aria-disabled=true]").length===1;if(isAriaDisabled){event.preventDefault();event.stopImmediatePropagation()}const config=this.a11y.config;if(!config._isEnabled||!config._options._isFocusOnClickEnabled){return}const $stack=$([...$element.toArray(),...$element.parents().toArray()]);const $focusable=$stack.filter(config._options._tabbableElements);if(!$focusable.length){return}const $closestFocusable=$element.closest(config._options._tabbableElements);if($closestFocusable[0]!==document.activeElement){this.a11y._isForcedFocus=true;$closestFocusable[0].focus();this.a11y._isForcedFocus=false}if(!config._options._isClickDelayedAfterFocusEnabled)return;event.preventDefault();event.stopImmediatePropagation();setTimeout((()=>{$element[0].click()}),50)}});var FocusOptions=__AMD("core/js/a11y/focusOptions",class FocusOptions{constructor({preventScroll:preventScroll=false,defer:defer=false}={}){this.preventScroll=preventScroll;this.defer=defer}});var KeyboardFocusOutline=__AMD("core/js/a11y/keyboardFocusOutline",class KeyboardFocusOutline extends Backbone.Controller{initialize({a11y:a11y}){this.a11y=a11y;this._onKeyDown=this._onKeyDown.bind(this);this.$html=$("html");this.showOnKeys={9:true,13:true,32:true,37:true,38:true,39:true,40:true};this.listenTo(Adapt$1,{"accessibility:ready":this._attachEventListeners})}_attachEventListeners(){document.addEventListener("keydown",this._onKeyDown);this._start()}_start(){const config=this.a11y.config;if(config._options._isFocusOutlineDisabled){this.$html.addClass("a11y-disable-focusoutline");return}if(!config._isEnabled||!config._options._isFocusOutlineKeyboardOnlyEnabled){return}this.$html.addClass("a11y-disable-focusoutline")}_onKeyDown(event){const config=this.a11y.config;if(config._options._isFocusOutlineDisabled){this.$html.addClass("a11y-disable-focusoutline");return}if(!config._isEnabled||!config._options._isFocusOutlineKeyboardOnlyEnabled||!this.showOnKeys[event.keyCode]){return}const $element=$(event.target);if(!$element.is(config._options._tabbableElements)||$element.is(config._options._focusOutlineKeyboardOnlyIgnore)){return}this.$html.removeClass("a11y-disable-focusoutline")}});const LOG_LEVEL=ENUM(["DEBUG","INFO","WARN","ERROR","FATAL"]);var LOG_LEVEL$1=__AMD("core/js/enums/logLevelEnum",LOG_LEVEL);class Logging extends Backbone.Controller{initialize(){this._config={_isEnabled:true,_level:LOG_LEVEL$1.INFO.asLowerCase,_console:true,_warnFirstOnly:true};this._warned={};this.listenToOnce(Adapt$1,"configModel:dataLoaded",this.onLoadConfigData)}onLoadConfigData(){this.loadConfig();this.debug("Logging config loaded");this.trigger("log:ready")}loadConfig(){if(Adapt$1.config.has("_logging")){this._config=Adapt$1.config.get("_logging")}this.checkQueryStringOverride()}checkQueryStringOverride(){const matches=window.location.search.match(/[?&]loglevel=([a-z]*)/i);if(!matches||matches.length<2)return;const override=LOG_LEVEL$1(matches[1].toUpperCase());if(!override)return;this._config._level=override.asLowerCase;this.debug("Loglevel override in query string:",this._config._level)}debug(...args){this._log(LOG_LEVEL$1.DEBUG,args)}info(...args){this._log(LOG_LEVEL$1.INFO,args)}warn(...args){this._log(LOG_LEVEL$1.WARN,args)}error(...args){this._log(LOG_LEVEL$1.ERROR,args)}fatal(...args){this._log(LOG_LEVEL$1.FATAL,args)}removed(...args){args=["REMOVED"].concat(args);this.warnOnce(...args)}deprecated(...args){args=["DEPRECATED"].concat(args);this.warnOnce(...args)}warnOnce(...args){if(this._hasWarned(args)){return}this._log(LOG_LEVEL$1.WARN,args)}_log(level,data){const isEnabled=this._config._isEnabled;if(!isEnabled)return;const configLevel=LOG_LEVEL$1(this._config._level.toUpperCase());const isLogLevelAllowed=level>=configLevel;if(!isLogLevelAllowed)return;this._logToConsole(level,data);this.trigger("log",level,data);this.trigger("log:"+level.asLowerCase,level,data)}_logToConsole(level,data){const shouldLogToConsole=this._config._console;if(!shouldLogToConsole)return;const log=[level.asUpperCase+":"];data&&log.push(...data);if(console[level.asLowerCase]){console[level.asLowerCase](...log)}else{console.log(...log)}}_hasWarned(args){if(!this._config._warnFirstOnly){return false}const hash=args.map(String).join(":");if(this._warned[hash]){return true}this._warned[hash]=true;return false}}const logging=new Logging;var logging$1=__AMD("core/js/logging",logging);var Log=__AMD("core/js/a11y/log",class Log extends Backbone.Controller{initialize({a11y:a11y}){this.a11y=a11y;this._warned={}}_hasWarned(args){const config=this.a11y.config;if(!config._options._warnFirstOnly){return false}const hash=args.map(String).join(":");if(this._warned[hash]){return true}this._warned[hash]=true;return false}_canWarn(){const config=this.a11y.config;return Boolean(config._options._warn)}removed(...args){if(!this._canWarn){return}args=["A11Y"].concat(args);if(this._hasWarned(args)){return}logging$1.removed(...args);return this}deprecated(...args){if(!this._canWarn){return}args=["A11Y"].concat(args);if(this._hasWarned(args)){return}logging$1.deprecated(...args);return this}});var Scroll=__AMD("core/js/a11y/scroll",class Scroll extends Backbone.Controller{initialize({a11y:a11y}){this._a11y=a11y;this._onTouchStart=this._onTouchStart.bind(this);this._onTouchEnd=this._onTouchEnd.bind(this);this._onScrollEvent=this._onScrollEvent.bind(this);this._onKeyDown=this._onKeyDown.bind(this);this._scrollDisabledElements=$([]);this.$window=$(window);this.$body=$("body");this._preventScrollOnKeys={33:true,34:true,35:true,36:true,37:true,38:true,39:true,40:true};this._arrowKeys={37:true,38:true,39:true,40:true};this._ignoreKeysOnElementsMatching="textarea, input[type=radio], select";this._isRunning=false;this._touchStartEventObject=null;window.addEventListener("touchstart",this._onTouchStart);window.addEventListener("touchend",this._onTouchEnd);window.addEventListener("touchmove",this._onScrollEvent,{passive:false});window.addEventListener("wheel",this._onScrollEvent,{passive:false});document.addEventListener("wheel",this._onScrollEvent,{passive:false});document.addEventListener("keydown",this._onKeyDown)}disable($elements){$elements=$($elements);this._scrollDisabledElements=this._scrollDisabledElements.add($elements);this._checkRunning();return this}enable($elements){$elements=$($elements);if(!$elements.length){this.clear();return this}this._scrollDisabledElements=this._scrollDisabledElements.not($elements);this._checkRunning();return this}clear(){this._scrollDisabledElements=$([]);this._checkRunning();return this}_checkRunning(){if(!this._scrollDisabledElements.length){this._stop();return}this._start()}_start(){if(this._isRunning){return}this._isRunning=true}_onTouchStart(event){if(!this._isRunning)return;event=$.event.fix(event);this._touchStartEventObject=event;return true}_onTouchEnd(){if(!this._isRunning)return;this._touchStartEventObject=null;return true}_onScrollEvent(event){if(!this._isRunning)return;event=$.event.fix(event);return this._preventScroll(event)}_onKeyDown(event){if(!this._isRunning)return;event=$.event.fix(event);if(this._arrowKeys[event.which]&&this._a11y.isArrowable(event.target)){return}if(!this._preventScrollOnKeys[event.which]){return}if(this._a11y.isPopupOpen&&!this._isScrollable($(event.target))){const $openPopup=this._a11y.popupStack[this._a11y.popupStack.length-1];const $firstScrollable=this._isScrollable($openPopup)?$openPopup:this._a11y._findFirstForwardDescendant($openPopup,this._isScrollable);if($firstScrollable.length){event.target=$firstScrollable}}const $target=$(event.target);if($target.is(this._ignoreKeysOnElementsMatching)){return}return this._preventScroll(event)}_preventScroll(event){const isGesture=event.touches?.length>1;if(isGesture){return}const $target=$(event.target);if(this._scrollDisabledElements.length){const scrollingParent=this._getScrollingParent(event,$target);if(scrollingParent.filter(this._scrollDisabledElements).length===0){this.$window.scroll();return}}event.preventDefault();return false}_getScrollingParent(event,$target){const isTouchEvent=event.type==="touchmove";const isKeyDownEvent=event.type==="keydown";const hasTouchStartEvent=this._touchStartEventObject?.originalEvent;if(isTouchEvent&&!hasTouchStartEvent&&!isKeyDownEvent){return $target}const directionY=this._getScrollDirection(event);if(directionY==="none"){return this.$body}const parents=[$target[0],...$target.parents()];for(let i=0,l=parents.length;i0;if(hasScrollingSpace){return true}break}return false}_getScrollDirection(event){const deltaY=this._getScrollDelta(event);if(deltaY===0){return"none"}return deltaY>0?"up":"down"}_getScrollDelta(event){let deltaY=0;const isTouchEvent=event.type==="touchmove";const isKeyDownEvent=event.type==="keydown";const originalEvent=event.originalEvent;if(isTouchEvent){const startOriginalEvent=this._touchStartEventObject.originalEvent;let currentY=originalEvent.pageY;let previousY=startOriginalEvent.pageY;if(currentY===0||currentY===previousY){currentY=originalEvent.touches[0].pageY;previousY=startOriginalEvent.touches[0].pageY}deltaY=currentY-previousY}else if(isKeyDownEvent){deltaY=[33,36,38].includes(event.which)?1:[34,35,40].includes(event.which)?-1:0}else{const hasDeltaY=originalEvent.wheelDeltaY||originalEvent.deltaY!==undefined;if(hasDeltaY){deltaY=-originalEvent.deltaY}else{deltaY=originalEvent.wheelDelta||0}}return deltaY}_stop(){if(!this._isRunning){return}this._isRunning=false}});var WrapFocus=__AMD("core/js/a11y/wrapFocus",class WrapFocus extends Backbone.Controller{initialize({a11y:a11y}){this.a11y=a11y;_.bindAll(this,"_onWrapAround");this.listenTo(Adapt$1,{"accessibility:ready":this._attachEventListeners})}_attachEventListeners(){const config=this.a11y.config;$("body").on("click focus",config._options._focusguard,this._onWrapAround)}_onWrapAround(event){const config=this.a11y.config;if(!config._isEnabled||!config._options._isPopupWrapFocusEnabled){return}event.preventDefault();event.stopPropagation();this.a11y.focusFirst("body",{defer:false})}});var Popup=__AMD("core/js/a11y/popup",class Popup extends Backbone.Controller{initialize({a11y:a11y}){this.a11y=a11y;this._floorStack=[$("body")];this._focusStack=[];this._tabIndexes={};this._ariaHiddens={};this._elementUIDIndex=0;this.listenTo(Adapt$1,{"popup:opened"($element,ignoreInternalTrigger){if(ignoreInternalTrigger){return}this.a11y.log.deprecated('Adapt.trigger("popup:opened", $element) is replaced with a11y.popupOpened($element);');this.opened($element,true)},"popup:closed"($target,ignoreInternalTrigger){if(ignoreInternalTrigger){return}this.a11y.log.deprecated('Adapt.trigger("popup:closed", $target) is replaced with a11y.popupClosed($target);');this.closed($target,true)}})}get isOpen(){return this._floorStack.length>1}get stack(){return this._floorStack.slice(1)}opened($popupElement,silent){$popupElement=$popupElement||$(document.activeElement);this._addPopupLayer($popupElement);if(!silent){Adapt$1.trigger("popup:opened",$popupElement,true)}return this}_addPopupLayer($popupElement){$popupElement=$($popupElement);const config=this.a11y.config;if(!config._isEnabled||!config._options._isPopupManagementEnabled||$popupElement.length===0){return $popupElement}this._floorStack.push($popupElement);this._focusStack.push($(document.activeElement));let $elements=$(config._options._tabbableElements).filter(config._options._tabbableElementsExcludes);const $branch=$popupElement.add($popupElement.parents());const $siblings=$branch.siblings().filter(config._options._tabbableElementsExcludes);$elements=$elements.add($siblings);$elements.each(((index,item)=>{const $item=$(item);if(typeof item.a11y_uid==="undefined"){item.a11y_uid="UID"+ ++this._elementUIDIndex}const elementUID=item.a11y_uid;if(this._tabIndexes[elementUID]===undefined){this._tabIndexes[elementUID]=[]}if(this._ariaHiddens[elementUID]===undefined){this._ariaHiddens[elementUID]=[]}const tabindex=$item.attr("tabindex");const ariaHidden=$item.attr("aria-hidden");this._tabIndexes[elementUID].push(tabindex===undefined?"":tabindex);this._ariaHiddens[elementUID].push(ariaHidden===undefined?"":ariaHidden);if(config._options._isPopupTabIndexManagementEnabled){$item.attr("tabindex",-1)}if(config._options._isPopupAriaHiddenManagementEnabled){$item.attr("aria-hidden",true)}}));const $items=$popupElement.find(config._options._tabbableElements).filter(config._options._tabbableElementsExcludes);if(config._options._isPopupTabIndexManagementEnabled){$items.attr("tabindex",0)}if(config._options._isPopupAriaHiddenManagementEnabled){$items.removeAttr("aria-hidden").removeClass("aria-hidden").parents(config._options._ariaHiddenExcludes).removeAttr("aria-hidden").removeClass("aria-hidden")}}closed($focusElement,silent){const $previousFocusElement=this._removeLastPopupLayer();$focusElement=$focusElement||$previousFocusElement||$("body");if(!silent){Adapt$1.trigger("popup:closed",$focusElement,true)}this.a11y.focusFirst($($focusElement),{preventScroll:true});return this}_removeLastPopupLayer(){const config=this.a11y.config;if(!config._isEnabled||!config._options._isPopupManagementEnabled){return $(document.activeElement)}if(this._floorStack.length<=1){return}this._floorStack.pop();$(config._options._tabbableElements).filter(config._options._tabbableElementsExcludes).each(((index,item)=>{const $item=$(item);let previousTabIndex="";let previousAriaHidden="";if(typeof item.a11y_uid==="undefined"){item.a11y_uid="UID"+ ++this._elementUIDIndex}const elementUID=item.a11y_uid;if(this._tabIndexes[elementUID]?.length){previousTabIndex=this._tabIndexes[elementUID].pop();previousAriaHidden=this._ariaHiddens[elementUID].pop()}if(this._tabIndexes[elementUID]?.length){delete this._tabIndexes[elementUID];delete this._ariaHiddens[elementUID]}if(config._options._isPopupTabIndexManagementEnabled){if(previousTabIndex===""){$item.removeAttr("tabindex")}else{$item.attr({tabindex:previousTabIndex})}}if(config._options._isPopupAriaHiddenManagementEnabled){if(previousAriaHidden===""){$item.removeAttr("aria-hidden")}else{$item.attr({"aria-hidden":previousAriaHidden})}}}));return this._focusStack.pop()}setCloseTo($focusElement){const $original=this._focusStack.pop();this._focusStack.push($focusElement);return $original}});var defaultAriaLevels=__AMD("core/js/enums/defaultAriaLevels",{_menu:1,_menuGroup:2,_menuItem:2,_page:1,_article:2,_block:3,_component:4,_componentItem:5,_notify:1});var deprecated=__AMD("core/js/a11y/deprecated",(function(a11y){Object.assign($.fn,{isFixedPostion(){a11y.log.removed('$("..").isFixedPostion was unneeded and has been removed, let us know if you need it back.');return false},a11y_aria_label(){a11y.log.removed('$("..").a11y_aria_label was incorrect behaviour.');return this},limitedScrollTo(){a11y.log.removed("$.limitedScrollTo had no impact on the screen reader cursor.");return this},a11y_text(){a11y.log.removed("a11y_text is no longer required. https://tink.uk/understanding-screen-reader-interaction-modes/");return this},a11y_selected(){a11y.log.removed('$("..").a11y_selected is removed. Please use aria-live instead.');return this},a11y_on(isOn){a11y.log.deprecated('$("..").a11y_on, use a11y.findTabbable($element); and a11y.toggleAccessible($elements, isAccessible); instead.');const $tabbable=a11y.findTabbable(this);a11y.toggleAccessible($tabbable,isOn);return this},a11y_only(){a11y.log.removed('$("..").a11y_only, use a11y.popupOpened($popupElement); instead.');return this},scrollDisable(){if(a11y.config._options._isScrollDisableEnabled===false){return this}a11y.log.deprecated('$("..").scrollDisable, use a11y.scrollDisable($elements); instead.');a11y.scrollDisable(this);return this},scrollEnable(){if(a11y.config._options._isScrollDisableEnabled===false){return this}a11y.log.deprecated('$("..").scrollEnable, use a11y.scrollEnable($elements); instead.');a11y.scrollEnable(this);return this},a11y_popup(){a11y.log.deprecated('$("..").a11y_popup, use a11y.popupOpened($popupElement); instead.');return a11y.popupOpened(this)},a11y_cntrl(isOn,withDisabled){a11y.log.deprecated('$("..").a11y_cntrl, use a11y.toggleAccessible($elements, isAccessible); and if needed a11y.toggleEnabled($elements, isEnabled); instead.');a11y.toggleAccessible(this,isOn);if(withDisabled)a11y.toggleEnabled(this,isOn);return this},a11y_cntrl_enabled(isOn){a11y.log.deprecated('$("..").a11y_cntrl_enabled, use a11y.toggleAccessibleEnabled($elements, isAccessibleEnabled); instead.');a11y.toggleAccessibleEnabled(this,isOn);return this},isReadable(){a11y.log.deprecated('$("..").isReadable, use a11y.isReadable($element); instead.');return a11y.isReadable(this)},findForward(selector){a11y.log.removed('$("..").findForward has been removed as the use cases are very small, let us know if you need it back.');return a11y._findFirstForward(this,selector)},findWalk(selector){a11y.log.removed('$("..").findWalk has been removed as the use cases are very small, let us know if you need it back.');return a11y._findFindForwardDescendant(this,selector)},focusNoScroll(){a11y.log.deprecated('$("..").focusNoScroll, use a11y.focus($element); instead.');return a11y.focus(this)},focusNext(returnOnly){a11y.log.deprecated('$("..").focusNext, use a11y.focusNext($element); or if needed a11y.findFirstReadable($element); instead.');if(returnOnly){return a11y.findFirstReadable(this)}return a11y.focusNext(this)},focusOrNext(returnOnly){a11y.log.deprecated('$("..").focusOrNext, use a11y.focusFirst($element); or if needed a11y.findFirstReadable($element); or a11y.isReadable($element); instead.');if(returnOnly){if(a11y.isReadable(this))return this;return a11y.findFirstReadable(this)}return a11y.focusFirst(this)},a11y_focus(dontDefer){a11y.log.deprecated('$("..").a11y_focus, use a11y.focusFirst($element, { defer: true }); instead.');a11y.focusFirst(this,{defer:!dontDefer});return this}});Object.assign($,{a11y_alert(){a11y.log.removed("$.a11y_alert is removed. Please use aria-live instead.");return this},a11y_update(){a11y.log.removed("a11y_update is no longer required.");return this},a11y_text(text){a11y.log.removed("a11y_text is no longer required. https://tink.uk/understanding-screen-reader-interaction-modes/");return text},a11y_on(isOn,selector){a11y.log.deprecated('$("..").a11y_on, use a11y.toggleHidden($elements, isHidden); instead.');return a11y.toggleHidden(selector,!isOn)},a11y_popdown($focusTarget){a11y.log.removed("$.a11y_popdown, use a11y.popupClosed($focusTarget); instead.");return a11y.popupClosed($focusTarget)},a11y_focus(dontDefer){a11y.log.deprecated('$.a11y_focus, use a11y.focusFirst("body", { defer: true }); instead.');a11y.focusFirst("body",{defer:!dontDefer});return this},a11y_normalize(html){a11y.log.deprecated('$.a11y_normalize, use a11y.normalize("html"); instead.');return a11y.normalize(html)},a11y_remove_breaks(html){a11y.log.deprecated('$.a11y_remove_breaks, use a11y.removeBreaks("html"); instead.');return a11y.removeBreaks(html)}})}));class Components extends Backbone__default["default"].Controller{initialize(){this._register={};this.register=this.register.bind(this);this.getViewName=this.getViewName.bind(this);this.getViewClass=this.getViewClass.bind(this);this.getModelName=this.getModelName.bind(this);this.getModelClass=this.getModelClass.bind(this)}register(name,object){if(Array.isArray(name)){name.forEach((name=>this.register(name,object)));return object}if(name.split(" ").length>1){this.register(name.split(" "),object);return object}if(!object.view&&!object.model||object instanceof Backbone__default["default"].View){logging$1.deprecated("View-only registrations are no longer supported");object={view:object}}if(object.view&&!object.view.template){object.view.template=name}const isModelSetAndInvalid=object.model&&!(object.model.prototype instanceof Backbone__default["default"].Model)&&!(object.model instanceof Function);if(isModelSetAndInvalid){throw new Error("The registered model is not a Backbone.Model or Function")}const isViewSetAndInvalid=object.view&&!(object.view.prototype instanceof Backbone__default["default"].View)&&!(object.view instanceof Function);if(isViewSetAndInvalid){throw new Error("The registered view is not a Backbone.View or Function")}this._register[name]=Object.assign({},this._register[name],object);return object}getViewName(nameModelViewOrData){if(typeof nameModelViewOrData==="string"){return nameModelViewOrData}if(nameModelViewOrData instanceof Backbone__default["default"].Model){nameModelViewOrData=nameModelViewOrData.toJSON()}if(nameModelViewOrData instanceof Backbone__default["default"].View){let foundName;Object.entries(this._register).forEach((([key,entry])=>{if(!entry?.view)return;if(!(nameModelViewOrData instanceof entry.view))return;foundName=key;return true}));return foundName}if(nameModelViewOrData instanceof Object){const names=[typeof nameModelViewOrData._view==="string"&&nameModelViewOrData._view,typeof nameModelViewOrData._component==="string"&&nameModelViewOrData._component,typeof nameModelViewOrData._type==="string"&&nameModelViewOrData._type].filter(Boolean);if(names.length){const name=names.find((name=>this._register[name]?.view));return name||names.pop()}}throw new Error("Cannot derive view class name from input")}getViewClass(nameModelViewOrData){const name=this.getViewName(nameModelViewOrData);const object=this._register[name];if(!object){logging$1.error(`A view for '${name}' isn't registered in your project`);return}const isBackboneView=object.view?.prototype instanceof Backbone__default["default"].View;if(!isBackboneView&&object.view instanceof Function){return object.view()}return object.view}getModelName(nameModelOrData){if(typeof nameModelOrData==="string"){return nameModelOrData}if(nameModelOrData instanceof Backbone__default["default"].Model){nameModelOrData=nameModelOrData.toJSON()}if(nameModelOrData instanceof Object){const name=nameModelOrData._component;const entry=this._register[name];const isViewOnlyQuestion=entry&&!entry.model&&entry.view?._isQuestionType;if(isViewOnlyQuestion){logging$1.deprecated(`Assuming a question model for a view-only question: ${name}`);return"question"}const names=[typeof nameModelOrData._model==="string"&&nameModelOrData._model,typeof nameModelOrData._component==="string"&&nameModelOrData._component,typeof nameModelOrData._type==="string"&&nameModelOrData._type].filter(Boolean);if(names.length){const name=names.find((name=>this._register[name]?.model));return name||names.pop()}}throw new Error("Cannot derive model class name from input")}getModelClass(nameModelOrData){const name=this.getModelName(nameModelOrData);const object=this._register[name];if(!object){logging$1.error(`A model for '${name}' isn't registered in your project`);return}const isBackboneModel=object.model?.prototype instanceof Backbone__default["default"].Model;if(!isBackboneModel&&object.model instanceof Function){return object.model()}return object.model}}const components=new Components;var components$1=__AMD("core/js/components",components);var AdaptCollection=__AMD("core/js/collections/adaptCollection",class AdaptCollection extends Backbone.Collection{initialize(models,options){this.once("reset",this.loadedData,this)}loadedData(){Adapt$1.trigger("adaptCollection:dataLoaded")}});var BuildModel=__AMD("core/js/models/buildModel",class BuildModel extends LockingModel{defaults(){return{jsonext:"json"}}initialize(attrs,options){this.url=options.url;this.fetch({success:()=>{this.isLoaded=true;Adapt$1.trigger("buildModel:dataLoaded")},error:()=>{console.log("Unable to load adapt/js/build.js");Adapt$1.trigger("buildModel:dataLoaded")}})}isFrameworkVersion(version){return semver__default["default"].satisfies(this.get("package").version,version,{includePrerelease:true})}isPluginInstalled(name,version="*"){const plugin=this.get("plugins").find((plugin=>{if(plugin.name!==name)return false;return semver__default["default"].satisfies(plugin.version,version,{includePrerelease:true})}));return Boolean(plugin)}whenReady(){if(this.isLoaded)return Promise.resolve();return new Promise((resolve=>{Adapt$1.once("buildModel:dataLoaded",resolve)}))}});var ConfigModel=__AMD("core/js/models/configModel",class ConfigModel extends LockingModel{defaults(){return{screenSize:null,_forceRouteLocking:false,_canLoadData:true,_disableAnimation:false}}setValuesFromURLParams(){const paramMappings={dir:"_defaultDirection",lang:"_defaultLanguage"};const params=new URLSearchParams(window.location.search);Object.entries(paramMappings).forEach((([key,value])=>{const passedVal=params.get(key);if(!passedVal)return;if(key==="lang"&&Adapt$1.build.get("availableLanguageNames")?.includes(passedVal)===false)return;this.set(value,passedVal)}))}initialize(attrs,options){this.url=options.url;this.fetch({success:()=>{this.setValuesFromURLParams();Adapt$1.trigger("offlineStorage:prepare");wait$1.queue((()=>{Adapt$1.trigger("configModel:dataLoaded");if(!this.get("_canLoadData"))return;Adapt$1.trigger("configModel:loadCourseData")}))},error:()=>logging$1.error("Unable to load course/config.json")})}loadData(){}});class Data extends AdaptCollection{model(json){const ModelClass=components$1.getModelClass(json);if(!ModelClass){return new LockingModel(json)}return new ModelClass(json,{parse:true})}initialize(){super.initialize();this.findById=this.findById.bind(this);this.findViewByModelId=this.findViewByModelId.bind(this);this.findByTrackingPosition=this.findByTrackingPosition.bind(this);this.on({add:this.onAdded,remove:this.onRemoved})}async init(){this.reset();this._byAdaptID={};Adapt$1.build=new BuildModel(null,{url:"adapt/js/build.min.js",reset:true});await Adapt$1.build.whenReady();$("html").attr("data-adapt-framework-version",Adapt$1.build.get("package").version);this.loadConfigData()}onAdded(model){this._byAdaptID[model.get("_id")]=model}onRemoved(model){delete this._byAdaptID[model.get("_id")]}loadConfigData(){Adapt$1.config=new ConfigModel(null,{url:Adapt$1.build.get("coursedir")+"/config."+Adapt$1.build.get("jsonext"),reset:true});this.listenToOnce(Adapt$1,"configModel:loadCourseData",this.onLoadCourseData);this.listenTo(Adapt$1.config,{"change:_activeLanguage":this.onLanguageChange,"change:_defaultDirection":this.onDirectionChange})}onDirectionChange(model,direction){if(direction==="rtl"){$("html").removeClass("dir-ltr").addClass("dir-rtl").attr("dir","rtl")}else{$("html").removeClass("dir-rtl").addClass("dir-ltr").attr("dir","ltr")}}onLoadCourseData(){if(!Adapt$1.config.get("_activeLanguage")){Adapt$1.config.set("_activeLanguage",Adapt$1.config.get("_defaultLanguage"));return}this.loadCourseData()}async onLanguageChange(model,language){await wait$1.queue();const previousAttributes=model.previousAttributes();const previousLanguage=previousAttributes._activeLanguage;offlineStorage$1.set("lang",language);if(Adapt$1.get("_isStarted")){Adapt$1.set("_isStarted",false)}this.loadCourseData(language,previousLanguage)}async loadCourseData(newLanguage,previousLanguage){const language=Adapt$1.config.get("_activeLanguage");const courseFolder=Adapt$1.build.get("coursedir")+"/"+language+"/";$("html").attr("lang",language);await this.loadManifestFiles(courseFolder);await this.triggerDataLoaded();await this.triggerDataReady(newLanguage,previousLanguage);this.triggerInit()}getJSON(path){return new Promise(((resolve,reject)=>{$.getJSON(path,(data=>{data.__path__=path;resolve(data)})).fail((()=>{reject(new Error(`Unable to load ${path}`))}))}))}async loadManifestFiles(languagePath){this.trigger("loading");this.reset();this._byAdaptID={};const manifestPath=languagePath+"language_data_manifest.js";let manifest;try{manifest=await this.getJSON(manifestPath)}catch(err){manifest=["course.json","contentObjects.json","articles.json","blocks.json","components.json"];logging$1.error(`Manifest path '${manifestPath} not found. Using traditional files: ${manifest.join(", ")}`)}let allFileData;try{allFileData=await Promise.all(manifest.map((filePath=>this.getJSON(`${languagePath}${filePath}`))))}catch(error){logging$1.error(error);return}const allModelData=allFileData.reduce(((result,fileData)=>{if(Array.isArray(fileData)){fileData.forEach(((datum,index)=>{datum.__path__=fileData.__path__;datum.__index__=index}));result.push(...fileData)}else if(fileData instanceof Object){result.push(fileData)}else{logging$1.warnOnce(`File data isn't an array or object: ${fileData.__path__}`)}return result}),[]);const course=allModelData.find((modelData=>modelData._type==="course"));if(!course){throw new Error('Expected a model data with "_type": "course", none found.')}Adapt$1.trigger("courseModel:dataLoading");Adapt$1.course=this.push(course);Adapt$1.trigger("courseModel:dataLoaded");allModelData.forEach((modelData=>{if(modelData._type==="course"){return}try{components$1.getModelName(modelData)}catch(error){logging$1.error(`Failed to load object ${modelData.__path__}${Object.hasOwn(modelData,"__index__")?`[${modelData.__index__}]`:""}`);logging$1.error(error);return}this.push(modelData)}));this.checkData();this.trigger("reset");this.trigger("loaded");await wait$1.queue()}async triggerDataLoaded(){logging$1.debug("Firing app:dataLoaded");try{this.forEach((model=>model.setupModel?.()));Adapt$1.trigger("app:dataLoaded")}catch(e){logging$1.error("Error during app:dataLoading trigger",e)}await wait$1.queue()}async triggerDataReady(newLanguage,previousLanguage){if(newLanguage){Adapt$1.trigger("app:languageChanged",newLanguage,previousLanguage);await wait$1.queue()}logging$1.debug("Firing app:dataReady");try{Adapt$1.trigger("app:dataReady")}catch(e){logging$1.error("Error during app:dataReady trigger",e)}await wait$1.queue()}triggerInit(){this.isReady=true;this.trigger("ready")}whenReady(){if(this.isReady)return Promise.resolve();return new Promise((resolve=>{this.once("ready",resolve)}))}hasId(id){return Boolean(this._byAdaptID[id])}findById(id){const model=this._byAdaptID[id];if(!model){logging$1.warn(`data.findById() unable to find id: ${id}`);return}return model}findViewByModelId(id){const model=this.findById(id);if(!model||!Adapt$1.parentView)return;const idPathToView=[id];const currentLocationId=location$1._currentId;const currentLocationModel=model.getAncestorModels().find((model=>{const modelId=model.get("_id");if(modelId===currentLocationId)return true;idPathToView.unshift(modelId);return false}));if(!currentLocationModel){return logging$1.warn(`data.findViewByModelId() unable to find view for model id: ${id}`)}const foundView=idPathToView.reduce(((view,currentId)=>{if(!view)return null;const childViews=view.getChildViews();return childViews?.find((view=>view.model.get("_id")===currentId))}),Adapt$1.parentView);return foundView}findByTrackingPosition(trackingPosition){const[trackingId,indexInTrackingIdDescendants]=trackingPosition;const trackingIdModel=this.find((model=>model.get("_trackingId")===trackingId));if(!trackingIdModel){logging$1.warn(`data.findByTrackingPosition() unable to find trackingPosition: ${trackingPosition}`);return}if(indexInTrackingIdDescendants>=0){let trackingIdDescendants=[trackingIdModel].concat(trackingIdModel.getAllDescendantModels(true));trackingIdDescendants=trackingIdDescendants.filter((model=>!(model.isTypeGroup("component")&&model.get("_isTrackable")===false)));return trackingIdDescendants[indexInTrackingIdDescendants]}const trackingIdAncestors=trackingIdModel.getAncestorModels();const ancestorDistance=Math.abs(indexInTrackingIdDescendants)-1;return trackingIdAncestors[ancestorDistance]}logReadyError(view){const notReadyDescendants=view.model.getAllDescendantModels(true).filter((model=>!model.get("_isReady")));logging$1.error(`View ${notReadyDescendants.map((model=>`${model.get("_id")} (${model.get("_component")??model.get("_type")})`)).join(", ")} failed to become ready, forcing ready status.`);notReadyDescendants.reverse().forEach((model=>model.set("_isReady",true)))}checkData(){this.checkIds();this.checkTrackingIds()}checkIds(){const items=this.toJSON();const idIndex=___default["default"].indexBy(items,"_id");const idGroups=___default["default"].groupBy(items,"_id");const parentIdGroups=___default["default"].groupBy(items,"_parentId");let orphanedIds={};let emptyIds={};let duplicateIds={};let missingIds={};items.forEach((o=>{const isCourseType=o._type==="course";const isComponentType=o._type==="component";if(idGroups[o._id].length>1){duplicateIds[o._id]=true}if(!isComponentType&&!parentIdGroups[o._id]){emptyIds[o._id]=true}if(!isCourseType&&(!o._parentId||!idIndex[o._parentId])){orphanedIds[o._id]=true}if(!isCourseType&&o._parentId&&!idIndex[o._parentId]){missingIds[o._parentId]=true}}));orphanedIds=Object.keys(orphanedIds);emptyIds=Object.keys(emptyIds);duplicateIds=Object.keys(duplicateIds);missingIds=Object.keys(missingIds);const hasErrored=orphanedIds.length||emptyIds.length||duplicateIds.length||missingIds.length;if(orphanedIds.length){logging$1.error(`Orphaned _ids: ${orphanedIds.join(", ")}`)}if(missingIds.length){logging$1.error(`Missing _ids: ${missingIds.join(", ")}`)}if(emptyIds.length){logging$1.error(`Empty _ids: ${emptyIds.join(", ")}`)}if(duplicateIds.length){logging$1.error(`Duplicate _ids: ${duplicateIds.join(", ")}`)}if(hasErrored){const err=new Error("Oops, looks like you have some json errors.");err.number=10011;throw err}}checkTrackingIds(){const items=this.toJSON();const trackingIdType=Adapt$1.build.get("trackingIdType")||"block";const trackingIdCounts=___default["default"].groupBy(items.filter((item=>item._type===trackingIdType)),"_trackingId");const missingTrackingIds=items.filter((item=>item._type===trackingIdType&&item._trackingId===undefined)).map((item=>item._id));if(missingTrackingIds.length){logging$1.error(`Missing _trackingIds: ${missingTrackingIds.join(", ")}`)}const duplicateTrackingIds=Object.entries(trackingIdCounts).filter((([id,group])=>group.length>1)).map((([id,group])=>`${id}:[${group.map((item=>item._id)).join(", ")}]`));if(duplicateTrackingIds.length){logging$1.error(`Duplicate _trackingIds: ${duplicateTrackingIds.join(", ")}`)}const hasErrored=missingTrackingIds.length||duplicateTrackingIds.length;if(hasErrored){const err=new Error("Oops, looks like you have some json errors with trackingIds.");err.number=10011;throw err}}}const data=new Data;var data$1=__AMD("core/js/data",data);class A11y extends Backbone.Controller{defaults(){return{_isPrefersReducedMotionEnabled:true,_isFocusOutlineKeyboardOnlyEnabled:true,_isFocusOutlineDisabled:false,_isFocusAssignmentEnabled:true,_isFocusOnClickEnabled:true,_isClickDelayedAfterFocusEnabled:false,_isFocusNextOnDisabled:true,_isScrollDisableEnabled:true,_isAriaHiddenManagementEnabled:true,_isPopupManagementEnabled:true,_isPopupWrapFocusEnabled:true,_isPopupAriaHiddenManagementEnabled:true,_isPopupTabIndexManagementEnabled:true,_ariaHiddenExcludes:":not(#wrapper):not(body)",_tabbableElements:"a,button,input,select,textarea,[tabindex]:not([data-a11y-force-focus])",_focusOutlineKeyboardOnlyIgnore:"input,textarea",_tabbableElementsExcludes:":not(.a11y-ignore):not([data-a11y-force-focus])",_focusableElements:"a,button,input,select,textarea,[tabindex],label",_readableElements:"[role=heading],[aria-label],[aria-labelledby],[alt]",_focusForwardElementsExcludes:":not([aria-labelledby][role=dialog],[aria-labelledby][role=main],[aria-labelledby][role=region],[aria-labelledby][role=radiogroup],[aria-labelledby][role=group],[aria-labelledby][role=tablist],[aria-labelledby][role=list],[aria-labelledby][role=tree],[aria-labelledby][role=treegrid],[aria-labelledby][role=table],[aria-labelledby][role=grid][aria-labelledby],[role=menu],[aria-labelledby][role=rowgroup])",_focusguard:".a11y-focusguard",_wrapStyleElements:"b,i,abbr,strong,em,small,sub,sup,ins,del,mark,zw,nb",_arrowElements:"input[type=radio]",_warnFirstOnly:true,_warn:true}}initialize(){this.isFocusable=this.isFocusable.bind(this);this.isReadable=this.isReadable.bind(this);this.isTabbable=this.isTabbable.bind(this);this.$html=$("html");this._htmlCharRegex=/&.*;/g;this.config=null;this._browserConfig=new BrowserConfig({a11y:this});this._browserFocus=new BrowserFocus({a11y:this});this._keyboardFocusOutline=new KeyboardFocusOutline({a11y:this});this._wrapFocus=new WrapFocus({a11y:this});this._popup=new Popup({a11y:this});this._scroll=new Scroll({a11y:this});this._isForcedFocus=false;this.log=new Log({a11y:this});deprecated(this);this._removeLegacyElements();this.listenToOnce(Adapt$1,{"configModel:dataLoaded":this._onConfigDataLoaded,"navigationView:postRender":this._removeLegacyElements},this);Adapt$1.on("device:changed",this._setupNoSelect);this.listenTo(Adapt$1,{"router:location":this._onNavigationStart,"contentObjectView:ready router:plugin":this._onNavigationEnd})}_onConfigDataLoaded(){this.config=Adapt$1.config.get("_accessibility");this.config._isActive=false;this.config._options=_.defaults(this.config._options||{},this.defaults());offlineStorage$1.set("a11y",false);this.$html.toggleClass("has-accessibility",this.isEnabled());this._setupNoSelect();this._addFocuserDiv();if(this._isReady){return}this._isReady=true;Adapt$1.trigger("accessibility:ready")}_setupNoSelect(){if(!this.config?._disableTextSelectOnClasses){return}const classes=this.config._disableTextSelectOnClasses.split(" ");const isMatch=classes.some((className=>this.$html.is(className)));this.$html.toggleClass("u-no-select",isMatch)}_addFocuserDiv(){if($("#a11y-focuser").length){return}$("body").append($('
 
'))}_removeLegacyElements(){const $legacyElements=$("body").children("#accessibility-toggle, #accessibility-instructions");const $navigationElements=$(".nav").find("#accessibility-toggle, #accessibility-instructions");if(!$legacyElements.length&&!$navigationElements.length){return}logging$1.warn("REMOVED: #accessibility-toggle and #accessibility-instructions have been removed. Please remove them from all of your .html files.");$legacyElements.remove();$navigationElements.remove()}_onNavigationStart(){if(!this.isEnabled()){return}_.defer((()=>this.toggleHidden(".contentobject",true)))}_onNavigationEnd(view){if(view?.model?.get("_id")!==location$1._currentId||!this.isEnabled()){return}this.toggleHidden(".contentobject",false)}isActive(){this.log.removed("Accessibility is now always active when enabled. Please unify your user experiences.");return false}isEnabled(){return this.config?._isEnabled}ariaLevel({id:id=null,level:level="1",override:override=null}={}){if(arguments.length===2){level=arguments[0];override=arguments[1];id=null}const ariaLevels=Adapt$1.config.get("_accessibility")?._ariaLevels??defaultAriaLevels;if(override===0)override=null;function calculateLevel(id=null,level,offset=0){const isNumber=!isNaN(level);const isTypeName=/[a-zA-z]/.test(level);if(!isTypeName&&isNumber){return parseInt(level)+offset}const relativeDescriptor=Adapt$1.parseRelativeString(level);const nextLevel=ariaLevels?.["_"+relativeDescriptor.type];const hasModelId=Boolean(id);if(!hasModelId){logging$1.warnOnce("Cannot calculate appropriate heading level, no model id was specified");return calculateLevel(id,nextLevel,offset+relativeDescriptor.offset)}const nextModel=data$1.findById(id)?.findAncestor(relativeDescriptor.type?.toLowerCase())??data$1.findById(id);const nextModelId=nextModel?.get("_id")??id;const hasNextTitle=Boolean(nextModel.get("displayTitle"));let nextModelOverride=nextModel.get("_ariaLevel");if(nextModelOverride===0)nextModelOverride=null;const accumulatedOffset=offset+(hasNextTitle?relativeDescriptor.offset:0);const resolvedLevel=nextModelOverride??nextLevel;return calculateLevel(nextModelId,resolvedLevel,accumulatedOffset)}return calculateLevel(id,override??level)}toggleHidden($elements,isHidden=true){$elements=$($elements);const config=this.config;if(!config._isEnabled||!config._options._isAriaHiddenManagementEnabled){return this}if(isHidden===true){$elements.attr("aria-hidden",true)}else{$elements.removeAttr("aria-hidden")}return this}toggleAccessibleEnabled($elements,isAccessibleEnabled){this.toggleAccessible($elements,isAccessibleEnabled);this.toggleEnabled($elements,isAccessibleEnabled);return this}toggleAccessible($elements,isReadable=true){$elements=$($elements);const config=this.config;if(!config._isEnabled||!config._options._isAriaHiddenManagementEnabled||$elements.length===0){return this}if(!isReadable){$elements.attr({tabindex:"-1","aria-hidden":"true"}).addClass("aria-hidden")}else{$elements.removeAttr("aria-hidden tabindex").removeClass("aria-hidden");$elements.parents(config._options._ariaHiddenExcludes).removeAttr("aria-hidden").removeClass("aria-hidden")}return this}toggleEnabled($elements,isEnabled=true){$elements=$($elements);if($elements.length===0){return this}if(!isEnabled){$elements.attr({"aria-disabled":"true"}).addClass("is-disabled")}else{$elements.removeAttr("aria-disabled").removeClass("is-disabled")}return this}toggleTabbableDescendants($element,isTabbable=true){const $tabbable=this.findTabbable($element);if(!isTabbable){$tabbable.each(((index,element)=>{if(element.isAdaptTabHidden)return;const $element=$(element);element.isAdaptTabHidden=true;element.adaptPreviousTabIndex=$element.attr("tabindex")??null;$element.attr("tabindex",-1)}));return this}$tabbable.each(((index,element)=>{if(!element.isAdaptTabHidden)return;const $element=$(element);if(element.adaptPreviousTabIndex===null)$element.removeAttr("tabindex");else $element.attr("tabindex",element.adaptPreviousTabIndex);delete element.isAdaptTabHidden;delete element.adaptPreviousTabIndex}));return this}findFirstTabbable($element){$element=$($element).first();return this._findFirstForward($element,this.isTabbable)}findFirstReadable($element){$element=$($element).first();return this._findFirstForward($element,this.isReadable)}findFirstFocusable($element){$element=$($element).first();return this._findFirstForward($element,this.isFocusable)}findTabbable($element){const config=this.config;return $($element).find(config._options._tabbableElements).filter(config._options._tabbableElementsExcludes)}findReadable($element){return $($element).find("*").filter(((index,element)=>this.isReadable(element)))}findFocusable($element){return $($element).find("*").filter(((index,element)=>this.isFocusable(element)))}isTabbable($element){const config=this.config;const value=$($element).is(config._options._tabbableElements).is(config._options._tabbableElementsExcludes);if(!value){return null}return value}isReadable($element,checkParents=true){const config=this.config;$element=$($element).first();const $branch=checkParents?$element.add($element.parents()):$element;const isInDOM=Boolean($element.parents("body").length);if(!isInDOM)return false;const isNotVisible=$branch.toArray().some((item=>{const style=window.getComputedStyle(item);return style.display==="none"||style.visibility==="hidden"||item.getAttribute("aria-hidden")==="true"}));if(isNotVisible){return false}const hasReadableContent=!/^\s*$/.test($element.text())||!/^\s*$/.test($element.attr("aria-label")??"")||!/^\s*$/.test($element.attr("aria-labelledby")??"");const hasNativeFocusOrIsScreenReadable=($element.is(config._options._focusableElements)||$element.is(config._options._readableElements))&&hasReadableContent;if(hasNativeFocusOrIsScreenReadable){return true}const childNodes=$element[0].childNodes;for(let c=0,cl=childNodes.length;c{const $sibling=$(sibling);const value=iterator($sibling);if(value===false){return false}if(value){$found=$sibling;return true}$found=this._findFirstForwardDescendant($sibling,iterator);return Boolean($found.length)}));if($found.length){return $found}$element.add($element.parents()).toArray().reverse().some((parent=>{const $parent=$(parent);if(iterator($parent)===false){return false}return $parent.nextAll().toArray().some((sibling=>{const $sibling=$(sibling);const value=iterator($sibling);if(value===false){return false}if(value){$found=$sibling;return true}$found=this._findFirstForwardDescendant($sibling,iterator);return Boolean($found.length)}))}));if(!$found.length){return $element.not("*")}return $found}_findFirstForwardDescendant($element,selector){$element=$($element).first();let iterator;switch(typeof selector){case"string":iterator=function($tag){return $tag.is(selector)||undefined};break;case"function":iterator=selector;break;case"undefined":iterator=Boolean}const $notFound=$element.not("*");if($element.length===0){return $notFound}const stack=[{item:$element[0],value:undefined}];let stackIndexPosition=0;let childIndexPosition=stackIndexPosition+1;do{const stackEntry=stack[stackIndexPosition];const $stackItem=$(stackEntry.item);switch(stackEntry.value){case true:return $stackItem;case false:return $notFound}$stackItem.children().toArray().forEach((item=>{const $item=$(item);const value=iterator($item);if(value===false){return}stack.splice(childIndexPosition++,0,{item:item,value:value})}));stackIndexPosition++;childIndexPosition=stackIndexPosition+1}while(stackIndexPosition{if($element.attr("tabindex")===undefined){$element.attr({tabindex:"0","data-a11y-force-focus":"true"})}if(options.preventScroll){const y=$(window).scrollTop();try{this._isForcedFocus=true;$element[0].focus({preventScroll:true});this._isForcedFocus=false}catch(e){}switch(device$1.browser){case"internet explorer":case"microsoft edge":case"safari":window.scrollTo(null,y)}}else{this._isForcedFocus=true;$element[0].focus();this._isForcedFocus=false}};if(options.defer){_.defer(perform)}else{perform()}return this}get isForcedFocus(){return this._isForcedFocus}normalize(htmls){htmls=[...arguments].filter(Boolean).filter(_.isString).join(" ");const text=$("
"+htmls+"
").text();return text.replace(this._htmlCharRegex,"")}removeBreaks(htmls){htmls=[...arguments].filter(Boolean).filter(_.isString).join(" ");const $div=$("
"+htmls+"
");const stack=[$div[0]];let stackIndex=0;const outputs=[];do{if(stack[stackIndex].childNodes.length){const nodes=stack[stackIndex].childNodes;const usable=nodes.filter((node=>{const isTextNode=node.nodeType===3;if(isTextNode){return true}const isStyleElement=$(node).is(this.config._options._wrapStyleElements);if(isStyleElement){return true}return false}));outputs.push.apply(outputs,usable);stack.push.apply(stack,nodes)}stackIndex++}while(stackIndex{this.addShadowEvent();$(".js-nav-drawer-btn").attr("aria-expanded",true);Adapt$1.trigger("drawer:opened");a11y$1.focusFirst(this.$el,{defer:true})};if(this.disableAnimation){this.$el.css(direction);complete()}else{const easing=Adapt$1.config.get("_drawer")?._showEasing||"easeOutQuart";this.$el.velocity(direction,this.drawerDuration,easing);$(".js-shadow").velocity({opacity:1},{duration:this.drawerDuration,begin:()=>{complete()}})}}emptyDrawer(){this.$(".drawer__holder").empty()}renderItems(){Adapt$1.trigger("drawer:empty");this.emptyDrawer();const isList=this.collection.length>1;if(isList)this.$(".js-drawer-holder").attr("role","list");else this.$(".js-drawer-holder").removeAttr("role");this.collection.forEach((model=>new DrawerItemView$1({model:model})))}hideDrawer($toElement){if(!this._isVisible)return;this._useMenuPosition=false;const direction={};a11y$1.popupClosed($toElement);this._isVisible=false;a11y$1.scrollEnable("body");direction[this.drawerAnimationDir]=-this.$el.width();const complete=()=>{this.$el.removeAttr("style").addClass("u-display-none").attr("aria-hidden","true").attr("aria-expanded","false");this.$(".js-drawer-holder").removeAttr("role");this._customView=null;$(".js-nav-drawer-btn").attr("aria-expanded",false);Adapt$1.trigger("drawer:closed");this.setDrawerPosition(this._globalDrawerPosition)};if(this.disableAnimation){this.$el.css(direction);$(".js-shadow").addClass("u-display-none");complete()}else{const easing=Adapt$1.config.get("_drawer")?._hideEasing||"easeInQuart";this.$el.velocity(direction,this.drawerDuration,easing,(()=>{complete()}));$(".js-shadow").velocity({opacity:0},{duration:this.drawerDuration,complete(){$(".js-shadow").addClass("u-display-none")}})}this._isCustomViewVisible=false;this.removeShadowEvent()}addShadowEvent(){$(".js-shadow").one("click touchstart",(()=>this.hideDrawer()))}removeShadowEvent(){$(".js-shadow").off("click touchstart")}remove(){this.hideDrawer();super.remove();$(window).off("keyup",this.onKeyUp);Adapt$1.trigger("drawer:empty");this.collection.reset();$(".js-shadow").remove()}}Object.assign(DrawerView,{childContainer:".js-drawer-holder",childView:DrawerItemView$1});var DrawerView$1=__AMD("core/js/views/drawerView",DrawerView);var TemplateRenderEvent=__AMD("core/js/templateRenderEvent",class TemplateRenderEvent{constructor(type,name,mode,value,args){this.type=type;this.name=name;this.mode=mode;this.value=value;this.args=args}});var register=__AMD("core/js/reactHelpers",(function register(name,component){templates[name]=(...args)=>{const mode="reactTemplate";const preRenderEvent=new TemplateRenderEvent(`${mode}:preRender`,name,mode,null,args);Adapt$1.trigger(preRenderEvent.type,preRenderEvent);const value=component(...preRenderEvent.args);const postRenderEvent=new TemplateRenderEvent(`${mode}:postRender`,name,mode,value,preRenderEvent.args);Adapt$1.trigger(postRenderEvent.type,postRenderEvent);return postRenderEvent.value}}));(function(){const original=React__default["default"].createElement;React__default["default"].createElement=(...args)=>{const name=args[0];const mode="reactElement";const preRenderEvent=new TemplateRenderEvent(`${mode}:preRender`,name,mode,null,args);Adapt$1.trigger(preRenderEvent.type,preRenderEvent);const value=original(...preRenderEvent.args);const postRenderEvent=new TemplateRenderEvent(`${mode}:postRender`,name,mode,value,preRenderEvent.args);Adapt$1.trigger(postRenderEvent.type,postRenderEvent);return postRenderEvent.value}})();const templates={};function html(html){if(!html)return;logging$1.deprecated("reactHelpers.html please use react dangerouslySetInnerHTML instead: https://reactjs.org/docs/dom-elements.html#dangerouslysetinnerhtml");return{__html:html}}function compile(template,...args){const output=Handlebars.compile(template)(...args);return output}function classes(...args){return _.uniq(_.flatten(args).filter(Boolean).join(" ").split(" ")).join(" ")}function prefixClasses(prefixes,...args){const classes=_.flatten(args).filter(Boolean);const prefixed=_.flatten(prefixes.map((prefix=>classes.map((className=>`${prefix}${className}`)))));return _.uniq(prefixed.join(" ").split(" ")).join(" ")}const FIRST_PASS=1;const SECOND_PASS=2;const THIRD_PASS=3;var TooltipItemView=__AMD("core/js/views/TooltipItemView",class TooltipItemView extends Backbone.View{className(){return["tooltip",this.model.get("isTargetFixedPosition")&&"is-fixed",this.model.get("tooltipClasses")||"is-vertical-axis is-arrow-middle is-bottom is-middle",this.model.get("isShown")&&"is-shown",this.model.get("_classes")].filter(Boolean).join(" ")}attributes(){return{id:`tooltip-${this.model.get("_id")}`,style:Object.entries(this.model.get("tooltipStyles")??{}).map((([name,value])=>`${name}: ${value};`)).join(" ")}}updateViewProperties(){const classesToAdd=_.result(this,"className").trim().split(/\s+/);classesToAdd.forEach((i=>this._classSet.add(i)));const classesToRemove=[...this._classSet].filter((i=>!classesToAdd.includes(i)));classesToRemove.forEach((i=>this._classSet.delete(i)));this._setAttributes({..._.result(this,"attributes"),id:_.result(this,"id")});this.$el.removeClass(classesToRemove).addClass(classesToAdd)}initialize({$target:$target,parent:parent}){_.bindAll(this,"onDeviceResize","onMouseOut","doSubsequentPasses");this._classSet=new Set(_.result(this,"className").trim().split(/\s+/));this.$target=$target;this.parent=parent;this.$target.attr("aria-describedby",`tooltip-${this.model.get("_id")}`);this.model.set("ariaLabel",this.$target.attr("aria-label")||this.$target.find(".aria-label").text());this.listenTo(Adapt$1,"device:resize",this.onDeviceResize);$(document).on("mouseleave blur","[data-tooltip-id]",this.onMouseOut);this.doFirstPass();setTimeout(this.doSubsequentPasses,17)}get environment(){const navigationAlignment=Adapt$1.course.get("_navigation")?._navigationAlignment??"top";const navHeight=$(".nav").outerHeight(true);const $target=this.$target;return{position:this.model.get("_position")||"outside bottom middle right",isDisabled:$target.attr("aria-disabled")!==undefined||$target.hasClass("is-disabled")||$target.is(":disabled"),isTargetFixedPosition:Boolean(this.$target.add(this.$target.parents()).filter(((index,el)=>$(el).css("position")==="fixed")).length),isRTL:Adapt$1.config.get("_defaultDirection")==="rtl",topNavOffset:navigationAlignment==="top"?navHeight:0,bottomNavOffset:navigationAlignment==="bottom"?navHeight:0,targetDOMRect:$target[0]?.getBoundingClientRect(),clientDOMRect:{width:parseInt(getComputedStyle(document.body).width),height:$("html")[0].clientHeight},tooltipDOMRect:this.$(".tooltip__body")[0]?.getBoundingClientRect(),arrowDOMRect:this.$(".tooltip__arrow")[0]?.getBoundingClientRect(),ariaHidden:document.activeElement===this.$target[0]}}doFirstPass(){this.model.set("isShown",false);const environment=this.environment;const positions=position(environment,{},FIRST_PASS);const{isDisabled:isDisabled,isTargetFixedPosition:isTargetFixedPosition,ariaHidden:ariaHidden}=environment;this.model.set({isDisabled:isDisabled,isTargetFixedPosition:isTargetFixedPosition,ariaHidden:ariaHidden,...positions});this.render()}doSubsequentPasses(){if(!this.model)return;this.model.set("hasLoaded",true);const multipassCache={};for(let pass=SECOND_PASS,l=THIRD_PASS;pass<=l;pass++){const environment=this.environment;const positions=position(this.environment,multipassCache,pass);const{isDisabled:isDisabled,isTargetFixedPosition:isTargetFixedPosition,ariaHidden:ariaHidden}=environment;this.model.set({isDisabled:isDisabled,isTargetFixedPosition:isTargetFixedPosition,ariaHidden:ariaHidden,...positions});this.render()}this.model.set("isShown",true);this.render()}render(){if(!this.model)return;const Template=templates.tooltip;this.updateViewProperties();ReactDOM__default["default"].render(React__default["default"].createElement(Template,this.model.toJSON()),this.el)}onDeviceResize(){this.remove()}onMouseOut(){this.remove()}remove(){if(this.$el.hasClass("test"))return;this.stopListening(Adapt$1);$(document).off("mouseleave blur","[data-tooltip-id]",this.onMouseOut);this.model?.set("isShown",false);this.render();this.model=null;this.$target=null;if(this.$target)this.$target.removeAttr("aria-describedby");const rem=super.remove.bind(this);setTimeout((()=>{rem();this.parent.removeItem(this)}),1e3)}});function fetchCSSVariables(){const computed=getComputedStyle(document.documentElement);return{offset:lengthToPx("@tooltip-offset",computed.getPropertyValue("--adapt-tooltip-offset")),distance:lengthToPx("@tooltip-distance",computed.getPropertyValue("--adapt-tooltip-distance")),viewPortPadding:lengthToPx("@tooltip-viewport-padding",computed.getPropertyValue("--adapt-tooltip-viewport-padding"))}}function lengthToPx(name,length){const unit=String(length).replaceAll(/[\d.]+/g,"").trim();const value=parseFloat(length);if(unit==="rem")return value*parseInt(getComputedStyle(document.body).fontSize);if(unit==="px")return value;throw new Error(`Cannot convert ${name} ${length} to pixels`)}function parseRelativePosition({position:position}){function fixConditions(positions,item1,item2,type){positions=positions.slice(0);const indexOf1=positions.indexOf(item1);const indexOf2=positions.indexOf(item2);let has1=indexOf1!==-1;let has2=indexOf2!==-1;let assume3=false;let specifiedAtIndex=null;if(has1&&has2){const isItem1=has1{if(index<=specifiedAtIndex)return true;return item!==item1&&item!==item2}))}const hasSpecified=has1||has2;return[positions,has1,has2,assume3,hasSpecified,specifiedAtIndex]}position=position.toLowerCase().split(" ").filter(Boolean).join(" ");let positions=position.split(" ");let isArrowStart=null;let isArrowEnd=null;let isArrowMiddle=null;let isTop=null;let isCenter=null;let isBottom=null;let isLeft=null;let isMiddle=null;let isRight=null;let isOutside=null;let isInside=null;let isAreaAuto=null;let hasArrowSpecified=null;let hasVerticalSpecified=null;let verticalIndex=null;let hasHorizontalSpecified=null;let horizontalIndex=null;[positions,isOutside,isInside,isAreaAuto]=fixConditions(positions,"outside","inside","area");if(isAreaAuto)positions.unshift("area");[positions,isArrowStart,isArrowEnd,isArrowMiddle,hasArrowSpecified]=fixConditions(positions,"start","end","arrow");[positions,isTop,isBottom,isCenter,hasVerticalSpecified,verticalIndex]=fixConditions(positions,"top","bottom","vertical");[positions,isLeft,isRight,isMiddle,hasHorizontalSpecified,horizontalIndex]=fixConditions(positions,"left","right","horizontal");if(positions.length>4){positions.length=4}if(positions.length<4){const start=positions.length;positions.length=4;positions.fill("auto",start)}let specifiedCount=[hasArrowSpecified,hasHorizontalSpecified,hasVerticalSpecified].reduce(((sum,bool)=>sum+(bool?1:0)),0);let wasVerticalFilled=false;let wasHorizontalFilled=false;let wasArrowFilled=false;while(true){let isAuto=false;const indexOfMiddle=positions.indexOf("middle");const indexOfAuto=positions.indexOf("auto");const hasMiddleSpecified=indexOfMiddle!==-1;const hasAutoSpecified=indexOfAuto!==-1;let indexOf;let hasValue=false;if(hasMiddleSpecified&&hasAutoSpecified){isAuto=indexOfAuto=THIRD_PASS){({isOutside:isOutside,isInside:isInside,isVerticalAxis:isVerticalAxis,isHorizontalAxis:isHorizontalAxis,isLeft:isLeft,isMiddle:isMiddle,isRight:isRight,isFillWidth:isFillWidth=false,isTop:isTop,isCenter:isCenter,isBottom:isBottom,isFillHeight:isFillHeight=false}=multipassCache)}let isSnapTop=false;let isSnapLeft=false;let isSnapBottom=false;let isSnapRight=false;let isArrowSnap=false;const tooltipStyles={};if(pass>=SECOND_PASS){const tooltipDistRect=convertToDistanceRect(tooltipDOMRect,clientDOMRect);const arrowDistRect=convertToDistanceRect(arrowDOMRect,clientDOMRect);const constrainedTargetDistRect=constrainDimensions(targetDistRect,viewPortPadding,isTargetFixedPosition,topNavOffset,bottomNavOffset);const constrainedTooltipDistRect=constrainDimensions(tooltipDistRect,viewPortPadding,isTargetFixedPosition,topNavOffset,bottomNavOffset);const constrainedArrowDistRect=constrainDimensions(arrowDistRect,viewPortPadding,isTargetFixedPosition,topNavOffset,bottomNavOffset);const overallHeight=isOutside&&isVerticalAxis?constrainedTooltipDistRect.height+constrainedArrowDistRect.height+distance:constrainedTooltipDistRect.height;const overallWidth=isOutside&&isHorizontalAxis?constrainedTooltipDistRect.width+constrainedArrowDistRect.width+distance:constrainedTooltipDistRect.width;const isOverflowTop=constrainedTooltipDistRect.top<0;const isOverflowBottom=constrainedTooltipDistRect.bottom<0;const isOverflowLeft=constrainedTooltipDistRect.left<0;const isOverflowRight=constrainedTooltipDistRect.right<0;const isOverflowHorizontal=isOverflowLeft||isOverflowRight;const isOverflowVertical=isOverflowTop||isOverflowBottom;const isOverflow=isOverflowHorizontal||isOverflowVertical;const tooltipArea=overallHeight*overallWidth;const topArea=constrainedTargetDistRect.top*constrainedClientDistRect.width;const bottomArea=constrainedTargetDistRect.bottom*constrainedClientDistRect.width;const leftArea=constrainedTargetDistRect.left*constrainedClientDistRect.height;const rightArea=constrainedTargetDistRect.right*constrainedClientDistRect.height;const maxHorizontalArea=Math.max(leftArea,rightArea);const maxVerticalArea=Math.max(topArea,bottomArea);const isVerticalAreaLarger=maxVerticalArea>=maxHorizontalArea;const isHorizontalAreaLarger=maxHorizontalArea>=maxVerticalArea;const canFitWidthLength=isVerticalAxis?overallWidth<=constrainedClientDistRect.width:overallWidth<=constrainedTargetDistRect.left||overallWidth<=constrainedTargetDistRect.right;const canFitHeightLength=isHorizontalAxis?overallHeight<=constrainedClientDistRect.height:overallHeight<=constrainedTargetDistRect.top||overallHeight<=constrainedTargetDistRect.bottom;const canFitInLeftArea=tooltipArea=constrainedTargetDistRect.bottom;isBottom=constrainedTargetDistRect.top=constrainedTargetDistRect.right,isRTL);isRight=invertRTL(constrainedTargetDistRect.left=2){Object.assign(multipassCache,{isOutside:isOutside,isInside:isInside,isVerticalAxis:isVerticalAxis,isHorizontalAxis:isHorizontalAxis,isLeft:isLeft,isMiddle:isMiddle,isRight:isRight,isFillWidth:isFillWidth,isTop:isTop,isCenter:isCenter,isBottom:isBottom,isFillHeight:isFillHeight})}}const tooltipClasses=[isOutside&&"is-outside",isInside&&"is-inside",isArrowSnap&&"is-arrow-snap",isVerticalAxis&&"is-vertical-axis",isHorizontalAxis&&"is-horizontal-axis",isLeft&&"is-left",isMiddle&&"is-middle",isRight&&"is-right",isFillWidth&&"is-fill-width",isSnapLeft&&"is-snap-left",isSnapRight&&"is-snap-right",isTop&&"is-top",isCenter&&"is-center",isBottom&&"is-bottom",isFillHeight&&"is-fill-height",isSnapTop&&"is-snap-top",isSnapBottom&&"is-snap-bottom",isArrowStart&&"is-arrow-start",isArrowMiddle&&"is-arrow-middle",isArrowEnd&&"is-arrow-end"].filter(Boolean).join(" ");const{scrollOffsetLeft:scrollOffsetLeft,scrollOffsetTop:scrollOffsetTop}=calculateScrollOffset({isTargetFixedPosition:isTargetFixedPosition});Object.assign(tooltipStyles,{"--adapt-tooltip-viewport-constrained-height":`${constrainedClientDistRect.height}px`,"--adapt-tooltip-viewport-constrained-width":`${constrainedClientDistRect.width}px`,"--adapt-tooltip-scroll-top":`${scrollOffsetTop}px`,"--adapt-tooltip-scroll-left":`${scrollOffsetLeft}px`,"--adapt-tooltip-target-position-top":`${targetDistRect.top}px`,"--adapt-tooltip-target-position-left":`${targetDistRect.left}px`,"--adapt-tooltip-target-position-width":`${targetDistRect.width}px`,"--adapt-tooltip-target-position-height":`${targetDistRect.height}px`});return{tooltipClasses:tooltipClasses,tooltipStyles:tooltipStyles}}var TooltipItemModel=__AMD("core/js/models/TooltipItemModel",class TooltipItemModel extends Backbone__default["default"].Model{defaults(){return{...Adapt$1.course.get("_tooltips")||{},_id:null,_isEnabled:true,_classes:"",disabledText:"{{text}}",text:""}}});var TooltipView=__AMD("core/js/views/TooltipView",class TooltipView extends Backbone.View{className(){return"tooltip__container"}attributes(){return{role:"region","aria-live":"assertive"}}initialize(){_.bindAll(this,"onMouseOver","onKeyDown","onMouseOut","onClick");this._tooltipData={};this._tooltips=[];this.listenToOnce(Adapt$1,"adapt:preInitialize",this.onAdaptPreInitialize);this.render()}onAdaptPreInitialize(){if(this.config?._isEnabled===false)return;this.onMouseOver=_.debounce(this.onMouseOver,500);$(document).on("keydown",this.onKeyDown);$(document).on("focus","[data-tooltip-id]",((...args)=>{if(a11y$1.isForcedFocus)return;this.onMouseOver(...args)}));$(document).on("mouseenter","[data-tooltip-id]",this.onMouseOver);$(document).on("mouseleave blur","[data-tooltip-id]",this.onMouseOut);$(document).on("click","[data-tooltip-id]",this.onClick)}get config(){return{_position:"outside bottom middle right",...Adapt$1.course.get("_tooltips")}}onKeyDown(event){if(event.key!=="Escape")return;this.hide()}onMouseOver(event){const $mouseoverEl=$(event.currentTarget);if(!a11y$1.isFocusable($mouseoverEl))return;const id=$mouseoverEl.data("tooltip-id");if(this._currentId===id&&event.name==="focusin")return;this._currentId=id;const tooltip=this.getTooltip(id);if(!tooltip?.get("_isEnabled"))return this.hide();if(event.ctrlKey&&this.config._allowTest){this.showTest(tooltip,$mouseoverEl)}else{this.show(tooltip,$mouseoverEl)}$(document).on("scroll",this.onScroll)}onMouseOut(){this.onMouseOver.cancel()}onClick(){this.hide()}render(){this.$el.appendTo("body")}show(tooltip,$mouseoverEl){if(this.isShowing(tooltip))return;const tooltipItem=new TooltipItemView({model:tooltip,$target:$mouseoverEl,parent:this});this._tooltips.push(tooltipItem);this.$el.append(tooltipItem.$el)}isShowing(tooltip){const id=tooltip.get("_id");return this._tooltips.some((tooltipView=>tooltipView.model?.get("_id")===id))}hide(tooltipItem=null){tooltipItem=tooltipItem??this._tooltips.pop();this.removeItem(tooltipItem);if(!tooltipItem)return;tooltipItem.remove()}removeItem(tooltipItem){const currentIndex=this._tooltips.findIndex((item=>tooltipItem===item));if(currentIndex===-1)return;this._tooltips.splice(currentIndex,1)}register(tooltipData){if(!tooltipData._id)return logging$1.warn("Tooltip cannot be registered with no id");this._tooltipData[tooltipData._id]=new TooltipItemModel(tooltipData)}getTooltip(id){return this._tooltipData[id]}showTest(tooltip,$target){const produce=parts=>{const lastIndex=parts.length-1;const partIndex=new Array(parts.length).fill(0);const tooltips=[];const json=tooltip.toJSON();while(true){const position=parts.map(((part,index)=>part[partIndex[index]])).join(" ");tooltips.push(new TooltipItemModel({...json,disabledText:`D ${position}`,text:`T ${position}`,_position:position,_classes:"test"}));for(let i=lastIndex;i>=0;i--){partIndex[i]+=1;if(partIndex[i]=parts[0].length)break}tooltips.forEach((model=>{const tooltipItem=new TooltipItemView({model:model,$target:$target,parent:this});this._tooltips.push(tooltipItem);this.$el.append(tooltipItem.$el)}))};const areaOutside=["outside"];const areaInside=["inside"];const arrowPosition=["middle","start","end",""];const vertical=["middle","top","bottom",""];const horizontal=["middle","right","left",""];const partsVertical=[areaOutside,vertical,arrowPosition,horizontal];const partsHorizontal=[areaOutside,horizontal,arrowPosition,vertical];const partsVerticalInside=[areaInside,vertical,arrowPosition,horizontal];const partsHorizontalInside=[areaInside,horizontal,arrowPosition,vertical];produce(partsVertical);produce(partsHorizontal);produce(partsVerticalInside);produce(partsHorizontalInside)}});const tooltips=new TooltipView;var tooltips$1=__AMD("core/js/tooltips",tooltips);const DrawerCollection=new Backbone__default["default"].Collection(null,{comparator:"drawerOrder"});class Drawer extends Backbone__default["default"].Controller{initialize(){this.listenTo(Adapt$1,{"adapt:start":this.onAdaptStart,"app:languageChanged":this.onLanguageChanged,"navigation:toggleDrawer":this.toggle})}onAdaptStart(){this._drawerView=new DrawerView$1({collection:DrawerCollection})}onLanguageChanged(){tooltips$1.register({_id:"drawer",...Adapt$1.course.get("_globals")?._extensions?._drawer?._navTooltip||{}});this.remove()}toggle(){this.isOpen?this.close():this.open()}get isOpen(){return this._drawerView?.isOpen??false}open(){this._drawerView?.showDrawer(true)}openCustomView(view,hasBackButton,position){this._drawerView?.openCustomView(view,hasBackButton,position)}addItem(drawerObject,eventCallback){if(this.hasItem(eventCallback)){DrawerCollection.remove(DrawerCollection.find((item=>item.eventCallback===eventCallback)))}drawerObject.eventCallback=eventCallback;DrawerCollection.add(drawerObject)}hasItem(eventCallback){return Boolean(DrawerCollection.find((item=>item.eventCallback===eventCallback)))}close($toElement=null){this._drawerView?.hideDrawer($toElement)}remove(){this._drawerView?.remove();this._drawerView=null}}var drawer=__AMD("core/js/drawer",new Drawer);var AdaptSubsetCollection=__AMD("core/js/collections/adaptSubsetCollection",class AdaptSubsetCollection extends AdaptCollection{initialize(models,options){super.initialize(models,options);this.parent=options.parent;this.listenTo(this.parent,"reset",this.loadSubset)}loadSubset(){this.set(this.parent.filter((model=>model instanceof this.model)));this._byAdaptID=this.groupBy("_id")}});var ModelEvent=__AMD("core/js/modelEvent",class ModelEvent extends Backbone.Controller{initialize(type,target,value){this.type=type;this.target=target;this.value=value;this.canBubble=true;this.deepPath=[target];this.timeStamp=null}stopPropagation(){this.canBubble=false}addPath(target){this.deepPath.unshift(target)}});var AdaptModel=__AMD("core/js/models/adaptModel",class AdaptModel extends LockingModel{toJSON(){const json={...this.attributes};delete json._children;delete json._parent;return $.extend(true,{},json)}get(name){switch(name){case"_parent":case"_children":logging$1.deprecated("Use model.getChildren() or model.getParent() instead of model.get('_children') or model.get('_parent')")}return super.get(name)}defaults(){return{_canShowFeedback:true,_classes:"",_canReset:true,_canRequestChild:false,_isComplete:false,_isInteractionComplete:false,_isA11yRegionEnabled:false,_isA11yCompletionDescriptionEnabled:true,_requireCompletionOf:-1,_isEnabled:true,_isResetOnRevisit:false,_isAvailable:true,_isOptional:false,_isRendered:false,_isReady:false,_isVisible:true,_isVisited:false,_isLocked:false,_isHidden:false}}get trackingPosition(){const firstDescendant=this.getAllDescendantModels(false).concat([this])[0];const nearestTrackingIdModel=[firstDescendant].concat(firstDescendant.getAncestorModels()).find((model=>model.has("_trackingId")));if(!nearestTrackingIdModel)return;const trackingId=nearestTrackingIdModel.get("_trackingId");let trackingIdDescendants=[nearestTrackingIdModel].concat(nearestTrackingIdModel.getAllDescendantModels(true));trackingIdDescendants=trackingIdDescendants.filter((model=>!(model.isTypeGroup("component")&&model.get("_isTrackable")===false)));const indexInTrackingIdDescendants=trackingIdDescendants.findIndex((descendant=>descendant===this));if(indexInTrackingIdDescendants>=0){return[trackingId,indexInTrackingIdDescendants]}const trackingIdAncestors=nearestTrackingIdModel.getAncestorModels();const ancestorDistance=trackingIdAncestors.findIndex((ancestor=>ancestor===this));return[trackingId,-(ancestorDistance+1)]}parse(data){if(data._isResetOnRevisit==="false"){data._isResetOnRevisit=false}return data}trackable(){return["_id","_isComplete","_isInteractionComplete","_isVisited"]}trackableType(){return[String,Boolean,Boolean,Boolean]}bubblingEvents(){return["change:_isComplete","change:_isInteractionComplete","change:_isActive","change:_isVisited"]}setupModel(){if(this.hasManagedChildren){this.setupChildListeners()}this.init();_.defer((()=>{if(this.hasManagedChildren){this.checkCompletionStatus();this.checkInteractionCompletionStatus();this.checkLocking();this.checkVisitedStatus()}this.setupTrackables()}))}setupTrackables(){const originalTrackableStateFunction=this.triggerTrackableState;this.triggerTrackableState=_.compose((()=>{this.triggerTrackableState.isQueued=true}),_.debounce((()=>{originalTrackableStateFunction.apply(this);this.triggerTrackableState.isQueued=false}),17));this.listenTo(this,"change",(({changed:changed})=>{if(this.triggerTrackableState.isQueued||!Adapt$1.attributes._isStarted){return}const trackablePropertyNames=_.result(this,"trackable",[]);const changedPropertyNames=Object.keys(changed);const isTrackable=changedPropertyNames.find((item=>trackablePropertyNames.includes(item)));if(isTrackable){this.triggerTrackableState()}}))}setupChildListeners(){const children=this.getChildren();if(!children.length){return}this.listenTo(children,{all:this.onAll,bubble:this.bubble,"change:_isVisited":this.checkVisitedStatus,"change:_isReady":this.checkReadyStatus,"change:_isComplete":this.onIsComplete,"change:_isInteractionComplete":this.checkInteractionCompletionStatus})}init(){}getTrackableState(){const trackable=this.resultExtend("trackable",[]);const json=this.toJSON();const args=trackable;args.unshift(json);return _.pick(...args)}setTrackableState(state){const trackable=this.resultExtend("trackable",[]);const args=trackable;args.unshift(state);state=_.pick(...args);this.set(state);return this}triggerTrackableState(){Adapt$1.trigger("state:change",this,this.getTrackableState())}reset(type="hard",canReset=this.get("_canReset")){if(!canReset)return false;const isHardReset=type==="hard"||type===true;const isSoftReset=type==="soft";if(!isHardReset&&!isSoftReset)return false;const resetData={_isEnabled:true,_isInteractionComplete:false};if(isHardReset)resetData._isComplete=false;this.set(resetData);this.trigger("reset");return true}checkReadyStatus(model,value){if(value===false){return false}const children=this.getAvailableChildModels();if(children.find((child=>child.get("_isReady")===false&&child.get("_isRendered")))){return false}this.set("_isReady",true);return true}setReadyStatus(){this.set("_isReady",true)}checkVisitedStatus(){const children=this.getAvailableChildModels();const isVisited=children.some((child=>child.get("_isVisited")||child.get("_isComplete")||child.get("_isInteractionComplete")));if(isVisited)this.set("_isVisited",true);return isVisited}setVisitedStatus(){if(!this.get("_isReady")||!this.get("_isRendered"))return;this.set("_isVisited",true)}setCompletionStatus(){if(!this.get("_isVisible"))return;this.set({_isComplete:true,_isInteractionComplete:true,_isVisited:true})}checkCompletionStatus(){Adapt$1.checkingCompletion();_.defer(this.checkCompletionStatusFor.bind(this),"_isComplete")}checkInteractionCompletionStatus(){Adapt$1.checkingCompletion();_.defer(this.checkCompletionStatusFor.bind(this),"_isInteractionComplete")}checkCompletionStatusFor(completionAttribute="_isComplete"){let completed=false;const children=this.getAvailableChildModels();const requireCompletionOf=this.get("_requireCompletionOf");const isOptional=this.get("_isOptional");const isEveryChildOptional=children.every((child=>child.get("_isOptional")));if(isOptional&&isEveryChildOptional){completed=children.every((child=>child.get(completionAttribute)))}else if(requireCompletionOf===-1){completed=children.every((child=>child.get(completionAttribute)||child.get("_isOptional")))}else{completed=children.filter((child=>child.get(completionAttribute)&&!child.get("_isOptional"))).length>=requireCompletionOf}this.set(completionAttribute,completed);Adapt$1.checkedCompletion()}getTypeGroup(){}isTypeGroup(typeGroup){const hasUpperCase=/[A-Z]+/.test(typeGroup);const isPluralized=typeGroup.slice(-1)==="s";const lowerCased=typeGroup.toLowerCase();const singular=isPluralized&&lowerCased.slice(0,-1);const singularLowerCased=(singular||lowerCased).toLowerCase();if(isPluralized||hasUpperCase){logging$1.deprecated(`'${typeGroup}' appears pluralized or contains uppercase characters, suggest using the singular, lowercase type group '${singularLowerCased}'.`)}const pluralizedLowerCaseTypes=[singularLowerCased,!isPluralized&&`${lowerCased}s`].filter(Boolean);const typeGroups=this.getTypeGroups();if(_.intersection(pluralizedLowerCaseTypes,typeGroups).length){return true}return false}getTypeGroups(){if(this._typeGroups)return this._typeGroups;const typeGroups=[this.get("_type")];let parentClass=this;while(parentClass=Object.getPrototypeOf(parentClass)){if(!Object.prototype.hasOwnProperty.call(parentClass,"getTypeGroup"))continue;typeGroups.push(parentClass.getTypeGroup.call(this))}return this._typeGroups=_.uniq(typeGroups.filter(Boolean).map((s=>s.toLowerCase())))}findAncestor(ancestorType){const parent=this.getParent();if(!parent)return;if(!ancestorType||parent.isTypeGroup(ancestorType)){return parent}return parent.findAncestor(ancestorType)}findDescendantModels(descendants,options){const allDescendantsModels=this.getAllDescendantModels();const returnedDescendants=allDescendantsModels.filter((model=>model.isTypeGroup(descendants)));if(!options){return returnedDescendants}if(options.where){return returnedDescendants.filter((descendant=>{for(const property in options.where){const value=options.where[property];if(descendant.get(property)!==value){return false}}return true}))}}getAllDescendantModels(isParentFirst){const descendants=[];if(!this.hasManagedChildren){return descendants}const children=this.getChildren();children.models.forEach((child=>{if(!child.hasManagedChildren){descendants.push(child);return}const subDescendants=child.getAllDescendantModels(isParentFirst);if(isParentFirst===true){descendants.push(child)}descendants.push(...subDescendants);if(isParentFirst!==true){descendants.push(child)}}));return descendants}findRelativeModel(relativeString,options={}){if(!relativeString)return this;let relativeDescriptorObjects=Adapt$1.parseRelativeString(relativeString);if(!Array.isArray(relativeDescriptorObjects))relativeDescriptorObjects=[relativeDescriptorObjects];const find=({type:type,offset:offset,inset:inset})=>{const isInset=inset!==null;const isOffset=offset!==null;const rootModel=options.limitParentId?data$1.findById(options.limitParentId):isInset?this:Adapt$1.course;const increment=isOffset?offset:inset;const searchBackwards=increment<0;let moveBy=Math.abs(increment);let movementCount=0;const hasDescendantsOfType=Boolean(this.findDescendantModels(type).length);if(isInset&&!hasDescendantsOfType)return undefined;if(isOffset&&hasDescendantsOfType){moveBy--}if(isInset&&searchBackwards){moveBy--}const searchDescendants=searchBackwards?[rootModel,...rootModel.getAllDescendantModels(true)].reverse():[...rootModel.getAllDescendantModels(false),rootModel];const modelId=this.get("_id");const searchFromIndex=isInset?0:searchDescendants.findIndex((searchDescendant=>searchDescendant.get("_id")===modelId));const hasFilterFunction=typeof options.filter==="function";if(options.loop){const totalOfType=searchDescendants.reduce(((count,model)=>{if(!model.isTypeGroup(type))return count;return++count}),0);moveBy=moveBy%totalOfType;searchDescendants.push(...searchDescendants.slice(0))}for(let i=searchFromIndex,l=searchDescendants.length;imoveBy){break}if(movementCount===moveBy){return descendant}movementCount++}};const nextDescriptor=relativeDescriptorObjects.slice(1).reduce(((output,{type:type,offset:offset,inset:inset})=>{const isInset=inset!==null;const isOffset=offset!==null;if(isOffset)return`${output}@${type}${offset<0?offset:`+${offset}`}`;if(isInset)return`${output}@${type}=${inset}`;return`${output}@${type}`}),"");const foundModel=find(relativeDescriptorObjects[0]);if(nextDescriptor){return foundModel?.findRelativeModel(nextDescriptor)}return foundModel}get hasManagedChildren(){return true}getChildren(){if(this._childrenCollection){return this._childrenCollection}let childrenCollection;if(!this.hasManagedChildren){childrenCollection=new Backbone.Collection}else{const id=this.get("_id");const children=data$1.filter((model=>model.get("_parentId")===id));childrenCollection=new Backbone.Collection(children)}if(this.get("_type")==="block"&&childrenCollection.length===2&&childrenCollection.models[0].get("_layout")!=="left"){childrenCollection.comparator="_layout";childrenCollection.sort()}this.setChildren(childrenCollection);return this._childrenCollection}setChildren(children){this._childrenCollection=children;this.set("_children",children)}getAvailableChildModels(){return this.getChildren().where({_isAvailable:true})}getParent(){if(this._parentModel){return this._parentModel}const parentId=this.get("_parentId");if(!parentId)return;const parent=data$1.findById(parentId);if(!parent){logging$1.warn("adaptModel.getParent(): parent is empty");return}this.setParent(parent);return this._parentModel}setParent(parent){this._parentModel=parent;this.set("_parentId",this._parentModel.get("_id"));this.set("_parent",this._parentModel)}getAncestorModels(shouldIncludeChild){const parents=[];let context=this;if(shouldIncludeChild)parents.push(context);while(context.has("_parentId")){context=context.getParent();parents.push(context)}return parents.length?parents:null}getSiblings(passSiblingsAndIncludeSelf){const id=this.get("_id");const parentId=this.get("_parentId");let siblings;if(!passSiblingsAndIncludeSelf){if(this._hasSiblingsAndSelf===false){return this.get("_siblings")}siblings=data$1.filter((model=>model.get("_parentId")===parentId&&model.get("_id")!==id));this._hasSiblingsAndSelf=false}else{if(this._hasSiblingsAndSelf){return this.get("_siblings")}siblings=data$1.filter((model=>model.get("_parentId")===parentId));this._hasSiblingsAndSelf=true}const siblingsCollection=new Backbone.Collection(siblings);this.set("_siblings",siblingsCollection);return siblingsCollection}setOnChildren(...args){this.set(...args);if(!this.hasManagedChildren)return;const children=this.getChildren();children.models.forEach((child=>child.setOnChildren(...args)))}setOptional(value){logging$1.deprecated("Use model.set('_isOptional', value) as setOptional() may be removed in the future");this.set({_isOptional:value})}checkLocking(){const lockType=this.get("_lockType");if(!lockType)return;switch(lockType){case"sequential":this.setSequentialLocking();break;case"unlockFirst":this.setUnlockFirstLocking();break;case"lockLast":this.setLockLastLocking();break;case"custom":this.setCustomLocking();break;default:logging$1.warn(`AdaptModel.checkLocking: unknown _lockType '${lockType}' found on ${this.get("_id")}`)}}setSequentialLocking(){const children=this.getAvailableChildModels();children.slice(1).forEach(((child,index)=>{const previousChild=children[index];const isLockedByPreviousChild=previousChild.get("_isLocked")||!previousChild.get("_isComplete")&&!previousChild.get("_isOptional");child.set("_isLocked",isLockedByPreviousChild)}),false)}setUnlockFirstLocking(){const children=this.getAvailableChildModels();const firstChild=children.shift();const isLockedByFirstChild=!firstChild.get("_isComplete")&&!firstChild.get("_isOptional");children.forEach((child=>child.set("_isLocked",isLockedByFirstChild)))}setLockLastLocking(){const children=this.getAvailableChildModels();const lastChild=children.pop();const isLockedByChildren=children.some((child=>!child.get("_isComplete")&&!child.get("_isOptional")));lastChild.set("_isLocked",isLockedByChildren)}setCustomLocking(){const children=this.getAvailableChildModels();children.forEach((child=>child.set("_isLocked",this.shouldLock(child))))}shouldLock(child){const lockedBy=child.get("_lockedBy");if(!lockedBy)return false;return lockedBy.some((id=>{try{const anotherModel=data$1.findById(id);return anotherModel.get("_isAvailable")&&(anotherModel.get("_isLocked")||!anotherModel.get("_isComplete")&&!anotherModel.get("_isOptional"))}catch(e){logging$1.warn(`AdaptModel.shouldLock: unknown _lockedBy ID '${id}' found on ${child.get("_id")}`);return false}}))}onIsComplete(){this.checkCompletionStatus();this.checkLocking()}checkIfResetOnRevisit(){const isResetOnRevisit=this.get("_isResetOnRevisit");this.reset(isResetOnRevisit)}deepClone(modifier=null){const ModelClass=this.constructor;const clonedModel=new ModelClass(this.toJSON());if(modifier){modifier(clonedModel,this)}let clonedId=clonedModel.get("_id");const hasId=Boolean(clonedId);const shouldAssignUniqueId=this.get("_id")===clonedId;if(hasId&&shouldAssignUniqueId){const cid=_.uniqueId(ModelClass.prototype.cidPrefix||"c");clonedId=`${clonedId}_${cid}`;clonedModel.set("_id",clonedId)}if(hasId){data$1.add(clonedModel)}if(this.hasManagedChildren){this.getChildren().each((child=>{if(!child.deepClone){throw new Error("Cannot deepClone child.")}child.deepClone(((clone,child)=>{if(hasId){clone.set("_parentId",clonedId)}if(modifier){modifier(clone,child)}}))}))}clonedModel.getParent().getChildren().add(clonedModel);clonedModel.setupModel();return clonedModel}onAll(type,model,value){if(!_.result(this,"bubblingEvents").includes(type))return;const event=new ModelEvent(type,model,value);this.bubble(event)}bubble(event){if(!event.canBubble)return;event.addPath(this);this.trigger(`bubble:${event.type} bubble`,event)}});var ContentObjectModel=__AMD("core/js/models/contentObjectModel",class ContentObjectModel extends AdaptModel{get _parent(){logging$1.deprecated("contentObjectModel._parent, use contentObjectModel.getParent() instead, parent models are defined by the JSON");const isParentCourse=this.get("_parentId")===Adapt$1.course.get("_id");if(isParentCourse){return"course"}return"contentObjects"}get _siblings(){logging$1.deprecated("contentObjectModel._siblings, use contentObjectModel.getSiblings() instead, sibling models are defined by the JSON");return"contentObjects"}get _children(){logging$1.deprecated("contentObjectModel._children, use contentObjectModel.hasManagedChildren instead, child models are defined by the JSON");return null}getTypeGroup(){return"contentobject"}});class ArticleModel extends AdaptModel{get _parent(){logging$1.deprecated("articleModel._parent, use articleModel.getParent() instead, parent models are defined by the JSON");return"contentObjects"}get _siblings(){logging$1.deprecated("articleModel._siblings, use articleModel.getSiblings() instead, sibling models are defined by the JSON");return"articles"}get _children(){logging$1.deprecated("articleModel._children, use articleModel.hasManagedChildren instead, child models are defined by the JSON");return"blocks"}getTypeGroup(){return"article"}}components$1.register("article",{model:ArticleModel});var ArticleModel$1=__AMD("core/js/models/articleModel",ArticleModel);class BlockModel extends AdaptModel{get _parent(){logging$1.deprecated("blockModel._parent, use blockModel.getParent() instead, parent models are defined by the JSON");return"articles"}get _siblings(){logging$1.deprecated("blockModel._siblings, use blockModel.getSiblings() instead, sibling models are defined by the JSON");return"blocks"}get _children(){logging$1.deprecated("blockModel._children, use blockModel.hasManagedChildren instead, child models are defined by the JSON");return"components"}getTypeGroup(){return"block"}}components$1.register("block",{model:BlockModel});var BlockModel$1=__AMD("core/js/models/blockModel",BlockModel);class ComponentModel extends AdaptModel{get _parent(){logging$1.deprecated("componentModel._parent, use componentModel.getParent() instead, parent models are defined by the JSON");return"blocks"}get _siblings(){logging$1.deprecated("componentModel._siblings, use componentModel.getSiblings() instead, sibling models are defined by the JSON");return"components"}getTypeGroup(){return"component"}defaults(){return AdaptModel.resultExtend("defaults",{_isA11yComponentDescriptionEnabled:true,_shouldStoreAttempts:true,_userAnswer:null,_attemptStates:null})}trackable(){return AdaptModel.resultExtend("trackable",["_userAnswer","_attemptStates"])}trackableType(){return AdaptModel.resultExtend("trackableType",[Array,Array])}get hasManagedChildren(){return false}init(){if(Adapt$1.get("_isStarted")){this.onAdaptInitialize();return}this.listenToOnce(Adapt$1,"adapt:initialize",this.onAdaptInitialize)}onAdaptInitialize(){this.restoreUserAnswers()}restoreUserAnswers(){}storeUserAnswer(){}resetUserAnswer(){this.set("_userAnswer",null)}reset(type="hard",canReset=this.get("_canReset")){const wasReset=super.reset(type,canReset);if(!wasReset)return false;this.resetUserAnswer();return true}getAttemptState(object=this.toJSON()){const trackables=this.trackable();const types=this.trackableType();trackables.find(((name,index)=>{if(name!=="_attemptStates")return false;trackables.splice(index,1);types.splice(index,1);return true}));const values=trackables.map((n=>object[n]));const booleans=values.filter(((v,i)=>types[i]===Boolean)).map(Boolean);const numbers=values.filter(((v,i)=>types[i]===Number)).map((v=>Number(v)||0));const arrays=values.filter(((v,i)=>types[i]===Array));return[numbers,booleans,arrays]}getAttemptObject(state=this.getAttemptState()){const trackables=this.trackable();const types=this.trackableType();trackables.find(((name,index)=>{if(name!=="_attemptStates")return false;trackables.splice(index,1);types.splice(index,1);return true}));const numbers=(state[0]||[]).slice(0);const booleans=(state[1]||[]).slice(0);const arrays=(state[2]||[]).slice(0);const object={};trackables.forEach(((n,i)=>{if(n==="_id")return;switch(types[i]){case Number:object[n]=numbers.shift();break;case Boolean:object[n]=booleans.shift();break;case Array:object[n]=arrays.shift();break}}));return object}setAttemptObject(object,silent=true){this.set(object,{silent:silent})}addAttemptObject(object=this.getAttemptObject()){const attemptStates=this.get("_attemptStates")||[];const state=this.getAttemptState(object);attemptStates.push(state);this.set("_attemptStates",attemptStates)}getAttemptObjects(){const states=this.get("_attemptStates")||[];return states.map((state=>this.getAttemptObject(state)))}}components$1.register("component",{model:ComponentModel});var ComponentModel$1=__AMD("core/js/models/componentModel",ComponentModel);class MenuModel extends ContentObjectModel{get _children(){logging$1.deprecated("menuModel._children, use menuModel.hasManagedChildren instead, child models are defined by the JSON");return"contentObjects"}getTypeGroup(){return"menu"}setCustomLocking(){const children=this.getAvailableChildModels();children.forEach((child=>{child.set("_isLocked",this.shouldLock(child));if(!(child instanceof MenuModel))return;child.checkLocking()}))}}components$1.register("menu",{model:MenuModel});var MenuModel$1=__AMD("core/js/models/menuModel",MenuModel);class CourseModel extends MenuModel$1{get _parent(){logging$1.deprecated("courseModel._parent, use courseModel.getParent() instead, parent models are defined by the JSON");return null}get _siblings(){logging$1.deprecated("courseModel._siblings, use courseModel.getSiblings() instead, sibling models are defined by the JSON");return null}getTypeGroup(){return"course"}}components$1.register("course",{model:CourseModel});var CourseModel$1=__AMD("core/js/models/courseModel",CourseModel);class PageModel extends ContentObjectModel{get _children(){logging$1.deprecated("pageModel._children, use menuModel.hasManagedChildren instead, child models are defined by the JSON");return"articles"}getTypeGroup(){return"page"}}components$1.register("page",{model:PageModel});__AMD("core/js/models/pageModel",PageModel);var ChildEvent=__AMD("core/js/childEvent",class ChildEvent extends Backbone.Controller{initialize(type,target,model){this.type=type;this.target=target;this.isForced=false;this.isStoppedImmediate=false;this.isStoppedNext=false;this.hasRequestChild=false;this._model=model}get model(){return this._model}set model(model){if(this.type!=="requestChild"){logging$1.warn(`Cannot change model in ${this.type} event.`);return}if(this._model){logging$1.warn(`Cannot inject two models in one sitting. ${model.get("_id")} attempts to overwrite ${this._model.get("_id")}`);return}this._model=model;this.hasRequestChild=true}reset(){this.isStoppedImmediate=false;this.isStoppedNext=false}force(){this.isForced=true}stop(immediate=true){if(!immediate){return this.stopNext()}this.isStoppedImmediate=true}stopNext(){this.isStoppedNext=true}close(){this.trigger("closed")}});class AdaptView extends Backbone.View{attributes(){return{"data-adapt-id":this.model.get("_id"),role:"presentation"}}initialize(){this._jsxIgnoreChanges=0;this.listenTo(this.model,{"change:_isVisible":this.toggleVisibility,"change:_isHidden":this.toggleHidden,"change:_isComplete":this.onIsCompleteChange});this.isJSX=(this.constructor.template||"").includes(".jsx");if(this.isJSX){this._classSet=new Set(_.result(this,"className").trim().split(/\s+/));this.listenTo(this.model,"change",this.changed);const children=this.model?.getChildren?.();children&&this.listenTo(children,"change",this.changed);this.listenTo(Adapt$1,"device:changed",this.changed)}this.model.set({_globals:Adapt$1.course.get("_globals"),_isReady:false});this._isRemoved=false;if(location$1._currentId===this.model.get("_id")){Adapt$1.parentView=this}this.preRender();this.render();this.setupOnScreenHandler()}preRender(){}async postRender(){await this.addChildren()}render(){const type=this.constructor.type;Adapt$1.trigger(`${type}View:preRender view:preRender`,this);if(this.isJSX){this.changed()}else{const data=this.model.toJSON();data.view=this;const template=Handlebars.templates[this.constructor.template];this.$el.html(template(data))}Adapt$1.trigger(`${type}View:render view:render`,this);_.defer((async()=>{if(this._isRemoved)return;await this.postRender();Adapt$1.trigger(`${type}View:postRender view:postRender`,this)}));return this}changed(eventName=null){if(this._jsxIgnoreChanges!==0)return;if(!this.isJSX)return;if(typeof eventName==="string"&&eventName.startsWith("bubble")){return}if(!this.model.get("_isRendered"))return;const props={...this,...this.model.toJSON(),_globals:Adapt$1.course.get("_globals")};const Template=templates[this.constructor.template.replace(".jsx","")];this.updateViewProperties();ReactDOM__default["default"].render(React__default["default"].createElement(Template,props),this.el)}stopRendering(){this._jsxIgnoreChanges++}startRendering(){this._jsxIgnoreChanges--;if(this._jsxIgnoreChanges<0){this._jsxIgnoreChanges=0}}updateViewProperties(){const classesToAdd=_.result(this,"className").trim().split(/\s+/);classesToAdd.forEach((i=>this._classSet.add(i)));const classesToRemove=[...this._classSet].filter((i=>!classesToAdd.includes(i)));classesToRemove.forEach((i=>this._classSet.delete(i)));this._setAttributes({..._.result(this,"attributes"),id:_.result(this,"id")});this.$el.removeClass(classesToRemove).addClass(classesToAdd)}setupOnScreenHandler(){const onscreen=this.model.get("_onScreen");if(!onscreen?._isEnabled)return;this.$el.addClass(`has-animation ${onscreen._classes}-before`);this.$el.on("onscreen.adaptView",((e,m)=>{if(!m.onscreen)return;const minVerticalInview=onscreen._percentInviewVertical||33;if(m.percentInviewVerticalmodel.setOnChildren("_isRendered",false)));break}const model=event.model;model.set({_isRendered:true,_nthChild:++this.nthChild});const ChildView=this.constructor.childView||components$1.getViewClass(model);if(!ChildView){throw new Error(`The component '${model.attributes._id}' ('${model.attributes._component}') has not been installed, and so is not available in your project.`)}const childView=new ChildView({model:model});this.addChildView(childView);addedCount++;if(event.isStoppedNext){break}}if(!addedCount){return addedCount}this.model.set("_isReady",false);return addedCount}addChildView(childView){const childModel=childView.model;const type=childModel.get("_type");const childViews=this.getChildViews()||[];childViews.push(childView);this.setChildViews(childViews);const $parentContainer=this.$(this.constructor.childContainer);switch(childModel.get("_renderPosition")){case"outer-append":this.$el.append(childView.$el);break;case"inner-append":default:$parentContainer.append(childView.$el);break}Adapt$1.trigger(`${type}View:childAdded view:childAdded`,this,childView);return childView}async addDescendants(){let addedDescendantCount=0;const childViews=this.getChildViews();if(!childViews){return addedDescendantCount}for(let i=0,l=childViews.length;i{const onReadyChange=(model,value)=>{if(!value)return;this.stopListening(this.model,"change:_isReady",onReadyChange);resolve()};this.listenTo(this.model,"change:_isReady",onReadyChange);this.model.checkReadyStatus()}))}_getAddChildEvent(model){const isRequestChild=!model;const event=new ChildEvent(null,this,model);if(isRequestChild){const canRequestChild=this.model.get("_canRequestChild");if(!canRequestChild){return}event.type="requestChild";Adapt$1.trigger("view:requestChild",event);if(!event.hasRequestChild){event.close();return}model=event.model}const type=model.get("_type");event.type="addChild";Adapt$1.trigger(`${type}View:addChild view:addChild`,event);event.close();return event}findDescendantViews(isParentFirst){const descendants=[];const childViews=this.getChildViews();childViews?.forEach((view=>{if(isParentFirst)descendants.push(view);const children=view.findDescendantViews?.(isParentFirst);if(children)descendants.push(...children);if(!isParentFirst)descendants.push(view)}));return descendants}setReadyStatus(){this.model.setReadyStatus()}setCompletionStatus(){this.model.setCompletionStatus()}resetCompletionStatus(type){if(!this.model.get("_canReset"))return;const descendantComponents=this.model.findDescendantModels("component");if(descendantComponents.length===0){this.model.reset(type)}else{descendantComponents.forEach((model=>model.reset(type)))}}preRemove(){const type=this.constructor.type;Adapt$1.trigger(`${type}View:preRemove view:preRemove`,this)}remove(){const type=this.constructor.type;this.preRemove();Adapt$1.trigger(`${type}View:remove view:remove`,this);this._isRemoved=true;this.stopListening();wait$1.for((end=>{if(this.isJSX){ReactDOM__default["default"].unmountComponentAtNode(this.el)}this.$el.off("onscreen.adaptView");super.remove();_.defer((()=>{Adapt$1.trigger(`${type}View:postRemove view:postRemove`,this)}));end()}));return this}setVisibility(){return this.model.get("_isVisible")?"":"u-visibility-hidden"}toggleVisibility(){this.$el.toggleClass("u-visibility-hidden",!this.model.get("_isVisible"))}setHidden(){return this.model.get("_isHidden")?"u-display-none":""}toggleHidden(){this.$el.toggleClass("u-display-none",this.model.get("_isHidden"))}onIsCompleteChange(model,isComplete){this.$el.toggleClass("is-complete",isComplete)}getChildViews(){if(!this._childViews)return null;return Object.entries(this._childViews).map((([key,value])=>value))}setChildViews(value){this._childViews=value}get childViews(){logging$1.deprecated("view.childViews use view.getChildViews() and view.setChildViews([])");if(Array.isArray(this._childViews)){return _.indexBy(this._childViews,(view=>view.model.get("_id")))}return this._childViews}set childViews(value){logging$1.deprecated("view.childViews use view.getChildViews() and view.setChildViews([])");this.setChildViews(value)}}AdaptView.className="";var AdaptView$1=__AMD("core/js/views/adaptView",AdaptView);var RouterModel=__AMD("core/js/models/routerModel",class RouterModel extends LockingModel{defaults(){return{_canNavigate:true,_shouldNavigateFocus:true}}lockedAttributes(){return{_canNavigate:false,_shouldNavigateFocus:false}}});class Router extends Backbone.Router{routes(){return{"":"handleRoute","id/:id":"handleRoute",":pluginName(/*location)(/*action)":"handleRoute"}}initialize({model:model}){this.navigateToElement=this.navigateToElement.bind(this);this._isBackward=false;this.model=model;this._navigationRoot=null;this._isCircularNavigationInProgress=false;this.showLoading();this.$wrapper=$("#wrapper");this.$html=$("html");this.listenToOnce(Adapt$1,"app:dataReady",this.setDocumentTitle);this.listenTo(Adapt$1,"router:navigateTo",this.navigateToArguments)}get rootModel(){return this._navigationRoot||Adapt$1.course}set rootModel(model){this._navigationRoot=model}showLoading(){$("html").removeClass("is-loading-hidden").addClass("is-loading-visible");$(".js-loading").show()}hideLoading(){$("html").addClass("is-loading-hidden").removeClass("is-loading-visible");$(".js-loading").hide()}setDocumentTitle(){const currentModel=location$1._currentModel;const hasSubTitle=currentModel&¤tModel!==router.rootModel&¤tModel.get("title");const title=[this.rootModel.get("title"),hasSubTitle&¤tModel.get("title")].filter(Boolean).join(" | ");this.listenToOnce(Adapt$1,"contentObjectView:preRender",(()=>{const escapedTitle=$(`
${title}
`).text();document.title=escapedTitle}))}navigateToArguments(args){args=args.filter((v=>v!==null));const options={trigger:false,replace:false};if(args.length===1&&data$1.findById(args[0])){this.navigate("#/id/"+args[0],options);return}if(args.length<=3){this.navigate("#/"+args.join("/"),options);return}logging$1.deprecated("Use Backbone.history.navigate or window.location.href instead of Adapt.trigger('router:navigateTo')");this.handleRoute(...args)}handleRoute(...args){args=args.filter((v=>v!==null));if(this.model.get("_canNavigate")){this._isCircularNavigationInProgress=false}if(this._isCircularNavigationInProgress===false){Adapt$1.trigger("router:navigate",args)}if(this.model.get("_canNavigate")){this.model.set("_canNavigate",false,{pluginName:"adapt"});this._isBackward=false;if(args.length<=1){return this.handleId(...args)}return this.handlePluginRouter(...args)}if(this._isCircularNavigationInProgress){this._isCircularNavigationInProgress=false;return}this._isCircularNavigationInProgress=true;Adapt$1.trigger("router:navigationCancelled",args);Backbone.history.history[this._isBackward?"forward":"back"]();this._isBackward=false}async handlePluginRouter(pluginName,location,action){const pluginLocation=[pluginName,location&&`-${location}`,action&&`-${action}`].filter(Boolean).join("");await this.updateLocation(pluginLocation,null,null,null);Adapt$1.trigger("router:plugin:"+pluginName,pluginName,location,action);Adapt$1.trigger("router:plugin",pluginName,location,action);this.model.set("_canNavigate",true,{pluginName:"adapt"})}async handleId(id){const rootModel=router.rootModel;let model=!id?rootModel:data$1.findById(id);if(!model){this.model.set("_canNavigate",true,{pluginName:"adapt"});return}const isContentObject=model.isTypeGroup?.("contentobject");const navigateToId=model.get("_id");model=isContentObject?model:model.findAncestor("contentobject");id=model.get("_id");const isRoot=model===rootModel;if(isRoot&&Adapt$1.course.has("_start")){const startController=Adapt$1.course.get("_start");if(startController._isEnabled===true&&startController._isMenuDisabled===true){return}}if(model.get("_isLocked")&&Adapt$1.config.get("_forceRouteLocking")){logging$1.warn("Unable to navigate to locked id: "+id);this.model.set("_canNavigate",true,{pluginName:"adapt"});if(location$1._previousId===undefined){return this.navigate("#/",{trigger:true,replace:true})}return this.navigateBack()}this.showLoading();await Adapt$1.remove();const isCourse=model.isTypeGroup?.("course");const type=isCourse?"menu":model.get("_type");const newLocation=isCourse?"course":`${type}-${id}`;model.set({_isVisited:true,_isRendered:true});await this.updateLocation(newLocation,type,id,model);Adapt$1.once("contentObjectView:ready",(()=>{this.model.set("_canNavigate",true,{pluginName:"adapt"});this.handleNavigationFocus()}));Adapt$1.trigger(`router:${type} router:contentObject`,model);const ViewClass=components$1.getViewClass(model);const isMenu=model.isTypeGroup?.("menu");if(!ViewClass&&isMenu){logging$1.deprecated(`Using event based menu view instantiation for '${components$1.getViewName(model)}'`);return}if(!isMenu){_.invoke(model.getAllDescendantModels(),"checkIfResetOnRevisit");await Adapt$1.deferUntilCompletionChecked()}this.$wrapper.append(new ViewClass({model:model}).$el);if(!isContentObject&&!this.isScrolling){await this.navigateToElement("."+navigateToId,{replace:true,duration:400})}}async updateLocation(currentLocation,type,id,currentModel){location$1._previousModel=location$1._currentModel;location$1._previousId=location$1._currentId;location$1._previousContentType=location$1._contentType;location$1._currentModel=currentModel;location$1._currentId=id;location$1._contentType=type;location$1._currentLocation=currentLocation;if(type==="menu"){location$1._lastVisitedType="menu";location$1._lastVisitedMenu=id}else if(type==="page"){location$1._lastVisitedType="page";location$1._lastVisitedPage=id}this.setDocumentTitle();this.setGlobalClasses();Adapt$1.trigger("router:location",location$1);await wait$1.queue()}setGlobalClasses(){const currentModel=location$1._currentModel;const htmlClasses=currentModel?.get("_htmlClasses")||"";const classes=location$1._currentId?`location-${location$1._contentType} location-id-${location$1._currentId}`:`location-${location$1._currentLocation}`;const currentClasses=`${classes} ${htmlClasses}`;this.$html.removeClass(location$1._previousClasses).addClass(currentClasses).attr("data-location",location$1._currentLocation);this.$wrapper.removeClass().addClass(classes).attr("data-location",location$1._currentLocation);location$1._previousClasses=currentClasses}handleNavigationFocus(){if(!this.model.get("_shouldNavigateFocus"))return;a11y$1.focus("body")}navigateBack(){this._isBackward=true;Backbone.history.history.back()}navigateToCurrentRoute(force){if(!this.model.get("_canNavigate")&&!force){return}if(!location$1._currentId){return}const currentId=location$1._currentModel.get("_id");const isRoot=location$1._currentModel===this.rootModel;const route=isRoot?"#/":"#/id/"+currentId;this.navigate(route,{trigger:true,replace:true})}navigateToPreviousRoute(force){if(!this.model.get("_canNavigate")&&!force){return}const currentModel=location$1._currentModel;const previousModel=location$1._previousModel;if(!currentModel){return this.navigateBack()}if(location$1._currentModel?.isTypeGroup("menu")){return this.navigateToParent()}if(previousModel){return this.navigateBack()}this.navigateToParent()}navigateToParent(force){if(!this.model.get("_canNavigate")&&!force){return}const parentId=location$1._currentModel.get("_parentId");const parentModel=data$1.findById(parentId);const isRoot=parentModel===this.rootModel;const route=isRoot?"#/":"#/id/"+parentId;this.navigate(route,{trigger:true})}navigateToHomeRoute(force){if(!this.model.get("_canNavigate")&&!force){return}this.navigate("#/",{trigger:true})}async navigateToElement(selector,settings={}){const currentModelId=typeof selector==="string"&&selector.replace(/\./g,"").split(" ")[0];const isSelectorAnId=data$1.hasId(currentModelId);if(isSelectorAnId){const currentModel=data$1.findById(currentModelId);const contentObject=currentModel.isTypeGroup?.("contentobject")?currentModel:currentModel.findAncestor("contentobject");const contentObjectId=contentObject.get("_id");const isNotInCurrentContentObject=contentObjectId!==location$1._currentId;if(currentModel&&(!currentModel.get("_isRendered")||!currentModel.get("_isReady")||isNotInCurrentContentObject)){const shouldReplace=settings.replace||false;if(isNotInCurrentContentObject){this.isScrolling=true;this.navigate(`#/id/${currentModelId}`,{trigger:true,replace:shouldReplace});this.model.set("_shouldNavigateFocus",false,{pluginName:"adapt"});await new Promise((resolve=>Adapt$1.once("contentObjectView:ready",_.debounce((()=>{this.model.set("_shouldNavigateFocus",true,{pluginName:"adapt"});resolve()}),1))));this.isScrolling=false;if(currentModel.isTypeGroup("contentobject")){a11y$1.focusFirst(document.body);return}}await Adapt$1.parentView.renderTo(currentModelId)}if(currentModel&&selector===currentModel.get("_id")){selector=`.${selector}`}}const isElementUnavailable=!$(selector).length;if(isElementUnavailable){logging$1.warn(`router.navigateToElement, selector not found in document: ${selector}`);return}const newLocation=location$1._contentType?location$1._contentType:location$1._currentLocation;Adapt$1.trigger(`${newLocation}:scrollTo`,selector);const disableScrollToAnimation=Adapt$1.config.has("_disableAnimation")?Adapt$1.config.get("_disableAnimation"):false;if(disableScrollToAnimation){settings.duration=0}else if(!settings.duration){settings.duration=$.scrollTo.defaults.duration}const $wrapper=$("#wrapper");let offsetTop=-parseInt($wrapper.css("padding-top"));if($(selector).hasClass("component")){offsetTop-=$(selector).find(".aria-label").height()||0}if(!settings.offset)settings.offset={top:offsetTop,left:0};if(settings.offset.top===undefined)settings.offset.top=offsetTop;if(settings.offset.left===undefined)settings.offset.left=0;if(settings.offset.left===0)settings.axis="y";if(Adapt$1.get("_canScroll")!==false){$.scrollTo(selector,settings)}await new Promise((resolve=>{_.delay((()=>{a11y$1.focusNext(selector);Adapt$1.trigger(`${newLocation}:scrolledTo`,selector);resolve()}),settings.duration+300)}))}get(...args){logging$1.deprecated("router.get, please use router.model.get");return this.model.get(...args)}set(...args){logging$1.deprecated("router.set, please use router.model.set");return this.model.set(...args)}}const router=new Router({model:new RouterModel(null,{reset:true})});var router$1=__AMD("core/js/router",router);var ContentObjectView=__AMD("core/js/views/contentObjectView",class ContentObjectView extends AdaptView$1{attributes(){return AdaptView$1.resultExtend("attributes",{role:"main"},this)}className(){return[this.constructor.type,"contentobject",this.constructor.className,this.model.get("_id"),this.model.get("_classes"),this.setVisibility(),this.model.get("_isComplete")?"is-complete":"",this.model.get("_isOptional")?"is-optional":""].filter(Boolean).join(" ")}preRender(){$.inview.lock(this.constructor.type+"View");this.disableAnimation=Adapt$1.config.has("_disableAnimation")?Adapt$1.config.get("_disableAnimation"):false;this.$el.css("opacity",0);this.listenTo(this.model,"change:_isReady",this.isReady);this._loadingErrorTimeout=setTimeout((()=>data$1.logReadyError(this)),1e4)}render(){const type=this.constructor.type;Adapt$1.trigger(`${type}View:preRender contentObjectView:preRender view:preRender`,this);if(this.isJSX){this.changed()}else{const data=this.model.toJSON();data.view=this;const template=Handlebars.templates[this.constructor.template];this.$el.html(template(data))}Adapt$1.trigger(`${type}View:render contentObjectView:render view:render`,this);_.defer((()=>{if(this._isRemoved)return;this.postRender();Adapt$1.trigger(`${type}View:postRender contentObjectView:postRender view:postRender`,this)}));return this}async isReady(){if(!this.model.get("_isReady")||this._isTriggeredReady)return;this._isTriggeredReady=true;clearTimeout(this._loadingErrorTimeout);delete this._loadingErrorTimeout;const type=this.constructor.type;const performIsReady=async()=>{Adapt$1.trigger(`${type}View:preReady contentObjectView:preReady view:preReady`,this);await wait$1.queue();router$1.hideLoading();if(Adapt$1.get("_shouldContentObjectScrollTop")!==false){$(window).scrollTop(0)}Adapt$1.trigger(`${type}View:ready contentObjectView:ready view:ready`,this);$.inview.unlock(`${type}View`);const styleOptions={opacity:1};if(this.disableAnimation){this.$el.css(styleOptions);$.inview();_.defer((()=>{Adapt$1.trigger(`${type}View:postReady contentObjectView:postReady view:postReady`,this)}))}else{this.$el.velocity(styleOptions,{duration:"fast",complete:()=>{$.inview();Adapt$1.trigger(`${type}View:postReady contentObjectView:postReady view:postReady`,this)}})}$(window).scroll()};_.defer(performIsReady)}async renderTo(id){const isRenderToSelf=id===this.model.get("_id");if(isRenderToSelf)return;let models=this.model.getAllDescendantModels(true).filter((model=>model.get("_isAvailable")));const index=models.findIndex((model=>model.get("_id")===id));if(index===-1){throw new Error(`Cannot renderTo "${id}" as it isn't a descendant.`)}const model=models[index];if(model.get("_isRendered")&&model.get("_isReady")){return}models=models.slice(0,index+1);const isLocked=models.some((model=>model.get("_isLocked")));if(isLocked)throw new Error(`Cannot renderTo ${id} as it is preceded by locked content`);const ids=_.indexBy(models,(model=>model.get("_id")));const forceUntilId=event=>{const addingId=event.model.get("_id");if(!ids[addingId])return;event.force();if(addingId!==id)return;Adapt$1.off("view:addChild",forceUntilId)};Adapt$1.on("view:addChild",forceUntilId);await this.addChildren();await this.whenReady();if(!model.get("_isRendered")||!model.get("_isReady")){throw new Error(`Cannot renderTo "${id}".`)}}preRemove(){const type=this.constructor.type;Adapt$1.trigger(`${type}View:preRemove contentObjectView:preRemove view:preRemove`,this)}remove(){const type=this.constructor.type;this.preRemove();Adapt$1.trigger(`${type}View:remove contentObjectView:remove view:remove`,this);this._isRemoved=true;wait$1.for((end=>{if(this.isJSX){ReactDOM__default["default"].unmountComponentAtNode(this.el)}this.$el.off("onscreen.adaptView");this.findDescendantViews().reverse().forEach((view=>{view.remove()}));this.setChildViews(null);super.remove();_.defer((()=>{Adapt$1.trigger(`${type}View:postRemove contentObjectView:postRemove view:postRemove`,this);this.trigger("postRemove")}));end()}));return this}destroy(){this.remove();if(Adapt$1.parentView===this){Adapt$1.parentView=null}}});class PageView extends ContentObjectView{remove(){if(this.$pageLabel){this.$pageLabel.remove()}super.remove()}}Object.assign(PageView,{childContainer:".article__container",type:"page",template:"page"});components$1.register("page",{view:PageView});__AMD("core/js/views/pageView",PageView);class ArticleView extends AdaptView$1{className(){return["article",this.model.get("_id"),this.model.get("_classes"),this.setVisibility(),this.setHidden(),this.model.get("_isComplete")?"is-complete":"",this.model.get("_isOptional")?"is-optional":""].join(" ")}}Object.assign(ArticleView,{childContainer:".block__container",type:"article",template:"article"});components$1.register("article",{view:ArticleView});var ArticleView$1=__AMD("core/js/views/articleView",ArticleView);class BlockView extends AdaptView$1{className(){return["block",this.model.get("_id"),this.model.get("_classes"),this.setVisibility(),this.setHidden(),this.model.get("_isComplete")?"is-complete":"",this.model.get("_isOptional")?"is-optional":""].join(" ")}}Object.assign(BlockView,{childContainer:".component__container",type:"block",template:"block"});components$1.register("block",{view:BlockView});__AMD("core/js/views/blockView",BlockView);class MPABC extends Backbone.Controller{initialize(){this.listenTo(data$1,{loading:this.waitForDataLoaded,loaded:this.onDataLoaded});this.setupSubsetCollections()}waitForDataLoaded(){wait$1.begin()}onDataLoaded(){wait$1.end()}setupSubsetCollections(){Adapt$1.contentObjects=new AdaptSubsetCollection(null,{parent:data$1,model:ContentObjectModel});Adapt$1.articles=new AdaptSubsetCollection(null,{parent:data$1,model:ArticleModel$1});Adapt$1.blocks=new AdaptSubsetCollection(null,{parent:data$1,model:BlockModel$1});Adapt$1.components=new AdaptSubsetCollection(null,{parent:data$1,model:ComponentModel$1})}}const mpabc=new MPABC;var mpabc$1=__AMD("core/js/mpabc",mpabc);var NotifyPushView=__AMD("core/js/views/notifyPushView",class NotifyPushView extends Backbone.View{className(){const classes=["notify-push",this.model.get("_classes"),this.model.get("_type")==="a11y-push"&&"aria-label"].filter(Boolean).join(" ");return classes}attributes(){return{role:"dialog","aria-labelledby":"notify-push-heading","aria-modal":"false"}}initialize(){this.listenTo(Adapt$1,{"notify:pushShown notify:pushRemoved":this.updateIndexPosition,remove:this.remove});this.listenTo(this.model.collection,{remove:this.updateIndexPosition,"change:_index":this.updatePushPosition});this.preRender();this.render()}events(){return{"click .js-notify-push-close-btn":"closePush","click .js-notify-push-inner":"triggerEvent"}}preRender(){this.hasBeenRemoved=false}render(){const data=this.model.toJSON();const template=Handlebars.templates.notifyPush;this.$el.html(template(data)).appendTo(".notify__push-container");_.defer(this.postRender.bind(this));return this}postRender(){this.$el.addClass("is-active");_.delay(this.closePush.bind(this),this.model.get("_timeout"));Adapt$1.trigger("notify:pushShown")}closePush(event){if(event){event.preventDefault()}if(this.hasBeenRemoved===false){this.hasBeenRemoved=true;this.$el.removeClass("is-active");_.delay((()=>{this.model.collection.remove(this.model);Adapt$1.trigger("notify:pushRemoved",this);this.remove()}),600)}}triggerEvent(event){Adapt$1.trigger(this.model.get("_callbackEvent"));this.closePush()}updateIndexPosition(){if(this.hasBeenRemoved)return;const models=this.model.collection.models;models.forEach(((model,index)=>{if(!model.get("_isActive"))return;model.set("_index",index);this.updatePushPosition()}))}updatePushPosition(){if(this.hasBeenRemoved){return}if(typeof this.model.get("_index")!=="undefined"){const elementHeight=this.$el.height();const offset=20;const navigationHeight=$(".nav").height();const currentIndex=this.model.get("_index");let flippedIndex=currentIndex===0?1:0;if(this.model.collection.where({_isActive:true}).length===1){flippedIndex=0}const positionLowerPush=(elementHeight+offset)*flippedIndex+navigationHeight+offset;this.$el.css("top",positionLowerPush)}}});var NotifyModel=__AMD("core/js/models/notifyModel",class NotifyModel extends LockingModel{defaults(){return{_isActive:false,_showIcon:false,_timeout:3e3}}});var NotifyPushCollection=__AMD("core/js/collections/notifyPushCollection",class NotifyPushCollection extends Backbone.Collection{initialize(){this.model=NotifyModel;this.listenTo(this,"add",this.onPushAdded);this.listenTo(Adapt$1,"notify:pushRemoved",this.onRemovePush)}onPushAdded(model){this.checkPushCanShow(model)}checkPushCanShow(model){if(!this.canShowPush())return;model.set("_isActive",true);this.showPush(model)}canShowPush(){const availablePushNotifications=this.where({_isActive:true});return availablePushNotifications.length<2}showPush(model){new NotifyPushView({model:model})}onRemovePush(view){const inactivePushNotifications=this.where({_isActive:false});if(inactivePushNotifications.length>0){this.checkPushCanShow(inactivePushNotifications[0])}}});var NotifyPopupView=__AMD("core/js/views/notifyPopupView",class NotifyPopupView extends Backbone__default["default"].View{className(){return`notify ${this.model.get("_classes")||""}`}attributes(){return Object.assign({role:"dialog","aria-labelledby":"notify-heading","aria-modal":"true"},this.model.get("_attributes"))}events(){return{"click .js-notify-btn-alert":"onAlertButtonClicked","click .js-notify-btn-prompt":"onPromptButtonClicked","click .js-notify-close-btn":"onCloseButtonClicked","click .js-notify-shadow-click":"onShadowClicked"}}initialize({notify:notify}){this.notify=notify;_.bindAll(this,"resetNotifySize","onKeyUp");this.disableAnimation=Adapt$1.config.get("_disableAnimation")||false;this.isOpen=false;this.hasOpened=false;this.setupEventListeners();this.render()}setupEventListeners(){this.listenTo(Adapt$1,{remove:this.closeNotify,"notify:resize":this.resetNotifySize,"notify:cancel":this.cancelNotify,"notify:close":this.closeNotify,"device:resize":this.resetNotifySize});this.setupEscapeKey()}setupEscapeKey(){$(window).on("keyup",this.onKeyUp)}onKeyUp(event){if(event.which!==27)return;event.preventDefault();this.cancelNotify()}render(){const data=this.model.toJSON();const template=Handlebars.templates.notifyPopup;this.$el.css("visibility","hidden");this.$el.html(template(data)).appendTo(".notify__popup-container");this.$(".notify__popup").css("visibility","hidden");this.$el.css("visibility","visible");this.showNotify();return this}onAlertButtonClicked(event){event.preventDefault();this.closeNotify();Adapt$1.trigger(this.model.get("_callbackEvent"),this)}onPromptButtonClicked(event){event.preventDefault();this.closeNotify();Adapt$1.trigger($(event.currentTarget).attr("data-event"),this)}onCloseButtonClicked(event){event.preventDefault();this.cancelNotify()}onShadowClicked(event){event.preventDefault();if(this.model.get("_closeOnShadowClick")===false)return;this.cancelNotify()}cancelNotify(){if(this.model.get("_isCancellable")===false)return;this.closeNotify();Adapt$1.trigger("notify:cancelled",this)}resetNotifySize(){if(!this.hasOpened)return;this.resizeNotify()}resizeNotify(){const windowHeight=$(window).height();const notifyHeight=this.$(".notify__popup-inner").outerHeight();const isFullWindow=notifyHeight>=windowHeight;this.$(".notify__popup").css({height:isFullWindow?"100%":"auto",top:isFullWindow?0:"","margin-top":isFullWindow?"":-(notifyHeight/2),"overflow-y":isFullWindow?"scroll":"","-webkit-overflow-scrolling":isFullWindow?"touch":""})}async showNotify(){this.isOpen=true;await this.addSubView();this.notify.stack.push(this);this.$previousActiveElement=$(document.activeElement);Adapt$1.trigger("notify:opened",this);this.$el.imageready(this.onLoaded.bind(this))}onLoaded(){if(this.disableAnimation){this.$(".notify__shadow").css("display","block")}else{this.$(".notify__shadow").velocity({opacity:0},{duration:0}).velocity({opacity:1},{duration:400,begin:()=>{this.$(".notify__shadow").css("display","block")}})}this.resizeNotify();if(this.disableAnimation){this.$(".notify__popup").css("visibility","visible");this.onOpened()}else{this.$(".notify__popup").velocity({opacity:0},{duration:0}).velocity({opacity:1},{duration:400,begin:()=>{this.$(".notify__popup").css("visibility","visible");this.onOpened()}})}}onOpened(){$.inview();this.hasOpened=true;a11y$1.popupOpened(this.$el);a11y$1.scrollDisable("body");$("html").addClass("notify");a11y$1.focusFirst(this.$(".notify__popup"),{defer:false})}async addSubView(){this.subView=this.model.get("_view");if(this.model.get("_shouldRenderId")&&this.model.get("_id")){const model=data$1.findById(this.model.get("_id"));const View=components$1.getViewClass(model);this.subView=new View({model:model})}if(!this.subView)return;this.subView.$el.on("resize",this.resetNotifySize);this.$(".notify__content-inner").append(this.subView.$el);if(!(this.subView instanceof AdaptView$1)||this.subView.model.get("_isReady"))return;return new Promise((resolve=>{const check=(model,value)=>{if(!value)return;this.subView.model.off("change:_isReady",check);resolve()};this.subView.model.on("change:_isReady",check)}))}closeNotify(){const stackItem=this.notify.stack[this.notify.stack.length-1];if(this!==stackItem)return;this.notify.stack.pop();if(!this.isOpen)return;this.isOpen=false;if(this.hasOpened){this.onCloseReady();return}this.listenToOnce(Adapt$1,"popup:opened",(()=>{_.defer(this.onCloseReady.bind(this))}))}onCloseReady(){if(this.disableAnimation){this.$(".notify__popup").css("visibility","hidden");this.$el.css("visibility","hidden");this.remove()}else{this.$(".notify__popup").velocity({opacity:0},{duration:400,complete:()=>{this.$(".notify__popup").css("visibility","hidden")}});this.$(".notify__shadow").velocity({opacity:0},{duration:400,complete:()=>{this.$el.css("visibility","hidden");this.remove()}})}a11y$1.scrollEnable("body");$("html").removeClass("notify");a11y$1.popupClosed(this.$previousActiveElement);Adapt$1.trigger("notify:closed",this)}remove(...args){this.removeSubView();$(window).off("keyup",this.onKeyUp);super.remove(...args)}removeSubView(){if(!this.subView)return;this.subView.$el.off("resize",this.resetNotifySize);if(this.subView instanceof AdaptView$1){const views=[...this.subView.findDescendantViews(),this.subView];views.forEach((view=>{view.model.set("_isReady",false);view.remove()}))}else{this.subView.remove()}this.subView=null}});var NotifyView=__AMD("core/js/views/notifyView",class NotifyView extends Backbone.View{className(){return"notify__container"}initialize(){this._stack=[];this.notifyPushes=new NotifyPushCollection;this.listenTo(Adapt$1,{"notify:popup":this._deprecated.bind(this,"popup"),"notify:alert":this._deprecated.bind(this,"alert"),"notify:prompt":this._deprecated.bind(this,"prompt"),"notify:push":this._deprecated.bind(this,"push")});this.render()}get stack(){return this._stack}get isOpen(){return this.stack.length>0}_deprecated(type,notifyObject){logging$1.deprecated(`NOTIFY DEPRECATED: Adapt.trigger('notify:${type}', notifyObject); is no longer supported, please use notify.${type}(notifyObject);`);return this.create(notifyObject,{_type:type})}render(){const notifyTemplate=Handlebars.templates.notify;this.$el.html(notifyTemplate());this.$el.appendTo("body")}create(notifyObject,defaults){notifyObject=_.defaults({},notifyObject,defaults,{_type:"popup",_shouldRenderId:false,_isCancellable:true,_showCloseButton:true,_closeOnShadowClick:true});if(notifyObject._type==="a11y-push")notifyObject._showCloseButton=false;switch(notifyObject._type){case"a11y-push":case"push":this.notifyPushes.push(notifyObject);return}return new NotifyPopupView({model:new NotifyModel(notifyObject),notify:this})}popup(notifyObject){return this.create(notifyObject,{_type:"popup"})}alert(notifyObject){return this.create(notifyObject,{_type:"alert"})}prompt(notifyObject){return this.create(notifyObject,{_type:"prompt"})}push(notifyObject){return this.create(notifyObject,{_type:"push"})}});const notify=new NotifyView;var notify$1=__AMD("core/js/notify",notify);class Scrolling extends Backbone.Controller{initialize(){this.scrollTo=this.scrollTo.bind(this);this.$html=$("html");this.isLegacyScrolling=true;Adapt$1.once("configModel:dataLoaded",this._loadConfig.bind(this))}_loadConfig(){const config=Adapt$1.config.get("_scrollingContainer");if(!config?._isEnabled)return;const limitTo=config._limitToSelector;const isIncluded=!limitTo||this.$html.is(limitTo)||this.$html.hasClass(limitTo);if(!isIncluded)return;this.isLegacyScrolling=false;this._windowScrollFix();this._addStyling();this._updateScrollbarWidth();this.listenTo(Adapt$1,"device:resize",this._updateScrollbarWidth)}_addStyling(){this.$html.addClass("adapt-scrolling")}_updateScrollbarWidth(){const $tester=$('"');$("body").append($tester);const scrollBarWidth=$tester.outerWidth()-$tester.find(".inner").outerWidth();$tester.remove();const documentStyle=document.documentElement.style;documentStyle.setProperty("--adapt-scrollbar-width",`${scrollBarWidth}px`)}_windowScrollFix(){const body=document.body;const html=Adapt$1.scrolling.$html[0];const scrollY={get:()=>body.scrollTop,set:value=>body.scrollTop=value};const scrollX={get:()=>body.scrollLeft,set:value=>body.scrollLeft=value};const scrollHeight={get:()=>body.scrollHeight,set:value=>body.scrollHeight=value};const scrollWidth={get:()=>body.scrollWidth,set:value=>body.scrollWidth=value};Object.defineProperties(window,{scrollY:scrollY,scrollX:scrollX,pageYOffset:scrollY,pageXOffset:scrollX});Object.defineProperties(html,{scrollHeight:scrollHeight,scrollWidth:scrollWidth});window.scrollTo=(...args)=>{const isObject=args.length===1&&typeof args[0]==="object"&&args[0]!==null;const left=(isObject?args[0].left:args[0])??null;const top=(isObject?args[0].top:args[1])??null;left!==null&&(body.scrollLeft=left);top!==null&&(body.scrollTop=top)};const MouseEvent=window.MouseEvent;Object.defineProperties(MouseEvent.prototype,{pageX:{get:function(){return this.clientX+scrollX.get()}},pageY:{get:function(){return this.clientY+scrollY.get()}}});const $window=$(window);$(document.body).on("scroll",(()=>$window.scroll()))}async scrollTo(selector,settings={}){logging$1.deprecated("Adapt.scrollTo and Adapt.scrolling.scrollTo, use router.navigateToElement instead.");return router$1.navigateToElement(selector,settings)}}const scrolling=new Scrolling;var scrolling$1=__AMD("core/js/scrolling",scrolling);class StartController extends Backbone.Controller{initialize(...args){super.initialize(...args);this._isSessionInProgress=false;this.model=null;this.setupListeners()}setupListeners(){this.listenTo(Adapt$1,{"adapt:start":this.onAdaptStart,"navigation:returnToStart":this.returnToStartLocation})}loadCourseData(){this.model=new LockingModel(Adapt$1.course.get("_start"))}setStartLocation(){if(!this._isSessionInProgress){this._isSessionInProgress=true;if(!this.isEnabled())return;return window.history.replaceState("","",this.getStartHash())}const hash=this.isEnabled()?this.getStartHash(false):"#/";router$1.navigate(hash,{trigger:true,replace:true})}returnToStartLocation(){const startIds=this.model.get("_startIds");if(startIds){startIds.forEach((startId=>startId._skipIfComplete=false))}window.location.hash=this.getStartHash(true)}getStartHash(alwaysForce){const startId=this.getStartId();const isRouteSpecified=window.location.href.indexOf("#")>-1;const shouldForceStartId=alwaysForce||this.model.get("_force");const shouldNavigateToStartId=startId&&(!isRouteSpecified||shouldForceStartId);if(shouldNavigateToStartId&&startId!==Adapt$1.course.get("_id"))return`#/id/${startId}`;return window.location.hash||"#/"}isEnabled(){return Boolean(this.model?.get("_isEnabled"))}getStartId(){let startId=this.model.get("_id");const startIds=this.model.get("_startIds");if(!startIds?.length)return startId;const $html=$("html");for(let i=0,l=startIds.length;i{logging$1.deprecated("Use wait.begin() as Adapt.trigger('plugin:beginWait') will be removed in the future");wait$1.begin()};const endWait=()=>{logging$1.deprecated("Use wait.end() as Adapt.trigger('plugin:endWait') will be removed in the future");wait$1.end()};const ready=()=>{if(wait$1.isWaiting()){return}const isEventListening=Adapt$1._events["plugins:ready"];if(!isEventListening){return}logging$1.deprecated("Use wait.queue(callback) as Adapt.on('plugins:ready', callback) will be removed in the future");Adapt$1.trigger("plugins:ready")};Adapt$1.listenTo(wait$1,"ready",ready);Adapt$1.on({"plugin:beginWait":beginWait,"plugin:endWait":endWait});Adapt$1.on({"drawer:remove"(){logging$1.deprecated("Use drawer.remove, Adapt.trigger('drawer:remove') will be removed in the future");drawer.remove()},"drawer:closeDrawer"(){logging$1.deprecated("Use drawer.close, Adapt.trigger('drawer:closeDrawer') will be removed in the future");drawer.close()},"drawer:triggerCustomView"(){logging$1.deprecated("Use drawer.triggerCustomView(), Adapt.trigger('drawer:triggerCustomView') will be removed in the future");drawer.triggerCustomView()}});Object.defineProperties(drawer,{triggerCustomView:{get(){a11y$1.log.deprecated("drawer.triggerCustomView has moved to drawer.openCustomView");return drawer.openCustomView}}});Object.defineProperties(Adapt$1,{accessibility:{get(){a11y$1.log.deprecated("Adapt.accessibility has moved to a11y");return a11y$1}},a11y:{get(){logging$1.deprecated("Adapt.a11y, please use core/js/a11y directly");return a11y$1}},componentStore:{get(){logging$1.deprecated("Adapt.componentStore, please use core/js/components directly");return components$1._register}},data:{get(){logging$1.deprecated("Adapt.data, please use core/js/data directly");return data$1}},device:{get(){logging$1.deprecated("device, please use core/js/device directly");return device$1}},drawer:{get(){logging$1.deprecated("Adapt.drawer, please use core/js/drawer directly");return drawer}},findById:{get(){logging$1.deprecated("Adapt.findById, please use data.findById directly");return data$1.findById}},findViewByModelId:{get(){logging$1.deprecated("Adapt.findViewByModelId, please use data.findViewByModelId directly");return data$1.findViewByModelId}},findByTrackingPosition:{get(){logging$1.deprecated("Adapt.findByTrackingPosition, please use data.findByTrackingPosition directly");return data$1.findByTrackingPosition}},getViewName:{get(){logging$1.deprecated("Adapt.getViewName, please use components.getViewName instead");return components$1.getViewName}},getViewClass:{get(){logging$1.deprecated("Adapt.getViewClass, please use components.getViewClass instead");return components$1.getViewClass}},getModelName:{get(){logging$1.deprecated("Adapt.getModelName, please use components.getModelName instead");return components$1.getModelName}},getModelClass:{get(){logging$1.deprecated("Adapt.getModelClass, please use components.getModelClass instead");return components$1.getModelClass}},location:{get(){logging$1.deprecated("Adapt.location, please use core/js/location directly");return location$1}},log:{get(){logging$1.deprecated("Adapt.log, please use core/js/logging directly");return logging$1}},mpabc:{get(){logging$1.deprecated("Adapt.mpabc, please use core/js/mpabc directly");return mpabc$1}},notify:{get(){logging$1.deprecated("Adapt.notify, please use core/js/notify directly");return notify$1}},offlineStorage:{get(){logging$1.deprecated("offlineStorage, please use src/core/offlineStorage instead");return offlineStorage$1}},navigateToElement:{get(){logging$1.deprecated("Adapt.navigateToElement, please use router.navigateToElement");return router$1.navigateToElement}},register:{get(){logging$1.deprecated("Adapt.register, please use components.register instead");return components$1.register}},router:{get(){logging$1.deprecated("Adapt.router, please use core/js/router directly");return router$1}},scrolling:{get(){logging$1.deprecated("Adapt.scrolling, please use core/js/scrolling directly");return scrolling$1}},scrollTo:{get(){logging$1.deprecated("Adapt.scrollTo, please use router.navigateToElement");return scrolling$1.scrollTo}},startController:{get(){logging$1.deprecated("Adapt.startController, please use core/js/startController directly");return startController$1}},store:{get(){logging$1.deprecated("Adapt.store, please use core/js/components directly");return components$1._register}},tracking:{get(){logging$1.deprecated("Adapt.tracking, please use core/js/tracking directly");return tracking$1}},wait:{get(){logging$1.deprecated("Adapt.wait, please use src/core/wait instead");return wait$1}}});function onRender(cb){const intercept=(object,name,mode,cb)=>object[name]=cb.bind(object,object[name],name,mode);Object.keys(Handlebars.templates).forEach((name=>{intercept(Handlebars.templates,name,"template",cb)}));Object.keys(Handlebars.partials).forEach((name=>{intercept(Handlebars.partials,name,"partial",cb)}))}onRender(((template,name,mode,...args)=>{const preRenderEvent=new TemplateRenderEvent(`${mode}:preRender`,name,mode,null,args);Adapt$1.trigger(preRenderEvent.type,preRenderEvent);const value=template(...preRenderEvent.args);const postRenderEvent=new TemplateRenderEvent(`${mode}:postRender`,name,mode,value,preRenderEvent.args);Adapt$1.trigger(postRenderEvent.type,postRenderEvent);return postRenderEvent.value}));Adapt$1.on("app:dataReady",(()=>{const config=Adapt$1.config.get("_fixes");if(config?._imgLazyLoad===false)return;applyImgLoadingFix()}));function applyImgLoadingFix(){const findImgTag=/]*)>/gi;const hasLoadingAttr=/ loading=/gi;Adapt$1.on("template:postRender partial:postRender",(event=>{const imgTagsFound=event.value.match(findImgTag);if(!imgTagsFound){return}event.value=imgTagsFound.reduce(((value,img)=>{if(hasLoadingAttr.test(img)){return value}return value.replace(img,img.replace(findImgTag,''))}),event.value)}));Adapt$1.on("reactElement:preRender",(event=>{if(event.name!=="img")return;const options=event.args[1]=event.args[1]||{};if(options&&options.hasOwnProperty("loading"))return;options.loading="eager"}))}Adapt$1.on("app:dataReady",(()=>{const config=Adapt$1.config.get("_fixes");if(config?._jsxReactHelpersHTML===false)return;applyReactHelpersHTML()}));function applyReactHelpersHTML(){Adapt$1.on("reactElement:preRender",(event=>{let[tagName,props,...children]=event.args;if(!children)return;if(!Array.isArray(children))children=[children];children=children.filter(Boolean);const hasSomeUnsafeConversions=children.some((c=>c?.__html));if(!hasSomeUnsafeConversions)return;const hasManyChildren=children.length>1;if(hasManyChildren){event.args=event.args.map((child=>{if(!child||!child.__html)return child;const attributes=Object.entries(props).map((([name,value])=>`${name}="${value}"`)).join(" ");logging$1.warnOnce(`html() call should be the only child in its parent <${tagName} ${attributes}>`);return child.__html?HTMLReactParser__default["default"](child.__html):undefined}));return}props=event.args[1]=event.args[1]||{};props.dangerouslySetInnerHTML=children[0];event.args.length=2}))}Adapt$1.on("app:dataReady",(()=>{const config=Adapt$1.config.get("_fixes");if(config?._safariLabelClickBlur===false)return;applySafariLabelClickBlur()}));function onLabelClick(event){const input=document.querySelector(`[id="${event.currentTarget.getAttribute("for")}"]`);if(!input)return;event.preventDefault();input.click()}function applySafariLabelClickBlur(){Adapt$1.on("reactElement:preRender",(event=>{const[tagName,props]=event.args;if(tagName!=="label"||!Object.hasOwn(props,"htmlFor")||Object.hasOwn(props,"onClick"))return;props.onClick=onLabelClick}))}const helpers={lowercase(text){return text.toLowerCase()},capitalise(text){return text.charAt(0).toUpperCase()+text.slice(1)},inc(index){return index+1},dec(index){return index-1},odd(index){return(index+1)%2===0?"even":"odd"},equals(value,text,block){return helpers.compare.call(this,value,"==",text,block)},compare(value,operator,text,block){switch(operator){case"===":if(value===text)return block.fn?block.fn(this):true;break;case"=":case"==":if(value==text)return block.fn?block.fn(this):true;break;case">=":if(value>=text)return block.fn?block.fn(this):true;break;case"<=":if(value<=text)return block.fn?block.fn(this):true;break;case">":if(value>text)return block.fn?block.fn(this):true;break;case"<":if(value1;let description;if(hasOverride){description=override;description=helpers.compile(description,context)}else{description=this._globals._components["_"+this._component].ariaRegion;description=helpers.compile(description,override)}if(!description){return}return new Handlebars.SafeString('
'+description+"
")},a11y_text(text){logging$1.deprecated("a11y_text is no longer required. https://tink.uk/understanding-screen-reader-interaction-modes/");return text},a11y_normalize(htmls){return a11y$1.normalize.apply(a11y$1,arguments)},a11y_remove_breaks(htmls){return a11y$1.removeBreaks.apply(a11y$1,arguments)},a11y_aria_label(htmls){let values=Array.prototype.slice.call(arguments,0,-1);values=values.filter(Boolean);return new Handlebars.SafeString('
'+values.join(" ")+"
")},a11y_aria_label_relative(htmls){let values=Array.prototype.slice.call(arguments,0,-1);values=values.filter(Boolean);return new Handlebars.SafeString('
'+values.join(" ")+"
")},a11y_aria_image(texts){let values=Array.prototype.slice.call(arguments,0,-1);values=values.filter(Boolean);return new Handlebars.SafeString('')},a11y_wrap_focus(){const cfg=Adapt$1.config.get("_accessibility");if(cfg._isPopupWrapFocusEnabled===false)return"";return new Handlebars.SafeString(' ')},a11y_attrs_heading(level){logging$1.deprecated("a11y_attrs_heading, please use a11y_aria_level or a11y.ariaLevel");const resolvedLevel=a11y$1.ariaLevel({id:this._id??Array.from(arguments).lastItem?.data?.root?._id,level:level,override:this._ariaLevel});return new Handlebars.SafeString(` role="heading" aria-level="${resolvedLevel}" `)},a11y_aria_level(id,level,override=null){const resolvedLevel=a11y$1.ariaLevel({id:id,level:level,override:override});return resolvedLevel},a11y_attrs_tabbable(){logging$1.deprecated("a11y_attrs_tabbable should not be used. tabbable elements should be natively tabbable.");return new Handlebars.SafeString(' role="region" tabindex="0" ')},a11y_alt_text(visible,alternatives){let values=Array.prototype.slice.call(arguments,1,-1);values=values.filter(Boolean);return new Handlebars.SafeString(''+values.join(" ")+"")}};Object.assign(helpers,{if_value_equals(){logging$1.deprecated("if_value_equals, use equals instead.");return helpers.equals.apply(this,arguments)},numbers(){logging$1.deprecated("numbers, use inc instead.");return helpers.inc.apply(this,arguments)},lowerCase(){logging$1.deprecated("lowerCase, use lowercase instead.");return helpers.lowercase.apply(this,arguments)}});for(const name in helpers){Handlebars.registerHelper(name,helpers[name])}__AMD("core/js/helpers",helpers);class HeadingView extends Backbone.View{initialize(){this.listenTo(Adapt$1.parentView,"postRemove",this.remove);this.listenTo(this.model,"change:_isComplete",this.updateAria);this.render()}render(){const template=Handlebars.templates[this.constructor.template];const data=this.model.toJSON();const customHeadingType=this.$el.attr("data-a11y-heading-type");const isBackwardCompatible=[...this.$el[0].classList].every((name=>!name.includes("-inner")));data._isBackwardCompatible=isBackwardCompatible;if(customHeadingType)data._type=customHeadingType;if(data._type==="course")data._type="menu";this.$el.html(template(data));this.checkCompletion()}updateAria(){const template=Handlebars.templates[this.constructor.template];const data=this.model.toJSON();const $rendered=$(`
${template(data)}
`);this.$(".aria-label").html($rendered.find(".aria-label").html());this.checkCompletion()}checkCompletion(){const isComplete=this.model.get("_isComplete");if(isComplete===undefined)return;this.$el.toggleClass("is-complete",isComplete).toggleClass("is-incomplete",!isComplete)}}HeadingView.template="heading";var HeadingView$1=__AMD("core/js/views/headingView",HeadingView);class Headings extends Backbone.Controller{initialize(){this.listenTo(Adapt$1,"view:render",this.onViewRender)}onViewRender(view){const $headingSeats=view.$(".js-heading");$headingSeats.each(((index,el)=>new HeadingView$1({el:el,model:view.model})))}}__AMD("core/js/headings",new Headings);var NavigationButtonView=__AMD("core/js/views/NavigationButtonView",class NavigationButtonView extends Backbone.View{tagName(){return"button"}events(){return{click:"triggerEvent"}}className(){if(this.isInjectedButton){return[this.model.get("_showLabel")===false&&"hide-label"].filter(Boolean).join(" ")}return["btn-icon nav__btn",this.model.get("_classes"),this.model.get("_showLabel")===false&&"hide-label"].filter(Boolean).join(" ")}attributes(){const attributes=this.model.toJSON();if(this.isInjectedButton){return{name:attributes._id,"data-order":attributes._order,"data-event":attributes._event}}return{name:attributes._id,role:attributes._role==="button"?undefined:attributes._role,"aria-label":attributes.ariaLabel,"data-order":attributes._order,"data-event":attributes._event}}initialize({el:el}){if(el){this.isInjectedButton=true}else{this.isJSX=(this.constructor.template||"").includes(".jsx")}this._classSet=new Set(_.result(this,"className").trim().split(/\s+/));this._attributes=_.result(this,"attributes");this.listenTo(this.model,"change",this.changed);this.render()}static get template(){return"navButton.jsx"}render(){if(this.isInjectedButton){this.changed()}else if(this.isJSX){this.changed()}else{const data=this.model.toJSON();data.view=this;const template=Handlebars.templates[this.constructor.template];this.$el.html(template(data))}return this}updateViewProperties(){const classesToAdd=_.result(this,"className").trim().split(/\s+/);classesToAdd.forEach((i=>this._classSet.add(i)));const classesToRemove=[...this._classSet].filter((i=>!classesToAdd.includes(i)));classesToRemove.forEach((i=>this._classSet.delete(i)));Object.keys(this._attributes).forEach((name=>this.$el.removeAttr(name)));Object.entries(_.result(this,"attributes")).forEach((([name,value])=>this.$el.attr(name,value)));this.$el.removeClass(classesToRemove).addClass(classesToAdd)}injectLabel(){const textLabel=this.$el.find("> .nav__btn-label");const ariaLabel=this.$el.attr("aria-label")??this.$el.find(".aria-label").text();const text=this.model.get("text");const output=compile(text??"",{ariaLabel:ariaLabel});if(!textLabel.length){this.$el.append(``);return}textLabel.html(output)}changed(eventName=null){if(typeof eventName==="string"&&eventName.startsWith("bubble")){return}if(this.isInjectedButton){this.updateViewProperties();this.injectLabel();return}if(!this.isJSX){this.updateViewProperties();return}const props={...this,...this.model.toJSON(),_globals:Adapt$1.course?.get("_globals")};const Template=templates[this.constructor.template.replace(".jsx","")];this.updateViewProperties();ReactDOM__default["default"].render(React__default["default"].createElement(Template,props),this.el)}triggerEvent(event){event.preventDefault();const currentEvent=$(event.currentTarget).attr("data-event");if(!currentEvent)return;Adapt$1.trigger("navigation:"+currentEvent);switch(currentEvent){case"backButton":router$1.navigateToPreviousRoute();break;case"homeButton":router$1.navigateToHomeRoute();break;case"parentButton":router$1.navigateToParent();break;case"skipNavigation":_.delay((()=>{a11y$1.focusFirst("."+location$1._contentType)}),250);break;case"returnToStart":startController$1.returnToStartLocation();break}}remove(){this._isRemoved=true;this.stopListening();wait$1.for((end=>{if(this.isJSX){ReactDOM__default["default"].unmountComponentAtNode(this.el)}super.remove();end()}));return this}});var NavigationButtonModel=__AMD("core/js/models/NavigationButtonModel",class NavigationButtonModel extends LockingModel{defaults(){return{_id:"",_classes:"",_iconClasses:"",_order:0,_event:"",_showLabel:null,_role:"button",ariaLabel:"",text:"{{ariaLabel}}"}}});class NavigationView extends Backbone.View{className(){return["nav",this.model?.get("_showLabel")===true?"show-label":"hide-label",`show-label-${this.model?.get("_showLabelAtWidth")||"medium"}`,`has-label-${this.model?.get("_labelPosition")||"auto"}`].filter(Boolean).join(" ")}attributes(){return{role:"navigation"}}get buttons(){return this._buttons=this._buttons||[]}set buttons(value){this._buttons=value}initialize(){___default["default"].bindAll(this,"sortNavigationButtons");this._classSet=new Set(___default["default"].result(this,"className").trim().split(/\s+/))}start(model){tooltips$1.register({_id:"back",...Adapt$1.course.get("_globals")?._extensions?._navigation?._backNavTooltip||{}});this.model=model;this.listenTo(model,"change",this.update);this.listenToOnce(Adapt$1,"courseModel:dataLoading",this.remove);this.listenTo(Adapt$1,{"router:contentObject":this.hideNavigationButton,"adapt:preInitialize device:resize":this.onDeviceResize});this.update();this.preRender()}update(){this.updateViewProperties();this.onDeviceResize()}onDeviceResize(){let{_navigationAlignment:_navigationAlignment="top",_isBottomOnTouchDevices:_isBottomOnTouchDevices=false}=this.model.toJSON();const $html=$("html");const isBottomOnTouchDevices=device$1.touch&&_isBottomOnTouchDevices;if(isBottomOnTouchDevices)_navigationAlignment="bottom";$html.removeClass("is-nav-top is-nav-bottom").addClass("is-nav-"+_navigationAlignment)}preRender(){Adapt$1.trigger("navigationView:preRender",this);this.render()}render(){const template=Handlebars.templates[this.constructor.template];this.$el.html(template({_config:Adapt$1.config.toJSON(),_globals:Adapt$1.course.get("_globals"),_accessibility:Adapt$1.config.get("_accessibility")})).insertBefore("#app");this.sortNavigationButtons();___default["default"].defer((()=>{Adapt$1.trigger("navigationView:postRender navigation:ready",this)}));return this}updateViewProperties(){const classesToAdd=___default["default"].result(this,"className").trim().split(/\s+/);classesToAdd.forEach((i=>this._classSet.add(i)));const classesToRemove=[...this._classSet].filter((i=>!classesToAdd.includes(i)));classesToRemove.forEach((i=>this._classSet.delete(i)));this._setAttributes({...___default["default"].result(this,"attributes"),id:___default["default"].result(this,"id")});this.$el.removeClass(classesToRemove).addClass(classesToAdd)}listenForInjectedButtons(){this.observer=this.observer||new MutationObserver(this.sortNavigationButtons);this.observer.observe(this.$(".nav__inner")[0],{childList:true,attributes:true,subtree:true})}sortNavigationButtons(changed){if(Array.isArray(changed)){const changes=Object.entries(changed.reduce(((changes,change)=>{const changeTypeName=`${change.type}.${change.attributeName}`;changes[changeTypeName]=changes[changeTypeName]||0;changes[changeTypeName]++;return changes}),{}));const shouldIgnore=changes.every((([key])=>["attributes.data-a11y-force-focus","attributes.tabindex","attributes.aria-hidden","attributes.aria-expanded"].includes(key)));if(shouldIgnore)return}this.observer?.disconnect();const $container=this.$(".nav__inner");const items=[...$container[0].children];const identifiers={".js-nav-drawer-btn":"drawer",".js-nav-back-btn":"back",".js-nav-home-btn":"home","*":null};items.forEach((el=>{const $el=$(el);if($el.is(".nav__spacer"))return;const foundId=($el.attr("name")??Object.entries(identifiers).find((([classes])=>$el.is(classes)))?.[1])||$el.attr("class");const attributes={_id:foundId,_order:parseFloat($el.attr("data-order")||0),_event:$el.attr("data-event")};const existingButton=this.getButton(attributes._id);if(existingButton){if(!existingButton.isInjectedButton)return;if(existingButton.el!==el){existingButton.undelegateEvents();existingButton.el=el;existingButton.$el=$(el);existingButton.delegateEvents()}existingButton.model.set(attributes);existingButton.changed();return}const navigationButtonModel=new NavigationButtonModel(attributes);this.addButton(new NavigationButtonView({el:el,model:navigationButtonModel}))}));const focusElement=document.activeElement;const domOrder=[...$container[0].children];items.sort(((a,b)=>parseFloat($(a).attr("data-order")||0)-parseFloat($(b).attr("data-order")||0)));const hasOrderChanged=domOrder.some(((item,index)=>item!==items[index]));if(hasOrderChanged){let indexOfFocused=items.findIndex((el=>el===focusElement));if(indexOfFocused===-1)indexOfFocused=Infinity;const before=items.slice(0,indexOfFocused);const after=items.slice(indexOfFocused+1);before.reverse().forEach((el=>$container.prepend(el)));after.forEach((el=>$container.append(el)))}this.observer?.takeRecords();this.listenForInjectedButtons()}hideNavigationButton(contentObjectModel){const shouldHide=contentObjectModel.get("_type")==="course";this.$(".nav__back-btn, .nav__home-btn").toggleClass("u-display-none",shouldHide)}showNavigationButton(){this.$(".nav__back-btn, .nav__home-btn").removeClass("u-display-none")}addButton(buttonView){this.buttons.push(buttonView);const container=this.$(".nav__inner");container.append(buttonView.$el);this.listenTo(buttonView.model,"change",this.sortNavigationButtons);if(buttonView.isInjectedButton)return;this.sortNavigationButtons()}getButton(id){return this.buttons.find((button=>button.model.get("_id")===id))}removeButton(buttonView){this.buttons=this.buttons.filter((view=>view!==buttonView));this.stopListening(buttonView.model,"change",this.sortNavigationButtons);if(buttonView.isInjectedButton){buttonView.$el.remove();return}buttonView.remove()}}NavigationView.template="nav";var NavigationView$1=__AMD("core/js/views/navigationView",NavigationView);var NavigationModel=__AMD("core/js/models/NavigationModel",class NavigationModel extends LockingModel{defaults(){return{_navigationAlignment:"top",_isBottomOnTouchDevices:false,_showLabel:false,_showLabelAtWidth:"medium",_labelPosition:"auto"}}});class NavigationController extends Backbone.Controller{initialize(){this.navigation=new NavigationView$1;this.listenTo(Adapt$1,"adapt:preInitialize",this.addNavigationBar)}addNavigationBar(){const adaptConfig=Adapt$1.course.get("_navigation");if(adaptConfig?._isDefaultNavigationDisabled){Adapt$1.trigger("navigation:initialize");return}this.navigation.start(new NavigationModel(adaptConfig))}}__AMD("core/js/navigation",Adapt$1.navigation=(new NavigationController).navigation);class DOMElementModificationEventObject{constructor({type:type,target:target,changedAttributes:changedAttributes,previousAttributes:previousAttributes}={}){this.type=type;this.target=target;this.changedAttributes=changedAttributes;this.previousAttributes=previousAttributes}}class DOMElementModifications extends Backbone__default["default"].View{initialize({el:el=document.documentElement,watchImmediateChildrenOnly:watchImmediateChildrenOnly=true,watchAttributes:watchAttributes=false}={}){this._onMutation=this._onMutation.bind(this);this.el=el;this._watch={childList:true,subtree:!watchImmediateChildrenOnly,attributes:watchAttributes,attributeOldValue:watchAttributes}}startWatching(){this._calculateElementFilters();if(this._observer)return this;this._observer=new MutationObserver(this._onMutation);this._observer.observe(this.el,this._watch);return this}static calculateEventNames(eventNames){const firstEvent=eventNames[0];const isNew=firstEvent==="added";const lastRemovedIndex=eventNames.lastIndexOf("removed");const lastAddedIndex=eventNames.lastIndexOf("added");const hasReAdded=lastRemovedIndex!==-1&&lastAddedIndex!==-1&&lastRemovedIndex{let addedNodes=Array.from(item.addedNodes);let removedNodes=Array.from(item.removedNodes);const allNodes=[...addedNodes,...removedNodes];const isTextChange=allNodes.some((node=>node.nodeType===Node.TEXT_NODE));const isAttributeChange=this._watch.attributes&&item.type==="attributes";addedNodes=addedNodes.filter((node=>node.nodeType===Node.ELEMENT_NODE));removedNodes=removedNodes.filter((node=>node.nodeType===Node.ELEMENT_NODE));const isAddedEvent=Boolean(addedNodes.length);const isRemovedEvent=Boolean(removedNodes.length);const isChangedEvent=Boolean(isAttributeChange||isTextChange);if(!isAddedEvent&&!isRemovedEvent&&!isChangedEvent)return changes;const targetNodes=isChangedEvent?[item.target]:Array.from(isAddedEvent?addedNodes:removedNodes).flatMap((node=>this._watch.subtree?[node,...node.querySelectorAll("*")]:[node]));const eventName=isAddedEvent?"added":isRemovedEvent?"removed":"changed";targetNodes.forEach((target=>{const value=changes.get(target)??{eventNames:[],previousAttributes:this._watch.attributes?{}:null};value.eventNames.push(eventName);const shouldRecordAttribute=isChangedEvent&&item.attributeName;if(shouldRecordAttribute)value.previousAttributes[item.attributeName]??=item.oldValue;changes.set(target,value)}));return changes}),new Map);for(let[target,{eventNames:eventNames,previousAttributes:previousAttributes}]of reducedChanges.entries()){eventNames=DOMElementModifications.calculateEventNames(eventNames);eventNames.forEach((eventName=>{const isNodeAdded=eventName==="added";const isNodeRemoved=eventName==="removed";const selectorFilters=isNodeAdded?this._addedFilters:isNodeRemoved?this._removedFilters:this._changedFilters;if(!selectorFilters.length)return;const selectors=selectorFilters.map((filter=>filter(target))).filter(Boolean);if(!selectors.length)return;const changedAttributes=this._watch.attributes?Object.keys(previousAttributes).reduce(((attributes,attrName)=>{attributes[attrName]=target.getAttribute(attrName);return attributes}),{}):null;const EventObject=new DOMElementModificationEventObject({type:eventName,target:target,changedAttributes:changedAttributes,previousAttributes:previousAttributes});selectors.forEach((selector=>{if(selector&&selector!==true){if(eventName!=="changed")this.trigger(`${eventName}:${selector}`,EventObject);this.trigger(`changed:${selector}`,EventObject)}if(eventName!=="changed")this.trigger(`${eventName}`,EventObject);this.trigger("changed",EventObject)}))}))}}stopWatching(){this._calculateElementFilters();if(!this._observer)return this;this._observer.disconnect();this._observer=null;return this}_calculateElementFilters(){const selectorFilter=selector=>{const eventWithNoSelector=selector===undefined;if(eventWithNoSelector)return()=>true;if(Element.prototype.matches){return new Function("el",`return el.matches("${selector}") && "${selector}";`)}return new Function("el",`return $(el).is("${selector}") && "${selector}";`)};const eventNames=Object.keys(this._events);const eventNameParts=eventNames.map((name=>name.split(":")));const changedSelectors=eventNameParts.filter((parts=>parts[0]==="changed")).map((parts=>parts[1]));const addedSelectors=eventNameParts.filter((parts=>parts[0]==="added")).map((parts=>parts[1]));const removedSelectors=eventNameParts.filter((parts=>parts[0]==="removed")).map((parts=>parts[1]));this._changedFilters=changedSelectors.map(selectorFilter);this._addedFilters=addedSelectors.map(selectorFilter).concat(this._changedFilters);this._removedFilters=removedSelectors.map(selectorFilter).concat(this._changedFilters)}on(...args){const rtn=super.on(...args);if(this.shouldListen)this.startWatching();return rtn}once(...args){const rtn=super.once(...args);if(this.shouldListen)this.startWatching();return rtn}listenToOnce(...args){const rtn=super.listenToOnce(...args);if(this.shouldListen)this.startWatching();return rtn}off(...args){const rtn=super.off(...args);if(!this.shouldListen)this.stopWatching();return rtn}stopListening(...args){const rtn=super.stopListening(...args);if(!this.shouldListen)this.stopWatching();return rtn}get shouldListen(){return Boolean(Object.keys(this._events).length||Object.keys(this._listeners).length)}}const documentModifications=new DOMElementModifications({el:document.documentElement,watchImmediateChildrenOnly:false,watchAttributes:true});documentModifications.DOMElementModifications=DOMElementModifications;__AMD("core/js/DOMElementModifications",documentModifications);var AssessmentResultsModel=__AMD("components/adapt-contrib-assessmentResults/js/assessmentResultsModel",class AssessmentResultsModel extends ComponentModel$1{init(...args){this.set("originalBody",this.get("body"));this.listenTo(Adapt$1,{"assessments:complete":this.onAssessmentComplete,"assessments:reset":this.onAssessmentReset});super.init(...args)}checkIfAssessmentComplete(){if(!Adapt$1.assessment||this.get("_assessmentId")===undefined){return}const assessmentModel=Adapt$1.assessment.get(this.get("_assessmentId"));if(!assessmentModel||assessmentModel.length===0)return;const state=assessmentModel.getState();const isResetOnRevisit=assessmentModel.get("_assessment")._isResetOnRevisit;if(state.isComplete&&(!state.allowResetIfPassed||!isResetOnRevisit)){this.onAssessmentComplete(state);return}this.setVisibility()}onAssessmentComplete(state){if(this.get("_assessmentId")===undefined||this.get("_assessmentId")!==state.id)return;this._state=state;this.set({attempts:state.attempts,attemptsSpent:state.attemptsSpent,attemptsLeft:state.attemptsLeft,score:state.score,scoreAsPercent:state.scoreAsPercent,maxScore:state.maxScore,isPass:state.isPass});this.setFeedbackBand(state);this.setHasAttemptsLeft(state);this.checkRetryEnabled(state);this.setFeedbackText();this.toggleVisibility(true)}setFeedbackBand(state){const scoreProp=state.isPercentageBased?"scoreAsPercent":"score";const bands=_.sortBy(this.get("_bands"),"_score");for(let i=bands.length-1;i>=0;i--){const isScoreInBandRange=state[scoreProp]>=bands[i]._score;if(!isScoreInBandRange)continue;this.set("_feedbackBand",bands[i]);break}}setHasAttemptsLeft(state){const hasAttemptsLeft=state.attemptsLeft>0||state.attemptsLeft==="infinite";this.set("hasAttemptsLeft",hasAttemptsLeft)}checkRetryEnabled(state){const assessmentModel=Adapt$1.assessment.get(state.id);if(!assessmentModel.canResetInPage())return false;const feedbackBand=this.get("_feedbackBand");const isRetryEnabled=(feedbackBand&&feedbackBand._allowRetry)!==false;const showRetry=isRetryEnabled&&this.get("hasAttemptsLeft")&&(!state.isPass||state.allowResetIfPassed);this.set({_isRetryEnabled:showRetry,retryFeedback:showRetry?this.get("_retry").feedback:""})}getFeedbackText(){const feedbackBand=this.get("_feedbackBand");if(!feedbackBand)return"";if(this.get("hasAttemptsLeft")&&feedbackBand?.feedbackNotFinal){return feedbackBand.feedbackNotFinal}return feedbackBand.feedback}setFeedbackText(){const feedback=this.getFeedbackText();this.set({feedback:Handlebars.compile(feedback)(this.toJSON()),body:this.get("_completionBody")})}setVisibility(){if(!Adapt$1.assessment)return;const assessmentModel=Adapt$1.assessment.get(this.get("_assessmentId"));if(!assessmentModel||assessmentModel.length===0)return;const state=assessmentModel.getState();const isAttemptInProgress=state.attemptInProgress;const isComplete=!isAttemptInProgress&&state.isComplete;const isVisibleBeforeCompletion=this.get("_isVisibleBeforeCompletion")||false;const isVisible=isVisibleBeforeCompletion||isComplete;this.toggleVisibility(isVisible)}toggleVisibility(isVisible){if(isVisible===undefined){isVisible=!this.get("_isVisible")}this.set("_isVisible",isVisible,{pluginName:"assessmentResults"})}checkCompletion(){if(this.get("_setCompletionOn")==="pass"&&!this.get("isPass")){return}this.setCompletionStatus()}onAssessmentReset(state){if(this.get("_assessmentId")===undefined||this.get("_assessmentId")!==state.id)return;let resetType=this.get("_resetType");if(!resetType||resetType==="inherit"){resetType=state.resetType||"hard"}this.reset(resetType,true)}reset(...args){this.set({body:this.get("originalBody"),state:null,hasAttemptsLeft:true,feedbackNotFinal:"",feedback:"",_feedbackBand:null,retryFeedback:"",_isRetryEnabled:false});super.reset(...args)}});class ComponentView extends AdaptView$1{attributes(){if(!this.model.get("_isA11yRegionEnabled")){return AdaptView$1.resultExtend("attributes",{},this)}return AdaptView$1.resultExtend("attributes",{"aria-labelledby":this.model.get("_id")+"-heading",role:"region"},this)}className(){return["component",this.model.get("_component").toLowerCase(),this.model.get("_id"),this.model.get("_classes"),this.setVisibility(),this.setHidden(),"is-"+this.model.get("_layout"),this.model.get("_isComplete")?"is-complete":"",this.model.get("_isOptional")?"is-optional":""].join(" ")}renderState(){logging$1.removed("renderState is removed and moved to item title")}setupInviewCompletion(inviewElementSelector=".component__inner",callback=this.setCompletionStatus){this.$inviewElement=this.$(inviewElementSelector);this.inviewCallback=callback;this.$inviewElement.on("inview.componentView",this.onInview.bind(this))}removeInviewListener(){if(!this.$inviewElement)return;this.$inviewElement.off("inview.componentView");this.$inviewElement=null}onInview(event,visible,visiblePartX,visiblePartY){if(!visible)return;switch(visiblePartY){case"top":this.hasSeenTop=true;break;case"bottom":this.hasSeenBottom=true;break;case"both":this.hasSeenTop=this.hasSeenBottom=true}if(!this.hasSeenTop||!this.hasSeenBottom)return;this.inviewCallback();if(this.model.get("_isComplete")){this.removeInviewListener()}}postRender(){}remove(){this.removeInviewListener();super.remove()}}ComponentView.type="component";var ComponentView$1=__AMD("core/js/views/componentView",ComponentView);class AssessmentResultsView extends ComponentView$1{events(){return{"click .js-assessment-retry-btn":"onRetryClicked"}}preRender(){this.model.setLocking("_isVisible",false);this.listenTo(Adapt$1.parentView,"preRemove",(()=>{this.model.unsetLocking("_isVisible")}));this.listenTo(this.model,{"change:_feedbackBand":this.addClassesToArticle,"change:body":this.render})}postRender(){this.model.checkIfAssessmentComplete();this.setReadyStatus();this.setupInviewCompletion(".component__inner",this.model.checkCompletion.bind(this.model))}onRetryClicked(){const state=this.model._state;Adapt$1.assessment.get(state.id).reset(null,(wasReset=>{if(!wasReset)return;if(this.model.get("_retry")._routeToAssessment!==true)return;router$1.navigateToElement(`.${state.articleId}`)}))}addClassesToArticle(model,value){if(!value?._classes)return;this.$el.parents(".article").addClass(value._classes)}}AssessmentResultsView.template="assessmentResults.jsx";var AssessmentResultsView$1=__AMD("components/adapt-contrib-assessmentResults/js/assessmentResultsView",AssessmentResultsView);__AMD("components/adapt-contrib-assessmentResults/js/adapt-contrib-assessmentResults",components$1.register("assessmentResults",{model:AssessmentResultsModel,view:AssessmentResultsView$1}));class GraphicView extends ComponentView$1{className(){return[super.className(),this.model.get("_isScrollable")&&"is-scrollable"].filter(Boolean).join(" ")}events(){return{"click .js-graphic-link":"onClick","keydown .js-graphic-scrollbar":"onKeyDown"}}postRender(){this.$(".graphic__widget").imageready((()=>{this.setReadyStatus();this.setupInviewCompletion(".graphic__widget");this.setupScrollable()}))}setupScrollable(){if(!this.model.get("_isScrollable"))return;this.onScroll=_.debounce(this.onScroll.bind(this),17);const $scrollbar=this.$(".js-graphic-scrollbar");const $scrollContainer=this.$(`#${$scrollbar.attr("aria-controls")}`);$scrollContainer.on("scroll",this.onScroll);this.onKeyDown()}onScroll(event){if(!this.model.get("_isScrollable"))return;const $scrollbar=this.$(".js-graphic-scrollbar");const $scrollContainer=this.$(`#${$scrollbar.attr("aria-controls")}`);const{clientWidth:clientWidth,scrollWidth:scrollWidth}=$scrollContainer[0];const scrollableWidth=scrollWidth-clientWidth;const left=$scrollContainer.scrollLeft();const calculatedScrollPercent=parseInt(left/scrollableWidth*100);this.model.set("_scrollPercent",calculatedScrollPercent)}onKeyDown(event){if(!this.model.get("_isScrollable"))return;const $scrollbar=this.$(".js-graphic-scrollbar");const $scrollContainer=this.$(`#${$scrollbar.attr("aria-controls")}`);const{clientWidth:clientWidth,scrollWidth:scrollWidth}=$scrollContainer[0];const scrollableWidth=scrollWidth-clientWidth;const step=clientWidth*.1;let left=$scrollContainer.scrollLeft();const calculatedScrollPercent=parseInt(left/scrollableWidth*100);const definedScrollPercent=this.model.get("_scrollPercent")??0;if(definedScrollPercent!==calculatedScrollPercent){left=definedScrollPercent/100*scrollableWidth}switch(event?.which){case 37:left-=step;break;case 39:left+=step;break}left=_.max([0,_.min([scrollableWidth,left])]);$scrollContainer.scrollLeft(left)}onClick(event){if(event)event.preventDefault();const item=this.model.get("_graphic");const{_url:url,_target:target="_blank"}=item;const isNewWindow=target!=="_self";if(isNewWindow)return window.open(url,target);const isRouterNavigation=url.substr(0,1)==="#";if(isRouterNavigation)return Backbone.history.navigate(url,{trigger:true});window.location.href=url}preRemove(){if(!this.model.get("_isScrollable"))return;const $scrollbar=this.$(".js-graphic-scrollbar");const $scrollContainer=this.$(`#${$scrollbar.attr("aria-controls")}`);$scrollContainer.off("scroll",this.onScroll)}}GraphicView.template="graphic.jsx";var GraphicView$1=__AMD("components/adapt-contrib-graphic/js/GraphicView",GraphicView);var GraphicModel=__AMD("components/adapt-contrib-graphic/js/GraphicModel",class GraphicModel extends ComponentModel$1{init(){this.set("_scrollPercent",this.get("_defaultScrollPercent"))}});__AMD("components/adapt-contrib-graphic/js/adapt-contrib-graphic",components$1.register("graphic",{model:GraphicModel,view:GraphicView$1}));const BUTTON_STATE=ENUM(["SUBMIT","CORRECT","INCORRECT","SHOW_CORRECT_ANSWER","HIDE_CORRECT_ANSWER","SHOW_FEEDBACK","RESET"]);var BUTTON_STATE$1=__AMD("core/js/enums/buttonStateEnum",BUTTON_STATE);const textPropertyName={SUBMIT:"submit",CORRECT:"correct",INCORRECT:"incorrect",SHOW_CORRECT_ANSWER:"showCorrectAnswer",HIDE_CORRECT_ANSWER:"hideCorrectAnswer",SHOW_FEEDBACK:"showFeedback",RESET:"reset"};var ButtonsView=__AMD("core/js/views/buttonsView",class ButtonsView extends Backbone.View{initialize(options){this.parent=options.parent;this.listenTo(Adapt$1.parentView,"postRemove",this.remove);this.listenTo(this.model,{"change:_buttonState":this.onButtonStateChanged,"change:feedbackMessage":this.onFeedbackMessageChanged,"change:feedbackTitle":this.onFeedbackMessageChanged,"change:_attemptsLeft":this.onAttemptsChanged,"change:_canSubmit":this.onCanSubmitChange});this.render()}events(){return{"click .js-btn-action":"onActionClicked","click .js-btn-feedback":"onFeedbackClicked"}}render(){const data=this.model.toJSON();const template=Handlebars.templates.buttons;_.defer((()=>{this.postRender();Adapt$1.trigger("buttonsView:postRender",this)}));this.$el.html(template(data))}postRender(){this.refresh()}checkResetSubmittedState(){const isSubmitted=this.model.get("_isSubmitted");if(isSubmitted){this.$el.addClass("is-submitted");return}this.$(".js-btn-marking, .js-btn-marking-label").removeClass("is-incorrect is-correct").addClass("u-display-none");this.$el.removeClass("is-submitted");this.model.set("feedbackMessage",undefined);this.disableFeedbackButton()}onActionClicked(){const buttonState=BUTTON_STATE$1(this.model.get("_buttonState"));this.trigger("buttons:stateUpdate",buttonState);this.checkResetSubmittedState();if(buttonState===BUTTON_STATE$1.SHOW_CORRECT_ANSWER){const correctAnswer=this.model.getCorrectAnswerAsText?.();this.updateAnswerLiveRegion(correctAnswer)}if(buttonState===BUTTON_STATE$1.HIDE_CORRECT_ANSWER){const userAnswer=this.model.getUserAnswerAsText?.();this.updateAnswerLiveRegion(userAnswer)}}onFeedbackClicked(){this.trigger("buttons:stateUpdate",BUTTON_STATE$1.SHOW_FEEDBACK)}onFeedbackMessageChanged(model,changedAttribute){if(!changedAttribute)return;this.enableFeedbackButton()}enableFeedbackButton(){if(!this.model.get("_canShowFeedback"))return;a11y$1.toggleEnabled(this.$(".js-btn-feedback"),true)}disableFeedbackButton(){a11y$1.toggleEnabled(this.$(".js-btn-feedback"),false)}onCanSubmitChange(){this.onButtonStateChanged(this.model,this.model.get("_buttonState"))}onButtonStateChanged(model,changedAttribute){this.updateAttemptsCount();const $buttonsAction=this.$(".js-btn-action");const buttonState=BUTTON_STATE$1(changedAttribute);if(!buttonState){return logging$1.error(`No button state found for '${changedAttribute}'`)}if(changedAttribute===BUTTON_STATE$1.CORRECT||changedAttribute===BUTTON_STATE$1.INCORRECT){a11y$1.toggleEnabled($buttonsAction,false);return}const propertyName=textPropertyName[buttonState.asString];const ariaLabel=this.model.get("_buttons")["_"+propertyName].ariaLabel;const buttonText=this.model.get("_buttons")["_"+propertyName].buttonText;a11y$1.toggleEnabled($buttonsAction,this.model.get("_canSubmit"));$buttonsAction.html(buttonText).attr("aria-label",ariaLabel)}checkFeedbackState(){const canShowFeedback=this.model.get("_canShowFeedback");const canShowMarking=this.model.get("_canShowMarking");this.$(".js-btn-action, .js-btn-marking").toggleClass("is-full-width",!canShowFeedback);this.$(".js-btn-feedback").toggleClass("u-display-none",!canShowFeedback);this.$(".js-btn-marking, .js-btn-marking-label").toggleClass("u-display-none",!canShowMarking)}updateAttemptsCount(){const isInteractionComplete=this.model.get("_isInteractionComplete");const attemptsLeft=this.model.get("_attemptsLeft")?this.model.get("_attemptsLeft"):this.model.get("_attempts");const shouldDisplayAttempts=this.model.get("_shouldDisplayAttempts");let attemptsString;this.checkResetSubmittedState();if(!isInteractionComplete&&attemptsLeft>=0){attemptsString=attemptsLeft+" ";attemptsString+=attemptsLeft===1?this.model.get("_buttons").remainingAttemptText:this.model.get("_buttons").remainingAttemptsText}else{this.$(".js-display-attempts").addClass("u-visibility-hidden");this.showMarking()}if(shouldDisplayAttempts){this.$(".js-insert-attempts-string").html(attemptsString)}}updateAnswerLiveRegion(answer){if(!answer)return;this.$(".js-answer-live-region").html(answer)}showMarking(){if(!this.model.shouldShowMarking)return;const isCorrect=this.model.get("_isCorrect");const ariaLabels=Adapt$1.course.get("_globals")._accessibility._ariaLabels;const $marking=this.$(".js-btn-marking, .js-btn-marking-label").removeClass("u-display-none").addClass(isCorrect?"is-correct":"is-incorrect");const $ariaLabel=this.$(".js-btn-marking-label");const hasSpanAriaLabel=Boolean($ariaLabel.length);if(!hasSpanAriaLabel){$marking.attr("aria-label",isCorrect?ariaLabels.answeredCorrectly:ariaLabels.answeredIncorrectly);return}$ariaLabel.html(isCorrect?ariaLabels.answeredCorrectly:ariaLabels.answeredIncorrectly)}refresh(){this.updateAttemptsCount();this.checkResetSubmittedState();this.checkFeedbackState();this.onButtonStateChanged(null,this.model.get("_buttonState"));this.onFeedbackMessageChanged(null,this.model.get("_isSubmitted"))}});class QuestionModel extends ComponentModel$1{defaults(){return ComponentModel$1.resultExtend("defaults",{_isQuestionType:true,_shouldDisplayAttempts:false,_shouldShowMarking:false,_canShowModelAnswer:true,_canShowFeedback:true,_canShowMarking:true,_canSubmit:true,_isSubmitted:false,_isCorrectAnswerShown:false,_questionWeight:Adapt$1.config.get("_questionWeight"),_hasItemScoring:false,_items:[]})}trackable(){return ComponentModel$1.resultExtend("trackable",["_isSubmitted","_score","_isCorrect","_attemptsLeft","_isPartlyCorrect"])}trackableType(){return ComponentModel$1.resultExtend("trackableType",[Boolean,Number,Boolean,Number,Boolean])}getTypeGroup(){return"question"}init(){this.setupDefaultSettings();this.setLocking("_canSubmit",true);this.updateRawScore();super.init()}setupDefaultSettings(){this.setupWeightSettings();this.setupButtonSettings()}setupButtonSettings(){const globalButtons=Adapt$1.course.get("_buttons");if(!this.has("_buttons")){this.set("_buttons",globalButtons)}else{const componentButtons=this.get("_buttons");for(const key in componentButtons){if(typeof componentButtons[key]==="object"){if(!componentButtons[key].buttonText&&globalButtons[key].buttonText){componentButtons[key].buttonText=globalButtons[key].buttonText}if(!componentButtons[key].ariaLabel&&globalButtons[key].ariaLabel){componentButtons[key].ariaLabel=globalButtons[key].ariaLabel}}if(!componentButtons[key]&&globalButtons[key]){componentButtons[key]=globalButtons[key]}}}}setupWeightSettings(){}canSubmit(){}checkCanSubmit(){this.set("_canSubmit",this.canSubmit(),{pluginName:"adapt"})}updateAttempts(){const attemptsLeft=this.get("_attemptsLeft")||this.get("_attempts");this.set("_attemptsLeft",attemptsLeft-1)}setQuestionAsSubmitted(){this.set({_isEnabled:false,_isSubmitted:true,_shouldShowMarking:this.shouldShowMarking})}markQuestion(){this.set({_isCorrect:this.isCorrect(),_isPartlyCorrect:this.isPartlyCorrect()});this.updateRawScore()}isCorrect(){}isPartlyCorrect(){}setScore(){const questionWeight=this.get("_questionWeight");const answeredCorrectly=this.get("_isCorrect");const score=answeredCorrectly?questionWeight:0;this.set("_score",score)}updateRawScore(){this.set({_rawScore:this.score,_maxScore:this.maxScore,_minScore:this.minScore})}get score(){return this.get("_isCorrect")?this.maxScore:0}get maxScore(){return this.get("_questionWeight")}get minScore(){return 0}checkQuestionCompletion(){const isComplete=this.get("_isCorrect")||this.get("_attemptsLeft")===0;if(isComplete){this.setCompletionStatus()}return isComplete}updateButtons(){const isInteractionComplete=this.get("_isInteractionComplete");const isCorrect=this.get("_isCorrect");const isEnabled=this.get("_isEnabled");const buttonState=this.get("_buttonState");const canShowModelAnswer=this.get("_canShowModelAnswer");if(isInteractionComplete){if(isCorrect||!canShowModelAnswer){this.set("_buttonState",BUTTON_STATE$1.CORRECT)}else{switch(buttonState){case BUTTON_STATE$1.SUBMIT:case BUTTON_STATE$1.HIDE_CORRECT_ANSWER:this.set("_buttonState",BUTTON_STATE$1.SHOW_CORRECT_ANSWER);break;default:this.set("_buttonState",BUTTON_STATE$1.HIDE_CORRECT_ANSWER)}}}else{if(isEnabled){this.set("_buttonState",BUTTON_STATE$1.SUBMIT)}else{this.set("_buttonState",BUTTON_STATE$1.RESET)}}}getFeedback(feedback=this.get("_feedback")){if(!feedback)return{};const isFinal=this.get("_attemptsLeft")===0;const isCorrect=this.get("_isCorrect");const correctness=isCorrect?"correct":this.isPartlyCorrect()?"partlyCorrect":"incorrect";const isLegacyConfig=typeof feedback.correct==="string"||typeof feedback._partlyCorrect==="object"||typeof feedback._incorrect==="object";const getLegacyConfigObject=()=>{const subPart=isFinal?"final":"notFinal";return{body:(isCorrect?feedback.correct:feedback[`_${correctness}`]?.[subPart]||feedback[`_${correctness}`]?.final||feedback._incorrect?.final)||""}};const getConfigObject=()=>{const subPart=isFinal?"Final":"NotFinal";return(isCorrect?feedback._correct:feedback[`_${correctness}${subPart}`]||feedback[`_${correctness}Final`]||feedback._incorrectFinal)||{}};const feedbackConfig={altTitle:feedback.altTitle||Adapt$1.course.get("_globals")._accessibility.altFeedbackTitle||"",title:feedback.title||"",_classes:feedback._classes,...isLegacyConfig?getLegacyConfigObject():getConfigObject()};if(feedbackConfig?._graphic?._src&&!feedbackConfig?._imageAlignment){feedbackConfig._imageAlignment="right"}return feedbackConfig}setupFeedback(){if(!this.has("_feedback"))return;const{altTitle:altTitle="",title:title="",body:body=""}=this.getFeedback();this.set({altFeedbackTitle:Handlebars.compile(altTitle)(this.toJSON()),feedbackTitle:Handlebars.compile(title)(this.toJSON()),feedbackMessage:Handlebars.compile(body)(this.toJSON())})}isInteractive(){return!this.get("_isComplete")||this.get("_isEnabled")&&!this.get("_isSubmitted")}checkIfResetOnRevisit(){super.checkIfResetOnRevisit();this.set("_buttonState",this.get("_isInteractionComplete")?BUTTON_STATE$1.HIDE_CORRECT_ANSWER:BUTTON_STATE$1.SUBMIT)}reset(type="hard",canReset=this.get("_canReset")){const wasReset=super.reset(type,canReset);if(!wasReset)return false;const attempts=this.get("_attempts");this.set({_attemptsLeft:attempts,_isCorrect:undefined,_isPartlyCorrect:undefined,_isCorrectAnswerShown:false,_isSubmitted:false,_buttonState:BUTTON_STATE$1.SUBMIT,_shouldShowMarking:this.shouldShowMarking});return true}setQuestionAsReset(){this.set({_isEnabled:true,_isSubmitted:false,_shouldShowMarking:this.shouldShowMarking});this.resetQuestion()}resetQuestion(){}refresh(){this.trigger("question:refresh")}getButtonState(){if(this.get("_isCorrect")){return BUTTON_STATE$1.CORRECT}if(this.get("_attemptsLeft")===0){return this.get("_canShowModelAnswer")?BUTTON_STATE$1.SHOW_CORRECT_ANSWER:BUTTON_STATE$1.INCORRECT}return this.get("_isSubmitted")?BUTTON_STATE$1.RESET:BUTTON_STATE$1.SUBMIT}getInteractionObject(){return{}}getResponse(){}getResponseType(){}onSubmitted(){if(this.get("_shouldStoreAttempts"))this.addAttemptObject();this.set("_shouldShowMarking",this.shouldShowMarking)}get shouldShowMarking(){return!this.isInteractive()&&this.get("_canShowMarking")&&this.get("_isInteractionComplete")}}components$1.register("question",{model:QuestionModel});var QuestionModel$1=__AMD("core/js/models/questionModel",QuestionModel);class QuestionView extends ComponentView$1{className(){return["component","is-question",this.model.get("_component").toLowerCase(),this.model.get("_id"),this.model.get("_classes"),this.setVisibility(),"is-"+this.model.get("_layout"),this.model.get("_isComplete")?"is-complete":"",this.model.get("_isOptional")?"is-optional":"",this.model.get("_canShowModelAnswer")?"can-show-model-answer":"",this.model.get("_canShowFeedback")?"can-show-feedback":"",this.model.get("_canShowMarking")?"can-show-marking":""].join(" ")}initialize(...args){this.isInteractive=this.isInteractive.bind(this);super.initialize(...args)}isInteractive(){logging$1.deprecated("questionView.isInteractive please use this.model.isInteractive, this.model.get('_shouldShowMarking') or this.model.shouldShowMarking");return this.model.isInteractive()}preRender(){this.listenTo(this.model,"change:_isEnabled",this.onEnabledChanged);this.listenTo(this.model,"question:refresh",this.refresh);if(this.checkIfResetOnRevisit!==QuestionView.prototype.checkIfResetOnRevisit){logging$1.deprecated("QuestionView.checkIfResetOnRevisit, please use QuestionModel.checkIfResetOnRevisit")}this.checkIfResetOnRevisit();_.defer((()=>this.ensureLegacyLifecycleState()));this._runModelCompatibleFunction("setupDefaultSettings");this.setupQuestion()}onEnabledChanged(model,changedAttribute){if(!changedAttribute){this.$(".component__widget").addClass("is-disabled");this.disableQuestion()}else{this.$(".component__widget").removeClass("is-disabled");this.enableQuestion()}}disableQuestion(){}enableQuestion(){}checkIfResetOnRevisit(){const canReset=this.model.get("_canReset")!==false;const isResetOnRevisit=this.model.get("_isResetOnRevisit");if(!canReset||!isResetOnRevisit)return;if(this.resetQuestionOnRevisit===QuestionView.prototype.resetQuestionOnRevisit)return;logging$1.deprecated("QuestionView.resetQuestionOnRevisit, please QuestionModel.reset");_.defer((()=>{this.resetQuestionOnRevisit(isResetOnRevisit)}))}ensureLegacyLifecycleState(){if(this.model.get("_isSubmitted")){this.onHideCorrectAnswerClicked();return}this.onResetClicked()}resetQuestionOnRevisit(type){}setupQuestion(){}postRender(){this.addButtonsView();this.onQuestionRendered()}addButtonsView(){this.buttonsView=new ButtonsView({model:this.model,el:this.$(".btn__container")});this.listenTo(this.buttonsView,"buttons:stateUpdate",this.onButtonStateUpdate)}onButtonStateUpdate(buttonState){switch(buttonState){case BUTTON_STATE$1.SUBMIT:this.onSubmitClicked();break;case BUTTON_STATE$1.RESET:this.onResetClicked();break;case BUTTON_STATE$1.SHOW_CORRECT_ANSWER:this.onShowCorrectAnswerClicked();break;case BUTTON_STATE$1.HIDE_CORRECT_ANSWER:this.onHideCorrectAnswerClicked();break;case BUTTON_STATE$1.SHOW_FEEDBACK:this.showFeedback();break}}onQuestionRendered(){}onSubmitClicked(){const canSubmit=this._runModelCompatibleFunction("canSubmit");if(!canSubmit){this.showInstructionError();this.onCannotSubmit();return}this.stopRendering();this._runModelCompatibleFunction("updateAttempts");this._runModelCompatibleFunction("setQuestionAsSubmitted");this._runModelCompatibleFunction("storeUserAnswer");this._runModelCompatibleFunction("markQuestion","isCorrect");this._runModelCompatibleFunction("setScore");this._runModelCompatibleFunction("checkQuestionCompletion");if(this.model.shouldShowMarking){this.showMarking()}this.recordInteraction();this._runModelCompatibleFunction("setupFeedback");this.showFeedback();$(window).resize();this._runModelCompatibleFunction("updateButtons");this.startRendering();this.changed();this.model.onSubmitted();this.onSubmitted();Adapt$1.trigger("questionView:submitted",this)}showInstructionError(){Adapt$1.trigger("questionView:showInstructionError",this)}onCannotSubmit(){}onSubmitted(){}setQuestionAsSubmitted(){this.model.setQuestionAsSubmitted();this.$(".component__widget").addClass("is-submitted")}showMarking(){}checkQuestionCompletion(){const isComplete=this.model.checkQuestionCompletion();if(isComplete){this.$(".component__widget").addClass("is-complete show-user-answer")}}recordInteraction(){if(this.model.get("_recordInteraction")===true||!this.model.has("_recordInteraction")){Adapt$1.trigger("questionView:recordInteraction",this)}}showFeedback(){if(this.model.get("_canShowFeedback")){Adapt$1.trigger("questionView:showFeedback",this)}else{Adapt$1.trigger("questionView:disabledFeedback",this)}}onResetClicked(){this.setQuestionAsReset();this._runModelCompatibleFunction("resetUserAnswer");this.model.checkCanSubmit();this._runModelCompatibleFunction("updateButtons");if(!this.model.get("_isReady"))return;const currentModel=data$1.findById(location$1._currentId);if(!currentModel?.get("_isReady"))return;this.focusAfterReset()}setQuestionAsReset(){this.model.setQuestionAsReset();this.resetQuestion();this.$(".component__widget").removeClass("is-submitted")}focusAfterReset(){a11y$1.focusNext(this.$el)}resetQuestion(){}refresh(){this.model.set("_buttonState",this.model.getButtonState());if(this.model.shouldShowMarking){this.showMarking()}if(this.buttonsView){_.defer(this.buttonsView.refresh.bind(this.buttonsView))}}onShowCorrectAnswerClicked(){this.setQuestionAsShowCorrect();this._runModelCompatibleFunction("updateButtons");this.showCorrectAnswer()}setQuestionAsShowCorrect(){this.$(".component__widget").addClass("is-submitted show-correct-answer").removeClass("show-user-answer")}showCorrectAnswer(){this.model.set("_isCorrectAnswerShown",true)}onHideCorrectAnswerClicked(){this.setQuestionAsHideCorrect();this._runModelCompatibleFunction("updateButtons");this.hideCorrectAnswer()}setQuestionAsHideCorrect(){this.$(".component__widget").addClass("is-submitted show-user-answer").removeClass("show-correct-answer")}hideCorrectAnswer(){this.model.set("_isCorrectAnswerShown",false)}getLatency(){return null}_runModelCompatibleFunction(name,lookForViewOnlyFunction){return this.model[name]()}}QuestionView._isQuestionType=true;class ViewOnlyQuestionViewCompatibilityLayer extends QuestionView{getInteractionObject(){logging$1.deprecated("QuestionView.getInteractionObject, please use QuestionModel.getInteractionObject");return this.model.getInteractionObject()}getResponse(){logging$1.deprecated("QuestionView.getInteractionObject, please use QuestionModel.getInteractionObject");return this.model.getResponse()}getResponseType(){logging$1.deprecated("QuestionView.getResponseType, please use QuestionModel.getResponseType");return this.model.getResponseType()}setupDefaultSettings(){logging$1.deprecated("QuestionView.setupDefaultSettings, please use QuestionModel.setupDefaultSettings");return this.model.setupDefaultSettings()}setupButtonSettings(){logging$1.deprecated("QuestionView.setupButtonSettings, please use QuestionModel.setupButtonSettings");return this.model.setupButtonSettings()}setupWeightSettings(){logging$1.deprecated("QuestionView.setupWeightSettings, please use QuestionModel.setupWeightSettings");return this.model.setupWeightSettings()}canSubmit(){logging$1.deprecated("QuestionView.canSubmit, please use QuestionModel.canSubmit");return this.model.canSubmit()}updateAttempts(){logging$1.deprecated("QuestionView.updateAttempts, please use QuestionModel.updateAttempts");return this.model.updateAttempts()}storeUserAnswer(){logging$1.deprecated("QuestionView.storeUserAnswer, please use QuestionModel.storeUserAnswer");return this.model.storeUserAnswer()}resetUserAnswer(){logging$1.deprecated("QuestionView.resetUserAnswer, please use QuestionModel.resetUserAnswer");return this.model.resetUserAnswer()}markQuestion(){if(this._isInViewOnlyCompatibleMode("isCorrect")){if(this.isCorrect()){this.model.set("_isCorrect",true)}else{this.model.set("_isCorrect",false)}this.model.set({_rawScore:this.model.get("_isCorrect")?this.model.get("_questionWeight"):0,_maxScore:this.model.get("_questionWeight"),_minScore:0})}else{return this.model.markQuestion()}}isCorrect(){logging$1.deprecated("QuestionView.isCorrect, please use QuestionModel.isCorrect");return this.model.isCorrect()}setScore(){logging$1.deprecated("QuestionView.setScore, please use QuestionModel.setScore");return this.model.setScore()}updateButtons(){logging$1.deprecated("QuestionView.updateButtons, please use QuestionModel.updateButtons");return this.model.updateButtons()}setupFeedback(){if(this._isInViewOnlyCompatibleMode("isPartlyCorrect")){if(this.model.get("_isCorrect")){this._runModelCompatibleFunction("setupCorrectFeedback")}else if(this.isPartlyCorrect()){this._runModelCompatibleFunction("setupPartlyCorrectFeedback")}else{this._runModelCompatibleFunction("setupIncorrectFeedback")}}else{this.model.setupFeedback()}}isPartlyCorrect(){logging$1.deprecated("QuestionView.isPartlyCorrect, please use QuestionModel.isPartlyCorrect");return this.model.isPartlyCorrect()}setupCorrectFeedback(){logging$1.deprecated("QuestionView.setupCorrectFeedback, please use QuestionModel.setupCorrectFeedback");return this.model.setupCorrectFeedback()}setupPartlyCorrectFeedback(){logging$1.deprecated("QuestionView.setupPartlyCorrectFeedback, please use QuestionModel.setupPartlyCorrectFeedback");return this.model.setupPartlyCorrectFeedback()}setupIncorrectFeedback(){logging$1.deprecated("QuestionView.setupIncorrectFeedback, please use QuestionModel.setupIncorrectFeedback");return this.model.setupIncorrectFeedback()}_runModelCompatibleFunction(name,lookForViewOnlyFunction){if(this._isInViewOnlyCompatibleMode(name,lookForViewOnlyFunction)){return this[name]()}else{return this.model[name]()}}_isInViewOnlyCompatibleMode(name,lookForViewOnlyFunction){const checkForFunction=lookForViewOnlyFunction||name;if(!this.constructor.prototype[checkForFunction])return false;const hasCompatibleVersion=Object.prototype.hasOwnProperty.call(ViewOnlyQuestionViewCompatibilityLayer.prototype,checkForFunction);const usingCompatibleVersion=this.constructor.prototype[checkForFunction]===ViewOnlyQuestionViewCompatibilityLayer.prototype[checkForFunction];if(hasCompatibleVersion&&usingCompatibleVersion){switch(checkForFunction){case"setupFeedback":case"markQuestion":return true}return false}return true}}var QuestionView$1=__AMD("core/js/views/questionView",ViewOnlyQuestionViewCompatibilityLayer);class McqView extends QuestionView$1{initialize(...args){this.onKeyPress=this.onKeyPress.bind(this);this.onItemSelect=this.onItemSelect.bind(this);this.onItemFocus=this.onItemFocus.bind(this);this.onItemBlur=this.onItemBlur.bind(this);super.initialize(...args)}setupQuestion(){this.model.setupRandomisation()}onQuestionRendered(){this.setReadyStatus()}onKeyPress(event){if(event.which!==13)return;this.onItemSelect(event)}onItemFocus(event){if(!this.model.isInteractive())return;if(this.model.get("_isRadio")){this.onItemSelect(event);return}const index=parseInt($(event.currentTarget).data("adapt-index"));const item=this.model.getChildren().findWhere({_index:index});item.set("_isHighlighted",true)}onItemBlur(event){const index=$(event.currentTarget).data("adapt-index");const item=this.model.getChildren().findWhere({_index:index});item.set("_isHighlighted",false)}onItemSelect(event){if(!this.model.isInteractive())return;const index=$(event.currentTarget).data("adapt-index");const itemModel=this.model.getItem(index);let shouldSelect=!itemModel.get("_isActive");if(this.model.isSingleSelect()){shouldSelect=true;this.model.resetActiveItems()}else if(shouldSelect&&this.model.isAtActiveLimit()){this.model.getLastActiveItem().toggleActive(false)}itemModel.toggleActive(shouldSelect)}resetQuestion(){this.model.resetItems()}}McqView.template="mcq.jsx";var McqView$1=__AMD("components/adapt-contrib-mcq/js/McqView",McqView);var ItemModel=__AMD("core/js/models/itemModel",class ItemModel extends LockingModel{defaults(){return{_isActive:false,_isVisited:false,_score:0}}reset(){this.set({_isActive:false,_isVisited:false})}toggleActive(isActive=!this.get("_isActive")){this.set("_isActive",isActive)}toggleVisited(isVisited=!this.get("_isVisited")){this.set("_isVisited",isVisited)}});var ItemsComponentModel=__AMD("core/js/models/itemsComponentModel",class ItemsComponentModel extends ComponentModel$1{toJSON(){const json=super.toJSON();json._items=this.getChildren().toJSON();return json}init(){this.setUpItems();this.listenTo(this.getChildren(),{all:this.onAll,"change:_isActive":this.setVisitedStatus,"change:_isVisited":this.checkCompletionStatus});super.init()}restoreUserAnswers(){const booleanArray=this.get("_userAnswer");if(!booleanArray)return;this.getChildren().forEach(((child,index)=>child.set("_isVisited",booleanArray[index])))}storeUserAnswer(){const booleanArray=this.getChildren().map((child=>child.get("_isVisited")));this.set("_userAnswer",booleanArray)}setUpItems(){const items=this.get("_items")||[];items.forEach(((item,index)=>item._index=index));this.setChildren(new Backbone.Collection(items,{model:ItemModel}))}getItem(index){return this.getChildren().findWhere({_index:index})}getVisitedItems(){return this.getChildren().where({_isVisited:true})}getActiveItems(){return this.getChildren().where({_isActive:true})}getActiveItem(){return this.getChildren().findWhere({_isActive:true})}areAllItemsCompleted(){return this.getVisitedItems().length===this.getChildren().length}checkCompletionStatus(){this.setVisitedStatus();this.storeUserAnswer();if(!this.areAllItemsCompleted())return;this.setCompletionStatus()}reset(type="hard",canReset=this.get("_canReset")){const wasReset=super.reset(type,canReset);if(!wasReset)return false;this.getChildren().each((item=>item.reset()));return true}resetActiveItems(){this.getChildren().each((item=>item.toggleActive(false)))}setActiveItem(index){const item=this.getItem(index);if(!item)return;const activeItem=this.getActiveItem();if(activeItem)activeItem.toggleActive(false);item.toggleActive(true)}});class BlendedItemsComponentQuestionModel extends QuestionModel$1{init(){ItemsComponentModel.prototype.init.call(this);super.init()}reset(type="hard",canReset=this.get("_canReset")){ItemsComponentModel.prototype.reset.call(this,type,canReset);return super.reset(type,canReset)}}Object.getOwnPropertyNames(ItemsComponentModel.prototype).forEach((name=>{if(name==="constructor"||name==="init"||name==="reset")return;Object.defineProperty(BlendedItemsComponentQuestionModel.prototype,name,{value:ItemsComponentModel.prototype[name]})}));var ItemsQuestionModel=__AMD("core/js/models/itemsQuestionModel",class ItemsQuestionModel extends BlendedItemsComponentQuestionModel{init(){super.init();this.set("_isRadio",this.isSingleSelect());this.listenTo(this.getChildren(),"change:_isActive",this.checkCanSubmit);this.checkCanSubmit()}restoreUserAnswers(){if(!this.get("_isSubmitted"))return;const itemModels=this.getChildren();const userAnswer=this.get("_userAnswer");itemModels.each((item=>{item.toggleActive(userAnswer[item.get("_index")])}));this.setQuestionAsSubmitted();this.markQuestion();this.setScore();this.setupFeedback()}setupRandomisation(){if(!this.get("_isRandom")||!this.get("_isEnabled"))return;const children=this.getChildren();children.set(children.shuffle())}canSubmit(){const activeItems=this.getActiveItems();return activeItems.length>0}storeUserAnswer(){const items=this.getChildren().slice(0);items.sort(((a,b)=>a.get("_index")-b.get("_index")));const userAnswer=items.map((itemModel=>itemModel.get("_isActive")));this.set("_userAnswer",userAnswer)}isCorrect(){const allChildren=this.getChildren();const activeChildren=allChildren.filter((itemModel=>itemModel.get("_isActive")));const isItemCorrect=itemModel=>itemModel.get("_shouldBeSelected")&&!itemModel.get("_isPartlyCorrect");const isItemPartlyCorrect=itemModel=>itemModel.get("_isPartlyCorrect");const isItemIncorrect=itemModel=>!itemModel.get("_shouldBeSelected")&&!itemModel.get("_isPartlyCorrect");const sum=(list,predicate)=>list.reduce(((sum,item)=>sum+(predicate(item)?1:0)),0);const props={_numberOfRequiredAnswers:sum(allChildren,isItemCorrect),_numberOfCorrectAnswers:sum(activeChildren,isItemCorrect),_numberOfPartlyCorrectAnswers:sum(activeChildren,isItemPartlyCorrect),_numberOfIncorrectAnswers:sum(activeChildren,isItemIncorrect)};activeChildren.forEach((itemModel=>itemModel.set("_isCorrect",itemModel.get("_shouldBeSelected"))));props._isAtLeastOneCorrectSelection=Boolean(props._numberOfCorrectAnswers||props._numberOfPartlyCorrectAnswers);const numberOfSelectableAnswers=this.get("_selectable");const hasSelectableCorrectAnswers=props._numberOfCorrectAnswers===numberOfSelectableAnswers;const hasAllCorrectAnswers=props._numberOfCorrectAnswers===props._numberOfRequiredAnswers;const hasCorrectAnswers=hasSelectableCorrectAnswers||hasAllCorrectAnswers;const hasIncorrectAnswers=props._numberOfIncorrectAnswers;const hasPartlyCorrectAnswers=props._numberOfPartlyCorrectAnswers;this.set(props);return hasCorrectAnswers&&!hasIncorrectAnswers&&!hasPartlyCorrectAnswers}setScore(){const questionWeight=this.get("_questionWeight");const answeredCorrectly=this.get("_isCorrect");const score=answeredCorrectly?questionWeight:0;this.set("_score",score)}get score(){if(!this.get("_hasItemScoring"))return super.score;const children=this.getChildren()?.toArray()||[];return children.reduce(((score,child)=>score+=child.get("_isActive")?child.get("_score")||0:0),0)}get maxScore(){if(!this.get("_hasItemScoring"))return super.maxScore;const children=this.getChildren()?.toArray()||[];const scores=children.map((child=>child.get("_score")||0));scores.sort(((a,b)=>a-b));return scores.reverse().slice(0,this.get("_selectable")).filter((score=>score>0)).reduce(((maxScore,score)=>maxScore+=score),0)}get minScore(){if(!this.get("_hasItemScoring"))return super.minScore;const children=this.getChildren()?.toArray()||[];const scores=children.map((child=>child.get("_score")||0));scores.sort(((a,b)=>a-b));return scores.slice(0,this.get("_selectable")).filter((score=>score<0)).reduce(((minScore,score)=>minScore+=score),0)}getFeedback(_feedback=this.get("_feedback")){if(!_feedback)return{};const activeItem=this.getActiveItem();const activeItemFeedback=activeItem.get("feedback");const isIndividualFeedback=!this.isCorrect()&&!this.isPartlyCorrect()&&this.isSingleSelect()&&activeItemFeedback;const feedback=super.getFeedback(_feedback);if(!isIndividualFeedback)return feedback;if(typeof activeItemFeedback==="string"){return{...feedback,body:activeItemFeedback||""}}const feedbackConfig={...feedback,...activeItemFeedback};if(feedbackConfig?._graphic?._src&&!feedbackConfig?._imageAlignment){feedbackConfig._imageAlignment="right"}return feedbackConfig}isPartlyCorrect(){return this.get("_isAtLeastOneCorrectSelection")}resetUserAnswer(){this.set("_userAnswer",[])}isAtActiveLimit(){const selectedItems=this.getActiveItems();return selectedItems.length===this.get("_selectable")}isSingleSelect(){return this.get("_selectable")===1}getLastActiveItem(){const selectedItems=this.getActiveItems();return selectedItems[selectedItems.length-1]}resetQuestion(){this.resetItems()}resetItems(){if(this.get("_shouldResetAllAnswers")===false){this.resetIncorrectItems();return}this.resetActiveItems();this.set("_isAtLeastOneCorrectSelection",false)}resetIncorrectItems(){this.getChildren().each((item=>{const isCorrect=item.get("_shouldBeSelected")||item.get("_isCorrect");if(isCorrect)return;item.toggleActive(false)}));this.set("_isAtLeastOneCorrectSelection",Boolean(this.getLastActiveItem()))}getInteractionObject(){const interactions={correctResponsesPattern:[],choices:[]};interactions.choices=this.getChildren().map((itemModel=>({id:(itemModel.get("_index")+1).toString(),description:itemModel.get("text")})));const correctItems=this.getChildren().filter((itemModel=>itemModel.get("_shouldBeSelected")));interactions.correctResponsesPattern=[correctItems.map((itemModel=>String(itemModel.get("_index")+1))).join("[,]")];return interactions}getResponse(){const activeItems=this.getActiveItems();const activeIndexes=activeItems.map((itemModel=>itemModel.get("_index")+1));return activeIndexes.join(",")}getResponseType(){return"choice"}getCorrectAnswerAsText(){const globals=Adapt$1.course.get("_globals")._components["_"+this.get("_component")];const isSingleSelect=this.isSingleSelect();const ariaAnswer=isSingleSelect?globals?.ariaCorrectAnswer:globals?.ariaCorrectAnswers;if(!ariaAnswer)return;const correctOptions=this.getChildren().where({_shouldBeSelected:true});const correctAnswer=isSingleSelect?correctOptions[0]?.get("text"):correctOptions.map((correctOption=>correctOption.get("text"))).join("
");return Handlebars.compile(ariaAnswer)({correctAnswer:correctAnswer})}getUserAnswerAsText(){const globals=Adapt$1.course.get("_globals")._components["_"+this.get("_component")];const isSingleSelect=this.isSingleSelect();const ariaAnswer=isSingleSelect?globals?.ariaUserAnswer:globals?.ariaUserAnswers;if(!ariaAnswer)return;const selectedItems=this.getActiveItems();const userAnswer=isSingleSelect?selectedItems[0].get("text"):selectedItems.map((selectedItem=>selectedItem.get("text"))).join("
");return Handlebars.compile(ariaAnswer)({userAnswer:userAnswer})}});var McqModel=__AMD("components/adapt-contrib-mcq/js/McqModel",class McqModel extends ItemsQuestionModel{});__AMD("components/adapt-contrib-mcq/js/adapt-contrib-mcq",components$1.register("mcq",{model:McqModel,view:McqView$1}));const AssessmentView={postRender(){ArticleView$1.prototype.postRender.call(this);if(this.model.isAssessmentEnabled()){this._setupEventListeners();const config=this.model.getConfig();if(config?._questions?._canShowMarking===false){this.$el.addClass("has-no-marking")}}this.$el.addClass("is-assessment")},_setupEventListeners(){this.listenTo(Adapt$1,{"assessments:complete":this._onAssessmentComplete,"assessments:reset":this._onAssessmentReset,remove:this._onRemove})},_removeEventListeners(){this.stopListening(Adapt$1,{"assessments:complete":this._onAssessmentComplete,"assessments:reset":this._onAssessmentReset})},_onAssessmentComplete(state,model){if(state.id!==this.model.get("_assessment")._id)return;logging$1.info("assessment complete",state,model)},_onAssessmentReset(state,model){if(state.id!==this.model.get("_assessment")._id)return;logging$1.info("assessment reset",state,model)},_onRemove(){this._removeEventListeners()}};var AdaptAssessmentArticleView=__AMD("extensions/adapt-contrib-assessment/js/adapt-assessmentArticleView",AssessmentView);class QuestionBank{constructor(quizBankId,articleId){this._bankId=quizBankId;this._articleId=articleId;this._unusedQuestionBlocks=null;this._count=null}calculateAvailableQuestionBlocks(count){this._count=parseInt(count);const articleModel=data$1.findById(this._articleId);const children=articleModel.getAvailableChildModels();this._availableQuestionBlocks=children.map((blockModel=>{if(blockModel.get("_assessment")?._quizBankID!==this._bankId)return null;return blockModel})).filter(Boolean);const availableQuestionBlockIds=this._availableQuestionBlocks?.map((block=>block.get("_id")))||[];const unusedQuestionBlockIds=this._unusedQuestionBlocks?.map((block=>block.get("_id")))||[];const haveBlocksChanged=Boolean(_.difference(unusedQuestionBlockIds,availableQuestionBlockIds).length);if(!haveBlocksChanged)return;this._unusedQuestionBlocks=null}getRandomQuestionBlocks(){let count=this._count;if(count>this.unusedQuestionBlocks.length){logging$1.warn(`Bank ID ${this._bankId}: Attempting to display ${count} question(s), but only ${this.unusedQuestionBlocks.length} available`);count=this.unusedQuestionBlocks.length}const questionBlocks=[];let i=0;while(i++block.get("_isAvailable"))).reduce(((questions,block)=>questions.concat(block.findDescendantModels("question"))),[])},_getAllQuestionComponents(){return this.findDescendantModels("question")},_postInitialize(){if(!this.isAssessmentEnabled())return;const assessmentConfig=this.getConfig();Object.assign(this,{_originalChildModels:null,_questionBanks:null,_forceResetOnRevisit:false});let attemptsLeft;switch(assessmentConfig._attempts){case"infinite":case 0:case undefined:case-1:case null:attemptsLeft="infinite";break;default:attemptsLeft=assessmentConfig._attempts;break}this.set({_assessmentCompleteInSession:false,_attemptInProgress:false,_isAssessmentComplete:false,_numberOfQuestionsAnswered:0,_lastAttemptScoreAsPercent:0,_attempts:attemptsLeft,_attemptsLeft:attemptsLeft,_attemptsSpent:0});this.listenToOnce(Adapt$1,"app:dataReady",this._onDataReady);this.listenTo(Adapt$1,"remove",this._onRemove)},init(){Object.defineProperty(this,"_originalChildModels",{get(){if(this._originalChildModelsStore)return this._originalChildModelsStore;this._originalChildModelsStore=this.getChildren().models;this._setAssessmentOwnershipOnChildrenModels();return this._originalChildModelsStore}});this.setupCurrentQuestionComponents();this._updateQuestionsState()},setupCurrentQuestionComponents(){const assessmentQuestionsConfig=this.getConfig()._questions;this._getAllQuestionComponents().forEach((component=>{component.set({_canShowFeedback:assessmentQuestionsConfig._canShowFeedback,_canShowMarking:assessmentQuestionsConfig._canShowMarking,_canShowModelAnswer:assessmentQuestionsConfig._canShowModelAnswer})}))},_setAssessmentOwnershipOnChildrenModels(){const assessmentConfig=this.get("_assessment");const childConfig={_isPartOfAssessment:true,_assessmentId:assessmentConfig._id};for(const blockModel of this._originalChildModels){blockModel.set(childConfig);blockModel.setOnChildren(childConfig)}},checkIfResetOnRevisit(){},_onDataReady(){Adapt$1.assessment.register(this);const questions=this._getCurrentQuestionComponents();if(this.get("_attemptInProgress")&&questions.every((q=>q.get("_isSubmitted")))&&this.get("_requireCompletionOf")!==Number.POSITIVE_INFINITY){this.set("_attemptInProgress",false);logging$1.warn(`Assessment ${this.get("_id")} _attemptInProgress corrected as all questions are submitted`)}},_setupAssessmentData(force,callback){const assessmentConfig=this.getConfig();const state=this.getState();const hasAttemptsLeft=state.attemptsLeft>0||state.attemptsLeft==="infinite";const isFirstAttempt=state.attemptsSpent===0;const shouldResetOnRevisit=(isFirstAttempt||assessmentConfig._isResetOnRevisit)&&!this.get("_attemptInProgress");const shouldResetAssessment=shouldResetOnRevisit&&!state.isPass&&hasAttemptsLeft||force===true;const shouldResetQuestions=shouldResetOnRevisit&&(state.allowResetIfPassed||!state.isPass)||force===true;if(shouldResetAssessment||shouldResetQuestions){Adapt$1.trigger("assessments:preReset",this.getState(),this)}let quizModels;if(shouldResetAssessment){if(isFirstAttempt||assessmentConfig?._questions?._resetType==="hard"){this.set({_numberOfQuestionsAnswered:0,_isAssessmentComplete:false,_assessmentCompleteInSession:false,_score:0})}else{this.set({_assessmentCompleteInSession:false})}this.getChildren().reset(this._originalChildModels);if(assessmentConfig?._banks._isEnabled&&assessmentConfig?._banks._split.length>1){quizModels=this._setupBankedAssessment()}else if(assessmentConfig?._randomisation._isEnabled){quizModels=this._setupRandomisedAssessment()}}if(!quizModels){quizModels=this.getChildren().models}else if(quizModels.length===0){quizModels=this.getChildren().models;logging$1.warn("assessment: Not enough unique questions to create a fresh assessment, using last selection")}this.getChildren().reset(quizModels);this.setupCurrentQuestionComponents();if(shouldResetAssessment||shouldResetQuestions){this._resetQuestions();this.set("_attemptInProgress",true);Adapt$1.trigger("assessments:reset",this.getState(),this)}if(!state.isComplete){this.set("_attemptInProgress",true)}this._overrideQuestionComponentSettings();this._setupQuestionListeners();this._checkNumberOfQuestionsAnswered();this._updateQuestionsState();Adapt$1.assessment.saveState();this.trigger("reset");if(shouldResetAssessment||shouldResetQuestions){Adapt$1.trigger("assessments:postReset",this.getState(),this)}},_setupBankedAssessment(){const assessmentConfig=this.getConfig();this._setupBanks();let questionModels=this._questionBanks.flatMap((questionBank=>questionBank.getRandomQuestionBlocks()));if(assessmentConfig._banks._randomisation){questionModels=_.shuffle(questionModels)}return questionModels},_setupBanks(){const assessmentConfig=this.getConfig();const bankSplits=assessmentConfig._banks._split.split(",");this.findDescendantModels("block").filter((block=>block.get("_isAvailable")&&block.findDescendantModels("question").length>0)).forEach((block=>{const quizBankId=block.get("_assessment")?._quizBankId;const isInvalidNumber=isNaN(quizBankId)||quizBankId<1;const isOutOfBounds=quizBankId>bankSplits.length;if(isInvalidNumber)logging$1.warn(`Bank ID ${quizBankId} is not a valid number`);if(isOutOfBounds)logging$1.warn(`Bank ID ${quizBankId} exceeds the number of available splits (${bankSplits.length})`)}));const hasBankSplitsChanged=bankSplits.length!==this._questionBanks?.length;if(hasBankSplitsChanged){this._questionBanks=[]}bankSplits.forEach(((count,index)=>{const bankId=index+1;const articleId=this.get("_id");this._questionBanks[bankId]=this._questionBanks[bankId]||new QuestionBank$1(bankId,articleId);this._questionBanks[bankId].calculateAvailableQuestionBlocks(count)}))},_setupRandomisedAssessment(){const assessmentConfig=this.getConfig();const randomisationModel=assessmentConfig._randomisation;const blockModels=this.getChildren().models;let questionModels=_.shuffle(blockModels);if(randomisationModel._blockCount>0){questionModels=questionModels.slice(0,randomisationModel._blockCount)}return questionModels},_overrideQuestionComponentSettings(){const newSettings=this._getMarkingSettings();const questionConfig=this.getConfig()._questions;if(Object.prototype.hasOwnProperty.call(questionConfig,"_canShowFeedback")){newSettings._canShowFeedback=questionConfig._canShowFeedback}if(!_.isEmpty(newSettings)){const questionComponents=this._getAllQuestionComponents();questionComponents.forEach((model=>model.set(newSettings,{pluginName:"_assessment"})))}},_setupQuestionListeners(){this._removeQuestionListeners();this.listenTo(this,"bubble:change:_isInteractionComplete",this._onCompletionEvent)},_checkNumberOfQuestionsAnswered(){const questionComponents=this._getCurrentQuestionComponents();const numberOfQuestionsAnswered=questionComponents.filter((model=>model.get("_isInteractionComplete"))).length;this.set("_numberOfQuestionsAnswered",numberOfQuestionsAnswered)},_removeQuestionListeners(){this.stopListening(this,"bubble:change:_isInteractionComplete",this._onCompletionEvent)},_onCompletionEvent(event){if(event.target?.isTypeGroup("block"))return this._onBlockCompleted(event.target,event.value);if(event.target?.isTypeGroup("question"))return this._onQuestionCompleted(event.target,event.value)},_onBlockCompleted(blockModel,value){if(value===false)return;const questionModels=blockModel.findDescendantModels("question");questionModels.forEach((questionModel=>{this._onQuestionCompleted(questionModel,value)}));if(!blockModel.get("_isInteractionComplete"))return;this._checkAssessmentComplete()},_onQuestionCompleted(questionModel,value){if(value===false)return;if(!questionModel.get("_isInteractionComplete"))return;const numberOfQuestionsAnswered=this._getCurrentQuestionComponents().reduce(((count,question)=>count+=question.get("_isSubmitted")?1:0),0);this.set("_numberOfQuestionsAnswered",numberOfQuestionsAnswered);this._updateQuestionsState();Adapt$1.assessment.saveState();this._checkAssessmentComplete()},_checkAssessmentComplete(){const allQuestionsAdded=this.get("_requireCompletionOf")!==Number.POSITIVE_INFINITY;if(!allQuestionsAdded)return;const numberOfQuestionsAnswered=this.get("_numberOfQuestionsAnswered");const allQuestionsAnswered=numberOfQuestionsAnswered>=this._getCurrentQuestionComponents().length;if(!allQuestionsAnswered)return;this._onAssessmentComplete()},_onAssessmentComplete(){const wasAttemptInProgess=this.get("_attemptInProgress");if(!wasAttemptInProgess)return;this.set("_attemptInProgress",false);this._spendAttempt();const _scoreAsPercent=this._getScoreAsPercent();const _score=this._getScore();const _maxScore=this._getMaxScore();const _minScore=this._getMinScore();const _correctCount=this._getCorrectCount();const _correctAsPercent=this._getCorrectAsPercent();const _questionCount=this._getQuestionCount();this.set({_scoreAsPercent:_scoreAsPercent,_score:_score,_maxScore:_maxScore,_minScore:_minScore,_correctAsPercent:_correctAsPercent,_correctCount:_correctCount,_questionCount:_questionCount,_lastAttemptScoreAsPercent:_scoreAsPercent,_assessmentCompleteInSession:true,_isAssessmentComplete:true});this._updateQuestionsState();this._checkIsPass();this._removeQuestionListeners();if(this._isMarkingSuppressionEnabled()&&(!this._isAttemptsLeft()||this._isPassed())){_.defer((()=>{this._overrideMarkingSettings();this._refreshQuestions()}))}Adapt$1.trigger("assessments:complete",this.getState(),this)},_updateQuestionsState(){const questionComponents=this._getCurrentQuestionComponents();const questions=questionComponents.map((model=>({_id:model.get("_id"),_isCorrect:model.get("_isCorrect")??null})));this.set("_questions",questions)},_checkIsPass(){const assessmentConfig=this.getConfig();const isPercentageBased=assessmentConfig._isPercentageBased;const scoreToPass=assessmentConfig._scoreToPass;const correctToPass=assessmentConfig._correctToPass||0;const scoreAsPercent=this.get("_scoreAsPercent");const score=this.get("_score");const correctAsPercent=this.get("_correctAsPercent");const correctCount=this.get("_correctCount");const isPass=isPercentageBased?scoreAsPercent>=scoreToPass&&correctAsPercent>=correctToPass:score>=scoreToPass&&correctCount>=correctToPass;this.set("_isPass",isPass)},_getMarkingSettings(){let markingSettings={};if(this._shouldSuppressMarking()){markingSettings={_canShowMarking:false,_canShowModelAnswer:false}}else{const questionConfig=this.getConfig()._questions;if(Object.prototype.hasOwnProperty.call(questionConfig,"_canShowModelAnswer")){markingSettings._canShowModelAnswer=questionConfig._canShowModelAnswer}if(Object.prototype.hasOwnProperty.call(questionConfig,"_canShowMarking")){markingSettings._canShowMarking=questionConfig._canShowMarking}}return markingSettings},_overrideMarkingSettings(){const newMarkingSettings=this._getMarkingSettings();const questionComponents=this._getAllQuestionComponents();questionComponents.forEach((model=>model.set(newMarkingSettings,{pluginName:"_assessment"})))},_refreshQuestions(){const questionComponents=this._getCurrentQuestionComponents();questionComponents.forEach((model=>model.refresh()))},_shouldSuppressMarking(){return this._isMarkingSuppressionEnabled()&&this._isAttemptsLeft()&&!this._isPassed()},_isMarkingSuppressionEnabled(){const assessmentConfig=this.getConfig();return assessmentConfig._suppressMarking},_isAttemptsLeft(){if(this.get("_attemptsLeft")===0)return false;return true},_isPassed(){return this.get("_isAssessmentComplete")&&this.get("_isPass")},_spendAttempt(){if(!this._isAttemptsLeft())return false;let attemptsSpent=this.get("_attemptsSpent");this.set("_attemptsSpent",++attemptsSpent);if(this.get("_attempts")==="infinite")return true;let attemptsLeft=this.get("_attemptsLeft");this.set("_attemptsLeft",--attemptsLeft);return true},_getScore(){const questionComponents=this._getCurrentQuestionComponents();const score=questionComponents.reduce(((score,model)=>score+=model.score||0),0);return score},_getMaxScore(){const questionComponents=this._getCurrentQuestionComponents();const maxScore=questionComponents.reduce(((maxScore,model)=>maxScore+=model.maxScore||0),0);return maxScore},_getMinScore(){const questionComponents=this._getCurrentQuestionComponents();const minScore=questionComponents.reduce(((minScore,model)=>minScore+=model.minScore||0),0);return minScore},_getScoreAsPercent(){const minScore=this._getMinScore();const maxScore=this._getMaxScore();const score=this._getScore();const range=maxScore-minScore;return range===0?0:Math.round((score-minScore)/range*100)},_getCorrectCount(){return this._getCurrentQuestionComponents().reduce(((count,model)=>count+=model.get("_isCorrect")?1:0),0)},_getQuestionCount(){return this._getCurrentQuestionComponents().length},_getCorrectAsPercent(){const questionCount=this._getQuestionCount();return questionCount===0?0:Math.round(this._getCorrectCount()/questionCount*100)},_getLastAttemptScoreAsPercent(){return this.get("_lastAttemptScoreAsPercent")},_checkReloadPage(){if(!this.canResetInPage())return false;const parentId=this.getParent().get("_id");const currentLocation=location$1._currentId;if(currentLocation!==parentId)return false;if(!this.get("_isReady"))return false;return true},_reloadPage(callback){const assessmentConfig=this.getConfig();this._forceResetOnRevisit=true;this.listenToOnce(Adapt$1,"pageView:ready",(async()=>{if(assessmentConfig._scrollToOnReset){await router$1.navigateToElement(this.get("_id"))}callback()}));_.delay((()=>{Backbone.history.navigate("#/id/"+location$1._currentId,{replace:true,trigger:true})}),250)},_resetQuestions(){const assessmentConfig=this.getConfig();const questionModels=this._getCurrentQuestionComponents();questionModels.forEach((model=>model.reset(assessmentConfig._questions._resetType,true)))},_onRemove(){this._removeQuestionListeners()},_setCompletionStatus(){this.set({_isComplete:true,_isInteractionComplete:true})},_checkIfQuestionsWereRestored(){if(this.get("_assessmentCompleteInSession"))return;if(!this.get("_isAssessmentComplete"))return;let wereQuestionsRestored=true;const questions=this.get("_questions");for(const question of questions){const questionModel=data$1.findById(question._id);if(questionModel.get("_isAvailable")&&!questionModel.get("_isSubmitted")){wereQuestionsRestored=false;break}}if(!wereQuestionsRestored){this.set("_assessmentCompleteInSession",true);return true}return false},isAssessmentEnabled(){if(this.get("_assessment")?._isEnabled)return true;return false},canResetInPage(){const assessmentConfig=this.getConfig();if(assessmentConfig._reloadPageOnReset===false)return false;return true},reset(force,callback){const assessmentConfig=this.getConfig();force=this._forceResetOnRevisit||force===true;this._forceResetOnRevisit=false;const isPageReload=this._checkReloadPage();if(this.get("_assessmentCompleteInSession")&&!assessmentConfig._isResetOnRevisit&&!isPageReload&&!force){if(typeof callback==="function")callback(false);return false}const wereQuestionsRestored=this._checkIfQuestionsWereRestored();force=force||wereQuestionsRestored;if(force&&!this._isAttemptsLeft()){this.set({_attemptsLeft:this.get("_attempts"),_attemptsSpent:0})}const allowResetIfPassed=this.get("_assessment")._allowResetIfPassed;if(!this._isAttemptsLeft()&&!force&&!allowResetIfPassed){if(typeof callback==="function")callback(false);return false}if(!isPageReload){this._setupAssessmentData(force);if(typeof callback==="function")callback(true)}else{this._reloadPage((()=>{if(typeof callback==="function")callback(true)}))}return true},getSaveState(){const state=this.getState();let blocks;const cfg=this.getConfig();const banksActive=cfg._banks?._isEnabled&&cfg._banks._split.length>1;const randomisationActive=cfg._randomisation?._isEnabled;if(!banksActive&&!randomisationActive){blocks=this.findDescendantModels("block")}else{blocks=state.questions.map((question=>data$1.findById(question._id).getParent()))}blocks=[...new Set(blocks)].filter((block=>block.trackingPosition));const blockTrackingPositions=blocks.map((block=>block.trackingPosition));const blockCompletion=blocks.map((block=>{const questions=block.findDescendantModels("question");return questions.map((question=>question.get("_isCorrect")||false))}));const blockData=[blockTrackingPositions,blockCompletion];const saveState=[state.isComplete?1:0,state.attemptsSpent,state.maxScore||0,state.score,state.attemptInProgress?1:0,state.minScore||0,state.correctAsPercent||0,state.correctCount||0,state.questionCount||0];const dataPackage=[saveState,blockData];return dataPackage},setRestoreState(dataPackage){const restoreState=dataPackage[0];const blockData=dataPackage[1];const _isAssessmentComplete=restoreState[0]===1;const attempts=this.get("_attempts");const _attemptsSpent=restoreState[1];const maxScore=restoreState[2];const score=restoreState[3];const _scoreAsPercent=score?Math.round(score/maxScore*100):0;const _attemptInProgress=restoreState[4]===1;const minScore=restoreState[5];const correctAsPercent=restoreState[6];const correctCount=restoreState[7];const questionCount=restoreState[8];const blocks=blockData[0].map((trackingPosition=>{if(typeof trackingPosition==="number"){return data$1.findWhere({_trackingId:trackingPosition})}return data$1.findByTrackingPosition(trackingPosition)}));if(blocks.length){const nonBlockChildren=this.getChildren().models.filter((model=>!model.isTypeGroup("block")));this.getChildren().reset(blocks.concat(nonBlockChildren))}const _questions=[];blocks.forEach(((block,blockIndex)=>{const blockQuestions=block.findDescendantModels("question");blockQuestions.forEach(((question,questionIndex)=>{_questions.push({_id:question.get("_id"),_isCorrect:blockData[1][blockIndex][questionIndex]})}))}));this.set({_isAssessmentComplete:_isAssessmentComplete,_assessmentCompleteInSession:false,_attemptsSpent:_attemptsSpent,_attemptInProgress:_attemptInProgress,_attemptsLeft:attempts==="infinite"?attempts:attempts-_attemptsSpent,_maxScore:maxScore||this._getMaxScore(),_minScore:minScore||this._getMinScore(),_score:score||0,_scoreAsPercent:_scoreAsPercent,_correctAsPercent:correctAsPercent||0,_correctCount:correctCount||0,_questions:_questions,_questionCount:questionCount||0,_lastAttemptScoreAsPercent:_scoreAsPercent});if(_isAssessmentComplete)this._checkIsPass();Adapt$1.trigger("assessments:restored",this.getState(),this)},getState(){const assessmentConfig=this.getConfig();const state={id:assessmentConfig._id,type:"article-assessment",pageId:this.getParent().get("_id"),articleId:this.get("_id"),isEnabled:assessmentConfig._isEnabled,isComplete:this.get("_isAssessmentComplete"),isPercentageBased:assessmentConfig._isPercentageBased,scoreToPass:assessmentConfig._scoreToPass,score:this.get("_score"),scoreAsPercent:this.get("_scoreAsPercent"),maxScore:this.get("_maxScore"),minScore:this.get("_minScore"),correctCount:this.get("_correctCount"),correctAsPercent:this.get("_correctAsPercent"),correctToPass:assessmentConfig._correctToPass,questionCount:this.get("_questionCount"),isPass:this.get("_isPass"),includeInTotalScore:assessmentConfig._includeInTotalScore,assessmentWeight:assessmentConfig._assessmentWeight,attempts:this.get("_attempts"),attemptsSpent:this.get("_attemptsSpent"),attemptsLeft:this.get("_attemptsLeft"),attemptInProgress:this.get("_attemptInProgress"),lastAttemptScoreAsPercent:this.get("_lastAttemptScoreAsPercent"),questions:this.get("_questions"),resetType:assessmentConfig._questions._resetType,allowResetIfPassed:assessmentConfig._allowResetIfPassed,questionModels:new Backbone.Collection(this._getCurrentQuestionComponents())};return state},getConfig(){let assessmentConfig=this.get("_assessment");if(!assessmentConfig){assessmentConfig=$.extend(true,{},assessmentConfigDefaults)}else{assessmentConfig=$.extend(true,{},assessmentConfigDefaults,assessmentConfig)}if(assessmentConfig._id===undefined){assessmentConfig._id="givenId"+givenIdCount++}this.set("_assessment",assessmentConfig);return assessmentConfig}};var AdaptAssessmentArticleModel=__AMD("extensions/adapt-contrib-assessment/js/adapt-assessmentArticleModel",AssessmentModel);const assessmentsConfigDefaults={_isPercentageBased:true,_scoreToPass:100,_isDefaultsLoaded:true};class Assessment extends Backbone.Controller{initialize(){this._assessments=Object.assign([],{_byPageId:{},_byAssessmentId:{}});this.listenTo(Adapt$1,{"assessments:complete":this._onAssessmentsComplete,"router:location":this._checkResetAssessmentsOnRevisit,"router:plugin":this._handleRoute,"app:dataReady":this._onDataReady});this.triggerAssessmentsRestored()}async triggerAssessmentsRestored(){await data$1.whenReady();Adapt$1.trigger("assessment:restored",this.getState())}_onAssessmentsComplete(state){const assessmentId=state.id;state.isComplete=true;if(assessmentId===undefined)return;if(!this._getStateByAssessmentId(assessmentId)){logging$1.warn("assessments: state was not registered when assessment was created")}this.saveState();this._setPageProgress();this._checkAssessmentsComplete()}_restoreModelState(assessmentModel){if(!this._saveStateModel){this._saveStateModel=offlineStorage$1.get("a")}if(this._saveStateModel){const state=assessmentModel.getState();if(this._saveStateModel[state.id]){assessmentModel.setRestoreState(offlineStorage$1.deserialize(this._saveStateModel[state.id]))}}}_handleRoute(plugin,id){if(plugin!=="assessment"&&plugin!=="article-assessment"||id===undefined){return}if(!data$1.findById(id)){const assessment=Adapt$1.assessment._assessments._byAssessmentId[id];if(assessment){id=assessment.get("_id")}else{logging$1.warn("Assessment not found with _id: "+id);return}}_.defer((()=>{Backbone.history.navigate("#/id/"+id,{trigger:true,replace:true})}))}_checkResetAssessmentsOnRevisit(toObject){if(toObject._contentType!=="page")return;const pageAssessmentModels=this._getAssessmentByPageId(toObject._currentId);if(pageAssessmentModels===undefined)return;wait$1.for((function resetAllAssessments(allAssessmentHaveReset){const numberOfAssessments=pageAssessmentModels.length;let numberOfResetAssessments=0;const forceAssessmentReset=false;pageAssessmentModels.forEach((model=>{model.reset(forceAssessmentReset,(()=>{numberOfResetAssessments++;const haveAllModelsReset=numberOfResetAssessments===numberOfAssessments;if(!haveAllModelsReset){return}allAssessmentHaveReset()}))}))}));this._setPageProgress()}_onDataReady(){this._assessments=Object.assign([],{_byPageId:{},_byAssessmentId:{}});this._restoredCount=0}_checkAssessmentsComplete(){let allAssessmentsComplete=true;let assessmentToPostBack=0;const states=this._getStatesByAssessmentId();const assessmentStates=[];for(const id in states){const state=states[id];if(!state.includeInTotalScore)continue;if(!state.isComplete){allAssessmentsComplete=false;break}assessmentToPostBack++;assessmentStates.push(state)}if(!allAssessmentsComplete||assessmentToPostBack===0)return false;if(assessmentToPostBack===1){this._setupSingleAssessmentConfiguration(assessmentStates[0])}_.defer((()=>Adapt$1.trigger("assessment:complete",this.getState())));return true}_setupSingleAssessmentConfiguration(assessmentState){const assessmentsConfig=Adapt$1.course.get("_assessment");$.extend(true,assessmentsConfig,{_isPercentageBased:assessmentState.isPercentageBased,_scoreToPass:assessmentState.scoreToPass});Adapt$1.course.set("_assessment",assessmentsConfig)}_getAssessmentByPageId(pageId){return this._assessments._byPageId[pageId]}_getStateByAssessmentId(assessmentId){if(assessmentId===undefined){return null}return this._assessments._byAssessmentId[assessmentId].getState()}_getStatesByAssessmentId(){const states={};for(const assessmentModel of this._assessments){if(!assessmentModel.get("_isAvailable"))continue;const state=assessmentModel.getState();states[state.id]=state}return states}_setPageProgress(){for(const[id,assessments]of Object.entries(this._assessments._byPageId)){const availableAssessments=assessments.filter((model=>model.get("_isAvailable")));const assessmentsTotal=availableAssessments.length;let assessmentsPassed=0;for(const assessment of availableAssessments){const assessmentState=assessment.getState();if(assessmentState.includeInTotalScore&&!assessmentState.isPass)continue;if(assessmentState.isComplete){assessmentsPassed++}}const pageModel=data$1.findById(id);pageModel?.set({_subProgressTotal:assessmentsTotal,_subProgressComplete:assessmentsPassed})}}_addToAssessmentIdMap(id,model){if(id===undefined){logging$1.warn('An assessment has been registered with an undefined value for "_id"');return}if(id===""){logging$1.warn('An assessment has been registered with an empty value for "_id"')}if(!this._assessments._byAssessmentId[id]){this._assessments._byAssessmentId[id]=model}else{logging$1.warn('An assessment with an _id of "'+id+'" already exists!')}}_setupQuestionNumbering(){const getRelatedQuestions=data=>{const currentAssessmentId=data._assessmentId;const currentAssessment=Adapt$1.assessment.get(currentAssessmentId);return currentAssessment.getState().questions};Handlebars.registerHelper("questionNumber",(function getQuestionNumber(){const data=this.view?.model.toJSON()||this;if(!data._isPartOfAssessment)return;const related=_.pluck(getRelatedQuestions(data),"_id");return related.indexOf(data._id)+1}));Handlebars.registerHelper("questionCount",(function getTotalQuestions(){const data=this.view?this.view.model.toJSON():this;if(!data._isPartOfAssessment)return;return getRelatedQuestions(data).length}))}register(assessmentModel){const state=assessmentModel.getState();const assessmentId=state.id;const pageId=state.pageId;if(this._assessments._byPageId[pageId]===undefined){this._assessments._byPageId[pageId]=[]}this._assessments._byPageId[pageId].push(assessmentModel);this._addToAssessmentIdMap(assessmentId,assessmentModel);this._assessments.push(assessmentModel);this._restoreModelState(assessmentModel);this._restoredCount++;Adapt$1.trigger("assessments:register",state,assessmentModel);this._setPageProgress();this._setupQuestionNumbering()}get(id){return id===undefined?this._assessments.slice(0):this._assessments._byAssessmentId[id]}saveState(){this._saveStateModel={};for(const assessmentModel of this._assessments){const state=assessmentModel.getState();this._saveStateModel[state.id]=offlineStorage$1.serialize(assessmentModel.getSaveState())}offlineStorage$1.set("a",this._saveStateModel)}getConfig(){let assessmentsConfig=Adapt$1.course.get("_assessment");if(assessmentsConfig?._isDefaultsLoaded){return assessmentsConfig}if(assessmentsConfig===undefined){assessmentsConfig=$.extend(true,{},assessmentsConfigDefaults)}else{assessmentsConfig=$.extend(true,{},assessmentsConfigDefaults,assessmentsConfig)}Adapt$1.course.set("_assessment",assessmentsConfig);return assessmentsConfig}getState(){const assessmentsConfig=this.getConfig();let score=0;let maxScore=0;let minScore=0;let correctCount=0;let questionCount=0;let assessments=0;const states=this._getStatesByAssessmentId();let assessmentsComplete=0;for(const id in states){const state=states[id];if(!state.includeInTotalScore)continue;if(state.isComplete)assessmentsComplete++;assessments++;maxScore+=state.maxScore/state.assessmentWeight;minScore+=state.minScore/state.assessmentWeight;score+=state.score/state.assessmentWeight;correctCount+=state.correctCount/state.assessmentWeight;questionCount+=state.questionCount/state.assessmentWeight}const isComplete=assessmentsComplete===assessments;const scoreRange=maxScore-minScore;const scoreAsPercent=scoreRange===0?0:Math.round((score-minScore)/scoreRange*100);const correctAsPercent=questionCount===0?0:Math.round(correctCount/questionCount*100);if(assessmentsConfig._correctToPass===undefined){logging$1.warnOnce("Assessment course config is missing _correctToPass")}const scoreToPass=assessmentsConfig._scoreToPass;const correctToPass=assessmentsConfig._correctToPass||scoreToPass;const isPercentageBased=assessmentsConfig._isPercentageBased;const isPass=isComplete&&(isPercentageBased?scoreAsPercent>=scoreToPass&&correctAsPercent>=correctToPass:score>=scoreToPass&&correctCount>=correctToPass);const canRetry=Object.values(states).some((state=>{const isFailed=!state.isPass;const hasAttemptsLeft=state.attemptsLeft>0||state.attemptsLeft==="infinite";return isFailed&&hasAttemptsLeft}));return{isComplete:isComplete,isPercentageBased:isPercentageBased,isPass:isPass,maxScore:maxScore,minScore:minScore,score:score,scoreToPass:scoreToPass,scoreAsPercent:scoreAsPercent,correctCount:correctCount,correctAsPercent:correctAsPercent,correctToPass:correctToPass,questionCount:questionCount,assessmentsComplete:assessmentsComplete,assessments:assessments,canRetry:canRetry}}}__AMD("extensions/adapt-contrib-assessment/js/assessment",Adapt$1.assessment=new Assessment);const ArticleViewInitialize=ArticleView$1.prototype.initialize;ArticleView$1.prototype.initialize=function(options){if(this.model.get("_assessment")?._isEnabled===true){Object.assign(this,AdaptAssessmentArticleView)}return ArticleViewInitialize.apply(this,arguments)};const ArticleModelInitialize=ArticleModel$1.prototype.initialize;ArticleModel$1.prototype.initialize=function(options){if(this.get("_assessment")?._isEnabled===true){Object.assign(this,AdaptAssessmentArticleModel);const returnValue=ArticleModelInitialize.apply(this,arguments);this._postInitialize();return returnValue}return ArticleModelInitialize.apply(this,arguments)};class Bookmarking extends Backbone.Controller{initialize(){this.bookmarkLevel=null;this.restoredLocationID=null;this.currentLocationID=null;this.listenToOnce(Adapt$1,"router:location",this.onAdaptInitialize)}onAdaptInitialize(){if(!this.checkCourseIsEnabled())return;this.setupEventListeners();this.checkRestoreLocation()}checkCourseIsEnabled(){const courseBookmarkModel=Adapt$1.course.get("_bookmarking");if(!courseBookmarkModel||!courseBookmarkModel._isEnabled)return false;return true}setupEventListeners(){this._onInview=this.onInview.bind(this);this._debouncedCheckLocation=_.debounce(this.checkLocation.bind(this),250);this.listenTo(Adapt$1,{"menuView:ready":this.setupMenu,"pageView:preRender":this.setupPage,"view:childAdded":this.onChildViewAdded,"view:preRemove":this.onChildViewPreRemove})}checkRestoreLocation(){this.restoredLocationID=offlineStorage$1.get("location");if(!this.restoredLocationID||this.restoredLocationID==="undefined"||!data$1.findById(this.restoredLocationID))return;this.listenToOnce(Adapt$1,"pageView:ready menuView:ready",this.restoreLocation)}restoreLocation(){this.stopListening(Adapt$1,"pageView:ready menuView:ready",this.restoreLocation);_.delay((()=>{if(this.isAlreadyOnScreen(this.restoredLocationID))return;if(Adapt$1.course.get("_bookmarking")._showPrompt===false){this.navigateToPrevious();return}this.showPrompt()}),500)}isAlreadyOnScreen(id){if(id===location$1._currentId)return true;const type=data$1.findById(id).getTypeGroup();if(type==="menu"||type==="page")return false;const measurements=$(`.${id}`).onscreen();const isLocationOnscreen=measurements?.onscreen??false;const isLocationFullyInview=measurements?.percentInview===100??false;return isLocationOnscreen&&isLocationFullyInview}showPrompt(){const courseBookmarkModel=Adapt$1.course.get("_bookmarking");const buttons=courseBookmarkModel._buttons||{yes:"Yes",no:"No"};this.listenToOnce(Adapt$1,{"bookmarking:continue":this.navigateToPrevious,"bookmarking:cancel":this.navigateCancel});notify$1.prompt({_classes:"is-bookmarking",_showIcon:true,title:courseBookmarkModel.title,body:courseBookmarkModel.body,_prompts:[{promptText:buttons.yes||"Yes",_callbackEvent:"bookmarking:continue"},{promptText:buttons.no||"No",_callbackEvent:"bookmarking:cancel"}]})}navigateToPrevious(){_.defer((async()=>{const isSinglePage=Adapt$1.contentObjects.models.length===1;try{await router$1.navigateToElement(this.restoredLocationID,{trigger:true,replace:isSinglePage,duration:400})}catch(err){logging$1.warn(`Bookmarking cannot navigate to id: ${this.restoredLocationID}\n`,err)}}));this.stopListening(Adapt$1,"bookmarking:cancel")}navigateCancel(){this.stopListening(Adapt$1,"bookmarking:continue")}resetLocationID(){this.setLocationID("")}setupMenu(menuView){const menuModel=menuView.model;if(!menuModel.get("_parentId")){this.resetLocationID();return}this.setLocationID(menuModel.get("_id"))}getBookmarkLevel(pageModel){const defaultLevel=Adapt$1.course.get("_bookmarking")._level||"component";const bookmarkModel=pageModel.get("_bookmarking");const isInherit=!bookmarkModel||!bookmarkModel._level||bookmarkModel._level==="inherit";return isInherit?defaultLevel:bookmarkModel._level}setupPage(pageView){const pageBookmarkModel=pageView.model.get("_bookmarking");if(pageBookmarkModel?._isEnabled===false){this.resetLocationID();return}this.setLocationID(pageView.model.get("_id"));this.bookmarkLevel=this.getBookmarkLevel(pageView.model);if(this.bookmarkLevel==="page")return}setLocationID(id){if(this.currentLocationID===id)return;offlineStorage$1.set("location",id);this.currentLocationID=id}checkLocation(){const contentObjectBookmarkModel=Adapt$1.parentView?.model?.get("_bookmarking");if(contentObjectBookmarkModel?._isEnabled===false){this.resetLocationID();return}const currentModel=location$1._currentModel;if(!currentModel||!this.bookmarkLevel)return;const possibleViewIds=currentModel.findDescendantModels(this.bookmarkLevel).filter((desc=>desc.get("_isTrackable")!==false)).map((desc=>desc.get("_id")));let highestOnscreen=0;let highestOnscreenLocation="";possibleViewIds.forEach((id=>{const element=$(`[data-adapt-id=${id}]`);if(!element.length)return;const measurements=element.onscreen();if(!measurements.onscreen)return;if(measurements.percentInview<=highestOnscreen)return;highestOnscreen=measurements.percentInview;highestOnscreenLocation=id}));if(highestOnscreenLocation)this.setLocationID(highestOnscreenLocation)}onChildViewAdded(view,childView){if(!this.bookmarkLevel||!childView.model.isTypeGroup(this.bookmarkLevel))return;childView.$el.on("inview",this._onInview)}onChildViewPreRemove(childView){if(!this.bookmarkLevel||!childView.model.isTypeGroup(this.bookmarkLevel))return;childView.$el.off("inview",this._onInview)}onInview(event,visible){if(!visible)return;this._debouncedCheckLocation()}}__AMD("extensions/adapt-contrib-bookmarking/js/adapt-contrib-bookmarking",new Bookmarking);var ResourcesView=__AMD("extensions/adapt-contrib-resources/js/ResourcesView",class ResourcesView extends Backbone.View{className(){return"resources"}initialize(){this.onResourceItemClicked=this.onResourceItemClicked.bind(this);this.listenTo(Adapt$1,"remove",this.remove);this.render()}render(){const data={...this,model:this.model.toJSON(),resources:this.model.get("_resources"),resourceTypes:this.model.get("_resourceTypes")};ReactDOM__default["default"].render(React__default["default"].createElement(templates.resources,data),this.el);_.defer((()=>{Adapt$1.trigger("view:render",this);this.listenTo(Adapt$1,"drawer:closed",this.remove)}));return this}onResourceItemClicked(e){const index=$(e.currentTarget).attr("data-index");const resourceItemData=this.model.get("_resourcesItems")[index];Adapt$1.trigger("resources:itemClicked",resourceItemData)}});class Resources extends Backbone.Controller{initialize(){this.listenTo(Adapt$1,"adapt:start",this.initResources)}initResources(){const courseResources=Adapt$1.course.get("_resources");if(!courseResources||courseResources._isEnabled===false)return;const drawerObject={title:courseResources.title,description:courseResources.description,className:"is-resources",drawerOrder:courseResources._drawerOrder||0};drawer.addItem(drawerObject,"resources:showResources");Object.assign(courseResources,{_isA11yComponentDescriptionEnabled:true,_id:"resources",_extension:"resources",_ariaLevel:1});this.setupResources(courseResources)}setupResources(resourcesData){this.listenTo(Adapt$1,"resources:showResources",(()=>{const model=new Backbone.Model(resourcesData);let resources=model.get("_resourcesItems");const contentObjectModel=Adapt$1.parentView?.model;const contentObjectConfig=contentObjectModel?.get("_resources");const isContentObjectNotCourseModel=contentObjectModel!==Adapt$1.course;const contentObjectResourceItems=isContentObjectNotCourseModel&&contentObjectConfig?._isEnabled&&contentObjectConfig?._resourcesItems;if(contentObjectResourceItems)resources=resources.concat(contentObjectResourceItems??[]);if(isContentObjectNotCourseModel){resources=resources.filter((resource=>resource._isGlobal!==false))}model.set("_resources",resources);this.setupTypes(model,resourcesData);drawer.triggerCustomView(new ResourcesView({model:model}).$el)}))}setupTypes(model,resourcesData){const configuredTypes=Object.keys(resourcesData._filterButtons).filter((type=>type!=="all"));const allTypes=["all",...configuredTypes];model.set("_resourceTypes",allTypes)}}__AMD("extensions/adapt-contrib-resources/js/adapt-contrib-resources",new Resources);const COMPLETION_STATE=ENUM(["UNKNOWN",["NOT ATTEMPTED","NOTATTEMPTED"],"NOT_ATTEMPTED","BROWSED","INCOMPLETE","COMPLETED"]);var COMPLETION_STATE$1=__AMD("extensions/adapt-contrib-spoor/js/enums/completionStateEnum",COMPLETION_STATE);const SUCCESS_STATUS=ENUM(["UNKNOWN","PASSED","FAILED"]);var SUCCESS_STATE=__AMD("extensions/adapt-contrib-spoor/js/enums/successStateEnum",SUCCESS_STATUS);class Logger{constructor(){this.logArr=[];this.registeredViews=[]}static getInstance(){if(Logger.instance===null){Logger.instance=new Logger}return Logger.instance}getEntries(){return this.logArr}getLastEntry(){return this.logArr[this.logArr.length-1]}info(str){this.logArr[this.logArr.length]={str:str,type:Logger.LOG_TYPE_INFO,time:Date.now()};this.updateViews()}warn(str){this.logArr[this.logArr.length]={str:str,type:Logger.LOG_TYPE_WARN,time:Date.now()};this.updateViews()}error(str){this.logArr[this.logArr.length]={str:str,type:Logger.LOG_TYPE_ERROR,time:Date.now()};this.updateViews()}debug(str){this.logArr[this.logArr.length]={str:str,type:Logger.LOG_TYPE_DEBUG,time:Date.now()};this.updateViews()}registerView(_view){this.registeredViews[this.registeredViews.length]=_view}unregisterView(_view){for(let i=0,l=this.registeredViews.length;i0){this.maxCharLimitOverride=settings._maxCharLimitOverride}}this.logger.debug("ScormWrapper::initialize");this.lmsConnected=this.scorm.init();if(!this.lmsConnected){this.handleInitializeError();return this.lmsConnected}if(settings?._connectionTest?._isEnabled!==false){this._connection=new Connection(settings?._connectionTest,this)}this.startTime=new Date;this.initTimedCommit();return this.lmsConnected}isFirstSession(){return this.getValue(this.isSCORM2004()?"cmi.entry":"cmi.core.entry")==="ab-initio"}setIncomplete(){this.setValue(this.isSCORM2004()?"cmi.completion_status":"cmi.core.lesson_status",COMPLETION_STATE$1.INCOMPLETE.asLowerCase);if(this.commitOnStatusChange&&!this.commitOnAnyChange)this.commit()}setCompleted(){this.setValue(this.isSCORM2004()?"cmi.completion_status":"cmi.core.lesson_status",COMPLETION_STATE$1.COMPLETED.asLowerCase);if(this.commitOnStatusChange&&!this.commitOnAnyChange)this.commit()}setPassed(){if(this.isSCORM2004()){this.setValue("cmi.completion_status",COMPLETION_STATE$1.COMPLETED.asLowerCase);this.setValue("cmi.success_status",SUCCESS_STATE.PASSED.asLowerCase)}else{this.setValue("cmi.core.lesson_status",SUCCESS_STATE.PASSED.asLowerCase)}if(this.commitOnStatusChange&&!this.commitOnAnyChange)this.commit()}setFailed(){if(this.isSCORM2004()){this.setValue("cmi.success_status",SUCCESS_STATE.FAILED.asLowerCase);if(this.setCompletedWhenFailed)this.setValue("cmi.completion_status",COMPLETION_STATE$1.COMPLETED.asLowerCase)}else{this.setValue("cmi.core.lesson_status",SUCCESS_STATE.FAILED.asLowerCase)}if(this.commitOnStatusChange&&!this.commitOnAnyChange)this.commit()}getStatus(){const status=this.getValue(this.isSCORM2004()?"cmi.completion_status":"cmi.core.lesson_status");if(this.isValidCompletionStatus(status))return status;this.handleDataError(new ScormError$1(SERVER_STATUS_UNSUPPORTED,{status:status}));return null}setStatus(status){switch(status.toLowerCase()){case COMPLETION_STATE$1.INCOMPLETE.asLowerCase:this.setIncomplete();break;case COMPLETION_STATE$1.COMPLETED.asLowerCase:this.setCompleted();break;case SUCCESS_STATE.PASSED.asLowerCase:this.setPassed();break;case SUCCESS_STATE.FAILED.asLowerCase:this.setFailed();break;default:this.handleDataError(new ScormError$1(CLIENT_STATUS_UNSUPPORTED,{status:status}))}}getScore(){return this.getValue(this.isSCORM2004()?"cmi.score.raw":"cmi.core.score.raw")}setScore(score,minScore=0,maxScore=100,isPercentageBased=true){const cmiPrefix=this.isSCORM2004()?"cmi":"cmi.core";this.recordScore(cmiPrefix,...arguments)}getLessonLocation(){return this.getValue(this.isSCORM2004()?"cmi.location":"cmi.core.lesson_location")}setLessonLocation(location){this.setValue(this.isSCORM2004()?"cmi.location":"cmi.core.lesson_location",location)}getSuspendData(){return this.getValue("cmi.suspend_data")}setSuspendData(data){this.setValue("cmi.suspend_data",data)}getStudentName(){return this.getValue(this.isSCORM2004()?"cmi.learner_name":"cmi.core.student_name")}getStudentId(){return this.getValue(this.isSCORM2004()?"cmi.learner_id":"cmi.core.student_id")}setLanguage(lang){if(this.isSCORM2004()){this.setValue("cmi.learner_preference.language",lang);return}this.setValueIfChildSupported("cmi.student_preference.language",lang)}commit(){this.logger.debug("ScormWrapper::commit");if(!this.lmsConnected){this.handleConnectionError();return}if(this.commitRetryPending){this.logger.debug("ScormWrapper::commit: skipping this commit call as one is already pending.");return}if(this.scorm.save()){this.commitRetries=0;this.lastCommitSuccessTime=new Date;if(this._connection)this._connection.test();Adapt$1.trigger("spoor:commit",this);return}if(this.commitRetries0){const delay=this.timedCommitFrequency*(60*1e3);this.timedCommitIntervalID=window.setInterval(this.commit,delay)}}initRetryCommit(){this.logger.debug(`ScormWrapper::initRetryCommit ${this.commitRetries} out of ${this.maxCommitRetries}`);this.commitRetryPending=true;this.retryCommitTimeoutID=window.setTimeout(this.doRetryCommit,this.commitRetryDelay)}doRetryCommit(){this.logger.debug("ScormWrapper::doRetryCommit");this.commitRetryPending=false;this.commit()}async handleInitializeError(){if(!data$1.isReady)await data$1.whenReady();Adapt$1.trigger("tracking:initializeError");this.handleError(new ScormError$1(CLIENT_COULD_NOT_CONNECT))}async handleConnectionError(callback=null){if(!data$1.isReady)await data$1.whenReady();Adapt$1.trigger("tracking:connectionError",callback);this.handleError(new ScormError$1(CLIENT_NOT_CONNECTED))}async handleDataError(error){if(!data$1.isReady)await data$1.whenReady();if(!this.isUnsupportedErrorCode(error.data.errorCode))Adapt$1.trigger("tracking:dataError");this.handleError(error)}async handleFinishError(error){if(!data$1.isReady)await data$1.whenReady();Adapt$1.trigger("tracking:terminationError");this.handleError(error)}async handleError(error){if(!data$1.isReady)await data$1.whenReady();_.defer((()=>{if("value"in error.data){if(error.data.value.length&&error.data.value.length>80)error.data.value=error.data.value.slice(0,80)+"...";if(error.data.value==="")error.data.value="''"}const config=Adapt$1.course.get("_spoor");const messages=Object.assign({},ScormError$1.defaultMessages,config&&config._messages);const message=Handlebars.compile(messages[error.name])(error.data);this.logger.error(message);if(this.isUnsupportedErrorCode(error.data.errorCode))return;switch(error.name){case CLIENT_COULD_NOT_CONNECT:if(!notify$1.isOpen){wait$1.begin();router$1.hideLoading();notify$1.popup({_isCancellable:false,title:messages.title,body:message})}}if(!this.suppressErrors&&(!this.logOutputWin||this.logOutputWin.closed)&&confirm(`${messages.title}:\n\n${message}\n\n${messages.pressOk}`)){this.showDebugWindow()}}))}recordScore(cmiPrefix,score,minScore=0,maxScore=100,isPercentageBased=true){if(this.isSCORM2004()){const range=score<0?Math.abs(minScore):maxScore;const scaledScore=score/range;this.setValue(`${cmiPrefix}.score.scaled`,parseFloat(scaledScore.toFixed(7)))}else if(isPercentageBased){score=score<0?0:Math.round(score/maxScore*100);minScore=0;maxScore=100}else{const validate=(attribute,value)=>{const isValid=value>=0&&score<=100;if(!isValid)this.logger.warn(`${attribute} must be between 0-100.`)};validate(`${cmiPrefix}.score.raw`,score);validate(`${cmiPrefix}.score.min`,minScore);validate(`${cmiPrefix}.score.max`,maxScore)}this.setValue(`${cmiPrefix}.score.raw`,score);this.setValueIfChildSupported(`${cmiPrefix}.score.min`,minScore);this.setValueIfChildSupported(`${cmiPrefix}.score.max`,maxScore)}getInteractionCount(){const count=this.getValue("cmi.interactions._count");return count===""?0:count}recordInteractionScorm12(id,response,correct,latency,type){id=id.trim();const cmiPrefix=`cmi.interactions.${this.getInteractionCount()}`;this.setValue(`${cmiPrefix}.id`,id);this.setValueIfChildSupported(`${cmiPrefix}.type`,type);this.setValueIfChildSupported(`${cmiPrefix}.student_response`,response);this.setValueIfChildSupported(`${cmiPrefix}.result`,correct?"correct":"wrong");if(latency!==null&&latency!==undefined)this.setValueIfChildSupported(`${cmiPrefix}.latency`,this.convertToSCORM12Time(latency));this.setValueIfChildSupported(`${cmiPrefix}.time`,this.getCMITime())}recordInteractionScorm2004(id,response,correct,latency,type){id=id.trim();const cmiPrefix=`cmi.interactions.${this.getInteractionCount()}`;this.setValue(`${cmiPrefix}.id`,id);this.setValue(`${cmiPrefix}.type`,type);this.setValue(`${cmiPrefix}.learner_response`,response);this.setValue(`${cmiPrefix}.result`,correct?"correct":"incorrect");if(latency!==null&&latency!==undefined)this.setValue(`${cmiPrefix}.latency`,this.convertToSCORM2004Time(latency));this.setValue(`${cmiPrefix}.timestamp`,this.getISO8601Timestamp())}recordInteractionMultipleChoice(id,response,correct,latency,type){if(this.isSCORM2004()){response=response.replace(/,|#/g,"[,]")}else{response=response.replace(/#/g,",");response=this.checkResponse(response,"choice")}const scormRecordInteraction=this.isSCORM2004()?this.recordInteractionScorm2004:this.recordInteractionScorm12;scormRecordInteraction.call(this,id,response,correct,latency,type)}recordInteractionMatching(id,response,correct,latency,type){response=response.replace(/#/g,",");if(this.isSCORM2004()){response=response.replace(/,/g,"[,]").replace(/\./g,"[.]")}else{response=this.checkResponse(response,"matching")}const scormRecordInteraction=this.isSCORM2004()?this.recordInteractionScorm2004:this.recordInteractionScorm12;scormRecordInteraction.call(this,id,response,correct,latency,type)}recordInteractionFillIn(id,response,correct,latency,type){let maxLength=this.isSCORM2004()?250:255;maxLength=this.maxCharLimitOverride??maxLength;if(response.length>maxLength){response=response.substr(0,maxLength);this.logger.warn(`ScormWrapper::recordInteractionFillIn: response data for ${id} is longer than the maximum allowed length of ${maxLength} characters; data will be truncated to avoid an error.`)}const scormRecordInteraction=this.isSCORM2004()?this.recordInteractionScorm2004:this.recordInteractionScorm12;scormRecordInteraction.call(this,id,response,correct,latency,type)}getObjectiveCount(){const count=this.getValue("cmi.objectives._count");return count===""?0:count}getObjectiveIndexById(id){const count=this.getObjectiveCount();for(let i=0;i9999){return"9999:99:99.99"}const str=[this.padWithZeroes(hrs,4),this.padWithZeroes(mins,2),this.padWithZeroes(secs,2)].join(":");return`${str}.${Math.floor(ms/10)}`}convertToSCORM2004Time(msConvert){let csConvert=Math.floor(msConvert/10);const csPerSec=100;const csPerMin=csPerSec*60;const csPerHour=csPerMin*60;const csPerDay=csPerHour*24;let days=Math.floor(csConvert/csPerDay);csConvert-=days*csPerDay;days=days?days+"D":"";let hours=Math.floor(csConvert/csPerHour);csConvert-=hours*csPerHour;hours=hours?hours+"H":"";let mins=Math.floor(csConvert/csPerMin);csConvert-=mins*csPerMin;mins=mins?mins+"M":"";let secs=Math.floor(csConvert/csPerSec);csConvert-=secs*csPerSec;secs=secs||"0";let cs=csConvert;cs=cs?"."+cs:"";const seconds=secs+cs+"S";const hms=[hours,mins,seconds].join("");return"P"+days+"T"+hms}getCMITime(){const date=new Date;const hours=this.padWithZeroes(date.getHours(),2);const min=this.padWithZeroes(date.getMinutes(),2);const sec=this.padWithZeroes(date.getSeconds(),2);return[hours,min,sec].join(":")}getISO8601Timestamp(){const date=(new Date).toISOString();return date.replace(/.\d\d\dZ/,"")}padWithZeroes(numToPad,padBy){let len=padBy;while(--len){numToPad="0"+numToPad}return numToPad.slice(-padBy)}isSCORM2004(){return this.scorm.version==="2004"}checkResponse(response,responseType){if(!response)return response;if(responseType!=="choice"&&responseType!=="matching")return response;response=response.split(/,|#/);const self=this;if(responseType==="choice"){response=response.map(checkIdentifier)}else{response=response.map((r=>{const identifiers=r.split(".");return checkIdentifier(identifiers[0])+"."+checkIdentifier(identifiers[1])}))}function checkIdentifier(r){if(r.length===1&&r>="0"&&r<="9")return r;if(r.length===1&&r>="a"&&r<="z")return r;const i=parseInt(r);if(isNaN(i)||i<10||i>35){self.handleError(new ScormError$1(CLIENT_INVALID_CHOICE_VALUE))}return Number(i).toString(36)}return response.join(",")}getExitState(){const completionStatus=this.scorm.data.completionStatus;const isIncomplete=completionStatus===COMPLETION_STATE$1.INCOMPLETE.asLowerCase||completionStatus===COMPLETION_STATE$1.UNKNOWN.asLowerCase;const exitState=isIncomplete?this.exitStateIfIncomplete:this.exitStateIfComplete;if(exitState!=="auto")return exitState;if(this.isSCORM2004())return isIncomplete?"suspend":"normal";return""}}ScormWrapper.instance=null;var ScormWrapper$1=__AMD("extensions/adapt-contrib-spoor/js/scorm/wrapper",ScormWrapper);const LZMAWorker=window.LZMAFactory("./libraries/lzma_worker-min.js");const ZeroString={};function makeZeroString(length){ZeroString[length]=ZeroString[length]||new Array(length+1).join("0");return ZeroString[length]}for(let i=1,l=64;i<=l;i++){makeZeroString(i)}function zeroPadRightToLength(string,length){const padLength=length-string.length;if(padLength>0){string+=makeZeroString(padLength)}return string}function zeroPadLeftToLength(string,length){const padLength=length-string.length;if(padLength>0){string=makeZeroString(padLength)+string}return string}function zeroPadRightToMultiple(string,multiple){const padLength=multiple-string.length%multiple;if(padLength!==multiple){string+=makeZeroString(padLength)}return string}function binaryToUnsignedInteger(binary,binaryLength){if(binaryLength===0){return 0}binary=zeroPadLeftToLength(binary,binaryLength);const integer=parseInt(binary.slice(0,binaryLength),2);return integer}function shiftUnsignedIntegerFromBinary(binary,binaryLength){if(binaryLength===0){return[0,binary]}binary=zeroPadLeftToLength(binary,binaryLength);const integer=parseInt(binary.slice(0,binaryLength),2);binary=binary.slice(binaryLength);return[integer,binary]}function shiftBinary(binary,binaryLength){if(binaryLength===0){return["",binary]}binary=zeroPadLeftToLength(binary,binaryLength);const shifted=binary.slice(0,binaryLength);binary=binary.slice(binaryLength);return[shifted,binary]}function unsignedIntegerToBinary(integer,binaryLength){if(binaryLength===0){return""}let binary=Math.abs(integer).toString(2);if(typeof binaryLength==="undefined"){return binary}const length=binary.length;if(length>binaryLength){throw new Error(`Integer too big for specified binary length. integer: ${integer} binarylen: ${binaryLength}`)}binary=zeroPadLeftToLength(binary,binaryLength);return binary}function byteArrayToString(array){const arrayLength=array.length;let string=new Array(arrayLength);for(let i=0,l=arrayLength;iMath.pow(2,value)-1));this.maxValue=this.maxValues[this.maxValues.length-1];this.sizeBinaryLength=unsignedIntegerToBinary(this.bitSizes.length-1).length}valueToBinary(integer,logStats=null){const parentName=this.parent.name;const sizeIndex=this.maxValues.findIndex((maxValue=>integer<=maxValue));if(sizeIndex===-1){throw new Error(`Value is too large for type: ${parentName} value: ${integer} max: ${this.maxValue}`)}const sizeBinary=unsignedIntegerToBinary(sizeIndex,this.sizeBinaryLength);const valueLength=this.bitSizes[sizeIndex];const name=this.name;if(logStats){logs.typeLengths[parentName]=logs.typeLengths[parentName]||{};logs.typeLengths[parentName][name]=logs.typeLengths[parentName][name]||{};logs.typeLengths[parentName][name][valueLength]=logs.typeLengths[parentName][name][valueLength]||0;logs.typeLengths[parentName][name][valueLength]++}const integerBinary=unsignedIntegerToBinary(integer,valueLength);const binary=[sizeBinary,integerBinary];return binary}shiftValueFromBinary(binary){let sizeBinary;[sizeBinary,binary]=shiftBinary(binary,this.sizeBinaryLength);const sizeIndex=binaryToUnsignedInteger(sizeBinary);const valueLength=this.bitSizes[sizeIndex];let integer;[integer,binary]=shiftUnsignedIntegerFromBinary(binary,valueLength);return[integer,binary]}}class VariableIntegerType extends FixedIntegerType{constructor(options){super(options);this.isNegative=this.minValue<0&&this.maxValue===0;this.integer=new LengthAndValueBinary(this,"integer",options.integerBitSizes)}valueToBinary(integer,logStats=null){integer=integer.toFixed(0);const binary=this.integer.valueToBinary(Math.abs(integer),logStats);if(logStats){this.log(binary)}return binary}shiftValueFromBinary(binary){let integer;[integer,binary]=this.integer.shiftValueFromBinary(binary);if(this.isNegative){integer=-integer}return[integer,binary]}}class VariableArrayType extends VariableIntegerType{constructor(options){super(options);this.esType="array"}valueToBinary(array,logStats=null){const arrayLength=array.length;const binary=super.valueToBinary(arrayLength);if(arrayLength){const valueType=findValueTypeFromValues(array);binary.push(valueType.binaryType);binary.type=valueType.name;binary.push(array.map((value=>valueType.valueToBinary(value,logStats))))}if(logStats){this.log(binary)}return binary}shiftValueFromBinary(binary){let arrayLength;[arrayLength,binary]=super.shiftValueFromBinary(binary);const value=new Array(arrayLength);if(arrayLength){let valueType;[valueType,binary]=shiftValueTypeFromBinary(binary);for(let i=0,l=arrayLength;iValueTypes.nameIndex[valueType.name]=valueType));function esTypeOf(value){if(Array.isArray(value)){return"array"}if(value===null){return"null"}return typeof value}function findValueTypeFromName(name){return ValueTypes.nameIndex[name.toLowerCase()]}function findValueTypeFromValue(value){const esType=esTypeOf(value);switch(esType){case"array":return arrayType;case"boolean":return booleanType}value=value.toFixed(2);const isFloat=!Number.isInteger(value);const isValueInValueTypeRange=valueType=>value>=valueType.minValue&&value<=valueType.maxValue;const valueType=isFloat?decimalTypes.find(isValueInValueTypeRange):integerTypes.find(isValueInValueTypeRange);if(!valueType){throw new Error(`Cannot find type from value: ${value}`)}return valueType}function findValueTypeFromValues(values){if(!values.length){return}let minValue=0;let maxValue=0;let isFloat=false;const esTypes=values.map((value=>{const valueType=findValueTypeFromValue(value);if(valueType.esType==="number"){minValue=Math.min(value,minValue);maxValue=Math.max(value,maxValue);isFloat=isFloat||!Number.isInteger(value)}return valueType.esType}));const uniqESTypes=[...new Set(esTypes)];if(uniqESTypes.length>1){throw new Error(`Cannot resolve array to one type: ${uniqESTypes.join()}`)}const esType=uniqESTypes[0];switch(esType){case"array":return arrayType;case"boolean":return booleanType}const isRangeInValueTypeRange=valueType=>minValue>=valueType.minValue&&maxValue<=valueType.maxValue;const valueType=isFloat?decimalTypes.find(isRangeInValueTypeRange):integerTypes.find(isRangeInValueTypeRange);if(!valueType){throw new Error(`Cannot find type from value. min: ${minValue} max: ${maxValue} isfloat: ${isFloat}`)}return valueType}function shiftValueTypeFromBinary(binary){const valueType=ValueTypes.find((valueType=>{const binaryType=binary.slice(0,valueType.binaryTypeLength);return binaryType===valueType.binaryType}));if(!valueType){throw new Error(`Cannot find type from binary: ${binary.slice(0,6)}...`)}binary=binary.slice(valueType.binaryTypeLength);return[valueType,binary]}function convertValuesToNumbers(value){const esType=esTypeOf(value);switch(esType){case"array":return value.map(convertValuesToNumbers);case"undefined":case"null":return value?1:0;case"boolean":case"number":return value}throw new Error(`Cannot convert ${esType} to number`)}class Converter{getInvalidTypeError(value){try{value=convertValuesToNumbers(value);esTypeOf(value)==="array"?findValueTypeFromValues(value):findValueTypeFromValue(value);return}catch(err){return err}}valueToBinary(value,typeName=null,logStats=null){this.clearLog();const hasInitialType=typeof typeName==="string";value=convertValuesToNumbers(value);const valueType=hasInitialType?findValueTypeFromName(typeName):findValueTypeFromValue(value);if(!valueType){throw new Error(`Could not find value type from ${hasInitialType?`name ${typeName}`:`value ${value}`} accepts: ${Object.keys(ValueTypes.nameIndex)}. Leave typeName empty for auto-detect.`)}const binary=valueType.valueToBinary(value,logStats);if(!hasInitialType){binary.unshift(valueType.binaryType)}if(logStats){this.printLog()}return binary}valueFromBinary(binary,typeName=null){binary=___default["default"].flatten(binary).join("");const hasInitialType=typeof typeName==="string";let valueType;if(hasInitialType){valueType=findValueTypeFromName(typeName)}else{[valueType,binary]=shiftValueTypeFromBinary(binary)}if(!valueType||!(valueType instanceof AbstractValueType)){throw new Error(`Could not find value type from ${hasInitialType?`name "${typeName}"`:`binary "${binary.slice(0,8)}"...`} accepts: ${Object.keys(ValueTypes.nameIndex)}. Leave typeName empty for auto-detect.`)}const[value]=valueType.shiftValueFromBinary(binary);return value}clearLog(){logs.usedTypes={};logs.typeLengths={};logs.binarySamples={}}printLog(){console.log("Types used count:",logs.usedTypes);console.log("Type lengths used count:",logs.typeLengths);console.log("Type binary samples:",logs.binarySamples)}serialize(value,typeName=null,logStats=null){const binary=this.valueToBinary(value,typeName,logStats);const base64=binaryToBase64(binary);return base64}async serializeAsync(value,typeName=null,logStats=null){const binary=this.valueToBinary(value,null,null);const base64=binaryToBase64(binary);const isLargeArray=Array.isArray(value)&&value.length>10;if(isLargeArray){return new Promise((resolve=>{LZMAWorker.compress(JSON.stringify(value),1,(data=>{const compressedBase64=`#${window.btoa(data.map((i=>String.fromCharCode(i+128))).join("")).replace(/=/g,"")}`;const isCompressedSmaller=compressedBase64.lengthc.charCodeAt(0)-128))));const binary=base64ToBinary(base64);const value=this.valueFromBinary(binary,typeName);return value}}var SCORMSuspendData=__AMD("extensions/adapt-contrib-spoor/js/serializers/SCORMSuspendData",window.SCORMSuspendData=new Converter);var ComponentSerializer=__AMD("extensions/adapt-contrib-spoor/js/serializers/ComponentSerializer",class ComponentSerializer extends Backbone.Controller{initialize(trackingIdType,shouldCompress){this.trackingIdType=trackingIdType;this.shouldCompress=shouldCompress}async serialize(shouldStoreResponses,shouldStoreAttempts){if(shouldStoreAttempts&&!shouldStoreResponses){logging$1.warnOnce("SPOOR configuration error, cannot use '_shouldStoreAttempts' without '_shouldStoreResponses'")}const states=[];data$1.each((model=>{if(model.get("_type")!==this.trackingIdType){return}const trackingId=model.get("_trackingId");if(typeof trackingId==="undefined"){return}const isContainer=model.hasManagedChildren;let components=isContainer?model.findDescendantModels("component"):[model];components=components.filter((component=>component.get("_isTrackable")!==false));components.forEach(((component,index)=>{if(component.get("_isTrackable")===false){return}if(!shouldStoreResponses){const state=[[trackingId,index],[component.get("_isComplete")]];states.push(state);return}let modelState=null;if(!component.getAttemptState){modelState=component.get("_isQuestionType")?[[component.get("_score")||0,component.get("_attemptsLeft")||0],[component.get("_isComplete")||false,component.get("_isInteractionComplete")||false,component.get("_isSubmitted")||false,component.get("_isCorrect")||false],[component.get("_userAnswer")]]:[[],[component.get("_isComplete")||false,component.get("_isInteractionComplete")||false],[component.get("_userAnswer")]]}else{modelState=component.getAttemptState()}const userAnswer=modelState[2][0];const hasUserAnswer=typeof userAnswer!=="undefined"&&userAnswer!==null;const isUserAnswerArray=Array.isArray(userAnswer);if(!hasUserAnswer){modelState[2][0]=[]}else if(!isUserAnswerArray){modelState[2][0]=[modelState[2][0]]}const attemptStates=component.get("_attemptStates");const hasAttemptStates=shouldStoreAttempts&&Array.isArray(attemptStates);if(hasAttemptStates){modelState[2][1]=attemptStates}const state=[[trackingId,index],[hasUserAnswer,isUserAnswerArray,hasAttemptStates],modelState];states.push(state)}))}));if(this.shouldCompress)return await SCORMSuspendData.serializeAsync(states);return SCORMSuspendData.serialize(states)}deserialize(binary){const trackingIdMap=data$1.toArray().reduce(((trackingIdMap,model)=>{const trackingId=model.get("_trackingId");if(typeof trackingId==="undefined")return trackingIdMap;trackingIdMap[trackingId]=model;return trackingIdMap}),{});const states=SCORMSuspendData.deserialize(binary);const shouldStoreResponses=states[0].length>2;states.forEach((state=>{const[trackingId,index]=state[0];const model=trackingIdMap[trackingId];if(!model){return}const isContainer=model.hasManagedChildren;let components=isContainer?model.findDescendantModels("component"):[model];components=components.filter((component=>component.get("_isTrackable")!==false));const component=components[index];if(!component){logging$1.warn(`SPOOR could not restore tracking id: ${trackingId}, index: ${index}`);return}if(!shouldStoreResponses){const isComplete=state[1][0];component.set("_isComplete",isComplete);return}const[hasUserAnswer,isUserAnswerArray,hasAttemptStates]=state[1];const modelState=state[2];if(!hasUserAnswer){modelState[2][0]=null}else if(!isUserAnswerArray){modelState[2][0]=modelState[2][0][0]}if(!hasAttemptStates){modelState[2][1]=null}if(component.setAttemptObject){component.set("_attemptStates",modelState[2][1]);const attemptObject=component.getAttemptObject(modelState);component.setAttemptObject(attemptObject,false);return}component.get("_isQuestionType")?component.set({_score:modelState[0][0],_attemptsLeft:modelState[0][1],_isComplete:modelState[1][0],_isInteractionComplete:modelState[1][1],_isSubmitted:modelState[1][2],_isCorrect:modelState[1][3],_userAnswer:modelState[2][0],_attemptStates:modelState[2][1]}):component.set({_isComplete:modelState[1][0],_isInteractionComplete:modelState[1][1],_userAnswer:modelState[2][0],_attemptStates:modelState[2][1]})}))}});var StatefulSession=__AMD("extensions/adapt-contrib-spoor/js/adapt-stateful-session",class StatefulSession extends Backbone.Controller{initialize(){_.bindAll(this,"beginSession","onVisibilityChange","endSession");this.debouncedSaveSession=_.debounce(this.saveSessionState.bind(this),1);this.scorm=ScormWrapper$1.getInstance();this._trackingIdType="block";this._componentSerializer=null;this._shouldCompress=false;this._shouldStoreResponses=true;this._shouldStoreAttempts=false;this._shouldRecordInteractions=true;this._uniqueInteractionIds=false;this.beginSession()}beginSession(){this.listenTo(Adapt$1,{"app:dataReady":this.restoreSession,"adapt:start":this.onAdaptStart});this._trackingIdType=Adapt$1.build.get("trackingIdType")||"block";if(window.location.search.indexOf("nolmserrors")!==-1){this.scorm.suppressErrors=true}const config=Adapt$1.spoor.config;if(!config)return;const tracking=config._tracking;this._shouldStoreResponses=tracking&&tracking._shouldStoreResponses||false;this._shouldStoreAttempts=tracking&&tracking._shouldStoreAttempts||false;this._shouldCompress=tracking&&tracking._shouldCompress||false;this._componentSerializer=new ComponentSerializer(this._trackingIdType,this._shouldCompress);if(tracking?._shouldRecordInteractions===false){this._shouldRecordInteractions=false}const settings=config._advancedSettings;if(!settings){this.scorm.setVersion("1.2");this.scorm.initialize();return}this._uniqueInteractionIds=settings._uniqueInteractionIds||false;this.scorm.initialize(settings)}restoreSession(){this.setupLearnerInfo();this.restoreSessionState()}setupLearnerInfo(){const globals=Adapt$1.course.get("_globals");if(!globals._learnerInfo){globals._learnerInfo={}}Object.assign(globals._learnerInfo,offlineStorage$1.get("learnerinfo"))}restoreSessionState(){const sessionPairs=offlineStorage$1.get();const hasNoPairs=!Object.keys(sessionPairs).length;if(hasNoPairs)return;if(sessionPairs.c){const[_isComplete,_isAssessmentPassed]=SCORMSuspendData.deserialize(sessionPairs.c);Adapt$1.course.set({_isComplete:_isComplete,_isAssessmentPassed:_isAssessmentPassed})}if(!sessionPairs.q)return;this._componentSerializer?.deserialize(sessionPairs.q)}setupEventListeners(){this.removeEventListeners();this.listenTo(Adapt$1.components,"change:_isComplete",this.debouncedSaveSession);this.listenTo(Adapt$1.contentObjects,"change:_isComplete",this.onContentObjectCompleteChange);this.listenTo(Adapt$1.course,"change:_isComplete",this.debouncedSaveSession);if(this._shouldStoreResponses){this.listenTo(data$1,"change:_isSubmitted change:_userAnswer",this.debouncedSaveSession)}this.listenTo(Adapt$1,{"app:dataReady":this.restoreSession,"adapt:start":this.onAdaptStart,"app:languageChanged":this.onLanguageChanged,"pageView:ready":this.onPageViewReady,"questionView:recordInteraction":this.onQuestionRecordInteraction,"tracking:complete":this.onTrackingComplete});const config=Adapt$1.spoor.config;const advancedSettings=config._advancedSettings;const shouldCommitOnVisibilityChange=!advancedSettings||advancedSettings._commitOnVisibilityChangeHidden!==false;if(shouldCommitOnVisibilityChange){document.addEventListener("visibilitychange",this.onVisibilityChange)}$(window).on("beforeunload unload pagehide",this.endSession)}async saveSessionState(){const isMidRender=!Adapt$1.parentView?.model.get("_isReady");if(isMidRender)return this.debouncedSaveSession();const courseState=SCORMSuspendData.serialize([Boolean(Adapt$1.course.get("_isComplete")),Boolean(Adapt$1.course.get("_isAssessmentPassed"))]);const componentStates=await(this._componentSerializer?.serialize(this._shouldStoreResponses,this._shouldStoreAttempts));const sessionPairs={c:courseState,q:componentStates};offlineStorage$1.set(sessionPairs);this.printCompletionInformation(sessionPairs)}printCompletionInformation(suspendData){if(typeof suspendData==="string"){suspendData=JSON.parse(suspendData)}const courseState=SCORMSuspendData.deserialize(suspendData.c);const courseComplete=courseState[0];const assessmentPassed=courseState[1];const trackingIdModels=data$1.filter((model=>model.get("_type")===this._trackingIdType&&model.has("_trackingId")));const trackingIds=trackingIdModels.map((model=>model.get("_trackingId")));if(!trackingIds.length){logging$1.info(`course._isComplete: ${courseComplete}, course._isAssessmentPassed: ${assessmentPassed}, ${this._trackingIdType} completion: no tracking ids found`);return}const completionData=SCORMSuspendData.deserialize(suspendData.q);const max=Math.max(...completionData.map((item=>item[0][0])));const shouldStoreResponses=completionData[0].length===3;const completionString=completionData.reduce(((markers,item)=>{const trackingId=item[0][0];const isComplete=shouldStoreResponses?item[2][1][0]:item[1][0];const mark=isComplete?"1":"0";markers[trackingId]=markers[trackingId]==="-"||markers[trackingId]==="1"?mark:"0";return markers}),new Array(max+1).fill("-")).join("");logging$1.info(`course._isComplete: ${courseComplete}, course._isAssessmentPassed: ${assessmentPassed}, ${this._trackingIdType} completion: ${completionString}`)}initializeContentObjectives(){Adapt$1.contentObjects.forEach((model=>{if(model.isTypeGroup("course"))return;const id=model.get("_id");const description=model.get("title")||model.get("displayTitle");offlineStorage$1.set("objectiveDescription",id,description);if(model.get("_isVisited"))return;const completionStatus=COMPLETION_STATE$3.NOTATTEMPTED.asLowerCase;offlineStorage$1.set("objectiveStatus",id,completionStatus)}))}onAdaptStart(){this.setupEventListeners();this.initializeContentObjectives()}onLanguageChanged(){this.stopListening(Adapt$1.contentObjects,"change:_isComplete",this.onContentObjectCompleteChange);const config=Adapt$1.spoor.config;if(config?._reporting?._resetStatusOnLanguageChange!==true)return;const completionStatus=COMPLETION_STATE$3.INCOMPLETE.asLowerCase;offlineStorage$1.set("status",completionStatus)}onVisibilityChange(){if(document.visibilityState==="hidden")this.scorm.commit()}onPageViewReady(view){const model=view.model;if(model.get("_isComplete"))return;const id=model.get("_id");const completionStatus=COMPLETION_STATE$3.INCOMPLETE.asLowerCase;offlineStorage$1.set("objectiveStatus",id,completionStatus)}onQuestionRecordInteraction(questionView){if(!this._shouldRecordInteractions)return;if(!this.scorm.isSupported("cmi.interactions._count"))return;const questionModel=questionView.model;const responseType=questionModel.getResponseType?questionModel.getResponseType():questionView.getResponseType();if(_.isEmpty(responseType))return;const id=this._uniqueInteractionIds?`${this.scorm.getInteractionCount()}-${questionModel.get("_id")}`:questionModel.get("_id");const response=questionModel.getResponse?questionModel.getResponse():questionView.getResponse();const result=questionModel.isCorrect?questionModel.isCorrect():questionView.isCorrect();const latency=questionModel.getLatency?questionModel.getLatency():questionView.getLatency();offlineStorage$1.set("interaction",id,response,result,latency,responseType)}onContentObjectCompleteChange(model){if(model.isTypeGroup("course"))return;const id=model.get("_id");const completionStatus=(model.get("_isComplete")?COMPLETION_STATE$3.COMPLETED:COMPLETION_STATE$3.INCOMPLETE).asLowerCase;offlineStorage$1.set("objectiveStatus",id,completionStatus)}onTrackingComplete(completionData){const config=Adapt$1.spoor.config;this.saveSessionState();let completionStatus=completionData.status.asLowerCase;switch(completionData.status){case COMPLETION_STATE$3.COMPLETED:case COMPLETION_STATE$3.PASSED:{if(!config?._reporting?._onTrackingCriteriaMet){logging$1.warn(`No value defined for '_onTrackingCriteriaMet', so defaulting to '${completionStatus}'`)}else{completionStatus=config._reporting._onTrackingCriteriaMet}break}case COMPLETION_STATE$3.FAILED:{if(!config?._reporting?._onAssessmentFailure){logging$1.warn(`No value defined for '_onAssessmentFailure', so defaulting to '${completionStatus}'`)}else{completionStatus=config._reporting._onAssessmentFailure}}}offlineStorage$1.set("status",completionStatus)}endSession(){if(!this.scorm.finishCalled){this.scorm.finish()}this.removeEventListeners()}removeEventListeners(){$(window).off("beforeunload unload pagehide",this.endSession);document.removeEventListener("visibilitychange",this.onVisibilityChange);this.stopListening()}});var OfflineStorage=__AMD("extensions/adapt-contrib-spoor/js/adapt-offlineStorage-scorm",class OfflineStorageScorm extends Backbone.Controller{initialize(statefulSession){this.offlineStorage=offlineStorage$1;this.scorm=ScormWrapper$1.getInstance();this.statefulSession=statefulSession;this.temporaryStore={};this.suspendDataStore={};this.suspendDataRestored=false;offlineStorage$1.initialize(this)}save(){this.statefulSession.saveSessionState();this.scorm.commit()}serialize(...args){return SCORMSuspendData.serialize(...args)}deserialize(...args){return SCORMSuspendData.deserialize(...args)}get(name){if(name===undefined){if(this.useTemporaryStore())return this.temporaryStore;this.suspendDataStore=this.getCustomStates();const data=Object.assign(_.clone(this.suspendDataStore),{location:this.scorm.getLessonLocation(),score:this.scorm.getScore(),status:this.scorm.getStatus(),student:this.scorm.getStudentName(),learnerInfo:this.getLearnerInfo()});this.suspendDataRestored=true;return data}if(this.useTemporaryStore())return this.temporaryStore[name];let courseState;switch(name.toLowerCase()){case"location":return this.scorm.getLessonLocation();case"score":return this.scorm.getScore();case"status":return this.scorm.getStatus();case"student":return this.scorm.getStudentName();case"learnerinfo":return this.getLearnerInfo();case"coursestate":{courseState=this.getCustomState("c");const stateArray=courseState&&SCORMSuspendData.deserialize(courseState)||[];return{_isCourseComplete:Boolean(stateArray.slice(0,1).map(Number)[0]),_isAssessmentPassed:Boolean(stateArray.slice(1,2).map(Number)[0]),completion:stateArray.slice(2).map(Number).map(String).join("")||""}}case"completion":courseState=this.getCustomState("c");return courseState&&SCORMSuspendData.deserialize(courseState).slice(2).map(Number).map(String).join("")||"";case"_iscoursecomplete":courseState=this.getCustomState("c");return Boolean(courseState&&SCORMSuspendData.deserialize(courseState).slice(0,1).map(Number)[0]);case"_isassessmentpassed":courseState=this.getCustomState("c");return Boolean(courseState&&SCORMSuspendData.deserialize(courseState).slice(1,2).map(Number)[0]);case"questions":{const questionsState=this.getCustomState("q");return questionsState||""}default:return this.getCustomState(name)}}set(name,value){const args=[...arguments].slice(1);const isObject=typeof name==="object";if(isObject){value=name;name="suspendData"}if(this.useTemporaryStore()){if(isObject){Object.assign(this.temporaryStore,value)}else{this.temporaryStore[name]=value}return true}switch(name.toLowerCase()){case"interaction":return this.scorm.recordInteraction(...args);case"objectivedescription":return this.scorm.recordObjectiveDescription(...args);case"objectivestatus":return this.scorm.recordObjectiveStatus(...args);case"objectivescore":return this.scorm.recordObjectiveScore(...args);case"location":return this.scorm.setLessonLocation(...args);case"score":return this.scorm.setScore(...args);case"status":return this.scorm.setStatus(...args);case"student":case"learnerinfo":return false;case"lang":this.scorm.setLanguage(value);break}if(isObject){Object.assign(this.suspendDataStore,value)}else{this.suspendDataStore[name]=value}const dataAsString=JSON.stringify(this.suspendDataStore);return this.suspendDataRestored?this.scorm.setSuspendData(dataAsString):false}clear(){this.temporaryStore={};this.suspendDataStore={};const dataAsString=JSON.stringify(this.suspendDataStore);this.scorm.setSuspendData(dataAsString)}getCustomStates(){const isSuspendDataStoreEmpty=_.isEmpty(this.suspendDataStore);if(!isSuspendDataStoreEmpty&&this.suspendDataRestored){return _.clone(this.suspendDataStore)}const dataAsString=this.scorm.getSuspendData();if(dataAsString===""||dataAsString===" "||dataAsString===undefined){return{}}const dataAsJSON=JSON.parse(dataAsString);if(!isSuspendDataStoreEmpty&&!this.suspendDataRestored){Object.assign(dataAsJSON,this.suspendDataStore)}return dataAsJSON}getCustomState(name){const dataAsJSON=this.getCustomStates();return dataAsJSON[name]}useTemporaryStore(){const cfg=Adapt$1.config.get("_spoor");if(!this.scorm.lmsConnected||cfg?._isEnabled===false)return true;return false}getLearnerInfo(){const id=this.scorm.getStudentId();let name=this.scorm.getStudentName();let firstname="";let lastname="";let hasName=name&&name!=="undefined";const isNameCommaSeparated=hasName&&name.includes(",");const isNameSpaceSeparated=hasName&&name.includes(" ");hasName=hasName&&(isNameCommaSeparated||isNameSpaceSeparated);if(!hasName){console.log("SPOOR: LMS learner_name not in 'lastname, firstname' or 'firstname lastname' format");return{id:id,name:name,firstname:firstname,lastname:lastname}}const separator=isNameCommaSeparated?",":" ";const nameParts=name.split(separator);if(isNameCommaSeparated){nameParts.reverse()}[firstname,lastname]=nameParts.map((part=>part.trim()));name=`${firstname} ${lastname}`;return{id:id,name:name,firstname:firstname,lastname:lastname}}});const shouldStart=Object.prototype.hasOwnProperty.call(window,"ISCOOKIELMS")&&window.ISCOOKIELMS!==null;const isStoringData=window.ISCOOKIELMS===true;const set=(object,path,value)=>{const keys=path.split(".");const initialKeys=keys.slice(0,-1);const lastKey=keys[keys.length-1];const finalObject=initialKeys.reduce(((object,key)=>object[key]=object?.[key]||{}),object);finalObject[lastKey]=value};const get=(object,path)=>{const keys=path.split(".");return keys.reduce(((object,key)=>object?.[key]),object)};function createResetButton(){const resetButtonStyle='';const resetButton='';$("body").append($(resetButtonStyle));const $button=$(resetButton);$("body").append($button);$button.on("click",(e=>{if(!e.shiftKey){Cookies__default["default"].remove("_spoor");alert("SCORM tracking cookie has been deleted! Tip: shift-click reset to preserve cookie.")}window.location=window.location.pathname}))}function configure(){if(!isStoringData)return;const spoorConfig=Adapt$1.config.get("_spoor");if(spoorConfig?._showCookieLmsResetButton)createResetButton();if(!spoorConfig?._shouldPersistCookieLMSData){Cookies__default["default"].defaults={sameSite:"strict"}}}function postStorageWarning(){if(postStorageWarning.__storageWarningTimeoutId!==null)return;postStorageWarning.__storageWarningTimeoutId=setTimeout((()=>{const notificationMethod=Adapt$1.config.get("_spoor")?._advancedSettings?._suppressErrors===true?console.error:alert;postStorageWarning.__storageWarningTimeoutId=null;notificationMethod("Warning: possible cookie storage limit exceeded - tracking may malfunction")}),1e3)}function start(){const GenericAPI={__offlineAPIWrapper:true,store(force){if(!isStoringData)return;if(!force&&Cookies__default["default"].get("_spoor")===undefined)return;Cookies__default["default"].set("_spoor",this.data);if(Cookies__default["default"].get("_spoor").length!==JSON.stringify(this.data).length)postStorageWarning()},initialize(defaults={}){if(!isStoringData){this.data={};Object.entries(defaults).forEach((([path,value])=>set(this.data,path,value)));return}this.data=Cookies__default["default"].getJSON("_spoor");if(!this.data){this.data={};Object.entries(defaults).forEach((([path,value])=>set(this.data,path,value)));this.store(true);return false}const entries=Object.entries(this.data);const isUsingLegacyKeys=entries[0][0].includes(".");if(isUsingLegacyKeys){const reworked={};Object.entries(defaults).forEach((([path,value])=>set(reworked,path,value)));Object.entries(entries).forEach((([path,value])=>set(reworked,path,value)));this.data=reworked;this.store(true)}return true}};const SCORM1_2=window.API={...GenericAPI,LMSInitialize(){configure();this.initialize({"cmi.interactions":[],"cmi.objectives":[],"cmi.core.lesson_status":"not attempted","cmi.suspend_data":"","cmi.core.student_name":"Surname, Sam","cmi.core.student_id":"sam.surname@example.org"});return"true"},LMSFinish(){return"true"},LMSGetValue(path){const value=get(this.data,path);const keys=path.split(".");const firstKey=keys[0];const lastKey=keys[keys.length-1];if(firstKey==="cmi"&&lastKey==="_count"){const arrayPath=keys.slice(0,-1).join(".");return get(this.data,arrayPath)?.length??0}return value},LMSSetValue(path,value){const keys=path.split(".");const firstKey=keys[0];const lastKey=keys[keys.length-1];if(firstKey==="cmi"&&lastKey==="_count"){return"true"}set(this.data,path,value);this.store();return"true"},LMSCommit(){return"true"},LMSGetLastError(){return 0},LMSGetErrorString(){return"Fake error string."},LMSGetDiagnostic(){return"Fake diagnostic information."}};window.API_1484_11={...GenericAPI,Initialize(){configure();this.initialize({"cmi.interactions":[],"cmi.objectives":[],"cmi.completion_status":"not attempted","cmi.suspend_data":"","cmi.learner_name":"Surname, Sam","cmi.learner_id":"sam.surname@example.org"});return"true"},Terminate:SCORM1_2.LMSFinish,GetValue:SCORM1_2.LMSGetValue,SetValue:SCORM1_2.LMSSetValue,Commit:SCORM1_2.LMSCommit,GetLastError:SCORM1_2.LMSGetLastError,GetErrorString:SCORM1_2.LMSGetErrorString,GetDiagnostic:SCORM1_2.LMSGetDiagnostic}}class Spoor extends Backbone.Controller{initialize(){this.config=null;if(shouldStart)start();this.scorm=ScormWrapper$1.getInstance();this.listenToOnce(Adapt$1,"offlineStorage:prepare",this._prepare)}_prepare(){this.config=Adapt$1.config.get("_spoor");if(!this.isEnabled){offlineStorage$1.setReadyStatus();return}this.statefulSession=new StatefulSession;this.offlineStorage=new OfflineStorage(this.statefulSession);offlineStorage$1.get();offlineStorage$1.setReadyStatus();$.onKeyCombo([68,69,86],(()=>{Adapt$1.spoor.scorm.showDebugWindow()}))}get isEnabled(){return this.config&&this.config._isEnabled}}Adapt$1.spoor=new Spoor;__AMD("extensions/adapt-contrib-spoor/js/adapt-contrib-spoor",Adapt$1.spoor);function _deepDefaults(original,...defaultObjects){defaultObjects.reverse();defaultObjects.forEach((defaults=>{const keyValuePairs=Object.entries(defaults);keyValuePairs.forEach((([key,defaultValue])=>{const isRecursiveObject=typeof defaultValue==="object"&&!Array.isArray(defaultValue)&&defaultValue!==null;if(isRecursiveObject){original[key]=_deepDefaults(original[key]||{},defaultValue);return}const isValueAlreadySet=Object.prototype.hasOwnProperty.call(original,key);if(isValueAlreadySet)return;original[key]=defaultValue}))}));return original}const configDefaults={_isEnabled:false,_isInherited:false,_autoScroll:true,_scrollTo:"@block +1",_onChildren:false,_button:{_isEnabled:true,_isFullWidth:true,_autoHide:false,_hasIcon:false,_styleBeforeCompletion:"hidden",_styleAfterClick:"hidden",_component:"trickle-button",_className:"",text:"Continue",ariaLabel:"",startText:"",startAriaLabel:"",finalText:"",finalAriaLabel:""},_stepLocking:{_isEnabled:true,_isCompletionRequired:true,_isLockedOnRevisit:false}};function isModelArticleWithOnChildren(model){const type=model.get("_type");const trickleConfig=model.get("_trickle");return type==="article"&&trickleConfig?._onChildren!==false}function isModelBlockWithArticleNotChildren(model){const type=model.get("_type");const parentTrickleConfig=model.getParent()?.get("_trickle");return type==="block"&&parentTrickleConfig?._isEnabled===true&&parentTrickleConfig?._onChildren===false}function getModelConfigDefaults(model){const type=model.get("_type");const config={};_deepDefaults(config,configDefaults,{_onChildren:type==="article"});if(config._onChildren){config._button.startText=config._button.startText??"Begin";config._button.startAriaLabel=config._button.startAriaLabel??"";config._button.finalText=config._button.finalText??"Finish";config._button.finalAriaLabel=config._button.finalAriaLabel??""}if(config._button._isFullWidth){config._stepLocking._isEnabled=true}return config}function getModelInheritanceChain(configModel){if(!data$1.isReady)throw new Error("Trickle cannot resolve inheritance chains until data is ready");const type=configModel.get("_type");if(type==="block"){const parentModel=configModel.getParent();const parentConfig=parentModel.get("_trickle");const blockConfig=configModel.get("_trickle");const isParentEnabledNotOnChildren=parentConfig?._isEnabled&&parentConfig._onChildren===false;const isNoChildConfig=!blockConfig?._isEnabled;if(isParentEnabledNotOnChildren&&isNoChildConfig){return null}return[configModel,parentModel].filter((ancestor=>{const config=ancestor.get("_trickle");return config&&!config._isInherited}))}if(type==="article"){return[configModel]}return null}function getModelConfig(model){const inheritance=getModelInheritanceChain(model);if(!inheritance?.length||isModelArticleWithOnChildren(model)||isModelBlockWithArticleNotChildren(model))return null;const config=$.extend(true,{},...inheritance.reverse().map(((inheritModel,index,arr)=>{const isLast=index===arr.length-1;const defaults=isLast?getModelConfigDefaults(inheritModel):null;return $.extend(true,{},defaults,inheritModel.get("_trickle"))})));if(!config._isEnabled)return null;return config}function getModelContainer(model){const inheritance=getModelInheritanceChain(model);return inheritance?.find((inheritModel=>{const defaults=getModelConfigDefaults(inheritModel);const config=$.extend(true,{},defaults,inheritModel.get("_trickle"));return config._onChildren}))??inheritance?.[0]}function getCompletionAttribute(model=null){return getModelConfig(model)?._completionAttribute||Adapt$1.config.get("_trickle")?._completionAttribute||"_isComplete"}function checkApplyLocks(model){if(!data$1.isReady)return;const completionAttribute=getCompletionAttribute(model);const hasCompletionChanged=Object.prototype.hasOwnProperty.call(model.changed,completionAttribute);const hasAvailabilityChanged=Object.prototype.hasOwnProperty.call(model.changed,"_isAvailable");if(!hasCompletionChanged&&!hasAvailabilityChanged)return;debouncedApplyLocks()}function applyLocks(){if(!data$1.isReady)return;const locks={};const modelsById={};const TrickleButtonModel=components$1.getModelClass("trickle-button");Adapt$1.course.getAllDescendantModels(true).filter((model=>model.get("_isAvailable"))).forEach((siteModel=>{const trickleConfig=getModelConfig(siteModel);if(!isEnabled(siteModel,{trickleConfig:trickleConfig}))return;const isModelLocked=isLocked(siteModel,{trickleConfig:trickleConfig});const id=siteModel.get("_id");modelsById[id]=siteModel;locks[id]=locks[id]||false;const subsequentLockingModels=_getAncestorNextSiblings(siteModel);subsequentLockingModels.forEach(((model,index)=>{const id=model.get("_id");const isButtonModel=model instanceof TrickleButtonModel;const isTrickled=model.get("_isTrickled");if(isTrickled!==isButtonModel)model.set("_isTrickled",!isButtonModel);modelsById[id]=model;locks[id]=locks[id]||isModelLocked;if(model.get("_lockType"))return;model.getAllDescendantModels().forEach((descendant=>{const descendantId=descendant.get("_id");modelsById[descendantId]=descendant;locks[descendantId]=locks[id]}))}))}));Object.entries(locks).forEach((([id,isModelLocked])=>{const model=modelsById[id];const wasLocked=model.get("_isLocked");if(wasLocked===isModelLocked)return;model.set("_isLocked",isModelLocked)}));logTrickleState()}function isEnabled(model,{trickleConfig:trickleConfig=getModelConfig(model)}={}){return trickleConfig?._isEnabled===true}function isLocked(model,{trickleConfig:trickleConfig=getModelConfig(model)}={}){const isStepLocked=Boolean(trickleConfig?._stepLocking?._isEnabled);if(!isStepLocked)return false;const isCompletionRequired=Boolean(trickleConfig?._stepLocking?._isCompletionRequired);const completionAttribute=getCompletionAttribute(model);if(!isCompletionRequired){const TrickleModel=components$1.getModelClass("trickle-button");const trickleButton=model.getAvailableChildModels().find((model=>model instanceof TrickleModel));const isTrickleButtonComplete=Boolean(trickleButton?.get(completionAttribute));return!isTrickleButtonComplete}const isModelLocked=!model?.get(completionAttribute)&&!model?.get("_isOptional");return isModelLocked}const debouncedApplyLocks=_.debounce(applyLocks,1);function _getAncestorNextSiblings(fromModel){if(!fromModel)return[];const allSiblings=fromModel.getParent().getAvailableChildModels();const subsequentSiblings=allSiblings.slice(allSiblings.findIndex((sibling=>sibling===fromModel))+1);const allAncestors=fromModel.getAncestorModels();const inPageAncestors=allAncestors.slice(0,allAncestors.findIndex((parent=>parent instanceof ContentObjectModel))+1);const subsequentInPageAncestors=[];inPageAncestors.slice(1).forEach(((grandParent,previousIndex)=>{const parent=inPageAncestors[previousIndex];const allGrandParentChildren=grandParent.getAvailableChildModels();const subsequentAncestorSiblings=allGrandParentChildren.slice(allGrandParentChildren.findIndex((child=>child===parent))+1);subsequentInPageAncestors.push(...subsequentAncestorSiblings)}));const subsequentContentObjectDescendantModels=subsequentSiblings.concat(subsequentInPageAncestors);return subsequentContentObjectDescendantModels}function addButtonComponents(){const TrickleButtonModel=components$1.getModelClass("trickle-button");let uid=0;data$1.forEach((buttonModelSite=>{if(buttonModelSite instanceof CourseModel$1)return;const trickleConfig=getModelConfig(buttonModelSite);if(!trickleConfig||!trickleConfig?._isEnabled||buttonModelSite.get("_isTrickleSiteConfigured"))return;buttonModelSite.set("_isTrickleSiteConfigured",true);const parentId=buttonModelSite.get("_id");const trickleButtonModel=new TrickleButtonModel({_id:`trickle-${uid++}`,_type:"component",_component:"trickle-button",_parentId:parentId,_isAvailable:true,_layout:"full",_trickle:{_isEnabled:true},_renderPosition:"outer-append",_isTrackable:false});trickleButtonModel.setupModel();buttonModelSite.getChildren().add(trickleButtonModel)}))}function logTrickleState(){if(logging$1._config?._level!=="debug")return;if(!Adapt$1.parentView?.model?.isTypeGroup("page")){logging$1.debug("TRICKLE GLOBAL STATE");Adapt$1.course.getAllDescendantModels(true).filter((model=>model.get("_isAvailable"))).forEach((model=>{const isLocked=model.get("_isLocked");const isTrickled=model.get("_isTrickled");logging$1.debug(`${" ".repeat(model.getAncestorModels().length)}${model.get("_type")} ${model.get("_id")} isLocked: ${isLocked} isTrickled: ${isTrickled}`)}));return}logging$1.debug("TRICKLE STATE");Adapt$1.parentView.model.getAllDescendantModels(true).filter((model=>model.get("_isAvailable"))).forEach((model=>{const isLocked=model.get("_isLocked");const isTrickled=model.get("_isTrickled");logging$1.debug(`${" ".repeat(model.getAncestorModels().length)}${model.get("_type")} ${model.get("_id")} isLocked: ${isLocked} isTrickled: ${isTrickled}`)}))}__AMD("extensions/adapt-contrib-trickle/js/models",{_deepDefaults:_deepDefaults,configDefaults:configDefaults,getModelConfigDefaults:getModelConfigDefaults,getModelInheritanceChain:getModelInheritanceChain,getModelConfig:getModelConfig,getModelContainer:getModelContainer,getCompletionAttribute:getCompletionAttribute,checkApplyLocks:checkApplyLocks,applyLocks:applyLocks,debouncedApplyLocks:debouncedApplyLocks,_getAncestorNextSiblings:_getAncestorNextSiblings,addButtonComponents:addButtonComponents,logTrickleState:logTrickleState});class TrickleController extends Backbone.Controller{initialize(){this.checkIsFinished=_.debounce(this.checkIsFinished,1);this.listenTo(Adapt$1,{"adapt:start":this.onAdaptStart})}async onAdaptStart(){const trickleConfig=Adapt$1.config.get("_trickle");if(trickleConfig?._isEnabled===false)return;this.setUpEventListeners();wait$1.for((done=>{addButtonComponents();applyLocks();done()}))}setUpEventListeners(){this.stopListening();this.listenTo(data$1,{"change:_isInteractionComplete change:_isComplete change:_isAvailable add remove":checkApplyLocks,"change:_isLocked":this.checkIsFinished});this.listenTo(Adapt$1,{"adapt:start":this.onAdaptStart,"assessments:reset":this.onAssessmentReset,"contentObjectView:preRender":this.reset,"view:addChild":this.onAddChildView,"trickle:kill":this.kill})}onAssessmentReset(){const isMidRender=!Adapt$1.parentView?.model.get("_isReady");if(isMidRender)return applyLocks();debouncedApplyLocks()}get isStarted(){return Boolean(Adapt$1.parentView?.model.get("_isTrickleStarted"))}set isStarted(value){if(!Adapt$1.parentView)return;Adapt$1.parentView.model.set("_isTrickleStarted",value);if(!value)return;Adapt$1.trigger("trickle:started")}onAddChildView(event){if(this.isKilled)return;if(event.hasRequestChild)applyLocks();const isManagedByTrickleAndLocked=event.model.get("_isTrickled")&&event.model.get("_isLocked");if(!isManagedByTrickleAndLocked)return;event.stop()}get isTrickling(){const currentDescendants=Adapt$1.parentView.model.getAllDescendantModels();const isDescendantBlockedByTrickle=currentDescendants.some((model=>model.get("_isAvailable")&&model.get("_isTrickled")&&model.get("_isLocked")));if(isDescendantBlockedByTrickle)return true;const TrickleModel=components$1.getModelClass("trickle-button");const lastDescendant=currentDescendants[currentDescendants.length-1];const lastTrickleButton=currentDescendants.reverse().find((model=>model instanceof TrickleModel));const isLastDescendantExpectingMoreChildren=lastDescendant.get("_requireCompletionOf")===Number.POSITIVE_INFINITY&&lastDescendant.get("_canRequestChild");const isLastTrickleButtonWaiting=!lastTrickleButton?.get("_isComplete");return isLastDescendantExpectingMoreChildren&&isLastTrickleButtonWaiting}async continue(){applyLocks();await Adapt$1.parentView.addChildren();await Adapt$1.parentView.whenReady()}async scroll(fromModel){const trickleConfig=getModelConfig(fromModel);if(!trickleConfig?._isEnabled)return false;if(isModelArticleWithOnChildren(fromModel))return false;const isAutoScrollOff=!trickleConfig._autoScroll;const hasTrickleButton=trickleConfig._button._isEnabled;if(isAutoScrollOff&&!hasTrickleButton){return}const getScrollToId=()=>{const scrollTo=trickleConfig._scrollTo;const firstCharacter=scrollTo.substr(0,1);switch(firstCharacter){case"@":{const relativeModel=fromModel.findRelativeModel(scrollTo,{filter:model=>model.get("_isAvailable")});if(relativeModel===undefined)return;return relativeModel.get("_id")}case".":return scrollTo.substr(1,scrollTo.length-1);default:return scrollTo}};let scrollToId=getScrollToId();if(!scrollToId){logging$1.error(`Cannot scroll to the next id as none was found at id: "${fromModel.get("_id")}" with _scrollTo: "${trickleConfig._scrollTo}". Suggestion: Set _showEndOfPage to false.`);return}const isDescendant=Adapt$1.parentView.model.getAllDescendantModels().some((model=>model.get("_id")===scrollToId));if(!isDescendant){applyLocks();const model=data$1.findById(scrollToId);const contentObject=model.isTypeGroup("contentobject")?model:model.findAncestor("contentobject");await router$1.navigateToElement(contentObject.get("_id"));scrollToId=getScrollToId();await router$1.navigateToElement(scrollToId);return}await Adapt$1.parentView.renderTo(scrollToId);if(hasTrickleButton){a11y$1.focusFirst($("."+scrollToId),{preventScroll:true})}if(isAutoScrollOff)return false;const duration=trickleConfig._scrollDuration||500;router$1.navigateToElement("."+scrollToId,{duration:duration})}get isFinished(){if(!Adapt$1.parentView)return false;return Boolean(!this.isStarted||Adapt$1.parentView.model.get("_isTrickleFinished")||this.isKilled)}set isFinished(value){if(!Adapt$1.parentView)return;Adapt$1.parentView.model.set("_isTrickleFinished",value);if(!value)return;Adapt$1.trigger("trickle:finished")}checkIsFinished(){if(!this.isStarted)return;if(this.isKilled||this.isFinished)return;if(this.isTrickling)return;this.isFinished=true}async kill(){const TrickleModel=components$1.getModelClass("trickle-button");this.isKilled=true;Adapt$1.parentView.model.getAllDescendantModels().forEach((model=>{const isButtonModel=model instanceof TrickleModel;if(isButtonModel){model.setCompletionStatus()}if(!model.get("_isTrickled"))return;model.set("_isLocked",false)}));await this.continue()}get isKilled(){if(!Adapt$1.parentView)return false;return!this.isStarted||Adapt$1.parentView.model.get("_isTrickleKilled")}set isKilled(value){if(!Adapt$1.parentView)return;Adapt$1.parentView.model.set("_isTrickleKilled",value);if(!value)return;Adapt$1.trigger("trickle:killed")}async reset(){await wait$1.queue();this.isKilled=false;this.isStarted=this.isTrickling;this.isFinished=false}}var controller=__AMD("extensions/adapt-contrib-trickle/js/controller",new TrickleController);class TrickleButtonView extends ComponentView$1{className(){const config=getModelConfig(this.model.getParent());return["trickle",this.model.get("_id"),config?._button._component,config?._button._isFullWidth&&"is-full-width",config?._button._className].filter(Boolean).join(" ")}events(){return{"click .js-trickle-btn":"onButtonClick"}}initialize(){this.openPopupCount=0;this.isAwaitingPopupClose=false;this.wasButtonClicked=false;this.model.calculateButtonText();this.calculateButtonState();this.setupEventListeners();this.render();if(!this.model.isEnabled()){this.setCompletionStatus()}_.defer(this.setReadyStatus.bind(this))}calculateButtonState(){const isDisabledByPopups=this.openPopupCount>0;this.model.calculateButtonState(isDisabledByPopups,this.wasButtonClicked)}render(){const data=this.model.toJSON();data._globals=Adapt$1.course.get("_globals");data._trickle=getModelConfig(this.model.getParent());this.$el.html(Handlebars.templates[TrickleButtonView.template](data))}setupEventListeners(){this.tryButtonAutoHide=this.tryButtonAutoHide.bind(this);const onParentComplete=this.onParentComplete.bind(this);this.onParentComplete=(...args)=>_.delay((()=>onParentComplete(...args)),100);this.listenTo(Adapt$1.parentView,"postRemove",this.onRemove);this.listenTo(Adapt$1,"trickle:killed",this.updateButtonState);if(this.model.isStepUnlocked()&&this.model.isFinished()){return}this.$el.on("onscreen",this.tryButtonAutoHide);this.listenTo(Adapt$1,{"popup:opened":this.onPopupOpened,"popup:closed":this.onPopupClosed});const parentModel=this.model.getParent();const completionAttribute=getCompletionAttribute(parentModel);this.listenTo(parentModel,{"change:_requireCompletionOf":this.onStepUnlocked,[`bubble:change:${completionAttribute}`]:this.onStepUnlocked,[`change:${completionAttribute}`]:this.onParentComplete})}onPopupOpened(){this.openPopupCount++;const shouldUserInteractWithButton=this.model.isStepUnlocked()&&!this.model.isFinished();if(!shouldUserInteractWithButton)return;this.updateButtonState()}async onPopupClosed(){this.openPopupCount--;if(this.openPopupCount)return;if(this.isAwaitingPopupClose){return this.finish()}const shouldUserInteractWithButton=this.model.isStepUnlocked()&&!this.model.isFinished();if(!shouldUserInteractWithButton)return;this.updateButtonState();await Adapt$1.parentView.addChildren()}updateButtonState(){this.calculateButtonState();const isButtonHidden=!(this.model.get("_isButtonVisible")&&!this.model.get("_isButtonAutoHidden"));this.$(".js-trickle-btn-container").toggleClass("u-display-none",isButtonHidden);const isButtonDisabled=this.model.get("_isButtonDisabled");const $button=this.$(".js-trickle-btn");const $ariaLabel=this.$(".aria-label");a11y$1.toggleEnabled($button,!isButtonDisabled);if(!isButtonDisabled){if(document.activeElement instanceof HTMLElement&&document.activeElement.isSameNode($ariaLabel[0])){a11y$1.focusNext($ariaLabel)}a11y$1.toggleAccessibleEnabled($ariaLabel,false)}const isButtonLocked=this.model.get("_isButtonVisible")&&isButtonDisabled;$button.toggleClass("is-locked",isButtonLocked);const $buttonText=this.$(".js-trickle-btn-text");const text=this.model.get("buttonText");const ariaLabel=this.model.get("buttonAriaLabel");$buttonText.html(text);$button.attr("aria-label",ariaLabel)}async onStepUnlocked(event){if(event.value===false)return;_.defer(this.updateButtonState.bind(this))}async onButtonClick(){const wasComplete=this.model.get("_isComplete");this.model.setCompletionStatus();this.wasButtonClicked=true;const isStepLockingCompletionRequired=this.model.isStepLockingCompletionRequired();if(isStepLockingCompletionRequired&&!wasComplete)return;await this.continue()}async onParentComplete(model,value){if(!value)return;const parentModel=this.model.getParent();const completionAttribute=getCompletionAttribute(parentModel);this.stopListening(parentModel,{[`bubble:change:${completionAttribute}`]:this.onStepUnlocked,[`change:${completionAttribute}`]:this.onParentComplete});if(controller.isKilled)return;if(this.openPopupCount>0){this.isAwaitingPopupClose=true;return}await this.finish()}async finish(){this.stopListening(Adapt$1,{"popup:opened":this.onPopupOpened,"popup:closed":this.onPopupClosed});this.updateButtonState();const isStepLockingCompletionRequired=this.model.isStepLockingCompletionRequired();if(!isStepLockingCompletionRequired)return;await this.continue()}async continue(){const parent=this.model.getParent();await controller.continue();await controller.scroll(parent)}tryButtonAutoHide(){if(!this.model.get("_isButtonVisible"))return;const trickleConfig=getModelConfig(this.model.getParent());if(!trickleConfig._button._autoHide){this.model.set("_isButtonAutoHidden",false);return}const measurements=this.$el.onscreen();const isJustOffscreen=measurements.bottom>-100;const isButtonAutoHidden=!measurements.onscreen&&!isJustOffscreen;this.model.set("_isButtonAutoHidden",isButtonAutoHidden);this.updateButtonState()}onRemove(){this.$el.off("onscreen",this.tryButtonAutoHide);this.remove()}}TrickleButtonView.template="trickle-button";var TrickleButtonView$1=__AMD("extensions/adapt-contrib-trickle/js/TrickleButtonView",TrickleButtonView);var TrickleButtonModel=__AMD("extensions/adapt-contrib-trickle/js/TrickleButtonModel",class TrickleButtonModel extends ComponentModel$1{init(){super.init();if(!this.isStepComplete())return;this.setCompletionStatus()}isEnabled(){const trickleConfig=getModelConfig(this.getParent());if(!trickleConfig)return false;const isEnabled=trickleConfig._isEnabled&&trickleConfig._button?._isEnabled;return isEnabled}isStepLocking(){const config=getModelConfig(this.getParent());if(!config)return false;const isStepLocking=config._stepLocking?._isEnabled;return isStepLocking}isStepLockingCompletionRequired(){const config=getModelConfig(this.getParent());if(!config)return false;const isStepLockingCompletionRequired=config._stepLocking&&config._stepLocking._isEnabled&&config._stepLocking._isCompletionRequired;return isStepLockingCompletionRequired}isStepUnlocked(){const parentModel=this.getParent();const completionAttribute=getCompletionAttribute(parentModel);const isCompletionBlocked=parentModel.get("_requireCompletionOf")===Number.POSITIVE_INFINITY;if(isCompletionBlocked)return;return this.getSiblings().every((sibling=>{if(sibling===this){return true}return sibling.get(completionAttribute)||sibling.get("_isOptional")||!sibling.get("_isAvailable")}))}isStepComplete(){const parentModel=this.getParent();const completionAttribute=getCompletionAttribute(parentModel);const isParentComplete=parentModel.get(completionAttribute);return isParentComplete}isStepLockedOnRevisit(){const trickleConfig=getModelConfig(this.getParent());return Boolean(trickleConfig._stepLocking._isLockedOnRevisit)}isFinished(){const isStepUnlocked=this.isStepUnlocked();const isStepLockingCompletionRequired=this.isStepLockingCompletionRequired();const isButtonComplete=this.get("_isComplete");const isFinished=(isStepUnlocked||!isStepLockingCompletionRequired)&&isButtonComplete;return isFinished}isLastInContentObject(){const contentObject=this.findAncestor("contentobject");const allDescendants=contentObject.getAllDescendantModels(true);const lastDescendant=allDescendants[allDescendants.length-1];const parentModel=this.getParent();const trickleParent=getModelContainer(parentModel);const isParentFinished=trickleParent.get("_requireCompletionOf")!==Number.POSITIVE_INFINITY;return isParentFinished&&this===lastDescendant}calculateButtonText(){const parentModel=this.getParent();const trickleConfig=getModelConfig(parentModel);if(!trickleConfig)return;let isStart=false;let isFinal=false;if(trickleConfig._onChildren){const parentId=parentModel.get("_id");const trickleParent=getModelContainer(parentModel);const trickleSiblings=trickleParent.getAllDescendantModels(true).filter((model=>model.get("_isAvailable")&&model.get("_isTrickled")));const index=trickleSiblings.findIndex((model=>model.get("_id")===parentId));isStart=index===0;isFinal=index===trickleSiblings.length-1&&!trickleParent.get("_canRequestChild")}const text=isStart&&trickleConfig._button.startText?trickleConfig._button.startText:isFinal&&trickleConfig._button.finalText?trickleConfig._button.finalText:trickleConfig._button.text;const ariaLabel=isStart&&trickleConfig._button.startAriaLabel?trickleConfig._button.startAriaLabel:isFinal&&trickleConfig._button.finalAriaLabel?trickleConfig._button.finalAriaLabel:trickleConfig._button.ariaLabel;this.set({buttonText:text,buttonAriaLabel:ariaLabel})}checkIfResetOnRevisit(){if(this.isFinished()&&!this.isStepLockedOnRevisit())return;if(!this.get("_isComplete")&&!this.get("_isInteractionComplete"))return;this.set({_isComplete:false,_isInteractionComplete:false});applyLocks()}calculateButtonState(isButtonDisableForced=false,isButtonHiddenForced=false){if(!this.isEnabled()){this.set({_isButtonVisible:false,_isButtonDisabled:!this.isStepUnlocked()});return}const trickleConfig=getModelConfig(this.getParent());if(this.isLastInContentObject()&&trickleConfig._button._showEndOfPage===false){return this.set({_isButtonVisible:false,_isButtonDisabled:true})}const isTrickleKilled=controller.isKilled;const isStepUnlocked=this.isStepUnlocked()||isTrickleKilled;const isFinished=this.isFinished()||isTrickleKilled;const isButtonVisibleBeforeCompletion=trickleConfig._button._styleBeforeCompletion!=="hidden";const isButtonVisibleAfterCompletion=trickleConfig._button._styleAfterClick!=="hidden"&&!trickleConfig._button._isFullWidth;const isStepLockingCompletionRequired=this.isStepLockingCompletionRequired();const isNoCompletionRequiredAndLockedVisible=!isStepLockingCompletionRequired&&!isFinished&&isButtonVisibleBeforeCompletion;const isNoCompletionRequiredAndUnlockedVisible=!isStepLockingCompletionRequired&&isStepUnlocked&&!isFinished;const isNoCompletionRequiredAndFinishedVisible=!isStepLockingCompletionRequired&&isFinished&&isButtonVisibleAfterCompletion;const isStepLockedAndVisibleBeforeCompletion=isStepLockingCompletionRequired&&!isStepUnlocked&&isButtonVisibleBeforeCompletion&&!isButtonHiddenForced;const isFinishedAndVisibleAfterCompletion=isStepLockingCompletionRequired&&isFinished&&isButtonVisibleAfterCompletion;const isStepUnlockedAndButtonIncomplete=isStepLockingCompletionRequired&&isStepUnlocked&&!isFinished;const isButtonVisible=isNoCompletionRequiredAndLockedVisible||isNoCompletionRequiredAndUnlockedVisible||isNoCompletionRequiredAndFinishedVisible||isStepLockedAndVisibleBeforeCompletion||isFinishedAndVisibleAfterCompletion||isStepUnlockedAndButtonIncomplete;const isButtonEnabledBeforeCompletion=trickleConfig._button._styleBeforeCompletion!=="disabled";const isButtonEnabledAfterCompletion=trickleConfig._button._styleAfterClick!=="disabled";const isNoCompletionRequiredAndLockedEnabled=!isStepLockingCompletionRequired&&!isFinished&&isButtonEnabledBeforeCompletion;const isNoCompletionRequiredAndUnlockedEnabled=!isStepLockingCompletionRequired&&isStepUnlocked&&!isFinished;const isNoCompletionRequiredAndFinishedEnabled=!isStepLockingCompletionRequired&&isFinished&&isButtonEnabledAfterCompletion;const isStepUnlockedAndButtonIncompleteWithoutButtonDisabledForced=isStepLockingCompletionRequired&&isStepUnlockedAndButtonIncomplete&&!isButtonDisableForced;const isFinishedAndEnabledAfterCompletion=isStepLockingCompletionRequired&&isFinished&&isButtonEnabledAfterCompletion;const isButtonEnabled=isNoCompletionRequiredAndLockedEnabled||isNoCompletionRequiredAndUnlockedEnabled||isNoCompletionRequiredAndFinishedEnabled||isStepUnlockedAndButtonIncompleteWithoutButtonDisabledForced||isFinishedAndEnabledAfterCompletion||false;this.set({_isButtonVisible:isButtonVisible,_isButtonDisabled:!isButtonEnabled})}});__AMD("extensions/adapt-contrib-trickle/js/trickleButton",components$1.register("trickle-button",{view:TrickleButtonView$1,model:TrickleButtonModel}));__AMD("extensions/adapt-contrib-trickle/js/adapt-contrib-trickle",Adapt$1.trickle=controller);const TUTOR_TYPE=ENUM(["NOTIFY","INLINE","OVERLAY","NONE"]);var TUTOR_TYPE$1=__AMD("extensions/adapt-contrib-tutor/js/TUTOR_TYPE",TUTOR_TYPE);var TutorModel=__AMD("extensions/adapt-contrib-tutor/js/TutorModel",class TutorModel extends Backbone.Model{defaults(){return{_type:TUTOR_TYPE$1.NOTIFY.asLowerCase,_classes:"",_hasNotifyBottomButton:false,_button:{text:"{{_globals._extensions._tutor.hideFeedback}}",ariaLabel:"{{_globals._extensions._tutor.hideFeedback}}"},...Adapt$1.course.get("_tutor")}}initialize(data,parentModel){data=$.extend(true,this.defaults(),data?._isInherited===true?null:data,{_attributes:{"data-adapt-id":parentModel.get("_id")},_id:parentModel.get("_id"),_shouldRenderId:false,...parentModel.getFeedback?.()||{altTitle:parentModel.get("altFeedbackTitle"),title:parentModel.get("feedbackTitle"),body:parentModel.get("feedbackMessage")}});data._classes+=` tutor ${this.getOriginClasses(parentModel)}`;this.set(data)}getOriginClasses(model){const component=model.get("_component");const extension=model.get("_extension");return[model.get("_isCorrect")?"is-correct":model.get("_isAtLeastOneCorrectSelection")?"is-partially-correct":"is-incorrect",component&&`is-component is-${component}`,extension&&`is-extension is-${extension}`].filter(Boolean).join(" ")}});var TutorNotify=__AMD("extensions/adapt-contrib-tutor/js/TutorNotify",class TutorNotify extends Backbone.Controller{initialize(options){this.parentView=options.parentView;this.listenToOnce(Adapt$1,"notify:closed",this.onNotifyClosed);this.triggerNotify()}triggerNotify(){const{_hasNotifyBottomButton:isButtonEnabled,_button:{text:promptText}}=this.model.toJSON();this.notifyOptions={...this.model.toJSON(),_prompts:isButtonEnabled&&[{promptText:Handlebars.compile(promptText)({_globals:Adapt$1.course.get("_globals")})}],_type:isButtonEnabled?"prompt":"popup"};notify$1.create(this.notifyOptions);Adapt$1.trigger("tutor:opened",this.parentView,this.notifyOptions)}onNotifyClosed(){Adapt$1.trigger("tutor:closed",this.parentView,this.notifyOptions)}});var TutorView=__AMD("extensions/adapt-contrib-tutor/js/TutorView",class TutorView extends Backbone.View{className(){return["tutor",`tutor-type-${this.model.get("_type")}`,this.model.get("_classes")].join(" ")}events(){return{"click .js-tutor-btn":"onCloseClick"}}initialize(options){this.parentView=options.parentView;this.buttonsView=this.parentView.buttonsView;this.listenTo(this.parentView,"postRemove",this.onTutorClosed);this.listenTo(this.buttonsView,"buttons:stateUpdate",this.onButtonsStateUpdate);this.render()}render(){this.$el.html(Handlebars.templates.tutor(this.model.toJSON()));_.defer(this.postRender.bind(this))}postRender(){this.toggleFeedback({shouldOpen:true})}toggleFeedback({shouldOpen:shouldOpen,shouldManageFocus:shouldManageFocus=true}={}){const animation=this.model.get("_type")==="inline"?"slide":"fade";const onAnimationEnd=shouldOpen?this.onTutorOpened.bind(this,shouldManageFocus):this.onTutorClosed.bind(this,shouldManageFocus);if(shouldManageFocus){a11y$1.toggleEnabled(this.buttonsView.$(".js-btn-feedback"),!shouldOpen)}this.$(".tutor__inner").stop()[`${animation}Toggle`](200,onAnimationEnd)}onCloseClick(){this.toggleFeedback({shouldOpen:false})}onTutorOpened(shouldManageFocus){if(shouldManageFocus){a11y$1.focus(this.$(".tutor__inner"),{defer:true,preventScroll:true})}Adapt$1.trigger("tutor:opened",this.parentView,this.model.toJSON())}onTutorClosed(shouldManageFocus){if(shouldManageFocus){const $showFeedbackButton=this.buttonsView.$(".js-btn-feedback");a11y$1.focus($showFeedbackButton,{defer:true,preventScroll:true})}Adapt$1.trigger("tutor:closed",this.parentView,this.model.toJSON());this.remove()}onButtonsStateUpdate(state){if(state!==BUTTON_STATE$1.RESET)return;this.toggleFeedback({shouldOpen:false,shouldManageFocus:false})}});class Tutor extends Backbone.Controller{initialize(){this.listenTo(Adapt$1,{"componentView:postRender":this.onComponentViewPostRender,"questionView:showFeedback":this.onQuestionViewShowFeedback,"buttonsView:postRender":this.onButtonsViewPostRender})}getTutorType(model){const config=model.get("_tutor")?._isInherited??true?Adapt$1.course.get("_tutor"):model.get("_tutor");if(!config)return;return TUTOR_TYPE$1(config._type?.toUpperCase())}onComponentViewPostRender(view){const{model:model}=view;if(!model.isTypeGroup("question"))return;const type=this.getTutorType(model);if(!type)return;const shouldShowFeedback=model.get("_canShowFeedback")&&model.get("_isSubmitted")&&type===TUTOR_TYPE$1.INLINE;if(!shouldShowFeedback)return;model.setupFeedback();Adapt$1.trigger("questionView:showFeedback",view)}onButtonsViewPostRender(view){const{model:model}=view;const type=this.getTutorType(model);if(type!==TUTOR_TYPE$1.INLINE)return;const $btnAction=view.$(".js-btn-action");const $btnFeedback=view.$(".js-btn-feedback");const $btnMarking=view.$(".js-btn-marking");$btnAction.addClass("is-full-width");$btnFeedback.addClass("u-display-none");$btnMarking.addClass("is-full-width")}onQuestionViewShowFeedback(view){const parentModel=view.model;const tutorModel=new TutorModel(parentModel.get("_tutor"),parentModel);const options={model:tutorModel,parentView:view};switch(TUTOR_TYPE$1(tutorModel.get("_type").toUpperCase())){case TUTOR_TYPE$1.NOTIFY:new TutorNotify(options);break;case TUTOR_TYPE$1.INLINE:case TUTOR_TYPE$1.OVERLAY:view.$(".component__inner").append(new TutorView(options).$el);break;case TUTOR_TYPE$1.NONE:}}}__AMD("extensions/adapt-contrib-tutor/js/adapt-contrib-tutor",Adapt$1.tutor=new Tutor);class MenuItemView extends AdaptView$1{attributes(){return AdaptView$1.resultExtend("attributes",{role:"listitem","aria-labelledby":this.model.get("_id")+"-heading"},this)}className(){return["menu-item",this.constructor.className,this.model.get("_id"),this.model.get("_classes"),this.setVisibility(),this.setHidden(),this.model.get("_isVisited")?"is-visited":"",this.model.get("_isComplete")?"is-complete":"",this.model.get("_isLocked")?"is-locked":"",this.model.get("_isOptional")?"is-optional":""].join(" ")}preRender(){this.model.checkCompletionStatus();this.model.checkInteractionCompletionStatus()}postRender(){this.$el.imageready(this.setReadyStatus.bind(this))}}MenuItemView.type="menuItem";var MenuItemView$1=__AMD("core/js/views/menuItemView",MenuItemView);class MenuView extends ContentObjectView{}Object.assign(MenuView,{childContainer:".js-children",childView:MenuItemView$1,type:"menu",template:"menu"});var MenuView$1=__AMD("core/js/views/menuView",MenuView);class BoxMenuItemView extends MenuItemView$1{className(){return`${super.className()} boxmenu-item`}events(){return{"click .js-btn-click":"onClickMenuItemButton"}}onClickMenuItemButton(event){if(event&&event.preventDefault)event.preventDefault();if(this.model.get("_isLocked"))return;router$1.navigateToElement(this.model.get("_id"))}}BoxMenuItemView.template="boxMenuItem";var BoxMenuItemView$1=__AMD("menu/adapt-contrib-boxMenu/js/BoxMenuItemView",BoxMenuItemView);class BoxMenuGroupView extends MenuItemView$1{className(){return`${super.className()} boxmenu-group`}postRender(){_.defer(this.addChildren.bind(this));this.$el.imageready(this.setReadyStatus.bind(this));this.$el.parents(".boxmenu__item-container").addClass("has-groups");this.updateItemCount()}updateItemCount(){const models=this.model.getChildren().where({_isHidden:false});const totalChildren=models.length;models.forEach((model=>model.set("_totalChild",totalChildren)))}}BoxMenuGroupView.template="boxMenuGroup";BoxMenuGroupView.childContainer=".js-group-children";BoxMenuGroupView.childView=BoxMenuItemView$1;var BoxMenuGroupView$1=__AMD("menu/adapt-contrib-boxMenu/js/BoxMenuGroupView",BoxMenuGroupView);class BoxMenuView extends MenuView$1{className(){return`${super.className()} boxmenu`}initialize(){super.initialize();this.setStyles();this.listenTo(Adapt$1,"device:changed",this.onDeviceResize)}onDeviceResize(){this.setStyles()}addChildren(){let nthChild=0;const models=this.model.getChildren().models;const totalChild=this.model.getChildren().where({_isHidden:false}).length;const childViews=[];models.forEach((model=>{if(!model.get("_isAvailable"))return;if(model.get("_isHidden")){model.set("_isReady",true);return}nthChild++;model.set({_nthChild:nthChild,_totalChild:totalChild});const ChildView=model.get("_type")==="menu"&&model.get("_boxMenu")&&model.get("_boxMenu")._renderAsGroup?BoxMenuGroupView$1:BoxMenuItemView$1;const $parentContainer=this.$(this.constructor.childContainer);const childView=new ChildView({model:model});childViews.push(childView);$parentContainer.append(childView.$el)}));this.setChildViews(childViews)}setStyles(){this.addBackgroundLayer();this.setBackgroundImage();this.setBackgroundStyles();this.processHeader()}addBackgroundLayer(){if(this.$el.find(" > .background").length)return;this.$background=$('').prependTo(this.$el)}setBackgroundImage(){const config=this.model.get("_boxMenu");const backgroundImages=config?._backgroundImage;if(!backgroundImages)return;const backgroundImage=backgroundImages[`_${Adapt$1.device.screenSize}`]??backgroundImages._small;this.$el.toggleClass("has-bg-image",Boolean(backgroundImage));this.$background.css("background-image",backgroundImage?"url("+backgroundImage+")":"")}setBackgroundStyles(){const config=this.model.get("_boxMenu");const styles=config?._backgroundStyles;if(!styles)return;this.$background.css({"background-repeat":styles._backgroundRepeat,"background-size":styles._backgroundSize,"background-position":styles._backgroundPosition})}processHeader(){const config=this.model.get("_boxMenu");const header=config?._menuHeader;if(!header)return;const $header=this.$(".menu__header");this.setHeaderTextAlignment(header);this.addHeaderBackgroundLayer($header);this.setHeaderBackgroundImage(header,$header);this.setHeaderBackgroundStyles(header,$header);this.setHeaderMinimumHeight(header,$header)}setHeaderTextAlignment(config){const textAlignment=config._textAlignment;if(!textAlignment)return;if(textAlignment._title)this.$el.addClass(`title-align-${textAlignment._title}`);if(textAlignment._body)this.$el.addClass(`body-align-${textAlignment._body}`);if(textAlignment._instruction)this.$el.addClass(`instruction-align-${textAlignment._instruction}`)}addHeaderBackgroundLayer($header){if($header.find(" > .background").length)return;this.$headerBackground=$('').prependTo($header)}setHeaderBackgroundImage(config,$header){const backgroundImages=config._backgroundImage;if(!backgroundImages)return;const backgroundImage=backgroundImages[`_${Adapt$1.device.screenSize}`]??backgroundImages._small;$header.toggleClass("has-bg-image",Boolean(backgroundImage));this.$headerBackground.css("background-image",backgroundImage?"url("+backgroundImage+")":"")}setHeaderBackgroundStyles(config,$header){const styles=config._backgroundStyles;if(!styles)return;this.$headerBackground.css({"background-repeat":styles._backgroundRepeat,"background-size":styles._backgroundSize,"background-position":styles._backgroundPosition})}setHeaderMinimumHeight(config,$header){const minimumHeights=config._minimumHeights;if(!minimumHeights)return;const minimumHeight=minimumHeights[`_${Adapt$1.device.screenSize}`]??minimumHeights._small;$header.toggleClass("has-min-height",Boolean(minimumHeight)).css("min-height",minimumHeight?minimumHeight+"px":"")}}BoxMenuView.template="boxMenu";var BoxMenuView$1=__AMD("menu/adapt-contrib-boxMenu/js/BoxMenuView",BoxMenuView);components$1.register("course menu",{view:BoxMenuView$1});components$1.register("boxMenu",{view:BoxMenuView$1,model:MenuModel$1.extend({})});var ThemeView=__AMD("theme/65c3489cff174f86ccc1f785/js/themeView",class ThemeView extends Backbone.View{className(){}initialize(){this.setStyles();this.listenTo(Adapt$1,{"device:changed":this.onDeviceResize,remove:this.remove})}onDeviceResize(){this.setStyles()}remove(){super.remove();this.onRemove()}setStyles(){this.setClasses();this.setTextAlignment();this.addBackgroundLayer();this.setBackgroundImage();this.setBackgroundStyles();this.setMinimumHeight();this.setResponsiveClasses();this.setCustomStyles()}setClasses(){this.$el.addClass(this.className())}setTextAlignment(){const textAlignment=this.model.get("_textAlignment");if(!textAlignment)return;if(textAlignment._title)this.$el.addClass(`title-align-${textAlignment._title}`);if(textAlignment._body)this.$el.addClass(`body-align-${textAlignment._body}`);if(textAlignment._instruction)this.$el.addClass(`instruction-align-${textAlignment._instruction}`)}addBackgroundLayer(){if(this.$el.find(" > .background").length)return;this.$background=$('').prependTo(this.$el)}setBackgroundImage(){const backgroundImages=this.model.get("_backgroundImage");if(!backgroundImages||!this.$background)return;const backgroundImage=backgroundImages[`_${device$1.screenSize}`]??backgroundImages._small;this.$el.toggleClass("has-bg-image",Boolean(backgroundImage));this.$background.css("background-image",backgroundImage?"url("+backgroundImage+")":"")}setBackgroundStyles(){const styles=this.model.get("_backgroundStyles");if(!styles||!this.$background)return;this.$background.css({"background-repeat":styles._backgroundRepeat,"background-size":styles._backgroundSize,"background-position":styles._backgroundPosition})}setMinimumHeight(){const minimumHeights=this.model.get("_minimumHeights");if(!minimumHeights)return;const minimumHeight=minimumHeights[`_${device$1.screenSize}`]??minimumHeights._small;this.$el.toggleClass("has-min-height",Boolean(minimumHeight)).css("min-height",minimumHeight?minimumHeight+"px":"")}setResponsiveClasses(){const responsiveClasses=this.model.get("_responsiveClasses");if(!responsiveClasses)return;this.$el.removeClass(Object.values(responsiveClasses)).addClass(responsiveClasses[`_${device$1.screenSize}`])}setCustomStyles(){}onRemove(){}});var ThemePageView=__AMD("theme/65c3489cff174f86ccc1f785/js/themePageView",class ThemePageView extends ThemeView{className(){}setCustomStyles(){this.processHeader()}processHeader(){const header=this.model.get("_pageHeader");if(!header)return;const $header=this.$(".page__header");this.setHeaderTextAlignment(header);this.addHeaderBackgroundLayer($header);this.setHeaderBackgroundImage(header,$header);this.setHeaderBackgroundStyles(header,$header);this.setHeaderMinimumHeight(header,$header)}setHeaderTextAlignment(config){const textAlignment=config._textAlignment;if(!textAlignment)return;if(textAlignment._title)this.$el.addClass(`title-align-${textAlignment._title}`);if(textAlignment._body)this.$el.addClass(`body-align-${textAlignment._body}`);if(textAlignment._instruction)this.$el.addClass(`instruction-align-${textAlignment._instruction}`)}addHeaderBackgroundLayer($header){if($header.find(" > .background").length)return;this.$headerBackground=$('').prependTo($header)}setHeaderBackgroundImage(config,$header){const backgroundImages=config._backgroundImage;if(!backgroundImages||!this.$headerBackground)return;const backgroundImage=backgroundImages[`_${device$1.screenSize}`]??backgroundImages._small;$header.toggleClass("has-bg-image",Boolean(backgroundImage));this.$headerBackground.css("background-image",backgroundImage?"url("+backgroundImage+")":"")}setHeaderBackgroundStyles(config,$header){const styles=config._backgroundStyles;if(!styles||!this.$headerBackground)return;this.$headerBackground.css({"background-repeat":styles._backgroundRepeat,"background-size":styles._backgroundSize,"background-position":styles._backgroundPosition})}setHeaderMinimumHeight(config,$header){const minimumHeights=config._minimumHeights;if(!minimumHeights)return;const minimumHeight=minimumHeights[`_${device$1.screenSize}`]??minimumHeights._small;$header.toggleClass("has-min-height",Boolean(minimumHeight)).css("min-height",minimumHeight?minimumHeight+"px":"")}});var ThemeArticleView=__AMD("theme/65c3489cff174f86ccc1f785/js/themeArticleView",class ThemeArticleView extends ThemeView{className(){}setCustomStyles(){}onRemove(){}});var ThemeBlockView=__AMD("theme/65c3489cff174f86ccc1f785/js/themeBlockView",class ThemeBlockView extends ThemeView{className(){return this.model.get("_isDividerBlock")?"is-divider-block":""}setCustomStyles(){this.setPaddingTop();this.setPaddingBottom();this.setComponentVerticalAlignment();this.setComponentHorizontalAlignment()}setPaddingTop(){const paddingTop=this.model.get("_paddingTop");if(!paddingTop)return;this.$el.addClass(`${paddingTop}-padding-top`)}setPaddingBottom(){const paddingBottom=this.model.get("_paddingBottom");if(!paddingBottom)return;this.$el.addClass(`${paddingBottom}-padding-bottom`)}setComponentVerticalAlignment(){const componentVerticalAlignment=this.model.get("_componentVerticalAlignment");if(!componentVerticalAlignment)return;this.$el.addClass(`align-vert-${componentVerticalAlignment}`)}setComponentHorizontalAlignment(){const componentHorizontalAlignment=this.model.get("_componentHorizontalAlignment");if(!componentHorizontalAlignment)return;this.$el.addClass(`align-horz-${componentHorizontalAlignment}`)}onRemove(){}});var ThemeComponentView=__AMD("theme/65c3489cff174f86ccc1f785/js/themeComponentView",class ThemeComponentView extends ThemeView{className(){}setCustomStyles(){}onRemove(){}});class Theme extends Backbone.Controller{initialize(){this.listenTo(Adapt$1,{"app:dataReady":this.onDataReady,"pageView:postRender articleView:postRender blockView:postRender componentView:postRender":this.onPostRender})}onDataReady(){$("html").addClass(Adapt$1.course.get("_courseStyle"));this.addFavIcon()}addFavIcon(){const theme=Adapt$1.course.get("_vanilla");if(!theme?._favIcon?._src)return;const $linkStandard=$(``);const $linkApple=$(``);$("head").append($linkStandard).append($linkApple)}onPostRender(view){const viewModel=view.model;const theme=viewModel.get("_vanilla");if(!theme)return;const model=new Backbone.Model(theme);const el=view.$el;switch(viewModel.get("_type")){case"page":new ThemePageView({model:model,el:el});break;case"article":new ThemeArticleView({model:model,el:el});break;case"block":new ThemeBlockView({model:model,el:el});break;case"component":new ThemeComponentView({model:model,el:el});break;default:new ThemeView({model:model,el:el})}}}__AMD("theme/65c3489cff174f86ccc1f785/js/theme",new Theme);register("header",(function Header(props){const jsxHeading=React.useRef(null);const{_id:_id,displayTitle:displayTitle,body:body,instruction:instruction,mobileInstruction:mobileInstruction,_type:_type,_component:_component,_extension:_extension,_isA11yComponentDescriptionEnabled:_isA11yComponentDescriptionEnabled,classNamePrefixes:classNamePrefixes=[_type&&_type.toLowerCase(),_component&&_component.toLowerCase(),_extension&&_extension.toLowerCase()].filter(Boolean)}=props;const sizedInstruction=mobileInstruction&&!device$1.isScreenSizeMin("medium")?mobileInstruction:instruction;const _globals=Adapt$1.course.get("_globals");const ariaRegion=_globals?._components?.[`_${_component}`]?.ariaRegion??_globals?._extensions?.[`_${_extension}`]?.ariaRegion;const isSet=displayTitle||body||sizedInstruction;if(!isSet&&_isA11yComponentDescriptionEnabled&&ariaRegion){return React__default["default"].createElement("div",{className:"aria-label",dangerouslySetInnerHTML:{__html:compile(ariaRegion)}})}if(!isSet)return null;return React__default["default"].createElement("div",{id:`${_id}-header`,className:classes([prefixClasses(classNamePrefixes,["__header"]),props.classes])},React__default["default"].createElement("div",{className:prefixClasses(classNamePrefixes,["__header-inner"])},displayTitle&&React__default["default"].createElement("div",{className:prefixClasses(classNamePrefixes,["__title"])},React__default["default"].createElement("div",{className:prefixClasses(classNamePrefixes,["__title-inner"])+" js-heading",ref:jsxHeading})),_isA11yComponentDescriptionEnabled&&ariaRegion&&React__default["default"].createElement("div",{className:"aria-label",dangerouslySetInnerHTML:{__html:compile(ariaRegion,props)}}),body&&React__default["default"].createElement("div",{className:prefixClasses(classNamePrefixes,["__body"])},React__default["default"].createElement("div",{className:prefixClasses(classNamePrefixes,["__body-inner"]),dangerouslySetInnerHTML:{__html:compile(body,props)}})),sizedInstruction&&React__default["default"].createElement("div",{className:prefixClasses(classNamePrefixes,["__instruction"])},React__default["default"].createElement("span",{className:"icon","aria-hidden":"true"}),React__default["default"].createElement("div",{className:prefixClasses(classNamePrefixes,["__instruction-inner"]),dangerouslySetInnerHTML:{__html:compile(sizedInstruction,props)}}))))}));register("image",(function Image(props){const hasMatchingSetting=Object.hasOwn(props,`_${device$1.screenSize}`)||Object.hasOwn(props,device$1.screenSize);const screenSize=hasMatchingSetting?device$1.screenSize:device$1.isScreenSizeMin("medium")?"large":"small";const src=props[`_${screenSize}`]||props[`${screenSize}`]||props._src||props.src;const hasSource=Boolean(src);if(!hasSource)return null;const attributionClassNamePrefixes=props.attributionClassNamePrefixes||props.classNamePrefixes;return React__default["default"].createElement("span",{id:props.id,className:classes([prefixClasses(props.classNamePrefixes,["__image-container"]),props.classes,props.attribution&&"has-attribution"])},React__default["default"].createElement("img",{className:classes([prefixClasses(props.classNamePrefixes,["__image"]),props?._srcFocalPoint&&`object-position-${props?._srcFocalPoint}`]),src:src,"aria-label":a11y$1.normalize(props.alt),"aria-hidden":!props.alt,loading:"eager","aria-describedby":props.longdescription?props.longDescriptionId:undefined,draggable:props.draggable??null}),props.attribution&&React__default["default"].createElement("span",{className:prefixClasses(attributionClassNamePrefixes,["__attribution"])},React__default["default"].createElement("span",{className:prefixClasses(attributionClassNamePrefixes,["__attribution-inner"])},html(props.attribution))))}));register("navButton",(function NavButton(props){const{text:text,_iconClasses:_iconClasses}=props;return React__default["default"].createElement(React__default["default"].Fragment,null,React__default["default"].createElement("span",{className:classes(["icon",_iconClasses]),"aria-hidden":"true"}),React__default["default"].createElement("span",{className:"nav__btn-label","aria-hidden":"true"},compile(text,props)))}));register("tooltip",(function Tooltip(props){const{text:text,disabledText:disabledText,isDisabled:isDisabled,ariaHidden:ariaHidden}=props;return React__default["default"].createElement(React__default["default"].Fragment,null,React__default["default"].createElement("div",{className:classes(["tooltip__arrow"]),"aria-hidden":"true"}),React__default["default"].createElement("div",{className:classes(["tooltip__body"]),"aria-hidden":ariaHidden},React__default["default"].createElement("div",{className:"tooltip__body-inner",dangerouslySetInnerHTML:{__html:compile((isDisabled?disabledText:text)||"",props)}})))}));register("assessmentResults",(function AssessmentResults(props){const{_globals:_globals,_retry:_retry,retryFeedback:retryFeedback,_isRetryEnabled:_isRetryEnabled}=props;return React__default["default"].createElement("div",{className:"component__inner assessmentresults__inner"},React__default["default"].createElement(templates.header,props),React__default["default"].createElement("div",{className:"component__widget assessmentresults__widget"},_isRetryEnabled&&React__default["default"].createElement("div",{className:"component__feedback assessmentresults__feedback"},React__default["default"].createElement("div",{className:"component__feedback-inner assessmentresults__feedback-inner"},retryFeedback&&React__default["default"].createElement("div",{className:"assessmentresults__retry-feedback"},React__default["default"].createElement("div",{className:"assessmentresults__retry-feedback-inner",dangerouslySetInnerHTML:{__html:compile(retryFeedback,props)}})),React__default["default"].createElement("button",{className:"btn-text assessmentresults__retry-btn js-assessment-retry-btn"},React__default["default"].createElement("span",null,_retry.button||_globals._components._assessmentResults.retryText))))))}));function _extends(){_extends=Object.assign?Object.assign.bind():function(target){for(var i=1;ihref?React__default["default"].createElement("a",{href:href,target:target,className:className,role:role},children):children;register("graphic",(function Graphic(props){const{_id:_id,_isScrollable:_isScrollable,_scrollPercent:_scrollPercent,_graphic:_graphic,_globals:_globals}=props;const scrollableProperties=_isScrollable?{role:"slider",className:"component__widget graphic__widget js-graphic-scrollbar","aria-controls":`graphic__scroll__container__${_id}`,"aria-orientation":"horizontal","aria-valuemax":"100","aria-valuemin":"0","aria-valuenow":_scrollPercent,"aria-label":Handlebars.compile(_globals._components._graphic.scrollAriaLabel)(props),"aria-describedby":_graphic.longdescription?`graphic__longdescription__${_id}`:undefined,tabIndex:"0"}:{};return React__default["default"].createElement("div",{className:"component__inner graphic__inner"},React__default["default"].createElement(templates.header,props),React__default["default"].createElement("div",_extends({className:"component__widget graphic__widget"},scrollableProperties),React__default["default"].createElement(LinkWrapper,{href:_graphic._url,target:_graphic._target,className:"graphic__link js-graphic-link",role:"link"},React__default["default"].createElement(templates.image,_extends({},_graphic,{"aria-hidden":_isScrollable,id:`graphic__scroll__container__${_id}`,longDescriptionId:`graphic__longdescription__${_id}`,classes:"js-graphic-scroll-container",classNamePrefixes:["component","graphic"]})),_graphic.longdescription&&React__default["default"].createElement("div",{id:`graphic__longdescription__${_id}`,className:"graphic__longdescription"},React__default["default"].createElement("div",{className:"graphic__longdescription-inner"},_graphic.longdescription)))))}));register("mcq",(function Mcq(props){const ariaLabels=Adapt$1.course.get("_globals")._accessibility._ariaLabels;const{_id:_id,_isEnabled:_isEnabled,_isInteractionComplete:_isInteractionComplete,_isCorrect:_isCorrect,_isCorrectAnswerShown:_isCorrectAnswerShown,_shouldShowMarking:_shouldShowMarking,_isRadio:_isRadio,displayTitle:displayTitle,body:body,instruction:instruction,ariaQuestion:ariaQuestion,onKeyPress:onKeyPress,onItemSelect:onItemSelect,onItemFocus:onItemFocus,onItemBlur:onItemBlur}=props;return React__default["default"].createElement("div",{className:"component__inner mcq__inner"},React__default["default"].createElement(templates.header,props),React__default["default"].createElement("div",{className:classes(["component__widget","mcq__widget",!_isEnabled&&"is-disabled",_isInteractionComplete&&"is-complete is-submitted show-user-answer",_isCorrect&&"is-correct"]),role:_isRadio?"radiogroup":"group","aria-labelledby":ariaQuestion?null:(displayTitle||body||instruction)&&`${_id}-header`,"aria-label":ariaQuestion||null},props._items.map((({text:text,altText:altText,_index:_index,_isActive:_isActive,_shouldBeSelected:_shouldBeSelected,_isHighlighted:_isHighlighted},index)=>React__default["default"].createElement("div",{className:classes([`mcq-item item-${index}`,_shouldShowMarking&&_shouldBeSelected&&"is-correct",_shouldShowMarking&&!_shouldBeSelected&&"is-incorrect"]),key:_index},React__default["default"].createElement("input",{className:"mcq-item__input",id:`${_id}-${index}-input`,name:_isRadio?`${_id}-item`:null,type:_isRadio?"radio":"checkbox",disabled:!_isEnabled,checked:_isActive,"aria-label":!_shouldShowMarking?a11y$1.normalize(altText||text):`${_shouldBeSelected?ariaLabels.correct:ariaLabels.incorrect}, ${_isActive?ariaLabels.selectedAnswer:ariaLabels.unselectedAnswer}. ${a11y$1.normalize(altText||text)}`,"data-adapt-index":_index,onKeyPress:onKeyPress,onChange:onItemSelect,onFocus:onItemFocus,onBlur:onItemBlur}),React__default["default"].createElement("label",{className:classes(["mcq-item__label","u-no-select",!_isEnabled&&"is-disabled",_isHighlighted&&"is-highlighted",(_isCorrectAnswerShown?_shouldBeSelected:_isActive)&&"is-selected"]),"aria-hidden":true,htmlFor:`${_id}-${index}-input`,"data-adapt-index":_index},React__default["default"].createElement("span",{className:"mcq-item__state"},React__default["default"].createElement("span",{className:classes(["mcq-item__icon","mcq-item__answer-icon",_isRadio?"is-radio":"is-checkbox"])},React__default["default"].createElement("span",{className:"icon"})),React__default["default"].createElement("span",{className:"mcq-item__icon mcq-item__correct-icon"},React__default["default"].createElement("span",{className:"icon"})),React__default["default"].createElement("span",{className:"mcq-item__icon mcq-item__incorrect-icon"},React__default["default"].createElement("span",{className:"icon"}))),React__default["default"].createElement("span",{className:"mcq-item__text"},React__default["default"].createElement("span",{className:"mcq-item__text-inner",dangerouslySetInnerHTML:{__html:compile(text)}}))))))),React__default["default"].createElement("div",{className:"btn__container"}))}));register("resources",(function Resources(props){const{resources:resources,resourceTypes:resourceTypes}=props;const _globals=Adapt$1.course.get("_globals");function resourcesHasMultipleTypes(resources){if(resources.length===1)return false;const allSameType=resources.every(_.matcher({_type:resources[0]._type}));return!allSameType}function resourcesGetColumnCount(resources){return _.uniq(_.pluck(resources,"_type")).length+1}const[selectedFilter,setSelectedFilter]=React.useState("all");const[selectedId,setSelectedId]=React.useState("resources__show-all");const[focusFlag,setFocusFlag]=React.useState(false);React.useEffect((()=>{if(focusFlag){let $items;if(selectedFilter==="all"){$items=$(".resources__item")}else{$items=$(".resources__item.is-"+selectedFilter)}if($items.length<0)return;a11y$1.focusFirst($items);setFocusFlag(false)}}),[focusFlag]);const onFilterClicked=e=>{if(e&&e.preventDefault)e.preventDefault();const $clickedButton=$(e.currentTarget);const filter=$clickedButton.data("filter");const id=$clickedButton.attr("id");setSelectedFilter(filter);setSelectedId(id);setFocusFlag(true)};return React__default["default"].createElement("div",{className:"resources__inner"},React__default["default"].createElement(templates.header,props.model),resourcesHasMultipleTypes(resources)&&React__default["default"].createElement("div",{className:classes(["resources__filter",`has-${resourcesGetColumnCount(resources)}-columns`,resourcesGetColumnCount(resources)>4&&"has-extra-types"])},React__default["default"].createElement("div",{className:"resources__filter-inner",role:"tablist"},React__default["default"].createElement("div",{className:"aria-label","aria-label":_globals._extensions._resources.resources}),resourceTypes.map(((type,index)=>React__default["default"].createElement(templates.resourcesFilterButton,_extends({},props,{key:index,resources:resources,_filter:type,onClick:onFilterClicked,selected:selectedFilter})))))),React__default["default"].createElement("div",{id:"resources",className:"resources__item-container",role:"tabpanel","aria-labelledby":selectedId},React__default["default"].createElement("div",{role:"list"},resources.map((({title:title,description:description,_link:_link,_type:_type,_isGlobal:_isGlobal,filename:filename,_forceDownload:_forceDownload},index)=>React__default["default"].createElement(templates.resourcesItem,_extends({},props,{key:index,_index:index,title:title,description:description,_link:_link,_type:_type,_isGlobal:_isGlobal,selectedFilter:selectedFilter,filename:filename,_forceDownload:_forceDownload})))))))}));register("resourcesFilterButton",(function ResourcesFilterButton(props){const{model:model,onClick:onClick,resources:resources,selected:selected,_filter:_filter}=props;const buttonText=model._filterButtons[_filter];const ariaLabel=model._filterAria[`${_filter}Aria`];function resourcesHasType(resources,type){return resources.some(_.matcher({_type:type}))}if(!resourcesHasType(resources,_filter)&&_filter!=="all")return null;return React__default["default"].createElement("button",{id:`resources__show-${_filter}`,className:classes(["resources__filter-btn",selected===_filter&&"is-selected"]),onClick:onClick,"data-filter":_filter,"aria-label":ariaLabel,role:"tab","aria-selected":selected===_filter,"aria-controls":"resources",dangerouslySetInnerHTML:{__html:buttonText}})}));register("resourcesItem",(function ResourcesItem(props){const{_forceDownload:_forceDownload,_isGlobal:_isGlobal,_link:_link,_type:_type,_index:_index,description:description,filename:filename,selectedFilter:selectedFilter,title:title,onResourceItemClicked:onResourceItemClicked}=props;function resourcesForceDownload(filename,_forceDownload){if(device$1.browser==="internet explorer"||device$1.OS==="ios"){return false}return _forceDownload||filename}return React__default["default"].createElement("div",{className:classes(["resources__item drawer__item",`is-${_type}`,_isGlobal&&"is-global",!["all",_type].includes(selectedFilter)&&"u-display-none"]),role:"listitem"},React__default["default"].createElement("a",{href:_link,className:"resources__item-btn drawer__item-btn","data-type":_type,"data-index":_index,download:resourcesForceDownload(filename,_forceDownload)&&filename,onClick:onResourceItemClicked,target:"_blank",rel:"noreferrer","aria-label":title},title&&React__default["default"].createElement("div",{className:"resources__item-title drawer__item-title"},React__default["default"].createElement("div",{className:"resources__item-title-inner drawer__item-title-inner",dangerouslySetInnerHTML:{__html:title}})),description&&React__default["default"].createElement("div",{className:"resources__item-body drawer__item-body"},React__default["default"].createElement("div",{className:"resources__item-body-inner drawer__item-body-inner",dangerouslySetInnerHTML:{__html:description}}))))}));$("body").append(Handlebars.templates.loading());data$1.on("ready",(()=>{logging$1.debug("Calling Adapt.init");Adapt$1.init();Adapt$1.off("adaptCollection:dataLoaded courseModel:dataLoaded")})).init()}));window.__AMD=function(id,value){window.define(id,(function(){return value}));window.require([id]);return value}; diff --git a/adapt/js/build.min.js b/adapt/js/build.min.js index 113eb09..19a789c 100644 --- a/adapt/js/build.min.js +++ b/adapt/js/build.min.js @@ -1 +1 @@ -{"type":"production","configdir":"courses\\64b66d6e16e5991c8012f69f\\6527c3a4e72d6c32787e2b1a\\build\\","coursedir":"course","cachepath":null,"tempdir":"courses\\64b66d6e16e5991c8012f69f\\6527c3a4e72d6c32787e2b1a\\build\\.temp/","jsonext":"json","trackingIdType":"block","theme":"64b66dd816e5991c8012f733","menu":"adapt-contrib-boxMenu","languages":"**","scriptSafe":["adapt-contrib-xapi","adapt-contrib-spoor"],"strictMode":false,"targets":"","includes":["adapt-contrib-boxMenu","64b66dd816e5991c8012f733","adapt-contrib-assessmentResults","adapt-contrib-graphic","adapt-contrib-mcq","adapt-contrib-assessment","adapt-contrib-bookmarking","adapt-contrib-resources","adapt-contrib-spoor","adapt-contrib-trickle","adapt-contrib-tutor"],"availableLanguageNames":["en"],"package":{"name":"adapt_framework","version":"5.31.27","description":"Adapt Learning output framework","repository":{"type":"git","url":"git://github.com/adaptlearning/adapt_framework.git"},"license":"GPL-3.0"},"plugins":[{"name":"core"},{"name":"adapt-contrib-assessmentResults","version":"5.1.7","framework":">=5.19.1","displayName":"Assessment Results","component":"assessmentResults","description":"A component used to display a single assessment's results","main":"/js/adapt-contrib-assessmentResults.js","keywords":["adapt-plugin","adapt-component"]},{"name":"adapt-contrib-graphic","version":"6.2.3","framework":">=5.19.1","displayName":"Graphic","component":"graphic","description":"Graphic component which dynamically displays small and large images of different resolutions based upon device width","main":"/js/adapt-contrib-graphic.js","keywords":["adapt-plugin","adapt-component"]},{"name":"adapt-contrib-mcq","version":"7.3.11","framework":">=5.19.1","displayName":"Multiple Choice Question","component":"mcq","description":"A multiple choice question component","main":"/js/adapt-contrib-mcq.js","keywords":["adapt-plugin","adapt-component"]},{"name":"adapt-contrib-assessment","version":"5.1.8","framework":">=5.19.1","displayName":"Assessment","extension":"assessment","description":"An extension which attaches to an article object to group various question components and provide a score with feedback","main":"/js/adapt-assessmentArticleExtension.js","keywords":["adapt-plugin","adapt-extension"]},{"name":"adapt-contrib-bookmarking","version":"4.2.0","framework":">=5.19.1","displayName":"Bookmarking","extension":"bookmarking","description":"An extension that tracks the learner's location in the course so that it can return them to that location in a subsequent session","main":"/js/adapt-contrib-bookmarking.js","keywords":["adapt-plugin","adapt-extension"]},{"name":"adapt-contrib-resources","version":"5.4.2","framework":">=5.19.1","displayName":"Resources","extension":"resources","description":"An extension to allow learners to view resources","main":"/js/adapt-contrib-resources.js","keywords":["adapt-plugin","adapt-extension"]},{"name":"adapt-contrib-spoor","version":"5.8.1","framework":">=5.28.1","displayName":"Spoor","extension":"spoor","description":"An extension which allows basic SCORM tracking","main":"/js/adapt-contrib-spoor.js","keywords":["adapt-plugin","adapt-extension"]},{"name":"adapt-contrib-trickle","version":"7.0.1","framework":">=5.31.24","displayName":"Trickle","extension":"trickle","description":"A vertical locking extension","main":"/js/adapt-contrib-trickle.js","keywords":["adapt-plugin","adapt-extension"]},{"name":"adapt-contrib-tutor","version":"4.5.9","framework":">=5.22.8","displayName":"Tutor","extension":"tutor","description":"An extension which provides a basic feedback overlay for question components","main":"/js/adapt-contrib-tutor.js","keywords":["adapt-plugin","adapt-extension"]},{"name":"adapt-contrib-boxMenu","version":"6.3.11","framework":">=5.24.2","displayName":"Box Menu","menu":"boxMenu","description":"A core bundled menu","main":"js/adapt-contrib-boxMenu.js","keywords":["adapt-plugin","adapt-menu"]},{"name":"adapt-contrib-vanilla","version":"9.8.4","framework":">=5.31.3","displayName":"Vanilla","theme":"vanilla","description":"A core bundled theme","main":"js/theme.js","keywords":["adapt-plugin","adapt-theme"]}]} \ No newline at end of file +{"type":"production","coursedir":"course","jsonext":"json","trackingIdType":"block","theme":"65c3489cff174f86ccc1f785","menu":"adapt-contrib-boxMenu","languages":"**","scriptSafe":["adapt-contrib-xapi","adapt-contrib-spoor"],"strictMode":false,"targets":"","includes":["adapt-contrib-boxMenu","65c3489cff174f86ccc1f785","adapt-contrib-assessmentResults","adapt-contrib-graphic","adapt-contrib-mcq","adapt-contrib-assessment","adapt-contrib-bookmarking","adapt-contrib-resources","adapt-contrib-spoor","adapt-contrib-trickle","adapt-contrib-tutor"],"availableLanguageNames":["en"],"package":{"name":"adapt_framework","version":"5.33.7","description":"Adapt Learning output framework","repository":{"type":"git","url":"git://github.com/adaptlearning/adapt_framework.git"},"license":"GPL-3.0"},"plugins":[{"name":"core"},{"name":"adapt-contrib-assessmentResults","version":"5.2.0","framework":">=5.19.1","displayName":"Assessment Results","component":"assessmentResults","description":"A component used to display a single assessment's results","main":"/js/adapt-contrib-assessmentResults.js","keywords":["adapt-plugin","adapt-component"]},{"name":"adapt-contrib-graphic","version":"6.2.3","framework":">=5.19.1","displayName":"Graphic","component":"graphic","description":"Graphic component which dynamically displays small and large images of different resolutions based upon device width","main":"/js/adapt-contrib-graphic.js","keywords":["adapt-plugin","adapt-component"]},{"name":"adapt-contrib-mcq","version":"7.4.1","framework":">=5.19.1","displayName":"Multiple Choice Question","component":"mcq","description":"A multiple choice question component","main":"/js/adapt-contrib-mcq.js","keywords":["adapt-plugin","adapt-component"]},{"name":"adapt-contrib-assessment","version":"5.1.10","framework":">=5.19.1","displayName":"Assessment","extension":"assessment","description":"An extension which attaches to an article object to group various question components and provide a score with feedback","main":"/js/adapt-assessmentArticleExtension.js","keywords":["adapt-plugin","adapt-extension"]},{"name":"adapt-contrib-bookmarking","version":"4.2.1","framework":">=5.19.1","displayName":"Bookmarking","extension":"bookmarking","description":"An extension that tracks the learner's location in the course so that it can return them to that location in a subsequent session","main":"/js/adapt-contrib-bookmarking.js","keywords":["adapt-plugin","adapt-extension"]},{"name":"adapt-contrib-resources","version":"5.4.2","framework":">=5.19.1","displayName":"Resources","extension":"resources","description":"An extension to allow learners to view resources","main":"/js/adapt-contrib-resources.js","keywords":["adapt-plugin","adapt-extension"]},{"name":"adapt-contrib-spoor","version":"5.9.5","framework":">=5.31.31","displayName":"Spoor","extension":"spoor","description":"An extension which allows basic SCORM tracking","main":"/js/adapt-contrib-spoor.js","keywords":["adapt-plugin","adapt-extension"]},{"name":"adapt-contrib-trickle","version":"7.1.1","framework":">=5.31.24","displayName":"Trickle","extension":"trickle","description":"A vertical locking extension","main":"/js/adapt-contrib-trickle.js","keywords":["adapt-plugin","adapt-extension"]},{"name":"adapt-contrib-tutor","version":"4.5.9","framework":">=5.22.8","displayName":"Tutor","extension":"tutor","description":"An extension which provides a basic feedback overlay for question components","main":"/js/adapt-contrib-tutor.js","keywords":["adapt-plugin","adapt-extension"]},{"name":"adapt-contrib-boxMenu","version":"6.5.1","framework":">=5.24.2","displayName":"Box Menu","menu":"boxMenu","description":"A core bundled menu","main":"js/adapt-contrib-boxMenu.js","keywords":["adapt-plugin","adapt-menu"]},{"name":"adapt-contrib-vanilla","version":"9.15.1","framework":">=5.31.3","displayName":"Vanilla","theme":"vanilla","description":"A core bundled theme","main":"js/theme.js","keywords":["adapt-plugin","adapt-theme"]}]} \ No newline at end of file diff --git a/adapt/js/scriptLoader.js b/adapt/js/scriptLoader.js index aaf0638..c2c64c3 100644 --- a/adapt/js/scriptLoader.js +++ b/adapt/js/scriptLoader.js @@ -1,131 +1,131 @@ -(function() { - - const isProduction = (window.ADAPT_BUILD_TYPE !== 'development'); - - function loadScript(url, callback) { - if (!url || typeof url !== 'string') return; - const script = document.createElement('script'); - script.onload = callback; - script.src = url; - document.getElementsByTagName('head')[0].appendChild(script); - }; - - // 0. Keep loadScript code to add into Adapt API later - window.__loadScript = loadScript; - - // 2. Setup require for old-style module declarations (some code still uses these), configure paths then load JQuery - function setupRequireJS() { - requirejs.config({ - map: { - '*': { - coreJS: 'core/js', - coreViews: 'core/js/views', - coreModels: 'core/js/models', - coreCollections: 'core/js/collections' - } - }, - paths: { - 'regenerator-runtime': 'libraries/regenerator-runtime.min', - 'core-js': 'libraries/core-js.min', - jquery: 'libraries/jquery.min', - underscore: 'libraries/underscore.min', - 'underscore.results': 'libraries/underscore.results', - backbone: 'libraries/backbone.min', - 'backbone.controller': 'libraries/backbone.controller', - 'backbone.controller.results': 'libraries/backbone.controller.results', - 'backbone.es6': 'libraries/backbone.es6', - handlebars: 'libraries/handlebars.min', - velocity: 'libraries/velocity.min', - imageReady: 'libraries/imageReady', - inview: 'libraries/inview', - scrollTo: 'libraries/scrollTo.min', - bowser: 'libraries/bowser', - enum: 'libraries/enum', - jqueryMobile: 'libraries/jquery.mobile.custom.min', - react: isProduction ? 'libraries/react.production.min' : 'libraries/react.development', - 'react-dom': isProduction ? 'libraries/react-dom.production.min' : 'libraries/react-dom.development', - 'html-react-parser': 'libraries/html-react-parser.min', - semver: 'libraries/semver' - }, - waitSeconds: 0 - }); - loadJQuery(); - } - - // 3. start loading JQuery, wait for it to be loaded - function loadJQuery() { - loadScript('libraries/jquery.min.js', checkJQueryStatus); - } - - // 4. Wait until JQuery gets loaded completely then load foundation libraries - function checkJQueryStatus() { - if (window.jQuery === undefined) { - setTimeout(checkJQueryStatus, 100); - } else { - setupModernizr(); - } - } - - // 5. Backward compatibility for Modernizr - function setupModernizr() { - Modernizr.touch = Modernizr.touchevents; - const touchClass = Modernizr.touch ? 'touch' : 'no-touch'; - $('html').addClass(touchClass); - loadFoundationLibraries(); - } - - // 6. Load foundation libraries and templates then load Adapt itself - function loadFoundationLibraries() { - require([ - 'handlebars', - 'underscore', - 'regenerator-runtime', - 'core-js', - 'underscore.results', - 'backbone', - 'backbone.controller', - 'backbone.controller.results', - 'backbone.es6', - 'velocity', - 'imageReady', - 'inview', - 'jqueryMobile', - 'libraries/jquery.resize', - 'scrollTo', - 'bowser', - 'enum', - 'react', - 'react-dom', - 'html-react-parser', - 'semver' - ], loadGlobals); - } - - // 7. Expose global context libraries - function loadGlobals(Handlebars, _) { - window._ = _; - window.Handlebars = Handlebars; - require([ - 'events/touch' - ], loadTemplates); - } - - // 8. Load templates - function loadTemplates() { - require([ - 'templates' - ], loadAdapt); - } - - // 9. Allow cross-domain AJAX then load Adapt - function loadAdapt() { - $.ajaxPrefilter(function(options) { - options.crossDomain = true; - }); - loadScript('adapt/js/adapt.min.js'); - } - - // 1. Load requirejs then set it up - loadScript('libraries/require.min.js', setupRequireJS); - -})(); +(function() { + + const isProduction = (window.ADAPT_BUILD_TYPE !== 'development'); + + function loadScript(url, callback) { + if (!url || typeof url !== 'string') return; + const script = document.createElement('script'); + script.onload = callback; + script.src = url; + document.getElementsByTagName('head')[0].appendChild(script); + }; + + // 0. Keep loadScript code to add into Adapt API later + window.__loadScript = loadScript; + + // 2. Setup require for old-style module declarations (some code still uses these), configure paths then load JQuery + function setupRequireJS() { + requirejs.config({ + map: { + '*': { + coreJS: 'core/js', + coreViews: 'core/js/views', + coreModels: 'core/js/models', + coreCollections: 'core/js/collections' + } + }, + paths: { + 'regenerator-runtime': 'libraries/regenerator-runtime.min', + 'core-js': 'libraries/core-js.min', + jquery: 'libraries/jquery.min', + underscore: 'libraries/underscore.min', + 'underscore.results': 'libraries/underscore.results', + backbone: 'libraries/backbone.min', + 'backbone.controller': 'libraries/backbone.controller', + 'backbone.controller.results': 'libraries/backbone.controller.results', + 'backbone.es6': 'libraries/backbone.es6', + handlebars: 'libraries/handlebars.min', + velocity: 'libraries/velocity.min', + imageReady: 'libraries/imageReady', + inview: 'libraries/inview', + scrollTo: 'libraries/scrollTo.min', + bowser: 'libraries/bowser', + enum: 'libraries/enum', + jqueryMobile: 'libraries/jquery.mobile.custom.min', + react: isProduction ? 'libraries/react.production.min' : 'libraries/react.development', + 'react-dom': isProduction ? 'libraries/react-dom.production.min' : 'libraries/react-dom.development', + 'html-react-parser': 'libraries/html-react-parser.min', + semver: 'libraries/semver' + }, + waitSeconds: 0 + }); + loadJQuery(); + } + + // 3. start loading JQuery, wait for it to be loaded + function loadJQuery() { + loadScript('libraries/jquery.min.js', checkJQueryStatus); + } + + // 4. Wait until JQuery gets loaded completely then load foundation libraries + function checkJQueryStatus() { + if (window.jQuery === undefined) { + setTimeout(checkJQueryStatus, 100); + } else { + setupModernizr(); + } + } + + // 5. Backward compatibility for Modernizr + function setupModernizr() { + Modernizr.touch = Modernizr.touchevents; + const touchClass = Modernizr.touch ? 'touch' : 'no-touch'; + $('html').addClass(touchClass); + loadFoundationLibraries(); + } + + // 6. Load foundation libraries and templates then load Adapt itself + function loadFoundationLibraries() { + require([ + 'handlebars', + 'underscore', + 'regenerator-runtime', + 'core-js', + 'underscore.results', + 'backbone', + 'backbone.controller', + 'backbone.controller.results', + 'backbone.es6', + 'velocity', + 'imageReady', + 'inview', + 'jqueryMobile', + 'libraries/jquery.resize', + 'scrollTo', + 'bowser', + 'enum', + 'react', + 'react-dom', + 'html-react-parser', + 'semver' + ], loadGlobals); + } + + // 7. Expose global context libraries + function loadGlobals(Handlebars, _) { + window._ = _; + window.Handlebars = Handlebars; + require([ + 'events/touch' + ], loadTemplates); + } + + // 8. Load templates + function loadTemplates() { + require([ + 'templates' + ], loadAdapt); + } + + // 9. Allow cross-domain AJAX then load Adapt + function loadAdapt() { + $.ajaxPrefilter(function(options) { + options.crossDomain = true; + }); + loadScript('adapt/js/adapt.min.js'); + } + + // 1. Load requirejs then set it up + loadScript('libraries/require.min.js', setupRequireJS); + +})(); diff --git a/course/config.json b/course/config.json index 39f5650..b0d77b1 100644 --- a/course/config.json +++ b/course/config.json @@ -8,8 +8,8 @@ "_generateSourcemap": false, "_forceRouteLocking": true, "_disableAnimationFor": [], - "_id": "6527c3a5e72d6c32787e2b39", - "_courseId": "6527c3a4e72d6c32787e2b1a", + "_id": "65df045804b1a24755cb820d", + "_courseId": "65df045804b1a24755cb820a", "_drawer": { "_showEasing": "easeOutQuart", "_hideEasing": "easeInQuart", diff --git a/course/en/articles.json b/course/en/articles.json index 9a4a36e..810485c 100644 --- a/course/en/articles.json +++ b/course/en/articles.json @@ -10,9 +10,9 @@ "_isHidden": false, "_isVisible": true, "_requireCompletionOf": -1, - "_ariaLevel": 0, - "_id": "6527c3a5e72d6c32787e2b88", - "_parentId": "6527c3a5e72d6c32787e2b48", + "_isA11yCompletionDescriptionEnabled": true, + "_id": "65df045904b1a24755cb8214", + "_parentId": "65df045804b1a24755cb820e", "_type": "article", "_onScreen": { "_isEnabled": false, @@ -112,9 +112,9 @@ "_isHidden": false, "_isVisible": true, "_requireCompletionOf": -1, - "_ariaLevel": 0, - "_id": "6527c3a5e72d6c32787e2b98", - "_parentId": "6527c3a5e72d6c32787e2b5d", + "_isA11yCompletionDescriptionEnabled": true, + "_id": "65df045904b1a24755cb8215", + "_parentId": "65df045904b1a24755cb8210", "_type": "article", "_assessment": { "_isEnabled": false, @@ -157,9 +157,9 @@ "_isHidden": false, "_isVisible": true, "_requireCompletionOf": -1, - "_ariaLevel": 0, - "_id": "6527c3a5e72d6c32787e2ba8", - "_parentId": "6527c3a5e72d6c32787e2b72", + "_isA11yCompletionDescriptionEnabled": true, + "_id": "65df045904b1a24755cb8216", + "_parentId": "65df045904b1a24755cb8212", "_type": "article", "_assessment": { "_isEnabled": false, @@ -202,9 +202,9 @@ "_isHidden": false, "_isVisible": true, "_requireCompletionOf": -1, - "_ariaLevel": 0, - "_id": "6527c3a5e72d6c32787e2bb8", - "_parentId": "6527c3a5e72d6c32787e2b48", + "_isA11yCompletionDescriptionEnabled": true, + "_id": "65df045904b1a24755cb8217", + "_parentId": "65df045804b1a24755cb820e", "_type": "article", "_onScreen": { "_isEnabled": false, @@ -306,9 +306,9 @@ "_isHidden": false, "_isVisible": true, "_requireCompletionOf": -1, - "_ariaLevel": 0, - "_id": "6527c3a5e72d6c32787e2bc8", - "_parentId": "6527c3a5e72d6c32787e2b5d", + "_isA11yCompletionDescriptionEnabled": true, + "_id": "65df045904b1a24755cb8218", + "_parentId": "65df045904b1a24755cb8210", "_type": "article", "_onScreen": { "_isEnabled": false, @@ -410,9 +410,9 @@ "_isHidden": false, "_isVisible": true, "_requireCompletionOf": -1, - "_ariaLevel": 0, - "_id": "6527c3a5e72d6c32787e2bd8", - "_parentId": "6527c3a5e72d6c32787e2b72", + "_isA11yCompletionDescriptionEnabled": true, + "_id": "65df045904b1a24755cb8219", + "_parentId": "65df045904b1a24755cb8212", "_type": "article", "_onScreen": { "_isEnabled": false, @@ -514,9 +514,9 @@ "_isHidden": false, "_isVisible": true, "_requireCompletionOf": -1, - "_ariaLevel": 0, - "_id": "6527c3a5e72d6c32787e2be8", - "_parentId": "6527c3a5e72d6c32787e2b5d", + "_isA11yCompletionDescriptionEnabled": true, + "_id": "65df045904b1a24755cb821a", + "_parentId": "65df045904b1a24755cb8210", "_type": "article", "_assessment": { "_isEnabled": false, @@ -589,9 +589,9 @@ "_isHidden": false, "_isVisible": true, "_requireCompletionOf": -1, - "_ariaLevel": 0, - "_id": "6527c3a5e72d6c32787e2bf8", - "_parentId": "6527c3a5e72d6c32787e2b72", + "_isA11yCompletionDescriptionEnabled": true, + "_id": "65df045904b1a24755cb821b", + "_parentId": "65df045904b1a24755cb8212", "_type": "article", "_assessment": { "_isEnabled": false, diff --git a/course/en/assets.json b/course/en/assets.json index 9b31732..0cc5766 100644 --- a/course/en/assets.json +++ b/course/en/assets.json @@ -4,6 +4,16 @@ "description": "ETCE - 02", "tags": [] }, + "5838c8b6cfcbc83b67164a0eb5cdb9ea1c78cb73.png": { + "title": "etce-logo entwurf-04.png", + "description": "etce header\r\n", + "tags": [] + }, + "68abb404a101d39b227f031e257a9853db3fcac1.png": { + "title": "2023_FAVICON ETCE.png", + "description": "favicon etce", + "tags": [] + }, "a841a0dd31507a41d94703440e7023c8b6e9a4dd.png": { "title": "ETCE - Lecture title frames-01.png", "description": "ETCE 1", @@ -18,15 +28,5 @@ "title": "blocker.png", "description": "blocker", "tags": [] - }, - "5838c8b6cfcbc83b67164a0eb5cdb9ea1c78cb73.png": { - "title": "etce-logo entwurf-04.png", - "description": "etce header\r\n", - "tags": [] - }, - "68abb404a101d39b227f031e257a9853db3fcac1.png": { - "title": "2023_FAVICON ETCE.png", - "description": "favicon etce", - "tags": [] } } \ No newline at end of file diff --git a/course/en/blocks.json b/course/en/blocks.json index 88757ec..22b33a1 100644 --- a/course/en/blocks.json +++ b/course/en/blocks.json @@ -11,9 +11,9 @@ "_isHidden": false, "_isVisible": true, "_requireCompletionOf": -1, - "_ariaLevel": 0, - "_id": "6527c3a5e72d6c32787e2c08", - "_parentId": "6527c3a5e72d6c32787e2bb8", + "_isA11yCompletionDescriptionEnabled": true, + "_id": "65df045904b1a24755cb821c", + "_parentId": "65df045904b1a24755cb8217", "_type": "block", "_onScreen": { "_isEnabled": false, @@ -98,9 +98,9 @@ "_isHidden": false, "_isVisible": true, "_requireCompletionOf": -1, - "_ariaLevel": 0, - "_id": "6527c3a5e72d6c32787e2c18", - "_parentId": "6527c3a5e72d6c32787e2bc8", + "_isA11yCompletionDescriptionEnabled": true, + "_id": "65df045904b1a24755cb821d", + "_parentId": "65df045904b1a24755cb8218", "_type": "block", "_onScreen": { "_isEnabled": false, @@ -185,9 +185,9 @@ "_isHidden": false, "_isVisible": true, "_requireCompletionOf": -1, - "_ariaLevel": 0, - "_id": "6527c3a5e72d6c32787e2c28", - "_parentId": "6527c3a5e72d6c32787e2bd8", + "_isA11yCompletionDescriptionEnabled": true, + "_id": "65df045904b1a24755cb821e", + "_parentId": "65df045904b1a24755cb8219", "_type": "block", "_onScreen": { "_isEnabled": false, @@ -272,9 +272,9 @@ "_isHidden": false, "_isVisible": true, "_requireCompletionOf": -1, - "_ariaLevel": 0, - "_id": "6527c3a5e72d6c32787e2c38", - "_parentId": "6527c3a5e72d6c32787e2b88", + "_isA11yCompletionDescriptionEnabled": true, + "_id": "65df045904b1a24755cb821f", + "_parentId": "65df045904b1a24755cb8214", "_type": "block", "_onScreen": { "_isEnabled": false, @@ -359,9 +359,9 @@ "_isHidden": false, "_isVisible": true, "_requireCompletionOf": -1, - "_ariaLevel": 0, - "_id": "6527c3a5e72d6c32787e2c48", - "_parentId": "6527c3a5e72d6c32787e2b98", + "_isA11yCompletionDescriptionEnabled": true, + "_id": "65df045904b1a24755cb8220", + "_parentId": "65df045904b1a24755cb8215", "_type": "block", "_onScreen": { "_isEnabled": false, @@ -446,9 +446,9 @@ "_isHidden": false, "_isVisible": true, "_requireCompletionOf": -1, - "_ariaLevel": 0, - "_id": "6527c3a5e72d6c32787e2c58", - "_parentId": "6527c3a5e72d6c32787e2ba8", + "_isA11yCompletionDescriptionEnabled": true, + "_id": "65df045904b1a24755cb8221", + "_parentId": "65df045904b1a24755cb8216", "_type": "block", "_onScreen": { "_isEnabled": false, @@ -533,9 +533,9 @@ "_isHidden": false, "_isVisible": true, "_requireCompletionOf": -1, - "_ariaLevel": 0, - "_id": "6527c3a5e72d6c32787e2c68", - "_parentId": "6527c3a5e72d6c32787e2be8", + "_isA11yCompletionDescriptionEnabled": true, + "_id": "65df045904b1a24755cb8222", + "_parentId": "65df045904b1a24755cb821a", "_type": "block", "_assessment": { "_quizBankID": 1 @@ -583,9 +583,9 @@ "_isHidden": false, "_isVisible": true, "_requireCompletionOf": -1, - "_ariaLevel": 0, - "_id": "6527c3a5e72d6c32787e2c78", - "_parentId": "6527c3a5e72d6c32787e2bf8", + "_isA11yCompletionDescriptionEnabled": true, + "_id": "65df045904b1a24755cb8223", + "_parentId": "65df045904b1a24755cb821b", "_type": "block", "_assessment": { "_quizBankID": 1 @@ -633,9 +633,9 @@ "_isHidden": false, "_isVisible": true, "_requireCompletionOf": -1, - "_ariaLevel": 0, - "_id": "6527c3a5e72d6c32787e2c88", - "_parentId": "6527c3a5e72d6c32787e2bb8", + "_isA11yCompletionDescriptionEnabled": true, + "_id": "65df045904b1a24755cb8224", + "_parentId": "65df045904b1a24755cb8217", "_type": "block", "_onScreen": { "_isEnabled": false, @@ -720,9 +720,9 @@ "_isHidden": false, "_isVisible": true, "_requireCompletionOf": -1, - "_ariaLevel": 0, - "_id": "6527c3a5e72d6c32787e2c98", - "_parentId": "6527c3a5e72d6c32787e2bc8", + "_isA11yCompletionDescriptionEnabled": true, + "_id": "65df045904b1a24755cb8225", + "_parentId": "65df045904b1a24755cb8218", "_type": "block", "_onScreen": { "_isEnabled": false, @@ -807,9 +807,9 @@ "_isHidden": false, "_isVisible": true, "_requireCompletionOf": -1, - "_ariaLevel": 0, - "_id": "6527c3a5e72d6c32787e2ca8", - "_parentId": "6527c3a5e72d6c32787e2bd8", + "_isA11yCompletionDescriptionEnabled": true, + "_id": "65df045904b1a24755cb8226", + "_parentId": "65df045904b1a24755cb8219", "_type": "block", "_onScreen": { "_isEnabled": false, @@ -894,9 +894,9 @@ "_isHidden": false, "_isVisible": true, "_requireCompletionOf": -1, - "_ariaLevel": 0, - "_id": "6527c3a5e72d6c32787e2cb8", - "_parentId": "6527c3a5e72d6c32787e2bb8", + "_isA11yCompletionDescriptionEnabled": true, + "_id": "65df045904b1a24755cb8227", + "_parentId": "65df045904b1a24755cb8217", "_type": "block", "_assessment": { "_quizBankID": 1 @@ -914,9 +914,9 @@ "_isHidden": false, "_isVisible": true, "_requireCompletionOf": -1, - "_ariaLevel": 0, - "_id": "6527c3a5e72d6c32787e2cc8", - "_parentId": "6527c3a5e72d6c32787e2bc8", + "_isA11yCompletionDescriptionEnabled": true, + "_id": "65df045904b1a24755cb8228", + "_parentId": "65df045904b1a24755cb8218", "_type": "block", "_assessment": { "_quizBankID": 1 @@ -934,9 +934,9 @@ "_isHidden": false, "_isVisible": true, "_requireCompletionOf": -1, - "_ariaLevel": 0, - "_id": "6527c3a5e72d6c32787e2cd8", - "_parentId": "6527c3a5e72d6c32787e2bd8", + "_isA11yCompletionDescriptionEnabled": true, + "_id": "65df045904b1a24755cb8229", + "_parentId": "65df045904b1a24755cb8219", "_type": "block", "_assessment": { "_quizBankID": 1 @@ -954,9 +954,9 @@ "_isHidden": false, "_isVisible": true, "_requireCompletionOf": -1, - "_ariaLevel": 0, - "_id": "6527c3a5e72d6c32787e2ce8", - "_parentId": "6527c3a5e72d6c32787e2bb8", + "_isA11yCompletionDescriptionEnabled": true, + "_id": "65df045904b1a24755cb822a", + "_parentId": "65df045904b1a24755cb8217", "_type": "block", "_onScreen": { "_isEnabled": false, @@ -1041,9 +1041,9 @@ "_isHidden": false, "_isVisible": true, "_requireCompletionOf": -1, - "_ariaLevel": 0, - "_id": "6527c3a5e72d6c32787e2cf8", - "_parentId": "6527c3a5e72d6c32787e2bc8", + "_isA11yCompletionDescriptionEnabled": true, + "_id": "65df045904b1a24755cb822b", + "_parentId": "65df045904b1a24755cb8218", "_type": "block", "_onScreen": { "_isEnabled": false, @@ -1128,9 +1128,9 @@ "_isHidden": false, "_isVisible": true, "_requireCompletionOf": -1, - "_ariaLevel": 0, - "_id": "6527c3a5e72d6c32787e2d08", - "_parentId": "6527c3a5e72d6c32787e2bd8", + "_isA11yCompletionDescriptionEnabled": true, + "_id": "65df045904b1a24755cb822c", + "_parentId": "65df045904b1a24755cb8219", "_type": "block", "_onScreen": { "_isEnabled": false, @@ -1215,9 +1215,9 @@ "_isHidden": false, "_isVisible": true, "_requireCompletionOf": -1, - "_ariaLevel": 0, - "_id": "6527c3a5e72d6c32787e2d18", - "_parentId": "6527c3a5e72d6c32787e2bb8", + "_isA11yCompletionDescriptionEnabled": true, + "_id": "65df045904b1a24755cb822d", + "_parentId": "65df045904b1a24755cb8217", "_type": "block", "_assessment": { "_quizBankID": 1 @@ -1235,9 +1235,9 @@ "_isHidden": false, "_isVisible": true, "_requireCompletionOf": -1, - "_ariaLevel": 0, - "_id": "6527c3a5e72d6c32787e2d28", - "_parentId": "6527c3a5e72d6c32787e2bc8", + "_isA11yCompletionDescriptionEnabled": true, + "_id": "65df045904b1a24755cb822e", + "_parentId": "65df045904b1a24755cb8218", "_type": "block", "_assessment": { "_quizBankID": 1 @@ -1255,9 +1255,9 @@ "_isHidden": false, "_isVisible": true, "_requireCompletionOf": -1, - "_ariaLevel": 0, - "_id": "6527c3a5e72d6c32787e2d38", - "_parentId": "6527c3a5e72d6c32787e2bd8", + "_isA11yCompletionDescriptionEnabled": true, + "_id": "65df045904b1a24755cb822f", + "_parentId": "65df045904b1a24755cb8219", "_type": "block", "_assessment": { "_quizBankID": 1 @@ -1275,9 +1275,9 @@ "_isHidden": false, "_isVisible": true, "_requireCompletionOf": -1, - "_ariaLevel": 0, - "_id": "6527c3a5e72d6c32787e2d48", - "_parentId": "6527c3a5e72d6c32787e2bb8", + "_isA11yCompletionDescriptionEnabled": true, + "_id": "65df045904b1a24755cb8230", + "_parentId": "65df045904b1a24755cb8217", "_type": "block", "_onScreen": { "_isEnabled": false, @@ -1362,9 +1362,9 @@ "_isHidden": false, "_isVisible": true, "_requireCompletionOf": -1, - "_ariaLevel": 0, - "_id": "6527c3a5e72d6c32787e2d58", - "_parentId": "6527c3a5e72d6c32787e2bc8", + "_isA11yCompletionDescriptionEnabled": true, + "_id": "65df045a04b1a24755cb8231", + "_parentId": "65df045904b1a24755cb8218", "_type": "block", "_onScreen": { "_isEnabled": false, @@ -1449,9 +1449,9 @@ "_isHidden": false, "_isVisible": true, "_requireCompletionOf": -1, - "_ariaLevel": 0, - "_id": "6527c3a5e72d6c32787e2d68", - "_parentId": "6527c3a5e72d6c32787e2bd8", + "_isA11yCompletionDescriptionEnabled": true, + "_id": "65df045a04b1a24755cb8232", + "_parentId": "65df045904b1a24755cb8219", "_type": "block", "_onScreen": { "_isEnabled": false, @@ -1536,9 +1536,9 @@ "_isHidden": false, "_isVisible": true, "_requireCompletionOf": -1, - "_ariaLevel": 0, - "_id": "6527c3a5e72d6c32787e2d78", - "_parentId": "6527c3a5e72d6c32787e2bb8", + "_isA11yCompletionDescriptionEnabled": true, + "_id": "65df045a04b1a24755cb8233", + "_parentId": "65df045904b1a24755cb8217", "_type": "block", "_onScreen": { "_isEnabled": false, @@ -1623,9 +1623,9 @@ "_isHidden": false, "_isVisible": true, "_requireCompletionOf": -1, - "_ariaLevel": 0, - "_id": "6527c3a5e72d6c32787e2d88", - "_parentId": "6527c3a5e72d6c32787e2bc8", + "_isA11yCompletionDescriptionEnabled": true, + "_id": "65df045a04b1a24755cb8234", + "_parentId": "65df045904b1a24755cb8218", "_type": "block", "_assessment": { "_quizBankID": 1 @@ -1643,9 +1643,9 @@ "_isHidden": false, "_isVisible": true, "_requireCompletionOf": -1, - "_ariaLevel": 0, - "_id": "6527c3a5e72d6c32787e2d98", - "_parentId": "6527c3a5e72d6c32787e2bd8", + "_isA11yCompletionDescriptionEnabled": true, + "_id": "65df045a04b1a24755cb8235", + "_parentId": "65df045904b1a24755cb8219", "_type": "block", "_assessment": { "_quizBankID": 1 @@ -1663,9 +1663,9 @@ "_isHidden": false, "_isVisible": true, "_requireCompletionOf": -1, - "_ariaLevel": 0, - "_id": "6527c3a5e72d6c32787e2da8", - "_parentId": "6527c3a5e72d6c32787e2bb8", + "_isA11yCompletionDescriptionEnabled": true, + "_id": "65df045a04b1a24755cb8236", + "_parentId": "65df045904b1a24755cb8217", "_type": "block", "_onScreen": { "_isEnabled": false, @@ -1750,9 +1750,9 @@ "_isHidden": false, "_isVisible": true, "_requireCompletionOf": -1, - "_ariaLevel": 0, - "_id": "6527c3a5e72d6c32787e2db8", - "_parentId": "6527c3a5e72d6c32787e2bc8", + "_isA11yCompletionDescriptionEnabled": true, + "_id": "65df045a04b1a24755cb8237", + "_parentId": "65df045904b1a24755cb8218", "_type": "block", "_onScreen": { "_isEnabled": false, @@ -1837,9 +1837,9 @@ "_isHidden": false, "_isVisible": true, "_requireCompletionOf": -1, - "_ariaLevel": 0, - "_id": "6527c3a5e72d6c32787e2dc8", - "_parentId": "6527c3a5e72d6c32787e2bd8", + "_isA11yCompletionDescriptionEnabled": true, + "_id": "65df045a04b1a24755cb8238", + "_parentId": "65df045904b1a24755cb8219", "_type": "block", "_onScreen": { "_isEnabled": false, @@ -1924,9 +1924,9 @@ "_isHidden": false, "_isVisible": true, "_requireCompletionOf": -1, - "_ariaLevel": 0, - "_id": "6527c3a5e72d6c32787e2dd8", - "_parentId": "6527c3a5e72d6c32787e2bb8", + "_isA11yCompletionDescriptionEnabled": true, + "_id": "65df045a04b1a24755cb8239", + "_parentId": "65df045904b1a24755cb8217", "_type": "block", "_onScreen": { "_isEnabled": false, @@ -2011,9 +2011,9 @@ "_isHidden": false, "_isVisible": true, "_requireCompletionOf": -1, - "_ariaLevel": 0, - "_id": "6527c3a5e72d6c32787e2de8", - "_parentId": "6527c3a5e72d6c32787e2bc8", + "_isA11yCompletionDescriptionEnabled": true, + "_id": "65df045a04b1a24755cb823a", + "_parentId": "65df045904b1a24755cb8218", "_type": "block", "_assessment": { "_quizBankID": 1 @@ -2031,9 +2031,9 @@ "_isHidden": false, "_isVisible": true, "_requireCompletionOf": -1, - "_ariaLevel": 0, - "_id": "6527c3a5e72d6c32787e2df8", - "_parentId": "6527c3a5e72d6c32787e2bd8", + "_isA11yCompletionDescriptionEnabled": true, + "_id": "65df045a04b1a24755cb823b", + "_parentId": "65df045904b1a24755cb8219", "_type": "block", "_assessment": { "_quizBankID": 1 @@ -2051,9 +2051,9 @@ "_isHidden": false, "_isVisible": true, "_requireCompletionOf": -1, - "_ariaLevel": 0, - "_id": "6527c3a5e72d6c32787e2e08", - "_parentId": "6527c3a5e72d6c32787e2bb8", + "_isA11yCompletionDescriptionEnabled": true, + "_id": "65df045a04b1a24755cb823c", + "_parentId": "65df045904b1a24755cb8217", "_type": "block", "_onScreen": { "_isEnabled": false, @@ -2138,9 +2138,9 @@ "_isHidden": false, "_isVisible": true, "_requireCompletionOf": -1, - "_ariaLevel": 0, - "_id": "6527c3a5e72d6c32787e2e18", - "_parentId": "6527c3a5e72d6c32787e2bc8", + "_isA11yCompletionDescriptionEnabled": true, + "_id": "65df045a04b1a24755cb823d", + "_parentId": "65df045904b1a24755cb8218", "_type": "block", "_onScreen": { "_isEnabled": false, @@ -2225,9 +2225,9 @@ "_isHidden": false, "_isVisible": true, "_requireCompletionOf": -1, - "_ariaLevel": 0, - "_id": "6527c3a5e72d6c32787e2e28", - "_parentId": "6527c3a5e72d6c32787e2bd8", + "_isA11yCompletionDescriptionEnabled": true, + "_id": "65df045a04b1a24755cb823e", + "_parentId": "65df045904b1a24755cb8219", "_type": "block", "_onScreen": { "_isEnabled": false, @@ -2312,9 +2312,9 @@ "_isHidden": false, "_isVisible": true, "_requireCompletionOf": -1, - "_ariaLevel": 0, - "_id": "6527c3a5e72d6c32787e2e38", - "_parentId": "6527c3a5e72d6c32787e2bb8", + "_isA11yCompletionDescriptionEnabled": true, + "_id": "65df045a04b1a24755cb823f", + "_parentId": "65df045904b1a24755cb8217", "_type": "block", "_onScreen": { "_isEnabled": false, @@ -2399,9 +2399,9 @@ "_isHidden": false, "_isVisible": true, "_requireCompletionOf": -1, - "_ariaLevel": 0, - "_id": "6527c3a5e72d6c32787e2e48", - "_parentId": "6527c3a5e72d6c32787e2bc8", + "_isA11yCompletionDescriptionEnabled": true, + "_id": "65df045a04b1a24755cb8240", + "_parentId": "65df045904b1a24755cb8218", "_type": "block", "_assessment": { "_quizBankID": 1 @@ -2419,9 +2419,9 @@ "_isHidden": false, "_isVisible": true, "_requireCompletionOf": -1, - "_ariaLevel": 0, - "_id": "6527c3a5e72d6c32787e2e58", - "_parentId": "6527c3a5e72d6c32787e2bd8", + "_isA11yCompletionDescriptionEnabled": true, + "_id": "65df045a04b1a24755cb8241", + "_parentId": "65df045904b1a24755cb8219", "_type": "block", "_assessment": { "_quizBankID": 1 @@ -2439,9 +2439,9 @@ "_isHidden": false, "_isVisible": true, "_requireCompletionOf": -1, - "_ariaLevel": 0, - "_id": "6527c3a5e72d6c32787e2e68", - "_parentId": "6527c3a5e72d6c32787e2bb8", + "_isA11yCompletionDescriptionEnabled": true, + "_id": "65df045a04b1a24755cb8242", + "_parentId": "65df045904b1a24755cb8217", "_type": "block", "_onScreen": { "_isEnabled": false, @@ -2526,9 +2526,9 @@ "_isHidden": false, "_isVisible": true, "_requireCompletionOf": -1, - "_ariaLevel": 0, - "_id": "6527c3a5e72d6c32787e2e78", - "_parentId": "6527c3a5e72d6c32787e2bc8", + "_isA11yCompletionDescriptionEnabled": true, + "_id": "65df045a04b1a24755cb8243", + "_parentId": "65df045904b1a24755cb8218", "_type": "block", "_onScreen": { "_isEnabled": false, @@ -2613,9 +2613,9 @@ "_isHidden": false, "_isVisible": true, "_requireCompletionOf": -1, - "_ariaLevel": 0, - "_id": "6527c3a5e72d6c32787e2e88", - "_parentId": "6527c3a5e72d6c32787e2bd8", + "_isA11yCompletionDescriptionEnabled": true, + "_id": "65df045a04b1a24755cb8244", + "_parentId": "65df045904b1a24755cb8219", "_type": "block", "_onScreen": { "_isEnabled": false, @@ -2700,9 +2700,9 @@ "_isHidden": false, "_isVisible": true, "_requireCompletionOf": -1, - "_ariaLevel": 0, - "_id": "6527c3a5e72d6c32787e2e98", - "_parentId": "6527c3a5e72d6c32787e2bb8", + "_isA11yCompletionDescriptionEnabled": true, + "_id": "65df045a04b1a24755cb8245", + "_parentId": "65df045904b1a24755cb8217", "_type": "block", "_onScreen": { "_isEnabled": false, @@ -2787,9 +2787,9 @@ "_isHidden": false, "_isVisible": true, "_requireCompletionOf": -1, - "_ariaLevel": 0, - "_id": "6527c3a5e72d6c32787e2ea8", - "_parentId": "6527c3a5e72d6c32787e2bd8", + "_isA11yCompletionDescriptionEnabled": true, + "_id": "65df045a04b1a24755cb8246", + "_parentId": "65df045904b1a24755cb8219", "_type": "block", "_assessment": { "_quizBankID": 1 @@ -2807,9 +2807,9 @@ "_isHidden": false, "_isVisible": true, "_requireCompletionOf": -1, - "_ariaLevel": 0, - "_id": "6527c3a5e72d6c32787e2eb8", - "_parentId": "6527c3a5e72d6c32787e2bb8", + "_isA11yCompletionDescriptionEnabled": true, + "_id": "65df045a04b1a24755cb8247", + "_parentId": "65df045904b1a24755cb8217", "_type": "block", "_onScreen": { "_isEnabled": false, @@ -2894,9 +2894,9 @@ "_isHidden": false, "_isVisible": true, "_requireCompletionOf": -1, - "_ariaLevel": 0, - "_id": "6527c3a5e72d6c32787e2ec8", - "_parentId": "6527c3a5e72d6c32787e2bd8", + "_isA11yCompletionDescriptionEnabled": true, + "_id": "65df045a04b1a24755cb8248", + "_parentId": "65df045904b1a24755cb8219", "_type": "block", "_onScreen": { "_isEnabled": false, @@ -2981,9 +2981,9 @@ "_isHidden": false, "_isVisible": true, "_requireCompletionOf": -1, - "_ariaLevel": 0, - "_id": "6527c3a5e72d6c32787e2ed8", - "_parentId": "6527c3a5e72d6c32787e2bb8", + "_isA11yCompletionDescriptionEnabled": true, + "_id": "65df045a04b1a24755cb8249", + "_parentId": "65df045904b1a24755cb8217", "_type": "block", "_onScreen": { "_isEnabled": false, @@ -3068,9 +3068,9 @@ "_isHidden": false, "_isVisible": true, "_requireCompletionOf": -1, - "_ariaLevel": 0, - "_id": "6527c3a5e72d6c32787e2ee8", - "_parentId": "6527c3a5e72d6c32787e2bd8", + "_isA11yCompletionDescriptionEnabled": true, + "_id": "65df045a04b1a24755cb824a", + "_parentId": "65df045904b1a24755cb8219", "_type": "block", "_assessment": { "_quizBankID": 1 @@ -3088,9 +3088,9 @@ "_isHidden": false, "_isVisible": true, "_requireCompletionOf": -1, - "_ariaLevel": 0, - "_id": "6527c3a5e72d6c32787e2ef8", - "_parentId": "6527c3a5e72d6c32787e2bb8", + "_isA11yCompletionDescriptionEnabled": true, + "_id": "65df045a04b1a24755cb824b", + "_parentId": "65df045904b1a24755cb8217", "_type": "block", "_onScreen": { "_isEnabled": false, @@ -3175,9 +3175,9 @@ "_isHidden": false, "_isVisible": true, "_requireCompletionOf": -1, - "_ariaLevel": 0, - "_id": "6527c3a5e72d6c32787e2f08", - "_parentId": "6527c3a5e72d6c32787e2bd8", + "_isA11yCompletionDescriptionEnabled": true, + "_id": "65df045a04b1a24755cb824c", + "_parentId": "65df045904b1a24755cb8219", "_type": "block", "_onScreen": { "_isEnabled": false, @@ -3262,9 +3262,9 @@ "_isHidden": false, "_isVisible": true, "_requireCompletionOf": -1, - "_ariaLevel": 0, - "_id": "6527c3a5e72d6c32787e2f18", - "_parentId": "6527c3a5e72d6c32787e2bb8", + "_isA11yCompletionDescriptionEnabled": true, + "_id": "65df045a04b1a24755cb824d", + "_parentId": "65df045904b1a24755cb8217", "_type": "block", "_onScreen": { "_isEnabled": false, @@ -3349,9 +3349,9 @@ "_isHidden": false, "_isVisible": true, "_requireCompletionOf": -1, - "_ariaLevel": 0, - "_id": "6527c3a5e72d6c32787e2f28", - "_parentId": "6527c3a5e72d6c32787e2bd8", + "_isA11yCompletionDescriptionEnabled": true, + "_id": "65df045a04b1a24755cb824e", + "_parentId": "65df045904b1a24755cb8219", "_type": "block", "_assessment": { "_quizBankID": 1 @@ -3369,9 +3369,9 @@ "_isHidden": false, "_isVisible": true, "_requireCompletionOf": -1, - "_ariaLevel": 0, - "_id": "6527c3a5e72d6c32787e2f38", - "_parentId": "6527c3a5e72d6c32787e2bb8", + "_isA11yCompletionDescriptionEnabled": true, + "_id": "65df045a04b1a24755cb824f", + "_parentId": "65df045904b1a24755cb8217", "_type": "block", "_onScreen": { "_isEnabled": false, @@ -3456,9 +3456,9 @@ "_isHidden": false, "_isVisible": true, "_requireCompletionOf": -1, - "_ariaLevel": 0, - "_id": "6527c3a5e72d6c32787e2f48", - "_parentId": "6527c3a5e72d6c32787e2bb8", + "_isA11yCompletionDescriptionEnabled": true, + "_id": "65df045a04b1a24755cb8250", + "_parentId": "65df045904b1a24755cb8217", "_type": "block", "_onScreen": { "_isEnabled": false, @@ -3543,9 +3543,9 @@ "_isHidden": false, "_isVisible": true, "_requireCompletionOf": -1, - "_ariaLevel": 0, - "_id": "6527c3a5e72d6c32787e2f58", - "_parentId": "6527c3a5e72d6c32787e2bb8", + "_isA11yCompletionDescriptionEnabled": true, + "_id": "65df045a04b1a24755cb8251", + "_parentId": "65df045904b1a24755cb8217", "_type": "block", "_onScreen": { "_isEnabled": false, @@ -3630,9 +3630,9 @@ "_isHidden": false, "_isVisible": true, "_requireCompletionOf": -1, - "_ariaLevel": 0, - "_id": "6527c3a5e72d6c32787e2f68", - "_parentId": "6527c3a5e72d6c32787e2bb8", + "_isA11yCompletionDescriptionEnabled": true, + "_id": "65df045a04b1a24755cb8252", + "_parentId": "65df045904b1a24755cb8217", "_type": "block", "_onScreen": { "_isEnabled": false, @@ -3717,9 +3717,9 @@ "_isHidden": false, "_isVisible": true, "_requireCompletionOf": -1, - "_ariaLevel": 0, - "_id": "6527c3a5e72d6c32787e2f78", - "_parentId": "6527c3a5e72d6c32787e2bb8", + "_isA11yCompletionDescriptionEnabled": true, + "_id": "65df045a04b1a24755cb8253", + "_parentId": "65df045904b1a24755cb8217", "_type": "block", "_onScreen": { "_isEnabled": false, @@ -3804,9 +3804,9 @@ "_isHidden": false, "_isVisible": true, "_requireCompletionOf": -1, - "_ariaLevel": 0, - "_id": "6527c3a5e72d6c32787e2f88", - "_parentId": "6527c3a5e72d6c32787e2bb8", + "_isA11yCompletionDescriptionEnabled": true, + "_id": "65df045a04b1a24755cb8254", + "_parentId": "65df045904b1a24755cb8217", "_type": "block", "_onScreen": { "_isEnabled": false, @@ -3891,9 +3891,9 @@ "_isHidden": false, "_isVisible": true, "_requireCompletionOf": -1, - "_ariaLevel": 0, - "_id": "6527c3a5e72d6c32787e2f98", - "_parentId": "6527c3a5e72d6c32787e2bb8", + "_isA11yCompletionDescriptionEnabled": true, + "_id": "65df045a04b1a24755cb8255", + "_parentId": "65df045904b1a24755cb8217", "_type": "block", "_onScreen": { "_isEnabled": false, @@ -3978,9 +3978,9 @@ "_isHidden": false, "_isVisible": true, "_requireCompletionOf": -1, - "_ariaLevel": 0, - "_id": "6527c3a5e72d6c32787e2fa8", - "_parentId": "6527c3a5e72d6c32787e2bb8", + "_isA11yCompletionDescriptionEnabled": true, + "_id": "65df045a04b1a24755cb8256", + "_parentId": "65df045904b1a24755cb8217", "_type": "block", "_onScreen": { "_isEnabled": false, @@ -4065,9 +4065,9 @@ "_isHidden": false, "_isVisible": true, "_requireCompletionOf": -1, - "_ariaLevel": 0, - "_id": "6527c3a5e72d6c32787e2fb8", - "_parentId": "6527c3a5e72d6c32787e2bb8", + "_isA11yCompletionDescriptionEnabled": true, + "_id": "65df045b04b1a24755cb8257", + "_parentId": "65df045904b1a24755cb8217", "_type": "block", "_onScreen": { "_isEnabled": false, @@ -4152,9 +4152,9 @@ "_isHidden": false, "_isVisible": true, "_requireCompletionOf": -1, - "_ariaLevel": 0, - "_id": "6527c3a5e72d6c32787e2fc8", - "_parentId": "6527c3a5e72d6c32787e2bb8", + "_isA11yCompletionDescriptionEnabled": true, + "_id": "65df045b04b1a24755cb8258", + "_parentId": "65df045904b1a24755cb8217", "_type": "block", "_onScreen": { "_isEnabled": false, @@ -4239,9 +4239,9 @@ "_isHidden": false, "_isVisible": true, "_requireCompletionOf": -1, - "_ariaLevel": 0, - "_id": "6527c3a5e72d6c32787e2fd8", - "_parentId": "6527c3a5e72d6c32787e2bb8", + "_isA11yCompletionDescriptionEnabled": true, + "_id": "65df045b04b1a24755cb8259", + "_parentId": "65df045904b1a24755cb8217", "_type": "block", "_onScreen": { "_isEnabled": false, @@ -4326,9 +4326,9 @@ "_isHidden": false, "_isVisible": true, "_requireCompletionOf": -1, - "_ariaLevel": 0, - "_id": "6527c3a5e72d6c32787e2fe8", - "_parentId": "6527c3a5e72d6c32787e2bb8", + "_isA11yCompletionDescriptionEnabled": true, + "_id": "65df045b04b1a24755cb825a", + "_parentId": "65df045904b1a24755cb8217", "_type": "block", "_onScreen": { "_isEnabled": false, @@ -4413,9 +4413,9 @@ "_isHidden": false, "_isVisible": true, "_requireCompletionOf": -1, - "_ariaLevel": 0, - "_id": "6527c3a5e72d6c32787e2ff8", - "_parentId": "6527c3a5e72d6c32787e2bb8", + "_isA11yCompletionDescriptionEnabled": true, + "_id": "65df045b04b1a24755cb825b", + "_parentId": "65df045904b1a24755cb8217", "_type": "block", "_assessment": { "_quizBankID": 1 diff --git a/course/en/components.json b/course/en/components.json index b17f110..dc4765f 100644 --- a/course/en/components.json +++ b/course/en/components.json @@ -7,13 +7,12 @@ "_isHidden": false, "_isVisible": true, "_isResetOnRevisit": "false", - "_ariaLevel": 0, - "_disableAccessibilityState": false, + "_isA11yCompletionDescriptionEnabled": true, "title": "Question 01", "displayTitle": "", "body": "

Question 01: Block ciphers are used in symmetric cryptography to encrypt and decrypt data. They operate on blocks of a fixed length (usually 64 or 128 bits). To encrypt some data, you could split it into block sized chunks and simply encrypt them separately. What which of the following properties are true?

", - "_id": "6527c3a5e72d6c32787e3007", - "_parentId": "6527c3a5e72d6c32787e2c08", + "_id": "65df045b04b1a24755cb825c", + "_parentId": "65df045904b1a24755cb821c", "_type": "component", "_layout": "full", "_onScreen": { @@ -38,6 +37,8 @@ "_instruction": "" } }, + "_ariaLevel": 0, + "_disableAccessibilityState": false, "instruction": "Choose {{#if _isRadio}}one option{{else}}one or more options{{/if}} then select Submit.", "ariaQuestion": "", "_items": [ @@ -132,13 +133,12 @@ "_isHidden": false, "_isVisible": true, "_isResetOnRevisit": "false", - "_ariaLevel": 0, - "_disableAccessibilityState": false, + "_isA11yCompletionDescriptionEnabled": true, "title": "Question 04", "displayTitle": "", "body": "

Question 04: Block ciphers can be used in different modes, such as \"Counter\" mode. Which of the following are properties of this mode?

", - "_id": "6527c3a6e72d6c32787e3016", - "_parentId": "6527c3a5e72d6c32787e2ce8", + "_id": "65df045b04b1a24755cb825d", + "_parentId": "65df045904b1a24755cb822a", "_type": "component", "_layout": "full", "_onScreen": { @@ -163,6 +163,8 @@ "_instruction": "" } }, + "_ariaLevel": 0, + "_disableAccessibilityState": false, "instruction": "Choose {{#if _isRadio}}one option{{else}}one or more options{{/if}} then select Submit.", "ariaQuestion": "", "_items": [ @@ -264,13 +266,12 @@ "_isHidden": false, "_isVisible": true, "_isResetOnRevisit": "false", - "_ariaLevel": 0, - "_disableAccessibilityState": false, + "_isA11yCompletionDescriptionEnabled": true, "title": "Question 03", "displayTitle": "", "body": "

Question 03: Which of the following block cipher modes provide authenticated encryption?

", - "_id": "6527c3a6e72d6c32787e3025", - "_parentId": "6527c3a5e72d6c32787e2cb8", + "_id": "65df045b04b1a24755cb825e", + "_parentId": "65df045904b1a24755cb8227", "_type": "component", "_layout": "full", "_onScreen": { @@ -295,6 +296,8 @@ "_instruction": "" } }, + "_ariaLevel": 0, + "_disableAccessibilityState": false, "instruction": "Choose {{#if _isRadio}}one option{{else}}one or more options{{/if}} then select Submit.", "ariaQuestion": "", "_items": [ @@ -410,13 +413,12 @@ "_isHidden": false, "_isVisible": true, "_isResetOnRevisit": "false", - "_ariaLevel": 0, - "_disableAccessibilityState": false, + "_isA11yCompletionDescriptionEnabled": true, "title": "Question 02", "displayTitle": "", "body": "

Question 02: Usually block ciphers have an encrypt and a decrypt function. Can a block cipher with only an encrypt function be useful?

", - "_id": "6527c3a6e72d6c32787e3034", - "_parentId": "6527c3a5e72d6c32787e2c88", + "_id": "65df045b04b1a24755cb825f", + "_parentId": "65df045904b1a24755cb8224", "_type": "component", "_layout": "full", "_onScreen": { @@ -441,6 +443,8 @@ "_instruction": "" } }, + "_ariaLevel": 0, + "_disableAccessibilityState": false, "instruction": "Choose {{#if _isRadio}}one option{{else}}one or more options{{/if}} then select Submit.", "ariaQuestion": "", "_items": [ @@ -542,13 +546,12 @@ "_isHidden": false, "_isVisible": true, "_isResetOnRevisit": "false", - "_ariaLevel": 0, - "_disableAccessibilityState": false, + "_isA11yCompletionDescriptionEnabled": true, "title": "Question 05", "displayTitle": "", "body": "

Question 05: Is hashing data with MD5 a good way of proving that it was sent by the authorized sender?

", - "_id": "6527c3a6e72d6c32787e3043", - "_parentId": "6527c3a5e72d6c32787e2d18", + "_id": "65df045b04b1a24755cb8260", + "_parentId": "65df045904b1a24755cb822d", "_type": "component", "_layout": "full", "_onScreen": { @@ -573,6 +576,8 @@ "_instruction": "" } }, + "_ariaLevel": 0, + "_disableAccessibilityState": false, "instruction": "Choose {{#if _isRadio}}one option{{else}}one or more options{{/if}} then select Submit.", "ariaQuestion": "", "_items": [ @@ -653,13 +658,12 @@ "_isHidden": false, "_isVisible": true, "_isResetOnRevisit": "false", - "_ariaLevel": 0, - "_disableAccessibilityState": false, + "_isA11yCompletionDescriptionEnabled": true, "title": "Question 06", "displayTitle": "", "body": "

Question 06: Which of the following properties are true for MACs?

", - "_id": "6527c3a6e72d6c32787e3052", - "_parentId": "6527c3a5e72d6c32787e2d48", + "_id": "65df045b04b1a24755cb8261", + "_parentId": "65df045904b1a24755cb8230", "_type": "component", "_layout": "full", "_onScreen": { @@ -684,6 +688,8 @@ "_instruction": "" } }, + "_ariaLevel": 0, + "_disableAccessibilityState": false, "instruction": "Choose {{#if _isRadio}}one option{{else}}one or more options{{/if}} then select Submit.", "ariaQuestion": "", "_items": [ @@ -785,13 +791,12 @@ "_isHidden": false, "_isVisible": true, "_isResetOnRevisit": "false", - "_ariaLevel": 0, - "_disableAccessibilityState": false, + "_isA11yCompletionDescriptionEnabled": true, "title": "Question 07", "displayTitle": "", "body": "

Question 07: Which of the following techniques fall under the category of symmetric cryptography?

", - "_id": "6527c3a6e72d6c32787e3061", - "_parentId": "6527c3a5e72d6c32787e2d78", + "_id": "65df045b04b1a24755cb8262", + "_parentId": "65df045a04b1a24755cb8233", "_type": "component", "_layout": "full", "_onScreen": { @@ -816,6 +821,8 @@ "_instruction": "" } }, + "_ariaLevel": 0, + "_disableAccessibilityState": false, "instruction": "Choose {{#if _isRadio}}one option{{else}}one or more options{{/if}} then select Submit.", "ariaQuestion": "", "_items": [ @@ -931,13 +938,12 @@ "_isHidden": false, "_isVisible": true, "_isResetOnRevisit": "false", - "_ariaLevel": 0, - "_disableAccessibilityState": false, + "_isA11yCompletionDescriptionEnabled": true, "title": "Question 08", "displayTitle": "", "body": "

Question 08: Encoded data is usually:

", - "_id": "6527c3a6e72d6c32787e3070", - "_parentId": "6527c3a5e72d6c32787e2da8", + "_id": "65df045b04b1a24755cb8263", + "_parentId": "65df045a04b1a24755cb8236", "_type": "component", "_layout": "full", "_onScreen": { @@ -962,6 +968,8 @@ "_instruction": "" } }, + "_ariaLevel": 0, + "_disableAccessibilityState": false, "instruction": "Choose {{#if _isRadio}}one option{{else}}one or more options{{/if}} then select Submit.", "ariaQuestion": "", "_items": [ @@ -1070,13 +1078,12 @@ "_isHidden": false, "_isVisible": true, "_isResetOnRevisit": "false", - "_ariaLevel": 0, - "_disableAccessibilityState": false, + "_isA11yCompletionDescriptionEnabled": true, "title": "Question 09", "displayTitle": "", "body": "

Question 09: Cryptographically hashed data is usually:

", - "_id": "6527c3a6e72d6c32787e307f", - "_parentId": "6527c3a5e72d6c32787e2dd8", + "_id": "65df045b04b1a24755cb8264", + "_parentId": "65df045a04b1a24755cb8239", "_type": "component", "_layout": "full", "_onScreen": { @@ -1101,6 +1108,8 @@ "_instruction": "" } }, + "_ariaLevel": 0, + "_disableAccessibilityState": false, "instruction": "Choose {{#if _isRadio}}one option{{else}}one or more options{{/if}} then select Submit.", "ariaQuestion": "", "_items": [ @@ -1209,13 +1218,12 @@ "_isHidden": false, "_isVisible": true, "_isResetOnRevisit": "false", - "_ariaLevel": 0, - "_disableAccessibilityState": false, + "_isA11yCompletionDescriptionEnabled": true, "title": "Question 10", "displayTitle": "", "body": "

Question 10: Encrypted data is usually:

", - "_id": "6527c3a6e72d6c32787e308e", - "_parentId": "6527c3a5e72d6c32787e2e08", + "_id": "65df045b04b1a24755cb8265", + "_parentId": "65df045a04b1a24755cb823c", "_type": "component", "_layout": "full", "_onScreen": { @@ -1240,6 +1248,8 @@ "_instruction": "" } }, + "_ariaLevel": 0, + "_disableAccessibilityState": false, "instruction": "Choose {{#if _isRadio}}one option{{else}}one or more options{{/if}} then select Submit.", "ariaQuestion": "", "_items": [ @@ -1348,13 +1358,12 @@ "_isHidden": false, "_isVisible": true, "_isResetOnRevisit": "false", - "_ariaLevel": 0, - "_disableAccessibilityState": false, + "_isA11yCompletionDescriptionEnabled": true, "title": "Question 11", "displayTitle": "", "body": "

Question 11: In asymmetric cryptography, you have a public and a private key. Which of the following statements are true?

", - "_id": "6527c3a6e72d6c32787e309d", - "_parentId": "6527c3a5e72d6c32787e2e38", + "_id": "65df045b04b1a24755cb8266", + "_parentId": "65df045a04b1a24755cb823f", "_type": "component", "_layout": "full", "_onScreen": { @@ -1379,6 +1388,8 @@ "_instruction": "" } }, + "_ariaLevel": 0, + "_disableAccessibilityState": false, "instruction": "Choose {{#if _isRadio}}one option{{else}}one or more options{{/if}} then select Submit.", "ariaQuestion": "", "_items": [ @@ -1466,13 +1477,12 @@ "_isHidden": false, "_isVisible": true, "_isResetOnRevisit": "false", - "_ariaLevel": 0, - "_disableAccessibilityState": false, + "_isA11yCompletionDescriptionEnabled": true, "title": "Question 12", "displayTitle": "", "body": "

Question 12: When both encrypting and compressing data, the preferable order and reason is:

", - "_id": "6527c3a6e72d6c32787e30ac", - "_parentId": "6527c3a5e72d6c32787e2e68", + "_id": "65df045b04b1a24755cb8267", + "_parentId": "65df045a04b1a24755cb8242", "_type": "component", "_layout": "full", "_onScreen": { @@ -1497,6 +1507,8 @@ "_instruction": "" } }, + "_ariaLevel": 0, + "_disableAccessibilityState": false, "instruction": "Choose {{#if _isRadio}}one option{{else}}one or more options{{/if}} then select Submit.", "ariaQuestion": "", "_items": [ @@ -1584,13 +1596,12 @@ "_isHidden": false, "_isVisible": true, "_isResetOnRevisit": "false", - "_ariaLevel": 0, - "_disableAccessibilityState": false, + "_isA11yCompletionDescriptionEnabled": true, "title": "Question 13", "displayTitle": "", "body": "

Question 13: In a man-in-the-middle attack:

", - "_id": "6527c3a6e72d6c32787e30bb", - "_parentId": "6527c3a5e72d6c32787e2e98", + "_id": "65df045b04b1a24755cb8268", + "_parentId": "65df045a04b1a24755cb8245", "_type": "component", "_layout": "full", "_onScreen": { @@ -1615,6 +1626,8 @@ "_instruction": "" } }, + "_ariaLevel": 0, + "_disableAccessibilityState": false, "instruction": "Choose {{#if _isRadio}}one option{{else}}one or more options{{/if}} then select Submit.", "ariaQuestion": "", "_items": [ @@ -1702,13 +1715,12 @@ "_isHidden": false, "_isVisible": true, "_isResetOnRevisit": "false", - "_ariaLevel": 0, - "_disableAccessibilityState": false, + "_isA11yCompletionDescriptionEnabled": true, "title": "Question 14", "displayTitle": "", "body": "

Question 14: Salts are used when securely hashing passwords. Which of the following is true?

", - "_id": "6527c3a6e72d6c32787e30ca", - "_parentId": "6527c3a5e72d6c32787e2eb8", + "_id": "65df045b04b1a24755cb8269", + "_parentId": "65df045a04b1a24755cb8247", "_type": "component", "_layout": "full", "_onScreen": { @@ -1733,6 +1745,8 @@ "_instruction": "" } }, + "_ariaLevel": 0, + "_disableAccessibilityState": false, "instruction": "Choose {{#if _isRadio}}one option{{else}}one or more options{{/if}} then select Submit.", "ariaQuestion": "", "_items": [ @@ -1827,13 +1841,12 @@ "_isHidden": false, "_isVisible": true, "_isResetOnRevisit": "false", - "_ariaLevel": 0, - "_disableAccessibilityState": false, + "_isA11yCompletionDescriptionEnabled": true, "title": "Question 15", "displayTitle": "", "body": "

Question 15: When verifying a user's password in a server based application, ideally:

", - "_id": "6527c3a6e72d6c32787e30d9", - "_parentId": "6527c3a5e72d6c32787e2ed8", + "_id": "65df045b04b1a24755cb826a", + "_parentId": "65df045a04b1a24755cb8249", "_type": "component", "_layout": "full", "_onScreen": { @@ -1858,6 +1871,8 @@ "_instruction": "" } }, + "_ariaLevel": 0, + "_disableAccessibilityState": false, "instruction": "Choose {{#if _isRadio}}one option{{else}}one or more options{{/if}} then select Submit.", "ariaQuestion": "", "_items": [ @@ -1952,13 +1967,12 @@ "_isHidden": false, "_isVisible": true, "_isResetOnRevisit": "false", - "_ariaLevel": 0, - "_disableAccessibilityState": false, + "_isA11yCompletionDescriptionEnabled": true, "title": "Question 16", "displayTitle": "", "body": "

Question 16: If a method to authenticate a message provides non-repudiation, it means that:

", - "_id": "6527c3a6e72d6c32787e30e8", - "_parentId": "6527c3a5e72d6c32787e2ef8", + "_id": "65df045b04b1a24755cb826b", + "_parentId": "65df045a04b1a24755cb824b", "_type": "component", "_layout": "full", "_onScreen": { @@ -1983,6 +1997,8 @@ "_instruction": "" } }, + "_ariaLevel": 0, + "_disableAccessibilityState": false, "instruction": "Choose {{#if _isRadio}}one option{{else}}one or more options{{/if}} then select Submit.", "ariaQuestion": "", "_items": [ @@ -2056,13 +2072,12 @@ "_isHidden": false, "_isVisible": true, "_isResetOnRevisit": "false", - "_ariaLevel": 0, - "_disableAccessibilityState": false, + "_isA11yCompletionDescriptionEnabled": true, "title": "Question 17", "displayTitle": "", "body": "

Question 17: When a file stored on a hard drive or SSD is deleted:

", - "_id": "6527c3a6e72d6c32787e30f7", - "_parentId": "6527c3a5e72d6c32787e2f18", + "_id": "65df045b04b1a24755cb826c", + "_parentId": "65df045a04b1a24755cb824d", "_type": "component", "_layout": "full", "_onScreen": { @@ -2087,6 +2102,8 @@ "_instruction": "" } }, + "_ariaLevel": 0, + "_disableAccessibilityState": false, "instruction": "Choose {{#if _isRadio}}one option{{else}}one or more options{{/if}} then select Submit.", "ariaQuestion": "", "_items": [ @@ -2188,13 +2205,12 @@ "_isHidden": false, "_isVisible": true, "_isResetOnRevisit": "false", - "_ariaLevel": 0, - "_disableAccessibilityState": false, + "_isA11yCompletionDescriptionEnabled": true, "title": "Question 18", "displayTitle": "", "body": "

Question 18: The Diffie-Hellman algorithm is used to:

", - "_id": "6527c3a6e72d6c32787e3106", - "_parentId": "6527c3a5e72d6c32787e2f38", + "_id": "65df045b04b1a24755cb826d", + "_parentId": "65df045a04b1a24755cb824f", "_type": "component", "_layout": "full", "_onScreen": { @@ -2219,6 +2235,8 @@ "_instruction": "" } }, + "_ariaLevel": 0, + "_disableAccessibilityState": false, "instruction": "Choose {{#if _isRadio}}one option{{else}}one or more options{{/if}} then select Submit.", "ariaQuestion": "", "_items": [ @@ -2299,13 +2317,12 @@ "_isHidden": false, "_isVisible": true, "_isResetOnRevisit": "false", - "_ariaLevel": 0, - "_disableAccessibilityState": false, + "_isA11yCompletionDescriptionEnabled": true, "title": "Question 19", "displayTitle": "", "body": "

Question 19: Compared to asymmetric cryptography, symmetric cryptography has the following properties:

", - "_id": "6527c3a6e72d6c32787e3115", - "_parentId": "6527c3a5e72d6c32787e2f48", + "_id": "65df045b04b1a24755cb826e", + "_parentId": "65df045a04b1a24755cb8250", "_type": "component", "_layout": "full", "_onScreen": { @@ -2330,6 +2347,8 @@ "_instruction": "" } }, + "_ariaLevel": 0, + "_disableAccessibilityState": false, "instruction": "Choose {{#if _isRadio}}one option{{else}}one or more options{{/if}} then select Submit.", "ariaQuestion": "", "_items": [ @@ -2431,13 +2450,12 @@ "_isHidden": false, "_isVisible": true, "_isResetOnRevisit": "false", - "_ariaLevel": 0, - "_disableAccessibilityState": false, + "_isA11yCompletionDescriptionEnabled": true, "title": "Question 20", "displayTitle": "", "body": "

Question 20: Doing cryptography in the browser with JavaScript is common these days but there are some issues:

", - "_id": "6527c3a6e72d6c32787e3124", - "_parentId": "6527c3a5e72d6c32787e2f58", + "_id": "65df045b04b1a24755cb826f", + "_parentId": "65df045a04b1a24755cb8251", "_type": "component", "_layout": "full", "_onScreen": { @@ -2462,6 +2480,8 @@ "_instruction": "" } }, + "_ariaLevel": 0, + "_disableAccessibilityState": false, "instruction": "Choose {{#if _isRadio}}one option{{else}}one or more options{{/if}} then select Submit.", "ariaQuestion": "", "_items": [ @@ -2549,13 +2569,12 @@ "_isHidden": false, "_isVisible": true, "_isResetOnRevisit": "false", - "_ariaLevel": 0, - "_disableAccessibilityState": false, + "_isA11yCompletionDescriptionEnabled": true, "title": "Question 21", "displayTitle": "", "body": "

Question 21: Does encrypting data prevent attackers from modifying the data in targeted ways?

", - "_id": "6527c3a6e72d6c32787e3133", - "_parentId": "6527c3a5e72d6c32787e2f68", + "_id": "65df045b04b1a24755cb8270", + "_parentId": "65df045a04b1a24755cb8252", "_type": "component", "_layout": "full", "_onScreen": { @@ -2580,6 +2599,8 @@ "_instruction": "" } }, + "_ariaLevel": 0, + "_disableAccessibilityState": false, "instruction": "Choose {{#if _isRadio}}one option{{else}}one or more options{{/if}} then select Submit.", "ariaQuestion": "", "_items": [ @@ -2667,13 +2688,12 @@ "_isHidden": false, "_isVisible": true, "_isResetOnRevisit": "false", - "_ariaLevel": 0, - "_disableAccessibilityState": false, + "_isA11yCompletionDescriptionEnabled": true, "title": "Question 22", "displayTitle": "", "body": "

Question 22: According to the pigeonhole principle, hashed data cannot be \"unhashed\" in the general case, but if your data is very short (1-5 characters), you could hash it and \"decode\" the hash by brute force search. Would this be a secure way of encrypting short strings of data?

", - "_id": "6527c3a6e72d6c32787e3142", - "_parentId": "6527c3a5e72d6c32787e2f78", + "_id": "65df045b04b1a24755cb8271", + "_parentId": "65df045a04b1a24755cb8253", "_type": "component", "_layout": "full", "_onScreen": { @@ -2698,6 +2718,8 @@ "_instruction": "" } }, + "_ariaLevel": 0, + "_disableAccessibilityState": false, "instruction": "Choose {{#if _isRadio}}one option{{else}}one or more options{{/if}} then select Submit.", "ariaQuestion": "", "_items": [ @@ -2771,13 +2793,12 @@ "_isHidden": false, "_isVisible": true, "_isResetOnRevisit": "false", - "_ariaLevel": 0, - "_disableAccessibilityState": false, + "_isA11yCompletionDescriptionEnabled": true, "title": "Question 23", "displayTitle": "", "body": "

Question 23: In cryptographic hashing, there is a concept preimage resistance. Which of the following is true?

", - "_id": "6527c3a6e72d6c32787e3151", - "_parentId": "6527c3a5e72d6c32787e2f88", + "_id": "65df045b04b1a24755cb8272", + "_parentId": "65df045a04b1a24755cb8254", "_type": "component", "_layout": "full", "_onScreen": { @@ -2802,6 +2823,8 @@ "_instruction": "" } }, + "_ariaLevel": 0, + "_disableAccessibilityState": false, "instruction": "Choose {{#if _isRadio}}one option{{else}}one or more options{{/if}} then select Submit.", "ariaQuestion": "", "_items": [ @@ -2889,13 +2912,12 @@ "_isHidden": false, "_isVisible": true, "_isResetOnRevisit": "false", - "_ariaLevel": 0, - "_disableAccessibilityState": false, + "_isA11yCompletionDescriptionEnabled": true, "title": "Question 24", "displayTitle": "", "body": "

Question 24: Digital signatures usually offer the following properties:

", - "_id": "6527c3a6e72d6c32787e3160", - "_parentId": "6527c3a5e72d6c32787e2f98", + "_id": "65df045b04b1a24755cb8273", + "_parentId": "65df045a04b1a24755cb8255", "_type": "component", "_layout": "full", "_onScreen": { @@ -2920,6 +2942,8 @@ "_instruction": "" } }, + "_ariaLevel": 0, + "_disableAccessibilityState": false, "instruction": "Choose {{#if _isRadio}}one option{{else}}one or more options{{/if}} then select Submit.", "ariaQuestion": "", "_items": [ @@ -3014,13 +3038,12 @@ "_isHidden": false, "_isVisible": true, "_isResetOnRevisit": "false", - "_ariaLevel": 0, - "_disableAccessibilityState": false, + "_isA11yCompletionDescriptionEnabled": true, "title": "Question 25", "displayTitle": "", "body": "

Question 25: To generate cryptographic key material the following sources can be usually reasonably secure:

", - "_id": "6527c3a6e72d6c32787e316f", - "_parentId": "6527c3a5e72d6c32787e2fa8", + "_id": "65df045b04b1a24755cb8274", + "_parentId": "65df045a04b1a24755cb8256", "_type": "component", "_layout": "full", "_onScreen": { @@ -3045,6 +3068,8 @@ "_instruction": "" } }, + "_ariaLevel": 0, + "_disableAccessibilityState": false, "instruction": "Choose {{#if _isRadio}}one option{{else}}one or more options{{/if}} then select Submit.", "ariaQuestion": "", "_items": [ @@ -3146,13 +3171,12 @@ "_isHidden": false, "_isVisible": true, "_isResetOnRevisit": "false", - "_ariaLevel": 0, - "_disableAccessibilityState": false, + "_isA11yCompletionDescriptionEnabled": true, "title": "Question 26", "displayTitle": "", "body": "

Question 26: In Python, a dictionary can have duplicate keys.

", - "_id": "6527c3a6e72d6c32787e317e", - "_parentId": "6527c3a5e72d6c32787e2fb8", + "_id": "65df045b04b1a24755cb8275", + "_parentId": "65df045b04b1a24755cb8257", "_type": "component", "_layout": "full", "_onScreen": { @@ -3177,6 +3201,8 @@ "_instruction": "" } }, + "_ariaLevel": 0, + "_disableAccessibilityState": false, "instruction": "Choose {{#if _isRadio}}one option{{else}}one or more options{{/if}} then select Submit.", "ariaQuestion": "", "_items": [ @@ -3250,13 +3276,12 @@ "_isHidden": false, "_isVisible": true, "_isResetOnRevisit": "false", - "_ariaLevel": 0, - "_disableAccessibilityState": false, + "_isA11yCompletionDescriptionEnabled": true, "title": "Question 27", "displayTitle": "", "body": "

Question 27: In Python, a list can have duplicate entries.

", - "_id": "6527c3a6e72d6c32787e318d", - "_parentId": "6527c3a5e72d6c32787e2fc8", + "_id": "65df045b04b1a24755cb8276", + "_parentId": "65df045b04b1a24755cb8258", "_type": "component", "_layout": "full", "_onScreen": { @@ -3281,6 +3306,8 @@ "_instruction": "" } }, + "_ariaLevel": 0, + "_disableAccessibilityState": false, "instruction": "Choose {{#if _isRadio}}one option{{else}}one or more options{{/if}} then select Submit.", "ariaQuestion": "", "_items": [ @@ -3354,13 +3381,12 @@ "_isHidden": false, "_isVisible": true, "_isResetOnRevisit": "false", - "_ariaLevel": 0, - "_disableAccessibilityState": false, + "_isA11yCompletionDescriptionEnabled": true, "title": "Question 28", "displayTitle": "", "body": "

Question 28: Which of the following Python packages can be used to create and manage a Python virtual environment?

", - "_id": "6527c3a6e72d6c32787e319c", - "_parentId": "6527c3a5e72d6c32787e2fd8", + "_id": "65df045b04b1a24755cb8277", + "_parentId": "65df045b04b1a24755cb8259", "_type": "component", "_layout": "full", "_onScreen": { @@ -3385,6 +3411,8 @@ "_instruction": "" } }, + "_ariaLevel": 0, + "_disableAccessibilityState": false, "instruction": "Choose {{#if _isRadio}}one option{{else}}one or more options{{/if}} then select Submit.", "ariaQuestion": "", "_items": [ @@ -3465,13 +3493,12 @@ "_isHidden": false, "_isVisible": true, "_isResetOnRevisit": "false", - "_ariaLevel": 0, - "_disableAccessibilityState": false, + "_isA11yCompletionDescriptionEnabled": true, "title": "Question 29", "displayTitle": "", "body": "

Question 29:
        [({'uuid': '00000000',
        'timestamp': 1618047000,
        'temp': 5.33,
        'clouds': 10,
        'wind_speed': 10,
        'wind_deg': 31.0,
        'wind_gust': 4.1,
        'rain': 1.54}, 45.5),
        ({'uuid': '00000000',
        'timestamp': 1618017000,
        'temp': 5.33,
        'clouds': 10,
        'wind_speed': 10,
        'wind_deg': 31.0,
        'wind_gust': 4.1,
        'rain': 1.54}, 0.0)]

The above Python code snippet represents:

", - "_id": "6527c3a6e72d6c32787e31ab", - "_parentId": "6527c3a5e72d6c32787e2fe8", + "_id": "65df045b04b1a24755cb8278", + "_parentId": "65df045b04b1a24755cb825a", "_type": "component", "_layout": "full", "_onScreen": { @@ -3496,6 +3523,8 @@ "_instruction": "" } }, + "_ariaLevel": 0, + "_disableAccessibilityState": false, "instruction": "Choose {{#if _isRadio}}one option{{else}}one or more options{{/if}} then select Submit.", "ariaQuestion": "", "_items": [ @@ -3576,13 +3605,12 @@ "_isHidden": false, "_isVisible": true, "_isResetOnRevisit": "false", - "_ariaLevel": 0, - "_disableAccessibilityState": false, + "_isA11yCompletionDescriptionEnabled": true, "title": "Question 01", "displayTitle": "", "body": "

Question 01: The Era of R includes:

", - "_id": "6527c3a6e72d6c32787e31ba", - "_parentId": "6527c3a5e72d6c32787e2c18", + "_id": "65df045b04b1a24755cb8279", + "_parentId": "65df045904b1a24755cb821d", "_type": "component", "_layout": "full", "_onScreen": { @@ -3607,6 +3635,8 @@ "_instruction": "" } }, + "_ariaLevel": 0, + "_disableAccessibilityState": false, "instruction": "Choose {{#if _isRadio}}one option{{else}}one or more options{{/if}} then select Submit.", "ariaQuestion": "", "_items": [ @@ -3701,13 +3731,12 @@ "_isHidden": false, "_isVisible": true, "_isResetOnRevisit": "false", - "_ariaLevel": 0, - "_disableAccessibilityState": false, + "_isA11yCompletionDescriptionEnabled": true, "title": "Question 01", "displayTitle": "", "body": "

Question 01: Blockchain is the same as Bitcoin

", - "_id": "6527c3a6e72d6c32787e31c9", - "_parentId": "6527c3a5e72d6c32787e2c28", + "_id": "65df045b04b1a24755cb827a", + "_parentId": "65df045904b1a24755cb821e", "_type": "component", "_layout": "full", "_onScreen": { @@ -3732,6 +3761,8 @@ "_instruction": "" } }, + "_ariaLevel": 0, + "_disableAccessibilityState": false, "instruction": "Choose {{#if _isRadio}}one option{{else}}one or more options{{/if}} then select Submit.", "ariaQuestion": "", "_items": [ @@ -3805,13 +3836,12 @@ "_isHidden": false, "_isVisible": true, "_isResetOnRevisit": "false", - "_ariaLevel": 0, - "_disableAccessibilityState": false, + "_isA11yCompletionDescriptionEnabled": true, "title": "Question 03", "displayTitle": "", "body": "

Question 03: The Linear Economy is often briefly described as:

", - "_id": "6527c3a6e72d6c32787e31d8", - "_parentId": "6527c3a5e72d6c32787e2cc8", + "_id": "65df045b04b1a24755cb827b", + "_parentId": "65df045904b1a24755cb8228", "_type": "component", "_layout": "full", "_onScreen": { @@ -3836,6 +3866,8 @@ "_instruction": "" } }, + "_ariaLevel": 0, + "_disableAccessibilityState": false, "instruction": "Choose {{#if _isRadio}}one option{{else}}one or more options{{/if}} then select Submit.", "ariaQuestion": "", "_items": [ @@ -3923,13 +3955,12 @@ "_isHidden": false, "_isVisible": true, "_isResetOnRevisit": "false", - "_ariaLevel": 0, - "_disableAccessibilityState": false, + "_isA11yCompletionDescriptionEnabled": true, "title": "Question 02", "displayTitle": "", "body": "

Question 02: The Era of D is (lifecycle-wise) situated before the \"Point-of-End-of-Service-Life\" of products:

", - "_id": "6527c3a6e72d6c32787e31e7", - "_parentId": "6527c3a5e72d6c32787e2c98", + "_id": "65df045b04b1a24755cb827c", + "_parentId": "65df045904b1a24755cb8225", "_type": "component", "_layout": "full", "_onScreen": { @@ -3954,6 +3985,8 @@ "_instruction": "" } }, + "_ariaLevel": 0, + "_disableAccessibilityState": false, "instruction": "Choose {{#if _isRadio}}one option{{else}}one or more options{{/if}} then select Submit.", "ariaQuestion": "", "_items": [ @@ -4027,13 +4060,12 @@ "_isHidden": false, "_isVisible": true, "_isResetOnRevisit": "false", - "_ariaLevel": 0, - "_disableAccessibilityState": false, + "_isA11yCompletionDescriptionEnabled": true, "title": "Question 04", "displayTitle": "", "body": "

Question 04: How many generations are expected to live with the nuclear waste produced by two generations that benefited from cheap nuclear energy?

", - "_id": "6527c3a6e72d6c32787e31f6", - "_parentId": "6527c3a5e72d6c32787e2cf8", + "_id": "65df045b04b1a24755cb827d", + "_parentId": "65df045904b1a24755cb822b", "_type": "component", "_layout": "full", "_onScreen": { @@ -4058,6 +4090,8 @@ "_instruction": "" } }, + "_ariaLevel": 0, + "_disableAccessibilityState": false, "instruction": "Choose {{#if _isRadio}}one option{{else}}one or more options{{/if}} then select Submit.", "ariaQuestion": "", "_items": [ @@ -4152,13 +4186,12 @@ "_isHidden": false, "_isVisible": true, "_isResetOnRevisit": "false", - "_ariaLevel": 0, - "_disableAccessibilityState": false, + "_isA11yCompletionDescriptionEnabled": true, "title": "Question 05", "displayTitle": "", "body": "

Question 05: The Circular Economy is concerned with:

", - "_id": "6527c3a6e72d6c32787e3205", - "_parentId": "6527c3a5e72d6c32787e2d28", + "_id": "65df045b04b1a24755cb827e", + "_parentId": "65df045904b1a24755cb822e", "_type": "component", "_layout": "full", "_onScreen": { @@ -4183,6 +4216,8 @@ "_instruction": "" } }, + "_ariaLevel": 0, + "_disableAccessibilityState": false, "instruction": "Choose {{#if _isRadio}}one option{{else}}one or more options{{/if}} then select Submit.", "ariaQuestion": "", "_items": [ @@ -4270,13 +4305,12 @@ "_isHidden": false, "_isVisible": true, "_isResetOnRevisit": "false", - "_ariaLevel": 0, - "_disableAccessibilityState": false, + "_isA11yCompletionDescriptionEnabled": true, "title": "Question 06", "displayTitle": "", "body": "

Question 06: The Performance Economy is an extension of the:

", - "_id": "6527c3a6e72d6c32787e3214", - "_parentId": "6527c3a5e72d6c32787e2d58", + "_id": "65df045b04b1a24755cb827f", + "_parentId": "65df045a04b1a24755cb8231", "_type": "component", "_layout": "full", "_onScreen": { @@ -4301,6 +4335,8 @@ "_instruction": "" } }, + "_ariaLevel": 0, + "_disableAccessibilityState": false, "instruction": "Choose {{#if _isRadio}}one option{{else}}one or more options{{/if}} then select Submit.", "ariaQuestion": "", "_items": [ @@ -4374,13 +4410,12 @@ "_isHidden": false, "_isVisible": true, "_isResetOnRevisit": "false", - "_ariaLevel": 0, - "_disableAccessibilityState": false, + "_isA11yCompletionDescriptionEnabled": true, "title": "Question 07", "displayTitle": "", "body": "

Question 07: The goal of a LCA (Life Cycle Assessment) is to assess the environmental impact of products from a system perspective and to identify possible improvement strategies.

", - "_id": "6527c3a6e72d6c32787e3223", - "_parentId": "6527c3a5e72d6c32787e2d88", + "_id": "65df045b04b1a24755cb8280", + "_parentId": "65df045a04b1a24755cb8234", "_type": "component", "_layout": "full", "_onScreen": { @@ -4405,6 +4440,8 @@ "_instruction": "" } }, + "_ariaLevel": 0, + "_disableAccessibilityState": false, "instruction": "Choose {{#if _isRadio}}one option{{else}}one or more options{{/if}} then select Submit.", "ariaQuestion": "", "_items": [ @@ -4478,13 +4515,12 @@ "_isHidden": false, "_isVisible": true, "_isResetOnRevisit": "false", - "_ariaLevel": 0, - "_disableAccessibilityState": false, + "_isA11yCompletionDescriptionEnabled": true, "title": "Question 08", "displayTitle": "", "body": "

Question 08: An accurate definition of Sustainability is:

", - "_id": "6527c3a6e72d6c32787e3232", - "_parentId": "6527c3a5e72d6c32787e2db8", + "_id": "65df045b04b1a24755cb8281", + "_parentId": "65df045a04b1a24755cb8237", "_type": "component", "_layout": "full", "_onScreen": { @@ -4509,6 +4545,8 @@ "_instruction": "" } }, + "_ariaLevel": 0, + "_disableAccessibilityState": false, "instruction": "Choose {{#if _isRadio}}one option{{else}}one or more options{{/if}} then select Submit.", "ariaQuestion": "", "_items": [ @@ -4596,13 +4634,12 @@ "_isHidden": false, "_isVisible": true, "_isResetOnRevisit": "false", - "_ariaLevel": 0, - "_disableAccessibilityState": false, + "_isA11yCompletionDescriptionEnabled": true, "title": "Question 09", "displayTitle": "", "body": "

Question 09: The Performance Economy sells results instead of products. Which of the examples below fit into the Performance Economy?

", - "_id": "6527c3a6e72d6c32787e3241", - "_parentId": "6527c3a5e72d6c32787e2de8", + "_id": "65df045c04b1a24755cb8282", + "_parentId": "65df045a04b1a24755cb823a", "_type": "component", "_layout": "full", "_onScreen": { @@ -4627,6 +4664,8 @@ "_instruction": "" } }, + "_ariaLevel": 0, + "_disableAccessibilityState": false, "instruction": "Choose {{#if _isRadio}}one option{{else}}one or more options{{/if}} then select Submit.", "ariaQuestion": "", "_items": [ @@ -4714,13 +4753,12 @@ "_isHidden": false, "_isVisible": true, "_isResetOnRevisit": "false", - "_ariaLevel": 0, - "_disableAccessibilityState": false, + "_isA11yCompletionDescriptionEnabled": true, "title": "Question 10", "displayTitle": "", "body": "

Question 10: What is the least sustainable practice?

", - "_id": "6527c3a6e72d6c32787e3250", - "_parentId": "6527c3a5e72d6c32787e2e18", + "_id": "65df045c04b1a24755cb8283", + "_parentId": "65df045a04b1a24755cb823d", "_type": "component", "_layout": "full", "_onScreen": { @@ -4745,6 +4783,8 @@ "_instruction": "" } }, + "_ariaLevel": 0, + "_disableAccessibilityState": false, "instruction": "Choose {{#if _isRadio}}one option{{else}}one or more options{{/if}} then select Submit.", "ariaQuestion": "", "_items": [ @@ -4832,13 +4872,12 @@ "_isHidden": false, "_isVisible": true, "_isResetOnRevisit": "false", - "_ariaLevel": 0, - "_disableAccessibilityState": false, + "_isA11yCompletionDescriptionEnabled": true, "title": "Question 11", "displayTitle": "", "body": "

Question 11: Your ecological footprint is the ratio of:

", - "_id": "6527c3a6e72d6c32787e325f", - "_parentId": "6527c3a5e72d6c32787e2e48", + "_id": "65df045c04b1a24755cb8284", + "_parentId": "65df045a04b1a24755cb8240", "_type": "component", "_layout": "full", "_onScreen": { @@ -4863,6 +4902,8 @@ "_instruction": "" } }, + "_ariaLevel": 0, + "_disableAccessibilityState": false, "instruction": "Choose {{#if _isRadio}}one option{{else}}one or more options{{/if}} then select Submit.", "ariaQuestion": "", "_items": [ @@ -4950,13 +4991,12 @@ "_isHidden": false, "_isVisible": true, "_isResetOnRevisit": "false", - "_ariaLevel": 0, - "_disableAccessibilityState": false, + "_isA11yCompletionDescriptionEnabled": true, "title": "Question 12", "displayTitle": "", "body": "

Question 12: Can you as an individual enable, support, and contribute to the Circular Economy?

", - "_id": "6527c3a6e72d6c32787e326e", - "_parentId": "6527c3a5e72d6c32787e2e78", + "_id": "65df045c04b1a24755cb8285", + "_parentId": "65df045a04b1a24755cb8243", "_type": "component", "_layout": "full", "_onScreen": { @@ -4981,6 +5021,8 @@ "_instruction": "" } }, + "_ariaLevel": 0, + "_disableAccessibilityState": false, "instruction": "Choose {{#if _isRadio}}one option{{else}}one or more options{{/if}} then select Submit.", "ariaQuestion": "", "_items": [ @@ -5054,13 +5096,12 @@ "_isHidden": false, "_isVisible": true, "_isResetOnRevisit": "false", - "_ariaLevel": 0, - "_disableAccessibilityState": false, + "_isA11yCompletionDescriptionEnabled": true, "title": "Question 02", "displayTitle": "", "body": "

Question 02: Pick the records that are present within a blockchain:

", - "_id": "6527c3a6e72d6c32787e327d", - "_parentId": "6527c3a5e72d6c32787e2ca8", + "_id": "65df045c04b1a24755cb8286", + "_parentId": "65df045904b1a24755cb8226", "_type": "component", "_layout": "full", "_onScreen": { @@ -5085,6 +5126,8 @@ "_instruction": "" } }, + "_ariaLevel": 0, + "_disableAccessibilityState": false, "instruction": "Choose {{#if _isRadio}}one option{{else}}one or more options{{/if}} then select Submit.", "ariaQuestion": "", "_items": [ @@ -5158,13 +5201,12 @@ "_isHidden": false, "_isVisible": true, "_isResetOnRevisit": "false", - "_ariaLevel": 0, - "_disableAccessibilityState": false, + "_isA11yCompletionDescriptionEnabled": true, "title": "Question 03", "displayTitle": "", "body": "

Question 03: Blockchains store data in the form of ...

", - "_id": "6527c3a6e72d6c32787e328c", - "_parentId": "6527c3a5e72d6c32787e2cd8", + "_id": "65df045c04b1a24755cb8287", + "_parentId": "65df045904b1a24755cb8229", "_type": "component", "_layout": "full", "_onScreen": { @@ -5189,6 +5231,8 @@ "_instruction": "" } }, + "_ariaLevel": 0, + "_disableAccessibilityState": false, "instruction": "Choose {{#if _isRadio}}one option{{else}}one or more options{{/if}} then select Submit.", "ariaQuestion": "", "_items": [ @@ -5276,13 +5320,12 @@ "_isHidden": false, "_isVisible": true, "_isResetOnRevisit": "false", - "_ariaLevel": 0, - "_disableAccessibilityState": false, + "_isA11yCompletionDescriptionEnabled": true, "title": "Question 04", "displayTitle": "", "body": "

Question 04: How is a blockchain ledger different from a standard ledger?

", - "_id": "6527c3a6e72d6c32787e329b", - "_parentId": "6527c3a5e72d6c32787e2d08", + "_id": "65df045c04b1a24755cb8288", + "_parentId": "65df045904b1a24755cb822c", "_type": "component", "_layout": "full", "_onScreen": { @@ -5307,6 +5350,8 @@ "_instruction": "" } }, + "_ariaLevel": 0, + "_disableAccessibilityState": false, "instruction": "Choose {{#if _isRadio}}one option{{else}}one or more options{{/if}} then select Submit.", "ariaQuestion": "", "_items": [ @@ -5387,13 +5432,12 @@ "_isHidden": false, "_isVisible": true, "_isResetOnRevisit": "false", - "_ariaLevel": 0, - "_disableAccessibilityState": false, + "_isA11yCompletionDescriptionEnabled": true, "title": "Question 05", "displayTitle": "", "body": "

Question 05: Modifying the contents of the n-th block in a blockchain invalidates the i-th block, with i in the range:

", - "_id": "6527c3a6e72d6c32787e32aa", - "_parentId": "6527c3a5e72d6c32787e2d38", + "_id": "65df045c04b1a24755cb8289", + "_parentId": "65df045904b1a24755cb822f", "_type": "component", "_layout": "full", "_onScreen": { @@ -5418,6 +5462,8 @@ "_instruction": "" } }, + "_ariaLevel": 0, + "_disableAccessibilityState": false, "instruction": "Choose {{#if _isRadio}}one option{{else}}one or more options{{/if}} then select Submit.", "ariaQuestion": "", "_items": [ @@ -5505,13 +5551,12 @@ "_isHidden": false, "_isVisible": true, "_isResetOnRevisit": "false", - "_ariaLevel": 0, - "_disableAccessibilityState": false, + "_isA11yCompletionDescriptionEnabled": true, "title": "Question 06", "displayTitle": "", "body": "

Question 06: A \"51% attack\" on a proof of work blockchain refers to:

", - "_id": "6527c3a6e72d6c32787e32b9", - "_parentId": "6527c3a5e72d6c32787e2d68", + "_id": "65df045c04b1a24755cb828a", + "_parentId": "65df045a04b1a24755cb8232", "_type": "component", "_layout": "full", "_onScreen": { @@ -5536,6 +5581,8 @@ "_instruction": "" } }, + "_ariaLevel": 0, + "_disableAccessibilityState": false, "instruction": "Choose {{#if _isRadio}}one option{{else}}one or more options{{/if}} then select Submit.", "ariaQuestion": "", "_items": [ @@ -5616,13 +5663,12 @@ "_isHidden": false, "_isVisible": true, "_isResetOnRevisit": "false", - "_ariaLevel": 0, - "_disableAccessibilityState": false, + "_isA11yCompletionDescriptionEnabled": true, "title": "Question 07", "displayTitle": "", "body": "

Question 07: Knowing a Bitcoin address provides you with:

", - "_id": "6527c3a6e72d6c32787e32c8", - "_parentId": "6527c3a5e72d6c32787e2d98", + "_id": "65df045c04b1a24755cb828b", + "_parentId": "65df045a04b1a24755cb8235", "_type": "component", "_layout": "full", "_onScreen": { @@ -5647,6 +5693,8 @@ "_instruction": "" } }, + "_ariaLevel": 0, + "_disableAccessibilityState": false, "instruction": "Choose {{#if _isRadio}}one option{{else}}one or more options{{/if}} then select Submit.", "ariaQuestion": "", "_items": [ @@ -5734,13 +5782,12 @@ "_isHidden": false, "_isVisible": true, "_isResetOnRevisit": "false", - "_ariaLevel": 0, - "_disableAccessibilityState": false, + "_isA11yCompletionDescriptionEnabled": true, "title": "Question 08", "displayTitle": "", "body": "

Question 08: What does P2P stand for?

", - "_id": "6527c3a6e72d6c32787e32d7", - "_parentId": "6527c3a5e72d6c32787e2dc8", + "_id": "65df045c04b1a24755cb828c", + "_parentId": "65df045a04b1a24755cb8238", "_type": "component", "_layout": "full", "_onScreen": { @@ -5765,6 +5812,8 @@ "_instruction": "" } }, + "_ariaLevel": 0, + "_disableAccessibilityState": false, "instruction": "Choose {{#if _isRadio}}one option{{else}}one or more options{{/if}} then select Submit.", "ariaQuestion": "", "_items": [ @@ -5852,13 +5901,12 @@ "_isHidden": false, "_isVisible": true, "_isResetOnRevisit": "false", - "_ariaLevel": 0, - "_disableAccessibilityState": false, + "_isA11yCompletionDescriptionEnabled": true, "title": "Question 09", "displayTitle": "", "body": "

Question 09: What is a blockchain node?

", - "_id": "6527c3a6e72d6c32787e32e6", - "_parentId": "6527c3a5e72d6c32787e2df8", + "_id": "65df045c04b1a24755cb828d", + "_parentId": "65df045a04b1a24755cb823b", "_type": "component", "_layout": "full", "_onScreen": { @@ -5883,6 +5931,8 @@ "_instruction": "" } }, + "_ariaLevel": 0, + "_disableAccessibilityState": false, "instruction": "Choose {{#if _isRadio}}one option{{else}}one or more options{{/if}} then select Submit.", "ariaQuestion": "", "_items": [ @@ -5970,13 +6020,12 @@ "_isHidden": false, "_isVisible": true, "_isResetOnRevisit": "false", - "_ariaLevel": 0, - "_disableAccessibilityState": false, + "_isA11yCompletionDescriptionEnabled": true, "title": "Question 10", "displayTitle": "", "body": "

Question 10: Which applies to most private keys?

", - "_id": "6527c3a6e72d6c32787e32f5", - "_parentId": "6527c3a5e72d6c32787e2e28", + "_id": "65df045c04b1a24755cb828e", + "_parentId": "65df045a04b1a24755cb823e", "_type": "component", "_layout": "full", "_onScreen": { @@ -6001,6 +6050,8 @@ "_instruction": "" } }, + "_ariaLevel": 0, + "_disableAccessibilityState": false, "instruction": "Choose {{#if _isRadio}}one option{{else}}one or more options{{/if}} then select Submit.", "ariaQuestion": "", "_items": [ @@ -6088,13 +6139,12 @@ "_isHidden": false, "_isVisible": true, "_isResetOnRevisit": "false", - "_ariaLevel": 0, - "_disableAccessibilityState": false, + "_isA11yCompletionDescriptionEnabled": true, "title": "Question 11", "displayTitle": "", "body": "

Question 11: Asymmetric encryption uses:

", - "_id": "6527c3a6e72d6c32787e3304", - "_parentId": "6527c3a5e72d6c32787e2e58", + "_id": "65df045c04b1a24755cb828f", + "_parentId": "65df045a04b1a24755cb8241", "_type": "component", "_layout": "full", "_onScreen": { @@ -6119,6 +6169,8 @@ "_instruction": "" } }, + "_ariaLevel": 0, + "_disableAccessibilityState": false, "instruction": "Choose {{#if _isRadio}}one option{{else}}one or more options{{/if}} then select Submit.", "ariaQuestion": "", "_items": [ @@ -6206,13 +6258,12 @@ "_isHidden": false, "_isVisible": true, "_isResetOnRevisit": "false", - "_ariaLevel": 0, - "_disableAccessibilityState": false, + "_isA11yCompletionDescriptionEnabled": true, "title": "Question 12", "displayTitle": "", "body": "

Question 12: What is a hash function?

", - "_id": "6527c3a6e72d6c32787e3313", - "_parentId": "6527c3a5e72d6c32787e2e88", + "_id": "65df045c04b1a24755cb8290", + "_parentId": "65df045a04b1a24755cb8244", "_type": "component", "_layout": "full", "_onScreen": { @@ -6237,6 +6288,8 @@ "_instruction": "" } }, + "_ariaLevel": 0, + "_disableAccessibilityState": false, "instruction": "Choose {{#if _isRadio}}one option{{else}}one or more options{{/if}} then select Submit.", "ariaQuestion": "", "_items": [ @@ -6324,13 +6377,12 @@ "_isHidden": false, "_isVisible": true, "_isResetOnRevisit": "false", - "_ariaLevel": 0, - "_disableAccessibilityState": false, + "_isA11yCompletionDescriptionEnabled": true, "title": "Question 13", "displayTitle": "", "body": "

Question 13: Once records are submitted on a proof of work blockchain, can they be altered?

", - "_id": "6527c3a6e72d6c32787e3322", - "_parentId": "6527c3a5e72d6c32787e2ea8", + "_id": "65df045c04b1a24755cb8291", + "_parentId": "65df045a04b1a24755cb8246", "_type": "component", "_layout": "full", "_onScreen": { @@ -6355,6 +6407,8 @@ "_instruction": "" } }, + "_ariaLevel": 0, + "_disableAccessibilityState": false, "instruction": "Choose {{#if _isRadio}}one option{{else}}one or more options{{/if}} then select Submit.", "ariaQuestion": "", "_items": [ @@ -6442,13 +6496,12 @@ "_isHidden": false, "_isVisible": true, "_isResetOnRevisit": "false", - "_ariaLevel": 0, - "_disableAccessibilityState": false, + "_isA11yCompletionDescriptionEnabled": true, "title": "Question 14", "displayTitle": "", "body": "

Question 14: What is the maximum number of Bitcoins that can be created?

", - "_id": "6527c3a6e72d6c32787e3331", - "_parentId": "6527c3a5e72d6c32787e2ec8", + "_id": "65df045c04b1a24755cb8292", + "_parentId": "65df045a04b1a24755cb8248", "_type": "component", "_layout": "full", "_onScreen": { @@ -6473,6 +6526,8 @@ "_instruction": "" } }, + "_ariaLevel": 0, + "_disableAccessibilityState": false, "instruction": "Choose {{#if _isRadio}}one option{{else}}one or more options{{/if}} then select Submit.", "ariaQuestion": "", "_items": [ @@ -6560,13 +6615,12 @@ "_isHidden": false, "_isVisible": true, "_isResetOnRevisit": "false", - "_ariaLevel": 0, - "_disableAccessibilityState": false, + "_isA11yCompletionDescriptionEnabled": true, "title": "Question 15", "displayTitle": "", "body": "

Question 15: Where is the Bitcoin central server located?

", - "_id": "6527c3a6e72d6c32787e3340", - "_parentId": "6527c3a5e72d6c32787e2ee8", + "_id": "65df045c04b1a24755cb8293", + "_parentId": "65df045a04b1a24755cb824a", "_type": "component", "_layout": "full", "_onScreen": { @@ -6591,6 +6645,8 @@ "_instruction": "" } }, + "_ariaLevel": 0, + "_disableAccessibilityState": false, "instruction": "Choose {{#if _isRadio}}one option{{else}}one or more options{{/if}} then select Submit.", "ariaQuestion": "", "_items": [ @@ -6685,13 +6741,12 @@ "_isHidden": false, "_isVisible": true, "_isResetOnRevisit": "false", - "_ariaLevel": 0, - "_disableAccessibilityState": false, + "_isA11yCompletionDescriptionEnabled": true, "title": "Question 16", "displayTitle": "", "body": "

Question 16: A block in the blockchain can never have more than one parent block.

", - "_id": "6527c3a6e72d6c32787e334f", - "_parentId": "6527c3a5e72d6c32787e2f08", + "_id": "65df045c04b1a24755cb8294", + "_parentId": "65df045a04b1a24755cb824c", "_type": "component", "_layout": "full", "_onScreen": { @@ -6716,6 +6771,8 @@ "_instruction": "" } }, + "_ariaLevel": 0, + "_disableAccessibilityState": false, "instruction": "Choose {{#if _isRadio}}one option{{else}}one or more options{{/if}} then select Submit.", "ariaQuestion": "", "_items": [ @@ -6789,13 +6846,12 @@ "_isHidden": false, "_isVisible": true, "_isResetOnRevisit": "false", - "_ariaLevel": 0, - "_disableAccessibilityState": false, + "_isA11yCompletionDescriptionEnabled": true, "title": "Question 17", "displayTitle": "", "body": "

Question 17: In a blockchain, blocks are linked:

", - "_id": "6527c3a6e72d6c32787e335e", - "_parentId": "6527c3a5e72d6c32787e2f28", + "_id": "65df045c04b1a24755cb8295", + "_parentId": "65df045a04b1a24755cb824e", "_type": "component", "_layout": "full", "_onScreen": { @@ -6820,6 +6876,8 @@ "_instruction": "" } }, + "_ariaLevel": 0, + "_disableAccessibilityState": false, "instruction": "Choose {{#if _isRadio}}one option{{else}}one or more options{{/if}} then select Submit.", "ariaQuestion": "", "_items": [ @@ -6900,13 +6958,12 @@ "_isHidden": false, "_isVisible": true, "_isResetOnRevisit": "false", - "_ariaLevel": 0, - "_disableAccessibilityState": false, + "_isA11yCompletionDescriptionEnabled": true, "title": "New Component Title", "displayTitle": "", "body": "", - "_id": "6527c3a6e72d6c32787e336d", - "_parentId": "6527c3a5e72d6c32787e2c38", + "_id": "65df045c04b1a24755cb8296", + "_parentId": "65df045904b1a24755cb821f", "_type": "component", "_layout": "full", "_onScreen": { @@ -6931,6 +6988,8 @@ "_instruction": "" } }, + "_ariaLevel": 0, + "_disableAccessibilityState": false, "instruction": "", "_graphic": { "alt": "", @@ -6952,13 +7011,12 @@ "_isHidden": false, "_isVisible": true, "_isResetOnRevisit": "false", - "_ariaLevel": 0, - "_disableAccessibilityState": false, + "_isA11yCompletionDescriptionEnabled": true, "title": "New Component Title", "displayTitle": "", "body": "", - "_id": "6527c3a6e72d6c32787e3388", - "_parentId": "6527c3a5e72d6c32787e2c48", + "_id": "65df045c04b1a24755cb8299", + "_parentId": "65df045904b1a24755cb8220", "_type": "component", "_layout": "full", "_onScreen": { @@ -6983,6 +7041,8 @@ "_instruction": "" } }, + "_ariaLevel": 0, + "_disableAccessibilityState": false, "instruction": "", "_graphic": { "alt": "", @@ -7004,13 +7064,12 @@ "_isHidden": false, "_isVisible": true, "_isResetOnRevisit": "false", - "_ariaLevel": 0, - "_disableAccessibilityState": false, + "_isA11yCompletionDescriptionEnabled": true, "title": "New Component Title", "displayTitle": "", "body": "", - "_id": "6527c3a6e72d6c32787e33a3", - "_parentId": "6527c3a5e72d6c32787e2c58", + "_id": "65df045c04b1a24755cb829c", + "_parentId": "65df045904b1a24755cb8221", "_type": "component", "_layout": "full", "_onScreen": { @@ -7035,6 +7094,8 @@ "_instruction": "" } }, + "_ariaLevel": 0, + "_disableAccessibilityState": false, "instruction": "", "_graphic": { "alt": "", @@ -7056,13 +7117,12 @@ "_isHidden": false, "_isVisible": true, "_isResetOnRevisit": "false", - "_ariaLevel": 0, - "_disableAccessibilityState": false, + "_isA11yCompletionDescriptionEnabled": true, "title": "Results", "displayTitle": "Results", "body": "", - "_id": "6527c3a6e72d6c32787e33be", - "_parentId": "6527c3a5e72d6c32787e2ff8", + "_id": "65df045c04b1a24755cb829f", + "_parentId": "65df045b04b1a24755cb825b", "_type": "component", "_layout": "full", "_onScreen": { @@ -7087,6 +7147,8 @@ "_instruction": "" } }, + "_ariaLevel": 0, + "_disableAccessibilityState": false, "instruction": "", "_isVisibleBeforeCompletion": true, "_setCompletionOn": "inview", @@ -7121,13 +7183,12 @@ "_isHidden": false, "_isVisible": true, "_isResetOnRevisit": "false", - "_ariaLevel": 0, - "_disableAccessibilityState": false, + "_isA11yCompletionDescriptionEnabled": true, "title": "Result", "displayTitle": "Result", "body": "", - "_id": "6527c3a6e72d6c32787e33cd", - "_parentId": "6527c3a5e72d6c32787e2c68", + "_id": "65df045c04b1a24755cb82a0", + "_parentId": "65df045904b1a24755cb8222", "_type": "component", "_layout": "full", "_onScreen": { @@ -7152,6 +7213,8 @@ "_instruction": "" } }, + "_ariaLevel": 0, + "_disableAccessibilityState": false, "instruction": "", "_isVisibleBeforeCompletion": true, "_setCompletionOn": "inview", @@ -7186,13 +7249,12 @@ "_isHidden": false, "_isVisible": true, "_isResetOnRevisit": "false", - "_ariaLevel": 0, - "_disableAccessibilityState": false, + "_isA11yCompletionDescriptionEnabled": true, "title": "Result", "displayTitle": "Result", "body": "", - "_id": "6527c3a6e72d6c32787e33dc", - "_parentId": "6527c3a5e72d6c32787e2c78", + "_id": "65df045c04b1a24755cb82a1", + "_parentId": "65df045904b1a24755cb8223", "_type": "component", "_layout": "full", "_onScreen": { @@ -7217,6 +7279,8 @@ "_instruction": "" } }, + "_ariaLevel": 0, + "_disableAccessibilityState": false, "instruction": "", "_isVisibleBeforeCompletion": true, "_setCompletionOn": "inview", diff --git a/course/en/contentObjects.json b/course/en/contentObjects.json index ed46f1a..b7595a0 100644 --- a/course/en/contentObjects.json +++ b/course/en/contentObjects.json @@ -17,8 +17,8 @@ "_isHidden": false, "_isVisible": true, "_requireCompletionOf": -1, - "_ariaLevel": 0, - "_id": "6527c3a5e72d6c32787e2b48", + "_isA11yCompletionDescriptionEnabled": true, + "_id": "65df045804b1a24755cb820e", "_parentId": "course", "_type": "page", "_graphic": { @@ -103,8 +103,8 @@ "_isHidden": false, "_isVisible": true, "_requireCompletionOf": -1, - "_ariaLevel": 0, - "_id": "6527c3a5e72d6c32787e2b5d", + "_isA11yCompletionDescriptionEnabled": true, + "_id": "65df045904b1a24755cb8210", "_parentId": "course", "_type": "page", "_graphic": { @@ -172,8 +172,8 @@ } }, { - "title": "E07: Blockchain Technology", - "displayTitle": "E07: Blockchain Technology", + "title": "E08: Blockchain Technology", + "displayTitle": "E08: Blockchain Technology", "body": "

This quiz tests your knowledge on blockchain technology.

", "_classes": "", "subtitle": "Introduction to Blockchain Technology", @@ -189,8 +189,8 @@ "_isHidden": false, "_isVisible": true, "_requireCompletionOf": -1, - "_ariaLevel": 0, - "_id": "6527c3a5e72d6c32787e2b72", + "_isA11yCompletionDescriptionEnabled": true, + "_id": "65df045904b1a24755cb8212", "_parentId": "course", "_type": "page", "_graphic": { diff --git a/course/en/course.json b/course/en/course.json index ee030f7..bb9ee1e 100644 --- a/course/en/course.json +++ b/course/en/course.json @@ -6,6 +6,7 @@ "description": "", "instruction": "", "_htmlClasses": "", + "_isA11yCompletionDescriptionEnabled": true, "_latestTrackingId": 64, "_buttons": { "_submit": { @@ -436,4 +437,4 @@ "_src": "course/en/assets/68abb404a101d39b227f031e257a9853db3fcac1.png" } } -} +} \ No newline at end of file diff --git a/libraries/backbone.controller.js b/libraries/backbone.controller.js index d6e3542..1f23996 100644 --- a/libraries/backbone.controller.js +++ b/libraries/backbone.controller.js @@ -1,32 +1,32 @@ -// 2017-04-11 https://github.com/cgkineo/backbone.controller -/* - Adds an extensible class to backbone, which doesn't have a Model or DOM element (.$el) and isn't a Collection,. - It still works exactly like Model, View and Collection, in that it has the Events API, .extend and an initialize function -*/ -define("backbone.controller", [ - "backbone", - "underscore" -], function(Backbone, _) { - - var Controller = Backbone.Controller = function(options) { - options || (options = {}); - this.preinitialize.apply(this, arguments); - _.extend(this, _.pick(options, controllerOptions)); - this.initialize.apply(this, arguments); - }; - - var controllerOptions = ['model', 'collection']; - - _.extend(Controller.prototype, Backbone.Events, { - - preinitialize: function() {}, - - initialize: function() {} - - }); - - Controller.extend = Backbone.View.extend; - - return Backbone; - -}); +// 2017-04-11 https://github.com/cgkineo/backbone.controller +/* + Adds an extensible class to backbone, which doesn't have a Model or DOM element (.$el) and isn't a Collection,. + It still works exactly like Model, View and Collection, in that it has the Events API, .extend and an initialize function +*/ +define("backbone.controller", [ + "backbone", + "underscore" +], function(Backbone, _) { + + var Controller = Backbone.Controller = function(options) { + options || (options = {}); + this.preinitialize.apply(this, arguments); + _.extend(this, _.pick(options, controllerOptions)); + this.initialize.apply(this, arguments); + }; + + var controllerOptions = ['model', 'collection']; + + _.extend(Controller.prototype, Backbone.Events, { + + preinitialize: function() {}, + + initialize: function() {} + + }); + + Controller.extend = Backbone.View.extend; + + return Backbone; + +}); diff --git a/libraries/backbone.controller.results.js b/libraries/backbone.controller.results.js index fd3cdeb..ab5c4e5 100644 --- a/libraries/backbone.controller.results.js +++ b/libraries/backbone.controller.results.js @@ -1,39 +1,39 @@ -// 2017-09-06 https://github.com/cgkineo/backbone.controller.results -/* - These functions are useful to resolve instance properties which are an array or object - or instance functions which return an array/object, to copy and extend the returned value. -*/ -define('backbone.controller.results', [ - 'underscore.results', - 'backbone.controller' -], function(_, Backbone) { - - var extend = [ Backbone.View, Backbone.Model, Backbone.Collection, Backbone.Controller ]; - - function resultExtendClass() { - - var args = Array.prototype.slice.call(arguments, 0); - args.unshift(this.prototype); - - return _.resultExtend.apply(this, args); - - }; - - function resultExtendInstance() { - - var args = Array.prototype.slice.call(arguments, 0); - args.unshift(this); - - return _.resultExtend.apply(this, args); - - }; - - _.each(extend, function(item) { - - item.resultExtend = resultExtendClass; - item.prototype.resultExtend = resultExtendInstance; - - }); - - -}); +// 2017-09-06 https://github.com/cgkineo/backbone.controller.results +/* + These functions are useful to resolve instance properties which are an array or object + or instance functions which return an array/object, to copy and extend the returned value. +*/ +define('backbone.controller.results', [ + 'underscore.results', + 'backbone.controller' +], function(_, Backbone) { + + var extend = [ Backbone.View, Backbone.Model, Backbone.Collection, Backbone.Controller ]; + + function resultExtendClass() { + + var args = Array.prototype.slice.call(arguments, 0); + args.unshift(this.prototype); + + return _.resultExtend.apply(this, args); + + }; + + function resultExtendInstance() { + + var args = Array.prototype.slice.call(arguments, 0); + args.unshift(this); + + return _.resultExtend.apply(this, args); + + }; + + _.each(extend, function(item) { + + item.resultExtend = resultExtendClass; + item.prototype.resultExtend = resultExtendInstance; + + }); + + +}); diff --git a/libraries/backbone.es6.js b/libraries/backbone.es6.js index de7b2b0..6fbede4 100644 --- a/libraries/backbone.es6.js +++ b/libraries/backbone.es6.js @@ -1,118 +1,118 @@ -/** - * 2021-09-07 - * https://github.com/adaptlearning/adapt_framework/issues/2697 - * https://github.com/adaptlearning/adapt_framework/issues/3236 - * Added ES6-style constructor and static property inheritance rather than just - * copying the enumerable static properties each time. - */ -define('backbone.es6', [ - 'underscore', - 'backbone', - 'backbone.controller' -], function(_, Backbone) { - - var hasNativeClassSupport = true; - try { - eval('class A {}'); - } catch (err) { - hasNativeClassSupport = false; - } - - var classes = [ - Backbone.View, - Backbone.Model, - Backbone.Collection, - Backbone.Router, - Backbone.History, - Backbone.Controller - ]; - - if (hasNativeClassSupport) { - // Transform Backbone classes into ES6 Classes - ['View', 'Model', 'Collection', 'Router', 'History', 'Controller'].forEach(function(name) { - Backbone['_' + name] = Backbone[name]; - Backbone[name] = eval('class ' + name + ' extends Backbone["_' + name + '"] { }; ' + name + ';'); - }); - } - - var getChild = function (parent, protoProps) { - // The constructor function for the new subclass is either defined by you - // (the "constructor" property in your `extend` definition), or defaulted - // by us to simply call the parent constructor. - var hasConstructor = protoProps && _.has(protoProps, 'constructor'); - if (hasNativeClassSupport && hasConstructor) { - return eval('class e extends protoProps.constructor { }; e;'); - } - if (hasNativeClassSupport) { - return eval('class e extends parent { }; e;'); - } - if (hasConstructor) { - return protoProps.constructor; - } - return function () { return parent.apply(this, arguments); }; - }; - - // Helper function to correctly set up the prototype chain for subclasses. - // Similar to `goog.inherits`, but uses a hash of prototype properties and - // class properties to be extended. - var extend = function(protoProps, staticProps) { - var parent = this; - var child = getChild(parent, protoProps); - - // Create static property inheritance chain - Object.setPrototypeOf(child, parent); - - // Add new static properties values to the constructor function, if supplied. - _.extend(child, staticProps); - - // Set the prototype inheritance chain - // Add new prototype properties to class prototype - if (!hasNativeClassSupport) { - child.prototype = _.create(parent.prototype, protoProps); - } else { - child.prototype = {}; - Object.setPrototypeOf(child.prototype, parent.prototype); - _.extend(child.prototype, protoProps); - } - child.prototype.constructor = child; - - // Set a convenience property in case the parent's prototype is needed - // later. - child.__super__ = parent.prototype; - - return child; - }; - - classes.forEach(function(Class) { - Class.extend = extend; - }); - - // Fixes for Backbone.Collection in ES6 class environment - Backbone.Collection.prototype.model = Backbone.Model; - Backbone.Collection.prototype.modelId = function(t) { - return t[(this.model.prototype && this.model.prototype.idAttribute) || 'id']; - }; - Backbone.Collection.prototype._prepareModel = function(t, e) { - if (this._isModel(t)) { - if (!t.collection) { - t.collection = this; - } - return t; - } - e = e ? _.clone(e) : {}; - e.collection = this; - var n; - if (this.model === Backbone.Model || this.model.prototype instanceof Backbone.Model) { - var Class = this.model; - n = new Class(t, e); - } else { - n = this.model(t, e); - } - if (!n.validationError) { - return n; - } - this.trigger('invalid', this, n.validationError, e); - return false; - }; - -}); +/** + * 2021-09-07 + * https://github.com/adaptlearning/adapt_framework/issues/2697 + * https://github.com/adaptlearning/adapt_framework/issues/3236 + * Added ES6-style constructor and static property inheritance rather than just + * copying the enumerable static properties each time. + */ +define('backbone.es6', [ + 'underscore', + 'backbone', + 'backbone.controller' +], function(_, Backbone) { + + var hasNativeClassSupport = true; + try { + eval('class A {}'); + } catch (err) { + hasNativeClassSupport = false; + } + + var classes = [ + Backbone.View, + Backbone.Model, + Backbone.Collection, + Backbone.Router, + Backbone.History, + Backbone.Controller + ]; + + if (hasNativeClassSupport) { + // Transform Backbone classes into ES6 Classes + ['View', 'Model', 'Collection', 'Router', 'History', 'Controller'].forEach(function(name) { + Backbone['_' + name] = Backbone[name]; + Backbone[name] = eval('class ' + name + ' extends Backbone["_' + name + '"] { }; ' + name + ';'); + }); + } + + var getChild = function (parent, protoProps) { + // The constructor function for the new subclass is either defined by you + // (the "constructor" property in your `extend` definition), or defaulted + // by us to simply call the parent constructor. + var hasConstructor = protoProps && _.has(protoProps, 'constructor'); + if (hasNativeClassSupport && hasConstructor) { + return eval('class e extends protoProps.constructor { }; e;'); + } + if (hasNativeClassSupport) { + return eval('class e extends parent { }; e;'); + } + if (hasConstructor) { + return protoProps.constructor; + } + return function () { return parent.apply(this, arguments); }; + }; + + // Helper function to correctly set up the prototype chain for subclasses. + // Similar to `goog.inherits`, but uses a hash of prototype properties and + // class properties to be extended. + var extend = function(protoProps, staticProps) { + var parent = this; + var child = getChild(parent, protoProps); + + // Create static property inheritance chain + Object.setPrototypeOf(child, parent); + + // Add new static properties values to the constructor function, if supplied. + _.extend(child, staticProps); + + // Set the prototype inheritance chain + // Add new prototype properties to class prototype + if (!hasNativeClassSupport) { + child.prototype = _.create(parent.prototype, protoProps); + } else { + child.prototype = {}; + Object.setPrototypeOf(child.prototype, parent.prototype); + _.extend(child.prototype, protoProps); + } + child.prototype.constructor = child; + + // Set a convenience property in case the parent's prototype is needed + // later. + child.__super__ = parent.prototype; + + return child; + }; + + classes.forEach(function(Class) { + Class.extend = extend; + }); + + // Fixes for Backbone.Collection in ES6 class environment + Backbone.Collection.prototype.model = Backbone.Model; + Backbone.Collection.prototype.modelId = function(t) { + return t[(this.model.prototype && this.model.prototype.idAttribute) || 'id']; + }; + Backbone.Collection.prototype._prepareModel = function(t, e) { + if (this._isModel(t)) { + if (!t.collection) { + t.collection = this; + } + return t; + } + e = e ? _.clone(e) : {}; + e.collection = this; + var n; + if (this.model === Backbone.Model || this.model.prototype instanceof Backbone.Model) { + var Class = this.model; + n = new Class(t, e); + } else { + n = this.model(t, e); + } + if (!n.validationError) { + return n; + } + this.trigger('invalid', this, n.validationError, e); + return false; + }; + +}); diff --git a/libraries/backbone.min.js b/libraries/backbone.min.js index d5b2413..96eee2a 100644 --- a/libraries/backbone.min.js +++ b/libraries/backbone.min.js @@ -1,2 +1,2 @@ -//Backbone.js v1.4.0 +//Backbone.js v1.4.0 (function(t){var e=typeof self=="object"&&self.self===self&&self||typeof global=="object"&&global.global===global&&global;if(typeof define==="function"&&define.amd){define(["underscore","jquery","exports"],function(i,n,r){e.Backbone=t(e,r,i,n)})}else if(typeof exports!=="undefined"){var i=require("underscore"),n;try{n=require("jquery")}catch(r){}t(e,exports,i,n)}else{e.Backbone=t(e,{},e._,e.jQuery||e.Zepto||e.ender||e.$)}})(function(t,e,i,n){var r=t.Backbone;var s=Array.prototype.slice;e.VERSION="1.4.0";e.$=n;e.noConflict=function(){t.Backbone=r;return this};e.emulateHTTP=false;e.emulateJSON=false;var a=e.Events={};var o=/\s+/;var h;var u=function(t,e,n,r,s){var a=0,h;if(n&&typeof n==="object"){if(r!==void 0&&"context"in s&&s.context===void 0)s.context=r;for(h=i.keys(n);athis.length)r=this.length;if(r<0)r+=this.length+1;var s=[];var a=[];var o=[];var h=[];var u={};var l=e.add;var c=e.merge;var f=e.remove;var d=false;var v=this.comparator&&r==null&&e.sort!==false;var p=i.isString(this.comparator)?this.comparator:null;var g,m;for(m=0;m7);this._useHashChange=this._wantsHashChange&&this._hasHashChange;this._wantsPushState=!!this.options.pushState;this._hasPushState=!!(this.history&&this.history.pushState);this._usePushState=this._wantsPushState&&this._hasPushState;this.fragment=this.getFragment();this.root=("/"+this.root+"/").replace(L,"/");if(this._wantsHashChange&&this._wantsPushState){if(!this._hasPushState&&!this.atRoot()){var e=this.root.slice(0,-1)||"/";this.location.replace(e+"#"+this.getPath());return true}else if(this._hasPushState&&this.atRoot()){this.navigate(this.getHash(),{replace:true})}}if(!this._hasHashChange&&this._wantsHashChange&&!this._usePushState){this.iframe=document.createElement("iframe");this.iframe.src="javascript:0";this.iframe.style.display="none";this.iframe.tabIndex=-1;var n=document.body;var r=n.insertBefore(this.iframe,n.firstChild).contentWindow;r.document.open();r.document.close();r.location.hash="#"+this.fragment}var s=window.addEventListener||function(t,e){return attachEvent("on"+t,e)};if(this._usePushState){s("popstate",this.checkUrl,false)}else if(this._useHashChange&&!this.iframe){s("hashchange",this.checkUrl,false)}else if(this._wantsHashChange){this._checkUrlInterval=setInterval(this.checkUrl,this.interval)}if(!this.options.silent)return this.loadUrl()},stop:function(){var t=window.removeEventListener||function(t,e){return detachEvent("on"+t,e)};if(this._usePushState){t("popstate",this.checkUrl,false)}else if(this._useHashChange&&!this.iframe){t("hashchange",this.checkUrl,false)}if(this.iframe){document.body.removeChild(this.iframe);this.iframe=null}if(this._checkUrlInterval)clearInterval(this._checkUrlInterval);B.started=false},route:function(t,e){this.handlers.unshift({route:t,callback:e})},checkUrl:function(t){var e=this.getFragment();if(e===this.fragment&&this.iframe){e=this.getHash(this.iframe.contentWindow)}if(e===this.fragment)return false;if(this.iframe)this.navigate(e);this.loadUrl()},loadUrl:function(t){if(!this.matchRoot())return false;t=this.fragment=this.getFragment(t);return i.some(this.handlers,function(e){if(e.route.test(t)){e.callback(t);return true}})},navigate:function(t,e){if(!B.started)return false;if(!e||e===true)e={trigger:!!e};t=this.getFragment(t||"");var i=this.root;if(t===""||t.charAt(0)==="?"){i=i.slice(0,-1)||"/"}var n=i+t;t=t.replace(W,"");var r=this.decodeFragment(t);if(this.fragment===r)return;this.fragment=r;if(this._usePushState){this.history[e.replace?"replaceState":"pushState"]({},document.title,n)}else if(this._wantsHashChange){this._updateHash(this.location,t,e.replace);if(this.iframe&&t!==this.getHash(this.iframe.contentWindow)){var s=this.iframe.contentWindow;if(!e.replace){s.document.open();s.document.close()}this._updateHash(s.location,t,e.replace)}}else{return this.location.assign(n)}if(e.trigger)return this.loadUrl(t)},_updateHash:function(t,e,i){if(i){var n=t.href.replace(/(javascript:|#).*$/,"");t.replace(n+"#"+e)}else{t.hash="#"+e}}});e.history=new B;var D=function(t,e){var n=this;var r;if(t&&i.has(t,"constructor")){r=t.constructor}else{r=function(){return n.apply(this,arguments)}}i.extend(r,n,e);r.prototype=i.create(n.prototype,t);r.prototype.constructor=r;r.__super__=n.prototype;return r};m.extend=_.extend=O.extend=T.extend=B.extend=D;var V=function(){throw new Error('A "url" property or function must be specified')};var G=function(t,e){var i=e.error;e.error=function(n){if(i)i.call(e.context,t,n,e);t.trigger("error",t,n,e)}};return e}); \ No newline at end of file diff --git a/libraries/bowser.js b/libraries/bowser.js index 6cd1e3b..904817f 100644 --- a/libraries/bowser.js +++ b/libraries/bowser.js @@ -1,2 +1,2 @@ -/** Bowser - a browser detector - v2.10.0 https://github.com/lancedikson/bowser MIT License */ -!function(t,n){"object"==typeof exports&&"object"==typeof module?module.exports=n():"function"==typeof define&&define.amd?define([],n):"object"==typeof exports?exports.bowser=n():t.bowser=n()}(this,(function(){return function(t){var n={};function e(r){if(n[r])return n[r].exports;var i=n[r]={i:r,l:!1,exports:{}};return t[r].call(i.exports,i,i.exports,e),i.l=!0,i.exports}return e.m=t,e.c=n,e.d=function(t,n,r){e.o(t,n)||Object.defineProperty(t,n,{enumerable:!0,get:r})},e.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},e.t=function(t,n){if(1&n&&(t=e(t)),8&n)return t;if(4&n&&"object"==typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(e.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&n&&"string"!=typeof t)for(var i in t)e.d(r,i,function(n){return t[n]}.bind(null,i));return r},e.n=function(t){var n=t&&t.__esModule?function(){return t.default}:function(){return t};return e.d(n,"a",n),n},e.o=function(t,n){return Object.prototype.hasOwnProperty.call(t,n)},e.p="",e(e.s=129)}([function(t,n,e){var r=e(1),i=e(7),o=e(14),u=e(11),a=e(19),c=function(t,n,e){var s,f,l,h,d=t&c.F,p=t&c.G,v=t&c.S,g=t&c.P,y=t&c.B,m=p?r:v?r[n]||(r[n]={}):(r[n]||{}).prototype,b=p?i:i[n]||(i[n]={}),S=b.prototype||(b.prototype={});for(s in p&&(e=n),e)l=((f=!d&&m&&void 0!==m[s])?m:e)[s],h=y&&f?a(l,r):g&&"function"==typeof l?a(Function.call,l):l,m&&u(m,s,l,t&c.U),b[s]!=l&&o(b,s,h),g&&S[s]!=l&&(S[s]=l)};r.core=i,c.F=1,c.G=2,c.S=4,c.P=8,c.B=16,c.W=32,c.U=64,c.R=128,t.exports=c},function(t,n){var e=t.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=e)},function(t,n){t.exports=function(t){try{return!!t()}catch(t){return!0}}},function(t,n,e){var r=e(4);t.exports=function(t){if(!r(t))throw TypeError(t+" is not an object!");return t}},function(t,n){t.exports=function(t){return"object"==typeof t?null!==t:"function"==typeof t}},function(t,n,e){var r=e(50)("wks"),i=e(31),o=e(1).Symbol,u="function"==typeof o;(t.exports=function(t){return r[t]||(r[t]=u&&o[t]||(u?o:i)("Symbol."+t))}).store=r},function(t,n,e){var r=e(21),i=Math.min;t.exports=function(t){return t>0?i(r(t),9007199254740991):0}},function(t,n){var e=t.exports={version:"2.6.9"};"number"==typeof __e&&(__e=e)},function(t,n,e){t.exports=!e(2)((function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a}))},function(t,n,e){var r=e(3),i=e(96),o=e(28),u=Object.defineProperty;n.f=e(8)?Object.defineProperty:function(t,n,e){if(r(t),n=o(n,!0),r(e),i)try{return u(t,n,e)}catch(t){}if("get"in e||"set"in e)throw TypeError("Accessors not supported!");return"value"in e&&(t[n]=e.value),t}},function(t,n,e){var r=e(26);t.exports=function(t){return Object(r(t))}},function(t,n,e){var r=e(1),i=e(14),o=e(13),u=e(31)("src"),a=e(134),c=(""+a).split("toString");e(7).inspectSource=function(t){return a.call(t)},(t.exports=function(t,n,e,a){var s="function"==typeof e;s&&(o(e,"name")||i(e,"name",n)),t[n]!==e&&(s&&(o(e,u)||i(e,u,t[n]?""+t[n]:c.join(String(n)))),t===r?t[n]=e:a?t[n]?t[n]=e:i(t,n,e):(delete t[n],i(t,n,e)))})(Function.prototype,"toString",(function(){return"function"==typeof this&&this[u]||a.call(this)}))},function(t,n,e){var r=e(0),i=e(2),o=e(26),u=/"/g,a=function(t,n,e,r){var i=String(o(t)),a="<"+n;return""!==e&&(a+=" "+e+'="'+String(r).replace(u,""")+'"'),a+">"+i+""};t.exports=function(t,n){var e={};e[t]=n(a),r(r.P+r.F*i((function(){var n=""[t]('"');return n!==n.toLowerCase()||n.split('"').length>3})),"String",e)}},function(t,n){var e={}.hasOwnProperty;t.exports=function(t,n){return e.call(t,n)}},function(t,n,e){var r=e(9),i=e(30);t.exports=e(8)?function(t,n,e){return r.f(t,n,i(1,e))}:function(t,n,e){return t[n]=e,t}},function(t,n,e){var r=e(46),i=e(26);t.exports=function(t){return r(i(t))}},function(t,n,e){"use strict";var r=e(2);t.exports=function(t,n){return!!t&&r((function(){n?t.call(null,(function(){}),1):t.call(null)}))}},function(t,n,e){"use strict";n.__esModule=!0,n.default=void 0;var r=e(18),i=function(){function t(){}return t.getFirstMatch=function(t,n){var e=n.match(t);return e&&e.length>0&&e[1]||""},t.getSecondMatch=function(t,n){var e=n.match(t);return e&&e.length>1&&e[2]||""},t.matchAndReturnConst=function(t,n,e){if(t.test(n))return e},t.getWindowsVersionName=function(t){switch(t){case"NT":return"NT";case"XP":return"XP";case"NT 5.0":return"2000";case"NT 5.1":return"XP";case"NT 5.2":return"2003";case"NT 6.0":return"Vista";case"NT 6.1":return"7";case"NT 6.2":return"8";case"NT 6.3":return"8.1";case"NT 10.0":return"10";default:return}},t.getMacOSVersionName=function(t){var n=t.split(".").splice(0,2).map((function(t){return parseInt(t,10)||0}));if(n.push(0),10===n[0])switch(n[1]){case 5:return"Leopard";case 6:return"Snow Leopard";case 7:return"Lion";case 8:return"Mountain Lion";case 9:return"Mavericks";case 10:return"Yosemite";case 11:return"El Capitan";case 12:return"Sierra";case 13:return"High Sierra";case 14:return"Mojave";case 15:return"Catalina";default:return}},t.getAndroidVersionName=function(t){var n=t.split(".").splice(0,2).map((function(t){return parseInt(t,10)||0}));if(n.push(0),!(1===n[0]&&n[1]<5))return 1===n[0]&&n[1]<6?"Cupcake":1===n[0]&&n[1]>=6?"Donut":2===n[0]&&n[1]<2?"Eclair":2===n[0]&&2===n[1]?"Froyo":2===n[0]&&n[1]>2?"Gingerbread":3===n[0]?"Honeycomb":4===n[0]&&n[1]<1?"Ice Cream Sandwich":4===n[0]&&n[1]<4?"Jelly Bean":4===n[0]&&n[1]>=4?"KitKat":5===n[0]?"Lollipop":6===n[0]?"Marshmallow":7===n[0]?"Nougat":8===n[0]?"Oreo":9===n[0]?"Pie":void 0},t.getVersionPrecision=function(t){return t.split(".").length},t.compareVersions=function(n,e,r){void 0===r&&(r=!1);var i=t.getVersionPrecision(n),o=t.getVersionPrecision(e),u=Math.max(i,o),a=0,c=t.map([n,e],(function(n){var e=u-t.getVersionPrecision(n),r=n+new Array(e+1).join(".0");return t.map(r.split("."),(function(t){return new Array(20-t.length).join("0")+t})).reverse()}));for(r&&(a=u-Math.min(i,o)),u-=1;u>=a;){if(c[0][u]>c[1][u])return 1;if(c[0][u]===c[1][u]){if(u===a)return 0;u-=1}else if(c[0][u]1?i-1:0),u=1;u0?r:e)(t)}},function(t,n,e){var r=e(47),i=e(30),o=e(15),u=e(28),a=e(13),c=e(96),s=Object.getOwnPropertyDescriptor;n.f=e(8)?s:function(t,n){if(t=o(t),n=u(n,!0),c)try{return s(t,n)}catch(t){}if(a(t,n))return i(!r.f.call(t,n),t[n])}},function(t,n,e){var r=e(0),i=e(7),o=e(2);t.exports=function(t,n){var e=(i.Object||{})[t]||Object[t],u={};u[t]=n(e),r(r.S+r.F*o((function(){e(1)})),"Object",u)}},function(t,n,e){var r=e(19),i=e(46),o=e(10),u=e(6),a=e(112);t.exports=function(t,n){var e=1==t,c=2==t,s=3==t,f=4==t,l=6==t,h=5==t||l,d=n||a;return function(n,a,p){for(var v,g,y=o(n),m=i(y),b=r(a,p,3),S=u(m.length),w=0,_=e?d(n,S):c?d(n,0):void 0;S>w;w++)if((h||w in m)&&(g=b(v=m[w],w,y),t))if(e)_[w]=g;else if(g)switch(t){case 3:return!0;case 5:return v;case 6:return w;case 2:_.push(v)}else if(f)return!1;return l?-1:s||f?f:_}}},function(t,n){var e={}.toString;t.exports=function(t){return e.call(t).slice(8,-1)}},function(t,n){t.exports=function(t){if(null==t)throw TypeError("Can't call method on "+t);return t}},function(t,n,e){"use strict";if(e(8)){var r=e(32),i=e(1),o=e(2),u=e(0),a=e(61),c=e(86),s=e(19),f=e(44),l=e(30),h=e(14),d=e(45),p=e(21),v=e(6),g=e(123),y=e(34),m=e(28),b=e(13),S=e(48),w=e(4),_=e(10),M=e(78),x=e(35),P=e(37),O=e(36).f,F=e(80),A=e(31),E=e(5),N=e(24),R=e(51),k=e(49),T=e(82),I=e(42),j=e(54),L=e(43),B=e(81),C=e(114),W=e(9),V=e(22),G=W.f,D=V.f,U=i.RangeError,z=i.TypeError,q=i.Uint8Array,K=Array.prototype,Y=c.ArrayBuffer,Q=c.DataView,H=N(0),J=N(2),X=N(3),Z=N(4),$=N(5),tt=N(6),nt=R(!0),et=R(!1),rt=T.values,it=T.keys,ot=T.entries,ut=K.lastIndexOf,at=K.reduce,ct=K.reduceRight,st=K.join,ft=K.sort,lt=K.slice,ht=K.toString,dt=K.toLocaleString,pt=E("iterator"),vt=E("toStringTag"),gt=A("typed_constructor"),yt=A("def_constructor"),mt=a.CONSTR,bt=a.TYPED,St=a.VIEW,wt=N(1,(function(t,n){return Ot(k(t,t[yt]),n)})),_t=o((function(){return 1===new q(new Uint16Array([1]).buffer)[0]})),Mt=!!q&&!!q.prototype.set&&o((function(){new q(1).set({})})),xt=function(t,n){var e=p(t);if(e<0||e%n)throw U("Wrong offset!");return e},Pt=function(t){if(w(t)&&bt in t)return t;throw z(t+" is not a typed array!")},Ot=function(t,n){if(!(w(t)&> in t))throw z("It is not a typed array constructor!");return new t(n)},Ft=function(t,n){return At(k(t,t[yt]),n)},At=function(t,n){for(var e=0,r=n.length,i=Ot(t,r);r>e;)i[e]=n[e++];return i},Et=function(t,n,e){G(t,n,{get:function(){return this._d[e]}})},Nt=function(t){var n,e,r,i,o,u,a=_(t),c=arguments.length,f=c>1?arguments[1]:void 0,l=void 0!==f,h=F(a);if(null!=h&&!M(h)){for(u=h.call(a),r=[],n=0;!(o=u.next()).done;n++)r.push(o.value);a=r}for(l&&c>2&&(f=s(f,arguments[2],2)),n=0,e=v(a.length),i=Ot(this,e);e>n;n++)i[n]=l?f(a[n],n):a[n];return i},Rt=function(){for(var t=0,n=arguments.length,e=Ot(this,n);n>t;)e[t]=arguments[t++];return e},kt=!!q&&o((function(){dt.call(new q(1))})),Tt=function(){return dt.apply(kt?lt.call(Pt(this)):Pt(this),arguments)},It={copyWithin:function(t,n){return C.call(Pt(this),t,n,arguments.length>2?arguments[2]:void 0)},every:function(t){return Z(Pt(this),t,arguments.length>1?arguments[1]:void 0)},fill:function(t){return B.apply(Pt(this),arguments)},filter:function(t){return Ft(this,J(Pt(this),t,arguments.length>1?arguments[1]:void 0))},find:function(t){return $(Pt(this),t,arguments.length>1?arguments[1]:void 0)},findIndex:function(t){return tt(Pt(this),t,arguments.length>1?arguments[1]:void 0)},forEach:function(t){H(Pt(this),t,arguments.length>1?arguments[1]:void 0)},indexOf:function(t){return et(Pt(this),t,arguments.length>1?arguments[1]:void 0)},includes:function(t){return nt(Pt(this),t,arguments.length>1?arguments[1]:void 0)},join:function(t){return st.apply(Pt(this),arguments)},lastIndexOf:function(t){return ut.apply(Pt(this),arguments)},map:function(t){return wt(Pt(this),t,arguments.length>1?arguments[1]:void 0)},reduce:function(t){return at.apply(Pt(this),arguments)},reduceRight:function(t){return ct.apply(Pt(this),arguments)},reverse:function(){for(var t,n=Pt(this).length,e=Math.floor(n/2),r=0;r1?arguments[1]:void 0)},sort:function(t){return ft.call(Pt(this),t)},subarray:function(t,n){var e=Pt(this),r=e.length,i=y(t,r);return new(k(e,e[yt]))(e.buffer,e.byteOffset+i*e.BYTES_PER_ELEMENT,v((void 0===n?r:y(n,r))-i))}},jt=function(t,n){return Ft(this,lt.call(Pt(this),t,n))},Lt=function(t){Pt(this);var n=xt(arguments[1],1),e=this.length,r=_(t),i=v(r.length),o=0;if(i+n>e)throw U("Wrong length!");for(;o255?255:255&r),i.v[d](e*n+i.o,r,_t)}(this,e,t)},enumerable:!0})};b?(p=e((function(t,e,r,i){f(t,p,s,"_d");var o,u,a,c,l=0,d=0;if(w(e)){if(!(e instanceof Y||"ArrayBuffer"==(c=S(e))||"SharedArrayBuffer"==c))return bt in e?At(p,e):Nt.call(p,e);o=e,d=xt(r,n);var y=e.byteLength;if(void 0===i){if(y%n)throw U("Wrong length!");if((u=y-d)<0)throw U("Wrong length!")}else if((u=v(i)*n)+d>y)throw U("Wrong length!");a=u/n}else a=g(e),o=new Y(u=a*n);for(h(t,"_d",{b:o,o:d,l:u,e:a,v:new Q(o)});ldocument.F=Object<\/script>"),t.close(),c=t.F;r--;)delete c.prototype[o[r]];return c()};t.exports=Object.create||function(t,n){var e;return null!==t?(a.prototype=r(t),e=new a,a.prototype=null,e[u]=t):e=c(),void 0===n?e:i(e,n)}},function(t,n,e){var r=e(98),i=e(65).concat("length","prototype");n.f=Object.getOwnPropertyNames||function(t){return r(t,i)}},function(t,n,e){var r=e(13),i=e(10),o=e(64)("IE_PROTO"),u=Object.prototype;t.exports=Object.getPrototypeOf||function(t){return t=i(t),r(t,o)?t[o]:"function"==typeof t.constructor&&t instanceof t.constructor?t.constructor.prototype:t instanceof Object?u:null}},function(t,n,e){var r=e(5)("unscopables"),i=Array.prototype;null==i[r]&&e(14)(i,r,{}),t.exports=function(t){i[r][t]=!0}},function(t,n,e){var r=e(4);t.exports=function(t,n){if(!r(t)||t._t!==n)throw TypeError("Incompatible receiver, "+n+" required!");return t}},function(t,n,e){var r=e(9).f,i=e(13),o=e(5)("toStringTag");t.exports=function(t,n,e){t&&!i(t=e?t:t.prototype,o)&&r(t,o,{configurable:!0,value:n})}},function(t,n,e){var r=e(0),i=e(26),o=e(2),u=e(68),a="["+u+"]",c=RegExp("^"+a+a+"*"),s=RegExp(a+a+"*$"),f=function(t,n,e){var i={},a=o((function(){return!!u[t]()||"​…"!="​…"[t]()})),c=i[t]=a?n(l):u[t];e&&(i[e]=c),r(r.P+r.F*a,"String",i)},l=f.trim=function(t,n){return t=String(i(t)),1&n&&(t=t.replace(c,"")),2&n&&(t=t.replace(s,"")),t};t.exports=f},function(t,n){t.exports={}},function(t,n,e){"use strict";var r=e(1),i=e(9),o=e(8),u=e(5)("species");t.exports=function(t){var n=r[t];o&&n&&!n[u]&&i.f(n,u,{configurable:!0,get:function(){return this}})}},function(t,n){t.exports=function(t,n,e,r){if(!(t instanceof n)||void 0!==r&&r in t)throw TypeError(e+": incorrect invocation!");return t}},function(t,n,e){var r=e(11);t.exports=function(t,n,e){for(var i in n)r(t,i,n[i],e);return t}},function(t,n,e){var r=e(25);t.exports=Object("z").propertyIsEnumerable(0)?Object:function(t){return"String"==r(t)?t.split(""):Object(t)}},function(t,n){n.f={}.propertyIsEnumerable},function(t,n,e){var r=e(25),i=e(5)("toStringTag"),o="Arguments"==r(function(){return arguments}());t.exports=function(t){var n,e,u;return void 0===t?"Undefined":null===t?"Null":"string"==typeof(e=function(t,n){try{return t[n]}catch(t){}}(n=Object(t),i))?e:o?r(n):"Object"==(u=r(n))&&"function"==typeof n.callee?"Arguments":u}},function(t,n,e){var r=e(3),i=e(20),o=e(5)("species");t.exports=function(t,n){var e,u=r(t).constructor;return void 0===u||null==(e=r(u)[o])?n:i(e)}},function(t,n,e){var r=e(7),i=e(1),o=i["__core-js_shared__"]||(i["__core-js_shared__"]={});(t.exports=function(t,n){return o[t]||(o[t]=void 0!==n?n:{})})("versions",[]).push({version:r.version,mode:e(32)?"pure":"global",copyright:"© 2019 Denis Pushkarev (zloirock.ru)"})},function(t,n,e){var r=e(15),i=e(6),o=e(34);t.exports=function(t){return function(n,e,u){var a,c=r(n),s=i(c.length),f=o(u,s);if(t&&e!=e){for(;s>f;)if((a=c[f++])!=a)return!0}else for(;s>f;f++)if((t||f in c)&&c[f]===e)return t||f||0;return!t&&-1}}},function(t,n){n.f=Object.getOwnPropertySymbols},function(t,n,e){var r=e(25);t.exports=Array.isArray||function(t){return"Array"==r(t)}},function(t,n,e){var r=e(5)("iterator"),i=!1;try{var o=[7][r]();o.return=function(){i=!0},Array.from(o,(function(){throw 2}))}catch(t){}t.exports=function(t,n){if(!n&&!i)return!1;var e=!1;try{var o=[7],u=o[r]();u.next=function(){return{done:e=!0}},o[r]=function(){return u},t(o)}catch(t){}return e}},function(t,n,e){"use strict";var r=e(3);t.exports=function(){var t=r(this),n="";return t.global&&(n+="g"),t.ignoreCase&&(n+="i"),t.multiline&&(n+="m"),t.unicode&&(n+="u"),t.sticky&&(n+="y"),n}},function(t,n,e){"use strict";var r=e(48),i=RegExp.prototype.exec;t.exports=function(t,n){var e=t.exec;if("function"==typeof e){var o=e.call(t,n);if("object"!=typeof o)throw new TypeError("RegExp exec method returned something other than an Object or null");return o}if("RegExp"!==r(t))throw new TypeError("RegExp#exec called on incompatible receiver");return i.call(t,n)}},function(t,n,e){"use strict";e(116);var r=e(11),i=e(14),o=e(2),u=e(26),a=e(5),c=e(83),s=a("species"),f=!o((function(){var t=/./;return t.exec=function(){var t=[];return t.groups={a:"7"},t},"7"!=="".replace(t,"$")})),l=function(){var t=/(?:)/,n=t.exec;t.exec=function(){return n.apply(this,arguments)};var e="ab".split(t);return 2===e.length&&"a"===e[0]&&"b"===e[1]}();t.exports=function(t,n,e){var h=a(t),d=!o((function(){var n={};return n[h]=function(){return 7},7!=""[t](n)})),p=d?!o((function(){var n=!1,e=/a/;return e.exec=function(){return n=!0,null},"split"===t&&(e.constructor={},e.constructor[s]=function(){return e}),e[h](""),!n})):void 0;if(!d||!p||"replace"===t&&!f||"split"===t&&!l){var v=/./[h],g=e(u,h,""[t],(function(t,n,e,r,i){return n.exec===c?d&&!i?{done:!0,value:v.call(n,e,r)}:{done:!0,value:t.call(e,n,r)}:{done:!1}})),y=g[0],m=g[1];r(String.prototype,t,y),i(RegExp.prototype,h,2==n?function(t,n){return m.call(t,this,n)}:function(t){return m.call(t,this)})}}},function(t,n,e){var r=e(19),i=e(111),o=e(78),u=e(3),a=e(6),c=e(80),s={},f={};(n=t.exports=function(t,n,e,l,h){var d,p,v,g,y=h?function(){return t}:c(t),m=r(e,l,n?2:1),b=0;if("function"!=typeof y)throw TypeError(t+" is not iterable!");if(o(y)){for(d=a(t.length);d>b;b++)if((g=n?m(u(p=t[b])[0],p[1]):m(t[b]))===s||g===f)return g}else for(v=y.call(t);!(p=v.next()).done;)if((g=i(v,m,p.value,n))===s||g===f)return g}).BREAK=s,n.RETURN=f},function(t,n,e){var r=e(1).navigator;t.exports=r&&r.userAgent||""},function(t,n,e){"use strict";var r=e(1),i=e(0),o=e(11),u=e(45),a=e(29),c=e(58),s=e(44),f=e(4),l=e(2),h=e(54),d=e(40),p=e(69);t.exports=function(t,n,e,v,g,y){var m=r[t],b=m,S=g?"set":"add",w=b&&b.prototype,_={},M=function(t){var n=w[t];o(w,t,"delete"==t?function(t){return!(y&&!f(t))&&n.call(this,0===t?0:t)}:"has"==t?function(t){return!(y&&!f(t))&&n.call(this,0===t?0:t)}:"get"==t?function(t){return y&&!f(t)?void 0:n.call(this,0===t?0:t)}:"add"==t?function(t){return n.call(this,0===t?0:t),this}:function(t,e){return n.call(this,0===t?0:t,e),this})};if("function"==typeof b&&(y||w.forEach&&!l((function(){(new b).entries().next()})))){var x=new b,P=x[S](y?{}:-0,1)!=x,O=l((function(){x.has(1)})),F=h((function(t){new b(t)})),A=!y&&l((function(){for(var t=new b,n=5;n--;)t[S](n,n);return!t.has(-0)}));F||((b=n((function(n,e){s(n,b,t);var r=p(new m,n,b);return null!=e&&c(e,g,r[S],r),r}))).prototype=w,w.constructor=b),(O||A)&&(M("delete"),M("has"),g&&M("get")),(A||P)&&M(S),y&&w.clear&&delete w.clear}else b=v.getConstructor(n,t,g,S),u(b.prototype,e),a.NEED=!0;return d(b,t),_[t]=b,i(i.G+i.W+i.F*(b!=m),_),y||v.setStrong(b,t,g),b}},function(t,n,e){for(var r,i=e(1),o=e(14),u=e(31),a=u("typed_array"),c=u("view"),s=!(!i.ArrayBuffer||!i.DataView),f=s,l=0,h="Int8Array,Uint8Array,Uint8ClampedArray,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array".split(",");l<9;)(r=i[h[l++]])?(o(r.prototype,a,!0),o(r.prototype,c,!0)):f=!1;t.exports={ABV:s,CONSTR:f,TYPED:a,VIEW:c}},function(t,n,e){var r=e(4),i=e(1).document,o=r(i)&&r(i.createElement);t.exports=function(t){return o?i.createElement(t):{}}},function(t,n,e){n.f=e(5)},function(t,n,e){var r=e(50)("keys"),i=e(31);t.exports=function(t){return r[t]||(r[t]=i(t))}},function(t,n){t.exports="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(",")},function(t,n,e){var r=e(1).document;t.exports=r&&r.documentElement},function(t,n,e){var r=e(4),i=e(3),o=function(t,n){if(i(t),!r(n)&&null!==n)throw TypeError(n+": can't set as prototype!")};t.exports={set:Object.setPrototypeOf||("__proto__"in{}?function(t,n,r){try{(r=e(19)(Function.call,e(22).f(Object.prototype,"__proto__").set,2))(t,[]),n=!(t instanceof Array)}catch(t){n=!0}return function(t,e){return o(t,e),n?t.__proto__=e:r(t,e),t}}({},!1):void 0),check:o}},function(t,n){t.exports="\t\n\v\f\r   ᠎              \u2028\u2029\ufeff"},function(t,n,e){var r=e(4),i=e(67).set;t.exports=function(t,n,e){var o,u=n.constructor;return u!==e&&"function"==typeof u&&(o=u.prototype)!==e.prototype&&r(o)&&i&&i(t,o),t}},function(t,n,e){"use strict";var r=e(21),i=e(26);t.exports=function(t){var n=String(i(this)),e="",o=r(t);if(o<0||o==1/0)throw RangeError("Count can't be negative");for(;o>0;(o>>>=1)&&(n+=n))1&o&&(e+=n);return e}},function(t,n){t.exports=Math.sign||function(t){return 0==(t=+t)||t!=t?t:t<0?-1:1}},function(t,n){var e=Math.expm1;t.exports=!e||e(10)>22025.465794806718||e(10)<22025.465794806718||-2e-17!=e(-2e-17)?function(t){return 0==(t=+t)?t:t>-1e-6&&t<1e-6?t+t*t/2:Math.exp(t)-1}:e},function(t,n,e){var r=e(21),i=e(26);t.exports=function(t){return function(n,e){var o,u,a=String(i(n)),c=r(e),s=a.length;return c<0||c>=s?t?"":void 0:(o=a.charCodeAt(c))<55296||o>56319||c+1===s||(u=a.charCodeAt(c+1))<56320||u>57343?t?a.charAt(c):o:t?a.slice(c,c+2):u-56320+(o-55296<<10)+65536}}},function(t,n,e){"use strict";var r=e(32),i=e(0),o=e(11),u=e(14),a=e(42),c=e(110),s=e(40),f=e(37),l=e(5)("iterator"),h=!([].keys&&"next"in[].keys()),d=function(){return this};t.exports=function(t,n,e,p,v,g,y){c(e,n,p);var m,b,S,w=function(t){if(!h&&t in P)return P[t];switch(t){case"keys":case"values":return function(){return new e(this,t)}}return function(){return new e(this,t)}},_=n+" Iterator",M="values"==v,x=!1,P=t.prototype,O=P[l]||P["@@iterator"]||v&&P[v],F=O||w(v),A=v?M?w("entries"):F:void 0,E="Array"==n&&P.entries||O;if(E&&(S=f(E.call(new t)))!==Object.prototype&&S.next&&(s(S,_,!0),r||"function"==typeof S[l]||u(S,l,d)),M&&O&&"values"!==O.name&&(x=!0,F=function(){return O.call(this)}),r&&!y||!h&&!x&&P[l]||u(P,l,F),a[n]=F,a[_]=d,v)if(m={values:M?F:w("values"),keys:g?F:w("keys"),entries:A},y)for(b in m)b in P||o(P,b,m[b]);else i(i.P+i.F*(h||x),n,m);return m}},function(t,n,e){var r=e(76),i=e(26);t.exports=function(t,n,e){if(r(n))throw TypeError("String#"+e+" doesn't accept regex!");return String(i(t))}},function(t,n,e){var r=e(4),i=e(25),o=e(5)("match");t.exports=function(t){var n;return r(t)&&(void 0!==(n=t[o])?!!n:"RegExp"==i(t))}},function(t,n,e){var r=e(5)("match");t.exports=function(t){var n=/./;try{"/./"[t](n)}catch(e){try{return n[r]=!1,!"/./"[t](n)}catch(t){}}return!0}},function(t,n,e){var r=e(42),i=e(5)("iterator"),o=Array.prototype;t.exports=function(t){return void 0!==t&&(r.Array===t||o[i]===t)}},function(t,n,e){"use strict";var r=e(9),i=e(30);t.exports=function(t,n,e){n in t?r.f(t,n,i(0,e)):t[n]=e}},function(t,n,e){var r=e(48),i=e(5)("iterator"),o=e(42);t.exports=e(7).getIteratorMethod=function(t){if(null!=t)return t[i]||t["@@iterator"]||o[r(t)]}},function(t,n,e){"use strict";var r=e(10),i=e(34),o=e(6);t.exports=function(t){for(var n=r(this),e=o(n.length),u=arguments.length,a=i(u>1?arguments[1]:void 0,e),c=u>2?arguments[2]:void 0,s=void 0===c?e:i(c,e);s>a;)n[a++]=t;return n}},function(t,n,e){"use strict";var r=e(38),i=e(115),o=e(42),u=e(15);t.exports=e(74)(Array,"Array",(function(t,n){this._t=u(t),this._i=0,this._k=n}),(function(){var t=this._t,n=this._k,e=this._i++;return!t||e>=t.length?(this._t=void 0,i(1)):i(0,"keys"==n?e:"values"==n?t[e]:[e,t[e]])}),"values"),o.Arguments=o.Array,r("keys"),r("values"),r("entries")},function(t,n,e){"use strict";var r,i,o=e(55),u=RegExp.prototype.exec,a=String.prototype.replace,c=u,s=(r=/a/,i=/b*/g,u.call(r,"a"),u.call(i,"a"),0!==r.lastIndex||0!==i.lastIndex),f=void 0!==/()??/.exec("")[1];(s||f)&&(c=function(t){var n,e,r,i,c=this;return f&&(e=new RegExp("^"+c.source+"$(?!\\s)",o.call(c))),s&&(n=c.lastIndex),r=u.call(c,t),s&&r&&(c.lastIndex=c.global?r.index+r[0].length:n),f&&r&&r.length>1&&a.call(r[0],e,(function(){for(i=1;ie;)n.push(arguments[e++]);return y[++g]=function(){a("function"==typeof t?t:Function(t),n)},r(g),g},d=function(t){delete y[t]},"process"==e(25)(l)?r=function(t){l.nextTick(u(m,t,1))}:v&&v.now?r=function(t){v.now(u(m,t,1))}:p?(o=(i=new p).port2,i.port1.onmessage=b,r=u(o.postMessage,o,1)):f.addEventListener&&"function"==typeof postMessage&&!f.importScripts?(r=function(t){f.postMessage(t+"","*")},f.addEventListener("message",b,!1)):r="onreadystatechange"in s("script")?function(t){c.appendChild(s("script")).onreadystatechange=function(){c.removeChild(this),m.call(t)}}:function(t){setTimeout(u(m,t,1),0)}),t.exports={set:h,clear:d}},function(t,n,e){"use strict";var r=e(1),i=e(8),o=e(32),u=e(61),a=e(14),c=e(45),s=e(2),f=e(44),l=e(21),h=e(6),d=e(123),p=e(36).f,v=e(9).f,g=e(81),y=e(40),m="prototype",b="Wrong index!",S=r.ArrayBuffer,w=r.DataView,_=r.Math,M=r.RangeError,x=r.Infinity,P=S,O=_.abs,F=_.pow,A=_.floor,E=_.log,N=_.LN2,R=i?"_b":"buffer",k=i?"_l":"byteLength",T=i?"_o":"byteOffset";function I(t,n,e){var r,i,o,u=new Array(e),a=8*e-n-1,c=(1<>1,f=23===n?F(2,-24)-F(2,-77):0,l=0,h=t<0||0===t&&1/t<0?1:0;for((t=O(t))!=t||t===x?(i=t!=t?1:0,r=c):(r=A(E(t)/N),t*(o=F(2,-r))<1&&(r--,o*=2),(t+=r+s>=1?f/o:f*F(2,1-s))*o>=2&&(r++,o/=2),r+s>=c?(i=0,r=c):r+s>=1?(i=(t*o-1)*F(2,n),r+=s):(i=t*F(2,s-1)*F(2,n),r=0));n>=8;u[l++]=255&i,i/=256,n-=8);for(r=r<0;u[l++]=255&r,r/=256,a-=8);return u[--l]|=128*h,u}function j(t,n,e){var r,i=8*e-n-1,o=(1<>1,a=i-7,c=e-1,s=t[c--],f=127&s;for(s>>=7;a>0;f=256*f+t[c],c--,a-=8);for(r=f&(1<<-a)-1,f>>=-a,a+=n;a>0;r=256*r+t[c],c--,a-=8);if(0===f)f=1-u;else{if(f===o)return r?NaN:s?-x:x;r+=F(2,n),f-=u}return(s?-1:1)*r*F(2,f-n)}function L(t){return t[3]<<24|t[2]<<16|t[1]<<8|t[0]}function B(t){return[255&t]}function C(t){return[255&t,t>>8&255]}function W(t){return[255&t,t>>8&255,t>>16&255,t>>24&255]}function V(t){return I(t,52,8)}function G(t){return I(t,23,4)}function D(t,n,e){v(t[m],n,{get:function(){return this[e]}})}function U(t,n,e,r){var i=d(+e);if(i+n>t[k])throw M(b);var o=t[R]._b,u=i+t[T],a=o.slice(u,u+n);return r?a:a.reverse()}function z(t,n,e,r,i,o){var u=d(+e);if(u+n>t[k])throw M(b);for(var a=t[R]._b,c=u+t[T],s=r(+i),f=0;fQ;)(q=Y[Q++])in S||a(S,q,P[q]);o||(K.constructor=S)}var H=new w(new S(2)),J=w[m].setInt8;H.setInt8(0,2147483648),H.setInt8(1,2147483649),!H.getInt8(0)&&H.getInt8(1)||c(w[m],{setInt8:function(t,n){J.call(this,t,n<<24>>24)},setUint8:function(t,n){J.call(this,t,n<<24>>24)}},!0)}else S=function(t){f(this,S,"ArrayBuffer");var n=d(t);this._b=g.call(new Array(n),0),this[k]=n},w=function(t,n,e){f(this,w,"DataView"),f(t,S,"DataView");var r=t[k],i=l(n);if(i<0||i>r)throw M("Wrong offset!");if(i+(e=void 0===e?r-i:h(e))>r)throw M("Wrong length!");this[R]=t,this[T]=i,this[k]=e},i&&(D(S,"byteLength","_l"),D(w,"buffer","_b"),D(w,"byteLength","_l"),D(w,"byteOffset","_o")),c(w[m],{getInt8:function(t){return U(this,1,t)[0]<<24>>24},getUint8:function(t){return U(this,1,t)[0]},getInt16:function(t){var n=U(this,2,t,arguments[1]);return(n[1]<<8|n[0])<<16>>16},getUint16:function(t){var n=U(this,2,t,arguments[1]);return n[1]<<8|n[0]},getInt32:function(t){return L(U(this,4,t,arguments[1]))},getUint32:function(t){return L(U(this,4,t,arguments[1]))>>>0},getFloat32:function(t){return j(U(this,4,t,arguments[1]),23,4)},getFloat64:function(t){return j(U(this,8,t,arguments[1]),52,8)},setInt8:function(t,n){z(this,1,t,B,n)},setUint8:function(t,n){z(this,1,t,B,n)},setInt16:function(t,n){z(this,2,t,C,n,arguments[2])},setUint16:function(t,n){z(this,2,t,C,n,arguments[2])},setInt32:function(t,n){z(this,4,t,W,n,arguments[2])},setUint32:function(t,n){z(this,4,t,W,n,arguments[2])},setFloat32:function(t,n){z(this,4,t,G,n,arguments[2])},setFloat64:function(t,n){z(this,8,t,V,n,arguments[2])}});y(S,"ArrayBuffer"),y(w,"DataView"),a(w[m],u.VIEW,!0),n.ArrayBuffer=S,n.DataView=w},function(t,n){var e=t.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=e)},function(t,n){t.exports=function(t){return"object"==typeof t?null!==t:"function"==typeof t}},function(t,n,e){t.exports=!e(128)((function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a}))},function(t,n,e){"use strict";n.__esModule=!0,n.default=void 0;var r,i=(r=e(91))&&r.__esModule?r:{default:r},o=e(18);function u(t,n){for(var e=0;e0){var u=Object.keys(e),c=a.default.find(u,(function(t){return n.isOS(t)}));if(c){var s=this.satisfies(e[c]);if(void 0!==s)return s}var f=a.default.find(u,(function(t){return n.isPlatform(t)}));if(f){var l=this.satisfies(e[f]);if(void 0!==l)return l}}if(o>0){var h=Object.keys(i),d=a.default.find(h,(function(t){return n.isBrowser(t,!0)}));if(void 0!==d)return this.compareVersion(i[d])}},n.isBrowser=function(t,n){void 0===n&&(n=!1);var e=this.getBrowserName().toLowerCase(),r=t.toLowerCase(),i=a.default.getBrowserTypeByAlias(r);return n&&i&&(r=i.toLowerCase()),r===e},n.compareVersion=function(t){var n=[0],e=t,r=!1,i=this.getBrowserVersion();if("string"==typeof i)return">"===t[0]||"<"===t[0]?(e=t.substr(1),"="===t[1]?(r=!0,e=t.substr(2)):n=[],">"===t[0]?n.push(1):n.push(-1)):"="===t[0]?e=t.substr(1):"~"===t[0]&&(r=!0,e=t.substr(1)),n.indexOf(a.default.compareVersions(i,e,r))>-1},n.isOS=function(t){return this.getOSName(!0)===String(t).toLowerCase()},n.isPlatform=function(t){return this.getPlatformType(!0)===String(t).toLowerCase()},n.isEngine=function(t){return this.getEngineName(!0)===String(t).toLowerCase()},n.is=function(t){return this.isBrowser(t)||this.isOS(t)||this.isPlatform(t)},n.some=function(t){var n=this;return void 0===t&&(t=[]),t.some((function(t){return n.is(t)}))},t}();n.default=s,t.exports=n.default},function(t,n,e){"use strict";n.__esModule=!0,n.default=void 0;var r,i=(r=e(17))&&r.__esModule?r:{default:r};var o=/version\/(\d+(\.?_?\d+)+)/i,u=[{test:[/googlebot/i],describe:function(t){var n={name:"Googlebot"},e=i.default.getFirstMatch(/googlebot\/(\d+(\.\d+))/i,t)||i.default.getFirstMatch(o,t);return e&&(n.version=e),n}},{test:[/opera/i],describe:function(t){var n={name:"Opera"},e=i.default.getFirstMatch(o,t)||i.default.getFirstMatch(/(?:opera)[\s/](\d+(\.?_?\d+)+)/i,t);return e&&(n.version=e),n}},{test:[/opr\/|opios/i],describe:function(t){var n={name:"Opera"},e=i.default.getFirstMatch(/(?:opr|opios)[\s/](\S+)/i,t)||i.default.getFirstMatch(o,t);return e&&(n.version=e),n}},{test:[/SamsungBrowser/i],describe:function(t){var n={name:"Samsung Internet for Android"},e=i.default.getFirstMatch(o,t)||i.default.getFirstMatch(/(?:SamsungBrowser)[\s/](\d+(\.?_?\d+)+)/i,t);return e&&(n.version=e),n}},{test:[/Whale/i],describe:function(t){var n={name:"NAVER Whale Browser"},e=i.default.getFirstMatch(o,t)||i.default.getFirstMatch(/(?:whale)[\s/](\d+(?:\.\d+)+)/i,t);return e&&(n.version=e),n}},{test:[/MZBrowser/i],describe:function(t){var n={name:"MZ Browser"},e=i.default.getFirstMatch(/(?:MZBrowser)[\s/](\d+(?:\.\d+)+)/i,t)||i.default.getFirstMatch(o,t);return e&&(n.version=e),n}},{test:[/focus/i],describe:function(t){var n={name:"Focus"},e=i.default.getFirstMatch(/(?:focus)[\s/](\d+(?:\.\d+)+)/i,t)||i.default.getFirstMatch(o,t);return e&&(n.version=e),n}},{test:[/swing/i],describe:function(t){var n={name:"Swing"},e=i.default.getFirstMatch(/(?:swing)[\s/](\d+(?:\.\d+)+)/i,t)||i.default.getFirstMatch(o,t);return e&&(n.version=e),n}},{test:[/coast/i],describe:function(t){var n={name:"Opera Coast"},e=i.default.getFirstMatch(o,t)||i.default.getFirstMatch(/(?:coast)[\s/](\d+(\.?_?\d+)+)/i,t);return e&&(n.version=e),n}},{test:[/opt\/\d+(?:.?_?\d+)+/i],describe:function(t){var n={name:"Opera Touch"},e=i.default.getFirstMatch(/(?:opt)[\s/](\d+(\.?_?\d+)+)/i,t)||i.default.getFirstMatch(o,t);return e&&(n.version=e),n}},{test:[/yabrowser/i],describe:function(t){var n={name:"Yandex Browser"},e=i.default.getFirstMatch(/(?:yabrowser)[\s/](\d+(\.?_?\d+)+)/i,t)||i.default.getFirstMatch(o,t);return e&&(n.version=e),n}},{test:[/ucbrowser/i],describe:function(t){var n={name:"UC Browser"},e=i.default.getFirstMatch(o,t)||i.default.getFirstMatch(/(?:ucbrowser)[\s/](\d+(\.?_?\d+)+)/i,t);return e&&(n.version=e),n}},{test:[/Maxthon|mxios/i],describe:function(t){var n={name:"Maxthon"},e=i.default.getFirstMatch(o,t)||i.default.getFirstMatch(/(?:Maxthon|mxios)[\s/](\d+(\.?_?\d+)+)/i,t);return e&&(n.version=e),n}},{test:[/epiphany/i],describe:function(t){var n={name:"Epiphany"},e=i.default.getFirstMatch(o,t)||i.default.getFirstMatch(/(?:epiphany)[\s/](\d+(\.?_?\d+)+)/i,t);return e&&(n.version=e),n}},{test:[/puffin/i],describe:function(t){var n={name:"Puffin"},e=i.default.getFirstMatch(o,t)||i.default.getFirstMatch(/(?:puffin)[\s/](\d+(\.?_?\d+)+)/i,t);return e&&(n.version=e),n}},{test:[/sleipnir/i],describe:function(t){var n={name:"Sleipnir"},e=i.default.getFirstMatch(o,t)||i.default.getFirstMatch(/(?:sleipnir)[\s/](\d+(\.?_?\d+)+)/i,t);return e&&(n.version=e),n}},{test:[/k-meleon/i],describe:function(t){var n={name:"K-Meleon"},e=i.default.getFirstMatch(o,t)||i.default.getFirstMatch(/(?:k-meleon)[\s/](\d+(\.?_?\d+)+)/i,t);return e&&(n.version=e),n}},{test:[/micromessenger/i],describe:function(t){var n={name:"WeChat"},e=i.default.getFirstMatch(/(?:micromessenger)[\s/](\d+(\.?_?\d+)+)/i,t)||i.default.getFirstMatch(o,t);return e&&(n.version=e),n}},{test:[/qqbrowser/i],describe:function(t){var n={name:/qqbrowserlite/i.test(t)?"QQ Browser Lite":"QQ Browser"},e=i.default.getFirstMatch(/(?:qqbrowserlite|qqbrowser)[/](\d+(\.?_?\d+)+)/i,t)||i.default.getFirstMatch(o,t);return e&&(n.version=e),n}},{test:[/msie|trident/i],describe:function(t){var n={name:"Internet Explorer"},e=i.default.getFirstMatch(/(?:msie |rv:)(\d+(\.?_?\d+)+)/i,t);return e&&(n.version=e),n}},{test:[/\sedg\//i],describe:function(t){var n={name:"Microsoft Edge"},e=i.default.getFirstMatch(/\sedg\/(\d+(\.?_?\d+)+)/i,t);return e&&(n.version=e),n}},{test:[/edg([ea]|ios)/i],describe:function(t){var n={name:"Microsoft Edge"},e=i.default.getSecondMatch(/edg([ea]|ios)\/(\d+(\.?_?\d+)+)/i,t);return e&&(n.version=e),n}},{test:[/vivaldi/i],describe:function(t){var n={name:"Vivaldi"},e=i.default.getFirstMatch(/vivaldi\/(\d+(\.?_?\d+)+)/i,t);return e&&(n.version=e),n}},{test:[/seamonkey/i],describe:function(t){var n={name:"SeaMonkey"},e=i.default.getFirstMatch(/seamonkey\/(\d+(\.?_?\d+)+)/i,t);return e&&(n.version=e),n}},{test:[/sailfish/i],describe:function(t){var n={name:"Sailfish"},e=i.default.getFirstMatch(/sailfish\s?browser\/(\d+(\.\d+)?)/i,t);return e&&(n.version=e),n}},{test:[/silk/i],describe:function(t){var n={name:"Amazon Silk"},e=i.default.getFirstMatch(/silk\/(\d+(\.?_?\d+)+)/i,t);return e&&(n.version=e),n}},{test:[/phantom/i],describe:function(t){var n={name:"PhantomJS"},e=i.default.getFirstMatch(/phantomjs\/(\d+(\.?_?\d+)+)/i,t);return e&&(n.version=e),n}},{test:[/slimerjs/i],describe:function(t){var n={name:"SlimerJS"},e=i.default.getFirstMatch(/slimerjs\/(\d+(\.?_?\d+)+)/i,t);return e&&(n.version=e),n}},{test:[/blackberry|\bbb\d+/i,/rim\stablet/i],describe:function(t){var n={name:"BlackBerry"},e=i.default.getFirstMatch(o,t)||i.default.getFirstMatch(/blackberry[\d]+\/(\d+(\.?_?\d+)+)/i,t);return e&&(n.version=e),n}},{test:[/(web|hpw)[o0]s/i],describe:function(t){var n={name:"WebOS Browser"},e=i.default.getFirstMatch(o,t)||i.default.getFirstMatch(/w(?:eb)?[o0]sbrowser\/(\d+(\.?_?\d+)+)/i,t);return e&&(n.version=e),n}},{test:[/bada/i],describe:function(t){var n={name:"Bada"},e=i.default.getFirstMatch(/dolfin\/(\d+(\.?_?\d+)+)/i,t);return e&&(n.version=e),n}},{test:[/tizen/i],describe:function(t){var n={name:"Tizen"},e=i.default.getFirstMatch(/(?:tizen\s?)?browser\/(\d+(\.?_?\d+)+)/i,t)||i.default.getFirstMatch(o,t);return e&&(n.version=e),n}},{test:[/qupzilla/i],describe:function(t){var n={name:"QupZilla"},e=i.default.getFirstMatch(/(?:qupzilla)[\s/](\d+(\.?_?\d+)+)/i,t)||i.default.getFirstMatch(o,t);return e&&(n.version=e),n}},{test:[/firefox|iceweasel|fxios/i],describe:function(t){var n={name:"Firefox"},e=i.default.getFirstMatch(/(?:firefox|iceweasel|fxios)[\s/](\d+(\.?_?\d+)+)/i,t);return e&&(n.version=e),n}},{test:[/electron/i],describe:function(t){var n={name:"Electron"},e=i.default.getFirstMatch(/(?:electron)\/(\d+(\.?_?\d+)+)/i,t);return e&&(n.version=e),n}},{test:[/chromium/i],describe:function(t){var n={name:"Chromium"},e=i.default.getFirstMatch(/(?:chromium)[\s/](\d+(\.?_?\d+)+)/i,t)||i.default.getFirstMatch(o,t);return e&&(n.version=e),n}},{test:[/chrome|crios|crmo/i],describe:function(t){var n={name:"Chrome"},e=i.default.getFirstMatch(/(?:chrome|crios|crmo)\/(\d+(\.?_?\d+)+)/i,t);return e&&(n.version=e),n}},{test:[/GSA/i],describe:function(t){var n={name:"Google Search"},e=i.default.getFirstMatch(/(?:GSA)\/(\d+(\.?_?\d+)+)/i,t);return e&&(n.version=e),n}},{test:function(t){var n=!t.test(/like android/i),e=t.test(/android/i);return n&&e},describe:function(t){var n={name:"Android Browser"},e=i.default.getFirstMatch(o,t);return e&&(n.version=e),n}},{test:[/playstation 4/i],describe:function(t){var n={name:"PlayStation 4"},e=i.default.getFirstMatch(o,t);return e&&(n.version=e),n}},{test:[/safari|applewebkit/i],describe:function(t){var n={name:"Safari"},e=i.default.getFirstMatch(o,t);return e&&(n.version=e),n}},{test:[/.*/i],describe:function(t){var n=-1!==t.search("\\(")?/^(.*)\/(.*)[ \t]\((.*)/:/^(.*)\/(.*) /;return{name:i.default.getFirstMatch(n,t),version:i.default.getSecondMatch(n,t)}}}];n.default=u,t.exports=n.default},function(t,n,e){"use strict";n.__esModule=!0,n.default=void 0;var r,i=(r=e(17))&&r.__esModule?r:{default:r},o=e(18);var u=[{test:[/Roku\/DVP/],describe:function(t){var n=i.default.getFirstMatch(/Roku\/DVP-(\d+\.\d+)/i,t);return{name:o.OS_MAP.Roku,version:n}}},{test:[/windows phone/i],describe:function(t){var n=i.default.getFirstMatch(/windows phone (?:os)?\s?(\d+(\.\d+)*)/i,t);return{name:o.OS_MAP.WindowsPhone,version:n}}},{test:[/windows /i],describe:function(t){var n=i.default.getFirstMatch(/Windows ((NT|XP)( \d\d?.\d)?)/i,t),e=i.default.getWindowsVersionName(n);return{name:o.OS_MAP.Windows,version:n,versionName:e}}},{test:[/Macintosh(.*?) FxiOS(.*?)\//],describe:function(t){var n={name:o.OS_MAP.iOS},e=i.default.getSecondMatch(/(Version\/)(\d[\d.]+)/,t);return e&&(n.version=e),n}},{test:[/macintosh/i],describe:function(t){var n=i.default.getFirstMatch(/mac os x (\d+(\.?_?\d+)+)/i,t).replace(/[_\s]/g,"."),e=i.default.getMacOSVersionName(n),r={name:o.OS_MAP.MacOS,version:n};return e&&(r.versionName=e),r}},{test:[/(ipod|iphone|ipad)/i],describe:function(t){var n=i.default.getFirstMatch(/os (\d+([_\s]\d+)*) like mac os x/i,t).replace(/[_\s]/g,".");return{name:o.OS_MAP.iOS,version:n}}},{test:function(t){var n=!t.test(/like android/i),e=t.test(/android/i);return n&&e},describe:function(t){var n=i.default.getFirstMatch(/android[\s/-](\d+(\.\d+)*)/i,t),e=i.default.getAndroidVersionName(n),r={name:o.OS_MAP.Android,version:n};return e&&(r.versionName=e),r}},{test:[/(web|hpw)[o0]s/i],describe:function(t){var n=i.default.getFirstMatch(/(?:web|hpw)[o0]s\/(\d+(\.\d+)*)/i,t),e={name:o.OS_MAP.WebOS};return n&&n.length&&(e.version=n),e}},{test:[/blackberry|\bbb\d+/i,/rim\stablet/i],describe:function(t){var n=i.default.getFirstMatch(/rim\stablet\sos\s(\d+(\.\d+)*)/i,t)||i.default.getFirstMatch(/blackberry\d+\/(\d+([_\s]\d+)*)/i,t)||i.default.getFirstMatch(/\bbb(\d+)/i,t);return{name:o.OS_MAP.BlackBerry,version:n}}},{test:[/bada/i],describe:function(t){var n=i.default.getFirstMatch(/bada\/(\d+(\.\d+)*)/i,t);return{name:o.OS_MAP.Bada,version:n}}},{test:[/tizen/i],describe:function(t){var n=i.default.getFirstMatch(/tizen[/\s](\d+(\.\d+)*)/i,t);return{name:o.OS_MAP.Tizen,version:n}}},{test:[/linux/i],describe:function(){return{name:o.OS_MAP.Linux}}},{test:[/CrOS/],describe:function(){return{name:o.OS_MAP.ChromeOS}}},{test:[/PlayStation 4/],describe:function(t){var n=i.default.getFirstMatch(/PlayStation 4[/\s](\d+(\.\d+)*)/i,t);return{name:o.OS_MAP.PlayStation4,version:n}}}];n.default=u,t.exports=n.default},function(t,n,e){"use strict";n.__esModule=!0,n.default=void 0;var r,i=(r=e(17))&&r.__esModule?r:{default:r},o=e(18);var u=[{test:[/googlebot/i],describe:function(){return{type:"bot",vendor:"Google"}}},{test:[/huawei/i],describe:function(t){var n=i.default.getFirstMatch(/(can-l01)/i,t)&&"Nova",e={type:o.PLATFORMS_MAP.mobile,vendor:"Huawei"};return n&&(e.model=n),e}},{test:[/nexus\s*(?:7|8|9|10).*/i],describe:function(){return{type:o.PLATFORMS_MAP.tablet,vendor:"Nexus"}}},{test:[/ipad/i],describe:function(){return{type:o.PLATFORMS_MAP.tablet,vendor:"Apple",model:"iPad"}}},{test:[/Macintosh(.*?) FxiOS(.*?)\//],describe:function(){return{type:o.PLATFORMS_MAP.tablet,vendor:"Apple",model:"iPad"}}},{test:[/kftt build/i],describe:function(){return{type:o.PLATFORMS_MAP.tablet,vendor:"Amazon",model:"Kindle Fire HD 7"}}},{test:[/silk/i],describe:function(){return{type:o.PLATFORMS_MAP.tablet,vendor:"Amazon"}}},{test:[/tablet(?! pc)/i],describe:function(){return{type:o.PLATFORMS_MAP.tablet}}},{test:function(t){var n=t.test(/ipod|iphone/i),e=t.test(/like (ipod|iphone)/i);return n&&!e},describe:function(t){var n=i.default.getFirstMatch(/(ipod|iphone)/i,t);return{type:o.PLATFORMS_MAP.mobile,vendor:"Apple",model:n}}},{test:[/nexus\s*[0-6].*/i,/galaxy nexus/i],describe:function(){return{type:o.PLATFORMS_MAP.mobile,vendor:"Nexus"}}},{test:[/[^-]mobi/i],describe:function(){return{type:o.PLATFORMS_MAP.mobile}}},{test:function(t){return"blackberry"===t.getBrowserName(!0)},describe:function(){return{type:o.PLATFORMS_MAP.mobile,vendor:"BlackBerry"}}},{test:function(t){return"bada"===t.getBrowserName(!0)},describe:function(){return{type:o.PLATFORMS_MAP.mobile}}},{test:function(t){return"windows phone"===t.getBrowserName()},describe:function(){return{type:o.PLATFORMS_MAP.mobile,vendor:"Microsoft"}}},{test:function(t){var n=Number(String(t.getOSVersion()).split(".")[0]);return"android"===t.getOSName(!0)&&n>=3},describe:function(){return{type:o.PLATFORMS_MAP.tablet}}},{test:function(t){return"android"===t.getOSName(!0)},describe:function(){return{type:o.PLATFORMS_MAP.mobile}}},{test:function(t){return"macos"===t.getOSName(!0)},describe:function(){return{type:o.PLATFORMS_MAP.desktop,vendor:"Apple"}}},{test:function(t){return"windows"===t.getOSName(!0)},describe:function(){return{type:o.PLATFORMS_MAP.desktop}}},{test:function(t){return"linux"===t.getOSName(!0)},describe:function(){return{type:o.PLATFORMS_MAP.desktop}}},{test:function(t){return"playstation 4"===t.getOSName(!0)},describe:function(){return{type:o.PLATFORMS_MAP.tv}}},{test:function(t){return"roku"===t.getOSName(!0)},describe:function(){return{type:o.PLATFORMS_MAP.tv}}}];n.default=u,t.exports=n.default},function(t,n,e){"use strict";n.__esModule=!0,n.default=void 0;var r,i=(r=e(17))&&r.__esModule?r:{default:r},o=e(18);var u=[{test:function(t){return"microsoft edge"===t.getBrowserName(!0)},describe:function(t){if(/\sedg\//i.test(t))return{name:o.ENGINE_MAP.Blink};var n=i.default.getFirstMatch(/edge\/(\d+(\.?_?\d+)+)/i,t);return{name:o.ENGINE_MAP.EdgeHTML,version:n}}},{test:[/trident/i],describe:function(t){var n={name:o.ENGINE_MAP.Trident},e=i.default.getFirstMatch(/trident\/(\d+(\.?_?\d+)+)/i,t);return e&&(n.version=e),n}},{test:function(t){return t.test(/presto/i)},describe:function(t){var n={name:o.ENGINE_MAP.Presto},e=i.default.getFirstMatch(/presto\/(\d+(\.?_?\d+)+)/i,t);return e&&(n.version=e),n}},{test:function(t){var n=t.test(/gecko/i),e=t.test(/like gecko/i);return n&&!e},describe:function(t){var n={name:o.ENGINE_MAP.Gecko},e=i.default.getFirstMatch(/gecko\/(\d+(\.?_?\d+)+)/i,t);return e&&(n.version=e),n}},{test:[/(apple)?webkit\/537\.36/i],describe:function(){return{name:o.ENGINE_MAP.Blink}}},{test:[/(apple)?webkit/i],describe:function(t){var n={name:o.ENGINE_MAP.WebKit},e=i.default.getFirstMatch(/webkit\/(\d+(\.?_?\d+)+)/i,t);return e&&(n.version=e),n}}];n.default=u,t.exports=n.default},function(t,n,e){t.exports=!e(8)&&!e(2)((function(){return 7!=Object.defineProperty(e(62)("div"),"a",{get:function(){return 7}}).a}))},function(t,n,e){var r=e(1),i=e(7),o=e(32),u=e(63),a=e(9).f;t.exports=function(t){var n=i.Symbol||(i.Symbol=o?{}:r.Symbol||{});"_"==t.charAt(0)||t in n||a(n,t,{value:u.f(t)})}},function(t,n,e){var r=e(13),i=e(15),o=e(51)(!1),u=e(64)("IE_PROTO");t.exports=function(t,n){var e,a=i(t),c=0,s=[];for(e in a)e!=u&&r(a,e)&&s.push(e);for(;n.length>c;)r(a,e=n[c++])&&(~o(s,e)||s.push(e));return s}},function(t,n,e){var r=e(9),i=e(3),o=e(33);t.exports=e(8)?Object.defineProperties:function(t,n){i(t);for(var e,u=o(n),a=u.length,c=0;a>c;)r.f(t,e=u[c++],n[e]);return t}},function(t,n,e){var r=e(15),i=e(36).f,o={}.toString,u="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[];t.exports.f=function(t){return u&&"[object Window]"==o.call(t)?function(t){try{return i(t)}catch(t){return u.slice()}}(t):i(r(t))}},function(t,n,e){"use strict";var r=e(8),i=e(33),o=e(52),u=e(47),a=e(10),c=e(46),s=Object.assign;t.exports=!s||e(2)((function(){var t={},n={},e=Symbol(),r="abcdefghijklmnopqrst";return t[e]=7,r.split("").forEach((function(t){n[t]=t})),7!=s({},t)[e]||Object.keys(s({},n)).join("")!=r}))?function(t,n){for(var e=a(t),s=arguments.length,f=1,l=o.f,h=u.f;s>f;)for(var d,p=c(arguments[f++]),v=l?i(p).concat(l(p)):i(p),g=v.length,y=0;g>y;)d=v[y++],r&&!h.call(p,d)||(e[d]=p[d]);return e}:s},function(t,n){t.exports=Object.is||function(t,n){return t===n?0!==t||1/t==1/n:t!=t&&n!=n}},function(t,n,e){"use strict";var r=e(20),i=e(4),o=e(104),u=[].slice,a={},c=function(t,n,e){if(!(n in a)){for(var r=[],i=0;i>>0||(u.test(e)?16:10))}:r},function(t,n,e){var r=e(1).parseFloat,i=e(41).trim;t.exports=1/r(e(68)+"-0")!=-1/0?function(t){var n=i(String(t),3),e=r(n);return 0===e&&"-"==n.charAt(0)?-0:e}:r},function(t,n,e){var r=e(25);t.exports=function(t,n){if("number"!=typeof t&&"Number"!=r(t))throw TypeError(n);return+t}},function(t,n,e){var r=e(4),i=Math.floor;t.exports=function(t){return!r(t)&&isFinite(t)&&i(t)===t}},function(t,n){t.exports=Math.log1p||function(t){return(t=+t)>-1e-8&&t<1e-8?t-t*t/2:Math.log(1+t)}},function(t,n,e){"use strict";var r=e(35),i=e(30),o=e(40),u={};e(14)(u,e(5)("iterator"),(function(){return this})),t.exports=function(t,n,e){t.prototype=r(u,{next:i(1,e)}),o(t,n+" Iterator")}},function(t,n,e){var r=e(3);t.exports=function(t,n,e,i){try{return i?n(r(e)[0],e[1]):n(e)}catch(n){var o=t.return;throw void 0!==o&&r(o.call(t)),n}}},function(t,n,e){var r=e(224);t.exports=function(t,n){return new(r(t))(n)}},function(t,n,e){var r=e(20),i=e(10),o=e(46),u=e(6);t.exports=function(t,n,e,a,c){r(n);var s=i(t),f=o(s),l=u(s.length),h=c?l-1:0,d=c?-1:1;if(e<2)for(;;){if(h in f){a=f[h],h+=d;break}if(h+=d,c?h<0:l<=h)throw TypeError("Reduce of empty array with no initial value")}for(;c?h>=0:l>h;h+=d)h in f&&(a=n(a,f[h],h,s));return a}},function(t,n,e){"use strict";var r=e(10),i=e(34),o=e(6);t.exports=[].copyWithin||function(t,n){var e=r(this),u=o(e.length),a=i(t,u),c=i(n,u),s=arguments.length>2?arguments[2]:void 0,f=Math.min((void 0===s?u:i(s,u))-c,u-a),l=1;for(c0;)c in e?e[a]=e[c]:delete e[a],a+=l,c+=l;return e}},function(t,n){t.exports=function(t,n){return{value:n,done:!!t}}},function(t,n,e){"use strict";var r=e(83);e(0)({target:"RegExp",proto:!0,forced:r!==/./.exec},{exec:r})},function(t,n,e){e(8)&&"g"!=/./g.flags&&e(9).f(RegExp.prototype,"flags",{configurable:!0,get:e(55)})},function(t,n,e){"use strict";var r,i,o,u,a=e(32),c=e(1),s=e(19),f=e(48),l=e(0),h=e(4),d=e(20),p=e(44),v=e(58),g=e(49),y=e(85).set,m=e(244)(),b=e(119),S=e(245),w=e(59),_=e(120),M=c.TypeError,x=c.process,P=x&&x.versions,O=P&&P.v8||"",F=c.Promise,A="process"==f(x),E=function(){},N=i=b.f,R=!!function(){try{var t=F.resolve(1),n=(t.constructor={})[e(5)("species")]=function(t){t(E,E)};return(A||"function"==typeof PromiseRejectionEvent)&&t.then(E)instanceof n&&0!==O.indexOf("6.6")&&-1===w.indexOf("Chrome/66")}catch(t){}}(),k=function(t){var n;return!(!h(t)||"function"!=typeof(n=t.then))&&n},T=function(t,n){if(!t._n){t._n=!0;var e=t._c;m((function(){for(var r=t._v,i=1==t._s,o=0,u=function(n){var e,o,u,a=i?n.ok:n.fail,c=n.resolve,s=n.reject,f=n.domain;try{a?(i||(2==t._h&&L(t),t._h=1),!0===a?e=r:(f&&f.enter(),e=a(r),f&&(f.exit(),u=!0)),e===n.promise?s(M("Promise-chain cycle")):(o=k(e))?o.call(e,c,s):c(e)):s(r)}catch(t){f&&!u&&f.exit(),s(t)}};e.length>o;)u(e[o++]);t._c=[],t._n=!1,n&&!t._h&&I(t)}))}},I=function(t){y.call(c,(function(){var n,e,r,i=t._v,o=j(t);if(o&&(n=S((function(){A?x.emit("unhandledRejection",i,t):(e=c.onunhandledrejection)?e({promise:t,reason:i}):(r=c.console)&&r.error&&r.error("Unhandled promise rejection",i)})),t._h=A||j(t)?2:1),t._a=void 0,o&&n.e)throw n.v}))},j=function(t){return 1!==t._h&&0===(t._a||t._c).length},L=function(t){y.call(c,(function(){var n;A?x.emit("rejectionHandled",t):(n=c.onrejectionhandled)&&n({promise:t,reason:t._v})}))},B=function(t){var n=this;n._d||(n._d=!0,(n=n._w||n)._v=t,n._s=2,n._a||(n._a=n._c.slice()),T(n,!0))},C=function(t){var n,e=this;if(!e._d){e._d=!0,e=e._w||e;try{if(e===t)throw M("Promise can't be resolved itself");(n=k(t))?m((function(){var r={_w:e,_d:!1};try{n.call(t,s(C,r,1),s(B,r,1))}catch(t){B.call(r,t)}})):(e._v=t,e._s=1,T(e,!1))}catch(t){B.call({_w:e,_d:!1},t)}}};R||(F=function(t){p(this,F,"Promise","_h"),d(t),r.call(this);try{t(s(C,this,1),s(B,this,1))}catch(t){B.call(this,t)}},(r=function(t){this._c=[],this._a=void 0,this._s=0,this._d=!1,this._v=void 0,this._h=0,this._n=!1}).prototype=e(45)(F.prototype,{then:function(t,n){var e=N(g(this,F));return e.ok="function"!=typeof t||t,e.fail="function"==typeof n&&n,e.domain=A?x.domain:void 0,this._c.push(e),this._a&&this._a.push(e),this._s&&T(this,!1),e.promise},catch:function(t){return this.then(void 0,t)}}),o=function(){var t=new r;this.promise=t,this.resolve=s(C,t,1),this.reject=s(B,t,1)},b.f=N=function(t){return t===F||t===u?new o(t):i(t)}),l(l.G+l.W+l.F*!R,{Promise:F}),e(40)(F,"Promise"),e(43)("Promise"),u=e(7).Promise,l(l.S+l.F*!R,"Promise",{reject:function(t){var n=N(this);return(0,n.reject)(t),n.promise}}),l(l.S+l.F*(a||!R),"Promise",{resolve:function(t){return _(a&&this===u?F:this,t)}}),l(l.S+l.F*!(R&&e(54)((function(t){F.all(t).catch(E)}))),"Promise",{all:function(t){var n=this,e=N(n),r=e.resolve,i=e.reject,o=S((function(){var e=[],o=0,u=1;v(t,!1,(function(t){var a=o++,c=!1;e.push(void 0),u++,n.resolve(t).then((function(t){c||(c=!0,e[a]=t,--u||r(e))}),i)})),--u||r(e)}));return o.e&&i(o.v),e.promise},race:function(t){var n=this,e=N(n),r=e.reject,i=S((function(){v(t,!1,(function(t){n.resolve(t).then(e.resolve,r)}))}));return i.e&&r(i.v),e.promise}})},function(t,n,e){"use strict";var r=e(20);function i(t){var n,e;this.promise=new t((function(t,r){if(void 0!==n||void 0!==e)throw TypeError("Bad Promise constructor");n=t,e=r})),this.resolve=r(n),this.reject=r(e)}t.exports.f=function(t){return new i(t)}},function(t,n,e){var r=e(3),i=e(4),o=e(119);t.exports=function(t,n){if(r(t),i(n)&&n.constructor===t)return n;var e=o.f(t);return(0,e.resolve)(n),e.promise}},function(t,n,e){"use strict";var r=e(9).f,i=e(35),o=e(45),u=e(19),a=e(44),c=e(58),s=e(74),f=e(115),l=e(43),h=e(8),d=e(29).fastKey,p=e(39),v=h?"_s":"size",g=function(t,n){var e,r=d(n);if("F"!==r)return t._i[r];for(e=t._f;e;e=e.n)if(e.k==n)return e};t.exports={getConstructor:function(t,n,e,s){var f=t((function(t,r){a(t,f,n,"_i"),t._t=n,t._i=i(null),t._f=void 0,t._l=void 0,t[v]=0,null!=r&&c(r,e,t[s],t)}));return o(f.prototype,{clear:function(){for(var t=p(this,n),e=t._i,r=t._f;r;r=r.n)r.r=!0,r.p&&(r.p=r.p.n=void 0),delete e[r.i];t._f=t._l=void 0,t[v]=0},delete:function(t){var e=p(this,n),r=g(e,t);if(r){var i=r.n,o=r.p;delete e._i[r.i],r.r=!0,o&&(o.n=i),i&&(i.p=o),e._f==r&&(e._f=i),e._l==r&&(e._l=o),e[v]--}return!!r},forEach:function(t){p(this,n);for(var e,r=u(t,arguments.length>1?arguments[1]:void 0,3);e=e?e.n:this._f;)for(r(e.v,e.k,this);e&&e.r;)e=e.p},has:function(t){return!!g(p(this,n),t)}}),h&&r(f.prototype,"size",{get:function(){return p(this,n)[v]}}),f},def:function(t,n,e){var r,i,o=g(t,n);return o?o.v=e:(t._l=o={i:i=d(n,!0),k:n,v:e,p:r=t._l,n:void 0,r:!1},t._f||(t._f=o),r&&(r.n=o),t[v]++,"F"!==i&&(t._i[i]=o)),t},getEntry:g,setStrong:function(t,n,e){s(t,n,(function(t,e){this._t=p(t,n),this._k=e,this._l=void 0}),(function(){for(var t=this._k,n=this._l;n&&n.r;)n=n.p;return this._t&&(this._l=n=n?n.n:this._t._f)?f(0,"keys"==t?n.k:"values"==t?n.v:[n.k,n.v]):(this._t=void 0,f(1))}),e?"entries":"values",!e,!0),l(n)}}},function(t,n,e){"use strict";var r=e(45),i=e(29).getWeak,o=e(3),u=e(4),a=e(44),c=e(58),s=e(24),f=e(13),l=e(39),h=s(5),d=s(6),p=0,v=function(t){return t._l||(t._l=new g)},g=function(){this.a=[]},y=function(t,n){return h(t.a,(function(t){return t[0]===n}))};g.prototype={get:function(t){var n=y(this,t);if(n)return n[1]},has:function(t){return!!y(this,t)},set:function(t,n){var e=y(this,t);e?e[1]=n:this.a.push([t,n])},delete:function(t){var n=d(this.a,(function(n){return n[0]===t}));return~n&&this.a.splice(n,1),!!~n}},t.exports={getConstructor:function(t,n,e,o){var s=t((function(t,r){a(t,s,n,"_i"),t._t=n,t._i=p++,t._l=void 0,null!=r&&c(r,e,t[o],t)}));return r(s.prototype,{delete:function(t){if(!u(t))return!1;var e=i(t);return!0===e?v(l(this,n)).delete(t):e&&f(e,this._i)&&delete e[this._i]},has:function(t){if(!u(t))return!1;var e=i(t);return!0===e?v(l(this,n)).has(t):e&&f(e,this._i)}}),s},def:function(t,n,e){var r=i(o(n),!0);return!0===r?v(t).set(n,e):r[t._i]=e,t},ufstore:v}},function(t,n,e){var r=e(21),i=e(6);t.exports=function(t){if(void 0===t)return 0;var n=r(t),e=i(n);if(n!==e)throw RangeError("Wrong length!");return e}},function(t,n,e){var r=e(36),i=e(52),o=e(3),u=e(1).Reflect;t.exports=u&&u.ownKeys||function(t){var n=r.f(o(t)),e=i.f;return e?n.concat(e(t)):n}},function(t,n,e){var r=e(6),i=e(70),o=e(26);t.exports=function(t,n,e,u){var a=String(o(t)),c=a.length,s=void 0===e?" ":String(e),f=r(n);if(f<=c||""==s)return a;var l=f-c,h=i.call(s,Math.ceil(l/s.length));return h.length>l&&(h=h.slice(0,l)),u?h+a:a+h}},function(t,n,e){var r=e(8),i=e(33),o=e(15),u=e(47).f;t.exports=function(t){return function(n){for(var e,a=o(n),c=i(a),s=c.length,f=0,l=[];s>f;)e=c[f++],r&&!u.call(a,e)||l.push(t?[e,a[e]]:a[e]);return l}}},function(t,n){var e=t.exports={version:"2.6.9"};"number"==typeof __e&&(__e=e)},function(t,n){t.exports=function(t){try{return!!t()}catch(t){return!0}}},function(t,n,e){e(130),t.exports=e(90)},function(t,n,e){"use strict";e(131);var r,i=(r=e(303))&&r.__esModule?r:{default:r};i.default._babelPolyfill&&"undefined"!=typeof console&&console.warn&&console.warn("@babel/polyfill is loaded more than once on this page. This is probably not desirable/intended and may have consequences if different versions of the polyfills are applied sequentially. If you do need to load the polyfill more than once, use @babel/polyfill/noConflict instead to bypass the warning."),i.default._babelPolyfill=!0},function(t,n,e){"use strict";e(132),e(275),e(277),e(280),e(282),e(284),e(286),e(288),e(290),e(292),e(294),e(296),e(298),e(302)},function(t,n,e){e(133),e(136),e(137),e(138),e(139),e(140),e(141),e(142),e(143),e(144),e(145),e(146),e(147),e(148),e(149),e(150),e(151),e(152),e(153),e(154),e(155),e(156),e(157),e(158),e(159),e(160),e(161),e(162),e(163),e(164),e(165),e(166),e(167),e(168),e(169),e(170),e(171),e(172),e(173),e(174),e(175),e(176),e(177),e(179),e(180),e(181),e(182),e(183),e(184),e(185),e(186),e(187),e(188),e(189),e(190),e(191),e(192),e(193),e(194),e(195),e(196),e(197),e(198),e(199),e(200),e(201),e(202),e(203),e(204),e(205),e(206),e(207),e(208),e(209),e(210),e(211),e(212),e(214),e(215),e(217),e(218),e(219),e(220),e(221),e(222),e(223),e(225),e(226),e(227),e(228),e(229),e(230),e(231),e(232),e(233),e(234),e(235),e(236),e(237),e(82),e(238),e(116),e(239),e(117),e(240),e(241),e(242),e(243),e(118),e(246),e(247),e(248),e(249),e(250),e(251),e(252),e(253),e(254),e(255),e(256),e(257),e(258),e(259),e(260),e(261),e(262),e(263),e(264),e(265),e(266),e(267),e(268),e(269),e(270),e(271),e(272),e(273),e(274),t.exports=e(7)},function(t,n,e){"use strict";var r=e(1),i=e(13),o=e(8),u=e(0),a=e(11),c=e(29).KEY,s=e(2),f=e(50),l=e(40),h=e(31),d=e(5),p=e(63),v=e(97),g=e(135),y=e(53),m=e(3),b=e(4),S=e(10),w=e(15),_=e(28),M=e(30),x=e(35),P=e(100),O=e(22),F=e(52),A=e(9),E=e(33),N=O.f,R=A.f,k=P.f,T=r.Symbol,I=r.JSON,j=I&&I.stringify,L=d("_hidden"),B=d("toPrimitive"),C={}.propertyIsEnumerable,W=f("symbol-registry"),V=f("symbols"),G=f("op-symbols"),D=Object.prototype,U="function"==typeof T&&!!F.f,z=r.QObject,q=!z||!z.prototype||!z.prototype.findChild,K=o&&s((function(){return 7!=x(R({},"a",{get:function(){return R(this,"a",{value:7}).a}})).a}))?function(t,n,e){var r=N(D,n);r&&delete D[n],R(t,n,e),r&&t!==D&&R(D,n,r)}:R,Y=function(t){var n=V[t]=x(T.prototype);return n._k=t,n},Q=U&&"symbol"==typeof T.iterator?function(t){return"symbol"==typeof t}:function(t){return t instanceof T},H=function(t,n,e){return t===D&&H(G,n,e),m(t),n=_(n,!0),m(e),i(V,n)?(e.enumerable?(i(t,L)&&t[L][n]&&(t[L][n]=!1),e=x(e,{enumerable:M(0,!1)})):(i(t,L)||R(t,L,M(1,{})),t[L][n]=!0),K(t,n,e)):R(t,n,e)},J=function(t,n){m(t);for(var e,r=g(n=w(n)),i=0,o=r.length;o>i;)H(t,e=r[i++],n[e]);return t},X=function(t){var n=C.call(this,t=_(t,!0));return!(this===D&&i(V,t)&&!i(G,t))&&(!(n||!i(this,t)||!i(V,t)||i(this,L)&&this[L][t])||n)},Z=function(t,n){if(t=w(t),n=_(n,!0),t!==D||!i(V,n)||i(G,n)){var e=N(t,n);return!e||!i(V,n)||i(t,L)&&t[L][n]||(e.enumerable=!0),e}},$=function(t){for(var n,e=k(w(t)),r=[],o=0;e.length>o;)i(V,n=e[o++])||n==L||n==c||r.push(n);return r},tt=function(t){for(var n,e=t===D,r=k(e?G:w(t)),o=[],u=0;r.length>u;)!i(V,n=r[u++])||e&&!i(D,n)||o.push(V[n]);return o};U||(a((T=function(){if(this instanceof T)throw TypeError("Symbol is not a constructor!");var t=h(arguments.length>0?arguments[0]:void 0),n=function(e){this===D&&n.call(G,e),i(this,L)&&i(this[L],t)&&(this[L][t]=!1),K(this,t,M(1,e))};return o&&q&&K(D,t,{configurable:!0,set:n}),Y(t)}).prototype,"toString",(function(){return this._k})),O.f=Z,A.f=H,e(36).f=P.f=$,e(47).f=X,F.f=tt,o&&!e(32)&&a(D,"propertyIsEnumerable",X,!0),p.f=function(t){return Y(d(t))}),u(u.G+u.W+u.F*!U,{Symbol:T});for(var nt="hasInstance,isConcatSpreadable,iterator,match,replace,search,species,split,toPrimitive,toStringTag,unscopables".split(","),et=0;nt.length>et;)d(nt[et++]);for(var rt=E(d.store),it=0;rt.length>it;)v(rt[it++]);u(u.S+u.F*!U,"Symbol",{for:function(t){return i(W,t+="")?W[t]:W[t]=T(t)},keyFor:function(t){if(!Q(t))throw TypeError(t+" is not a symbol!");for(var n in W)if(W[n]===t)return n},useSetter:function(){q=!0},useSimple:function(){q=!1}}),u(u.S+u.F*!U,"Object",{create:function(t,n){return void 0===n?x(t):J(x(t),n)},defineProperty:H,defineProperties:J,getOwnPropertyDescriptor:Z,getOwnPropertyNames:$,getOwnPropertySymbols:tt});var ot=s((function(){F.f(1)}));u(u.S+u.F*ot,"Object",{getOwnPropertySymbols:function(t){return F.f(S(t))}}),I&&u(u.S+u.F*(!U||s((function(){var t=T();return"[null]"!=j([t])||"{}"!=j({a:t})||"{}"!=j(Object(t))}))),"JSON",{stringify:function(t){for(var n,e,r=[t],i=1;arguments.length>i;)r.push(arguments[i++]);if(e=n=r[1],(b(n)||void 0!==t)&&!Q(t))return y(n)||(n=function(t,n){if("function"==typeof e&&(n=e.call(this,t,n)),!Q(n))return n}),r[1]=n,j.apply(I,r)}}),T.prototype[B]||e(14)(T.prototype,B,T.prototype.valueOf),l(T,"Symbol"),l(Math,"Math",!0),l(r.JSON,"JSON",!0)},function(t,n,e){t.exports=e(50)("native-function-to-string",Function.toString)},function(t,n,e){var r=e(33),i=e(52),o=e(47);t.exports=function(t){var n=r(t),e=i.f;if(e)for(var u,a=e(t),c=o.f,s=0;a.length>s;)c.call(t,u=a[s++])&&n.push(u);return n}},function(t,n,e){var r=e(0);r(r.S,"Object",{create:e(35)})},function(t,n,e){var r=e(0);r(r.S+r.F*!e(8),"Object",{defineProperty:e(9).f})},function(t,n,e){var r=e(0);r(r.S+r.F*!e(8),"Object",{defineProperties:e(99)})},function(t,n,e){var r=e(15),i=e(22).f;e(23)("getOwnPropertyDescriptor",(function(){return function(t,n){return i(r(t),n)}}))},function(t,n,e){var r=e(10),i=e(37);e(23)("getPrototypeOf",(function(){return function(t){return i(r(t))}}))},function(t,n,e){var r=e(10),i=e(33);e(23)("keys",(function(){return function(t){return i(r(t))}}))},function(t,n,e){e(23)("getOwnPropertyNames",(function(){return e(100).f}))},function(t,n,e){var r=e(4),i=e(29).onFreeze;e(23)("freeze",(function(t){return function(n){return t&&r(n)?t(i(n)):n}}))},function(t,n,e){var r=e(4),i=e(29).onFreeze;e(23)("seal",(function(t){return function(n){return t&&r(n)?t(i(n)):n}}))},function(t,n,e){var r=e(4),i=e(29).onFreeze;e(23)("preventExtensions",(function(t){return function(n){return t&&r(n)?t(i(n)):n}}))},function(t,n,e){var r=e(4);e(23)("isFrozen",(function(t){return function(n){return!r(n)||!!t&&t(n)}}))},function(t,n,e){var r=e(4);e(23)("isSealed",(function(t){return function(n){return!r(n)||!!t&&t(n)}}))},function(t,n,e){var r=e(4);e(23)("isExtensible",(function(t){return function(n){return!!r(n)&&(!t||t(n))}}))},function(t,n,e){var r=e(0);r(r.S+r.F,"Object",{assign:e(101)})},function(t,n,e){var r=e(0);r(r.S,"Object",{is:e(102)})},function(t,n,e){var r=e(0);r(r.S,"Object",{setPrototypeOf:e(67).set})},function(t,n,e){"use strict";var r=e(48),i={};i[e(5)("toStringTag")]="z",i+""!="[object z]"&&e(11)(Object.prototype,"toString",(function(){return"[object "+r(this)+"]"}),!0)},function(t,n,e){var r=e(0);r(r.P,"Function",{bind:e(103)})},function(t,n,e){var r=e(9).f,i=Function.prototype,o=/^\s*function ([^ (]*)/;"name"in i||e(8)&&r(i,"name",{configurable:!0,get:function(){try{return(""+this).match(o)[1]}catch(t){return""}}})},function(t,n,e){"use strict";var r=e(4),i=e(37),o=e(5)("hasInstance"),u=Function.prototype;o in u||e(9).f(u,o,{value:function(t){if("function"!=typeof this||!r(t))return!1;if(!r(this.prototype))return t instanceof this;for(;t=i(t);)if(this.prototype===t)return!0;return!1}})},function(t,n,e){var r=e(0),i=e(105);r(r.G+r.F*(parseInt!=i),{parseInt:i})},function(t,n,e){var r=e(0),i=e(106);r(r.G+r.F*(parseFloat!=i),{parseFloat:i})},function(t,n,e){"use strict";var r=e(1),i=e(13),o=e(25),u=e(69),a=e(28),c=e(2),s=e(36).f,f=e(22).f,l=e(9).f,h=e(41).trim,d=r.Number,p=d,v=d.prototype,g="Number"==o(e(35)(v)),y="trim"in String.prototype,m=function(t){var n=a(t,!1);if("string"==typeof n&&n.length>2){var e,r,i,o=(n=y?n.trim():h(n,3)).charCodeAt(0);if(43===o||45===o){if(88===(e=n.charCodeAt(2))||120===e)return NaN}else if(48===o){switch(n.charCodeAt(1)){case 66:case 98:r=2,i=49;break;case 79:case 111:r=8,i=55;break;default:return+n}for(var u,c=n.slice(2),s=0,f=c.length;si)return NaN;return parseInt(c,r)}}return+n};if(!d(" 0o1")||!d("0b1")||d("+0x1")){d=function(t){var n=arguments.length<1?0:t,e=this;return e instanceof d&&(g?c((function(){v.valueOf.call(e)})):"Number"!=o(e))?u(new p(m(n)),e,d):m(n)};for(var b,S=e(8)?s(p):"MAX_VALUE,MIN_VALUE,NaN,NEGATIVE_INFINITY,POSITIVE_INFINITY,EPSILON,isFinite,isInteger,isNaN,isSafeInteger,MAX_SAFE_INTEGER,MIN_SAFE_INTEGER,parseFloat,parseInt,isInteger".split(","),w=0;S.length>w;w++)i(p,b=S[w])&&!i(d,b)&&l(d,b,f(p,b));d.prototype=v,v.constructor=d,e(11)(r,"Number",d)}},function(t,n,e){"use strict";var r=e(0),i=e(21),o=e(107),u=e(70),a=1..toFixed,c=Math.floor,s=[0,0,0,0,0,0],f="Number.toFixed: incorrect invocation!",l=function(t,n){for(var e=-1,r=n;++e<6;)r+=t*s[e],s[e]=r%1e7,r=c(r/1e7)},h=function(t){for(var n=6,e=0;--n>=0;)e+=s[n],s[n]=c(e/t),e=e%t*1e7},d=function(){for(var t=6,n="";--t>=0;)if(""!==n||0===t||0!==s[t]){var e=String(s[t]);n=""===n?e:n+u.call("0",7-e.length)+e}return n},p=function(t,n,e){return 0===n?e:n%2==1?p(t,n-1,e*t):p(t*t,n/2,e)};r(r.P+r.F*(!!a&&("0.000"!==8e-5.toFixed(3)||"1"!==.9.toFixed(0)||"1.25"!==1.255.toFixed(2)||"1000000000000000128"!==(0xde0b6b3a7640080).toFixed(0))||!e(2)((function(){a.call({})}))),"Number",{toFixed:function(t){var n,e,r,a,c=o(this,f),s=i(t),v="",g="0";if(s<0||s>20)throw RangeError(f);if(c!=c)return"NaN";if(c<=-1e21||c>=1e21)return String(c);if(c<0&&(v="-",c=-c),c>1e-21)if(e=(n=function(t){for(var n=0,e=t;e>=4096;)n+=12,e/=4096;for(;e>=2;)n+=1,e/=2;return n}(c*p(2,69,1))-69)<0?c*p(2,-n,1):c/p(2,n,1),e*=4503599627370496,(n=52-n)>0){for(l(0,e),r=s;r>=7;)l(1e7,0),r-=7;for(l(p(10,r,1),0),r=n-1;r>=23;)h(1<<23),r-=23;h(1<0?v+((a=g.length)<=s?"0."+u.call("0",s-a)+g:g.slice(0,a-s)+"."+g.slice(a-s)):v+g}})},function(t,n,e){"use strict";var r=e(0),i=e(2),o=e(107),u=1..toPrecision;r(r.P+r.F*(i((function(){return"1"!==u.call(1,void 0)}))||!i((function(){u.call({})}))),"Number",{toPrecision:function(t){var n=o(this,"Number#toPrecision: incorrect invocation!");return void 0===t?u.call(n):u.call(n,t)}})},function(t,n,e){var r=e(0);r(r.S,"Number",{EPSILON:Math.pow(2,-52)})},function(t,n,e){var r=e(0),i=e(1).isFinite;r(r.S,"Number",{isFinite:function(t){return"number"==typeof t&&i(t)}})},function(t,n,e){var r=e(0);r(r.S,"Number",{isInteger:e(108)})},function(t,n,e){var r=e(0);r(r.S,"Number",{isNaN:function(t){return t!=t}})},function(t,n,e){var r=e(0),i=e(108),o=Math.abs;r(r.S,"Number",{isSafeInteger:function(t){return i(t)&&o(t)<=9007199254740991}})},function(t,n,e){var r=e(0);r(r.S,"Number",{MAX_SAFE_INTEGER:9007199254740991})},function(t,n,e){var r=e(0);r(r.S,"Number",{MIN_SAFE_INTEGER:-9007199254740991})},function(t,n,e){var r=e(0),i=e(106);r(r.S+r.F*(Number.parseFloat!=i),"Number",{parseFloat:i})},function(t,n,e){var r=e(0),i=e(105);r(r.S+r.F*(Number.parseInt!=i),"Number",{parseInt:i})},function(t,n,e){var r=e(0),i=e(109),o=Math.sqrt,u=Math.acosh;r(r.S+r.F*!(u&&710==Math.floor(u(Number.MAX_VALUE))&&u(1/0)==1/0),"Math",{acosh:function(t){return(t=+t)<1?NaN:t>94906265.62425156?Math.log(t)+Math.LN2:i(t-1+o(t-1)*o(t+1))}})},function(t,n,e){var r=e(0),i=Math.asinh;r(r.S+r.F*!(i&&1/i(0)>0),"Math",{asinh:function t(n){return isFinite(n=+n)&&0!=n?n<0?-t(-n):Math.log(n+Math.sqrt(n*n+1)):n}})},function(t,n,e){var r=e(0),i=Math.atanh;r(r.S+r.F*!(i&&1/i(-0)<0),"Math",{atanh:function(t){return 0==(t=+t)?t:Math.log((1+t)/(1-t))/2}})},function(t,n,e){var r=e(0),i=e(71);r(r.S,"Math",{cbrt:function(t){return i(t=+t)*Math.pow(Math.abs(t),1/3)}})},function(t,n,e){var r=e(0);r(r.S,"Math",{clz32:function(t){return(t>>>=0)?31-Math.floor(Math.log(t+.5)*Math.LOG2E):32}})},function(t,n,e){var r=e(0),i=Math.exp;r(r.S,"Math",{cosh:function(t){return(i(t=+t)+i(-t))/2}})},function(t,n,e){var r=e(0),i=e(72);r(r.S+r.F*(i!=Math.expm1),"Math",{expm1:i})},function(t,n,e){var r=e(0);r(r.S,"Math",{fround:e(178)})},function(t,n,e){var r=e(71),i=Math.pow,o=i(2,-52),u=i(2,-23),a=i(2,127)*(2-u),c=i(2,-126);t.exports=Math.fround||function(t){var n,e,i=Math.abs(t),s=r(t);return ia||e!=e?s*(1/0):s*e}},function(t,n,e){var r=e(0),i=Math.abs;r(r.S,"Math",{hypot:function(t,n){for(var e,r,o=0,u=0,a=arguments.length,c=0;u0?(r=e/c)*r:e;return c===1/0?1/0:c*Math.sqrt(o)}})},function(t,n,e){var r=e(0),i=Math.imul;r(r.S+r.F*e(2)((function(){return-5!=i(4294967295,5)||2!=i.length})),"Math",{imul:function(t,n){var e=+t,r=+n,i=65535&e,o=65535&r;return 0|i*o+((65535&e>>>16)*o+i*(65535&r>>>16)<<16>>>0)}})},function(t,n,e){var r=e(0);r(r.S,"Math",{log10:function(t){return Math.log(t)*Math.LOG10E}})},function(t,n,e){var r=e(0);r(r.S,"Math",{log1p:e(109)})},function(t,n,e){var r=e(0);r(r.S,"Math",{log2:function(t){return Math.log(t)/Math.LN2}})},function(t,n,e){var r=e(0);r(r.S,"Math",{sign:e(71)})},function(t,n,e){var r=e(0),i=e(72),o=Math.exp;r(r.S+r.F*e(2)((function(){return-2e-17!=!Math.sinh(-2e-17)})),"Math",{sinh:function(t){return Math.abs(t=+t)<1?(i(t)-i(-t))/2:(o(t-1)-o(-t-1))*(Math.E/2)}})},function(t,n,e){var r=e(0),i=e(72),o=Math.exp;r(r.S,"Math",{tanh:function(t){var n=i(t=+t),e=i(-t);return n==1/0?1:e==1/0?-1:(n-e)/(o(t)+o(-t))}})},function(t,n,e){var r=e(0);r(r.S,"Math",{trunc:function(t){return(t>0?Math.floor:Math.ceil)(t)}})},function(t,n,e){var r=e(0),i=e(34),o=String.fromCharCode,u=String.fromCodePoint;r(r.S+r.F*(!!u&&1!=u.length),"String",{fromCodePoint:function(t){for(var n,e=[],r=arguments.length,u=0;r>u;){if(n=+arguments[u++],i(n,1114111)!==n)throw RangeError(n+" is not a valid code point");e.push(n<65536?o(n):o(55296+((n-=65536)>>10),n%1024+56320))}return e.join("")}})},function(t,n,e){var r=e(0),i=e(15),o=e(6);r(r.S,"String",{raw:function(t){for(var n=i(t.raw),e=o(n.length),r=arguments.length,u=[],a=0;e>a;)u.push(String(n[a++])),a=n.length?{value:void 0,done:!0}:(t=r(n,e),this._i+=t.length,{value:t,done:!1})}))},function(t,n,e){"use strict";var r=e(0),i=e(73)(!1);r(r.P,"String",{codePointAt:function(t){return i(this,t)}})},function(t,n,e){"use strict";var r=e(0),i=e(6),o=e(75),u="".endsWith;r(r.P+r.F*e(77)("endsWith"),"String",{endsWith:function(t){var n=o(this,t,"endsWith"),e=arguments.length>1?arguments[1]:void 0,r=i(n.length),a=void 0===e?r:Math.min(i(e),r),c=String(t);return u?u.call(n,c,a):n.slice(a-c.length,a)===c}})},function(t,n,e){"use strict";var r=e(0),i=e(75);r(r.P+r.F*e(77)("includes"),"String",{includes:function(t){return!!~i(this,t,"includes").indexOf(t,arguments.length>1?arguments[1]:void 0)}})},function(t,n,e){var r=e(0);r(r.P,"String",{repeat:e(70)})},function(t,n,e){"use strict";var r=e(0),i=e(6),o=e(75),u="".startsWith;r(r.P+r.F*e(77)("startsWith"),"String",{startsWith:function(t){var n=o(this,t,"startsWith"),e=i(Math.min(arguments.length>1?arguments[1]:void 0,n.length)),r=String(t);return u?u.call(n,r,e):n.slice(e,e+r.length)===r}})},function(t,n,e){"use strict";e(12)("anchor",(function(t){return function(n){return t(this,"a","name",n)}}))},function(t,n,e){"use strict";e(12)("big",(function(t){return function(){return t(this,"big","","")}}))},function(t,n,e){"use strict";e(12)("blink",(function(t){return function(){return t(this,"blink","","")}}))},function(t,n,e){"use strict";e(12)("bold",(function(t){return function(){return t(this,"b","","")}}))},function(t,n,e){"use strict";e(12)("fixed",(function(t){return function(){return t(this,"tt","","")}}))},function(t,n,e){"use strict";e(12)("fontcolor",(function(t){return function(n){return t(this,"font","color",n)}}))},function(t,n,e){"use strict";e(12)("fontsize",(function(t){return function(n){return t(this,"font","size",n)}}))},function(t,n,e){"use strict";e(12)("italics",(function(t){return function(){return t(this,"i","","")}}))},function(t,n,e){"use strict";e(12)("link",(function(t){return function(n){return t(this,"a","href",n)}}))},function(t,n,e){"use strict";e(12)("small",(function(t){return function(){return t(this,"small","","")}}))},function(t,n,e){"use strict";e(12)("strike",(function(t){return function(){return t(this,"strike","","")}}))},function(t,n,e){"use strict";e(12)("sub",(function(t){return function(){return t(this,"sub","","")}}))},function(t,n,e){"use strict";e(12)("sup",(function(t){return function(){return t(this,"sup","","")}}))},function(t,n,e){var r=e(0);r(r.S,"Date",{now:function(){return(new Date).getTime()}})},function(t,n,e){"use strict";var r=e(0),i=e(10),o=e(28);r(r.P+r.F*e(2)((function(){return null!==new Date(NaN).toJSON()||1!==Date.prototype.toJSON.call({toISOString:function(){return 1}})})),"Date",{toJSON:function(t){var n=i(this),e=o(n);return"number"!=typeof e||isFinite(e)?n.toISOString():null}})},function(t,n,e){var r=e(0),i=e(213);r(r.P+r.F*(Date.prototype.toISOString!==i),"Date",{toISOString:i})},function(t,n,e){"use strict";var r=e(2),i=Date.prototype.getTime,o=Date.prototype.toISOString,u=function(t){return t>9?t:"0"+t};t.exports=r((function(){return"0385-07-25T07:06:39.999Z"!=o.call(new Date(-5e13-1))}))||!r((function(){o.call(new Date(NaN))}))?function(){if(!isFinite(i.call(this)))throw RangeError("Invalid time value");var t=this,n=t.getUTCFullYear(),e=t.getUTCMilliseconds(),r=n<0?"-":n>9999?"+":"";return r+("00000"+Math.abs(n)).slice(r?-6:-4)+"-"+u(t.getUTCMonth()+1)+"-"+u(t.getUTCDate())+"T"+u(t.getUTCHours())+":"+u(t.getUTCMinutes())+":"+u(t.getUTCSeconds())+"."+(e>99?e:"0"+u(e))+"Z"}:o},function(t,n,e){var r=Date.prototype,i=r.toString,o=r.getTime;new Date(NaN)+""!="Invalid Date"&&e(11)(r,"toString",(function(){var t=o.call(this);return t==t?i.call(this):"Invalid Date"}))},function(t,n,e){var r=e(5)("toPrimitive"),i=Date.prototype;r in i||e(14)(i,r,e(216))},function(t,n,e){"use strict";var r=e(3),i=e(28);t.exports=function(t){if("string"!==t&&"number"!==t&&"default"!==t)throw TypeError("Incorrect hint");return i(r(this),"number"!=t)}},function(t,n,e){var r=e(0);r(r.S,"Array",{isArray:e(53)})},function(t,n,e){"use strict";var r=e(19),i=e(0),o=e(10),u=e(111),a=e(78),c=e(6),s=e(79),f=e(80);i(i.S+i.F*!e(54)((function(t){Array.from(t)})),"Array",{from:function(t){var n,e,i,l,h=o(t),d="function"==typeof this?this:Array,p=arguments.length,v=p>1?arguments[1]:void 0,g=void 0!==v,y=0,m=f(h);if(g&&(v=r(v,p>2?arguments[2]:void 0,2)),null==m||d==Array&&a(m))for(e=new d(n=c(h.length));n>y;y++)s(e,y,g?v(h[y],y):h[y]);else for(l=m.call(h),e=new d;!(i=l.next()).done;y++)s(e,y,g?u(l,v,[i.value,y],!0):i.value);return e.length=y,e}})},function(t,n,e){"use strict";var r=e(0),i=e(79);r(r.S+r.F*e(2)((function(){function t(){}return!(Array.of.call(t)instanceof t)})),"Array",{of:function(){for(var t=0,n=arguments.length,e=new("function"==typeof this?this:Array)(n);n>t;)i(e,t,arguments[t++]);return e.length=n,e}})},function(t,n,e){"use strict";var r=e(0),i=e(15),o=[].join;r(r.P+r.F*(e(46)!=Object||!e(16)(o)),"Array",{join:function(t){return o.call(i(this),void 0===t?",":t)}})},function(t,n,e){"use strict";var r=e(0),i=e(66),o=e(25),u=e(34),a=e(6),c=[].slice;r(r.P+r.F*e(2)((function(){i&&c.call(i)})),"Array",{slice:function(t,n){var e=a(this.length),r=o(this);if(n=void 0===n?e:n,"Array"==r)return c.call(this,t,n);for(var i=u(t,e),s=u(n,e),f=a(s-i),l=new Array(f),h=0;h1&&(r=Math.min(r,o(arguments[1]))),r<0&&(r=e+r);r>=0;r--)if(r in n&&n[r]===t)return r||0;return-1}})},function(t,n,e){var r=e(0);r(r.P,"Array",{copyWithin:e(114)}),e(38)("copyWithin")},function(t,n,e){var r=e(0);r(r.P,"Array",{fill:e(81)}),e(38)("fill")},function(t,n,e){"use strict";var r=e(0),i=e(24)(5),o=!0;"find"in[]&&Array(1).find((function(){o=!1})),r(r.P+r.F*o,"Array",{find:function(t){return i(this,t,arguments.length>1?arguments[1]:void 0)}}),e(38)("find")},function(t,n,e){"use strict";var r=e(0),i=e(24)(6),o="findIndex",u=!0;o in[]&&Array(1)[o]((function(){u=!1})),r(r.P+r.F*u,"Array",{findIndex:function(t){return i(this,t,arguments.length>1?arguments[1]:void 0)}}),e(38)(o)},function(t,n,e){e(43)("Array")},function(t,n,e){var r=e(1),i=e(69),o=e(9).f,u=e(36).f,a=e(76),c=e(55),s=r.RegExp,f=s,l=s.prototype,h=/a/g,d=/a/g,p=new s(h)!==h;if(e(8)&&(!p||e(2)((function(){return d[e(5)("match")]=!1,s(h)!=h||s(d)==d||"/a/i"!=s(h,"i")})))){s=function(t,n){var e=this instanceof s,r=a(t),o=void 0===n;return!e&&r&&t.constructor===s&&o?t:i(p?new f(r&&!o?t.source:t,n):f((r=t instanceof s)?t.source:t,r&&o?c.call(t):n),e?this:l,s)};for(var v=function(t){t in s||o(s,t,{configurable:!0,get:function(){return f[t]},set:function(n){f[t]=n}})},g=u(f),y=0;g.length>y;)v(g[y++]);l.constructor=s,s.prototype=l,e(11)(r,"RegExp",s)}e(43)("RegExp")},function(t,n,e){"use strict";e(117);var r=e(3),i=e(55),o=e(8),u=/./.toString,a=function(t){e(11)(RegExp.prototype,"toString",t,!0)};e(2)((function(){return"/a/b"!=u.call({source:"a",flags:"b"})}))?a((function(){var t=r(this);return"/".concat(t.source,"/","flags"in t?t.flags:!o&&t instanceof RegExp?i.call(t):void 0)})):"toString"!=u.name&&a((function(){return u.call(this)}))},function(t,n,e){"use strict";var r=e(3),i=e(6),o=e(84),u=e(56);e(57)("match",1,(function(t,n,e,a){return[function(e){var r=t(this),i=null==e?void 0:e[n];return void 0!==i?i.call(e,r):new RegExp(e)[n](String(r))},function(t){var n=a(e,t,this);if(n.done)return n.value;var c=r(t),s=String(this);if(!c.global)return u(c,s);var f=c.unicode;c.lastIndex=0;for(var l,h=[],d=0;null!==(l=u(c,s));){var p=String(l[0]);h[d]=p,""===p&&(c.lastIndex=o(s,i(c.lastIndex),f)),d++}return 0===d?null:h}]}))},function(t,n,e){"use strict";var r=e(3),i=e(10),o=e(6),u=e(21),a=e(84),c=e(56),s=Math.max,f=Math.min,l=Math.floor,h=/\$([$&`']|\d\d?|<[^>]*>)/g,d=/\$([$&`']|\d\d?)/g;e(57)("replace",2,(function(t,n,e,p){return[function(r,i){var o=t(this),u=null==r?void 0:r[n];return void 0!==u?u.call(r,o,i):e.call(String(o),r,i)},function(t,n){var i=p(e,t,this,n);if(i.done)return i.value;var l=r(t),h=String(this),d="function"==typeof n;d||(n=String(n));var g=l.global;if(g){var y=l.unicode;l.lastIndex=0}for(var m=[];;){var b=c(l,h);if(null===b)break;if(m.push(b),!g)break;""===String(b[0])&&(l.lastIndex=a(h,o(l.lastIndex),y))}for(var S,w="",_=0,M=0;M=_&&(w+=h.slice(_,P)+N,_=P+x.length)}return w+h.slice(_)}];function v(t,n,r,o,u,a){var c=r+t.length,s=o.length,f=d;return void 0!==u&&(u=i(u),f=h),e.call(a,f,(function(e,i){var a;switch(i.charAt(0)){case"$":return"$";case"&":return t;case"`":return n.slice(0,r);case"'":return n.slice(c);case"<":a=u[i.slice(1,-1)];break;default:var f=+i;if(0===f)return e;if(f>s){var h=l(f/10);return 0===h?e:h<=s?void 0===o[h-1]?i.charAt(1):o[h-1]+i.charAt(1):e}a=o[f-1]}return void 0===a?"":a}))}}))},function(t,n,e){"use strict";var r=e(3),i=e(102),o=e(56);e(57)("search",1,(function(t,n,e,u){return[function(e){var r=t(this),i=null==e?void 0:e[n];return void 0!==i?i.call(e,r):new RegExp(e)[n](String(r))},function(t){var n=u(e,t,this);if(n.done)return n.value;var a=r(t),c=String(this),s=a.lastIndex;i(s,0)||(a.lastIndex=0);var f=o(a,c);return i(a.lastIndex,s)||(a.lastIndex=s),null===f?-1:f.index}]}))},function(t,n,e){"use strict";var r=e(76),i=e(3),o=e(49),u=e(84),a=e(6),c=e(56),s=e(83),f=e(2),l=Math.min,h=[].push,d=!f((function(){RegExp(4294967295,"y")}));e(57)("split",2,(function(t,n,e,f){var p;return p="c"=="abbc".split(/(b)*/)[1]||4!="test".split(/(?:)/,-1).length||2!="ab".split(/(?:ab)*/).length||4!=".".split(/(.?)(.?)/).length||".".split(/()()/).length>1||"".split(/.?/).length?function(t,n){var i=String(this);if(void 0===t&&0===n)return[];if(!r(t))return e.call(i,t,n);for(var o,u,a,c=[],f=(t.ignoreCase?"i":"")+(t.multiline?"m":"")+(t.unicode?"u":"")+(t.sticky?"y":""),l=0,d=void 0===n?4294967295:n>>>0,p=new RegExp(t.source,f+"g");(o=s.call(p,i))&&!((u=p.lastIndex)>l&&(c.push(i.slice(l,o.index)),o.length>1&&o.index=d));)p.lastIndex===o.index&&p.lastIndex++;return l===i.length?!a&&p.test("")||c.push(""):c.push(i.slice(l)),c.length>d?c.slice(0,d):c}:"0".split(void 0,0).length?function(t,n){return void 0===t&&0===n?[]:e.call(this,t,n)}:e,[function(e,r){var i=t(this),o=null==e?void 0:e[n];return void 0!==o?o.call(e,i,r):p.call(String(i),e,r)},function(t,n){var r=f(p,t,this,n,p!==e);if(r.done)return r.value;var s=i(t),h=String(this),v=o(s,RegExp),g=s.unicode,y=(s.ignoreCase?"i":"")+(s.multiline?"m":"")+(s.unicode?"u":"")+(d?"y":"g"),m=new v(d?s:"^(?:"+s.source+")",y),b=void 0===n?4294967295:n>>>0;if(0===b)return[];if(0===h.length)return null===c(m,h)?[h]:[];for(var S=0,w=0,_=[];w0?arguments[0]:void 0)}}),{get:function(t){var n=r.getEntry(i(this,"Map"),t);return n&&n.v},set:function(t,n){return r.def(i(this,"Map"),0===t?0:t,n)}},r,!0)},function(t,n,e){"use strict";var r=e(121),i=e(39);t.exports=e(60)("Set",(function(t){return function(){return t(this,arguments.length>0?arguments[0]:void 0)}}),{add:function(t){return r.def(i(this,"Set"),t=0===t?0:t,t)}},r)},function(t,n,e){"use strict";var r,i=e(1),o=e(24)(0),u=e(11),a=e(29),c=e(101),s=e(122),f=e(4),l=e(39),h=e(39),d=!i.ActiveXObject&&"ActiveXObject"in i,p=a.getWeak,v=Object.isExtensible,g=s.ufstore,y=function(t){return function(){return t(this,arguments.length>0?arguments[0]:void 0)}},m={get:function(t){if(f(t)){var n=p(t);return!0===n?g(l(this,"WeakMap")).get(t):n?n[this._i]:void 0}},set:function(t,n){return s.def(l(this,"WeakMap"),t,n)}},b=t.exports=e(60)("WeakMap",y,m,s,!0,!0);h&&d&&(c((r=s.getConstructor(y,"WeakMap")).prototype,m),a.NEED=!0,o(["delete","has","get","set"],(function(t){var n=b.prototype,e=n[t];u(n,t,(function(n,i){if(f(n)&&!v(n)){this._f||(this._f=new r);var o=this._f[t](n,i);return"set"==t?this:o}return e.call(this,n,i)}))})))},function(t,n,e){"use strict";var r=e(122),i=e(39);e(60)("WeakSet",(function(t){return function(){return t(this,arguments.length>0?arguments[0]:void 0)}}),{add:function(t){return r.def(i(this,"WeakSet"),t,!0)}},r,!1,!0)},function(t,n,e){"use strict";var r=e(0),i=e(61),o=e(86),u=e(3),a=e(34),c=e(6),s=e(4),f=e(1).ArrayBuffer,l=e(49),h=o.ArrayBuffer,d=o.DataView,p=i.ABV&&f.isView,v=h.prototype.slice,g=i.VIEW;r(r.G+r.W+r.F*(f!==h),{ArrayBuffer:h}),r(r.S+r.F*!i.CONSTR,"ArrayBuffer",{isView:function(t){return p&&p(t)||s(t)&&g in t}}),r(r.P+r.U+r.F*e(2)((function(){return!new h(2).slice(1,void 0).byteLength})),"ArrayBuffer",{slice:function(t,n){if(void 0!==v&&void 0===n)return v.call(u(this),t);for(var e=u(this).byteLength,r=a(t,e),i=a(void 0===n?e:n,e),o=new(l(this,h))(c(i-r)),s=new d(this),f=new d(o),p=0;r=n.length)return{value:void 0,done:!0}}while(!((t=n[this._i++])in this._t));return{value:t,done:!1}})),r(r.S,"Reflect",{enumerate:function(t){return new o(t)}})},function(t,n,e){var r=e(22),i=e(37),o=e(13),u=e(0),a=e(4),c=e(3);u(u.S,"Reflect",{get:function t(n,e){var u,s,f=arguments.length<3?n:arguments[2];return c(n)===f?n[e]:(u=r.f(n,e))?o(u,"value")?u.value:void 0!==u.get?u.get.call(f):void 0:a(s=i(n))?t(s,e,f):void 0}})},function(t,n,e){var r=e(22),i=e(0),o=e(3);i(i.S,"Reflect",{getOwnPropertyDescriptor:function(t,n){return r.f(o(t),n)}})},function(t,n,e){var r=e(0),i=e(37),o=e(3);r(r.S,"Reflect",{getPrototypeOf:function(t){return i(o(t))}})},function(t,n,e){var r=e(0);r(r.S,"Reflect",{has:function(t,n){return n in t}})},function(t,n,e){var r=e(0),i=e(3),o=Object.isExtensible;r(r.S,"Reflect",{isExtensible:function(t){return i(t),!o||o(t)}})},function(t,n,e){var r=e(0);r(r.S,"Reflect",{ownKeys:e(124)})},function(t,n,e){var r=e(0),i=e(3),o=Object.preventExtensions;r(r.S,"Reflect",{preventExtensions:function(t){i(t);try{return o&&o(t),!0}catch(t){return!1}}})},function(t,n,e){var r=e(9),i=e(22),o=e(37),u=e(13),a=e(0),c=e(30),s=e(3),f=e(4);a(a.S,"Reflect",{set:function t(n,e,a){var l,h,d=arguments.length<4?n:arguments[3],p=i.f(s(n),e);if(!p){if(f(h=o(n)))return t(h,e,a,d);p=c(0)}if(u(p,"value")){if(!1===p.writable||!f(d))return!1;if(l=i.f(d,e)){if(l.get||l.set||!1===l.writable)return!1;l.value=a,r.f(d,e,l)}else r.f(d,e,c(0,a));return!0}return void 0!==p.set&&(p.set.call(d,a),!0)}})},function(t,n,e){var r=e(0),i=e(67);i&&r(r.S,"Reflect",{setPrototypeOf:function(t,n){i.check(t,n);try{return i.set(t,n),!0}catch(t){return!1}}})},function(t,n,e){e(276),t.exports=e(7).Array.includes},function(t,n,e){"use strict";var r=e(0),i=e(51)(!0);r(r.P,"Array",{includes:function(t){return i(this,t,arguments.length>1?arguments[1]:void 0)}}),e(38)("includes")},function(t,n,e){e(278),t.exports=e(7).Array.flatMap},function(t,n,e){"use strict";var r=e(0),i=e(279),o=e(10),u=e(6),a=e(20),c=e(112);r(r.P,"Array",{flatMap:function(t){var n,e,r=o(this);return a(t),n=u(r.length),e=c(r,0),i(e,r,r,n,0,1,t,arguments[1]),e}}),e(38)("flatMap")},function(t,n,e){"use strict";var r=e(53),i=e(4),o=e(6),u=e(19),a=e(5)("isConcatSpreadable");t.exports=function t(n,e,c,s,f,l,h,d){for(var p,v,g=f,y=0,m=!!h&&u(h,d,3);y0)g=t(n,e,p,o(p.length),g,l-1)-1;else{if(g>=9007199254740991)throw TypeError();n[g]=p}g++}y++}return g}},function(t,n,e){e(281),t.exports=e(7).String.padStart},function(t,n,e){"use strict";var r=e(0),i=e(125),o=e(59),u=/Version\/10\.\d+(\.\d+)?( Mobile\/\w+)? Safari\//.test(o);r(r.P+r.F*u,"String",{padStart:function(t){return i(this,t,arguments.length>1?arguments[1]:void 0,!0)}})},function(t,n,e){e(283),t.exports=e(7).String.padEnd},function(t,n,e){"use strict";var r=e(0),i=e(125),o=e(59),u=/Version\/10\.\d+(\.\d+)?( Mobile\/\w+)? Safari\//.test(o);r(r.P+r.F*u,"String",{padEnd:function(t){return i(this,t,arguments.length>1?arguments[1]:void 0,!1)}})},function(t,n,e){e(285),t.exports=e(7).String.trimLeft},function(t,n,e){"use strict";e(41)("trimLeft",(function(t){return function(){return t(this,1)}}),"trimStart")},function(t,n,e){e(287),t.exports=e(7).String.trimRight},function(t,n,e){"use strict";e(41)("trimRight",(function(t){return function(){return t(this,2)}}),"trimEnd")},function(t,n,e){e(289),t.exports=e(63).f("asyncIterator")},function(t,n,e){e(97)("asyncIterator")},function(t,n,e){e(291),t.exports=e(7).Object.getOwnPropertyDescriptors},function(t,n,e){var r=e(0),i=e(124),o=e(15),u=e(22),a=e(79);r(r.S,"Object",{getOwnPropertyDescriptors:function(t){for(var n,e,r=o(t),c=u.f,s=i(r),f={},l=0;s.length>l;)void 0!==(e=c(r,n=s[l++]))&&a(f,n,e);return f}})},function(t,n,e){e(293),t.exports=e(7).Object.values},function(t,n,e){var r=e(0),i=e(126)(!1);r(r.S,"Object",{values:function(t){return i(t)}})},function(t,n,e){e(295),t.exports=e(7).Object.entries},function(t,n,e){var r=e(0),i=e(126)(!0);r(r.S,"Object",{entries:function(t){return i(t)}})},function(t,n,e){"use strict";e(118),e(297),t.exports=e(7).Promise.finally},function(t,n,e){"use strict";var r=e(0),i=e(7),o=e(1),u=e(49),a=e(120);r(r.P+r.R,"Promise",{finally:function(t){var n=u(this,i.Promise||o.Promise),e="function"==typeof t;return this.then(e?function(e){return a(n,t()).then((function(){return e}))}:t,e?function(e){return a(n,t()).then((function(){throw e}))}:t)}})},function(t,n,e){e(299),e(300),e(301),t.exports=e(7)},function(t,n,e){var r=e(1),i=e(0),o=e(59),u=[].slice,a=/MSIE .\./.test(o),c=function(t){return function(n,e){var r=arguments.length>2,i=!!r&&u.call(arguments,2);return t(r?function(){("function"==typeof n?n:Function(n)).apply(this,i)}:n,e)}};i(i.G+i.B+i.F*a,{setTimeout:c(r.setTimeout),setInterval:c(r.setInterval)})},function(t,n,e){var r=e(0),i=e(85);r(r.G+r.B,{setImmediate:i.set,clearImmediate:i.clear})},function(t,n,e){for(var r=e(82),i=e(33),o=e(11),u=e(1),a=e(14),c=e(42),s=e(5),f=s("iterator"),l=s("toStringTag"),h=c.Array,d={CSSRuleList:!0,CSSStyleDeclaration:!1,CSSValueList:!1,ClientRectList:!1,DOMRectList:!1,DOMStringList:!1,DOMTokenList:!0,DataTransferItemList:!1,FileList:!1,HTMLAllCollection:!1,HTMLCollection:!1,HTMLFormElement:!1,HTMLSelectElement:!1,MediaList:!0,MimeTypeArray:!1,NamedNodeMap:!1,NodeList:!0,PaintRequestList:!1,Plugin:!1,PluginArray:!1,SVGLengthList:!1,SVGNumberList:!1,SVGPathSegList:!1,SVGPointList:!1,SVGStringList:!1,SVGTransformList:!1,SourceBufferList:!1,StyleSheetList:!0,TextTrackCueList:!1,TextTrackList:!1,TouchList:!1},p=i(d),v=0;v=0;--o){var u=this.tryEntries[o],a=u.completion;if("root"===u.tryLoc)return i("end");if(u.tryLoc<=this.prev){var c=r.call(u,"catchLoc"),s=r.call(u,"finallyLoc");if(c&&s){if(this.prev=0;--e){var i=this.tryEntries[e];if(i.tryLoc<=this.prev&&r.call(i,"finallyLoc")&&this.prev=0;--n){var e=this.tryEntries[n];if(e.finallyLoc===t)return this.complete(e.completion,e.afterLoc),O(e),p}},catch:function(t){for(var n=this.tryEntries.length-1;n>=0;--n){var e=this.tryEntries[n];if(e.tryLoc===t){var r=e.completion;if("throw"===r.type){var i=r.arg;O(e)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:A(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=n),p}},t}(t.exports);try{regeneratorRuntime=r}catch(t){Function("r","regeneratorRuntime = r")(r)}},function(t,n,e){e(304),t.exports=e(127).global},function(t,n,e){var r=e(305);r(r.G,{global:e(87)})},function(t,n,e){var r=e(87),i=e(127),o=e(306),u=e(308),a=e(315),c=function(t,n,e){var s,f,l,h=t&c.F,d=t&c.G,p=t&c.S,v=t&c.P,g=t&c.B,y=t&c.W,m=d?i:i[n]||(i[n]={}),b=m.prototype,S=d?r:p?r[n]:(r[n]||{}).prototype;for(s in d&&(e=n),e)(f=!h&&S&&void 0!==S[s])&&a(m,s)||(l=f?S[s]:e[s],m[s]=d&&"function"!=typeof S[s]?e[s]:g&&f?o(l,r):y&&S[s]==l?function(t){var n=function(n,e,r){if(this instanceof t){switch(arguments.length){case 0:return new t;case 1:return new t(n);case 2:return new t(n,e)}return new t(n,e,r)}return t.apply(this,arguments)};return n.prototype=t.prototype,n}(l):v&&"function"==typeof l?o(Function.call,l):l,v&&((m.virtual||(m.virtual={}))[s]=l,t&c.R&&b&&!b[s]&&u(b,s,l)))};c.F=1,c.G=2,c.S=4,c.P=8,c.B=16,c.W=32,c.U=64,c.R=128,t.exports=c},function(t,n,e){var r=e(307);t.exports=function(t,n,e){if(r(t),void 0===n)return t;switch(e){case 1:return function(e){return t.call(n,e)};case 2:return function(e,r){return t.call(n,e,r)};case 3:return function(e,r,i){return t.call(n,e,r,i)}}return function(){return t.apply(n,arguments)}}},function(t,n){t.exports=function(t){if("function"!=typeof t)throw TypeError(t+" is not a function!");return t}},function(t,n,e){var r=e(309),i=e(314);t.exports=e(89)?function(t,n,e){return r.f(t,n,i(1,e))}:function(t,n,e){return t[n]=e,t}},function(t,n,e){var r=e(310),i=e(311),o=e(313),u=Object.defineProperty;n.f=e(89)?Object.defineProperty:function(t,n,e){if(r(t),n=o(n,!0),r(e),i)try{return u(t,n,e)}catch(t){}if("get"in e||"set"in e)throw TypeError("Accessors not supported!");return"value"in e&&(t[n]=e.value),t}},function(t,n,e){var r=e(88);t.exports=function(t){if(!r(t))throw TypeError(t+" is not an object!");return t}},function(t,n,e){t.exports=!e(89)&&!e(128)((function(){return 7!=Object.defineProperty(e(312)("div"),"a",{get:function(){return 7}}).a}))},function(t,n,e){var r=e(88),i=e(87).document,o=r(i)&&r(i.createElement);t.exports=function(t){return o?i.createElement(t):{}}},function(t,n,e){var r=e(88);t.exports=function(t,n){if(!r(t))return t;var e,i;if(n&&"function"==typeof(e=t.toString)&&!r(i=e.call(t)))return i;if("function"==typeof(e=t.valueOf)&&!r(i=e.call(t)))return i;if(!n&&"function"==typeof(e=t.toString)&&!r(i=e.call(t)))return i;throw TypeError("Can't convert object to primitive value")}},function(t,n){t.exports=function(t,n){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:n}}},function(t,n){var e={}.hasOwnProperty;t.exports=function(t,n){return e.call(t,n)}}])})); +/** Bowser - a browser detector - v2.10.0 https://github.com/lancedikson/bowser MIT License */ +!function(t,n){"object"==typeof exports&&"object"==typeof module?module.exports=n():"function"==typeof define&&define.amd?define([],n):"object"==typeof exports?exports.bowser=n():t.bowser=n()}(this,(function(){return function(t){var n={};function e(r){if(n[r])return n[r].exports;var i=n[r]={i:r,l:!1,exports:{}};return t[r].call(i.exports,i,i.exports,e),i.l=!0,i.exports}return e.m=t,e.c=n,e.d=function(t,n,r){e.o(t,n)||Object.defineProperty(t,n,{enumerable:!0,get:r})},e.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},e.t=function(t,n){if(1&n&&(t=e(t)),8&n)return t;if(4&n&&"object"==typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(e.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&n&&"string"!=typeof t)for(var i in t)e.d(r,i,function(n){return t[n]}.bind(null,i));return r},e.n=function(t){var n=t&&t.__esModule?function(){return t.default}:function(){return t};return e.d(n,"a",n),n},e.o=function(t,n){return Object.prototype.hasOwnProperty.call(t,n)},e.p="",e(e.s=129)}([function(t,n,e){var r=e(1),i=e(7),o=e(14),u=e(11),a=e(19),c=function(t,n,e){var s,f,l,h,d=t&c.F,p=t&c.G,v=t&c.S,g=t&c.P,y=t&c.B,m=p?r:v?r[n]||(r[n]={}):(r[n]||{}).prototype,b=p?i:i[n]||(i[n]={}),S=b.prototype||(b.prototype={});for(s in p&&(e=n),e)l=((f=!d&&m&&void 0!==m[s])?m:e)[s],h=y&&f?a(l,r):g&&"function"==typeof l?a(Function.call,l):l,m&&u(m,s,l,t&c.U),b[s]!=l&&o(b,s,h),g&&S[s]!=l&&(S[s]=l)};r.core=i,c.F=1,c.G=2,c.S=4,c.P=8,c.B=16,c.W=32,c.U=64,c.R=128,t.exports=c},function(t,n){var e=t.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=e)},function(t,n){t.exports=function(t){try{return!!t()}catch(t){return!0}}},function(t,n,e){var r=e(4);t.exports=function(t){if(!r(t))throw TypeError(t+" is not an object!");return t}},function(t,n){t.exports=function(t){return"object"==typeof t?null!==t:"function"==typeof t}},function(t,n,e){var r=e(50)("wks"),i=e(31),o=e(1).Symbol,u="function"==typeof o;(t.exports=function(t){return r[t]||(r[t]=u&&o[t]||(u?o:i)("Symbol."+t))}).store=r},function(t,n,e){var r=e(21),i=Math.min;t.exports=function(t){return t>0?i(r(t),9007199254740991):0}},function(t,n){var e=t.exports={version:"2.6.9"};"number"==typeof __e&&(__e=e)},function(t,n,e){t.exports=!e(2)((function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a}))},function(t,n,e){var r=e(3),i=e(96),o=e(28),u=Object.defineProperty;n.f=e(8)?Object.defineProperty:function(t,n,e){if(r(t),n=o(n,!0),r(e),i)try{return u(t,n,e)}catch(t){}if("get"in e||"set"in e)throw TypeError("Accessors not supported!");return"value"in e&&(t[n]=e.value),t}},function(t,n,e){var r=e(26);t.exports=function(t){return Object(r(t))}},function(t,n,e){var r=e(1),i=e(14),o=e(13),u=e(31)("src"),a=e(134),c=(""+a).split("toString");e(7).inspectSource=function(t){return a.call(t)},(t.exports=function(t,n,e,a){var s="function"==typeof e;s&&(o(e,"name")||i(e,"name",n)),t[n]!==e&&(s&&(o(e,u)||i(e,u,t[n]?""+t[n]:c.join(String(n)))),t===r?t[n]=e:a?t[n]?t[n]=e:i(t,n,e):(delete t[n],i(t,n,e)))})(Function.prototype,"toString",(function(){return"function"==typeof this&&this[u]||a.call(this)}))},function(t,n,e){var r=e(0),i=e(2),o=e(26),u=/"/g,a=function(t,n,e,r){var i=String(o(t)),a="<"+n;return""!==e&&(a+=" "+e+'="'+String(r).replace(u,""")+'"'),a+">"+i+""};t.exports=function(t,n){var e={};e[t]=n(a),r(r.P+r.F*i((function(){var n=""[t]('"');return n!==n.toLowerCase()||n.split('"').length>3})),"String",e)}},function(t,n){var e={}.hasOwnProperty;t.exports=function(t,n){return e.call(t,n)}},function(t,n,e){var r=e(9),i=e(30);t.exports=e(8)?function(t,n,e){return r.f(t,n,i(1,e))}:function(t,n,e){return t[n]=e,t}},function(t,n,e){var r=e(46),i=e(26);t.exports=function(t){return r(i(t))}},function(t,n,e){"use strict";var r=e(2);t.exports=function(t,n){return!!t&&r((function(){n?t.call(null,(function(){}),1):t.call(null)}))}},function(t,n,e){"use strict";n.__esModule=!0,n.default=void 0;var r=e(18),i=function(){function t(){}return t.getFirstMatch=function(t,n){var e=n.match(t);return e&&e.length>0&&e[1]||""},t.getSecondMatch=function(t,n){var e=n.match(t);return e&&e.length>1&&e[2]||""},t.matchAndReturnConst=function(t,n,e){if(t.test(n))return e},t.getWindowsVersionName=function(t){switch(t){case"NT":return"NT";case"XP":return"XP";case"NT 5.0":return"2000";case"NT 5.1":return"XP";case"NT 5.2":return"2003";case"NT 6.0":return"Vista";case"NT 6.1":return"7";case"NT 6.2":return"8";case"NT 6.3":return"8.1";case"NT 10.0":return"10";default:return}},t.getMacOSVersionName=function(t){var n=t.split(".").splice(0,2).map((function(t){return parseInt(t,10)||0}));if(n.push(0),10===n[0])switch(n[1]){case 5:return"Leopard";case 6:return"Snow Leopard";case 7:return"Lion";case 8:return"Mountain Lion";case 9:return"Mavericks";case 10:return"Yosemite";case 11:return"El Capitan";case 12:return"Sierra";case 13:return"High Sierra";case 14:return"Mojave";case 15:return"Catalina";default:return}},t.getAndroidVersionName=function(t){var n=t.split(".").splice(0,2).map((function(t){return parseInt(t,10)||0}));if(n.push(0),!(1===n[0]&&n[1]<5))return 1===n[0]&&n[1]<6?"Cupcake":1===n[0]&&n[1]>=6?"Donut":2===n[0]&&n[1]<2?"Eclair":2===n[0]&&2===n[1]?"Froyo":2===n[0]&&n[1]>2?"Gingerbread":3===n[0]?"Honeycomb":4===n[0]&&n[1]<1?"Ice Cream Sandwich":4===n[0]&&n[1]<4?"Jelly Bean":4===n[0]&&n[1]>=4?"KitKat":5===n[0]?"Lollipop":6===n[0]?"Marshmallow":7===n[0]?"Nougat":8===n[0]?"Oreo":9===n[0]?"Pie":void 0},t.getVersionPrecision=function(t){return t.split(".").length},t.compareVersions=function(n,e,r){void 0===r&&(r=!1);var i=t.getVersionPrecision(n),o=t.getVersionPrecision(e),u=Math.max(i,o),a=0,c=t.map([n,e],(function(n){var e=u-t.getVersionPrecision(n),r=n+new Array(e+1).join(".0");return t.map(r.split("."),(function(t){return new Array(20-t.length).join("0")+t})).reverse()}));for(r&&(a=u-Math.min(i,o)),u-=1;u>=a;){if(c[0][u]>c[1][u])return 1;if(c[0][u]===c[1][u]){if(u===a)return 0;u-=1}else if(c[0][u]1?i-1:0),u=1;u0?r:e)(t)}},function(t,n,e){var r=e(47),i=e(30),o=e(15),u=e(28),a=e(13),c=e(96),s=Object.getOwnPropertyDescriptor;n.f=e(8)?s:function(t,n){if(t=o(t),n=u(n,!0),c)try{return s(t,n)}catch(t){}if(a(t,n))return i(!r.f.call(t,n),t[n])}},function(t,n,e){var r=e(0),i=e(7),o=e(2);t.exports=function(t,n){var e=(i.Object||{})[t]||Object[t],u={};u[t]=n(e),r(r.S+r.F*o((function(){e(1)})),"Object",u)}},function(t,n,e){var r=e(19),i=e(46),o=e(10),u=e(6),a=e(112);t.exports=function(t,n){var e=1==t,c=2==t,s=3==t,f=4==t,l=6==t,h=5==t||l,d=n||a;return function(n,a,p){for(var v,g,y=o(n),m=i(y),b=r(a,p,3),S=u(m.length),w=0,_=e?d(n,S):c?d(n,0):void 0;S>w;w++)if((h||w in m)&&(g=b(v=m[w],w,y),t))if(e)_[w]=g;else if(g)switch(t){case 3:return!0;case 5:return v;case 6:return w;case 2:_.push(v)}else if(f)return!1;return l?-1:s||f?f:_}}},function(t,n){var e={}.toString;t.exports=function(t){return e.call(t).slice(8,-1)}},function(t,n){t.exports=function(t){if(null==t)throw TypeError("Can't call method on "+t);return t}},function(t,n,e){"use strict";if(e(8)){var r=e(32),i=e(1),o=e(2),u=e(0),a=e(61),c=e(86),s=e(19),f=e(44),l=e(30),h=e(14),d=e(45),p=e(21),v=e(6),g=e(123),y=e(34),m=e(28),b=e(13),S=e(48),w=e(4),_=e(10),M=e(78),x=e(35),P=e(37),O=e(36).f,F=e(80),A=e(31),E=e(5),N=e(24),R=e(51),k=e(49),T=e(82),I=e(42),j=e(54),L=e(43),B=e(81),C=e(114),W=e(9),V=e(22),G=W.f,D=V.f,U=i.RangeError,z=i.TypeError,q=i.Uint8Array,K=Array.prototype,Y=c.ArrayBuffer,Q=c.DataView,H=N(0),J=N(2),X=N(3),Z=N(4),$=N(5),tt=N(6),nt=R(!0),et=R(!1),rt=T.values,it=T.keys,ot=T.entries,ut=K.lastIndexOf,at=K.reduce,ct=K.reduceRight,st=K.join,ft=K.sort,lt=K.slice,ht=K.toString,dt=K.toLocaleString,pt=E("iterator"),vt=E("toStringTag"),gt=A("typed_constructor"),yt=A("def_constructor"),mt=a.CONSTR,bt=a.TYPED,St=a.VIEW,wt=N(1,(function(t,n){return Ot(k(t,t[yt]),n)})),_t=o((function(){return 1===new q(new Uint16Array([1]).buffer)[0]})),Mt=!!q&&!!q.prototype.set&&o((function(){new q(1).set({})})),xt=function(t,n){var e=p(t);if(e<0||e%n)throw U("Wrong offset!");return e},Pt=function(t){if(w(t)&&bt in t)return t;throw z(t+" is not a typed array!")},Ot=function(t,n){if(!(w(t)&> in t))throw z("It is not a typed array constructor!");return new t(n)},Ft=function(t,n){return At(k(t,t[yt]),n)},At=function(t,n){for(var e=0,r=n.length,i=Ot(t,r);r>e;)i[e]=n[e++];return i},Et=function(t,n,e){G(t,n,{get:function(){return this._d[e]}})},Nt=function(t){var n,e,r,i,o,u,a=_(t),c=arguments.length,f=c>1?arguments[1]:void 0,l=void 0!==f,h=F(a);if(null!=h&&!M(h)){for(u=h.call(a),r=[],n=0;!(o=u.next()).done;n++)r.push(o.value);a=r}for(l&&c>2&&(f=s(f,arguments[2],2)),n=0,e=v(a.length),i=Ot(this,e);e>n;n++)i[n]=l?f(a[n],n):a[n];return i},Rt=function(){for(var t=0,n=arguments.length,e=Ot(this,n);n>t;)e[t]=arguments[t++];return e},kt=!!q&&o((function(){dt.call(new q(1))})),Tt=function(){return dt.apply(kt?lt.call(Pt(this)):Pt(this),arguments)},It={copyWithin:function(t,n){return C.call(Pt(this),t,n,arguments.length>2?arguments[2]:void 0)},every:function(t){return Z(Pt(this),t,arguments.length>1?arguments[1]:void 0)},fill:function(t){return B.apply(Pt(this),arguments)},filter:function(t){return Ft(this,J(Pt(this),t,arguments.length>1?arguments[1]:void 0))},find:function(t){return $(Pt(this),t,arguments.length>1?arguments[1]:void 0)},findIndex:function(t){return tt(Pt(this),t,arguments.length>1?arguments[1]:void 0)},forEach:function(t){H(Pt(this),t,arguments.length>1?arguments[1]:void 0)},indexOf:function(t){return et(Pt(this),t,arguments.length>1?arguments[1]:void 0)},includes:function(t){return nt(Pt(this),t,arguments.length>1?arguments[1]:void 0)},join:function(t){return st.apply(Pt(this),arguments)},lastIndexOf:function(t){return ut.apply(Pt(this),arguments)},map:function(t){return wt(Pt(this),t,arguments.length>1?arguments[1]:void 0)},reduce:function(t){return at.apply(Pt(this),arguments)},reduceRight:function(t){return ct.apply(Pt(this),arguments)},reverse:function(){for(var t,n=Pt(this).length,e=Math.floor(n/2),r=0;r1?arguments[1]:void 0)},sort:function(t){return ft.call(Pt(this),t)},subarray:function(t,n){var e=Pt(this),r=e.length,i=y(t,r);return new(k(e,e[yt]))(e.buffer,e.byteOffset+i*e.BYTES_PER_ELEMENT,v((void 0===n?r:y(n,r))-i))}},jt=function(t,n){return Ft(this,lt.call(Pt(this),t,n))},Lt=function(t){Pt(this);var n=xt(arguments[1],1),e=this.length,r=_(t),i=v(r.length),o=0;if(i+n>e)throw U("Wrong length!");for(;o255?255:255&r),i.v[d](e*n+i.o,r,_t)}(this,e,t)},enumerable:!0})};b?(p=e((function(t,e,r,i){f(t,p,s,"_d");var o,u,a,c,l=0,d=0;if(w(e)){if(!(e instanceof Y||"ArrayBuffer"==(c=S(e))||"SharedArrayBuffer"==c))return bt in e?At(p,e):Nt.call(p,e);o=e,d=xt(r,n);var y=e.byteLength;if(void 0===i){if(y%n)throw U("Wrong length!");if((u=y-d)<0)throw U("Wrong length!")}else if((u=v(i)*n)+d>y)throw U("Wrong length!");a=u/n}else a=g(e),o=new Y(u=a*n);for(h(t,"_d",{b:o,o:d,l:u,e:a,v:new Q(o)});ldocument.F=Object<\/script>"),t.close(),c=t.F;r--;)delete c.prototype[o[r]];return c()};t.exports=Object.create||function(t,n){var e;return null!==t?(a.prototype=r(t),e=new a,a.prototype=null,e[u]=t):e=c(),void 0===n?e:i(e,n)}},function(t,n,e){var r=e(98),i=e(65).concat("length","prototype");n.f=Object.getOwnPropertyNames||function(t){return r(t,i)}},function(t,n,e){var r=e(13),i=e(10),o=e(64)("IE_PROTO"),u=Object.prototype;t.exports=Object.getPrototypeOf||function(t){return t=i(t),r(t,o)?t[o]:"function"==typeof t.constructor&&t instanceof t.constructor?t.constructor.prototype:t instanceof Object?u:null}},function(t,n,e){var r=e(5)("unscopables"),i=Array.prototype;null==i[r]&&e(14)(i,r,{}),t.exports=function(t){i[r][t]=!0}},function(t,n,e){var r=e(4);t.exports=function(t,n){if(!r(t)||t._t!==n)throw TypeError("Incompatible receiver, "+n+" required!");return t}},function(t,n,e){var r=e(9).f,i=e(13),o=e(5)("toStringTag");t.exports=function(t,n,e){t&&!i(t=e?t:t.prototype,o)&&r(t,o,{configurable:!0,value:n})}},function(t,n,e){var r=e(0),i=e(26),o=e(2),u=e(68),a="["+u+"]",c=RegExp("^"+a+a+"*"),s=RegExp(a+a+"*$"),f=function(t,n,e){var i={},a=o((function(){return!!u[t]()||"​…"!="​…"[t]()})),c=i[t]=a?n(l):u[t];e&&(i[e]=c),r(r.P+r.F*a,"String",i)},l=f.trim=function(t,n){return t=String(i(t)),1&n&&(t=t.replace(c,"")),2&n&&(t=t.replace(s,"")),t};t.exports=f},function(t,n){t.exports={}},function(t,n,e){"use strict";var r=e(1),i=e(9),o=e(8),u=e(5)("species");t.exports=function(t){var n=r[t];o&&n&&!n[u]&&i.f(n,u,{configurable:!0,get:function(){return this}})}},function(t,n){t.exports=function(t,n,e,r){if(!(t instanceof n)||void 0!==r&&r in t)throw TypeError(e+": incorrect invocation!");return t}},function(t,n,e){var r=e(11);t.exports=function(t,n,e){for(var i in n)r(t,i,n[i],e);return t}},function(t,n,e){var r=e(25);t.exports=Object("z").propertyIsEnumerable(0)?Object:function(t){return"String"==r(t)?t.split(""):Object(t)}},function(t,n){n.f={}.propertyIsEnumerable},function(t,n,e){var r=e(25),i=e(5)("toStringTag"),o="Arguments"==r(function(){return arguments}());t.exports=function(t){var n,e,u;return void 0===t?"Undefined":null===t?"Null":"string"==typeof(e=function(t,n){try{return t[n]}catch(t){}}(n=Object(t),i))?e:o?r(n):"Object"==(u=r(n))&&"function"==typeof n.callee?"Arguments":u}},function(t,n,e){var r=e(3),i=e(20),o=e(5)("species");t.exports=function(t,n){var e,u=r(t).constructor;return void 0===u||null==(e=r(u)[o])?n:i(e)}},function(t,n,e){var r=e(7),i=e(1),o=i["__core-js_shared__"]||(i["__core-js_shared__"]={});(t.exports=function(t,n){return o[t]||(o[t]=void 0!==n?n:{})})("versions",[]).push({version:r.version,mode:e(32)?"pure":"global",copyright:"© 2019 Denis Pushkarev (zloirock.ru)"})},function(t,n,e){var r=e(15),i=e(6),o=e(34);t.exports=function(t){return function(n,e,u){var a,c=r(n),s=i(c.length),f=o(u,s);if(t&&e!=e){for(;s>f;)if((a=c[f++])!=a)return!0}else for(;s>f;f++)if((t||f in c)&&c[f]===e)return t||f||0;return!t&&-1}}},function(t,n){n.f=Object.getOwnPropertySymbols},function(t,n,e){var r=e(25);t.exports=Array.isArray||function(t){return"Array"==r(t)}},function(t,n,e){var r=e(5)("iterator"),i=!1;try{var o=[7][r]();o.return=function(){i=!0},Array.from(o,(function(){throw 2}))}catch(t){}t.exports=function(t,n){if(!n&&!i)return!1;var e=!1;try{var o=[7],u=o[r]();u.next=function(){return{done:e=!0}},o[r]=function(){return u},t(o)}catch(t){}return e}},function(t,n,e){"use strict";var r=e(3);t.exports=function(){var t=r(this),n="";return t.global&&(n+="g"),t.ignoreCase&&(n+="i"),t.multiline&&(n+="m"),t.unicode&&(n+="u"),t.sticky&&(n+="y"),n}},function(t,n,e){"use strict";var r=e(48),i=RegExp.prototype.exec;t.exports=function(t,n){var e=t.exec;if("function"==typeof e){var o=e.call(t,n);if("object"!=typeof o)throw new TypeError("RegExp exec method returned something other than an Object or null");return o}if("RegExp"!==r(t))throw new TypeError("RegExp#exec called on incompatible receiver");return i.call(t,n)}},function(t,n,e){"use strict";e(116);var r=e(11),i=e(14),o=e(2),u=e(26),a=e(5),c=e(83),s=a("species"),f=!o((function(){var t=/./;return t.exec=function(){var t=[];return t.groups={a:"7"},t},"7"!=="".replace(t,"$")})),l=function(){var t=/(?:)/,n=t.exec;t.exec=function(){return n.apply(this,arguments)};var e="ab".split(t);return 2===e.length&&"a"===e[0]&&"b"===e[1]}();t.exports=function(t,n,e){var h=a(t),d=!o((function(){var n={};return n[h]=function(){return 7},7!=""[t](n)})),p=d?!o((function(){var n=!1,e=/a/;return e.exec=function(){return n=!0,null},"split"===t&&(e.constructor={},e.constructor[s]=function(){return e}),e[h](""),!n})):void 0;if(!d||!p||"replace"===t&&!f||"split"===t&&!l){var v=/./[h],g=e(u,h,""[t],(function(t,n,e,r,i){return n.exec===c?d&&!i?{done:!0,value:v.call(n,e,r)}:{done:!0,value:t.call(e,n,r)}:{done:!1}})),y=g[0],m=g[1];r(String.prototype,t,y),i(RegExp.prototype,h,2==n?function(t,n){return m.call(t,this,n)}:function(t){return m.call(t,this)})}}},function(t,n,e){var r=e(19),i=e(111),o=e(78),u=e(3),a=e(6),c=e(80),s={},f={};(n=t.exports=function(t,n,e,l,h){var d,p,v,g,y=h?function(){return t}:c(t),m=r(e,l,n?2:1),b=0;if("function"!=typeof y)throw TypeError(t+" is not iterable!");if(o(y)){for(d=a(t.length);d>b;b++)if((g=n?m(u(p=t[b])[0],p[1]):m(t[b]))===s||g===f)return g}else for(v=y.call(t);!(p=v.next()).done;)if((g=i(v,m,p.value,n))===s||g===f)return g}).BREAK=s,n.RETURN=f},function(t,n,e){var r=e(1).navigator;t.exports=r&&r.userAgent||""},function(t,n,e){"use strict";var r=e(1),i=e(0),o=e(11),u=e(45),a=e(29),c=e(58),s=e(44),f=e(4),l=e(2),h=e(54),d=e(40),p=e(69);t.exports=function(t,n,e,v,g,y){var m=r[t],b=m,S=g?"set":"add",w=b&&b.prototype,_={},M=function(t){var n=w[t];o(w,t,"delete"==t?function(t){return!(y&&!f(t))&&n.call(this,0===t?0:t)}:"has"==t?function(t){return!(y&&!f(t))&&n.call(this,0===t?0:t)}:"get"==t?function(t){return y&&!f(t)?void 0:n.call(this,0===t?0:t)}:"add"==t?function(t){return n.call(this,0===t?0:t),this}:function(t,e){return n.call(this,0===t?0:t,e),this})};if("function"==typeof b&&(y||w.forEach&&!l((function(){(new b).entries().next()})))){var x=new b,P=x[S](y?{}:-0,1)!=x,O=l((function(){x.has(1)})),F=h((function(t){new b(t)})),A=!y&&l((function(){for(var t=new b,n=5;n--;)t[S](n,n);return!t.has(-0)}));F||((b=n((function(n,e){s(n,b,t);var r=p(new m,n,b);return null!=e&&c(e,g,r[S],r),r}))).prototype=w,w.constructor=b),(O||A)&&(M("delete"),M("has"),g&&M("get")),(A||P)&&M(S),y&&w.clear&&delete w.clear}else b=v.getConstructor(n,t,g,S),u(b.prototype,e),a.NEED=!0;return d(b,t),_[t]=b,i(i.G+i.W+i.F*(b!=m),_),y||v.setStrong(b,t,g),b}},function(t,n,e){for(var r,i=e(1),o=e(14),u=e(31),a=u("typed_array"),c=u("view"),s=!(!i.ArrayBuffer||!i.DataView),f=s,l=0,h="Int8Array,Uint8Array,Uint8ClampedArray,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array".split(",");l<9;)(r=i[h[l++]])?(o(r.prototype,a,!0),o(r.prototype,c,!0)):f=!1;t.exports={ABV:s,CONSTR:f,TYPED:a,VIEW:c}},function(t,n,e){var r=e(4),i=e(1).document,o=r(i)&&r(i.createElement);t.exports=function(t){return o?i.createElement(t):{}}},function(t,n,e){n.f=e(5)},function(t,n,e){var r=e(50)("keys"),i=e(31);t.exports=function(t){return r[t]||(r[t]=i(t))}},function(t,n){t.exports="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(",")},function(t,n,e){var r=e(1).document;t.exports=r&&r.documentElement},function(t,n,e){var r=e(4),i=e(3),o=function(t,n){if(i(t),!r(n)&&null!==n)throw TypeError(n+": can't set as prototype!")};t.exports={set:Object.setPrototypeOf||("__proto__"in{}?function(t,n,r){try{(r=e(19)(Function.call,e(22).f(Object.prototype,"__proto__").set,2))(t,[]),n=!(t instanceof Array)}catch(t){n=!0}return function(t,e){return o(t,e),n?t.__proto__=e:r(t,e),t}}({},!1):void 0),check:o}},function(t,n){t.exports="\t\n\v\f\r   ᠎              \u2028\u2029\ufeff"},function(t,n,e){var r=e(4),i=e(67).set;t.exports=function(t,n,e){var o,u=n.constructor;return u!==e&&"function"==typeof u&&(o=u.prototype)!==e.prototype&&r(o)&&i&&i(t,o),t}},function(t,n,e){"use strict";var r=e(21),i=e(26);t.exports=function(t){var n=String(i(this)),e="",o=r(t);if(o<0||o==1/0)throw RangeError("Count can't be negative");for(;o>0;(o>>>=1)&&(n+=n))1&o&&(e+=n);return e}},function(t,n){t.exports=Math.sign||function(t){return 0==(t=+t)||t!=t?t:t<0?-1:1}},function(t,n){var e=Math.expm1;t.exports=!e||e(10)>22025.465794806718||e(10)<22025.465794806718||-2e-17!=e(-2e-17)?function(t){return 0==(t=+t)?t:t>-1e-6&&t<1e-6?t+t*t/2:Math.exp(t)-1}:e},function(t,n,e){var r=e(21),i=e(26);t.exports=function(t){return function(n,e){var o,u,a=String(i(n)),c=r(e),s=a.length;return c<0||c>=s?t?"":void 0:(o=a.charCodeAt(c))<55296||o>56319||c+1===s||(u=a.charCodeAt(c+1))<56320||u>57343?t?a.charAt(c):o:t?a.slice(c,c+2):u-56320+(o-55296<<10)+65536}}},function(t,n,e){"use strict";var r=e(32),i=e(0),o=e(11),u=e(14),a=e(42),c=e(110),s=e(40),f=e(37),l=e(5)("iterator"),h=!([].keys&&"next"in[].keys()),d=function(){return this};t.exports=function(t,n,e,p,v,g,y){c(e,n,p);var m,b,S,w=function(t){if(!h&&t in P)return P[t];switch(t){case"keys":case"values":return function(){return new e(this,t)}}return function(){return new e(this,t)}},_=n+" Iterator",M="values"==v,x=!1,P=t.prototype,O=P[l]||P["@@iterator"]||v&&P[v],F=O||w(v),A=v?M?w("entries"):F:void 0,E="Array"==n&&P.entries||O;if(E&&(S=f(E.call(new t)))!==Object.prototype&&S.next&&(s(S,_,!0),r||"function"==typeof S[l]||u(S,l,d)),M&&O&&"values"!==O.name&&(x=!0,F=function(){return O.call(this)}),r&&!y||!h&&!x&&P[l]||u(P,l,F),a[n]=F,a[_]=d,v)if(m={values:M?F:w("values"),keys:g?F:w("keys"),entries:A},y)for(b in m)b in P||o(P,b,m[b]);else i(i.P+i.F*(h||x),n,m);return m}},function(t,n,e){var r=e(76),i=e(26);t.exports=function(t,n,e){if(r(n))throw TypeError("String#"+e+" doesn't accept regex!");return String(i(t))}},function(t,n,e){var r=e(4),i=e(25),o=e(5)("match");t.exports=function(t){var n;return r(t)&&(void 0!==(n=t[o])?!!n:"RegExp"==i(t))}},function(t,n,e){var r=e(5)("match");t.exports=function(t){var n=/./;try{"/./"[t](n)}catch(e){try{return n[r]=!1,!"/./"[t](n)}catch(t){}}return!0}},function(t,n,e){var r=e(42),i=e(5)("iterator"),o=Array.prototype;t.exports=function(t){return void 0!==t&&(r.Array===t||o[i]===t)}},function(t,n,e){"use strict";var r=e(9),i=e(30);t.exports=function(t,n,e){n in t?r.f(t,n,i(0,e)):t[n]=e}},function(t,n,e){var r=e(48),i=e(5)("iterator"),o=e(42);t.exports=e(7).getIteratorMethod=function(t){if(null!=t)return t[i]||t["@@iterator"]||o[r(t)]}},function(t,n,e){"use strict";var r=e(10),i=e(34),o=e(6);t.exports=function(t){for(var n=r(this),e=o(n.length),u=arguments.length,a=i(u>1?arguments[1]:void 0,e),c=u>2?arguments[2]:void 0,s=void 0===c?e:i(c,e);s>a;)n[a++]=t;return n}},function(t,n,e){"use strict";var r=e(38),i=e(115),o=e(42),u=e(15);t.exports=e(74)(Array,"Array",(function(t,n){this._t=u(t),this._i=0,this._k=n}),(function(){var t=this._t,n=this._k,e=this._i++;return!t||e>=t.length?(this._t=void 0,i(1)):i(0,"keys"==n?e:"values"==n?t[e]:[e,t[e]])}),"values"),o.Arguments=o.Array,r("keys"),r("values"),r("entries")},function(t,n,e){"use strict";var r,i,o=e(55),u=RegExp.prototype.exec,a=String.prototype.replace,c=u,s=(r=/a/,i=/b*/g,u.call(r,"a"),u.call(i,"a"),0!==r.lastIndex||0!==i.lastIndex),f=void 0!==/()??/.exec("")[1];(s||f)&&(c=function(t){var n,e,r,i,c=this;return f&&(e=new RegExp("^"+c.source+"$(?!\\s)",o.call(c))),s&&(n=c.lastIndex),r=u.call(c,t),s&&r&&(c.lastIndex=c.global?r.index+r[0].length:n),f&&r&&r.length>1&&a.call(r[0],e,(function(){for(i=1;ie;)n.push(arguments[e++]);return y[++g]=function(){a("function"==typeof t?t:Function(t),n)},r(g),g},d=function(t){delete y[t]},"process"==e(25)(l)?r=function(t){l.nextTick(u(m,t,1))}:v&&v.now?r=function(t){v.now(u(m,t,1))}:p?(o=(i=new p).port2,i.port1.onmessage=b,r=u(o.postMessage,o,1)):f.addEventListener&&"function"==typeof postMessage&&!f.importScripts?(r=function(t){f.postMessage(t+"","*")},f.addEventListener("message",b,!1)):r="onreadystatechange"in s("script")?function(t){c.appendChild(s("script")).onreadystatechange=function(){c.removeChild(this),m.call(t)}}:function(t){setTimeout(u(m,t,1),0)}),t.exports={set:h,clear:d}},function(t,n,e){"use strict";var r=e(1),i=e(8),o=e(32),u=e(61),a=e(14),c=e(45),s=e(2),f=e(44),l=e(21),h=e(6),d=e(123),p=e(36).f,v=e(9).f,g=e(81),y=e(40),m="prototype",b="Wrong index!",S=r.ArrayBuffer,w=r.DataView,_=r.Math,M=r.RangeError,x=r.Infinity,P=S,O=_.abs,F=_.pow,A=_.floor,E=_.log,N=_.LN2,R=i?"_b":"buffer",k=i?"_l":"byteLength",T=i?"_o":"byteOffset";function I(t,n,e){var r,i,o,u=new Array(e),a=8*e-n-1,c=(1<>1,f=23===n?F(2,-24)-F(2,-77):0,l=0,h=t<0||0===t&&1/t<0?1:0;for((t=O(t))!=t||t===x?(i=t!=t?1:0,r=c):(r=A(E(t)/N),t*(o=F(2,-r))<1&&(r--,o*=2),(t+=r+s>=1?f/o:f*F(2,1-s))*o>=2&&(r++,o/=2),r+s>=c?(i=0,r=c):r+s>=1?(i=(t*o-1)*F(2,n),r+=s):(i=t*F(2,s-1)*F(2,n),r=0));n>=8;u[l++]=255&i,i/=256,n-=8);for(r=r<0;u[l++]=255&r,r/=256,a-=8);return u[--l]|=128*h,u}function j(t,n,e){var r,i=8*e-n-1,o=(1<>1,a=i-7,c=e-1,s=t[c--],f=127&s;for(s>>=7;a>0;f=256*f+t[c],c--,a-=8);for(r=f&(1<<-a)-1,f>>=-a,a+=n;a>0;r=256*r+t[c],c--,a-=8);if(0===f)f=1-u;else{if(f===o)return r?NaN:s?-x:x;r+=F(2,n),f-=u}return(s?-1:1)*r*F(2,f-n)}function L(t){return t[3]<<24|t[2]<<16|t[1]<<8|t[0]}function B(t){return[255&t]}function C(t){return[255&t,t>>8&255]}function W(t){return[255&t,t>>8&255,t>>16&255,t>>24&255]}function V(t){return I(t,52,8)}function G(t){return I(t,23,4)}function D(t,n,e){v(t[m],n,{get:function(){return this[e]}})}function U(t,n,e,r){var i=d(+e);if(i+n>t[k])throw M(b);var o=t[R]._b,u=i+t[T],a=o.slice(u,u+n);return r?a:a.reverse()}function z(t,n,e,r,i,o){var u=d(+e);if(u+n>t[k])throw M(b);for(var a=t[R]._b,c=u+t[T],s=r(+i),f=0;fQ;)(q=Y[Q++])in S||a(S,q,P[q]);o||(K.constructor=S)}var H=new w(new S(2)),J=w[m].setInt8;H.setInt8(0,2147483648),H.setInt8(1,2147483649),!H.getInt8(0)&&H.getInt8(1)||c(w[m],{setInt8:function(t,n){J.call(this,t,n<<24>>24)},setUint8:function(t,n){J.call(this,t,n<<24>>24)}},!0)}else S=function(t){f(this,S,"ArrayBuffer");var n=d(t);this._b=g.call(new Array(n),0),this[k]=n},w=function(t,n,e){f(this,w,"DataView"),f(t,S,"DataView");var r=t[k],i=l(n);if(i<0||i>r)throw M("Wrong offset!");if(i+(e=void 0===e?r-i:h(e))>r)throw M("Wrong length!");this[R]=t,this[T]=i,this[k]=e},i&&(D(S,"byteLength","_l"),D(w,"buffer","_b"),D(w,"byteLength","_l"),D(w,"byteOffset","_o")),c(w[m],{getInt8:function(t){return U(this,1,t)[0]<<24>>24},getUint8:function(t){return U(this,1,t)[0]},getInt16:function(t){var n=U(this,2,t,arguments[1]);return(n[1]<<8|n[0])<<16>>16},getUint16:function(t){var n=U(this,2,t,arguments[1]);return n[1]<<8|n[0]},getInt32:function(t){return L(U(this,4,t,arguments[1]))},getUint32:function(t){return L(U(this,4,t,arguments[1]))>>>0},getFloat32:function(t){return j(U(this,4,t,arguments[1]),23,4)},getFloat64:function(t){return j(U(this,8,t,arguments[1]),52,8)},setInt8:function(t,n){z(this,1,t,B,n)},setUint8:function(t,n){z(this,1,t,B,n)},setInt16:function(t,n){z(this,2,t,C,n,arguments[2])},setUint16:function(t,n){z(this,2,t,C,n,arguments[2])},setInt32:function(t,n){z(this,4,t,W,n,arguments[2])},setUint32:function(t,n){z(this,4,t,W,n,arguments[2])},setFloat32:function(t,n){z(this,4,t,G,n,arguments[2])},setFloat64:function(t,n){z(this,8,t,V,n,arguments[2])}});y(S,"ArrayBuffer"),y(w,"DataView"),a(w[m],u.VIEW,!0),n.ArrayBuffer=S,n.DataView=w},function(t,n){var e=t.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=e)},function(t,n){t.exports=function(t){return"object"==typeof t?null!==t:"function"==typeof t}},function(t,n,e){t.exports=!e(128)((function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a}))},function(t,n,e){"use strict";n.__esModule=!0,n.default=void 0;var r,i=(r=e(91))&&r.__esModule?r:{default:r},o=e(18);function u(t,n){for(var e=0;e0){var u=Object.keys(e),c=a.default.find(u,(function(t){return n.isOS(t)}));if(c){var s=this.satisfies(e[c]);if(void 0!==s)return s}var f=a.default.find(u,(function(t){return n.isPlatform(t)}));if(f){var l=this.satisfies(e[f]);if(void 0!==l)return l}}if(o>0){var h=Object.keys(i),d=a.default.find(h,(function(t){return n.isBrowser(t,!0)}));if(void 0!==d)return this.compareVersion(i[d])}},n.isBrowser=function(t,n){void 0===n&&(n=!1);var e=this.getBrowserName().toLowerCase(),r=t.toLowerCase(),i=a.default.getBrowserTypeByAlias(r);return n&&i&&(r=i.toLowerCase()),r===e},n.compareVersion=function(t){var n=[0],e=t,r=!1,i=this.getBrowserVersion();if("string"==typeof i)return">"===t[0]||"<"===t[0]?(e=t.substr(1),"="===t[1]?(r=!0,e=t.substr(2)):n=[],">"===t[0]?n.push(1):n.push(-1)):"="===t[0]?e=t.substr(1):"~"===t[0]&&(r=!0,e=t.substr(1)),n.indexOf(a.default.compareVersions(i,e,r))>-1},n.isOS=function(t){return this.getOSName(!0)===String(t).toLowerCase()},n.isPlatform=function(t){return this.getPlatformType(!0)===String(t).toLowerCase()},n.isEngine=function(t){return this.getEngineName(!0)===String(t).toLowerCase()},n.is=function(t){return this.isBrowser(t)||this.isOS(t)||this.isPlatform(t)},n.some=function(t){var n=this;return void 0===t&&(t=[]),t.some((function(t){return n.is(t)}))},t}();n.default=s,t.exports=n.default},function(t,n,e){"use strict";n.__esModule=!0,n.default=void 0;var r,i=(r=e(17))&&r.__esModule?r:{default:r};var o=/version\/(\d+(\.?_?\d+)+)/i,u=[{test:[/googlebot/i],describe:function(t){var n={name:"Googlebot"},e=i.default.getFirstMatch(/googlebot\/(\d+(\.\d+))/i,t)||i.default.getFirstMatch(o,t);return e&&(n.version=e),n}},{test:[/opera/i],describe:function(t){var n={name:"Opera"},e=i.default.getFirstMatch(o,t)||i.default.getFirstMatch(/(?:opera)[\s/](\d+(\.?_?\d+)+)/i,t);return e&&(n.version=e),n}},{test:[/opr\/|opios/i],describe:function(t){var n={name:"Opera"},e=i.default.getFirstMatch(/(?:opr|opios)[\s/](\S+)/i,t)||i.default.getFirstMatch(o,t);return e&&(n.version=e),n}},{test:[/SamsungBrowser/i],describe:function(t){var n={name:"Samsung Internet for Android"},e=i.default.getFirstMatch(o,t)||i.default.getFirstMatch(/(?:SamsungBrowser)[\s/](\d+(\.?_?\d+)+)/i,t);return e&&(n.version=e),n}},{test:[/Whale/i],describe:function(t){var n={name:"NAVER Whale Browser"},e=i.default.getFirstMatch(o,t)||i.default.getFirstMatch(/(?:whale)[\s/](\d+(?:\.\d+)+)/i,t);return e&&(n.version=e),n}},{test:[/MZBrowser/i],describe:function(t){var n={name:"MZ Browser"},e=i.default.getFirstMatch(/(?:MZBrowser)[\s/](\d+(?:\.\d+)+)/i,t)||i.default.getFirstMatch(o,t);return e&&(n.version=e),n}},{test:[/focus/i],describe:function(t){var n={name:"Focus"},e=i.default.getFirstMatch(/(?:focus)[\s/](\d+(?:\.\d+)+)/i,t)||i.default.getFirstMatch(o,t);return e&&(n.version=e),n}},{test:[/swing/i],describe:function(t){var n={name:"Swing"},e=i.default.getFirstMatch(/(?:swing)[\s/](\d+(?:\.\d+)+)/i,t)||i.default.getFirstMatch(o,t);return e&&(n.version=e),n}},{test:[/coast/i],describe:function(t){var n={name:"Opera Coast"},e=i.default.getFirstMatch(o,t)||i.default.getFirstMatch(/(?:coast)[\s/](\d+(\.?_?\d+)+)/i,t);return e&&(n.version=e),n}},{test:[/opt\/\d+(?:.?_?\d+)+/i],describe:function(t){var n={name:"Opera Touch"},e=i.default.getFirstMatch(/(?:opt)[\s/](\d+(\.?_?\d+)+)/i,t)||i.default.getFirstMatch(o,t);return e&&(n.version=e),n}},{test:[/yabrowser/i],describe:function(t){var n={name:"Yandex Browser"},e=i.default.getFirstMatch(/(?:yabrowser)[\s/](\d+(\.?_?\d+)+)/i,t)||i.default.getFirstMatch(o,t);return e&&(n.version=e),n}},{test:[/ucbrowser/i],describe:function(t){var n={name:"UC Browser"},e=i.default.getFirstMatch(o,t)||i.default.getFirstMatch(/(?:ucbrowser)[\s/](\d+(\.?_?\d+)+)/i,t);return e&&(n.version=e),n}},{test:[/Maxthon|mxios/i],describe:function(t){var n={name:"Maxthon"},e=i.default.getFirstMatch(o,t)||i.default.getFirstMatch(/(?:Maxthon|mxios)[\s/](\d+(\.?_?\d+)+)/i,t);return e&&(n.version=e),n}},{test:[/epiphany/i],describe:function(t){var n={name:"Epiphany"},e=i.default.getFirstMatch(o,t)||i.default.getFirstMatch(/(?:epiphany)[\s/](\d+(\.?_?\d+)+)/i,t);return e&&(n.version=e),n}},{test:[/puffin/i],describe:function(t){var n={name:"Puffin"},e=i.default.getFirstMatch(o,t)||i.default.getFirstMatch(/(?:puffin)[\s/](\d+(\.?_?\d+)+)/i,t);return e&&(n.version=e),n}},{test:[/sleipnir/i],describe:function(t){var n={name:"Sleipnir"},e=i.default.getFirstMatch(o,t)||i.default.getFirstMatch(/(?:sleipnir)[\s/](\d+(\.?_?\d+)+)/i,t);return e&&(n.version=e),n}},{test:[/k-meleon/i],describe:function(t){var n={name:"K-Meleon"},e=i.default.getFirstMatch(o,t)||i.default.getFirstMatch(/(?:k-meleon)[\s/](\d+(\.?_?\d+)+)/i,t);return e&&(n.version=e),n}},{test:[/micromessenger/i],describe:function(t){var n={name:"WeChat"},e=i.default.getFirstMatch(/(?:micromessenger)[\s/](\d+(\.?_?\d+)+)/i,t)||i.default.getFirstMatch(o,t);return e&&(n.version=e),n}},{test:[/qqbrowser/i],describe:function(t){var n={name:/qqbrowserlite/i.test(t)?"QQ Browser Lite":"QQ Browser"},e=i.default.getFirstMatch(/(?:qqbrowserlite|qqbrowser)[/](\d+(\.?_?\d+)+)/i,t)||i.default.getFirstMatch(o,t);return e&&(n.version=e),n}},{test:[/msie|trident/i],describe:function(t){var n={name:"Internet Explorer"},e=i.default.getFirstMatch(/(?:msie |rv:)(\d+(\.?_?\d+)+)/i,t);return e&&(n.version=e),n}},{test:[/\sedg\//i],describe:function(t){var n={name:"Microsoft Edge"},e=i.default.getFirstMatch(/\sedg\/(\d+(\.?_?\d+)+)/i,t);return e&&(n.version=e),n}},{test:[/edg([ea]|ios)/i],describe:function(t){var n={name:"Microsoft Edge"},e=i.default.getSecondMatch(/edg([ea]|ios)\/(\d+(\.?_?\d+)+)/i,t);return e&&(n.version=e),n}},{test:[/vivaldi/i],describe:function(t){var n={name:"Vivaldi"},e=i.default.getFirstMatch(/vivaldi\/(\d+(\.?_?\d+)+)/i,t);return e&&(n.version=e),n}},{test:[/seamonkey/i],describe:function(t){var n={name:"SeaMonkey"},e=i.default.getFirstMatch(/seamonkey\/(\d+(\.?_?\d+)+)/i,t);return e&&(n.version=e),n}},{test:[/sailfish/i],describe:function(t){var n={name:"Sailfish"},e=i.default.getFirstMatch(/sailfish\s?browser\/(\d+(\.\d+)?)/i,t);return e&&(n.version=e),n}},{test:[/silk/i],describe:function(t){var n={name:"Amazon Silk"},e=i.default.getFirstMatch(/silk\/(\d+(\.?_?\d+)+)/i,t);return e&&(n.version=e),n}},{test:[/phantom/i],describe:function(t){var n={name:"PhantomJS"},e=i.default.getFirstMatch(/phantomjs\/(\d+(\.?_?\d+)+)/i,t);return e&&(n.version=e),n}},{test:[/slimerjs/i],describe:function(t){var n={name:"SlimerJS"},e=i.default.getFirstMatch(/slimerjs\/(\d+(\.?_?\d+)+)/i,t);return e&&(n.version=e),n}},{test:[/blackberry|\bbb\d+/i,/rim\stablet/i],describe:function(t){var n={name:"BlackBerry"},e=i.default.getFirstMatch(o,t)||i.default.getFirstMatch(/blackberry[\d]+\/(\d+(\.?_?\d+)+)/i,t);return e&&(n.version=e),n}},{test:[/(web|hpw)[o0]s/i],describe:function(t){var n={name:"WebOS Browser"},e=i.default.getFirstMatch(o,t)||i.default.getFirstMatch(/w(?:eb)?[o0]sbrowser\/(\d+(\.?_?\d+)+)/i,t);return e&&(n.version=e),n}},{test:[/bada/i],describe:function(t){var n={name:"Bada"},e=i.default.getFirstMatch(/dolfin\/(\d+(\.?_?\d+)+)/i,t);return e&&(n.version=e),n}},{test:[/tizen/i],describe:function(t){var n={name:"Tizen"},e=i.default.getFirstMatch(/(?:tizen\s?)?browser\/(\d+(\.?_?\d+)+)/i,t)||i.default.getFirstMatch(o,t);return e&&(n.version=e),n}},{test:[/qupzilla/i],describe:function(t){var n={name:"QupZilla"},e=i.default.getFirstMatch(/(?:qupzilla)[\s/](\d+(\.?_?\d+)+)/i,t)||i.default.getFirstMatch(o,t);return e&&(n.version=e),n}},{test:[/firefox|iceweasel|fxios/i],describe:function(t){var n={name:"Firefox"},e=i.default.getFirstMatch(/(?:firefox|iceweasel|fxios)[\s/](\d+(\.?_?\d+)+)/i,t);return e&&(n.version=e),n}},{test:[/electron/i],describe:function(t){var n={name:"Electron"},e=i.default.getFirstMatch(/(?:electron)\/(\d+(\.?_?\d+)+)/i,t);return e&&(n.version=e),n}},{test:[/chromium/i],describe:function(t){var n={name:"Chromium"},e=i.default.getFirstMatch(/(?:chromium)[\s/](\d+(\.?_?\d+)+)/i,t)||i.default.getFirstMatch(o,t);return e&&(n.version=e),n}},{test:[/chrome|crios|crmo/i],describe:function(t){var n={name:"Chrome"},e=i.default.getFirstMatch(/(?:chrome|crios|crmo)\/(\d+(\.?_?\d+)+)/i,t);return e&&(n.version=e),n}},{test:[/GSA/i],describe:function(t){var n={name:"Google Search"},e=i.default.getFirstMatch(/(?:GSA)\/(\d+(\.?_?\d+)+)/i,t);return e&&(n.version=e),n}},{test:function(t){var n=!t.test(/like android/i),e=t.test(/android/i);return n&&e},describe:function(t){var n={name:"Android Browser"},e=i.default.getFirstMatch(o,t);return e&&(n.version=e),n}},{test:[/playstation 4/i],describe:function(t){var n={name:"PlayStation 4"},e=i.default.getFirstMatch(o,t);return e&&(n.version=e),n}},{test:[/safari|applewebkit/i],describe:function(t){var n={name:"Safari"},e=i.default.getFirstMatch(o,t);return e&&(n.version=e),n}},{test:[/.*/i],describe:function(t){var n=-1!==t.search("\\(")?/^(.*)\/(.*)[ \t]\((.*)/:/^(.*)\/(.*) /;return{name:i.default.getFirstMatch(n,t),version:i.default.getSecondMatch(n,t)}}}];n.default=u,t.exports=n.default},function(t,n,e){"use strict";n.__esModule=!0,n.default=void 0;var r,i=(r=e(17))&&r.__esModule?r:{default:r},o=e(18);var u=[{test:[/Roku\/DVP/],describe:function(t){var n=i.default.getFirstMatch(/Roku\/DVP-(\d+\.\d+)/i,t);return{name:o.OS_MAP.Roku,version:n}}},{test:[/windows phone/i],describe:function(t){var n=i.default.getFirstMatch(/windows phone (?:os)?\s?(\d+(\.\d+)*)/i,t);return{name:o.OS_MAP.WindowsPhone,version:n}}},{test:[/windows /i],describe:function(t){var n=i.default.getFirstMatch(/Windows ((NT|XP)( \d\d?.\d)?)/i,t),e=i.default.getWindowsVersionName(n);return{name:o.OS_MAP.Windows,version:n,versionName:e}}},{test:[/Macintosh(.*?) FxiOS(.*?)\//],describe:function(t){var n={name:o.OS_MAP.iOS},e=i.default.getSecondMatch(/(Version\/)(\d[\d.]+)/,t);return e&&(n.version=e),n}},{test:[/macintosh/i],describe:function(t){var n=i.default.getFirstMatch(/mac os x (\d+(\.?_?\d+)+)/i,t).replace(/[_\s]/g,"."),e=i.default.getMacOSVersionName(n),r={name:o.OS_MAP.MacOS,version:n};return e&&(r.versionName=e),r}},{test:[/(ipod|iphone|ipad)/i],describe:function(t){var n=i.default.getFirstMatch(/os (\d+([_\s]\d+)*) like mac os x/i,t).replace(/[_\s]/g,".");return{name:o.OS_MAP.iOS,version:n}}},{test:function(t){var n=!t.test(/like android/i),e=t.test(/android/i);return n&&e},describe:function(t){var n=i.default.getFirstMatch(/android[\s/-](\d+(\.\d+)*)/i,t),e=i.default.getAndroidVersionName(n),r={name:o.OS_MAP.Android,version:n};return e&&(r.versionName=e),r}},{test:[/(web|hpw)[o0]s/i],describe:function(t){var n=i.default.getFirstMatch(/(?:web|hpw)[o0]s\/(\d+(\.\d+)*)/i,t),e={name:o.OS_MAP.WebOS};return n&&n.length&&(e.version=n),e}},{test:[/blackberry|\bbb\d+/i,/rim\stablet/i],describe:function(t){var n=i.default.getFirstMatch(/rim\stablet\sos\s(\d+(\.\d+)*)/i,t)||i.default.getFirstMatch(/blackberry\d+\/(\d+([_\s]\d+)*)/i,t)||i.default.getFirstMatch(/\bbb(\d+)/i,t);return{name:o.OS_MAP.BlackBerry,version:n}}},{test:[/bada/i],describe:function(t){var n=i.default.getFirstMatch(/bada\/(\d+(\.\d+)*)/i,t);return{name:o.OS_MAP.Bada,version:n}}},{test:[/tizen/i],describe:function(t){var n=i.default.getFirstMatch(/tizen[/\s](\d+(\.\d+)*)/i,t);return{name:o.OS_MAP.Tizen,version:n}}},{test:[/linux/i],describe:function(){return{name:o.OS_MAP.Linux}}},{test:[/CrOS/],describe:function(){return{name:o.OS_MAP.ChromeOS}}},{test:[/PlayStation 4/],describe:function(t){var n=i.default.getFirstMatch(/PlayStation 4[/\s](\d+(\.\d+)*)/i,t);return{name:o.OS_MAP.PlayStation4,version:n}}}];n.default=u,t.exports=n.default},function(t,n,e){"use strict";n.__esModule=!0,n.default=void 0;var r,i=(r=e(17))&&r.__esModule?r:{default:r},o=e(18);var u=[{test:[/googlebot/i],describe:function(){return{type:"bot",vendor:"Google"}}},{test:[/huawei/i],describe:function(t){var n=i.default.getFirstMatch(/(can-l01)/i,t)&&"Nova",e={type:o.PLATFORMS_MAP.mobile,vendor:"Huawei"};return n&&(e.model=n),e}},{test:[/nexus\s*(?:7|8|9|10).*/i],describe:function(){return{type:o.PLATFORMS_MAP.tablet,vendor:"Nexus"}}},{test:[/ipad/i],describe:function(){return{type:o.PLATFORMS_MAP.tablet,vendor:"Apple",model:"iPad"}}},{test:[/Macintosh(.*?) FxiOS(.*?)\//],describe:function(){return{type:o.PLATFORMS_MAP.tablet,vendor:"Apple",model:"iPad"}}},{test:[/kftt build/i],describe:function(){return{type:o.PLATFORMS_MAP.tablet,vendor:"Amazon",model:"Kindle Fire HD 7"}}},{test:[/silk/i],describe:function(){return{type:o.PLATFORMS_MAP.tablet,vendor:"Amazon"}}},{test:[/tablet(?! pc)/i],describe:function(){return{type:o.PLATFORMS_MAP.tablet}}},{test:function(t){var n=t.test(/ipod|iphone/i),e=t.test(/like (ipod|iphone)/i);return n&&!e},describe:function(t){var n=i.default.getFirstMatch(/(ipod|iphone)/i,t);return{type:o.PLATFORMS_MAP.mobile,vendor:"Apple",model:n}}},{test:[/nexus\s*[0-6].*/i,/galaxy nexus/i],describe:function(){return{type:o.PLATFORMS_MAP.mobile,vendor:"Nexus"}}},{test:[/[^-]mobi/i],describe:function(){return{type:o.PLATFORMS_MAP.mobile}}},{test:function(t){return"blackberry"===t.getBrowserName(!0)},describe:function(){return{type:o.PLATFORMS_MAP.mobile,vendor:"BlackBerry"}}},{test:function(t){return"bada"===t.getBrowserName(!0)},describe:function(){return{type:o.PLATFORMS_MAP.mobile}}},{test:function(t){return"windows phone"===t.getBrowserName()},describe:function(){return{type:o.PLATFORMS_MAP.mobile,vendor:"Microsoft"}}},{test:function(t){var n=Number(String(t.getOSVersion()).split(".")[0]);return"android"===t.getOSName(!0)&&n>=3},describe:function(){return{type:o.PLATFORMS_MAP.tablet}}},{test:function(t){return"android"===t.getOSName(!0)},describe:function(){return{type:o.PLATFORMS_MAP.mobile}}},{test:function(t){return"macos"===t.getOSName(!0)},describe:function(){return{type:o.PLATFORMS_MAP.desktop,vendor:"Apple"}}},{test:function(t){return"windows"===t.getOSName(!0)},describe:function(){return{type:o.PLATFORMS_MAP.desktop}}},{test:function(t){return"linux"===t.getOSName(!0)},describe:function(){return{type:o.PLATFORMS_MAP.desktop}}},{test:function(t){return"playstation 4"===t.getOSName(!0)},describe:function(){return{type:o.PLATFORMS_MAP.tv}}},{test:function(t){return"roku"===t.getOSName(!0)},describe:function(){return{type:o.PLATFORMS_MAP.tv}}}];n.default=u,t.exports=n.default},function(t,n,e){"use strict";n.__esModule=!0,n.default=void 0;var r,i=(r=e(17))&&r.__esModule?r:{default:r},o=e(18);var u=[{test:function(t){return"microsoft edge"===t.getBrowserName(!0)},describe:function(t){if(/\sedg\//i.test(t))return{name:o.ENGINE_MAP.Blink};var n=i.default.getFirstMatch(/edge\/(\d+(\.?_?\d+)+)/i,t);return{name:o.ENGINE_MAP.EdgeHTML,version:n}}},{test:[/trident/i],describe:function(t){var n={name:o.ENGINE_MAP.Trident},e=i.default.getFirstMatch(/trident\/(\d+(\.?_?\d+)+)/i,t);return e&&(n.version=e),n}},{test:function(t){return t.test(/presto/i)},describe:function(t){var n={name:o.ENGINE_MAP.Presto},e=i.default.getFirstMatch(/presto\/(\d+(\.?_?\d+)+)/i,t);return e&&(n.version=e),n}},{test:function(t){var n=t.test(/gecko/i),e=t.test(/like gecko/i);return n&&!e},describe:function(t){var n={name:o.ENGINE_MAP.Gecko},e=i.default.getFirstMatch(/gecko\/(\d+(\.?_?\d+)+)/i,t);return e&&(n.version=e),n}},{test:[/(apple)?webkit\/537\.36/i],describe:function(){return{name:o.ENGINE_MAP.Blink}}},{test:[/(apple)?webkit/i],describe:function(t){var n={name:o.ENGINE_MAP.WebKit},e=i.default.getFirstMatch(/webkit\/(\d+(\.?_?\d+)+)/i,t);return e&&(n.version=e),n}}];n.default=u,t.exports=n.default},function(t,n,e){t.exports=!e(8)&&!e(2)((function(){return 7!=Object.defineProperty(e(62)("div"),"a",{get:function(){return 7}}).a}))},function(t,n,e){var r=e(1),i=e(7),o=e(32),u=e(63),a=e(9).f;t.exports=function(t){var n=i.Symbol||(i.Symbol=o?{}:r.Symbol||{});"_"==t.charAt(0)||t in n||a(n,t,{value:u.f(t)})}},function(t,n,e){var r=e(13),i=e(15),o=e(51)(!1),u=e(64)("IE_PROTO");t.exports=function(t,n){var e,a=i(t),c=0,s=[];for(e in a)e!=u&&r(a,e)&&s.push(e);for(;n.length>c;)r(a,e=n[c++])&&(~o(s,e)||s.push(e));return s}},function(t,n,e){var r=e(9),i=e(3),o=e(33);t.exports=e(8)?Object.defineProperties:function(t,n){i(t);for(var e,u=o(n),a=u.length,c=0;a>c;)r.f(t,e=u[c++],n[e]);return t}},function(t,n,e){var r=e(15),i=e(36).f,o={}.toString,u="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[];t.exports.f=function(t){return u&&"[object Window]"==o.call(t)?function(t){try{return i(t)}catch(t){return u.slice()}}(t):i(r(t))}},function(t,n,e){"use strict";var r=e(8),i=e(33),o=e(52),u=e(47),a=e(10),c=e(46),s=Object.assign;t.exports=!s||e(2)((function(){var t={},n={},e=Symbol(),r="abcdefghijklmnopqrst";return t[e]=7,r.split("").forEach((function(t){n[t]=t})),7!=s({},t)[e]||Object.keys(s({},n)).join("")!=r}))?function(t,n){for(var e=a(t),s=arguments.length,f=1,l=o.f,h=u.f;s>f;)for(var d,p=c(arguments[f++]),v=l?i(p).concat(l(p)):i(p),g=v.length,y=0;g>y;)d=v[y++],r&&!h.call(p,d)||(e[d]=p[d]);return e}:s},function(t,n){t.exports=Object.is||function(t,n){return t===n?0!==t||1/t==1/n:t!=t&&n!=n}},function(t,n,e){"use strict";var r=e(20),i=e(4),o=e(104),u=[].slice,a={},c=function(t,n,e){if(!(n in a)){for(var r=[],i=0;i>>0||(u.test(e)?16:10))}:r},function(t,n,e){var r=e(1).parseFloat,i=e(41).trim;t.exports=1/r(e(68)+"-0")!=-1/0?function(t){var n=i(String(t),3),e=r(n);return 0===e&&"-"==n.charAt(0)?-0:e}:r},function(t,n,e){var r=e(25);t.exports=function(t,n){if("number"!=typeof t&&"Number"!=r(t))throw TypeError(n);return+t}},function(t,n,e){var r=e(4),i=Math.floor;t.exports=function(t){return!r(t)&&isFinite(t)&&i(t)===t}},function(t,n){t.exports=Math.log1p||function(t){return(t=+t)>-1e-8&&t<1e-8?t-t*t/2:Math.log(1+t)}},function(t,n,e){"use strict";var r=e(35),i=e(30),o=e(40),u={};e(14)(u,e(5)("iterator"),(function(){return this})),t.exports=function(t,n,e){t.prototype=r(u,{next:i(1,e)}),o(t,n+" Iterator")}},function(t,n,e){var r=e(3);t.exports=function(t,n,e,i){try{return i?n(r(e)[0],e[1]):n(e)}catch(n){var o=t.return;throw void 0!==o&&r(o.call(t)),n}}},function(t,n,e){var r=e(224);t.exports=function(t,n){return new(r(t))(n)}},function(t,n,e){var r=e(20),i=e(10),o=e(46),u=e(6);t.exports=function(t,n,e,a,c){r(n);var s=i(t),f=o(s),l=u(s.length),h=c?l-1:0,d=c?-1:1;if(e<2)for(;;){if(h in f){a=f[h],h+=d;break}if(h+=d,c?h<0:l<=h)throw TypeError("Reduce of empty array with no initial value")}for(;c?h>=0:l>h;h+=d)h in f&&(a=n(a,f[h],h,s));return a}},function(t,n,e){"use strict";var r=e(10),i=e(34),o=e(6);t.exports=[].copyWithin||function(t,n){var e=r(this),u=o(e.length),a=i(t,u),c=i(n,u),s=arguments.length>2?arguments[2]:void 0,f=Math.min((void 0===s?u:i(s,u))-c,u-a),l=1;for(c0;)c in e?e[a]=e[c]:delete e[a],a+=l,c+=l;return e}},function(t,n){t.exports=function(t,n){return{value:n,done:!!t}}},function(t,n,e){"use strict";var r=e(83);e(0)({target:"RegExp",proto:!0,forced:r!==/./.exec},{exec:r})},function(t,n,e){e(8)&&"g"!=/./g.flags&&e(9).f(RegExp.prototype,"flags",{configurable:!0,get:e(55)})},function(t,n,e){"use strict";var r,i,o,u,a=e(32),c=e(1),s=e(19),f=e(48),l=e(0),h=e(4),d=e(20),p=e(44),v=e(58),g=e(49),y=e(85).set,m=e(244)(),b=e(119),S=e(245),w=e(59),_=e(120),M=c.TypeError,x=c.process,P=x&&x.versions,O=P&&P.v8||"",F=c.Promise,A="process"==f(x),E=function(){},N=i=b.f,R=!!function(){try{var t=F.resolve(1),n=(t.constructor={})[e(5)("species")]=function(t){t(E,E)};return(A||"function"==typeof PromiseRejectionEvent)&&t.then(E)instanceof n&&0!==O.indexOf("6.6")&&-1===w.indexOf("Chrome/66")}catch(t){}}(),k=function(t){var n;return!(!h(t)||"function"!=typeof(n=t.then))&&n},T=function(t,n){if(!t._n){t._n=!0;var e=t._c;m((function(){for(var r=t._v,i=1==t._s,o=0,u=function(n){var e,o,u,a=i?n.ok:n.fail,c=n.resolve,s=n.reject,f=n.domain;try{a?(i||(2==t._h&&L(t),t._h=1),!0===a?e=r:(f&&f.enter(),e=a(r),f&&(f.exit(),u=!0)),e===n.promise?s(M("Promise-chain cycle")):(o=k(e))?o.call(e,c,s):c(e)):s(r)}catch(t){f&&!u&&f.exit(),s(t)}};e.length>o;)u(e[o++]);t._c=[],t._n=!1,n&&!t._h&&I(t)}))}},I=function(t){y.call(c,(function(){var n,e,r,i=t._v,o=j(t);if(o&&(n=S((function(){A?x.emit("unhandledRejection",i,t):(e=c.onunhandledrejection)?e({promise:t,reason:i}):(r=c.console)&&r.error&&r.error("Unhandled promise rejection",i)})),t._h=A||j(t)?2:1),t._a=void 0,o&&n.e)throw n.v}))},j=function(t){return 1!==t._h&&0===(t._a||t._c).length},L=function(t){y.call(c,(function(){var n;A?x.emit("rejectionHandled",t):(n=c.onrejectionhandled)&&n({promise:t,reason:t._v})}))},B=function(t){var n=this;n._d||(n._d=!0,(n=n._w||n)._v=t,n._s=2,n._a||(n._a=n._c.slice()),T(n,!0))},C=function(t){var n,e=this;if(!e._d){e._d=!0,e=e._w||e;try{if(e===t)throw M("Promise can't be resolved itself");(n=k(t))?m((function(){var r={_w:e,_d:!1};try{n.call(t,s(C,r,1),s(B,r,1))}catch(t){B.call(r,t)}})):(e._v=t,e._s=1,T(e,!1))}catch(t){B.call({_w:e,_d:!1},t)}}};R||(F=function(t){p(this,F,"Promise","_h"),d(t),r.call(this);try{t(s(C,this,1),s(B,this,1))}catch(t){B.call(this,t)}},(r=function(t){this._c=[],this._a=void 0,this._s=0,this._d=!1,this._v=void 0,this._h=0,this._n=!1}).prototype=e(45)(F.prototype,{then:function(t,n){var e=N(g(this,F));return e.ok="function"!=typeof t||t,e.fail="function"==typeof n&&n,e.domain=A?x.domain:void 0,this._c.push(e),this._a&&this._a.push(e),this._s&&T(this,!1),e.promise},catch:function(t){return this.then(void 0,t)}}),o=function(){var t=new r;this.promise=t,this.resolve=s(C,t,1),this.reject=s(B,t,1)},b.f=N=function(t){return t===F||t===u?new o(t):i(t)}),l(l.G+l.W+l.F*!R,{Promise:F}),e(40)(F,"Promise"),e(43)("Promise"),u=e(7).Promise,l(l.S+l.F*!R,"Promise",{reject:function(t){var n=N(this);return(0,n.reject)(t),n.promise}}),l(l.S+l.F*(a||!R),"Promise",{resolve:function(t){return _(a&&this===u?F:this,t)}}),l(l.S+l.F*!(R&&e(54)((function(t){F.all(t).catch(E)}))),"Promise",{all:function(t){var n=this,e=N(n),r=e.resolve,i=e.reject,o=S((function(){var e=[],o=0,u=1;v(t,!1,(function(t){var a=o++,c=!1;e.push(void 0),u++,n.resolve(t).then((function(t){c||(c=!0,e[a]=t,--u||r(e))}),i)})),--u||r(e)}));return o.e&&i(o.v),e.promise},race:function(t){var n=this,e=N(n),r=e.reject,i=S((function(){v(t,!1,(function(t){n.resolve(t).then(e.resolve,r)}))}));return i.e&&r(i.v),e.promise}})},function(t,n,e){"use strict";var r=e(20);function i(t){var n,e;this.promise=new t((function(t,r){if(void 0!==n||void 0!==e)throw TypeError("Bad Promise constructor");n=t,e=r})),this.resolve=r(n),this.reject=r(e)}t.exports.f=function(t){return new i(t)}},function(t,n,e){var r=e(3),i=e(4),o=e(119);t.exports=function(t,n){if(r(t),i(n)&&n.constructor===t)return n;var e=o.f(t);return(0,e.resolve)(n),e.promise}},function(t,n,e){"use strict";var r=e(9).f,i=e(35),o=e(45),u=e(19),a=e(44),c=e(58),s=e(74),f=e(115),l=e(43),h=e(8),d=e(29).fastKey,p=e(39),v=h?"_s":"size",g=function(t,n){var e,r=d(n);if("F"!==r)return t._i[r];for(e=t._f;e;e=e.n)if(e.k==n)return e};t.exports={getConstructor:function(t,n,e,s){var f=t((function(t,r){a(t,f,n,"_i"),t._t=n,t._i=i(null),t._f=void 0,t._l=void 0,t[v]=0,null!=r&&c(r,e,t[s],t)}));return o(f.prototype,{clear:function(){for(var t=p(this,n),e=t._i,r=t._f;r;r=r.n)r.r=!0,r.p&&(r.p=r.p.n=void 0),delete e[r.i];t._f=t._l=void 0,t[v]=0},delete:function(t){var e=p(this,n),r=g(e,t);if(r){var i=r.n,o=r.p;delete e._i[r.i],r.r=!0,o&&(o.n=i),i&&(i.p=o),e._f==r&&(e._f=i),e._l==r&&(e._l=o),e[v]--}return!!r},forEach:function(t){p(this,n);for(var e,r=u(t,arguments.length>1?arguments[1]:void 0,3);e=e?e.n:this._f;)for(r(e.v,e.k,this);e&&e.r;)e=e.p},has:function(t){return!!g(p(this,n),t)}}),h&&r(f.prototype,"size",{get:function(){return p(this,n)[v]}}),f},def:function(t,n,e){var r,i,o=g(t,n);return o?o.v=e:(t._l=o={i:i=d(n,!0),k:n,v:e,p:r=t._l,n:void 0,r:!1},t._f||(t._f=o),r&&(r.n=o),t[v]++,"F"!==i&&(t._i[i]=o)),t},getEntry:g,setStrong:function(t,n,e){s(t,n,(function(t,e){this._t=p(t,n),this._k=e,this._l=void 0}),(function(){for(var t=this._k,n=this._l;n&&n.r;)n=n.p;return this._t&&(this._l=n=n?n.n:this._t._f)?f(0,"keys"==t?n.k:"values"==t?n.v:[n.k,n.v]):(this._t=void 0,f(1))}),e?"entries":"values",!e,!0),l(n)}}},function(t,n,e){"use strict";var r=e(45),i=e(29).getWeak,o=e(3),u=e(4),a=e(44),c=e(58),s=e(24),f=e(13),l=e(39),h=s(5),d=s(6),p=0,v=function(t){return t._l||(t._l=new g)},g=function(){this.a=[]},y=function(t,n){return h(t.a,(function(t){return t[0]===n}))};g.prototype={get:function(t){var n=y(this,t);if(n)return n[1]},has:function(t){return!!y(this,t)},set:function(t,n){var e=y(this,t);e?e[1]=n:this.a.push([t,n])},delete:function(t){var n=d(this.a,(function(n){return n[0]===t}));return~n&&this.a.splice(n,1),!!~n}},t.exports={getConstructor:function(t,n,e,o){var s=t((function(t,r){a(t,s,n,"_i"),t._t=n,t._i=p++,t._l=void 0,null!=r&&c(r,e,t[o],t)}));return r(s.prototype,{delete:function(t){if(!u(t))return!1;var e=i(t);return!0===e?v(l(this,n)).delete(t):e&&f(e,this._i)&&delete e[this._i]},has:function(t){if(!u(t))return!1;var e=i(t);return!0===e?v(l(this,n)).has(t):e&&f(e,this._i)}}),s},def:function(t,n,e){var r=i(o(n),!0);return!0===r?v(t).set(n,e):r[t._i]=e,t},ufstore:v}},function(t,n,e){var r=e(21),i=e(6);t.exports=function(t){if(void 0===t)return 0;var n=r(t),e=i(n);if(n!==e)throw RangeError("Wrong length!");return e}},function(t,n,e){var r=e(36),i=e(52),o=e(3),u=e(1).Reflect;t.exports=u&&u.ownKeys||function(t){var n=r.f(o(t)),e=i.f;return e?n.concat(e(t)):n}},function(t,n,e){var r=e(6),i=e(70),o=e(26);t.exports=function(t,n,e,u){var a=String(o(t)),c=a.length,s=void 0===e?" ":String(e),f=r(n);if(f<=c||""==s)return a;var l=f-c,h=i.call(s,Math.ceil(l/s.length));return h.length>l&&(h=h.slice(0,l)),u?h+a:a+h}},function(t,n,e){var r=e(8),i=e(33),o=e(15),u=e(47).f;t.exports=function(t){return function(n){for(var e,a=o(n),c=i(a),s=c.length,f=0,l=[];s>f;)e=c[f++],r&&!u.call(a,e)||l.push(t?[e,a[e]]:a[e]);return l}}},function(t,n){var e=t.exports={version:"2.6.9"};"number"==typeof __e&&(__e=e)},function(t,n){t.exports=function(t){try{return!!t()}catch(t){return!0}}},function(t,n,e){e(130),t.exports=e(90)},function(t,n,e){"use strict";e(131);var r,i=(r=e(303))&&r.__esModule?r:{default:r};i.default._babelPolyfill&&"undefined"!=typeof console&&console.warn&&console.warn("@babel/polyfill is loaded more than once on this page. This is probably not desirable/intended and may have consequences if different versions of the polyfills are applied sequentially. If you do need to load the polyfill more than once, use @babel/polyfill/noConflict instead to bypass the warning."),i.default._babelPolyfill=!0},function(t,n,e){"use strict";e(132),e(275),e(277),e(280),e(282),e(284),e(286),e(288),e(290),e(292),e(294),e(296),e(298),e(302)},function(t,n,e){e(133),e(136),e(137),e(138),e(139),e(140),e(141),e(142),e(143),e(144),e(145),e(146),e(147),e(148),e(149),e(150),e(151),e(152),e(153),e(154),e(155),e(156),e(157),e(158),e(159),e(160),e(161),e(162),e(163),e(164),e(165),e(166),e(167),e(168),e(169),e(170),e(171),e(172),e(173),e(174),e(175),e(176),e(177),e(179),e(180),e(181),e(182),e(183),e(184),e(185),e(186),e(187),e(188),e(189),e(190),e(191),e(192),e(193),e(194),e(195),e(196),e(197),e(198),e(199),e(200),e(201),e(202),e(203),e(204),e(205),e(206),e(207),e(208),e(209),e(210),e(211),e(212),e(214),e(215),e(217),e(218),e(219),e(220),e(221),e(222),e(223),e(225),e(226),e(227),e(228),e(229),e(230),e(231),e(232),e(233),e(234),e(235),e(236),e(237),e(82),e(238),e(116),e(239),e(117),e(240),e(241),e(242),e(243),e(118),e(246),e(247),e(248),e(249),e(250),e(251),e(252),e(253),e(254),e(255),e(256),e(257),e(258),e(259),e(260),e(261),e(262),e(263),e(264),e(265),e(266),e(267),e(268),e(269),e(270),e(271),e(272),e(273),e(274),t.exports=e(7)},function(t,n,e){"use strict";var r=e(1),i=e(13),o=e(8),u=e(0),a=e(11),c=e(29).KEY,s=e(2),f=e(50),l=e(40),h=e(31),d=e(5),p=e(63),v=e(97),g=e(135),y=e(53),m=e(3),b=e(4),S=e(10),w=e(15),_=e(28),M=e(30),x=e(35),P=e(100),O=e(22),F=e(52),A=e(9),E=e(33),N=O.f,R=A.f,k=P.f,T=r.Symbol,I=r.JSON,j=I&&I.stringify,L=d("_hidden"),B=d("toPrimitive"),C={}.propertyIsEnumerable,W=f("symbol-registry"),V=f("symbols"),G=f("op-symbols"),D=Object.prototype,U="function"==typeof T&&!!F.f,z=r.QObject,q=!z||!z.prototype||!z.prototype.findChild,K=o&&s((function(){return 7!=x(R({},"a",{get:function(){return R(this,"a",{value:7}).a}})).a}))?function(t,n,e){var r=N(D,n);r&&delete D[n],R(t,n,e),r&&t!==D&&R(D,n,r)}:R,Y=function(t){var n=V[t]=x(T.prototype);return n._k=t,n},Q=U&&"symbol"==typeof T.iterator?function(t){return"symbol"==typeof t}:function(t){return t instanceof T},H=function(t,n,e){return t===D&&H(G,n,e),m(t),n=_(n,!0),m(e),i(V,n)?(e.enumerable?(i(t,L)&&t[L][n]&&(t[L][n]=!1),e=x(e,{enumerable:M(0,!1)})):(i(t,L)||R(t,L,M(1,{})),t[L][n]=!0),K(t,n,e)):R(t,n,e)},J=function(t,n){m(t);for(var e,r=g(n=w(n)),i=0,o=r.length;o>i;)H(t,e=r[i++],n[e]);return t},X=function(t){var n=C.call(this,t=_(t,!0));return!(this===D&&i(V,t)&&!i(G,t))&&(!(n||!i(this,t)||!i(V,t)||i(this,L)&&this[L][t])||n)},Z=function(t,n){if(t=w(t),n=_(n,!0),t!==D||!i(V,n)||i(G,n)){var e=N(t,n);return!e||!i(V,n)||i(t,L)&&t[L][n]||(e.enumerable=!0),e}},$=function(t){for(var n,e=k(w(t)),r=[],o=0;e.length>o;)i(V,n=e[o++])||n==L||n==c||r.push(n);return r},tt=function(t){for(var n,e=t===D,r=k(e?G:w(t)),o=[],u=0;r.length>u;)!i(V,n=r[u++])||e&&!i(D,n)||o.push(V[n]);return o};U||(a((T=function(){if(this instanceof T)throw TypeError("Symbol is not a constructor!");var t=h(arguments.length>0?arguments[0]:void 0),n=function(e){this===D&&n.call(G,e),i(this,L)&&i(this[L],t)&&(this[L][t]=!1),K(this,t,M(1,e))};return o&&q&&K(D,t,{configurable:!0,set:n}),Y(t)}).prototype,"toString",(function(){return this._k})),O.f=Z,A.f=H,e(36).f=P.f=$,e(47).f=X,F.f=tt,o&&!e(32)&&a(D,"propertyIsEnumerable",X,!0),p.f=function(t){return Y(d(t))}),u(u.G+u.W+u.F*!U,{Symbol:T});for(var nt="hasInstance,isConcatSpreadable,iterator,match,replace,search,species,split,toPrimitive,toStringTag,unscopables".split(","),et=0;nt.length>et;)d(nt[et++]);for(var rt=E(d.store),it=0;rt.length>it;)v(rt[it++]);u(u.S+u.F*!U,"Symbol",{for:function(t){return i(W,t+="")?W[t]:W[t]=T(t)},keyFor:function(t){if(!Q(t))throw TypeError(t+" is not a symbol!");for(var n in W)if(W[n]===t)return n},useSetter:function(){q=!0},useSimple:function(){q=!1}}),u(u.S+u.F*!U,"Object",{create:function(t,n){return void 0===n?x(t):J(x(t),n)},defineProperty:H,defineProperties:J,getOwnPropertyDescriptor:Z,getOwnPropertyNames:$,getOwnPropertySymbols:tt});var ot=s((function(){F.f(1)}));u(u.S+u.F*ot,"Object",{getOwnPropertySymbols:function(t){return F.f(S(t))}}),I&&u(u.S+u.F*(!U||s((function(){var t=T();return"[null]"!=j([t])||"{}"!=j({a:t})||"{}"!=j(Object(t))}))),"JSON",{stringify:function(t){for(var n,e,r=[t],i=1;arguments.length>i;)r.push(arguments[i++]);if(e=n=r[1],(b(n)||void 0!==t)&&!Q(t))return y(n)||(n=function(t,n){if("function"==typeof e&&(n=e.call(this,t,n)),!Q(n))return n}),r[1]=n,j.apply(I,r)}}),T.prototype[B]||e(14)(T.prototype,B,T.prototype.valueOf),l(T,"Symbol"),l(Math,"Math",!0),l(r.JSON,"JSON",!0)},function(t,n,e){t.exports=e(50)("native-function-to-string",Function.toString)},function(t,n,e){var r=e(33),i=e(52),o=e(47);t.exports=function(t){var n=r(t),e=i.f;if(e)for(var u,a=e(t),c=o.f,s=0;a.length>s;)c.call(t,u=a[s++])&&n.push(u);return n}},function(t,n,e){var r=e(0);r(r.S,"Object",{create:e(35)})},function(t,n,e){var r=e(0);r(r.S+r.F*!e(8),"Object",{defineProperty:e(9).f})},function(t,n,e){var r=e(0);r(r.S+r.F*!e(8),"Object",{defineProperties:e(99)})},function(t,n,e){var r=e(15),i=e(22).f;e(23)("getOwnPropertyDescriptor",(function(){return function(t,n){return i(r(t),n)}}))},function(t,n,e){var r=e(10),i=e(37);e(23)("getPrototypeOf",(function(){return function(t){return i(r(t))}}))},function(t,n,e){var r=e(10),i=e(33);e(23)("keys",(function(){return function(t){return i(r(t))}}))},function(t,n,e){e(23)("getOwnPropertyNames",(function(){return e(100).f}))},function(t,n,e){var r=e(4),i=e(29).onFreeze;e(23)("freeze",(function(t){return function(n){return t&&r(n)?t(i(n)):n}}))},function(t,n,e){var r=e(4),i=e(29).onFreeze;e(23)("seal",(function(t){return function(n){return t&&r(n)?t(i(n)):n}}))},function(t,n,e){var r=e(4),i=e(29).onFreeze;e(23)("preventExtensions",(function(t){return function(n){return t&&r(n)?t(i(n)):n}}))},function(t,n,e){var r=e(4);e(23)("isFrozen",(function(t){return function(n){return!r(n)||!!t&&t(n)}}))},function(t,n,e){var r=e(4);e(23)("isSealed",(function(t){return function(n){return!r(n)||!!t&&t(n)}}))},function(t,n,e){var r=e(4);e(23)("isExtensible",(function(t){return function(n){return!!r(n)&&(!t||t(n))}}))},function(t,n,e){var r=e(0);r(r.S+r.F,"Object",{assign:e(101)})},function(t,n,e){var r=e(0);r(r.S,"Object",{is:e(102)})},function(t,n,e){var r=e(0);r(r.S,"Object",{setPrototypeOf:e(67).set})},function(t,n,e){"use strict";var r=e(48),i={};i[e(5)("toStringTag")]="z",i+""!="[object z]"&&e(11)(Object.prototype,"toString",(function(){return"[object "+r(this)+"]"}),!0)},function(t,n,e){var r=e(0);r(r.P,"Function",{bind:e(103)})},function(t,n,e){var r=e(9).f,i=Function.prototype,o=/^\s*function ([^ (]*)/;"name"in i||e(8)&&r(i,"name",{configurable:!0,get:function(){try{return(""+this).match(o)[1]}catch(t){return""}}})},function(t,n,e){"use strict";var r=e(4),i=e(37),o=e(5)("hasInstance"),u=Function.prototype;o in u||e(9).f(u,o,{value:function(t){if("function"!=typeof this||!r(t))return!1;if(!r(this.prototype))return t instanceof this;for(;t=i(t);)if(this.prototype===t)return!0;return!1}})},function(t,n,e){var r=e(0),i=e(105);r(r.G+r.F*(parseInt!=i),{parseInt:i})},function(t,n,e){var r=e(0),i=e(106);r(r.G+r.F*(parseFloat!=i),{parseFloat:i})},function(t,n,e){"use strict";var r=e(1),i=e(13),o=e(25),u=e(69),a=e(28),c=e(2),s=e(36).f,f=e(22).f,l=e(9).f,h=e(41).trim,d=r.Number,p=d,v=d.prototype,g="Number"==o(e(35)(v)),y="trim"in String.prototype,m=function(t){var n=a(t,!1);if("string"==typeof n&&n.length>2){var e,r,i,o=(n=y?n.trim():h(n,3)).charCodeAt(0);if(43===o||45===o){if(88===(e=n.charCodeAt(2))||120===e)return NaN}else if(48===o){switch(n.charCodeAt(1)){case 66:case 98:r=2,i=49;break;case 79:case 111:r=8,i=55;break;default:return+n}for(var u,c=n.slice(2),s=0,f=c.length;si)return NaN;return parseInt(c,r)}}return+n};if(!d(" 0o1")||!d("0b1")||d("+0x1")){d=function(t){var n=arguments.length<1?0:t,e=this;return e instanceof d&&(g?c((function(){v.valueOf.call(e)})):"Number"!=o(e))?u(new p(m(n)),e,d):m(n)};for(var b,S=e(8)?s(p):"MAX_VALUE,MIN_VALUE,NaN,NEGATIVE_INFINITY,POSITIVE_INFINITY,EPSILON,isFinite,isInteger,isNaN,isSafeInteger,MAX_SAFE_INTEGER,MIN_SAFE_INTEGER,parseFloat,parseInt,isInteger".split(","),w=0;S.length>w;w++)i(p,b=S[w])&&!i(d,b)&&l(d,b,f(p,b));d.prototype=v,v.constructor=d,e(11)(r,"Number",d)}},function(t,n,e){"use strict";var r=e(0),i=e(21),o=e(107),u=e(70),a=1..toFixed,c=Math.floor,s=[0,0,0,0,0,0],f="Number.toFixed: incorrect invocation!",l=function(t,n){for(var e=-1,r=n;++e<6;)r+=t*s[e],s[e]=r%1e7,r=c(r/1e7)},h=function(t){for(var n=6,e=0;--n>=0;)e+=s[n],s[n]=c(e/t),e=e%t*1e7},d=function(){for(var t=6,n="";--t>=0;)if(""!==n||0===t||0!==s[t]){var e=String(s[t]);n=""===n?e:n+u.call("0",7-e.length)+e}return n},p=function(t,n,e){return 0===n?e:n%2==1?p(t,n-1,e*t):p(t*t,n/2,e)};r(r.P+r.F*(!!a&&("0.000"!==8e-5.toFixed(3)||"1"!==.9.toFixed(0)||"1.25"!==1.255.toFixed(2)||"1000000000000000128"!==(0xde0b6b3a7640080).toFixed(0))||!e(2)((function(){a.call({})}))),"Number",{toFixed:function(t){var n,e,r,a,c=o(this,f),s=i(t),v="",g="0";if(s<0||s>20)throw RangeError(f);if(c!=c)return"NaN";if(c<=-1e21||c>=1e21)return String(c);if(c<0&&(v="-",c=-c),c>1e-21)if(e=(n=function(t){for(var n=0,e=t;e>=4096;)n+=12,e/=4096;for(;e>=2;)n+=1,e/=2;return n}(c*p(2,69,1))-69)<0?c*p(2,-n,1):c/p(2,n,1),e*=4503599627370496,(n=52-n)>0){for(l(0,e),r=s;r>=7;)l(1e7,0),r-=7;for(l(p(10,r,1),0),r=n-1;r>=23;)h(1<<23),r-=23;h(1<0?v+((a=g.length)<=s?"0."+u.call("0",s-a)+g:g.slice(0,a-s)+"."+g.slice(a-s)):v+g}})},function(t,n,e){"use strict";var r=e(0),i=e(2),o=e(107),u=1..toPrecision;r(r.P+r.F*(i((function(){return"1"!==u.call(1,void 0)}))||!i((function(){u.call({})}))),"Number",{toPrecision:function(t){var n=o(this,"Number#toPrecision: incorrect invocation!");return void 0===t?u.call(n):u.call(n,t)}})},function(t,n,e){var r=e(0);r(r.S,"Number",{EPSILON:Math.pow(2,-52)})},function(t,n,e){var r=e(0),i=e(1).isFinite;r(r.S,"Number",{isFinite:function(t){return"number"==typeof t&&i(t)}})},function(t,n,e){var r=e(0);r(r.S,"Number",{isInteger:e(108)})},function(t,n,e){var r=e(0);r(r.S,"Number",{isNaN:function(t){return t!=t}})},function(t,n,e){var r=e(0),i=e(108),o=Math.abs;r(r.S,"Number",{isSafeInteger:function(t){return i(t)&&o(t)<=9007199254740991}})},function(t,n,e){var r=e(0);r(r.S,"Number",{MAX_SAFE_INTEGER:9007199254740991})},function(t,n,e){var r=e(0);r(r.S,"Number",{MIN_SAFE_INTEGER:-9007199254740991})},function(t,n,e){var r=e(0),i=e(106);r(r.S+r.F*(Number.parseFloat!=i),"Number",{parseFloat:i})},function(t,n,e){var r=e(0),i=e(105);r(r.S+r.F*(Number.parseInt!=i),"Number",{parseInt:i})},function(t,n,e){var r=e(0),i=e(109),o=Math.sqrt,u=Math.acosh;r(r.S+r.F*!(u&&710==Math.floor(u(Number.MAX_VALUE))&&u(1/0)==1/0),"Math",{acosh:function(t){return(t=+t)<1?NaN:t>94906265.62425156?Math.log(t)+Math.LN2:i(t-1+o(t-1)*o(t+1))}})},function(t,n,e){var r=e(0),i=Math.asinh;r(r.S+r.F*!(i&&1/i(0)>0),"Math",{asinh:function t(n){return isFinite(n=+n)&&0!=n?n<0?-t(-n):Math.log(n+Math.sqrt(n*n+1)):n}})},function(t,n,e){var r=e(0),i=Math.atanh;r(r.S+r.F*!(i&&1/i(-0)<0),"Math",{atanh:function(t){return 0==(t=+t)?t:Math.log((1+t)/(1-t))/2}})},function(t,n,e){var r=e(0),i=e(71);r(r.S,"Math",{cbrt:function(t){return i(t=+t)*Math.pow(Math.abs(t),1/3)}})},function(t,n,e){var r=e(0);r(r.S,"Math",{clz32:function(t){return(t>>>=0)?31-Math.floor(Math.log(t+.5)*Math.LOG2E):32}})},function(t,n,e){var r=e(0),i=Math.exp;r(r.S,"Math",{cosh:function(t){return(i(t=+t)+i(-t))/2}})},function(t,n,e){var r=e(0),i=e(72);r(r.S+r.F*(i!=Math.expm1),"Math",{expm1:i})},function(t,n,e){var r=e(0);r(r.S,"Math",{fround:e(178)})},function(t,n,e){var r=e(71),i=Math.pow,o=i(2,-52),u=i(2,-23),a=i(2,127)*(2-u),c=i(2,-126);t.exports=Math.fround||function(t){var n,e,i=Math.abs(t),s=r(t);return ia||e!=e?s*(1/0):s*e}},function(t,n,e){var r=e(0),i=Math.abs;r(r.S,"Math",{hypot:function(t,n){for(var e,r,o=0,u=0,a=arguments.length,c=0;u0?(r=e/c)*r:e;return c===1/0?1/0:c*Math.sqrt(o)}})},function(t,n,e){var r=e(0),i=Math.imul;r(r.S+r.F*e(2)((function(){return-5!=i(4294967295,5)||2!=i.length})),"Math",{imul:function(t,n){var e=+t,r=+n,i=65535&e,o=65535&r;return 0|i*o+((65535&e>>>16)*o+i*(65535&r>>>16)<<16>>>0)}})},function(t,n,e){var r=e(0);r(r.S,"Math",{log10:function(t){return Math.log(t)*Math.LOG10E}})},function(t,n,e){var r=e(0);r(r.S,"Math",{log1p:e(109)})},function(t,n,e){var r=e(0);r(r.S,"Math",{log2:function(t){return Math.log(t)/Math.LN2}})},function(t,n,e){var r=e(0);r(r.S,"Math",{sign:e(71)})},function(t,n,e){var r=e(0),i=e(72),o=Math.exp;r(r.S+r.F*e(2)((function(){return-2e-17!=!Math.sinh(-2e-17)})),"Math",{sinh:function(t){return Math.abs(t=+t)<1?(i(t)-i(-t))/2:(o(t-1)-o(-t-1))*(Math.E/2)}})},function(t,n,e){var r=e(0),i=e(72),o=Math.exp;r(r.S,"Math",{tanh:function(t){var n=i(t=+t),e=i(-t);return n==1/0?1:e==1/0?-1:(n-e)/(o(t)+o(-t))}})},function(t,n,e){var r=e(0);r(r.S,"Math",{trunc:function(t){return(t>0?Math.floor:Math.ceil)(t)}})},function(t,n,e){var r=e(0),i=e(34),o=String.fromCharCode,u=String.fromCodePoint;r(r.S+r.F*(!!u&&1!=u.length),"String",{fromCodePoint:function(t){for(var n,e=[],r=arguments.length,u=0;r>u;){if(n=+arguments[u++],i(n,1114111)!==n)throw RangeError(n+" is not a valid code point");e.push(n<65536?o(n):o(55296+((n-=65536)>>10),n%1024+56320))}return e.join("")}})},function(t,n,e){var r=e(0),i=e(15),o=e(6);r(r.S,"String",{raw:function(t){for(var n=i(t.raw),e=o(n.length),r=arguments.length,u=[],a=0;e>a;)u.push(String(n[a++])),a=n.length?{value:void 0,done:!0}:(t=r(n,e),this._i+=t.length,{value:t,done:!1})}))},function(t,n,e){"use strict";var r=e(0),i=e(73)(!1);r(r.P,"String",{codePointAt:function(t){return i(this,t)}})},function(t,n,e){"use strict";var r=e(0),i=e(6),o=e(75),u="".endsWith;r(r.P+r.F*e(77)("endsWith"),"String",{endsWith:function(t){var n=o(this,t,"endsWith"),e=arguments.length>1?arguments[1]:void 0,r=i(n.length),a=void 0===e?r:Math.min(i(e),r),c=String(t);return u?u.call(n,c,a):n.slice(a-c.length,a)===c}})},function(t,n,e){"use strict";var r=e(0),i=e(75);r(r.P+r.F*e(77)("includes"),"String",{includes:function(t){return!!~i(this,t,"includes").indexOf(t,arguments.length>1?arguments[1]:void 0)}})},function(t,n,e){var r=e(0);r(r.P,"String",{repeat:e(70)})},function(t,n,e){"use strict";var r=e(0),i=e(6),o=e(75),u="".startsWith;r(r.P+r.F*e(77)("startsWith"),"String",{startsWith:function(t){var n=o(this,t,"startsWith"),e=i(Math.min(arguments.length>1?arguments[1]:void 0,n.length)),r=String(t);return u?u.call(n,r,e):n.slice(e,e+r.length)===r}})},function(t,n,e){"use strict";e(12)("anchor",(function(t){return function(n){return t(this,"a","name",n)}}))},function(t,n,e){"use strict";e(12)("big",(function(t){return function(){return t(this,"big","","")}}))},function(t,n,e){"use strict";e(12)("blink",(function(t){return function(){return t(this,"blink","","")}}))},function(t,n,e){"use strict";e(12)("bold",(function(t){return function(){return t(this,"b","","")}}))},function(t,n,e){"use strict";e(12)("fixed",(function(t){return function(){return t(this,"tt","","")}}))},function(t,n,e){"use strict";e(12)("fontcolor",(function(t){return function(n){return t(this,"font","color",n)}}))},function(t,n,e){"use strict";e(12)("fontsize",(function(t){return function(n){return t(this,"font","size",n)}}))},function(t,n,e){"use strict";e(12)("italics",(function(t){return function(){return t(this,"i","","")}}))},function(t,n,e){"use strict";e(12)("link",(function(t){return function(n){return t(this,"a","href",n)}}))},function(t,n,e){"use strict";e(12)("small",(function(t){return function(){return t(this,"small","","")}}))},function(t,n,e){"use strict";e(12)("strike",(function(t){return function(){return t(this,"strike","","")}}))},function(t,n,e){"use strict";e(12)("sub",(function(t){return function(){return t(this,"sub","","")}}))},function(t,n,e){"use strict";e(12)("sup",(function(t){return function(){return t(this,"sup","","")}}))},function(t,n,e){var r=e(0);r(r.S,"Date",{now:function(){return(new Date).getTime()}})},function(t,n,e){"use strict";var r=e(0),i=e(10),o=e(28);r(r.P+r.F*e(2)((function(){return null!==new Date(NaN).toJSON()||1!==Date.prototype.toJSON.call({toISOString:function(){return 1}})})),"Date",{toJSON:function(t){var n=i(this),e=o(n);return"number"!=typeof e||isFinite(e)?n.toISOString():null}})},function(t,n,e){var r=e(0),i=e(213);r(r.P+r.F*(Date.prototype.toISOString!==i),"Date",{toISOString:i})},function(t,n,e){"use strict";var r=e(2),i=Date.prototype.getTime,o=Date.prototype.toISOString,u=function(t){return t>9?t:"0"+t};t.exports=r((function(){return"0385-07-25T07:06:39.999Z"!=o.call(new Date(-5e13-1))}))||!r((function(){o.call(new Date(NaN))}))?function(){if(!isFinite(i.call(this)))throw RangeError("Invalid time value");var t=this,n=t.getUTCFullYear(),e=t.getUTCMilliseconds(),r=n<0?"-":n>9999?"+":"";return r+("00000"+Math.abs(n)).slice(r?-6:-4)+"-"+u(t.getUTCMonth()+1)+"-"+u(t.getUTCDate())+"T"+u(t.getUTCHours())+":"+u(t.getUTCMinutes())+":"+u(t.getUTCSeconds())+"."+(e>99?e:"0"+u(e))+"Z"}:o},function(t,n,e){var r=Date.prototype,i=r.toString,o=r.getTime;new Date(NaN)+""!="Invalid Date"&&e(11)(r,"toString",(function(){var t=o.call(this);return t==t?i.call(this):"Invalid Date"}))},function(t,n,e){var r=e(5)("toPrimitive"),i=Date.prototype;r in i||e(14)(i,r,e(216))},function(t,n,e){"use strict";var r=e(3),i=e(28);t.exports=function(t){if("string"!==t&&"number"!==t&&"default"!==t)throw TypeError("Incorrect hint");return i(r(this),"number"!=t)}},function(t,n,e){var r=e(0);r(r.S,"Array",{isArray:e(53)})},function(t,n,e){"use strict";var r=e(19),i=e(0),o=e(10),u=e(111),a=e(78),c=e(6),s=e(79),f=e(80);i(i.S+i.F*!e(54)((function(t){Array.from(t)})),"Array",{from:function(t){var n,e,i,l,h=o(t),d="function"==typeof this?this:Array,p=arguments.length,v=p>1?arguments[1]:void 0,g=void 0!==v,y=0,m=f(h);if(g&&(v=r(v,p>2?arguments[2]:void 0,2)),null==m||d==Array&&a(m))for(e=new d(n=c(h.length));n>y;y++)s(e,y,g?v(h[y],y):h[y]);else for(l=m.call(h),e=new d;!(i=l.next()).done;y++)s(e,y,g?u(l,v,[i.value,y],!0):i.value);return e.length=y,e}})},function(t,n,e){"use strict";var r=e(0),i=e(79);r(r.S+r.F*e(2)((function(){function t(){}return!(Array.of.call(t)instanceof t)})),"Array",{of:function(){for(var t=0,n=arguments.length,e=new("function"==typeof this?this:Array)(n);n>t;)i(e,t,arguments[t++]);return e.length=n,e}})},function(t,n,e){"use strict";var r=e(0),i=e(15),o=[].join;r(r.P+r.F*(e(46)!=Object||!e(16)(o)),"Array",{join:function(t){return o.call(i(this),void 0===t?",":t)}})},function(t,n,e){"use strict";var r=e(0),i=e(66),o=e(25),u=e(34),a=e(6),c=[].slice;r(r.P+r.F*e(2)((function(){i&&c.call(i)})),"Array",{slice:function(t,n){var e=a(this.length),r=o(this);if(n=void 0===n?e:n,"Array"==r)return c.call(this,t,n);for(var i=u(t,e),s=u(n,e),f=a(s-i),l=new Array(f),h=0;h1&&(r=Math.min(r,o(arguments[1]))),r<0&&(r=e+r);r>=0;r--)if(r in n&&n[r]===t)return r||0;return-1}})},function(t,n,e){var r=e(0);r(r.P,"Array",{copyWithin:e(114)}),e(38)("copyWithin")},function(t,n,e){var r=e(0);r(r.P,"Array",{fill:e(81)}),e(38)("fill")},function(t,n,e){"use strict";var r=e(0),i=e(24)(5),o=!0;"find"in[]&&Array(1).find((function(){o=!1})),r(r.P+r.F*o,"Array",{find:function(t){return i(this,t,arguments.length>1?arguments[1]:void 0)}}),e(38)("find")},function(t,n,e){"use strict";var r=e(0),i=e(24)(6),o="findIndex",u=!0;o in[]&&Array(1)[o]((function(){u=!1})),r(r.P+r.F*u,"Array",{findIndex:function(t){return i(this,t,arguments.length>1?arguments[1]:void 0)}}),e(38)(o)},function(t,n,e){e(43)("Array")},function(t,n,e){var r=e(1),i=e(69),o=e(9).f,u=e(36).f,a=e(76),c=e(55),s=r.RegExp,f=s,l=s.prototype,h=/a/g,d=/a/g,p=new s(h)!==h;if(e(8)&&(!p||e(2)((function(){return d[e(5)("match")]=!1,s(h)!=h||s(d)==d||"/a/i"!=s(h,"i")})))){s=function(t,n){var e=this instanceof s,r=a(t),o=void 0===n;return!e&&r&&t.constructor===s&&o?t:i(p?new f(r&&!o?t.source:t,n):f((r=t instanceof s)?t.source:t,r&&o?c.call(t):n),e?this:l,s)};for(var v=function(t){t in s||o(s,t,{configurable:!0,get:function(){return f[t]},set:function(n){f[t]=n}})},g=u(f),y=0;g.length>y;)v(g[y++]);l.constructor=s,s.prototype=l,e(11)(r,"RegExp",s)}e(43)("RegExp")},function(t,n,e){"use strict";e(117);var r=e(3),i=e(55),o=e(8),u=/./.toString,a=function(t){e(11)(RegExp.prototype,"toString",t,!0)};e(2)((function(){return"/a/b"!=u.call({source:"a",flags:"b"})}))?a((function(){var t=r(this);return"/".concat(t.source,"/","flags"in t?t.flags:!o&&t instanceof RegExp?i.call(t):void 0)})):"toString"!=u.name&&a((function(){return u.call(this)}))},function(t,n,e){"use strict";var r=e(3),i=e(6),o=e(84),u=e(56);e(57)("match",1,(function(t,n,e,a){return[function(e){var r=t(this),i=null==e?void 0:e[n];return void 0!==i?i.call(e,r):new RegExp(e)[n](String(r))},function(t){var n=a(e,t,this);if(n.done)return n.value;var c=r(t),s=String(this);if(!c.global)return u(c,s);var f=c.unicode;c.lastIndex=0;for(var l,h=[],d=0;null!==(l=u(c,s));){var p=String(l[0]);h[d]=p,""===p&&(c.lastIndex=o(s,i(c.lastIndex),f)),d++}return 0===d?null:h}]}))},function(t,n,e){"use strict";var r=e(3),i=e(10),o=e(6),u=e(21),a=e(84),c=e(56),s=Math.max,f=Math.min,l=Math.floor,h=/\$([$&`']|\d\d?|<[^>]*>)/g,d=/\$([$&`']|\d\d?)/g;e(57)("replace",2,(function(t,n,e,p){return[function(r,i){var o=t(this),u=null==r?void 0:r[n];return void 0!==u?u.call(r,o,i):e.call(String(o),r,i)},function(t,n){var i=p(e,t,this,n);if(i.done)return i.value;var l=r(t),h=String(this),d="function"==typeof n;d||(n=String(n));var g=l.global;if(g){var y=l.unicode;l.lastIndex=0}for(var m=[];;){var b=c(l,h);if(null===b)break;if(m.push(b),!g)break;""===String(b[0])&&(l.lastIndex=a(h,o(l.lastIndex),y))}for(var S,w="",_=0,M=0;M=_&&(w+=h.slice(_,P)+N,_=P+x.length)}return w+h.slice(_)}];function v(t,n,r,o,u,a){var c=r+t.length,s=o.length,f=d;return void 0!==u&&(u=i(u),f=h),e.call(a,f,(function(e,i){var a;switch(i.charAt(0)){case"$":return"$";case"&":return t;case"`":return n.slice(0,r);case"'":return n.slice(c);case"<":a=u[i.slice(1,-1)];break;default:var f=+i;if(0===f)return e;if(f>s){var h=l(f/10);return 0===h?e:h<=s?void 0===o[h-1]?i.charAt(1):o[h-1]+i.charAt(1):e}a=o[f-1]}return void 0===a?"":a}))}}))},function(t,n,e){"use strict";var r=e(3),i=e(102),o=e(56);e(57)("search",1,(function(t,n,e,u){return[function(e){var r=t(this),i=null==e?void 0:e[n];return void 0!==i?i.call(e,r):new RegExp(e)[n](String(r))},function(t){var n=u(e,t,this);if(n.done)return n.value;var a=r(t),c=String(this),s=a.lastIndex;i(s,0)||(a.lastIndex=0);var f=o(a,c);return i(a.lastIndex,s)||(a.lastIndex=s),null===f?-1:f.index}]}))},function(t,n,e){"use strict";var r=e(76),i=e(3),o=e(49),u=e(84),a=e(6),c=e(56),s=e(83),f=e(2),l=Math.min,h=[].push,d=!f((function(){RegExp(4294967295,"y")}));e(57)("split",2,(function(t,n,e,f){var p;return p="c"=="abbc".split(/(b)*/)[1]||4!="test".split(/(?:)/,-1).length||2!="ab".split(/(?:ab)*/).length||4!=".".split(/(.?)(.?)/).length||".".split(/()()/).length>1||"".split(/.?/).length?function(t,n){var i=String(this);if(void 0===t&&0===n)return[];if(!r(t))return e.call(i,t,n);for(var o,u,a,c=[],f=(t.ignoreCase?"i":"")+(t.multiline?"m":"")+(t.unicode?"u":"")+(t.sticky?"y":""),l=0,d=void 0===n?4294967295:n>>>0,p=new RegExp(t.source,f+"g");(o=s.call(p,i))&&!((u=p.lastIndex)>l&&(c.push(i.slice(l,o.index)),o.length>1&&o.index=d));)p.lastIndex===o.index&&p.lastIndex++;return l===i.length?!a&&p.test("")||c.push(""):c.push(i.slice(l)),c.length>d?c.slice(0,d):c}:"0".split(void 0,0).length?function(t,n){return void 0===t&&0===n?[]:e.call(this,t,n)}:e,[function(e,r){var i=t(this),o=null==e?void 0:e[n];return void 0!==o?o.call(e,i,r):p.call(String(i),e,r)},function(t,n){var r=f(p,t,this,n,p!==e);if(r.done)return r.value;var s=i(t),h=String(this),v=o(s,RegExp),g=s.unicode,y=(s.ignoreCase?"i":"")+(s.multiline?"m":"")+(s.unicode?"u":"")+(d?"y":"g"),m=new v(d?s:"^(?:"+s.source+")",y),b=void 0===n?4294967295:n>>>0;if(0===b)return[];if(0===h.length)return null===c(m,h)?[h]:[];for(var S=0,w=0,_=[];w0?arguments[0]:void 0)}}),{get:function(t){var n=r.getEntry(i(this,"Map"),t);return n&&n.v},set:function(t,n){return r.def(i(this,"Map"),0===t?0:t,n)}},r,!0)},function(t,n,e){"use strict";var r=e(121),i=e(39);t.exports=e(60)("Set",(function(t){return function(){return t(this,arguments.length>0?arguments[0]:void 0)}}),{add:function(t){return r.def(i(this,"Set"),t=0===t?0:t,t)}},r)},function(t,n,e){"use strict";var r,i=e(1),o=e(24)(0),u=e(11),a=e(29),c=e(101),s=e(122),f=e(4),l=e(39),h=e(39),d=!i.ActiveXObject&&"ActiveXObject"in i,p=a.getWeak,v=Object.isExtensible,g=s.ufstore,y=function(t){return function(){return t(this,arguments.length>0?arguments[0]:void 0)}},m={get:function(t){if(f(t)){var n=p(t);return!0===n?g(l(this,"WeakMap")).get(t):n?n[this._i]:void 0}},set:function(t,n){return s.def(l(this,"WeakMap"),t,n)}},b=t.exports=e(60)("WeakMap",y,m,s,!0,!0);h&&d&&(c((r=s.getConstructor(y,"WeakMap")).prototype,m),a.NEED=!0,o(["delete","has","get","set"],(function(t){var n=b.prototype,e=n[t];u(n,t,(function(n,i){if(f(n)&&!v(n)){this._f||(this._f=new r);var o=this._f[t](n,i);return"set"==t?this:o}return e.call(this,n,i)}))})))},function(t,n,e){"use strict";var r=e(122),i=e(39);e(60)("WeakSet",(function(t){return function(){return t(this,arguments.length>0?arguments[0]:void 0)}}),{add:function(t){return r.def(i(this,"WeakSet"),t,!0)}},r,!1,!0)},function(t,n,e){"use strict";var r=e(0),i=e(61),o=e(86),u=e(3),a=e(34),c=e(6),s=e(4),f=e(1).ArrayBuffer,l=e(49),h=o.ArrayBuffer,d=o.DataView,p=i.ABV&&f.isView,v=h.prototype.slice,g=i.VIEW;r(r.G+r.W+r.F*(f!==h),{ArrayBuffer:h}),r(r.S+r.F*!i.CONSTR,"ArrayBuffer",{isView:function(t){return p&&p(t)||s(t)&&g in t}}),r(r.P+r.U+r.F*e(2)((function(){return!new h(2).slice(1,void 0).byteLength})),"ArrayBuffer",{slice:function(t,n){if(void 0!==v&&void 0===n)return v.call(u(this),t);for(var e=u(this).byteLength,r=a(t,e),i=a(void 0===n?e:n,e),o=new(l(this,h))(c(i-r)),s=new d(this),f=new d(o),p=0;r=n.length)return{value:void 0,done:!0}}while(!((t=n[this._i++])in this._t));return{value:t,done:!1}})),r(r.S,"Reflect",{enumerate:function(t){return new o(t)}})},function(t,n,e){var r=e(22),i=e(37),o=e(13),u=e(0),a=e(4),c=e(3);u(u.S,"Reflect",{get:function t(n,e){var u,s,f=arguments.length<3?n:arguments[2];return c(n)===f?n[e]:(u=r.f(n,e))?o(u,"value")?u.value:void 0!==u.get?u.get.call(f):void 0:a(s=i(n))?t(s,e,f):void 0}})},function(t,n,e){var r=e(22),i=e(0),o=e(3);i(i.S,"Reflect",{getOwnPropertyDescriptor:function(t,n){return r.f(o(t),n)}})},function(t,n,e){var r=e(0),i=e(37),o=e(3);r(r.S,"Reflect",{getPrototypeOf:function(t){return i(o(t))}})},function(t,n,e){var r=e(0);r(r.S,"Reflect",{has:function(t,n){return n in t}})},function(t,n,e){var r=e(0),i=e(3),o=Object.isExtensible;r(r.S,"Reflect",{isExtensible:function(t){return i(t),!o||o(t)}})},function(t,n,e){var r=e(0);r(r.S,"Reflect",{ownKeys:e(124)})},function(t,n,e){var r=e(0),i=e(3),o=Object.preventExtensions;r(r.S,"Reflect",{preventExtensions:function(t){i(t);try{return o&&o(t),!0}catch(t){return!1}}})},function(t,n,e){var r=e(9),i=e(22),o=e(37),u=e(13),a=e(0),c=e(30),s=e(3),f=e(4);a(a.S,"Reflect",{set:function t(n,e,a){var l,h,d=arguments.length<4?n:arguments[3],p=i.f(s(n),e);if(!p){if(f(h=o(n)))return t(h,e,a,d);p=c(0)}if(u(p,"value")){if(!1===p.writable||!f(d))return!1;if(l=i.f(d,e)){if(l.get||l.set||!1===l.writable)return!1;l.value=a,r.f(d,e,l)}else r.f(d,e,c(0,a));return!0}return void 0!==p.set&&(p.set.call(d,a),!0)}})},function(t,n,e){var r=e(0),i=e(67);i&&r(r.S,"Reflect",{setPrototypeOf:function(t,n){i.check(t,n);try{return i.set(t,n),!0}catch(t){return!1}}})},function(t,n,e){e(276),t.exports=e(7).Array.includes},function(t,n,e){"use strict";var r=e(0),i=e(51)(!0);r(r.P,"Array",{includes:function(t){return i(this,t,arguments.length>1?arguments[1]:void 0)}}),e(38)("includes")},function(t,n,e){e(278),t.exports=e(7).Array.flatMap},function(t,n,e){"use strict";var r=e(0),i=e(279),o=e(10),u=e(6),a=e(20),c=e(112);r(r.P,"Array",{flatMap:function(t){var n,e,r=o(this);return a(t),n=u(r.length),e=c(r,0),i(e,r,r,n,0,1,t,arguments[1]),e}}),e(38)("flatMap")},function(t,n,e){"use strict";var r=e(53),i=e(4),o=e(6),u=e(19),a=e(5)("isConcatSpreadable");t.exports=function t(n,e,c,s,f,l,h,d){for(var p,v,g=f,y=0,m=!!h&&u(h,d,3);y0)g=t(n,e,p,o(p.length),g,l-1)-1;else{if(g>=9007199254740991)throw TypeError();n[g]=p}g++}y++}return g}},function(t,n,e){e(281),t.exports=e(7).String.padStart},function(t,n,e){"use strict";var r=e(0),i=e(125),o=e(59),u=/Version\/10\.\d+(\.\d+)?( Mobile\/\w+)? Safari\//.test(o);r(r.P+r.F*u,"String",{padStart:function(t){return i(this,t,arguments.length>1?arguments[1]:void 0,!0)}})},function(t,n,e){e(283),t.exports=e(7).String.padEnd},function(t,n,e){"use strict";var r=e(0),i=e(125),o=e(59),u=/Version\/10\.\d+(\.\d+)?( Mobile\/\w+)? Safari\//.test(o);r(r.P+r.F*u,"String",{padEnd:function(t){return i(this,t,arguments.length>1?arguments[1]:void 0,!1)}})},function(t,n,e){e(285),t.exports=e(7).String.trimLeft},function(t,n,e){"use strict";e(41)("trimLeft",(function(t){return function(){return t(this,1)}}),"trimStart")},function(t,n,e){e(287),t.exports=e(7).String.trimRight},function(t,n,e){"use strict";e(41)("trimRight",(function(t){return function(){return t(this,2)}}),"trimEnd")},function(t,n,e){e(289),t.exports=e(63).f("asyncIterator")},function(t,n,e){e(97)("asyncIterator")},function(t,n,e){e(291),t.exports=e(7).Object.getOwnPropertyDescriptors},function(t,n,e){var r=e(0),i=e(124),o=e(15),u=e(22),a=e(79);r(r.S,"Object",{getOwnPropertyDescriptors:function(t){for(var n,e,r=o(t),c=u.f,s=i(r),f={},l=0;s.length>l;)void 0!==(e=c(r,n=s[l++]))&&a(f,n,e);return f}})},function(t,n,e){e(293),t.exports=e(7).Object.values},function(t,n,e){var r=e(0),i=e(126)(!1);r(r.S,"Object",{values:function(t){return i(t)}})},function(t,n,e){e(295),t.exports=e(7).Object.entries},function(t,n,e){var r=e(0),i=e(126)(!0);r(r.S,"Object",{entries:function(t){return i(t)}})},function(t,n,e){"use strict";e(118),e(297),t.exports=e(7).Promise.finally},function(t,n,e){"use strict";var r=e(0),i=e(7),o=e(1),u=e(49),a=e(120);r(r.P+r.R,"Promise",{finally:function(t){var n=u(this,i.Promise||o.Promise),e="function"==typeof t;return this.then(e?function(e){return a(n,t()).then((function(){return e}))}:t,e?function(e){return a(n,t()).then((function(){throw e}))}:t)}})},function(t,n,e){e(299),e(300),e(301),t.exports=e(7)},function(t,n,e){var r=e(1),i=e(0),o=e(59),u=[].slice,a=/MSIE .\./.test(o),c=function(t){return function(n,e){var r=arguments.length>2,i=!!r&&u.call(arguments,2);return t(r?function(){("function"==typeof n?n:Function(n)).apply(this,i)}:n,e)}};i(i.G+i.B+i.F*a,{setTimeout:c(r.setTimeout),setInterval:c(r.setInterval)})},function(t,n,e){var r=e(0),i=e(85);r(r.G+r.B,{setImmediate:i.set,clearImmediate:i.clear})},function(t,n,e){for(var r=e(82),i=e(33),o=e(11),u=e(1),a=e(14),c=e(42),s=e(5),f=s("iterator"),l=s("toStringTag"),h=c.Array,d={CSSRuleList:!0,CSSStyleDeclaration:!1,CSSValueList:!1,ClientRectList:!1,DOMRectList:!1,DOMStringList:!1,DOMTokenList:!0,DataTransferItemList:!1,FileList:!1,HTMLAllCollection:!1,HTMLCollection:!1,HTMLFormElement:!1,HTMLSelectElement:!1,MediaList:!0,MimeTypeArray:!1,NamedNodeMap:!1,NodeList:!0,PaintRequestList:!1,Plugin:!1,PluginArray:!1,SVGLengthList:!1,SVGNumberList:!1,SVGPathSegList:!1,SVGPointList:!1,SVGStringList:!1,SVGTransformList:!1,SourceBufferList:!1,StyleSheetList:!0,TextTrackCueList:!1,TextTrackList:!1,TouchList:!1},p=i(d),v=0;v=0;--o){var u=this.tryEntries[o],a=u.completion;if("root"===u.tryLoc)return i("end");if(u.tryLoc<=this.prev){var c=r.call(u,"catchLoc"),s=r.call(u,"finallyLoc");if(c&&s){if(this.prev=0;--e){var i=this.tryEntries[e];if(i.tryLoc<=this.prev&&r.call(i,"finallyLoc")&&this.prev=0;--n){var e=this.tryEntries[n];if(e.finallyLoc===t)return this.complete(e.completion,e.afterLoc),O(e),p}},catch:function(t){for(var n=this.tryEntries.length-1;n>=0;--n){var e=this.tryEntries[n];if(e.tryLoc===t){var r=e.completion;if("throw"===r.type){var i=r.arg;O(e)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:A(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=n),p}},t}(t.exports);try{regeneratorRuntime=r}catch(t){Function("r","regeneratorRuntime = r")(r)}},function(t,n,e){e(304),t.exports=e(127).global},function(t,n,e){var r=e(305);r(r.G,{global:e(87)})},function(t,n,e){var r=e(87),i=e(127),o=e(306),u=e(308),a=e(315),c=function(t,n,e){var s,f,l,h=t&c.F,d=t&c.G,p=t&c.S,v=t&c.P,g=t&c.B,y=t&c.W,m=d?i:i[n]||(i[n]={}),b=m.prototype,S=d?r:p?r[n]:(r[n]||{}).prototype;for(s in d&&(e=n),e)(f=!h&&S&&void 0!==S[s])&&a(m,s)||(l=f?S[s]:e[s],m[s]=d&&"function"!=typeof S[s]?e[s]:g&&f?o(l,r):y&&S[s]==l?function(t){var n=function(n,e,r){if(this instanceof t){switch(arguments.length){case 0:return new t;case 1:return new t(n);case 2:return new t(n,e)}return new t(n,e,r)}return t.apply(this,arguments)};return n.prototype=t.prototype,n}(l):v&&"function"==typeof l?o(Function.call,l):l,v&&((m.virtual||(m.virtual={}))[s]=l,t&c.R&&b&&!b[s]&&u(b,s,l)))};c.F=1,c.G=2,c.S=4,c.P=8,c.B=16,c.W=32,c.U=64,c.R=128,t.exports=c},function(t,n,e){var r=e(307);t.exports=function(t,n,e){if(r(t),void 0===n)return t;switch(e){case 1:return function(e){return t.call(n,e)};case 2:return function(e,r){return t.call(n,e,r)};case 3:return function(e,r,i){return t.call(n,e,r,i)}}return function(){return t.apply(n,arguments)}}},function(t,n){t.exports=function(t){if("function"!=typeof t)throw TypeError(t+" is not a function!");return t}},function(t,n,e){var r=e(309),i=e(314);t.exports=e(89)?function(t,n,e){return r.f(t,n,i(1,e))}:function(t,n,e){return t[n]=e,t}},function(t,n,e){var r=e(310),i=e(311),o=e(313),u=Object.defineProperty;n.f=e(89)?Object.defineProperty:function(t,n,e){if(r(t),n=o(n,!0),r(e),i)try{return u(t,n,e)}catch(t){}if("get"in e||"set"in e)throw TypeError("Accessors not supported!");return"value"in e&&(t[n]=e.value),t}},function(t,n,e){var r=e(88);t.exports=function(t){if(!r(t))throw TypeError(t+" is not an object!");return t}},function(t,n,e){t.exports=!e(89)&&!e(128)((function(){return 7!=Object.defineProperty(e(312)("div"),"a",{get:function(){return 7}}).a}))},function(t,n,e){var r=e(88),i=e(87).document,o=r(i)&&r(i.createElement);t.exports=function(t){return o?i.createElement(t):{}}},function(t,n,e){var r=e(88);t.exports=function(t,n){if(!r(t))return t;var e,i;if(n&&"function"==typeof(e=t.toString)&&!r(i=e.call(t)))return i;if("function"==typeof(e=t.valueOf)&&!r(i=e.call(t)))return i;if(!n&&"function"==typeof(e=t.toString)&&!r(i=e.call(t)))return i;throw TypeError("Can't convert object to primitive value")}},function(t,n){t.exports=function(t,n){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:n}}},function(t,n){var e={}.hasOwnProperty;t.exports=function(t,n){return e.call(t,n)}}])})); diff --git a/libraries/core-js.min.js b/libraries/core-js.min.js index 998abc6..3c3b258 100644 --- a/libraries/core-js.min.js +++ b/libraries/core-js.min.js @@ -1,2 +1,2 @@ -// Original file: https://cdnjs.cloudflare.com/ajax/libs/core-js/3.19.3/minified.min.js -!function(Bt){"use strict";var o,r=[function(t,n,r){r(1),r(84),r(85),r(86),r(87),r(88),r(89),r(90),r(91),r(92),r(93),r(94),r(95),r(96),r(97),r(98),r(113),r(115),r(117),r(119),r(121),r(123),r(124),r(125),r(126),r(128),r(129),r(131),r(135),r(136),r(137),r(138),r(142),r(143),r(145),r(146),r(147),r(150),r(151),r(152),r(153),r(154),r(159),r(161),r(162),r(163),r(164),r(171),r(173),r(176),r(177),r(178),r(179),r(180),r(181),r(185),r(186),r(188),r(189),r(190),r(192),r(193),r(194),r(195),r(196),r(197),r(205),r(207),r(208),r(209),r(211),r(212),r(214),r(215),r(217),r(218),r(219),r(220),r(221),r(222),r(223),r(224),r(225),r(226),r(227),r(231),r(232),r(234),r(236),r(237),r(238),r(239),r(240),r(242),r(244),r(245),r(246),r(248),r(249),r(251),r(252),r(253),r(254),r(256),r(257),r(258),r(259),r(260),r(261),r(262),r(263),r(265),r(266),r(267),r(268),r(269),r(270),r(271),r(272),r(273),r(274),r(276),r(277),r(278),r(279),r(291),r(292),r(293),r(294),r(295),r(296),r(297),r(298),r(300),r(301),r(302),r(303),r(304),r(305),r(306),r(307),r(308),r(309),r(315),r(316),r(318),r(319),r(320),r(321),r(322),r(323),r(324),r(326),r(329),r(330),r(331),r(332),r(336),r(337),r(339),r(340),r(341),r(342),r(344),r(345),r(346),r(347),r(348),r(349),r(351),r(352),r(353),r(356),r(357),r(358),r(359),r(360),r(361),r(362),r(363),r(364),r(365),r(366),r(367),r(368),r(374),r(375),r(376),r(377),r(378),r(379),r(380),r(381),r(382),r(383),r(384),r(385),r(386),r(390),r(391),r(392),r(393),r(394),r(395),r(396),r(397),r(398),r(399),r(400),r(401),r(402),r(403),r(404),r(405),r(406),r(407),r(408),r(409),r(410),r(411),r(412),r(414),r(415),r(416),r(423),r(424),r(425),r(426),r(428),r(429),r(431),r(432),r(433),r(434),r(436),r(437),r(439),r(440),r(441),r(442),r(443),r(444),r(445),r(446),r(447),r(448),r(449),r(450),r(451),r(453),r(455),r(456),r(457),r(458),r(460),r(461),r(462),r(463),r(464),r(465),r(466),r(467),r(468),r(469),r(470),r(471),r(472),r(474),r(476),r(478),r(479),r(480),r(481),r(483),r(484),r(486),r(487),r(488),r(489),r(490),r(491),r(493),r(494),r(495),r(496),r(498),r(499),r(500),r(501),r(502),r(504),r(505),r(506),r(507),r(508),r(509),r(510),r(511),r(512),r(513),r(514),r(515),r(516),r(518),r(519),r(520),r(521),r(522),r(523),r(524),r(526),r(527),r(528),r(529),r(530),r(531),r(532),r(533),r(534),r(536),r(537),r(538),r(540),r(541),r(542),r(543),r(544),r(545),r(546),r(547),r(548),r(549),r(550),r(551),r(552),r(553),r(554),r(555),r(556),r(557),r(558),r(559),r(560),r(561),r(562),r(563),r(564),r(565),r(566),r(567),r(568),r(569),r(570),r(571),r(572),r(573),r(574),r(575),r(576),r(577),r(578),r(579),r(580),r(581),r(582),r(585),r(586),r(587),r(588),r(589),r(593),t.exports=r(592)},function(t,n,r){function e(t,n){var r=lt[t]=j(et);return Z(r,{type:Q,tag:t,description:n}),d||(r.description=n),r}function o(t,n,r){return t===nt&&o(ht,n,r),I(t),n=O(n),I(r),x(lt,n)?(r.enumerable?(x(t,X)&&t[X][n]&&(t[X][n]=!1),r=j(r,{enumerable:P(0,!1)})):(x(t,X)||ut(t,X,P(1,{})),t[X][n]=!0),dt(t,n,r)):ut(t,n,r)}function i(n,t){var r;return I(n),r=T(t),t=N(r).concat(u(r)),J(t,function(t){d&&!p(a,r,t)||o(n,t,r[t])}),n}function a(t){var n=O(t),t=p(ft,this,n);return!(this===nt&&x(lt,n)&&!x(ht,n))&&(!(t||!x(this,n)||!x(lt,n)||x(this,X)&&this[X][n])||t)}function u(t){var n=t===nt,t=ct(n?ht:T(t)),r=[];return J(t,function(t){!x(lt,t)||n&&!x(nt,t)||st(r,lt[t])}),r}var c,f=r(2),s=r(3),l=r(20),h=r(62),p=r(7),g=r(12),v=r(32),d=r(5),y=r(23),m=r(6),x=r(35),b=r(63),w=r(18),S=r(17),A=r(21),E=r(19),I=r(42),R=r(36),T=r(10),O=r(15),M=r(64),P=r(9),j=r(67),N=r(69),k=r(52),_=r(71),U=r(60),L=r(4),F=r(41),C=r(8),D=r(74),B=r(43),z=r(31),W=r(47),q=r(48),G=r(37),Y=r(30),V=r(75),H=r(76),$=r(78),K=r(45),J=r(79).forEach,X=W("hidden"),Q="Symbol",W=Y("toPrimitive"),Z=K.set,tt=K.getterFor(Q),nt=Object.prototype,rt=s.Symbol,et=rt&&rt.prototype,ot=s.TypeError,s=s.QObject,it=l("JSON","stringify"),at=L.f,ut=F.f,ct=_.f,ft=C.f,st=g([].push),lt=z("symbols"),ht=z("op-symbols"),pt=z("string-to-symbol-registry"),gt=z("symbol-to-string-registry"),g=z("wks"),vt=!s||!s.prototype||!s.prototype.findChild,dt=d&&m(function(){return 7!=j(ut({},"a",{get:function(){return ut(this,"a",{value:7}).a}})).a})?function(t,n,r){var e=at(nt,n);e&&delete nt[n],ut(t,n,r),e&&t!==nt&&ut(nt,n,e)}:ut,z=function(t,n){var r=T(t),t=O(n);if(r!==nt||!x(lt,t)||x(ht,t))return!(n=at(r,t))||!x(lt,t)||x(r,X)&&r[X][t]||(n.enumerable=!0),n},s=function(t){var t=ct(T(t)),n=[];return J(t,function(t){x(lt,t)||x(q,t)||st(n,t)}),n};y||(B(et=(rt=function(){var t,n,r;if(A(et,this))throw ot("Symbol is not a constructor");return t=arguments.length&&arguments[0]!==Bt?M(arguments[0]):Bt,n=G(t),r=function(t){this===nt&&p(r,ht,t),x(this,X)&&x(this[X],n)&&(this[X][n]=!1),dt(this,n,P(1,t))},d&&vt&&dt(nt,n,{configurable:!0,set:r}),e(n,t)}).prototype,"toString",function(){return tt(this).tag}),B(rt,"withoutSetter",function(t){return e(G(t),t)}),C.f=a,F.f=o,L.f=z,k.f=_.f=s,U.f=u,V.f=function(t){return e(Y(t),t)},d&&(ut(et,"description",{configurable:!0,get:function(){return tt(this).description}}),v||B(nt,"propertyIsEnumerable",a,{unsafe:!0}))),f({global:!0,wrap:!0,forced:!y,sham:!y},{Symbol:rt}),J(N(g),function(t){H(t)}),f({target:Q,stat:!0,forced:!y},{for:function(t){var n=M(t);return x(pt,n)?pt[n]:(t=rt(n),pt[n]=t,gt[t]=n,t)},keyFor:function(t){if(!E(t))throw ot(t+" is not a symbol");if(x(gt,t))return gt[t]},useSetter:function(){vt=!0},useSimple:function(){vt=!1}}),f({target:"Object",stat:!0,forced:!y,sham:!d},{create:function(t,n){return n===Bt?j(t):i(j(t),n)},defineProperty:o,defineProperties:i,getOwnPropertyDescriptor:z}),f({target:"Object",stat:!0,forced:!y},{getOwnPropertyNames:s,getOwnPropertySymbols:u}),f({target:"Object",stat:!0,forced:m(function(){U.f(1)})},{getOwnPropertySymbols:function(t){return U.f(R(t))}}),it&&f({target:"JSON",stat:!0,forced:!y||m(function(){var t=rt();return"[null]"!=it([t])||"{}"!=it({a:t})||"{}"!=it(Object(t))})},{stringify:function(t,n,r){var e=D(arguments),o=n;if((S(n)||t!==Bt)&&!E(t))return b(n)||(n=function(t,n){if(w(o)&&(n=p(o,this,t,n)),!E(n))return n}),e[1]=n,h(it,null,e)}}),et[W]||(c=et.valueOf,B(et,W,function(t){return p(c,this)})),$(rt,Q),q[X]=!0},function(t,n,r){var f=r(3),s=r(4).f,l=r(40),h=r(43),p=r(34),g=r(50),v=r(61);t.exports=function(t,n){var r,e,o,i,a=t.target,u=t.global,c=t.stat;if(r=u?f:c?f[a]||p(a,{}):(f[a]||{}).prototype)for(e in n){if(o=n[e],i=t.noTargetGet?(i=s(r,e))&&i.value:r[e],!v(u?e:a+(c?".":"#")+e,t.forced)&&i!==Bt){if(typeof o==typeof i)continue;g(o,i)}(t.sham||i&&i.sham)&&l(o,"sham",!0),h(r,e,o,t)}}},function(t,n){function r(t){return t&&t.Math==Math&&t}t.exports=r("object"==typeof globalThis&&globalThis)||r("object"==typeof window&&window)||r("object"==typeof self&&self)||r("object"==typeof global&&global)||function(){return this}()||Function("return this")()},function(t,n,r){var e=r(5),o=r(7),i=r(8),a=r(9),u=r(10),c=r(15),f=r(35),s=r(38),l=Object.getOwnPropertyDescriptor;n.f=e?l:function(t,n){if(t=u(t),n=c(n),s)try{return l(t,n)}catch(t){}if(f(t,n))return a(!o(i.f,t,n),t[n])}},function(t,n,r){r=r(6);t.exports=!r(function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]})},function(t,n){t.exports=function(t){try{return!!t()}catch(t){return!0}}},function(t,n){var r=function(){}.call;t.exports=r.bind?r.bind(r):function(){return r.apply(r,arguments)}},function(t,n,r){var e={}.propertyIsEnumerable,o=Object.getOwnPropertyDescriptor,i=o&&!e.call({1:2},1);n.f=i?function(t){t=o(this,t);return!!t&&t.enumerable}:e},function(t,n){t.exports=function(t,n){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:n}}},function(t,n,r){var e=r(11),o=r(14);t.exports=function(t){return e(o(t))}},function(t,n,r){var e=r(3),o=r(12),i=r(6),a=r(13),u=e.Object,c=o("".split);t.exports=i(function(){return!u("z").propertyIsEnumerable(0)})?function(t){return"String"==a(t)?c(t,""):u(t)}:u},function(t,n){var r=Function.prototype,e=r.bind,o=r.call,i=e&&e.bind(o);t.exports=e?function(t){return t&&i(o,t)}:function(t){return t&&function(){return o.apply(t,arguments)}}},function(t,n,r){var r=r(12),e=r({}.toString),o=r("".slice);t.exports=function(t){return o(e(t),8,-1)}},function(t,n,r){var e=r(3).TypeError;t.exports=function(t){if(t==Bt)throw e("Can't call method on "+t);return t}},function(t,n,r){var e=r(16),o=r(19);t.exports=function(t){t=e(t,"string");return o(t)?t:t+""}},function(t,n,r){var e=r(3),o=r(7),i=r(17),a=r(19),u=r(26),c=r(29),r=r(30),f=e.TypeError,s=r("toPrimitive");t.exports=function(t,n){var r;if(!i(t)||a(t))return t;if(r=u(t,s)){if(r=o(r,t,n=n===Bt?"default":n),!i(r)||a(r))return r;throw f("Can't convert object to primitive value")}return c(t,n=n===Bt?"number":n)}},function(t,n,r){var e=r(18);t.exports=function(t){return"object"==typeof t?null!==t:e(t)}},function(t,n){t.exports=function(t){return"function"==typeof t}},function(t,n,r){var e=r(3),o=r(20),i=r(18),a=r(21),r=r(22),u=e.Object;t.exports=r?function(t){return"symbol"==typeof t}:function(t){var n=o("Symbol");return i(n)&&a(n.prototype,u(t))}},function(t,n,r){var e=r(3),o=r(18);t.exports=function(t,n){return arguments.length<2?(r=e[t],o(r)?r:Bt):e[t]&&e[t][n];var r}},function(t,n,r){r=r(12);t.exports=r({}.isPrototypeOf)},function(t,n,r){r=r(23);t.exports=r&&!Symbol.sham&&"symbol"==typeof Symbol.iterator},function(t,n,r){var e=r(24),r=r(6);t.exports=!!Object.getOwnPropertySymbols&&!r(function(){var t=Symbol();return!String(t)||!(Object(t)instanceof Symbol)||!Symbol.sham&&e&&e<41})},function(t,n,r){var e,o,i=r(3),a=r(25),r=i.process,i=i.Deno,i=r&&r.versions||i&&i.version,i=i&&i.v8;!(o=i?0<(e=i.split("."))[0]&&e[0]<4?1:+(e[0]+e[1]):o)&&a&&(!(e=a.match(/Edge\/(\d+)/))||74<=e[1])&&(e=a.match(/Chrome\/(\d+)/))&&(o=+e[1]),t.exports=o},function(t,n,r){r=r(20);t.exports=r("navigator","userAgent")||""},function(t,n,r){var e=r(27);t.exports=function(t,n){n=t[n];return null==n?Bt:e(n)}},function(t,n,r){var e=r(3),o=r(18),i=r(28),a=e.TypeError;t.exports=function(t){if(o(t))return t;throw a(i(t)+" is not a function")}},function(t,n,r){var e=r(3).String;t.exports=function(t){try{return e(t)}catch(t){return"Object"}}},function(t,n,r){var e=r(3),o=r(7),i=r(18),a=r(17),u=e.TypeError;t.exports=function(t,n){var r,e;if("string"===n&&i(r=t.toString)&&!a(e=o(r,t)))return e;if(i(r=t.valueOf)&&!a(e=o(r,t)))return e;if("string"!==n&&i(r=t.toString)&&!a(e=o(r,t)))return e;throw u("Can't convert object to primitive value")}},function(t,n,r){var e=r(3),o=r(31),i=r(35),a=r(37),u=r(23),c=r(22),f=o("wks"),s=e.Symbol,l=s&&s.for,h=c?s:s&&s.withoutSetter||a;t.exports=function(t){var n;return i(f,t)&&(u||"string"==typeof f[t])||(n="Symbol."+t,f[t]=u&&i(s,t)?s[t]:(c&&l?l:h)(n)),f[t]}},function(t,n,r){var e=r(32),o=r(33);(t.exports=function(t,n){return o[t]||(o[t]=n!==Bt?n:{})})("versions",[]).push({version:"3.19.3",mode:e?"pure":"global",copyright:"© 2021 Denis Pushkarev (zloirock.ru)"})},function(t,n){t.exports=!1},function(t,n,r){var e=r(3),o=r(34),r="__core-js_shared__",r=e[r]||o(r,{});t.exports=r},function(t,n,r){var e=r(3),o=Object.defineProperty;t.exports=function(n,r){try{o(e,n,{value:r,configurable:!0,writable:!0})}catch(t){e[n]=r}return r}},function(t,n,r){var e=r(12),o=r(36),i=e({}.hasOwnProperty);t.exports=Object.hasOwn||function(t,n){return i(o(t),n)}},function(t,n,r){var e=r(3),o=r(14),i=e.Object;t.exports=function(t){return i(o(t))}},function(t,n,r){var r=r(12),e=0,o=Math.random(),i=r(1..toString);t.exports=function(t){return"Symbol("+(t===Bt?"":t)+")_"+i(++e+o,36)}},function(t,n,r){var e=r(5),o=r(6),i=r(39);t.exports=!e&&!o(function(){return 7!=Object.defineProperty(i("div"),"a",{get:function(){return 7}}).a})},function(t,n,r){var e=r(3),r=r(17),o=e.document,i=r(o)&&r(o.createElement);t.exports=function(t){return i?o.createElement(t):{}}},function(t,n,r){var e=r(5),o=r(41),i=r(9);t.exports=e?function(t,n,r){return o.f(t,n,i(1,r))}:function(t,n,r){return t[n]=r,t}},function(t,n,r){var e=r(3),o=r(5),i=r(38),a=r(42),u=r(15),c=e.TypeError,f=Object.defineProperty;n.f=o?f:function(t,n,r){if(a(t),n=u(n),a(r),i)try{return f(t,n,r)}catch(t){}if("get"in r||"set"in r)throw c("Accessors not supported");return"value"in r&&(t[n]=r.value),t}},function(t,n,r){var e=r(3),o=r(17),i=e.String,a=e.TypeError;t.exports=function(t){if(o(t))return t;throw a(i(t)+" is not an object")}},function(t,n,r){var c=r(3),f=r(18),s=r(35),l=r(40),h=r(34),e=r(44),o=r(45),p=r(49).CONFIGURABLE,i=o.get,g=o.enforce,v=String(String).split("String");(t.exports=function(t,n,r,e){var o=!!e&&!!e.unsafe,i=!!e&&!!e.enumerable,a=!!e&&!!e.noTargetGet,u=e&&e.name!==Bt?e.name:n;f(r)&&("Symbol("===String(u).slice(0,7)&&(u="["+String(u).replace(/^Symbol\(([^)]*)\)/,"$1")+"]"),(!s(r,"name")||p&&r.name!==u)&&l(r,"name",u),(e=g(r)).source||(e.source=v.join("string"==typeof u?u:""))),t!==c?(o?!a&&t[n]&&(i=!0):delete t[n],i?t[n]=r:l(t,n,r)):i?t[n]=r:h(n,r)})(Function.prototype,"toString",function(){return f(this)&&i(this).source||e(this)})},function(t,n,r){var e=r(12),o=r(18),r=r(33),i=e(Function.toString);o(r.inspectSource)||(r.inspectSource=function(t){return i(t)}),t.exports=r.inspectSource},function(t,n,r){var e,o,i,a,u,c,f,s=r(46),l=r(3),h=r(12),p=r(17),g=r(40),v=r(35),d=r(33),y=r(47),r=r(48),m="Object already initialized",x=l.TypeError,b=s||d.state?(i=d.state||(d.state=new l.WeakMap),a=h(i.get),u=h(i.has),c=h(i.set),e=function(t,n){if(u(i,t))throw new x(m);return n.facade=t,c(i,t,n),n},o=function(t){return a(i,t)||{}},function(t){return u(i,t)}):(r[f=y("state")]=!0,e=function(t,n){if(v(t,f))throw new x(m);return n.facade=t,g(t,f,n),n},o=function(t){return v(t,f)?t[f]:{}},function(t){return v(t,f)});t.exports={set:e,get:o,has:b,enforce:function(t){return b(t)?o(t):e(t,{})},getterFor:function(r){return function(t){var n;if(!p(t)||(n=o(t)).type!==r)throw x("Incompatible receiver, "+r+" required");return n}}}},function(t,n,r){var e=r(3),o=r(18),r=r(44),e=e.WeakMap;t.exports=o(e)&&/native code/.test(r(e))},function(t,n,r){var e=r(31),o=r(37),i=e("keys");t.exports=function(t){return i[t]||(i[t]=o(t))}},function(t,n){t.exports={}},function(t,n,r){var e=r(5),o=r(35),i=Function.prototype,a=e&&Object.getOwnPropertyDescriptor,r=o(i,"name"),o=r&&"something"===function(){}.name,i=r&&(!e||a(i,"name").configurable);t.exports={EXISTS:r,PROPER:o,CONFIGURABLE:i}},function(t,n,r){var u=r(35),c=r(51),f=r(4),s=r(41);t.exports=function(t,n){for(var r,e=c(n),o=s.f,i=f.f,a=0;ao;)a(e,r=n[o++])&&(~c(i,r)||s(i,r));return i}},function(t,n,r){var c=r(10),f=r(55),s=r(57),r=function(u){return function(t,n,r){var e,o=c(t),i=s(o),a=f(r,i);if(u&&n!=n){for(;a"+t+"<\/script>"},g=function(){var t,n;try{i=new ActiveXObject("htmlfile")}catch(t){}for(g="undefined"==typeof document||document.domain&&i?o(i):((t=l("iframe")).style.display="none",s.appendChild(t),t.src=String("javascript:"),(t=t.contentWindow.document).open(),t.write(p("document.F=Object")),t.close(),t.F),n=c.length;n--;)delete g.prototype[c[n]];return g()};f[h]=!0,t.exports=Object.create||function(t,n){var r;return null!==t?(e.prototype=a(t),r=new e,e.prototype=null,r[h]=t):r=g(),n===Bt?r:u(r,n)}},function(t,n,r){var e=r(5),u=r(41),c=r(42),f=r(10),s=r(69);t.exports=e?Object.defineProperties:function(t,n){var r,e,o,i,a;for(c(t),r=f(n),o=(e=s(n)).length,i=0;id)throw m(y);for(n=0;n=n.length?{value:t.target=Bt,done:!0}:"keys"==r?{value:e,done:!1}:"values"==r?{value:n[e],done:!1}:{value:[e,n[e]],done:!1}},"values"),i.Arguments=i.Array,o("keys"),o("values"),o("entries")},function(t,n,r){function d(){return this}var y=r(2),m=r(7),x=r(32),e=r(49),b=r(18),w=r(140),S=r(99),A=r(101),E=r(78),I=r(40),R=r(43),o=r(30),T=r(107),r=r(141),O=e.PROPER,M=e.CONFIGURABLE,P=r.IteratorPrototype,j=r.BUGGY_SAFARI_ITERATORS,N=o("iterator"),k="values",_="entries";t.exports=function(t,n,r,e,o,i,a){var u,c,f,s,l,h,p,g,v;if(w(r,n,e),c=n+" Iterator",f=!(u=function(t){if(t===o&&h)return h;if(!j&&t in s)return s[t];switch(t){case"keys":case k:case _:return function(){return new r(this,t)}}return function(){return new r(this)}}),l=(s=t.prototype)[N]||s["@@iterator"]||o&&s[o],h=!j&&l||u(o),(e="Array"==n&&s.entries||l)&&(p=S(e.call(new t)))!==Object.prototype&&p.next&&(x||S(p)===P||(A?A(p,P):b(p[N])||R(p,N,d)),E(p,c,!0,!0),x&&(T[c]=d)),O&&o==k&&l&&l.name!==k&&(!x&&M?I(s,"name",k):(f=!0,h=function(){return m(l,this)})),o)if(g={values:u(k),keys:i?h:u("keys"),entries:u(_)},a)for(v in g)!j&&!f&&v in s||R(s,v,g[v]);else y({target:n,proto:!0,forced:j||f},g);return x&&!a||s[N]===h||R(s,N,h,{name:o}),T[n]=h,g}},function(t,n,r){function o(){return this}var i=r(141).IteratorPrototype,a=r(67),u=r(9),c=r(78),f=r(107);t.exports=function(t,n,r,e){n+=" Iterator";return t.prototype=a(i,{next:u(+!e,r)}),c(t,n,!1,!0),f[n]=o,t}},function(t,n,r){var e,o=r(6),i=r(18),a=r(67),u=r(99),c=r(43),f=r(30),s=r(32),l=f("iterator"),r=!1;[].keys&&("next"in(f=[].keys())?(f=u(u(f)))!==Object.prototype&&(e=f):r=!0),e==Bt||o(function(){var t={};return e[l].call(t)!==t})?e={}:s&&(e=a(e)),i(e[l])||c(e,l,function(){return this}),t.exports={IteratorPrototype:e,BUGGY_SAFARI_ITERATORS:r}},function(t,n,r){var e=r(2),o=r(12),i=r(11),a=r(10),r=r(120),u=o([].join),i=i!=Object,r=r("join",",");e({target:"Array",proto:!0,forced:i||!r},{join:function(t){return u(a(this),t===Bt?",":t)}})},function(t,n,r){var e=r(2),r=r(144);e({target:"Array",proto:!0,forced:r!==[].lastIndexOf},{lastIndexOf:r})},function(t,n,r){var o=r(62),i=r(10),a=r(56),u=r(57),r=r(120),c=Math.min,f=[].lastIndexOf,s=!!f&&1/[1].lastIndexOf(1,-0)<0,r=r("lastIndexOf");t.exports=s||!r?function(t){var n,r,e;if(s)return o(f,this,arguments)||0;for(n=i(this),e=(r=u(n))-1,(e=1s(n)?1:-1})),o=r.length,i=0;i0;)t[e]=t[--e];e!==i++&&(t[e]=r)}return t}(t,n):function(t,n,r,e){for(var o=n.length,i=r.length,a=0,u=0;a>8&255]}function i(t){return[255&t,t>>8&255,t>>16&255,t>>24&255]}function a(t){return t[3]<<24|t[2]<<16|t[1]<<8|t[0]}function u(t){return J(t,23,4)}function c(t){return J(t,52,8)}function f(t,n,r,e){var o=T(r),r=D(t);if(o+n>r.byteLength)throw H(z);return t=D(r.buffer).bytes,n=_(t,r=o+r.byteOffset,r+n),e?n:K(n)}function s(t,n,r,e,o,i){var a,u,c,f,r=T(r),t=D(t);if(r+n>t.byteLength)throw H(z);for(a=D(t.buffer).bytes,u=r+t.byteOffset,c=e(+o),f=0;fp;)(g=h[p++])in q||w(q,g,W[g]);G.constructor=q}P&&M(Y)!==L&&P(Y,L),L=new b(new q(2)),v=y(Y.setInt8),L.setInt8(0,2147483648),L.setInt8(1,2147483649),!L.getInt8(0)&&L.getInt8(1)||S(Y,{setInt8:function(t,n){v(this,t,n<<24>>24)},setUint8:function(t,n){v(this,t,n<<24>>24)}},{unsafe:!0})}else G=(q=function(t){E(this,G);t=T(t);B(this,{bytes:$(V(t),0),byteLength:t}),m||(this.byteLength=t)}).prototype,Y=(b=function(t,n,r){var e;if(E(this,Y),E(t,G),e=D(t).byteLength,(n=I(n))<0||ee)throw H("Wrong length");B(this,{buffer:t,byteLength:r,byteOffset:n}),m||(this.buffer=t,this.byteLength=r,this.byteOffset=n)}).prototype,m&&(O(q,"byteLength"),O(b,"buffer"),O(b,"byteLength"),O(b,"byteOffset")),S(Y,{getInt8:function(t){return f(this,1,t)[0]<<24>>24},getUint8:function(t){return f(this,1,t)[0]},getInt16:function(t){t=f(this,2,t,1>16},getUint16:function(t){t=f(this,2,t,1>>0},getFloat32:function(t){return X(f(this,4,t,1>1,f=23===n?g(2,-24)-g(2,-77):0,s=t<0||0===t&&1/t<0?1:0,l=0;for((t=p(t))!=t||t===1/0?(o=t!=t?1:0,e=u):(e=v(d(t)/y),t*(r=g(2,-e))<1&&(e--,r*=2),2<=(t+=1<=e+c?f/r:f*g(2,1-c))*r&&(e++,r/=2),u<=e+c?(o=0,e=u):1<=e+c?(o=(t*r-1)*g(2,n),e+=c):(o=t*g(2,c-1)*g(2,n),e=0));8<=n;)i[l++]=255&o,o/=256,n-=8;for(e=e<>1,u=o-7,c=e-1,e=t[c--],f=127&e;for(e>>=7;0>=-u,u+=n;0n&&(r=f(r,0,n)),o?e+r:r+e)}};t.exports={start:e(!1),end:e(!0)}},function(t,n,r){var e=r(3),o=r(56),i=r(64),a=r(14),u=e.RangeError;t.exports=function(t){var n=i(a(this)),r="",e=o(t);if(e<0||e==1/0)throw u("Wrong number of repetitions");for(;0>>=1)&&(n+=n))1&e&&(r+=n);return r}},function(t,n,r){var e=r(2),o=r(6),i=r(36),a=r(16);e({target:"Date",proto:!0,forced:o(function(){return null!==new Date(NaN).toJSON()||1!==Date.prototype.toJSON.call({toISOString:function(){return 1}})})},{toJSON:function(t){var n=i(this),r=a(n,"number");return"number"!=typeof r||isFinite(r)?n.toISOString():null}})},function(t,n,r){var e=r(35),o=r(43),i=r(187),a=r(30)("toPrimitive"),r=Date.prototype;e(r,a)||o(r,a,i)},function(t,n,r){var e=r(3),o=r(42),i=r(29),a=e.TypeError;t.exports=function(t){if(o(this),"string"===t||"default"===t)t="string";else if("number"!==t)throw a("Incorrect hint");return i(this,t)}},function(t,n,r){var e=r(12),o=r(43),r=Date.prototype,i="Invalid Date",a=e(r.toString),u=e(r.getTime);String(new Date(NaN))!=i&&o(r,"toString",function(){var t=u(this);return t==t?a(this):i})},function(t,n,r){function a(t,n){for(var r=i(t,16);r.length>>=0)?31-e(o(t+.5)*i):32}})},function(t,n,r){var e=r(2),o=r(213),r=Math.cosh,i=Math.abs,a=Math.E;e({target:"Math",stat:!0,forced:!r||r(710)===1/0},{cosh:function(t){t=o(i(t)-1)+1;return(t+1/(t*a*a))*(a/2)}})},function(t,n){var r=Math.expm1,e=Math.exp;t.exports=!r||22025.465794806718u||n!=n?r*(1/0):r*n}},function(t,n,r){var e=r(2),r=Math.hypot,c=Math.abs,f=Math.sqrt;e({target:"Math",stat:!0,forced:!!r&&r(1/0,NaN)!==1/0},{hypot:function(t,n){for(var r,e,o=0,i=0,a=arguments.length,u=0;i>>16)*n+t*(r&o>>>16)<<16>>>0)}})},function(t,n,r){var r=r(2),e=Math.log,o=Math.LOG10E;r({target:"Math",stat:!0},{log10:function(t){return e(t)*o}})},function(t,n,r){r(2)({target:"Math",stat:!0},{log1p:r(206)})},function(t,n,r){var r=r(2),e=Math.log,o=Math.LN2;r({target:"Math",stat:!0},{log2:function(t){return e(t)/o}})},function(t,n,r){r(2)({target:"Math",stat:!0},{sign:r(210)})},function(t,n,r){var e=r(2),o=r(6),i=r(213),a=Math.abs,u=Math.exp,c=Math.E;e({target:"Math",stat:!0,forced:o(function(){return-2e-17!=Math.sinh(-2e-17)})},{sinh:function(t){return a(t=+t)<1?(i(t)-i(-t))/2:(u(t-1)-u(-t-1))*(c/2)}})},function(t,n,r){var e=r(2),o=r(213),i=Math.exp;e({target:"Math",stat:!0},{tanh:function(t){var n=o(t=+t),r=o(-t);return n==1/0?1:r==1/0?-1:(n-r)/(i(t)+i(-t))}})},function(t,n,r){r(78)(Math,"Math",!0)},function(t,n,r){var r=r(2),e=Math.ceil,o=Math.floor;r({target:"Math",stat:!0},{trunc:function(t){return(0i;i++)h(A,a=o[i])&&!h(e,a)&&b(e,a,x(A,a));l(c,"Number",(e.prototype=E).constructor=e)}},function(t,n,r){r=r(12);t.exports=r(1..valueOf)},function(t,n,r){var e=r(12),o=r(14),i=r(64),r=r(230),a=e("".replace),r="["+r+"]",u=RegExp("^"+r+r+"*"),c=RegExp(r+r+"*$"),r=function(n){return function(t){t=i(o(t));return 1&n&&(t=a(t,u,"")),t=2&n?a(t,c,""):t}};t.exports={start:r(1),end:r(2),trim:r(3)}},function(t,n){t.exports="\t\n\v\f\r                \u2028\u2029\ufeff"},function(t,n,r){r(2)({target:"Number",stat:!0},{EPSILON:Math.pow(2,-52)})},function(t,n,r){r(2)({target:"Number",stat:!0},{isFinite:r(233)})},function(t,n,r){var e=r(3).isFinite;t.exports=Number.isFinite||function(t){return"number"==typeof t&&e(t)}},function(t,n,r){r(2)({target:"Number",stat:!0},{isInteger:r(235)})},function(t,n,r){var e=r(17),o=Math.floor;t.exports=Number.isInteger||function(t){return!e(t)&&isFinite(t)&&o(t)===t}},function(t,n,r){r(2)({target:"Number",stat:!0},{isNaN:function(t){return t!=t}})},function(t,n,r){var e=r(2),o=r(235),i=Math.abs;e({target:"Number",stat:!0},{isSafeInteger:function(t){return o(t)&&i(t)<=9007199254740991}})},function(t,n,r){r(2)({target:"Number",stat:!0},{MAX_SAFE_INTEGER:9007199254740991})},function(t,n,r){r(2)({target:"Number",stat:!0},{MIN_SAFE_INTEGER:-9007199254740991})},function(t,n,r){var e=r(2),r=r(241);e({target:"Number",stat:!0,forced:Number.parseFloat!=r},{parseFloat:r})},function(t,n,r){var e=r(3),o=r(6),i=r(12),a=r(64),u=r(229).trim,r=r(230),c=i("".charAt),f=e.parseFloat,e=e.Symbol,s=e&&e.iterator,o=1/f(r+"-0")!=-1/0||s&&!o(function(){f(Object(s))});t.exports=o?function(t){var n=u(a(t)),t=f(n);return 0===t&&"-"==c(n,0)?-0:t}:f},function(t,n,r){var e=r(2),r=r(243);e({target:"Number",stat:!0,forced:Number.parseInt!=r},{parseInt:r})},function(t,n,r){var e=r(3),o=r(6),i=r(12),a=r(64),u=r(229).trim,r=r(230),c=e.parseInt,e=e.Symbol,f=e&&e.iterator,s=/^[+-]?0x/i,l=i(s.exec),o=8!==c(r+"08")||22!==c(r+"0x16")||f&&!o(function(){c(Object(f))});t.exports=o?function(t,n){t=u(a(t));return c(t,n>>>0||(l(s,t)?16:10))}:c},function(t,n,r){function c(t,n,r){return 0===n?r:n%2==1?c(t,n-1,r*t):c(t*t,n/2,r)}function f(t,n,r){for(var e=-1,o=r;++e<6;)t[e]=(o+=n*t[e])%1e7,o=u(o/1e7)}function s(t,n){for(var r=6,e=0;0<=--r;)t[r]=u((e+=t[r])/n),e=e%n*1e7}function l(t){for(var n,r=6,e="";0<=--r;)""===e&&0!==r&&0===t[r]||(n=v(t[r]),e=""===e?n:e+d("0",7-n.length)+n);return e}var e=r(2),o=r(3),i=r(12),h=r(56),p=r(228),a=r(184),r=r(6),g=o.RangeError,v=o.String,u=Math.floor,d=i(a),y=i("".slice),m=i(1..toFixed);e({target:"Number",proto:!0,forced:r(function(){return"0.000"!==m(8e-5,3)||"1"!==m(.9,0)||"1.25"!==m(1.255,2)||"1000000000000000128"!==m(0xde0b6b3a7640080,0)})||!r(function(){m({})})},{toFixed:function(t){var n,r,e=p(this),o=h(t),i=[0,0,0,0,0,0],a="",u="0";if(o<0||20u;)(r=o(e,n=i[u++]))!==Bt&&l(a,n,r);return a}})},function(t,n,r){var e=r(2),o=r(6),r=r(71).f;e({target:"Object",stat:!0,forced:o(function(){return!Object.getOwnPropertyNames(1)})},{getOwnPropertyNames:r})},function(t,n,r){var e=r(2),o=r(6),i=r(36),a=r(99),r=r(100);e({target:"Object",stat:!0,forced:o(function(){a(1)}),sham:!r},{getPrototypeOf:function(t){return a(i(t))}})},function(t,n,r){r(2)({target:"Object",stat:!0},{hasOwn:r(35)})},function(t,n,r){r(2)({target:"Object",stat:!0},{is:r(264)})},function(t,n){t.exports=Object.is||function(t,n){return t===n?0!==t||1/t==1/n:t!=t&&n!=n}},function(t,n,r){var e=r(2),r=r(200);e({target:"Object",stat:!0,forced:Object.isExtensible!==r},{isExtensible:r})},function(t,n,r){var e=r(2),o=r(6),i=r(17),a=r(13),u=r(201),c=Object.isFrozen;e({target:"Object",stat:!0,forced:o(function(){c(1)})||u},{isFrozen:function(t){return!i(t)||!(!u||"ArrayBuffer"!=a(t))||!!c&&c(t)}})},function(t,n,r){var e=r(2),o=r(6),i=r(17),a=r(13),u=r(201),c=Object.isSealed;e({target:"Object",stat:!0,forced:o(function(){c(1)})||u},{isSealed:function(t){return!i(t)||!(!u||"ArrayBuffer"!=a(t))||!!c&&c(t)}})},function(t,n,r){var e=r(2),o=r(36),i=r(69);e({target:"Object",stat:!0,forced:r(6)(function(){i(1)})},{keys:function(t){return i(o(t))}})},function(t,n,r){var e=r(2),o=r(5),i=r(250),a=r(36),u=r(15),c=r(99),f=r(4).f;o&&e({target:"Object",proto:!0,forced:i},{__lookupGetter__:function(t){var n,r=a(this),e=u(t);do{if(n=f(r,e))return n.get}while(r=c(r))}})},function(t,n,r){var e=r(2),o=r(5),i=r(250),a=r(36),u=r(15),c=r(99),f=r(4).f;o&&e({target:"Object",proto:!0,forced:i},{__lookupSetter__:function(t){var n,r=a(this),e=u(t);do{if(n=f(r,e))return n.set}while(r=c(r))}})},function(t,n,r){var e=r(2),o=r(17),i=r(199).onFreeze,a=r(202),r=r(6),u=Object.preventExtensions;e({target:"Object",stat:!0,forced:r(function(){u(1)}),sham:!a},{preventExtensions:function(t){return u&&o(t)?u(i(t)):t}})},function(t,n,r){var e=r(2),o=r(17),i=r(199).onFreeze,a=r(202),r=r(6),u=Object.seal;e({target:"Object",stat:!0,forced:r(function(){u(1)}),sham:!a},{seal:function(t){return u&&o(t)?u(i(t)):t}})},function(t,n,r){r(2)({target:"Object",stat:!0},{setPrototypeOf:r(101)})},function(t,n,r){var e=r(66),o=r(43),r=r(275);e||o(Object.prototype,"toString",r,{unsafe:!0})},function(t,n,r){var e=r(66),o=r(65);t.exports=e?{}.toString:function(){return"[object "+o(this)+"]"}},function(t,n,r){var e=r(2),o=r(255).values;e({target:"Object",stat:!0},{values:function(t){return o(t)}})},function(t,n,r){var e=r(2),r=r(241);e({global:!0,forced:parseFloat!=r},{parseFloat:r})},function(t,n,r){var e=r(2),r=r(243);e({global:!0,forced:parseInt!=r},{parseInt:r})},function(t,n,r){var e,o,i,a,u=r(2),c=r(32),v=r(3),f=r(20),d=r(7),s=r(280),l=r(43),h=r(167),p=r(101),g=r(78),y=r(160),m=r(27),x=r(18),b=r(17),w=r(168),S=r(44),A=r(105),E=r(134),I=r(174),R=r(281).set,T=r(283),O=r(286),M=r(288),P=r(287),j=r(289),N=r(45),k=r(61),_=r(30),U=r(290),L=r(149),F=r(24),C=_("species"),D="Promise",B=N.getterFor(D),z=N.set,W=N.getterFor(D),N=s&&s.prototype,q=s,G=N,Y=v.TypeError,V=v.document,H=v.process,$=P.f,K=$,J=!!(V&&V.createEvent&&v.dispatchEvent),X=x(v.PromiseRejectionEvent),Q="unhandledrejection",Z=!1,k=k(D,function(){var t,n=S(q),r=n!==String(q);return!r&&66===F||!(!c||G.finally)||!(51<=F&&/native code/.test(n))&&(t=function(t){t(function(){},function(){})},((n=new q(function(t){t(1)})).constructor={})[C]=t,!(Z=n.then(function(){})instanceof t)||!r&&U&&!X)}),E=k||!E(function(t){q.all(t).catch(function(){})}),tt=function(t){var n;return!(!b(t)||!x(n=t.then))&&n},nt=function(h,p){var g;h.notified||(h.notified=!0,g=h.reactions,T(function(){for(var t,n,r,e,o,i,a,u,c,f=h.value,s=1==h.state,l=0;g.length>l;){t=g[l++],n=s?t.ok:t.fail,r=t.resolve,e=t.reject,o=t.domain;try{n?(s||(2===h.rejection&&function(n){d(R,v,function(){var t=n.facade;L?H.emit("rejectionHandled",t):rt("rejectionhandled",t,n.value)})}(h),h.rejection=1),!0===n?i=f:(o&&o.enter(),i=n(f),o&&(o.exit(),u=!0)),i===t.promise?e(Y("Promise-chain cycle")):(a=tt(i))?d(a,i,r,e):r(i)):e(f)}catch(t){o&&!u&&o.exit(),e(t)}}h.reactions=[],h.notified=!1,p&&!h.rejection&&(c=h,d(R,v,function(){var t,n=c.facade,r=c.value;if(et(c)&&(t=j(function(){L?H.emit("unhandledRejection",r,n):rt(Q,n,r)}),c.rejection=L||et(c)?2:1,t.error))throw t.value}))}))},rt=function(t,n,r){var e,o;J?((e=V.createEvent("Event")).promise=n,e.reason=r,e.initEvent(t,!1,!0),v.dispatchEvent(e)):e={promise:n,reason:r},!X&&(o=v["on"+t])?o(e):t===Q&&M("Unhandled promise rejection",r)},et=function(t){return 1!==t.rejection&&!t.parent},ot=function(n,r,e){return function(t){n(r,t,e)}},it=function(t,n,r){t.done||(t.done=!0,(t=r?r:t).value=n,t.state=2,nt(t,!0))},at=function(r,t,n){if(!r.done){r.done=!0,n&&(r=n);try{if(r.facade===t)throw Y("Promise can't be resolved itself");var e=tt(t);e?T(function(){var n={done:!1};try{d(e,t,ot(at,n,r),ot(it,n,r))}catch(t){it(n,t,r)}}):(r.value=t,r.state=1,nt(r,!1))}catch(t){it({done:!1},t,r)}}};if(k&&(q=function(t){w(this,G),m(t),d(e,this);var n=B(this);try{t(ot(at,n),ot(it,n))}catch(t){it(n,t)}},(e=function(t){z(this,{type:D,done:!1,notified:!1,parent:!1,reactions:[],rejection:!1,state:0,value:Bt})}).prototype=h(G=q.prototype,{then:function(t,n){var r=W(this),e=r.reactions,o=$(I(this,q));return o.ok=!x(t)||t,o.fail=x(n)&&n,o.domain=L?H.domain:Bt,r.parent=!0,e[e.length]=o,0!=r.state&&nt(r,!1),o.promise},catch:function(t){return this.then(Bt,t)}}),o=function(){var t=new e,n=B(t);this.promise=t,this.resolve=ot(at,n),this.reject=ot(it,n)},P.f=$=function(t){return t===q||t===i?new o:K(t)},!c&&x(s)&&N!==Object.prototype)){a=N.then,Z||(l(N,"then",function(t,n){var r=this;return new q(function(t,n){d(a,r,t,n)}).then(t,n)},{unsafe:!0}),l(N,"catch",G.catch,{unsafe:!0}));try{delete N.constructor}catch(t){}p&&p(N,G)}u({global:!0,wrap:!0,forced:k},{Promise:q}),g(q,D,!1,!0),y(D),i=f(D),u({target:D,stat:!0,forced:k},{reject:function(t){var n=$(this);return d(n.reject,Bt,t),n.promise}}),u({target:D,stat:!0,forced:c||k},{resolve:function(t){return O(c&&this===i?q:this,t)}}),u({target:D,stat:!0,forced:E},{all:function(t){var u=this,n=$(u),c=n.resolve,f=n.reject,r=j(function(){var e=m(u.resolve),o=[],i=0,a=1;A(t,function(t){var n=i++,r=!1;a++,d(e,u,t).then(function(t){r||(r=!0,o[n]=t,--a||c(o))},f)}),--a||c(o)});return r.error&&f(r.value),n.promise},race:function(t){var r=this,e=$(r),o=e.reject,n=j(function(){var n=m(r.resolve);A(t,function(t){d(n,r,t).then(e.resolve,o)})});return n.error&&o(n.value),e.promise}})},function(t,n,r){r=r(3);t.exports=r.Promise},function(t,n,r){var e,o,i,a,u,c=r(3),f=r(62),s=r(80),l=r(18),h=r(35),p=r(6),g=r(70),v=r(74),d=r(39),y=r(282),m=r(149),x=c.setImmediate,b=c.clearImmediate,w=c.process,S=c.Dispatch,A=c.Function,E=c.MessageChannel,I=c.String,R=0,T={};try{e=c.location}catch(t){}i=function(t){var n;h(T,t)&&(n=T[t],delete T[t],n())},a=function(t){return function(){i(t)}},u=function(t){i(t.data)},r=function(t){c.postMessage(I(t),e.protocol+"//"+e.host)},x&&b||(x=function(t){var n=v(arguments,1);return T[++R]=function(){f(l(t)?t:A(t),Bt,n)},o(R),R},b=function(t){delete T[t]},m?o=function(t){w.nextTick(a(t))}:S&&S.now?o=function(t){S.now(a(t))}:E&&!y?(E=(y=new E).port2,y.port1.onmessage=u,o=s(E.postMessage,E)):c.addEventListener&&l(c.postMessage)&&!c.importScripts&&e&&"file:"!==e.protocol&&!p(r)?(o=r,c.addEventListener("message",u,!1)):o="onreadystatechange"in d("script")?function(t){g.appendChild(d("script")).onreadystatechange=function(){g.removeChild(this),i(t)}}:function(t){setTimeout(a(t),0)}),t.exports={set:x,clear:b}},function(t,n,r){r=r(25);t.exports=/(?:ipad|iphone|ipod).*applewebkit/i.test(r)},function(t,n,r){var e,o,i,a,u,c,f,s=r(3),l=r(80),h=r(4).f,p=r(281).set,g=r(282),v=r(284),d=r(285),y=r(149),m=s.MutationObserver||s.WebKitMutationObserver,x=s.document,b=s.process,r=s.Promise,h=h(s,"queueMicrotask"),h=h&&h.value;h||(e=function(){var t,n;for(y&&(t=b.domain)&&t.exit();o;){n=o.fn,o=o.next;try{n()}catch(t){throw o?a():i=Bt,t}}i=Bt,t&&t.enter()},a=g||y||d||!m||!x?!v&&r&&r.resolve?((v=r.resolve(Bt)).constructor=r,f=l(v.then,v),function(){f(e)}):y?function(){b.nextTick(e)}:(p=l(p,s),function(){p(e)}):(u=!0,c=x.createTextNode(""),new m(e).observe(c,{characterData:!0}),function(){c.data=u=!u})),t.exports=h||function(t){t={fn:t,next:Bt};i&&(i.next=t),o||(o=t,a()),i=t}},function(t,n,r){var e=r(25),r=r(3);t.exports=/ipad|iphone|ipod/i.test(e)&&r.Pebble!==Bt},function(t,n,r){r=r(25);t.exports=/web0s(?!.*chrome)/i.test(r)},function(t,n,r){var e=r(42),o=r(17),i=r(287);t.exports=function(t,n){return e(t),o(n)&&n.constructor===t?n:((0,(t=i.f(t)).resolve)(n),t.promise)}},function(t,n,r){function e(t){var r,e;this.promise=new t(function(t,n){if(r!==Bt||e!==Bt)throw TypeError("Bad Promise constructor");r=t,e=n}),this.resolve=o(r),this.reject=o(e)}var o=r(27);t.exports.f=function(t){return new e(t)}},function(t,n,r){var e=r(3);t.exports=function(t,n){var r=e.console;r&&r.error&&(1==arguments.length?r.error(t):r.error(t,n))}},function(t,n){t.exports=function(t){try{return{error:!1,value:t()}}catch(t){return{error:!0,value:t}}}},function(t,n){t.exports="object"==typeof window},function(t,n,r){var e=r(2),f=r(7),s=r(27),o=r(287),i=r(289),l=r(105);e({target:"Promise",stat:!0},{allSettled:function(t){var u=this,n=o.f(u),c=n.resolve,r=n.reject,e=i(function(){var e=s(u.resolve),o=[],i=0,a=1;l(t,function(t){var n=i++,r=!1;a++,f(e,u,t).then(function(t){r||(r=!0,o[n]={status:"fulfilled",value:t},--a||c(o))},function(t){r||(r=!0,o[n]={status:"rejected",reason:t},--a||c(o))})}),--a||c(o)});return e.error&&r(e.value),n.promise}})},function(t,n,r){var e=r(2),h=r(27),o=r(20),p=r(7),i=r(287),a=r(289),g=r(105),v="No one promise resolved";e({target:"Promise",stat:!0},{any:function(t){var c=this,f=o("AggregateError"),n=i.f(c),s=n.resolve,l=n.reject,r=a(function(){var e=h(c.resolve),o=[],i=0,a=1,u=!1;g(t,function(t){var n=i++,r=!1;a++,p(e,c,t).then(function(t){r||u||(u=!0,s(t))},function(t){r||u||(r=!0,o[n]=t,--a||l(new f(o,v)))})}),--a||l(new f(o,v))});return r.error&&l(r.value),n.promise}})},function(t,n,r){var e=r(2),o=r(32),i=r(280),a=r(6),u=r(20),c=r(18),f=r(174),s=r(286),r=r(43);e({target:"Promise",proto:!0,real:!0,forced:!!i&&a(function(){i.prototype.finally.call({then:function(){}},function(){})})},{finally:function(n){var r=f(this,u("Promise")),t=c(n);return this.then(t?function(t){return s(r,n()).then(function(){return t})}:n,t?function(t){return s(r,n()).then(function(){throw t})}:n)}}),!o&&c(i)&&(o=u("Promise").prototype.finally,i.prototype.finally!==o&&r(i.prototype,"finally",o,{unsafe:!0}))},function(t,n,r){var e=r(2),o=r(62),i=r(27),a=r(42);e({target:"Reflect",stat:!0,forced:!r(6)(function(){Reflect.apply(function(){})})},{apply:function(t,n,r){return o(i(t),n,a(r))}})},function(t,n,r){var e=r(2),o=r(20),i=r(62),a=r(191),u=r(175),c=r(42),f=r(17),s=r(67),r=r(6),l=o("Reflect","construct"),h=Object.prototype,p=[].push,g=r(function(){function t(){}return!(l(function(){},[],t)instanceof t)}),v=!r(function(){l(function(){})}),r=g||v;e({target:"Reflect",stat:!0,forced:r,sham:r},{construct:function(t,n){var r,e;if(u(t),c(n),e=arguments.length<3?t:u(arguments[2]),v&&!g)return l(t,n,e);if(t!=e)return r=s(f(e=e.prototype)?e:h),e=i(t,r,n),f(e)?e:r;switch(n.length){case 0:return new t;case 1:return new t(n[0]);case 2:return new t(n[0],n[1]);case 3:return new t(n[0],n[1],n[2]);case 4:return new t(n[0],n[1],n[2],n[3])}return i(p,r=[null],n),new(i(a,t,r))}})},function(t,n,r){var e=r(2),o=r(5),i=r(42),a=r(15),u=r(41);e({target:"Reflect",stat:!0,forced:r(6)(function(){Reflect.defineProperty(u.f({},1,{value:1}),1,{value:2})}),sham:!o},{defineProperty:function(t,n,r){i(t);n=a(n);i(r);try{return u.f(t,n,r),!0}catch(t){return!1}}})},function(t,n,r){var e=r(2),o=r(42),i=r(4).f;e({target:"Reflect",stat:!0},{deleteProperty:function(t,n){var r=i(o(t),n);return!(r&&!r.configurable)&&delete t[n]}})},function(t,n,r){var e=r(2),i=r(7),a=r(17),u=r(42),c=r(299),f=r(4),s=r(99);e({target:"Reflect",stat:!0},{get:function t(n,r){var e,o=arguments.length<3?n:arguments[2];return u(n)===o?n[r]:(e=f.f(n,r))?c(e)?e.value:e.get===Bt?Bt:i(e.get,o):a(n=s(n))?t(n,r,o):Bt}})},function(t,n,r){var e=r(35);t.exports=function(t){return t!==Bt&&(e(t,"value")||e(t,"writable"))}},function(t,n,r){var e=r(2),o=r(5),i=r(42),a=r(4);e({target:"Reflect",stat:!0,sham:!o},{getOwnPropertyDescriptor:function(t,n){return a.f(i(t),n)}})},function(t,n,r){var e=r(2),o=r(42),i=r(99);e({target:"Reflect",stat:!0,sham:!r(100)},{getPrototypeOf:function(t){return i(o(t))}})},function(t,n,r){r(2)({target:"Reflect",stat:!0},{has:function(t,n){return n in t}})},function(t,n,r){var e=r(2),o=r(42),i=r(200);e({target:"Reflect",stat:!0},{isExtensible:function(t){return o(t),i(t)}})},function(t,n,r){r(2)({target:"Reflect",stat:!0},{ownKeys:r(51)})},function(t,n,r){var e=r(2),o=r(20),i=r(42);e({target:"Reflect",stat:!0,sham:!r(202)},{preventExtensions:function(t){i(t);try{var n=o("Object","preventExtensions");return n&&n(t),!0}catch(t){return!1}}})},function(t,n,r){var e=r(2),u=r(7),c=r(42),f=r(17),s=r(299),o=r(6),l=r(41),h=r(4),p=r(99),g=r(9);e({target:"Reflect",stat:!0,forced:o(function(){function t(){}var n=l.f(new t,"a",{configurable:!0});return!1!==Reflect.set(t.prototype,"a",1,n)})},{set:function t(n,r,e){var o,i=arguments.length<4?n:arguments[3],a=h.f(c(n),r);if(!a){if(f(o=p(n)))return t(o,r,e,i);a=g(0)}if(s(a)){if(!1===a.writable||!f(i))return!1;if(o=h.f(i,r)){if(o.get||o.set||!1===o.writable)return!1;o.value=e,l.f(i,r,o)}else l.f(i,r,g(0,e))}else{if((a=a.set)===Bt)return!1;u(a,i,e)}return!0}})},function(t,n,r){var e=r(2),o=r(42),i=r(102),a=r(101);a&&e({target:"Reflect",stat:!0},{setPrototypeOf:function(t,n){o(t),i(n);try{return a(t,n),!0}catch(t){return!1}}})},function(t,n,r){var e=r(2),o=r(3),r=r(78);e({global:!0},{Reflect:{}}),r(o.Reflect,"Reflect",!0)},function(t,n,r){var f,e,o,i,a=r(5),u=r(3),c=r(12),s=r(61),l=r(203),h=r(40),p=r(41).f,g=r(52).f,v=r(21),d=r(310),y=r(64),m=r(311),x=r(312),b=r(43),w=r(6),S=r(35),A=r(45).enforce,E=r(160),I=r(30),R=r(313),T=r(314),O=I("match"),M=u.RegExp,P=M.prototype,j=u.SyntaxError,N=c(m),k=c(P.exec),_=c("".charAt),U=c("".replace),L=c("".indexOf),F=c("".slice),C=/^\?<[^\s\d!#%&*+<=>@^][^\s!#%&*+<=>@^]*>/,D=/a/g,B=/a/g,c=new M(D)!==D,z=x.MISSED_STICKY,W=x.UNSUPPORTED_Y;if(s("RegExp",a&&(!c||z||R||T||w(function(){return B[O]=!1,M(D)!=D||M(B)==B||"/a/i"!=M(D,"i")})))){for(f=function(t,n){var r,e,o=v(P,this),i=d(t),a=n===Bt,u=[],c=t;if(!o&&i&&a&&t.constructor===f)return t;if((i||v(P,t))&&(t=t.source,a&&(n="flags"in c?c.flags:N(c))),t=t===Bt?"":y(t),n=n===Bt?"":y(n),c=t,i=n=R&&"dotAll"in D&&(r=!!n&&-1"===n&&c:if(""===s||S(a,s))throw new j("Invalid capture group name");a[s]=!0,c=!(i[i.length]=[s,f]),s="";continue}c?s+=n:o+=n}return[o,i]}(t))[0],u=a[1]),n=l(M(t,n),o?this:P,f),(r||e||u.length)&&(o=A(n),r&&(o.dotAll=!0,o.raw=f(function(t){for(var n,r=t.length,e=0,o="",i=!1;e<=r;e++)"\\"!==(n=_(t,e))?i||"."!==n?("["===n?i=!0:"]"===n&&(i=!1),o+=n):o+="[\\s\\S]":o+=n+_(t,++e);return o}(t),i)),e&&(o.sticky=!0),u.length&&(o.groups=u)),t!==c)try{h(n,"source",""===c?"(?:)":c)}catch(t){}return n},e=function(n){n in f||p(f,n,{configurable:!0,get:function(){return M[n]},set:function(t){M[n]=t}})},o=g(M),i=0;o.length>i;)e(o[i++]);(P.constructor=f).prototype=P,b(u,"RegExp",f)}E("RegExp")},function(t,n,r){var e=r(17),o=r(13),i=r(30)("match");t.exports=function(t){var n;return e(t)&&((n=t[i])!==Bt?!!n:"RegExp"==o(t))}},function(t,n,r){var e=r(42);t.exports=function(){var t=e(this),n="";return t.global&&(n+="g"),t.ignoreCase&&(n+="i"),t.multiline&&(n+="m"),t.dotAll&&(n+="s"),t.unicode&&(n+="u"),t.sticky&&(n+="y"),n}},function(t,n,r){var e=r(6),o=r(3).RegExp,i=e(function(){var t=o("a","y");return t.lastIndex=2,null!=t.exec("abcd")}),r=i||e(function(){return!o("a","y").sticky}),e=i||e(function(){var t=o("^r","gy");return t.lastIndex=2,null!=t.exec("str")});t.exports={BROKEN_CARET:e,MISSED_STICKY:r,UNSUPPORTED_Y:i}},function(t,n,r){var e=r(6),o=r(3).RegExp;t.exports=e(function(){var t=o(".","s");return!(t.dotAll&&t.exec("\n")&&"s"===t.flags)})},function(t,n,r){var e=r(6),o=r(3).RegExp;t.exports=e(function(){var t=o("(?b)","g");return"b"!==t.exec("b").groups.a||"bc"!=="b".replace(t,"$c")})},function(t,n,r){var e=r(3),o=r(5),i=r(313),a=r(13),u=r(41).f,c=r(45).get,f=RegExp.prototype,s=e.TypeError;o&&i&&u(f,"dotAll",{configurable:!0,get:function(){if(this===f)return Bt;if("RegExp"===a(this))return!!c(this).dotAll;throw s("Incompatible receiver, RegExp required")}})},function(t,n,r){var e=r(2),r=r(317);e({target:"RegExp",proto:!0,forced:/./.exec!==r},{exec:r})},function(t,n,r){var g=r(7),e=r(12),v=r(64),d=r(311),o=r(312),i=r(31),y=r(67),m=r(45).get,a=r(313),r=r(314),x=i("native-string-replace","".replace),b=/t/.exec,w=b,S=e("".charAt),A=e("".indexOf),E=e("".replace),I=e("".slice),R=(i=/b*/g,g(b,e=/a/,"a"),g(b,i,"a"),0!==e.lastIndex||0!==i.lastIndex),T=o.BROKEN_CARET,O=/()??/.exec("")[1]!==Bt;(R||O||T||a||r)&&(w=function(t){var n,r,e,o,i,a,u,c,f,s=this,l=m(s),h=v(t),p=l.raw;if(p)return p.lastIndex=s.lastIndex,f=g(w,p,h),s.lastIndex=p.lastIndex,f;if(u=l.groups,c=T&&s.sticky,t=g(d,s),p=s.source,f=0,l=h,c&&(t=E(t,"y",""),-1===A(t,"g")&&(t+="g"),l=I(h,s.lastIndex),0>10),n%1024+56320)}return f(r,"")}})},function(t,n,r){var e=r(2),o=r(12),i=r(327),a=r(14),u=r(64),r=r(328),c=o("".indexOf);e({target:"String",proto:!0,forced:!r("includes")},{includes:function(t){return!!~c(u(a(this)),u(i(t)),1=n.length?{value:Bt,done:!0}:(r=e(n,r),t.index+=r.length,{value:r,done:!1})})},function(t,n,r){var o=r(7),e=r(333),f=r(42),s=r(58),l=r(64),i=r(14),a=r(26),h=r(334),p=r(335);e("match",function(e,u,c){return[function(t){var n=i(this),r=t==Bt?Bt:a(t,e);return r?o(r,t,n):new RegExp(t)[e](l(n))},function(t){var n,r,e,o,i=f(this),a=l(t),t=c(u,i,a);if(t.done)return t.value;if(!i.global)return p(i,a);for(n=i.unicode,r=[],e=i.lastIndex=0;null!==(o=p(i,a));)o=l(o[0]),""===(r[e]=o)&&(i.lastIndex=h(a,s(i.lastIndex),n)),e++;return 0===e?null:r}]})},function(t,n,r){var c,f,s,l,h,p,g,v;r(316),c=r(12),f=r(43),s=r(317),l=r(6),h=r(30),p=r(40),g=h("species"),v=RegExp.prototype,t.exports=function(r,t,n,e){var a,o=h(r),u=!l(function(){var t={};return t[o]=function(){return 7},7!=""[r](t)}),i=u&&!l(function(){var t=!1,n=/a/;return"split"===r&&((n={}).constructor={},n.constructor[g]=function(){return n},n.flags="",n[o]=/./[o]),n.exec=function(){return t=!0,null},n[o](""),!t});u&&i&&!n||(a=c(/./[o]),t=t(o,""[r],function(t,n,r,e,o){var i=c(t),t=n.exec;return t===s||t===v.exec?u&&!o?{done:!0,value:a(n,r,e)}:{done:!0,value:i(r,n,e)}:{done:!1}}),f(String.prototype,r,t[0]),f(v,o,t[1])),e&&p(v[o],"sham",!0)}},function(t,n,r){var e=r(325).charAt;t.exports=function(t,n,r){return n+(r?e(t,n).length:1)}},function(t,n,r){var e=r(3),o=r(7),i=r(42),a=r(18),u=r(13),c=r(317),f=e.TypeError;t.exports=function(t,n){var r=t.exec;if(a(r))return null!==(r=o(r,t,n))&&i(r),r;if("RegExp"===u(t))return o(c,t,n);throw f("RegExp#exec called on incompatible receiver")}},function(t,n,r){function e(t){var n=h(this),r=l(t),e=w(n,RegExp),t=(o=(o=n.flags)===Bt&&g(P,n)&&!("flags"in P)?N(n):o)===Bt?"":l(o),o=new e(e===RegExp?n.source:n,t),e=!!~k(t,"g"),t=!!~k(t,"u");return o.lastIndex=s(n.lastIndex),new L(o,r,e,t)}var o=r(2),i=r(3),a=r(7),u=r(12),c=r(140),f=r(14),s=r(58),l=r(64),h=r(42),p=r(13),g=r(21),v=r(310),d=r(311),y=r(26),m=r(43),x=r(6),b=r(30),w=r(174),S=r(334),A=r(335),E=r(45),I=r(32),R=b("matchAll"),T="RegExp String Iterator",O=E.set,M=E.getterFor(T),P=RegExp.prototype,j=i.TypeError,N=u(d),k=u("".indexOf),_=u("".matchAll),U=!!_&&!x(function(){_("a",/./)}),L=c(function(t,n,r,e){O(this,{type:T,regexp:t,string:n,global:r,unicode:e,done:!1})},"RegExp String",function(){var t,n,r,e=M(this);return e.done?{value:Bt,done:!0}:null===(r=A(t=e.regexp,n=e.string))?{value:Bt,done:e.done=!0}:(e.global?""===l(r[0])&&(t.lastIndex=S(n,s(t.lastIndex),e.unicode)):e.done=!0,{value:r,done:!1})});o({target:"String",proto:!0,forced:U},{matchAll:function(t){var n,r=f(this);if(null!=t){if(v(t)&&(n=l(f("flags"in P?t.flags:N(t))),!~k(n,"g")))throw j("`.matchAll` does not allow non-global regexes");if(U)return _(r,t);if(n=(n=y(t,R))===Bt&&I&&"RegExp"==p(t)?e:n)return a(n,t,r)}else if(U)return _(r,t);return r=l(r),t=new RegExp(t,"g"),I?a(e,t,r):t[R](r)}}),I||R in P||m(P,R,e)},function(t,n,r){var e=r(2),o=r(183).end;e({target:"String",proto:!0,forced:r(338)},{padEnd:function(t){return o(this,t,1")})||!e||s)},function(t,n,r){var e=r(12),o=r(36),h=Math.floor,p=e("".charAt),g=e("".replace),v=e("".slice),d=/\$([$&'`]|\d{1,2}|<[^>]*>)/g,y=/\$([$&'`]|\d{1,2})/g;t.exports=function(i,a,u,c,f,t){var s=u+i.length,l=c.length,n=y;return f!==Bt&&(f=o(f),n=d),g(t,n,function(t,n){var r,e,o;switch(p(n,0)){case"$":return"$";case"&":return i;case"`":return v(a,0,u);case"'":return v(a,s);case"<":r=f[v(n,1,-1)];break;default:if(0==(e=+n))return t;if(lt.length?-1:""===n?r:T(t,n,r)}var e=r(2),o=r(3),v=r(7),i=r(12),d=r(14),y=r(18),m=r(310),x=r(64),b=r(26),a=r(311),w=r(343),u=r(30),S=r(32),A=u("replace"),E=RegExp.prototype,I=o.TypeError,R=i(a),T=i("".indexOf),O=i("".replace),M=i("".slice),P=Math.max;e({target:"String",proto:!0},{replaceAll:function(t,n){var r,e,o,i,a,u,c,f,s=d(this),l=0,h=0,p="";if(null!=t){if((r=m(t))&&(e=x(d("flags"in E?t.flags:R(t))),!~T(e,"g")))throw I("`.replaceAll` does not allow non-global regexes");if(e=b(t,A))return v(e,t,s,n);if(S&&r)return O(x(s),t,n)}for(o=x(s),i=x(t),(a=y(n))||(n=x(n)),c=P(1,u=i.length),l=g(o,i,0);-1!==l;)f=a?x(n(i,l,o)):w(i,o,l,[],Bt,n),p+=M(o,h,l)+f,h=l+u,l=g(o,i,l+c);return h>>0;if(0==f)return[];if(t===Bt)return[c];if(!h(t))return l(p,c,t,f);for(r=[],e=0,o=new RegExp(t.source,(t.ignoreCase?"i":"")+(t.multiline?"m":"")+(t.unicode?"u":"")+(t.sticky?"y":"")+"g");(i=l(E,o,c))&&!((a=o.lastIndex)>e&&(M(r,P(c,e,i.index)),1>>0))return[];if(0===h.length)return null===A(e,h)?[h]:[];for(a=i=0,u=[];a=(r=s(t+n,o))?"":c(e,t,r)}})},function(t,n,r){var e=r(2),o=r(229).trim;e({target:"String",proto:!0,forced:r(350)("trim")},{trim:function(){return o(this)}})},function(t,n,r){var e=r(49).PROPER,o=r(6),i=r(230);t.exports=function(t){return o(function(){return!!i[t]()||"​…᠎"!=="​…᠎"[t]()||e&&i[t].name!==t})}},function(t,n,r){var e=r(2),o=r(229).end,i=r(350)("trimEnd"),r=i?function(){return o(this)}:"".trimEnd;e({target:"String",proto:!0,name:"trimEnd",forced:i},{trimEnd:r,trimRight:r})},function(t,n,r){var e=r(2),o=r(229).start,i=r(350)("trimStart"),r=i?function(){return o(this)}:"".trimStart;e({target:"String",proto:!0,name:"trimStart",forced:i},{trimStart:r,trimLeft:r})},function(t,n,r){var e=r(2),o=r(354);e({target:"String",proto:!0,forced:r(355)("anchor")},{anchor:function(t){return o(this,"a","name",t)}})},function(t,n,r){var e=r(12),i=r(14),a=r(64),u=/"/g,c=e("".replace);t.exports=function(t,n,r,e){var o=a(i(t)),t="<"+n;return""!==r&&(t+=" "+r+'="'+c(a(e),u,""")+'"'),t+">"+o+""}},function(t,n,r){var e=r(6);t.exports=function(n){return e(function(){var t=""[n]('"');return t!==t.toLowerCase()||3r)throw z(Z);c=u/s}else c=w(n),a=new W(u=c*s);for(F(t,{buffer:a,byteOffset:i,byteLength:u,length:c,view:new G(a)});or)throw f("Wrong length");for(;i>>=0,r>>>=0;return(n>>>0)+(e>>>0)+((t&r|(t|r)&~(t+r>>>0))>>>31)|0}})},function(t,n,r){r(2)({target:"Math",stat:!0},{imulh:function(t,n){var r=+t,e=+n,t=65535&r,n=65535&e,r=r>>16,e=e>>16,n=(r*n>>>0)+(t*n>>>16);return r*e+(n>>16)+((t*e>>>0)+(65535&n)>>16)}})},function(t,n,r){r(2)({target:"Math",stat:!0},{isubh:function(t,n,r,e){t>>>=0,r>>>=0;return(n>>>0)-(e>>>0)-((~t&r|~(t^r)&t-r>>>0)>>>31)|0}})},function(t,n,r){r(2)({target:"Math",stat:!0},{RAD_PER_DEG:180/Math.PI})},function(t,n,r){var r=r(2),e=Math.PI/180;r({target:"Math",stat:!0},{radians:function(t){return t*e}})},function(t,n,r){r(2)({target:"Math",stat:!0},{scale:r(503)})},function(t,n,r){var e=r(2),o=r(3),i=r(42),a=r(233),u=r(140),r=r(45),c="Seeded Random Generator",f=r.set,s=r.getterFor(c),l=o.TypeError,h=u(function(t){f(this,{type:c,seed:t%2147483647})},"Seeded Random",function(){var t=s(this);return{value:(1073741823&(t.seed=(1103515245*t.seed+12345)%2147483647))/1073741823,done:!1}});e({target:"Math",stat:!0,forced:!0},{seededPRNG:function(t){t=i(t).seed;if(!a(t))throw l('Math.seededPRNG() argument should have a "seed" field with a finite value.');return new h(t)}})},function(t,n,r){r(2)({target:"Math",stat:!0},{signbit:function(t){return(t=+t)==t&&0==t?1/t==-1/0:t<0}})},function(t,n,r){r(2)({target:"Math",stat:!0},{umulh:function(t,n){var r=+t,e=+n,t=65535&r,n=65535&e,r=r>>>16,e=e>>>16,n=(r*n>>>0)+(t*n>>>16);return r*e+(n>>>16)+((t*e>>>0)+(65535&n)>>>16)}})},function(t,n,r){var e=r(2),o=r(3),i=r(12),a=r(56),u=r(243),c="Invalid number representation",f=o.RangeError,s=o.SyntaxError,l=o.TypeError,h=/^[\da-z]+$/,p=i("".charAt),g=i(h.exec),v=i(1..toString),d=i("".slice);e({target:"Number",stat:!0},{fromString:function(t,n){var r,e=1;if("string"!=typeof t)throw l(c);if(!t.length)throw s(c);if("-"==p(t,0)&&(e=-1,!(t=d(t,1)).length))throw s(c);if((n=n===Bt?10:a(n))<2||36=e.length)return r.object=r.keys=null,{value:Bt,done:!0};if(t=e[r.index++],i(n=r.object,t)){switch(r.mode){case"keys":return{value:t,done:!1};case"values":return{value:n[t],done:!1}}return{value:[t,n[t]],done:!1}}}})},function(t,n,r){var e=r(2),o=r(517);e({target:"Object",stat:!0},{iterateKeys:function(t){return new o(t,"keys")}})},function(t,n,r){var e=r(2),o=r(517);e({target:"Object",stat:!0},{iterateValues:function(t){return new o(t,"values")}})},function(t,n,r){function a(t){this.observer=d(t),this.cleanup=Bt,this.subscriptionObserver=Bt}var e,u,i,o,c=r(2),f=r(3),s=r(7),l=r(5),h=r(160),p=r(27),g=r(18),v=r(83),d=r(42),y=r(17),m=r(168),x=r(41).f,b=r(43),w=r(167),S=r(108),A=r(26),E=r(105),I=r(288),R=r(30),T=r(45),O=R("observable"),M="Observable",r="Subscription",P="SubscriptionObserver",R=T.getterFor,j=T.set,N=R(M),k=R(r),_=R(P),U=f.Array;a.prototype={type:r,clean:function(){var t=this.cleanup;if(t){this.cleanup=Bt;try{t()}catch(t){I(t)}}},close:function(){var t;l||(t=this.subscriptionObserver,this.facade.closed=!0,t&&(t.closed=!0)),this.observer=Bt},isClosed:function(){return this.observer===Bt}},(e=function(n,t){var r,e,o,i=j(this,new a(n));l||(this.closed=!1);try{(r=A(n,"start"))&&s(r,n,this)}catch(t){I(t)}if(!i.isClosed()){n=i.subscriptionObserver=new u(i);try{e=t(n),null!=(o=e)&&(i.cleanup=g(e.unsubscribe)?function(){o.unsubscribe()}:p(e))}catch(t){return void n.error(t)}i.isClosed()&&i.clean()}}).prototype=w({},{unsubscribe:function(){var t=k(this);t.isClosed()||(t.close(),t.clean())}}),l&&x(e.prototype,"closed",{configurable:!0,get:function(){return k(this).isClosed()}}),(u=function(t){j(this,{type:P,subscriptionState:t}),l||(this.closed=!1)}).prototype=w({},{next:function(t){var n,r=_(this).subscriptionState;if(!r.isClosed()){r=r.observer;try{(n=A(r,"next"))&&s(n,r,t)}catch(t){I(t)}}},error:function(t){var n,r,e=_(this).subscriptionState;if(!e.isClosed()){n=e.observer,e.close();try{(r=A(n,"error"))?s(r,n,t):I(t)}catch(t){I(t)}e.clean()}},complete:function(){var t,n,r=_(this).subscriptionState;if(!r.isClosed()){t=r.observer,r.close();try{(n=A(t,"complete"))&&s(n,t)}catch(t){I(t)}r.clean()}}}),l&&x(u.prototype,"closed",{configurable:!0,get:function(){return _(this).subscriptionState.isClosed()}}),w(o=(i=function(t){m(this,o),j(this,{type:M,subscriber:p(t)})}).prototype,{subscribe:function(t){var n=arguments.length;return new e(g(t)?{next:t,error:1=n.length?{value:Bt,done:!0}:(n=f(n,r),t.index+=n.length,{value:{codePoint:c(n,0),position:r},done:!1})});e({target:"String",proto:!0},{codePoints:function(){return new p(a(i(this)))}})},function(t,n,r){r(336)},function(t,n,r){r(344)},function(t,n,r){r(76)("asyncDispose")},function(t,n,r){r(76)("dispose")},function(t,n,r){r(76)("matcher")},function(t,n,r){r(76)("metadata")},function(t,n,r){r(76)("observable")},function(t,n,r){r(76)("patternMatch")},function(t,n,r){r(76)("replaceAll")},function(t,n,r){var i=r(20),a=r(175),u=r(417),e=r(370),o=r(172),c=r(388),f=o.aTypedArrayConstructor;(0,o.exportTypedArrayStaticMethod)("fromAsync",function(n){var r=this,t=arguments.length,e=1?@[\\\]^|]/,J=/[\0\t\n\r #/:<>?@[\\\]^|]/,X=/^[\u0000-\u0020]+|[\u0000-\u0020]+$/g,Q=/[\t\n\r]/g,tt=function(t){var n,r,e,o,i,a,u,c=U(t,".");if(c.length&&""==c[c.length-1]&&c.length--,4<(n=c.length))return t;for(r=[],e=0;e=R(256,5-n))return null}else if(255":1,"`":1}),at=Ct({},it,{"#":1,"?":1,"{":1,"}":1}),ut=Ct({},at,{"/":1,":":1,";":1,"=":1,"@":1,"[":1,"\\":1,"]":1,"^":1,"|":1}),ct=function(t,n){var r=l(t,0);return 32=h&&nb((y-p)/(i=e+1)))throw x(m);for(p+=(o-h)*i,h=o,v=0;vy)throw x(m);if(n==h){for(a=p,u=36;!(a<(f=u<=g?1:g+26<=u?26:u-g));)E(s,w(d(f+(c=a-f)%(f=36-f)))),a=b(c/f),u+=36;E(s,w(d(a))),g=function(t,n,r){var e=0;for(t=r?b(t/700):t>>1,t+=b(t/n);455n.key?1:-1}),t.updateURL()},forEach:function(t){for(var n,r=O(this).entries,e=g(t,1o;)a(e,r=n[o++])&&(~c(i,r)||s(i,r));return i}},function(t,n,r){var c=r(10),f=r(55),s=r(57),r=function(u){return function(t,n,r){var e,o=c(t),i=s(o),a=f(r,i);if(u&&n!=n){for(;a"+t+"<\/script>"},g=function(){var t,n;try{i=new ActiveXObject("htmlfile")}catch(t){}for(g="undefined"==typeof document||document.domain&&i?o(i):((t=l("iframe")).style.display="none",s.appendChild(t),t.src=String("javascript:"),(t=t.contentWindow.document).open(),t.write(p("document.F=Object")),t.close(),t.F),n=c.length;n--;)delete g.prototype[c[n]];return g()};f[h]=!0,t.exports=Object.create||function(t,n){var r;return null!==t?(e.prototype=a(t),r=new e,e.prototype=null,r[h]=t):r=g(),n===Bt?r:u(r,n)}},function(t,n,r){var e=r(5),u=r(41),c=r(42),f=r(10),s=r(69);t.exports=e?Object.defineProperties:function(t,n){var r,e,o,i,a;for(c(t),r=f(n),o=(e=s(n)).length,i=0;id)throw m(y);for(n=0;n=n.length?{value:t.target=Bt,done:!0}:"keys"==r?{value:e,done:!1}:"values"==r?{value:n[e],done:!1}:{value:[e,n[e]],done:!1}},"values"),i.Arguments=i.Array,o("keys"),o("values"),o("entries")},function(t,n,r){function d(){return this}var y=r(2),m=r(7),x=r(32),e=r(49),b=r(18),w=r(140),S=r(99),A=r(101),E=r(78),I=r(40),R=r(43),o=r(30),T=r(107),r=r(141),O=e.PROPER,M=e.CONFIGURABLE,P=r.IteratorPrototype,j=r.BUGGY_SAFARI_ITERATORS,N=o("iterator"),k="values",_="entries";t.exports=function(t,n,r,e,o,i,a){var u,c,f,s,l,h,p,g,v;if(w(r,n,e),c=n+" Iterator",f=!(u=function(t){if(t===o&&h)return h;if(!j&&t in s)return s[t];switch(t){case"keys":case k:case _:return function(){return new r(this,t)}}return function(){return new r(this)}}),l=(s=t.prototype)[N]||s["@@iterator"]||o&&s[o],h=!j&&l||u(o),(e="Array"==n&&s.entries||l)&&(p=S(e.call(new t)))!==Object.prototype&&p.next&&(x||S(p)===P||(A?A(p,P):b(p[N])||R(p,N,d)),E(p,c,!0,!0),x&&(T[c]=d)),O&&o==k&&l&&l.name!==k&&(!x&&M?I(s,"name",k):(f=!0,h=function(){return m(l,this)})),o)if(g={values:u(k),keys:i?h:u("keys"),entries:u(_)},a)for(v in g)!j&&!f&&v in s||R(s,v,g[v]);else y({target:n,proto:!0,forced:j||f},g);return x&&!a||s[N]===h||R(s,N,h,{name:o}),T[n]=h,g}},function(t,n,r){function o(){return this}var i=r(141).IteratorPrototype,a=r(67),u=r(9),c=r(78),f=r(107);t.exports=function(t,n,r,e){n+=" Iterator";return t.prototype=a(i,{next:u(+!e,r)}),c(t,n,!1,!0),f[n]=o,t}},function(t,n,r){var e,o=r(6),i=r(18),a=r(67),u=r(99),c=r(43),f=r(30),s=r(32),l=f("iterator"),r=!1;[].keys&&("next"in(f=[].keys())?(f=u(u(f)))!==Object.prototype&&(e=f):r=!0),e==Bt||o(function(){var t={};return e[l].call(t)!==t})?e={}:s&&(e=a(e)),i(e[l])||c(e,l,function(){return this}),t.exports={IteratorPrototype:e,BUGGY_SAFARI_ITERATORS:r}},function(t,n,r){var e=r(2),o=r(12),i=r(11),a=r(10),r=r(120),u=o([].join),i=i!=Object,r=r("join",",");e({target:"Array",proto:!0,forced:i||!r},{join:function(t){return u(a(this),t===Bt?",":t)}})},function(t,n,r){var e=r(2),r=r(144);e({target:"Array",proto:!0,forced:r!==[].lastIndexOf},{lastIndexOf:r})},function(t,n,r){var o=r(62),i=r(10),a=r(56),u=r(57),r=r(120),c=Math.min,f=[].lastIndexOf,s=!!f&&1/[1].lastIndexOf(1,-0)<0,r=r("lastIndexOf");t.exports=s||!r?function(t){var n,r,e;if(s)return o(f,this,arguments)||0;for(n=i(this),e=(r=u(n))-1,(e=1s(n)?1:-1})),o=r.length,i=0;i0;)t[e]=t[--e];e!==i++&&(t[e]=r)}return t}(t,n):function(t,n,r,e){for(var o=n.length,i=r.length,a=0,u=0;a>8&255]}function i(t){return[255&t,t>>8&255,t>>16&255,t>>24&255]}function a(t){return t[3]<<24|t[2]<<16|t[1]<<8|t[0]}function u(t){return J(t,23,4)}function c(t){return J(t,52,8)}function f(t,n,r,e){var o=T(r),r=D(t);if(o+n>r.byteLength)throw H(z);return t=D(r.buffer).bytes,n=_(t,r=o+r.byteOffset,r+n),e?n:K(n)}function s(t,n,r,e,o,i){var a,u,c,f,r=T(r),t=D(t);if(r+n>t.byteLength)throw H(z);for(a=D(t.buffer).bytes,u=r+t.byteOffset,c=e(+o),f=0;fp;)(g=h[p++])in q||w(q,g,W[g]);G.constructor=q}P&&M(Y)!==L&&P(Y,L),L=new b(new q(2)),v=y(Y.setInt8),L.setInt8(0,2147483648),L.setInt8(1,2147483649),!L.getInt8(0)&&L.getInt8(1)||S(Y,{setInt8:function(t,n){v(this,t,n<<24>>24)},setUint8:function(t,n){v(this,t,n<<24>>24)}},{unsafe:!0})}else G=(q=function(t){E(this,G);t=T(t);B(this,{bytes:$(V(t),0),byteLength:t}),m||(this.byteLength=t)}).prototype,Y=(b=function(t,n,r){var e;if(E(this,Y),E(t,G),e=D(t).byteLength,(n=I(n))<0||ee)throw H("Wrong length");B(this,{buffer:t,byteLength:r,byteOffset:n}),m||(this.buffer=t,this.byteLength=r,this.byteOffset=n)}).prototype,m&&(O(q,"byteLength"),O(b,"buffer"),O(b,"byteLength"),O(b,"byteOffset")),S(Y,{getInt8:function(t){return f(this,1,t)[0]<<24>>24},getUint8:function(t){return f(this,1,t)[0]},getInt16:function(t){t=f(this,2,t,1>16},getUint16:function(t){t=f(this,2,t,1>>0},getFloat32:function(t){return X(f(this,4,t,1>1,f=23===n?g(2,-24)-g(2,-77):0,s=t<0||0===t&&1/t<0?1:0,l=0;for((t=p(t))!=t||t===1/0?(o=t!=t?1:0,e=u):(e=v(d(t)/y),t*(r=g(2,-e))<1&&(e--,r*=2),2<=(t+=1<=e+c?f/r:f*g(2,1-c))*r&&(e++,r/=2),u<=e+c?(o=0,e=u):1<=e+c?(o=(t*r-1)*g(2,n),e+=c):(o=t*g(2,c-1)*g(2,n),e=0));8<=n;)i[l++]=255&o,o/=256,n-=8;for(e=e<>1,u=o-7,c=e-1,e=t[c--],f=127&e;for(e>>=7;0>=-u,u+=n;0n&&(r=f(r,0,n)),o?e+r:r+e)}};t.exports={start:e(!1),end:e(!0)}},function(t,n,r){var e=r(3),o=r(56),i=r(64),a=r(14),u=e.RangeError;t.exports=function(t){var n=i(a(this)),r="",e=o(t);if(e<0||e==1/0)throw u("Wrong number of repetitions");for(;0>>=1)&&(n+=n))1&e&&(r+=n);return r}},function(t,n,r){var e=r(2),o=r(6),i=r(36),a=r(16);e({target:"Date",proto:!0,forced:o(function(){return null!==new Date(NaN).toJSON()||1!==Date.prototype.toJSON.call({toISOString:function(){return 1}})})},{toJSON:function(t){var n=i(this),r=a(n,"number");return"number"!=typeof r||isFinite(r)?n.toISOString():null}})},function(t,n,r){var e=r(35),o=r(43),i=r(187),a=r(30)("toPrimitive"),r=Date.prototype;e(r,a)||o(r,a,i)},function(t,n,r){var e=r(3),o=r(42),i=r(29),a=e.TypeError;t.exports=function(t){if(o(this),"string"===t||"default"===t)t="string";else if("number"!==t)throw a("Incorrect hint");return i(this,t)}},function(t,n,r){var e=r(12),o=r(43),r=Date.prototype,i="Invalid Date",a=e(r.toString),u=e(r.getTime);String(new Date(NaN))!=i&&o(r,"toString",function(){var t=u(this);return t==t?a(this):i})},function(t,n,r){function a(t,n){for(var r=i(t,16);r.length>>=0)?31-e(o(t+.5)*i):32}})},function(t,n,r){var e=r(2),o=r(213),r=Math.cosh,i=Math.abs,a=Math.E;e({target:"Math",stat:!0,forced:!r||r(710)===1/0},{cosh:function(t){t=o(i(t)-1)+1;return(t+1/(t*a*a))*(a/2)}})},function(t,n){var r=Math.expm1,e=Math.exp;t.exports=!r||22025.465794806718u||n!=n?r*(1/0):r*n}},function(t,n,r){var e=r(2),r=Math.hypot,c=Math.abs,f=Math.sqrt;e({target:"Math",stat:!0,forced:!!r&&r(1/0,NaN)!==1/0},{hypot:function(t,n){for(var r,e,o=0,i=0,a=arguments.length,u=0;i>>16)*n+t*(r&o>>>16)<<16>>>0)}})},function(t,n,r){var r=r(2),e=Math.log,o=Math.LOG10E;r({target:"Math",stat:!0},{log10:function(t){return e(t)*o}})},function(t,n,r){r(2)({target:"Math",stat:!0},{log1p:r(206)})},function(t,n,r){var r=r(2),e=Math.log,o=Math.LN2;r({target:"Math",stat:!0},{log2:function(t){return e(t)/o}})},function(t,n,r){r(2)({target:"Math",stat:!0},{sign:r(210)})},function(t,n,r){var e=r(2),o=r(6),i=r(213),a=Math.abs,u=Math.exp,c=Math.E;e({target:"Math",stat:!0,forced:o(function(){return-2e-17!=Math.sinh(-2e-17)})},{sinh:function(t){return a(t=+t)<1?(i(t)-i(-t))/2:(u(t-1)-u(-t-1))*(c/2)}})},function(t,n,r){var e=r(2),o=r(213),i=Math.exp;e({target:"Math",stat:!0},{tanh:function(t){var n=o(t=+t),r=o(-t);return n==1/0?1:r==1/0?-1:(n-r)/(i(t)+i(-t))}})},function(t,n,r){r(78)(Math,"Math",!0)},function(t,n,r){var r=r(2),e=Math.ceil,o=Math.floor;r({target:"Math",stat:!0},{trunc:function(t){return(0i;i++)h(A,a=o[i])&&!h(e,a)&&b(e,a,x(A,a));l(c,"Number",(e.prototype=E).constructor=e)}},function(t,n,r){r=r(12);t.exports=r(1..valueOf)},function(t,n,r){var e=r(12),o=r(14),i=r(64),r=r(230),a=e("".replace),r="["+r+"]",u=RegExp("^"+r+r+"*"),c=RegExp(r+r+"*$"),r=function(n){return function(t){t=i(o(t));return 1&n&&(t=a(t,u,"")),t=2&n?a(t,c,""):t}};t.exports={start:r(1),end:r(2),trim:r(3)}},function(t,n){t.exports="\t\n\v\f\r                \u2028\u2029\ufeff"},function(t,n,r){r(2)({target:"Number",stat:!0},{EPSILON:Math.pow(2,-52)})},function(t,n,r){r(2)({target:"Number",stat:!0},{isFinite:r(233)})},function(t,n,r){var e=r(3).isFinite;t.exports=Number.isFinite||function(t){return"number"==typeof t&&e(t)}},function(t,n,r){r(2)({target:"Number",stat:!0},{isInteger:r(235)})},function(t,n,r){var e=r(17),o=Math.floor;t.exports=Number.isInteger||function(t){return!e(t)&&isFinite(t)&&o(t)===t}},function(t,n,r){r(2)({target:"Number",stat:!0},{isNaN:function(t){return t!=t}})},function(t,n,r){var e=r(2),o=r(235),i=Math.abs;e({target:"Number",stat:!0},{isSafeInteger:function(t){return o(t)&&i(t)<=9007199254740991}})},function(t,n,r){r(2)({target:"Number",stat:!0},{MAX_SAFE_INTEGER:9007199254740991})},function(t,n,r){r(2)({target:"Number",stat:!0},{MIN_SAFE_INTEGER:-9007199254740991})},function(t,n,r){var e=r(2),r=r(241);e({target:"Number",stat:!0,forced:Number.parseFloat!=r},{parseFloat:r})},function(t,n,r){var e=r(3),o=r(6),i=r(12),a=r(64),u=r(229).trim,r=r(230),c=i("".charAt),f=e.parseFloat,e=e.Symbol,s=e&&e.iterator,o=1/f(r+"-0")!=-1/0||s&&!o(function(){f(Object(s))});t.exports=o?function(t){var n=u(a(t)),t=f(n);return 0===t&&"-"==c(n,0)?-0:t}:f},function(t,n,r){var e=r(2),r=r(243);e({target:"Number",stat:!0,forced:Number.parseInt!=r},{parseInt:r})},function(t,n,r){var e=r(3),o=r(6),i=r(12),a=r(64),u=r(229).trim,r=r(230),c=e.parseInt,e=e.Symbol,f=e&&e.iterator,s=/^[+-]?0x/i,l=i(s.exec),o=8!==c(r+"08")||22!==c(r+"0x16")||f&&!o(function(){c(Object(f))});t.exports=o?function(t,n){t=u(a(t));return c(t,n>>>0||(l(s,t)?16:10))}:c},function(t,n,r){function c(t,n,r){return 0===n?r:n%2==1?c(t,n-1,r*t):c(t*t,n/2,r)}function f(t,n,r){for(var e=-1,o=r;++e<6;)t[e]=(o+=n*t[e])%1e7,o=u(o/1e7)}function s(t,n){for(var r=6,e=0;0<=--r;)t[r]=u((e+=t[r])/n),e=e%n*1e7}function l(t){for(var n,r=6,e="";0<=--r;)""===e&&0!==r&&0===t[r]||(n=v(t[r]),e=""===e?n:e+d("0",7-n.length)+n);return e}var e=r(2),o=r(3),i=r(12),h=r(56),p=r(228),a=r(184),r=r(6),g=o.RangeError,v=o.String,u=Math.floor,d=i(a),y=i("".slice),m=i(1..toFixed);e({target:"Number",proto:!0,forced:r(function(){return"0.000"!==m(8e-5,3)||"1"!==m(.9,0)||"1.25"!==m(1.255,2)||"1000000000000000128"!==m(0xde0b6b3a7640080,0)})||!r(function(){m({})})},{toFixed:function(t){var n,r,e=p(this),o=h(t),i=[0,0,0,0,0,0],a="",u="0";if(o<0||20u;)(r=o(e,n=i[u++]))!==Bt&&l(a,n,r);return a}})},function(t,n,r){var e=r(2),o=r(6),r=r(71).f;e({target:"Object",stat:!0,forced:o(function(){return!Object.getOwnPropertyNames(1)})},{getOwnPropertyNames:r})},function(t,n,r){var e=r(2),o=r(6),i=r(36),a=r(99),r=r(100);e({target:"Object",stat:!0,forced:o(function(){a(1)}),sham:!r},{getPrototypeOf:function(t){return a(i(t))}})},function(t,n,r){r(2)({target:"Object",stat:!0},{hasOwn:r(35)})},function(t,n,r){r(2)({target:"Object",stat:!0},{is:r(264)})},function(t,n){t.exports=Object.is||function(t,n){return t===n?0!==t||1/t==1/n:t!=t&&n!=n}},function(t,n,r){var e=r(2),r=r(200);e({target:"Object",stat:!0,forced:Object.isExtensible!==r},{isExtensible:r})},function(t,n,r){var e=r(2),o=r(6),i=r(17),a=r(13),u=r(201),c=Object.isFrozen;e({target:"Object",stat:!0,forced:o(function(){c(1)})||u},{isFrozen:function(t){return!i(t)||!(!u||"ArrayBuffer"!=a(t))||!!c&&c(t)}})},function(t,n,r){var e=r(2),o=r(6),i=r(17),a=r(13),u=r(201),c=Object.isSealed;e({target:"Object",stat:!0,forced:o(function(){c(1)})||u},{isSealed:function(t){return!i(t)||!(!u||"ArrayBuffer"!=a(t))||!!c&&c(t)}})},function(t,n,r){var e=r(2),o=r(36),i=r(69);e({target:"Object",stat:!0,forced:r(6)(function(){i(1)})},{keys:function(t){return i(o(t))}})},function(t,n,r){var e=r(2),o=r(5),i=r(250),a=r(36),u=r(15),c=r(99),f=r(4).f;o&&e({target:"Object",proto:!0,forced:i},{__lookupGetter__:function(t){var n,r=a(this),e=u(t);do{if(n=f(r,e))return n.get}while(r=c(r))}})},function(t,n,r){var e=r(2),o=r(5),i=r(250),a=r(36),u=r(15),c=r(99),f=r(4).f;o&&e({target:"Object",proto:!0,forced:i},{__lookupSetter__:function(t){var n,r=a(this),e=u(t);do{if(n=f(r,e))return n.set}while(r=c(r))}})},function(t,n,r){var e=r(2),o=r(17),i=r(199).onFreeze,a=r(202),r=r(6),u=Object.preventExtensions;e({target:"Object",stat:!0,forced:r(function(){u(1)}),sham:!a},{preventExtensions:function(t){return u&&o(t)?u(i(t)):t}})},function(t,n,r){var e=r(2),o=r(17),i=r(199).onFreeze,a=r(202),r=r(6),u=Object.seal;e({target:"Object",stat:!0,forced:r(function(){u(1)}),sham:!a},{seal:function(t){return u&&o(t)?u(i(t)):t}})},function(t,n,r){r(2)({target:"Object",stat:!0},{setPrototypeOf:r(101)})},function(t,n,r){var e=r(66),o=r(43),r=r(275);e||o(Object.prototype,"toString",r,{unsafe:!0})},function(t,n,r){var e=r(66),o=r(65);t.exports=e?{}.toString:function(){return"[object "+o(this)+"]"}},function(t,n,r){var e=r(2),o=r(255).values;e({target:"Object",stat:!0},{values:function(t){return o(t)}})},function(t,n,r){var e=r(2),r=r(241);e({global:!0,forced:parseFloat!=r},{parseFloat:r})},function(t,n,r){var e=r(2),r=r(243);e({global:!0,forced:parseInt!=r},{parseInt:r})},function(t,n,r){var e,o,i,a,u=r(2),c=r(32),v=r(3),f=r(20),d=r(7),s=r(280),l=r(43),h=r(167),p=r(101),g=r(78),y=r(160),m=r(27),x=r(18),b=r(17),w=r(168),S=r(44),A=r(105),E=r(134),I=r(174),R=r(281).set,T=r(283),O=r(286),M=r(288),P=r(287),j=r(289),N=r(45),k=r(61),_=r(30),U=r(290),L=r(149),F=r(24),C=_("species"),D="Promise",B=N.getterFor(D),z=N.set,W=N.getterFor(D),N=s&&s.prototype,q=s,G=N,Y=v.TypeError,V=v.document,H=v.process,$=P.f,K=$,J=!!(V&&V.createEvent&&v.dispatchEvent),X=x(v.PromiseRejectionEvent),Q="unhandledrejection",Z=!1,k=k(D,function(){var t,n=S(q),r=n!==String(q);return!r&&66===F||!(!c||G.finally)||!(51<=F&&/native code/.test(n))&&(t=function(t){t(function(){},function(){})},((n=new q(function(t){t(1)})).constructor={})[C]=t,!(Z=n.then(function(){})instanceof t)||!r&&U&&!X)}),E=k||!E(function(t){q.all(t).catch(function(){})}),tt=function(t){var n;return!(!b(t)||!x(n=t.then))&&n},nt=function(h,p){var g;h.notified||(h.notified=!0,g=h.reactions,T(function(){for(var t,n,r,e,o,i,a,u,c,f=h.value,s=1==h.state,l=0;g.length>l;){t=g[l++],n=s?t.ok:t.fail,r=t.resolve,e=t.reject,o=t.domain;try{n?(s||(2===h.rejection&&function(n){d(R,v,function(){var t=n.facade;L?H.emit("rejectionHandled",t):rt("rejectionhandled",t,n.value)})}(h),h.rejection=1),!0===n?i=f:(o&&o.enter(),i=n(f),o&&(o.exit(),u=!0)),i===t.promise?e(Y("Promise-chain cycle")):(a=tt(i))?d(a,i,r,e):r(i)):e(f)}catch(t){o&&!u&&o.exit(),e(t)}}h.reactions=[],h.notified=!1,p&&!h.rejection&&(c=h,d(R,v,function(){var t,n=c.facade,r=c.value;if(et(c)&&(t=j(function(){L?H.emit("unhandledRejection",r,n):rt(Q,n,r)}),c.rejection=L||et(c)?2:1,t.error))throw t.value}))}))},rt=function(t,n,r){var e,o;J?((e=V.createEvent("Event")).promise=n,e.reason=r,e.initEvent(t,!1,!0),v.dispatchEvent(e)):e={promise:n,reason:r},!X&&(o=v["on"+t])?o(e):t===Q&&M("Unhandled promise rejection",r)},et=function(t){return 1!==t.rejection&&!t.parent},ot=function(n,r,e){return function(t){n(r,t,e)}},it=function(t,n,r){t.done||(t.done=!0,(t=r?r:t).value=n,t.state=2,nt(t,!0))},at=function(r,t,n){if(!r.done){r.done=!0,n&&(r=n);try{if(r.facade===t)throw Y("Promise can't be resolved itself");var e=tt(t);e?T(function(){var n={done:!1};try{d(e,t,ot(at,n,r),ot(it,n,r))}catch(t){it(n,t,r)}}):(r.value=t,r.state=1,nt(r,!1))}catch(t){it({done:!1},t,r)}}};if(k&&(q=function(t){w(this,G),m(t),d(e,this);var n=B(this);try{t(ot(at,n),ot(it,n))}catch(t){it(n,t)}},(e=function(t){z(this,{type:D,done:!1,notified:!1,parent:!1,reactions:[],rejection:!1,state:0,value:Bt})}).prototype=h(G=q.prototype,{then:function(t,n){var r=W(this),e=r.reactions,o=$(I(this,q));return o.ok=!x(t)||t,o.fail=x(n)&&n,o.domain=L?H.domain:Bt,r.parent=!0,e[e.length]=o,0!=r.state&&nt(r,!1),o.promise},catch:function(t){return this.then(Bt,t)}}),o=function(){var t=new e,n=B(t);this.promise=t,this.resolve=ot(at,n),this.reject=ot(it,n)},P.f=$=function(t){return t===q||t===i?new o:K(t)},!c&&x(s)&&N!==Object.prototype)){a=N.then,Z||(l(N,"then",function(t,n){var r=this;return new q(function(t,n){d(a,r,t,n)}).then(t,n)},{unsafe:!0}),l(N,"catch",G.catch,{unsafe:!0}));try{delete N.constructor}catch(t){}p&&p(N,G)}u({global:!0,wrap:!0,forced:k},{Promise:q}),g(q,D,!1,!0),y(D),i=f(D),u({target:D,stat:!0,forced:k},{reject:function(t){var n=$(this);return d(n.reject,Bt,t),n.promise}}),u({target:D,stat:!0,forced:c||k},{resolve:function(t){return O(c&&this===i?q:this,t)}}),u({target:D,stat:!0,forced:E},{all:function(t){var u=this,n=$(u),c=n.resolve,f=n.reject,r=j(function(){var e=m(u.resolve),o=[],i=0,a=1;A(t,function(t){var n=i++,r=!1;a++,d(e,u,t).then(function(t){r||(r=!0,o[n]=t,--a||c(o))},f)}),--a||c(o)});return r.error&&f(r.value),n.promise},race:function(t){var r=this,e=$(r),o=e.reject,n=j(function(){var n=m(r.resolve);A(t,function(t){d(n,r,t).then(e.resolve,o)})});return n.error&&o(n.value),e.promise}})},function(t,n,r){r=r(3);t.exports=r.Promise},function(t,n,r){var e,o,i,a,u,c=r(3),f=r(62),s=r(80),l=r(18),h=r(35),p=r(6),g=r(70),v=r(74),d=r(39),y=r(282),m=r(149),x=c.setImmediate,b=c.clearImmediate,w=c.process,S=c.Dispatch,A=c.Function,E=c.MessageChannel,I=c.String,R=0,T={};try{e=c.location}catch(t){}i=function(t){var n;h(T,t)&&(n=T[t],delete T[t],n())},a=function(t){return function(){i(t)}},u=function(t){i(t.data)},r=function(t){c.postMessage(I(t),e.protocol+"//"+e.host)},x&&b||(x=function(t){var n=v(arguments,1);return T[++R]=function(){f(l(t)?t:A(t),Bt,n)},o(R),R},b=function(t){delete T[t]},m?o=function(t){w.nextTick(a(t))}:S&&S.now?o=function(t){S.now(a(t))}:E&&!y?(E=(y=new E).port2,y.port1.onmessage=u,o=s(E.postMessage,E)):c.addEventListener&&l(c.postMessage)&&!c.importScripts&&e&&"file:"!==e.protocol&&!p(r)?(o=r,c.addEventListener("message",u,!1)):o="onreadystatechange"in d("script")?function(t){g.appendChild(d("script")).onreadystatechange=function(){g.removeChild(this),i(t)}}:function(t){setTimeout(a(t),0)}),t.exports={set:x,clear:b}},function(t,n,r){r=r(25);t.exports=/(?:ipad|iphone|ipod).*applewebkit/i.test(r)},function(t,n,r){var e,o,i,a,u,c,f,s=r(3),l=r(80),h=r(4).f,p=r(281).set,g=r(282),v=r(284),d=r(285),y=r(149),m=s.MutationObserver||s.WebKitMutationObserver,x=s.document,b=s.process,r=s.Promise,h=h(s,"queueMicrotask"),h=h&&h.value;h||(e=function(){var t,n;for(y&&(t=b.domain)&&t.exit();o;){n=o.fn,o=o.next;try{n()}catch(t){throw o?a():i=Bt,t}}i=Bt,t&&t.enter()},a=g||y||d||!m||!x?!v&&r&&r.resolve?((v=r.resolve(Bt)).constructor=r,f=l(v.then,v),function(){f(e)}):y?function(){b.nextTick(e)}:(p=l(p,s),function(){p(e)}):(u=!0,c=x.createTextNode(""),new m(e).observe(c,{characterData:!0}),function(){c.data=u=!u})),t.exports=h||function(t){t={fn:t,next:Bt};i&&(i.next=t),o||(o=t,a()),i=t}},function(t,n,r){var e=r(25),r=r(3);t.exports=/ipad|iphone|ipod/i.test(e)&&r.Pebble!==Bt},function(t,n,r){r=r(25);t.exports=/web0s(?!.*chrome)/i.test(r)},function(t,n,r){var e=r(42),o=r(17),i=r(287);t.exports=function(t,n){return e(t),o(n)&&n.constructor===t?n:((0,(t=i.f(t)).resolve)(n),t.promise)}},function(t,n,r){function e(t){var r,e;this.promise=new t(function(t,n){if(r!==Bt||e!==Bt)throw TypeError("Bad Promise constructor");r=t,e=n}),this.resolve=o(r),this.reject=o(e)}var o=r(27);t.exports.f=function(t){return new e(t)}},function(t,n,r){var e=r(3);t.exports=function(t,n){var r=e.console;r&&r.error&&(1==arguments.length?r.error(t):r.error(t,n))}},function(t,n){t.exports=function(t){try{return{error:!1,value:t()}}catch(t){return{error:!0,value:t}}}},function(t,n){t.exports="object"==typeof window},function(t,n,r){var e=r(2),f=r(7),s=r(27),o=r(287),i=r(289),l=r(105);e({target:"Promise",stat:!0},{allSettled:function(t){var u=this,n=o.f(u),c=n.resolve,r=n.reject,e=i(function(){var e=s(u.resolve),o=[],i=0,a=1;l(t,function(t){var n=i++,r=!1;a++,f(e,u,t).then(function(t){r||(r=!0,o[n]={status:"fulfilled",value:t},--a||c(o))},function(t){r||(r=!0,o[n]={status:"rejected",reason:t},--a||c(o))})}),--a||c(o)});return e.error&&r(e.value),n.promise}})},function(t,n,r){var e=r(2),h=r(27),o=r(20),p=r(7),i=r(287),a=r(289),g=r(105),v="No one promise resolved";e({target:"Promise",stat:!0},{any:function(t){var c=this,f=o("AggregateError"),n=i.f(c),s=n.resolve,l=n.reject,r=a(function(){var e=h(c.resolve),o=[],i=0,a=1,u=!1;g(t,function(t){var n=i++,r=!1;a++,p(e,c,t).then(function(t){r||u||(u=!0,s(t))},function(t){r||u||(r=!0,o[n]=t,--a||l(new f(o,v)))})}),--a||l(new f(o,v))});return r.error&&l(r.value),n.promise}})},function(t,n,r){var e=r(2),o=r(32),i=r(280),a=r(6),u=r(20),c=r(18),f=r(174),s=r(286),r=r(43);e({target:"Promise",proto:!0,real:!0,forced:!!i&&a(function(){i.prototype.finally.call({then:function(){}},function(){})})},{finally:function(n){var r=f(this,u("Promise")),t=c(n);return this.then(t?function(t){return s(r,n()).then(function(){return t})}:n,t?function(t){return s(r,n()).then(function(){throw t})}:n)}}),!o&&c(i)&&(o=u("Promise").prototype.finally,i.prototype.finally!==o&&r(i.prototype,"finally",o,{unsafe:!0}))},function(t,n,r){var e=r(2),o=r(62),i=r(27),a=r(42);e({target:"Reflect",stat:!0,forced:!r(6)(function(){Reflect.apply(function(){})})},{apply:function(t,n,r){return o(i(t),n,a(r))}})},function(t,n,r){var e=r(2),o=r(20),i=r(62),a=r(191),u=r(175),c=r(42),f=r(17),s=r(67),r=r(6),l=o("Reflect","construct"),h=Object.prototype,p=[].push,g=r(function(){function t(){}return!(l(function(){},[],t)instanceof t)}),v=!r(function(){l(function(){})}),r=g||v;e({target:"Reflect",stat:!0,forced:r,sham:r},{construct:function(t,n){var r,e;if(u(t),c(n),e=arguments.length<3?t:u(arguments[2]),v&&!g)return l(t,n,e);if(t!=e)return r=s(f(e=e.prototype)?e:h),e=i(t,r,n),f(e)?e:r;switch(n.length){case 0:return new t;case 1:return new t(n[0]);case 2:return new t(n[0],n[1]);case 3:return new t(n[0],n[1],n[2]);case 4:return new t(n[0],n[1],n[2],n[3])}return i(p,r=[null],n),new(i(a,t,r))}})},function(t,n,r){var e=r(2),o=r(5),i=r(42),a=r(15),u=r(41);e({target:"Reflect",stat:!0,forced:r(6)(function(){Reflect.defineProperty(u.f({},1,{value:1}),1,{value:2})}),sham:!o},{defineProperty:function(t,n,r){i(t);n=a(n);i(r);try{return u.f(t,n,r),!0}catch(t){return!1}}})},function(t,n,r){var e=r(2),o=r(42),i=r(4).f;e({target:"Reflect",stat:!0},{deleteProperty:function(t,n){var r=i(o(t),n);return!(r&&!r.configurable)&&delete t[n]}})},function(t,n,r){var e=r(2),i=r(7),a=r(17),u=r(42),c=r(299),f=r(4),s=r(99);e({target:"Reflect",stat:!0},{get:function t(n,r){var e,o=arguments.length<3?n:arguments[2];return u(n)===o?n[r]:(e=f.f(n,r))?c(e)?e.value:e.get===Bt?Bt:i(e.get,o):a(n=s(n))?t(n,r,o):Bt}})},function(t,n,r){var e=r(35);t.exports=function(t){return t!==Bt&&(e(t,"value")||e(t,"writable"))}},function(t,n,r){var e=r(2),o=r(5),i=r(42),a=r(4);e({target:"Reflect",stat:!0,sham:!o},{getOwnPropertyDescriptor:function(t,n){return a.f(i(t),n)}})},function(t,n,r){var e=r(2),o=r(42),i=r(99);e({target:"Reflect",stat:!0,sham:!r(100)},{getPrototypeOf:function(t){return i(o(t))}})},function(t,n,r){r(2)({target:"Reflect",stat:!0},{has:function(t,n){return n in t}})},function(t,n,r){var e=r(2),o=r(42),i=r(200);e({target:"Reflect",stat:!0},{isExtensible:function(t){return o(t),i(t)}})},function(t,n,r){r(2)({target:"Reflect",stat:!0},{ownKeys:r(51)})},function(t,n,r){var e=r(2),o=r(20),i=r(42);e({target:"Reflect",stat:!0,sham:!r(202)},{preventExtensions:function(t){i(t);try{var n=o("Object","preventExtensions");return n&&n(t),!0}catch(t){return!1}}})},function(t,n,r){var e=r(2),u=r(7),c=r(42),f=r(17),s=r(299),o=r(6),l=r(41),h=r(4),p=r(99),g=r(9);e({target:"Reflect",stat:!0,forced:o(function(){function t(){}var n=l.f(new t,"a",{configurable:!0});return!1!==Reflect.set(t.prototype,"a",1,n)})},{set:function t(n,r,e){var o,i=arguments.length<4?n:arguments[3],a=h.f(c(n),r);if(!a){if(f(o=p(n)))return t(o,r,e,i);a=g(0)}if(s(a)){if(!1===a.writable||!f(i))return!1;if(o=h.f(i,r)){if(o.get||o.set||!1===o.writable)return!1;o.value=e,l.f(i,r,o)}else l.f(i,r,g(0,e))}else{if((a=a.set)===Bt)return!1;u(a,i,e)}return!0}})},function(t,n,r){var e=r(2),o=r(42),i=r(102),a=r(101);a&&e({target:"Reflect",stat:!0},{setPrototypeOf:function(t,n){o(t),i(n);try{return a(t,n),!0}catch(t){return!1}}})},function(t,n,r){var e=r(2),o=r(3),r=r(78);e({global:!0},{Reflect:{}}),r(o.Reflect,"Reflect",!0)},function(t,n,r){var f,e,o,i,a=r(5),u=r(3),c=r(12),s=r(61),l=r(203),h=r(40),p=r(41).f,g=r(52).f,v=r(21),d=r(310),y=r(64),m=r(311),x=r(312),b=r(43),w=r(6),S=r(35),A=r(45).enforce,E=r(160),I=r(30),R=r(313),T=r(314),O=I("match"),M=u.RegExp,P=M.prototype,j=u.SyntaxError,N=c(m),k=c(P.exec),_=c("".charAt),U=c("".replace),L=c("".indexOf),F=c("".slice),C=/^\?<[^\s\d!#%&*+<=>@^][^\s!#%&*+<=>@^]*>/,D=/a/g,B=/a/g,c=new M(D)!==D,z=x.MISSED_STICKY,W=x.UNSUPPORTED_Y;if(s("RegExp",a&&(!c||z||R||T||w(function(){return B[O]=!1,M(D)!=D||M(B)==B||"/a/i"!=M(D,"i")})))){for(f=function(t,n){var r,e,o=v(P,this),i=d(t),a=n===Bt,u=[],c=t;if(!o&&i&&a&&t.constructor===f)return t;if((i||v(P,t))&&(t=t.source,a&&(n="flags"in c?c.flags:N(c))),t=t===Bt?"":y(t),n=n===Bt?"":y(n),c=t,i=n=R&&"dotAll"in D&&(r=!!n&&-1"===n&&c:if(""===s||S(a,s))throw new j("Invalid capture group name");a[s]=!0,c=!(i[i.length]=[s,f]),s="";continue}c?s+=n:o+=n}return[o,i]}(t))[0],u=a[1]),n=l(M(t,n),o?this:P,f),(r||e||u.length)&&(o=A(n),r&&(o.dotAll=!0,o.raw=f(function(t){for(var n,r=t.length,e=0,o="",i=!1;e<=r;e++)"\\"!==(n=_(t,e))?i||"."!==n?("["===n?i=!0:"]"===n&&(i=!1),o+=n):o+="[\\s\\S]":o+=n+_(t,++e);return o}(t),i)),e&&(o.sticky=!0),u.length&&(o.groups=u)),t!==c)try{h(n,"source",""===c?"(?:)":c)}catch(t){}return n},e=function(n){n in f||p(f,n,{configurable:!0,get:function(){return M[n]},set:function(t){M[n]=t}})},o=g(M),i=0;o.length>i;)e(o[i++]);(P.constructor=f).prototype=P,b(u,"RegExp",f)}E("RegExp")},function(t,n,r){var e=r(17),o=r(13),i=r(30)("match");t.exports=function(t){var n;return e(t)&&((n=t[i])!==Bt?!!n:"RegExp"==o(t))}},function(t,n,r){var e=r(42);t.exports=function(){var t=e(this),n="";return t.global&&(n+="g"),t.ignoreCase&&(n+="i"),t.multiline&&(n+="m"),t.dotAll&&(n+="s"),t.unicode&&(n+="u"),t.sticky&&(n+="y"),n}},function(t,n,r){var e=r(6),o=r(3).RegExp,i=e(function(){var t=o("a","y");return t.lastIndex=2,null!=t.exec("abcd")}),r=i||e(function(){return!o("a","y").sticky}),e=i||e(function(){var t=o("^r","gy");return t.lastIndex=2,null!=t.exec("str")});t.exports={BROKEN_CARET:e,MISSED_STICKY:r,UNSUPPORTED_Y:i}},function(t,n,r){var e=r(6),o=r(3).RegExp;t.exports=e(function(){var t=o(".","s");return!(t.dotAll&&t.exec("\n")&&"s"===t.flags)})},function(t,n,r){var e=r(6),o=r(3).RegExp;t.exports=e(function(){var t=o("(?b)","g");return"b"!==t.exec("b").groups.a||"bc"!=="b".replace(t,"$c")})},function(t,n,r){var e=r(3),o=r(5),i=r(313),a=r(13),u=r(41).f,c=r(45).get,f=RegExp.prototype,s=e.TypeError;o&&i&&u(f,"dotAll",{configurable:!0,get:function(){if(this===f)return Bt;if("RegExp"===a(this))return!!c(this).dotAll;throw s("Incompatible receiver, RegExp required")}})},function(t,n,r){var e=r(2),r=r(317);e({target:"RegExp",proto:!0,forced:/./.exec!==r},{exec:r})},function(t,n,r){var g=r(7),e=r(12),v=r(64),d=r(311),o=r(312),i=r(31),y=r(67),m=r(45).get,a=r(313),r=r(314),x=i("native-string-replace","".replace),b=/t/.exec,w=b,S=e("".charAt),A=e("".indexOf),E=e("".replace),I=e("".slice),R=(i=/b*/g,g(b,e=/a/,"a"),g(b,i,"a"),0!==e.lastIndex||0!==i.lastIndex),T=o.BROKEN_CARET,O=/()??/.exec("")[1]!==Bt;(R||O||T||a||r)&&(w=function(t){var n,r,e,o,i,a,u,c,f,s=this,l=m(s),h=v(t),p=l.raw;if(p)return p.lastIndex=s.lastIndex,f=g(w,p,h),s.lastIndex=p.lastIndex,f;if(u=l.groups,c=T&&s.sticky,t=g(d,s),p=s.source,f=0,l=h,c&&(t=E(t,"y",""),-1===A(t,"g")&&(t+="g"),l=I(h,s.lastIndex),0>10),n%1024+56320)}return f(r,"")}})},function(t,n,r){var e=r(2),o=r(12),i=r(327),a=r(14),u=r(64),r=r(328),c=o("".indexOf);e({target:"String",proto:!0,forced:!r("includes")},{includes:function(t){return!!~c(u(a(this)),u(i(t)),1=n.length?{value:Bt,done:!0}:(r=e(n,r),t.index+=r.length,{value:r,done:!1})})},function(t,n,r){var o=r(7),e=r(333),f=r(42),s=r(58),l=r(64),i=r(14),a=r(26),h=r(334),p=r(335);e("match",function(e,u,c){return[function(t){var n=i(this),r=t==Bt?Bt:a(t,e);return r?o(r,t,n):new RegExp(t)[e](l(n))},function(t){var n,r,e,o,i=f(this),a=l(t),t=c(u,i,a);if(t.done)return t.value;if(!i.global)return p(i,a);for(n=i.unicode,r=[],e=i.lastIndex=0;null!==(o=p(i,a));)o=l(o[0]),""===(r[e]=o)&&(i.lastIndex=h(a,s(i.lastIndex),n)),e++;return 0===e?null:r}]})},function(t,n,r){var c,f,s,l,h,p,g,v;r(316),c=r(12),f=r(43),s=r(317),l=r(6),h=r(30),p=r(40),g=h("species"),v=RegExp.prototype,t.exports=function(r,t,n,e){var a,o=h(r),u=!l(function(){var t={};return t[o]=function(){return 7},7!=""[r](t)}),i=u&&!l(function(){var t=!1,n=/a/;return"split"===r&&((n={}).constructor={},n.constructor[g]=function(){return n},n.flags="",n[o]=/./[o]),n.exec=function(){return t=!0,null},n[o](""),!t});u&&i&&!n||(a=c(/./[o]),t=t(o,""[r],function(t,n,r,e,o){var i=c(t),t=n.exec;return t===s||t===v.exec?u&&!o?{done:!0,value:a(n,r,e)}:{done:!0,value:i(r,n,e)}:{done:!1}}),f(String.prototype,r,t[0]),f(v,o,t[1])),e&&p(v[o],"sham",!0)}},function(t,n,r){var e=r(325).charAt;t.exports=function(t,n,r){return n+(r?e(t,n).length:1)}},function(t,n,r){var e=r(3),o=r(7),i=r(42),a=r(18),u=r(13),c=r(317),f=e.TypeError;t.exports=function(t,n){var r=t.exec;if(a(r))return null!==(r=o(r,t,n))&&i(r),r;if("RegExp"===u(t))return o(c,t,n);throw f("RegExp#exec called on incompatible receiver")}},function(t,n,r){function e(t){var n=h(this),r=l(t),e=w(n,RegExp),t=(o=(o=n.flags)===Bt&&g(P,n)&&!("flags"in P)?N(n):o)===Bt?"":l(o),o=new e(e===RegExp?n.source:n,t),e=!!~k(t,"g"),t=!!~k(t,"u");return o.lastIndex=s(n.lastIndex),new L(o,r,e,t)}var o=r(2),i=r(3),a=r(7),u=r(12),c=r(140),f=r(14),s=r(58),l=r(64),h=r(42),p=r(13),g=r(21),v=r(310),d=r(311),y=r(26),m=r(43),x=r(6),b=r(30),w=r(174),S=r(334),A=r(335),E=r(45),I=r(32),R=b("matchAll"),T="RegExp String Iterator",O=E.set,M=E.getterFor(T),P=RegExp.prototype,j=i.TypeError,N=u(d),k=u("".indexOf),_=u("".matchAll),U=!!_&&!x(function(){_("a",/./)}),L=c(function(t,n,r,e){O(this,{type:T,regexp:t,string:n,global:r,unicode:e,done:!1})},"RegExp String",function(){var t,n,r,e=M(this);return e.done?{value:Bt,done:!0}:null===(r=A(t=e.regexp,n=e.string))?{value:Bt,done:e.done=!0}:(e.global?""===l(r[0])&&(t.lastIndex=S(n,s(t.lastIndex),e.unicode)):e.done=!0,{value:r,done:!1})});o({target:"String",proto:!0,forced:U},{matchAll:function(t){var n,r=f(this);if(null!=t){if(v(t)&&(n=l(f("flags"in P?t.flags:N(t))),!~k(n,"g")))throw j("`.matchAll` does not allow non-global regexes");if(U)return _(r,t);if(n=(n=y(t,R))===Bt&&I&&"RegExp"==p(t)?e:n)return a(n,t,r)}else if(U)return _(r,t);return r=l(r),t=new RegExp(t,"g"),I?a(e,t,r):t[R](r)}}),I||R in P||m(P,R,e)},function(t,n,r){var e=r(2),o=r(183).end;e({target:"String",proto:!0,forced:r(338)},{padEnd:function(t){return o(this,t,1")})||!e||s)},function(t,n,r){var e=r(12),o=r(36),h=Math.floor,p=e("".charAt),g=e("".replace),v=e("".slice),d=/\$([$&'`]|\d{1,2}|<[^>]*>)/g,y=/\$([$&'`]|\d{1,2})/g;t.exports=function(i,a,u,c,f,t){var s=u+i.length,l=c.length,n=y;return f!==Bt&&(f=o(f),n=d),g(t,n,function(t,n){var r,e,o;switch(p(n,0)){case"$":return"$";case"&":return i;case"`":return v(a,0,u);case"'":return v(a,s);case"<":r=f[v(n,1,-1)];break;default:if(0==(e=+n))return t;if(lt.length?-1:""===n?r:T(t,n,r)}var e=r(2),o=r(3),v=r(7),i=r(12),d=r(14),y=r(18),m=r(310),x=r(64),b=r(26),a=r(311),w=r(343),u=r(30),S=r(32),A=u("replace"),E=RegExp.prototype,I=o.TypeError,R=i(a),T=i("".indexOf),O=i("".replace),M=i("".slice),P=Math.max;e({target:"String",proto:!0},{replaceAll:function(t,n){var r,e,o,i,a,u,c,f,s=d(this),l=0,h=0,p="";if(null!=t){if((r=m(t))&&(e=x(d("flags"in E?t.flags:R(t))),!~T(e,"g")))throw I("`.replaceAll` does not allow non-global regexes");if(e=b(t,A))return v(e,t,s,n);if(S&&r)return O(x(s),t,n)}for(o=x(s),i=x(t),(a=y(n))||(n=x(n)),c=P(1,u=i.length),l=g(o,i,0);-1!==l;)f=a?x(n(i,l,o)):w(i,o,l,[],Bt,n),p+=M(o,h,l)+f,h=l+u,l=g(o,i,l+c);return h>>0;if(0==f)return[];if(t===Bt)return[c];if(!h(t))return l(p,c,t,f);for(r=[],e=0,o=new RegExp(t.source,(t.ignoreCase?"i":"")+(t.multiline?"m":"")+(t.unicode?"u":"")+(t.sticky?"y":"")+"g");(i=l(E,o,c))&&!((a=o.lastIndex)>e&&(M(r,P(c,e,i.index)),1>>0))return[];if(0===h.length)return null===A(e,h)?[h]:[];for(a=i=0,u=[];a=(r=s(t+n,o))?"":c(e,t,r)}})},function(t,n,r){var e=r(2),o=r(229).trim;e({target:"String",proto:!0,forced:r(350)("trim")},{trim:function(){return o(this)}})},function(t,n,r){var e=r(49).PROPER,o=r(6),i=r(230);t.exports=function(t){return o(function(){return!!i[t]()||"​…᠎"!=="​…᠎"[t]()||e&&i[t].name!==t})}},function(t,n,r){var e=r(2),o=r(229).end,i=r(350)("trimEnd"),r=i?function(){return o(this)}:"".trimEnd;e({target:"String",proto:!0,name:"trimEnd",forced:i},{trimEnd:r,trimRight:r})},function(t,n,r){var e=r(2),o=r(229).start,i=r(350)("trimStart"),r=i?function(){return o(this)}:"".trimStart;e({target:"String",proto:!0,name:"trimStart",forced:i},{trimStart:r,trimLeft:r})},function(t,n,r){var e=r(2),o=r(354);e({target:"String",proto:!0,forced:r(355)("anchor")},{anchor:function(t){return o(this,"a","name",t)}})},function(t,n,r){var e=r(12),i=r(14),a=r(64),u=/"/g,c=e("".replace);t.exports=function(t,n,r,e){var o=a(i(t)),t="<"+n;return""!==r&&(t+=" "+r+'="'+c(a(e),u,""")+'"'),t+">"+o+""}},function(t,n,r){var e=r(6);t.exports=function(n){return e(function(){var t=""[n]('"');return t!==t.toLowerCase()||3r)throw z(Z);c=u/s}else c=w(n),a=new W(u=c*s);for(F(t,{buffer:a,byteOffset:i,byteLength:u,length:c,view:new G(a)});or)throw f("Wrong length");for(;i>>=0,r>>>=0;return(n>>>0)+(e>>>0)+((t&r|(t|r)&~(t+r>>>0))>>>31)|0}})},function(t,n,r){r(2)({target:"Math",stat:!0},{imulh:function(t,n){var r=+t,e=+n,t=65535&r,n=65535&e,r=r>>16,e=e>>16,n=(r*n>>>0)+(t*n>>>16);return r*e+(n>>16)+((t*e>>>0)+(65535&n)>>16)}})},function(t,n,r){r(2)({target:"Math",stat:!0},{isubh:function(t,n,r,e){t>>>=0,r>>>=0;return(n>>>0)-(e>>>0)-((~t&r|~(t^r)&t-r>>>0)>>>31)|0}})},function(t,n,r){r(2)({target:"Math",stat:!0},{RAD_PER_DEG:180/Math.PI})},function(t,n,r){var r=r(2),e=Math.PI/180;r({target:"Math",stat:!0},{radians:function(t){return t*e}})},function(t,n,r){r(2)({target:"Math",stat:!0},{scale:r(503)})},function(t,n,r){var e=r(2),o=r(3),i=r(42),a=r(233),u=r(140),r=r(45),c="Seeded Random Generator",f=r.set,s=r.getterFor(c),l=o.TypeError,h=u(function(t){f(this,{type:c,seed:t%2147483647})},"Seeded Random",function(){var t=s(this);return{value:(1073741823&(t.seed=(1103515245*t.seed+12345)%2147483647))/1073741823,done:!1}});e({target:"Math",stat:!0,forced:!0},{seededPRNG:function(t){t=i(t).seed;if(!a(t))throw l('Math.seededPRNG() argument should have a "seed" field with a finite value.');return new h(t)}})},function(t,n,r){r(2)({target:"Math",stat:!0},{signbit:function(t){return(t=+t)==t&&0==t?1/t==-1/0:t<0}})},function(t,n,r){r(2)({target:"Math",stat:!0},{umulh:function(t,n){var r=+t,e=+n,t=65535&r,n=65535&e,r=r>>>16,e=e>>>16,n=(r*n>>>0)+(t*n>>>16);return r*e+(n>>>16)+((t*e>>>0)+(65535&n)>>>16)}})},function(t,n,r){var e=r(2),o=r(3),i=r(12),a=r(56),u=r(243),c="Invalid number representation",f=o.RangeError,s=o.SyntaxError,l=o.TypeError,h=/^[\da-z]+$/,p=i("".charAt),g=i(h.exec),v=i(1..toString),d=i("".slice);e({target:"Number",stat:!0},{fromString:function(t,n){var r,e=1;if("string"!=typeof t)throw l(c);if(!t.length)throw s(c);if("-"==p(t,0)&&(e=-1,!(t=d(t,1)).length))throw s(c);if((n=n===Bt?10:a(n))<2||36=e.length)return r.object=r.keys=null,{value:Bt,done:!0};if(t=e[r.index++],i(n=r.object,t)){switch(r.mode){case"keys":return{value:t,done:!1};case"values":return{value:n[t],done:!1}}return{value:[t,n[t]],done:!1}}}})},function(t,n,r){var e=r(2),o=r(517);e({target:"Object",stat:!0},{iterateKeys:function(t){return new o(t,"keys")}})},function(t,n,r){var e=r(2),o=r(517);e({target:"Object",stat:!0},{iterateValues:function(t){return new o(t,"values")}})},function(t,n,r){function a(t){this.observer=d(t),this.cleanup=Bt,this.subscriptionObserver=Bt}var e,u,i,o,c=r(2),f=r(3),s=r(7),l=r(5),h=r(160),p=r(27),g=r(18),v=r(83),d=r(42),y=r(17),m=r(168),x=r(41).f,b=r(43),w=r(167),S=r(108),A=r(26),E=r(105),I=r(288),R=r(30),T=r(45),O=R("observable"),M="Observable",r="Subscription",P="SubscriptionObserver",R=T.getterFor,j=T.set,N=R(M),k=R(r),_=R(P),U=f.Array;a.prototype={type:r,clean:function(){var t=this.cleanup;if(t){this.cleanup=Bt;try{t()}catch(t){I(t)}}},close:function(){var t;l||(t=this.subscriptionObserver,this.facade.closed=!0,t&&(t.closed=!0)),this.observer=Bt},isClosed:function(){return this.observer===Bt}},(e=function(n,t){var r,e,o,i=j(this,new a(n));l||(this.closed=!1);try{(r=A(n,"start"))&&s(r,n,this)}catch(t){I(t)}if(!i.isClosed()){n=i.subscriptionObserver=new u(i);try{e=t(n),null!=(o=e)&&(i.cleanup=g(e.unsubscribe)?function(){o.unsubscribe()}:p(e))}catch(t){return void n.error(t)}i.isClosed()&&i.clean()}}).prototype=w({},{unsubscribe:function(){var t=k(this);t.isClosed()||(t.close(),t.clean())}}),l&&x(e.prototype,"closed",{configurable:!0,get:function(){return k(this).isClosed()}}),(u=function(t){j(this,{type:P,subscriptionState:t}),l||(this.closed=!1)}).prototype=w({},{next:function(t){var n,r=_(this).subscriptionState;if(!r.isClosed()){r=r.observer;try{(n=A(r,"next"))&&s(n,r,t)}catch(t){I(t)}}},error:function(t){var n,r,e=_(this).subscriptionState;if(!e.isClosed()){n=e.observer,e.close();try{(r=A(n,"error"))?s(r,n,t):I(t)}catch(t){I(t)}e.clean()}},complete:function(){var t,n,r=_(this).subscriptionState;if(!r.isClosed()){t=r.observer,r.close();try{(n=A(t,"complete"))&&s(n,t)}catch(t){I(t)}r.clean()}}}),l&&x(u.prototype,"closed",{configurable:!0,get:function(){return _(this).subscriptionState.isClosed()}}),w(o=(i=function(t){m(this,o),j(this,{type:M,subscriber:p(t)})}).prototype,{subscribe:function(t){var n=arguments.length;return new e(g(t)?{next:t,error:1=n.length?{value:Bt,done:!0}:(n=f(n,r),t.index+=n.length,{value:{codePoint:c(n,0),position:r},done:!1})});e({target:"String",proto:!0},{codePoints:function(){return new p(a(i(this)))}})},function(t,n,r){r(336)},function(t,n,r){r(344)},function(t,n,r){r(76)("asyncDispose")},function(t,n,r){r(76)("dispose")},function(t,n,r){r(76)("matcher")},function(t,n,r){r(76)("metadata")},function(t,n,r){r(76)("observable")},function(t,n,r){r(76)("patternMatch")},function(t,n,r){r(76)("replaceAll")},function(t,n,r){var i=r(20),a=r(175),u=r(417),e=r(370),o=r(172),c=r(388),f=o.aTypedArrayConstructor;(0,o.exportTypedArrayStaticMethod)("fromAsync",function(n){var r=this,t=arguments.length,e=1?@[\\\]^|]/,J=/[\0\t\n\r #/:<>?@[\\\]^|]/,X=/^[\u0000-\u0020]+|[\u0000-\u0020]+$/g,Q=/[\t\n\r]/g,tt=function(t){var n,r,e,o,i,a,u,c=U(t,".");if(c.length&&""==c[c.length-1]&&c.length--,4<(n=c.length))return t;for(r=[],e=0;e=R(256,5-n))return null}else if(255":1,"`":1}),at=Ct({},it,{"#":1,"?":1,"{":1,"}":1}),ut=Ct({},at,{"/":1,":":1,";":1,"=":1,"@":1,"[":1,"\\":1,"]":1,"^":1,"|":1}),ct=function(t,n){var r=l(t,0);return 32=h&&nb((y-p)/(i=e+1)))throw x(m);for(p+=(o-h)*i,h=o,v=0;vy)throw x(m);if(n==h){for(a=p,u=36;!(a<(f=u<=g?1:g+26<=u?26:u-g));)E(s,w(d(f+(c=a-f)%(f=36-f)))),a=b(c/f),u+=36;E(s,w(d(a))),g=function(t,n,r){var e=0;for(t=r?b(t/700):t>>1,t+=b(t/n);455n.key?1:-1}),t.updateURL()},forEach:function(t){for(var n,r=O(this).entries,e=g(t,1 { + if (!Array.isArray(names)) names = [names]; + // Make each value a power of 2 to allow for bitwise switches + const value = Math.pow(2, i); + const baseName = names[0]; + // Add values to lookup hash + lookupHash[baseName] = baseName; + lookupHash[value] = baseName; + // Create Number object to allow for primitive comparisons, JSON stringify and sub properties + // eslint-disable-next-line no-new-wrappers + const entry = new Number(value); + // Assign conversion values to entry + entry.toString = () => entry.asString; + entry.asString = baseName; + entry.asLowerCase = baseName.toLowerCase(); + entry.asUpperCase = baseName.toUpperCase(); + entry.asInteger = value; + // Reference lookup & storage function from each entry + entry.ENUM = ENUMERATION; + names.forEach((name, n) => { + // Add primary name as enumerable property + Object.defineProperty(ENUMERATION, name, { + enumerable: (n === 0), + value: entry + }); + lookupHash[name] = baseName; + }); + }); + // Freeze ENUM object + if (Object.freeze) Object.freeze(ENUMERATION); + return ENUMERATION; + }; + window.ENUM = ENUM; +})(); diff --git a/libraries/handlebars.min.js b/libraries/handlebars.min.js index 6a36f21..a9e012f 100644 --- a/libraries/handlebars.min.js +++ b/libraries/handlebars.min.js @@ -1,29 +1,29 @@ -/**! - - @license - handlebars v4.7.7 - -Copyright (C) 2011-2019 by Yehuda Katz - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. - -*/ -!function(a,b){"object"==typeof exports&&"object"==typeof module?module.exports=b():"function"==typeof define&&define.amd?define([],b):"object"==typeof exports?exports.Handlebars=b():a.Handlebars=b()}(this,function(){return function(a){function b(d){if(c[d])return c[d].exports;var e=c[d]={exports:{},id:d,loaded:!1};return a[d].call(e.exports,e,e.exports,b),e.loaded=!0,e.exports}var c={};return b.m=a,b.c=c,b.p="",b(0)}([function(a,b,c){"use strict";function d(){var a=r();return a.compile=function(b,c){return k.compile(b,c,a)},a.precompile=function(b,c){return k.precompile(b,c,a)},a.AST=i["default"],a.Compiler=k.Compiler,a.JavaScriptCompiler=m["default"],a.Parser=j.parser,a.parse=j.parse,a.parseWithoutProcessing=j.parseWithoutProcessing,a}var e=c(1)["default"];b.__esModule=!0;var f=c(2),g=e(f),h=c(45),i=e(h),j=c(46),k=c(51),l=c(52),m=e(l),n=c(49),o=e(n),p=c(44),q=e(p),r=g["default"].create,s=d();s.create=d,q["default"](s),s.Visitor=o["default"],s["default"]=s,b["default"]=s,a.exports=b["default"]},function(a,b){"use strict";b["default"]=function(a){return a&&a.__esModule?a:{"default":a}},b.__esModule=!0},function(a,b,c){"use strict";function d(){var a=new h.HandlebarsEnvironment;return n.extend(a,h),a.SafeString=j["default"],a.Exception=l["default"],a.Utils=n,a.escapeExpression=n.escapeExpression,a.VM=p,a.template=function(b){return p.template(b,a)},a}var e=c(3)["default"],f=c(1)["default"];b.__esModule=!0;var g=c(4),h=e(g),i=c(37),j=f(i),k=c(6),l=f(k),m=c(5),n=e(m),o=c(38),p=e(o),q=c(44),r=f(q),s=d();s.create=d,r["default"](s),s["default"]=s,b["default"]=s,a.exports=b["default"]},function(a,b){"use strict";b["default"]=function(a){if(a&&a.__esModule)return a;var b={};if(null!=a)for(var c in a)Object.prototype.hasOwnProperty.call(a,c)&&(b[c]=a[c]);return b["default"]=a,b},b.__esModule=!0},function(a,b,c){"use strict";function d(a,b,c){this.helpers=a||{},this.partials=b||{},this.decorators=c||{},i.registerDefaultHelpers(this),j.registerDefaultDecorators(this)}var e=c(1)["default"];b.__esModule=!0,b.HandlebarsEnvironment=d;var f=c(5),g=c(6),h=e(g),i=c(10),j=c(30),k=c(32),l=e(k),m=c(33),n="4.7.7";b.VERSION=n;var o=8;b.COMPILER_REVISION=o;var p=7;b.LAST_COMPATIBLE_COMPILER_REVISION=p;var q={1:"<= 1.0.rc.2",2:"== 1.0.0-rc.3",3:"== 1.0.0-rc.4",4:"== 1.x.x",5:"== 2.0.0-alpha.x",6:">= 2.0.0-beta.1",7:">= 4.0.0 <4.3.0",8:">= 4.3.0"};b.REVISION_CHANGES=q;var r="[object Object]";d.prototype={constructor:d,logger:l["default"],log:l["default"].log,registerHelper:function(a,b){if(f.toString.call(a)===r){if(b)throw new h["default"]("Arg not supported with multiple helpers");f.extend(this.helpers,a)}else this.helpers[a]=b},unregisterHelper:function(a){delete this.helpers[a]},registerPartial:function(a,b){if(f.toString.call(a)===r)f.extend(this.partials,a);else{if("undefined"==typeof b)throw new h["default"]('Attempting to register a partial called "'+a+'" as undefined');this.partials[a]=b}},unregisterPartial:function(a){delete this.partials[a]},registerDecorator:function(a,b){if(f.toString.call(a)===r){if(b)throw new h["default"]("Arg not supported with multiple decorators");f.extend(this.decorators,a)}else this.decorators[a]=b},unregisterDecorator:function(a){delete this.decorators[a]},resetLoggedPropertyAccesses:function(){m.resetLoggedProperties()}};var s=l["default"].log;b.log=s,b.createFrame=f.createFrame,b.logger=l["default"]},function(a,b){"use strict";function c(a){return k[a]}function d(a){for(var b=1;b":">",'"':""","'":"'","`":"`","=":"="},l=/[&<>"'`=]/g,m=/[&<>"'`=]/,n=Object.prototype.toString;b.toString=n;var o=function(a){return"function"==typeof a};o(/x/)&&(b.isFunction=o=function(a){return"function"==typeof a&&"[object Function]"===n.call(a)}),b.isFunction=o;var p=Array.isArray||function(a){return!(!a||"object"!=typeof a)&&"[object Array]"===n.call(a)};b.isArray=p},function(a,b,c){"use strict";function d(a,b){var c=b&&b.loc,g=void 0,h=void 0,i=void 0,j=void 0;c&&(g=c.start.line,h=c.end.line,i=c.start.column,j=c.end.column,a+=" - "+g+":"+i);for(var k=Error.prototype.constructor.call(this,a),l=0;l0?(c.ids&&(c.ids=[c.name]),a.helpers.each(b,c)):e(this);if(c.data&&c.ids){var g=d.createFrame(c.data);g.contextPath=d.appendContextPath(c.data.contextPath,c.name),c={data:g}}return f(b,c)})},a.exports=b["default"]},function(a,b,c){(function(d){"use strict";var e=c(13)["default"],f=c(1)["default"];b.__esModule=!0;var g=c(5),h=c(6),i=f(h);b["default"]=function(a){a.registerHelper("each",function(a,b){function c(b,c,d){l&&(l.key=b,l.index=c,l.first=0===c,l.last=!!d,m&&(l.contextPath=m+b)),k+=f(a[b],{data:l,blockParams:g.blockParams([a[b],b],[m+b,null])})}if(!b)throw new i["default"]("Must pass iterator to #each");var f=b.fn,h=b.inverse,j=0,k="",l=void 0,m=void 0;if(b.data&&b.ids&&(m=g.appendContextPath(b.data.contextPath,b.ids[0])+"."),g.isFunction(a)&&(a=a.call(this)),b.data&&(l=g.createFrame(b.data)),a&&"object"==typeof a)if(g.isArray(a))for(var n=a.length;j=0?b:parseInt(a,10)}return a},log:function(a){if(a=e.lookupLevel(a),"undefined"!=typeof console&&e.lookupLevel(e.level)<=a){var b=e.methodMap[a];console[b]||(b="log");for(var c=arguments.length,d=Array(c>1?c-1:0),f=1;f=v.LAST_COMPATIBLE_COMPILER_REVISION&&b<=v.COMPILER_REVISION)){if(b2&&v.push("'"+this.terminals_[s]+"'");x=this.lexer.showPosition?"Parse error on line "+(i+1)+":\n"+this.lexer.showPosition()+"\nExpecting "+v.join(", ")+", got '"+(this.terminals_[n]||n)+"'":"Parse error on line "+(i+1)+": Unexpected "+(1==n?"end of input":"'"+(this.terminals_[n]||n)+"'"),this.parseError(x,{text:this.lexer.match,token:this.terminals_[n]||n,line:this.lexer.yylineno,loc:l,expected:v})}}if(q[0]instanceof Array&&q.length>1)throw new Error("Parse Error: multiple actions possible at state: "+p+", token: "+n);switch(q[0]){case 1:d.push(n),e.push(this.lexer.yytext),f.push(this.lexer.yylloc),d.push(q[1]),n=null,o?(n=o,o=null):(j=this.lexer.yyleng,h=this.lexer.yytext,i=this.lexer.yylineno,l=this.lexer.yylloc,k>0&&k--);break;case 2:if(t=this.productions_[q[1]][1],w.$=e[e.length-t],w._$={first_line:f[f.length-(t||1)].first_line,last_line:f[f.length-1].last_line,first_column:f[f.length-(t||1)].first_column,last_column:f[f.length-1].last_column},m&&(w._$.range=[f[f.length-(t||1)].range[0],f[f.length-1].range[1]]),r=this.performAction.call(w,h,j,i,this.yy,q[1],e,f),"undefined"!=typeof r)return r;t&&(d=d.slice(0,-1*t*2),e=e.slice(0,-1*t),f=f.slice(0,-1*t)),d.push(this.productions_[q[1]][0]),e.push(w.$),f.push(w._$),u=g[d[d.length-2]][d[d.length-1]],d.push(u);break;case 3:return!0}}return!0}},c=function(){var a={EOF:1,parseError:function(a,b){if(!this.yy.parser)throw new Error(a);this.yy.parser.parseError(a,b)},setInput:function(a){return this._input=a,this._more=this._less=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var a=this._input[0];this.yytext+=a,this.yyleng++,this.offset++,this.match+=a,this.matched+=a;var b=a.match(/(?:\r\n?|\n).*/g);return b?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),a},unput:function(a){var b=a.length,c=a.split(/(?:\r\n?|\n)/g);this._input=a+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-b-1),this.offset-=b;var d=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),c.length-1&&(this.yylineno-=c.length-1);var e=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:c?(c.length===d.length?this.yylloc.first_column:0)+d[d.length-c.length].length-c[0].length:this.yylloc.first_column-b},this.options.ranges&&(this.yylloc.range=[e[0],e[0]+this.yyleng-b]),this},more:function(){return this._more=!0,this},less:function(a){this.unput(this.match.slice(a))},pastInput:function(){var a=this.matched.substr(0,this.matched.length-this.match.length);return(a.length>20?"...":"")+a.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var a=this.match;return a.length<20&&(a+=this._input.substr(0,20-a.length)),(a.substr(0,20)+(a.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var a=this.pastInput(),b=new Array(a.length+1).join("-");return a+this.upcomingInput()+"\n"+b+"^"},next:function(){if(this.done)return this.EOF;this._input||(this.done=!0);var a,b,c,d,e;this._more||(this.yytext="",this.match="");for(var f=this._currentRules(),g=0;gb[0].length)||(b=c,d=g,this.options.flex));g++);return b?(e=b[0].match(/(?:\r\n?|\n).*/g),e&&(this.yylineno+=e.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:e?e[e.length-1].length-e[e.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+b[0].length},this.yytext+=b[0],this.match+=b[0],this.matches=b,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._input=this._input.slice(b[0].length),this.matched+=b[0],a=this.performAction.call(this,this.yy,this,f[d],this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),a?a:void 0):""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var a=this.next();return"undefined"!=typeof a?a:this.lex()},begin:function(a){this.conditionStack.push(a)},popState:function(){return this.conditionStack.pop()},_currentRules:function(){return this.conditions[this.conditionStack[this.conditionStack.length-1]].rules},topState:function(){return this.conditionStack[this.conditionStack.length-2]},pushState:function(a){this.begin(a)}};return a.options={},a.performAction=function(a,b,c,d){function e(a,c){return b.yytext=b.yytext.substring(a,b.yyleng-c+a)}switch(c){case 0:if("\\\\"===b.yytext.slice(-2)?(e(0,1),this.begin("mu")):"\\"===b.yytext.slice(-1)?(e(0,1),this.begin("emu")):this.begin("mu"),b.yytext)return 15;break;case 1:return 15;case 2:return this.popState(),15;case 3:return this.begin("raw"),15;case 4:return this.popState(),"raw"===this.conditionStack[this.conditionStack.length-1]?15:(e(5,9),"END_RAW_BLOCK");case 5:return 15;case 6:return this.popState(),14;case 7:return 65;case 8:return 68;case 9:return 19;case 10:return this.popState(),this.begin("raw"),23;case 11:return 55;case 12:return 60;case 13:return 29;case 14:return 47;case 15:return this.popState(),44;case 16:return this.popState(),44;case 17:return 34;case 18:return 39;case 19:return 51;case 20:return 48;case 21:this.unput(b.yytext),this.popState(),this.begin("com");break;case 22:return this.popState(),14;case 23:return 48;case 24:return 73;case 25:return 72;case 26:return 72;case 27:return 87;case 28:break;case 29:return this.popState(),54;case 30:return this.popState(),33;case 31:return b.yytext=e(1,2).replace(/\\"/g,'"'),80;case 32:return b.yytext=e(1,2).replace(/\\'/g,"'"),80;case 33:return 85;case 34:return 82;case 35:return 82;case 36:return 83;case 37:return 84;case 38:return 81;case 39:return 75;case 40:return 77;case 41:return 72;case 42:return b.yytext=b.yytext.replace(/\\([\\\]])/g,"$1"),72;case 43:return"INVALID";case 44:return 5}},a.rules=[/^(?:[^\x00]*?(?=(\{\{)))/,/^(?:[^\x00]+)/,/^(?:[^\x00]{2,}?(?=(\{\{|\\\{\{|\\\\\{\{|$)))/,/^(?:\{\{\{\{(?=[^\/]))/,/^(?:\{\{\{\{\/[^\s!"#%-,\.\/;->@\[-\^`\{-~]+(?=[=}\s\/.])\}\}\}\})/,/^(?:[^\x00]+?(?=(\{\{\{\{)))/,/^(?:[\s\S]*?--(~)?\}\})/,/^(?:\()/,/^(?:\))/,/^(?:\{\{\{\{)/,/^(?:\}\}\}\})/,/^(?:\{\{(~)?>)/,/^(?:\{\{(~)?#>)/,/^(?:\{\{(~)?#\*?)/,/^(?:\{\{(~)?\/)/,/^(?:\{\{(~)?\^\s*(~)?\}\})/,/^(?:\{\{(~)?\s*else\s*(~)?\}\})/,/^(?:\{\{(~)?\^)/,/^(?:\{\{(~)?\s*else\b)/,/^(?:\{\{(~)?\{)/,/^(?:\{\{(~)?&)/,/^(?:\{\{(~)?!--)/,/^(?:\{\{(~)?![\s\S]*?\}\})/,/^(?:\{\{(~)?\*?)/,/^(?:=)/,/^(?:\.\.)/,/^(?:\.(?=([=~}\s\/.)|])))/,/^(?:[\/.])/,/^(?:\s+)/,/^(?:\}(~)?\}\})/,/^(?:(~)?\}\})/,/^(?:"(\\["]|[^"])*")/,/^(?:'(\\[']|[^'])*')/,/^(?:@)/,/^(?:true(?=([~}\s)])))/,/^(?:false(?=([~}\s)])))/,/^(?:undefined(?=([~}\s)])))/,/^(?:null(?=([~}\s)])))/,/^(?:-?[0-9]+(?:\.[0-9]+)?(?=([~}\s)])))/,/^(?:as\s+\|)/,/^(?:\|)/,/^(?:([^\s!"#%-,\.\/;->@\[-\^`\{-~]+(?=([=~}\s\/.)|]))))/,/^(?:\[(\\\]|[^\]])*\])/,/^(?:.)/,/^(?:$)/],a.conditions={mu:{rules:[7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44],inclusive:!1},emu:{rules:[2],inclusive:!1},com:{rules:[6],inclusive:!1},raw:{rules:[3,4,5],inclusive:!1},INITIAL:{rules:[0,1,44],inclusive:!0}},a}();return b.lexer=c,a.prototype=b,b.Parser=a,new a}();b["default"]=c,a.exports=b["default"]},function(a,b,c){"use strict";function d(){var a=arguments.length<=0||void 0===arguments[0]?{}:arguments[0];this.options=a}function e(a,b,c){void 0===b&&(b=a.length);var d=a[b-1],e=a[b-2];return d?"ContentStatement"===d.type?(e||!c?/\r?\n\s*?$/:/(^|\r?\n)\s*?$/).test(d.original):void 0:c}function f(a,b,c){void 0===b&&(b=-1);var d=a[b+1],e=a[b+2];return d?"ContentStatement"===d.type?(e||!c?/^\s*?\r?\n/:/^\s*?(\r?\n|$)/).test(d.original):void 0:c}function g(a,b,c){var d=a[null==b?0:b+1];if(d&&"ContentStatement"===d.type&&(c||!d.rightStripped)){var e=d.value;d.value=d.value.replace(c?/^\s+/:/^[ \t]*\r?\n?/,""),d.rightStripped=d.value!==e}}function h(a,b,c){var d=a[null==b?a.length-1:b-1];if(d&&"ContentStatement"===d.type&&(c||!d.leftStripped)){var e=d.value;return d.value=d.value.replace(c?/\s+$/:/[ \t]+$/,""),d.leftStripped=d.value!==e,d.leftStripped}}var i=c(1)["default"];b.__esModule=!0;var j=c(49),k=i(j);d.prototype=new k["default"],d.prototype.Program=function(a){var b=!this.options.ignoreStandalone,c=!this.isRootSeen;this.isRootSeen=!0;for(var d=a.body,i=0,j=d.length;i0)throw new q["default"]("Invalid path: "+d,{loc:c});".."===i&&f++}}return{type:"PathExpression",data:a,depth:f,parts:e,original:d,loc:c}}function j(a,b,c,d,e,f){var g=d.charAt(3)||d.charAt(2),h="{"!==g&&"&"!==g,i=/\*/.test(d);return{type:i?"Decorator":"MustacheStatement",path:a,params:b,hash:c,escaped:h,strip:e,loc:this.locInfo(f)}}function k(a,b,c,e){d(a,c),e=this.locInfo(e);var f={type:"Program",body:b,strip:{},loc:e};return{type:"BlockStatement",path:a.path,params:a.params,hash:a.hash,program:f,openStrip:{},inverseStrip:{},closeStrip:{},loc:e}}function l(a,b,c,e,f,g){e&&e.path&&d(a,e);var h=/\*/.test(a.open);b.blockParams=a.blockParams;var i=void 0,j=void 0;if(c){if(h)throw new q["default"]("Unexpected inverse block on decorator",c);c.chain&&(c.program.body[0].closeStrip=e.strip),j=c.strip,i=c.program}return f&&(f=i,i=b,b=f),{type:h?"DecoratorBlock":"BlockStatement",path:a.path,params:a.params,hash:a.hash,program:b,inverse:i,openStrip:a.strip,inverseStrip:j,closeStrip:e&&e.strip,loc:this.locInfo(g)}}function m(a,b){if(!b&&a.length){var c=a[0].loc,d=a[a.length-1].loc;c&&d&&(b={source:c.source,start:{line:c.start.line,column:c.start.column},end:{line:d.end.line,column:d.end.column}})}return{type:"Program",body:a,strip:{},loc:b}}function n(a,b,c,e){return d(a,c),{type:"PartialBlockStatement",name:a.path,params:a.params,hash:a.hash,program:b,openStrip:a.strip,closeStrip:c&&c.strip,loc:this.locInfo(e)}}var o=c(1)["default"];b.__esModule=!0,b.SourceLocation=e,b.id=f,b.stripFlags=g,b.stripComment=h,b.preparePath=i,b.prepareMustache=j,b.prepareRawBlock=k,b.prepareBlock=l,b.prepareProgram=m,b.preparePartialBlock=n;var p=c(6),q=o(p)},function(a,b,c){"use strict";function d(){}function e(a,b,c){if(null==a||"string"!=typeof a&&"Program"!==a.type)throw new l["default"]("You must pass a string or Handlebars AST to Handlebars.precompile. You passed "+a);b=b||{},"data"in b||(b.data=!0),b.compat&&(b.useDepths=!0);var d=c.parse(a,b),e=(new c.Compiler).compile(d,b);return(new c.JavaScriptCompiler).compile(e,b)}function f(a,b,c){function d(){var d=c.parse(a,b),e=(new c.Compiler).compile(d,b),f=(new c.JavaScriptCompiler).compile(e,b,void 0,!0);return c.template(f)}function e(a,b){return f||(f=d()),f.call(this,a,b)}if(void 0===b&&(b={}),null==a||"string"!=typeof a&&"Program"!==a.type)throw new l["default"]("You must pass a string or Handlebars AST to Handlebars.compile. You passed "+a);b=m.extend({},b),"data"in b||(b.data=!0),b.compat&&(b.useDepths=!0);var f=void 0;return e._setup=function(a){return f||(f=d()),f._setup(a)},e._child=function(a,b,c,e){return f||(f=d()),f._child(a,b,c,e)},e}function g(a,b){if(a===b)return!0;if(m.isArray(a)&&m.isArray(b)&&a.length===b.length){for(var c=0;c1)throw new l["default"]("Unsupported number of partial arguments: "+c.length,a);c.length||(this.options.explicitPartialContext?this.opcode("pushLiteral","undefined"):c.push({type:"PathExpression",parts:[],depth:0}));var d=a.name.original,e="SubExpression"===a.name.type;e&&this.accept(a.name),this.setupFullMustacheParams(a,b,void 0,!0);var f=a.indent||"";this.options.preventIndent&&f&&(this.opcode("appendContent",f),f=""),this.opcode("invokePartial",e,d,f),this.opcode("append")},PartialBlockStatement:function(a){this.PartialStatement(a)},MustacheStatement:function(a){this.SubExpression(a),a.escaped&&!this.options.noEscape?this.opcode("appendEscaped"):this.opcode("append")},Decorator:function(a){this.DecoratorBlock(a)},ContentStatement:function(a){a.value&&this.opcode("appendContent",a.value)},CommentStatement:function(){},SubExpression:function(a){h(a);var b=this.classifySexpr(a);"simple"===b?this.simpleSexpr(a):"helper"===b?this.helperSexpr(a):this.ambiguousSexpr(a)},ambiguousSexpr:function(a,b,c){var d=a.path,e=d.parts[0],f=null!=b||null!=c;this.opcode("getContext",d.depth),this.opcode("pushProgram",b),this.opcode("pushProgram",c),d.strict=!0,this.accept(d),this.opcode("invokeAmbiguous",e,f)},simpleSexpr:function(a){var b=a.path;b.strict=!0,this.accept(b),this.opcode("resolvePossibleLambda")},helperSexpr:function(a,b,c){var d=this.setupFullMustacheParams(a,b,c),e=a.path,f=e.parts[0];if(this.options.knownHelpers[f])this.opcode("invokeKnownHelper",d.length,f);else{if(this.options.knownHelpersOnly)throw new l["default"]("You specified knownHelpersOnly, but used the unknown helper "+f,a);e.strict=!0,e.falsy=!0,this.accept(e),this.opcode("invokeHelper",d.length,e.original,o["default"].helpers.simpleId(e))}},PathExpression:function(a){this.addDepth(a.depth),this.opcode("getContext",a.depth);var b=a.parts[0],c=o["default"].helpers.scopedId(a),d=!a.depth&&!c&&this.blockParamIndex(b);d?this.opcode("lookupBlockParam",d,a.parts):b?a.data?(this.options.data=!0,this.opcode("lookupData",a.depth,a.parts,a.strict)):this.opcode("lookupOnContext",a.parts,a.falsy,a.strict,c):this.opcode("pushContext")},StringLiteral:function(a){this.opcode("pushString",a.value)},NumberLiteral:function(a){this.opcode("pushLiteral",a.value)},BooleanLiteral:function(a){this.opcode("pushLiteral",a.value)},UndefinedLiteral:function(){this.opcode("pushLiteral","undefined")},NullLiteral:function(){this.opcode("pushLiteral","null")},Hash:function(a){var b=a.pairs,c=0,d=b.length;for(this.opcode("pushHash");c=0)return[b,e]}}}},function(a,b,c){"use strict";function d(a){this.value=a}function e(){}function f(a,b,c,d){var e=b.popStack(),f=0,g=c.length;for(a&&g--;f0&&(c+=", "+d.join(", "));var e=0;g(this.aliases).forEach(function(a){var d=b.aliases[a];d.children&&d.referenceCount>1&&(c+=", alias"+ ++e+"="+a,d.children[0]="alias"+e)}),this.lookupPropertyFunctionIsUsed&&(c+=", "+this.lookupPropertyFunctionVarDeclaration());var f=["container","depth0","helpers","partials","data"];(this.useBlockParams||this.useDepths)&&f.push("blockParams"),this.useDepths&&f.push("depths");var h=this.mergeSource(c);return a?(f.push(h),Function.apply(this,f)):this.source.wrap(["function(",f.join(","),") {\n ",h,"}"])},mergeSource:function(a){var b=this.environment.isSimple,c=!this.forceBuffer,d=void 0,e=void 0,f=void 0,g=void 0;return this.source.each(function(a){a.appendToBuffer?(f?a.prepend(" + "):f=a,g=a):(f&&(e?f.prepend("buffer += "):d=!0,g.add(";"),f=g=void 0),e=!0,b||(c=!1))}),c?f?(f.prepend("return "),g.add(";")):e||this.source.push('return "";'):(a+=", buffer = "+(d?"":this.initializeBuffer()),f?(f.prepend("return buffer + "),g.add(";")):this.source.push("return buffer;")),a&&this.source.prepend("var "+a.substring(2)+(d?"":";\n")),this.source.merge()},lookupPropertyFunctionVarDeclaration:function(){return"\n lookupProperty = container.lookupProperty || function(parent, propertyName) {\n if (Object.prototype.hasOwnProperty.call(parent, propertyName)) {\n return parent[propertyName];\n }\n return undefined\n }\n ".trim()},blockValue:function(a){var b=this.aliasable("container.hooks.blockHelperMissing"),c=[this.contextName(0)];this.setupHelperArgs(a,0,c);var d=this.popStack();c.splice(1,0,d),this.push(this.source.functionCall(b,"call",c))},ambiguousBlockValue:function(){var a=this.aliasable("container.hooks.blockHelperMissing"),b=[this.contextName(0)];this.setupHelperArgs("",0,b,!0),this.flushInline();var c=this.topStack();b.splice(1,0,c),this.pushSource(["if (!",this.lastHelper,") { ",c," = ",this.source.functionCall(a,"call",b),"}"])},appendContent:function(a){this.pendingContent?a=this.pendingContent+a:this.pendingLocation=this.source.currentLocation,this.pendingContent=a},append:function(){if(this.isInline())this.replaceStack(function(a){return[" != null ? ",a,' : ""']}),this.pushSource(this.appendToBuffer(this.popStack()));else{var a=this.popStack();this.pushSource(["if (",a," != null) { ",this.appendToBuffer(a,void 0,!0)," }"]),this.environment.isSimple&&this.pushSource(["else { ",this.appendToBuffer("''",void 0,!0)," }"])}},appendEscaped:function(){this.pushSource(this.appendToBuffer([this.aliasable("container.escapeExpression"),"(",this.popStack(),")"]))},getContext:function(a){this.lastContext=a},pushContext:function(){this.pushStackLiteral(this.contextName(this.lastContext))},lookupOnContext:function(a,b,c,d){var e=0;d||!this.options.compat||this.lastContext?this.pushContext():this.push(this.depthedLookup(a[e++])),this.resolvePath("context",a,e,b,c)},lookupBlockParam:function(a,b){this.useBlockParams=!0,this.push(["blockParams[",a[0],"][",a[1],"]"]),this.resolvePath("context",b,1)},lookupData:function(a,b,c){a?this.pushStackLiteral("container.data(data, "+a+")"):this.pushStackLiteral("data"),this.resolvePath("data",b,0,!0,c)},resolvePath:function(a,b,c,d,e){var g=this;if(this.options.strict||this.options.assumeObjects)return void this.push(f(this.options.strict&&e,this,b,a));for(var h=b.length;cthis.stackVars.length&&this.stackVars.push("stack"+this.stackSlot),this.topStackName()},topStackName:function(){return"stack"+this.stackSlot},flushInline:function(){var a=this.inlineStack;this.inlineStack=[];for(var b=0,c=a.length;b= 2.0.0-beta.1",7:">= 4.0.0 <4.3.0",8:">= 4.3.0"};b.REVISION_CHANGES=q;var r="[object Object]";d.prototype={constructor:d,logger:l["default"],log:l["default"].log,registerHelper:function(a,b){if(f.toString.call(a)===r){if(b)throw new h["default"]("Arg not supported with multiple helpers");f.extend(this.helpers,a)}else this.helpers[a]=b},unregisterHelper:function(a){delete this.helpers[a]},registerPartial:function(a,b){if(f.toString.call(a)===r)f.extend(this.partials,a);else{if("undefined"==typeof b)throw new h["default"]('Attempting to register a partial called "'+a+'" as undefined');this.partials[a]=b}},unregisterPartial:function(a){delete this.partials[a]},registerDecorator:function(a,b){if(f.toString.call(a)===r){if(b)throw new h["default"]("Arg not supported with multiple decorators");f.extend(this.decorators,a)}else this.decorators[a]=b},unregisterDecorator:function(a){delete this.decorators[a]},resetLoggedPropertyAccesses:function(){m.resetLoggedProperties()}};var s=l["default"].log;b.log=s,b.createFrame=f.createFrame,b.logger=l["default"]},function(a,b){"use strict";function c(a){return k[a]}function d(a){for(var b=1;b":">",'"':""","'":"'","`":"`","=":"="},l=/[&<>"'`=]/g,m=/[&<>"'`=]/,n=Object.prototype.toString;b.toString=n;var o=function(a){return"function"==typeof a};o(/x/)&&(b.isFunction=o=function(a){return"function"==typeof a&&"[object Function]"===n.call(a)}),b.isFunction=o;var p=Array.isArray||function(a){return!(!a||"object"!=typeof a)&&"[object Array]"===n.call(a)};b.isArray=p},function(a,b,c){"use strict";function d(a,b){var c=b&&b.loc,g=void 0,h=void 0,i=void 0,j=void 0;c&&(g=c.start.line,h=c.end.line,i=c.start.column,j=c.end.column,a+=" - "+g+":"+i);for(var k=Error.prototype.constructor.call(this,a),l=0;l0?(c.ids&&(c.ids=[c.name]),a.helpers.each(b,c)):e(this);if(c.data&&c.ids){var g=d.createFrame(c.data);g.contextPath=d.appendContextPath(c.data.contextPath,c.name),c={data:g}}return f(b,c)})},a.exports=b["default"]},function(a,b,c){(function(d){"use strict";var e=c(13)["default"],f=c(1)["default"];b.__esModule=!0;var g=c(5),h=c(6),i=f(h);b["default"]=function(a){a.registerHelper("each",function(a,b){function c(b,c,d){l&&(l.key=b,l.index=c,l.first=0===c,l.last=!!d,m&&(l.contextPath=m+b)),k+=f(a[b],{data:l,blockParams:g.blockParams([a[b],b],[m+b,null])})}if(!b)throw new i["default"]("Must pass iterator to #each");var f=b.fn,h=b.inverse,j=0,k="",l=void 0,m=void 0;if(b.data&&b.ids&&(m=g.appendContextPath(b.data.contextPath,b.ids[0])+"."),g.isFunction(a)&&(a=a.call(this)),b.data&&(l=g.createFrame(b.data)),a&&"object"==typeof a)if(g.isArray(a))for(var n=a.length;j=0?b:parseInt(a,10)}return a},log:function(a){if(a=e.lookupLevel(a),"undefined"!=typeof console&&e.lookupLevel(e.level)<=a){var b=e.methodMap[a];console[b]||(b="log");for(var c=arguments.length,d=Array(c>1?c-1:0),f=1;f=v.LAST_COMPATIBLE_COMPILER_REVISION&&b<=v.COMPILER_REVISION)){if(b2&&v.push("'"+this.terminals_[s]+"'");x=this.lexer.showPosition?"Parse error on line "+(i+1)+":\n"+this.lexer.showPosition()+"\nExpecting "+v.join(", ")+", got '"+(this.terminals_[n]||n)+"'":"Parse error on line "+(i+1)+": Unexpected "+(1==n?"end of input":"'"+(this.terminals_[n]||n)+"'"),this.parseError(x,{text:this.lexer.match,token:this.terminals_[n]||n,line:this.lexer.yylineno,loc:l,expected:v})}}if(q[0]instanceof Array&&q.length>1)throw new Error("Parse Error: multiple actions possible at state: "+p+", token: "+n);switch(q[0]){case 1:d.push(n),e.push(this.lexer.yytext),f.push(this.lexer.yylloc),d.push(q[1]),n=null,o?(n=o,o=null):(j=this.lexer.yyleng,h=this.lexer.yytext,i=this.lexer.yylineno,l=this.lexer.yylloc,k>0&&k--);break;case 2:if(t=this.productions_[q[1]][1],w.$=e[e.length-t],w._$={first_line:f[f.length-(t||1)].first_line,last_line:f[f.length-1].last_line,first_column:f[f.length-(t||1)].first_column,last_column:f[f.length-1].last_column},m&&(w._$.range=[f[f.length-(t||1)].range[0],f[f.length-1].range[1]]),r=this.performAction.call(w,h,j,i,this.yy,q[1],e,f),"undefined"!=typeof r)return r;t&&(d=d.slice(0,-1*t*2),e=e.slice(0,-1*t),f=f.slice(0,-1*t)),d.push(this.productions_[q[1]][0]),e.push(w.$),f.push(w._$),u=g[d[d.length-2]][d[d.length-1]],d.push(u);break;case 3:return!0}}return!0}},c=function(){var a={EOF:1,parseError:function(a,b){if(!this.yy.parser)throw new Error(a);this.yy.parser.parseError(a,b)},setInput:function(a){return this._input=a,this._more=this._less=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var a=this._input[0];this.yytext+=a,this.yyleng++,this.offset++,this.match+=a,this.matched+=a;var b=a.match(/(?:\r\n?|\n).*/g);return b?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),a},unput:function(a){var b=a.length,c=a.split(/(?:\r\n?|\n)/g);this._input=a+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-b-1),this.offset-=b;var d=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),c.length-1&&(this.yylineno-=c.length-1);var e=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:c?(c.length===d.length?this.yylloc.first_column:0)+d[d.length-c.length].length-c[0].length:this.yylloc.first_column-b},this.options.ranges&&(this.yylloc.range=[e[0],e[0]+this.yyleng-b]),this},more:function(){return this._more=!0,this},less:function(a){this.unput(this.match.slice(a))},pastInput:function(){var a=this.matched.substr(0,this.matched.length-this.match.length);return(a.length>20?"...":"")+a.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var a=this.match;return a.length<20&&(a+=this._input.substr(0,20-a.length)),(a.substr(0,20)+(a.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var a=this.pastInput(),b=new Array(a.length+1).join("-");return a+this.upcomingInput()+"\n"+b+"^"},next:function(){if(this.done)return this.EOF;this._input||(this.done=!0);var a,b,c,d,e;this._more||(this.yytext="",this.match="");for(var f=this._currentRules(),g=0;gb[0].length)||(b=c,d=g,this.options.flex));g++);return b?(e=b[0].match(/(?:\r\n?|\n).*/g),e&&(this.yylineno+=e.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:e?e[e.length-1].length-e[e.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+b[0].length},this.yytext+=b[0],this.match+=b[0],this.matches=b,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._input=this._input.slice(b[0].length),this.matched+=b[0],a=this.performAction.call(this,this.yy,this,f[d],this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),a?a:void 0):""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var a=this.next();return"undefined"!=typeof a?a:this.lex()},begin:function(a){this.conditionStack.push(a)},popState:function(){return this.conditionStack.pop()},_currentRules:function(){return this.conditions[this.conditionStack[this.conditionStack.length-1]].rules},topState:function(){return this.conditionStack[this.conditionStack.length-2]},pushState:function(a){this.begin(a)}};return a.options={},a.performAction=function(a,b,c,d){function e(a,c){return b.yytext=b.yytext.substring(a,b.yyleng-c+a)}switch(c){case 0:if("\\\\"===b.yytext.slice(-2)?(e(0,1),this.begin("mu")):"\\"===b.yytext.slice(-1)?(e(0,1),this.begin("emu")):this.begin("mu"),b.yytext)return 15;break;case 1:return 15;case 2:return this.popState(),15;case 3:return this.begin("raw"),15;case 4:return this.popState(),"raw"===this.conditionStack[this.conditionStack.length-1]?15:(e(5,9),"END_RAW_BLOCK");case 5:return 15;case 6:return this.popState(),14;case 7:return 65;case 8:return 68;case 9:return 19;case 10:return this.popState(),this.begin("raw"),23;case 11:return 55;case 12:return 60;case 13:return 29;case 14:return 47;case 15:return this.popState(),44;case 16:return this.popState(),44;case 17:return 34;case 18:return 39;case 19:return 51;case 20:return 48;case 21:this.unput(b.yytext),this.popState(),this.begin("com");break;case 22:return this.popState(),14;case 23:return 48;case 24:return 73;case 25:return 72;case 26:return 72;case 27:return 87;case 28:break;case 29:return this.popState(),54;case 30:return this.popState(),33;case 31:return b.yytext=e(1,2).replace(/\\"/g,'"'),80;case 32:return b.yytext=e(1,2).replace(/\\'/g,"'"),80;case 33:return 85;case 34:return 82;case 35:return 82;case 36:return 83;case 37:return 84;case 38:return 81;case 39:return 75;case 40:return 77;case 41:return 72;case 42:return b.yytext=b.yytext.replace(/\\([\\\]])/g,"$1"),72;case 43:return"INVALID";case 44:return 5}},a.rules=[/^(?:[^\x00]*?(?=(\{\{)))/,/^(?:[^\x00]+)/,/^(?:[^\x00]{2,}?(?=(\{\{|\\\{\{|\\\\\{\{|$)))/,/^(?:\{\{\{\{(?=[^\/]))/,/^(?:\{\{\{\{\/[^\s!"#%-,\.\/;->@\[-\^`\{-~]+(?=[=}\s\/.])\}\}\}\})/,/^(?:[^\x00]+?(?=(\{\{\{\{)))/,/^(?:[\s\S]*?--(~)?\}\})/,/^(?:\()/,/^(?:\))/,/^(?:\{\{\{\{)/,/^(?:\}\}\}\})/,/^(?:\{\{(~)?>)/,/^(?:\{\{(~)?#>)/,/^(?:\{\{(~)?#\*?)/,/^(?:\{\{(~)?\/)/,/^(?:\{\{(~)?\^\s*(~)?\}\})/,/^(?:\{\{(~)?\s*else\s*(~)?\}\})/,/^(?:\{\{(~)?\^)/,/^(?:\{\{(~)?\s*else\b)/,/^(?:\{\{(~)?\{)/,/^(?:\{\{(~)?&)/,/^(?:\{\{(~)?!--)/,/^(?:\{\{(~)?![\s\S]*?\}\})/,/^(?:\{\{(~)?\*?)/,/^(?:=)/,/^(?:\.\.)/,/^(?:\.(?=([=~}\s\/.)|])))/,/^(?:[\/.])/,/^(?:\s+)/,/^(?:\}(~)?\}\})/,/^(?:(~)?\}\})/,/^(?:"(\\["]|[^"])*")/,/^(?:'(\\[']|[^'])*')/,/^(?:@)/,/^(?:true(?=([~}\s)])))/,/^(?:false(?=([~}\s)])))/,/^(?:undefined(?=([~}\s)])))/,/^(?:null(?=([~}\s)])))/,/^(?:-?[0-9]+(?:\.[0-9]+)?(?=([~}\s)])))/,/^(?:as\s+\|)/,/^(?:\|)/,/^(?:([^\s!"#%-,\.\/;->@\[-\^`\{-~]+(?=([=~}\s\/.)|]))))/,/^(?:\[(\\\]|[^\]])*\])/,/^(?:.)/,/^(?:$)/],a.conditions={mu:{rules:[7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44],inclusive:!1},emu:{rules:[2],inclusive:!1},com:{rules:[6],inclusive:!1},raw:{rules:[3,4,5],inclusive:!1},INITIAL:{rules:[0,1,44],inclusive:!0}},a}();return b.lexer=c,a.prototype=b,b.Parser=a,new a}();b["default"]=c,a.exports=b["default"]},function(a,b,c){"use strict";function d(){var a=arguments.length<=0||void 0===arguments[0]?{}:arguments[0];this.options=a}function e(a,b,c){void 0===b&&(b=a.length);var d=a[b-1],e=a[b-2];return d?"ContentStatement"===d.type?(e||!c?/\r?\n\s*?$/:/(^|\r?\n)\s*?$/).test(d.original):void 0:c}function f(a,b,c){void 0===b&&(b=-1);var d=a[b+1],e=a[b+2];return d?"ContentStatement"===d.type?(e||!c?/^\s*?\r?\n/:/^\s*?(\r?\n|$)/).test(d.original):void 0:c}function g(a,b,c){var d=a[null==b?0:b+1];if(d&&"ContentStatement"===d.type&&(c||!d.rightStripped)){var e=d.value;d.value=d.value.replace(c?/^\s+/:/^[ \t]*\r?\n?/,""),d.rightStripped=d.value!==e}}function h(a,b,c){var d=a[null==b?a.length-1:b-1];if(d&&"ContentStatement"===d.type&&(c||!d.leftStripped)){var e=d.value;return d.value=d.value.replace(c?/\s+$/:/[ \t]+$/,""),d.leftStripped=d.value!==e,d.leftStripped}}var i=c(1)["default"];b.__esModule=!0;var j=c(49),k=i(j);d.prototype=new k["default"],d.prototype.Program=function(a){var b=!this.options.ignoreStandalone,c=!this.isRootSeen;this.isRootSeen=!0;for(var d=a.body,i=0,j=d.length;i0)throw new q["default"]("Invalid path: "+d,{loc:c});".."===i&&f++}}return{type:"PathExpression",data:a,depth:f,parts:e,original:d,loc:c}}function j(a,b,c,d,e,f){var g=d.charAt(3)||d.charAt(2),h="{"!==g&&"&"!==g,i=/\*/.test(d);return{type:i?"Decorator":"MustacheStatement",path:a,params:b,hash:c,escaped:h,strip:e,loc:this.locInfo(f)}}function k(a,b,c,e){d(a,c),e=this.locInfo(e);var f={type:"Program",body:b,strip:{},loc:e};return{type:"BlockStatement",path:a.path,params:a.params,hash:a.hash,program:f,openStrip:{},inverseStrip:{},closeStrip:{},loc:e}}function l(a,b,c,e,f,g){e&&e.path&&d(a,e);var h=/\*/.test(a.open);b.blockParams=a.blockParams;var i=void 0,j=void 0;if(c){if(h)throw new q["default"]("Unexpected inverse block on decorator",c);c.chain&&(c.program.body[0].closeStrip=e.strip),j=c.strip,i=c.program}return f&&(f=i,i=b,b=f),{type:h?"DecoratorBlock":"BlockStatement",path:a.path,params:a.params,hash:a.hash,program:b,inverse:i,openStrip:a.strip,inverseStrip:j,closeStrip:e&&e.strip,loc:this.locInfo(g)}}function m(a,b){if(!b&&a.length){var c=a[0].loc,d=a[a.length-1].loc;c&&d&&(b={source:c.source,start:{line:c.start.line,column:c.start.column},end:{line:d.end.line,column:d.end.column}})}return{type:"Program",body:a,strip:{},loc:b}}function n(a,b,c,e){return d(a,c),{type:"PartialBlockStatement",name:a.path,params:a.params,hash:a.hash,program:b,openStrip:a.strip,closeStrip:c&&c.strip,loc:this.locInfo(e)}}var o=c(1)["default"];b.__esModule=!0,b.SourceLocation=e,b.id=f,b.stripFlags=g,b.stripComment=h,b.preparePath=i,b.prepareMustache=j,b.prepareRawBlock=k,b.prepareBlock=l,b.prepareProgram=m,b.preparePartialBlock=n;var p=c(6),q=o(p)},function(a,b,c){"use strict";function d(){}function e(a,b,c){if(null==a||"string"!=typeof a&&"Program"!==a.type)throw new l["default"]("You must pass a string or Handlebars AST to Handlebars.precompile. You passed "+a);b=b||{},"data"in b||(b.data=!0),b.compat&&(b.useDepths=!0);var d=c.parse(a,b),e=(new c.Compiler).compile(d,b);return(new c.JavaScriptCompiler).compile(e,b)}function f(a,b,c){function d(){var d=c.parse(a,b),e=(new c.Compiler).compile(d,b),f=(new c.JavaScriptCompiler).compile(e,b,void 0,!0);return c.template(f)}function e(a,b){return f||(f=d()),f.call(this,a,b)}if(void 0===b&&(b={}),null==a||"string"!=typeof a&&"Program"!==a.type)throw new l["default"]("You must pass a string or Handlebars AST to Handlebars.compile. You passed "+a);b=m.extend({},b),"data"in b||(b.data=!0),b.compat&&(b.useDepths=!0);var f=void 0;return e._setup=function(a){return f||(f=d()),f._setup(a)},e._child=function(a,b,c,e){return f||(f=d()),f._child(a,b,c,e)},e}function g(a,b){if(a===b)return!0;if(m.isArray(a)&&m.isArray(b)&&a.length===b.length){for(var c=0;c1)throw new l["default"]("Unsupported number of partial arguments: "+c.length,a);c.length||(this.options.explicitPartialContext?this.opcode("pushLiteral","undefined"):c.push({type:"PathExpression",parts:[],depth:0}));var d=a.name.original,e="SubExpression"===a.name.type;e&&this.accept(a.name),this.setupFullMustacheParams(a,b,void 0,!0);var f=a.indent||"";this.options.preventIndent&&f&&(this.opcode("appendContent",f),f=""),this.opcode("invokePartial",e,d,f),this.opcode("append")},PartialBlockStatement:function(a){this.PartialStatement(a)},MustacheStatement:function(a){this.SubExpression(a),a.escaped&&!this.options.noEscape?this.opcode("appendEscaped"):this.opcode("append")},Decorator:function(a){this.DecoratorBlock(a)},ContentStatement:function(a){a.value&&this.opcode("appendContent",a.value)},CommentStatement:function(){},SubExpression:function(a){h(a);var b=this.classifySexpr(a);"simple"===b?this.simpleSexpr(a):"helper"===b?this.helperSexpr(a):this.ambiguousSexpr(a)},ambiguousSexpr:function(a,b,c){var d=a.path,e=d.parts[0],f=null!=b||null!=c;this.opcode("getContext",d.depth),this.opcode("pushProgram",b),this.opcode("pushProgram",c),d.strict=!0,this.accept(d),this.opcode("invokeAmbiguous",e,f)},simpleSexpr:function(a){var b=a.path;b.strict=!0,this.accept(b),this.opcode("resolvePossibleLambda")},helperSexpr:function(a,b,c){var d=this.setupFullMustacheParams(a,b,c),e=a.path,f=e.parts[0];if(this.options.knownHelpers[f])this.opcode("invokeKnownHelper",d.length,f);else{if(this.options.knownHelpersOnly)throw new l["default"]("You specified knownHelpersOnly, but used the unknown helper "+f,a);e.strict=!0,e.falsy=!0,this.accept(e),this.opcode("invokeHelper",d.length,e.original,o["default"].helpers.simpleId(e))}},PathExpression:function(a){this.addDepth(a.depth),this.opcode("getContext",a.depth);var b=a.parts[0],c=o["default"].helpers.scopedId(a),d=!a.depth&&!c&&this.blockParamIndex(b);d?this.opcode("lookupBlockParam",d,a.parts):b?a.data?(this.options.data=!0,this.opcode("lookupData",a.depth,a.parts,a.strict)):this.opcode("lookupOnContext",a.parts,a.falsy,a.strict,c):this.opcode("pushContext")},StringLiteral:function(a){this.opcode("pushString",a.value)},NumberLiteral:function(a){this.opcode("pushLiteral",a.value)},BooleanLiteral:function(a){this.opcode("pushLiteral",a.value)},UndefinedLiteral:function(){this.opcode("pushLiteral","undefined")},NullLiteral:function(){this.opcode("pushLiteral","null")},Hash:function(a){var b=a.pairs,c=0,d=b.length;for(this.opcode("pushHash");c=0)return[b,e]}}}},function(a,b,c){"use strict";function d(a){this.value=a}function e(){}function f(a,b,c,d){var e=b.popStack(),f=0,g=c.length;for(a&&g--;f0&&(c+=", "+d.join(", "));var e=0;g(this.aliases).forEach(function(a){var d=b.aliases[a];d.children&&d.referenceCount>1&&(c+=", alias"+ ++e+"="+a,d.children[0]="alias"+e)}),this.lookupPropertyFunctionIsUsed&&(c+=", "+this.lookupPropertyFunctionVarDeclaration());var f=["container","depth0","helpers","partials","data"];(this.useBlockParams||this.useDepths)&&f.push("blockParams"),this.useDepths&&f.push("depths");var h=this.mergeSource(c);return a?(f.push(h),Function.apply(this,f)):this.source.wrap(["function(",f.join(","),") {\n ",h,"}"])},mergeSource:function(a){var b=this.environment.isSimple,c=!this.forceBuffer,d=void 0,e=void 0,f=void 0,g=void 0;return this.source.each(function(a){a.appendToBuffer?(f?a.prepend(" + "):f=a,g=a):(f&&(e?f.prepend("buffer += "):d=!0,g.add(";"),f=g=void 0),e=!0,b||(c=!1))}),c?f?(f.prepend("return "),g.add(";")):e||this.source.push('return "";'):(a+=", buffer = "+(d?"":this.initializeBuffer()),f?(f.prepend("return buffer + "),g.add(";")):this.source.push("return buffer;")),a&&this.source.prepend("var "+a.substring(2)+(d?"":";\n")),this.source.merge()},lookupPropertyFunctionVarDeclaration:function(){return"\n lookupProperty = container.lookupProperty || function(parent, propertyName) {\n if (Object.prototype.hasOwnProperty.call(parent, propertyName)) {\n return parent[propertyName];\n }\n return undefined\n }\n ".trim()},blockValue:function(a){var b=this.aliasable("container.hooks.blockHelperMissing"),c=[this.contextName(0)];this.setupHelperArgs(a,0,c);var d=this.popStack();c.splice(1,0,d),this.push(this.source.functionCall(b,"call",c))},ambiguousBlockValue:function(){var a=this.aliasable("container.hooks.blockHelperMissing"),b=[this.contextName(0)];this.setupHelperArgs("",0,b,!0),this.flushInline();var c=this.topStack();b.splice(1,0,c),this.pushSource(["if (!",this.lastHelper,") { ",c," = ",this.source.functionCall(a,"call",b),"}"])},appendContent:function(a){this.pendingContent?a=this.pendingContent+a:this.pendingLocation=this.source.currentLocation,this.pendingContent=a},append:function(){if(this.isInline())this.replaceStack(function(a){return[" != null ? ",a,' : ""']}),this.pushSource(this.appendToBuffer(this.popStack()));else{var a=this.popStack();this.pushSource(["if (",a," != null) { ",this.appendToBuffer(a,void 0,!0)," }"]),this.environment.isSimple&&this.pushSource(["else { ",this.appendToBuffer("''",void 0,!0)," }"])}},appendEscaped:function(){this.pushSource(this.appendToBuffer([this.aliasable("container.escapeExpression"),"(",this.popStack(),")"]))},getContext:function(a){this.lastContext=a},pushContext:function(){this.pushStackLiteral(this.contextName(this.lastContext))},lookupOnContext:function(a,b,c,d){var e=0;d||!this.options.compat||this.lastContext?this.pushContext():this.push(this.depthedLookup(a[e++])),this.resolvePath("context",a,e,b,c)},lookupBlockParam:function(a,b){this.useBlockParams=!0,this.push(["blockParams[",a[0],"][",a[1],"]"]),this.resolvePath("context",b,1)},lookupData:function(a,b,c){a?this.pushStackLiteral("container.data(data, "+a+")"):this.pushStackLiteral("data"),this.resolvePath("data",b,0,!0,c)},resolvePath:function(a,b,c,d,e){var g=this;if(this.options.strict||this.options.assumeObjects)return void this.push(f(this.options.strict&&e,this,b,a));for(var h=b.length;cthis.stackVars.length&&this.stackVars.push("stack"+this.stackSlot),this.topStackName()},topStackName:function(){return"stack"+this.stackSlot},flushInline:function(){var a=this.inlineStack;this.inlineStack=[];for(var b=0,c=a.length;b/i,$=//i,G=/<(area|base|br|col|embed|hr|img|input|keygen|link|menuitem|meta|param|source|track|wbr)(.*?)\/?>/gi,W=X.isIE(9),Z=W||X.isIE(),K=function(){throw new Error("This browser does not support `document.implementation.createHTMLDocument`")},J=function(){throw new Error("This browser does not support `DOMParser.prototype.parseFromString`")};if("function"==typeof window.DOMParser){var Q=new window.DOMParser,ee=W?"text/xml":"text/html";K=J=function(e,t){return t&&(e="<"+t+">"+e+""),W&&(e=e.replace(G,"<$1$2$3/>")),Q.parseFromString(e,ee)}}if(document.implementation){var te=document.implementation.createHTMLDocument(Z?"html-dom-parser":void 0);K=function(t,e){if(e)return te.documentElement.getElementsByTagName(e)[0].innerHTML=t,te;try{return te.documentElement.innerHTML=t,te}catch(e){if(J)return J(t)}}}var re,ne=document.createElement("template");ne.content&&(re=function(e){return ne.innerHTML=e,ne.content.childNodes});var ie=function(e){var t,r,n,i,o=e.match(q);switch(o&&o[1]&&(t=o[1].toLowerCase()),t){case"html":return r=J(e),Y.test(e)||(n=r.getElementsByTagName("head")[0])&&n.parentNode.removeChild(n),$.test(e)||(n=r.getElementsByTagName(_)[0])&&n.parentNode.removeChild(n),r.getElementsByTagName("html");case"head":case _:return i=K(e).getElementsByTagName(t),$.test(e)&&Y.test(e)?i[0].parentNode.childNodes:i;default:return re?re(e):K(e,_).getElementsByTagName(_)[0].childNodes}},oe=X.formatDOM,ae=X.isIE(9),se=/<(![a-zA-Z\s]+)>/;var le=function(e){if("string"!=typeof e)throw new TypeError("First argument must be a string");if(!e)return[];var t,r=e.match(se);return r&&r[1]&&(t=r[1],ae&&(e=e.replace(r[0],""))),oe(ie(e),null,t)},ce={decodeEntities:!0,lowerCaseAttributeNames:!1};function ue(e,t){if("string"!=typeof e)throw new TypeError("First argument must be a string");return""===e?[]:B(le(e,(t=t||{}).htmlparser2||ce),t)}ue.domToReact=B,ue.htmlToDOM=le;var pe=ue,fe=ue;return pe.default=fe,pe}); -//# sourceMappingURL=html-react-parser.min.js.map +!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t(require("react")):"function"==typeof define&&define.amd?define(["react"],t):(e=e||self).HTMLReactParser=t(e.React)}(this,function(y){"use strict";y=y&&Object.prototype.hasOwnProperty.call(y,"default")?y.default:y;var e={Properties:{autoFocus:4,accept:0,acceptCharset:0,accessKey:0,action:0,allowFullScreen:4,allowTransparency:0,alt:0,as:0,async:4,autoComplete:0,autoPlay:4,capture:4,cellPadding:0,cellSpacing:0,charSet:0,challenge:0,checked:5,cite:0,classID:0,className:0,cols:24,colSpan:0,content:0,contentEditable:0,contextMenu:0,controls:4,controlsList:0,coords:0,crossOrigin:0,data:0,dateTime:0,default:4,defer:4,dir:0,disabled:4,download:32,draggable:0,encType:0,form:0,formAction:0,formEncType:0,formMethod:0,formNoValidate:4,formTarget:0,frameBorder:0,headers:0,height:0,hidden:4,high:0,href:0,hrefLang:0,htmlFor:0,httpEquiv:0,icon:0,id:0,inputMode:0,integrity:0,is:0,keyParams:0,keyType:0,kind:0,label:0,lang:0,list:0,loop:4,low:0,manifest:0,marginHeight:0,marginWidth:0,max:0,maxLength:0,media:0,mediaGroup:0,method:0,min:0,minLength:0,multiple:5,muted:5,name:0,nonce:0,noValidate:4,open:4,optimum:0,pattern:0,placeholder:0,playsInline:4,poster:0,preload:0,profile:0,radioGroup:0,readOnly:4,referrerPolicy:0,rel:0,required:4,reversed:4,role:0,rows:24,rowSpan:8,sandbox:0,scope:0,scoped:4,scrolling:0,seamless:4,selected:5,shape:0,size:24,sizes:0,span:24,spellCheck:0,src:0,srcDoc:0,srcLang:0,srcSet:0,start:8,step:0,style:0,summary:0,tabIndex:0,target:0,title:0,type:0,useMap:0,value:0,width:0,wmode:0,wrap:0,about:0,datatype:0,inlist:0,prefix:0,property:0,resource:0,typeof:0,vocab:0,autoCapitalize:0,autoCorrect:0,autoSave:0,color:0,itemProp:0,itemScope:4,itemType:0,itemID:0,itemRef:0,results:0,security:0,unselectable:0},DOMAttributeNames:{acceptCharset:"accept-charset",className:"class",htmlFor:"for",httpEquiv:"http-equiv"}},t={Properties:{accentHeight:0,accumulate:0,additive:0,alignmentBaseline:0,allowReorder:0,alphabetic:0,amplitude:0,arabicForm:0,ascent:0,attributeName:0,attributeType:0,autoReverse:0,azimuth:0,baseFrequency:0,baseProfile:0,baselineShift:0,bbox:0,begin:0,bias:0,by:0,calcMode:0,capHeight:0,clip:0,clipPath:0,clipRule:0,clipPathUnits:0,colorInterpolation:0,colorInterpolationFilters:0,colorProfile:0,colorRendering:0,contentScriptType:0,contentStyleType:0,cursor:0,cx:0,cy:0,d:0,decelerate:0,descent:0,diffuseConstant:0,direction:0,display:0,divisor:0,dominantBaseline:0,dur:0,dx:0,dy:0,edgeMode:0,elevation:0,enableBackground:0,end:0,exponent:0,externalResourcesRequired:0,fill:0,fillOpacity:0,fillRule:0,filter:0,filterRes:0,filterUnits:0,floodColor:0,floodOpacity:0,focusable:0,fontFamily:0,fontSize:0,fontSizeAdjust:0,fontStretch:0,fontStyle:0,fontVariant:0,fontWeight:0,format:0,from:0,fx:0,fy:0,g1:0,g2:0,glyphName:0,glyphOrientationHorizontal:0,glyphOrientationVertical:0,glyphRef:0,gradientTransform:0,gradientUnits:0,hanging:0,horizAdvX:0,horizOriginX:0,ideographic:0,imageRendering:0,in:0,in2:0,intercept:0,k:0,k1:0,k2:0,k3:0,k4:0,kernelMatrix:0,kernelUnitLength:0,kerning:0,keyPoints:0,keySplines:0,keyTimes:0,lengthAdjust:0,letterSpacing:0,lightingColor:0,limitingConeAngle:0,local:0,markerEnd:0,markerMid:0,markerStart:0,markerHeight:0,markerUnits:0,markerWidth:0,mask:0,maskContentUnits:0,maskUnits:0,mathematical:0,mode:0,numOctaves:0,offset:0,opacity:0,operator:0,order:0,orient:0,orientation:0,origin:0,overflow:0,overlinePosition:0,overlineThickness:0,paintOrder:0,panose1:0,pathLength:0,patternContentUnits:0,patternTransform:0,patternUnits:0,pointerEvents:0,points:0,pointsAtX:0,pointsAtY:0,pointsAtZ:0,preserveAlpha:0,preserveAspectRatio:0,primitiveUnits:0,r:0,radius:0,refX:0,refY:0,renderingIntent:0,repeatCount:0,repeatDur:0,requiredExtensions:0,requiredFeatures:0,restart:0,result:0,rotate:0,rx:0,ry:0,scale:0,seed:0,shapeRendering:0,slope:0,spacing:0,specularConstant:0,specularExponent:0,speed:0,spreadMethod:0,startOffset:0,stdDeviation:0,stemh:0,stemv:0,stitchTiles:0,stopColor:0,stopOpacity:0,strikethroughPosition:0,strikethroughThickness:0,string:0,stroke:0,strokeDasharray:0,strokeDashoffset:0,strokeLinecap:0,strokeLinejoin:0,strokeMiterlimit:0,strokeOpacity:0,strokeWidth:0,surfaceScale:0,systemLanguage:0,tableValues:0,targetX:0,targetY:0,textAnchor:0,textDecoration:0,textRendering:0,textLength:0,to:0,transform:0,u1:0,u2:0,underlinePosition:0,underlineThickness:0,unicode:0,unicodeBidi:0,unicodeRange:0,unitsPerEm:0,vAlphabetic:0,vHanging:0,vIdeographic:0,vMathematical:0,values:0,vectorEffect:0,version:0,vertAdvY:0,vertOriginX:0,vertOriginY:0,viewBox:0,viewTarget:0,visibility:0,widths:0,wordSpacing:0,writingMode:0,x:0,xHeight:0,x1:0,x2:0,xChannelSelector:0,xlinkActuate:0,xlinkArcrole:0,xlinkHref:0,xlinkRole:0,xlinkShow:0,xlinkTitle:0,xlinkType:0,xmlBase:0,xmlns:0,xmlnsXlink:0,xmlLang:0,xmlSpace:0,y:0,y1:0,y2:0,yChannelSelector:0,z:0,zoomAndPan:0},DOMAttributeNames:{accentHeight:"accent-height",alignmentBaseline:"alignment-baseline",arabicForm:"arabic-form",baselineShift:"baseline-shift",capHeight:"cap-height",clipPath:"clip-path",clipRule:"clip-rule",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",dominantBaseline:"dominant-baseline",enableBackground:"enable-background",fillOpacity:"fill-opacity",fillRule:"fill-rule",floodColor:"flood-color",floodOpacity:"flood-opacity",fontFamily:"font-family",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",glyphName:"glyph-name",glyphOrientationHorizontal:"glyph-orientation-horizontal",glyphOrientationVertical:"glyph-orientation-vertical",horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",imageRendering:"image-rendering",letterSpacing:"letter-spacing",lightingColor:"lighting-color",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pointerEvents:"pointer-events",renderingIntent:"rendering-intent",shapeRendering:"shape-rendering",stopColor:"stop-color",stopOpacity:"stop-opacity",strikethroughPosition:"strikethrough-position",strikethroughThickness:"strikethrough-thickness",strokeDasharray:"stroke-dasharray",strokeDashoffset:"stroke-dashoffset",strokeLinecap:"stroke-linecap",strokeLinejoin:"stroke-linejoin",strokeMiterlimit:"stroke-miterlimit",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",underlinePosition:"underline-position",underlineThickness:"underline-thickness",unicodeBidi:"unicode-bidi",unicodeRange:"unicode-range",unitsPerEm:"units-per-em",vAlphabetic:"v-alphabetic",vHanging:"v-hanging",vIdeographic:"v-ideographic",vMathematical:"v-mathematical",vectorEffect:"vector-effect",vertAdvY:"vert-adv-y",vertOriginX:"vert-origin-x",vertOriginY:"vert-origin-y",wordSpacing:"word-spacing",writingMode:"writing-mode",xHeight:"x-height",xlinkActuate:"xlink:actuate",xlinkArcrole:"xlink:arcrole",xlinkHref:"xlink:href",xlinkRole:"xlink:role",xlinkShow:"xlink:show",xlinkTitle:"xlink:title",xlinkType:"xlink:type",xmlBase:"xml:base",xmlnsXlink:"xmlns:xlink",xmlLang:"xml:lang",xmlSpace:"xml:space"}},l=1,c=4,u=8,p=24,f=32;function d(e,t){return(e&t)===t}function r(e,t,r){var n,i,o,a=e.Properties,s=e.DOMAttributeNames;for(i in a)n=s[i]||(r?i:i.toLowerCase()),o=a[i],t[n]={attributeName:n,propertyName:i,mustUseProperty:d(o,l),hasBooleanValue:d(o,c),hasNumericValue:d(o,u),hasPositiveNumericValue:d(o,p),hasOverloadedBooleanValue:d(o,f)}}var n={};r(e,n);var i={};r(t,i,!0);var o={};r(e,o),r(t,o,!0);function m(n,r){if("string"!=typeof n)throw new TypeError("First argument must be a string");if(!n)return[];r=r||{};var i=1,o=1;function a(e){var t=e.match(g);t&&(i+=t.length);var r=e.lastIndexOf("\n");o=~r?e.length-r:o+e.length}function s(){var t={line:i,column:o};return function(e){return e.position=new l(t),p(),e}}function l(e){this.start=e,this.end={line:i,column:o},this.source=r.source}function c(e){var t=new Error(r.source+":"+i+":"+o+": "+e);if(t.reason=e,t.filename=r.source,t.line=i,t.column=o,t.source=n,!r.silent)throw t}function u(e){var t=e.exec(n);if(t){var r=t[0];return a(r),n=n.slice(r.length),t}}function p(){u(v)}function f(e){var t;for(e=e||[];t=d();)!1!==t&&e.push(t);return e}function d(){var e=s();if("/"==n.charAt(0)&&"*"==n.charAt(1)){for(var t=2;T!=n.charAt(t)&&("*"!=n.charAt(t)||"/"!=n.charAt(t+1));)++t;if(t+=2,T===n.charAt(t-1))return c("End of comment missing");var r=n.slice(2,t-2);return o+=2,a(r),n=n.slice(t),o+=2,e({type:"comment",comment:r})}}function m(){var e=s(),t=u(k);if(t){if(d(),!u(x))return c("property missing ':'");var r=u(b),n=e({type:"declaration",property:E(t[0].replace(h,T)),value:r?E(r[0].replace(h,T)):T});return u(w),n}}return l.prototype.content=n,p(),function(){var e,t=[];for(f(t);e=m();)!1!==e&&(t.push(e),f(t));return t}()}var a={html:n,svg:i,properties:o,isCustomAttribute:RegExp.prototype.test.bind(new RegExp("^(data|aria)-[:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$"))},h=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,g=/\n/g,v=/^\s*/,k=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,x=/^:\s*/,b=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,w=/^[;\s]*/,s=/^\s+|\s+$/g,T="";function E(e){return e?e.replace(s,T):T}var C=function(e,t){var r,n=null;if(!e||"string"!=typeof e)return n;for(var i,o,a=m(e),s="function"==typeof t,l=0,c=a.length;l/i,$=//i,G=/<(area|base|br|col|embed|hr|img|input|keygen|link|menuitem|meta|param|source|track|wbr)(.*?)\/?>/gi,W=X.isIE(9),Z=W||X.isIE(),K=function(){throw new Error("This browser does not support `document.implementation.createHTMLDocument`")},J=function(){throw new Error("This browser does not support `DOMParser.prototype.parseFromString`")};if("function"==typeof window.DOMParser){var Q=new window.DOMParser,ee=W?"text/xml":"text/html";K=J=function(e,t){return t&&(e="<"+t+">"+e+""),W&&(e=e.replace(G,"<$1$2$3/>")),Q.parseFromString(e,ee)}}if(document.implementation){var te=document.implementation.createHTMLDocument(Z?"html-dom-parser":void 0);K=function(t,e){if(e)return te.documentElement.getElementsByTagName(e)[0].innerHTML=t,te;try{return te.documentElement.innerHTML=t,te}catch(e){if(J)return J(t)}}}var re,ne=document.createElement("template");ne.content&&(re=function(e){return ne.innerHTML=e,ne.content.childNodes});var ie=function(e){var t,r,n,i,o=e.match(q);switch(o&&o[1]&&(t=o[1].toLowerCase()),t){case"html":return r=J(e),Y.test(e)||(n=r.getElementsByTagName("head")[0])&&n.parentNode.removeChild(n),$.test(e)||(n=r.getElementsByTagName(_)[0])&&n.parentNode.removeChild(n),r.getElementsByTagName("html");case"head":case _:return i=K(e).getElementsByTagName(t),$.test(e)&&Y.test(e)?i[0].parentNode.childNodes:i;default:return re?re(e):K(e,_).getElementsByTagName(_)[0].childNodes}},oe=X.formatDOM,ae=X.isIE(9),se=/<(![a-zA-Z\s]+)>/;var le=function(e){if("string"!=typeof e)throw new TypeError("First argument must be a string");if(!e)return[];var t,r=e.match(se);return r&&r[1]&&(t=r[1],ae&&(e=e.replace(r[0],""))),oe(ie(e),null,t)},ce={decodeEntities:!0,lowerCaseAttributeNames:!1};function ue(e,t){if("string"!=typeof e)throw new TypeError("First argument must be a string");return""===e?[]:B(le(e,(t=t||{}).htmlparser2||ce),t)}ue.domToReact=B,ue.htmlToDOM=le;var pe=ue,fe=ue;return pe.default=fe,pe}); +//# sourceMappingURL=html-react-parser.min.js.map diff --git a/libraries/imageReady.js b/libraries/imageReady.js index 6e1eb44..fe94e2d 100644 --- a/libraries/imageReady.js +++ b/libraries/imageReady.js @@ -1,198 +1,198 @@ -//https://github.com/adaptlearning/jquery.imageready 2017-07-11 - -;(function( $ ) { - - if ($.fn.imageready) return; - - function isImageLoaded($img) { - - var img = $img[0]; - var hasNoSrc = !$img.attr("src"); - var isLazyLoading = ($img.attr('loading') === 'lazy'); - var isMarkedComplete = img.complete; - var hasCorrectReadyState = img.readyState === 4; - - //has height reported by jquery - var has$Height = ($img.height() > 0); - //has height reported by image definition (ie9+) - var hasNaturalHeight = (img.naturalHeight === undefined) ? true : (img.naturalHeight > 0); - - var hasValidHeight = has$Height && hasNaturalHeight; - - return hasNoSrc || isLazyLoading || isMarkedComplete || hasCorrectReadyState || hasValidHeight; - - } - - function getElementsByCSSAttributeName(name) { - if (name === undefined) throw "Must specify a css attribute name"; - - var tags = this.getElementsByTagName('*'), el; - - var rtn = []; - - var body = $("body")[0]; - - if (body.currentStyle) { //ie - - var scriptName = changeCSSAttributeNameFormat(name); - - for (var i = 0, len = tags.length; i < len; i++) { - - el = tags[i]; - if (!el.currentStyle) continue; - var hasNoValue = (el.currentStyle[scriptName] == 'none'); - if (hasNoValue) continue; - - rtn.push(el); - - } - - } else if (window.getComputedStyle) { //other - - for (var i = 0, len = tags.length; i < len; i++) { - - el = tags[i]; - - var hasNoValue = (document.defaultView.getComputedStyle(el, null).getPropertyValue(name) == 'none'); - if (hasNoValue) continue; - - rtn.push(el); - - } - - } - - return rtn; - } - - function changeCSSAttributeNameFormat(CSSName) { - var noDash = CSSName.replace(/-/g," "); - var titleCase = toTitleCase(noDash); - var noSpace = titleCase.replace(/ /g, ""); - var lowerCaseStart = noSpace.substr(0,1).toLowerCase() + noSpace.substr(1); - return lowerCaseStart; - } - - function toTitleCase(str){ - return str.replace(/\w\S*/g, function(txt){return txt.charAt(0).toUpperCase() + txt.substr(1).toLowerCase();}); - } - - function getAllImages($set) { - - //get all child images - var $images = $set.find("img").add( $set.filter("img") ); - - //get all background images - $set.each(function() { - - var $backgroundImageElements = $(getElementsByCSSAttributeName.call(this, "background-image")); - $backgroundImageElements.each(function() { - - var $image = $(new Image()); - var backgroundImageValue = $(this).css("background-image"); - - // stripCSSURL - var matches = /url\(([^)]*)\)/g.exec(backgroundImageValue); - if (matches === null) return; - - // stripCSSQuotes - var url = matches[1].replace(/[\"\']/g, ""); - $image.attr('loading', 'eager'); - $image.attr("src", url); - $images = $images.add($image); - - }); - - }); - - $images.loaded = 0; - - //return undefined if no images found - if ($images.length === 0) return; - return $images; - - } - - $.fn.imageready = function(callback, options) { - //setup options - options = options || {}; - if (options.allowTimeout === undefined) { - options.allowTimeout = $.fn.imageready.allowTimeout; - options.timeoutDuration = $.fn.imageready.timeoutDuration; - } - - var $images = getAllImages(this); - if (!$images) return callback(); - - //callback timeout event - var timeoutHandle; - function check() { - - clearTimeout(timeoutHandle); - var notLoadedImg = []; - - $images.each(function() { - - if (this._isImageReadyComplete) return; - - notLoadedImg.push(this); - - var $this = $(this); - console.error("image not loaded in time", $this.attr("src")); - - }); - - return callback($(notLoadedImg)); - } - - //callback load event - function complete(event) { - - clearTimeout(timeoutHandle); - - var isAnEventCallback = (event && event.target); - if (isAnEventCallback) { - $images.loaded++; - event.currentTarget._isImageReadyComplete = true; - } - - var haveAllImagesLoaded = ($images.length <= $images.loaded); - if (haveAllImagesLoaded) return callback(); - - if (!options.allowTimeout) return; - - //set a new timeout as not all images have loaded - timeoutHandle = setTimeout(check, options.timeoutDuration); - - } - - //attach load event listeners - $images.each(function() { - var $this = $(this); - - if (isImageLoaded($this)) return $images.loaded++; - - $this.one("load", complete); - $this.one("error", complete); - - // hack for onload event not firing for cached images in IE9-11 http://garage.socialisten.at/2013/06/how-to-fix-the-ie9-image-onload-bug/ - // reset the src attribute - $this.attr("src", $this.attr("src")); - - }); - - //check if all images have been loaded already - if ($images.length <= $images.loaded) return complete(); - - //setup timeout event - if (!options.allowTimeout) return; - - //set a timeout to callback on slow / missing image load - timeoutHandle = setTimeout(check, options.timeoutDuration) - - } - - $.fn.imageready.timeoutDuration = 1; - $.fn.imageready.allowTimeout = false; - -}) ( jQuery ); +//https://github.com/adaptlearning/jquery.imageready 2017-07-11 + +;(function( $ ) { + + if ($.fn.imageready) return; + + function isImageLoaded($img) { + + var img = $img[0]; + var hasNoSrc = !$img.attr("src"); + var isLazyLoading = ($img.attr('loading') === 'lazy'); + var isMarkedComplete = img.complete; + var hasCorrectReadyState = img.readyState === 4; + + //has height reported by jquery + var has$Height = ($img.height() > 0); + //has height reported by image definition (ie9+) + var hasNaturalHeight = (img.naturalHeight === undefined) ? true : (img.naturalHeight > 0); + + var hasValidHeight = has$Height && hasNaturalHeight; + + return hasNoSrc || isLazyLoading || isMarkedComplete || hasCorrectReadyState || hasValidHeight; + + } + + function getElementsByCSSAttributeName(name) { + if (name === undefined) throw "Must specify a css attribute name"; + + var tags = this.getElementsByTagName('*'), el; + + var rtn = []; + + var body = $("body")[0]; + + if (body.currentStyle) { //ie + + var scriptName = changeCSSAttributeNameFormat(name); + + for (var i = 0, len = tags.length; i < len; i++) { + + el = tags[i]; + if (!el.currentStyle) continue; + var hasNoValue = (el.currentStyle[scriptName] == 'none'); + if (hasNoValue) continue; + + rtn.push(el); + + } + + } else if (window.getComputedStyle) { //other + + for (var i = 0, len = tags.length; i < len; i++) { + + el = tags[i]; + + var hasNoValue = (document.defaultView.getComputedStyle(el, null).getPropertyValue(name) == 'none'); + if (hasNoValue) continue; + + rtn.push(el); + + } + + } + + return rtn; + } + + function changeCSSAttributeNameFormat(CSSName) { + var noDash = CSSName.replace(/-/g," "); + var titleCase = toTitleCase(noDash); + var noSpace = titleCase.replace(/ /g, ""); + var lowerCaseStart = noSpace.substr(0,1).toLowerCase() + noSpace.substr(1); + return lowerCaseStart; + } + + function toTitleCase(str){ + return str.replace(/\w\S*/g, function(txt){return txt.charAt(0).toUpperCase() + txt.substr(1).toLowerCase();}); + } + + function getAllImages($set) { + + //get all child images + var $images = $set.find("img").add( $set.filter("img") ); + + //get all background images + $set.each(function() { + + var $backgroundImageElements = $(getElementsByCSSAttributeName.call(this, "background-image")); + $backgroundImageElements.each(function() { + + var $image = $(new Image()); + var backgroundImageValue = $(this).css("background-image"); + + // stripCSSURL + var matches = /url\(([^)]*)\)/g.exec(backgroundImageValue); + if (matches === null) return; + + // stripCSSQuotes + var url = matches[1].replace(/[\"\']/g, ""); + $image.attr('loading', 'eager'); + $image.attr("src", url); + $images = $images.add($image); + + }); + + }); + + $images.loaded = 0; + + //return undefined if no images found + if ($images.length === 0) return; + return $images; + + } + + $.fn.imageready = function(callback, options) { + //setup options + options = options || {}; + if (options.allowTimeout === undefined) { + options.allowTimeout = $.fn.imageready.allowTimeout; + options.timeoutDuration = $.fn.imageready.timeoutDuration; + } + + var $images = getAllImages(this); + if (!$images) return callback(); + + //callback timeout event + var timeoutHandle; + function check() { + + clearTimeout(timeoutHandle); + var notLoadedImg = []; + + $images.each(function() { + + if (this._isImageReadyComplete) return; + + notLoadedImg.push(this); + + var $this = $(this); + console.error("image not loaded in time", $this.attr("src")); + + }); + + return callback($(notLoadedImg)); + } + + //callback load event + function complete(event) { + + clearTimeout(timeoutHandle); + + var isAnEventCallback = (event && event.target); + if (isAnEventCallback) { + $images.loaded++; + event.currentTarget._isImageReadyComplete = true; + } + + var haveAllImagesLoaded = ($images.length <= $images.loaded); + if (haveAllImagesLoaded) return callback(); + + if (!options.allowTimeout) return; + + //set a new timeout as not all images have loaded + timeoutHandle = setTimeout(check, options.timeoutDuration); + + } + + //attach load event listeners + $images.each(function() { + var $this = $(this); + + if (isImageLoaded($this)) return $images.loaded++; + + $this.one("load", complete); + $this.one("error", complete); + + // hack for onload event not firing for cached images in IE9-11 http://garage.socialisten.at/2013/06/how-to-fix-the-ie9-image-onload-bug/ + // reset the src attribute + $this.attr("src", $this.attr("src")); + + }); + + //check if all images have been loaded already + if ($images.length <= $images.loaded) return complete(); + + //setup timeout event + if (!options.allowTimeout) return; + + //set a timeout to callback on slow / missing image load + timeoutHandle = setTimeout(check, options.timeoutDuration) + + } + + $.fn.imageready.timeoutDuration = 1; + $.fn.imageready.allowTimeout = false; + +}) ( jQuery ); diff --git a/libraries/inview.js b/libraries/inview.js index d40f5bd..5462181 100644 --- a/libraries/inview.js +++ b/libraries/inview.js @@ -1,592 +1,592 @@ -'use strict'; -// 2021-03-23 - -(function() { - - // ENUMERATION SUPPORT - function ENUM(e) { - for (var i = 0, l = e.length; i < l; i++) { - var n = e[i].toLowerCase(); - // eslint-disable-next-line no-new-wrappers - this[n] = (new Number(i)); - this[n].string = n; - } - } - - // handler id generation - var expando = { - index: 0, - - check: function(element) { - // check that the element has a valid jquery expando property, or make one - - var hasExpando = (element[$.expando]); - if (hasExpando) return; - - element[$.expando] = ++expando.index; - - }, - - make: function(element, data) { - // make a unique event id from the element's expando property and the event handler guid - - expando.check(element); - return data.guid + '-' + element[$.expando]; - - } - }; - - // handler functions - var handlers = { - // types definition - TYPE: new ENUM(['onscreen', 'inview']), - INVIEW_STATES: new ENUM(['none', 'top', 'bottom', 'left', 'right', 'both']), - - registered: [], - shouldReProcess: true, - - register: function(element, data, type) { - var isLocked = locking.isLocked(); - - var $element = $(element); - handlers.registered.push({ - id: expando.make(element, data), - data: data, - $element: $element, - type: type, - _onscreen: isLocked ? null : measurements.get($element).uniqueMeasurementId, - _hasTriggered: false - }); - handlers.shouldReProcess = true; - - }, - - unregister: function(element, data, type) { - - var registered = handlers.registered; - - var findId = expando.make(element, data); - for (var i = registered.length - 1, l = -1; i > l; i--) { - var item = registered[i]; - if (item.id !== findId || item.type !== type) continue; - registered.splice(i, 1); - handlers.shouldReProcess = true; - } - - }, - - process: function() { - - var registered = handlers.registered; - var registeredCount; - - handlers.shouldReProcess = true; - while (handlers.shouldReProcess) { - handlers.shouldReProcess = false; - - registeredCount = registered.length; - if (registeredCount === 0) return; - - for (var i = 0; i < registeredCount; i++) { - var item = registered[i]; - var measure = measurements.get(item.$element); - - // check if measure has the same values as last - var wasPreviouslyMeasured = (item._onscreen !== undefined); - - if (wasPreviouslyMeasured && item._hasTriggered) { - var hasMeasureChanged = (item._onscreen !== measure.uniqueMeasurementId); - if (!hasMeasureChanged) { - continue; - } - } - - item._onscreen = measure.uniqueMeasurementId; - item._hasTriggered = true; - - switch (item.type) { - case handlers.TYPE.onscreen: - handlers.processOnScreen(item, measure); - break; - case handlers.TYPE.inview: - handlers.processInView(item, measure); - } - if (handlers.shouldReProcess) { - break; - } - } - } - - }, - - processOnScreen: function(item, measure) { - - item.$element.trigger('onscreen', measure); - - }, - - processInView: function(item, measure) { - - var isTopOnScreen = (measure.percentFromTop >= 0 && measure.percentFromTop < 100); - var isBottomOnScreen = (measure.percentFromBottom >= 0 && measure.percentFromBottom < 100); - var isLeftOnScreen = (measure.percentFromLeft >= 0 && measure.percentFromLeft < 100); - var isRightOnScreen = (measure.percentFromRight >= 0 && measure.percentFromRight < 100); - - var visiblePartY; - if (isTopOnScreen && isBottomOnScreen) visiblePartY = handlers.INVIEW_STATES.both.string; - else if (isTopOnScreen) visiblePartY = handlers.INVIEW_STATES.top.string; - else if (isBottomOnScreen) visiblePartY = handlers.INVIEW_STATES.bottom.string; - else visiblePartY = handlers.INVIEW_STATES.none.string; - - var visiblePartX; - if (isLeftOnScreen && isRightOnScreen) visiblePartX = handlers.INVIEW_STATES.both.string; - else if (isLeftOnScreen) visiblePartX = handlers.INVIEW_STATES.left.string; - else if (isRightOnScreen) visiblePartX = handlers.INVIEW_STATES.right.string; - else visiblePartX = handlers.INVIEW_STATES.none.string; - - var inviewState = [ - measure.onscreen, // inview true/false - visiblePartX, // left, right, both, none - visiblePartY // top, bottom, both, none - ]; - - item._inviewPreviousState = inviewState; - item._measurePreviousState = measure; - - item.$element.trigger('inview', inviewState); - - } - }; - - // checking loop management - var loop = { - - lastStartEvent: 0, - timeoutHandle: null, - intervalDuration: 100, - hasRaf: false, - - start: function() { - - loop.lastStartEvent = (new Date()).getTime(); - loop.repeat(); - - }, - - repeat: function() { - - loop.stop(); - - if (loop.hasRaf) { - loop.timeoutHandle = requestAnimationFrame(loop.main); - } else { - loop.timeoutHandle = setTimeout(loop.main, loop.intervalDuration); - } - - }, - - hasExpired: function() { - - var timeSinceLast = (new Date()).getTime() - loop.lastStartEvent; - if (timeSinceLast < 1500) return; - - loop.stop(); - return true; - }, - - isThrottled: function() { - var passedTime = (new Date()).getTime() - loop.lastMain; - if (passedTime > loop.intervalDuration) return false; - return true; - }, - - lastMain: (new Date()).getTime(), - - main: function() { - - if (loop.isThrottled()) { - loop.repeat(); - return; - } - - loop.lastMain = (new Date()).getTime(); - - if (loop.hasExpired()) return; - - if (handlers.registered.length === 0) { - // nothing to check - loop.stop(); - // slow down to save cycles - loop.intervalDuration = 200; - loop.repeat(); - } else { - // something to check - loop.stop(); - // speed up to make more responsive - loop.intervalDuration = 100; - loop.repeat(); - } - - if (locking.isLocked()) return; - - handlers.process(); - - }, - - stop: function() { - - var intervalAttached = (loop.timeoutHandle !== null); - if (!intervalAttached) return; - - if (loop.hasRaf) { - cancelAnimationFrame(loop.timeoutHandle); - loop.timeoutHandle = null; - } else { - clearTimeout(loop.timeoutHandle); - loop.timeoutHandle = null; - } - - } - - }; - - // jQuery element + event handler attachment / removal - $.extend($.event.special, { - - onscreen: { - - noBubble: true, - - add: function(data) { - handlers.register(this, data, handlers.TYPE.onscreen); - }, - - remove: function(data) { - handlers.unregister(this, data, handlers.TYPE.onscreen); - } - - }, - - inview: { - - noBubble: true, - - add: function(data) { - handlers.register(this, data, handlers.TYPE.inview); - }, - - remove: function(data) { - handlers.unregister(this, data, handlers.TYPE.inview); - } - - } - - }); - - // jQuery interfaces - // element functions - $.extend($.fn, { - - onscreen: function onscreen(callback) { - - if (callback) { - // standard event attachment jquery api behaviour - this.on('onscreen', callback); - return this; - } - - return measurements.get(this); - - }, - - inview: function inview(callback) { - - if (callback) { - // standard event attachment jquery api behaviour - this.on('inview', callback); - return this; - } - - return measurements.get(this); - - } - - }); - - // interface to allow for inview/onscreen to be disabled - var locking = { - locks: [], - - lock: function(name) { - - if (locking.isLocked(name)) return; - locking.locks.push(name); - - }, - - unlock: function(name) { - - if (!locking.isLocked(name)) return; - - for (var i = 0, l = locking.locks.length; i < l; i++) { - var lock = locking.locks[i]; - if (lock === name) { - locking.locks.splice(i, 1); - break; - } - } - - loop.start(); - - }, - - isLocked: function(name) { - - if (!name) return (locking.locks.length > 0); - - for (var i = 0, l = locking.locks.length; i < l; i++) { - var lock = locking.locks[i]; - if (lock === name) { - return true; - } - } - return false; - - } - - }; - - var config = { - - options: {}, - - config: function(options) { - if (typeof options !== 'object') return; - - $.extend(config.options, options); - - } - - }; - - // force an inview check - standard trigger event jquery api behaviour - $.inview = $.onscreen = function() { - loop.start(); - }; - - // attach locking interface to $.inview.lock(name); etc - $.extend($.inview, locking, config); - - // window size handlers - var wndw = { - - $el: $(window), - height: null, - width: null, - heightRatio: null, - widthRatio: null, - - resize: function() { - wndw.height = window.innerHeight || wndw.$el.height(); - wndw.width = window.innerWidth || wndw.$el.width(); - wndw.heightRatio = (100 / wndw.height); - wndw.widthRatio = (100 / wndw.width); - loop.start(); - } - - }; - - var measurements = { - - featureDetect: function() { - - loop.hasRaf = (window.requestAnimationFrame && window.cancelAnimationFrame); - - }, - - get: function get($element) { - - if ($element.length === 0) return; - - var el = $element[0]; - var offset; - - try { - offset = el.getBoundingClientRect(); - } catch (e) { - // IE11 throws an error if the element isn't present in the DOM - offset = { top: 0, right: 0, bottom: 0, left: 0, width: 0, height: 0 }; - } - - var height = offset.height; - var width = offset.width; - - // topleft from topleft of window - var top = offset['top']; - var left = offset['left']; - - // bottomright from bottomright of window - var bottom = wndw.height - (top + height); - var right = wndw.width - (left + width); - - // percentages of above - var percentFromTop = Math.round(wndw.heightRatio * top); - var percentFromLeft = Math.round(wndw.widthRatio * left); - var percentFromBottom = Math.round(wndw.heightRatio * bottom); - var percentFromRight = Math.round(wndw.widthRatio * right); - - // inview - var inviewHorizontal = null; - if (left + width > 0 && right < 0 && left < 0) { - inviewHorizontal = width; - } else if (left < 0) { // offscreen left - inviewHorizontal = (width + left); - } else if (left + width > wndw.width) { // offscreen right - inviewHorizontal = (wndw.width - left); - } else { // fully inscreen - inviewHorizontal = width; - } - - var inviewVertical = null; - if (top + height > 0 && bottom < 0 && top < 0) { - inviewVertical = height; - } else if (top < 0) { // offscreen top - inviewVertical = (height + top); - } else if (top + height > wndw.height) { // offscreen bottom - inviewVertical = (wndw.height - top); - } else { // fully inscreen - inviewVertical = height; - } - - // cap floor at 0 - cannot have negative inviews. - if (inviewVertical < 0) inviewVertical = 0; - if (inviewHorizontal < 0) inviewHorizontal = 0; - - var percentInviewVertical = Math.round((100 / height) * inviewVertical); - var percentInviewHorizontal = Math.round((100 / width) * inviewHorizontal); - - var elementArea = height * width; - var inviewArea = inviewVertical * inviewHorizontal; - var percentInview = Math.round((100 / elementArea) * inviewArea); - - var onscreen = percentInview > 0; - var offScreenSide = (percentFromRight > 100 || percentFromLeft > 100 || percentFromBottom > 100 || percentFromTop > 100); - if (offScreenSide) onscreen = false; - - var hasNoSize = (height <= 0 && width <= 0); - if (hasNoSize) onscreen = false; - - var cssHidden = measurements.isElementHidden(el); - if (cssHidden) onscreen = false; - - if (onscreen) { - - // perform some extra checks to make sure item is onscreen - var parents = measurements.getParents(el); - - // go through all the parents except the html tag - for (var i = 0, l = parents.length - 1; i < l; i++) { - var parent = parents[i]; - - cssHidden = measurements.isElementHidden(parent); - - // check if parents are visibility hidden or display none - if (cssHidden) { - onscreen = false; - break; - } - - // check if child is out of bounds inside its parent, unless fullscreen - var isOutOfBounds = measurements.isOutOfBounds(el, parent); - var isElementFullscreen = el === document.fullscreenElement; - - if (isOutOfBounds && !isElementFullscreen) { - onscreen = false; - break; - } - - } - - } - - var uniqueMeasurementId = '' + top + left + bottom + right + height + width + wndw.height + wndw.width + onscreen; - - return { - top: top, - left: left, - bottom: bottom, - right: right, - percentFromTop: percentFromTop, - percentFromLeft: percentFromLeft, - percentFromBottom: percentFromBottom, - percentFromRight: percentFromRight, - percentInview: percentInview, - percentInviewHorizontal: percentInviewHorizontal, - percentInviewVertical: percentInviewVertical, - onscreen: onscreen, - uniqueMeasurementId: uniqueMeasurementId, - timestamp: (new Date()).getTime() - }; - - }, - - getParents: function(element) { - var parents = []; - var parent; - while ((parent = element.parentElement)) { - parents.push(parent); - element = parent; - } - return parents; - }, - - isElementHidden: function(element) { - var cssHidden = (element.style.display === 'none' || element.style.visibility === 'hidden'); - if (cssHidden) return true; - - var style = window.getComputedStyle(element, null); - cssHidden = (style.display === 'none' || style.visibility === 'hidden'); - return cssHidden; - }, - - isOutOfBounds: function(element, parent) { - - var $parent = $(parent); - - if ($parent.css('overflow') === 'visible') { - return false; - } - - var $element = $(element); - - var elementPos = $element.offset(); - elementPos.bottom = (elementPos.top + element.clientHeight); - elementPos.right = (elementPos.left + element.clientWidth); - - var parentPos = $parent.offset(); - parentPos.bottom = (parentPos.top + parent.clientHeight); - parentPos.right = (parentPos.left + parent.clientWidth); - - // check inclusive of bounding rectangle edges - var isOutOfBounds = (Math.floor(elementPos.bottom) <= Math.ceil(parentPos.top) - || Math.floor(elementPos.right) <= Math.ceil(parentPos.left) - || Math.ceil(elementPos.top) >= Math.floor(parentPos.bottom) - || Math.ceil(elementPos.left) >= Math.floor(parentPos.right)); - - - return isOutOfBounds; - - } - - }; - - // attach event handlers - $(window).on({ - 'touchmove scroll mousedown keydown': loop.start, - 'resize': wndw.resize - }); - - $(measurements.featureDetect); - wndw.resize(); - -})(); +'use strict'; +// 2021-03-23 + +(function() { + + // ENUMERATION SUPPORT + function ENUM(e) { + for (var i = 0, l = e.length; i < l; i++) { + var n = e[i].toLowerCase(); + // eslint-disable-next-line no-new-wrappers + this[n] = (new Number(i)); + this[n].string = n; + } + } + + // handler id generation + var expando = { + index: 0, + + check: function(element) { + // check that the element has a valid jquery expando property, or make one + + var hasExpando = (element[$.expando]); + if (hasExpando) return; + + element[$.expando] = ++expando.index; + + }, + + make: function(element, data) { + // make a unique event id from the element's expando property and the event handler guid + + expando.check(element); + return data.guid + '-' + element[$.expando]; + + } + }; + + // handler functions + var handlers = { + // types definition + TYPE: new ENUM(['onscreen', 'inview']), + INVIEW_STATES: new ENUM(['none', 'top', 'bottom', 'left', 'right', 'both']), + + registered: [], + shouldReProcess: true, + + register: function(element, data, type) { + var isLocked = locking.isLocked(); + + var $element = $(element); + handlers.registered.push({ + id: expando.make(element, data), + data: data, + $element: $element, + type: type, + _onscreen: isLocked ? null : measurements.get($element).uniqueMeasurementId, + _hasTriggered: false + }); + handlers.shouldReProcess = true; + + }, + + unregister: function(element, data, type) { + + var registered = handlers.registered; + + var findId = expando.make(element, data); + for (var i = registered.length - 1, l = -1; i > l; i--) { + var item = registered[i]; + if (item.id !== findId || item.type !== type) continue; + registered.splice(i, 1); + handlers.shouldReProcess = true; + } + + }, + + process: function() { + + var registered = handlers.registered; + var registeredCount; + + handlers.shouldReProcess = true; + while (handlers.shouldReProcess) { + handlers.shouldReProcess = false; + + registeredCount = registered.length; + if (registeredCount === 0) return; + + for (var i = 0; i < registeredCount; i++) { + var item = registered[i]; + var measure = measurements.get(item.$element); + + // check if measure has the same values as last + var wasPreviouslyMeasured = (item._onscreen !== undefined); + + if (wasPreviouslyMeasured && item._hasTriggered) { + var hasMeasureChanged = (item._onscreen !== measure.uniqueMeasurementId); + if (!hasMeasureChanged) { + continue; + } + } + + item._onscreen = measure.uniqueMeasurementId; + item._hasTriggered = true; + + switch (item.type) { + case handlers.TYPE.onscreen: + handlers.processOnScreen(item, measure); + break; + case handlers.TYPE.inview: + handlers.processInView(item, measure); + } + if (handlers.shouldReProcess) { + break; + } + } + } + + }, + + processOnScreen: function(item, measure) { + + item.$element.trigger('onscreen', measure); + + }, + + processInView: function(item, measure) { + + var isTopOnScreen = (measure.percentFromTop >= 0 && measure.percentFromTop < 100); + var isBottomOnScreen = (measure.percentFromBottom >= 0 && measure.percentFromBottom < 100); + var isLeftOnScreen = (measure.percentFromLeft >= 0 && measure.percentFromLeft < 100); + var isRightOnScreen = (measure.percentFromRight >= 0 && measure.percentFromRight < 100); + + var visiblePartY; + if (isTopOnScreen && isBottomOnScreen) visiblePartY = handlers.INVIEW_STATES.both.string; + else if (isTopOnScreen) visiblePartY = handlers.INVIEW_STATES.top.string; + else if (isBottomOnScreen) visiblePartY = handlers.INVIEW_STATES.bottom.string; + else visiblePartY = handlers.INVIEW_STATES.none.string; + + var visiblePartX; + if (isLeftOnScreen && isRightOnScreen) visiblePartX = handlers.INVIEW_STATES.both.string; + else if (isLeftOnScreen) visiblePartX = handlers.INVIEW_STATES.left.string; + else if (isRightOnScreen) visiblePartX = handlers.INVIEW_STATES.right.string; + else visiblePartX = handlers.INVIEW_STATES.none.string; + + var inviewState = [ + measure.onscreen, // inview true/false + visiblePartX, // left, right, both, none + visiblePartY // top, bottom, both, none + ]; + + item._inviewPreviousState = inviewState; + item._measurePreviousState = measure; + + item.$element.trigger('inview', inviewState); + + } + }; + + // checking loop management + var loop = { + + lastStartEvent: 0, + timeoutHandle: null, + intervalDuration: 100, + hasRaf: false, + + start: function() { + + loop.lastStartEvent = (new Date()).getTime(); + loop.repeat(); + + }, + + repeat: function() { + + loop.stop(); + + if (loop.hasRaf) { + loop.timeoutHandle = requestAnimationFrame(loop.main); + } else { + loop.timeoutHandle = setTimeout(loop.main, loop.intervalDuration); + } + + }, + + hasExpired: function() { + + var timeSinceLast = (new Date()).getTime() - loop.lastStartEvent; + if (timeSinceLast < 1500) return; + + loop.stop(); + return true; + }, + + isThrottled: function() { + var passedTime = (new Date()).getTime() - loop.lastMain; + if (passedTime > loop.intervalDuration) return false; + return true; + }, + + lastMain: (new Date()).getTime(), + + main: function() { + + if (loop.isThrottled()) { + loop.repeat(); + return; + } + + loop.lastMain = (new Date()).getTime(); + + if (loop.hasExpired()) return; + + if (handlers.registered.length === 0) { + // nothing to check + loop.stop(); + // slow down to save cycles + loop.intervalDuration = 200; + loop.repeat(); + } else { + // something to check + loop.stop(); + // speed up to make more responsive + loop.intervalDuration = 100; + loop.repeat(); + } + + if (locking.isLocked()) return; + + handlers.process(); + + }, + + stop: function() { + + var intervalAttached = (loop.timeoutHandle !== null); + if (!intervalAttached) return; + + if (loop.hasRaf) { + cancelAnimationFrame(loop.timeoutHandle); + loop.timeoutHandle = null; + } else { + clearTimeout(loop.timeoutHandle); + loop.timeoutHandle = null; + } + + } + + }; + + // jQuery element + event handler attachment / removal + $.extend($.event.special, { + + onscreen: { + + noBubble: true, + + add: function(data) { + handlers.register(this, data, handlers.TYPE.onscreen); + }, + + remove: function(data) { + handlers.unregister(this, data, handlers.TYPE.onscreen); + } + + }, + + inview: { + + noBubble: true, + + add: function(data) { + handlers.register(this, data, handlers.TYPE.inview); + }, + + remove: function(data) { + handlers.unregister(this, data, handlers.TYPE.inview); + } + + } + + }); + + // jQuery interfaces + // element functions + $.extend($.fn, { + + onscreen: function onscreen(callback) { + + if (callback) { + // standard event attachment jquery api behaviour + this.on('onscreen', callback); + return this; + } + + return measurements.get(this); + + }, + + inview: function inview(callback) { + + if (callback) { + // standard event attachment jquery api behaviour + this.on('inview', callback); + return this; + } + + return measurements.get(this); + + } + + }); + + // interface to allow for inview/onscreen to be disabled + var locking = { + locks: [], + + lock: function(name) { + + if (locking.isLocked(name)) return; + locking.locks.push(name); + + }, + + unlock: function(name) { + + if (!locking.isLocked(name)) return; + + for (var i = 0, l = locking.locks.length; i < l; i++) { + var lock = locking.locks[i]; + if (lock === name) { + locking.locks.splice(i, 1); + break; + } + } + + loop.start(); + + }, + + isLocked: function(name) { + + if (!name) return (locking.locks.length > 0); + + for (var i = 0, l = locking.locks.length; i < l; i++) { + var lock = locking.locks[i]; + if (lock === name) { + return true; + } + } + return false; + + } + + }; + + var config = { + + options: {}, + + config: function(options) { + if (typeof options !== 'object') return; + + $.extend(config.options, options); + + } + + }; + + // force an inview check - standard trigger event jquery api behaviour + $.inview = $.onscreen = function() { + loop.start(); + }; + + // attach locking interface to $.inview.lock(name); etc + $.extend($.inview, locking, config); + + // window size handlers + var wndw = { + + $el: $(window), + height: null, + width: null, + heightRatio: null, + widthRatio: null, + + resize: function() { + wndw.height = window.innerHeight || wndw.$el.height(); + wndw.width = window.innerWidth || wndw.$el.width(); + wndw.heightRatio = (100 / wndw.height); + wndw.widthRatio = (100 / wndw.width); + loop.start(); + } + + }; + + var measurements = { + + featureDetect: function() { + + loop.hasRaf = (window.requestAnimationFrame && window.cancelAnimationFrame); + + }, + + get: function get($element) { + + if ($element.length === 0) return; + + var el = $element[0]; + var offset; + + try { + offset = el.getBoundingClientRect(); + } catch (e) { + // IE11 throws an error if the element isn't present in the DOM + offset = { top: 0, right: 0, bottom: 0, left: 0, width: 0, height: 0 }; + } + + var height = offset.height; + var width = offset.width; + + // topleft from topleft of window + var top = offset['top']; + var left = offset['left']; + + // bottomright from bottomright of window + var bottom = wndw.height - (top + height); + var right = wndw.width - (left + width); + + // percentages of above + var percentFromTop = Math.round(wndw.heightRatio * top); + var percentFromLeft = Math.round(wndw.widthRatio * left); + var percentFromBottom = Math.round(wndw.heightRatio * bottom); + var percentFromRight = Math.round(wndw.widthRatio * right); + + // inview + var inviewHorizontal = null; + if (left + width > 0 && right < 0 && left < 0) { + inviewHorizontal = width; + } else if (left < 0) { // offscreen left + inviewHorizontal = (width + left); + } else if (left + width > wndw.width) { // offscreen right + inviewHorizontal = (wndw.width - left); + } else { // fully inscreen + inviewHorizontal = width; + } + + var inviewVertical = null; + if (top + height > 0 && bottom < 0 && top < 0) { + inviewVertical = height; + } else if (top < 0) { // offscreen top + inviewVertical = (height + top); + } else if (top + height > wndw.height) { // offscreen bottom + inviewVertical = (wndw.height - top); + } else { // fully inscreen + inviewVertical = height; + } + + // cap floor at 0 - cannot have negative inviews. + if (inviewVertical < 0) inviewVertical = 0; + if (inviewHorizontal < 0) inviewHorizontal = 0; + + var percentInviewVertical = Math.round((100 / height) * inviewVertical); + var percentInviewHorizontal = Math.round((100 / width) * inviewHorizontal); + + var elementArea = height * width; + var inviewArea = inviewVertical * inviewHorizontal; + var percentInview = Math.round((100 / elementArea) * inviewArea); + + var onscreen = percentInview > 0; + var offScreenSide = (percentFromRight > 100 || percentFromLeft > 100 || percentFromBottom > 100 || percentFromTop > 100); + if (offScreenSide) onscreen = false; + + var hasNoSize = (height <= 0 && width <= 0); + if (hasNoSize) onscreen = false; + + var cssHidden = measurements.isElementHidden(el); + if (cssHidden) onscreen = false; + + if (onscreen) { + + // perform some extra checks to make sure item is onscreen + var parents = measurements.getParents(el); + + // go through all the parents except the html tag + for (var i = 0, l = parents.length - 1; i < l; i++) { + var parent = parents[i]; + + cssHidden = measurements.isElementHidden(parent); + + // check if parents are visibility hidden or display none + if (cssHidden) { + onscreen = false; + break; + } + + // check if child is out of bounds inside its parent, unless fullscreen + var isOutOfBounds = measurements.isOutOfBounds(el, parent); + var isElementFullscreen = el === document.fullscreenElement; + + if (isOutOfBounds && !isElementFullscreen) { + onscreen = false; + break; + } + + } + + } + + var uniqueMeasurementId = '' + top + left + bottom + right + height + width + wndw.height + wndw.width + onscreen; + + return { + top: top, + left: left, + bottom: bottom, + right: right, + percentFromTop: percentFromTop, + percentFromLeft: percentFromLeft, + percentFromBottom: percentFromBottom, + percentFromRight: percentFromRight, + percentInview: percentInview, + percentInviewHorizontal: percentInviewHorizontal, + percentInviewVertical: percentInviewVertical, + onscreen: onscreen, + uniqueMeasurementId: uniqueMeasurementId, + timestamp: (new Date()).getTime() + }; + + }, + + getParents: function(element) { + var parents = []; + var parent; + while ((parent = element.parentElement)) { + parents.push(parent); + element = parent; + } + return parents; + }, + + isElementHidden: function(element) { + var cssHidden = (element.style.display === 'none' || element.style.visibility === 'hidden'); + if (cssHidden) return true; + + var style = window.getComputedStyle(element, null); + cssHidden = (style.display === 'none' || style.visibility === 'hidden'); + return cssHidden; + }, + + isOutOfBounds: function(element, parent) { + + var $parent = $(parent); + + if ($parent.css('overflow') === 'visible') { + return false; + } + + var $element = $(element); + + var elementPos = $element.offset(); + elementPos.bottom = (elementPos.top + element.clientHeight); + elementPos.right = (elementPos.left + element.clientWidth); + + var parentPos = $parent.offset(); + parentPos.bottom = (parentPos.top + parent.clientHeight); + parentPos.right = (parentPos.left + parent.clientWidth); + + // check inclusive of bounding rectangle edges + var isOutOfBounds = (Math.floor(elementPos.bottom) <= Math.ceil(parentPos.top) + || Math.floor(elementPos.right) <= Math.ceil(parentPos.left) + || Math.ceil(elementPos.top) >= Math.floor(parentPos.bottom) + || Math.ceil(elementPos.left) >= Math.floor(parentPos.right)); + + + return isOutOfBounds; + + } + + }; + + // attach event handlers + $(window).on({ + 'touchmove scroll mousedown keydown': loop.start, + 'resize': wndw.resize + }); + + $(measurements.featureDetect); + wndw.resize(); + +})(); diff --git a/libraries/jquery.min.js b/libraries/jquery.min.js index 49310b5..c4c6022 100644 --- a/libraries/jquery.min.js +++ b/libraries/jquery.min.js @@ -1,2 +1,2 @@ -/*! jQuery v3.6.0 | (c) OpenJS Foundation and other contributors | jquery.org/license */ -!function(e,t){"use strict";"object"==typeof module&&"object"==typeof module.exports?module.exports=e.document?t(e,!0):function(e){if(!e.document)throw new Error("jQuery requires a window with a document");return t(e)}:t(e)}("undefined"!=typeof window?window:this,function(C,e){"use strict";var t=[],r=Object.getPrototypeOf,s=t.slice,g=t.flat?function(e){return t.flat.call(e)}:function(e){return t.concat.apply([],e)},u=t.push,i=t.indexOf,n={},o=n.toString,v=n.hasOwnProperty,a=v.toString,l=a.call(Object),y={},m=function(e){return"function"==typeof e&&"number"!=typeof e.nodeType&&"function"!=typeof e.item},x=function(e){return null!=e&&e===e.window},E=C.document,c={type:!0,src:!0,nonce:!0,noModule:!0};function b(e,t,n){var r,i,o=(n=n||E).createElement("script");if(o.text=e,t)for(r in c)(i=t[r]||t.getAttribute&&t.getAttribute(r))&&o.setAttribute(r,i);n.head.appendChild(o).parentNode.removeChild(o)}function w(e){return null==e?e+"":"object"==typeof e||"function"==typeof e?n[o.call(e)]||"object":typeof e}var f="3.6.0",S=function(e,t){return new S.fn.init(e,t)};function p(e){var t=!!e&&"length"in e&&e.length,n=w(e);return!m(e)&&!x(e)&&("array"===n||0===t||"number"==typeof t&&0+~]|"+M+")"+M+"*"),U=new RegExp(M+"|>"),X=new RegExp(F),V=new RegExp("^"+I+"$"),G={ID:new RegExp("^#("+I+")"),CLASS:new RegExp("^\\.("+I+")"),TAG:new RegExp("^("+I+"|[*])"),ATTR:new RegExp("^"+W),PSEUDO:new RegExp("^"+F),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+M+"*(even|odd|(([+-]|)(\\d*)n|)"+M+"*(?:([+-]|)"+M+"*(\\d+)|))"+M+"*\\)|)","i"),bool:new RegExp("^(?:"+R+")$","i"),needsContext:new RegExp("^"+M+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+M+"*((?:-\\d)?\\d*)"+M+"*\\)|)(?=[^-]|$)","i")},Y=/HTML$/i,Q=/^(?:input|select|textarea|button)$/i,J=/^h\d$/i,K=/^[^{]+\{\s*\[native \w/,Z=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,ee=/[+~]/,te=new RegExp("\\\\[\\da-fA-F]{1,6}"+M+"?|\\\\([^\\r\\n\\f])","g"),ne=function(e,t){var n="0x"+e.slice(1)-65536;return t||(n<0?String.fromCharCode(n+65536):String.fromCharCode(n>>10|55296,1023&n|56320))},re=/([\0-\x1f\x7f]|^-?\d)|^-$|[^\0-\x1f\x7f-\uFFFF\w-]/g,ie=function(e,t){return t?"\0"===e?"\ufffd":e.slice(0,-1)+"\\"+e.charCodeAt(e.length-1).toString(16)+" ":"\\"+e},oe=function(){T()},ae=be(function(e){return!0===e.disabled&&"fieldset"===e.nodeName.toLowerCase()},{dir:"parentNode",next:"legend"});try{H.apply(t=O.call(p.childNodes),p.childNodes),t[p.childNodes.length].nodeType}catch(e){H={apply:t.length?function(e,t){L.apply(e,O.call(t))}:function(e,t){var n=e.length,r=0;while(e[n++]=t[r++]);e.length=n-1}}}function se(t,e,n,r){var i,o,a,s,u,l,c,f=e&&e.ownerDocument,p=e?e.nodeType:9;if(n=n||[],"string"!=typeof t||!t||1!==p&&9!==p&&11!==p)return n;if(!r&&(T(e),e=e||C,E)){if(11!==p&&(u=Z.exec(t)))if(i=u[1]){if(9===p){if(!(a=e.getElementById(i)))return n;if(a.id===i)return n.push(a),n}else if(f&&(a=f.getElementById(i))&&y(e,a)&&a.id===i)return n.push(a),n}else{if(u[2])return H.apply(n,e.getElementsByTagName(t)),n;if((i=u[3])&&d.getElementsByClassName&&e.getElementsByClassName)return H.apply(n,e.getElementsByClassName(i)),n}if(d.qsa&&!N[t+" "]&&(!v||!v.test(t))&&(1!==p||"object"!==e.nodeName.toLowerCase())){if(c=t,f=e,1===p&&(U.test(t)||z.test(t))){(f=ee.test(t)&&ye(e.parentNode)||e)===e&&d.scope||((s=e.getAttribute("id"))?s=s.replace(re,ie):e.setAttribute("id",s=S)),o=(l=h(t)).length;while(o--)l[o]=(s?"#"+s:":scope")+" "+xe(l[o]);c=l.join(",")}try{return H.apply(n,f.querySelectorAll(c)),n}catch(e){N(t,!0)}finally{s===S&&e.removeAttribute("id")}}}return g(t.replace($,"$1"),e,n,r)}function ue(){var r=[];return function e(t,n){return r.push(t+" ")>b.cacheLength&&delete e[r.shift()],e[t+" "]=n}}function le(e){return e[S]=!0,e}function ce(e){var t=C.createElement("fieldset");try{return!!e(t)}catch(e){return!1}finally{t.parentNode&&t.parentNode.removeChild(t),t=null}}function fe(e,t){var n=e.split("|"),r=n.length;while(r--)b.attrHandle[n[r]]=t}function pe(e,t){var n=t&&e,r=n&&1===e.nodeType&&1===t.nodeType&&e.sourceIndex-t.sourceIndex;if(r)return r;if(n)while(n=n.nextSibling)if(n===t)return-1;return e?1:-1}function de(t){return function(e){return"input"===e.nodeName.toLowerCase()&&e.type===t}}function he(n){return function(e){var t=e.nodeName.toLowerCase();return("input"===t||"button"===t)&&e.type===n}}function ge(t){return function(e){return"form"in e?e.parentNode&&!1===e.disabled?"label"in e?"label"in e.parentNode?e.parentNode.disabled===t:e.disabled===t:e.isDisabled===t||e.isDisabled!==!t&&ae(e)===t:e.disabled===t:"label"in e&&e.disabled===t}}function ve(a){return le(function(o){return o=+o,le(function(e,t){var n,r=a([],e.length,o),i=r.length;while(i--)e[n=r[i]]&&(e[n]=!(t[n]=e[n]))})})}function ye(e){return e&&"undefined"!=typeof e.getElementsByTagName&&e}for(e in d=se.support={},i=se.isXML=function(e){var t=e&&e.namespaceURI,n=e&&(e.ownerDocument||e).documentElement;return!Y.test(t||n&&n.nodeName||"HTML")},T=se.setDocument=function(e){var t,n,r=e?e.ownerDocument||e:p;return r!=C&&9===r.nodeType&&r.documentElement&&(a=(C=r).documentElement,E=!i(C),p!=C&&(n=C.defaultView)&&n.top!==n&&(n.addEventListener?n.addEventListener("unload",oe,!1):n.attachEvent&&n.attachEvent("onunload",oe)),d.scope=ce(function(e){return a.appendChild(e).appendChild(C.createElement("div")),"undefined"!=typeof e.querySelectorAll&&!e.querySelectorAll(":scope fieldset div").length}),d.attributes=ce(function(e){return e.className="i",!e.getAttribute("className")}),d.getElementsByTagName=ce(function(e){return e.appendChild(C.createComment("")),!e.getElementsByTagName("*").length}),d.getElementsByClassName=K.test(C.getElementsByClassName),d.getById=ce(function(e){return a.appendChild(e).id=S,!C.getElementsByName||!C.getElementsByName(S).length}),d.getById?(b.filter.ID=function(e){var t=e.replace(te,ne);return function(e){return e.getAttribute("id")===t}},b.find.ID=function(e,t){if("undefined"!=typeof t.getElementById&&E){var n=t.getElementById(e);return n?[n]:[]}}):(b.filter.ID=function(e){var n=e.replace(te,ne);return function(e){var t="undefined"!=typeof e.getAttributeNode&&e.getAttributeNode("id");return t&&t.value===n}},b.find.ID=function(e,t){if("undefined"!=typeof t.getElementById&&E){var n,r,i,o=t.getElementById(e);if(o){if((n=o.getAttributeNode("id"))&&n.value===e)return[o];i=t.getElementsByName(e),r=0;while(o=i[r++])if((n=o.getAttributeNode("id"))&&n.value===e)return[o]}return[]}}),b.find.TAG=d.getElementsByTagName?function(e,t){return"undefined"!=typeof t.getElementsByTagName?t.getElementsByTagName(e):d.qsa?t.querySelectorAll(e):void 0}:function(e,t){var n,r=[],i=0,o=t.getElementsByTagName(e);if("*"===e){while(n=o[i++])1===n.nodeType&&r.push(n);return r}return o},b.find.CLASS=d.getElementsByClassName&&function(e,t){if("undefined"!=typeof t.getElementsByClassName&&E)return t.getElementsByClassName(e)},s=[],v=[],(d.qsa=K.test(C.querySelectorAll))&&(ce(function(e){var t;a.appendChild(e).innerHTML="",e.querySelectorAll("[msallowcapture^='']").length&&v.push("[*^$]="+M+"*(?:''|\"\")"),e.querySelectorAll("[selected]").length||v.push("\\["+M+"*(?:value|"+R+")"),e.querySelectorAll("[id~="+S+"-]").length||v.push("~="),(t=C.createElement("input")).setAttribute("name",""),e.appendChild(t),e.querySelectorAll("[name='']").length||v.push("\\["+M+"*name"+M+"*="+M+"*(?:''|\"\")"),e.querySelectorAll(":checked").length||v.push(":checked"),e.querySelectorAll("a#"+S+"+*").length||v.push(".#.+[+~]"),e.querySelectorAll("\\\f"),v.push("[\\r\\n\\f]")}),ce(function(e){e.innerHTML="";var t=C.createElement("input");t.setAttribute("type","hidden"),e.appendChild(t).setAttribute("name","D"),e.querySelectorAll("[name=d]").length&&v.push("name"+M+"*[*^$|!~]?="),2!==e.querySelectorAll(":enabled").length&&v.push(":enabled",":disabled"),a.appendChild(e).disabled=!0,2!==e.querySelectorAll(":disabled").length&&v.push(":enabled",":disabled"),e.querySelectorAll("*,:x"),v.push(",.*:")})),(d.matchesSelector=K.test(c=a.matches||a.webkitMatchesSelector||a.mozMatchesSelector||a.oMatchesSelector||a.msMatchesSelector))&&ce(function(e){d.disconnectedMatch=c.call(e,"*"),c.call(e,"[s!='']:x"),s.push("!=",F)}),v=v.length&&new RegExp(v.join("|")),s=s.length&&new RegExp(s.join("|")),t=K.test(a.compareDocumentPosition),y=t||K.test(a.contains)?function(e,t){var n=9===e.nodeType?e.documentElement:e,r=t&&t.parentNode;return e===r||!(!r||1!==r.nodeType||!(n.contains?n.contains(r):e.compareDocumentPosition&&16&e.compareDocumentPosition(r)))}:function(e,t){if(t)while(t=t.parentNode)if(t===e)return!0;return!1},j=t?function(e,t){if(e===t)return l=!0,0;var n=!e.compareDocumentPosition-!t.compareDocumentPosition;return n||(1&(n=(e.ownerDocument||e)==(t.ownerDocument||t)?e.compareDocumentPosition(t):1)||!d.sortDetached&&t.compareDocumentPosition(e)===n?e==C||e.ownerDocument==p&&y(p,e)?-1:t==C||t.ownerDocument==p&&y(p,t)?1:u?P(u,e)-P(u,t):0:4&n?-1:1)}:function(e,t){if(e===t)return l=!0,0;var n,r=0,i=e.parentNode,o=t.parentNode,a=[e],s=[t];if(!i||!o)return e==C?-1:t==C?1:i?-1:o?1:u?P(u,e)-P(u,t):0;if(i===o)return pe(e,t);n=e;while(n=n.parentNode)a.unshift(n);n=t;while(n=n.parentNode)s.unshift(n);while(a[r]===s[r])r++;return r?pe(a[r],s[r]):a[r]==p?-1:s[r]==p?1:0}),C},se.matches=function(e,t){return se(e,null,null,t)},se.matchesSelector=function(e,t){if(T(e),d.matchesSelector&&E&&!N[t+" "]&&(!s||!s.test(t))&&(!v||!v.test(t)))try{var n=c.call(e,t);if(n||d.disconnectedMatch||e.document&&11!==e.document.nodeType)return n}catch(e){N(t,!0)}return 0":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace(te,ne),e[3]=(e[3]||e[4]||e[5]||"").replace(te,ne),"~="===e[2]&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),"nth"===e[1].slice(0,3)?(e[3]||se.error(e[0]),e[4]=+(e[4]?e[5]+(e[6]||1):2*("even"===e[3]||"odd"===e[3])),e[5]=+(e[7]+e[8]||"odd"===e[3])):e[3]&&se.error(e[0]),e},PSEUDO:function(e){var t,n=!e[6]&&e[2];return G.CHILD.test(e[0])?null:(e[3]?e[2]=e[4]||e[5]||"":n&&X.test(n)&&(t=h(n,!0))&&(t=n.indexOf(")",n.length-t)-n.length)&&(e[0]=e[0].slice(0,t),e[2]=n.slice(0,t)),e.slice(0,3))}},filter:{TAG:function(e){var t=e.replace(te,ne).toLowerCase();return"*"===e?function(){return!0}:function(e){return e.nodeName&&e.nodeName.toLowerCase()===t}},CLASS:function(e){var t=m[e+" "];return t||(t=new RegExp("(^|"+M+")"+e+"("+M+"|$)"))&&m(e,function(e){return t.test("string"==typeof e.className&&e.className||"undefined"!=typeof e.getAttribute&&e.getAttribute("class")||"")})},ATTR:function(n,r,i){return function(e){var t=se.attr(e,n);return null==t?"!="===r:!r||(t+="","="===r?t===i:"!="===r?t!==i:"^="===r?i&&0===t.indexOf(i):"*="===r?i&&-1:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i;function j(e,n,r){return m(n)?S.grep(e,function(e,t){return!!n.call(e,t,e)!==r}):n.nodeType?S.grep(e,function(e){return e===n!==r}):"string"!=typeof n?S.grep(e,function(e){return-1)[^>]*|#([\w-]+))$/;(S.fn.init=function(e,t,n){var r,i;if(!e)return this;if(n=n||D,"string"==typeof e){if(!(r="<"===e[0]&&">"===e[e.length-1]&&3<=e.length?[null,e,null]:q.exec(e))||!r[1]&&t)return!t||t.jquery?(t||n).find(e):this.constructor(t).find(e);if(r[1]){if(t=t instanceof S?t[0]:t,S.merge(this,S.parseHTML(r[1],t&&t.nodeType?t.ownerDocument||t:E,!0)),N.test(r[1])&&S.isPlainObject(t))for(r in t)m(this[r])?this[r](t[r]):this.attr(r,t[r]);return this}return(i=E.getElementById(r[2]))&&(this[0]=i,this.length=1),this}return e.nodeType?(this[0]=e,this.length=1,this):m(e)?void 0!==n.ready?n.ready(e):e(S):S.makeArray(e,this)}).prototype=S.fn,D=S(E);var L=/^(?:parents|prev(?:Until|All))/,H={children:!0,contents:!0,next:!0,prev:!0};function O(e,t){while((e=e[t])&&1!==e.nodeType);return e}S.fn.extend({has:function(e){var t=S(e,this),n=t.length;return this.filter(function(){for(var e=0;e\x20\t\r\n\f]*)/i,he=/^$|^module$|\/(?:java|ecma)script/i;ce=E.createDocumentFragment().appendChild(E.createElement("div")),(fe=E.createElement("input")).setAttribute("type","radio"),fe.setAttribute("checked","checked"),fe.setAttribute("name","t"),ce.appendChild(fe),y.checkClone=ce.cloneNode(!0).cloneNode(!0).lastChild.checked,ce.innerHTML="",y.noCloneChecked=!!ce.cloneNode(!0).lastChild.defaultValue,ce.innerHTML="",y.option=!!ce.lastChild;var ge={thead:[1,"","
"],col:[2,"","
"],tr:[2,"","
"],td:[3,"","
"],_default:[0,"",""]};function ve(e,t){var n;return n="undefined"!=typeof e.getElementsByTagName?e.getElementsByTagName(t||"*"):"undefined"!=typeof e.querySelectorAll?e.querySelectorAll(t||"*"):[],void 0===t||t&&A(e,t)?S.merge([e],n):n}function ye(e,t){for(var n=0,r=e.length;n",""]);var me=/<|&#?\w+;/;function xe(e,t,n,r,i){for(var o,a,s,u,l,c,f=t.createDocumentFragment(),p=[],d=0,h=e.length;d\s*$/g;function je(e,t){return A(e,"table")&&A(11!==t.nodeType?t:t.firstChild,"tr")&&S(e).children("tbody")[0]||e}function De(e){return e.type=(null!==e.getAttribute("type"))+"/"+e.type,e}function qe(e){return"true/"===(e.type||"").slice(0,5)?e.type=e.type.slice(5):e.removeAttribute("type"),e}function Le(e,t){var n,r,i,o,a,s;if(1===t.nodeType){if(Y.hasData(e)&&(s=Y.get(e).events))for(i in Y.remove(t,"handle events"),s)for(n=0,r=s[i].length;n").attr(n.scriptAttrs||{}).prop({charset:n.scriptCharset,src:n.url}).on("load error",i=function(e){r.remove(),i=null,e&&t("error"===e.type?404:200,e.type)}),E.head.appendChild(r[0])},abort:function(){i&&i()}}});var _t,zt=[],Ut=/(=)\?(?=&|$)|\?\?/;S.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var e=zt.pop()||S.expando+"_"+wt.guid++;return this[e]=!0,e}}),S.ajaxPrefilter("json jsonp",function(e,t,n){var r,i,o,a=!1!==e.jsonp&&(Ut.test(e.url)?"url":"string"==typeof e.data&&0===(e.contentType||"").indexOf("application/x-www-form-urlencoded")&&Ut.test(e.data)&&"data");if(a||"jsonp"===e.dataTypes[0])return r=e.jsonpCallback=m(e.jsonpCallback)?e.jsonpCallback():e.jsonpCallback,a?e[a]=e[a].replace(Ut,"$1"+r):!1!==e.jsonp&&(e.url+=(Tt.test(e.url)?"&":"?")+e.jsonp+"="+r),e.converters["script json"]=function(){return o||S.error(r+" was not called"),o[0]},e.dataTypes[0]="json",i=C[r],C[r]=function(){o=arguments},n.always(function(){void 0===i?S(C).removeProp(r):C[r]=i,e[r]&&(e.jsonpCallback=t.jsonpCallback,zt.push(r)),o&&m(i)&&i(o[0]),o=i=void 0}),"script"}),y.createHTMLDocument=((_t=E.implementation.createHTMLDocument("").body).innerHTML="
",2===_t.childNodes.length),S.parseHTML=function(e,t,n){return"string"!=typeof e?[]:("boolean"==typeof t&&(n=t,t=!1),t||(y.createHTMLDocument?((r=(t=E.implementation.createHTMLDocument("")).createElement("base")).href=E.location.href,t.head.appendChild(r)):t=E),o=!n&&[],(i=N.exec(e))?[t.createElement(i[1])]:(i=xe([e],t,o),o&&o.length&&S(o).remove(),S.merge([],i.childNodes)));var r,i,o},S.fn.load=function(e,t,n){var r,i,o,a=this,s=e.indexOf(" ");return-1").append(S.parseHTML(e)).find(r):e)}).always(n&&function(e,t){a.each(function(){n.apply(this,o||[e.responseText,t,e])})}),this},S.expr.pseudos.animated=function(t){return S.grep(S.timers,function(e){return t===e.elem}).length},S.offset={setOffset:function(e,t,n){var r,i,o,a,s,u,l=S.css(e,"position"),c=S(e),f={};"static"===l&&(e.style.position="relative"),s=c.offset(),o=S.css(e,"top"),u=S.css(e,"left"),("absolute"===l||"fixed"===l)&&-1<(o+u).indexOf("auto")?(a=(r=c.position()).top,i=r.left):(a=parseFloat(o)||0,i=parseFloat(u)||0),m(t)&&(t=t.call(e,n,S.extend({},s))),null!=t.top&&(f.top=t.top-s.top+a),null!=t.left&&(f.left=t.left-s.left+i),"using"in t?t.using.call(e,f):c.css(f)}},S.fn.extend({offset:function(t){if(arguments.length)return void 0===t?this:this.each(function(e){S.offset.setOffset(this,t,e)});var e,n,r=this[0];return r?r.getClientRects().length?(e=r.getBoundingClientRect(),n=r.ownerDocument.defaultView,{top:e.top+n.pageYOffset,left:e.left+n.pageXOffset}):{top:0,left:0}:void 0},position:function(){if(this[0]){var e,t,n,r=this[0],i={top:0,left:0};if("fixed"===S.css(r,"position"))t=r.getBoundingClientRect();else{t=this.offset(),n=r.ownerDocument,e=r.offsetParent||n.documentElement;while(e&&(e===n.body||e===n.documentElement)&&"static"===S.css(e,"position"))e=e.parentNode;e&&e!==r&&1===e.nodeType&&((i=S(e).offset()).top+=S.css(e,"borderTopWidth",!0),i.left+=S.css(e,"borderLeftWidth",!0))}return{top:t.top-i.top-S.css(r,"marginTop",!0),left:t.left-i.left-S.css(r,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){var e=this.offsetParent;while(e&&"static"===S.css(e,"position"))e=e.offsetParent;return e||re})}}),S.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(t,i){var o="pageYOffset"===i;S.fn[t]=function(e){return $(this,function(e,t,n){var r;if(x(e)?r=e:9===e.nodeType&&(r=e.defaultView),void 0===n)return r?r[i]:e[t];r?r.scrollTo(o?r.pageXOffset:n,o?n:r.pageYOffset):e[t]=n},t,e,arguments.length)}}),S.each(["top","left"],function(e,n){S.cssHooks[n]=Fe(y.pixelPosition,function(e,t){if(t)return t=We(e,n),Pe.test(t)?S(e).position()[n]+"px":t})}),S.each({Height:"height",Width:"width"},function(a,s){S.each({padding:"inner"+a,content:s,"":"outer"+a},function(r,o){S.fn[o]=function(e,t){var n=arguments.length&&(r||"boolean"!=typeof e),i=r||(!0===e||!0===t?"margin":"border");return $(this,function(e,t,n){var r;return x(e)?0===o.indexOf("outer")?e["inner"+a]:e.document.documentElement["client"+a]:9===e.nodeType?(r=e.documentElement,Math.max(e.body["scroll"+a],r["scroll"+a],e.body["offset"+a],r["offset"+a],r["client"+a])):void 0===n?S.css(e,t,i):S.style(e,t,n,i)},s,n?e:void 0,n)}})}),S.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(e,t){S.fn[t]=function(e){return this.on(t,e)}}),S.fn.extend({bind:function(e,t,n){return this.on(e,null,t,n)},unbind:function(e,t){return this.off(e,null,t)},delegate:function(e,t,n,r){return this.on(t,e,n,r)},undelegate:function(e,t,n){return 1===arguments.length?this.off(e,"**"):this.off(t,e||"**",n)},hover:function(e,t){return this.mouseenter(e).mouseleave(t||e)}}),S.each("blur focus focusin focusout resize scroll click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup contextmenu".split(" "),function(e,n){S.fn[n]=function(e,t){return 0+~]|"+M+")"+M+"*"),U=new RegExp(M+"|>"),X=new RegExp(F),V=new RegExp("^"+I+"$"),G={ID:new RegExp("^#("+I+")"),CLASS:new RegExp("^\\.("+I+")"),TAG:new RegExp("^("+I+"|[*])"),ATTR:new RegExp("^"+W),PSEUDO:new RegExp("^"+F),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+M+"*(even|odd|(([+-]|)(\\d*)n|)"+M+"*(?:([+-]|)"+M+"*(\\d+)|))"+M+"*\\)|)","i"),bool:new RegExp("^(?:"+R+")$","i"),needsContext:new RegExp("^"+M+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+M+"*((?:-\\d)?\\d*)"+M+"*\\)|)(?=[^-]|$)","i")},Y=/HTML$/i,Q=/^(?:input|select|textarea|button)$/i,J=/^h\d$/i,K=/^[^{]+\{\s*\[native \w/,Z=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,ee=/[+~]/,te=new RegExp("\\\\[\\da-fA-F]{1,6}"+M+"?|\\\\([^\\r\\n\\f])","g"),ne=function(e,t){var n="0x"+e.slice(1)-65536;return t||(n<0?String.fromCharCode(n+65536):String.fromCharCode(n>>10|55296,1023&n|56320))},re=/([\0-\x1f\x7f]|^-?\d)|^-$|[^\0-\x1f\x7f-\uFFFF\w-]/g,ie=function(e,t){return t?"\0"===e?"\ufffd":e.slice(0,-1)+"\\"+e.charCodeAt(e.length-1).toString(16)+" ":"\\"+e},oe=function(){T()},ae=be(function(e){return!0===e.disabled&&"fieldset"===e.nodeName.toLowerCase()},{dir:"parentNode",next:"legend"});try{H.apply(t=O.call(p.childNodes),p.childNodes),t[p.childNodes.length].nodeType}catch(e){H={apply:t.length?function(e,t){L.apply(e,O.call(t))}:function(e,t){var n=e.length,r=0;while(e[n++]=t[r++]);e.length=n-1}}}function se(t,e,n,r){var i,o,a,s,u,l,c,f=e&&e.ownerDocument,p=e?e.nodeType:9;if(n=n||[],"string"!=typeof t||!t||1!==p&&9!==p&&11!==p)return n;if(!r&&(T(e),e=e||C,E)){if(11!==p&&(u=Z.exec(t)))if(i=u[1]){if(9===p){if(!(a=e.getElementById(i)))return n;if(a.id===i)return n.push(a),n}else if(f&&(a=f.getElementById(i))&&y(e,a)&&a.id===i)return n.push(a),n}else{if(u[2])return H.apply(n,e.getElementsByTagName(t)),n;if((i=u[3])&&d.getElementsByClassName&&e.getElementsByClassName)return H.apply(n,e.getElementsByClassName(i)),n}if(d.qsa&&!N[t+" "]&&(!v||!v.test(t))&&(1!==p||"object"!==e.nodeName.toLowerCase())){if(c=t,f=e,1===p&&(U.test(t)||z.test(t))){(f=ee.test(t)&&ye(e.parentNode)||e)===e&&d.scope||((s=e.getAttribute("id"))?s=s.replace(re,ie):e.setAttribute("id",s=S)),o=(l=h(t)).length;while(o--)l[o]=(s?"#"+s:":scope")+" "+xe(l[o]);c=l.join(",")}try{return H.apply(n,f.querySelectorAll(c)),n}catch(e){N(t,!0)}finally{s===S&&e.removeAttribute("id")}}}return g(t.replace($,"$1"),e,n,r)}function ue(){var r=[];return function e(t,n){return r.push(t+" ")>b.cacheLength&&delete e[r.shift()],e[t+" "]=n}}function le(e){return e[S]=!0,e}function ce(e){var t=C.createElement("fieldset");try{return!!e(t)}catch(e){return!1}finally{t.parentNode&&t.parentNode.removeChild(t),t=null}}function fe(e,t){var n=e.split("|"),r=n.length;while(r--)b.attrHandle[n[r]]=t}function pe(e,t){var n=t&&e,r=n&&1===e.nodeType&&1===t.nodeType&&e.sourceIndex-t.sourceIndex;if(r)return r;if(n)while(n=n.nextSibling)if(n===t)return-1;return e?1:-1}function de(t){return function(e){return"input"===e.nodeName.toLowerCase()&&e.type===t}}function he(n){return function(e){var t=e.nodeName.toLowerCase();return("input"===t||"button"===t)&&e.type===n}}function ge(t){return function(e){return"form"in e?e.parentNode&&!1===e.disabled?"label"in e?"label"in e.parentNode?e.parentNode.disabled===t:e.disabled===t:e.isDisabled===t||e.isDisabled!==!t&&ae(e)===t:e.disabled===t:"label"in e&&e.disabled===t}}function ve(a){return le(function(o){return o=+o,le(function(e,t){var n,r=a([],e.length,o),i=r.length;while(i--)e[n=r[i]]&&(e[n]=!(t[n]=e[n]))})})}function ye(e){return e&&"undefined"!=typeof e.getElementsByTagName&&e}for(e in d=se.support={},i=se.isXML=function(e){var t=e&&e.namespaceURI,n=e&&(e.ownerDocument||e).documentElement;return!Y.test(t||n&&n.nodeName||"HTML")},T=se.setDocument=function(e){var t,n,r=e?e.ownerDocument||e:p;return r!=C&&9===r.nodeType&&r.documentElement&&(a=(C=r).documentElement,E=!i(C),p!=C&&(n=C.defaultView)&&n.top!==n&&(n.addEventListener?n.addEventListener("unload",oe,!1):n.attachEvent&&n.attachEvent("onunload",oe)),d.scope=ce(function(e){return a.appendChild(e).appendChild(C.createElement("div")),"undefined"!=typeof e.querySelectorAll&&!e.querySelectorAll(":scope fieldset div").length}),d.attributes=ce(function(e){return e.className="i",!e.getAttribute("className")}),d.getElementsByTagName=ce(function(e){return e.appendChild(C.createComment("")),!e.getElementsByTagName("*").length}),d.getElementsByClassName=K.test(C.getElementsByClassName),d.getById=ce(function(e){return a.appendChild(e).id=S,!C.getElementsByName||!C.getElementsByName(S).length}),d.getById?(b.filter.ID=function(e){var t=e.replace(te,ne);return function(e){return e.getAttribute("id")===t}},b.find.ID=function(e,t){if("undefined"!=typeof t.getElementById&&E){var n=t.getElementById(e);return n?[n]:[]}}):(b.filter.ID=function(e){var n=e.replace(te,ne);return function(e){var t="undefined"!=typeof e.getAttributeNode&&e.getAttributeNode("id");return t&&t.value===n}},b.find.ID=function(e,t){if("undefined"!=typeof t.getElementById&&E){var n,r,i,o=t.getElementById(e);if(o){if((n=o.getAttributeNode("id"))&&n.value===e)return[o];i=t.getElementsByName(e),r=0;while(o=i[r++])if((n=o.getAttributeNode("id"))&&n.value===e)return[o]}return[]}}),b.find.TAG=d.getElementsByTagName?function(e,t){return"undefined"!=typeof t.getElementsByTagName?t.getElementsByTagName(e):d.qsa?t.querySelectorAll(e):void 0}:function(e,t){var n,r=[],i=0,o=t.getElementsByTagName(e);if("*"===e){while(n=o[i++])1===n.nodeType&&r.push(n);return r}return o},b.find.CLASS=d.getElementsByClassName&&function(e,t){if("undefined"!=typeof t.getElementsByClassName&&E)return t.getElementsByClassName(e)},s=[],v=[],(d.qsa=K.test(C.querySelectorAll))&&(ce(function(e){var t;a.appendChild(e).innerHTML="",e.querySelectorAll("[msallowcapture^='']").length&&v.push("[*^$]="+M+"*(?:''|\"\")"),e.querySelectorAll("[selected]").length||v.push("\\["+M+"*(?:value|"+R+")"),e.querySelectorAll("[id~="+S+"-]").length||v.push("~="),(t=C.createElement("input")).setAttribute("name",""),e.appendChild(t),e.querySelectorAll("[name='']").length||v.push("\\["+M+"*name"+M+"*="+M+"*(?:''|\"\")"),e.querySelectorAll(":checked").length||v.push(":checked"),e.querySelectorAll("a#"+S+"+*").length||v.push(".#.+[+~]"),e.querySelectorAll("\\\f"),v.push("[\\r\\n\\f]")}),ce(function(e){e.innerHTML="";var t=C.createElement("input");t.setAttribute("type","hidden"),e.appendChild(t).setAttribute("name","D"),e.querySelectorAll("[name=d]").length&&v.push("name"+M+"*[*^$|!~]?="),2!==e.querySelectorAll(":enabled").length&&v.push(":enabled",":disabled"),a.appendChild(e).disabled=!0,2!==e.querySelectorAll(":disabled").length&&v.push(":enabled",":disabled"),e.querySelectorAll("*,:x"),v.push(",.*:")})),(d.matchesSelector=K.test(c=a.matches||a.webkitMatchesSelector||a.mozMatchesSelector||a.oMatchesSelector||a.msMatchesSelector))&&ce(function(e){d.disconnectedMatch=c.call(e,"*"),c.call(e,"[s!='']:x"),s.push("!=",F)}),v=v.length&&new RegExp(v.join("|")),s=s.length&&new RegExp(s.join("|")),t=K.test(a.compareDocumentPosition),y=t||K.test(a.contains)?function(e,t){var n=9===e.nodeType?e.documentElement:e,r=t&&t.parentNode;return e===r||!(!r||1!==r.nodeType||!(n.contains?n.contains(r):e.compareDocumentPosition&&16&e.compareDocumentPosition(r)))}:function(e,t){if(t)while(t=t.parentNode)if(t===e)return!0;return!1},j=t?function(e,t){if(e===t)return l=!0,0;var n=!e.compareDocumentPosition-!t.compareDocumentPosition;return n||(1&(n=(e.ownerDocument||e)==(t.ownerDocument||t)?e.compareDocumentPosition(t):1)||!d.sortDetached&&t.compareDocumentPosition(e)===n?e==C||e.ownerDocument==p&&y(p,e)?-1:t==C||t.ownerDocument==p&&y(p,t)?1:u?P(u,e)-P(u,t):0:4&n?-1:1)}:function(e,t){if(e===t)return l=!0,0;var n,r=0,i=e.parentNode,o=t.parentNode,a=[e],s=[t];if(!i||!o)return e==C?-1:t==C?1:i?-1:o?1:u?P(u,e)-P(u,t):0;if(i===o)return pe(e,t);n=e;while(n=n.parentNode)a.unshift(n);n=t;while(n=n.parentNode)s.unshift(n);while(a[r]===s[r])r++;return r?pe(a[r],s[r]):a[r]==p?-1:s[r]==p?1:0}),C},se.matches=function(e,t){return se(e,null,null,t)},se.matchesSelector=function(e,t){if(T(e),d.matchesSelector&&E&&!N[t+" "]&&(!s||!s.test(t))&&(!v||!v.test(t)))try{var n=c.call(e,t);if(n||d.disconnectedMatch||e.document&&11!==e.document.nodeType)return n}catch(e){N(t,!0)}return 0":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace(te,ne),e[3]=(e[3]||e[4]||e[5]||"").replace(te,ne),"~="===e[2]&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),"nth"===e[1].slice(0,3)?(e[3]||se.error(e[0]),e[4]=+(e[4]?e[5]+(e[6]||1):2*("even"===e[3]||"odd"===e[3])),e[5]=+(e[7]+e[8]||"odd"===e[3])):e[3]&&se.error(e[0]),e},PSEUDO:function(e){var t,n=!e[6]&&e[2];return G.CHILD.test(e[0])?null:(e[3]?e[2]=e[4]||e[5]||"":n&&X.test(n)&&(t=h(n,!0))&&(t=n.indexOf(")",n.length-t)-n.length)&&(e[0]=e[0].slice(0,t),e[2]=n.slice(0,t)),e.slice(0,3))}},filter:{TAG:function(e){var t=e.replace(te,ne).toLowerCase();return"*"===e?function(){return!0}:function(e){return e.nodeName&&e.nodeName.toLowerCase()===t}},CLASS:function(e){var t=m[e+" "];return t||(t=new RegExp("(^|"+M+")"+e+"("+M+"|$)"))&&m(e,function(e){return t.test("string"==typeof e.className&&e.className||"undefined"!=typeof e.getAttribute&&e.getAttribute("class")||"")})},ATTR:function(n,r,i){return function(e){var t=se.attr(e,n);return null==t?"!="===r:!r||(t+="","="===r?t===i:"!="===r?t!==i:"^="===r?i&&0===t.indexOf(i):"*="===r?i&&-1:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i;function j(e,n,r){return m(n)?S.grep(e,function(e,t){return!!n.call(e,t,e)!==r}):n.nodeType?S.grep(e,function(e){return e===n!==r}):"string"!=typeof n?S.grep(e,function(e){return-1)[^>]*|#([\w-]+))$/;(S.fn.init=function(e,t,n){var r,i;if(!e)return this;if(n=n||D,"string"==typeof e){if(!(r="<"===e[0]&&">"===e[e.length-1]&&3<=e.length?[null,e,null]:q.exec(e))||!r[1]&&t)return!t||t.jquery?(t||n).find(e):this.constructor(t).find(e);if(r[1]){if(t=t instanceof S?t[0]:t,S.merge(this,S.parseHTML(r[1],t&&t.nodeType?t.ownerDocument||t:E,!0)),N.test(r[1])&&S.isPlainObject(t))for(r in t)m(this[r])?this[r](t[r]):this.attr(r,t[r]);return this}return(i=E.getElementById(r[2]))&&(this[0]=i,this.length=1),this}return e.nodeType?(this[0]=e,this.length=1,this):m(e)?void 0!==n.ready?n.ready(e):e(S):S.makeArray(e,this)}).prototype=S.fn,D=S(E);var L=/^(?:parents|prev(?:Until|All))/,H={children:!0,contents:!0,next:!0,prev:!0};function O(e,t){while((e=e[t])&&1!==e.nodeType);return e}S.fn.extend({has:function(e){var t=S(e,this),n=t.length;return this.filter(function(){for(var e=0;e\x20\t\r\n\f]*)/i,he=/^$|^module$|\/(?:java|ecma)script/i;ce=E.createDocumentFragment().appendChild(E.createElement("div")),(fe=E.createElement("input")).setAttribute("type","radio"),fe.setAttribute("checked","checked"),fe.setAttribute("name","t"),ce.appendChild(fe),y.checkClone=ce.cloneNode(!0).cloneNode(!0).lastChild.checked,ce.innerHTML="",y.noCloneChecked=!!ce.cloneNode(!0).lastChild.defaultValue,ce.innerHTML="",y.option=!!ce.lastChild;var ge={thead:[1,"","
"],col:[2,"","
"],tr:[2,"","
"],td:[3,"","
"],_default:[0,"",""]};function ve(e,t){var n;return n="undefined"!=typeof e.getElementsByTagName?e.getElementsByTagName(t||"*"):"undefined"!=typeof e.querySelectorAll?e.querySelectorAll(t||"*"):[],void 0===t||t&&A(e,t)?S.merge([e],n):n}function ye(e,t){for(var n=0,r=e.length;n",""]);var me=/<|&#?\w+;/;function xe(e,t,n,r,i){for(var o,a,s,u,l,c,f=t.createDocumentFragment(),p=[],d=0,h=e.length;d\s*$/g;function je(e,t){return A(e,"table")&&A(11!==t.nodeType?t:t.firstChild,"tr")&&S(e).children("tbody")[0]||e}function De(e){return e.type=(null!==e.getAttribute("type"))+"/"+e.type,e}function qe(e){return"true/"===(e.type||"").slice(0,5)?e.type=e.type.slice(5):e.removeAttribute("type"),e}function Le(e,t){var n,r,i,o,a,s;if(1===t.nodeType){if(Y.hasData(e)&&(s=Y.get(e).events))for(i in Y.remove(t,"handle events"),s)for(n=0,r=s[i].length;n").attr(n.scriptAttrs||{}).prop({charset:n.scriptCharset,src:n.url}).on("load error",i=function(e){r.remove(),i=null,e&&t("error"===e.type?404:200,e.type)}),E.head.appendChild(r[0])},abort:function(){i&&i()}}});var _t,zt=[],Ut=/(=)\?(?=&|$)|\?\?/;S.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var e=zt.pop()||S.expando+"_"+wt.guid++;return this[e]=!0,e}}),S.ajaxPrefilter("json jsonp",function(e,t,n){var r,i,o,a=!1!==e.jsonp&&(Ut.test(e.url)?"url":"string"==typeof e.data&&0===(e.contentType||"").indexOf("application/x-www-form-urlencoded")&&Ut.test(e.data)&&"data");if(a||"jsonp"===e.dataTypes[0])return r=e.jsonpCallback=m(e.jsonpCallback)?e.jsonpCallback():e.jsonpCallback,a?e[a]=e[a].replace(Ut,"$1"+r):!1!==e.jsonp&&(e.url+=(Tt.test(e.url)?"&":"?")+e.jsonp+"="+r),e.converters["script json"]=function(){return o||S.error(r+" was not called"),o[0]},e.dataTypes[0]="json",i=C[r],C[r]=function(){o=arguments},n.always(function(){void 0===i?S(C).removeProp(r):C[r]=i,e[r]&&(e.jsonpCallback=t.jsonpCallback,zt.push(r)),o&&m(i)&&i(o[0]),o=i=void 0}),"script"}),y.createHTMLDocument=((_t=E.implementation.createHTMLDocument("").body).innerHTML="
",2===_t.childNodes.length),S.parseHTML=function(e,t,n){return"string"!=typeof e?[]:("boolean"==typeof t&&(n=t,t=!1),t||(y.createHTMLDocument?((r=(t=E.implementation.createHTMLDocument("")).createElement("base")).href=E.location.href,t.head.appendChild(r)):t=E),o=!n&&[],(i=N.exec(e))?[t.createElement(i[1])]:(i=xe([e],t,o),o&&o.length&&S(o).remove(),S.merge([],i.childNodes)));var r,i,o},S.fn.load=function(e,t,n){var r,i,o,a=this,s=e.indexOf(" ");return-1").append(S.parseHTML(e)).find(r):e)}).always(n&&function(e,t){a.each(function(){n.apply(this,o||[e.responseText,t,e])})}),this},S.expr.pseudos.animated=function(t){return S.grep(S.timers,function(e){return t===e.elem}).length},S.offset={setOffset:function(e,t,n){var r,i,o,a,s,u,l=S.css(e,"position"),c=S(e),f={};"static"===l&&(e.style.position="relative"),s=c.offset(),o=S.css(e,"top"),u=S.css(e,"left"),("absolute"===l||"fixed"===l)&&-1<(o+u).indexOf("auto")?(a=(r=c.position()).top,i=r.left):(a=parseFloat(o)||0,i=parseFloat(u)||0),m(t)&&(t=t.call(e,n,S.extend({},s))),null!=t.top&&(f.top=t.top-s.top+a),null!=t.left&&(f.left=t.left-s.left+i),"using"in t?t.using.call(e,f):c.css(f)}},S.fn.extend({offset:function(t){if(arguments.length)return void 0===t?this:this.each(function(e){S.offset.setOffset(this,t,e)});var e,n,r=this[0];return r?r.getClientRects().length?(e=r.getBoundingClientRect(),n=r.ownerDocument.defaultView,{top:e.top+n.pageYOffset,left:e.left+n.pageXOffset}):{top:0,left:0}:void 0},position:function(){if(this[0]){var e,t,n,r=this[0],i={top:0,left:0};if("fixed"===S.css(r,"position"))t=r.getBoundingClientRect();else{t=this.offset(),n=r.ownerDocument,e=r.offsetParent||n.documentElement;while(e&&(e===n.body||e===n.documentElement)&&"static"===S.css(e,"position"))e=e.parentNode;e&&e!==r&&1===e.nodeType&&((i=S(e).offset()).top+=S.css(e,"borderTopWidth",!0),i.left+=S.css(e,"borderLeftWidth",!0))}return{top:t.top-i.top-S.css(r,"marginTop",!0),left:t.left-i.left-S.css(r,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){var e=this.offsetParent;while(e&&"static"===S.css(e,"position"))e=e.offsetParent;return e||re})}}),S.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(t,i){var o="pageYOffset"===i;S.fn[t]=function(e){return $(this,function(e,t,n){var r;if(x(e)?r=e:9===e.nodeType&&(r=e.defaultView),void 0===n)return r?r[i]:e[t];r?r.scrollTo(o?r.pageXOffset:n,o?n:r.pageYOffset):e[t]=n},t,e,arguments.length)}}),S.each(["top","left"],function(e,n){S.cssHooks[n]=Fe(y.pixelPosition,function(e,t){if(t)return t=We(e,n),Pe.test(t)?S(e).position()[n]+"px":t})}),S.each({Height:"height",Width:"width"},function(a,s){S.each({padding:"inner"+a,content:s,"":"outer"+a},function(r,o){S.fn[o]=function(e,t){var n=arguments.length&&(r||"boolean"!=typeof e),i=r||(!0===e||!0===t?"margin":"border");return $(this,function(e,t,n){var r;return x(e)?0===o.indexOf("outer")?e["inner"+a]:e.document.documentElement["client"+a]:9===e.nodeType?(r=e.documentElement,Math.max(e.body["scroll"+a],r["scroll"+a],e.body["offset"+a],r["offset"+a],r["client"+a])):void 0===n?S.css(e,t,i):S.style(e,t,n,i)},s,n?e:void 0,n)}})}),S.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(e,t){S.fn[t]=function(e){return this.on(t,e)}}),S.fn.extend({bind:function(e,t,n){return this.on(e,null,t,n)},unbind:function(e,t){return this.off(e,null,t)},delegate:function(e,t,n,r){return this.on(t,e,n,r)},undelegate:function(e,t,n){return 1===arguments.length?this.off(e,"**"):this.off(t,e||"**",n)},hover:function(e,t){return this.mouseenter(e).mouseleave(t||e)}}),S.each("blur focus focusin focusout resize scroll click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup contextmenu".split(" "),function(e,n){S.fn[n]=function(e,t){return 0-1&&(s=x),a)for(l=s.length;l;)u=s[--l],n[u]=a[u];if(v.search(/mouse(down|up)|click/)>-1&&!n.which&&(n.which=1),-1!==v.search(/^touch/)&&(r=t(a),v=r.touches,c=r.changedTouches,p=v&&v.length?v[0]:c&&c.length?c[0]:o))for(h=0,d=k.length;hs||Math.abs(o.pageY-q)>s,B&&!i&&d("vmousecancel",n,r),d("vmousemove",n,r),h()}}function w(n){if(!K&&e.data(n.target,"lastTouchType")!==o){u(),delete e.data(n.target).lastTouchType;var i,s,r=a(n.target);d("vmouseup",n,r),B||(i=d("vclick",n,r))&&i.isDefaultPrevented()&&(s=t(n).changedTouches[0],L.push({touchID:z,x:s.clientX,y:s.clientY}),O=!0),d("vmouseout",n,r),B=!1,h()}}function T(t){var n,o=e.data(t,P);if(o)for(n in o)if(o[n])return!0;return!1}function b(){}var y,D,P="virtualMouseBindings",E="virtualTouchID",k="clientX clientY pageX pageY screenX screenY".split(" "),X="vmouseover vmousedown vmousemove vmouseup vclick vmouseout vmousecancel".split(" "),Y="altKey bubbles cancelable ctrlKey currentTarget detail eventPhase metaKey relatedTarget shiftKey target timeStamp view which".split(" "),M=e.event.mouseHooks?e.event.mouseHooks.props:[],x=Y.concat(M),I={},S=0,j=0,q=0,B=!1,L=[],O=!1,K=!1,N="addEventListener"in n,R=e(n),V=1,z=0;for(e.vmouse={moveDistanceThreshold:10,clickDistanceThreshold:10,resetTimerDuration:1500,maximumTimeBetweenTouches:100},D=0;D=2?15:30,verticalDistanceThreshold:t.devicePixelRatio>=2?15:30,getLocation:function(e){var n=t.pageXOffset,o=t.pageYOffset,i=e.clientX,a=e.clientY;return 0===e.pageY&&Math.floor(a)>Math.floor(e.pageY)||0===e.pageX&&Math.floor(i)>Math.floor(e.pageX)?(i-=n,a-=o):(ae.event.special.swipe.horizontalDistanceThreshold&&Math.abs(t.coords[1]-n.coords[1])n.coords[0]?"swipeleft":"swiperight";return i(o,"swipe",e.Event("swipe",{target:a,swipestart:t,swipestop:n}),!0),i(o,s,e.Event(s,{target:a,swipestart:t,swipestop:n}),!0),!0}return!1},eventInProgress:!1,setup:function(){var t,n=this,o=e(n),i={};t=e.data(this,"mobile-events"),t||(t={length:0},e.data(this,"mobile-events",t)),t.length++,t.swipe=i,i.start=function(t){if(!e.event.special.swipe.eventInProgress){e.event.special.swipe.eventInProgress=!0;var o,s=e.event.special.swipe.start(t),r=t.target,p=!1;i.move=function(t){s&&!t.isDefaultPrevented()&&(o=e.event.special.swipe.stop(t),p||(p=e.event.special.swipe.handleSwipe(s,o,n,r))&&(e.event.special.swipe.eventInProgress=!1),Math.abs(s.coords[0]-o.coords[0])>e.event.special.swipe.scrollSupressionThreshold&&t.preventDefault())},i.stop=function(){p=!0,e.event.special.swipe.eventInProgress=!1,a.off(c,i.move),i.move=null},a.on(c,i.move).one(u,i.stop)}},o.on(r,i.start)},teardown:function(){var t,n;t=e.data(this,"mobile-events"),t&&(n=t.swipe,delete t.swipe,0===--t.length&&e.removeData(this,"mobile-events")),n&&(n.start&&e(this).off(r,n.start),n.move&&a.off(c,n.move),n.stop&&a.off(u,n.stop))}},e.each({taphold:"tap",swipeleft:"swipe.left",swiperight:"swipe.right"},function(t,n){e.event.special[t]={setup:function(){e(this).bind(n,e.noop)},teardown:function(){e(this).unbind(n)}}}),e.event.special})}); +// This is a custom build which contains touch/swipe events support only. +// +// To create this build do the following: +// 1. Go to http://jquerymobile.com/download-builder/ +// 2. Select "Touch" under "Events" +// 3. click "Build My Download" + +/*! jQuery Mobile v1.5.0-rc1 | Copyright jQuery Foundation, Inc. | jquery.org/license */ + +!function(e,t,n){"function"==typeof define&&define.amd?define(["jquery"],function(o){return n(o,e,t),o.mobile}):n(e.jQuery,e,t)}(this,document,function(e,t,n,o){!function(t){"function"==typeof define&&define.amd?define("vmouse",["jquery"],t):t(e)}(function(e){function t(e){for(;e&&void 0!==e.originalEvent;)e=e.originalEvent;return e}function i(n,i){var a,s,r,u,c,p,l,h,d,v=n.type;if(n=e.Event(n),n.type=i,a=n.originalEvent,s=Y,v.search(/^(mouse|click)/)>-1&&(s=x),a)for(l=s.length;l;)u=s[--l],n[u]=a[u];if(v.search(/mouse(down|up)|click/)>-1&&!n.which&&(n.which=1),-1!==v.search(/^touch/)&&(r=t(a),v=r.touches,c=r.changedTouches,p=v&&v.length?v[0]:c&&c.length?c[0]:o))for(h=0,d=k.length;hs||Math.abs(o.pageY-q)>s,B&&!i&&d("vmousecancel",n,r),d("vmousemove",n,r),h()}}function w(n){if(!K&&e.data(n.target,"lastTouchType")!==o){u(),delete e.data(n.target).lastTouchType;var i,s,r=a(n.target);d("vmouseup",n,r),B||(i=d("vclick",n,r))&&i.isDefaultPrevented()&&(s=t(n).changedTouches[0],L.push({touchID:z,x:s.clientX,y:s.clientY}),O=!0),d("vmouseout",n,r),B=!1,h()}}function T(t){var n,o=e.data(t,P);if(o)for(n in o)if(o[n])return!0;return!1}function b(){}var y,D,P="virtualMouseBindings",E="virtualTouchID",k="clientX clientY pageX pageY screenX screenY".split(" "),X="vmouseover vmousedown vmousemove vmouseup vclick vmouseout vmousecancel".split(" "),Y="altKey bubbles cancelable ctrlKey currentTarget detail eventPhase metaKey relatedTarget shiftKey target timeStamp view which".split(" "),M=e.event.mouseHooks?e.event.mouseHooks.props:[],x=Y.concat(M),I={},S=0,j=0,q=0,B=!1,L=[],O=!1,K=!1,N="addEventListener"in n,R=e(n),V=1,z=0;for(e.vmouse={moveDistanceThreshold:10,clickDistanceThreshold:10,resetTimerDuration:1500,maximumTimeBetweenTouches:100},D=0;D=2?15:30,verticalDistanceThreshold:t.devicePixelRatio>=2?15:30,getLocation:function(e){var n=t.pageXOffset,o=t.pageYOffset,i=e.clientX,a=e.clientY;return 0===e.pageY&&Math.floor(a)>Math.floor(e.pageY)||0===e.pageX&&Math.floor(i)>Math.floor(e.pageX)?(i-=n,a-=o):(ae.event.special.swipe.horizontalDistanceThreshold&&Math.abs(t.coords[1]-n.coords[1])n.coords[0]?"swipeleft":"swiperight";return i(o,"swipe",e.Event("swipe",{target:a,swipestart:t,swipestop:n}),!0),i(o,s,e.Event(s,{target:a,swipestart:t,swipestop:n}),!0),!0}return!1},eventInProgress:!1,setup:function(){var t,n=this,o=e(n),i={};t=e.data(this,"mobile-events"),t||(t={length:0},e.data(this,"mobile-events",t)),t.length++,t.swipe=i,i.start=function(t){if(!e.event.special.swipe.eventInProgress){e.event.special.swipe.eventInProgress=!0;var o,s=e.event.special.swipe.start(t),r=t.target,p=!1;i.move=function(t){s&&!t.isDefaultPrevented()&&(o=e.event.special.swipe.stop(t),p||(p=e.event.special.swipe.handleSwipe(s,o,n,r))&&(e.event.special.swipe.eventInProgress=!1),Math.abs(s.coords[0]-o.coords[0])>e.event.special.swipe.scrollSupressionThreshold&&t.preventDefault())},i.stop=function(){p=!0,e.event.special.swipe.eventInProgress=!1,a.off(c,i.move),i.move=null},a.on(c,i.move).one(u,i.stop)}},o.on(r,i.start)},teardown:function(){var t,n;t=e.data(this,"mobile-events"),t&&(n=t.swipe,delete t.swipe,0===--t.length&&e.removeData(this,"mobile-events")),n&&(n.start&&e(this).off(r,n.start),n.move&&a.off(c,n.move),n.stop&&a.off(u,n.stop))}},e.each({taphold:"tap",swipeleft:"swipe.left",swiperight:"swipe.right"},function(t,n){e.event.special[t]={setup:function(){e(this).bind(n,e.noop)},teardown:function(){e(this).unbind(n)}}}),e.event.special})}); diff --git a/libraries/jquery.resize.js b/libraries/jquery.resize.js index 38ab19e..f15fd4d 100644 --- a/libraries/jquery.resize.js +++ b/libraries/jquery.resize.js @@ -1,270 +1,270 @@ -'use strict'; -// jquery.resize 2020-05-27 - -(function() { - - // skip if library is already handling resize events - if ($.event.special.resize) return; - // skip if old library has been loaded - if ($.fn.off.elementResizeOriginalOff) return; - - // handler id generation - var expando = { - - index: 0, - - check: function(element) { - // check that the element has a valid jquery expando property, or make one - - var hasExpando = (element[$.expando]); - if (hasExpando) return; - - element[$.expando] = ++expando.index; - - }, - - make: function(element, data) { - // make a unique event id from the element's expando property and the event handler guid - - expando.check(element); - return data.guid + "-" + element[$.expando]; - - } - - }; - - // handler functions - var handlers = { - - registered: [], - shouldReProcess: true, - - register: function(element, data) { - - var $element = $(element); - handlers.registered.push({ - id: expando.make(element, data), - $element: $element, - _measurement: measurements.get($element).uniqueMeasurementId, - _hasTriggered: false - }); - handlers.shouldReProcess = true; - - }, - - unregister: function(element, data) { - - var registered = handlers.registered; - - var findId = expando.make(element, data); - for (var i = registered.length-1, l = -1; i > l; i--) { - var item = registered[i] - if (item.id != findId) continue; - registered.splice(i,1); - handlers.shouldReProcess = true; - } - - }, - - process: function() { - - var registered = handlers.registered; - var registeredCount; - - handlers.shouldReProcess = true; - while (handlers.shouldReProcess) { - handlers.shouldReProcess = false; - - registeredCount = registered.length; - if (registeredCount == 0) return; - - for (var i = 0; i < registeredCount; i++) { - var item = registered[i]; - var measure = measurements.get(item.$element); - - // check if measure has the same values as last - var wasPreviouslyMeasured = (item._measurement !== undefined); - - if (wasPreviouslyMeasured && item._hasTriggered) { - var hasMeasureChanged = (item._measurement != measure.uniqueMeasurementId); - if (!hasMeasureChanged) { - continue; - } - } - - item._measurement = measure.uniqueMeasurementId; - item._hasTriggered = true; - - handlers.trigger(item); - - if (handlers.shouldReProcess) { - break; - } - - } - } - - }, - - trigger: function triggerResize(item) { - - item.$element.trigger('resize'); - - } - - }; - - // checking loop management - var loop = { - - lastStartEvent: 0, - timeoutHandle: null, - intervalDuration: 100, - hasRaf: false, - - start: function() { - - loop.lastStartEvent = (new Date()).getTime(); - loop.repeat(); - - }, - - force: function() { - - loop.lastStartEvent = (new Date()).getTime(); - loop.main(true); - loop.repeat(); - - }, - - repeat: function() { - - loop.stop(); - - if (loop.hasRaf) { - loop.timeoutHandle = requestAnimationFrame(loop.main); - } else { - loop.timeoutHandle = setTimeout(loop.main, loop.intervalDuration); - } - - }, - - hasExpired: function() { - - var timeSinceLast = (new Date()).getTime() - loop.lastStartEvent; - if (timeSinceLast < 1500) return; - - loop.stop() - return true; - }, - - lastMain: (new Date()).getTime(), - - isThrottled: function() { - var passedTime = (new Date()).getTime() - loop.lastMain; - if (passedTime > loop.intervalDuration) return false; - return true; - }, - - main: function(force) { - - if (force !== true && loop.isThrottled()) { - loop.repeat(); - return; - } - - loop.lastMain = (new Date()).getTime(); - - if (force !== true && loop.hasExpired()) { - loop.stop(); - return; - } - - if (handlers.registered.length == 0) { - // nothing to check - loop.stop(); - // slow down to save cycles - loop.intervalDuration = 200; - loop.repeat(); - } else { - // something to check - loop.stop(); - // speed up to make more responsive - loop.intervalDuration = 100; - loop.repeat(); - } - - handlers.process(); - - }, - - stop: function() { - - var intervalAttached = (loop.timeoutHandle !== null); - if (!intervalAttached) return; - - if (loop.hasRaf) { - cancelAnimationFrame(loop.timeoutHandle); - loop.timeoutHandle = null; - } else { - clearTimeout(loop.timeoutHandle); - loop.timeoutHandle = null; - } - - } - - }; - - // jQuery element + event handler attachment / removal - $.extend($.event.special, { - - resize: { - - noBubble: true, - - add: function(data) { - // allow window resize to be handled by browser - if (this === window) return; - handlers.register(this, data); - }, - - remove: function(data) { - // allow window resize to be handled by browser - if (this === window) return; - handlers.unregister(this, data); - } - - } - - }); - - var measurements = { - - featureDetect: function() { - - loop.hasRaf = (window.requestAnimationFrame && window.cancelAnimationFrame); - - }, - - get: function($element) { - - var element = $element[0]; - var height = element.clientHeight; - var width = element.clientWidth; - - return { - uniqueMeasurementId: height+","+width - }; - - } - - }; - - //attach event handlers - $(window).on({ - "touchmove scroll mousedown keydown": loop.start, // asynchronous - "resize": loop.force // synchronous - }); - $(measurements.featureDetect); - -})(); +'use strict'; +// jquery.resize 2020-05-27 + +(function() { + + // skip if library is already handling resize events + if ($.event.special.resize) return; + // skip if old library has been loaded + if ($.fn.off.elementResizeOriginalOff) return; + + // handler id generation + var expando = { + + index: 0, + + check: function(element) { + // check that the element has a valid jquery expando property, or make one + + var hasExpando = (element[$.expando]); + if (hasExpando) return; + + element[$.expando] = ++expando.index; + + }, + + make: function(element, data) { + // make a unique event id from the element's expando property and the event handler guid + + expando.check(element); + return data.guid + "-" + element[$.expando]; + + } + + }; + + // handler functions + var handlers = { + + registered: [], + shouldReProcess: true, + + register: function(element, data) { + + var $element = $(element); + handlers.registered.push({ + id: expando.make(element, data), + $element: $element, + _measurement: measurements.get($element).uniqueMeasurementId, + _hasTriggered: false + }); + handlers.shouldReProcess = true; + + }, + + unregister: function(element, data) { + + var registered = handlers.registered; + + var findId = expando.make(element, data); + for (var i = registered.length-1, l = -1; i > l; i--) { + var item = registered[i] + if (item.id != findId) continue; + registered.splice(i,1); + handlers.shouldReProcess = true; + } + + }, + + process: function() { + + var registered = handlers.registered; + var registeredCount; + + handlers.shouldReProcess = true; + while (handlers.shouldReProcess) { + handlers.shouldReProcess = false; + + registeredCount = registered.length; + if (registeredCount == 0) return; + + for (var i = 0; i < registeredCount; i++) { + var item = registered[i]; + var measure = measurements.get(item.$element); + + // check if measure has the same values as last + var wasPreviouslyMeasured = (item._measurement !== undefined); + + if (wasPreviouslyMeasured && item._hasTriggered) { + var hasMeasureChanged = (item._measurement != measure.uniqueMeasurementId); + if (!hasMeasureChanged) { + continue; + } + } + + item._measurement = measure.uniqueMeasurementId; + item._hasTriggered = true; + + handlers.trigger(item); + + if (handlers.shouldReProcess) { + break; + } + + } + } + + }, + + trigger: function triggerResize(item) { + + item.$element.trigger('resize'); + + } + + }; + + // checking loop management + var loop = { + + lastStartEvent: 0, + timeoutHandle: null, + intervalDuration: 100, + hasRaf: false, + + start: function() { + + loop.lastStartEvent = (new Date()).getTime(); + loop.repeat(); + + }, + + force: function() { + + loop.lastStartEvent = (new Date()).getTime(); + loop.main(true); + loop.repeat(); + + }, + + repeat: function() { + + loop.stop(); + + if (loop.hasRaf) { + loop.timeoutHandle = requestAnimationFrame(loop.main); + } else { + loop.timeoutHandle = setTimeout(loop.main, loop.intervalDuration); + } + + }, + + hasExpired: function() { + + var timeSinceLast = (new Date()).getTime() - loop.lastStartEvent; + if (timeSinceLast < 1500) return; + + loop.stop() + return true; + }, + + lastMain: (new Date()).getTime(), + + isThrottled: function() { + var passedTime = (new Date()).getTime() - loop.lastMain; + if (passedTime > loop.intervalDuration) return false; + return true; + }, + + main: function(force) { + + if (force !== true && loop.isThrottled()) { + loop.repeat(); + return; + } + + loop.lastMain = (new Date()).getTime(); + + if (force !== true && loop.hasExpired()) { + loop.stop(); + return; + } + + if (handlers.registered.length == 0) { + // nothing to check + loop.stop(); + // slow down to save cycles + loop.intervalDuration = 200; + loop.repeat(); + } else { + // something to check + loop.stop(); + // speed up to make more responsive + loop.intervalDuration = 100; + loop.repeat(); + } + + handlers.process(); + + }, + + stop: function() { + + var intervalAttached = (loop.timeoutHandle !== null); + if (!intervalAttached) return; + + if (loop.hasRaf) { + cancelAnimationFrame(loop.timeoutHandle); + loop.timeoutHandle = null; + } else { + clearTimeout(loop.timeoutHandle); + loop.timeoutHandle = null; + } + + } + + }; + + // jQuery element + event handler attachment / removal + $.extend($.event.special, { + + resize: { + + noBubble: true, + + add: function(data) { + // allow window resize to be handled by browser + if (this === window) return; + handlers.register(this, data); + }, + + remove: function(data) { + // allow window resize to be handled by browser + if (this === window) return; + handlers.unregister(this, data); + } + + } + + }); + + var measurements = { + + featureDetect: function() { + + loop.hasRaf = (window.requestAnimationFrame && window.cancelAnimationFrame); + + }, + + get: function($element) { + + var element = $element[0]; + var height = element.clientHeight; + var width = element.clientWidth; + + return { + uniqueMeasurementId: height+","+width + }; + + } + + }; + + //attach event handlers + $(window).on({ + "touchmove scroll mousedown keydown": loop.start, // asynchronous + "resize": loop.force // synchronous + }); + $(measurements.featureDetect); + +})(); diff --git a/libraries/modernizr.js b/libraries/modernizr.js index c66a472..6e0ce8b 100644 --- a/libraries/modernizr.js +++ b/libraries/modernizr.js @@ -1,3 +1,3 @@ -/*! modernizr 3.6.0 (Custom Build) | MIT * - * https://modernizr.com/download/?-csscolumns-cssreflections-flexbox-flexboxlegacy-fullscreen-inputtypes-touchevents-domprefixes-prefixes-setclasses-testallprops-testprop-teststyles !*/ - !function(e,t,n){function r(e,t){return typeof e===t}function o(){var e,t,n,o,i,s,l;for(var a in x)if(x.hasOwnProperty(a)){if(e=[],t=x[a],t.name&&(e.push(t.name.toLowerCase()),t.options&&t.options.aliases&&t.options.aliases.length))for(n=0;nd;d++)if(m=e[d],v=B.style[m],s(m,"-")&&(m=a(m)),B.style[m]!==n){if(i||r(o,"undefined"))return u(),"pfx"==t?m:!0;try{B.style[m]=o}catch(g){}if(B.style[m]!=v)return u(),"pfx"==t?m:!0}return u(),!1}function y(e,t,n,o,i){var s=e.charAt(0).toUpperCase()+e.slice(1),l=(e+" "+z.join(s+" ")+s).split(" ");return r(t,"string")||r(t,"undefined")?v(l,t,o,i):(l=(e+" "+T.join(s+" ")+s).split(" "),d(l,t,n))}function g(e,t,r){return y(e,n,n,t,r)}var C=[],x=[],b={_version:"3.6.0",_config:{classPrefix:"",enableClasses:!0,enableJSClass:!0,usePrefixes:!0},_q:[],on:function(e,t){var n=this;setTimeout(function(){t(n[e])},0)},addTest:function(e,t,n){x.push({name:e,fn:t,options:n})},addAsyncTest:function(e){x.push({name:null,fn:e})}},S=b._config.usePrefixes?" -webkit- -moz- -o- -ms- ".split(" "):["",""];b._prefixes=S;var Modernizr=function(){};Modernizr.prototype=b,Modernizr=new Modernizr;var w=t.documentElement,_="svg"===w.nodeName.toLowerCase(),k="Moz O ms Webkit",T=b._config.usePrefixes?k.toLowerCase().split(" "):[];b._domPrefixes=T;var z=b._config.usePrefixes?k.split(" "):[];b._cssomPrefixes=z;var P=function(t){var r,o=S.length,i=e.CSSRule;if("undefined"==typeof i)return n;if(!t)return!1;if(t=t.replace(/^@/,""),r=t.replace(/-/g,"_").toUpperCase()+"_RULE",r in i)return"@"+t;for(var s=0;o>s;s++){var l=S[s],a=l.toUpperCase()+"_"+r;if(a in i)return"@-"+l.toLowerCase()+"-"+t}return!1};b.atRule=P;var E=l("input"),R="search tel url email datetime date month week time datetime-local number range color".split(" "),A={};Modernizr.inputtypes=function(e){for(var r,o,i,s=e.length,l="1)",a=0;s>a;a++)E.setAttribute("type",r=e[a]),i="text"!==E.type&&"style"in E,i&&(E.value=l,E.style.cssText="position:absolute;visibility:hidden;",/^range$/.test(r)&&E.style.WebkitAppearance!==n?(w.appendChild(E),o=t.defaultView,i=o.getComputedStyle&&"textfield"!==o.getComputedStyle(E,null).WebkitAppearance&&0!==E.offsetHeight,w.removeChild(E)):/^(search|tel)$/.test(r)||(i=/^(url|email)$/.test(r)?E.checkValidity&&E.checkValidity()===!1:E.value!=l)),A[e[a]]=!!i;return A}(R);var j=b.testStyles=f;Modernizr.addTest("touchevents",function(){var n;if("ontouchstart"in e||e.DocumentTouch&&t instanceof DocumentTouch)n=!0;else{var r=["@media (",S.join("touch-enabled),("),"heartz",")","{#modernizr{top:9px;position:absolute}}"].join("");j(r,function(e){n=9===e.offsetTop})}return n});var N={elem:l("modernizr")};Modernizr._q.push(function(){delete N.elem});var B={style:N.elem.style};Modernizr._q.unshift(function(){delete B.style});b.testProp=function(e,t,r){return v([e],n,t,r)};b.testAllProps=y,b.testAllProps=g,function(){Modernizr.addTest("csscolumns",function(){var e=!1,t=g("columnCount");try{e=!!t,e&&(e=new Boolean(e))}catch(n){}return e});for(var e,t,n=["Width","Span","Fill","Gap","Rule","RuleColor","RuleStyle","RuleWidth","BreakBefore","BreakAfter","BreakInside"],r=0;rd;d++)if(m=e[d],v=B.style[m],s(m,"-")&&(m=a(m)),B.style[m]!==n){if(i||r(o,"undefined"))return u(),"pfx"==t?m:!0;try{B.style[m]=o}catch(g){}if(B.style[m]!=v)return u(),"pfx"==t?m:!0}return u(),!1}function y(e,t,n,o,i){var s=e.charAt(0).toUpperCase()+e.slice(1),l=(e+" "+z.join(s+" ")+s).split(" ");return r(t,"string")||r(t,"undefined")?v(l,t,o,i):(l=(e+" "+T.join(s+" ")+s).split(" "),d(l,t,n))}function g(e,t,r){return y(e,n,n,t,r)}var C=[],x=[],b={_version:"3.6.0",_config:{classPrefix:"",enableClasses:!0,enableJSClass:!0,usePrefixes:!0},_q:[],on:function(e,t){var n=this;setTimeout(function(){t(n[e])},0)},addTest:function(e,t,n){x.push({name:e,fn:t,options:n})},addAsyncTest:function(e){x.push({name:null,fn:e})}},S=b._config.usePrefixes?" -webkit- -moz- -o- -ms- ".split(" "):["",""];b._prefixes=S;var Modernizr=function(){};Modernizr.prototype=b,Modernizr=new Modernizr;var w=t.documentElement,_="svg"===w.nodeName.toLowerCase(),k="Moz O ms Webkit",T=b._config.usePrefixes?k.toLowerCase().split(" "):[];b._domPrefixes=T;var z=b._config.usePrefixes?k.split(" "):[];b._cssomPrefixes=z;var P=function(t){var r,o=S.length,i=e.CSSRule;if("undefined"==typeof i)return n;if(!t)return!1;if(t=t.replace(/^@/,""),r=t.replace(/-/g,"_").toUpperCase()+"_RULE",r in i)return"@"+t;for(var s=0;o>s;s++){var l=S[s],a=l.toUpperCase()+"_"+r;if(a in i)return"@-"+l.toLowerCase()+"-"+t}return!1};b.atRule=P;var E=l("input"),R="search tel url email datetime date month week time datetime-local number range color".split(" "),A={};Modernizr.inputtypes=function(e){for(var r,o,i,s=e.length,l="1)",a=0;s>a;a++)E.setAttribute("type",r=e[a]),i="text"!==E.type&&"style"in E,i&&(E.value=l,E.style.cssText="position:absolute;visibility:hidden;",/^range$/.test(r)&&E.style.WebkitAppearance!==n?(w.appendChild(E),o=t.defaultView,i=o.getComputedStyle&&"textfield"!==o.getComputedStyle(E,null).WebkitAppearance&&0!==E.offsetHeight,w.removeChild(E)):/^(search|tel)$/.test(r)||(i=/^(url|email)$/.test(r)?E.checkValidity&&E.checkValidity()===!1:E.value!=l)),A[e[a]]=!!i;return A}(R);var j=b.testStyles=f;Modernizr.addTest("touchevents",function(){var n;if("ontouchstart"in e||e.DocumentTouch&&t instanceof DocumentTouch)n=!0;else{var r=["@media (",S.join("touch-enabled),("),"heartz",")","{#modernizr{top:9px;position:absolute}}"].join("");j(r,function(e){n=9===e.offsetTop})}return n});var N={elem:l("modernizr")};Modernizr._q.push(function(){delete N.elem});var B={style:N.elem.style};Modernizr._q.unshift(function(){delete B.style});b.testProp=function(e,t,r){return v([e],n,t,r)};b.testAllProps=y,b.testAllProps=g,function(){Modernizr.addTest("csscolumns",function(){var e=!1,t=g("columnCount");try{e=!!t,e&&(e=new Boolean(e))}catch(n){}return e});for(var e,t,n=["Width","Span","Fill","Gap","Rule","RuleColor","RuleStyle","RuleWidth","BreakBefore","BreakAfter","BreakInside"],r=0;r 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) { - args[_key - 1] = arguments[_key]; - } - - printWarning('warn', format, args); - } - } - function error(format) { - { - for (var _len2 = arguments.length, args = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) { - args[_key2 - 1] = arguments[_key2]; - } - - printWarning('error', format, args); - } - } - - function printWarning(level, format, args) { - // When changing this logic, you might want to also - // update consoleWithStackDev.www.js as well. - { - var ReactDebugCurrentFrame = ReactSharedInternals.ReactDebugCurrentFrame; - var stack = ReactDebugCurrentFrame.getStackAddendum(); - - if (stack !== '') { - format += '%s'; - args = args.concat([stack]); - } - - var argsWithFormat = args.map(function (item) { - return '' + item; - }); // Careful: RN currently depends on this prefix - - argsWithFormat.unshift('Warning: ' + format); // We intentionally don't use spread (or .apply) directly because it - // breaks IE9: https://github.com/facebook/react/issues/13610 - // eslint-disable-next-line react-internal/no-production-logging - - Function.prototype.apply.call(console[level], console, argsWithFormat); - } - } - - if (!React) { - { - throw Error( "ReactDOM was loaded before React. Make sure you load the React package before loading ReactDOM." ); - } - } - - var FunctionComponent = 0; - var ClassComponent = 1; - var IndeterminateComponent = 2; // Before we know whether it is function or class - - var HostRoot = 3; // Root of a host tree. Could be nested inside another node. - - var HostPortal = 4; // A subtree. Could be an entry point to a different renderer. - - var HostComponent = 5; - var HostText = 6; - var Fragment = 7; - var Mode = 8; - var ContextConsumer = 9; - var ContextProvider = 10; - var ForwardRef = 11; - var Profiler = 12; - var SuspenseComponent = 13; - var MemoComponent = 14; - var SimpleMemoComponent = 15; - var LazyComponent = 16; - var IncompleteClassComponent = 17; - var DehydratedFragment = 18; - var SuspenseListComponent = 19; - var FundamentalComponent = 20; - var ScopeComponent = 21; - var Block = 22; - var OffscreenComponent = 23; - var LegacyHiddenComponent = 24; - - // Filter certain DOM attributes (e.g. src, href) if their values are empty strings. - - var enableProfilerTimer = true; // Record durations for commit and passive effects phases. - - var enableFundamentalAPI = false; // Experimental Scope support. - var enableNewReconciler = false; // Errors that are thrown while unmounting (or after in the case of passive effects) - var warnAboutStringRefs = false; - - var allNativeEvents = new Set(); - /** - * Mapping from registration name to event name - */ - - - var registrationNameDependencies = {}; - /** - * Mapping from lowercase registration names to the properly cased version, - * used to warn in the case of missing event handlers. Available - * only in true. - * @type {Object} - */ - - var possibleRegistrationNames = {} ; // Trust the developer to only use possibleRegistrationNames in true - - function registerTwoPhaseEvent(registrationName, dependencies) { - registerDirectEvent(registrationName, dependencies); - registerDirectEvent(registrationName + 'Capture', dependencies); - } - function registerDirectEvent(registrationName, dependencies) { - { - if (registrationNameDependencies[registrationName]) { - error('EventRegistry: More than one plugin attempted to publish the same ' + 'registration name, `%s`.', registrationName); - } - } - - registrationNameDependencies[registrationName] = dependencies; - - { - var lowerCasedName = registrationName.toLowerCase(); - possibleRegistrationNames[lowerCasedName] = registrationName; - - if (registrationName === 'onDoubleClick') { - possibleRegistrationNames.ondblclick = registrationName; - } - } - - for (var i = 0; i < dependencies.length; i++) { - allNativeEvents.add(dependencies[i]); - } - } - - var canUseDOM = !!(typeof window !== 'undefined' && typeof window.document !== 'undefined' && typeof window.document.createElement !== 'undefined'); - - // A reserved attribute. - // It is handled by React separately and shouldn't be written to the DOM. - var RESERVED = 0; // A simple string attribute. - // Attributes that aren't in the filter are presumed to have this type. - - var STRING = 1; // A string attribute that accepts booleans in React. In HTML, these are called - // "enumerated" attributes with "true" and "false" as possible values. - // When true, it should be set to a "true" string. - // When false, it should be set to a "false" string. - - var BOOLEANISH_STRING = 2; // A real boolean attribute. - // When true, it should be present (set either to an empty string or its name). - // When false, it should be omitted. - - var BOOLEAN = 3; // An attribute that can be used as a flag as well as with a value. - // When true, it should be present (set either to an empty string or its name). - // When false, it should be omitted. - // For any other value, should be present with that value. - - var OVERLOADED_BOOLEAN = 4; // An attribute that must be numeric or parse as a numeric. - // When falsy, it should be removed. - - var NUMERIC = 5; // An attribute that must be positive numeric or parse as a positive numeric. - // When falsy, it should be removed. - - var POSITIVE_NUMERIC = 6; - - /* eslint-disable max-len */ - var ATTRIBUTE_NAME_START_CHAR = ":A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD"; - /* eslint-enable max-len */ - - var ATTRIBUTE_NAME_CHAR = ATTRIBUTE_NAME_START_CHAR + "\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040"; - var ROOT_ATTRIBUTE_NAME = 'data-reactroot'; - var VALID_ATTRIBUTE_NAME_REGEX = new RegExp('^[' + ATTRIBUTE_NAME_START_CHAR + '][' + ATTRIBUTE_NAME_CHAR + ']*$'); - var hasOwnProperty = Object.prototype.hasOwnProperty; - var illegalAttributeNameCache = {}; - var validatedAttributeNameCache = {}; - function isAttributeNameSafe(attributeName) { - if (hasOwnProperty.call(validatedAttributeNameCache, attributeName)) { - return true; - } - - if (hasOwnProperty.call(illegalAttributeNameCache, attributeName)) { - return false; - } - - if (VALID_ATTRIBUTE_NAME_REGEX.test(attributeName)) { - validatedAttributeNameCache[attributeName] = true; - return true; - } - - illegalAttributeNameCache[attributeName] = true; - - { - error('Invalid attribute name: `%s`', attributeName); - } - - return false; - } - function shouldIgnoreAttribute(name, propertyInfo, isCustomComponentTag) { - if (propertyInfo !== null) { - return propertyInfo.type === RESERVED; - } - - if (isCustomComponentTag) { - return false; - } - - if (name.length > 2 && (name[0] === 'o' || name[0] === 'O') && (name[1] === 'n' || name[1] === 'N')) { - return true; - } - - return false; - } - function shouldRemoveAttributeWithWarning(name, value, propertyInfo, isCustomComponentTag) { - if (propertyInfo !== null && propertyInfo.type === RESERVED) { - return false; - } - - switch (typeof value) { - case 'function': // $FlowIssue symbol is perfectly valid here - - case 'symbol': - // eslint-disable-line - return true; - - case 'boolean': - { - if (isCustomComponentTag) { - return false; - } - - if (propertyInfo !== null) { - return !propertyInfo.acceptsBooleans; - } else { - var prefix = name.toLowerCase().slice(0, 5); - return prefix !== 'data-' && prefix !== 'aria-'; - } - } - - default: - return false; - } - } - function shouldRemoveAttribute(name, value, propertyInfo, isCustomComponentTag) { - if (value === null || typeof value === 'undefined') { - return true; - } - - if (shouldRemoveAttributeWithWarning(name, value, propertyInfo, isCustomComponentTag)) { - return true; - } - - if (isCustomComponentTag) { - return false; - } - - if (propertyInfo !== null) { - - switch (propertyInfo.type) { - case BOOLEAN: - return !value; - - case OVERLOADED_BOOLEAN: - return value === false; - - case NUMERIC: - return isNaN(value); - - case POSITIVE_NUMERIC: - return isNaN(value) || value < 1; - } - } - - return false; - } - function getPropertyInfo(name) { - return properties.hasOwnProperty(name) ? properties[name] : null; - } - - function PropertyInfoRecord(name, type, mustUseProperty, attributeName, attributeNamespace, sanitizeURL, removeEmptyString) { - this.acceptsBooleans = type === BOOLEANISH_STRING || type === BOOLEAN || type === OVERLOADED_BOOLEAN; - this.attributeName = attributeName; - this.attributeNamespace = attributeNamespace; - this.mustUseProperty = mustUseProperty; - this.propertyName = name; - this.type = type; - this.sanitizeURL = sanitizeURL; - this.removeEmptyString = removeEmptyString; - } // When adding attributes to this list, be sure to also add them to - // the `possibleStandardNames` module to ensure casing and incorrect - // name warnings. - - - var properties = {}; // These props are reserved by React. They shouldn't be written to the DOM. - - var reservedProps = ['children', 'dangerouslySetInnerHTML', // TODO: This prevents the assignment of defaultValue to regular - // elements (not just inputs). Now that ReactDOMInput assigns to the - // defaultValue property -- do we need this? - 'defaultValue', 'defaultChecked', 'innerHTML', 'suppressContentEditableWarning', 'suppressHydrationWarning', 'style']; - reservedProps.forEach(function (name) { - properties[name] = new PropertyInfoRecord(name, RESERVED, false, // mustUseProperty - name, // attributeName - null, // attributeNamespace - false, // sanitizeURL - false); - }); // A few React string attributes have a different name. - // This is a mapping from React prop names to the attribute names. - - [['acceptCharset', 'accept-charset'], ['className', 'class'], ['htmlFor', 'for'], ['httpEquiv', 'http-equiv']].forEach(function (_ref) { - var name = _ref[0], - attributeName = _ref[1]; - properties[name] = new PropertyInfoRecord(name, STRING, false, // mustUseProperty - attributeName, // attributeName - null, // attributeNamespace - false, // sanitizeURL - false); - }); // These are "enumerated" HTML attributes that accept "true" and "false". - // In React, we let users pass `true` and `false` even though technically - // these aren't boolean attributes (they are coerced to strings). - - ['contentEditable', 'draggable', 'spellCheck', 'value'].forEach(function (name) { - properties[name] = new PropertyInfoRecord(name, BOOLEANISH_STRING, false, // mustUseProperty - name.toLowerCase(), // attributeName - null, // attributeNamespace - false, // sanitizeURL - false); - }); // These are "enumerated" SVG attributes that accept "true" and "false". - // In React, we let users pass `true` and `false` even though technically - // these aren't boolean attributes (they are coerced to strings). - // Since these are SVG attributes, their attribute names are case-sensitive. - - ['autoReverse', 'externalResourcesRequired', 'focusable', 'preserveAlpha'].forEach(function (name) { - properties[name] = new PropertyInfoRecord(name, BOOLEANISH_STRING, false, // mustUseProperty - name, // attributeName - null, // attributeNamespace - false, // sanitizeURL - false); - }); // These are HTML boolean attributes. - - ['allowFullScreen', 'async', // Note: there is a special case that prevents it from being written to the DOM - // on the client side because the browsers are inconsistent. Instead we call focus(). - 'autoFocus', 'autoPlay', 'controls', 'default', 'defer', 'disabled', 'disablePictureInPicture', 'disableRemotePlayback', 'formNoValidate', 'hidden', 'loop', 'noModule', 'noValidate', 'open', 'playsInline', 'readOnly', 'required', 'reversed', 'scoped', 'seamless', // Microdata - 'itemScope'].forEach(function (name) { - properties[name] = new PropertyInfoRecord(name, BOOLEAN, false, // mustUseProperty - name.toLowerCase(), // attributeName - null, // attributeNamespace - false, // sanitizeURL - false); - }); // These are the few React props that we set as DOM properties - // rather than attributes. These are all booleans. - - ['checked', // Note: `option.selected` is not updated if `select.multiple` is - // disabled with `removeAttribute`. We have special logic for handling this. - 'multiple', 'muted', 'selected' // NOTE: if you add a camelCased prop to this list, - // you'll need to set attributeName to name.toLowerCase() - // instead in the assignment below. - ].forEach(function (name) { - properties[name] = new PropertyInfoRecord(name, BOOLEAN, true, // mustUseProperty - name, // attributeName - null, // attributeNamespace - false, // sanitizeURL - false); - }); // These are HTML attributes that are "overloaded booleans": they behave like - // booleans, but can also accept a string value. - - ['capture', 'download' // NOTE: if you add a camelCased prop to this list, - // you'll need to set attributeName to name.toLowerCase() - // instead in the assignment below. - ].forEach(function (name) { - properties[name] = new PropertyInfoRecord(name, OVERLOADED_BOOLEAN, false, // mustUseProperty - name, // attributeName - null, // attributeNamespace - false, // sanitizeURL - false); - }); // These are HTML attributes that must be positive numbers. - - ['cols', 'rows', 'size', 'span' // NOTE: if you add a camelCased prop to this list, - // you'll need to set attributeName to name.toLowerCase() - // instead in the assignment below. - ].forEach(function (name) { - properties[name] = new PropertyInfoRecord(name, POSITIVE_NUMERIC, false, // mustUseProperty - name, // attributeName - null, // attributeNamespace - false, // sanitizeURL - false); - }); // These are HTML attributes that must be numbers. - - ['rowSpan', 'start'].forEach(function (name) { - properties[name] = new PropertyInfoRecord(name, NUMERIC, false, // mustUseProperty - name.toLowerCase(), // attributeName - null, // attributeNamespace - false, // sanitizeURL - false); - }); - var CAMELIZE = /[\-\:]([a-z])/g; - - var capitalize = function (token) { - return token[1].toUpperCase(); - }; // This is a list of all SVG attributes that need special casing, namespacing, - // or boolean value assignment. Regular attributes that just accept strings - // and have the same names are omitted, just like in the HTML attribute filter. - // Some of these attributes can be hard to find. This list was created by - // scraping the MDN documentation. - - - ['accent-height', 'alignment-baseline', 'arabic-form', 'baseline-shift', 'cap-height', 'clip-path', 'clip-rule', 'color-interpolation', 'color-interpolation-filters', 'color-profile', 'color-rendering', 'dominant-baseline', 'enable-background', 'fill-opacity', 'fill-rule', 'flood-color', 'flood-opacity', 'font-family', 'font-size', 'font-size-adjust', 'font-stretch', 'font-style', 'font-variant', 'font-weight', 'glyph-name', 'glyph-orientation-horizontal', 'glyph-orientation-vertical', 'horiz-adv-x', 'horiz-origin-x', 'image-rendering', 'letter-spacing', 'lighting-color', 'marker-end', 'marker-mid', 'marker-start', 'overline-position', 'overline-thickness', 'paint-order', 'panose-1', 'pointer-events', 'rendering-intent', 'shape-rendering', 'stop-color', 'stop-opacity', 'strikethrough-position', 'strikethrough-thickness', 'stroke-dasharray', 'stroke-dashoffset', 'stroke-linecap', 'stroke-linejoin', 'stroke-miterlimit', 'stroke-opacity', 'stroke-width', 'text-anchor', 'text-decoration', 'text-rendering', 'underline-position', 'underline-thickness', 'unicode-bidi', 'unicode-range', 'units-per-em', 'v-alphabetic', 'v-hanging', 'v-ideographic', 'v-mathematical', 'vector-effect', 'vert-adv-y', 'vert-origin-x', 'vert-origin-y', 'word-spacing', 'writing-mode', 'xmlns:xlink', 'x-height' // NOTE: if you add a camelCased prop to this list, - // you'll need to set attributeName to name.toLowerCase() - // instead in the assignment below. - ].forEach(function (attributeName) { - var name = attributeName.replace(CAMELIZE, capitalize); - properties[name] = new PropertyInfoRecord(name, STRING, false, // mustUseProperty - attributeName, null, // attributeNamespace - false, // sanitizeURL - false); - }); // String SVG attributes with the xlink namespace. - - ['xlink:actuate', 'xlink:arcrole', 'xlink:role', 'xlink:show', 'xlink:title', 'xlink:type' // NOTE: if you add a camelCased prop to this list, - // you'll need to set attributeName to name.toLowerCase() - // instead in the assignment below. - ].forEach(function (attributeName) { - var name = attributeName.replace(CAMELIZE, capitalize); - properties[name] = new PropertyInfoRecord(name, STRING, false, // mustUseProperty - attributeName, 'http://www.w3.org/1999/xlink', false, // sanitizeURL - false); - }); // String SVG attributes with the xml namespace. - - ['xml:base', 'xml:lang', 'xml:space' // NOTE: if you add a camelCased prop to this list, - // you'll need to set attributeName to name.toLowerCase() - // instead in the assignment below. - ].forEach(function (attributeName) { - var name = attributeName.replace(CAMELIZE, capitalize); - properties[name] = new PropertyInfoRecord(name, STRING, false, // mustUseProperty - attributeName, 'http://www.w3.org/XML/1998/namespace', false, // sanitizeURL - false); - }); // These attribute exists both in HTML and SVG. - // The attribute name is case-sensitive in SVG so we can't just use - // the React name like we do for attributes that exist only in HTML. - - ['tabIndex', 'crossOrigin'].forEach(function (attributeName) { - properties[attributeName] = new PropertyInfoRecord(attributeName, STRING, false, // mustUseProperty - attributeName.toLowerCase(), // attributeName - null, // attributeNamespace - false, // sanitizeURL - false); - }); // These attributes accept URLs. These must not allow javascript: URLS. - // These will also need to accept Trusted Types object in the future. - - var xlinkHref = 'xlinkHref'; - properties[xlinkHref] = new PropertyInfoRecord('xlinkHref', STRING, false, // mustUseProperty - 'xlink:href', 'http://www.w3.org/1999/xlink', true, // sanitizeURL - false); - ['src', 'href', 'action', 'formAction'].forEach(function (attributeName) { - properties[attributeName] = new PropertyInfoRecord(attributeName, STRING, false, // mustUseProperty - attributeName.toLowerCase(), // attributeName - null, // attributeNamespace - true, // sanitizeURL - true); - }); - - // and any newline or tab are filtered out as if they're not part of the URL. - // https://url.spec.whatwg.org/#url-parsing - // Tab or newline are defined as \r\n\t: - // https://infra.spec.whatwg.org/#ascii-tab-or-newline - // A C0 control is a code point in the range \u0000 NULL to \u001F - // INFORMATION SEPARATOR ONE, inclusive: - // https://infra.spec.whatwg.org/#c0-control-or-space - - /* eslint-disable max-len */ - - var isJavaScriptProtocol = /^[\u0000-\u001F ]*j[\r\n\t]*a[\r\n\t]*v[\r\n\t]*a[\r\n\t]*s[\r\n\t]*c[\r\n\t]*r[\r\n\t]*i[\r\n\t]*p[\r\n\t]*t[\r\n\t]*\:/i; - var didWarn = false; - - function sanitizeURL(url) { - { - if (!didWarn && isJavaScriptProtocol.test(url)) { - didWarn = true; - - error('A future version of React will block javascript: URLs as a security precaution. ' + 'Use event handlers instead if you can. If you need to generate unsafe HTML try ' + 'using dangerouslySetInnerHTML instead. React was passed %s.', JSON.stringify(url)); - } - } - } - - /** - * Get the value for a property on a node. Only used in DEV for SSR validation. - * The "expected" argument is used as a hint of what the expected value is. - * Some properties have multiple equivalent values. - */ - function getValueForProperty(node, name, expected, propertyInfo) { - { - if (propertyInfo.mustUseProperty) { - var propertyName = propertyInfo.propertyName; - return node[propertyName]; - } else { - if ( propertyInfo.sanitizeURL) { - // If we haven't fully disabled javascript: URLs, and if - // the hydration is successful of a javascript: URL, we - // still want to warn on the client. - sanitizeURL('' + expected); - } - - var attributeName = propertyInfo.attributeName; - var stringValue = null; - - if (propertyInfo.type === OVERLOADED_BOOLEAN) { - if (node.hasAttribute(attributeName)) { - var value = node.getAttribute(attributeName); - - if (value === '') { - return true; - } - - if (shouldRemoveAttribute(name, expected, propertyInfo, false)) { - return value; - } - - if (value === '' + expected) { - return expected; - } - - return value; - } - } else if (node.hasAttribute(attributeName)) { - if (shouldRemoveAttribute(name, expected, propertyInfo, false)) { - // We had an attribute but shouldn't have had one, so read it - // for the error message. - return node.getAttribute(attributeName); - } - - if (propertyInfo.type === BOOLEAN) { - // If this was a boolean, it doesn't matter what the value is - // the fact that we have it is the same as the expected. - return expected; - } // Even if this property uses a namespace we use getAttribute - // because we assume its namespaced name is the same as our config. - // To use getAttributeNS we need the local name which we don't have - // in our config atm. - - - stringValue = node.getAttribute(attributeName); - } - - if (shouldRemoveAttribute(name, expected, propertyInfo, false)) { - return stringValue === null ? expected : stringValue; - } else if (stringValue === '' + expected) { - return expected; - } else { - return stringValue; - } - } - } - } - /** - * Get the value for a attribute on a node. Only used in DEV for SSR validation. - * The third argument is used as a hint of what the expected value is. Some - * attributes have multiple equivalent values. - */ - - function getValueForAttribute(node, name, expected) { - { - if (!isAttributeNameSafe(name)) { - return; - } // If the object is an opaque reference ID, it's expected that - // the next prop is different than the server value, so just return - // expected - - - if (isOpaqueHydratingObject(expected)) { - return expected; - } - - if (!node.hasAttribute(name)) { - return expected === undefined ? undefined : null; - } - - var value = node.getAttribute(name); - - if (value === '' + expected) { - return expected; - } - - return value; - } - } - /** - * Sets the value for a property on a node. - * - * @param {DOMElement} node - * @param {string} name - * @param {*} value - */ - - function setValueForProperty(node, name, value, isCustomComponentTag) { - var propertyInfo = getPropertyInfo(name); - - if (shouldIgnoreAttribute(name, propertyInfo, isCustomComponentTag)) { - return; - } - - if (shouldRemoveAttribute(name, value, propertyInfo, isCustomComponentTag)) { - value = null; - } // If the prop isn't in the special list, treat it as a simple attribute. - - - if (isCustomComponentTag || propertyInfo === null) { - if (isAttributeNameSafe(name)) { - var _attributeName = name; - - if (value === null) { - node.removeAttribute(_attributeName); - } else { - node.setAttribute(_attributeName, '' + value); - } - } - - return; - } - - var mustUseProperty = propertyInfo.mustUseProperty; - - if (mustUseProperty) { - var propertyName = propertyInfo.propertyName; - - if (value === null) { - var type = propertyInfo.type; - node[propertyName] = type === BOOLEAN ? false : ''; - } else { - // Contrary to `setAttribute`, object properties are properly - // `toString`ed by IE8/9. - node[propertyName] = value; - } - - return; - } // The rest are treated as attributes with special cases. - - - var attributeName = propertyInfo.attributeName, - attributeNamespace = propertyInfo.attributeNamespace; - - if (value === null) { - node.removeAttribute(attributeName); - } else { - var _type = propertyInfo.type; - var attributeValue; - - if (_type === BOOLEAN || _type === OVERLOADED_BOOLEAN && value === true) { - // If attribute type is boolean, we know for sure it won't be an execution sink - // and we won't require Trusted Type here. - attributeValue = ''; - } else { - // `setAttribute` with objects becomes only `[object]` in IE8/9, - // ('' + value) makes it output the correct toString()-value. - { - attributeValue = '' + value; - } - - if (propertyInfo.sanitizeURL) { - sanitizeURL(attributeValue.toString()); - } - } - - if (attributeNamespace) { - node.setAttributeNS(attributeNamespace, attributeName, attributeValue); - } else { - node.setAttribute(attributeName, attributeValue); - } - } - } - - var ReactInternals = React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED; - var _assign = ReactInternals.assign; - - // ATTENTION - // When adding new symbols to this file, - // Please consider also adding to 'react-devtools-shared/src/backend/ReactSymbols' - // The Symbol used to tag the ReactElement-like types. If there is no native Symbol - // nor polyfill, then a plain number is used for performance. - var REACT_ELEMENT_TYPE = 0xeac7; - var REACT_PORTAL_TYPE = 0xeaca; - var REACT_FRAGMENT_TYPE = 0xeacb; - var REACT_STRICT_MODE_TYPE = 0xeacc; - var REACT_PROFILER_TYPE = 0xead2; - var REACT_PROVIDER_TYPE = 0xeacd; - var REACT_CONTEXT_TYPE = 0xeace; - var REACT_FORWARD_REF_TYPE = 0xead0; - var REACT_SUSPENSE_TYPE = 0xead1; - var REACT_SUSPENSE_LIST_TYPE = 0xead8; - var REACT_MEMO_TYPE = 0xead3; - var REACT_LAZY_TYPE = 0xead4; - var REACT_BLOCK_TYPE = 0xead9; - var REACT_SERVER_BLOCK_TYPE = 0xeada; - var REACT_FUNDAMENTAL_TYPE = 0xead5; - var REACT_SCOPE_TYPE = 0xead7; - var REACT_OPAQUE_ID_TYPE = 0xeae0; - var REACT_DEBUG_TRACING_MODE_TYPE = 0xeae1; - var REACT_OFFSCREEN_TYPE = 0xeae2; - var REACT_LEGACY_HIDDEN_TYPE = 0xeae3; - - if (typeof Symbol === 'function' && Symbol.for) { - var symbolFor = Symbol.for; - REACT_ELEMENT_TYPE = symbolFor('react.element'); - REACT_PORTAL_TYPE = symbolFor('react.portal'); - REACT_FRAGMENT_TYPE = symbolFor('react.fragment'); - REACT_STRICT_MODE_TYPE = symbolFor('react.strict_mode'); - REACT_PROFILER_TYPE = symbolFor('react.profiler'); - REACT_PROVIDER_TYPE = symbolFor('react.provider'); - REACT_CONTEXT_TYPE = symbolFor('react.context'); - REACT_FORWARD_REF_TYPE = symbolFor('react.forward_ref'); - REACT_SUSPENSE_TYPE = symbolFor('react.suspense'); - REACT_SUSPENSE_LIST_TYPE = symbolFor('react.suspense_list'); - REACT_MEMO_TYPE = symbolFor('react.memo'); - REACT_LAZY_TYPE = symbolFor('react.lazy'); - REACT_BLOCK_TYPE = symbolFor('react.block'); - REACT_SERVER_BLOCK_TYPE = symbolFor('react.server.block'); - REACT_FUNDAMENTAL_TYPE = symbolFor('react.fundamental'); - REACT_SCOPE_TYPE = symbolFor('react.scope'); - REACT_OPAQUE_ID_TYPE = symbolFor('react.opaque.id'); - REACT_DEBUG_TRACING_MODE_TYPE = symbolFor('react.debug_trace_mode'); - REACT_OFFSCREEN_TYPE = symbolFor('react.offscreen'); - REACT_LEGACY_HIDDEN_TYPE = symbolFor('react.legacy_hidden'); - } - - var MAYBE_ITERATOR_SYMBOL = typeof Symbol === 'function' && Symbol.iterator; - var FAUX_ITERATOR_SYMBOL = '@@iterator'; - function getIteratorFn(maybeIterable) { - if (maybeIterable === null || typeof maybeIterable !== 'object') { - return null; - } - - var maybeIterator = MAYBE_ITERATOR_SYMBOL && maybeIterable[MAYBE_ITERATOR_SYMBOL] || maybeIterable[FAUX_ITERATOR_SYMBOL]; - - if (typeof maybeIterator === 'function') { - return maybeIterator; - } - - return null; - } - - // Helpers to patch console.logs to avoid logging during side-effect free - // replaying on render function. This currently only patches the object - // lazily which won't cover if the log function was extracted eagerly. - // We could also eagerly patch the method. - var disabledDepth = 0; - var prevLog; - var prevInfo; - var prevWarn; - var prevError; - var prevGroup; - var prevGroupCollapsed; - var prevGroupEnd; - - function disabledLog() {} - - disabledLog.__reactDisabledLog = true; - function disableLogs() { - { - if (disabledDepth === 0) { - /* eslint-disable react-internal/no-production-logging */ - prevLog = console.log; - prevInfo = console.info; - prevWarn = console.warn; - prevError = console.error; - prevGroup = console.group; - prevGroupCollapsed = console.groupCollapsed; - prevGroupEnd = console.groupEnd; // https://github.com/facebook/react/issues/19099 - - var props = { - configurable: true, - enumerable: true, - value: disabledLog, - writable: true - }; // $FlowFixMe Flow thinks console is immutable. - - Object.defineProperties(console, { - info: props, - log: props, - warn: props, - error: props, - group: props, - groupCollapsed: props, - groupEnd: props - }); - /* eslint-enable react-internal/no-production-logging */ - } - - disabledDepth++; - } - } - function reenableLogs() { - { - disabledDepth--; - - if (disabledDepth === 0) { - /* eslint-disable react-internal/no-production-logging */ - var props = { - configurable: true, - enumerable: true, - writable: true - }; // $FlowFixMe Flow thinks console is immutable. - - Object.defineProperties(console, { - log: _assign({}, props, { - value: prevLog - }), - info: _assign({}, props, { - value: prevInfo - }), - warn: _assign({}, props, { - value: prevWarn - }), - error: _assign({}, props, { - value: prevError - }), - group: _assign({}, props, { - value: prevGroup - }), - groupCollapsed: _assign({}, props, { - value: prevGroupCollapsed - }), - groupEnd: _assign({}, props, { - value: prevGroupEnd - }) - }); - /* eslint-enable react-internal/no-production-logging */ - } - - if (disabledDepth < 0) { - error('disabledDepth fell below zero. ' + 'This is a bug in React. Please file an issue.'); - } - } - } - - var ReactCurrentDispatcher = ReactSharedInternals.ReactCurrentDispatcher; - var prefix; - function describeBuiltInComponentFrame(name, source, ownerFn) { - { - if (prefix === undefined) { - // Extract the VM specific prefix used by each line. - try { - throw Error(); - } catch (x) { - var match = x.stack.trim().match(/\n( *(at )?)/); - prefix = match && match[1] || ''; - } - } // We use the prefix to ensure our stacks line up with native stack frames. - - - return '\n' + prefix + name; - } - } - var reentry = false; - var componentFrameCache; - - { - var PossiblyWeakMap = typeof WeakMap === 'function' ? WeakMap : Map; - componentFrameCache = new PossiblyWeakMap(); - } - - function describeNativeComponentFrame(fn, construct) { - // If something asked for a stack inside a fake render, it should get ignored. - if (!fn || reentry) { - return ''; - } - - { - var frame = componentFrameCache.get(fn); - - if (frame !== undefined) { - return frame; - } - } - - var control; - reentry = true; - var previousPrepareStackTrace = Error.prepareStackTrace; // $FlowFixMe It does accept undefined. - - Error.prepareStackTrace = undefined; - var previousDispatcher; - - { - previousDispatcher = ReactCurrentDispatcher.current; // Set the dispatcher in DEV because this might be call in the render function - // for warnings. - - ReactCurrentDispatcher.current = null; - disableLogs(); - } - - try { - // This should throw. - if (construct) { - // Something should be setting the props in the constructor. - var Fake = function () { - throw Error(); - }; // $FlowFixMe - - - Object.defineProperty(Fake.prototype, 'props', { - set: function () { - // We use a throwing setter instead of frozen or non-writable props - // because that won't throw in a non-strict mode function. - throw Error(); - } - }); - - if (typeof Reflect === 'object' && Reflect.construct) { - // We construct a different control for this case to include any extra - // frames added by the construct call. - try { - Reflect.construct(Fake, []); - } catch (x) { - control = x; - } - - Reflect.construct(fn, [], Fake); - } else { - try { - Fake.call(); - } catch (x) { - control = x; - } - - fn.call(Fake.prototype); - } - } else { - try { - throw Error(); - } catch (x) { - control = x; - } - - fn(); - } - } catch (sample) { - // This is inlined manually because closure doesn't do it for us. - if (sample && control && typeof sample.stack === 'string') { - // This extracts the first frame from the sample that isn't also in the control. - // Skipping one frame that we assume is the frame that calls the two. - var sampleLines = sample.stack.split('\n'); - var controlLines = control.stack.split('\n'); - var s = sampleLines.length - 1; - var c = controlLines.length - 1; - - while (s >= 1 && c >= 0 && sampleLines[s] !== controlLines[c]) { - // We expect at least one stack frame to be shared. - // Typically this will be the root most one. However, stack frames may be - // cut off due to maximum stack limits. In this case, one maybe cut off - // earlier than the other. We assume that the sample is longer or the same - // and there for cut off earlier. So we should find the root most frame in - // the sample somewhere in the control. - c--; - } - - for (; s >= 1 && c >= 0; s--, c--) { - // Next we find the first one that isn't the same which should be the - // frame that called our sample function and the control. - if (sampleLines[s] !== controlLines[c]) { - // In V8, the first line is describing the message but other VMs don't. - // If we're about to return the first line, and the control is also on the same - // line, that's a pretty good indicator that our sample threw at same line as - // the control. I.e. before we entered the sample frame. So we ignore this result. - // This can happen if you passed a class to function component, or non-function. - if (s !== 1 || c !== 1) { - do { - s--; - c--; // We may still have similar intermediate frames from the construct call. - // The next one that isn't the same should be our match though. - - if (c < 0 || sampleLines[s] !== controlLines[c]) { - // V8 adds a "new" prefix for native classes. Let's remove it to make it prettier. - var _frame = '\n' + sampleLines[s].replace(' at new ', ' at '); - - { - if (typeof fn === 'function') { - componentFrameCache.set(fn, _frame); - } - } // Return the line we found. - - - return _frame; - } - } while (s >= 1 && c >= 0); - } - - break; - } - } - } - } finally { - reentry = false; - - { - ReactCurrentDispatcher.current = previousDispatcher; - reenableLogs(); - } - - Error.prepareStackTrace = previousPrepareStackTrace; - } // Fallback to just using the name if we couldn't make it throw. - - - var name = fn ? fn.displayName || fn.name : ''; - var syntheticFrame = name ? describeBuiltInComponentFrame(name) : ''; - - { - if (typeof fn === 'function') { - componentFrameCache.set(fn, syntheticFrame); - } - } - - return syntheticFrame; - } - - function describeClassComponentFrame(ctor, source, ownerFn) { - { - return describeNativeComponentFrame(ctor, true); - } - } - function describeFunctionComponentFrame(fn, source, ownerFn) { - { - return describeNativeComponentFrame(fn, false); - } - } - - function shouldConstruct(Component) { - var prototype = Component.prototype; - return !!(prototype && prototype.isReactComponent); - } - - function describeUnknownElementTypeFrameInDEV(type, source, ownerFn) { - - if (type == null) { - return ''; - } - - if (typeof type === 'function') { - { - return describeNativeComponentFrame(type, shouldConstruct(type)); - } - } - - if (typeof type === 'string') { - return describeBuiltInComponentFrame(type); - } - - switch (type) { - case REACT_SUSPENSE_TYPE: - return describeBuiltInComponentFrame('Suspense'); - - case REACT_SUSPENSE_LIST_TYPE: - return describeBuiltInComponentFrame('SuspenseList'); - } - - if (typeof type === 'object') { - switch (type.$$typeof) { - case REACT_FORWARD_REF_TYPE: - return describeFunctionComponentFrame(type.render); - - case REACT_MEMO_TYPE: - // Memo may contain any component type so we recursively resolve it. - return describeUnknownElementTypeFrameInDEV(type.type, source, ownerFn); - - case REACT_BLOCK_TYPE: - return describeFunctionComponentFrame(type._render); - - case REACT_LAZY_TYPE: - { - var lazyComponent = type; - var payload = lazyComponent._payload; - var init = lazyComponent._init; - - try { - // Lazy may contain any component type so we recursively resolve it. - return describeUnknownElementTypeFrameInDEV(init(payload), source, ownerFn); - } catch (x) {} - } - } - } - - return ''; - } - - function describeFiber(fiber) { - var owner = fiber._debugOwner ? fiber._debugOwner.type : null ; - var source = fiber._debugSource ; - - switch (fiber.tag) { - case HostComponent: - return describeBuiltInComponentFrame(fiber.type); - - case LazyComponent: - return describeBuiltInComponentFrame('Lazy'); - - case SuspenseComponent: - return describeBuiltInComponentFrame('Suspense'); - - case SuspenseListComponent: - return describeBuiltInComponentFrame('SuspenseList'); - - case FunctionComponent: - case IndeterminateComponent: - case SimpleMemoComponent: - return describeFunctionComponentFrame(fiber.type); - - case ForwardRef: - return describeFunctionComponentFrame(fiber.type.render); - - case Block: - return describeFunctionComponentFrame(fiber.type._render); - - case ClassComponent: - return describeClassComponentFrame(fiber.type); - - default: - return ''; - } - } - - function getStackByFiberInDevAndProd(workInProgress) { - try { - var info = ''; - var node = workInProgress; - - do { - info += describeFiber(node); - node = node.return; - } while (node); - - return info; - } catch (x) { - return '\nError generating stack: ' + x.message + '\n' + x.stack; - } - } - - function getWrappedName(outerType, innerType, wrapperName) { - var functionName = innerType.displayName || innerType.name || ''; - return outerType.displayName || (functionName !== '' ? wrapperName + "(" + functionName + ")" : wrapperName); - } - - function getContextName(type) { - return type.displayName || 'Context'; - } - - function getComponentName(type) { - if (type == null) { - // Host root, text node or just invalid type. - return null; - } - - { - if (typeof type.tag === 'number') { - error('Received an unexpected object in getComponentName(). ' + 'This is likely a bug in React. Please file an issue.'); - } - } - - if (typeof type === 'function') { - return type.displayName || type.name || null; - } - - if (typeof type === 'string') { - return type; - } - - switch (type) { - case REACT_FRAGMENT_TYPE: - return 'Fragment'; - - case REACT_PORTAL_TYPE: - return 'Portal'; - - case REACT_PROFILER_TYPE: - return 'Profiler'; - - case REACT_STRICT_MODE_TYPE: - return 'StrictMode'; - - case REACT_SUSPENSE_TYPE: - return 'Suspense'; - - case REACT_SUSPENSE_LIST_TYPE: - return 'SuspenseList'; - } - - if (typeof type === 'object') { - switch (type.$$typeof) { - case REACT_CONTEXT_TYPE: - var context = type; - return getContextName(context) + '.Consumer'; - - case REACT_PROVIDER_TYPE: - var provider = type; - return getContextName(provider._context) + '.Provider'; - - case REACT_FORWARD_REF_TYPE: - return getWrappedName(type, type.render, 'ForwardRef'); - - case REACT_MEMO_TYPE: - return getComponentName(type.type); - - case REACT_BLOCK_TYPE: - return getComponentName(type._render); - - case REACT_LAZY_TYPE: - { - var lazyComponent = type; - var payload = lazyComponent._payload; - var init = lazyComponent._init; - - try { - return getComponentName(init(payload)); - } catch (x) { - return null; - } - } - } - } - - return null; - } - - var ReactDebugCurrentFrame = ReactSharedInternals.ReactDebugCurrentFrame; - var current = null; - var isRendering = false; - function getCurrentFiberOwnerNameInDevOrNull() { - { - if (current === null) { - return null; - } - - var owner = current._debugOwner; - - if (owner !== null && typeof owner !== 'undefined') { - return getComponentName(owner.type); - } - } - - return null; - } - - function getCurrentFiberStackInDev() { - { - if (current === null) { - return ''; - } // Safe because if current fiber exists, we are reconciling, - // and it is guaranteed to be the work-in-progress version. - - - return getStackByFiberInDevAndProd(current); - } - } - - function resetCurrentFiber() { - { - ReactDebugCurrentFrame.getCurrentStack = null; - current = null; - isRendering = false; - } - } - function setCurrentFiber(fiber) { - { - ReactDebugCurrentFrame.getCurrentStack = getCurrentFiberStackInDev; - current = fiber; - isRendering = false; - } - } - function setIsRendering(rendering) { - { - isRendering = rendering; - } - } - function getIsRendering() { - { - return isRendering; - } - } - - // Flow does not allow string concatenation of most non-string types. To work - // around this limitation, we use an opaque type that can only be obtained by - // passing the value through getToStringValue first. - function toString(value) { - return '' + value; - } - function getToStringValue(value) { - switch (typeof value) { - case 'boolean': - case 'number': - case 'object': - case 'string': - case 'undefined': - return value; - - default: - // function, symbol are assigned as empty strings - return ''; - } - } - - var hasReadOnlyValue = { - button: true, - checkbox: true, - image: true, - hidden: true, - radio: true, - reset: true, - submit: true - }; - function checkControlledValueProps(tagName, props) { - { - if (!(hasReadOnlyValue[props.type] || props.onChange || props.onInput || props.readOnly || props.disabled || props.value == null)) { - error('You provided a `value` prop to a form field without an ' + '`onChange` handler. This will render a read-only field. If ' + 'the field should be mutable use `defaultValue`. Otherwise, ' + 'set either `onChange` or `readOnly`.'); - } - - if (!(props.onChange || props.readOnly || props.disabled || props.checked == null)) { - error('You provided a `checked` prop to a form field without an ' + '`onChange` handler. This will render a read-only field. If ' + 'the field should be mutable use `defaultChecked`. Otherwise, ' + 'set either `onChange` or `readOnly`.'); - } - } - } - - function isCheckable(elem) { - var type = elem.type; - var nodeName = elem.nodeName; - return nodeName && nodeName.toLowerCase() === 'input' && (type === 'checkbox' || type === 'radio'); - } - - function getTracker(node) { - return node._valueTracker; - } - - function detachTracker(node) { - node._valueTracker = null; - } - - function getValueFromNode(node) { - var value = ''; - - if (!node) { - return value; - } - - if (isCheckable(node)) { - value = node.checked ? 'true' : 'false'; - } else { - value = node.value; - } - - return value; - } - - function trackValueOnNode(node) { - var valueField = isCheckable(node) ? 'checked' : 'value'; - var descriptor = Object.getOwnPropertyDescriptor(node.constructor.prototype, valueField); - var currentValue = '' + node[valueField]; // if someone has already defined a value or Safari, then bail - // and don't track value will cause over reporting of changes, - // but it's better then a hard failure - // (needed for certain tests that spyOn input values and Safari) - - if (node.hasOwnProperty(valueField) || typeof descriptor === 'undefined' || typeof descriptor.get !== 'function' || typeof descriptor.set !== 'function') { - return; - } - - var get = descriptor.get, - set = descriptor.set; - Object.defineProperty(node, valueField, { - configurable: true, - get: function () { - return get.call(this); - }, - set: function (value) { - currentValue = '' + value; - set.call(this, value); - } - }); // We could've passed this the first time - // but it triggers a bug in IE11 and Edge 14/15. - // Calling defineProperty() again should be equivalent. - // https://github.com/facebook/react/issues/11768 - - Object.defineProperty(node, valueField, { - enumerable: descriptor.enumerable - }); - var tracker = { - getValue: function () { - return currentValue; - }, - setValue: function (value) { - currentValue = '' + value; - }, - stopTracking: function () { - detachTracker(node); - delete node[valueField]; - } - }; - return tracker; - } - - function track(node) { - if (getTracker(node)) { - return; - } // TODO: Once it's just Fiber we can move this to node._wrapperState - - - node._valueTracker = trackValueOnNode(node); - } - function updateValueIfChanged(node) { - if (!node) { - return false; - } - - var tracker = getTracker(node); // if there is no tracker at this point it's unlikely - // that trying again will succeed - - if (!tracker) { - return true; - } - - var lastValue = tracker.getValue(); - var nextValue = getValueFromNode(node); - - if (nextValue !== lastValue) { - tracker.setValue(nextValue); - return true; - } - - return false; - } - - function getActiveElement(doc) { - doc = doc || (typeof document !== 'undefined' ? document : undefined); - - if (typeof doc === 'undefined') { - return null; - } - - try { - return doc.activeElement || doc.body; - } catch (e) { - return doc.body; - } - } - - var didWarnValueDefaultValue = false; - var didWarnCheckedDefaultChecked = false; - var didWarnControlledToUncontrolled = false; - var didWarnUncontrolledToControlled = false; - - function isControlled(props) { - var usesChecked = props.type === 'checkbox' || props.type === 'radio'; - return usesChecked ? props.checked != null : props.value != null; - } - /** - * Implements an host component that allows setting these optional - * props: `checked`, `value`, `defaultChecked`, and `defaultValue`. - * - * If `checked` or `value` are not supplied (or null/undefined), user actions - * that affect the checked state or value will trigger updates to the element. - * - * If they are supplied (and not null/undefined), the rendered element will not - * trigger updates to the element. Instead, the props must change in order for - * the rendered element to be updated. - * - * The rendered element will be initialized as unchecked (or `defaultChecked`) - * with an empty value (or `defaultValue`). - * - * See http://www.w3.org/TR/2012/WD-html5-20121025/the-input-element.html - */ - - - function getHostProps(element, props) { - var node = element; - var checked = props.checked; - - var hostProps = _assign({}, props, { - defaultChecked: undefined, - defaultValue: undefined, - value: undefined, - checked: checked != null ? checked : node._wrapperState.initialChecked - }); - - return hostProps; - } - function initWrapperState(element, props) { - { - checkControlledValueProps('input', props); - - if (props.checked !== undefined && props.defaultChecked !== undefined && !didWarnCheckedDefaultChecked) { - error('%s contains an input of type %s with both checked and defaultChecked props. ' + 'Input elements must be either controlled or uncontrolled ' + '(specify either the checked prop, or the defaultChecked prop, but not ' + 'both). Decide between using a controlled or uncontrolled input ' + 'element and remove one of these props. More info: ' + 'https://reactjs.org/link/controlled-components', getCurrentFiberOwnerNameInDevOrNull() || 'A component', props.type); - - didWarnCheckedDefaultChecked = true; - } - - if (props.value !== undefined && props.defaultValue !== undefined && !didWarnValueDefaultValue) { - error('%s contains an input of type %s with both value and defaultValue props. ' + 'Input elements must be either controlled or uncontrolled ' + '(specify either the value prop, or the defaultValue prop, but not ' + 'both). Decide between using a controlled or uncontrolled input ' + 'element and remove one of these props. More info: ' + 'https://reactjs.org/link/controlled-components', getCurrentFiberOwnerNameInDevOrNull() || 'A component', props.type); - - didWarnValueDefaultValue = true; - } - } - - var node = element; - var defaultValue = props.defaultValue == null ? '' : props.defaultValue; - node._wrapperState = { - initialChecked: props.checked != null ? props.checked : props.defaultChecked, - initialValue: getToStringValue(props.value != null ? props.value : defaultValue), - controlled: isControlled(props) - }; - } - function updateChecked(element, props) { - var node = element; - var checked = props.checked; - - if (checked != null) { - setValueForProperty(node, 'checked', checked, false); - } - } - function updateWrapper(element, props) { - var node = element; - - { - var controlled = isControlled(props); - - if (!node._wrapperState.controlled && controlled && !didWarnUncontrolledToControlled) { - error('A component is changing an uncontrolled input to be controlled. ' + 'This is likely caused by the value changing from undefined to ' + 'a defined value, which should not happen. ' + 'Decide between using a controlled or uncontrolled input ' + 'element for the lifetime of the component. More info: https://reactjs.org/link/controlled-components'); - - didWarnUncontrolledToControlled = true; - } - - if (node._wrapperState.controlled && !controlled && !didWarnControlledToUncontrolled) { - error('A component is changing a controlled input to be uncontrolled. ' + 'This is likely caused by the value changing from a defined to ' + 'undefined, which should not happen. ' + 'Decide between using a controlled or uncontrolled input ' + 'element for the lifetime of the component. More info: https://reactjs.org/link/controlled-components'); - - didWarnControlledToUncontrolled = true; - } - } - - updateChecked(element, props); - var value = getToStringValue(props.value); - var type = props.type; - - if (value != null) { - if (type === 'number') { - if (value === 0 && node.value === '' || // We explicitly want to coerce to number here if possible. - // eslint-disable-next-line - node.value != value) { - node.value = toString(value); - } - } else if (node.value !== toString(value)) { - node.value = toString(value); - } - } else if (type === 'submit' || type === 'reset') { - // Submit/reset inputs need the attribute removed completely to avoid - // blank-text buttons. - node.removeAttribute('value'); - return; - } - - { - // When syncing the value attribute, the value comes from a cascade of - // properties: - // 1. The value React property - // 2. The defaultValue React property - // 3. Otherwise there should be no change - if (props.hasOwnProperty('value')) { - setDefaultValue(node, props.type, value); - } else if (props.hasOwnProperty('defaultValue')) { - setDefaultValue(node, props.type, getToStringValue(props.defaultValue)); - } - } - - { - // When syncing the checked attribute, it only changes when it needs - // to be removed, such as transitioning from a checkbox into a text input - if (props.checked == null && props.defaultChecked != null) { - node.defaultChecked = !!props.defaultChecked; - } - } - } - function postMountWrapper(element, props, isHydrating) { - var node = element; // Do not assign value if it is already set. This prevents user text input - // from being lost during SSR hydration. - - if (props.hasOwnProperty('value') || props.hasOwnProperty('defaultValue')) { - var type = props.type; - var isButton = type === 'submit' || type === 'reset'; // Avoid setting value attribute on submit/reset inputs as it overrides the - // default value provided by the browser. See: #12872 - - if (isButton && (props.value === undefined || props.value === null)) { - return; - } - - var initialValue = toString(node._wrapperState.initialValue); // Do not assign value if it is already set. This prevents user text input - // from being lost during SSR hydration. - - if (!isHydrating) { - { - // When syncing the value attribute, the value property should use - // the wrapperState._initialValue property. This uses: - // - // 1. The value React property when present - // 2. The defaultValue React property when present - // 3. An empty string - if (initialValue !== node.value) { - node.value = initialValue; - } - } - } - - { - // Otherwise, the value attribute is synchronized to the property, - // so we assign defaultValue to the same thing as the value property - // assignment step above. - node.defaultValue = initialValue; - } - } // Normally, we'd just do `node.checked = node.checked` upon initial mount, less this bug - // this is needed to work around a chrome bug where setting defaultChecked - // will sometimes influence the value of checked (even after detachment). - // Reference: https://bugs.chromium.org/p/chromium/issues/detail?id=608416 - // We need to temporarily unset name to avoid disrupting radio button groups. - - - var name = node.name; - - if (name !== '') { - node.name = ''; - } - - { - // When syncing the checked attribute, both the checked property and - // attribute are assigned at the same time using defaultChecked. This uses: - // - // 1. The checked React property when present - // 2. The defaultChecked React property when present - // 3. Otherwise, false - node.defaultChecked = !node.defaultChecked; - node.defaultChecked = !!node._wrapperState.initialChecked; - } - - if (name !== '') { - node.name = name; - } - } - function restoreControlledState(element, props) { - var node = element; - updateWrapper(node, props); - updateNamedCousins(node, props); - } - - function updateNamedCousins(rootNode, props) { - var name = props.name; - - if (props.type === 'radio' && name != null) { - var queryRoot = rootNode; - - while (queryRoot.parentNode) { - queryRoot = queryRoot.parentNode; - } // If `rootNode.form` was non-null, then we could try `form.elements`, - // but that sometimes behaves strangely in IE8. We could also try using - // `form.getElementsByName`, but that will only return direct children - // and won't include inputs that use the HTML5 `form=` attribute. Since - // the input might not even be in a form. It might not even be in the - // document. Let's just use the local `querySelectorAll` to ensure we don't - // miss anything. - - - var group = queryRoot.querySelectorAll('input[name=' + JSON.stringify('' + name) + '][type="radio"]'); - - for (var i = 0; i < group.length; i++) { - var otherNode = group[i]; - - if (otherNode === rootNode || otherNode.form !== rootNode.form) { - continue; - } // This will throw if radio buttons rendered by different copies of React - // and the same name are rendered into the same form (same as #1939). - // That's probably okay; we don't support it just as we don't support - // mixing React radio buttons with non-React ones. - - - var otherProps = getFiberCurrentPropsFromNode(otherNode); - - if (!otherProps) { - { - throw Error( "ReactDOMInput: Mixing React and non-React radio inputs with the same `name` is not supported." ); - } - } // We need update the tracked value on the named cousin since the value - // was changed but the input saw no event or value set - - - updateValueIfChanged(otherNode); // If this is a controlled radio button group, forcing the input that - // was previously checked to update will cause it to be come re-checked - // as appropriate. - - updateWrapper(otherNode, otherProps); - } - } - } // In Chrome, assigning defaultValue to certain input types triggers input validation. - // For number inputs, the display value loses trailing decimal points. For email inputs, - // Chrome raises "The specified value is not a valid email address". - // - // Here we check to see if the defaultValue has actually changed, avoiding these problems - // when the user is inputting text - // - // https://github.com/facebook/react/issues/7253 - - - function setDefaultValue(node, type, value) { - if ( // Focused number inputs synchronize on blur. See ChangeEventPlugin.js - type !== 'number' || getActiveElement(node.ownerDocument) !== node) { - if (value == null) { - node.defaultValue = toString(node._wrapperState.initialValue); - } else if (node.defaultValue !== toString(value)) { - node.defaultValue = toString(value); - } - } - } - - var didWarnSelectedSetOnOption = false; - var didWarnInvalidChild = false; - - function flattenChildren(children) { - var content = ''; // Flatten children. We'll warn if they are invalid - // during validateProps() which runs for hydration too. - // Note that this would throw on non-element objects. - // Elements are stringified (which is normally irrelevant - // but matters for ). - - React.Children.forEach(children, function (child) { - if (child == null) { - return; - } - - content += child; // Note: we don't warn about invalid children here. - // Instead, this is done separately below so that - // it happens during the hydration code path too. - }); - return content; - } - /** - * Implements an