H5PIntegration = {
  ajax: { setFinished: "", contentUserData: "" },
  ajaxPath: "/h5p/ajax?action=",
  contents: {
    "cid-3404165048": {
      displayOptions: {
        copy: false,
        copyright: false,
        embed: false,
        export: false,
        frame: false,
        icon: false,
      },
      fullScreen: "0",
      jsonContent:
        '{"words":[{"extraClue":{"params":{"decorative":false,"contentName":"Εικόνα","expandImage":"Expand Image","minimizeImage":"Minimize Image","alt":"Ακουστικά","file":{"path":"resources/image-6yi6FErX.jpg","mime":"image/jpeg","copyright":{"license":"U"},"width":5460,"height":4509}},"library":"H5P.Image 1.1","metadata":{"contentType":"Image","license":"U","title":"Untitled Image","authors":[],"changes":[],"defaultLanguage":"el"},"subContentId":"d849fa35-5ea5-4dfb-a0ca-822df46ee3ba"},"fixWord":false,"orientation":"across","clue":"Πρώτη Λέξη","answer":"ΑΚΟΥΣΤΙΚΑ"},{"extraClue":{"params":{"decorative":false,"contentName":"Εικόνα","expandImage":"Expand Image","minimizeImage":"Minimize Image","alt":"Ραδιόφωνο","file":{"path":"resources/image-k29V8r96.jpg","mime":"image/jpeg","copyright":{"license":"U"},"width":5751,"height":4107}},"library":"H5P.Image 1.1","metadata":{"contentType":"Image","license":"U","title":"Untitled Image","authors":[],"changes":[],"defaultLanguage":"el"},"subContentId":"e5bb61e1-c39c-4b48-b883-c26835de2ff3"},"fixWord":false,"orientation":"across","clue":"Δεύτερη Λέξη","answer":"ΡΑΔΙΟΦΩΝΟ"},{"extraClue":{"params":{"decorative":false,"contentName":"Εικόνα","expandImage":"Expand Image","minimizeImage":"Minimize Image","file":{"path":"resources/image-DBBCnpN8.jpg","mime":"image/jpeg","copyright":{"license":"U"},"width":593,"height":676},"alt":"Μολύβι"},"library":"H5P.Image 1.1","metadata":{"contentType":"Image","license":"U","title":"Untitled Image","authors":[],"changes":[],"defaultLanguage":"el"},"subContentId":"a3b399f8-496b-474b-814c-f19ae3773dc9"},"fixWord":false,"orientation":"across","clue":"Τρίτη Λέξη","answer":"ΜΟΛΥΒΙ"},{"extraClue":{"params":{"decorative":false,"contentName":"Εικόνα","expandImage":"Expand Image","minimizeImage":"Minimize Image","alt":"Εφημερίδα","file":{"path":"resources/image-R76L2Edc.jpg","mime":"image/jpeg","copyright":{"license":"U"},"width":5124,"height":3843}},"library":"H5P.Image 1.1","metadata":{"contentType":"Image","license":"U","title":"Untitled Image","authors":[],"changes":[],"defaultLanguage":"el"},"subContentId":"f4cfaa76-a17b-4a0b-92fe-bbd2df5646c8"},"fixWord":false,"orientation":"across","clue":"Τετάρτη Λέξη","answer":"ΕΦΗΜΕΡΙΔΑ"},{"extraClue":{"params":{"decorative":false,"contentName":"Εικόνα","expandImage":"Expand Image","minimizeImage":"Minimize Image","alt":"Τηλεόραση","file":{"path":"resources/image-tuE2cnGZ.jpg","mime":"image/jpeg","copyright":{"license":"U"},"width":3956,"height":2764}},"library":"H5P.Image 1.1","metadata":{"contentType":"Image","license":"U","title":"Untitled Image","authors":[],"changes":[],"defaultLanguage":"el"},"subContentId":"73a4e3f1-0fb4-4e54-891d-3c2d7e2fe2d4"},"fixWord":false,"orientation":"across","answer":"ΤΗΛΕΟΡΑΣΗ","clue":"Πέμπτη Λέξη"},{"extraClue":{"params":{"decorative":false,"contentName":"Εικόνα","expandImage":"Expand Image","minimizeImage":"Minimize Image","file":{"path":"resources/image-ZavPymeZ.jpg","mime":"image/jpeg","copyright":{"license":"U"},"width":3000,"height":2000},"alt":"Υπολογιστής"},"library":"H5P.Image 1.1","metadata":{"contentType":"Image","license":"U","title":"Untitled Image","authors":[],"changes":[],"defaultLanguage":"el"},"subContentId":"c0ee581a-9677-444a-8909-4c3635e2b9a6"},"fixWord":false,"orientation":"across","answer":"ΥΠΟΛΟΓΙΣΤΗΣ","clue":"Έκτη Λέξη"},{"extraClue":{"params":{"decorative":false,"contentName":"Εικόνα","expandImage":"Expand Image","minimizeImage":"Minimize Image","file":{"path":"resources/image-yf0TZx0S.jpg","mime":"image/jpeg","copyright":{"license":"U"},"width":6582,"height":5834},"alt":"Τηλέφωνο"},"library":"H5P.Image 1.1","metadata":{"contentType":"Image","license":"U","title":"Untitled Image","authors":[],"changes":[],"defaultLanguage":"el"},"subContentId":"dd94e97c-032c-4026-aa2a-a9baaebd31c2"},"fixWord":false,"orientation":"across","answer":"ΤΗΛΕΦΩΝΟ","clue":"Έβδομη Λέξη"}],"overallFeedback":[{"from":0,"to":100}],"theme":{"backgroundColor":"#197803","gridColor":"#000000","cellBackgroundColor":"#ffffff","cellColor":"#000000","clueIdColor":"#606060","cellBackgroundColorHighlight":"#aaac22","cellColorHighlight":"#ffffff","clueIdColorHighlight":"#e0e0e0"},"behaviour":{"enableInstantFeedback":false,"scoreWords":true,"applyPenalties":false,"enableRetry":true,"enableSolutionsButton":true},"l10n":{"across":"Οριζόντια","down":"Κάθετα","checkAnswer":"Έλεγχος","submitAnswer":"Υποβολή","tryAgain":"Επανάληψη","showSolution":"Εμφάνιση λύσης","couldNotGenerateCrossword":"Δεν ήταν δυνατή η δημιουργία σταυρόλεξου με τις συγκεκριμένες λέξεις. Δοκιμάστε ξανά με λιγότερες λέξεις ή λέξεις που έχουν περισσότερους κοινούς χαρακτήρες.","couldNotGenerateCrosswordTooFewWords":"Δεν ήταν δυνατή η δημιουργία σταυρόλεξου. Χρειάζεστε τουλάχιστον δύο λέξεις.","probematicWords":"Some words could not be placed. Εάν χρησιμοποιείτε σταθερές λέξεις, βεβαιωθείτε ότι η θέση τους δεν εμποδίζει άλλες λέξεις να τοποθετούνται. Words with the same alignment may not be placed touching each other. Προβληματικές λέξεις: @words","extraClue":"Επιπλέον βοήθεια","closeWindow":"Κλείσιμο παραθύρου"},"a11y":{"crosswordGrid":"Πλέγμα σταυρόλεξων. Χρησιμοποιήστε πλήκτρα βέλους για πλοήγηση και πληκτρολόγιο για εισαγωγή χαρακτήρων ή χρησιμοποιήστε το πλήκτρο (Tab) για να χρησιμοποιήσετε πεδία εισαγωγής.","column":"Στήλη","row":"Γραμμή","across":"Οριζόντια","down":"Κάθετα","empty":"Κενό","resultFor":"Αποτέλεσμα για: @clue","correct":"Σωστό","wrong":"Λάθος","point":"Βαθμοί","solutionFor":"Για το @clue η λύση είναι: @solution","extraClueFor":"Άνοιγμα επιπλέον βοήθειας για @clue","letterSevenOfNine":"Γράμμα @position από @length","lettersWord":"Λέξη @length γραμμάτων","check":"Ελέγξτε τους χαρακτήρες. Οι απαντήσεις θα επισημανθούν ως σωστές, λανθασμένες ή αναπάντητες.","showSolution":"Εμφάνιση της λύσης. Το σταυρόλεξο θα συμπληρωθεί με τη σωστή λύση του.","retry":"Επαναλάβετε την εργασία. Επαναφέρετε όλες τις απαντήσεις και ξεκινήστε την εργασία ξανά.","yourResult":"Συγκεντρώσατε @score από τους @total βαθμούς."},"taskDescription":""}',
      library: "H5P.Crossword 0.5",
      metadata: {
        license: "U",
        title: "Αναγνωρίζω τις εικόνες",
        defaultLanguage: "en",
      },
      scripts: [
        "/h5p/libraries/H5P.Image-1.1/image.js?version=1.1.22",
        "/h5p/libraries/H5P.Transition-1.0/transition.js?version=1.0.4",
        "/h5p/libraries/H5P.JoubelUI-1.3/js/joubel-help-dialog.js?version=1.3.19",
        "/h5p/libraries/H5P.JoubelUI-1.3/js/joubel-message-dialog.js?version=1.3.19",
        "/h5p/libraries/H5P.JoubelUI-1.3/js/joubel-progress-circle.js?version=1.3.19",
        "/h5p/libraries/H5P.JoubelUI-1.3/js/joubel-simple-rounded-button.js?version=1.3.19",
        "/h5p/libraries/H5P.JoubelUI-1.3/js/joubel-speech-bubble.js?version=1.3.19",
        "/h5p/libraries/H5P.JoubelUI-1.3/js/joubel-throbber.js?version=1.3.19",
        "/h5p/libraries/H5P.JoubelUI-1.3/js/joubel-tip.js?version=1.3.19",
        "/h5p/libraries/H5P.JoubelUI-1.3/js/joubel-slider.js?version=1.3.19",
        "/h5p/libraries/H5P.JoubelUI-1.3/js/joubel-score-bar.js?version=1.3.19",
        "/h5p/libraries/H5P.JoubelUI-1.3/js/joubel-progressbar.js?version=1.3.19",
        "/h5p/libraries/H5P.JoubelUI-1.3/js/joubel-ui.js?version=1.3.19",
        "/h5p/libraries/H5P.Question-1.5/scripts/question.js?version=1.5.15",
        "/h5p/libraries/H5P.Question-1.5/scripts/explainer.js?version=1.5.15",
        "/h5p/libraries/H5P.Question-1.5/scripts/score-points.js?version=1.5.15",
        "/h5p/libraries/H5P.Crossword-0.5/dist/h5p-crossword.js?version=0.5.5",
      ],
      styles: [
        "/h5p/libraries/H5P.Image-1.1/image.css?version=1.1.22",
        "/h5p/libraries/FontAwesome-4.5/h5p-font-awesome.min.css?version=4.5.4",
        "/h5p/libraries/H5P.FontIcons-1.0/styles/h5p-font-icons.css?version=1.0.6",
        "/h5p/libraries/H5P.JoubelUI-1.3/css/joubel-help-dialog.css?version=1.3.19",
        "/h5p/libraries/H5P.JoubelUI-1.3/css/joubel-message-dialog.css?version=1.3.19",
        "/h5p/libraries/H5P.JoubelUI-1.3/css/joubel-progress-circle.css?version=1.3.19",
        "/h5p/libraries/H5P.JoubelUI-1.3/css/joubel-simple-rounded-button.css?version=1.3.19",
        "/h5p/libraries/H5P.JoubelUI-1.3/css/joubel-speech-bubble.css?version=1.3.19",
        "/h5p/libraries/H5P.JoubelUI-1.3/css/joubel-tip.css?version=1.3.19",
        "/h5p/libraries/H5P.JoubelUI-1.3/css/joubel-slider.css?version=1.3.19",
        "/h5p/libraries/H5P.JoubelUI-1.3/css/joubel-score-bar.css?version=1.3.19",
        "/h5p/libraries/H5P.JoubelUI-1.3/css/joubel-progressbar.css?version=1.3.19",
        "/h5p/libraries/H5P.JoubelUI-1.3/css/joubel-ui.css?version=1.3.19",
        "/h5p/libraries/H5P.JoubelUI-1.3/css/joubel-icon.css?version=1.3.19",
        "/h5p/libraries/H5P.Question-1.5/styles/question.css?version=1.5.15",
        "/h5p/libraries/H5P.Question-1.5/styles/explainer.css?version=1.5.15",
        "/h5p/libraries/H5P.MaterialDesignIcons-1.0/h5p-material-icons.css?version=1.0.0",
        "/h5p/libraries/H5P.Crossword-0.5/dist/h5p-crossword.css?version=0.5.5",
      ],
      url: "3404165048",
      exportUrl: "/h5p/download/3404165048",
    },
  },
  core: {
    scripts: [
      "/h5p/core/js/jquery.js?version=1.24-master",
      "/h5p/core/js/h5p.js?version=1.24-master",
      "/h5p/core/js/h5p-event-dispatcher.js?version=1.24-master",
      "/h5p/core/js/h5p-x-api-event.js?version=1.24-master",
      "/h5p/core/js/h5p-x-api.js?version=1.24-master",
      "/h5p/core/js/h5p-content-type.js?version=1.24-master",
      "/h5p/core/js/h5p-confirmation-dialog.js?version=1.24-master",
      "/h5p/core/js/h5p-action-bar.js?version=1.24-master",
      "/h5p/core/js/request-queue.js?version=1.24-master",
    ],
    styles: [
      "/h5p/core/styles/h5p.css?version=1.24-master",
      "/h5p/core/styles/h5p-confirmation-dialog.css?version=1.24-master",
      "/h5p/core/styles/h5p-core-button.css?version=1.24-master",
    ],
  },
  l10n: {
    H5P: {
      fullscreen: "Fullscreen",
      disableFullscreen: "Disable fullscreen",
      download: "Download",
      copyrights: "Rights of use",
      embed: "Embed",
      size: "Size",
      showAdvanced: "Show advanced",
      hideAdvanced: "Hide advanced",
      advancedHelp:
        "Include this script on your website if you want dynamic sizing of the embedded content:",
      copyrightInformation: "Rights of use",
      close: "Close",
      title: "Title",
      author: "Author",
      year: "Year",
      source: "Source",
      license: "License",
      thumbnail: "Thumbnail",
      noCopyrights: "No copyright information available for this content.",
      reuse: "Reuse",
      reuseContent: "Reuse Content",
      reuseDescription: "Reuse this content.",
      downloadDescription: "Download this content as a H5P file.",
      copyrightsDescription: "View copyright information for this content.",
      embedDescription: "View the embed code for this content.",
      h5pDescription: "Visit H5P.org to check out more cool content.",
      contentChanged: "This content has changed since you last used it.",
      startingOver: "You'll be starting over.",
      by: "by",
      showMore: "Show more",
      showLess: "Show less",
      subLevel: "Sublevel",
      confirmDialogHeader: "Confirm action",
      confirmDialogBody:
        "Please confirm that you wish to proceed. This action is not reversible.",
      cancelLabel: "Cancel",
      confirmLabel: "Confirm",
      licenseU: "Undisclosed",
      licenseCCBY: "Attribution",
      licenseCCBYSA: "Attribution-ShareAlike",
      licenseCCBYND: "Attribution-NoDerivs",
      licenseCCBYNC: "Attribution-NonCommercial",
      licenseCCBYNCSA: "Attribution-NonCommercial-ShareAlike",
      licenseCCBYNCND: "Attribution-NonCommercial-NoDerivs",
      licenseCC40: "4.0 International",
      licenseCC30: "3.0 Unported",
      licenseCC25: "2.5 Generic",
      licenseCC20: "2.0 Generic",
      licenseCC10: "1.0 Generic",
      licenseGPL: "General Public License",
      licenseV3: "Version 3",
      licenseV2: "Version 2",
      licenseV1: "Version 1",
      licensePD: "Public Domain",
      licenseCC010: "CC0 1.0 Universal (CC0 1.0) Public Domain Dedication",
      licensePDM: "Public Domain Mark",
      licenseC: "Copyright",
      contentType: "Content Type",
      licenseExtras: "License Extras",
      changes: "Changelog",
      contentCopied: "Content is copied to the clipboard",
      connectionLost:
        "Connection lost. Results will be stored and sent when you regain connection.",
      connectionReestablished: "Connection reestablished.",
      resubmitScores: "Attempting to submit stored results.",
      offlineDialogHeader: "Your connection to the server was lost",
      offlineDialogBody:
        "We were unable to send information about your completion of this task. Please check your internet connection.",
      offlineDialogRetryMessage: "Retrying in :num....",
      offlineDialogRetryButtonLabel: "Retry now",
      offlineSuccessfulSubmit: "Successfully submitted results.",
      mainTitle: "Sharing <strong>:title</strong>",
      editInfoTitle: "Edit info for <strong>:title</strong>",
      cancel: "Cancel",
      back: "Back",
      next: "Next",
      reviewInfo: "Review info",
      share: "Share",
      saveChanges: "Save changes",
      registerOnHub: "Register on the H5P Hub",
      updateRegistrationOnHub: "Save account settings",
      requiredInfo: "Required Info",
      optionalInfo: "Optional Info",
      reviewAndShare: "Review & Share",
      reviewAndSave: "Review & Save",
      shared: "Shared",
      currentStep: "Step :step of :total",
      sharingNote: "All content details can be edited after sharing",
      licenseDescription: "Select a license for your content",
      licenseVersion: "License Version",
      licenseVersionDescription: "Select a license version",
      disciplineLabel: "Disciplines",
      disciplineDescription: "You can select multiple disciplines",
      disciplineLimitReachedMessage:
        "You can select up to :numDisciplines disciplines",
      discipline: {
        searchPlaceholder: "Type to search for disciplines",
        in: "in",
        dropdownButton: "Dropdown button",
      },
      removeChip: "Remove :chip from the list",
      keywordsPlaceholder: "Add keywords",
      keywords: "Keywords",
      keywordsDescription:
        'You can add multiple keywords separated by commas. Press "Enter" or "Add" to confirm keywords',
      altText: "Alt text",
      reviewMessage: "Please review the info below before you share",
      subContentWarning:
        "Sub-content (images, questions etc.) will be shared under :license unless otherwise specified in the authoring tool",
      disciplines: "Disciplines",
      shortDescription: "Short description",
      longDescription: "Long description",
      icon: "Icon",
      screenshots: "Screenshots",
      helpChoosingLicense: "Help me choose a license",
      shareFailed: "Share failed.",
      editingFailed: "Editing failed.",
      shareTryAgain: "Something went wrong, please try to share again.",
      pleaseWait: "Please wait...",
      language: "Language",
      level: "Level",
      shortDescriptionPlaceholder: "Short description of your content",
      longDescriptionPlaceholder: "Long description of your content",
      description: "Description",
      iconDescription:
        "640x480px. If not selected content will use category icon",
      screenshotsDescription: "Add up to five screenshots of your content",
      submitted: "Submitted!",
      isNowSubmitted: "Is now submitted to H5P Hub",
      changeHasBeenSubmitted: "A change has been submited for",
      contentAvailable:
        "Your content will normally be available in the Hub within one business day.",
      contentUpdateSoon: "Your content will update soon",
      contentLicenseTitle: "Content License Info",
      licenseDialogDescription:
        "Click on a specific license to get info about proper usage",
      publisherFieldTitle: "Publisher",
      publisherFieldDescription:
        'This will display as the "Publisher name" on shared content',
      emailAddress: "Email Address",
      publisherDescription: "Publisher description",
      publisherDescriptionText:
        'This will be displayed under "Publisher info" on shared content',
      contactPerson: "Contact Person",
      phone: "Phone",
      address: "Address",
      city: "City",
      zip: "Zip",
      country: "Country",
      logoUploadText: "Organization logo or avatar",
      acceptTerms:
        "I accept the <a href=':url' target='_blank'>terms of use</a>",
      successfullyRegistred:
        "You have successfully registered an account on the H5P Hub",
      successfullyRegistredDescription: "You account details can be changed",
      successfullyUpdated:
        "Your H5P Hub account settings have successfully been changed",
      accountDetailsLinkText: "here",
      registrationTitle: "H5P Hub Registration",
      registrationFailed: "An error occurred",
      registrationFailedDescription:
        "We were not able to create an account at this point. Something went wrong. Try again later.",
      maxLength: ":length is the maximum number of characters",
      keywordExists: "Keyword already exists!",
      licenseDetails: "License details",
      remove: "Remove",
      removeImage: "Remove image",
      cancelPublishConfirmationDialogTitle: "Cancel sharing",
      cancelPublishConfirmationDialogDescription:
        "Are you sure you want to cancel the sharing process?",
      cancelPublishConfirmationDialogCancelButtonText: "No",
      cancelPublishConfirmationDialogConfirmButtonText: "Yes",
      add: "Add",
      age: "Typical age",
      ageDescription:
        'The target audience of this content. Possible input formats separated by commas: "1,34-45,-50,59-".',
      invalidAge:
        'Invalid input format for Typical age. Possible input formats separated by commas: "1, 34-45, -50, -59-".',
      contactPersonDescription:
        'H5P will reach out to the contact person in case there are any issues with the content shared by the publisher. The contact person"s name or other information will not be published or shared with third parties',
      emailAddressDescription:
        "The email address will be used by H5P to reach out to the publisher in case of any issues with the content or in case the publisher needs to recover their account. It will not be published or shared with any third parties",
      copyrightWarning:
        "Copyrighted material cannot be shared in the H5P Content Hub. If the content is licensed with a OER friendly license like Creative Commons, please choose the appropriate license. If not this content cannot be shared.",
      keywordsExits: "Keywords already exists!",
      someKeywordsExits: "Some of these keywords already exist",
    },
  },
  postUserStatistics: false,
  saveFreq: false,
  url: ".",
  hubIsEnabled: true,
  fullscreenDisabled: 0,
  user: { name: "Firstname Surname", id: "1" },
  baseUrl: ".",
  libraryUrl: "",
};

if (new URLSearchParams(window.location.search).get("embed") == "true") {
  H5PIntegration.contents["cid-" + "3404165048"].displayOptions.embed = false;
} else {
  H5PIntegration.contents["cid-" + "3404165048"].embedCode =
    '<iframe src="' +
    window.location.protocol +
    "//" +
    window.location.host +
    window.location.pathname +
    "?embed=true" +
    '" width=":w" height=":h" frameborder="0" allowfullscreen="allowfullscreen"></iframe>';
  H5PIntegration.contents["cid-" + "3404165048"].resizeCode = "";
}

/*!@license js/jquery.js by Joubel and other contributors, licensed under GNU GENERAL PUBLIC LICENSE Version 3*/
!(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 (P, e) {
  "use strict";
  function g(e) {
    return "function" == typeof e && "number" != typeof e.nodeType;
  }
  function m(e) {
    return null != e && e === e.window;
  }
  var t = [],
    n = Object.getPrototypeOf,
    a = t.slice,
    v = t.flat
      ? function (e) {
          return t.flat.call(e);
        }
      : function (e) {
          return t.concat.apply([], e);
        },
    l = t.push,
    o = t.indexOf,
    i = {},
    r = i.toString,
    b = i.hasOwnProperty,
    s = b.toString,
    c = s.call(Object),
    y = {},
    C = P.document,
    u = { type: !0, src: !0, nonce: !0, noModule: !0 };
  function w(e, t, n) {
    var i,
      o,
      r = (n = n || C).createElement("script");
    if (((r.text = e), t))
      for (i in u)
        (o = t[i] || (t.getAttribute && t.getAttribute(i))) &&
          r.setAttribute(i, o);
    n.head.appendChild(r).parentNode.removeChild(r);
  }
  function f(e) {
    return null == e
      ? e + ""
      : "object" == typeof e || "function" == typeof e
        ? i[r.call(e)] || "object"
        : typeof e;
  }
  var d = "3.5.1",
    H = function (e, t) {
      return new H.fn.init(e, t);
    };
  function h(e) {
    var t = !!e && "length" in e && e.length,
      n = f(e);
    return (
      !g(e) &&
      !m(e) &&
      ("array" === n ||
        0 === t ||
        ("number" == typeof t && 0 < t && t - 1 in e))
    );
  }
  ((H.fn = H.prototype =
    {
      jquery: d,
      constructor: H,
      length: 0,
      toArray: function () {
        return a.call(this);
      },
      get: function (e) {
        return null == e
          ? a.call(this)
          : e < 0
            ? this[e + this.length]
            : this[e];
      },
      pushStack: function (e) {
        e = H.merge(this.constructor(), e);
        return ((e.prevObject = this), e);
      },
      each: function (e) {
        return H.each(this, e);
      },
      map: function (n) {
        return this.pushStack(
          H.map(this, function (e, t) {
            return n.call(e, t, e);
          }),
        );
      },
      slice: function () {
        return this.pushStack(a.apply(this, arguments));
      },
      first: function () {
        return this.eq(0);
      },
      last: function () {
        return this.eq(-1);
      },
      even: function () {
        return this.pushStack(
          H.grep(this, function (e, t) {
            return (t + 1) % 2;
          }),
        );
      },
      odd: function () {
        return this.pushStack(
          H.grep(this, function (e, t) {
            return t % 2;
          }),
        );
      },
      eq: function (e) {
        var t = this.length,
          e = +e + (e < 0 ? t : 0);
        return this.pushStack(0 <= e && e < t ? [this[e]] : []);
      },
      end: function () {
        return this.prevObject || this.constructor();
      },
      push: l,
      sort: t.sort,
      splice: t.splice,
    }),
    (H.extend = H.fn.extend =
      function () {
        var e,
          t,
          n,
          i,
          o,
          r = arguments[0] || {},
          s = 1,
          a = arguments.length,
          l = !1;
        for (
          "boolean" == typeof r && ((l = r), (r = arguments[s] || {}), s++),
            "object" == typeof r || g(r) || (r = {}),
            s === a && ((r = this), s--);
          s < a;
          s++
        )
          if (null != (e = arguments[s]))
            for (t in e)
              ((n = e[t]),
                "__proto__" !== t &&
                  r !== n &&
                  (l && n && (H.isPlainObject(n) || (i = Array.isArray(n)))
                    ? ((o = r[t]),
                      (o =
                        i && !Array.isArray(o)
                          ? []
                          : i || H.isPlainObject(o)
                            ? o
                            : {}),
                      (i = !1),
                      (r[t] = H.extend(l, o, n)))
                    : void 0 !== n && (r[t] = n)));
        return r;
      }),
    H.extend({
      expando: "jQuery" + (d + Math.random()).replace(/\D/g, ""),
      isReady: !0,
      error: function (e) {
        throw new Error(e);
      },
      noop: function () {},
      isPlainObject: function (e) {
        return !(
          !e ||
          "[object Object]" !== r.call(e) ||
          ((e = n(e)) &&
            ("function" !=
              typeof (e = b.call(e, "constructor") && e.constructor) ||
              s.call(e) !== c))
        );
      },
      isEmptyObject: function (e) {
        for (var t in e) return !1;
        return !0;
      },
      globalEval: function (e, t, n) {
        w(e, { nonce: t && t.nonce }, n);
      },
      each: function (e, t) {
        var n,
          i = 0;
        if (h(e))
          for (n = e.length; i < n && !1 !== t.call(e[i], i, e[i]); i++);
        else for (i in e) if (!1 === t.call(e[i], i, e[i])) break;
        return e;
      },
      makeArray: function (e, t) {
        t = t || [];
        return (
          null != e &&
            (h(Object(e))
              ? H.merge(t, "string" == typeof e ? [e] : e)
              : l.call(t, e)),
          t
        );
      },
      inArray: function (e, t, n) {
        return null == t ? -1 : o.call(t, e, n);
      },
      merge: function (e, t) {
        for (var n = +t.length, i = 0, o = e.length; i < n; i++) e[o++] = t[i];
        return ((e.length = o), e);
      },
      grep: function (e, t, n) {
        for (var i = [], o = 0, r = e.length, s = !n; o < r; o++)
          !t(e[o], o) != s && i.push(e[o]);
        return i;
      },
      map: function (e, t, n) {
        var i,
          o,
          r = 0,
          s = [];
        if (h(e))
          for (i = e.length; r < i; r++)
            null != (o = t(e[r], r, n)) && s.push(o);
        else for (r in e) null != (o = t(e[r], r, n)) && s.push(o);
        return v(s);
      },
      guid: 1,
      support: y,
    }),
    "function" == typeof Symbol && (H.fn[Symbol.iterator] = t[Symbol.iterator]),
    H.each(
      "Boolean Number String Function Array Date RegExp Object Error Symbol".split(
        " ",
      ),
      function (e, t) {
        i["[object " + t + "]"] = t.toLowerCase();
      },
    ));
  var p = (function (n) {
    function d(e, t) {
      return (
        (e = "0x" + e.slice(1) - 65536),
        t ||
          (e < 0
            ? String.fromCharCode(65536 + e)
            : String.fromCharCode((e >> 10) | 55296, (1023 & e) | 56320))
      );
    }
    function h(e, t) {
      return t
        ? "\0" === e
          ? "�"
          : e.slice(0, -1) +
            "\\" +
            e.charCodeAt(e.length - 1).toString(16) +
            " "
        : "\\" + e;
    }
    function i() {
      P();
    }
    var e,
      p,
      w,
      r,
      o,
      f,
      g,
      m,
      x,
      l,
      c,
      P,
      C,
      s,
      H,
      v,
      a,
      u,
      b,
      T = "sizzle" + +new Date(),
      y = n.document,
      E = 0,
      S = 0,
      I = le(),
      A = le(),
      k = le(),
      L = le(),
      D = function (e, t) {
        return (e === t && (c = !0), 0);
      },
      O = {}.hasOwnProperty,
      t = [],
      j = t.pop,
      R = t.push,
      F = t.push,
      N = t.slice,
      $ = function (e, t) {
        for (var n = 0, i = e.length; n < i; n++) if (e[n] === t) return n;
        return -1;
      },
      M =
        "checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",
      q = "[\\x20\\t\\r\\n\\f]",
      W =
        "(?:\\\\[\\da-fA-F]{1,6}" +
        q +
        "?|\\\\[^\\r\\n\\f]|[\\w-]|[^\0-\\x7f])+",
      B =
        "\\[" +
        q +
        "*(" +
        W +
        ")(?:" +
        q +
        "*([*^$|!~]?=)" +
        q +
        "*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|(" +
        W +
        "))|)" +
        q +
        "*\\]",
      z =
        ":(" +
        W +
        ")(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|" +
        B +
        ")*)|.*)\\)|)",
      _ = new RegExp(q + "+", "g"),
      U = new RegExp("^" + q + "+|((?:^|[^\\\\])(?:\\\\.)*)" + q + "+$", "g"),
      Q = new RegExp("^" + q + "*," + q + "*"),
      V = new RegExp("^" + q + "*([>+~]|" + q + ")" + q + "*"),
      X = new RegExp(q + "|>"),
      G = new RegExp(z),
      J = new RegExp("^" + W + "$"),
      Y = {
        ID: new RegExp("^#(" + W + ")"),
        CLASS: new RegExp("^\\.(" + W + ")"),
        TAG: new RegExp("^(" + W + "|[*])"),
        ATTR: new RegExp("^" + B),
        PSEUDO: new RegExp("^" + z),
        CHILD: new RegExp(
          "^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\(" +
            q +
            "*(even|odd|(([+-]|)(\\d*)n|)" +
            q +
            "*(?:([+-]|)" +
            q +
            "*(\\d+)|))" +
            q +
            "*\\)|)",
          "i",
        ),
        bool: new RegExp("^(?:" + M + ")$", "i"),
        needsContext: new RegExp(
          "^" +
            q +
            "*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\(" +
            q +
            "*((?:-\\d)?\\d*)" +
            q +
            "*\\)|)(?=[^-]|$)",
          "i",
        ),
      },
      K = /HTML$/i,
      Z = /^(?:input|select|textarea|button)$/i,
      ee = /^h\d$/i,
      te = /^[^{]+\{\s*\[native \w/,
      ne = /^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,
      ie = /[+~]/,
      oe = new RegExp("\\\\[\\da-fA-F]{1,6}" + q + "?|\\\\([^\\r\\n\\f])", "g"),
      re = /([\0-\x1f\x7f]|^-?\d)|^-$|[^\0-\x1f\x7f-\uFFFF\w-]/g,
      se = be(
        function (e) {
          return !0 === e.disabled && "fieldset" === e.nodeName.toLowerCase();
        },
        { dir: "parentNode", next: "legend" },
      );
    try {
      (F.apply((t = N.call(y.childNodes)), y.childNodes),
        t[y.childNodes.length].nodeType);
    } catch (e) {
      F = {
        apply: t.length
          ? function (e, t) {
              R.apply(e, N.call(t));
            }
          : function (e, t) {
              for (var n = e.length, i = 0; (e[n++] = t[i++]); );
              e.length = n - 1;
            },
      };
    }
    function ae(e, t, n, i) {
      var o,
        r,
        s,
        a,
        l,
        c,
        u = t && t.ownerDocument,
        d = t ? t.nodeType : 9;
      if (
        ((n = n || []),
        "string" != typeof e || !e || (1 !== d && 9 !== d && 11 !== d))
      )
        return n;
      if (!i && (P(t), (t = t || C), H)) {
        if (11 !== d && (a = ne.exec(e)))
          if ((c = a[1])) {
            if (9 === d) {
              if (!(r = t.getElementById(c))) return n;
              if (r.id === c) return (n.push(r), n);
            } else if (u && (r = u.getElementById(c)) && b(t, r) && r.id === c)
              return (n.push(r), n);
          } else {
            if (a[2]) return (F.apply(n, t.getElementsByTagName(e)), n);
            if (
              (c = a[3]) &&
              p.getElementsByClassName &&
              t.getElementsByClassName
            )
              return (F.apply(n, t.getElementsByClassName(c)), n);
          }
        if (
          p.qsa &&
          !L[e + " "] &&
          (!v || !v.test(e)) &&
          (1 !== d || "object" !== t.nodeName.toLowerCase())
        ) {
          if (((c = e), (u = t), 1 === d && (X.test(e) || V.test(e)))) {
            for (
              ((u = (ie.test(e) && ge(t.parentNode)) || t) === t && p.scope) ||
                ((s = t.getAttribute("id"))
                  ? (s = s.replace(re, h))
                  : t.setAttribute("id", (s = T))),
                o = (l = f(e)).length;
              o--;

            )
              l[o] = (s ? "#" + s : ":scope") + " " + ve(l[o]);
            c = l.join(",");
          }
          try {
            return (F.apply(n, u.querySelectorAll(c)), n);
          } catch (t) {
            L(e, !0);
          } finally {
            s === T && t.removeAttribute("id");
          }
        }
      }
      return m(e.replace(U, "$1"), t, n, i);
    }
    function le() {
      var i = [];
      return function e(t, n) {
        return (
          i.push(t + " ") > w.cacheLength && delete e[i.shift()],
          (e[t + " "] = n)
        );
      };
    }
    function ce(e) {
      return ((e[T] = !0), e);
    }
    function ue(e) {
      var t = C.createElement("fieldset");
      try {
        return !!e(t);
      } catch (e) {
        return !1;
      } finally {
        t.parentNode && t.parentNode.removeChild(t);
      }
    }
    function de(e, t) {
      for (var n = e.split("|"), i = n.length; i--; ) w.attrHandle[n[i]] = t;
    }
    function he(e, t) {
      var n = t && e,
        i =
          n &&
          1 === e.nodeType &&
          1 === t.nodeType &&
          e.sourceIndex - t.sourceIndex;
      if (i) return i;
      if (n) for (; (n = n.nextSibling); ) if (n === t) return -1;
      return e ? 1 : -1;
    }
    function pe(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 && se(e) === t)
            : e.disabled === t
          : "label" in e && e.disabled === t;
      };
    }
    function fe(s) {
      return ce(function (r) {
        return (
          (r = +r),
          ce(function (e, t) {
            for (var n, i = s([], e.length, r), o = i.length; o--; )
              e[(n = i[o])] && (e[n] = !(t[n] = e[n]));
          })
        );
      });
    }
    function ge(e) {
      return e && void 0 !== e.getElementsByTagName && e;
    }
    for (e in ((p = ae.support = {}),
    (o = ae.isXML =
      function (e) {
        var t = e.namespaceURI,
          e = (e.ownerDocument || e).documentElement;
        return !K.test(t || (e && e.nodeName) || "HTML");
      }),
    (P = ae.setDocument =
      function (e) {
        var t,
          e = e ? e.ownerDocument || e : y;
        return (
          e != C &&
            9 === e.nodeType &&
            e.documentElement &&
            ((s = (C = e).documentElement),
            (H = !o(C)),
            y != C &&
              (t = C.defaultView) &&
              t.top !== t &&
              (t.addEventListener
                ? t.addEventListener("unload", i, !1)
                : t.attachEvent && t.attachEvent("onunload", i)),
            (p.scope = ue(function (e) {
              return (
                s.appendChild(e).appendChild(C.createElement("div")),
                void 0 !== e.querySelectorAll &&
                  !e.querySelectorAll(":scope fieldset div").length
              );
            })),
            (p.attributes = ue(function (e) {
              return ((e.className = "i"), !e.getAttribute("className"));
            })),
            (p.getElementsByTagName = ue(function (e) {
              return (
                e.appendChild(C.createComment("")),
                !e.getElementsByTagName("*").length
              );
            })),
            (p.getElementsByClassName = te.test(C.getElementsByClassName)),
            (p.getById = ue(function (e) {
              return (
                (s.appendChild(e).id = T),
                !C.getElementsByName || !C.getElementsByName(T).length
              );
            })),
            p.getById
              ? ((w.filter.ID = function (e) {
                  var t = e.replace(oe, d);
                  return function (e) {
                    return e.getAttribute("id") === t;
                  };
                }),
                (w.find.ID = function (e, t) {
                  if (void 0 !== t.getElementById && H) {
                    e = t.getElementById(e);
                    return e ? [e] : [];
                  }
                }))
              : ((w.filter.ID = function (e) {
                  var t = e.replace(oe, d);
                  return function (e) {
                    e =
                      void 0 !== e.getAttributeNode && e.getAttributeNode("id");
                    return e && e.value === t;
                  };
                }),
                (w.find.ID = function (e, t) {
                  if (void 0 !== t.getElementById && H) {
                    var n,
                      i,
                      o,
                      r = t.getElementById(e);
                    if (r) {
                      if ((n = r.getAttributeNode("id")) && n.value === e)
                        return [r];
                      for (o = t.getElementsByName(e), i = 0; (r = o[i++]); )
                        if ((n = r.getAttributeNode("id")) && n.value === e)
                          return [r];
                    }
                    return [];
                  }
                })),
            (w.find.TAG = p.getElementsByTagName
              ? function (e, t) {
                  return void 0 !== t.getElementsByTagName
                    ? t.getElementsByTagName(e)
                    : p.qsa
                      ? t.querySelectorAll(e)
                      : void 0;
                }
              : function (e, t) {
                  var n,
                    i = [],
                    o = 0,
                    r = t.getElementsByTagName(e);
                  if ("*" !== e) return r;
                  for (; (n = r[o++]); ) 1 === n.nodeType && i.push(n);
                  return i;
                }),
            (w.find.CLASS =
              p.getElementsByClassName &&
              function (e, t) {
                if (void 0 !== t.getElementsByClassName && H)
                  return t.getElementsByClassName(e);
              }),
            (a = []),
            (v = []),
            (p.qsa = te.test(C.querySelectorAll)) &&
              (ue(function (e) {
                var t;
                ((s.appendChild(e).innerHTML =
                  "<a id='" +
                  T +
                  "'></a><select id='" +
                  T +
                  "-\r\\' msallowcapture=''><option selected=''></option></select>"),
                  e.querySelectorAll("[msallowcapture^='']").length &&
                    v.push("[*^$]=" + q + "*(?:''|\"\")"),
                  e.querySelectorAll("[selected]").length ||
                    v.push("\\[" + q + "*(?:value|" + M + ")"),
                  e.querySelectorAll("[id~=" + T + "-]").length || v.push("~="),
                  (t = C.createElement("input")).setAttribute("name", ""),
                  e.appendChild(t),
                  e.querySelectorAll("[name='']").length ||
                    v.push("\\[" + q + "*name" + q + "*=" + q + "*(?:''|\"\")"),
                  e.querySelectorAll(":checked").length || v.push(":checked"),
                  e.querySelectorAll("a#" + T + "+*").length ||
                    v.push(".#.+[+~]"),
                  e.querySelectorAll("\\\f"),
                  v.push("[\\r\\n\\f]"));
              }),
              ue(function (e) {
                e.innerHTML =
                  "<a href='' disabled='disabled'></a><select disabled='disabled'><option/></select>";
                var t = C.createElement("input");
                (t.setAttribute("type", "hidden"),
                  e.appendChild(t).setAttribute("name", "D"),
                  e.querySelectorAll("[name=d]").length &&
                    v.push("name" + q + "*[*^$|!~]?="),
                  2 !== e.querySelectorAll(":enabled").length &&
                    v.push(":enabled", ":disabled"),
                  (s.appendChild(e).disabled = !0),
                  2 !== e.querySelectorAll(":disabled").length &&
                    v.push(":enabled", ":disabled"),
                  e.querySelectorAll("*,:x"),
                  v.push(",.*:"));
              })),
            (p.matchesSelector = te.test(
              (u =
                s.matches ||
                s.webkitMatchesSelector ||
                s.mozMatchesSelector ||
                s.oMatchesSelector ||
                s.msMatchesSelector),
            )) &&
              ue(function (e) {
                ((p.disconnectedMatch = u.call(e, "*")),
                  u.call(e, "[s!='']:x"),
                  a.push("!=", z));
              }),
            (v = v.length && new RegExp(v.join("|"))),
            (a = a.length && new RegExp(a.join("|"))),
            (t = te.test(s.compareDocumentPosition)),
            (b =
              t || te.test(s.contains)
                ? function (e, t) {
                    var n = 9 === e.nodeType ? e.documentElement : e,
                      t = t && t.parentNode;
                    return (
                      e === t ||
                      !(
                        !t ||
                        1 !== t.nodeType ||
                        !(n.contains
                          ? n.contains(t)
                          : e.compareDocumentPosition &&
                            16 & e.compareDocumentPosition(t))
                      )
                    );
                  }
                : function (e, t) {
                    if (t) for (; (t = t.parentNode); ) if (t === e) return !0;
                    return !1;
                  }),
            (D = t
              ? function (e, t) {
                  return e === t
                    ? ((c = !0), 0)
                    : (n =
                        !e.compareDocumentPosition -
                        !t.compareDocumentPosition) ||
                        (1 &
                          (n =
                            (e.ownerDocument || e) == (t.ownerDocument || t)
                              ? e.compareDocumentPosition(t)
                              : 1) ||
                        (!p.sortDetached && t.compareDocumentPosition(e) === n)
                          ? e == C || (e.ownerDocument == y && b(y, e))
                            ? -1
                            : t == C || (t.ownerDocument == y && b(y, t))
                              ? 1
                              : l
                                ? $(l, e) - $(l, t)
                                : 0
                          : 4 & n
                            ? -1
                            : 1);
                  var n;
                }
              : function (e, t) {
                  if (e === t) return ((c = !0), 0);
                  var n,
                    i = 0,
                    o = e.parentNode,
                    r = t.parentNode,
                    s = [e],
                    a = [t];
                  if (!o || !r)
                    return e == C
                      ? -1
                      : t == C
                        ? 1
                        : o
                          ? -1
                          : r
                            ? 1
                            : l
                              ? $(l, e) - $(l, t)
                              : 0;
                  if (o === r) return he(e, t);
                  for (n = e; (n = n.parentNode); ) s.unshift(n);
                  for (n = t; (n = n.parentNode); ) a.unshift(n);
                  for (; s[i] === a[i]; ) i++;
                  return i
                    ? he(s[i], a[i])
                    : s[i] == y
                      ? -1
                      : a[i] == y
                        ? 1
                        : 0;
                })),
          C
        );
      }),
    (ae.matches = function (e, t) {
      return ae(e, null, null, t);
    }),
    (ae.matchesSelector = function (e, t) {
      if (
        (P(e),
        p.matchesSelector &&
          H &&
          !L[t + " "] &&
          (!a || !a.test(t)) &&
          (!v || !v.test(t)))
      )
        try {
          var n = u.call(e, t);
          if (
            n ||
            p.disconnectedMatch ||
            (e.document && 11 !== e.document.nodeType)
          )
            return n;
        } catch (e) {
          L(t, !0);
        }
      return 0 < ae(t, C, null, [e]).length;
    }),
    (ae.contains = function (e, t) {
      return ((e.ownerDocument || e) != C && P(e), b(e, t));
    }),
    (ae.attr = function (e, t) {
      (e.ownerDocument || e) != C && P(e);
      var n = w.attrHandle[t.toLowerCase()],
        n = n && O.call(w.attrHandle, t.toLowerCase()) ? n(e, t, !H) : void 0;
      return void 0 !== n
        ? n
        : p.attributes || !H
          ? e.getAttribute(t)
          : (n = e.getAttributeNode(t)) && n.specified
            ? n.value
            : null;
    }),
    (ae.escape = function (e) {
      return (e + "").replace(re, h);
    }),
    (ae.error = function (e) {
      throw new Error("Syntax error, unrecognized expression: " + e);
    }),
    (ae.uniqueSort = function (e) {
      var t,
        n = [],
        i = 0,
        o = 0;
      if (
        ((c = !p.detectDuplicates),
        (l = !p.sortStable && e.slice(0)),
        e.sort(D),
        c)
      ) {
        for (; (t = e[o++]); ) t === e[o] && (i = n.push(o));
        for (; i--; ) e.splice(n[i], 1);
      }
      return ((l = null), e);
    }),
    (r = ae.getText =
      function (e) {
        var t,
          n = "",
          i = 0,
          o = e.nodeType;
        if (o) {
          if (1 === o || 9 === o || 11 === o) {
            if ("string" == typeof e.textContent) return e.textContent;
            for (e = e.firstChild; e; e = e.nextSibling) n += r(e);
          } else if (3 === o || 4 === o) return e.nodeValue;
        } else for (; (t = e[i++]); ) n += r(t);
        return n;
      }),
    ((w = ae.selectors =
      {
        cacheLength: 50,
        createPseudo: ce,
        match: Y,
        attrHandle: {},
        find: {},
        relative: {
          ">": { dir: "parentNode", first: !0 },
          " ": { dir: "parentNode" },
          "+": { dir: "previousSibling", first: !0 },
          "~": { dir: "previousSibling" },
        },
        preFilter: {
          ATTR: function (e) {
            return (
              (e[1] = e[1].replace(oe, d)),
              (e[3] = (e[3] || e[4] || e[5] || "").replace(oe, d)),
              "~=" === 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] || ae.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] && ae.error(e[0]),
              e
            );
          },
          PSEUDO: function (e) {
            var t,
              n = !e[6] && e[2];
            return Y.CHILD.test(e[0])
              ? null
              : (e[3]
                  ? (e[2] = e[4] || e[5] || "")
                  : n &&
                    G.test(n) &&
                    (t = f(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(oe, d).toLowerCase();
            return "*" === e
              ? function () {
                  return !0;
                }
              : function (e) {
                  return e.nodeName && e.nodeName.toLowerCase() === t;
                };
          },
          CLASS: function (e) {
            var t = I[e + " "];
            return (
              t ||
              ((t = new RegExp("(^|" + q + ")" + e + "(" + q + "|$)")) &&
                I(e, function (e) {
                  return t.test(
                    ("string" == typeof e.className && e.className) ||
                      (void 0 !== e.getAttribute && e.getAttribute("class")) ||
                      "",
                  );
                }))
            );
          },
          ATTR: function (t, n, i) {
            return function (e) {
              e = ae.attr(e, t);
              return null == e
                ? "!=" === n
                : !n ||
                    ((e += ""),
                    "=" === n
                      ? e === i
                      : "!=" === n
                        ? e !== i
                        : "^=" === n
                          ? i && 0 === e.indexOf(i)
                          : "*=" === n
                            ? i && -1 < e.indexOf(i)
                            : "$=" === n
                              ? i && e.slice(-i.length) === i
                              : "~=" === n
                                ? -1 <
                                  (" " + e.replace(_, " ") + " ").indexOf(i)
                                : "|=" === n &&
                                  (e === i ||
                                    e.slice(0, i.length + 1) === i + "-"));
            };
          },
          CHILD: function (f, e, t, g, m) {
            var v = "nth" !== f.slice(0, 3),
              b = "last" !== f.slice(-4),
              y = "of-type" === e;
            return 1 === g && 0 === m
              ? function (e) {
                  return !!e.parentNode;
                }
              : function (e, t, n) {
                  var i,
                    o,
                    r,
                    s,
                    a,
                    l,
                    c = v != b ? "nextSibling" : "previousSibling",
                    u = e.parentNode,
                    d = y && e.nodeName.toLowerCase(),
                    h = !n && !y,
                    p = !1;
                  if (u) {
                    if (v) {
                      for (; c; ) {
                        for (s = e; (s = s[c]); )
                          if (
                            y
                              ? s.nodeName.toLowerCase() === d
                              : 1 === s.nodeType
                          )
                            return !1;
                        l = c = "only" === f && !l && "nextSibling";
                      }
                      return !0;
                    }
                    if (((l = [b ? u.firstChild : u.lastChild]), b && h)) {
                      for (
                        p =
                          (a =
                            (i =
                              (o =
                                (r = (s = u)[T] || (s[T] = {}))[s.uniqueID] ||
                                (r[s.uniqueID] = {}))[f] || [])[0] === E &&
                            i[1]) && i[2],
                          s = a && u.childNodes[a];
                        (s = (++a && s && s[c]) || (p = a = 0) || l.pop());

                      )
                        if (1 === s.nodeType && ++p && s === e) {
                          o[f] = [E, a, p];
                          break;
                        }
                    } else if (
                      !1 ===
                      (p = h
                        ? (a =
                            (i =
                              (o =
                                (r = (s = e)[T] || (s[T] = {}))[s.uniqueID] ||
                                (r[s.uniqueID] = {}))[f] || [])[0] === E &&
                            i[1])
                        : p)
                    )
                      for (
                        ;
                        (s = (++a && s && s[c]) || (p = a = 0) || l.pop()) &&
                        ((y
                          ? s.nodeName.toLowerCase() !== d
                          : 1 !== s.nodeType) ||
                          !++p ||
                          (h &&
                            ((o =
                              (r = s[T] || (s[T] = {}))[s.uniqueID] ||
                              (r[s.uniqueID] = {}))[f] = [E, p]),
                          s !== e));

                      );
                    return (p -= m) === g || (p % g == 0 && 0 <= p / g);
                  }
                };
          },
          PSEUDO: function (e, r) {
            var t,
              s =
                w.pseudos[e] ||
                w.setFilters[e.toLowerCase()] ||
                ae.error("unsupported pseudo: " + e);
            return s[T]
              ? s(r)
              : 1 < s.length
                ? ((t = [e, e, "", r]),
                  w.setFilters.hasOwnProperty(e.toLowerCase())
                    ? ce(function (e, t) {
                        for (var n, i = s(e, r), o = i.length; o--; )
                          e[(n = $(e, i[o]))] = !(t[n] = i[o]);
                      })
                    : function (e) {
                        return s(e, 0, t);
                      })
                : s;
          },
        },
        pseudos: {
          not: ce(function (e) {
            var i = [],
              o = [],
              a = g(e.replace(U, "$1"));
            return a[T]
              ? ce(function (e, t, n, i) {
                  for (var o, r = a(e, null, i, []), s = e.length; s--; )
                    (o = r[s]) && (e[s] = !(t[s] = o));
                })
              : function (e, t, n) {
                  return (
                    (i[0] = e),
                    a(i, null, n, o),
                    (i[0] = null),
                    !o.pop()
                  );
                };
          }),
          has: ce(function (t) {
            return function (e) {
              return 0 < ae(t, e).length;
            };
          }),
          contains: ce(function (t) {
            return (
              (t = t.replace(oe, d)),
              function (e) {
                return -1 < (e.textContent || r(e)).indexOf(t);
              }
            );
          }),
          lang: ce(function (n) {
            return (
              J.test(n || "") || ae.error("unsupported lang: " + n),
              (n = n.replace(oe, d).toLowerCase()),
              function (e) {
                var t;
                do {
                  if (
                    (t = H
                      ? e.lang
                      : e.getAttribute("xml:lang") || e.getAttribute("lang"))
                  )
                    return (
                      (t = t.toLowerCase()) === n || 0 === t.indexOf(n + "-")
                    );
                } while ((e = e.parentNode) && 1 === e.nodeType);
                return !1;
              }
            );
          }),
          target: function (e) {
            var t = n.location && n.location.hash;
            return t && t.slice(1) === e.id;
          },
          root: function (e) {
            return e === s;
          },
          focus: function (e) {
            return (
              e === C.activeElement &&
              (!C.hasFocus || C.hasFocus()) &&
              !!(e.type || e.href || ~e.tabIndex)
            );
          },
          enabled: pe(!1),
          disabled: pe(!0),
          checked: function (e) {
            var t = e.nodeName.toLowerCase();
            return (
              ("input" === t && !!e.checked) || ("option" === t && !!e.selected)
            );
          },
          selected: function (e) {
            return (
              e.parentNode && e.parentNode.selectedIndex,
              !0 === e.selected
            );
          },
          empty: function (e) {
            for (e = e.firstChild; e; e = e.nextSibling)
              if (e.nodeType < 6) return !1;
            return !0;
          },
          parent: function (e) {
            return !w.pseudos.empty(e);
          },
          header: function (e) {
            return ee.test(e.nodeName);
          },
          input: function (e) {
            return Z.test(e.nodeName);
          },
          button: function (e) {
            var t = e.nodeName.toLowerCase();
            return ("input" === t && "button" === e.type) || "button" === t;
          },
          text: function (e) {
            return (
              "input" === e.nodeName.toLowerCase() &&
              "text" === e.type &&
              (null == (e = e.getAttribute("type")) ||
                "text" === e.toLowerCase())
            );
          },
          first: fe(function () {
            return [0];
          }),
          last: fe(function (e, t) {
            return [t - 1];
          }),
          eq: fe(function (e, t, n) {
            return [n < 0 ? n + t : n];
          }),
          even: fe(function (e, t) {
            for (var n = 0; n < t; n += 2) e.push(n);
            return e;
          }),
          odd: fe(function (e, t) {
            for (var n = 1; n < t; n += 2) e.push(n);
            return e;
          }),
          lt: fe(function (e, t, n) {
            for (var i = n < 0 ? n + t : t < n ? t : n; 0 <= --i; ) e.push(i);
            return e;
          }),
          gt: fe(function (e, t, n) {
            for (var i = n < 0 ? n + t : n; ++i < t; ) e.push(i);
            return e;
          }),
        },
      }).pseudos.nth = w.pseudos.eq),
    { radio: !0, checkbox: !0, file: !0, password: !0, image: !0 }))
      w.pseudos[e] = (function (t) {
        return function (e) {
          return "input" === e.nodeName.toLowerCase() && e.type === t;
        };
      })(e);
    for (e in { submit: !0, reset: !0 })
      w.pseudos[e] = (function (n) {
        return function (e) {
          var t = e.nodeName.toLowerCase();
          return ("input" === t || "button" === t) && e.type === n;
        };
      })(e);
    function me() {}
    function ve(e) {
      for (var t = 0, n = e.length, i = ""; t < n; t++) i += e[t].value;
      return i;
    }
    function be(s, e, t) {
      var a = e.dir,
        l = e.next,
        c = l || a,
        u = t && "parentNode" === c,
        d = S++;
      return e.first
        ? function (e, t, n) {
            for (; (e = e[a]); ) if (1 === e.nodeType || u) return s(e, t, n);
            return !1;
          }
        : function (e, t, n) {
            var i,
              o,
              r = [E, d];
            if (n) {
              for (; (e = e[a]); )
                if ((1 === e.nodeType || u) && s(e, t, n)) return !0;
            } else
              for (; (e = e[a]); )
                if (1 === e.nodeType || u)
                  if (
                    ((i =
                      (o = e[T] || (e[T] = {}))[e.uniqueID] ||
                      (o[e.uniqueID] = {})),
                    l && l === e.nodeName.toLowerCase())
                  )
                    e = e[a] || e;
                  else {
                    if ((o = i[c]) && o[0] === E && o[1] === d)
                      return (r[2] = o[2]);
                    if (((i[c] = r)[2] = s(e, t, n))) return !0;
                  }
            return !1;
          };
    }
    function ye(o) {
      return 1 < o.length
        ? function (e, t, n) {
            for (var i = o.length; i--; ) if (!o[i](e, t, n)) return !1;
            return !0;
          }
        : o[0];
    }
    function we(e, t, n, i, o) {
      for (var r, s = [], a = 0, l = e.length, c = null != t; a < l; a++)
        (r = e[a]) && ((n && !n(r, i, o)) || (s.push(r), c && t.push(a)));
      return s;
    }
    function xe(e) {
      for (
        var i,
          t,
          n,
          o = e.length,
          r = w.relative[e[0].type],
          s = r || w.relative[" "],
          a = r ? 1 : 0,
          l = be(
            function (e) {
              return e === i;
            },
            s,
            !0,
          ),
          c = be(
            function (e) {
              return -1 < $(i, e);
            },
            s,
            !0,
          ),
          u = [
            function (e, t, n) {
              n = (!r && (n || t !== x)) || ((i = t).nodeType ? l : c)(e, t, n);
              return ((i = null), n);
            },
          ];
        a < o;
        a++
      )
        if ((t = w.relative[e[a].type])) u = [be(ye(u), t)];
        else {
          if ((t = w.filter[e[a].type].apply(null, e[a].matches))[T]) {
            for (n = ++a; n < o && !w.relative[e[n].type]; n++);
            return (function e(p, f, g, m, v, t) {
              return (
                m && !m[T] && (m = e(m)),
                v && !v[T] && (v = e(v, t)),
                ce(function (e, t, n, i) {
                  var o,
                    r,
                    s,
                    a = [],
                    l = [],
                    c = t.length,
                    u =
                      e ||
                      (function (e, t, n) {
                        for (var i = 0, o = t.length; i < o; i++)
                          ae(e, t[i], n);
                        return n;
                      })(f || "*", n.nodeType ? [n] : n, []),
                    d = !p || (!e && f) ? u : we(u, a, p, n, i),
                    h = g ? (v || (e ? p : c || m) ? [] : t) : d;
                  if ((g && g(d, h, n, i), m))
                    for (o = we(h, l), m(o, [], n, i), r = o.length; r--; )
                      (s = o[r]) && (h[l[r]] = !(d[l[r]] = s));
                  if (e) {
                    if (v || p) {
                      if (v) {
                        for (o = [], r = h.length; r--; )
                          (s = h[r]) && o.push((d[r] = s));
                        v(null, (h = []), o, i);
                      }
                      for (r = h.length; r--; )
                        (s = h[r]) &&
                          -1 < (o = v ? $(e, s) : a[r]) &&
                          (e[o] = !(t[o] = s));
                    }
                  } else
                    ((h = we(h === t ? h.splice(c, h.length) : h)),
                      v ? v(null, t, h, i) : F.apply(t, h));
                })
              );
            })(
              1 < a && ye(u),
              1 < a &&
                ve(
                  e
                    .slice(0, a - 1)
                    .concat({ value: " " === e[a - 2].type ? "*" : "" }),
                ).replace(U, "$1"),
              t,
              a < n && xe(e.slice(a, n)),
              n < o && xe((e = e.slice(n))),
              n < o && ve(e),
            );
          }
          u.push(t);
        }
      return ye(u);
    }
    return (
      (me.prototype = w.filters = w.pseudos),
      (w.setFilters = new me()),
      (f = ae.tokenize =
        function (e, t) {
          var n,
            i,
            o,
            r,
            s,
            a,
            l,
            c = A[e + " "];
          if (c) return t ? 0 : c.slice(0);
          for (s = e, a = [], l = w.preFilter; s; ) {
            for (r in ((n && !(i = Q.exec(s))) ||
              (i && (s = s.slice(i[0].length) || s), a.push((o = []))),
            (n = !1),
            (i = V.exec(s)) &&
              ((n = i.shift()),
              o.push({ value: n, type: i[0].replace(U, " ") }),
              (s = s.slice(n.length))),
            w.filter))
              !(i = Y[r].exec(s)) ||
                (l[r] && !(i = l[r](i))) ||
                ((n = i.shift()),
                o.push({ value: n, type: r, matches: i }),
                (s = s.slice(n.length)));
            if (!n) break;
          }
          return t ? s.length : s ? ae.error(e) : A(e, a).slice(0);
        }),
      (g = ae.compile =
        function (e, t) {
          var n,
            m,
            v,
            b,
            y,
            i,
            o = [],
            r = [],
            s = k[e + " "];
          if (!s) {
            for (n = (t = t || f(e)).length; n--; )
              ((s = xe(t[n]))[T] ? o : r).push(s);
            (s = k(
              e,
              ((b = 0 < (v = o).length),
              (y = 0 < (m = r).length),
              (i = function (e, t, n, i, o) {
                var r,
                  s,
                  a,
                  l = 0,
                  c = "0",
                  u = e && [],
                  d = [],
                  h = x,
                  p = e || (y && w.find.TAG("*", o)),
                  f = (E += null == h ? 1 : Math.random() || 0.1),
                  g = p.length;
                for (
                  o && (x = t == C || t || o);
                  c !== g && null != (r = p[c]);
                  c++
                ) {
                  if (y && r) {
                    for (
                      s = 0, t || r.ownerDocument == C || (P(r), (n = !H));
                      (a = m[s++]);

                    )
                      if (a(r, t || C, n)) {
                        i.push(r);
                        break;
                      }
                    o && (E = f);
                  }
                  b && ((r = !a && r) && l--, e && u.push(r));
                }
                if (((l += c), b && c !== l)) {
                  for (s = 0; (a = v[s++]); ) a(u, d, t, n);
                  if (e) {
                    if (0 < l) for (; c--; ) u[c] || d[c] || (d[c] = j.call(i));
                    d = we(d);
                  }
                  (F.apply(i, d),
                    o &&
                      !e &&
                      0 < d.length &&
                      1 < l + v.length &&
                      ae.uniqueSort(i));
                }
                return (o && ((E = f), (x = h)), u);
              }),
              b ? ce(i) : i),
            )).selector = e;
          }
          return s;
        }),
      (m = ae.select =
        function (e, t, n, i) {
          var o,
            r,
            s,
            a,
            l,
            c = "function" == typeof e && e,
            u = !i && f((e = c.selector || e));
          if (((n = n || []), 1 === u.length)) {
            if (
              2 < (r = u[0] = u[0].slice(0)).length &&
              "ID" === (s = r[0]).type &&
              9 === t.nodeType &&
              H &&
              w.relative[r[1].type]
            ) {
              if (!(t = (w.find.ID(s.matches[0].replace(oe, d), t) || [])[0]))
                return n;
              (c && (t = t.parentNode), (e = e.slice(r.shift().value.length)));
            }
            for (
              o = Y.needsContext.test(e) ? 0 : r.length;
              o-- && ((s = r[o]), !w.relative[(a = s.type)]);

            )
              if (
                (l = w.find[a]) &&
                (i = l(
                  s.matches[0].replace(oe, d),
                  (ie.test(r[0].type) && ge(t.parentNode)) || t,
                ))
              ) {
                if ((r.splice(o, 1), !(e = i.length && ve(r))))
                  return (F.apply(n, i), n);
                break;
              }
          }
          return (
            (c || g(e, u))(
              i,
              t,
              !H,
              n,
              !t || (ie.test(e) && ge(t.parentNode)) || t,
            ),
            n
          );
        }),
      (p.sortStable = T.split("").sort(D).join("") === T),
      (p.detectDuplicates = !!c),
      P(),
      (p.sortDetached = ue(function (e) {
        return 1 & e.compareDocumentPosition(C.createElement("fieldset"));
      })),
      ue(function (e) {
        return (
          (e.innerHTML = "<a href='#'></a>"),
          "#" === e.firstChild.getAttribute("href")
        );
      }) ||
        de("type|href|height|width", function (e, t, n) {
          if (!n) return e.getAttribute(t, "type" === t.toLowerCase() ? 1 : 2);
        }),
      (p.attributes &&
        ue(function (e) {
          return (
            (e.innerHTML = "<input/>"),
            e.firstChild.setAttribute("value", ""),
            "" === e.firstChild.getAttribute("value")
          );
        })) ||
        de("value", function (e, t, n) {
          if (!n && "input" === e.nodeName.toLowerCase()) return e.defaultValue;
        }),
      ue(function (e) {
        return null == e.getAttribute("disabled");
      }) ||
        de(M, function (e, t, n) {
          if (!n)
            return !0 === e[t]
              ? t.toLowerCase()
              : (t = e.getAttributeNode(t)) && t.specified
                ? t.value
                : null;
        }),
      ae
    );
  })(P);
  ((H.find = p),
    (H.expr = p.selectors),
    (H.expr[":"] = H.expr.pseudos),
    (H.uniqueSort = H.unique = p.uniqueSort),
    (H.text = p.getText),
    (H.isXMLDoc = p.isXML),
    (H.contains = p.contains),
    (H.escapeSelector = p.escape));
  function x(e, t, n) {
    for (var i = [], o = void 0 !== n; (e = e[t]) && 9 !== e.nodeType; )
      if (1 === e.nodeType) {
        if (o && H(e).is(n)) break;
        i.push(e);
      }
    return i;
  }
  function T(e, t) {
    for (var n = []; e; e = e.nextSibling)
      1 === e.nodeType && e !== t && n.push(e);
    return n;
  }
  var E = H.expr.match.needsContext;
  function S(e, t) {
    return e.nodeName && e.nodeName.toLowerCase() === t.toLowerCase();
  }
  var I = /^<([a-z][^\/\0>:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i;
  function A(e, n, i) {
    return g(n)
      ? H.grep(e, function (e, t) {
          return !!n.call(e, t, e) !== i;
        })
      : n.nodeType
        ? H.grep(e, function (e) {
            return (e === n) !== i;
          })
        : "string" != typeof n
          ? H.grep(e, function (e) {
              return -1 < o.call(n, e) !== i;
            })
          : H.filter(n, e, i);
  }
  ((H.filter = function (e, t, n) {
    var i = t[0];
    return (
      n && (e = ":not(" + e + ")"),
      1 === t.length && 1 === i.nodeType
        ? H.find.matchesSelector(i, e)
          ? [i]
          : []
        : H.find.matches(
            e,
            H.grep(t, function (e) {
              return 1 === e.nodeType;
            }),
          )
    );
  }),
    H.fn.extend({
      find: function (e) {
        var t,
          n,
          i = this.length,
          o = this;
        if ("string" != typeof e)
          return this.pushStack(
            H(e).filter(function () {
              for (t = 0; t < i; t++) if (H.contains(o[t], this)) return !0;
            }),
          );
        for (n = this.pushStack([]), t = 0; t < i; t++) H.find(e, o[t], n);
        return 1 < i ? H.uniqueSort(n) : n;
      },
      filter: function (e) {
        return this.pushStack(A(this, e || [], !1));
      },
      not: function (e) {
        return this.pushStack(A(this, e || [], !0));
      },
      is: function (e) {
        return !!A(this, "string" == typeof e && E.test(e) ? H(e) : e || [], !1)
          .length;
      },
    }));
  var k = /^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]+))$/;
  (H.fn.init = function (e, t, n) {
    if (!e) return this;
    if (((n = n || L), "string" != typeof e))
      return e.nodeType
        ? ((this[0] = e), (this.length = 1), this)
        : g(e)
          ? void 0 !== n.ready
            ? n.ready(e)
            : e(H)
          : H.makeArray(e, this);
    if (
      !(i =
        "<" === e[0] && ">" === e[e.length - 1] && 3 <= e.length
          ? [null, e, null]
          : k.exec(e)) ||
      (!i[1] && t)
    )
      return (!t || t.jquery ? t || n : this.constructor(t)).find(e);
    if (i[1]) {
      if (
        ((t = t instanceof H ? t[0] : t),
        H.merge(
          this,
          H.parseHTML(i[1], t && t.nodeType ? t.ownerDocument || t : C, !0),
        ),
        I.test(i[1]) && H.isPlainObject(t))
      )
        for (var i in t) g(this[i]) ? this[i](t[i]) : this.attr(i, t[i]);
      return this;
    }
    return (
      (e = C.getElementById(i[2])) && ((this[0] = e), (this.length = 1)),
      this
    );
  }).prototype = H.fn;
  var L = H(C),
    D = /^(?:parents|prev(?:Until|All))/,
    O = { children: !0, contents: !0, next: !0, prev: !0 };
  function j(e, t) {
    for (; (e = e[t]) && 1 !== e.nodeType; );
    return e;
  }
  (H.fn.extend({
    has: function (e) {
      var t = H(e, this),
        n = t.length;
      return this.filter(function () {
        for (var e = 0; e < n; e++) if (H.contains(this, t[e])) return !0;
      });
    },
    closest: function (e, t) {
      var n,
        i = 0,
        o = this.length,
        r = [],
        s = "string" != typeof e && H(e);
      if (!E.test(e))
        for (; i < o; i++)
          for (n = this[i]; n && n !== t; n = n.parentNode)
            if (
              n.nodeType < 11 &&
              (s
                ? -1 < s.index(n)
                : 1 === n.nodeType && H.find.matchesSelector(n, e))
            ) {
              r.push(n);
              break;
            }
      return this.pushStack(1 < r.length ? H.uniqueSort(r) : r);
    },
    index: function (e) {
      return e
        ? "string" == typeof e
          ? o.call(H(e), this[0])
          : o.call(this, e.jquery ? e[0] : e)
        : this[0] && this[0].parentNode
          ? this.first().prevAll().length
          : -1;
    },
    add: function (e, t) {
      return this.pushStack(H.uniqueSort(H.merge(this.get(), H(e, t))));
    },
    addBack: function (e) {
      return this.add(null == e ? this.prevObject : this.prevObject.filter(e));
    },
  }),
    H.each(
      {
        parent: function (e) {
          e = e.parentNode;
          return e && 11 !== e.nodeType ? e : null;
        },
        parents: function (e) {
          return x(e, "parentNode");
        },
        parentsUntil: function (e, t, n) {
          return x(e, "parentNode", n);
        },
        next: function (e) {
          return j(e, "nextSibling");
        },
        prev: function (e) {
          return j(e, "previousSibling");
        },
        nextAll: function (e) {
          return x(e, "nextSibling");
        },
        prevAll: function (e) {
          return x(e, "previousSibling");
        },
        nextUntil: function (e, t, n) {
          return x(e, "nextSibling", n);
        },
        prevUntil: function (e, t, n) {
          return x(e, "previousSibling", n);
        },
        siblings: function (e) {
          return T((e.parentNode || {}).firstChild, e);
        },
        children: function (e) {
          return T(e.firstChild);
        },
        contents: function (e) {
          return null != e.contentDocument && n(e.contentDocument)
            ? e.contentDocument
            : (S(e, "template") && (e = e.content || e),
              H.merge([], e.childNodes));
        },
      },
      function (i, o) {
        H.fn[i] = function (e, t) {
          var n = H.map(this, o, e);
          return (
            (t = "Until" !== i.slice(-5) ? e : t) &&
              "string" == typeof t &&
              (n = H.filter(t, n)),
            1 < this.length &&
              (O[i] || H.uniqueSort(n), D.test(i) && n.reverse()),
            this.pushStack(n)
          );
        };
      },
    ));
  var R = /[^\x20\t\r\n\f]+/g;
  function F(e) {
    return e;
  }
  function N(e) {
    throw e;
  }
  function $(e, t, n, i) {
    var o;
    try {
      e && g((o = e.promise))
        ? o.call(e).done(t).fail(n)
        : e && g((o = e.then))
          ? o.call(e, t, n)
          : t.apply(void 0, [e].slice(i));
    } catch (e) {
      n.apply(void 0, [e]);
    }
  }
  ((H.Callbacks = function (i) {
    var e, n;
    i =
      "string" == typeof i
        ? ((e = i),
          (n = {}),
          H.each(e.match(R) || [], function (e, t) {
            n[t] = !0;
          }),
          n)
        : H.extend({}, i);
    function o() {
      for (a = a || i.once, s = r = !0; c.length; u = -1)
        for (t = c.shift(); ++u < l.length; )
          !1 === l[u].apply(t[0], t[1]) &&
            i.stopOnFalse &&
            ((u = l.length), (t = !1));
      (i.memory || (t = !1), (r = !1), a && (l = t ? [] : ""));
    }
    var r,
      t,
      s,
      a,
      l = [],
      c = [],
      u = -1,
      d = {
        add: function () {
          return (
            l &&
              (t && !r && ((u = l.length - 1), c.push(t)),
              (function n(e) {
                H.each(e, function (e, t) {
                  g(t)
                    ? (i.unique && d.has(t)) || l.push(t)
                    : t && t.length && "string" !== f(t) && n(t);
                });
              })(arguments),
              t && !r && o()),
            this
          );
        },
        remove: function () {
          return (
            H.each(arguments, function (e, t) {
              for (var n; -1 < (n = H.inArray(t, l, n)); )
                (l.splice(n, 1), n <= u && u--);
            }),
            this
          );
        },
        has: function (e) {
          return e ? -1 < H.inArray(e, l) : 0 < l.length;
        },
        empty: function () {
          return ((l = l && []), this);
        },
        disable: function () {
          return ((a = c = []), (l = t = ""), this);
        },
        disabled: function () {
          return !l;
        },
        lock: function () {
          return ((a = c = []), t || r || (l = t = ""), this);
        },
        locked: function () {
          return !!a;
        },
        fireWith: function (e, t) {
          return (
            a ||
              ((t = [e, (t = t || []).slice ? t.slice() : t]),
              c.push(t),
              r || o()),
            this
          );
        },
        fire: function () {
          return (d.fireWith(this, arguments), this);
        },
        fired: function () {
          return !!s;
        },
      };
    return d;
  }),
    H.extend({
      Deferred: function (e) {
        var r = [
            [
              "notify",
              "progress",
              H.Callbacks("memory"),
              H.Callbacks("memory"),
              2,
            ],
            [
              "resolve",
              "done",
              H.Callbacks("once memory"),
              H.Callbacks("once memory"),
              0,
              "resolved",
            ],
            [
              "reject",
              "fail",
              H.Callbacks("once memory"),
              H.Callbacks("once memory"),
              1,
              "rejected",
            ],
          ],
          o = "pending",
          s = {
            state: function () {
              return o;
            },
            always: function () {
              return (a.done(arguments).fail(arguments), this);
            },
            catch: function (e) {
              return s.then(null, e);
            },
            pipe: function () {
              var o = arguments;
              return H.Deferred(function (i) {
                (H.each(r, function (e, t) {
                  var n = g(o[t[4]]) && o[t[4]];
                  a[t[1]](function () {
                    var e = n && n.apply(this, arguments);
                    e && g(e.promise)
                      ? e
                          .promise()
                          .progress(i.notify)
                          .done(i.resolve)
                          .fail(i.reject)
                      : i[t[0] + "With"](this, n ? [e] : arguments);
                  });
                }),
                  (o = null));
              }).promise();
            },
            then: function (t, n, i) {
              var l = 0;
              function c(o, r, s, a) {
                return function () {
                  function e() {
                    var e, t;
                    if (!(o < l)) {
                      if ((e = s.apply(n, i)) === r.promise())
                        throw new TypeError("Thenable self-resolution");
                      ((t =
                        e &&
                        ("object" == typeof e || "function" == typeof e) &&
                        e.then),
                        g(t)
                          ? a
                            ? t.call(e, c(l, r, F, a), c(l, r, N, a))
                            : (l++,
                              t.call(
                                e,
                                c(l, r, F, a),
                                c(l, r, N, a),
                                c(l, r, F, r.notifyWith),
                              ))
                          : (s !== F && ((n = void 0), (i = [e])),
                            (a || r.resolveWith)(n, i)));
                    }
                  }
                  var n = this,
                    i = arguments,
                    t = a
                      ? e
                      : function () {
                          try {
                            e();
                          } catch (e) {
                            (H.Deferred.exceptionHook &&
                              H.Deferred.exceptionHook(e, t.stackTrace),
                              l <= o + 1 &&
                                (s !== N && ((n = void 0), (i = [e])),
                                r.rejectWith(n, i)));
                          }
                        };
                  o
                    ? t()
                    : (H.Deferred.getStackHook &&
                        (t.stackTrace = H.Deferred.getStackHook()),
                      P.setTimeout(t));
                };
              }
              return H.Deferred(function (e) {
                (r[0][3].add(c(0, e, g(i) ? i : F, e.notifyWith)),
                  r[1][3].add(c(0, e, g(t) ? t : F)),
                  r[2][3].add(c(0, e, g(n) ? n : N)));
              }).promise();
            },
            promise: function (e) {
              return null != e ? H.extend(e, s) : s;
            },
          },
          a = {};
        return (
          H.each(r, function (e, t) {
            var n = t[2],
              i = t[5];
            ((s[t[1]] = n.add),
              i &&
                n.add(
                  function () {
                    o = i;
                  },
                  r[3 - e][2].disable,
                  r[3 - e][3].disable,
                  r[0][2].lock,
                  r[0][3].lock,
                ),
              n.add(t[3].fire),
              (a[t[0]] = function () {
                return (
                  a[t[0] + "With"](this === a ? void 0 : this, arguments),
                  this
                );
              }),
              (a[t[0] + "With"] = n.fireWith));
          }),
          s.promise(a),
          e && e.call(a, a),
          a
        );
      },
      when: function (e) {
        function t(t) {
          return function (e) {
            ((o[t] = this),
              (r[t] = 1 < arguments.length ? a.call(arguments) : e),
              --n || s.resolveWith(o, r));
          };
        }
        var n = arguments.length,
          i = n,
          o = Array(i),
          r = a.call(arguments),
          s = H.Deferred();
        if (
          n <= 1 &&
          ($(e, s.done(t(i)).resolve, s.reject, !n),
          "pending" === s.state() || g(r[i] && r[i].then))
        )
          return s.then();
        for (; i--; ) $(r[i], t(i), s.reject);
        return s.promise();
      },
    }));
  var M = /^(Eval|Internal|Range|Reference|Syntax|Type|URI)Error$/;
  ((H.Deferred.exceptionHook = function (e, t) {
    P.console &&
      P.console.warn &&
      e &&
      M.test(e.name) &&
      P.console.warn("jQuery.Deferred exception: " + e.message, e.stack, t);
  }),
    (H.readyException = function (e) {
      P.setTimeout(function () {
        throw e;
      });
    }));
  var q = H.Deferred();
  function W() {
    (C.removeEventListener("DOMContentLoaded", W),
      P.removeEventListener("load", W),
      H.ready());
  }
  ((H.fn.ready = function (e) {
    return (
      q.then(e).catch(function (e) {
        H.readyException(e);
      }),
      this
    );
  }),
    H.extend({
      isReady: !1,
      readyWait: 1,
      ready: function (e) {
        (!0 === e ? --H.readyWait : H.isReady) ||
          ((H.isReady = !0) !== e && 0 < --H.readyWait) ||
          q.resolveWith(C, [H]);
      },
    }),
    (H.ready.then = q.then),
    "complete" === C.readyState ||
    ("loading" !== C.readyState && !C.documentElement.doScroll)
      ? P.setTimeout(H.ready)
      : (C.addEventListener("DOMContentLoaded", W),
        P.addEventListener("load", W)));
  function B(e, t, n, i, o, r, s) {
    var a = 0,
      l = e.length,
      c = null == n;
    if ("object" === f(n)) for (a in ((o = !0), n)) B(e, t, a, n[a], !0, r, s);
    else if (
      void 0 !== i &&
      ((o = !0),
      g(i) || (s = !0),
      (t = c
        ? s
          ? (t.call(e, i), null)
          : ((c = t),
            function (e, t, n) {
              return c.call(H(e), n);
            })
        : t))
    )
      for (; a < l; a++) t(e[a], n, s ? i : i.call(e[a], a, t(e[a], n)));
    return o ? e : c ? t.call(e) : l ? t(e[0], n) : r;
  }
  var z = /^-ms-/,
    _ = /-([a-z])/g;
  function U(e, t) {
    return t.toUpperCase();
  }
  function Q(e) {
    return e.replace(z, "ms-").replace(_, U);
  }
  function V(e) {
    return 1 === e.nodeType || 9 === e.nodeType || !+e.nodeType;
  }
  function X() {
    this.expando = H.expando + X.uid++;
  }
  ((X.uid = 1),
    (X.prototype = {
      cache: function (e) {
        var t = e[this.expando];
        return (
          t ||
            ((t = {}),
            V(e) &&
              (e.nodeType
                ? (e[this.expando] = t)
                : Object.defineProperty(e, this.expando, {
                    value: t,
                    configurable: !0,
                  }))),
          t
        );
      },
      set: function (e, t, n) {
        var i,
          o = this.cache(e);
        if ("string" == typeof t) o[Q(t)] = n;
        else for (i in t) o[Q(i)] = t[i];
        return o;
      },
      get: function (e, t) {
        return void 0 === t
          ? this.cache(e)
          : e[this.expando] && e[this.expando][Q(t)];
      },
      access: function (e, t, n) {
        return void 0 === t || (t && "string" == typeof t && void 0 === n)
          ? this.get(e, t)
          : (this.set(e, t, n), void 0 !== n ? n : t);
      },
      remove: function (e, t) {
        var n,
          i = e[this.expando];
        if (void 0 !== i) {
          if (void 0 !== t) {
            n = (t = Array.isArray(t)
              ? t.map(Q)
              : (t = Q(t)) in i
                ? [t]
                : t.match(R) || []).length;
            for (; n--; ) delete i[t[n]];
          }
          (void 0 !== t && !H.isEmptyObject(i)) ||
            (e.nodeType ? (e[this.expando] = void 0) : delete e[this.expando]);
        }
      },
      hasData: function (e) {
        e = e[this.expando];
        return void 0 !== e && !H.isEmptyObject(e);
      },
    }));
  var G = new X(),
    J = new X(),
    Y = /^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,
    K = /[A-Z]/g;
  function Z(e, t, n) {
    var i, o;
    if (void 0 === n && 1 === e.nodeType)
      if (
        ((i = "data-" + t.replace(K, "-$&").toLowerCase()),
        "string" == typeof (n = e.getAttribute(i)))
      ) {
        try {
          n =
            "true" === (o = n) ||
            ("false" !== o &&
              ("null" === o
                ? null
                : o === +o + ""
                  ? +o
                  : Y.test(o)
                    ? JSON.parse(o)
                    : o));
        } catch (e) {}
        J.set(e, t, n);
      } else n = void 0;
    return n;
  }
  (H.extend({
    hasData: function (e) {
      return J.hasData(e) || G.hasData(e);
    },
    data: function (e, t, n) {
      return J.access(e, t, n);
    },
    removeData: function (e, t) {
      J.remove(e, t);
    },
    _data: function (e, t, n) {
      return G.access(e, t, n);
    },
    _removeData: function (e, t) {
      G.remove(e, t);
    },
  }),
    H.fn.extend({
      data: function (n, e) {
        var t,
          i,
          o,
          r = this[0],
          s = r && r.attributes;
        if (void 0 !== n)
          return "object" == typeof n
            ? this.each(function () {
                J.set(this, n);
              })
            : B(
                this,
                function (e) {
                  var t;
                  return r && void 0 === e
                    ? void 0 !== (t = J.get(r, n)) || void 0 !== (t = Z(r, n))
                      ? t
                      : void 0
                    : void this.each(function () {
                        J.set(this, n, e);
                      });
                },
                null,
                e,
                1 < arguments.length,
                null,
                !0,
              );
        if (
          this.length &&
          ((o = J.get(r)), 1 === r.nodeType && !G.get(r, "hasDataAttrs"))
        ) {
          for (t = s.length; t--; )
            s[t] &&
              0 === (i = s[t].name).indexOf("data-") &&
              ((i = Q(i.slice(5))), Z(r, i, o[i]));
          G.set(r, "hasDataAttrs", !0);
        }
        return o;
      },
      removeData: function (e) {
        return this.each(function () {
          J.remove(this, e);
        });
      },
    }),
    H.extend({
      queue: function (e, t, n) {
        var i;
        if (e)
          return (
            (i = G.get(e, (t = (t || "fx") + "queue"))),
            n &&
              (!i || Array.isArray(n)
                ? (i = G.access(e, t, H.makeArray(n)))
                : i.push(n)),
            i || []
          );
      },
      dequeue: function (e, t) {
        t = t || "fx";
        var n = H.queue(e, t),
          i = n.length,
          o = n.shift(),
          r = H._queueHooks(e, t);
        ("inprogress" === o && ((o = n.shift()), i--),
          o &&
            ("fx" === t && n.unshift("inprogress"),
            delete r.stop,
            o.call(
              e,
              function () {
                H.dequeue(e, t);
              },
              r,
            )),
          !i && r && r.empty.fire());
      },
      _queueHooks: function (e, t) {
        var n = t + "queueHooks";
        return (
          G.get(e, n) ||
          G.access(e, n, {
            empty: H.Callbacks("once memory").add(function () {
              G.remove(e, [t + "queue", n]);
            }),
          })
        );
      },
    }),
    H.fn.extend({
      queue: function (t, n) {
        var e = 2;
        return (
          "string" != typeof t && ((n = t), (t = "fx"), e--),
          arguments.length < e
            ? H.queue(this[0], t)
            : void 0 === n
              ? this
              : this.each(function () {
                  var e = H.queue(this, t, n);
                  (H._queueHooks(this, t),
                    "fx" === t && "inprogress" !== e[0] && H.dequeue(this, t));
                })
        );
      },
      dequeue: function (e) {
        return this.each(function () {
          H.dequeue(this, e);
        });
      },
      clearQueue: function (e) {
        return this.queue(e || "fx", []);
      },
      promise: function (e, t) {
        function n() {
          --o || r.resolveWith(s, [s]);
        }
        var i,
          o = 1,
          r = H.Deferred(),
          s = this,
          a = this.length;
        for (
          "string" != typeof e && ((t = e), (e = void 0)), e = e || "fx";
          a--;

        )
          (i = G.get(s[a], e + "queueHooks")) &&
            i.empty &&
            (o++, i.empty.add(n));
        return (n(), r.promise(t));
      },
    }));
  var ee = /[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,
    te = new RegExp("^(?:([+-])=|)(" + ee + ")([a-z%]*)$", "i"),
    ne = ["Top", "Right", "Bottom", "Left"],
    ie = C.documentElement,
    oe = function (e) {
      return H.contains(e.ownerDocument, e);
    },
    re = { composed: !0 };
  ie.getRootNode &&
    (oe = function (e) {
      return (
        H.contains(e.ownerDocument, e) || e.getRootNode(re) === e.ownerDocument
      );
    });
  function se(e, t) {
    return (
      "none" === (e = t || e).style.display ||
      ("" === e.style.display && oe(e) && "none" === H.css(e, "display"))
    );
  }
  function ae(e, t, n, i) {
    var o,
      r,
      s = 20,
      a = i
        ? function () {
            return i.cur();
          }
        : function () {
            return H.css(e, t, "");
          },
      l = a(),
      c = (n && n[3]) || (H.cssNumber[t] ? "" : "px"),
      u =
        e.nodeType &&
        (H.cssNumber[t] || ("px" !== c && +l)) &&
        te.exec(H.css(e, t));
    if (u && u[3] !== c) {
      for (c = c || u[3], u = +(l /= 2) || 1; s--; )
        (H.style(e, t, u + c),
          (1 - r) * (1 - (r = a() / l || 0.5)) <= 0 && (s = 0),
          (u /= r));
      (H.style(e, t, (u *= 2) + c), (n = n || []));
    }
    return (
      n &&
        ((u = +u || +l || 0),
        (o = n[1] ? u + (n[1] + 1) * n[2] : +n[2]),
        i && ((i.unit = c), (i.start = u), (i.end = o))),
      o
    );
  }
  var le = {};
  function ce(e, t) {
    for (var n, i, o, r, s, a, l = [], c = 0, u = e.length; c < u; c++)
      (i = e[c]).style &&
        ((n = i.style.display),
        t
          ? ("none" === n &&
              ((l[c] = G.get(i, "display") || null),
              l[c] || (i.style.display = "")),
            "" === i.style.display &&
              se(i) &&
              (l[c] =
                ((a = r = o = void 0),
                (r = i.ownerDocument),
                (s = i.nodeName),
                (a = le[s]) ||
                  ((o = r.body.appendChild(r.createElement(s))),
                  (a = H.css(o, "display")),
                  o.parentNode.removeChild(o),
                  (le[s] = a = "none" === a ? "block" : a)))))
          : "none" !== n && ((l[c] = "none"), G.set(i, "display", n)));
    for (c = 0; c < u; c++) null != l[c] && (e[c].style.display = l[c]);
    return e;
  }
  H.fn.extend({
    show: function () {
      return ce(this, !0);
    },
    hide: function () {
      return ce(this);
    },
    toggle: function (e) {
      return "boolean" == typeof e
        ? e
          ? this.show()
          : this.hide()
        : this.each(function () {
            se(this) ? H(this).show() : H(this).hide();
          });
    },
  });
  var ue = /^(?:checkbox|radio)$/i,
    de = /<([a-z][^\/\0>\x20\t\r\n\f]*)/i,
    he = /^$|^module$|\/(?:java|ecma)script/i,
    d = C.createDocumentFragment().appendChild(C.createElement("div"));
  ((p = C.createElement("input")).setAttribute("type", "radio"),
    p.setAttribute("checked", "checked"),
    p.setAttribute("name", "t"),
    d.appendChild(p),
    (y.checkClone = d.cloneNode(!0).cloneNode(!0).lastChild.checked),
    (d.innerHTML = "<textarea>x</textarea>"),
    (y.noCloneChecked = !!d.cloneNode(!0).lastChild.defaultValue),
    (d.innerHTML = "<option></option>"),
    (y.option = !!d.lastChild));
  var pe = {
    thead: [1, "<table>", "</table>"],
    col: [2, "<table><colgroup>", "</colgroup></table>"],
    tr: [2, "<table><tbody>", "</tbody></table>"],
    td: [3, "<table><tbody><tr>", "</tr></tbody></table>"],
    _default: [0, "", ""],
  };
  function fe(e, t) {
    var n =
      void 0 !== e.getElementsByTagName
        ? e.getElementsByTagName(t || "*")
        : void 0 !== e.querySelectorAll
          ? e.querySelectorAll(t || "*")
          : [];
    return void 0 === t || (t && S(e, t)) ? H.merge([e], n) : n;
  }
  function ge(e, t) {
    for (var n = 0, i = e.length; n < i; n++)
      G.set(e[n], "globalEval", !t || G.get(t[n], "globalEval"));
  }
  ((pe.tbody = pe.tfoot = pe.colgroup = pe.caption = pe.thead),
    (pe.th = pe.td),
    y.option ||
      (pe.optgroup = pe.option =
        [1, "<select multiple='multiple'>", "</select>"]));
  var me = /<|&#?\w+;/;
  function ve(e, t, n, i, o) {
    for (
      var r,
        s,
        a,
        l,
        c,
        u = t.createDocumentFragment(),
        d = [],
        h = 0,
        p = e.length;
      h < p;
      h++
    )
      if ((r = e[h]) || 0 === r)
        if ("object" === f(r)) H.merge(d, r.nodeType ? [r] : r);
        else if (me.test(r)) {
          for (
            s = s || u.appendChild(t.createElement("div")),
              a = (de.exec(r) || ["", ""])[1].toLowerCase(),
              a = pe[a] || pe._default,
              s.innerHTML = a[1] + H.htmlPrefilter(r) + a[2],
              c = a[0];
            c--;

          )
            s = s.lastChild;
          (H.merge(d, s.childNodes), ((s = u.firstChild).textContent = ""));
        } else d.push(t.createTextNode(r));
    for (u.textContent = "", h = 0; (r = d[h++]); )
      if (i && -1 < H.inArray(r, i)) o && o.push(r);
      else if (
        ((l = oe(r)), (s = fe(u.appendChild(r), "script")), l && ge(s), n)
      )
        for (c = 0; (r = s[c++]); ) he.test(r.type || "") && n.push(r);
    return u;
  }
  var be = /^key/,
    ye = /^(?:mouse|pointer|contextmenu|drag|drop)|click/,
    we = /^([^.]*)(?:\.(.+)|)/;
  function xe() {
    return !0;
  }
  function Pe() {
    return !1;
  }
  function Ce(e, t) {
    return (
      (e ===
        (function () {
          try {
            return C.activeElement;
          } catch (e) {}
        })()) ==
      ("focus" === t)
    );
  }
  function He(e, t, n, i, o, r) {
    var s, a;
    if ("object" == typeof t) {
      for (a in ("string" != typeof n && ((i = i || n), (n = void 0)), t))
        He(e, a, n, i, t[a], r);
      return e;
    }
    if (
      (null == i && null == o
        ? ((o = n), (i = n = void 0))
        : null == o &&
          ("string" == typeof n
            ? ((o = i), (i = void 0))
            : ((o = i), (i = n), (n = void 0))),
      !1 === o)
    )
      o = Pe;
    else if (!o) return e;
    return (
      1 === r &&
        ((s = o),
        ((o = function (e) {
          return (H().off(e), s.apply(this, arguments));
        }).guid = s.guid || (s.guid = H.guid++))),
      e.each(function () {
        H.event.add(this, t, o, i, n);
      })
    );
  }
  function Te(e, o, r) {
    r
      ? (G.set(e, o, !1),
        H.event.add(e, o, {
          namespace: !1,
          handler: function (e) {
            var t,
              n,
              i = G.get(this, o);
            if (1 & e.isTrigger && this[o]) {
              if (i.length)
                (H.event.special[o] || {}).delegateType && e.stopPropagation();
              else if (
                ((i = a.call(arguments)),
                G.set(this, o, i),
                (t = r(this, o)),
                this[o](),
                i !== (n = G.get(this, o)) || t ? G.set(this, o, !1) : (n = {}),
                i !== n)
              )
                return (
                  e.stopImmediatePropagation(),
                  e.preventDefault(),
                  n.value
                );
            } else
              i.length &&
                (G.set(this, o, {
                  value: H.event.trigger(
                    H.extend(i[0], H.Event.prototype),
                    i.slice(1),
                    this,
                  ),
                }),
                e.stopImmediatePropagation());
          },
        }))
      : void 0 === G.get(e, o) && H.event.add(e, o, xe);
  }
  ((H.event = {
    global: {},
    add: function (t, e, n, i, o) {
      var r,
        s,
        a,
        l,
        c,
        u,
        d,
        h,
        p,
        f = G.get(t);
      if (V(t))
        for (
          n.handler && ((n = (r = n).handler), (o = r.selector)),
            o && H.find.matchesSelector(ie, o),
            n.guid || (n.guid = H.guid++),
            (a = f.events) || (a = f.events = Object.create(null)),
            (s = f.handle) ||
              (s = f.handle =
                function (e) {
                  return void 0 !== H && H.event.triggered !== e.type
                    ? H.event.dispatch.apply(t, arguments)
                    : void 0;
                }),
            l = (e = (e || "").match(R) || [""]).length;
          l--;

        )
          ((d = p = (c = we.exec(e[l]) || [])[1]),
            (h = (c[2] || "").split(".").sort()),
            d &&
              ((u = H.event.special[d] || {}),
              (d = (o ? u.delegateType : u.bindType) || d),
              (u = H.event.special[d] || {}),
              (c = H.extend(
                {
                  type: d,
                  origType: p,
                  data: i,
                  handler: n,
                  guid: n.guid,
                  selector: o,
                  needsContext: o && H.expr.match.needsContext.test(o),
                  namespace: h.join("."),
                },
                r,
              )),
              (p = a[d]) ||
                (((p = a[d] = []).delegateCount = 0),
                (u.setup && !1 !== u.setup.call(t, i, h, s)) ||
                  (t.addEventListener && t.addEventListener(d, s))),
              u.add &&
                (u.add.call(t, c), c.handler.guid || (c.handler.guid = n.guid)),
              o ? p.splice(p.delegateCount++, 0, c) : p.push(c),
              (H.event.global[d] = !0)));
    },
    remove: function (e, t, n, i, o) {
      var r,
        s,
        a,
        l,
        c,
        u,
        d,
        h,
        p,
        f,
        g,
        m = G.hasData(e) && G.get(e);
      if (m && (l = m.events)) {
        for (c = (t = (t || "").match(R) || [""]).length; c--; )
          if (
            ((p = g = (a = we.exec(t[c]) || [])[1]),
            (f = (a[2] || "").split(".").sort()),
            p)
          ) {
            for (
              d = H.event.special[p] || {},
                h = l[(p = (i ? d.delegateType : d.bindType) || p)] || [],
                a =
                  a[2] &&
                  new RegExp("(^|\\.)" + f.join("\\.(?:.*\\.|)") + "(\\.|$)"),
                s = r = h.length;
              r--;

            )
              ((u = h[r]),
                (!o && g !== u.origType) ||
                  (n && n.guid !== u.guid) ||
                  (a && !a.test(u.namespace)) ||
                  (i && i !== u.selector && ("**" !== i || !u.selector)) ||
                  (h.splice(r, 1),
                  u.selector && h.delegateCount--,
                  d.remove && d.remove.call(e, u)));
            s &&
              !h.length &&
              ((d.teardown && !1 !== d.teardown.call(e, f, m.handle)) ||
                H.removeEvent(e, p, m.handle),
              delete l[p]);
          } else for (p in l) H.event.remove(e, p + t[c], n, i, !0);
        H.isEmptyObject(l) && G.remove(e, "handle events");
      }
    },
    dispatch: function (e) {
      var t,
        n,
        i,
        o,
        r,
        s = new Array(arguments.length),
        a = H.event.fix(e),
        l = (G.get(this, "events") || Object.create(null))[a.type] || [],
        e = H.event.special[a.type] || {};
      for (s[0] = a, t = 1; t < arguments.length; t++) s[t] = arguments[t];
      if (
        ((a.delegateTarget = this),
        !e.preDispatch || !1 !== e.preDispatch.call(this, a))
      ) {
        for (
          r = H.event.handlers.call(this, a, l), t = 0;
          (i = r[t++]) && !a.isPropagationStopped();

        )
          for (
            a.currentTarget = i.elem, n = 0;
            (o = i.handlers[n++]) && !a.isImmediatePropagationStopped();

          )
            (a.rnamespace &&
              !1 !== o.namespace &&
              !a.rnamespace.test(o.namespace)) ||
              ((a.handleObj = o),
              (a.data = o.data),
              void 0 !==
                (o = (
                  (H.event.special[o.origType] || {}).handle || o.handler
                ).apply(i.elem, s)) &&
                !1 === (a.result = o) &&
                (a.preventDefault(), a.stopPropagation()));
        return (e.postDispatch && e.postDispatch.call(this, a), a.result);
      }
    },
    handlers: function (e, t) {
      var n,
        i,
        o,
        r,
        s,
        a = [],
        l = t.delegateCount,
        c = e.target;
      if (l && c.nodeType && !("click" === e.type && 1 <= e.button))
        for (; c !== this; c = c.parentNode || this)
          if (1 === c.nodeType && ("click" !== e.type || !0 !== c.disabled)) {
            for (r = [], s = {}, n = 0; n < l; n++)
              (void 0 === s[(o = (i = t[n]).selector + " ")] &&
                (s[o] = i.needsContext
                  ? -1 < H(o, this).index(c)
                  : H.find(o, this, null, [c]).length),
                s[o] && r.push(i));
            r.length && a.push({ elem: c, handlers: r });
          }
      return (
        (c = this),
        l < t.length && a.push({ elem: c, handlers: t.slice(l) }),
        a
      );
    },
    addProp: function (t, e) {
      Object.defineProperty(H.Event.prototype, t, {
        enumerable: !0,
        configurable: !0,
        get: g(e)
          ? function () {
              if (this.originalEvent) return e(this.originalEvent);
            }
          : function () {
              if (this.originalEvent) return this.originalEvent[t];
            },
        set: function (e) {
          Object.defineProperty(this, t, {
            enumerable: !0,
            configurable: !0,
            writable: !0,
            value: e,
          });
        },
      });
    },
    fix: function (e) {
      return e[H.expando] ? e : new H.Event(e);
    },
    special: {
      load: { noBubble: !0 },
      click: {
        setup: function (e) {
          e = this || e;
          return (
            ue.test(e.type) && e.click && S(e, "input") && Te(e, "click", xe),
            !1
          );
        },
        trigger: function (e) {
          e = this || e;
          return (
            ue.test(e.type) && e.click && S(e, "input") && Te(e, "click"),
            !0
          );
        },
        _default: function (e) {
          e = e.target;
          return (
            (ue.test(e.type) &&
              e.click &&
              S(e, "input") &&
              G.get(e, "click")) ||
            S(e, "a")
          );
        },
      },
      beforeunload: {
        postDispatch: function (e) {
          void 0 !== e.result &&
            e.originalEvent &&
            (e.originalEvent.returnValue = e.result);
        },
      },
    },
  }),
    (H.removeEvent = function (e, t, n) {
      e.removeEventListener && e.removeEventListener(t, n);
    }),
    (H.Event = function (e, t) {
      if (!(this instanceof H.Event)) return new H.Event(e, t);
      (e && e.type
        ? ((this.originalEvent = e),
          (this.type = e.type),
          (this.isDefaultPrevented =
            e.defaultPrevented ||
            (void 0 === e.defaultPrevented && !1 === e.returnValue)
              ? xe
              : Pe),
          (this.target =
            e.target && 3 === e.target.nodeType
              ? e.target.parentNode
              : e.target),
          (this.currentTarget = e.currentTarget),
          (this.relatedTarget = e.relatedTarget))
        : (this.type = e),
        t && H.extend(this, t),
        (this.timeStamp = (e && e.timeStamp) || Date.now()),
        (this[H.expando] = !0));
    }),
    (H.Event.prototype = {
      constructor: H.Event,
      isDefaultPrevented: Pe,
      isPropagationStopped: Pe,
      isImmediatePropagationStopped: Pe,
      isSimulated: !1,
      preventDefault: function () {
        var e = this.originalEvent;
        ((this.isDefaultPrevented = xe),
          e && !this.isSimulated && e.preventDefault());
      },
      stopPropagation: function () {
        var e = this.originalEvent;
        ((this.isPropagationStopped = xe),
          e && !this.isSimulated && e.stopPropagation());
      },
      stopImmediatePropagation: function () {
        var e = this.originalEvent;
        ((this.isImmediatePropagationStopped = xe),
          e && !this.isSimulated && e.stopImmediatePropagation(),
          this.stopPropagation());
      },
    }),
    H.each(
      {
        altKey: !0,
        bubbles: !0,
        cancelable: !0,
        changedTouches: !0,
        ctrlKey: !0,
        detail: !0,
        eventPhase: !0,
        metaKey: !0,
        pageX: !0,
        pageY: !0,
        shiftKey: !0,
        view: !0,
        char: !0,
        code: !0,
        charCode: !0,
        key: !0,
        keyCode: !0,
        button: !0,
        buttons: !0,
        clientX: !0,
        clientY: !0,
        offsetX: !0,
        offsetY: !0,
        pointerId: !0,
        pointerType: !0,
        screenX: !0,
        screenY: !0,
        targetTouches: !0,
        toElement: !0,
        touches: !0,
        which: function (e) {
          var t = e.button;
          return null == e.which && be.test(e.type)
            ? null != e.charCode
              ? e.charCode
              : e.keyCode
            : !e.which && void 0 !== t && ye.test(e.type)
              ? 1 & t
                ? 1
                : 2 & t
                  ? 3
                  : 4 & t
                    ? 2
                    : 0
              : e.which;
        },
      },
      H.event.addProp,
    ),
    H.each({ focus: "focusin", blur: "focusout" }, function (e, t) {
      H.event.special[e] = {
        setup: function () {
          return (Te(this, e, Ce), !1);
        },
        trigger: function () {
          return (Te(this, e), !0);
        },
        delegateType: t,
      };
    }),
    H.each(
      {
        mouseenter: "mouseover",
        mouseleave: "mouseout",
        pointerenter: "pointerover",
        pointerleave: "pointerout",
      },
      function (e, o) {
        H.event.special[e] = {
          delegateType: o,
          bindType: o,
          handle: function (e) {
            var t,
              n = e.relatedTarget,
              i = e.handleObj;
            return (
              (n && (n === this || H.contains(this, n))) ||
                ((e.type = i.origType),
                (t = i.handler.apply(this, arguments)),
                (e.type = o)),
              t
            );
          },
        };
      },
    ),
    H.fn.extend({
      on: function (e, t, n, i) {
        return He(this, e, t, n, i);
      },
      one: function (e, t, n, i) {
        return He(this, e, t, n, i, 1);
      },
      off: function (e, t, n) {
        var i, o;
        if (e && e.preventDefault && e.handleObj)
          return (
            (i = e.handleObj),
            H(e.delegateTarget).off(
              i.namespace ? i.origType + "." + i.namespace : i.origType,
              i.selector,
              i.handler,
            ),
            this
          );
        if ("object" != typeof e)
          return (
            (!1 !== t && "function" != typeof t) || ((n = t), (t = void 0)),
            !1 === n && (n = Pe),
            this.each(function () {
              H.event.remove(this, e, n, t);
            })
          );
        for (o in e) this.off(o, t, e[o]);
        return this;
      },
    }));
  var Ee = /<script|<style|<link/i,
    Se = /checked\s*(?:[^=]|=\s*.checked.)/i,
    Ie = /^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g;
  function Ae(e, t) {
    return (
      (S(e, "table") &&
        S(11 !== t.nodeType ? t : t.firstChild, "tr") &&
        H(e).children("tbody")[0]) ||
      e
    );
  }
  function ke(e) {
    return ((e.type = (null !== e.getAttribute("type")) + "/" + e.type), e);
  }
  function Le(e) {
    return (
      "true/" === (e.type || "").slice(0, 5)
        ? (e.type = e.type.slice(5))
        : e.removeAttribute("type"),
      e
    );
  }
  function De(e, t) {
    var n, i, o, r;
    if (1 === t.nodeType) {
      if (G.hasData(e) && (r = G.get(e).events))
        for (o in (G.remove(t, "handle events"), r))
          for (n = 0, i = r[o].length; n < i; n++) H.event.add(t, o, r[o][n]);
      J.hasData(e) && ((e = J.access(e)), (e = H.extend({}, e)), J.set(t, e));
    }
  }
  function Oe(n, i, o, r) {
    i = v(i);
    var e,
      t,
      s,
      a,
      l,
      c,
      u = 0,
      d = n.length,
      h = d - 1,
      p = i[0],
      f = g(p);
    if (f || (1 < d && "string" == typeof p && !y.checkClone && Se.test(p)))
      return n.each(function (e) {
        var t = n.eq(e);
        (f && (i[0] = p.call(this, e, t.html())), Oe(t, i, o, r));
      });
    if (
      d &&
      ((t = (e = ve(i, n[0].ownerDocument, !1, n, r)).firstChild),
      1 === e.childNodes.length && (e = t),
      t || r)
    ) {
      for (a = (s = H.map(fe(e, "script"), ke)).length; u < d; u++)
        ((l = e),
          u !== h &&
            ((l = H.clone(l, !0, !0)), a && H.merge(s, fe(l, "script"))),
          o.call(n[u], l, u));
      if (a)
        for (c = s[s.length - 1].ownerDocument, H.map(s, Le), u = 0; u < a; u++)
          ((l = s[u]),
            he.test(l.type || "") &&
              !G.access(l, "globalEval") &&
              H.contains(c, l) &&
              (l.src && "module" !== (l.type || "").toLowerCase()
                ? H._evalUrl &&
                  !l.noModule &&
                  H._evalUrl(
                    l.src,
                    { nonce: l.nonce || l.getAttribute("nonce") },
                    c,
                  )
                : w(l.textContent.replace(Ie, ""), l, c)));
    }
    return n;
  }
  function je(e, t, n) {
    for (var i, o = t ? H.filter(t, e) : e, r = 0; null != (i = o[r]); r++)
      (n || 1 !== i.nodeType || H.cleanData(fe(i)),
        i.parentNode &&
          (n && oe(i) && ge(fe(i, "script")), i.parentNode.removeChild(i)));
    return e;
  }
  (H.extend({
    htmlPrefilter: function (e) {
      return e;
    },
    clone: function (e, t, n) {
      var i,
        o,
        r,
        s,
        a,
        l,
        c,
        u = e.cloneNode(!0),
        d = oe(e);
      if (
        !(
          y.noCloneChecked ||
          (1 !== e.nodeType && 11 !== e.nodeType) ||
          H.isXMLDoc(e)
        )
      )
        for (s = fe(u), i = 0, o = (r = fe(e)).length; i < o; i++)
          ((a = r[i]),
            "input" === (c = (l = s[i]).nodeName.toLowerCase()) &&
            ue.test(a.type)
              ? (l.checked = a.checked)
              : ("input" !== c && "textarea" !== c) ||
                (l.defaultValue = a.defaultValue));
      if (t)
        if (n)
          for (r = r || fe(e), s = s || fe(u), i = 0, o = r.length; i < o; i++)
            De(r[i], s[i]);
        else De(e, u);
      return (
        0 < (s = fe(u, "script")).length && ge(s, !d && fe(e, "script")),
        u
      );
    },
    cleanData: function (e) {
      for (var t, n, i, o = H.event.special, r = 0; void 0 !== (n = e[r]); r++)
        if (V(n)) {
          if ((t = n[G.expando])) {
            if (t.events)
              for (i in t.events)
                o[i] ? H.event.remove(n, i) : H.removeEvent(n, i, t.handle);
            n[G.expando] = void 0;
          }
          n[J.expando] && (n[J.expando] = void 0);
        }
    },
  }),
    H.fn.extend({
      detach: function (e) {
        return je(this, e, !0);
      },
      remove: function (e) {
        return je(this, e);
      },
      text: function (e) {
        return B(
          this,
          function (e) {
            return void 0 === e
              ? H.text(this)
              : this.empty().each(function () {
                  (1 !== this.nodeType &&
                    11 !== this.nodeType &&
                    9 !== this.nodeType) ||
                    (this.textContent = e);
                });
          },
          null,
          e,
          arguments.length,
        );
      },
      append: function () {
        return Oe(this, arguments, function (e) {
          (1 !== this.nodeType &&
            11 !== this.nodeType &&
            9 !== this.nodeType) ||
            Ae(this, e).appendChild(e);
        });
      },
      prepend: function () {
        return Oe(this, arguments, function (e) {
          var t;
          (1 !== this.nodeType &&
            11 !== this.nodeType &&
            9 !== this.nodeType) ||
            (t = Ae(this, e)).insertBefore(e, t.firstChild);
        });
      },
      before: function () {
        return Oe(this, arguments, function (e) {
          this.parentNode && this.parentNode.insertBefore(e, this);
        });
      },
      after: function () {
        return Oe(this, arguments, function (e) {
          this.parentNode && this.parentNode.insertBefore(e, this.nextSibling);
        });
      },
      empty: function () {
        for (var e, t = 0; null != (e = this[t]); t++)
          1 === e.nodeType && (H.cleanData(fe(e, !1)), (e.textContent = ""));
        return this;
      },
      clone: function (e, t) {
        return (
          (e = null != e && e),
          (t = null == t ? e : t),
          this.map(function () {
            return H.clone(this, e, t);
          })
        );
      },
      html: function (e) {
        return B(
          this,
          function (e) {
            var t = this[0] || {},
              n = 0,
              i = this.length;
            if (void 0 === e && 1 === t.nodeType) return t.innerHTML;
            if (
              "string" == typeof e &&
              !Ee.test(e) &&
              !pe[(de.exec(e) || ["", ""])[1].toLowerCase()]
            ) {
              e = H.htmlPrefilter(e);
              try {
                for (; n < i; n++)
                  1 === (t = this[n] || {}).nodeType &&
                    (H.cleanData(fe(t, !1)), (t.innerHTML = e));
                t = 0;
              } catch (e) {}
            }
            t && this.empty().append(e);
          },
          null,
          e,
          arguments.length,
        );
      },
      replaceWith: function () {
        var n = [];
        return Oe(
          this,
          arguments,
          function (e) {
            var t = this.parentNode;
            H.inArray(this, n) < 0 &&
              (H.cleanData(fe(this)), t && t.replaceChild(e, this));
          },
          n,
        );
      },
    }),
    H.each(
      {
        appendTo: "append",
        prependTo: "prepend",
        insertBefore: "before",
        insertAfter: "after",
        replaceAll: "replaceWith",
      },
      function (e, s) {
        H.fn[e] = function (e) {
          for (var t, n = [], i = H(e), o = i.length - 1, r = 0; r <= o; r++)
            ((t = r === o ? this : this.clone(!0)),
              H(i[r])[s](t),
              l.apply(n, t.get()));
          return this.pushStack(n);
        };
      },
    ));
  function Re(e) {
    var t = e.ownerDocument.defaultView;
    return (t = !t || !t.opener ? P : t).getComputedStyle(e);
  }
  function Fe(e, t, n) {
    var i,
      o = {};
    for (i in t) ((o[i] = e.style[i]), (e.style[i] = t[i]));
    for (i in ((n = n.call(e)), t)) e.style[i] = o[i];
    return n;
  }
  var Ne,
    $e,
    Me,
    qe,
    We,
    Be,
    ze,
    _e,
    Ue = new RegExp("^(" + ee + ")(?!px)[a-z%]+$", "i"),
    Qe = new RegExp(ne.join("|"), "i");
  function Ve(e, t, n) {
    var i,
      o,
      r = e.style;
    return (
      (n = n || Re(e)) &&
        ("" !== (o = n.getPropertyValue(t) || n[t]) ||
          oe(e) ||
          (o = H.style(e, t)),
        !y.pixelBoxStyles() &&
          Ue.test(o) &&
          Qe.test(t) &&
          ((i = r.width),
          (e = r.minWidth),
          (t = r.maxWidth),
          (r.minWidth = r.maxWidth = r.width = o),
          (o = n.width),
          (r.width = i),
          (r.minWidth = e),
          (r.maxWidth = t))),
      void 0 !== o ? o + "" : o
    );
  }
  function Xe(e, t) {
    return {
      get: function () {
        if (!e()) return (this.get = t).apply(this, arguments);
        delete this.get;
      },
    };
  }
  function Ge() {
    var e;
    _e &&
      ((ze.style.cssText =
        "position:absolute;left:-11111px;width:60px;margin-top:1px;padding:0;border:0"),
      (_e.style.cssText =
        "position:relative;display:block;box-sizing:border-box;overflow:scroll;margin:auto;border:1px;padding:1px;width:60%;top:1%"),
      ie.appendChild(ze).appendChild(_e),
      (e = P.getComputedStyle(_e)),
      (Ne = "1%" !== e.top),
      (Be = 12 === Je(e.marginLeft)),
      (_e.style.right = "60%"),
      (qe = 36 === Je(e.right)),
      ($e = 36 === Je(e.width)),
      (_e.style.position = "absolute"),
      (Me = 12 === Je(_e.offsetWidth / 3)),
      ie.removeChild(ze),
      (_e = null));
  }
  function Je(e) {
    return Math.round(parseFloat(e));
  }
  ((ze = C.createElement("div")),
    (_e = C.createElement("div")).style &&
      ((_e.style.backgroundClip = "content-box"),
      (_e.cloneNode(!0).style.backgroundClip = ""),
      (y.clearCloneStyle = "content-box" === _e.style.backgroundClip),
      H.extend(y, {
        boxSizingReliable: function () {
          return (Ge(), $e);
        },
        pixelBoxStyles: function () {
          return (Ge(), qe);
        },
        pixelPosition: function () {
          return (Ge(), Ne);
        },
        reliableMarginLeft: function () {
          return (Ge(), Be);
        },
        scrollboxSize: function () {
          return (Ge(), Me);
        },
        reliableTrDimensions: function () {
          var e, t, n;
          return (
            null == We &&
              ((e = C.createElement("table")),
              (n = C.createElement("tr")),
              (t = C.createElement("div")),
              (e.style.cssText = "position:absolute;left:-11111px"),
              (n.style.height = "1px"),
              (t.style.height = "9px"),
              ie.appendChild(e).appendChild(n).appendChild(t),
              (n = P.getComputedStyle(n)),
              (We = 3 < parseInt(n.height)),
              ie.removeChild(e)),
            We
          );
        },
      })));
  var Ye = ["Webkit", "Moz", "ms"],
    Ke = C.createElement("div").style,
    Ze = {};
  function et(e) {
    return (
      H.cssProps[e] ||
      Ze[e] ||
      (e in Ke
        ? e
        : (Ze[e] =
            (function (e) {
              for (
                var t = e[0].toUpperCase() + e.slice(1), n = Ye.length;
                n--;

              )
                if ((e = Ye[n] + t) in Ke) return e;
            })(e) || e))
    );
  }
  var tt = /^(none|table(?!-c[ea]).+)/,
    nt = /^--/,
    it = { position: "absolute", visibility: "hidden", display: "block" },
    ot = { letterSpacing: "0", fontWeight: "400" };
  function rt(e, t, n) {
    var i = te.exec(t);
    return i ? Math.max(0, i[2] - (n || 0)) + (i[3] || "px") : t;
  }
  function st(e, t, n, i, o, r) {
    var s = "width" === t ? 1 : 0,
      a = 0,
      l = 0;
    if (n === (i ? "border" : "content")) return 0;
    for (; s < 4; s += 2)
      ("margin" === n && (l += H.css(e, n + ne[s], !0, o)),
        i
          ? ("content" === n && (l -= H.css(e, "padding" + ne[s], !0, o)),
            "margin" !== n &&
              (l -= H.css(e, "border" + ne[s] + "Width", !0, o)))
          : ((l += H.css(e, "padding" + ne[s], !0, o)),
            "padding" !== n
              ? (l += H.css(e, "border" + ne[s] + "Width", !0, o))
              : (a += H.css(e, "border" + ne[s] + "Width", !0, o))));
    return (
      !i &&
        0 <= r &&
        (l +=
          Math.max(
            0,
            Math.ceil(
              e["offset" + t[0].toUpperCase() + t.slice(1)] - r - l - a - 0.5,
            ),
          ) || 0),
      l
    );
  }
  function at(e, t, n) {
    var i = Re(e),
      o =
        (!y.boxSizingReliable() || n) &&
        "border-box" === H.css(e, "boxSizing", !1, i),
      r = o,
      s = Ve(e, t, i),
      a = "offset" + t[0].toUpperCase() + t.slice(1);
    if (Ue.test(s)) {
      if (!n) return s;
      s = "auto";
    }
    return (
      ((!y.boxSizingReliable() && o) ||
        (!y.reliableTrDimensions() && S(e, "tr")) ||
        "auto" === s ||
        (!parseFloat(s) && "inline" === H.css(e, "display", !1, i))) &&
        e.getClientRects().length &&
        ((o = "border-box" === H.css(e, "boxSizing", !1, i)),
        (r = a in e) && (s = e[a])),
      (s = parseFloat(s) || 0) +
        st(e, t, n || (o ? "border" : "content"), r, i, s) +
        "px"
    );
  }
  function lt(e, t, n, i, o) {
    return new lt.prototype.init(e, t, n, i, o);
  }
  (H.extend({
    cssHooks: {
      opacity: {
        get: function (e, t) {
          if (t) {
            e = Ve(e, "opacity");
            return "" === e ? "1" : e;
          }
        },
      },
    },
    cssNumber: {
      animationIterationCount: !0,
      columnCount: !0,
      fillOpacity: !0,
      flexGrow: !0,
      flexShrink: !0,
      fontWeight: !0,
      gridArea: !0,
      gridColumn: !0,
      gridColumnEnd: !0,
      gridColumnStart: !0,
      gridRow: !0,
      gridRowEnd: !0,
      gridRowStart: !0,
      lineHeight: !0,
      opacity: !0,
      order: !0,
      orphans: !0,
      widows: !0,
      zIndex: !0,
      zoom: !0,
    },
    cssProps: {},
    style: function (e, t, n, i) {
      if (e && 3 !== e.nodeType && 8 !== e.nodeType && e.style) {
        var o,
          r,
          s,
          a = Q(t),
          l = nt.test(t),
          c = e.style;
        if (
          (l || (t = et(a)), (s = H.cssHooks[t] || H.cssHooks[a]), void 0 === n)
        )
          return s && "get" in s && void 0 !== (o = s.get(e, !1, i)) ? o : c[t];
        ("string" == (r = typeof n) &&
          (o = te.exec(n)) &&
          o[1] &&
          ((n = ae(e, t, o)), (r = "number")),
          null != n &&
            n == n &&
            ("number" !== r ||
              l ||
              (n += (o && o[3]) || (H.cssNumber[a] ? "" : "px")),
            y.clearCloneStyle ||
              "" !== n ||
              0 !== t.indexOf("background") ||
              (c[t] = "inherit"),
            (s && "set" in s && void 0 === (n = s.set(e, n, i))) ||
              (l ? c.setProperty(t, n) : (c[t] = n))));
      }
    },
    css: function (e, t, n, i) {
      var o,
        r = Q(t);
      return (
        nt.test(t) || (t = et(r)),
        "normal" ===
          (o =
            void 0 ===
            (o =
              (r = H.cssHooks[t] || H.cssHooks[r]) && "get" in r
                ? r.get(e, !0, n)
                : o)
              ? Ve(e, t, i)
              : o) &&
          t in ot &&
          (o = ot[t]),
        "" === n || n
          ? ((t = parseFloat(o)), !0 === n || isFinite(t) ? t || 0 : o)
          : o
      );
    },
  }),
    H.each(["height", "width"], function (e, a) {
      H.cssHooks[a] = {
        get: function (e, t, n) {
          if (t)
            return !tt.test(H.css(e, "display")) ||
              (e.getClientRects().length && e.getBoundingClientRect().width)
              ? at(e, a, n)
              : Fe(e, it, function () {
                  return at(e, a, n);
                });
        },
        set: function (e, t, n) {
          var i,
            o = Re(e),
            r = !y.scrollboxSize() && "absolute" === o.position,
            s = (r || n) && "border-box" === H.css(e, "boxSizing", !1, o),
            n = n ? st(e, a, n, s, o) : 0;
          return (
            s &&
              r &&
              (n -= Math.ceil(
                e["offset" + a[0].toUpperCase() + a.slice(1)] -
                  parseFloat(o[a]) -
                  st(e, a, "border", !1, o) -
                  0.5,
              )),
            n &&
              (i = te.exec(t)) &&
              "px" !== (i[3] || "px") &&
              ((e.style[a] = t), (t = H.css(e, a))),
            rt(0, t, n)
          );
        },
      };
    }),
    (H.cssHooks.marginLeft = Xe(y.reliableMarginLeft, function (e, t) {
      if (t)
        return (
          (parseFloat(Ve(e, "marginLeft")) ||
            e.getBoundingClientRect().left -
              Fe(e, { marginLeft: 0 }, function () {
                return e.getBoundingClientRect().left;
              })) + "px"
        );
    })),
    H.each({ margin: "", padding: "", border: "Width" }, function (o, r) {
      ((H.cssHooks[o + r] = {
        expand: function (e) {
          for (
            var t = 0, n = {}, i = "string" == typeof e ? e.split(" ") : [e];
            t < 4;
            t++
          )
            n[o + ne[t] + r] = i[t] || i[t - 2] || i[0];
          return n;
        },
      }),
        "margin" !== o && (H.cssHooks[o + r].set = rt));
    }),
    H.fn.extend({
      css: function (e, t) {
        return B(
          this,
          function (e, t, n) {
            var i,
              o,
              r = {},
              s = 0;
            if (Array.isArray(t)) {
              for (i = Re(e), o = t.length; s < o; s++)
                r[t[s]] = H.css(e, t[s], !1, i);
              return r;
            }
            return void 0 !== n ? H.style(e, t, n) : H.css(e, t);
          },
          e,
          t,
          1 < arguments.length,
        );
      },
    }),
    (((H.Tween = lt).prototype = {
      constructor: lt,
      init: function (e, t, n, i, o, r) {
        ((this.elem = e),
          (this.prop = n),
          (this.easing = o || H.easing._default),
          (this.options = t),
          (this.start = this.now = this.cur()),
          (this.end = i),
          (this.unit = r || (H.cssNumber[n] ? "" : "px")));
      },
      cur: function () {
        var e = lt.propHooks[this.prop];
        return (e && e.get ? e : lt.propHooks._default).get(this);
      },
      run: function (e) {
        var t,
          n = lt.propHooks[this.prop];
        return (
          this.options.duration
            ? (this.pos = t =
                H.easing[this.easing](
                  e,
                  this.options.duration * e,
                  0,
                  1,
                  this.options.duration,
                ))
            : (this.pos = t = e),
          (this.now = (this.end - this.start) * t + this.start),
          this.options.step &&
            this.options.step.call(this.elem, this.now, this),
          (n && n.set ? n : lt.propHooks._default).set(this),
          this
        );
      },
    }).init.prototype = lt.prototype),
    ((lt.propHooks = {
      _default: {
        get: function (e) {
          return 1 !== e.elem.nodeType ||
            (null != e.elem[e.prop] && null == e.elem.style[e.prop])
            ? e.elem[e.prop]
            : (e = H.css(e.elem, e.prop, "")) && "auto" !== e
              ? e
              : 0;
        },
        set: function (e) {
          H.fx.step[e.prop]
            ? H.fx.step[e.prop](e)
            : 1 !== e.elem.nodeType ||
                (!H.cssHooks[e.prop] && null == e.elem.style[et(e.prop)])
              ? (e.elem[e.prop] = e.now)
              : H.style(e.elem, e.prop, e.now + e.unit);
        },
      },
    }).scrollTop = lt.propHooks.scrollLeft =
      {
        set: function (e) {
          e.elem.nodeType && e.elem.parentNode && (e.elem[e.prop] = e.now);
        },
      }),
    (H.easing = {
      linear: function (e) {
        return e;
      },
      swing: function (e) {
        return 0.5 - Math.cos(e * Math.PI) / 2;
      },
      _default: "swing",
    }),
    (H.fx = lt.prototype.init),
    (H.fx.step = {}));
  var ct,
    ut,
    dt = /^(?:toggle|show|hide)$/,
    ht = /queueHooks$/;
  function pt() {
    ut &&
      (!1 === C.hidden && P.requestAnimationFrame
        ? P.requestAnimationFrame(pt)
        : P.setTimeout(pt, H.fx.interval),
      H.fx.tick());
  }
  function ft() {
    return (
      P.setTimeout(function () {
        ct = void 0;
      }),
      (ct = Date.now())
    );
  }
  function gt(e, t) {
    var n,
      i = 0,
      o = { height: e };
    for (t = t ? 1 : 0; i < 4; i += 2 - t)
      o["margin" + (n = ne[i])] = o["padding" + n] = e;
    return (t && (o.opacity = o.width = e), o);
  }
  function mt(e, t, n) {
    for (
      var i,
        o = (vt.tweeners[t] || []).concat(vt.tweeners["*"]),
        r = 0,
        s = o.length;
      r < s;
      r++
    )
      if ((i = o[r].call(n, t, e))) return i;
  }
  function vt(o, e, t) {
    var n,
      r,
      i = 0,
      s = vt.prefilters.length,
      a = H.Deferred().always(function () {
        delete l.elem;
      }),
      l = function () {
        if (r) return !1;
        for (
          var e = ct || ft(),
            e = Math.max(0, c.startTime + c.duration - e),
            t = 1 - (e / c.duration || 0),
            n = 0,
            i = c.tweens.length;
          n < i;
          n++
        )
          c.tweens[n].run(t);
        return (
          a.notifyWith(o, [c, t, e]),
          t < 1 && i
            ? e
            : (i || a.notifyWith(o, [c, 1, 0]), a.resolveWith(o, [c]), !1)
        );
      },
      c = a.promise({
        elem: o,
        props: H.extend({}, e),
        opts: H.extend(!0, { specialEasing: {}, easing: H.easing._default }, t),
        originalProperties: e,
        originalOptions: t,
        startTime: ct || ft(),
        duration: t.duration,
        tweens: [],
        createTween: function (e, t) {
          e = H.Tween(
            o,
            c.opts,
            e,
            t,
            c.opts.specialEasing[e] || c.opts.easing,
          );
          return (c.tweens.push(e), e);
        },
        stop: function (e) {
          var t = 0,
            n = e ? c.tweens.length : 0;
          if (r) return this;
          for (r = !0; t < n; t++) c.tweens[t].run(1);
          return (
            e
              ? (a.notifyWith(o, [c, 1, 0]), a.resolveWith(o, [c, e]))
              : a.rejectWith(o, [c, e]),
            this
          );
        },
      }),
      u = c.props;
    for (
      (function (e, t) {
        var n, i, o, r, s;
        for (n in e)
          if (
            ((o = t[(i = Q(n))]),
            (r = e[n]),
            Array.isArray(r) && ((o = r[1]), (r = e[n] = r[0])),
            n !== i && ((e[i] = r), delete e[n]),
            (s = H.cssHooks[i]) && ("expand" in s))
          )
            for (n in ((r = s.expand(r)), delete e[i], r))
              (n in e) || ((e[n] = r[n]), (t[n] = o));
          else t[i] = o;
      })(u, c.opts.specialEasing);
      i < s;
      i++
    )
      if ((n = vt.prefilters[i].call(c, o, u, c.opts)))
        return (
          g(n.stop) &&
            (H._queueHooks(c.elem, c.opts.queue).stop = n.stop.bind(n)),
          n
        );
    return (
      H.map(u, mt, c),
      g(c.opts.start) && c.opts.start.call(o, c),
      c
        .progress(c.opts.progress)
        .done(c.opts.done, c.opts.complete)
        .fail(c.opts.fail)
        .always(c.opts.always),
      H.fx.timer(H.extend(l, { elem: o, anim: c, queue: c.opts.queue })),
      c
    );
  }
  ((H.Animation = H.extend(vt, {
    tweeners: {
      "*": [
        function (e, t) {
          var n = this.createTween(e, t);
          return (ae(n.elem, e, te.exec(t), n), n);
        },
      ],
    },
    tweener: function (e, t) {
      for (
        var n, i = 0, o = (e = g(e) ? ((t = e), ["*"]) : e.match(R)).length;
        i < o;
        i++
      )
        ((n = e[i]),
          (vt.tweeners[n] = vt.tweeners[n] || []),
          vt.tweeners[n].unshift(t));
    },
    prefilters: [
      function (e, t, n) {
        var i,
          o,
          r,
          s,
          a,
          l,
          c,
          u = "width" in t || "height" in t,
          d = this,
          h = {},
          p = e.style,
          f = e.nodeType && se(e),
          g = G.get(e, "fxshow");
        for (i in (n.queue ||
          (null == (s = H._queueHooks(e, "fx")).unqueued &&
            ((s.unqueued = 0),
            (a = s.empty.fire),
            (s.empty.fire = function () {
              s.unqueued || a();
            })),
          s.unqueued++,
          d.always(function () {
            d.always(function () {
              (s.unqueued--, H.queue(e, "fx").length || s.empty.fire());
            });
          })),
        t))
          if (((o = t[i]), dt.test(o))) {
            if (
              (delete t[i],
              (r = r || "toggle" === o),
              o === (f ? "hide" : "show"))
            ) {
              if ("show" !== o || !g || void 0 === g[i]) continue;
              f = !0;
            }
            h[i] = (g && g[i]) || H.style(e, i);
          }
        if ((l = !H.isEmptyObject(t)) || !H.isEmptyObject(h))
          for (i in (u &&
            1 === e.nodeType &&
            ((n.overflow = [p.overflow, p.overflowX, p.overflowY]),
            null == (c = g && g.display) && (c = G.get(e, "display")),
            "none" === (u = H.css(e, "display")) &&
              (c
                ? (u = c)
                : (ce([e], !0),
                  (c = e.style.display || c),
                  (u = H.css(e, "display")),
                  ce([e]))),
            ("inline" === u || ("inline-block" === u && null != c)) &&
              "none" === H.css(e, "float") &&
              (l ||
                (d.done(function () {
                  p.display = c;
                }),
                null == c && ((u = p.display), (c = "none" === u ? "" : u))),
              (p.display = "inline-block"))),
          n.overflow &&
            ((p.overflow = "hidden"),
            d.always(function () {
              ((p.overflow = n.overflow[0]),
                (p.overflowX = n.overflow[1]),
                (p.overflowY = n.overflow[2]));
            })),
          (l = !1),
          h))
            (l ||
              (g
                ? "hidden" in g && (f = g.hidden)
                : (g = G.access(e, "fxshow", { display: c })),
              r && (g.hidden = !f),
              f && ce([e], !0),
              d.done(function () {
                for (i in (f || ce([e]), G.remove(e, "fxshow"), h))
                  H.style(e, i, h[i]);
              })),
              (l = mt(f ? g[i] : 0, i, d)),
              i in g ||
                ((g[i] = l.start), f && ((l.end = l.start), (l.start = 0))));
      },
    ],
    prefilter: function (e, t) {
      t ? vt.prefilters.unshift(e) : vt.prefilters.push(e);
    },
  })),
    (H.speed = function (e, t, n) {
      var i =
        e && "object" == typeof e
          ? H.extend({}, e)
          : {
              complete: n || (!n && t) || (g(e) && e),
              duration: e,
              easing: (n && t) || (t && !g(t) && t),
            };
      return (
        H.fx.off
          ? (i.duration = 0)
          : "number" != typeof i.duration &&
            (i.duration in H.fx.speeds
              ? (i.duration = H.fx.speeds[i.duration])
              : (i.duration = H.fx.speeds._default)),
        (null != i.queue && !0 !== i.queue) || (i.queue = "fx"),
        (i.old = i.complete),
        (i.complete = function () {
          (g(i.old) && i.old.call(this), i.queue && H.dequeue(this, i.queue));
        }),
        i
      );
    }),
    H.fn.extend({
      fadeTo: function (e, t, n, i) {
        return this.filter(se)
          .css("opacity", 0)
          .show()
          .end()
          .animate({ opacity: t }, e, n, i);
      },
      animate: function (t, e, n, i) {
        function o() {
          var e = vt(this, H.extend({}, t), s);
          (r || G.get(this, "finish")) && e.stop(!0);
        }
        var r = H.isEmptyObject(t),
          s = H.speed(e, n, i);
        return (
          (o.finish = o),
          r || !1 === s.queue ? this.each(o) : this.queue(s.queue, o)
        );
      },
      stop: function (o, e, r) {
        function s(e) {
          var t = e.stop;
          (delete e.stop, t(r));
        }
        return (
          "string" != typeof o && ((r = e), (e = o), (o = void 0)),
          e && this.queue(o || "fx", []),
          this.each(function () {
            var e = !0,
              t = null != o && o + "queueHooks",
              n = H.timers,
              i = G.get(this);
            if (t) i[t] && i[t].stop && s(i[t]);
            else for (t in i) i[t] && i[t].stop && ht.test(t) && s(i[t]);
            for (t = n.length; t--; )
              n[t].elem !== this ||
                (null != o && n[t].queue !== o) ||
                (n[t].anim.stop(r), (e = !1), n.splice(t, 1));
            (!e && r) || H.dequeue(this, o);
          })
        );
      },
      finish: function (s) {
        return (
          !1 !== s && (s = s || "fx"),
          this.each(function () {
            var e,
              t = G.get(this),
              n = t[s + "queue"],
              i = t[s + "queueHooks"],
              o = H.timers,
              r = n ? n.length : 0;
            for (
              t.finish = !0,
                H.queue(this, s, []),
                i && i.stop && i.stop.call(this, !0),
                e = o.length;
              e--;

            )
              o[e].elem === this &&
                o[e].queue === s &&
                (o[e].anim.stop(!0), o.splice(e, 1));
            for (e = 0; e < r; e++)
              n[e] && n[e].finish && n[e].finish.call(this);
            delete t.finish;
          })
        );
      },
    }),
    H.each(["toggle", "show", "hide"], function (e, i) {
      var o = H.fn[i];
      H.fn[i] = function (e, t, n) {
        return null == e || "boolean" == typeof e
          ? o.apply(this, arguments)
          : this.animate(gt(i, !0), e, t, n);
      };
    }),
    H.each(
      {
        slideDown: gt("show"),
        slideUp: gt("hide"),
        slideToggle: gt("toggle"),
        fadeIn: { opacity: "show" },
        fadeOut: { opacity: "hide" },
        fadeToggle: { opacity: "toggle" },
      },
      function (e, i) {
        H.fn[e] = function (e, t, n) {
          return this.animate(i, e, t, n);
        };
      },
    ),
    (H.timers = []),
    (H.fx.tick = function () {
      var e,
        t = 0,
        n = H.timers;
      for (ct = Date.now(); t < n.length; t++)
        (e = n[t])() || n[t] !== e || n.splice(t--, 1);
      (n.length || H.fx.stop(), (ct = void 0));
    }),
    (H.fx.timer = function (e) {
      (H.timers.push(e), H.fx.start());
    }),
    (H.fx.interval = 13),
    (H.fx.start = function () {
      ut || ((ut = !0), pt());
    }),
    (H.fx.stop = function () {
      ut = null;
    }),
    (H.fx.speeds = { slow: 600, fast: 200, _default: 400 }),
    (H.fn.delay = function (i, e) {
      return (
        (i = (H.fx && H.fx.speeds[i]) || i),
        this.queue((e = e || "fx"), function (e, t) {
          var n = P.setTimeout(e, i);
          t.stop = function () {
            P.clearTimeout(n);
          };
        })
      );
    }),
    (d = C.createElement("input")),
    (ee = C.createElement("select").appendChild(C.createElement("option"))),
    (d.type = "checkbox"),
    (y.checkOn = "" !== d.value),
    (y.optSelected = ee.selected),
    ((d = C.createElement("input")).value = "t"),
    (d.type = "radio"),
    (y.radioValue = "t" === d.value));
  var bt,
    yt = H.expr.attrHandle;
  (H.fn.extend({
    attr: function (e, t) {
      return B(this, H.attr, e, t, 1 < arguments.length);
    },
    removeAttr: function (e) {
      return this.each(function () {
        H.removeAttr(this, e);
      });
    },
  }),
    H.extend({
      attr: function (e, t, n) {
        var i,
          o,
          r = e.nodeType;
        if (3 !== r && 8 !== r && 2 !== r)
          return void 0 === e.getAttribute
            ? H.prop(e, t, n)
            : ((1 === r && H.isXMLDoc(e)) ||
                (o =
                  H.attrHooks[t.toLowerCase()] ||
                  (H.expr.match.bool.test(t) ? bt : void 0)),
              void 0 !== n
                ? null === n
                  ? void H.removeAttr(e, t)
                  : o && "set" in o && void 0 !== (i = o.set(e, n, t))
                    ? i
                    : (e.setAttribute(t, n + ""), n)
                : !(o && "get" in o && null !== (i = o.get(e, t))) &&
                    null == (i = H.find.attr(e, t))
                  ? void 0
                  : i);
      },
      attrHooks: {
        type: {
          set: function (e, t) {
            if (!y.radioValue && "radio" === t && S(e, "input")) {
              var n = e.value;
              return (e.setAttribute("type", t), n && (e.value = n), t);
            }
          },
        },
      },
      removeAttr: function (e, t) {
        var n,
          i = 0,
          o = t && t.match(R);
        if (o && 1 === e.nodeType) for (; (n = o[i++]); ) e.removeAttribute(n);
      },
    }),
    (bt = {
      set: function (e, t, n) {
        return (!1 === t ? H.removeAttr(e, n) : e.setAttribute(n, n), n);
      },
    }),
    H.each(H.expr.match.bool.source.match(/\w+/g), function (e, t) {
      var s = yt[t] || H.find.attr;
      yt[t] = function (e, t, n) {
        var i,
          o,
          r = t.toLowerCase();
        return (
          n ||
            ((o = yt[r]),
            (yt[r] = i),
            (i = null != s(e, t, n) ? r : null),
            (yt[r] = o)),
          i
        );
      };
    }));
  var wt = /^(?:input|select|textarea|button)$/i,
    xt = /^(?:a|area)$/i;
  function Pt(e) {
    return (e.match(R) || []).join(" ");
  }
  function Ct(e) {
    return (e.getAttribute && e.getAttribute("class")) || "";
  }
  function Ht(e) {
    return Array.isArray(e) ? e : ("string" == typeof e && e.match(R)) || [];
  }
  (H.fn.extend({
    prop: function (e, t) {
      return B(this, H.prop, e, t, 1 < arguments.length);
    },
    removeProp: function (e) {
      return this.each(function () {
        delete this[H.propFix[e] || e];
      });
    },
  }),
    H.extend({
      prop: function (e, t, n) {
        var i,
          o,
          r = e.nodeType;
        if (3 !== r && 8 !== r && 2 !== r)
          return (
            (1 === r && H.isXMLDoc(e)) ||
              ((t = H.propFix[t] || t), (o = H.propHooks[t])),
            void 0 !== n
              ? o && "set" in o && void 0 !== (i = o.set(e, n, t))
                ? i
                : (e[t] = n)
              : o && "get" in o && null !== (i = o.get(e, t))
                ? i
                : e[t]
          );
      },
      propHooks: {
        tabIndex: {
          get: function (e) {
            var t = H.find.attr(e, "tabindex");
            return t
              ? parseInt(t, 10)
              : wt.test(e.nodeName) || (xt.test(e.nodeName) && e.href)
                ? 0
                : -1;
          },
        },
      },
      propFix: { for: "htmlFor", class: "className" },
    }),
    y.optSelected ||
      (H.propHooks.selected = {
        get: function (e) {
          e = e.parentNode;
          return (e && e.parentNode && e.parentNode.selectedIndex, null);
        },
        set: function (e) {
          e = e.parentNode;
          e && (e.selectedIndex, e.parentNode && e.parentNode.selectedIndex);
        },
      }),
    H.each(
      [
        "tabIndex",
        "readOnly",
        "maxLength",
        "cellSpacing",
        "cellPadding",
        "rowSpan",
        "colSpan",
        "useMap",
        "frameBorder",
        "contentEditable",
      ],
      function () {
        H.propFix[this.toLowerCase()] = this;
      },
    ),
    H.fn.extend({
      addClass: function (t) {
        var e,
          n,
          i,
          o,
          r,
          s,
          a = 0;
        if (g(t))
          return this.each(function (e) {
            H(this).addClass(t.call(this, e, Ct(this)));
          });
        if ((e = Ht(t)).length)
          for (; (n = this[a++]); )
            if (((s = Ct(n)), (i = 1 === n.nodeType && " " + Pt(s) + " "))) {
              for (r = 0; (o = e[r++]); )
                i.indexOf(" " + o + " ") < 0 && (i += o + " ");
              s !== (s = Pt(i)) && n.setAttribute("class", s);
            }
        return this;
      },
      removeClass: function (t) {
        var e,
          n,
          i,
          o,
          r,
          s,
          a = 0;
        if (g(t))
          return this.each(function (e) {
            H(this).removeClass(t.call(this, e, Ct(this)));
          });
        if (!arguments.length) return this.attr("class", "");
        if ((e = Ht(t)).length)
          for (; (n = this[a++]); )
            if (((s = Ct(n)), (i = 1 === n.nodeType && " " + Pt(s) + " "))) {
              for (r = 0; (o = e[r++]); )
                for (; -1 < i.indexOf(" " + o + " "); )
                  i = i.replace(" " + o + " ", " ");
              s !== (s = Pt(i)) && n.setAttribute("class", s);
            }
        return this;
      },
      toggleClass: function (o, t) {
        var r = typeof o,
          s = "string" == r || Array.isArray(o);
        return "boolean" == typeof t && s
          ? t
            ? this.addClass(o)
            : this.removeClass(o)
          : g(o)
            ? this.each(function (e) {
                H(this).toggleClass(o.call(this, e, Ct(this), t), t);
              })
            : this.each(function () {
                var e, t, n, i;
                if (s)
                  for (t = 0, n = H(this), i = Ht(o); (e = i[t++]); )
                    n.hasClass(e) ? n.removeClass(e) : n.addClass(e);
                else
                  (void 0 !== o && "boolean" != r) ||
                    ((e = Ct(this)) && G.set(this, "__className__", e),
                    this.setAttribute &&
                      this.setAttribute(
                        "class",
                        (!e && !1 !== o && G.get(this, "__className__")) || "",
                      ));
              });
      },
      hasClass: function (e) {
        for (var t, n = 0, i = " " + e + " "; (t = this[n++]); )
          if (1 === t.nodeType && -1 < (" " + Pt(Ct(t)) + " ").indexOf(i))
            return !0;
        return !1;
      },
    }));
  var Tt = /\r/g;
  (H.fn.extend({
    val: function (t) {
      var n,
        e,
        i,
        o = this[0];
      return arguments.length
        ? ((i = g(t)),
          this.each(function (e) {
            1 === this.nodeType &&
              (null == (e = i ? t.call(this, e, H(this).val()) : t)
                ? (e = "")
                : "number" == typeof e
                  ? (e += "")
                  : Array.isArray(e) &&
                    (e = H.map(e, function (e) {
                      return null == e ? "" : e + "";
                    })),
              ((n =
                H.valHooks[this.type] ||
                H.valHooks[this.nodeName.toLowerCase()]) &&
                "set" in n &&
                void 0 !== n.set(this, e, "value")) ||
                (this.value = e));
          }))
        : o
          ? (n = H.valHooks[o.type] || H.valHooks[o.nodeName.toLowerCase()]) &&
            "get" in n &&
            void 0 !== (e = n.get(o, "value"))
            ? e
            : "string" == typeof (e = o.value)
              ? e.replace(Tt, "")
              : null == e
                ? ""
                : e
          : void 0;
    },
  }),
    H.extend({
      valHooks: {
        option: {
          get: function (e) {
            var t = H.find.attr(e, "value");
            return null != t ? t : Pt(H.text(e));
          },
        },
        select: {
          get: function (e) {
            for (
              var t,
                n = e.options,
                i = e.selectedIndex,
                o = "select-one" === e.type,
                r = o ? null : [],
                s = o ? i + 1 : n.length,
                a = i < 0 ? s : o ? i : 0;
              a < s;
              a++
            )
              if (
                ((t = n[a]).selected || a === i) &&
                !t.disabled &&
                (!t.parentNode.disabled || !S(t.parentNode, "optgroup"))
              ) {
                if (((t = H(t).val()), o)) return t;
                r.push(t);
              }
            return r;
          },
          set: function (e, t) {
            for (
              var n, i, o = e.options, r = H.makeArray(t), s = o.length;
              s--;

            )
              ((i = o[s]).selected =
                -1 < H.inArray(H.valHooks.option.get(i), r)) && (n = !0);
            return (n || (e.selectedIndex = -1), r);
          },
        },
      },
    }),
    H.each(["radio", "checkbox"], function () {
      ((H.valHooks[this] = {
        set: function (e, t) {
          if (Array.isArray(t))
            return (e.checked = -1 < H.inArray(H(e).val(), t));
        },
      }),
        y.checkOn ||
          (H.valHooks[this].get = function (e) {
            return null === e.getAttribute("value") ? "on" : e.value;
          }));
    }),
    (y.focusin = "onfocusin" in P));
  function Et(e) {
    e.stopPropagation();
  }
  var St = /^(?:focusinfocus|focusoutblur)$/;
  (H.extend(H.event, {
    trigger: function (e, t, n, i) {
      var o,
        r,
        s,
        a,
        l,
        c,
        u,
        d = [n || C],
        h = b.call(e, "type") ? e.type : e,
        p = b.call(e, "namespace") ? e.namespace.split(".") : [],
        f = (u = r = n = n || C);
      if (
        3 !== n.nodeType &&
        8 !== n.nodeType &&
        !St.test(h + H.event.triggered) &&
        (-1 < h.indexOf(".") && ((h = (p = h.split(".")).shift()), p.sort()),
        (a = h.indexOf(":") < 0 && "on" + h),
        ((e = e[H.expando]
          ? e
          : new H.Event(h, "object" == typeof e && e)).isTrigger = i ? 2 : 3),
        (e.namespace = p.join(".")),
        (e.rnamespace = e.namespace
          ? new RegExp("(^|\\.)" + p.join("\\.(?:.*\\.|)") + "(\\.|$)")
          : null),
        (e.result = void 0),
        e.target || (e.target = n),
        (t = null == t ? [e] : H.makeArray(t, [e])),
        (c = H.event.special[h] || {}),
        i || !c.trigger || !1 !== c.trigger.apply(n, t))
      ) {
        if (!i && !c.noBubble && !m(n)) {
          for (
            s = c.delegateType || h, St.test(s + h) || (f = f.parentNode);
            f;
            f = f.parentNode
          )
            (d.push(f), (r = f));
          r === (n.ownerDocument || C) &&
            d.push(r.defaultView || r.parentWindow || P);
        }
        for (o = 0; (f = d[o++]) && !e.isPropagationStopped(); )
          ((u = f),
            (e.type = 1 < o ? s : c.bindType || h),
            (l =
              (G.get(f, "events") || Object.create(null))[e.type] &&
              G.get(f, "handle")) && l.apply(f, t),
            (l = a && f[a]) &&
              l.apply &&
              V(f) &&
              ((e.result = l.apply(f, t)),
              !1 === e.result && e.preventDefault()));
        return (
          (e.type = h),
          i ||
            e.isDefaultPrevented() ||
            (c._default && !1 !== c._default.apply(d.pop(), t)) ||
            !V(n) ||
            (a &&
              g(n[h]) &&
              !m(n) &&
              ((r = n[a]) && (n[a] = null),
              (H.event.triggered = h),
              e.isPropagationStopped() && u.addEventListener(h, Et),
              n[h](),
              e.isPropagationStopped() && u.removeEventListener(h, Et),
              (H.event.triggered = void 0),
              r && (n[a] = r))),
          e.result
        );
      }
    },
    simulate: function (e, t, n) {
      e = H.extend(new H.Event(), n, { type: e, isSimulated: !0 });
      H.event.trigger(e, null, t);
    },
  }),
    H.fn.extend({
      trigger: function (e, t) {
        return this.each(function () {
          H.event.trigger(e, t, this);
        });
      },
      triggerHandler: function (e, t) {
        var n = this[0];
        if (n) return H.event.trigger(e, t, n, !0);
      },
    }),
    y.focusin ||
      H.each({ focus: "focusin", blur: "focusout" }, function (n, i) {
        function o(e) {
          H.event.simulate(i, e.target, H.event.fix(e));
        }
        H.event.special[i] = {
          setup: function () {
            var e = this.ownerDocument || this.document || this,
              t = G.access(e, i);
            (t || e.addEventListener(n, o, !0), G.access(e, i, (t || 0) + 1));
          },
          teardown: function () {
            var e = this.ownerDocument || this.document || this,
              t = G.access(e, i) - 1;
            t
              ? G.access(e, i, t)
              : (e.removeEventListener(n, o, !0), G.remove(e, i));
          },
        };
      }));
  var It = P.location,
    At = { guid: Date.now() },
    kt = /\?/;
  H.parseXML = function (e) {
    var t;
    if (!e || "string" != typeof e) return null;
    try {
      t = new P.DOMParser().parseFromString(e, "text/xml");
    } catch (e) {
      t = void 0;
    }
    return (
      (t && !t.getElementsByTagName("parsererror").length) ||
        H.error("Invalid XML: " + e),
      t
    );
  };
  var Lt = /\[\]$/,
    Dt = /\r?\n/g,
    Ot = /^(?:submit|button|image|reset|file)$/i,
    jt = /^(?:input|select|textarea|keygen)/i;
  ((H.param = function (e, t) {
    function n(e, t) {
      ((t = g(t) ? t() : t),
        (o[o.length] =
          encodeURIComponent(e) +
          "=" +
          encodeURIComponent(null == t ? "" : t)));
    }
    var i,
      o = [];
    if (null == e) return "";
    if (Array.isArray(e) || (e.jquery && !H.isPlainObject(e)))
      H.each(e, function () {
        n(this.name, this.value);
      });
    else
      for (i in e)
        !(function n(i, e, o, r) {
          if (Array.isArray(e))
            H.each(e, function (e, t) {
              o || Lt.test(i)
                ? r(i, t)
                : n(
                    i +
                      "[" +
                      ("object" == typeof t && null != t ? e : "") +
                      "]",
                    t,
                    o,
                    r,
                  );
            });
          else if (o || "object" !== f(e)) r(i, e);
          else for (var t in e) n(i + "[" + t + "]", e[t], o, r);
        })(i, e[i], t, n);
    return o.join("&");
  }),
    H.fn.extend({
      serialize: function () {
        return H.param(this.serializeArray());
      },
      serializeArray: function () {
        return this.map(function () {
          var e = H.prop(this, "elements");
          return e ? H.makeArray(e) : this;
        })
          .filter(function () {
            var e = this.type;
            return (
              this.name &&
              !H(this).is(":disabled") &&
              jt.test(this.nodeName) &&
              !Ot.test(e) &&
              (this.checked || !ue.test(e))
            );
          })
          .map(function (e, t) {
            var n = H(this).val();
            return null == n
              ? null
              : Array.isArray(n)
                ? H.map(n, function (e) {
                    return { name: t.name, value: e.replace(Dt, "\r\n") };
                  })
                : { name: t.name, value: n.replace(Dt, "\r\n") };
          })
          .get();
      },
    }));
  var Rt = /%20/g,
    Ft = /#.*$/,
    Nt = /([?&])_=[^&]*/,
    $t = /^(.*?):[ \t]*([^\r\n]*)$/gm,
    Mt = /^(?:GET|HEAD)$/,
    qt = /^\/\//,
    Wt = {},
    Bt = {},
    zt = "*/".concat("*"),
    _t = C.createElement("a");
  function Ut(r) {
    return function (e, t) {
      "string" != typeof e && ((t = e), (e = "*"));
      var n,
        i = 0,
        o = e.toLowerCase().match(R) || [];
      if (g(t))
        for (; (n = o[i++]); )
          "+" === n[0]
            ? ((n = n.slice(1) || "*"), (r[n] = r[n] || []).unshift(t))
            : (r[n] = r[n] || []).push(t);
    };
  }
  function Qt(t, i, o, r) {
    var s = {},
      a = t === Bt;
    function l(e) {
      var n;
      return (
        (s[e] = !0),
        H.each(t[e] || [], function (e, t) {
          t = t(i, o, r);
          return "string" != typeof t || a || s[t]
            ? a
              ? !(n = t)
              : void 0
            : (i.dataTypes.unshift(t), l(t), !1);
        }),
        n
      );
    }
    return l(i.dataTypes[0]) || (!s["*"] && l("*"));
  }
  function Vt(e, t) {
    var n,
      i,
      o = H.ajaxSettings.flatOptions || {};
    for (n in t) void 0 !== t[n] && ((o[n] ? e : (i = i || {}))[n] = t[n]);
    return (i && H.extend(!0, e, i), e);
  }
  ((_t.href = It.href),
    H.extend({
      active: 0,
      lastModified: {},
      etag: {},
      ajaxSettings: {
        url: It.href,
        type: "GET",
        isLocal:
          /^(?:about|app|app-storage|.+-extension|file|res|widget):$/.test(
            It.protocol,
          ),
        global: !0,
        processData: !0,
        async: !0,
        contentType: "application/x-www-form-urlencoded; charset=UTF-8",
        accepts: {
          "*": zt,
          text: "text/plain",
          html: "text/html",
          xml: "application/xml, text/xml",
          json: "application/json, text/javascript",
        },
        contents: { xml: /\bxml\b/, html: /\bhtml/, json: /\bjson\b/ },
        responseFields: {
          xml: "responseXML",
          text: "responseText",
          json: "responseJSON",
        },
        converters: {
          "* text": String,
          "text html": !0,
          "text json": JSON.parse,
          "text xml": H.parseXML,
        },
        flatOptions: { url: !0, context: !0 },
      },
      ajaxSetup: function (e, t) {
        return t ? Vt(Vt(e, H.ajaxSettings), t) : Vt(H.ajaxSettings, e);
      },
      ajaxPrefilter: Ut(Wt),
      ajaxTransport: Ut(Bt),
      ajax: function (e, t) {
        "object" == typeof e && ((t = e), (e = void 0));
        var l,
          c,
          u,
          n,
          d,
          h,
          p,
          i,
          o,
          f = H.ajaxSetup({}, (t = t || {})),
          g = f.context || f,
          m = f.context && (g.nodeType || g.jquery) ? H(g) : H.event,
          v = H.Deferred(),
          b = H.Callbacks("once memory"),
          y = f.statusCode || {},
          r = {},
          s = {},
          a = "canceled",
          w = {
            readyState: 0,
            getResponseHeader: function (e) {
              var t;
              if (h) {
                if (!n)
                  for (n = {}; (t = $t.exec(u)); )
                    n[t[1].toLowerCase() + " "] = (
                      n[t[1].toLowerCase() + " "] || []
                    ).concat(t[2]);
                t = n[e.toLowerCase() + " "];
              }
              return null == t ? null : t.join(", ");
            },
            getAllResponseHeaders: function () {
              return h ? u : null;
            },
            setRequestHeader: function (e, t) {
              return (
                null == h &&
                  ((e = s[e.toLowerCase()] = s[e.toLowerCase()] || e),
                  (r[e] = t)),
                this
              );
            },
            overrideMimeType: function (e) {
              return (null == h && (f.mimeType = e), this);
            },
            statusCode: function (e) {
              if (e)
                if (h) w.always(e[w.status]);
                else for (var t in e) y[t] = [y[t], e[t]];
              return this;
            },
            abort: function (e) {
              e = e || a;
              return (l && l.abort(e), x(0, e), this);
            },
          };
        if (
          (v.promise(w),
          (f.url = ((e || f.url || It.href) + "").replace(
            qt,
            It.protocol + "//",
          )),
          (f.type = t.method || t.type || f.method || f.type),
          (f.dataTypes = (f.dataType || "*").toLowerCase().match(R) || [""]),
          null == f.crossDomain)
        ) {
          o = C.createElement("a");
          try {
            ((o.href = f.url),
              (o.href = o.href),
              (f.crossDomain =
                _t.protocol + "//" + _t.host != o.protocol + "//" + o.host));
          } catch (e) {
            f.crossDomain = !0;
          }
        }
        if (
          (f.data &&
            f.processData &&
            "string" != typeof f.data &&
            (f.data = H.param(f.data, f.traditional)),
          Qt(Wt, f, t, w),
          h)
        )
          return w;
        for (i in ((p = H.event && f.global) &&
          0 == H.active++ &&
          H.event.trigger("ajaxStart"),
        (f.type = f.type.toUpperCase()),
        (f.hasContent = !Mt.test(f.type)),
        (c = f.url.replace(Ft, "")),
        f.hasContent
          ? f.data &&
            f.processData &&
            0 ===
              (f.contentType || "").indexOf(
                "application/x-www-form-urlencoded",
              ) &&
            (f.data = f.data.replace(Rt, "+"))
          : ((o = f.url.slice(c.length)),
            f.data &&
              (f.processData || "string" == typeof f.data) &&
              ((c += (kt.test(c) ? "&" : "?") + f.data), delete f.data),
            !1 === f.cache &&
              ((c = c.replace(Nt, "$1")),
              (o = (kt.test(c) ? "&" : "?") + "_=" + At.guid++ + o)),
            (f.url = c + o)),
        f.ifModified &&
          (H.lastModified[c] &&
            w.setRequestHeader("If-Modified-Since", H.lastModified[c]),
          H.etag[c] && w.setRequestHeader("If-None-Match", H.etag[c])),
        ((f.data && f.hasContent && !1 !== f.contentType) || t.contentType) &&
          w.setRequestHeader("Content-Type", f.contentType),
        w.setRequestHeader(
          "Accept",
          f.dataTypes[0] && f.accepts[f.dataTypes[0]]
            ? f.accepts[f.dataTypes[0]] +
                ("*" !== f.dataTypes[0] ? ", " + zt + "; q=0.01" : "")
            : f.accepts["*"],
        ),
        f.headers))
          w.setRequestHeader(i, f.headers[i]);
        if (f.beforeSend && (!1 === f.beforeSend.call(g, w, f) || h))
          return w.abort();
        if (
          ((a = "abort"),
          b.add(f.complete),
          w.done(f.success),
          w.fail(f.error),
          (l = Qt(Bt, f, t, w)))
        ) {
          if (((w.readyState = 1), p && m.trigger("ajaxSend", [w, f]), h))
            return w;
          f.async &&
            0 < f.timeout &&
            (d = P.setTimeout(function () {
              w.abort("timeout");
            }, f.timeout));
          try {
            ((h = !1), l.send(r, x));
          } catch (e) {
            if (h) throw e;
            x(-1, e);
          }
        } else x(-1, "No Transport");
        function x(e, t, n, i) {
          var o,
            r,
            s,
            a = t;
          h ||
            ((h = !0),
            d && P.clearTimeout(d),
            (l = void 0),
            (u = i || ""),
            (w.readyState = 0 < e ? 4 : 0),
            (i = (200 <= e && e < 300) || 304 === e),
            n &&
              (s = (function (e, t, n) {
                for (
                  var i, o, r, s, a = e.contents, l = e.dataTypes;
                  "*" === l[0];

                )
                  (l.shift(),
                    void 0 === i &&
                      (i = e.mimeType || t.getResponseHeader("Content-Type")));
                if (i)
                  for (o in a)
                    if (a[o] && a[o].test(i)) {
                      l.unshift(o);
                      break;
                    }
                if (l[0] in n) r = l[0];
                else {
                  for (o in n) {
                    if (!l[0] || e.converters[o + " " + l[0]]) {
                      r = o;
                      break;
                    }
                    s = s || o;
                  }
                  r = r || s;
                }
                if (r) return (r !== l[0] && l.unshift(r), n[r]);
              })(f, w, n)),
            !i &&
              -1 < H.inArray("script", f.dataTypes) &&
              (f.converters["text script"] = function () {}),
            (s = (function (e, t, n, i) {
              var o,
                r,
                s,
                a,
                l,
                c = {},
                u = e.dataTypes.slice();
              if (u[1])
                for (s in e.converters) c[s.toLowerCase()] = e.converters[s];
              for (r = u.shift(); r; )
                if (
                  (e.responseFields[r] && (n[e.responseFields[r]] = t),
                  !l && i && e.dataFilter && (t = e.dataFilter(t, e.dataType)),
                  (l = r),
                  (r = u.shift()))
                )
                  if ("*" === r) r = l;
                  else if ("*" !== l && l !== r) {
                    if (!(s = c[l + " " + r] || c["* " + r]))
                      for (o in c)
                        if (
                          (a = o.split(" "))[1] === r &&
                          (s = c[l + " " + a[0]] || c["* " + a[0]])
                        ) {
                          !0 === s
                            ? (s = c[o])
                            : !0 !== c[o] && ((r = a[0]), u.unshift(a[1]));
                          break;
                        }
                    if (!0 !== s)
                      if (s && e.throws) t = s(t);
                      else
                        try {
                          t = s(t);
                        } catch (e) {
                          return {
                            state: "parsererror",
                            error: s
                              ? e
                              : "No conversion from " + l + " to " + r,
                          };
                        }
                  }
              return { state: "success", data: t };
            })(f, s, w, i)),
            i
              ? (f.ifModified &&
                  ((n = w.getResponseHeader("Last-Modified")) &&
                    (H.lastModified[c] = n),
                  (n = w.getResponseHeader("etag")) && (H.etag[c] = n)),
                204 === e || "HEAD" === f.type
                  ? (a = "nocontent")
                  : 304 === e
                    ? (a = "notmodified")
                    : ((a = s.state), (o = s.data), (i = !(r = s.error))))
              : ((r = a), (!e && a) || ((a = "error"), e < 0 && (e = 0))),
            (w.status = e),
            (w.statusText = (t || a) + ""),
            i ? v.resolveWith(g, [o, a, w]) : v.rejectWith(g, [w, a, r]),
            w.statusCode(y),
            (y = void 0),
            p && m.trigger(i ? "ajaxSuccess" : "ajaxError", [w, f, i ? o : r]),
            b.fireWith(g, [w, a]),
            p &&
              (m.trigger("ajaxComplete", [w, f]),
              --H.active || H.event.trigger("ajaxStop")));
        }
        return w;
      },
      getJSON: function (e, t, n) {
        return H.get(e, t, n, "json");
      },
      getScript: function (e, t) {
        return H.get(e, void 0, t, "script");
      },
    }),
    H.each(["get", "post"], function (e, o) {
      H[o] = function (e, t, n, i) {
        return (
          g(t) && ((i = i || n), (n = t), (t = void 0)),
          H.ajax(
            H.extend(
              { url: e, type: o, dataType: i, data: t, success: n },
              H.isPlainObject(e) && e,
            ),
          )
        );
      };
    }),
    H.ajaxPrefilter(function (e) {
      for (var t in e.headers)
        "content-type" === t.toLowerCase() &&
          (e.contentType = e.headers[t] || "");
    }),
    (H._evalUrl = function (e, t, n) {
      return H.ajax({
        url: e,
        type: "GET",
        dataType: "script",
        cache: !0,
        async: !1,
        global: !1,
        converters: { "text script": function () {} },
        dataFilter: function (e) {
          H.globalEval(e, t, n);
        },
      });
    }),
    H.fn.extend({
      wrapAll: function (e) {
        return (
          this[0] &&
            (g(e) && (e = e.call(this[0])),
            (e = H(e, this[0].ownerDocument).eq(0).clone(!0)),
            this[0].parentNode && e.insertBefore(this[0]),
            e
              .map(function () {
                for (var e = this; e.firstElementChild; )
                  e = e.firstElementChild;
                return e;
              })
              .append(this)),
          this
        );
      },
      wrapInner: function (n) {
        return g(n)
          ? this.each(function (e) {
              H(this).wrapInner(n.call(this, e));
            })
          : this.each(function () {
              var e = H(this),
                t = e.contents();
              t.length ? t.wrapAll(n) : e.append(n);
            });
      },
      wrap: function (t) {
        var n = g(t);
        return this.each(function (e) {
          H(this).wrapAll(n ? t.call(this, e) : t);
        });
      },
      unwrap: function (e) {
        return (
          this.parent(e)
            .not("body")
            .each(function () {
              H(this).replaceWith(this.childNodes);
            }),
          this
        );
      },
    }),
    (H.expr.pseudos.hidden = function (e) {
      return !H.expr.pseudos.visible(e);
    }),
    (H.expr.pseudos.visible = function (e) {
      return !!(e.offsetWidth || e.offsetHeight || e.getClientRects().length);
    }),
    (H.ajaxSettings.xhr = function () {
      try {
        return new P.XMLHttpRequest();
      } catch (e) {}
    }));
  var Xt = { 0: 200, 1223: 204 },
    Gt = H.ajaxSettings.xhr();
  ((y.cors = !!Gt && "withCredentials" in Gt),
    (y.ajax = Gt = !!Gt),
    H.ajaxTransport(function (o) {
      var r, s;
      if (y.cors || (Gt && !o.crossDomain))
        return {
          send: function (e, t) {
            var n,
              i = o.xhr();
            if (
              (i.open(o.type, o.url, o.async, o.username, o.password),
              o.xhrFields)
            )
              for (n in o.xhrFields) i[n] = o.xhrFields[n];
            for (n in (o.mimeType &&
              i.overrideMimeType &&
              i.overrideMimeType(o.mimeType),
            o.crossDomain ||
              e["X-Requested-With"] ||
              (e["X-Requested-With"] = "XMLHttpRequest"),
            e))
              i.setRequestHeader(n, e[n]);
            ((r = function (e) {
              return function () {
                r &&
                  ((r =
                    s =
                    i.onload =
                    i.onerror =
                    i.onabort =
                    i.ontimeout =
                    i.onreadystatechange =
                      null),
                  "abort" === e
                    ? i.abort()
                    : "error" === e
                      ? "number" != typeof i.status
                        ? t(0, "error")
                        : t(i.status, i.statusText)
                      : t(
                          Xt[i.status] || i.status,
                          i.statusText,
                          "text" !== (i.responseType || "text") ||
                            "string" != typeof i.responseText
                            ? { binary: i.response }
                            : { text: i.responseText },
                          i.getAllResponseHeaders(),
                        ));
              };
            }),
              (i.onload = r()),
              (s = i.onerror = i.ontimeout = r("error")),
              void 0 !== i.onabort
                ? (i.onabort = s)
                : (i.onreadystatechange = function () {
                    4 === i.readyState &&
                      P.setTimeout(function () {
                        r && s();
                      });
                  }),
              (r = r("abort")));
            try {
              i.send((o.hasContent && o.data) || null);
            } catch (e) {
              if (r) throw e;
            }
          },
          abort: function () {
            r && r();
          },
        };
    }),
    H.ajaxPrefilter(function (e) {
      e.crossDomain && (e.contents.script = !1);
    }),
    H.ajaxSetup({
      accepts: {
        script:
          "text/javascript, application/javascript, application/ecmascript, application/x-ecmascript",
      },
      contents: { script: /\b(?:java|ecma)script\b/ },
      converters: {
        "text script": function (e) {
          return (H.globalEval(e), e);
        },
      },
    }),
    H.ajaxPrefilter("script", function (e) {
      (void 0 === e.cache && (e.cache = !1), e.crossDomain && (e.type = "GET"));
    }),
    H.ajaxTransport("script", function (n) {
      var i, o;
      if (n.crossDomain || n.scriptAttrs)
        return {
          send: function (e, t) {
            ((i = H("<script>")
              .attr(n.scriptAttrs || {})
              .prop({ charset: n.scriptCharset, src: n.url })
              .on(
                "load error",
                (o = function (e) {
                  (i.remove(),
                    (o = null),
                    e && t("error" === e.type ? 404 : 200, e.type));
                }),
              )),
              C.head.appendChild(i[0]));
          },
          abort: function () {
            o && o();
          },
        };
    }));
  var Jt = [],
    Yt = /(=)\?(?=&|$)|\?\?/;
  (H.ajaxSetup({
    jsonp: "callback",
    jsonpCallback: function () {
      var e = Jt.pop() || H.expando + "_" + At.guid++;
      return ((this[e] = !0), e);
    },
  }),
    H.ajaxPrefilter("json jsonp", function (e, t, n) {
      var i,
        o,
        r,
        s =
          !1 !== e.jsonp &&
          (Yt.test(e.url)
            ? "url"
            : "string" == typeof e.data &&
              0 ===
                (e.contentType || "").indexOf(
                  "application/x-www-form-urlencoded",
                ) &&
              Yt.test(e.data) &&
              "data");
      if (s || "jsonp" === e.dataTypes[0])
        return (
          (i = e.jsonpCallback =
            g(e.jsonpCallback) ? e.jsonpCallback() : e.jsonpCallback),
          s
            ? (e[s] = e[s].replace(Yt, "$1" + i))
            : !1 !== e.jsonp &&
              (e.url += (kt.test(e.url) ? "&" : "?") + e.jsonp + "=" + i),
          (e.converters["script json"] = function () {
            return (r || H.error(i + " was not called"), r[0]);
          }),
          (e.dataTypes[0] = "json"),
          (o = P[i]),
          (P[i] = function () {
            r = arguments;
          }),
          n.always(function () {
            (void 0 === o ? H(P).removeProp(i) : (P[i] = o),
              e[i] && ((e.jsonpCallback = t.jsonpCallback), Jt.push(i)),
              r && g(o) && o(r[0]),
              (r = o = void 0));
          }),
          "script"
        );
    }),
    (y.createHTMLDocument =
      (((d = C.implementation.createHTMLDocument("").body).innerHTML =
        "<form></form><form></form>"),
      2 === d.childNodes.length)),
    (H.parseHTML = function (e, t, n) {
      return "string" != typeof e
        ? []
        : ("boolean" == typeof t && ((n = t), (t = !1)),
          t ||
            (y.createHTMLDocument
              ? (((i = (t =
                  C.implementation.createHTMLDocument("")).createElement(
                  "base",
                )).href = C.location.href),
                t.head.appendChild(i))
              : (t = C)),
          (i = !n && []),
          (n = I.exec(e))
            ? [t.createElement(n[1])]
            : ((n = ve([e], t, i)),
              i && i.length && H(i).remove(),
              H.merge([], n.childNodes)));
      var i;
    }),
    (H.fn.load = function (e, t, n) {
      var i,
        o,
        r,
        s = this,
        a = e.indexOf(" ");
      return (
        -1 < a && ((i = Pt(e.slice(a))), (e = e.slice(0, a))),
        g(t)
          ? ((n = t), (t = void 0))
          : t && "object" == typeof t && (o = "POST"),
        0 < s.length &&
          H.ajax({ url: e, type: o || "GET", dataType: "html", data: t })
            .done(function (e) {
              ((r = arguments),
                s.html(i ? H("<div>").append(H.parseHTML(e)).find(i) : e));
            })
            .always(
              n &&
                function (e, t) {
                  s.each(function () {
                    n.apply(this, r || [e.responseText, t, e]);
                  });
                },
            ),
        this
      );
    }),
    (H.expr.pseudos.animated = function (t) {
      return H.grep(H.timers, function (e) {
        return t === e.elem;
      }).length;
    }),
    (H.offset = {
      setOffset: function (e, t, n) {
        var i,
          o,
          r,
          s,
          a = H.css(e, "position"),
          l = H(e),
          c = {};
        ("static" === a && (e.style.position = "relative"),
          (r = l.offset()),
          (i = H.css(e, "top")),
          (s = H.css(e, "left")),
          (s =
            ("absolute" === a || "fixed" === a) && -1 < (i + s).indexOf("auto")
              ? ((o = (a = l.position()).top), a.left)
              : ((o = parseFloat(i) || 0), parseFloat(s) || 0)),
          null != (t = g(t) ? t.call(e, n, H.extend({}, r)) : t).top &&
            (c.top = t.top - r.top + o),
          null != t.left && (c.left = t.left - r.left + s),
          "using" in t
            ? t.using.call(e, c)
            : ("number" == typeof c.top && (c.top += "px"),
              "number" == typeof c.left && (c.left += "px"),
              l.css(c)));
      },
    }),
    H.fn.extend({
      offset: function (t) {
        if (arguments.length)
          return void 0 === t
            ? this
            : this.each(function (e) {
                H.offset.setOffset(this, t, e);
              });
        var e,
          n = this[0];
        return n
          ? n.getClientRects().length
            ? ((e = n.getBoundingClientRect()),
              (n = n.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,
            i = this[0],
            o = { top: 0, left: 0 };
          if ("fixed" === H.css(i, "position")) t = i.getBoundingClientRect();
          else {
            for (
              t = this.offset(),
                n = i.ownerDocument,
                e = i.offsetParent || n.documentElement;
              e &&
              (e === n.body || e === n.documentElement) &&
              "static" === H.css(e, "position");

            )
              e = e.parentNode;
            e &&
              e !== i &&
              1 === e.nodeType &&
              (((o = H(e).offset()).top += H.css(e, "borderTopWidth", !0)),
              (o.left += H.css(e, "borderLeftWidth", !0)));
          }
          return {
            top: t.top - o.top - H.css(i, "marginTop", !0),
            left: t.left - o.left - H.css(i, "marginLeft", !0),
          };
        }
      },
      offsetParent: function () {
        return this.map(function () {
          for (
            var e = this.offsetParent;
            e && "static" === H.css(e, "position");

          )
            e = e.offsetParent;
          return e || ie;
        });
      },
    }),
    H.each(
      { scrollLeft: "pageXOffset", scrollTop: "pageYOffset" },
      function (t, o) {
        var r = "pageYOffset" === o;
        H.fn[t] = function (e) {
          return B(
            this,
            function (e, t, n) {
              var i;
              return (
                m(e) ? (i = e) : 9 === e.nodeType && (i = e.defaultView),
                void 0 === n
                  ? i
                    ? i[o]
                    : e[t]
                  : void (i
                      ? i.scrollTo(r ? i.pageXOffset : n, r ? n : i.pageYOffset)
                      : (e[t] = n))
              );
            },
            t,
            e,
            arguments.length,
          );
        };
      },
    ),
    H.each(["top", "left"], function (e, n) {
      H.cssHooks[n] = Xe(y.pixelPosition, function (e, t) {
        if (t)
          return ((t = Ve(e, n)), Ue.test(t) ? H(e).position()[n] + "px" : t);
      });
    }),
    H.each({ Height: "height", Width: "width" }, function (s, a) {
      H.each(
        { padding: "inner" + s, content: a, "": "outer" + s },
        function (i, r) {
          H.fn[r] = function (e, t) {
            var n = arguments.length && (i || "boolean" != typeof e),
              o = i || (!0 === e || !0 === t ? "margin" : "border");
            return B(
              this,
              function (e, t, n) {
                var i;
                return m(e)
                  ? 0 === r.indexOf("outer")
                    ? e["inner" + s]
                    : e.document.documentElement["client" + s]
                  : 9 === e.nodeType
                    ? ((i = e.documentElement),
                      Math.max(
                        e.body["scroll" + s],
                        i["scroll" + s],
                        e.body["offset" + s],
                        i["offset" + s],
                        i["client" + s],
                      ))
                    : void 0 === n
                      ? H.css(e, t, o)
                      : H.style(e, t, n, o);
              },
              a,
              n ? e : void 0,
              n,
            );
          };
        },
      );
    }),
    H.each(
      [
        "ajaxStart",
        "ajaxStop",
        "ajaxComplete",
        "ajaxError",
        "ajaxSuccess",
        "ajaxSend",
      ],
      function (e, t) {
        H.fn[t] = function (e) {
          return this.on(t, e);
        };
      },
    ),
    H.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, i) {
        return this.on(t, e, n, i);
      },
      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);
      },
    }),
    H.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) {
        H.fn[n] = function (e, t) {
          return 0 < arguments.length
            ? this.on(n, null, e, t)
            : this.trigger(n);
        };
      },
    ));
  var Kt = /^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g;
  ((H.proxy = function (e, t) {
    var n, i;
    if (("string" == typeof t && ((i = e[t]), (t = e), (e = i)), g(e)))
      return (
        (n = a.call(arguments, 2)),
        ((i = function () {
          return e.apply(t || this, n.concat(a.call(arguments)));
        }).guid = e.guid =
          e.guid || H.guid++),
        i
      );
  }),
    (H.holdReady = function (e) {
      e ? H.readyWait++ : H.ready(!0);
    }),
    (H.isArray = Array.isArray),
    (H.parseJSON = JSON.parse),
    (H.nodeName = S),
    (H.isFunction = g),
    (H.isWindow = m),
    (H.camelCase = Q),
    (H.type = f),
    (H.now = Date.now),
    (H.isNumeric = function (e) {
      var t = H.type(e);
      return ("number" === t || "string" === t) && !isNaN(e - parseFloat(e));
    }),
    (H.trim = function (e) {
      return null == e ? "" : (e + "").replace(Kt, "");
    }),
    "function" == typeof define &&
      define.amd &&
      define("jquery", [], function () {
        return H;
      }));
  var Zt = P.jQuery,
    en = P.$;
  return (
    (H.noConflict = function (e) {
      return (
        P.$ === H && (P.$ = en),
        e && P.jQuery === H && (P.jQuery = Zt),
        H
      );
    }),
    void 0 === e && (P.jQuery = P.$ = H),
    H
  );
});
var H5P = (window.H5P = window.H5P || {});
((H5P.jQuery = jQuery.noConflict(!0)),
  (H5P.jQuery.fn.__originalLoad = H5P.jQuery.load),
  (H5P.jQuery.fn.load = function (e, t, n) {
    if ("function" != typeof e)
      return H5P.jQuery.fn.__originalLoad.apply(this, arguments);
    {
      console.warn("You are using a deprecated H5P library. Please upgrade!");
      let e = Array.prototype.slice.call(arguments);
      return (e.unshift("load"), H5P.jQuery.fn.on.apply(this, e));
    }
  }),
  ((H5P = window.H5P = window.H5P || {}).isFramed =
    window.self !== window.parent),
  (H5P.$window = H5P.jQuery(window)),
  (H5P.instances = []),
  document.documentElement.requestFullScreen
    ? (H5P.fullScreenBrowserPrefix = "")
    : document.documentElement.webkitRequestFullScreen
      ? ((H5P.safariBrowser = navigator.userAgent.match(/version\/([.\d]+)/i)),
        (H5P.safariBrowser =
          null === H5P.safariBrowser ? 0 : parseInt(H5P.safariBrowser[1])),
        (0 === H5P.safariBrowser || 6 < H5P.safariBrowser) &&
          (H5P.fullScreenBrowserPrefix = "webkit"))
      : document.documentElement.mozRequestFullScreen
        ? (H5P.fullScreenBrowserPrefix = "moz")
        : document.documentElement.msRequestFullscreen &&
          (H5P.fullScreenBrowserPrefix = "ms"),
  (H5P.opened = {}),
  (H5P.init = function (e) {
    (void 0 === H5P.$body && (H5P.$body = H5P.jQuery(document.body)),
      void 0 === H5P.fullscreenSupported &&
        (H5P.fullscreenSupported = !(
          H5PIntegration.fullscreenDisabled ||
          H5P.fullscreenDisabled ||
          (H5P.isFramed &&
            !1 !== H5P.externalEmbed &&
            !(
              document.fullscreenEnabled ||
              document.webkitFullscreenEnabled ||
              document.mozFullScreenEnabled
            ))
        )),
      void 0 === H5P.canHasFullScreen &&
        (H5P.canHasFullScreen = H5P.fullscreenSupported),
      H5P.jQuery(".h5p-content:not(.h5p-initialized)", e).each(function () {
        var t = H5P.jQuery(this).addClass("h5p-initialized"),
          n = H5P.jQuery('<div class="h5p-container"></div>').appendTo(t),
          o = t.data("content-id"),
          r = H5PIntegration.contents["cid-" + o];
        if (void 0 === r)
          return H5P.error(
            "No data for content id " + o + ". Perhaps the library is gone?",
          );
        var s = {
          library: r.library,
          params: JSON.parse(r.jsonContent),
          metadata: r.metadata,
        };
        var a = H5P.newRunnable(s, o, n, !0, { standalone: !0 });
        ((H5P.offlineRequestQueue = new H5P.OfflineRequestQueue({
          instance: a,
        })),
          1 == r.fullScreen &&
            H5P.fullscreenSupported &&
            H5P.jQuery(
              '<div class="h5p-content-controls"><div role="button" tabindex="0" class="h5p-enable-fullscreen" aria-label="' +
                H5P.t("fullscreen") +
                '" title="' +
                H5P.t("fullscreen") +
                '"></div></div>',
            )
              .prependTo(n)
              .children()
              .click(function () {
                H5P.fullScreen(n, a);
              })
              .keydown(function (e) {
                if (32 === e.which || 13 === e.which)
                  return (H5P.fullScreen(n, a), !1);
              }));
        var e,
          i,
          l,
          c,
          u,
          d,
          h,
          p = r.displayOptions,
          f = !1;
        (p.frame &&
          (p.copyright &&
            ((e = H5P.getCopyrights(a, s.params, o, s.metadata)) ||
              (p.copyright = !1)),
          (p = new H5P.ActionBar(p)),
          (i = p.getDOMElement()),
          p.on("reuse", function () {
            (H5P.openReuseDialog(i, r, s, a, o),
              a.triggerXAPI("accessed-reuse"));
          }),
          p.on("copyrights", function () {
            (new H5P.Dialog(
              "copyrights",
              H5P.t("copyrightInformation"),
              e,
              n,
            ).open(!0),
              a.triggerXAPI("accessed-copyright"));
          }),
          p.on("embed", function () {
            (H5P.openEmbedDialog(
              i,
              r.embedCode,
              r.resizeCode,
              { width: t.width(), height: t.height() },
              a,
            ),
              a.triggerXAPI("accessed-embed"));
          }),
          p.hasActions() && ((f = !0), i.insertAfter(n))),
          t.addClass(f ? "h5p-frame" : "h5p-no-frame"),
          (H5P.opened[o] = new Date()),
          H5P.on(a, "finish", function (e) {
            void 0 !== e.data &&
              H5P.setFinished(o, e.data.score, e.data.maxScore, e.data.time);
          }),
          H5P.on(a, "xAPI", H5P.xAPICompletedListener),
          !1 !== H5PIntegration.saveFreq &&
            (a.getCurrentState instanceof Function ||
              "function" == typeof a.getCurrentState) &&
            ((c = function () {
              var e = a.getCurrentState();
              (void 0 !== e &&
                H5P.setUserData(o, "state", e, { deleteOnChange: !0 }),
                H5PIntegration.saveFreq &&
                  (l = setTimeout(c, 1e3 * H5PIntegration.saveFreq)));
            }),
            H5PIntegration.saveFreq &&
              (l = setTimeout(c, 1e3 * H5PIntegration.saveFreq)),
            H5P.on(a, "xAPI", function (e) {
              e = e.getVerb();
              ("completed" !== e && "progressed" !== e) ||
                (clearTimeout(l), (l = setTimeout(c, 3e3)));
            })),
          H5P.isFramed &&
            (!1 === H5P.externalEmbed
              ? ((d = window.frameElement),
                H5P.on(a, "resize", function () {
                  (clearTimeout(u),
                    (u = setTimeout(function () {
                      var e;
                      window.parent.H5P.isFullscreen ||
                        ((e = d.parentElement.style.height),
                        (d.parentElement.style.height =
                          d.parentElement.clientHeight + "px"),
                        d.getBoundingClientRect(),
                        (d.style.height = "1px"),
                        (d.style.height =
                          d.contentDocument.body.scrollHeight + "px"),
                        (d.parentElement.style.height = e));
                    }, 1)));
                }))
              : H5P.communicator &&
                ((h = !1),
                H5P.communicator.on("ready", function () {
                  H5P.communicator.send("hello");
                }),
                H5P.communicator.on("hello", function () {
                  ((h = !0),
                    (document.body.style.height = "auto"),
                    (document.body.style.overflow = "hidden"),
                    H5P.trigger(a, "resize"));
                }),
                H5P.communicator.on("resizePrepared", function () {
                  H5P.communicator.send("resize", {
                    scrollHeight: document.body.scrollHeight,
                  });
                }),
                H5P.communicator.on("resize", function () {
                  H5P.trigger(a, "resize");
                }),
                H5P.on(a, "resize", function () {
                  H5P.isFullscreen ||
                    (clearTimeout(u),
                    (u = setTimeout(function () {
                      h
                        ? H5P.communicator.send("prepareResize", {
                            scrollHeight: document.body.scrollHeight,
                            clientHeight: document.body.clientHeight,
                          })
                        : H5P.communicator.send("hello");
                    }, 0)));
                }))),
          (H5P.isFramed && !1 !== H5P.externalEmbed) ||
            H5P.jQuery(window.parent).resize(function () {
              (window.parent.H5P.isFullscreen, H5P.trigger(a, "resize"));
            }),
          H5P.instances.push(a),
          H5P.trigger(a, "resize"),
          t.addClass("using-mouse"),
          t.on("mousedown keydown keyup", function (e) {
            t.toggleClass("using-mouse", "mousedown" === e.type);
          }),
          H5P.externalDispatcher &&
            H5P.externalDispatcher.trigger("initialized"));
      }),
      H5P.jQuery("iframe.h5p-iframe:not(.h5p-initialized)", e).each(
        function () {
          var e = H5P.jQuery(this)
              .addClass("h5p-initialized")
              .data("content-id"),
            t = H5PIntegration.contents["cid-" + e],
            t =
              t && t.metadata && t.metadata.defaultLanguage
                ? t.metadata.defaultLanguage
                : "en";
          (this.contentDocument.open(),
            this.contentDocument.write(
              '<!doctype html><html class="h5p-iframe" lang="' +
                t +
                '"><head>' +
                H5P.getHeadTags(e) +
                '</head><body><div class="h5p-content" data-content-id="' +
                e +
                '"/></body></html>',
            ),
            this.contentDocument.close());
        },
      ));
  }),
  (H5P.getHeadTags = function (e) {
    function t(e) {
      for (var t = "", n = 0; n < e.length; n++)
        t += '<link rel="stylesheet" href="' + e[n] + '">';
      return t;
    }
    function n(e) {
      for (var t = "", n = 0; n < e.length; n++)
        t += '<script src="' + e[n] + '"></script>';
      return t;
    }
    return (
      '<base target="_parent">' +
      t(H5PIntegration.core.styles) +
      t(H5PIntegration.contents["cid-" + e].styles) +
      n(H5PIntegration.core.scripts) +
      n(H5PIntegration.contents["cid-" + e].scripts) +
      "<script>H5PIntegration = window.parent.H5PIntegration; var H5P = H5P || {}; H5P.externalEmbed = false;</script>"
    );
  }),
  (H5P.communicator =
    window.postMessage && window.addEventListener
      ? new (function () {
          var n = {};
          (window.addEventListener(
            "message",
            function (e) {
              window.parent === e.source &&
                "h5p" === e.data.context &&
                void 0 !== n[e.data.action] &&
                n[e.data.action](e.data);
            },
            !1,
          ),
            (this.on = function (e, t) {
              n[e] = t;
            }),
            (this.send = function (e, t) {
              (((t = void 0 === t ? {} : t).context = "h5p"),
                (t.action = e),
                window.parent.postMessage(t, "*"));
            }));
        })()
      : void 0),
  (H5P.semiFullScreen = function (e, t, n, i) {
    H5P.fullScreen(e, t, n, i, !0);
  }),
  (H5P.fullScreen = function (e, t, n, i, o) {
    if (void 0 === H5P.exitFullScreen) {
      if (H5P.isFramed && !1 === H5P.externalEmbed)
        return (
          window.parent.H5P.fullScreen(e, t, n, H5P.$body.get(), o),
          (H5P.isFullscreen = !0),
          (H5P.exitFullScreen = function () {
            window.parent.H5P.exitFullScreen();
          }),
          void H5P.on(t, "exitFullScreen", function () {
            ((H5P.isFullscreen = !1), (H5P.exitFullScreen = void 0));
          })
        );
      var r,
        s,
        a,
        l = e;
      (void 0 === i
        ? (r = H5P.$body)
        : ((s = (r = H5P.jQuery(i)).add(e.get())),
          (i = "#h5p-iframe-" + e.parent().data("content-id")),
          (e = (a = H5P.jQuery(i)).parent())),
        (s = e.add(H5P.$body).add(s)));
      function c(e) {
        (s.addClass(e), void 0 !== a && a.css("height", ""));
      }
      function u() {
        (H5P.trigger(t, "resize"),
          H5P.trigger(t, "focus"),
          H5P.trigger(t, "enterFullScreen"));
      }
      function d(e) {
        ((H5P.isFullscreen = !1),
          s.removeClass(e),
          H5P.trigger(t, "resize"),
          H5P.trigger(t, "focus"),
          (H5P.exitFullScreen = void 0) !== n && n(),
          H5P.trigger(t, "exitFullScreen"));
      }
      if (
        ((H5P.isFullscreen = !0),
        void 0 === H5P.fullScreenBrowserPrefix || !0 === o)
      ) {
        if (!H5P.isFramed) {
          c("h5p-semi-fullscreen");
          var h,
            p,
            f = H5P.jQuery(
              '<div role="button" tabindex="0" class="h5p-disable-fullscreen" title="' +
                H5P.t("disableFullscreen") +
                '" aria-label="' +
                H5P.t("disableFullscreen") +
                '"></div>',
            ).appendTo(l.find(".h5p-content-controls")),
            g = (H5P.exitFullScreen = function () {
              (h ? (p.content = h) : v.removeChild(p),
                f.remove(),
                r.unbind("keyup", m),
                d("h5p-semi-fullscreen"));
            }),
            m = function (e) {
              27 === e.keyCode && g();
            };
          (f.click(g), r.keyup(m));
          for (
            var v, b = document.getElementsByTagName("meta"), y = 0;
            y < b.length;
            y++
          )
            if ("viewport" === b[y].name) {
              ((p = b[y]), (h = p.content));
              break;
            }
          (h || ((p = document.createElement("meta")).name = "viewport"),
            (p.content =
              "width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0"),
            h || (v = document.getElementsByTagName("head")[0]).appendChild(p),
            u());
        }
      } else {
        c("h5p-fullscreen");
        var w,
          x =
            "ms" === H5P.fullScreenBrowserPrefix
              ? "MSFullscreenChange"
              : H5P.fullScreenBrowserPrefix + "fullscreenchange";
        (document.addEventListener(x, function () {
          return void 0 === w
            ? ((w = !1), void u())
            : (d("h5p-fullscreen"),
              void document.removeEventListener(x, arguments.callee, !1));
        }),
          "" === H5P.fullScreenBrowserPrefix
            ? e[0].requestFullScreen()
            : ((o =
                "ms" === H5P.fullScreenBrowserPrefix
                  ? "msRequestFullscreen"
                  : H5P.fullScreenBrowserPrefix + "RequestFullScreen"),
              (l =
                "webkit" === H5P.fullScreenBrowserPrefix &&
                0 === H5P.safariBrowser
                  ? Element.ALLOW_KEYBOARD_INPUT
                  : void 0),
              e[0][o](l)),
          (H5P.exitFullScreen = function () {
            "" === H5P.fullScreenBrowserPrefix
              ? document.exitFullscreen()
              : "moz" === H5P.fullScreenBrowserPrefix
                ? document.mozCancelFullScreen()
                : document[H5P.fullScreenBrowserPrefix + "ExitFullscreen"]();
          }));
      }
    }
  }),
  (function () {
    ((H5P.addQueryParameter = function (e, t) {
      let n, i;
      const o = e.split("?");
      return (
        (n = o[1]
          ? ((i = o[1].split("#")), o[0] + "?" + i[0] + "&")
          : ((i = o[0].split("#")), i[0] + "?")),
        (n += t),
        i[1] && (n += "#" + i[1]),
        n
      );
    }),
      (H5P.setSource = function (e, t, n) {
        let i = t.path;
        t = H5P.getCrossOrigin(t);
        (t
          ? ((e.crossOrigin = t),
            H5PIntegration.crossoriginCacheBuster &&
              (i = H5P.addQueryParameter(
                i,
                H5PIntegration.crossoriginCacheBuster,
              )))
          : e.removeAttribute("crossorigin"),
          (e.src = H5P.getPath(i, n)));
      }));
    function o(e) {
      return e.match(/^[a-z0-9]+:\/\//i);
    }
    ((H5P.getCrossOrigin = function (e) {
      return "object" != typeof e
        ? H5PIntegration.crossorigin &&
          H5PIntegration.crossoriginRegex &&
          e.match(H5PIntegration.crossoriginRegex)
          ? H5PIntegration.crossorigin
          : null
        : H5PIntegration.crossorigin && !o(e.path)
          ? H5PIntegration.crossorigin
          : void 0;
    }),
      (H5P.getPath = function (e, t) {
        if (o(e)) return e;
        var n,
          i = "#tmp" === e.substr(-4, 4);
        if (void 0 === t || i) {
          if (void 0 === window.H5PEditor) return;
          n = H5PEditor.filesPath;
        } else
          n =
            (n =
              void 0 !== H5PIntegration.contents &&
              H5PIntegration.contents["cid-" + t]
                ? H5PIntegration.contents["cid-" + t].contentUrl
                : n) || H5PIntegration.url + "/content/" + t;
        return (
          (n = !o(n)
            ? window.location.protocol + "//" + window.location.host + n
            : n) +
          "/" +
          e
        );
      }));
  })(),
  (H5P.getContentPath = function (e) {
    return H5PIntegration.url + "/content/" + e;
  }),
  (H5P.classFromName = function (e) {
    e = e.split(".");
    return this[e[e.length - 1]];
  }),
  (H5P.newRunnable = function (t, e, n, i, o) {
    var r, s;
    try {
      ((s = (a = t.library.split(" ", 2))[0]), (r = a[1].split(".", 2)));
    } catch (e) {
      return H5P.error("Invalid library string: " + t.library);
    }
    if (t.params instanceof Object != !0 || t.params instanceof Array == !0)
      return (
        H5P.error("Invalid library params for: " + t.library),
        H5P.error(t.params)
      );
    try {
      for (var a = a[0].split("."), l = window, c = 0; c < a.length; c++)
        l = l[a[c]];
      if ("function" != typeof l) throw null;
    } catch (e) {
      return H5P.error("Unable to find constructor for: " + t.library);
    }
    (void 0 === o && (o = {}),
      t.subContentId && (o.subContentId = t.subContentId),
      t.userDatas &&
        t.userDatas.state &&
        H5PIntegration.saveFreq &&
        (o.previousState = t.userDatas.state),
      t.metadata && (o.metadata = t.metadata));
    var u,
      d = o.standalone || !1;
    return (
      (l.prototype = H5P.jQuery.extend(
        {},
        H5P.ContentType(d).prototype,
        l.prototype,
      )),
      void 0 ===
        (u =
          -1 <
          H5P.jQuery.inArray(t.library, [
            "H5P.CoursePresentation 1.0",
            "H5P.CoursePresentation 1.1",
            "H5P.CoursePresentation 1.2",
            "H5P.CoursePresentation 1.3",
          ])
            ? new l(t.params, e)
            : new l(t.params, e, o)).$ && (u.$ = H5P.jQuery(u)),
      void 0 === u.contentId && (u.contentId = e),
      void 0 === u.subContentId &&
        t.subContentId &&
        (u.subContentId = t.subContentId),
      void 0 === u.parent && o && o.parent && (u.parent = o.parent),
      void 0 === u.libraryInfo &&
        (u.libraryInfo = {
          versionedName: t.library,
          versionedNameNoSpaces: s + "-" + r[0] + "." + r[1],
          machineName: s,
          majorVersion: r[0],
          minorVersion: r[1],
        }),
      void 0 !== n &&
        (n.toggleClass("h5p-standalone", d),
        u.attach(n),
        H5P.trigger(
          u,
          "domChanged",
          { $target: n, library: s, key: "newLibrary" },
          { bubbles: !0, external: !0 },
        ),
        (void 0 !== i && i) || H5P.trigger(u, "resize")),
      u
    );
  }),
  (H5P.error = function (e) {
    void 0 !== window.console &&
      void 0 !== console.error &&
      console.error(e.stack || e);
  }),
  (H5P.t = function (e, t, n) {
    if ((void 0 === n && (n = "H5P"), void 0 === H5PIntegration.l10n[n]))
      return '[Missing translation namespace "' + n + '"]';
    if (void 0 === H5PIntegration.l10n[n][e])
      return '[Missing translation "' + e + '" in "' + n + '"]';
    var i = H5PIntegration.l10n[n][e];
    if (void 0 !== t) for (var o in t) i = i.replace(o, t[o]);
    return i;
  }),
  (H5P.Dialog = function (e, t, n, i) {
    var o = this,
      r = H5P.jQuery(
        '<div class="h5p-popup-dialog h5p-' +
          e +
          '-dialog" role="dialog" tabindex="-1">                              <div class="h5p-inner">                                <h2>' +
          t +
          '</h2>                                <div class="h5p-scroll-content">' +
          n +
          '</div>                                <div class="h5p-close" role="button" tabindex="0" aria-label="' +
          H5P.t("close") +
          '" title="' +
          H5P.t("close") +
          '"></div>                              </div>                            </div>',
      )
        .insertAfter(i)
        .click(function (e) {
          (e && e.originalEvent && e.originalEvent.preventClosing) || o.close();
        })
        .children(".h5p-inner")
        .click(function (e) {
          e.originalEvent.preventClosing = !0;
        })
        .find(".h5p-close")
        .click(function () {
          o.close();
        })
        .keypress(function (e) {
          if (13 === e.which || 32 === e.which) return (o.close(), !1);
        })
        .end()
        .find("a")
        .click(function (e) {
          e.stopPropagation();
        })
        .end()
        .end();
    ((o.open = function (e) {
      (e && r.css("height", "100%"),
        setTimeout(function () {
          (r.addClass("h5p-open"),
            H5P.jQuery(o).trigger("dialog-opened", [r]),
            r.focus());
        }, 1));
    }),
      (o.close = function () {
        (r.removeClass("h5p-open"),
          setTimeout(function () {
            (r.remove(),
              H5P.jQuery(o).trigger("dialog-closed", [r]),
              i.attr("tabindex", "-1"),
              i.focus());
          }, 200));
      }));
  }),
  (H5P.getCopyrights = function (e, t, n, i) {
    var o;
    if (void 0 !== e.getCopyrights)
      try {
        o = e.getCopyrights();
      } catch (e) {}
    void 0 === o &&
      ((o = new H5P.ContentCopyrights()), H5P.findCopyrights(o, t, n));
    e = H5P.buildMetadataCopyrights(i, e.libraryInfo.machineName);
    return (
      void 0 !== e && o.addMediaInFront(e),
      (o = void 0 !== o ? o.toString() : o)
    );
  }),
  (H5P.findCopyrights = function (r, e, t, n) {
    var i, o, s, a;
    for (o in (n && ((n.params = e), l(n, n.machineName, t)), e))
      e.hasOwnProperty(o) &&
        ("overrideSettings" !== o
          ? ((s = e[o]) && s.library && "string" == typeof s.library
              ? (i = s.library.split(" ")[0])
              : s &&
                s.library &&
                "object" == typeof s.library &&
                (i =
                  s.library.library && "string" == typeof s.library.library
                    ? s.library.library.split(" ")[0]
                    : i),
            s instanceof Array
              ? H5P.findCopyrights(r, s, t)
              : s instanceof Object &&
                (l(s, i, t),
                void 0 === s.copyright ||
                void 0 === s.copyright.license ||
                void 0 === s.path ||
                void 0 === s.mime
                  ? H5P.findCopyrights(r, s, t)
                  : ((a = new H5P.MediaCopyright(s.copyright)),
                    void 0 !== s.width &&
                      void 0 !== s.height &&
                      a.setThumbnail(
                        new H5P.Thumbnail(
                          H5P.getPath(s.path, t),
                          s.width,
                          s.height,
                        ),
                      ),
                    r.addMedia(a))))
          : (console.warn(
              "The semantics field 'overrideSettings' is DEPRECATED and should not be used.",
            ),
            console.warn(e)));
    function l(e, t, n) {
      if (e.metadata) {
        const o = H5P.buildMetadataCopyrights(e.metadata, t);
        var i;
        void 0 !== o &&
          (e.params &&
            "Image" === e.params.contentName &&
            e.params.file &&
            ((i = e.params.file.path),
            (t = e.params.file.width),
            (e = e.params.file.height),
            o.setThumbnail(new H5P.Thumbnail(H5P.getPath(i, n), t, e))),
          r.addMedia(o));
      }
    }
  }),
  (H5P.buildMetadataCopyrights = function (e) {
    if (e && void 0 !== e.license && "U" !== e.license) {
      e = {
        contentType: e.contentType,
        title: e.title,
        author:
          e.authors && 0 < e.authors.length
            ? e.authors
                .map(function (e) {
                  return e.role ? e.name + " (" + e.role + ")" : e.name;
                })
                .join(", ")
            : void 0,
        source: e.source,
        year: e.yearFrom
          ? e.yearFrom + (e.yearTo ? "-" + e.yearTo : "")
          : void 0,
        license: e.license,
        version: e.licenseVersion,
        licenseExtras: e.licenseExtras,
        changes:
          e.changes && 0 < e.changes.length
            ? e.changes
                .map(function (e) {
                  return (
                    e.log +
                    (e.author ? ", " + e.author : "") +
                    (e.date ? ", " + e.date : "")
                  );
                })
                .join(" / ")
            : void 0,
      };
      return new H5P.MediaCopyright(e);
    }
  }),
  (H5P.openReuseDialog = function (e, n, i, o, r) {
    let t = "";
    (n.displayOptions.export &&
      (t +=
        '<button type="button" class="h5p-big-button h5p-download-button"><div class="h5p-button-title">Download as an .h5p file</div><div class="h5p-button-description">.h5p files may be uploaded to any web-site where H5P content may be created.</div></button>'),
      n.displayOptions.export &&
        n.displayOptions.copy &&
        (t += '<div class="h5p-horizontal-line-text"><span>or</span></div>'),
      n.displayOptions.copy &&
        (t +=
          '<button type="button" class="h5p-big-button h5p-copy-button"><div class="h5p-button-title">Copy content</div><div class="h5p-button-description">Copied content may be pasted anywhere this content type is supported on this website.</div></button>'));
    const s = new H5P.Dialog("reuse", H5P.t("reuseContent"), t, e);
    (H5P.jQuery(s)
      .on("dialog-opened", function (e, t) {
        (H5P.jQuery(
          '<a href="https://h5p.org/node/442225" target="_blank">More Info</a>',
        )
          .click(function (e) {
            e.stopPropagation();
          })
          .appendTo(t.find("h2")),
          t.find(".h5p-download-button").click(function () {
            ((window.location.href = n.exportUrl),
              o.triggerXAPI("downloaded"),
              s.close());
          }),
          t.find(".h5p-copy-button").click(function () {
            const e = new H5P.ClipboardItem(i);
            ((e.contentId = r),
              H5P.setClipboard(e),
              o.triggerXAPI("copied"),
              s.close(),
              H5P.attachToastTo(
                H5P.jQuery(".h5p-content:first")[0],
                H5P.t("contentCopied"),
                {
                  position: {
                    horizontal: "centered",
                    vertical: "centered",
                    noOverflowX: !0,
                  },
                },
              ));
          }),
          H5P.trigger(o, "resize"));
      })
      .on("dialog-closed", function () {
        H5P.trigger(o, "resize");
      }),
      s.open());
  }),
  (H5P.openEmbedDialog = function (e, t, n, c, u) {
    var d = t + n,
      e = new H5P.Dialog(
        "embed",
        H5P.t("embed"),
        '<textarea class="h5p-embed-code-container" autocorrect="off" autocapitalize="off" spellcheck="false"></textarea>' +
          H5P.t("size") +
          ': <input type="text" value="' +
          Math.ceil(c.width) +
          '" class="h5p-embed-size"/> × <input type="text" value="' +
          Math.ceil(c.height) +
          '" class="h5p-embed-size"/> px<br/><div role="button" tabindex="0" class="h5p-expander">' +
          H5P.t("showAdvanced") +
          '</div><div class="h5p-expander-content"><p>' +
          H5P.t("advancedHelp") +
          '</p><textarea class="h5p-embed-code-container" autocorrect="off" autocapitalize="off" spellcheck="false">' +
          n +
          "</textarea></div>",
        e,
      );
    (H5P.jQuery(e)
      .on("dialog-opened", function (e, n) {
        function i() {
          H5P.trigger(u, "resize");
        }
        function t(e, t) {
          return ((e = parseFloat(e.val())), isNaN(e) ? t : Math.ceil(e));
        }
        function o() {
          n.find(".h5p-embed-code-container:first").val(
            d.replace(":w", t(s, c.width)).replace(":h", t(a, c.height)),
          );
        }
        var r = n.find(".h5p-inner").find(".h5p-scroll-content"),
          s =
            (r.outerHeight(), r.innerHeight(), n.find(".h5p-embed-size:eq(0)")),
          a = n.find(".h5p-embed-size:eq(1)");
        (s.change(o),
          a.change(o),
          o(),
          n.find(".h5p-embed-code-container").each(function () {
            H5P.jQuery(this)
              .css("height", this.scrollHeight + "px")
              .focus(function () {
                H5P.jQuery(this).select();
              });
          }),
          n.find(".h5p-embed-code-container").eq(0).select(),
          i());
        function l() {
          var e = H5P.jQuery(this),
            t = e.next();
          (t.is(":visible")
            ? (e
                .removeClass("h5p-open")
                .text(H5P.t("showAdvanced"))
                .attr("aria-expanded", "true"),
              t.hide())
            : (e
                .addClass("h5p-open")
                .text(H5P.t("hideAdvanced"))
                .attr("aria-expanded", "false"),
              t.show()),
            n.find(".h5p-embed-code-container").each(function () {
              H5P.jQuery(this).css("height", this.scrollHeight + "px");
            }),
            i());
        }
        n.find(".h5p-expander")
          .click(l)
          .keypress(function (e) {
            if (32 === e.keyCode) return (l.apply(this), !1);
          });
      })
      .on("dialog-closed", function () {
        H5P.trigger(u, "resize");
      }),
      e.open());
  }),
  (H5P.attachToastTo = function (t, e, n) {
    if (void 0 === t || void 0 === e) return;
    function i(e) {
      -1 === o(e).indexOf(t) && (clearTimeout(l), r());
    }
    const o = function (e) {
        var t = (e.composedPath && e.composedPath()) || e.path,
          e = e.target;
        return null != t
          ? t.indexOf(window) < 0
            ? t.concat(window)
            : t
          : e === window
            ? [window]
            : [e].concat(
                (function e(t, n) {
                  n = n || [];
                  t = t.parentNode;
                  return t ? e(t, n.concat(t)) : n;
                })(e),
                window,
              );
      },
      r = function () {
        (document.removeEventListener("click", i),
          s.parentNode && s.parentNode.removeChild(s));
      };
    (((n = n || {}).style = n.style || "h5p-toast"),
      (n.duration = n.duration || 3e3));
    const s = document.createElement("div");
    (s.setAttribute("id", n.style),
      s.classList.add("h5p-toast-disabled"),
      s.classList.add(n.style));
    const a = document.createElement("span");
    ((a.innerHTML = e), s.appendChild(a), document.body.appendChild(s));
    e = (function (e, t, n) {
      (((n = n || {}).offsetHorizontal = n.offsetHorizontal || 0),
        (n.offsetVertical = n.offsetVertical || 0));
      var i = t.getBoundingClientRect(),
        o = e.getBoundingClientRect();
      let r = 0,
        s = 0;
      switch (n.horizontal) {
        case "before":
          r = o.left - i.width - n.offsetHorizontal;
          break;
        case "after":
          r = o.left + o.width + n.offsetHorizontal;
          break;
        case "left":
          r = o.left + n.offsetHorizontal;
          break;
        case "right":
          r = o.left + o.width - i.width - n.offsetHorizontal;
          break;
        default:
          r = o.left + o.width / 2 - i.width / 2 + n.offsetHorizontal;
      }
      switch (n.vertical) {
        case "above":
          s = o.top - i.height - n.offsetVertical;
          break;
        case "below":
          s = o.top + o.height + n.offsetVertical;
          break;
        case "top":
          s = o.top + n.offsetVertical;
          break;
        case "bottom":
          s = o.top + o.height - i.height - n.offsetVertical;
          break;
        case "centered":
          s = o.top + o.height / 2 - i.height / 2 + n.offsetVertical;
          break;
        default:
          s = o.top + o.height + n.offsetVertical;
      }
      const a = document.body;
      e = a.getBoundingClientRect();
      return (
        (n.noOverflowLeft || n.noOverflowX) && r < e.x && (r = e.x),
        (n.noOverflowRight || n.noOverflowX) &&
          r + i.width > e.x + e.width &&
          (r = e.x + e.width - i.width),
        (n.noOverflowTop || n.noOverflowY) && s < e.y && (s = e.y),
        (n.noOverflowBottom || n.noOverflowY) &&
          s + i.height > e.y + e.height &&
          (r = e.y + e.height - i.height),
        { left: r, top: s }
      );
    })(t, s, n.position);
    ((s.style.left = Math.round(e.left) + "px"),
      (s.style.top = Math.round(e.top) + "px"),
      s.classList.remove("h5p-toast-disabled"));
    const l = setTimeout(r, n.duration);
    document.addEventListener("click", i);
  }),
  (H5P.ContentCopyrights = function () {
    var n,
      i = [],
      o = [];
    ((this.setLabel = function (e) {
      n = e;
    }),
      (this.addMedia = function (e) {
        void 0 !== e && i.push(e);
      }),
      (this.addMediaInFront = function (e) {
        void 0 !== e && i.unshift(e);
      }),
      (this.addContent = function (e) {
        void 0 !== e && o.push(e);
      }),
      (this.toString = function () {
        for (var e = "", t = 0; t < i.length; t++) e += i[t];
        for (t = 0; t < o.length; t++) e += o[t];
        return (e =
          "" !== e
            ? '<div class="h5p-content-copyrights">' +
              (e = void 0 !== n ? "<h3>" + n + "</h3>" + e : e) +
              "</div>"
            : e);
      }));
  }),
  (H5P.MediaCopyright = function (e, t, n, i) {
    function o(e) {
      return void 0 === t || void 0 === t[e] ? H5P.t(e) : t[e];
    }
    function r(e, t) {
      var n,
        i = H5P.copyrightLicenses[e],
        o = "";
      (("PD" === e && t) || (o += i.hasOwnProperty("label") ? i.label : i),
        (n =
          i.versions &&
          (t =
            !i.versions.default || (t && i.versions[t])
              ? t
              : i.versions.default) &&
          i.versions[t]
            ? i.versions[t]
            : n) &&
          (o && (o += " "), (o += n.hasOwnProperty("label") ? n.label : n)),
        i.hasOwnProperty("link")
          ? (r = i.link.replace(
              ":version",
              i.linkVersions ? i.linkVersions[t] : t,
            ))
          : n && i.hasOwnProperty("link") && (r = n.link),
        r && (o = '<a href="' + r + '" target="_blank">' + o + "</a>"));
      var r = "";
      return (
        "PD" !== e && "C" !== e && (r += e),
        t && "CC0 1.0" !== t && (r && "GNU GPL" !== e && (r += " "), (r += t)),
        r && (o += " (" + r + ")"),
        "C" === e && (o += " &copy;"),
        o
      );
    }
    var s,
      a = new H5P.DefinitionList();
    if (void 0 !== e) {
      for (var l in i) i.hasOwnProperty(l) && (e[l] = i[l]);
      void 0 === n &&
        (n = [
          "contentType",
          "title",
          "license",
          "author",
          "year",
          "source",
          "licenseExtras",
          "changes",
        ]);
      for (var c = 0; c < n.length; c++) {
        var u,
          d = n[c];
        void 0 !== e[d] &&
          "" !== e[d] &&
          ((u = e[d]),
          "license" === d && (u = r(e.license, e.version)),
          "source" === d &&
            (u = u
              ? '<a href="' + u + '" target="_blank">' + u + "</a>"
              : void 0),
          a.add(new H5P.Field(o(d), u)));
      }
    }
    ((this.setThumbnail = function (e) {
      s = e;
    }),
      (this.undisclosed = function () {
        if (1 === a.size()) {
          var e = a.get(0);
          if (e.getLabel() === o("license") && e.getValue() === r("U"))
            return !0;
        }
        return !1;
      }),
      (this.toString = function () {
        var e = "";
        return this.undisclosed()
          ? e
          : (void 0 !== s && (e += s),
            "" !== (e += a)
              ? '<div class="h5p-media-copyright">' + e + "</div>"
              : e);
      }));
  }),
  (H5P.Thumbnail = function (e, t, n) {
    var i;
    (void 0 !== t && (i = Math.round((t / n) * 100)),
      (this.toString = function () {
        return (
          '<img src="' +
          e +
          '" alt="' +
          H5P.t("thumbnail") +
          '" class="h5p-thumbnail" height="100"' +
          (void 0 === i ? "" : ' width="' + i + '"') +
          "/>"
        );
      }));
  }),
  (H5P.Field = function (e, t) {
    ((this.getLabel = function () {
      return e;
    }),
      (this.getValue = function () {
        return t;
      }));
  }),
  (H5P.DefinitionList = function () {
    var i = [];
    ((this.add = function (e) {
      i.push(e);
    }),
      (this.size = function () {
        return i.length;
      }),
      (this.get = function (e) {
        return i[e];
      }),
      (this.toString = function () {
        for (var e = "", t = 0; t < i.length; t++) {
          var n = i[t];
          e += "<dt>" + n.getLabel() + "</dt><dd>" + n.getValue() + "</dd>";
        }
        return "" === e ? e : '<dl class="h5p-definition-list">' + e + "</dl>";
      }));
  }),
  (H5P.Coords = function (e, t, n, i) {
    return this instanceof H5P.Coords
      ? ((this.x = 0),
        (this.y = 0),
        (this.w = 1),
        (this.h = 1),
        "object" == typeof e
          ? ((this.x = e.x), (this.y = e.y), (this.w = e.w), (this.h = e.h))
          : (void 0 !== e && (this.x = e),
            void 0 !== t && (this.y = t),
            void 0 !== n && (this.w = n),
            void 0 !== i && (this.h = i)),
        this)
      : new H5P.Coords(e, t, n, i);
  }),
  (H5P.libraryFromString = function (e) {
    e = /(.+)\s(\d+)\.(\d+)$/g.exec(e);
    return (
      null !== e && {
        machineName: e[1],
        majorVersion: parseInt(e[2]),
        minorVersion: parseInt(e[3]),
      }
    );
  }),
  (H5P.getLibraryPath = function (e) {
    return void 0 !== H5PIntegration.urlLibraries
      ? H5PIntegration.urlLibraries + "/" + e
      : H5PIntegration.url + "/libraries/" + e;
  }),
  (H5P.cloneObject = function (e, t) {
    var n,
      i = e instanceof Array ? [] : {};
    for (n in e)
      e.hasOwnProperty(n) &&
        (void 0 !== t && t && "object" == typeof e[n]
          ? (i[n] = H5P.cloneObject(e[n], t))
          : (i[n] = e[n]));
    return i;
  }),
  (H5P.trim = function (e) {
    return e.replace(/^\s+|\s+$/g, "");
  }),
  (H5P.jsLoaded = function (e) {
    return (
      (H5PIntegration.loadedJs = H5PIntegration.loadedJs || []),
      -1 !== H5P.jQuery.inArray(e, H5PIntegration.loadedJs)
    );
  }),
  (H5P.cssLoaded = function (e) {
    return (
      (H5PIntegration.loadedCss = H5PIntegration.loadedCss || []),
      -1 !== H5P.jQuery.inArray(e, H5PIntegration.loadedCss)
    );
  }),
  (H5P.shuffleArray = function (e) {
    if (e instanceof Array) {
      var t,
        n,
        i,
        o = e.length;
      if (0 === o) return !1;
      for (; --o; )
        ((t = Math.floor(Math.random() * (o + 1))),
          (n = e[o]),
          (i = e[t]),
          (e[o] = i),
          (e[t] = n));
      return e;
    }
  }),
  (H5P.setFinished = function (e, t, n, i) {
    if (
      ("number" == typeof t || t instanceof Number) &&
      !0 === H5PIntegration.postUserStatistics
    ) {
      function o(e) {
        return Math.round(e.getTime() / 1e3);
      }
      const r = {
        contentId: e,
        score: t,
        maxScore: n,
        opened: o(H5P.opened[e]),
        finished: o(new Date()),
        time: i,
      };
      H5P.jQuery.post(H5PIntegration.ajax.setFinished, r).fail(function () {
        H5P.offlineRequestQueue.add(H5PIntegration.ajax.setFinished, r);
      });
    }
  }),
  Array.prototype.indexOf ||
    (Array.prototype.indexOf = function (e) {
      for (var t = 0; t < this.length; t++) if (this[t] === e) return t;
      return -1;
    }),
  void 0 === String.prototype.trim &&
    (String.prototype.trim = function () {
      return H5P.trim(this);
    }),
  (H5P.trigger = function (e, t, n, i) {
    void 0 !== e.trigger
      ? e.trigger(t, n, i)
      : void 0 !== e.$ && void 0 !== e.$.trigger && e.$.trigger(t);
  }),
  (H5P.on = function (e, t, n) {
    void 0 !== e.on
      ? e.on(t, n)
      : void 0 !== e.$ && void 0 !== e.$.on && e.$.on(t, n);
  }),
  (H5P.createUUID = function () {
    return "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(
      /[xy]/g,
      function (e) {
        var t = (16 * Math.random()) | 0;
        return ("x" === e ? t : (3 & t) | 8).toString(16);
      },
    );
  }),
  (H5P.createTitle = function (e, t) {
    if (!e) return "";
    void 0 === t && (t = 60);
    e = H5P.jQuery("<div></div>")
      .text(e.replace(/(<([^>]+)>)/gi, ""))
      .text();
    return (e = e.length > t ? e.substr(0, t - 3) + "..." : e);
  }),
  (function (l) {
    function a(e, t, n, i, o, r, s, a) {
      void 0 !== H5PIntegration.user
        ? ((a = {
            url: H5PIntegration.ajax.contentUserData
              .replace(":contentId", e)
              .replace(":dataType", t)
              .replace(":subContentId", n || 0),
            dataType: "json",
            async: void 0 === a || a,
          }),
          void 0 !== o
            ? ((a.type = "POST"),
              (a.data = {
                data: null === o ? 0 : o,
                preload: r ? 1 : 0,
                invalidate: s ? 1 : 0,
              }))
            : (a.type = "GET"),
          void 0 !== i &&
            ((a.error = function (e, t) {
              i(t);
            }),
            (a.success = function (e) {
              e.success
                ? !1 !== e.data && void 0 !== e.data
                  ? i(void 0, e.data)
                  : i()
                : i(e.message);
            })),
          l.ajax(a))
        : i("Not signed in.");
    }
    ((H5P.getUserData = function (e, n, i, o) {
      ((o = o || 0), (H5PIntegration.contents = H5PIntegration.contents || {}));
      var r = H5PIntegration.contents["cid-" + e] || {},
        s = r.contentUserData;
      if (s && s[o] && void 0 !== s[o][n])
        if ("RESET" !== s[o][n])
          try {
            i(void 0, JSON.parse(s[o][n]));
          } catch (e) {
            i(e);
          }
        else i(void 0, null);
      else
        a(e, n, o, function (e, t) {
          if (e || void 0 === t) i(e, t);
          else {
            (void 0 === r.contentUserData && (r.contentUserData = s = {}),
              void 0 === s[o] && (s[o] = {}),
              (s[o][n] = t));
            try {
              i(void 0, JSON.parse(t));
            } catch (e) {
              i(e);
            }
          }
        });
    }),
      (H5P.setUserData = function (e, t, n, i) {
        var o = H5P.jQuery.extend(
          !0,
          {},
          { subContentId: 0, preloaded: !0, deleteOnChange: !1, async: !0 },
          i,
        );
        try {
          n = JSON.stringify(n);
        } catch (e) {
          return void (o.errorCallback && o.errorCallback(e));
        }
        i = H5PIntegration.contents["cid-" + e];
        (i = void 0 === i ? (H5PIntegration.contents["cid-" + e] = {}) : i)
          .contentUserData || (i.contentUserData = {});
        i = i.contentUserData;
        (void 0 === i[o.subContentId] && (i[o.subContentId] = {}),
          n !== i[o.subContentId][t] &&
            ((i[o.subContentId][t] = n),
            a(
              e,
              t,
              o.subContentId,
              function (e) {
                o.errorCallback && e && o.errorCallback(e);
              },
              n,
              o.preloaded,
              o.deleteOnChange,
              o.async,
            )));
      }),
      (H5P.deleteUserData = function (e, t, n) {
        n = n || 0;
        var i = H5PIntegration.contents["cid-" + e].contentUserData;
        (i && i[n] && i[n][t] && delete i[n][t], a(e, t, n, void 0, null));
      }),
      (H5P.getContentForInstance = function (e) {
        e = "cid-" + e;
        return H5PIntegration &&
          H5PIntegration.contents &&
          H5PIntegration.contents[e]
          ? H5PIntegration.contents[e]
          : void 0;
      }),
      (H5P.ClipboardItem = function (e, t, n) {
        var i = this;
        (t || ((t = "action"), (e = { action: e })),
          (i.specific = e),
          t && e[t] && (i.generic = t),
          n && (i.from = n),
          window.H5PEditor &&
            H5PEditor.contentId &&
            (i.contentId = H5PEditor.contentId),
          i.specific.width ||
            i.specific.height ||
            !i.generic ||
            ((n = i.specific[i.generic]).params.file &&
              n.params.file.width &&
              n.params.file.height &&
              ((i.width = 20),
              (i.height =
                (n.params.file.height / n.params.file.width) * i.width))));
      }),
      (H5P.clipboardify = function (e) {
        (e instanceof H5P.ClipboardItem || (e = new H5P.ClipboardItem(e)),
          H5P.setClipboard(e));
      }),
      (H5P.getClipboard = function () {
        return e();
      }),
      (H5P.setClipboard = function (e) {
        (localStorage.setItem("h5pClipboard", JSON.stringify(e)),
          H5P.externalDispatcher.trigger("datainclipboard", { reset: !1 }));
      }),
      (H5P.getLibraryConfig = function (e) {
        return H5PIntegration.libraryConfig && H5PIntegration.libraryConfig[e]
          ? H5PIntegration.libraryConfig[e]
          : {};
      }));
    var e = function () {
        var t = localStorage.getItem("h5pClipboard");
        if (t) {
          try {
            t = JSON.parse(t);
          } catch (e) {
            return void console.error(
              "Unable to parse JSON from clipboard.",
              e,
            );
          }
          return (
            i(t.specific, function (e) {
              return "#tmp" === e.substr(-4, 4) ||
                !t.contentId ||
                e.match(/^https?:\/\//i)
                ? e
                : H5PEditor.contentId
                  ? "../" + t.contentId + "/" + e
                  : (H5PEditor.contentRelUrl || "../content/") +
                    t.contentId +
                    "/" +
                    e;
            }),
            t.generic && (t.generic = t.specific[t.generic]),
            t
          );
        }
      },
      i = function (e, t) {
        for (var n in e)
          e.hasOwnProperty(n) &&
            e[n] instanceof Object &&
            (void 0 !== (n = e[n]).path && void 0 !== n.mime
              ? (n.path = t(n.path))
              : (void 0 !== n.library &&
                  void 0 !== n.subContentId &&
                  delete n.subContentId,
                i(n, t)));
      };
    l(document).ready(function () {
      window.addEventListener("storage", function (e) {
        "h5pClipboard" === e.key &&
          H5P.externalDispatcher.trigger("datainclipboard", {
            reset: null === e.newValue,
          });
      });
      var o,
        e,
        t = {
          default: "4.0",
          "4.0": H5P.t("licenseCC40"),
          "3.0": H5P.t("licenseCC30"),
          2.5: H5P.t("licenseCC25"),
          "2.0": H5P.t("licenseCC20"),
          "1.0": H5P.t("licenseCC10"),
        };
      ((H5P.copyrightLicenses = {
        U: H5P.t("licenseU"),
        "CC BY": {
          label: H5P.t("licenseCCBY"),
          link: "http://creativecommons.org/licenses/by/:version",
          versions: t,
        },
        "CC BY-SA": {
          label: H5P.t("licenseCCBYSA"),
          link: "http://creativecommons.org/licenses/by-sa/:version",
          versions: t,
        },
        "CC BY-ND": {
          label: H5P.t("licenseCCBYND"),
          link: "http://creativecommons.org/licenses/by-nd/:version",
          versions: t,
        },
        "CC BY-NC": {
          label: H5P.t("licenseCCBYNC"),
          link: "http://creativecommons.org/licenses/by-nc/:version",
          versions: t,
        },
        "CC BY-NC-SA": {
          label: H5P.t("licenseCCBYNCSA"),
          link: "http://creativecommons.org/licenses/by-nc-sa/:version",
          versions: t,
        },
        "CC BY-NC-ND": {
          label: H5P.t("licenseCCBYNCND"),
          link: "http://creativecommons.org/licenses/by-nc-nd/:version",
          versions: t,
        },
        "CC0 1.0": {
          label: H5P.t("licenseCC010"),
          link: "https://creativecommons.org/publicdomain/zero/1.0/",
        },
        "GNU GPL": {
          label: H5P.t("licenseGPL"),
          link: "http://www.gnu.org/licenses/gpl-:version-standalone.html",
          linkVersions: { v3: "3.0", v2: "2.0", v1: "1.0" },
          versions: {
            default: "v3",
            v3: H5P.t("licenseV3"),
            v2: H5P.t("licenseV2"),
            v1: H5P.t("licenseV1"),
          },
        },
        PD: {
          label: H5P.t("licensePD"),
          versions: {
            "CC0 1.0": {
              label: H5P.t("licenseCC010"),
              link: "https://creativecommons.org/publicdomain/zero/1.0/",
            },
            "CC PDM": {
              label: H5P.t("licensePDM"),
              link: "https://creativecommons.org/publicdomain/mark/1.0/",
            },
          },
        },
        "ODC PDDL":
          '<a href="http://opendatacommons.org/licenses/pddl/1.0/" target="_blank">Public Domain Dedication and Licence</a>',
        "CC PDM": {
          label: H5P.t("licensePDM"),
          link: "https://creativecommons.org/publicdomain/mark/1.0/",
        },
        C: H5P.t("licenseC"),
      }),
        H5P.isFramed &&
          !1 === H5P.externalEmbed &&
          H5P.externalDispatcher.on("*", function (e) {
            window.parent.H5P.externalDispatcher.trigger.call(this, e);
          }),
        H5P.preventInit || H5P.init(document.body),
        !1 !== H5PIntegration.saveFreq &&
          ((o = 0),
          (e = function () {
            var e = new Date().getTime();
            if (250 < e - o) {
              o = e;
              for (var t = 0; t < H5P.instances.length; t++) {
                var n,
                  i = H5P.instances[t];
                !(
                  i.getCurrentState instanceof Function ||
                  "function" == typeof i.getCurrentState
                ) ||
                  (void 0 !== (n = i.getCurrentState()) &&
                    H5P.setUserData(i.contentId, "state", n, {
                      deleteOnChange: !0,
                      async: !1,
                    }));
              }
            }
          }),
          H5P.$window.one("beforeunload unload", function () {
            (H5P.$window.off("pagehide beforeunload unload"), e());
          }),
          H5P.$window.on("pagehide", e)));
    });
  })(H5P.jQuery),
  ((H5P = window.H5P = window.H5P || {}).Event = function (e, t, n) {
    ((this.type = e), (this.data = t));
    var i = !1,
      o = !1,
      r = !1;
    (!0 === (n = void 0 === n ? {} : n).bubbles && (i = !0),
      !0 === n.external && (o = !0),
      (this.preventBubbling = function () {
        i = !1;
      }),
      (this.getBubbles = function () {
        return i;
      }),
      (this.scheduleForExternal = function () {
        return !(!o || r) && (r = !0);
      }));
  }),
  (H5P.EventDispatcher = function () {
    var o = this,
      s = {};
    function i(e, t) {
      if (void 0 !== s[e])
        for (var n = s[e].slice(), i = 0; i < n.length; i++) {
          var o = n[i],
            r = o.thisArg || this;
          o.listener.call(r, t);
        }
    }
    ((this.on = function (e, t, n) {
      if ("function" != typeof t)
        throw TypeError("listener must be a function");
      o.trigger("newListener", { type: e, listener: t });
      n = { listener: t, thisArg: n };
      s[e] ? s[e].push(n) : (s[e] = [n]);
    }),
      (this.once = function (e, t, n) {
        if (!(t instanceof Function))
          throw TypeError("listener must be a function");
        var i = function (e) {
          (o.off(e.type, i), t.call(this, e));
        };
        o.on(e, i, n);
      }),
      (this.off = function (e, t) {
        if (void 0 !== t && !(t instanceof Function))
          throw TypeError("listener must be a function");
        if (void 0 !== s[e]) {
          if (void 0 === t)
            return (delete s[e], void o.trigger("removeListener", e));
          for (var n = 0; n < s[e].length; n++)
            if (s[e][n].listener === t) {
              (s[e].splice(n, 1),
                o.trigger("removeListener", e, { listener: t }));
              break;
            }
          s[e].length || delete s[e];
        }
      }),
      (this.trigger = function (e, t, n) {
        void 0 !== e &&
          (e instanceof String || "string" == typeof e
            ? (e = new H5P.Event(e, t, n))
            : void 0 !== t && (e.data = t),
          (t = e.scheduleForExternal()),
          i.call(this, e.type, e),
          i.call(this, "*", e),
          e.getBubbles() &&
            o.parent instanceof H5P.EventDispatcher &&
            (o.parent.trigger instanceof Function ||
              "function" == typeof o.parent.trigger) &&
            o.parent.trigger(e),
          t && H5P.externalDispatcher.trigger.call(this, e));
      }));
  }),
  ((H5P = window.H5P = window.H5P || {}).XAPIEvent = function () {
    H5P.Event.call(
      this,
      "xAPI",
      { statement: {} },
      { bubbles: !0, external: !0 },
    );
  }),
  (H5P.XAPIEvent.prototype = Object.create(H5P.Event.prototype)),
  (H5P.XAPIEvent.prototype.constructor = H5P.XAPIEvent),
  (H5P.XAPIEvent.prototype.setScoredResult = function (e, t, n, i, o) {
    ((this.data.statement.result = {}),
      void 0 !== e &&
        (void 0 === t
          ? (this.data.statement.result.score = { raw: e })
          : ((this.data.statement.result.score = { min: 0, max: t, raw: e }),
            0 < t &&
              (this.data.statement.result.score.scaled =
                Math.round((e / t) * 1e4) / 1e4))),
      (this.data.statement.result.completion =
        void 0 === i
          ? "completed" === this.getVerb() || "answered" === this.getVerb()
          : i),
      void 0 !== o && (this.data.statement.result.success = o),
      n &&
        n.activityStartTime &&
        ((n = Math.round((Date.now() - n.activityStartTime) / 10) / 100),
        (this.data.statement.result.duration = "PT" + n + "S")));
  }),
  (H5P.XAPIEvent.prototype.setVerb = function (e) {
    -1 !== H5P.jQuery.inArray(e, H5P.XAPIEvent.allowedXAPIVerbs)
      ? (this.data.statement.verb = {
          id: "http://adlnet.gov/expapi/verbs/" + e,
          display: { "en-US": e },
        })
      : void 0 !== e.id && (this.data.statement.verb = e);
  }),
  (H5P.XAPIEvent.prototype.getVerb = function (e) {
    var t = this.data.statement;
    return "verb" in t ? (!0 === e ? t.verb : t.verb.id.slice(31)) : null;
  }),
  (H5P.XAPIEvent.prototype.setObject = function (e) {
    e.contentId
      ? ((this.data.statement.object = {
          id: this.getContentXAPIId(e),
          objectType: "Activity",
          definition: {
            extensions: {
              "http://h5p.org/x-api/h5p-local-content-id": e.contentId,
            },
          },
        }),
        e.subContentId
          ? ((this.data.statement.object.definition.extensions[
              "http://h5p.org/x-api/h5p-subContentId"
            ] = e.subContentId),
            "function" == typeof e.getTitle &&
              (this.data.statement.object.definition.name = {
                "en-US": e.getTitle(),
              }))
          : (e = H5P.getContentForInstance(e.contentId)) &&
            e.metadata &&
            e.metadata.title &&
            (this.data.statement.object.definition.name = {
              "en-US": H5P.createTitle(e.metadata.title),
            }))
      : (this.data.statement.object = { definition: {} });
  }),
  (H5P.XAPIEvent.prototype.setContext = function (e) {
    (e.parent &&
      (e.parent.contentId || e.parent.subContentId) &&
      (this.data.statement.context = {
        contextActivities: {
          parent: [
            { id: this.getContentXAPIId(e.parent), objectType: "Activity" },
          ],
        },
      }),
      e.libraryInfo &&
        (void 0 === this.data.statement.context &&
          (this.data.statement.context = { contextActivities: {} }),
        (this.data.statement.context.contextActivities.category = [
          {
            id:
              "http://h5p.org/libraries/" + e.libraryInfo.versionedNameNoSpaces,
            objectType: "Activity",
          },
        ])));
  }),
  (H5P.XAPIEvent.prototype.setActor = function () {
    if (void 0 !== H5PIntegration.user)
      this.data.statement.actor = {
        name: H5PIntegration.user.name,
        mbox: "mailto:" + H5PIntegration.user.mail,
        objectType: "Agent",
      };
    else {
      var t;
      try {
        localStorage.H5PUserUUID
          ? (t = localStorage.H5PUserUUID)
          : ((t = H5P.createUUID()), (localStorage.H5PUserUUID = t));
      } catch (e) {
        t = "not-trackable-" + H5P.createUUID();
      }
      this.data.statement.actor = {
        account: { name: t, homePage: H5PIntegration.siteUrl },
        objectType: "Agent",
      };
    }
  }),
  (H5P.XAPIEvent.prototype.getMaxScore = function () {
    return this.getVerifiedStatementValue(["result", "score", "max"]);
  }),
  (H5P.XAPIEvent.prototype.getScore = function () {
    return this.getVerifiedStatementValue(["result", "score", "raw"]);
  }),
  (H5P.XAPIEvent.prototype.getContentXAPIId = function (e) {
    var t;
    return (
      e.contentId &&
        H5PIntegration &&
        H5PIntegration.contents &&
        H5PIntegration.contents["cid-" + e.contentId] &&
        ((t = H5PIntegration.contents["cid-" + e.contentId].url),
        e.subContentId && (t += "?subContentId=" + e.subContentId)),
      t
    );
  }),
  (H5P.XAPIEvent.prototype.isFromChild = function () {
    var e = this.getVerifiedStatementValue([
      "context",
      "contextActivities",
      "parent",
      0,
      "id",
    ]);
    return !e || -1 === e.indexOf("subContentId");
  }),
  (H5P.XAPIEvent.prototype.getVerifiedStatementValue = function (e) {
    for (var t = this.data.statement, n = 0; n < e.length; n++) {
      if (void 0 === t[e[n]]) return null;
      t = t[e[n]];
    }
    return t;
  }),
  (H5P.XAPIEvent.allowedXAPIVerbs = [
    "answered",
    "asked",
    "attempted",
    "attended",
    "commented",
    "completed",
    "exited",
    "experienced",
    "failed",
    "imported",
    "initialized",
    "interacted",
    "launched",
    "mastered",
    "passed",
    "preferred",
    "progressed",
    "registered",
    "responded",
    "resumed",
    "scored",
    "shared",
    "suspended",
    "terminated",
    "voided",
    "downloaded",
    "copied",
    "accessed-reuse",
    "accessed-embed",
    "accessed-copyright",
  ]),
  ((H5P = window.H5P = window.H5P || {}).externalDispatcher =
    new H5P.EventDispatcher()),
  (H5P.EventDispatcher.prototype.triggerXAPI = function (e, t) {
    this.trigger(this.createXAPIEventTemplate(e, t));
  }),
  (H5P.EventDispatcher.prototype.createXAPIEventTemplate = function (e, t) {
    var n = new H5P.XAPIEvent();
    if ((n.setActor(), n.setVerb(e), void 0 !== t))
      for (var i in t) n.data.statement[i] = t[i];
    return (
      "object" in n.data.statement || n.setObject(this),
      "context" in n.data.statement || n.setContext(this),
      n
    );
  }),
  (H5P.EventDispatcher.prototype.triggerXAPICompleted = function (e, t, n) {
    this.triggerXAPIScored(e, t, "completed", !0, n);
  }),
  (H5P.EventDispatcher.prototype.triggerXAPIScored = function (e, t, n, i, o) {
    n = this.createXAPIEventTemplate(n);
    (n.setScoredResult(e, t, this, i, o), this.trigger(n));
  }),
  (H5P.EventDispatcher.prototype.setActivityStarted = function () {
    void 0 === this.activityStartTime &&
      (void 0 !== this.contentId &&
        void 0 !== H5PIntegration.contents &&
        void 0 !== H5PIntegration.contents["cid-" + this.contentId] &&
        this.triggerXAPI("attempted"),
      (this.activityStartTime = Date.now()));
  }),
  (H5P.xAPICompletedListener = function (e) {
    var t, n;
    ("completed" !== e.getVerb() && "answered" !== e.getVerb()) ||
      e.getVerifiedStatementValue(["context", "contextActivities", "parent"]) ||
      ((t = e.getScore()),
      (n = e.getMaxScore()),
      (e = e.getVerifiedStatementValue([
        "object",
        "definition",
        "extensions",
        "http://h5p.org/x-api/h5p-local-content-id",
      ])),
      H5P.setFinished(e, t, n));
  }) /*!@license js/h5p-content-type.js by Joubel and other contributors, licensed under GNU GENERAL PUBLIC LICENSE Version 3*/,
  (H5P.ContentType = function (e) {
    function t() {}
    return (
      ((t.prototype = new H5P.EventDispatcher()).isRoot = function () {
        return e;
      }),
      (t.prototype.getLibraryFilePath = function (e) {
        return (
          H5P.getLibraryPath(this.libraryInfo.versionedNameNoSpaces) + "/" + e
        );
      }),
      t
    );
  }) /*!@license js/h5p-confirmation-dialog.js by Joubel and other contributors, licensed under GNU GENERAL PUBLIC LICENSE Version 3*/,
  (H5P.ConfirmationDialog = (function (C) {
    "use strict";
    function e(n) {
      C.call(this);
      var i = this;
      H5P.ConfirmationDialog.uniqueId += 1;
      var e = H5P.ConfirmationDialog.uniqueId;
      function t(e) {
        (i.hide(), i.trigger("confirmed"), e.preventDefault());
      }
      function o(e) {
        (i.hide(), i.trigger("canceled"), e.preventDefault());
      }
      function r(e, t) {
        (e.focus(), t.preventDefault());
      }
      (((n = n || {}).headerText =
        n.headerText || H5P.t("confirmDialogHeader")),
        (n.dialogText = n.dialogText || H5P.t("confirmDialogBody")),
        (n.cancelText = n.cancelText || H5P.t("cancelLabel")),
        (n.confirmText = n.confirmText || H5P.t("confirmLabel")));
      var s = 32,
        a = 8,
        l = !1,
        c = document.createElement("div");
      c.classList.add("h5p-confirmation-dialog-background", "hidden", "hiding");
      var u = document.createElement("div");
      (u.classList.add("h5p-confirmation-dialog-popup", "hidden"),
        n.classes &&
          n.classes.forEach(function (e) {
            u.classList.add(e);
          }),
        u.setAttribute("role", "dialog"),
        u.setAttribute(
          "aria-labelledby",
          "h5p-confirmation-dialog-dialog-text-" + e,
        ),
        c.appendChild(u),
        u.addEventListener("keydown", function (e) {
          27 === e.which && o(e);
        }));
      var d = document.createElement("div");
      (d.classList.add("h5p-confirmation-dialog-header"), u.appendChild(d));
      var h = document.createElement("div");
      (h.classList.add("h5p-confirmation-dialog-header-text"),
        (h.innerHTML = n.headerText),
        d.appendChild(h));
      d = document.createElement("div");
      (d.classList.add("h5p-confirmation-dialog-body"), u.appendChild(d));
      h = document.createElement("div");
      (h.classList.add("h5p-confirmation-dialog-text"),
        (h.innerHTML = n.dialogText),
        (h.id = "h5p-confirmation-dialog-dialog-text-" + e),
        d.appendChild(h));
      h = document.createElement("div");
      (h.classList.add("h5p-confirmation-dialog-buttons"), d.appendChild(h));
      var p = document.createElement("button");
      (p.classList.add("h5p-core-cancel-button"),
        (p.textContent = n.cancelText));
      var f = document.createElement("button");
      (f.classList.add("h5p-core-button"),
        f.classList.add("h5p-confirmation-dialog-confirm-button"),
        (f.textContent = n.confirmText));
      var g,
        m,
        d = document.createElement("button");
      (d.classList.add("h5p-confirmation-dialog-exit"),
        d.setAttribute("aria-hidden", "true"),
        (d.tabIndex = -1),
        (d.title = n.cancelText),
        p.addEventListener("click", o),
        p.addEventListener("keydown", function (e) {
          32 === e.which ? o(e) : 9 === e.which && e.shiftKey && r(f, e);
        }),
        n.hideCancel ? h.classList.add("center") : h.appendChild(p),
        f.addEventListener("click", t),
        f.addEventListener("keydown", function (e) {
          32 === e.which
            ? t(e)
            : 9 !== e.which || e.shiftKey || r(n.hideCancel ? f : p, e);
        }),
        h.appendChild(f),
        d.addEventListener("click", o),
        d.addEventListener("keydown", function (e) {
          32 === e.which && o(e);
        }),
        n.hideExit || u.appendChild(d));
      var v,
        b = [],
        y = [];
      this.appendTo = function (e) {
        return ((g = e), this);
      };
      var w = function (e) {
          c.contains(e.target) || (e.preventDefault(), f.focus());
        },
        x = function (e) {
          for (
            var t = [], n = e.parentNode.children, i = 0;
            i < n.length;
            i += 1
          )
            ((t[i] = !!n[i].getAttribute("aria-hidden")),
              n[i] !== e && n[i].setAttribute("aria-hidden", !0));
          return t;
        },
        P = function (e, t) {
          for (var n = e.parentNode.children, i = 0; i < n.length; i += 1)
            n[i] === e || t[i] || n[i].removeAttribute("aria-hidden");
        };
      ((this.show = function (e) {
        var t;
        return (
          (v = document.activeElement),
          g.appendChild(c),
          (m = g.parentNode || g).addEventListener("focus", w, !0),
          (b = x(g)),
          (y = x(c)),
          c.classList.remove("hidden"),
          (t = e),
          (e = parseInt(u.style.top, 10)),
          (e =
            (e = (e = void 0 !== t ? t : e) || 0) + u.offsetHeight >
            g.offsetHeight
              ? g.offsetHeight - u.offsetHeight - a
              : e) -
            s <=
            0 && ((e = s + a), (l = !0)),
          (u.style.top = e + "px"),
          setTimeout(function () {
            (u.classList.remove("hidden"),
              c.classList.remove("hiding"),
              setTimeout(function () {
                var e;
                (f.focus(),
                  l &&
                    n.instance &&
                    ((e = parseInt(u.offsetHeight, 10) + s + 2 * a),
                    i.setViewPortMinimumHeight(e),
                    n.instance.trigger("resize"),
                    (l = !1)));
              }, 100));
          }, 0),
          this
        );
      }),
        (this.hide = function () {
          return (
            c.classList.add("hiding"),
            u.classList.add("hidden"),
            m.removeAttribute("aria-hidden"),
            m.removeEventListener("focus", w, !0),
            n.skipRestoreFocus || v.focus(),
            P(g, b),
            P(c, y),
            setTimeout(function () {
              (c.classList.add("hidden"),
                g.removeChild(c),
                i.setViewPortMinimumHeight(null));
            }, 100),
            this
          );
        }),
        (this.getElement = function () {
          return u;
        }),
        (this.getPreviouslyFocused = function () {
          return v;
        }),
        (this.setViewPortMinimumHeight = function (e) {
          (
            document.querySelector(".h5p-container") || document.body
          ).style.minHeight = "number" == typeof e ? e + "px" : e;
        }));
    }
    return ((e.prototype = Object.create(C.prototype)).constructor = e);
  })(H5P.EventDispatcher)),
  (H5P.ConfirmationDialog.uniqueId =
    -1) /*!@license js/h5p-action-bar.js by Joubel and other contributors, licensed under GNU GENERAL PUBLIC LICENSE Version 3*/,
  (H5P.ActionBar = (function (n) {
    "use strict";
    function e(e) {
      n.call(this);
      function t(e, t) {
        function n() {
          i.trigger(e);
        }
        (H5P.jQuery("<li/>", {
          class: "h5p-button h5p-noselect h5p-" + (t || e),
          role: "button",
          tabindex: 0,
          title: H5P.t(e + "Description"),
          html: H5P.t(e),
          on: {
            click: n,
            keypress: function (e) {
              32 === e.which && (n(), e.preventDefault());
            },
          },
          appendTo: r,
        }),
          (o = !0));
      }
      var i = this,
        o = !1,
        r = H5P.jQuery('<ul class="h5p-actions"></ul>');
      ((e.export || e.copy) && t("reuse", "export"),
        e.copyright && t("copyrights"),
        e.embed && t("embed"),
        e.icon &&
          (H5P.jQuery(
            '<li><a class="h5p-link" href="http://h5p.org" target="_blank" title="' +
              H5P.t("h5pDescription") +
              '"></a></li>',
          ).appendTo(r),
          (o = !0)),
        (i.getDOMElement = function () {
          return r;
        }),
        (i.hasActions = function () {
          return o;
        }));
    }
    return ((e.prototype = Object.create(n.prototype)).constructor = e);
  })(
    (H5P.jQuery, H5P.EventDispatcher),
  )) /*!@license js/request-queue.js by Joubel and other contributors, licensed under GNU GENERAL PUBLIC LICENSE Version 3*/,
  (H5P.RequestQueue = (function (n, t) {
    function e(e) {
      (t.call(this),
        (this.processingQueue = !1),
        (this.showToast = (e = e || {}).showToast),
        (this.itemName = "requestQueue"));
    }
    return (
      (e.prototype.add = function (e, t) {
        if (!window.localStorage) return !1;
        let n = this.getStoredRequests();
        return (
          (n = n || []),
          n.push({ url: e, data: t }),
          window.localStorage.setItem(this.itemName, JSON.stringify(n)),
          this.trigger("requestQueued", {
            storedStatements: n,
            processingQueue: this.processingQueue,
          }),
          !0
        );
      }),
      (e.prototype.getStoredRequests = function () {
        if (!window.localStorage) return !1;
        var e = window.localStorage.getItem(this.itemName);
        return e ? JSON.parse(e) : [];
      }),
      (e.prototype.clearQueue = function () {
        return (
          !!window.localStorage &&
          (window.localStorage.removeItem(this.itemName), !0)
        );
      }),
      (e.prototype.resumeQueue = function () {
        if (!H5PIntegration || !window.navigator || !window.localStorage)
          return !1;
        if (this.processingQueue) return !1;
        var e = this.getStoredRequests(),
          t = e.length;
        return (
          this.clearQueue(),
          t
            ? ((this.processingQueue = !0), this.processQueue(e))
            : this.trigger("emptiedQueue", e),
          !0
        );
      }),
      (e.prototype.processQueue = function (e) {
        var t;
        e.length &&
          (this.trigger("processingQueue"),
          (t = e.shift()),
          n
            .post(t.url, t.data)
            .fail(this.onQueuedRequestFail.bind(this, t))
            .always(this.onQueuedRequestProcessed.bind(this, e)));
      }),
      (e.prototype.onQueuedRequestFail = function (e) {
        window.navigator.onLine || this.add(e.url, e.data);
      }),
      (e.prototype.onQueuedRequestProcessed = function (e) {
        e.length
          ? this.processQueue(e)
          : ((this.processingQueue = !1),
            (e = this.getStoredRequests()),
            this.trigger("queueEmptied", e));
      }),
      (e.prototype.displayToastMessage = function (e, t, n) {
        (this.showToast || t) &&
          ((n = H5P.jQuery.extend(
            !0,
            {},
            {
              position: {
                horizontal: "centered",
                vertical: "centered",
                noOverflowX: !0,
              },
            },
            n,
          )),
          H5P.attachToastTo(H5P.jQuery(".h5p-content:first")[0], e, n));
      }),
      e
    );
  })(H5P.jQuery, H5P.EventDispatcher)),
  (H5P.OfflineRequestQueue = (function (w, x) {
    return function (e) {
      const n = new w();
      n.clearQueue();
      let i = null;
      const o = [10, 20, 40, 60, 120, 300, 600];
      let r = -1,
        t = null,
        s = !1,
        a = !1,
        l = !1;
      e = e.instance;
      const c = new x({
          headerText: H5P.t("offlineDialogHeader"),
          dialogText: H5P.t("offlineDialogBody"),
          confirmText: H5P.t("offlineDialogRetryButtonLabel"),
          hideCancel: !0,
          hideExit: !0,
          classes: ["offline"],
          instance: e,
          skipRestoreFocus: !0,
        }),
        u = c.getElement(),
        d = document.createElement("div");
      (d.classList.add("count-down"),
        (d.innerHTML = H5P.t("offlineDialogRetryMessage").replace(
          ":num",
          '<span class="count-down-num">0</span>',
        )),
        u.querySelector(".h5p-confirmation-dialog-text").appendChild(d));
      const h = d.querySelector(".count-down-num"),
        p = document.createElement("div");
      p.classList.add("throbber-wrapper");
      const f = document.createElement("div");
      (f.classList.add("sending-requests-throbber"),
        p.appendChild(f),
        n.on(
          "requestQueued",
          function (e) {
            if (!e.data || !e.data.processingQueue) {
              if (!s) {
                const t = document.body.querySelector(".h5p-content");
                if (!t) return;
                (c.appendTo(t), t.appendChild(p), (s = !0));
              }
              b();
            }
          }.bind(this),
        ),
        n.on(
          "queueEmptied",
          function (e) {
            e.data && e.data.length
              ? b(!0)
              : (clearInterval(t),
                g(!1),
                (r = -1),
                a && (c.hide(), (a = !1)),
                n.displayToastMessage(H5P.t("offlineSuccessfulSubmit"), !0, {
                  position: { vertical: "top", offsetVertical: "100" },
                }));
          }.bind(this),
        ),
        c.on(
          "confirmed",
          function () {
            ((a = !1),
              setTimeout(function () {
                m();
              }, 100));
          }.bind(this),
        ),
        window.addEventListener(
          "online",
          function () {
            m();
          }.bind(this),
        ),
        window.addEventListener(
          "message",
          function (e) {
            window.parent === e.source &&
              "h5p" === e.data.context &&
              "queueRequest" === e.data.action &&
              this.add(e.data.url, e.data.data);
          }.bind(this),
        ));
      const g = function (e) {
          ((l = !l),
            void 0 !== e && (l = e),
            l && a && (c.hide(), (a = !1)),
            l ? p.classList.add("show") : p.classList.remove("show"));
        },
        m = function () {
          (clearInterval(t), g(!0), n.resumeQueue());
        },
        v = function () {
          ((r += 1), r >= o.length && (r = o.length - 1));
        },
        b = function (e) {
          a ||
            (g(!1),
            a ||
              (e
                ? setTimeout(function () {
                    c.show(0);
                  }, 100)
                : c.show(0)),
            (a = !0),
            (i = new Date().getTime()),
            v(),
            clearInterval(t),
            (t = setInterval(y, 100)));
        },
        y = function () {
          var e = new Date().getTime(),
            e = Math.floor((e - i) / 1e3);
          const t = o[r] - e;
          ((h.textContent = t.toString()), t <= 0 && m());
        };
      this.add = function (e, t) {
        if (window.navigator.onLine) return !1;
        n.add(e, t);
      };
    };
  })(H5P.RequestQueue, H5P.ConfirmationDialog)),
  (function (i) {
    ((H5P.Image = function (e, t, n) {
      (H5P.EventDispatcher.call(this),
        (this.extras = n),
        void 0 !== e.file && e.file instanceof Object
          ? ((this.source = H5P.getPath(e.file.path, t)),
            (this.width = e.file.width),
            (this.height = e.file.height))
          : (this.placeholder = !0),
        (this.alt =
          e.decorative || void 0 === e.alt
            ? ""
            : this.stripHTML(this.htmlDecode(e.alt))),
        void 0 !== e.title &&
          (this.title = this.stripHTML(this.htmlDecode(e.title))));
    }),
      (H5P.Image.prototype = Object.create(H5P.EventDispatcher.prototype)),
      (H5P.Image.prototype.constructor = H5P.Image),
      (H5P.Image.prototype.attach = function (e) {
        var t = this,
          n = this.source;
        (void 0 === t.$img &&
          (t.placeholder
            ? (t.$img = i("<div>", {
                width: "100%",
                height: "100%",
                class: "h5p-placeholder",
                title: void 0 === this.title ? "" : this.title,
                on: {
                  load: function () {
                    t.trigger("loaded");
                  },
                },
              }))
            : (t.$img = i("<img>", {
                width: "100%",
                height: "100%",
                src: n,
                alt: this.alt,
                title: void 0 === this.title ? "" : this.title,
                on: {
                  load: function () {
                    t.trigger("loaded");
                  },
                },
              }))),
          e.addClass("h5p-image").html(t.$img));
      }),
      (H5P.Image.prototype.htmlDecode = function (e) {
        return new DOMParser().parseFromString(e, "text/html").documentElement
          .textContent;
      }),
      (H5P.Image.prototype.stripHTML = function (e) {
        const t = document.createElement("div");
        return ((t.innerHTML = e), t.textContent || t.innerText || "");
      }),
      H5P.Image);
  })((H5P = H5P || {}).jQuery),
  ((H5P = H5P || {}).Transition = (function () {
    Transition = {
      transitionEndEventNames: {
        WebkitTransition: "webkitTransitionEnd",
        transition: "transitionend",
        MozTransition: "transitionend",
        OTransition: "oTransitionEnd",
        msTransition: "MSTransitionEnd",
      },
      cache: [],
      getVendorPropertyName: function (e) {
        if (void 0 !== Transition.cache[e]) return Transition.cache[e];
        var t = document.createElement("div");
        if (e in t.style) Transition.cache[e] = e;
        else {
          var n = ["Moz", "Webkit", "O", "ms"],
            i = e.charAt(0).toUpperCase() + e.substr(1);
          if (e in t.style) Transition.cache[e] = e;
          else
            for (var o = 0; o < n.length; ++o) {
              var r = n[o] + i;
              if (r in t.style) {
                Transition.cache[e] = r;
                break;
              }
            }
        }
        return Transition.cache[e];
      },
      getTransitionEndEventName: function () {
        return (
          Transition.transitionEndEventNames[
            Transition.getVendorPropertyName("transition")
          ] || void 0
        );
      },
      onTransitionEnd: function (e, t, n) {
        ((n = n || 1e3),
          (Transition.transitionEndEventName =
            Transition.transitionEndEventName ||
            Transition.getTransitionEndEventName()));
        function i() {
          o ||
            (e.off(Transition.transitionEndEventName, t),
            (o = !0),
            clearTimeout(r),
            t());
        }
        var o = !1,
          r = setTimeout(function () {
            i();
          }, n);
        e.on(Transition.transitionEndEventName, function () {
          i();
        });
      },
    };
    function i(e, t) {
      var n;
      t >= e.length ||
        ((n = e[t]),
        H5P.Transition.onTransitionEnd(
          n.$element,
          function () {
            (n.end && n.end(), !0 !== n.break && i(e, t + 1));
          },
          n.timeout || void 0,
        ));
    }
    return (
      (Transition.sequence = function (e) {
        i(e, 0);
      }),
      Transition
    );
  })(H5P.jQuery)),
  ((H5P = H5P || {}).JoubelHelpTextDialog = (function (u) {
    var d = 0;
    function e(e, t, n) {
      H5P.EventDispatcher.call(this);
      var i = this,
        o = "joubel-help-text-header-" + ++d,
        r = "joubel-help-text-body-" + d,
        s = u("<div>", {
          class: "joubel-help-text-dialog-box",
          role: "dialog",
          "aria-labelledby": o,
          "aria-describedby": r,
        });
      u("<div>", { class: "joubel-help-text-dialog-background" }).appendTo(s);
      var a = u("<div>", {
        class: "joubel-help-text-dialog-container",
      }).appendTo(s);
      (u("<div>", {
        class: "joubel-help-text-header",
        id: o,
        role: "header",
        html: e,
      }).appendTo(a),
        u("<div>", {
          class: "joubel-help-text-body",
          id: r,
          html: t,
          role: "document",
          tabindex: 0,
        }).appendTo(a));
      function l() {
        (s.remove(), i.trigger("closed"));
      }
      var c = u("<div>", {
        class: "joubel-help-text-remove",
        role: "button",
        title: n,
        tabindex: 1,
        click: l,
        keydown: function (e) {
          -1 !== [32, 13].indexOf(e.which) && (e.preventDefault(), l());
        },
      }).appendTo(a);
      ((i.getElement = function () {
        return s;
      }),
        (i.focus = function () {
          c.focus();
        }));
    }
    return ((e.prototype = Object.create(
      H5P.EventDispatcher.prototype,
    )).constructor = e);
  })(H5P.jQuery)),
  ((H5P = H5P || {}).JoubelMessageDialog = (function (r) {
    return function (e, t) {
      function n() {
        (i.remove(), clearTimeout(o), e.off("click.messageDialog"));
      }
      var i = r("<div/>", { class: "joubel-message-dialog", text: t }).appendTo(
          e,
        ),
        o = setTimeout(n, 3e3);
      return (e.on("click.messageDialog", n), i);
    };
  })(H5P.jQuery)),
  ((H5P = H5P || {}).JoubelProgressCircle = (function (a) {
    function e(t, e, n, i) {
      ((n = n || "#f0f0f0"), (i = i || "#ffffff"));
      var o = this.hexToRgb((e = e || "#1a73d9"));
      try {
        if ("" === (t = Number(t))) throw "is empty";
        if (isNaN(t)) throw "is not a number";
      } catch (e) {
        t = "err";
      }
      100 < t && (t = 100);
      var r =
          "rgb(" +
          parseInt(o.r, 10) +
          "," +
          parseInt(o.g, 10) +
          "," +
          parseInt(o.b, 10) +
          ")",
        s = a("<div/>", { class: "joubel-progress-circle-wrapper" }),
        e = a("<div/>", {
          class: "joubel-progress-circle-active-border",
        }).appendTo(s),
        o = a("<div/>", { class: "joubel-progress-circle-circle" }).appendTo(e);
      a("<span/>", {
        text: t + "%",
        class: "joubel-progress-circle-percentage",
      }).appendTo(o);
      t *= 3.6;
      return (
        (t <= 180
          ? e.css(
              "background-image",
              "linear-gradient(" +
                (90 + t) +
                "deg, transparent 50%, " +
                n +
                " 50%),linear-gradient(90deg, " +
                n +
                " 50%, transparent 50%)",
            )
          : e.css(
              "background-image",
              "linear-gradient(" +
                (t - 90) +
                "deg, transparent 50%, " +
                r +
                " 50%),linear-gradient(90deg, " +
                n +
                " 50%, transparent 50%)",
            )
        )
          .css("border", "2px solid" + i)
          .css("background-color", r),
        (this.$activeBorder = e),
        (this.$backgroundCircle = o),
        (this.$wrapper = s),
        this.initResizeFunctionality(),
        s
      );
    }
    return (
      (e.prototype.initResizeFunctionality = function () {
        var e = this;
        (a(window).resize(function () {
          setTimeout(function () {
            e.resize();
          });
        }),
          setTimeout(function () {
            e.resize();
          }, 0));
      }),
      (e.prototype.resize = function () {
        var e,
          t,
          n,
          i = this.$wrapper.parent();
        void 0 !== i &&
          i &&
          ((n = parseInt(i.css("font-size"), 10)),
          (t =
            (e =
              parseInt(n / 4.5, 10) % 2 == 0
                ? parseInt(n / 4.5, 10) + 4
                : parseInt(n / 4.5, 10) + 5) / 2),
          this.$activeBorder.css({
            width: (i = 3.75 * n),
            height: (n = 3.75 * n),
          }),
          this.$backgroundCircle.css({
            width: i - e,
            height: n - e,
            top: t,
            left: t,
          }));
      }),
      (e.prototype.hexToRgb = function (e) {
        e = /^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(e);
        return e
          ? {
              r: parseInt(e[1], 16),
              g: parseInt(e[2], 16),
              b: parseInt(e[3], 16),
            }
          : null;
      }),
      e
    );
  })(H5P.jQuery)),
  ((H5P = H5P || {}).SimpleRoundedButton = (function (n) {
    return function (e) {
      var t = n("<div>", {
        class: "joubel-simple-rounded-button",
        title: e,
        role: "button",
        tabindex: "0",
      }).keydown(function (e) {
        -1 !== [32, 13].indexOf(e.which) &&
          (n(this).click(), e.preventDefault());
      });
      return (
        n("<span>", {
          class: "joubel-simple-rounded-button-text",
          html: e,
        }).appendTo(t),
        t
      );
    };
  })(H5P.jQuery)),
  ((H5P = H5P || {}).JoubelSpeechBubble = (function (r) {
    var s,
      a,
      l,
      c,
      u,
      d,
      h = !!navigator.userAgent.match(/iPod|iPhone|iPad/g);
    function p(e) {
      var t = e.closest(".h5p-frame");
      return (t = !t.length ? e.closest(".h5p-container") : t);
    }
    function f() {
      g(s, a, d, l, c);
    }
    function g(e, t, n, i, o) {
      var r = (function (e, t) {
          ((e = e[0].getBoundingClientRect()),
            (t = t[0].getBoundingClientRect()));
          return {
            top: t.top - e.top,
            right: e.right - t.right,
            bottom: e.bottom - t.bottom,
            left: t.left - e.left,
            innerWidth: t.width,
            innerHeight: t.height,
            outerWidth: e.width,
            outerHeight: e.height,
          };
        })(p(t), t),
        s = r.bottom > r.top ? "bottom" : "top",
        a = 0.9 * r.outerWidth,
        n = n < a ? n : a,
        a = (function (e, t) {
          var n = {},
            i = e / 2;
          ((n.top = t.top + t.innerHeight),
            (n.bottom = t.bottom + t.innerHeight + 9),
            t.left < i
              ? (n.left = 3)
              : t.left + i > t.outerWidth
                ? (n.left = t.outerWidth - e - 3)
                : (n.left = t.left - i + t.innerWidth / 2));
          return n;
        })(n, r),
        t = (function (e, t, n, i) {
          var o = {},
            e = e - 20;
          ((o.left = n.left - t.left + i / 2 - 6), o.left < 9 && (o.left = 9));
          o.left > e && (o.left = e);
          return ((o.top = -6), (o.bottom = -6), o);
        })(n, a, r, t.width());
      e.css(
        ((e = n),
        (n = a),
        (a = 16),
        "top" === s
          ? {
              width: e + "px",
              bottom: n.bottom + "px",
              left: n.left + "px",
              fontSize: a + "px",
              top: "",
            }
          : {
              width: e + "px",
              top: n.top + "px",
              left: n.left + "px",
              fontSize: a + "px",
              bottom: "",
            }),
      );
      ((t = t),
        (t =
          "top" === s
            ? { bottom: t.bottom + "px", left: t.left + "px", top: "" }
            : { top: t.top + "px", left: t.left + "px", bottom: "" }));
      (i.css(t), o.css(t));
    }
    H5P.externalDispatcher.on("domHidden", function (e) {
      void 0 !== s && 0 !== e.data.$dom.find(a).length && m();
    });
    var m = function () {
      (H5P.$body.off("mousedown.speechBubble"),
        H5P.$window.off("resize", "", f),
        a.parents(".h5p-dialog").off("mousedown.speechBubble"),
        h && H5P.$body.css("cursor", ""),
        void 0 !== s &&
          (s.removeClass("show"),
          clearTimeout(u),
          (u = setTimeout(function () {
            (s.remove(), (s = void 0));
          }, 500))));
    };
    function v(e) {
      e.target !== a[0] && (m(), (a = void 0));
    }
    return function (e, t, n) {
      ((d = n = n || 400),
        (a = e),
        (this.isCurrent = function (e) {
          return e.is(a);
        }),
        (this.remove = function () {
          m();
        }),
        void 0 !== s && m());
      var i,
        o = p(e);
      return (
        (i = s) &&
          (clearTimeout(u),
          i.removeClass("show"),
          setTimeout(function () {
            i && (i.remove(), (i = void 0));
          }, 500)),
        (l = r('<div class="joubel-speech-bubble-tail"></div>')),
        (c = r('<div class="joubel-speech-bubble-inner-tail"></div>')),
        (t = r(
          '<div class="joubel-speech-bubble-inner"><div class="joubel-speech-bubble-text">' +
            t +
            "</div></div>",
        ).prepend(c)),
        (s = r('<div class="joubel-speech-bubble" aria-live="assertive">')
          .append([l, t])
          .appendTo(o)),
        setTimeout(function () {
          s.addClass("show");
        }, 0),
        g(s, a, n, l, c),
        H5P.$body.on("mousedown.speechBubble", v),
        H5P.$window.on("resize", "", f),
        e.parents(".h5p-dialog").on("mousedown.speechBubble", v),
        h && H5P.$body.css("cursor", "pointer"),
        this
      );
    };
  })(H5P.jQuery)),
  ((H5P = H5P || {}).JoubelThrobber = (function (e) {
    return function () {
      return e("<div/>", { class: "h5p-throbber" });
    };
  })(H5P.jQuery)),
  /*!@license H5P.JoubelUI-1.3/js/joubel-tip.js by Joubel licensed under unknown license*/ (H5P.JoubelTip =
    (function (a) {
      var l = a("<div/>");
      return function (t, n) {
        var i,
          e = l.html(t).text().trim();
        if ("" !== e) {
          n = a.extend(
            { tipLabel: e, helpIcon: !1, showSpeechBubble: !0, tabcontrol: !1 },
            n,
          );
          var o = a("<div/>", {
            class:
              "joubel-tip-container" + (n.showSpeechBubble ? "" : " be-quiet"),
            "aria-label": n.tipLabel,
            "aria-expanded": !1,
            role: "button",
            tabindex: n.tabcontrol ? -1 : 0,
            click: function (e) {
              (r(), e.preventDefault());
            },
            keydown: function (e) {
              32 === e.which || 13 === e.which
                ? (r(), e.stopPropagation(), e.preventDefault())
                : r(!1);
            },
            html:
              '<span class="joubel-icon-tip-normal ' +
              (n.helpIcon ? " help-icon" : "") +
              '"><span class="h5p-icon-shadow"></span><span class="h5p-icon-speech-bubble"></span><span class="h5p-icon-info"></span></span>',
          });
          const s = a("<div>", {
            class: "hidden-but-read",
            "aria-live": "polite",
            appendTo: o,
          });
          var r = function (e) {
            void 0 !== i && i.isCurrent(o)
              ? (i.remove(),
                (i = void 0),
                o.attr("aria-expanded", !1),
                s.html(""))
              : !1 !== e &&
                n.showSpeechBubble &&
                ((i = H5P.JoubelSpeechBubble(o, t)),
                o.attr("aria-expanded", !0),
                s.html(t));
          };
          return o;
        }
      };
    })(H5P.jQuery)),
  ((H5P = H5P || {}).JoubelSlider = (function (t) {
    function e(e) {
      (H5P.EventDispatcher.call(this),
        (this.$slider = t(
          "<div>",
          t.extend({ class: "h5p-joubel-ui-slider" }, e),
        )),
        (this.$slides = []),
        (this.currentIndex = 0),
        (this.numSlides = 0));
    }
    return (
      (((e.prototype = Object.create(
        H5P.EventDispatcher.prototype,
      )).constructor = e).prototype.addSlide = function (e) {
        (e
          .addClass("h5p-joubel-ui-slide")
          .css({ left: 100 * this.numSlides + "%" }),
          this.$slider.append(e),
          this.$slides.push(e),
          this.numSlides++,
          1 === this.numSlides && e.addClass("current"));
      }),
      (e.prototype.attach = function (e) {
        e.append(this.$slider);
      }),
      (e.prototype.move = function (e) {
        var t = this;
        (0 === e && t.trigger("first-slide"),
          e + 1 === t.numSlides && t.trigger("last-slide"),
          t.trigger("move"));
        var n = t.$slides[this.currentIndex];
        (H5P.Transition.onTransitionEnd(this.$slider, function () {
          (n.removeClass("current"), t.trigger("moved"));
        }),
          this.$slides[e].addClass("current"));
        var i = "translateX(" + 100 * -e + "%)";
        (this.$slider.css({
          "-webkit-transform": i,
          "-moz-transform": i,
          "-ms-transform": i,
          transform: i,
        }),
          (this.currentIndex = e));
      }),
      (e.prototype.remove = function () {
        this.$slider.remove();
      }),
      (e.prototype.next = function () {
        this.currentIndex + 1 >= this.numSlides ||
          this.move(this.currentIndex + 1);
      }),
      (e.prototype.previous = function () {
        this.move(this.currentIndex - 1);
      }),
      (e.prototype.first = function () {
        this.move(0);
      }),
      (e.prototype.last = function () {
        this.move(this.numSlides - 1);
      }),
      e
    );
  })(H5P.jQuery)),
  ((H5P = H5P || {}).JoubelScoreBar = (function (s) {
    var a = 0;
    return function (e, t, n, i) {
      var o = this;
      function r(e) {
        return t ? t.replace(":num", e).replace(":total", o.maxScore) : "";
      }
      ((o.maxScore = e),
        (o.score = 0),
        a++,
        (o.STAR_MARKUP =
          '<svg tabindex="-1" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 63.77 53.87" aria-hidden="true" focusable="false"><title>star</title><filter tabindex="-1" id="h5p-joubelui-score-bar-star-inner-shadow-' +
          a +
          '" x0="-50%" y0="-50%" width="200%" height="200%"><feGaussianBlur in="SourceAlpha" stdDeviation="3" result="blur"></feGaussianBlur><feOffset dy="2" dx="4"></feOffset><feComposite in2="SourceAlpha" operator="arithmetic" k2="-1" k3="1" result="shadowDiff"></feComposite><feFlood flood-color="#ffe95c" flood-opacity="1"></feFlood><feComposite in2="shadowDiff" operator="in"></feComposite><feComposite in2="SourceGraphic" operator="over" result="firstfilter"></feComposite><feGaussianBlur in="firstfilter" stdDeviation="3" result="blur2"></feGaussianBlur><feOffset dy="-2" dx="-4"></feOffset><feComposite in2="firstfilter" operator="arithmetic" k2="-1" k3="1" result="shadowDiff"></feComposite><feFlood flood-color="#ffe95c" flood-opacity="1"></feFlood><feComposite in2="shadowDiff" operator="in"></feComposite><feComposite in2="firstfilter" operator="over"></feComposite></filter><path tabindex="-1" class="h5p-joubelui-score-bar-star-shadow" d="M35.08,43.41V9.16H20.91v0L9.51,10.85,9,10.93C2.8,12.18,0,17,0,21.25a11.22,11.22,0,0,0,3,7.48l8.73,8.53-1.07,6.16Z"/><g tabindex="-1"><path tabindex="-1" class="h5p-joubelui-score-bar-star-border" d="M61.36,22.8,49.72,34.11l2.78,16a2.6,2.6,0,0,1,.05.64c0,.85-.37,1.6-1.33,1.6A2.74,2.74,0,0,1,49.94,52L35.58,44.41,21.22,52a2.93,2.93,0,0,1-1.28.37c-.91,0-1.33-.75-1.33-1.6,0-.21.05-.43.05-.64l2.78-16L9.8,22.8A2.57,2.57,0,0,1,9,21.25c0-1,1-1.33,1.81-1.49l16.07-2.35L34.09,2.83c.27-.59.85-1.33,1.55-1.33s1.28.69,1.55,1.33l7.21,14.57,16.07,2.35c.75.11,1.81.53,1.81,1.49A3.07,3.07,0,0,1,61.36,22.8Z"/><path tabindex="-1" class="h5p-joubelui-score-bar-star-fill" d="M61.36,22.8,49.72,34.11l2.78,16a2.6,2.6,0,0,1,.05.64c0,.85-.37,1.6-1.33,1.6A2.74,2.74,0,0,1,49.94,52L35.58,44.41,21.22,52a2.93,2.93,0,0,1-1.28.37c-.91,0-1.33-.75-1.33-1.6,0-.21.05-.43.05-.64l2.78-16L9.8,22.8A2.57,2.57,0,0,1,9,21.25c0-1,1-1.33,1.81-1.49l16.07-2.35L34.09,2.83c.27-.59.85-1.33,1.55-1.33s1.28.69,1.55,1.33l7.21,14.57,16.07,2.35c.75.11,1.81.53,1.81,1.49A3.07,3.07,0,0,1,61.36,22.8Z"/><path tabindex="-1" filter="url(#h5p-joubelui-score-bar-star-inner-shadow-' +
          a +
          ')" class="h5p-joubelui-score-bar-star-fill-full-score" d="M61.36,22.8,49.72,34.11l2.78,16a2.6,2.6,0,0,1,.05.64c0,.85-.37,1.6-1.33,1.6A2.74,2.74,0,0,1,49.94,52L35.58,44.41,21.22,52a2.93,2.93,0,0,1-1.28.37c-.91,0-1.33-.75-1.33-1.6,0-.21.05-.43.05-.64l2.78-16L9.8,22.8A2.57,2.57,0,0,1,9,21.25c0-1,1-1.33,1.81-1.49l16.07-2.35L34.09,2.83c.27-.59.85-1.33,1.55-1.33s1.28.69,1.55,1.33l7.21,14.57,16.07,2.35c.75.11,1.81.53,1.81,1.49A3.07,3.07,0,0,1,61.36,22.8Z"/></g></svg>'),
        (o.appendTo = function (e) {
          o.$scoreBar.appendTo(e);
        }),
        (o.setScore = function (e) {
          e !== o.score &&
            ((o.score = e > o.maxScore ? o.maxScore : e), o.updateVisuals());
        }),
        (o.incrementScore = function (e) {
          o.setScore(o.score + (e || 1));
        }),
        (o.setMaxScore = function (e) {
          o.maxScore = e;
        }),
        (o.updateVisuals = function () {
          (o.$progress.html(r(o.score)),
            o.$scoreCounter.text(o.score),
            o.$maxScore.text(o.maxScore),
            setTimeout(function () {
              (o.$progress.css({ width: (o.score / o.maxScore) * 100 + "%" }),
                H5P.Transition.onTransitionEnd(
                  o.$progress,
                  function () {
                    (o.$scoreBar.toggleClass(
                      "h5p-joubelui-score-bar-full-score",
                      o.score === o.maxScore,
                    ),
                      o.$scoreBar.toggleClass(
                        "h5p-joubelui-score-bar-animation-active",
                        o.score === o.maxScore,
                      ),
                      o.$scoreBar.one("animationend", function () {
                        o.$scoreBar.removeClass(
                          "h5p-joubelui-score-bar-animation-active",
                        );
                      }));
                  },
                  600,
                ));
            }, 300));
        }),
        (o.reset = function () {
          o.$scoreBar.removeClass("h5p-joubelui-score-bar-full-score");
        }),
        (function () {
          o.$scoreBar = s("<div>", { class: "h5p-joubelui-score-bar" });
          var e = s("<div>", {
            class: "h5p-joubelui-score-bar-visuals",
            appendTo: o.$scoreBar,
          });
          ((o.$progressWrapper = s("<div>", {
            class: "h5p-joubelui-score-bar-progress-wrapper",
            appendTo: e,
          })),
            (o.$progress = s("<div>", {
              class: "h5p-joubelui-score-bar-progress",
              html: r(o.score),
              appendTo: o.$progressWrapper,
            })),
            s("<div>", {
              class: "h5p-joubelui-score-bar-star",
              html: o.STAR_MARKUP,
            }).appendTo(e));
          e = s("<div>", {
            class: "h5p-joubelui-score-numeric",
            appendTo: o.$scoreBar,
            "aria-hidden": !0,
          });
          ((o.$scoreCounter = s("<span>", {
            class:
              "h5p-joubelui-score-number h5p-joubelui-score-number-counter",
            text: 0,
            appendTo: e,
          })),
            s("<span>", {
              class: "h5p-joubelui-score-number-separator",
              text: "/",
              appendTo: e,
            }),
            (o.$maxScore = s("<span>", {
              class: "h5p-joubelui-score-number h5p-joubelui-score-max",
              text: o.maxScore,
              appendTo: e,
            })),
            n &&
              (H5P.JoubelUI.createTip(n, {
                tipLabel: i || n,
                helpIcon: !0,
              }).appendTo(o.$scoreBar),
              o.$scoreBar.addClass("h5p-score-bar-has-help")));
        })());
    };
  })(H5P.jQuery)),
  ((H5P = H5P || {}).JoubelProgressbar = (function (n) {
    function e(e, t) {
      H5P.EventDispatcher.call(this);
      ((this.options = n.extend({ progressText: "Slide :num of :total" }, t)),
        (this.currentStep = 0),
        (this.steps = e),
        (this.$progressbar = n("<div>", { class: "h5p-joubelui-progressbar" })),
        (this.$background = n("<div>", {
          class: "h5p-joubelui-progressbar-background",
        }).appendTo(this.$progressbar)));
    }
    return (
      (((e.prototype = Object.create(
        H5P.EventDispatcher.prototype,
      )).constructor = e).prototype.updateAria = function () {
        var e;
        this.options.disableAria ||
          (this.$currentStatus ||
            (this.$currentStatus = n("<div>", {
              class: "h5p-joubelui-progressbar-slide-status-text",
              "aria-live": "assertive",
            }).appendTo(this.$progressbar)),
          (e = this.options.progressText
            .replace(":num", this.currentStep)
            .replace(":total", this.steps)),
          this.$currentStatus.html(e));
      }),
      (e.prototype.appendTo = function (e) {
        this.$progressbar.appendTo(e);
      }),
      (e.prototype.setProgress = function (e) {
        e > this.steps ||
          e < 0 ||
          ((this.currentStep = e),
          this.$background.css({
            width: (this.currentStep / this.steps) * 100 + "%",
          }),
          this.updateAria());
      }),
      (e.prototype.next = function () {
        this.setProgress(this.currentStep + 1);
      }),
      (e.prototype.reset = function () {
        this.setProgress(0);
      }),
      (e.prototype.isLastStep = function () {
        return this.steps === this.currentStep;
      }),
      e
    );
  })(H5P.jQuery)),
  ((H5P = H5P || {}).JoubelUI = (function (n) {
    function e() {}
    var t;
    return (
      (e.createTip = function (e, t) {
        return new H5P.JoubelTip(e, t);
      }),
      (e.createMessageDialog = function (e, t) {
        return new H5P.JoubelMessageDialog(e, t);
      }),
      (e.createHelpTextDialog = function (e, t, n) {
        return new H5P.JoubelHelpTextDialog(e, t, n);
      }),
      (e.createProgressCircle = function (e, t, n, i) {
        return new H5P.JoubelProgressCircle(e, t, n, i);
      }),
      (e.createThrobber = function () {
        return new H5P.JoubelThrobber();
      }),
      (e.createSimpleRoundedButton = function (e) {
        return new H5P.SimpleRoundedButton(e);
      }),
      (e.createSlider = function (e) {
        return new H5P.JoubelSlider(e);
      }),
      (e.createScoreBar = function (e, t, n, i) {
        return new H5P.JoubelScoreBar(e, t, n, i);
      }),
      (e.createProgressbar = function (e, t) {
        return new H5P.JoubelProgressbar(e, t);
      }),
      (e.createButton = function (e) {
        var t = "button";
        return (
          e.href ? (t = "a") : (e.type = "button"),
          e.class
            ? (e.class += " h5p-joubelui-button")
            : (e.class = "h5p-joubelui-button"),
          n("<" + t + "/>", e)
        );
      }),
      H5P.isFramed &&
        !H5P.hasiOSiframeScrollFix &&
        /iPad|iPhone|iPod/.test(navigator.userAgent) &&
        ((H5P.hasiOSiframeScrollFix = !0),
        (t = HTMLElement.prototype.focus),
        (HTMLElement.prototype.focus = function () {
          (this instanceof HTMLAnchorElement ||
            this instanceof HTMLInputElement ||
            this instanceof HTMLSelectElement ||
            this instanceof HTMLTextAreaElement ||
            this instanceof HTMLButtonElement ||
            this instanceof HTMLIFrameElement ||
            this instanceof HTMLAreaElement) &&
            !this.getAttribute("role") &&
            t.call(this);
        })),
      e
    );
  })(H5P.jQuery)),
  /*!@license H5P.Question-1.5/scripts/question.js by Joubel licensed under MIT*/ (H5P.Tooltip =
    H5P.Tooltip || function () {}),
  (H5P.Question = (function (B, e, z) {
    function t(o) {
      var u = this;
      (e.call(u),
        (u.order = [
          "video",
          "image",
          "audio",
          "introduction",
          "content",
          "explanation",
          "feedback",
          "scorebar",
          "buttons",
          "read",
        ]));
      function d(e, t) {
        ((y[e] = {}),
          (e = y[e].$element = B("<div/>", { class: "h5p-question-" + e })),
          t && e[t instanceof B ? "append" : "html"](t));
      }
      function h(e, t) {
        t instanceof B
          ? y[e].$element.html("").append(t)
          : y[e].$element.html(t);
      }
      function p() {
        if (void 0 !== y.buttons) {
          clearTimeout(l);
          for (var e = 0; e < C.length; e++)
            (A(x, C[e].id, w, y.buttons.$element), (w[C[e].id].isVisible = !0));
          for (var t = 0, n = !(C = []), i = 0; i < P.length; i++) {
            var o = w[P[i].id];
            (o.isVisible && (t += 1), o.$element.is(":focus") && (n = !0));
          }
          var r = 150;
          (y.feedback &&
            y.feedback.$element.hasClass("h5p-question-popup") &&
            (r = 0),
            t === y.buttons.$element.children().length
              ? (q(y.buttons), D(n))
              : (D(n),
                y.buttons.$element.is(":empty") ||
                  (M(y.buttons),
                  L(y.buttons.$element),
                  (l = setTimeout(function () {
                    u.trigger("resize");
                  }, r))),
                R()),
            (s = void 0));
        }
      }
      function a() {
        var e = y.image.$element;
        (clearTimeout(n),
          e.addClass("animatable"),
          (n =
            ((E = E
              ? (B(this).attr("aria-expanded", !0),
                e.addClass("h5p-question-image-fill-width"),
                !1)
              : (B(this).attr("aria-expanded", !1),
                e.removeClass("h5p-question-image-fill-width"),
                !0)),
            setTimeout(function () {
              u.trigger("resize");
            }, 600))));
      }
      function i(e, t, n) {
        for (var i = 0; i < n.length; i++) if (n[i][t] === e) return i;
        return -1;
      }
      var f,
        g,
        m,
        v,
        s,
        l,
        t,
        n,
        b,
        r,
        c,
        y = {},
        w = {},
        x = [],
        P = [],
        C = [],
        H = !1,
        T = { disableFeedback: !1, disableReadSpeaker: !1 },
        E = !0,
        S = !1,
        I = !1,
        A = function (e, t, n, i) {
          for (var o = 0; o < e.length; o++)
            if (e[o] === t) {
              for (
                ;
                0 < o && (void 0 === n[e[o - 1]] || !n[e[o - 1]].isVisible);

              )
                o--;
              (0 === o
                ? n[t].$element.prependTo(i)
                : n[t].$element.insertAfter(n[e[o - 1]].$element),
                (n[t].isVisible = !0));
              break;
            }
        },
        k = function (e, t) {
          var n,
            i,
            o,
            r,
            s = e.parent(),
            a = e.siblings(".h5p-question-feedback-tail"),
            l = e.outerWidth(),
            c = L(e),
            u = !1,
            d = s.height() / 2 - c / 2,
            h = s.width() / 2 - l / 2,
            p = 0,
            f = 0,
            g = 0;
          (null != t
            ? ((n = t[0].offsetTop < 15),
              (i = t[0].offsetTop + t.height() > s.height() - 15),
              (o = t[0].offsetLeft < 15),
              (r = t[0].offsetLeft + t.width() > s.width() - 15),
              (h = t[0].offsetLeft - l / 2 + t.width() / 2),
              (d = t[0].offsetTop - c - 15),
              (p = h + l / 2 - a.width() / 2),
              (f = d + c - a.height() / 2),
              (g = 225),
              c + 15 > t[0].offsetTop &&
                ((f = (d = t[0].offsetTop + t.height() + 15) - a.height() / 2),
                (g = 45)),
              (h = h < 0 ? 0 : h) + l > s.width() && (h = s.width() - l),
              n && (o || r)
                ? ((h = t[0].offsetLeft + (o ? t.width() : -l)),
                  (d = t[0].offsetTop + t.height()),
                  (u = !0))
                : i && (o || r)
                  ? ((h = t[0].offsetLeft + (o ? t.width() : -l)),
                    (d = t[0].offsetTop - c),
                    (u = !0))
                  : n ||
                    i ||
                    ((o || r) &&
                      ((d = t[0].offsetTop - c / 2 + t.width() / 2),
                      (h = t[0].offsetLeft + (o ? t.width() + 15 : -l - 15)) < 0
                        ? (u = !(h = 0))
                        : ((p = h + (o ? -a.width() / 2 : l - a.width() / 2)),
                          (f = d + c / 2 - a.height() / 2),
                          (g = o ? 315 : 135)))),
              d + c > s.height() &&
                ((d = s.height() - c),
                c > s.height() - (t[0].offsetTop + t.height() + 15) &&
                  (u = !0)))
            : (u = !0),
            e.css({ top: (d = d < 0 ? 0 : d), left: h }),
            a.css({ top: f, left: p }),
            u
              ? a.hide()
              : a
                  .css({ left: p, top: f, transform: "rotate(" + g + "deg)" })
                  .show());
        },
        L = function (e) {
          if (e.is(":visible")) {
            var t = e.hasClass("h5p-question-popup"),
              n = e
                .clone()
                .css({
                  position: "absolute",
                  "max-height": "none",
                  width: t ? "" : "100%",
                })
                .appendTo(e.parent()),
              i =
                parseFloat(e.css("margin-left")) +
                parseFloat(e.css("margin-right")),
              t = n.css("width") ? n.css("width") : "100%";
            n.css("width", "calc(" + t + " - " + i + "px)");
            ((t = Math.round(n.get(0).getBoundingClientRect().height)),
              (i = parseFloat(e.css("fontSize"))));
            return (
              e.css("max-height", t / i + "em"),
              n.remove(),
              0 < t &&
                y.buttons &&
                y.buttons.$element === e &&
                (M(y.buttons), setTimeout(R, 150)),
              t
            );
          }
          e.css("max-height", "none");
        },
        D = function (e) {
          for (var t = 0; t < P.length; t++) O(P[t].id);
          ((P = []), e && u.focusButton());
        },
        O = function (e) {
          (w[e].$element.detach(), (w[e].isVisible = !1));
        },
        j = function (e, t, n) {
          if (
            ((t = t || 0),
            (n = n || 5),
            e && e instanceof B && document !== e.get(0) && !(n <= t))
          )
            return "auto" === e.css("overflow-y") ? e : j(e.parent(), t + 1, n);
        },
        R = function () {
          var e;
          w &&
            y.buttons &&
            ((e = function () {
              if (y.buttons.$element.is(":visible")) {
                var e,
                  t = { max: 0, min: 0, current: 0 };
                for (e in w) {
                  var n = w[e];
                  n.isVisible &&
                    (W(w[e]),
                    (t.max += n.width.max),
                    (t.min += n.width.min),
                    (t.current += n.isTruncated ? n.width.min : n.width.max));
                }
                function i(e) {
                  return t.max < e
                    ? (t.max !== t.current && $(t.current, e), !0)
                    : t.min < e && ((t.current > e ? N : $)(t.current, e), !0);
                }
                (F(!1),
                  i(Math.floor(y.buttons.$element.width()) - 1) ||
                    (F(!0), i(Math.floor(y.buttons.$element.width()) - 1)));
              }
            }),
            y.buttons.$element.is(":visible")
              ? e()
              : (t && clearTimeout(t),
                (t = setTimeout(function () {
                  ((t = void 0), e());
                }, 0))));
        },
        F = function (e) {
          y.scorebar &&
          y.scorebar.$element &&
          y.scorebar.$element.hasClass("h5p-question-visible")
            ? (y.buttons.$element.addClass("has-scorebar"),
              y.buttons.$element.toggleClass("wrap", e),
              y.scorebar.$element.toggleClass("full-width", e))
            : y.buttons.$element.removeClass("has-scorebar");
        },
        N = function (e, t) {
          for (var n = x.length - 1; 0 <= n; n--) {
            var i = x[n],
              o = w[i];
            if (!o.isTruncated && o.isVisible) {
              var r = o.$element;
              e -= o.width.max - o.width.min;
              i = r.text();
              if (
                (r.attr("data-tooltip", i),
                o.ariaLabel || r.attr("aria-label", i),
                r.html("").addClass("truncated"),
                (o.isTruncated = !0),
                e <= t)
              )
                return;
            }
          }
        },
        $ = function (e, t) {
          for (var n = 0; n < x.length; n++) {
            var i = x[n],
              i = w[i];
            if (i.isTruncated && i.isVisible) {
              if (t < (e += i.width.max - i.width.min + 1)) return;
              (i.$element.html(i.text),
                i.$element.removeAttr("data-tooltip"),
                i.ariaLabel || i.$element.removeAttr("aria-label"),
                i.$element.removeClass("truncated"),
                (i.isTruncated = !1));
            }
          }
        },
        M = function (e) {
          (e.$element.addClass("h5p-question-visible"), (e.isVisible = !0));
        },
        q = function (e) {
          (e.$element.css("max-height", ""),
            (e.isVisible = !1),
            setTimeout(function () {
              e.isVisible || e.$element.removeClass("h5p-question-visible");
            }, 150));
        };
      ((u.setBehaviour = function (e) {
        B.extend(T, e);
      }),
        (u.setVideo = function (e) {
          ((y.video = {
            $element: B("<div/>", { class: "h5p-question-video" }),
          }),
            I && e.params.playback && (e.params.playback.autoplay = !1),
            e.params.visuals || (e.params.visuals = {}),
            (e.params.visuals.fit = !1),
            (y.video.instance = H5P.newRunnable(
              e,
              u.contentId,
              y.video.$element,
              !0,
            )));
          var t = !1;
          return (
            y.video.instance.on("resize", function () {
              ((t = !0), u.trigger("resize"), (t = !1));
            }),
            u.on("resize", function () {
              t || y.video.instance.trigger("resize");
            }),
            u
          );
        }),
        (u.setAudio = function (e) {
          return (
            (e.params = e.params || {}),
            (y.audio = {
              $element: B("<div/>", { class: "h5p-question-audio" }),
            }),
            I
              ? (e.params.autoplay = !1)
              : "transparent" === e.params.playerMode &&
                (e.params.autoplay = !0),
            (y.audio.instance = H5P.newRunnable(
              e,
              u.contentId,
              y.audio.$element,
              !0,
            )),
            y.audio.instance.audio &&
              (y.audio.instance.audio.style.height = ""),
            u
          );
        }),
        (u.pause = function () {
          (y.video && y.video.isVisible && y.video.instance.pause(),
            y.audio && y.audio.isVisible && y.audio.instance.pause());
        }),
        (u.play = function () {
          (y.video && y.video.isVisible && y.video.instance.play(),
            y.audio && y.audio.isVisible && y.audio.instance.play());
        }),
        (u.disableAutoPlay = function () {
          I = !0;
        }),
        (u.massageAttributeOutput = function (e) {
          e = new DOMParser().parseFromString(e, "text/html");
          const t = document.createElement("div");
          return (
            (t.innerHTML = e.documentElement.textContent),
            t.textContent || t.innerText || ""
          );
        }),
        (u.setImage = function (e, t) {
          ((t = t || {}),
            (y.image = {}),
            (y.image.$element = B("<div/>", {
              class: "h5p-question-image h5p-question-image-fill-width",
            })));
          var n = B("<div/>", {
              class: "h5p-question-image-wrap",
              appendTo: y.image.$element,
            }),
            i = B("<img/>", {
              src: H5P.getPath(e, u.contentId),
              alt: void 0 === t.alt ? "" : u.massageAttributeOutput(t.alt),
              title:
                void 0 === t.title ? "" : u.massageAttributeOutput(t.title),
              on: {
                load: function () {
                  (u.trigger("imageLoaded", this), u.trigger("resize"));
                },
              },
              appendTo: n,
            });
          if (!t.disableImageZooming) {
            const s = () => {
              var e =
                "true" === n.attr("aria-expanded")
                  ? t.minimizeImage
                  : t.expandImage;
              n.attr("aria-label", e + " " + t.alt);
            };
            var o = !1;
            return (
              u.on("resize", function () {
                !o &&
                  i.is(":visible") &&
                  (n
                    .addClass("h5p-question-image-scalable")
                    .attr("aria-expanded", !1)
                    .attr("role", "button")
                    .attr("tabIndex", "0")
                    .on("click", function (e) {
                      1 === e.which && (a.apply(this), s());
                    })
                    .on("keypress", function (e) {
                      32 === e.which &&
                        (e.preventDefault(), a.apply(this), s());
                    }),
                  s(),
                  y.image.$element.removeClass("h5p-question-image-fill-width"),
                  (o = !0));
              }),
              u
            );
          }
          i.css("maxHeight", "none");
          function r() {
            var e = y.image.$element.get(0).getBoundingClientRect().width;
            n.css({ "-webkit-transition": "none", transition: "none" });
            var t =
              2 *
              (n.get(0).getBoundingClientRect().left -
                y.image.$element.get(0).getBoundingClientRect().left);
            (i.get(0).naturalWidth >= e - t
              ? y.image.$element.addClass("h5p-question-image-fill-width")
              : y.image.$element.removeClass("h5p-question-image-fill-width"),
              n.css({ "-webkit-transition": "", transition: "" }));
          }
          i.is(":visible") ? r() : i.on("load", r);
        }),
        (u.setIntroduction = function (e) {
          return (d("introduction", e), u);
        }),
        (u.setContent = function (e, t) {
          return (
            d("content", e),
            t && t.class && y.content.$element.addClass(t.class),
            u
          );
        }),
        (u.read = function (e) {
          r &&
            (c ? (c += ("." === c.substr(-1, 1) ? " " : ". ") + e) : (c = e),
            r.html(c),
            setTimeout(function () {
              ((c = null), r.html(""));
            }, 100));
        }),
        (u.readFeedback = function () {
          var e;
          T.disableReadSpeaker ||
            !v ||
            !y.feedback ||
            !y.feedback.$element ||
            ((e = B(
              ".h5p-question-feedback-content-text",
              y.feedback.$element,
            )) &&
              e.html() &&
              e.html().length &&
              u.read(e.html()));
        }),
        (u.removeFeedback = function () {
          return (
            clearTimeout(b),
            y.feedback &&
              v &&
              ((v = !1),
              q(y.scorebar),
              q(y.feedback),
              (S = !0),
              (b = setTimeout(function () {
                (v ||
                  (y.feedback.$element.children().detach(),
                  y.scorebar.$element.children().detach(),
                  u.trigger("resize")),
                  (S = !1),
                  m.setScore(0));
              }, 150)),
              f && f.find(".h5p-question-feedback-tail").remove()),
            u
          );
        }),
        (u.setFeedback = function (e, t, n, i, o, r, s) {
          if (T.disableFeedback) return u;
          (p(),
            (g = null != r && null != r.click ? r.click : null),
            clearTimeout(b));
          var a = B("<div>", { class: "h5p-question-feedback-container" }),
            l = B("<div>", { class: "h5p-question-feedback-content" }).appendTo(
              a,
            );
          B("<div>", {
            class: "h5p-question-feedback-content-text",
            html: e,
          }).appendTo(l);
          var c = B("<div>", { class: "h5p-question-scorebar-container" });
          return (
            (m = void 0 === m ? z.createScoreBar(n, i, o, s) : m).appendTo(c),
            l.toggleClass("has-content", void 0 !== e && 0 < e.length),
            !T.disableReadSpeaker &&
              i &&
              u.read(
                i.replace(":num", t).replace(":total", n) + ". " + (e || ""),
              ),
            (v = !0),
            y.feedback
              ? (h("feedback", a), h("scorebar", c))
              : (d("feedback", a),
                d("scorebar", c),
                H &&
                  f &&
                  (A(u.order, "feedback", y, f), A(u.order, "scorebar", y, f))),
            M(y.feedback),
            M(y.scorebar),
            R(),
            null != r && 1 == r.showAsPopup
              ? ((function (e) {
                  var t = y.feedback.$element,
                    n = y.content.$element,
                    i = null != g ? g.$element : null;
                  (t.appendTo(n).addClass("h5p-question-popup"),
                    y.scorebar && y.scorebar.$element.appendTo(t),
                    n.addClass("h5p-has-question-popup"));
                  var o = B("<div/>", { class: "h5p-question-feedback-tail" })
                      .hide()
                      .appendTo(n),
                    e = B("<div/>", {
                      class: "h5p-question-feedback-close",
                      tabindex: 0,
                      title: e,
                      on: {
                        click: function (e) {
                          (t.remove(), o.remove(), e.preventDefault());
                        },
                        keydown: function (e) {
                          switch (e.which) {
                            case 13:
                            case 32:
                              (t.remove(), o.remove(), e.preventDefault());
                          }
                        },
                      },
                    })
                      .hide()
                      .appendTo(t);
                  (null != i &&
                    (i.hasClass("correct")
                      ? (t.addClass("h5p-question-feedback-correct"),
                        e.show(),
                        y.buttons.$element.hide())
                      : y.buttons.$element.appendTo(y.feedback.$element)),
                    k(t, i));
                })(r.closeText),
                m.setScore(t))
              : (b = setTimeout(function () {
                  var e;
                  (L(y.feedback.$element),
                    L(y.scorebar.$element),
                    (S = !0),
                    !f ||
                      (f.hasClass("h5p-standalone") && !H5P.isFullscreen) ||
                      ((e = j(f)) &&
                        e.animate({ scrollTop: f.css("height") }, "slow")),
                    (b = setTimeout(function () {
                      ((S = !1), u.trigger("resize"), m.setScore(t));
                    }, 150)));
                }, 0)),
            u
          );
        }),
        (u.updateFeedbackContent = function (e, t) {
          return (
            y.feedback &&
              y.feedback.$element &&
              (t &&
                (e =
                  B(
                    ".h5p-question-feedback-content",
                    y.feedback.$element,
                  ).html() +
                  " " +
                  e),
              B(".h5p-question-feedback-content", y.feedback.$element)
                .html(e)
                .addClass("has-content"),
              L(y.feedback.$element),
              setTimeout(u.trigger.bind(u, "resize"), 150)),
            u
          );
        }),
        (u.setExplanation = function (e, t) {
          return (
            e
              ? ((e = new H5P.Question.Explainer(t, e)),
                y.explanation
                  ? h("explanation", e.getElement())
                  : (d("explanation", e.getElement()),
                    H && f && A(u.order, "explanation", y, f)))
              : y.explanation && y.explanation.$element.children().detach(),
            u
          );
        }),
        (u.hasButton = function (e) {
          return void 0 !== w[e];
        }),
        (u.addButton = function (e, t, n, i, o, r) {
          if (w[e]) return u;
          (void 0 === y.buttons &&
            (d("buttons"), H && A(u.order, "buttons", y, f)),
            ((r = r || {}).confirmationDialog = r.confirmationDialog || {}),
            (o = o || {}));
          function s() {
            r.confirmationDialog.enable && a
              ? (r.confirmationDialog.$parentElement ||
                  y.popups.$element.removeClass("hidden"),
                a.show(c.position().top))
              : n();
          }
          var a = u.addConfirmationDialogToButton(r.confirmationDialog, n);
          (r.contentData &&
            r.contentData.standalone &&
            (r.contentData.isScoringEnabled ||
              r.contentData.isReportingEnabled) &&
            r.textIfSubmitting &&
            (t = r.textIfSubmitting),
            (w[e] = {
              isTruncated: !1,
              text: t,
              isVisible: !1,
              ariaLabel: o["aria-label"],
            }));
          var l = void 0 !== o.href,
            c = (w[e].$element = z.createButton(
              B.extend(
                {
                  class: "h5p-question-" + e,
                  html: t,
                  on: {
                    click: function (e) {
                      (s(), l && e.preventDefault());
                    },
                  },
                },
                o,
              ),
            ));
          return (
            x.push(e),
            H5P.Tooltip(c.get(0), { tooltipSource: "data-tooltip" }),
            l &&
              c.on("keypress", function (e) {
                32 === e.which && (s(), e.preventDefault());
              }),
            (void 0 !== i && !i) ||
              (c.appendTo(y.buttons.$element),
              (w[e].isVisible = !0),
              M(y.buttons)),
            u
          );
        }));
      var W = function (e) {
        var t = e.$element,
          t = t
            .clone()
            .css({
              position: "absolute",
              "white-space": "nowrap",
              "max-width": "none",
            })
            .removeClass("truncated")
            .html(e.text)
            .appendTo(t.parent());
        ((e.width = {
          max: Math.ceil(
            t.outerWidth() +
              parseFloat(t.css("margin-left")) +
              parseFloat(t.css("margin-right")),
          ),
        }),
          t.html("").addClass("truncated"),
          (e.width.min = Math.ceil(
            t.outerWidth() +
              parseFloat(t.css("margin-left")) +
              parseFloat(t.css("margin-right")),
          )),
          t.remove());
      };
      ((u.addConfirmationDialogToButton = function (t, e) {
        if ((t = t || {}).enable) {
          var n = new H5P.ConfirmationDialog({
            instance: t.instance,
            headerText: t.l10n.header,
            dialogText: t.l10n.body,
            cancelText: t.l10n.cancelLabel,
            confirmText: t.l10n.confirmLabel,
          });
          if (t.$parentElement) {
            const i = t.$parentElement.get(0);
            let e;
            (i.classList.contains("h5p-content") &&
              (e = i.querySelector(".h5p-container")),
              n.appendTo(e ?? i));
          } else
            (void 0 === y.popups &&
              (d("popups"),
              H && A(u.order, "popups", y, f),
              y.popups.$element.addClass("hidden"),
              u.order.push("popups")),
              n.appendTo(y.popups.$element.get(0)));
          return (
            n.on("confirmed", function () {
              (t.$parentElement || y.popups.$element.addClass("hidden"),
                e(),
                u.trigger("confirmed"));
            }),
            n.on("canceled", function () {
              (t.$parentElement || y.popups.$element.addClass("hidden"),
                u.trigger("canceled"));
            }),
            n
          );
        }
      }),
        (u.showButton = function (e, t) {
          var n = -1 !== i(e, "id", P);
          if (void 0 === w[e] || (!0 === w[e].isVisible && !n)) return u;
          t = t || 0;
          n = i(e, "id", C);
          if (-1 !== n) return (C[n].priority < t && (C[n].priority = t), u);
          n = i(e, "id", P);
          return (
            -1 !== n
              ? P[n].priority <= t &&
                (P.splice(n, 1), C.push({ id: e, priority: t }))
              : w[e].$element.is(":visible") || C.push({ id: e, priority: t }),
            (s = s || setTimeout(p, 0)),
            u
          );
        }),
        (u.hideButton = function (e, t) {
          var n = -1 !== i(e, "id", C);
          if (void 0 === w[e] || (!1 === w[e].isVisible && !n)) return u;
          t = t || 0;
          n = i(e, "id", P);
          if (-1 !== n) return (P[n].priority < t && (P[n].priority = t), u);
          n = i(e, "id", C);
          return (
            -1 !== n
              ? C[n].priority <= t &&
                (C.splice(n, 1), P.push({ id: e, priority: t }))
              : w[e].$element.is(":visible")
                ? P.push({ id: e, priority: t })
                : O(e),
            (s = s || setTimeout(p, 0)),
            u
          );
        }),
        (u.focusButton = function (e) {
          if (void 0 === e)
            for (var t = 0; t < x.length; t++) {
              var n = w[x[t]];
              if (n && n.isVisible) {
                n.$element.focus();
                break;
              }
            }
          else w[e] && w[e].$element.is(":visible") && w[e].$element.focus();
          return u;
        }),
        (u.toggleReadSpeaker = function (e) {
          T.disableReadSpeaker = e || !T.disableReadSpeaker;
        }),
        (u.insertSectionAtElement = function (e, t) {
          return (
            void 0 === y[e] && d(e),
            (y[e].parent = t),
            H || A([e], e, y, t),
            u
          );
        }),
        (u.attach = function (e) {
          (u.isRoot() && u.setActivityStarted(),
            void 0 === f &&
              (void 0 !== u.registerDomElements &&
                (u.registerDomElements instanceof Function ||
                  "function" == typeof u.registerDomElements) &&
                u.registerDomElements(),
              (r = B("<div/>", {
                "aria-live": "polite",
                class: "h5p-hidden-read",
              })),
              d("read", r),
              u.trigger("registerDomElements")),
            (f = e).html("").addClass("h5p-question h5p-" + o));
          for (var t = [], n = 0; n < u.order.length; n++) {
            var i = u.order[n];
            y[i] &&
              (y[i].parent
                ? y[i].$element.appendTo(y[i].parent)
                : t.push(y[i].$element),
              (y[i].isVisible = !0));
          }
          return (
            e.append(t),
            u.trigger(
              "domChanged",
              {
                $target: e,
                library: u.libraryInfo.machineName,
                contentId: u.contentId,
                key: "newLibrary",
              },
              { bubbles: !0, external: !0 },
            ),
            (H = !0),
            u
          );
        }),
        (u.detachSections = function () {
          for (var e in ((H = !1), y)) y[e].$element.detach();
          return u;
        }),
        u.on("resize", function () {
          !S && y.feedback && v && L(y.feedback.$element);
          var e = y.feedback,
            t = g;
          (null != e &&
            null != e.$element &&
            null != t &&
            null != t.$element &&
            setTimeout(function () {
              k(e.$element, t.$element);
            }, 10),
            R());
        }));
    }
    return (
      (((t.prototype = Object.create(e.prototype)).constructor =
        t).determineOverallFeedback = function (e, t) {
        t = Math.floor(100 * t);
        for (var n = 0; n < e.length; n++) {
          var i = e[n],
            o = void 0 !== i.feedback && 0 !== i.feedback.trim().length;
          if (i.from <= t && i.to >= t && o) return i.feedback;
        }
        return "";
      }),
      t
    );
  })(H5P.jQuery, H5P.EventDispatcher, H5P.JoubelUI)),
  /*!@license H5P.Question-1.5/scripts/explainer.js by Joubel licensed under MIT*/ (H5P.Question.Explainer =
    (function (l) {
      return function (r, s) {
        var a = this;
        (!(function () {
          ((a.$explanation = l("<div>", {
            class: "h5p-question-explanation-container",
          })),
            l("<div>", {
              class: "h5p-question-explanation-title",
              role: "heading",
              html: r,
              appendTo: a.$explanation,
            }));
          for (
            var e = l("<ul>", {
                class: "h5p-question-explanation-list",
                appendTo: a.$explanation,
              }),
              t = 0;
            t < s.length;
            t++
          ) {
            var n = s[t],
              i = l("<li>", {
                class: "h5p-question-explanation-item",
                appendTo: e,
              }),
              o = l("<div>", { class: "h5p-question-explanation-status" });
            (n.correct &&
              l("<span>", {
                class: "h5p-question-explanation-correct",
                html: n.correct,
                appendTo: o,
              }),
              n.wrong &&
                l("<span>", {
                  class: "h5p-question-explanation-wrong",
                  html: n.wrong,
                  appendTo: o,
                }),
              o.appendTo(i),
              n.text &&
                l("<div>", {
                  class: "h5p-question-explanation-text",
                  html: n.text,
                  appendTo: i,
                }));
          }
        })(),
          (a.getElement = function () {
            return a.$explanation;
          }));
      };
    })(H5P.jQuery)),
  (H5P.Question.ScorePoints = function () {
    var n,
      i = [];
    this.getElement = function (e) {
      var t = document.createElement("div");
      return (
        t.classList.add(e ? "h5p-question-plus-one" : "h5p-question-minus-one"),
        t.classList.add("h5p-question-hidden-one"),
        i.push(t),
        n && clearTimeout(n),
        (n = setTimeout(o, 0)),
        t
      );
    };
    var o = function () {
        var e = 0,
          t = 150;
        i.length && i.length > Math.ceil(1e3 / t) && (t = 1e3 / i.length);
        for (var n = 0; n < i.length; n++) (setTimeout(r(i[n]), e), (e += t));
      },
      r = function (e) {
        return function () {
          e.classList.remove("h5p-question-hidden-one");
        };
      };
  }),
  (function () {
    "use strict";
    let o =
        (((n = t.prototype).getDOM = function () {
          return this.content;
        }),
        (n.setClue = function (e) {
          e.orientation &&
            e.clueId &&
            e.clue &&
            e.answerLength &&
            ((this.clueId.innerText = e.clueId + " " + e.orientation),
            (this.clue.innerText = e.clue),
            (this.answerLength.innerText = `(${e.answerLength})`));
        }),
        (n.show = function () {
          this.content.classList.remove("h5p-crossword-display-none");
        }),
        (n.hide = function () {
          this.content.classList.add("h5p-crossword-display-none");
        }),
        (n.reset = function () {
          ((this.clueId.innerText = ""),
            (this.clue.innerText = ""),
            (this.answerLength.innerText = ""));
        }),
        t),
      e =
        ((r.extend = function () {
          for (let e = 1; e < arguments.length; e++)
            for (var t in arguments[e])
              Object.prototype.hasOwnProperty.call(arguments[e], t) &&
                ("object" == typeof arguments[0][t] &&
                "object" == typeof arguments[e][t]
                  ? this.extend(arguments[0][t], arguments[e][t])
                  : (arguments[0][t] = arguments[e][t]));
          return arguments[0];
        }),
        (r.htmlDecode = function (e) {
          return new DOMParser().parseFromString(e, "text/html").documentElement
            .textContent;
        }),
        (r.stripHTML = function (e) {
          const t = document.createElement("div");
          return ((t.innerHTML = e), t.textContent || t.innerText || "");
        }),
        (r.createArray = function (e) {
          const t = new Array(e || 0);
          let n = e;
          if (1 < arguments.length)
            for (var i = Array.prototype.slice.call(arguments, 1); n--; )
              t[e - 1 - n] = r.createArray.apply(this, i);
          return t;
        }),
        (r.shuffleArray = function (e) {
          let t, n, i;
          for (i = e.length - 1; 0 < i; i--)
            ((t = Math.floor(Math.random() * (i + 1))),
              (n = e[i]),
              (e[i] = e[t]),
              (e[t] = n));
          return e;
        }),
        (r.formatLanguageCode = function (e) {
          if ("string" != typeof e) return e;
          const t = e.split("-");
          return (
            (t[0] = t[0].toLowerCase()),
            1 < t.length && (t[1] = t[1].toUpperCase()),
            t.join("-")
          );
        }),
        (r.toUpperCase = function (n) {
          let e =
            1 < arguments.length && void 0 !== arguments[1] ? arguments[1] : [];
          return "string" != typeof n
            ? null
            : ("string" == typeof e &&
                (e = e.split("").map((e) => ({ lowerCase: e, upperCase: e }))),
              Array.isArray(e) || (e = []),
              (e = e.filter(
                (e) =>
                  "string" == typeof e.lowerCase &&
                  1 === e.lowerCase.length &&
                  "string" == typeof e.upperCase &&
                  1 === e.upperCase.length,
              )),
              e.forEach((e, t) => {
                for (; -1 !== n.indexOf(e.lowerCase); )
                  n = n.replace(e.lowerCase, `[CROSSWORDPLACEHOLDER${t}]`);
              }),
              (n = n.toUpperCase()),
              e.forEach((e, t) => {
                for (; -1 !== n.indexOf(`[CROSSWORDPLACEHOLDER${t}]`); )
                  n = n.replace(`[CROSSWORDPLACEHOLDER${t}]`, e.upperCase);
              }),
              n);
        }),
        (r.waitForDOM = function (e, t) {
          let n =
              2 < arguments.length && void 0 !== arguments[2]
                ? arguments[2]
                : () => {},
            i =
              3 < arguments.length && void 0 !== arguments[3]
                ? arguments[3]
                : 50,
            o =
              4 < arguments.length && void 0 !== arguments[4]
                ? arguments[4]
                : 100;
          0 !== i && e && "function" == typeof t && "function" == typeof n
            ? ((o = Math.max(o, 50)),
              document.querySelector(e)
                ? t()
                : setTimeout(() => {
                    this.waitForDOM(e, t, n, i < 0 ? -1 : i - 1, o);
                  }, o))
            : n();
        }),
        r);
    function r() {}
    function t() {
      var e =
          0 < arguments.length && void 0 !== arguments[0] ? arguments[0] : {},
        t = 1 < arguments.length ? arguments[1] : void 0;
      ((this.params = e),
        (this.callbacks = t || {}),
        (this.content = document.createElement("div")),
        this.content.classList.add("h5p-crossword-clue-announcer"),
        (this.clueId = document.createElement("span")),
        this.clueId.classList.add("h5p-crossword-clue-announcer-clue-id"),
        this.content.appendChild(this.clueId),
        (this.clue = document.createElement("span")),
        this.clue.classList.add("h5p-crossword-clue-announcer-clue"),
        this.content.appendChild(this.clue),
        (this.answerLength = document.createElement("span")),
        this.answerLength.classList.add(
          "h5p-crossword-clue-announcer-answer-length",
        ),
        this.content.appendChild(this.answerLength));
    }
    ((e.CONTROL_KEY_CODES = [
      8, 9, 13, 16, 17, 18, 19, 20, 27, 33, 34, 35, 36, 37, 38, 39, 40, 45, 46,
      91, 92, 93, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123,
      144, 145,
    ]),
      (e.UPPERCASE_EXCEPTIONS = [{ lowerCase: "ß", upperCase: "ẞ" }]),
      (e.CHARACTER_PLACEHOLDER = "＿"));
    var n,
      h = e;
    let i =
      (((n = s.prototype).getDOM = function () {
        return this.overlay;
      }),
      (n.setContent = function (e) {
        for (; this.content.firstChild; )
          this.content.removeChild(this.content.firstChild);
        (this.content.appendChild(e), (this.content.scrollTop = 0));
      }),
      (n.trapFocus = function (e) {
        this.isChild(e.target)
          ? (this.currentFocusElement = e.target)
          : (this.currentFocusElement === this.focusableElements[0]
              ? (this.currentFocusElement =
                  this.focusableElements[this.focusableElements.length - 1])
              : (this.currentFocusElement = this.focusableElements[0]),
            this.currentFocusElement.focus());
      }),
      (n.isChild = function (e) {
        e = e.parentNode;
        return !!e && (e === this.overlay || this.isChild(e));
      }),
      (n.updateFocusableElements = function () {
        this.focusableElements = [].slice
          .call(
            this.overlay.querySelectorAll(
              'video, audio, button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])',
            ),
          )
          .filter(
            (e) =>
              "true" !== e.getAttribute("disabled") &&
              !0 !== e.getAttribute("disabled"),
          );
      }),
      (n.show = function () {
        (this.blockerAppended ||
          ((this.container = document.body.querySelector(".h5p-container")),
          this.container.appendChild(this.blocker)),
          (this.blockerAppended = !0),
          this.overlay.classList.remove("h5p-crossword-invisible"),
          this.blocker.classList.remove("h5p-crossword-display-none"),
          setTimeout(() => {
            (this.updateFocusableElements(),
              0 < this.focusableElements.length &&
                this.focusableElements[0].focus());
            var e = this.overlay.querySelector(".h5p-advanced-text");
            let t;
            (e
              ? this.callbacks.onRead(e.innerText)
              : (t = this.overlay.querySelector(".h5p-image > img")),
              t && this.callbacks.onRead(t.getAttribute("alt") || ""),
              (this.isVisible = !0),
              this.resize());
          }, 0));
      }),
      (n.hide = function () {
        ((this.isVisible = !1),
          this.overlay.classList.add("h5p-crossword-invisible"),
          this.blocker.classList.add("h5p-crossword-display-none"));
      }),
      (n.resize = function () {
        this.container &&
          (this.content.style.maxHeight = `calc(${this.container.offsetHeight}px - ${s.CONTENT_MARGIN})`);
      }),
      s);
    function s(e) {
      var t =
        1 < arguments.length && void 0 !== arguments[1] ? arguments[1] : {};
      ((this.params = h.extend(
        {
          container: document.body,
          content: document.createElement("div"),
          styleBase: "h5p-crossword-overlay",
          position: { offsetHorizontal: 0, offsetVertical: 0 },
          l10n: { closeWindow: "Close" },
        },
        e,
      )),
        (this.callbacks = t),
        (this.callbacks.onClose = t.onClose || (() => {})),
        (this.callbacks.onRead = t.onRead || (() => {})),
        (this.isVisible = !1),
        (this.focusableElements = []),
        (this.overlay = document.createElement("div")),
        this.overlay.classList.add(this.params.styleBase + "-outer-wrapper"),
        this.overlay.classList.add("h5p-crossword-invisible"),
        this.overlay.setAttribute("role", "dialog"),
        this.params.l10n.title &&
          this.overlay.setAttribute("aria-label", this.params.l10n.title),
        this.overlay.setAttribute("aria-modal", "true"),
        (this.content = document.createElement("div")),
        this.content.classList.add(this.params.styleBase + "-content"),
        this.content.appendChild(this.params.content),
        (this.buttonClose = document.createElement("button")),
        this.buttonClose.classList.add(this.params.styleBase + "-button-close"),
        this.buttonClose.setAttribute("title", this.params.l10n.closeWindow),
        this.buttonClose.addEventListener("click", () => {
          this.callbacks.onClose();
        }),
        this.overlay.appendChild(this.buttonClose),
        this.overlay.appendChild(this.content),
        document.addEventListener(
          "focus",
          (e) => {
            this.isVisible &&
              0 !== this.focusableElements.length &&
              this.trapFocus(e);
          },
          !0,
        ),
        (this.blocker = document.createElement("div")),
        this.blocker.classList.add("h5p-crossword-overlay-blocker"),
        this.blocker.classList.add("h5p-crossword-display-none"));
    }
    i.CONTENT_MARGIN = "7em";
    let p =
        (((n = g.prototype).getDOM = function () {
          return this.content;
        }),
        (n.buildListContainer = function (e) {
          const t = document.createElement("div");
          (t.classList.add(
            "h5p-crossword-input-fields-group-solution-container",
          ),
            t.classList.add("h5p-crossword-display-none"));
          const n = document.createElement("div");
          return (
            n.classList.add("h5p-crossword-input-fields-group-solution-inner"),
            t.appendChild(n),
            (this.list = document.createElement("div")),
            this.list.classList.add(
              "h5p-crossword-input-fields-group-solution-word",
            ),
            this.list.setAttribute("role", "list"),
            this.list.setAttribute("aria-label", e.listLabel),
            this.list.setAttribute("aria-expanded", "false"),
            this.list.setAttribute("tabindex", "0"),
            n.appendChild(this.list),
            this.list.addEventListener("keydown", (e) => {
              const t = this.charMarked || this.list.firstChild,
                n = this.list.getAttribute("aria-expanded");
              switch (e.code) {
                case "Enter":
                case "Space":
                  if (e.target !== e.currentTarget) return;
                  "false" === n
                    ? (this.list.setAttribute("aria-expanded", "true"),
                      t && (t.setAttribute("tabindex", "0"), t.focus()))
                    : (this.list.setAttribute("aria-expanded", "false"),
                      t && t.setAttribute("tabindex", "-1"));
              }
            }),
            t
          );
        }),
        (n.buildListItem = function (e) {
          const t = document.createElement("span");
          (t.classList.add(
            "h5p-crossword-input-fields-group-solution-char-wrapper",
          ),
            t.setAttribute("role", "listitem"),
            t.setAttribute("tabindex", "-1"),
            t.setAttribute("aria-label", e.ariaLabel),
            "neutral" === e.result
              ? (t.classList.add("h5p-crossword-solution-no-input"),
                (" " !== e.char && e.char !== h.CHARACTER_PLACEHOLDER) ||
                  t.classList.add("h5p-crossword-solution-no-char"))
              : "correct" === e.result
                ? t.classList.add("h5p-crossword-solution-correct")
                : t.classList.add("h5p-crossword-solution-wrong"),
            e.scoreExplanation && t.appendChild(e.scoreExplanation),
            t.addEventListener("focus", (e) => {
              this.charMarked = e.target;
            }),
            t.addEventListener("keydown", (e) => {
              const t = e.target.parentNode.firstChild,
                n = e.target.parentNode.lastChild;
              switch (e.keyCode) {
                case 37:
                case 38:
                  (e.preventDefault(),
                    e.target.previousSibling &&
                      (e.target.setAttribute("tabindex", "-1"),
                      e.target.previousSibling.setAttribute("tabindex", "0"),
                      e.target.previousSibling.focus()));
                  break;
                case 39:
                case 40:
                  (e.preventDefault(),
                    e.target.nextSibling &&
                      (e.target.setAttribute("tabindex", "-1"),
                      e.target.nextSibling.setAttribute("tabindex", "0"),
                      e.target.nextSibling.focus()));
                  break;
                case 36:
                  (e.preventDefault(),
                    e.target !== t &&
                      (e.target.setAttribute("tabindex", "-1"),
                      t.setAttribute("tabindex", "0"),
                      t.focus()));
                  break;
                case 35:
                  (e.preventDefault(),
                    e.target !== n &&
                      (e.target.setAttribute("tabindex", "-1"),
                      n.setAttribute("tabindex", "0"),
                      n.focus()));
              }
            }));
          const n = document.createElement("span");
          return (
            n.classList.add("h5p-crossword-input-fields-group-solution-char"),
            (n.innerHTML =
              e.char && " " !== e.char.trim()
                ? h.toUpperCase(e.char, h.UPPERCASE_EXCEPTIONS)
                : "&nbsp;"),
            t.appendChild(n),
            t
          );
        }),
        (n.setChars = function (e) {
          (this.reset(),
            e.forEach((e) => {
              this.list.appendChild(this.buildListItem(e));
            }));
        }),
        (n.show = function () {
          this.content.classList.remove("h5p-crossword-display-none");
        }),
        (n.hide = function () {
          this.content.classList.add("h5p-crossword-display-none");
        }),
        (n.enable = function () {
          if (
            (this.tabindexState &&
              this.tabindexState.list &&
              this.list.setAttribute("tabindex", this.tabindexState.list),
            this.tabindexState && this.tabindexState.listItems)
          ) {
            const t = this.list.children;
            for (let e = 0; e < t.length; e++)
              t[e].setAttribute("tabindex", this.tabindexState.listItems[e]);
          }
        }),
        (n.disable = function () {
          const t = [],
            n = this.list.children;
          for (let e = 0; e < n.length; e++)
            (t.push(n[e].getAttribute("tabindex")),
              n[e].setAttribute("tabindex", "-1"));
          ((this.tabindexState = {
            list: this.list.getAttribute("tabindex"),
            listItems: t,
          }),
            this.list.setAttribute("tabindex", "-1"));
        }),
        (n.reset = function () {
          ((this.list.innerHTML = ""),
            this.list.setAttribute("aria-expanded", "false"),
            this.list.setAttribute("tabindex", "0"),
            (this.charMarked = null),
            (this.tabindexState = null));
        }),
        g),
      a =
        (((n = f.prototype).getDOM = function () {
          return this.content;
        }),
        (n.buildInputFieldsGroup = function (e) {
          e.words = e.words.sort((e, t) => e.clueId - t.clueId);
          const d = document.createElement("div");
          d.classList.add("h5p-crossword-input-fields-group");
          const t = document.createElement("div");
          return (
            t.classList.add("h5p-crossword-input-fields-group-title"),
            (t.innerText = e.title),
            d.appendChild(t),
            e.words.forEach((i) => {
              const e = document.createElement("div");
              e.classList.add("h5p-crossword-input-fields-group-wrapper");
              const t = document.createElement("div");
              (t.classList.add("h5p-crossword-input-fields-group-wrapper-clue"),
                e.appendChild(t));
              const n = document.createElement("div");
              (n.classList.add("h5p-crossword-input-fields-group-clue-id"),
                (n.innerText = i.clueId),
                t.appendChild(n));
              const o = document.createElement("div");
              (o.classList.add("h5p-crossword-input-fields-group-clue-content"),
                t.appendChild(o));
              const r = document.createElement("span");
              (r.classList.add("h5p-crossword-input-fields-group-clue"),
                (r.innerText = i.clue),
                o.appendChild(r));
              const s = document.createElement("span");
              if (
                (s.classList.add(
                  "h5p-crossword-input-fields-group-answer-length",
                ),
                (s.innerText = `(${i.answer
                  .split(" ")
                  .map((e) => e.length)
                  .join(",")})`),
                o.appendChild(s),
                i.extraClue)
              ) {
                const d = i.extraClue.library
                  ? i.extraClue.library.split(" ")[0]
                  : null;
                if (d) {
                  const h = document.createElement("div");
                  h.classList.add("h5p-crossword-extra-clue-instance-wrapper");
                  const e = document.createElement("button");
                  e.classList.add(
                    "h5p-crossword-input-fields-group-extra-clue",
                  );
                  const p = {
                    clueId: i.clueId,
                    orientation: i.orientation,
                    clue: i.clue,
                  };
                  (e.setAttribute(
                    "aria-label",
                    this.params.a11y.extraClueFor.replace(
                      "@clue",
                      this.buildAriaLabel(p),
                    ),
                  ),
                    e.setAttribute("title", this.params.l10n.extraClue),
                    o.appendChild(e),
                    e.addEventListener("click", () => {
                      this.disabled ||
                        (this.disable(),
                        "H5P.Video" === d
                          ? (i.extraClue.params.fit = !1)
                          : "H5P.Audio" === d &&
                            ((i.extraClue.params.playerMode = "full"),
                            (i.extraClue.params.fitToWrapper = !0)),
                        this.overlay.setContent(h),
                        (this.previousFocus = e),
                        this.overlay.show(),
                        (this.extraClueInstance = H5P.newRunnable(
                          i.extraClue,
                          this.params.contentId,
                          H5P.jQuery(h),
                        )));
                    }),
                    this.extraClues.push(e));
                }
              }
              const a = document.createElement("input");
              a.classList.add("h5p-crossword-input-fields-group-input");
              var l = {
                clueId: i.clueId,
                orientation: i.orientation,
                clue: i.clue,
                length: i.answer.length,
              };
              (a.setAttribute("aria-label", this.buildAriaLabel(l)),
                a.setAttribute("autocomplete", "off"),
                a.setAttribute("autocorrect", "off"),
                a.setAttribute("maxLength", i.answer.length),
                a.setAttribute("spellcheck", "false"),
                this.setInputFieldValue(a, ""),
                e.appendChild(a),
                a.addEventListener("focus", () => {
                  this.disabled ||
                    setTimeout(() => {
                      this.callbacks.onFieldInput({
                        clueId: i.clueId,
                        orientation: i.orientation,
                        cursorPosition: Math.min(
                          a.selectionStart,
                          i.answer.length - 1,
                        ),
                        text: a.value,
                        readOffset: -1,
                      });
                    }, 0);
                }),
                a.addEventListener(
                  "keydown",
                  (e) => {
                    if (-1 === h.CONTROL_KEY_CODES.indexOf(e.keyCode)) {
                      const t = a.selectionStart;
                      ((a.value =
                        "" + a.value.substr(0, t + 1) + a.value.substr(t + 1)),
                        (a.selectionEnd = t + 1));
                      const n = h.toUpperCase(a.value, h.UPPERCASE_EXCEPTIONS);
                      (clearTimeout(this.tableUpdateTimeout),
                        (this.tableUpdateTimeout = setTimeout(() => {
                          var e = this.applySamsungWorkaround(
                            n,
                            h.toUpperCase(a.value, h.UPPERCASE_EXCEPTIONS),
                          );
                          (this.setInputFieldValue(a, e),
                            a.setSelectionRange(t + 1, t + 1),
                            this.callbacks.onFieldInput({
                              clueId: i.clueId,
                              orientation: i.orientation,
                              cursorPosition: Math.min(
                                t + 1,
                                i.answer.length - 1,
                              ),
                              text: e,
                              readOffset: -1,
                            }));
                        }, 0)));
                    }
                  },
                  !1,
                ),
                a.addEventListener("keyup", (t) => {
                  if (
                    229 !== t.keyCode &&
                    (-1 === h.CONTROL_KEY_CODES.indexOf(t.keyCode) ||
                      -1 !== [8, 35, 36, 37, 38, 39, 40, 46].indexOf(t.keyCode))
                  ) {
                    let e = a.selectionStart;
                    ("Home" === t.code || "ArrowUp" === t.code
                      ? (e = 0)
                      : ("End" !== t.code && "ArrowDown" !== t.code) ||
                        (e = Math.min(
                          a.value.length,
                          a.getAttribute("maxLength") - 1,
                        )),
                      this.setInputFieldValue(a, a.value),
                      a.setSelectionRange(e, e),
                      this.callbacks.onFieldInput({
                        clueId: i.clueId,
                        orientation: i.orientation,
                        cursorPosition: e,
                        text: a.value,
                        readOffset:
                          -1 === [8, 37, 38, 39, 40, 46].indexOf(t.keyCode)
                            ? 1
                            : 0,
                      }));
                  }
                }),
                a.addEventListener("paste", (e) => {
                  if (!this.disabled) {
                    e.preventDefault();
                    const t = e.clipboardData.getData("text");
                    this.setInputFieldValue(
                      a,
                      t.substr(0, a.getAttribute("maxLength")),
                    );
                  }
                }));
              const c = this.params.a11y.resultFor.replace(
                  "@clue",
                  `${i.clueId} ${this.params.a11y[i.orientation]}. ${i.clue} .`,
                ),
                u = new p({ a11y: { listLabel: c } });
              (e.appendChild(u.getDOM()),
                this.inputFields.push({
                  clue: t,
                  inputField: a,
                  orientation: i.orientation,
                  clueId: i.clueId,
                  solution: u,
                }),
                d.appendChild(e));
            }),
            d
          );
        }),
        (n.applySamsungWorkaround = function () {
          let t =
              0 < arguments.length && void 0 !== arguments[0]
                ? arguments[0]
                : "",
            n =
              1 < arguments.length && void 0 !== arguments[1]
                ? arguments[1]
                : "";
          for (; t.length < n.length; ) t = "" + t + h.CHARACTER_PLACEHOLDER;
          for (; n.length < t.length; ) n = "" + n + h.CHARACTER_PLACEHOLDER;
          const i = [];
          for (let e = t.length - 1; 0 <= e; e--)
            t[e] === n[e]
              ? (i[e] = h.CHARACTER_PLACEHOLDER)
              : e + 1 < t.length && "＿" !== i[e + 1]
                ? ((i[e] = i[e + 1]), (i[e + 1] = h.CHARACTER_PLACEHOLDER))
                : (i[e] = n[e]);
          let o = [],
            r = " ";
          for (let e = t.length - 1; 0 <= e; e--) {
            var s;
            (i[e] !== h.CHARACTER_PLACEHOLDER && (r = h.CHARACTER_PLACEHOLDER),
              (s =
                i[e] !== h.CHARACTER_PLACEHOLDER
                  ? i[e]
                  : t[e] !== h.CHARACTER_PLACEHOLDER
                    ? t[e]
                    : r),
              (o[e] = s));
          }
          return o.join("").trimRight();
        }),
        (n.setInputFieldValue = function (e, t) {
          let n =
            2 < arguments.length && void 0 !== arguments[2]
              ? arguments[2]
              : { forceValue: !0 };
          t = h.toUpperCase(t, h.UPPERCASE_EXCEPTIONS);
          let i = "";
          if (n.forceValue) {
            i = t;
            const n = new Array(e.maxLength + 1).join(h.CHARACTER_PLACEHOLDER);
            i = n
              .split("")
              .map((e, t) => (i.length > t && " " !== i[t] ? i[t] : e))
              .join("");
          } else
            for (var o of t.split("")) {
              if (" " === o) break;
              i = "" + i + o;
            }
          e.value = h.toUpperCase(i, h.UPPERCASE_EXCEPTIONS);
        }),
        (n.buildAriaLabel = function (e) {
          const t = [
            `${e.clueId} ${this.params.a11y[e.orientation]}. ` + e.clue,
          ];
          return (
            e.length &&
              t.push(this.params.a11y.lettersWord.replace("@length", e.length)),
            t.join(", ")
          );
        }),
        (n.fillFields = function (e) {
          e.forEach((t) => {
            var e = this.inputFields.filter(
              (e) => e.orientation === t.orientation && e.clueId === t.clueId,
            );
            0 < e.length && this.setInputFieldValue(e[0].inputField, t.text);
          });
        }),
        (n.focusClue = function (t) {
          this.inputFields.forEach((e) => {
            e.clue.classList.remove(
              "h5p-crossword-input-fields-group-clue-highlight-focus",
            );
          });
          const e = this.inputFields.filter(
            (e) => e.orientation === t.orientation && e.clueId === t.clueId,
          );
          0 < e.length &&
            e[0].clue.classList.add(
              "h5p-crossword-input-fields-group-clue-highlight-focus",
            );
        }),
        (n.checkAnswerWords = function (r) {
          ((this.scorePoints =
            this.scorePoints || new H5P.Question.ScorePoints()),
            this.inputFields.forEach((t) => {
              t.solution.show();
              var e = r
                .filter(
                  (e) =>
                    e.clueId === t.clueId && e.orientation === t.orientation,
                )
                .shift();
              let n, i;
              const o = [];
              (o.push(e.answer),
                -1 === e.score
                  ? ((n = this.scorePoints.getElement(!1)),
                    (i = "wrong"),
                    o.push(this.params.a11y.wrong),
                    o.push("-1 " + this.params.a11y.point))
                  : 1 === e.score
                    ? ((n = this.scorePoints.getElement(!0)),
                      (i = "correct"),
                      o.push(this.params.a11y.correct),
                      o.push("1 " + this.params.a11y.point))
                    : (i = "neutral"),
                t.solution.setChars([
                  {
                    ariaLabel: o.join(". ") + ".",
                    char: t.inputField.value.replace(
                      h.CHARACTER_PLACEHOLDER,
                      " ",
                    ),
                    result: i,
                    scoreExplanation: n,
                  },
                ]));
            }));
        }),
        (n.checkAnswer = function (e) {
          this.scorePoints = this.scorePoints || new H5P.Question.ScorePoints();
          const u = [];
          this.inputFields.forEach((t) => {
            t.solution.show();
            const a = e.filter((e) =>
              "across" === t.orientation
                ? e.clueIdAcross === t.clueId
                : "down" === t.orientation && e.clueIdDown === t.clueId,
            );
            let l = h
                .toUpperCase(t.inputField.value, h.UPPERCASE_EXCEPTIONS)
                .split(""),
              c = [];
            (a.forEach((t, e) => {
              var n = u.some(
                (e) =>
                  e.row === t.position.row && e.column === t.position.column,
              );
              u.push(t.position);
              const i = l.length > e ? l[e] : " ";
              let o, r;
              t.answer &&
              "" !== t.answer.trim() &&
              t.answer !== h.CHARACTER_PLACEHOLDER
                ? t.answer === t.solution
                  ? ((o = "correct"),
                    n || (r = this.scorePoints.getElement(!0)))
                  : this.params.applyPenalties
                    ? ((o = "wrong"),
                      n || (r = this.scorePoints.getElement(!1)))
                    : (o = "neutral")
                : (o = "neutral");
              const s = [];
              (s.push(
                "" +
                  this.params.a11y.letterSevenOfNine
                    .replace("@position", e + 1)
                    .replace("@length", a.length),
              ),
                s.push(
                  t.answer && "" !== t.answer.trim()
                    ? t.answer
                    : this.params.a11y.empty,
                ),
                "correct" === o
                  ? (s.push(this.params.a11y.correct),
                    s.push("1 " + this.params.a11y.point))
                  : "wrong" === o &&
                    (s.push(this.params.a11y.wrong),
                    s.push("-1 " + this.params.a11y.point)),
                c.push({
                  ariaLabel: s.join(". ") + ".",
                  char: i.replace(h.CHARACTER_PLACEHOLDER, " ") || "&nbsp;",
                  result: o,
                  scoreExplanation: r,
                }));
            }),
              t.solution.setChars(c));
          });
        }),
        (n.showSolutions = function () {
          let i =
            0 < arguments.length && void 0 !== arguments[0] ? arguments[0] : [];
          this.inputFields.forEach((t) => {
            let e = i.filter(
              (e) => e.clueId === t.clueId && e.orientation === t.orientation,
            );
            var n;
            e &&
              0 !== e.length &&
              ((e = e[0]),
              this.setInputFieldValue(t.inputField, e.answer),
              (t.inputField.readOnly = !0),
              t.inputField.removeAttribute("disabled"),
              (n = this.params.a11y.solutionFor
                .replace(
                  "@clue",
                  `${e.clueId} ${this.params.a11y[e.orientation]}. ${e.clue} .`,
                )
                .replace("@solution", e.answer)),
              t.inputField.setAttribute("aria-label", n),
              t.solution.disable());
          });
        }),
        (n.reset = function () {
          this.inputFields.forEach((e) => {
            (this.setInputFieldValue(e.inputField, ""),
              (e.inputField.readOnly = !1),
              e.clue.classList.remove(
                "h5p-crossword-input-fields-group-clue-highlight-focus",
              ),
              e.solution.hide(),
              e.solution.reset());
          });
        }),
        (n.resize = function () {
          (this.extraClueInstance && this.extraClueInstance.trigger("resize"),
            this.overlay.resize());
        }),
        (n.enable = function () {
          (this.inputFields.forEach((e) => {
            e.inputField.removeAttribute("disabled");
          }),
            this.extraClues.forEach((e) => {
              e.removeAttribute("disabled");
            }),
            this.content.classList.remove("h5p-crossword-disabled"),
            (this.disabled = !1));
        }),
        (n.disable = function () {
          ((this.disabled = !0),
            this.extraClues.forEach((e) => {
              e.setAttribute("disabled", !0);
            }),
            this.content.classList.add("h5p-crossword-disabled"),
            this.inputFields.forEach((e) => {
              e.inputField.setAttribute("disabled", !0);
            }));
        }),
        (n.unhighlight = function () {
          this.inputFields.forEach((e) => {
            e.clue.classList.remove(
              "h5p-crossword-input-fields-group-clue-highlight-focus",
            );
          });
        }),
        (n.handleOverlayClosed = function () {
          (this.extraClueInstance &&
            "function" == typeof this.extraClueInstance.pause &&
            this.extraClueInstance.pause(),
            this.overlay.hide(),
            this.enable(),
            this.previousFocus && this.previousFocus.focus(),
            (this.previousFocus = null));
        }),
        f),
      l =
        (((n = d.prototype).getDOM = function () {
          return this.cell;
        }),
        (n.buildCell = function (e) {
          const t = document.createElement("td");
          return (
            t.classList.add("h5p-crossword-cell"),
            (t.style.width = e.width + "%"),
            t.setAttribute("role", "gridcell"),
            (t.dataset.col = e.column),
            (t.dataset.row = e.row),
            t
          );
        }),
        (n.buildCellContentWrapper = function () {
          const e = document.createElement("div");
          return (e.classList.add("h5p-crossword-cell-content-wrapper"), e);
        }),
        (n.buildCellCanvas = function () {
          const e = document.createElement("div");
          return (e.classList.add("h5p-crossword-cell-canvas"), e);
        }),
        (n.buildCellInput = function () {
          const e = document.createElement("input");
          return (
            e.classList.add("h5p-crossword-cell-content"),
            e.setAttribute("type", "text"),
            e.setAttribute("maxLength", 1),
            e.setAttribute("autocomplete", "new-password"),
            e.setAttribute("autocorrect", "off"),
            e.setAttribute("spellcheck", "false"),
            e.setAttribute("tabindex", "-1"),
            e.addEventListener("input", (e) => {
              var t;
              this.enabled &&
                (this.setAnswer(
                  h.toUpperCase(e.data, h.UPPERCASE_EXCEPTIONS),
                  !0,
                ),
                (this.cellInput.value = ""),
                (t = this.getInformation()),
                this.callbacks.onKeyup(t),
                e.preventDefault());
            }),
            e.addEventListener("change", (e) => {
              e.preventDefault();
            }),
            e.addEventListener("keydown", (e) => {
              if (this.enabled)
                if (e.repeat) e.preventDefault();
                else if (
                  e.key &&
                  "Unidentified" !== e.key &&
                  ("Delete" === e.key || "Backspace" === e.key)
                ) {
                  const e = this.getAnswer() ? 0 : -1;
                  this.setAnswer("");
                  const t = this.getInformation();
                  ((t.keepPosition = !0),
                    (t.nextPositionOffset = e),
                    (this.cellInput.value = ""),
                    this.callbacks.onKeyup(t));
                }
            }),
            e.addEventListener("keyup", (e) => {
              if (this.enabled && (!e.key || "Unidentified" === e.key))
                if (e.repeat) e.preventDefault();
                else if (
                  -1 !== h.CONTROL_KEY_CODES.indexOf(e.keyCode) &&
                  (8 === e.keyCode || 46 === e.keyCode)
                ) {
                  const e = this.getAnswer() ? 0 : -1;
                  this.setAnswer("");
                  const t = this.getInformation();
                  ((t.keepPosition = !0),
                    (t.nextPositionOffset = e),
                    (this.cellInput.value = ""),
                    this.callbacks.onKeyup(t));
                }
            }),
            e.addEventListener("focus", (e) => {
              this.callbacks.onFocus(this.position, e);
            }),
            e
          );
        }),
        (n.getSolution = function () {
          return this.params.solution;
        }),
        (n.getCurrentAnswer = function () {
          return this.cell.innerText.substr(0, 1);
        }),
        (n.getInformation = function () {
          return {
            answer:
              this.answer && h.toUpperCase(this.answer, h.UPPERCASE_EXCEPTIONS),
            clueIdAcross: this.params.clueIdAcross,
            clueIdDown: this.params.clueIdDown,
            position: this.position,
            score: this.getScore(),
            solution: this.params.solution,
            solutionWordId: this.solutionWordId || null,
          };
        }),
        (n.getPosition = function () {
          return this.position;
        }),
        (n.getClueId = function () {
          var e =
            0 < arguments.length && void 0 !== arguments[0]
              ? arguments[0]
              : "across";
          return "down" === e
            ? this.params.clueIdDown
            : "across" === e
              ? this.params.clueIdAcross
              : null;
        }),
        (n.getAnswer = function () {
          return this.answer;
        }),
        (n.getScore = function () {
          if (
            this.params.solution &&
            (" " !== this.params.solution ||
              (this.answer &&
                "" !== this.answer.trim() &&
                this.answer !== h.CHARACTER_PLACEHOLDER))
          )
            return this.answer && "" !== this.answer.trim()
              ? this.answer !== this.params.solution
                ? this.params.applyPenalties
                  ? -1
                  : 0
                : 1
              : 0;
        }),
        (n.isFilled = function () {
          return !this.params.solution || " " === this.params.solution
            ? null
            : !(!this.answer || " " === this.answer);
        }),
        (n.setTabIndex = function (e) {
          isNaN(parseInt(e)) ||
            (this.cellInput || this.cell).setAttribute("tabindex", e);
        }),
        (n.setAriaLabel = function (e) {
          this.cellInput.setAttribute("aria-label", e);
        }),
        (n.setSolutionState = function (e) {
          (this.cell.classList.remove("h5p-crossword-solution-correct"),
            this.cell.classList.remove("h5p-crossword-solution-wrong"),
            this.cell.classList.remove("h5p-crossword-solution-neutral"),
            e &&
              this.cell.classList.add(
                "h5p-crossword-solution" + (e ? "-" + e : ""),
              ));
        }),
        (n.setAnswer = function (e) {
          var t =
            1 < arguments.length && void 0 !== arguments[1] && arguments[1];
          this.cellInput &&
            ("" === e
              ? ((this.cellCanvas.innerText = ""), (this.answer = void 0))
              : ((this.cellCanvas.innerText = h.toUpperCase(
                  e.replace(new RegExp(h.CHARACTER_PLACEHOLDER, "g"), " "),
                  h.UPPERCASE_EXCEPTIONS,
                )),
                (this.answer = h.toUpperCase(e, h.UPPERCASE_EXCEPTIONS))),
            this.params.instantFeedback && this.checkAnswer(t));
        }),
        (n.setWidth = function (e) {
          "number" != typeof e || e <= 0 || (this.cell.style.width = e + "px");
        }),
        (n.focus = function () {
          setTimeout(() => {
            (this.cellInput || this.cell).focus();
          }, 0);
        }),
        (n.highlight = function (e) {
          (!this.getSolution() && "focus" !== e) ||
            this.cell.classList.add(
              "h5p-crossword-highlight" + (e ? "-" + e : ""),
            );
        }),
        (n.unhighlight = function (e) {
          e
            ? this.cell.classList.remove(
                "h5p-crossword-highlight" + (e ? "-" + e : ""),
              )
            : (this.cell.classList.remove("h5p-crossword-highlight-normal"),
              this.cell.classList.remove("h5p-crossword-highlight-focus"));
        }),
        (n.showSolutions = function () {
          this.params.solution &&
            (this.setAnswer(this.params.solution), this.setSolutionState());
        }),
        (n.checkAnswer = function () {
          var e =
              0 < arguments.length && void 0 !== arguments[0] && arguments[0],
            t = (this.answer || "").trim();
          t === this.params.solution && "" !== t
            ? (this.setSolutionState("correct"),
              e && this.callbacks.onRead(this.params.a11y.correct))
            : "" === t || t === h.CHARACTER_PLACEHOLDER
              ? this.setSolutionState()
              : (this.params.applyPenalties
                  ? this.setSolutionState("wrong")
                  : this.setSolutionState("neutral"),
                e && this.callbacks.onRead(this.params.a11y.wrong));
        }),
        (n.reset = function () {
          (this.setAnswer("", !1), this.unhighlight(), this.setSolutionState());
        }),
        (n.enable = function () {
          (this.cellInput &&
            (this.previousTabIndex &&
              this.cell.setAttribute("tabindex", this.previousTabIndex),
            this.cellInput.removeAttribute("disabled")),
            (this.enabled = !0));
        }),
        (n.disable = function () {
          ((this.enabled = !1),
            this.cellInput &&
              this.cellInput.setAttribute("disabled", "disabled"),
            (this.previousTabIndex = this.cell.getAttribute("tabindex")),
            this.cell.removeAttribute("tabindex"));
        }),
        (n.addSolutionWordIdMarker = function (e) {
          e &&
            ((this.solutionWordMarker = document.createElement("div")),
            this.solutionWordMarker.classList.add(
              "h5p-crossword-cell-solution-word-marker",
            ),
            (this.solutionWordMarker.innerText = e),
            this.cell.insertBefore(
              this.solutionWordMarker,
              this.cell.firstChild,
            ),
            (this.solutionWordCircle = document.createElement("div")),
            this.solutionWordCircle.classList.add(
              "h5p-crossword-cell-solution-word-circle",
            ),
            this.cell.insertBefore(
              this.solutionWordCircle,
              this.cell.firstChild,
            ),
            (this.solutionWordId = e));
        }),
        d),
      c =
        (((n = u.prototype).getDOM = function () {
          return this.content;
        }),
        (n.buildCells = function (n) {
          let e =
            1 < arguments.length && void 0 !== arguments[1] ? arguments[1] : [];
          const o = h.createArray(n.rows, n.columns);
          for (let t = 0; t < n.rows; t++)
            for (let e = 0; e < n.columns; e++)
              o[t][e] = { row: t, column: e, solution: null, id: null };
          e.forEach((t) => {
            let n = t.starty - 1,
              i = t.startx - 1;
            for (let e = 0; e < t.answer.length; e++)
              "none" !== t.orientation &&
                ((o[n][i] = {
                  row: n,
                  column: i,
                  solution: t.answer.substr(e, 1),
                  solutionLength: t.answer.length,
                  solutionIndex: e + 1,
                  clue: t.clue,
                  clueIdAcross:
                    "across" === t.orientation
                      ? t.clueId
                      : o[n][i].clueIdAcross,
                  clueIdDown:
                    "down" === t.orientation ? t.clueId : o[n][i].clueIdDown,
                  clueIdMarker: 0 === e ? t.clueId : o[n][i].clueIdMarker,
                }),
                "down" === t.orientation ? n++ : i++);
          });
          const t = h.createArray(n.rows, n.columns);
          return (
            [].concat(...o).forEach((e) => {
              t[e.row][e.column] = new l(
                {
                  row: e.row,
                  column: e.column,
                  solution: e.solution,
                  solutionIndex: e.solutionIndex,
                  solutionLength: e.solutionLength,
                  width: 100 / n.columns,
                  clueIdMarker: e.clueIdMarker,
                  clue: e.clue,
                  clueIdAcross: e.clueIdAcross,
                  clueIdDown: e.clueIdDown,
                  instantFeedback: this.params.instantFeedback,
                  applyPenalties: this.params.applyPenalties,
                  hasBackgroundImage: !!this.params.theme.backgroundImage,
                  theme: this.params.theme,
                  a11y: {
                    correct: this.params.a11y.correct,
                    wrong: this.params.a11y.wrong,
                    empty: this.params.a11y.empty,
                  },
                },
                {
                  onClick: (e) => {
                    this.handleCellClick(e);
                  },
                  onFocus: (e, t) => {
                    this.handleCellFocus(e, t);
                  },
                  onKeyup: (e) => {
                    this.handleCellKeyup(e);
                  },
                  onRead: (e) => {
                    this.callbacks.onRead(e);
                  },
                },
              );
            }),
            t
          );
        }),
        (n.findSolutionWordCells = function (e) {
          if (!e || "" === e) return [];
          const n = [];
          let i = !0,
            o = []
              .concat(...this.cells)
              .filter((e) => null !== e.getSolution());
          return (
            e.split("").forEach((t) => {
              var e;
              !1 !== i &&
                (0 !==
                (e = h.shuffleArray(
                  o.filter((e) => e.getSolution() === t && -1 === n.indexOf(e)),
                )).length
                  ? n.push(e[0])
                  : (i = !1));
            }),
            n.length === e.length ? n : []
          );
        }),
        (n.addSolutionWord = function (e) {
          if (!e || "" === e) return !1;
          const t = this.findSolutionWordCells(e);
          return (
            t.forEach((e, t) => {
              e.addSolutionWordIdMarker(t + 1);
            }),
            0 < t.length
          );
        }),
        (n.buildGrid = function (t) {
          const e = document.createElement("table");
          if (
            (e.classList.add("h5p-crossword-grid"),
            (e.style.backgroundColor = t.theme.backgroundColor),
            (e.style.maxWidth = `calc(2 * ${t.dimensions.columns} * 32px)`),
            t.theme.backgroundImage)
          ) {
            e.classList.add("h5p-crossword-grid-background-image");
            const n = document.createElement("img");
            (H5P.setSource(n, t.theme.backgroundImage, t.contentId),
              (e.style.backgroundImage = `url('${n.src}')`));
          }
          (e.setAttribute("role", "grid"),
            e.setAttribute("aria-label", this.params.a11y.crosswordGrid));
          const n = document.createElement("tbody");
          n.setAttribute("role", "rowgroup");
          for (let e = 0; e < t.dimensions.rows; e++) {
            var i = this.buildGridRow(t.dimensions, e);
            n.appendChild(i);
          }
          return (e.appendChild(n), e);
        }),
        (n.buildGridRow = function (t, n) {
          const i = document.createElement("tr");
          i.setAttribute("role", "row");
          for (let e = 0; e < t.columns; e++)
            i.appendChild(this.cells[n][e].getDOM());
          return i;
        }),
        (n.moveTo = function () {
          var e =
              0 < arguments.length && void 0 !== arguments[0]
                ? arguments[0]
                : {},
            t = 1 < arguments.length && void 0 !== arguments[1] && arguments[1];
          if (e.row < 0 || e.row > this.params.dimensions.rows - 1) return !1;
          if (e.column < 0 || e.column > this.params.dimensions.columns - 1)
            return !1;
          if (null === this.cells[e.row][e.column].getSolution()) return !1;
          const n = this.cells[e.row][e.column];
          return (
            !!n &&
            ([].concat(...this.cells).forEach((e) => {
              e.setTabIndex("-1");
            }),
            n.setTabIndex("0"),
            (this.currentPosition = e),
            this.focusCell(e, t),
            !0)
          );
        }),
        (n.getUpdates = function (e) {
          const t = [],
            n = "across" === this.currentOrientation ? "down" : "across",
            i = this.cells[e.row][e.column].getClueId(n);
          if (i) {
            const e = []
              .concat(...this.cells)
              .filter((e) => e.getClueId(n) === i)
              .reduce((e, t) => e + (t.answer || " "), "")
              .replace(/[\s\uFEFF\xA0]+$/g, "");
            t.push({ clueId: i, orientation: n, text: e });
          }
          const o = this.cells[e.row][e.column].getClueId(
              this.currentOrientation,
            ),
            r = []
              .concat(...this.cells)
              .filter((e) => e.getClueId(this.currentOrientation) === o)
              .reduce((e, t) => e + (t.answer || " "), "")
              .replace(/[\s\uFEFF\xA0]+$/g, "");
          return (
            t.push({
              clueId: o,
              orientation: this.currentOrientation,
              text: r,
            }),
            t
          );
        }),
        (n.getAnswers = function () {
          return [].concat(...this.cells).map((e) => e.getAnswer());
        }),
        (n.setAnswers = function (n) {
          [].concat(...this.cells).forEach((e, t) => {
            if ((e.setAnswer(n[t] || ""), e.getSolution())) {
              const n = e.getInformation();
              this.callbacks.onInput({
                answer: n.answer,
                inputFieldUpdates: this.getUpdates(n.position),
                clueId: n.clueId,
                solutionWordId: n.solutionWordId || null,
                checkFilled: !0,
              });
            }
          });
        }),
        (n.getScore = function () {
          var e = this.params.scoreWords
            ? this.params.words.reduce(
                (e, t) => e + this.getWordScore(t.clueId, t.orientation),
                0,
              )
            : []
                .concat(...this.cells)
                .reduce((e, t) => e + (t.getScore() || 0), 0);
          return Math.max(0, e);
        }),
        (n.getMaxScore = function () {
          return (
            this.params.scoreWords
              ? (this.maxScore = this.params.words.length)
              : (this.maxScore =
                  this.maxScore ||
                  []
                    .concat(...this.cells)
                    .reduce(
                      (e, t) => e + (void 0 !== t.getScore() ? 1 : 0),
                      0,
                    )),
            this.maxScore
          );
        }),
        (n.getWordScore = function (e) {
          const t = this.getWordInformation(
              e,
              1 < arguments.length && void 0 !== arguments[1]
                ? arguments[1]
                : "across",
            ),
            n = t.reduce(
              (e, t) =>
                -1 === e || -1 === t.score
                  ? -1
                  : e + (1 === t.score || void 0 === t.score ? 1 : 0),
              0,
            );
          return -1 === n ? -1 : n === t.length ? 1 : 0;
        }),
        (n.setcurrentOrientation = function (e, t) {
          if (
            ("across" === e || "down" === e) &&
            "number" == typeof (t = t || this.currentPosition).row &&
            "number" == typeof t.column &&
            !(t.row < 0 || t.row > this.params.dimensions.rows - 1) &&
            !(t.column < 0 || t.column > this.params.dimensions.columns - 1) &&
            this.cells[t.row][t.column].getSolution()
          ) {
            var n =
                0 < t.column && this.cells[t.row][t.column - 1].getSolution(),
              i =
                t.column < this.params.dimensions.columns - 1 &&
                this.cells[t.row][t.column + 1].getSolution(),
              o = 0 < t.row && this.cells[t.row - 1][t.column].getSolution(),
              t =
                t.row < this.params.dimensions.rows - 1 &&
                this.cells[t.row + 1][t.column].getSolution();
            return (
              "across" !== e || n || i
                ? (("down" !== e || o || t) && (n || i || o || t)) ||
                  (e = "across")
                : (e = "down"),
              (this.currentOrientation = e)
            );
          }
        }),
        (n.reset = function () {
          ([].concat(...this.cells).forEach((e) => {
            e.reset();
          }),
            (this.currentPosition = {}),
            (this.currentOrientation = "across"),
            (this.maxScore = null));
        }),
        (n.resize = function () {
          var e = this.content.clientWidth / this.params.dimensions.columns;
          this.content.style.fontSize = e / 2 + "px";
        }),
        (n.handleCellClick = function (e) {
          var t =
            1 < arguments.length && void 0 !== arguments[1] && arguments[1];
          if (this.ignoreNextClick) this.ignoreNextClick = !1;
          else {
            const n = this.cells[e.row][e.column];
            n.getSolution() &&
              (t ||
                (!n.getClueId("across") ||
                (this.currentPosition.row === e.row &&
                  this.currentPosition.column === e.column &&
                  "across" === this.currentOrientation)
                  ? this.setcurrentOrientation("down", e)
                  : this.setcurrentOrientation("across", e)),
              (this.currentPosition = e),
              this.moveTo(e, !0));
          }
        }),
        (n.handleCellFocus = function (e, t) {
          this.cells[e.row][e.column].getSolution() &&
            ((t.relatedTarget &&
              (t.relatedTarget.classList.contains("h5p-crossword-cell") ||
                t.relatedTarget.classList.contains(
                  "h5p-crossword-cell-content",
                ))) ||
              (this.setcurrentOrientation(this.currentOrientation, e),
              this.handleCellClick(e, !0),
              (this.ignoreNextClick =
                "boolean" != typeof this.ignoreNextClick ||
                this.ignoreNextClick)));
        }),
        (n.handleCellKeyup = function (e) {
          (void 0 === e.nextPositionOffset && (e.nextPositionOffset = 1),
            (!this.currentOrientation ||
              "across" === this.currentOrientation) &&
            0 <= e.position.column + e.nextPositionOffset &&
            e.position.column + e.nextPositionOffset <
              this.params.dimensions.columns &&
            this.cells[e.position.row][
              e.position.column + e.nextPositionOffset
            ].getSolution()
              ? ((this.currentOrientation = "across"),
                this.focusCell({
                  row: e.position.row,
                  column: e.position.column + e.nextPositionOffset,
                }))
              : (!this.currentOrientation ||
                  "down" === this.currentOrientation) &&
                0 <= e.position.row + e.nextPositionOffset &&
                e.position.row + e.nextPositionOffset <
                  this.params.dimensions.rows &&
                this.cells[e.position.row + e.nextPositionOffset][
                  e.position.column
                ].getSolution() &&
                ((this.currentOrientation = "down"),
                this.focusCell({
                  row: e.position.row + e.nextPositionOffset,
                  column: e.position.column,
                })),
            this.callbacks.onInput({
              answer: e.answer,
              inputFieldUpdates: this.getUpdates(e.position),
              clueId: e.clueId,
              solutionWordId: e.solutionWordId || null,
              checkFilled: !0,
            }));
        }),
        (n.showSolutions = function () {
          [].concat(...this.cells).forEach((e) => {
            e.showSolutions();
          });
        }),
        (n.checkAnswerWords = function () {
          var e = this.params.words.map((e) => ({
            clueId: e.clueId,
            orientation: e.orientation,
            answer: e.answer,
            score: this.getWordScore(e.clueId, e.orientation),
          }));
          return (
            [].concat(...this.cells).forEach((e) => {
              e.checkAnswer();
            }),
            e
          );
        }),
        (n.checkAnswer = function () {
          const t = [];
          return (
            [].concat(...this.cells).forEach((e) => {
              e.checkAnswer();
              e = e.getInformation();
              e.solution && t.push(e);
            }),
            t
          );
        }),
        (n.highlightWord = function (e) {
          let i =
            1 < arguments.length && void 0 !== arguments[1]
              ? arguments[1]
              : "across";
          const o = this.cells[e.row][e.column].getClueId(i);
          if (o) {
            const r = this.params.words.filter(
              (e) => e.clueId === o && e.orientation === i,
            )[0];
            []
              .concat(...this.cells)
              .filter((e) => e.getClueId(i) === o)
              .forEach((e, t) => {
                var n = e.getPosition(),
                  t = {
                    row: n.row,
                    column: n.column,
                    clueId: o,
                    orientation: i,
                    clue: r.clue,
                    position: t,
                    length: r.answer.length,
                  };
                (e.setAriaLabel(this.buildAriaLabel(t)), e.highlight("normal"));
              });
          }
        }),
        (n.buildAriaLabel = function (e) {
          return (
            `${this.params.a11y.row} ${e.row + 1}, ${
              this.params.a11y.column
            } ` +
            (e.column + 1) +
            `. ${
              `${e.clueId} ${this.params.a11y[e.orientation]}. ` + e.clue
            }, ${
              "" +
              this.params.a11y.letterSevenOfNine
                .replace("@position", e.position + 1)
                .replace("@length", e.length)
            }.`
          );
        }),
        (n.getFocus = function () {
          return {
            position: this.currentPosition,
            orientation: this.currentOrientation,
          };
        }),
        (n.getWordInformation = function (t) {
          let n =
            1 < arguments.length && void 0 !== arguments[1]
              ? arguments[1]
              : "across";
          return t
            ? []
                .concat(...this.cells)
                .filter((e) => e.getClueId(n) === t)
                .map((e) => e.getInformation())
            : "";
        }),
        (n.focusCell = function (e) {
          var t =
            1 < arguments.length && void 0 !== arguments[1] && arguments[1];
          (this.clearCellHighlights(),
            this.setcurrentOrientation(this.currentOrientation, e),
            this.highlightWord(e, this.currentOrientation),
            this.cells[e.row][e.column].highlight("focus"),
            this.callbacks.onFocus({
              clueId: this.cells[e.row][e.column].getClueId(
                this.currentOrientation,
              ),
              orientation: this.currentOrientation,
            }),
            t || this.cells[e.row][e.column].focus());
        }),
        (n.clearCellHighlights = function () {
          [].concat(...this.cells).forEach((e) => {
            e.unhighlight();
          });
        }),
        (n.fillGrid = function (i) {
          const e = []
            .concat(...this.cells)
            .filter((e) => e.getClueId(i.orientation) === i.clueId);
          var t;
          (e.forEach((e, t) => {
            if (
              (e.setAnswer(
                i.text[t] || "",
                -1 !== i.readOffset && t === i.cursorPosition - i.readOffset,
              ),
              e.getClueId("down") && e.getClueId("across"))
            ) {
              const t =
                  "across" === i.orientation
                    ? this.getWordInformation(e.getClueId("down"), "down")
                    : this.getWordInformation(e.getClueId("across"), "across"),
                n = [
                  {
                    clueId:
                      "across" === i.orientation
                        ? e.getClueId("down")
                        : e.getClueId("across"),
                    orientation: "across" === i.orientation ? "down" : "across",
                    text: t.reduce((e, t) => "" + e + (t.answer || " "), ""),
                  },
                ];
              this.callbacks.onInput({ inputFieldUpdates: n });
            }
            const n = e.getInformation();
            n.solutionWordId && this.callbacks.onInput(n);
          }),
            i.cursorPosition < e.length &&
              ((t = e[i.cursorPosition].position),
              this.setcurrentOrientation(i.orientation, t),
              this.moveTo(t, !0)),
            this.callbacks.onInput({ checkFilled: !0 }));
        }),
        (n.enable = function () {
          ([].concat(...this.cells).forEach((e) => {
            e.enable();
          }),
            (this.disabled = !1));
        }),
        (n.disable = function () {
          ((this.disabled = !0),
            [].concat(...this.cells).forEach((e) => {
              e.disable();
            }));
        }),
        (n.isFilled = function () {
          return ![].concat(...this.cells).some((e) => !1 === e.isFilled());
        }),
        (n.unhighlight = function () {
          [].concat(...this.cells).forEach((e) => {
            (e.unhighlight("focus"),
              e.unhighlight("normal"),
              this.params.instantFeedback || e.setSolutionState());
          });
        }),
        (n.getXAPICorrectResponsesPattern = function () {
          return [
            "{case_matters=false}" +
              this.params.words
                .map((e) => {
                  const t = this.getWordInformation(
                    e.clueId,
                    e.orientation,
                  ).map((e) => e.solution);
                  return this.params.scoreWords ? t.join("") : t.join("[,]");
                })
                .join("[,]"),
          ];
        }),
        (n.getXAPIResponse = function () {
          return this.params.words
            .map((e) => {
              const t = this.getWordInformation(e.clueId, e.orientation);
              return this.params.scoreWords
                ? t.map((e) => e.answer || " ").join("")
                : t.map((e) => e.answer || "").join("[,]");
            })
            .join("[,]");
        }),
        (n.getXAPIDescription = function () {
          return this.params.words
            .map((e) => {
              const t =
                  `${e.clueId} ${this.params.l10n[e.orientation]}: ` +
                  e.clue.replaceAll(/_{10,}/gi, "_________"),
                n = [];
              if (this.params.scoreWords) n.push(u.XAPI_PLACEHOLDER);
              else
                for (; n.length < e.answer.length; ) n.push(u.XAPI_PLACEHOLDER);
              return `<p>${t}</ br>${n.join(" ")}</p>`;
            })
            .join("");
        }),
        u);
    function u() {
      var e =
          0 < arguments.length && void 0 !== arguments[0] ? arguments[0] : {},
        t = 1 < arguments.length ? arguments[1] : void 0;
      ((this.params = h.extend({}, e)),
        (this.params.theme.backgroundImage =
          this.params.theme.backgroundImage || null),
        (this.callbacks = t || {}),
        (this.callbacks.onInput = this.callbacks.onInput || (() => {})),
        (this.callbacks.onFocus = this.callbacks.onFocus || (() => {})),
        (this.callbacks.onRead = t.onRead || (() => {})),
        (this.currentPosition = {}),
        (this.currentOrientation = "across"),
        (this.maxScore = null),
        (this.cells = this.buildCells(
          this.params.dimensions,
          this.params.words,
        )),
        (this.content = this.buildGrid(this.params)),
        []
          .concat(...this.cells)
          .filter((e) => null !== e.getSolution())[0]
          .setTabIndex("0"),
        this.content.addEventListener("keydown", (i) => {
          if (!this.disabled) {
            let e,
              t,
              n = i.target;
            switch (
              (i.target.classList.contains("h5p-crossword-cell-content") &&
                (n = i.target.parentNode.parentNode),
              i.key)
            ) {
              case "ArrowRight":
                (i.preventDefault(),
                  this.setcurrentOrientation("across", {
                    row: parseInt(n.dataset.row),
                    column: parseInt(n.dataset.col) + 1,
                  }),
                  this.moveTo({
                    row: parseInt(n.dataset.row),
                    column: parseInt(n.dataset.col) + 1,
                  }));
                break;
              case "ArrowLeft":
                (i.preventDefault(),
                  this.setcurrentOrientation("across", {
                    row: parseInt(n.dataset.row),
                    column: parseInt(n.dataset.col) - 1,
                  }),
                  this.moveTo({
                    row: parseInt(n.dataset.row),
                    column: parseInt(n.dataset.col) - 1,
                  }));
                break;
              case "ArrowDown":
                (i.preventDefault(),
                  this.setcurrentOrientation("across", {
                    row: parseInt(n.dataset.row) + 1,
                    column: parseInt(n.dataset.col),
                  }),
                  this.moveTo({
                    row: parseInt(n.dataset.row) + 1,
                    column: parseInt(n.dataset.col),
                  }));
                break;
              case "ArrowUp":
                (i.preventDefault(),
                  this.setcurrentOrientation("across", {
                    row: parseInt(n.dataset.row) - 1,
                    column: parseInt(n.dataset.col),
                  }),
                  this.moveTo({
                    row: parseInt(n.dataset.row) - 1,
                    column: parseInt(n.dataset.col),
                  }));
                break;
              case "Home":
                (i.preventDefault(),
                  i.ctrlKey
                    ? this.moveTo({ row: 0, column: 0 })
                    : this.moveTo({ row: parseInt(n.dataset.row), column: 0 }));
                break;
              case "End":
                (i.preventDefault(),
                  i.ctrlKey
                    ? this.moveTo({
                        row: this.params.dimensions.rows - 1,
                        column: this.params.dimensions.columns - 1,
                      })
                    : this.moveTo({
                        row: parseInt(n.dataset.row),
                        column: document.querySelector(
                          '[data-row="' + n.dataset.row + '"]:last-of-type',
                        ).dataset.col,
                      }));
                break;
              case "PageUp":
                for (
                  i.preventDefault(), e = 0;
                  (t = this.moveTo({ row: e, column: n.dataset.col })),
                    e++,
                    !1 === t;

                );
                break;
              case "PageDown":
                for (
                  i.preventDefault(), e = this.params.dimensions.rows - 1;
                  (t = this.moveTo({ row: e, column: n.dataset.col })),
                    e--,
                    !1 === t;

                );
            }
          }
        }));
    }
    function d() {
      let e =
          0 < arguments.length && void 0 !== arguments[0] ? arguments[0] : {},
        t = 1 < arguments.length && void 0 !== arguments[1] ? arguments[1] : {};
      ((this.params = h.extend(
        { instantFeedback: !1, clueIdMarker: null, solution: null },
        e,
      )),
        (this.callbacks = t || {}),
        (this.callbacks.onClick = t.onClick || (() => {})),
        (this.callbacks.onFocus = t.onFocus || (() => {})),
        (this.callbacks.onKeyup = t.onKeyup || (() => {})),
        (this.callbacks.onRead = t.onRead || (() => {})),
        (this.enabled = !0),
        (this.previousTabIndex = null),
        (this.position = { row: e.row, column: e.column }),
        (this.solutionWordId = null),
        (this.cell = this.buildCell(e)));
      const n = this.buildCellContentWrapper();
      if (
        (this.cell.appendChild(n),
        this.params.solution
          ? ((this.cellInput = this.buildCellInput(e)),
            n.appendChild(this.cellInput),
            (this.cellCanvas = this.buildCellCanvas()),
            n.appendChild(this.cellCanvas),
            this.cell.addEventListener("click", () => {
              this.enabled &&
                (this.callbacks.onClick(this.position), this.focus());
            }))
          : (this.cell.classList.add("h5p-crossword-cell-empty"),
            this.cell.setAttribute("aria-label", this.params.a11y.empty),
            this.params.hasBackgroundImage ||
              (this.cell.style.backgroundColor =
                this.params.theme.backgroundColor)),
        this.params.clueIdMarker)
      ) {
        const e = document.createElement("div");
        (e.classList.add("h5p-crossword-cell-clue-id-marker"),
          (e.innerText = this.params.clueIdMarker),
          n.appendChild(e));
      }
    }
    function f() {
      let e =
          0 < arguments.length && void 0 !== arguments[0] ? arguments[0] : {},
        t = 1 < arguments.length ? arguments[1] : void 0;
      ((this.params = h.extend(
        { l10n: { extraClue: "Extra clue", closeWindow: "Close Window" } },
        e,
      )),
        (this.callbacks = t || {}),
        (this.callbacks.onFieldInput =
          this.callbacks.onFieldInput || (() => {})),
        (this.callbacks.onRead = t.onRead || (() => {})),
        (this.inputFields = []),
        (this.extraClues = []),
        (this.content = document.createElement("div")),
        this.content.classList.add("h5p-crossword-input-container"));
      var n = this.buildInputFieldsGroup({
        words: this.params.words.filter((e) => "across" === e.orientation),
        title: e.l10n.across,
      });
      this.content.appendChild(n);
      n = this.buildInputFieldsGroup({
        words: this.params.words.filter((e) => "down" === e.orientation),
        title: e.l10n.down,
      });
      (this.content.appendChild(n),
        (this.overlay = new i(
          { l10n: { closeWindow: this.params.l10n.closeWindow } },
          {
            onClose: () => {
              this.handleOverlayClosed();
            },
            onRead: (e) => {
              this.callbacks.onRead(e);
            },
          },
        )),
        e.overlayContainer.appendChild(this.overlay.getDOM()));
    }
    function g() {
      ((this.params = h.extend(
        { a11y: { listLabel: "" } },
        0 < arguments.length && void 0 !== arguments[0] ? arguments[0] : {},
      )),
        (this.charMarked = null),
        (this.content = this.buildListContainer({
          listLabel: this.params.a11y.listLabel,
        })));
    }
    c.XAPI_PLACEHOLDER = "__________";
    let m =
        (((n = y.prototype).getDOM = function () {
          return this.content;
        }),
        (n.createSolution = function (e) {
          const t = document.createElement("div");
          t.classList.add("h5p-crossword-solution-word-wrapper");
          const n = document.createElement("table");
          (n.classList.add("h5p-crossword-solution-word"),
            n.setAttribute("aria-hidden", !0),
            t.appendChild(n));
          const i = document.createElement("tr");
          return (
            e.forEach((e) => {
              i.appendChild(e.getDOM());
            }),
            n.appendChild(i),
            t
          );
        }),
        (n.createCells = function (n) {
          const i = h.createArray(n.length);
          return (
            n.split("").forEach((e, t) => {
              ((i[t] = new l({
                width: 100 / n.length,
                solution: n[t],
                clueIdMarker: t + 1,
              })),
                i[t].disable());
            }),
            i
          );
        }),
        (n.setCell = function (e, t) {
          this.cells[e].setAnswer(t || "");
        }),
        (n.showSolutions = function () {
          this.cells.forEach((e) => {
            e.showSolutions();
          });
        }),
        (n.reset = function () {
          this.cells.forEach((e) => {
            e.reset();
          });
        }),
        (n.resize = function () {
          const t = this.content.clientWidth / this.scaleWidth;
          ((this.content.style.fontSize = t / 2 + "px"),
            this.cells.forEach((e) => {
              e.setWidth(t);
            }));
        }),
        y),
      v =
        (((n = b.prototype).getSquareGrid = function () {
          let t =
              0 < arguments.length && void 0 !== arguments[0]
                ? arguments[0]
                : 10,
            n = null,
            i = 0;
          for (let e = 0; e < t; e++) {
            const t = this.getGrid(10);
            if (null !== t) {
              var o =
                +Math.min(t.length, t[0].length) /
                Math.max(t.length, t[0].length);
              if ((o > i && ((n = t), (i = o)), 1 === i)) break;
            }
          }
          return n;
        }),
        (n.getGrid = function () {
          let n,
            t =
              0 < arguments.length && void 0 !== arguments[0]
                ? arguments[0]
                : 10;
          for (let e = 0; e < t; e++) {
            this.resetGrid();
            const t = this.wordElements.filter((e) => void 0 !== e.row);
            if (0 < t.length) {
              if (
                (t.forEach((n) =>
                  !1 ===
                  this.canPlaceAnswerAt(n.answer, {
                    row: n.row,
                    column: n.column,
                    orientation: n.orientation,
                  })
                    ? (this.badWords.some((t) =>
                        Object.keys(t).every((e) => t[e] === n[e]),
                      ) || this.badWords.push(n),
                      null)
                    : void this.placeAnswerAt(n, {
                        row: n.row,
                        column: n.column,
                        orientation: n.orientation,
                      }),
                ),
                t.length >= this.params.config.poolSize ||
                  t.length === this.wordElements.length)
              )
                return this.minimizeGrid();
            } else {
              let e = Math.floor(this.cells.length / 2),
                t = Math.floor(this.cells[0].length / 2);
              const r = this.wordElements[0],
                s = this.getRandomOrientation();
              if (
                ("across" === s
                  ? (t -= Math.floor(r.answer.length / 2))
                  : (e -= Math.floor(r.answer.length / 2)),
                !1 ===
                  this.canPlaceAnswerAt(r.answer, {
                    row: e,
                    column: t,
                    orientation: s,
                  }))
              )
                return (
                  this.badWords.some((t) =>
                    Object.keys(t).every((e) => t[e] === r[e]),
                  ) || this.badWords.push(r),
                  null
                );
              this.placeAnswerAt(r, { row: e, column: t, orientation: s });
            }
            ((this.groups = []),
              0 < t.length
                ? this.groups.push(this.wordElements.slice(t.length))
                : this.groups.push(this.wordElements.slice(1)));
            for (let t = 0; t < this.groups.length; t++) {
              n = !1;
              for (let e = 0; e < this.groups[t].length; e++) {
                var i = this.groups[t][e],
                  o = this.findPositionForWord(i.answer);
                o
                  ? (this.placeAnswerAt(i, o), (n = !0))
                  : (this.groups.length - 1 === t && this.groups.push([]),
                    this.groups[t + 1].push(i));
              }
              if (!n) break;
            }
            if (n) return this.minimizeGrid();
          }
          return ((this.badWords = this.groups[this.groups.length - 1]), null);
        }),
        (n.getBadWords = function () {
          return this.badWords;
        }),
        (n.getRandomOrientation = function () {
          return Math.floor(2 * Math.random()) ? "across" : "down";
        }),
        (n.minimizeGrid = function () {
          let o = b.GRID_ROWS - 1,
            n = 0,
            r = b.GRID_COLUMNS - 1,
            i = 0;
          for (let t = 0; t < b.GRID_ROWS; t++)
            for (let e = 0; e < b.GRID_COLUMNS; e++)
              null !== this.cells[t][e] &&
                (t < o && (o = t),
                t > n && (n = t),
                e < r && (r = e),
                e > i && (i = e));
          const e = n - o + 1,
            s = i - r + 1,
            a = h.createArray(e, s);
          for (let n = o, i = 0; i < e; n++, i++)
            for (let e = r, t = 0; t < s; e++, t++) a[i][t] = this.cells[n][e];
          return a;
        }),
        (n.addCellToGrid = function (e, t, n) {
          var i = e.answer.charAt(n);
          (null === this.cells[t.row][t.column] &&
            ((this.cells[t.row][t.column] = { char: i }),
            (this.indexChar[i] = this.indexChar[i] || []),
            this.indexChar[i].push({ row: t.row, column: t.column })),
            (this.cells[t.row][t.column][t.orientation] = {
              isStartOfWord: 0 === n,
              index: e.index,
            }));
        }),
        (n.placeAnswerAt = function (n, i) {
          if ("across" === i.orientation)
            for (
              let e = i.column, t = 0;
              e < i.column + n.answer.length;
              e++, t++
            )
              this.addCellToGrid(
                n,
                { row: i.row, column: e, orientation: i.orientation },
                t,
              );
          else {
            if ("down" !== i.orientation) throw "Invalid orientation";
            for (let e = i.row, t = 0; e < i.row + n.answer.length; e++, t++)
              this.addCellToGrid(
                n,
                { row: e, column: i.column, orientation: i.orientation },
                t,
              );
          }
        }),
        (n.canPlaceCharAt = function (e, t) {
          return null === this.cells[t.row][t.column]
            ? 0
            : this.cells[t.row][t.column].char === e && 1;
        }),
        (n.canPlaceAnswerAt = function (i, o) {
          if (
            o.row < 0 ||
            o.row >= this.cells.length ||
            o.column < 0 ||
            o.column >= this.cells[o.row].length
          )
            return !1;
          if ("across" === o.orientation) {
            for (let e = 0; e < i.length; e++) {
              var t = this.cells[o.row][o.column + e];
              if (!t || t.char !== i[e]) break;
              if (e === i.length - 1) return !1;
            }
            if (o.column + i.length > this.cells[o.row].length) return !1;
            if (0 <= o.column - 1 && null !== this.cells[o.row][o.column - 1])
              return !1;
            if (
              o.column + i.length < this.cells[o.row].length &&
              null !== this.cells[o.row][o.column + i.length]
            )
              return !1;
            for (
              let e = o.row - 1, t = o.column, n = 0;
              0 <= e && t < o.column + i.length;
              t++, n++
            ) {
              var r = null === this.cells[e][t],
                s =
                  null !== this.cells[o.row][t] &&
                  this.cells[o.row][t].char === i.charAt(n);
              if (!r && !s) return !1;
            }
            for (
              let e = o.row + 1, t = o.column, n = 0;
              e < this.cells.length && t < o.column + i.length;
              t++, n++
            ) {
              var a = null === this.cells[e][t],
                l =
                  null !== this.cells[o.row][t] &&
                  this.cells[o.row][t].char === i.charAt(n);
              if (!a && !l) return !1;
            }
            for (let e = o.column, t = 0; e < o.column + i.length; e++, t++)
              if (
                !1 ===
                this.canPlaceCharAt(i.charAt(t), { row: o.row, column: e })
              )
                return !1;
          } else {
            if ("down" !== o.orientation) throw "Invalid Orientation";
            for (let e = 0; e < i.length; e++) {
              var n = this.cells[o.row + e][o.column];
              if (!n || n.char !== i[e]) break;
              if (e === i.length - 1) return !1;
            }
            if (o.row + i.length > this.cells.length) return !1;
            if (0 <= o.row - 1 && null !== this.cells[o.row - 1][o.column])
              return !1;
            if (
              o.row + i.length < this.cells.length &&
              null !== this.cells[o.row + i.length][o.column]
            )
              return !1;
            for (
              let e = o.column - 1, t = o.row, n = 0;
              0 <= e && t < o.row + i.length;
              t++, n++
            ) {
              var c = null === this.cells[t][e],
                u =
                  null !== this.cells[t][o.column] &&
                  this.cells[t][o.column].char === i.charAt(n);
              if (!c && !u) return !1;
            }
            for (
              let e = o.column + 1, t = o.row, n = 0;
              t < o.row + i.length && e < this.cells[t].length;
              t++, n++
            ) {
              var d = null === this.cells[t][e],
                h =
                  null !== this.cells[t][o.column] &&
                  this.cells[t][o.column].char === i.charAt(n);
              if (!d && !h) return !1;
            }
            for (let e = o.row, t = 0; e < o.row + i.length; e++, t++)
              if (
                !1 ===
                this.canPlaceCharAt(i.charAt(t, 1), {
                  row: e,
                  column: o.column,
                })
              )
                return !1;
          }
          return !0;
        }),
        (n.findPositionForWord = function (n) {
          const i = [];
          for (let t = 0; t < n.length; t++) {
            var o = this.indexChar[n.charAt(t)];
            if (o)
              for (let e = 0; e < o.length; e++) {
                var r = o[e],
                  s = r.row,
                  a = r.column,
                  l = this.canPlaceAnswerAt(n, {
                    row: s,
                    column: a - t,
                    orientation: "across",
                  }),
                  r = this.canPlaceAnswerAt(n, {
                    row: s - t,
                    column: a,
                    orientation: "down",
                  });
                (!1 !== l &&
                  i.push({
                    intersections: l,
                    row: s,
                    column: a - t,
                    orientation: "across",
                  }),
                  !1 !== r &&
                    i.push({
                      intersections: r,
                      row: s - t,
                      column: a,
                      orientation: "down",
                    }));
              }
          }
          return 0 !== i.length && i[Math.floor(Math.random() * i.length)];
        }),
        (n.resetGrid = function () {
          for (let t = 0; t < this.cells.length; t++)
            for (let e = 0; e < this.cells[t].length; e++)
              this.cells[t][e] = null;
          this.indexChar = {};
        }),
        (n.createWordElements = function (e, t) {
          t = "number" != typeof t || 0 === t ? null : Math.max(2, t);
          let n = e.map((e, t) => ((e.index = t), e));
          if (t) {
            const e = n.filter((e) => void 0 !== e.row),
              i = h.shuffleArray(n.filter((e) => void 0 === e.row));
            (i.splice(Math.max(0, t - e.length), i.length), (n = e.concat(i)));
          }
          return n.sort((e, t) => {
            var n = void 0 !== e.row ? 1 : 0,
              i = void 0 !== t.row ? 1 : 0;
            return n < i ? 1 : i < n ? -1 : t.answer.length - e.answer.length;
          });
        }),
        (n.getWordElement = function (t, e) {
          if ("number" != typeof t) return null;
          var n = this.wordElements.filter((e) => e.index === t);
          return n.length < 1 ? null : "string" != typeof e ? n[0] : n[0][e];
        }),
        (n.export = function (n) {
          const e = n.length,
            i = n[0].length,
            o = [];
          let r = 1;
          for (let t = 0; t < e; t++)
            for (let e = 0; e < i; e++) {
              const i = n[t][e];
              null !== i &&
                (i.down &&
                  i.down.isStartOfWord &&
                  o.push({
                    clue: this.getWordElement(i.down.index, "clue"),
                    answer: this.getWordElement(i.down.index, "answer"),
                    extraClue: this.getWordElement(i.down.index, "extraClue"),
                    startx: e + 1,
                    starty: t + 1,
                    orientation: "down",
                    clueId: r,
                  }),
                i.across &&
                  i.across.isStartOfWord &&
                  o.push({
                    clue: this.getWordElement(i.across.index, "clue"),
                    answer: this.getWordElement(i.across.index, "answer"),
                    extraClue: this.getWordElement(i.across.index, "extraClue"),
                    startx: e + 1,
                    starty: t + 1,
                    orientation: "across",
                    clueId: r,
                  }),
                ((i.down && i.down.isStartOfWord) ||
                  (i.across && i.across.isStartOfWord)) &&
                  r++);
            }
          return { rows: e, cols: i, result: o };
        }),
        b);
    function b(e) {
      ((this.params = h.extend(
        {
          words: [
            { answer: "BAT", clue: "BAT" },
            { answer: "CAT", clue: "CAT" },
          ],
          config: { poolSize: 0 },
        },
        e || {},
      )),
        (this.params.words = this.params.words
          .filter((e) => e.answer && e.clue)
          .map((e) => {
            const t = {
              answer: h.toUpperCase(e.answer, h.UPPERCASE_EXCEPTIONS),
              clue: e.clue,
              extraClue: e.extraClue,
            };
            return (
              e.fixWord &&
                void 0 !== e.row &&
                void 0 !== e.column &&
                void 0 !== e.orientation &&
                ((t.row = e.row - 1),
                (t.column = e.column - 1),
                (t.orientation = e.orientation)),
              t
            );
          })),
        (this.indexChar = {}),
        (this.badWords = []),
        (this.cells = h.createArray(b.GRID_ROWS, b.GRID_COLUMNS)),
        (this.wordElements = this.createWordElements(
          this.params.words,
          this.params.config.poolSize,
        )));
    }
    function y() {
      let e =
        0 < arguments.length && void 0 !== arguments[0] ? arguments[0] : {};
      ((this.solutionWord = h.toUpperCase(
        e.solutionWord.replace(/\s/g, ""),
        h.UPPERCASE_EXCEPTIONS,
      )),
        (this.scaleWidth = Math.max(e.tableWidth, this.solutionWord.length)),
        (this.cells = this.createCells(this.solutionWord)),
        (this.content = this.createSolution(this.cells)));
    }
    ((v.GRID_ROWS = 100), (v.GRID_COLUMNS = 100));
    let w =
      (((n = x.prototype).getDOM = function () {
        return this.content;
      }),
      (n.resize = function () {
        this.table &&
          (this.table.resize(),
          this.inputarea.resize(),
          this.solutionWord && this.solutionWord.resize());
      }),
      (n.getXAPICorrectResponsesPattern = function () {
        return this.table.getXAPICorrectResponsesPattern();
      }),
      (n.getXAPIResponse = function () {
        return this.table.getXAPIResponse();
      }),
      (n.getXAPIDescription = function () {
        return this.table.getXAPIDescription();
      }),
      (n.reset = function () {
        this.params.words.length < 2 ||
          (this.table.reset(),
          this.solutionWord && this.solutionWord.reset(),
          this.inputarea.reset(),
          (this.answerGiven = !1));
      }),
      (n.getAnswerGiven = function () {
        return this.answerGiven;
      }),
      (n.getScore = function () {
        return this.params.words.length < 2 ? 0 : this.table.getScore();
      }),
      (n.getMaxScore = function () {
        return this.params.words.length < 2 ? 0 : this.table.getMaxScore();
      }),
      (n.getCurrentState = function () {
        if (!(this.params.words.length < 2) && this.table) {
          const e = this.table.getAnswers(),
            t = this.table.getFocus();
          return e.some((e) => void 0 !== e) || void 0 !== t.position.row
            ? { crosswordLayout: this.crosswordLayout, cells: e, focus: t }
            : void 0;
        }
      }),
      (n.checkAnswer = function () {
        var e;
        (this.disable(),
          this.params.scoreWords
            ? ((e = this.table.checkAnswerWords()),
              this.inputarea.checkAnswerWords(e))
            : ((e = this.table.checkAnswer()), this.inputarea.checkAnswer(e)));
      }),
      (n.isTableFilled = function () {
        return this.table && this.table.isFilled();
      }),
      (n.showSolutions = function () {
        this.params.words.length < 2 ||
          (this.disable(),
          this.table.showSolutions(),
          this.solutionWord && this.solutionWord.showSolutions(),
          this.inputarea.showSolutions(this.crosswordLayout.result));
      }),
      (n.handleFieldInput = function (e) {
        (this.table.fillGrid(e), (this.answerGiven = !0));
      }),
      (n.handleTableInput = function (e) {
        (this.solutionWord &&
          e.solutionWordId &&
          this.solutionWord.setCell(e.solutionWordId - 1, e.answer),
          e.inputFieldUpdates && this.inputarea.fillFields(e.inputFieldUpdates),
          (this.answerGiven = !0),
          e.checkFilled &&
            this.isTableFilled() &&
            this.callbacks.onTableFilled());
      }),
      (n.handleTableFocus = function (t) {
        var e = this.crosswordLayout.result
          .filter((e) => "none" !== e.orientation)
          .filter(
            (e) => e.orientation === t.orientation && e.clueId === t.clueId,
          );
        (0 < e.length &&
          this.clueAnnouncer.setClue({
            clue: e[0].clue,
            orientation: this.params.l10n[e[0].orientation],
            clueId: e[0].clueId,
            answerLength: e[0].answer.length,
          }),
          this.inputarea.focusClue(t));
      }),
      (n.enable = function () {
        (this.table.enable(), this.inputarea.enable());
      }),
      (n.disable = function () {
        (this.table.disable(),
          this.table.unhighlight(),
          this.inputarea.disable(),
          this.inputarea.unhighlight(),
          this.clueAnnouncer.reset());
      }),
      (n.overrideCSS = function () {
        var e =
          0 < arguments.length && void 0 !== arguments[0] ? arguments[0] : {};
        (e.gridColor &&
          this.addStyle(
            `.h5p-crossword .h5p-crossword-grid th, .h5p-crossword .h5p-crossword-grid td,.h5p-crossword .h5p-crossword-grid{border-color:${e.gridColor}};`,
          ),
          e.cellBackgroundColor &&
            (this.addStyle(
              `.h5p-crossword .h5p-crossword-cell{background-color:${e.cellBackgroundColor}};`,
            ),
            this.addStyle(
              `.h5p-crossword .h5p-crossword-cell-clue-id-marker{background-color:${e.cellBackgroundColor}};`,
            )),
          e.clueIdColor &&
            this.addStyle(
              `.h5p-crossword .h5p-crossword-cell-clue-id-marker{color:${e.clueIdColor}};`,
            ),
          e.cellColor &&
            this.addStyle(
              `.h5p-crossword .h5p-crossword-cell-canvas{color:${e.cellColor}};`,
            ),
          e.cellBackgroundColorHighlight &&
            (this.addStyle(
              `.h5p-crossword .h5p-crossword-cell:not(.h5p-crossword-solution-correct):not(.h5p-crossword-solution-wrong):not(.h5p-crossword-solution-neutral).h5p-crossword-highlight-normal{background-color:${e.cellBackgroundColorHighlight}};`,
            ),
            this.addStyle(
              `.h5p-crossword .h5p-crossword-cell.h5p-crossword-highlight-normal .h5p-crossword-cell-clue-id-marker, .h5p-crossword .h5p-crossword-cell.h5p-crossword-highlight-normal .h5p-crossword-cell-solution-word-marker{background-color:${e.cellBackgroundColorHighlight}}`,
            ),
            this.addStyle(
              `.h5p-crossword .h5p-crossword-input-fields-group-wrapper-clue.h5p-crossword-input-fields-group-clue-highlight-focus .h5p-crossword-input-fields-group-clue-id{background-color:${e.cellBackgroundColorHighlight}}`,
            )),
          e.clueIdColorHighlight &&
            this.addStyle(
              `.h5p-crossword .h5p-crossword-cell.h5p-crossword-highlight-normal .h5p-crossword-cell-clue-id-marker, .h5p-crossword .h5p-crossword-cell.h5p-crossword-highlight-normal .h5p-crossword-cell-solution-word-marker{color:${e.clueIdColorHighlight}}`,
            ),
          e.cellColorHighlight &&
            (this.addStyle(
              `.h5p-crossword .h5p-crossword-cell.h5p-crossword-highlight-normal .h5p-crossword-cell-canvas{color:${e.cellColorHighlight}};`,
            ),
            this.addStyle(
              `.h5p-crossword .h5p-crossword-input-fields-group-wrapper-clue.h5p-crossword-input-fields-group-clue-highlight-focus .h5p-crossword-input-fields-group-clue-id{color:${e.cellColorHighlight}}`,
            )));
      }),
      (n.addStyle = function (e) {
        const t = document.createElement("style");
        (t.appendChild(document.createTextNode(e)),
          document.querySelector("head").appendChild(t));
      }),
      x);
    function x() {
      let i =
          0 < arguments.length && void 0 !== arguments[0] ? arguments[0] : {},
        e = 1 < arguments.length ? arguments[1] : void 0;
      if (
        ((this.params = i),
        (this.contentId = i.contentId),
        (this.content = document.createElement("div")),
        this.content.classList.add("h5p-crossword-content"),
        (this.callbacks = e || {}),
        (this.callbacks.onInitialized = e.onInitialized || (() => {})),
        (this.callbacks.onRead = e.onRead || (() => {})),
        (this.callbacks.onTableFilled = e.onTableFilled || (() => {})),
        (this.answerGiven = !1),
        this.params.previousState && this.params.previousState.crosswordLayout)
      )
        this.crosswordLayout = this.params.previousState.crosswordLayout;
      else {
        const o = [];
        let e, t;
        i.words.length < 2
          ? o.push(i.l10n.couldNotGenerateCrosswordTooFewWords)
          : ((e = new v({ words: i.words, config: { poolSize: i.poolSize } })),
            (t = e.getSquareGrid(x.MAXIMUM_TRIES)),
            t || o.push(i.l10n.couldNotGenerateCrossword));
        let n = e?.getBadWords();
        if (
          (n?.length &&
            ((n = n.map((e) => "" + e.answer).join(", ")),
            o.push(i.l10n.problematicWords.replace(/@words/g, n))),
          o.length,
          !t)
        ) {
          const x = document.createElement("div");
          return (
            x.classList.add("h5p-crossword-message"),
            (x.innerText = o.join(" ")),
            this.content.appendChild(x),
            (this.couldNotGenerateCrossword = !0),
            void this.callbacks.onInitialized(!1)
          );
        }
        this.crosswordLayout = e.export(t);
      }
      const t = document.createElement("div");
      (t.classList.add("h5p-crossword-table-wrapper"),
        (this.clueAnnouncer = new o()),
        t.appendChild(this.clueAnnouncer.getDOM()),
        (this.table = new c(
          {
            scoreWords: this.params.scoreWords,
            applyPenalties: this.params.applyPenalties,
            theme: this.params.theme,
            contentId: this.contentId,
            dimensions: {
              rows: this.crosswordLayout.rows,
              columns: this.crosswordLayout.cols,
            },
            instantFeedback: this.params.instantFeedback,
            solutionWord: this.params.solutionWord,
            words: this.crosswordLayout.result,
            a11y: this.params.a11y,
            l10n: {
              across: this.params.l10n.across,
              down: this.params.l10n.down,
            },
          },
          {
            onInput: (e) => {
              this.handleTableInput(e);
            },
            onFocus: (e) => {
              this.handleTableFocus(e);
            },
            onRead: (e) => {
              this.callbacks.onRead(e);
            },
          },
        )),
        t.appendChild(this.table.getDOM()),
        this.content.appendChild(t));
      var n = this.table.addSolutionWord(this.params.solutionWord);
      ("" !== this.params.solutionWord &&
        n &&
        ((this.solutionWord = new m({
          solutionWord: this.params.solutionWord,
          tableWidth: this.crosswordLayout.cols,
        })),
        t.appendChild(this.solutionWord.getDOM())),
        (this.inputarea = new a(
          {
            words: this.crosswordLayout.result.filter(
              (e) => "none" !== e.orientation,
            ),
            contentId: this.contentId,
            overlayContainer: this.content,
            applyPenalties: this.params.applyPenalties,
            l10n: {
              across: this.params.l10n.across,
              down: this.params.l10n.down,
              extraClue: this.params.l10n.extraClue,
              closeWindow: this.params.l10n.closeWindow,
            },
            a11y: this.params.a11y,
          },
          {
            onFieldInput: (e) => {
              this.handleFieldInput(e);
            },
            onRead: (e) => {
              this.callbacks.onRead(e);
            },
          },
        )),
        this.content.appendChild(this.inputarea.getDOM()),
        this.params.previousState.cells &&
          (this.table.setAnswers(this.params.previousState.cells),
          (this.answerGiven = !0)),
        this.params.previousState.focus &&
          this.params.previousState.focus.position &&
          this.params.previousState.focus.position.row &&
          (this.table.setcurrentOrientation(
            this.params.previousState.focus.orientation,
            this.params.previousState.focus.position,
          ),
          this.table.focusCell(this.params.previousState.focus.position)),
        this.overrideCSS(this.params.theme),
        this.callbacks.onInitialized(!0));
    }
    function P(e, t) {
      return (P = Object.setPrototypeOf
        ? Object.setPrototypeOf.bind()
        : function (e, t) {
            return ((e.__proto__ = t), e);
          })(e, t);
    }
    w.MAXIMUM_TRIES = 20;
    let C = (function (r) {
      var e;
      function t(e, t) {
        var n,
          i =
            2 < arguments.length && void 0 !== arguments[2] ? arguments[2] : {};
        (((n = r.call(this, "crossword") || this).params = e),
          (n.contentId = t),
          (n.extras = i),
          (n.params = h.extend(
            {
              solutionWord: "",
              theme: { backgroundColor: "#173354" },
              behaviour: {
                enableSolutionsButton: !0,
                enableRetry: !0,
                enableInstantFeedback: !1,
                scoreWords: !0,
                applyPenalties: !1,
              },
              l10n: {
                across: "across",
                down: "down",
                checkAnswer: "Check answer",
                couldNotGenerateCrossword:
                  "Could not generate a crossword with the given words. Please try again with fewer words or words that have more characters in common.",
                couldNotGenerateCrosswordTooFewWords:
                  "Could not generate a crossword. You need at least two words.",
                problematicWords:
                  "Some words could not be placed. If you are using fixed words, please make sure that their position doesn't prevent other words from being placed. Words with the same alignment may not be placed touching each other. Problematic word(s): @words",
                showSolution: "Show solution",
                tryAgain: "Retry",
                extraClue: "Extra clue",
                closeWindow: "Close window",
                submitAnswer: "Submit",
              },
              a11y: {
                crosswordGrid:
                  "Crossword grid. Use arrow keys to navigate and the keyboard to enter characters. Alternatively, use Tab to navigate to type the answers in Fill in the Blanks style fields instead of the grid.",
                column: "column",
                row: "row",
                across: "across",
                down: "down",
                empty: "Empty",
                resultFor: "Result for: @clue",
                correct: "Correct",
                wrong: "Wrong",
                point: "Point",
                solutionFor: "The solution for @clue is: @solution",
                extraClueFor: "Open extra clue for @clue",
                letterSevenOfNine: "Letter @position of @length",
                lettersWord: "@length letter word",
                check:
                  "Check the characters. The responses will be marked as correct, incorrect, or unanswered.",
                showSolution:
                  "Show the solution. The crossword will be filled with its correct solution.",
                retry:
                  "Retry the task. Reset all responses and start the task over again.",
                yourResult: "You got @score out of @total points",
              },
            },
            n.params,
          )),
          (n.params.theme = n.getDifference(n.params.theme, {
            gridColor: "#000000",
            cellBackgroundColor: "#ffffff",
            cellColor: "#000000",
            clueIdColor: "#606060",
            cellBackgroundColorHighlight: "#3e8de8",
            cellColorHighlight: "#ffffff",
            clueIdColorHighlight: "#e0e0e0",
          })),
          (n.initialButtons = {
            check: !n.params.behaviour.enableInstantFeedback,
            showSolution: n.params.behaviour.enableSolutionsButton,
            retry: n.params.behaviour.enableRetry,
          }));
        var o,
          i = (i.metadata && i.metadata.defaultLanguage) || "en";
        for (o in ((n.languageTag = h.formatLanguageCode(i)), n.params.l10n))
          n.params.l10n[o] = h.stripHTML(h.htmlDecode(n.params.l10n[o]));
        return (
          (n.params.a11y.yourResult = n.params.a11y.yourResult.replace(
            /\.$/,
            "",
          )),
          (n.previousState = n.extras.previousState || {}),
          (n.previousState.crosswordLayout && n.previousState.cells) ||
            (n.previousState = {}),
          (n.params.words = (n.params.words || [])
            .filter((e) => void 0 !== e.answer && void 0 !== e.clue)
            .map(
              (e) => (
                (e.answer = h.stripHTML(
                  h.htmlDecode(h.toUpperCase(e.answer, h.UPPERCASE_EXCEPTIONS)),
                )),
                (e.clue = h.stripHTML(h.htmlDecode(e.clue))),
                e
              ),
            )),
          n
        );
      }
      ((n = r),
        ((e = t).prototype = Object.create(n.prototype)),
        P((e.prototype.constructor = e), n));
      var n = t.prototype;
      return (
        (n.registerDomElements = function () {
          (this.params.taskDescription &&
            "" !== this.params.taskDescription &&
            ((this.introduction = document.createElement("div")),
            (this.introduction.innerHTML = this.params.taskDescription),
            this.setIntroduction(this.introduction)),
            (this.content = new w(
              {
                scoreWords: this.params.behaviour.scoreWords,
                applyPenalties: this.params.behaviour.applyPenalties,
                theme: this.params.theme,
                contentId: this.contentId,
                instantFeedback: this.params.behaviour.enableInstantFeedback,
                l10n: {
                  couldNotGenerateCrossword:
                    this.params.l10n.couldNotGenerateCrossword,
                  couldNotGenerateCrosswordTooFewWords:
                    this.params.l10n.couldNotGenerateCrosswordTooFewWords,
                  problematicWords: this.params.l10n.problematicWords,
                  across: this.params.l10n.across,
                  down: this.params.l10n.down,
                  extraClue: this.params.l10n.extraClue,
                  closeWindow: this.params.l10n.closeWindow,
                },
                a11y: this.params.a11y,
                poolSize: this.params.behaviour.poolSize,
                solutionWord: h.toUpperCase(
                  this.params.solutionWord.replace(/'\s'/g, ""),
                  h.UPPERCASE_EXCEPTIONS,
                ),
                words: this.params.words,
                previousState: this.previousState,
              },
              {
                onTableFilled: () => {
                  this.handleContentFilled();
                },
                onInitialized: (e) => {
                  this.handleContentInitialized(e);
                },
                onRead: (e) => {
                  this.handleRead(e);
                },
              },
            )),
            this.setContent(this.content.getDOM()),
            this.params.behaviour.enableInstantFeedback &&
              this.content.isTableFilled() &&
              this.checkAnswer(),
            h.waitForDOM(".h5p-crossword-input-container", () => {
              setTimeout(() => {
                this.trigger("resize");
              }, 100);
            }));
        }),
        (n.handleContentInitialized = function (e) {
          (e && this.addButtons(),
            this.on("resize", () => {
              this.content.resize();
            }));
        }),
        (n.addButtons = function () {
          (this.addButton(
            "check-answer",
            this.params.l10n.checkAnswer,
            () => {
              (this.checkAnswer(), this.trigger(this.getXAPIAnswerEvent()));
            },
            this.initialButtons.check,
            { "aria-label": this.params.a11y.check },
            {
              contentData: this.extras,
              textIfSubmitting: this.params.l10n.submitAnswer,
            },
          ),
            this.addButton(
              "show-solution",
              this.params.l10n.showSolution,
              () => {
                this.showSolutions();
              },
              this.initialButtons.showSolution,
              { "aria-label": this.params.a11y.showSolution },
              {},
            ),
            this.addButton(
              "try-again",
              this.params.l10n.tryAgain,
              () => {
                this.resetTask();
              },
              this.initialButtons.retry,
              { "aria-label": this.params.a11y.retry },
              {},
            ));
        }),
        (n.checkAnswer = function () {
          var e, t, n, i;
          this.content &&
            (this.content.checkAnswer(),
            this.hideButton("check-answer"),
            (e = this.getScore()),
            (t = this.getMaxScore()),
            (n = H5P.Question.determineOverallFeedback(
              this.params.overallFeedback,
              e / t,
            )),
            (i = this.params.a11y.yourResult
              .replace("@score", ":num")
              .replace("@total", ":total")),
            this.setFeedback(n, e, t, i),
            this.params.behaviour.enableSolutionsButton &&
              this.showButton("show-solution"),
            this.params.behaviour.enableRetry && this.showButton("try-again"));
        }),
        (n.handleRead = function (e) {
          this.read(e);
        }),
        (n.handleContentFilled = function () {
          0 < this.getMaxScore() && this.getScore() === this.getMaxScore()
            ? (this.checkAnswer(), this.trigger(this.getXAPIAnswerEvent()))
            : this.showButton("check-answer");
        }),
        (n.getAnswerGiven = function () {
          return !!this.content && this.content.getAnswerGiven();
        }),
        (n.getScore = function () {
          return this.content ? this.content.getScore() : 0;
        }),
        (n.getMaxScore = function () {
          return this.content ? this.content.getMaxScore() : 0;
        }),
        (n.showSolutions = function () {
          this.content &&
            (this.hideButton("check-answer"),
            this.hideButton("show-solution"),
            this.content.showSolutions(),
            this.trigger("resize"));
        }),
        (n.resetTask = function () {
          this.content &&
            ((this.contentWasReset = !0),
            this.initialButtons.check
              ? this.showButton("check-answer")
              : this.hideButton("check-answer"),
            this.initialButtons.showSolution
              ? this.showButton("show-solution")
              : this.hideButton("show-solution"),
            this.initialButtons.retry
              ? this.showButton("try-again")
              : this.hideButton("try-again"),
            this.trigger("resize"),
            this.removeFeedback(),
            this.content.reset(),
            this.content.enable());
        }),
        (n.getXAPIData = function () {
          return { statement: this.getXAPIAnswerEvent().data.statement };
        }),
        (n.getXAPIAnswerEvent = function () {
          const e = this.createXAPIEvent("answered");
          return (
            e.setScoredResult(
              this.getScore(),
              this.getMaxScore(),
              this,
              !0,
              this.isPassed(),
            ),
            (e.data.statement.result.response = this.content.getXAPIResponse()),
            e
          );
        }),
        (n.createXAPIEvent = function (e) {
          const t = this.createXAPIEventTemplate(e);
          return (
            h.extend(
              t.getVerifiedStatementValue(["object", "definition"]),
              this.getxAPIDefinition(),
            ),
            t
          );
        }),
        (n.getxAPIDefinition = function () {
          const e = { name: {} };
          return (
            (e.name[this.languageTag] = this.getTitle()),
            (e.name["en-US"] = e.name[this.languageTag]),
            (e.description = {}),
            (e.description[this.languageTag] = "" + this.getDescription()),
            (e.description["en-US"] = e.description[this.languageTag]),
            (e.type = "http://adlnet.gov/expapi/activities/cmi.interaction"),
            (e.interactionType = "fill-in"),
            (e.correctResponsesPattern =
              this.content.getXAPICorrectResponsesPattern()),
            e
          );
        }),
        (n.isPassed = function () {
          return (
            this.getScore() >= this.getMaxScore() ||
            !this.getMaxScore() ||
            0 === this.getMaxScore()
          );
        }),
        (n.getTitle = function () {
          let e;
          return (
            this.extras.metadata && (e = this.extras.metadata.title),
            (e = e || t.DEFAULT_DESCRIPTION),
            H5P.createTitle(e)
          );
        }),
        (n.getDescription = function () {
          return (
            "" +
            (this.params.taskDescription.replaceAll(/_{10,}/gi, "_________") ||
              t.DEFAULT_DESCRIPTION) +
            this.content.getXAPIDescription()
          );
        }),
        (n.getCurrentState = function () {
          return this.getAnswerGiven()
            ? this.content.getCurrentState()
            : this.contentWasReset
              ? {}
              : void 0;
        }),
        (n.getDifference = function (e, t) {
          for (var n in t) e[n] === t[n] && delete e[n];
          return e;
        }),
        t
      );
    })(H5P.Question);
    ((C.DEFAULT_DESCRIPTION = "Crossword"), (H5P.Crossword = C));
  })());
const realH5PGetPath = H5P.getPath;
H5P.getPath = function (e, t) {
  return e.startsWith("data:") ? e : realH5PGetPath(e, t);
};
var furtherH5PInlineResources = {
  "H5P.MaterialDesignIcons-1.0/MaterialIcons-Regular.svg":
    "data:image/svg+xml;base64, ",
};
!(function () {
  H5P.ContentType = function (t) {
    function e() {}
    return (
      ((e.prototype = new H5P.EventDispatcher()).isRoot = function () {
        return t;
      }),
      (e.prototype.getLibraryFilePath = function (t) {
        return (
          furtherH5PInlineResources[
            this.libraryInfo.versionedNameNoSpaces + "/" + t
          ] || t
        );
      }),
      e
    );
  };
  var i = HTMLScriptElement.prototype.setAttribute;
  ((HTMLScriptElement.prototype.setAttribute = function (t, e) {
    if ("src" === t) {
      if (!(e instanceof String)) {
        if (!e.toString) return void i.call(this, t, e);
        e = e.toString();
      }
      var r = window.location.href.substr(
          0,
          window.location.href.lastIndexOf("/"),
        ),
        r = (e = e.startsWith(r) ? e.substr(r.length + 1) : e).match(
          /^.\/libraries\/([^?]+)\??.*$/,
        );
      r &&
        ((r = r[1]),
        furtherH5PInlineResources[r] && (e = furtherH5PInlineResources[r]));
    }
    i.call(this, t, e);
  }),
    Object.defineProperty(HTMLScriptElement.prototype, "src", {
      set(t) {
        this.setAttribute("src", t);
      },
    }));
  var n = HTMLLinkElement.prototype.setAttribute;
  ((HTMLLinkElement.prototype.setAttribute = function (t, e) {
    if ("href" === t) {
      if (!(e instanceof String)) {
        if (!e.toString) return void i.call(this, t, e);
        e = e.toString();
      }
      var r = window.location.href.substr(
          0,
          window.location.href.lastIndexOf("/"),
        ),
        r = (e = e.startsWith(r) ? e.substr(r.length + 1) : e).match(
          /^.\/libraries\/([^?]+)\??.*$/,
        );
      r &&
        ((r = r[1]),
        furtherH5PInlineResources[r] && (e = furtherH5PInlineResources[r]));
    }
    n.call(this, t, e);
  }),
    Object.defineProperty(HTMLLinkElement.prototype, "src", {
      set(t) {
        this.setAttribute("src", t);
      },
    }));
})();
H5P.getPath = function (t, n) {
  return t;
};

setTimeout(() => {
  const inputs = Array.from(
    document.querySelectorAll(".h5p-crossword-cell-content"),
  );
  inputs.forEach((input, index) => {
    input.setAttribute("id", `input${index}`);
    const label = document.createElement("label");
    label.setAttribute("for", `input${index}`);
    label.textContent = `Label for input ${index + 1}`;
    label.style.textIndent = "-9999px";
    input.parentNode.insertBefore(label, input.nextSibling);
  });
}, 400);
