H5PIntegration = {
  ajax: { setFinished: "", contentUserData: "" },
  ajaxPath: "/h5p/ajax?action=",
  contents: {
    "cid-3106236996": {
      displayOptions: {
        copy: false,
        copyright: false,
        embed: false,
        export: false,
        frame: false,
        icon: false,
      },
      fullScreen: "1",
      jsonContent:
        '{"presentation":{"slides":[{"elements":[{"x":4.166666666666666,"y":32.785479452054794,"width":26.38888888888889,"height":52.054794520547944,"action":{"library":"H5P.Image 1.1","params":{"decorative":true,"contentName":"Εικόνα","file":{"path":"resources/file-tVDD1YiX.jpg","mime":"image/jpeg","copyright":{"license":"U"},"width":2000,"height":2000},"expandImage":"Expand Image","minimizeImage":"Minimize Image"},"subContentId":"1623a081-e817-427c-b0ec-0bd0d802946d","metadata":{"contentType":"Image","license":"U","title":"Image χωρίς τίτλο","authors":[],"changes":[]}},"alwaysDisplayComments":false,"backgroundOpacity":0,"displayAsButton":false,"buttonSize":"big","goToSlideType":"specified","invisible":false,"solution":""},{"x":33.333333333333336,"y":49.31506849315068,"width":56.94444444444444,"height":16.438356164383563,"action":{"library":"H5P.AdvancedText 1.1","params":{"text":"<p><span><span><span><span style=\\"font-size:1.25em\\">Οι ψηφιογραφικές εικόνες αποτελούνται από τετραγωνικά pixel που έχουν συγκεκριμένα χρώματα.</span> </span></span></span></p>\\n"},"subContentId":"d7130082-1aa7-439b-a845-ba7cb73e2c0b","metadata":{"contentType":"Text","license":"U","title":"Text χωρίς τίτλο","authors":[],"changes":[]}},"alwaysDisplayComments":false,"backgroundOpacity":0,"displayAsButton":false,"buttonSize":"big","goToSlideType":"specified","invisible":false,"solution":""},{"x":4.166666666666667,"y":10.95890410958904,"width":40,"height":10.95890410958904,"action":{"library":"H5P.AdvancedText 1.1","params":{"text":"<p><span style=\\"color:#1abc9c\\"><strong><span style=\\"font-size:1.25em\\"><span><span>Ψηφιογραφικές εικόνες</span></span></span></strong></span></p>\\n"},"subContentId":"b265a832-856d-436c-befe-d09009efc078","metadata":{"contentType":"Text","license":"U","title":"Text χωρίς τίτλο","authors":[],"changes":[]}},"alwaysDisplayComments":false,"backgroundOpacity":0,"displayAsButton":false,"buttonSize":"big","goToSlideType":"specified","invisible":false,"solution":""}],"slideBackgroundSelector":{}},{"elements":[{"x":11.11111111111111,"y":21.91780821917808,"width":58.33333333333333,"height":40,"action":{"library":"H5P.SingleChoiceSet 1.11","params":{"choices":[{"subContentId":"670ac793-5c6a-4589-9f35-cdc015a3ebdc","question":"<p>Η ... του μεγέθους τους μπορεί να οδηγήσει σε απώλεια ευκρίνειας.</p>\\n","answers":["<p>αύξηση </p>\\n","<p>μείωση</p>\\n"]}],"overallFeedback":[{"from":0,"to":100}],"behaviour":{"autoContinue":true,"timeoutCorrect":2000,"timeoutWrong":3000,"soundEffectsEnabled":true,"enableRetry":true,"enableSolutionsButton":true,"passPercentage":100},"l10n":{"nextButtonLabel":"Επόμενη","showSolutionButtonLabel":"Λύση","retryButtonLabel":"Επανάληψη","solutionViewTitle":"Λύση","correctText":"Σωστό!","incorrectText":"Λάθος!","shouldSelect":"Θα έπρεπε να είχε επιλεγεί","shouldNotSelect":"Δεν θα έπρεπε να είχε επιλεγεί","muteButtonLabel":"Σίγαση ήχου ανατροφοδότησης","closeButtonLabel":"Κλείσιμο","slideOfTotal":"Διαφάνεια :num από :total","scoreBarLabel":"Έχεις :num από :total βαθμούς","solutionListQuestionNumber":"Ερώτηση :num","a11yShowSolution":"Προβολή της λύσης. Η άσκηση θα επισημανθεί με την σωστή απάντση.","a11yRetry":"Επανάληψη της εργασίας. Επαναφορά όλων των απαντήσεων και έναρξη από την αρχή."}},"subContentId":"7f6cb0e3-e526-41e3-9f56-f7353edbefc8","metadata":{"contentType":"Single Choice Set","license":"U","title":"Ερώτηση επιλογής (μέγεθος - ευκρίνεια εικόνας)","authors":[],"changes":[],"extraTitle":"Ερώτηση επιλογής (μέγεθος - ευκρίνεια εικόνας)"}},"alwaysDisplayComments":false,"backgroundOpacity":0,"displayAsButton":false,"buttonSize":"big","goToSlideType":"specified","invisible":false,"solution":""},{"x":72.22222222222221,"y":24.65753424657534,"width":23.61111111111111,"height":32.054794520547944,"action":{"library":"H5P.Image 1.1","params":{"decorative":true,"contentName":"Εικόνα","file":{"path":"resources/file-FRTJjjVE.jpg","mime":"image/jpeg","copyright":{"license":"U"},"width":663,"height":454,"originalImage":{"path":"resources/file-fLlIoBgS.jpg","mime":"image/jpeg","height":2000,"width":2000}},"expandImage":"Expand Image","minimizeImage":"Minimize Image"},"subContentId":"b8cd8e0f-0190-42a7-9757-a17ca1293f4c","metadata":{"contentType":"Image","license":"U","title":"Image χωρίς τίτλο","authors":[],"changes":[]}},"alwaysDisplayComments":false,"backgroundOpacity":0,"displayAsButton":false,"buttonSize":"big","goToSlideType":"specified","invisible":false,"solution":""}],"slideBackgroundSelector":{}},{"elements":[{"x":37.5,"y":27.397260273972602,"width":59.72222222222222,"height":16.438356164383563,"action":{"library":"H5P.AdvancedText 1.1","params":{"text":"<p><span style=\\"font-size:1em\\"><span><span>Οι διανυσματικές εικόνες αποτελούνται από γεωμετρικά σχήματα και αντικείμενα που περιγράφονται με μαθηματικές εξισώσεις. </span></span></span></p>\\n"},"subContentId":"6cbe3053-2fdb-42bb-b3af-420175f7357b","metadata":{"contentType":"Text","license":"U","title":"Text χωρίς τίτλο","authors":[],"changes":[]}},"alwaysDisplayComments":false,"backgroundOpacity":0,"displayAsButton":false,"buttonSize":"big","goToSlideType":"specified","invisible":false,"solution":""},{"x":4.166666666666667,"y":10.95890410958904,"width":40,"height":10.95890410958904,"action":{"library":"H5P.AdvancedText 1.1","params":{"text":"<p><span style=\\"color:#1abc9c\\"><strong><span style=\\"font-size:1.25em\\"><span><span>Διανυσματικές εικόνες  </span></span></span></strong></span></p>\\n"},"subContentId":"b6d4f926-b24b-4d11-8dba-a0e2a418bcc7","metadata":{"contentType":"Text","license":"U","title":"Text χωρίς τίτλο","authors":[],"changes":[]}},"alwaysDisplayComments":false,"backgroundOpacity":0,"displayAsButton":false,"buttonSize":"big","goToSlideType":"specified","invisible":false,"solution":""},{"x":4.166666666666666,"y":27.265972602739723,"width":30.555555555555554,"height":60.273972602739725,"action":{"library":"H5P.Image 1.1","params":{"decorative":true,"contentName":"Εικόνα","file":{"path":"resources/file-06U3Ha5w.jpg","mime":"image/jpeg","copyright":{"license":"U"},"width":2000,"height":2000},"expandImage":"Expand Image","minimizeImage":"Minimize Image"},"subContentId":"170fff53-d619-472f-ad7e-4b44807198b8","metadata":{"contentType":"Image","license":"U","title":"Image χωρίς τίτλο","authors":[],"changes":[]}},"alwaysDisplayComments":false,"backgroundOpacity":0,"displayAsButton":false,"buttonSize":"big","goToSlideType":"specified","invisible":false,"solution":""},{"x":37.5,"y":51.91205479452056,"width":61.11111111111111,"height":41.09589041095891,"action":{"library":"H5P.TrueFalse 1.8","params":{"media":{"disableImageZooming":false},"correct":"true","behaviour":{"enableRetry":true,"enableSolutionsButton":true,"enableCheckButton":true,"confirmCheckDialog":false,"confirmRetryDialog":false,"autoCheck":false},"l10n":{"trueText":"Σωστό","falseText":"Λάθος","score":"Συγκέντρωσες @score από @total βαθμούς","checkAnswer":"Έλεγχος","submitAnswer":"Υποβολή","showSolutionButton":"Λύση","tryAgain":"Επανάληψη","wrongAnswerMessage":"Λάθος απάντηση","correctAnswerMessage":"Σωστή απάντηση","scoreBarLabel":"Συγκεντρώσατε :num από :total βαθμούς","a11yCheck":"Έλεγχος απαντήσεων. Οι απαντήσεις θα μαρκαριστούν ως σωστές, λάθος και μη απαντημένες.","a11yShowSolution":"Προβολή της λύσης. Η άσκηση θα επισημανθεί με την σωστή απάντση.","a11yRetry":"Επανάληψη της εργασίας. Επαναφορά όλων των απαντήσεων και έναρξη από την αρχή."},"confirmCheck":{"header":"Ολοκλήρωση άσκησης","body":"Είσαι σίγουρος ότι θέλεις να ολοκληρώσεις την άσκηση;","cancelLabel":"Όχι","confirmLabel":"Ναι"},"confirmRetry":{"header":"Επανάληψη","body":"Είσαι σίγουρος/η ότι θέλεις να προσπαθήσεις ξανά;","cancelLabel":"Όχι","confirmLabel":"Ναι"},"question":"<p style=\\"font-size:0.9em\\">Αυτό σημαίνει ότι μπορούν να αυξομειώνονται σε μέγεθος χωρίς απώλεια ποιότητας.</p>\\n"},"subContentId":"5717811c-0fd1-406e-b47f-96534c9f9d35","metadata":{"contentType":"True/False Question","license":"U","title":"Ερώτηση Σ-Λ (μέγεθος - ποιότητα διανυσματικής εικόνας)","authors":[],"changes":[],"extraTitle":"Ερώτηση Σ-Λ (μέγεθος - ποιότητα διανυσματικής εικόνας)"}},"alwaysDisplayComments":false,"backgroundOpacity":0,"displayAsButton":false,"buttonSize":"big","goToSlideType":"specified","invisible":false,"solution":""}],"slideBackgroundSelector":{}},{"elements":[{"x":2.7777777777777777,"y":2.7226027397260273,"width":69.44444444444444,"height":6.575342465753425,"action":{"library":"H5P.AdvancedText 1.1","params":{"text":"<p><span style=\\"font-size:1.25em\\">Σχεδιάζοντας ένα λουλούδι χρησιμοποιώντας γεωμετρικά σχήματα.</span></p>\\n"},"subContentId":"4dea6eaa-a882-4f23-8db9-ea457b05555f","metadata":{"contentType":"Text","license":"U","title":"Text χωρίς τίτλο","authors":[],"changes":[]}},"alwaysDisplayComments":false,"backgroundOpacity":0,"displayAsButton":false,"buttonSize":"big","goToSlideType":"specified","invisible":false,"solution":""},{"x":2.7777777777777777,"y":71.23287671232877,"width":84.72222222222221,"height":21.91780821917808,"action":{"library":"H5P.AdvancedText 1.1","params":{"text":"<p><strong>Πηγή</strong>: «Δημιουργία διανυσματικών εικόνων με το Inkscape» Μαυροχαλυβίδης Γ., Γερονάτσιος Σ.</p>\\n\\n<p><em>http://hmathia14.ekped.gr/praktika14/ekp_senar/VolE/VolE_576_587.pdf</em></p>\\n"},"subContentId":"931f6c87-617e-4340-9171-77293a4c544f","metadata":{"contentType":"Text","license":"U","title":"Text χωρίς τίτλο","authors":[],"changes":[]}},"alwaysDisplayComments":false,"backgroundOpacity":0,"displayAsButton":false,"buttonSize":"big","goToSlideType":"specified","invisible":false,"solution":""},{"x":12.5,"y":13.698630136986301,"width":45.69444444444444,"height":52.054794520547944,"action":{"library":"H5P.Image 1.1","params":{"decorative":true,"contentName":"Εικόνα","file":{"path":"resources/file-SceaGAf0.jpg","mime":"image/jpeg","copyright":{"license":"U"},"width":538,"height":310},"expandImage":"Expand Image","minimizeImage":"Minimize Image"},"subContentId":"74f9d368-7ab9-4621-b988-5aae9fef0835","metadata":{"contentType":"Image","license":"U","title":"Image χωρίς τίτλο","authors":[],"changes":[]}},"alwaysDisplayComments":false,"backgroundOpacity":0,"displayAsButton":false,"buttonSize":"big","goToSlideType":"specified","invisible":false,"solution":""}],"slideBackgroundSelector":{}},{"elements":[{"x":5.555555555555555,"y":19.178082191780824,"width":84.16666666666667,"height":65.75342465753425,"action":{"library":"H5P.DragText 1.10","params":{"media":{"disableImageZooming":false},"taskDescription":"<p style=\\"font-size:0.9em\\">Σύρετε και τοποθετήστε τις λέξεις στα κουτάκια για να ολοκληρώσετε το νόημα των προτάσεων.</p>\\n","overallFeedback":[{"from":0,"to":100}],"checkAnswer":"Έλεγχος","submitAnswer":"Υποβολή","tryAgain":"Επανάληψη","showSolution":"Λύση","dropZoneIndex":"Κουτάκι @index.","empty":"Το κουτάκι @index είναι κενό.","contains":"Το κουτάκι @index περιέχει το συρόμενο στοιχείο - λέξη @draggable.","ariaDraggableIndex":"@index από @count συρόμενα στοιχεία - λέξεις.","tipLabel":"Επεξηγηματικό κείμενο","correctText":"Σωστό!","incorrectText":"Λάθος!","resetDropTitle":"Επαναφορά","resetDropDescription":"Είσαι σίγουρος/η ότι θέλεις να αδειάσεις το κουτάκι;","grabbed":"To συρόμενo στοιχείο - λέξη έχει επιλεγεί.","cancelledDragging":"Ακύρωση συρσίματος.","correctAnswer":"Σωστή απάντηση:","feedbackHeader":"Ανατροφοδότηση","behaviour":{"enableRetry":true,"enableSolutionsButton":true,"enableCheckButton":true,"instantFeedback":false},"scoreBarLabel":"Έχεις :num από :total βαθμούς","a11yCheck":"Έλεγχος απαντήσεων. Οι απαντήσεις θα μαρκαριστούν ως σωστές, λάθος και μη απαντημένες.","a11yShowSolution":"Προβολή της λύσης. Η άσκηση θα επισημανθεί με την σωστή απάντση.","a11yRetry":"Επανάληψη της εργασίας. Επαναφορά όλων των απαντήσεων και έναρξη από την αρχή.","textField":"Οι διανυσματικές εικόνες αποθηκεύουν πληροφορίες όπως η *θέση*, το *χρώμα* και το σχήμα με μαθηματικούς τύπους, επιτρέποντας άπειρες προσαρμογές χωρίς απώλεια ποιότητας.\\nΟι ψηφιογραφικές εικόνες αποθηκεύουν πληροφορίες για κάθε *pixel*, με αποτέλεσμα να έχουν συγκεκριμένο *μέγεθος* και να μην είναι επεξεργάσιμες, όσον αφορά το μέγεθος, χωρίς *απώλεια*."},"subContentId":"2ff2e1a5-bd46-465a-9113-90945f13a2bb","metadata":{"contentType":"Drag the Words","license":"U","title":"Άσκηση &quot;Σύρε τη λέξη&quot;","authors":[],"changes":[],"extraTitle":"Άσκηση &quot;Σύρε τη λέξη&quot;"}},"alwaysDisplayComments":false,"backgroundOpacity":0,"displayAsButton":false,"buttonSize":"big","goToSlideType":"specified","invisible":false,"solution":""}],"slideBackgroundSelector":{}},{"slideBackgroundSelector":{},"elements":[{"x":9.803921568627452,"y":21.517685385618442,"width":68.05555555555556,"height":64.273972602739725,"action":{"library":"H5P.DragText 1.10","params":{"media":{"disableImageZooming":false},"taskDescription":"<p style=\\"font-size:0.9em\\">Σύρετε και τοποθετήστε τις λέξεις στα κουτάκια για να ολοκληρώσετε το περιεχόμενο των προτάσεων.</p>\\n","overallFeedback":[{"from":0,"to":100}],"checkAnswer":"Έλεγχος","submitAnswer":"Υποβολή","tryAgain":"Επανάληψη","showSolution":"Λύση","dropZoneIndex":"Κουτάκι @index.","empty":"Το κουτάκι @index είναι κενό.","contains":"Το κουτάκι @index περιέχει το συρόμενο στοιχείο - λέξη @draggable.","ariaDraggableIndex":"@index από @count συρόμενα στοιχεία - λέξεις.","tipLabel":"Επεξηγηματικό κείμενο","correctText":"Σωστό!","incorrectText":"Λάθος!","resetDropTitle":"Επαναφορά","resetDropDescription":"Είσαι σίγουρος/η ότι θέλεις να αδειάσεις το κουτάκι;","grabbed":"To συρόμενo στοιχείο - λέξη έχει επιλεγεί.","cancelledDragging":"Ακύρωση συρσίματος.","correctAnswer":"Σωστή απάντηση:","feedbackHeader":"Ανατροφοδότηση","behaviour":{"enableRetry":true,"enableSolutionsButton":true,"enableCheckButton":true,"instantFeedback":false},"scoreBarLabel":"Έχεις :num από :total βαθμούς","a11yCheck":"Έλεγχος απαντήσεων. Οι απαντήσεις θα μαρκαριστούν ως σωστές, λάθος και μη απαντημένες.","a11yShowSolution":"Προβολή της λύσης. Η άσκηση θα επισημανθεί με την σωστή απάντση.","a11yRetry":"Επανάληψη της εργασίας. Επαναφορά όλων των απαντήσεων και έναρξη από την αρχή.","textField":"Οι *διανυσματικές εικόνες* είναι κατάλληλες για γραφικά όπου απαιτείται ακρίβεια και ευελιξία, όπως λογότυπα, εικονίδια και σχεδιασμός.\\nΟι *ψηφιογραφικές εικόνες* είναι πιο κατάλληλες για φωτογραφίες και εικόνες που περιλαμβάνουν λεπτομέρειες χρωμάτων."},"subContentId":"92ceff97-507a-4b77-b864-f6f444208420","metadata":{"contentType":"Drag the Words","license":"U","title":"Άσκηση &quot;Σύρε τη λέξη&quot; (καταλληλότητα εικόνων)","authors":[],"changes":[],"extraTitle":"Άσκηση &quot;Σύρε τη λέξη&quot; (καταλληλότητα εικόνων)"}},"alwaysDisplayComments":false,"backgroundOpacity":0,"displayAsButton":false,"buttonSize":"big","goToSlideType":"specified","invisible":false,"solution":""}]},{"slideBackgroundSelector":{},"elements":[{"x":1.3888888888888888,"y":10.95890410958904,"width":97.22222222222221,"height":68.4931506849315,"action":{"library":"H5P.MultiMediaChoice 0.3","params":{"behaviour":{"aspectRatio":"16to9","enableRetry":"true","enableSolutionsButton":"true","confirmCheckDialog":false,"confirmRetryDialog":false,"singlePoint":false,"showSolutionsRequiresInput":true,"questionType":"auto","maxAlternativesPerRow":"4","passPercentage":100},"media":{"disableImageZooming":false},"options":[{"media":{"params":{"decorative":true,"contentName":"Εικόνα","file":{"path":"resources/file-XU8J11uW.jpg","mime":"image/jpeg","copyright":{"license":"U"},"width":1000,"height":1500},"expandImage":"Expand Image","minimizeImage":"Minimize Image"},"library":"H5P.Image 1.1","subContentId":"93e5736f-2219-4a4e-bac8-f5777e9208c8","metadata":{"contentType":"Image","license":"U","title":"Image χωρίς τίτλο","authors":[],"changes":[]}},"correct":true},{"media":{"params":{"decorative":true,"contentName":"Εικόνα","file":{"path":"resources/file-WFVCZrND.jpg","mime":"image/jpeg","copyright":{"license":"U"},"width":1500,"height":1000},"expandImage":"Expand Image","minimizeImage":"Minimize Image"},"library":"H5P.Image 1.1","subContentId":"32d0bb70-7b67-44b2-8454-d42054aa882d","metadata":{"contentType":"Image","license":"U","title":"Image χωρίς τίτλο","authors":[],"changes":[]}},"correct":true},{"media":{"params":{"decorative":true,"contentName":"Εικόνα","file":{"path":"resources/file-l69ZTt1x.jpg","mime":"image/jpeg","copyright":{"license":"U"},"width":1500,"height":1000},"expandImage":"Expand Image","minimizeImage":"Minimize Image"},"library":"H5P.Image 1.1","subContentId":"02640a91-f003-4608-92cf-4590dc5a4476","metadata":{"contentType":"Image","license":"U","title":"Image χωρίς τίτλο","authors":[],"changes":[]}},"correct":false}],"overallFeedback":[{"from":0,"to":100}],"l10n":{"checkAnswerButtonText":"Έλεγχος","submitAnswerButtonText":"Υποβολή","checkAnswer":"Ελέγξτε τις απαντήσεις. Οι απαντήσεις θα επισημαίνονται ως σωστές, λανθασμένες ή απαντημένες.","showSolutionButtonText":"Εμφάνιση λύσης","showSolution":"Εμφάνιση της λύσης. Οι σωστές επιλογές θα επισημαίνονται.","correctAnswer":"Σωστή απάντηση","wrongAnswer":"Λάθος απάντηση","shouldCheck":"Έπρεπε να έχει επιλεγεί","shouldNotCheck":"Δεν έπρεπε να έχει επιλεγεί","noAnswer":"Παρακαλούμε απαντήστε πριν προβάλετε τη λύση","retryText":"Επανάληψη","retry":"Επανάληψη της εργασίας. Επαναφέρετε όλες τις απαντήσεις και ξεκινήστε την εργασία από την αρχή.","result":"Πήρατε :num από :total βαθμούς","missingAltText":"Λείπει το εναλλακτικό κείμενο","confirmCheck":{"header":"Ολοκλήρωση;","body":"Θέλετε σίγουρα να ολοκληρώσετε την προσπάθεια;","cancelLabel":"Άκυρο","confirmLabel":"Εντάξει"},"confirmRetry":{"header":"Επανάληψη;","body":"Θέλετε σίγουρα να ξαναπροσπαθήσετε;","cancelLabel":"Άκυρο","confirmLabel":"Επανάληψη"}},"question":"<p>Επιλέξτε την ψηφιογραφική εικόνα (περισσότερες επιλογές από μία).</p>\\n"},"subContentId":"bbcfe870-002d-4eb9-abab-bdb82ae9ece9","metadata":{"contentType":"Image Choice","license":"U","title":"Άσκηση επιλογής εικόνας (ψηφιογραφικής)","authors":[],"changes":[],"extraTitle":"Άσκηση επιλογής εικόνας (ψηφιογραφικής)"}},"alwaysDisplayComments":false,"backgroundOpacity":0,"displayAsButton":false,"buttonSize":"big","goToSlideType":"specified","invisible":false,"solution":""}]},{"elements":[{"x":7.625272331154684,"y":19.365916847056596,"width":47.930283224400874,"height":30.124759539865817,"action":{"library":"H5P.AdvancedText 1.1","params":{"text":"<p><span style=\\"font-size:1.25em\\">Εμπνευστείτε από το άρθρο με τίτλο <em>Creating a female cartoon avatar in Inkscape (Δημιουργία avatar με το λογισμικό Inkscape)</em> και φτιάξτε το δικό σας <strong>avatar</strong>. </span></p>\\n"},"subContentId":"37f42541-9a0c-4198-af24-f67c7affe31d","metadata":{"contentType":"Text","license":"U","title":"Text χωρίς τίτλο","authors":[],"changes":[]}},"alwaysDisplayComments":false,"backgroundOpacity":0,"displayAsButton":false,"buttonSize":"big","goToSlideType":"specified","invisible":false,"solution":""},{"x":58.82352941176471,"y":8.607074154247377,"width":34.583333333333336,"height":46.57534246575342,"action":{"library":"H5P.Image 1.1","params":{"decorative":true,"contentName":"Εικόνα","file":{"path":"resources/file-WTvJy4Kh.jpg","mime":"image/jpeg","copyright":{"license":"U"},"width":1021,"height":694},"expandImage":"Expand Image","minimizeImage":"Minimize Image"},"subContentId":"2e728653-4374-462b-9427-fede64fd4a7a","metadata":{"contentType":"Image","license":"U","title":"Image χωρίς τίτλο","authors":[],"changes":[]}},"alwaysDisplayComments":false,"backgroundOpacity":0,"displayAsButton":false,"buttonSize":"big","goToSlideType":"specified","invisible":false,"solution":""},{"x":5.446623093681917,"y":62.40128761829348,"width":89.32461873638344,"height":31.392366385932597,"action":{"library":"H5P.AdvancedText 1.1","params":{"text":"<ul>\\n\\t<li><em><span style=\\"font-size:1.25em\\">ahninniah.blogspot.com/2013/07/creating-female-cartoon-avatar-in.html</span></em></li>\\n\\t<li><em><span style=\\"font-size:1.25em\\"><strong>Inkscape tutorial </strong>- Στοιχεία σχεδίασης: </span></em><em><span style=\\"font-size:1.25em\\">inkscape.org/el/doc/tutorials/elements/tutorial-elements.html</span></em></li>\\n</ul>\\n"},"subContentId":"128b9908-8728-4fc3-908e-aa15a5d79d8b","metadata":{"contentType":"Text","license":"U","title":"Untitled Κείμενο","authors":[],"changes":[]}},"alwaysDisplayComments":false,"backgroundOpacity":0,"displayAsButton":false,"buttonSize":"big","goToSlideType":"specified","invisible":false,"solution":""}],"slideBackgroundSelector":{}}],"keywordListEnabled":true,"globalBackgroundSelector":{},"keywordListAlwaysShow":false,"keywordListAutoHide":false,"keywordListOpacity":90},"override":{"activeSurface":false,"hideSummarySlide":false,"summarySlideSolutionButton":true,"summarySlideRetryButton":true,"enablePrintButton":false,"social":{"showFacebookShare":false,"facebookShare":{"url":"@currentpageurl","quote":"Πέτυχα @score στα @maxScore σε αυτή την άσκηση: @currentpageurl."},"showTwitterShare":false,"twitterShare":{"statement":"Πέτυχα @score στα @maxScore σε αυτή την άσκηση: @currentpageurl.","url":"@currentpageurl","hashtags":"h5p, course"},"showGoogleShare":false,"googleShareUrl":"@currentpageurl"}},"l10n":{"slide":"Διαφάνεια","score":"Βαθμολογία","yourScore":"Η βαθμολογία σου","maxScore":"Μέγιστη βαθμολογία","total":"Σύνολο","totalScore":"Συνολική βαθμολογία","showSolutions":"Λύση","retry":"Επανάληψη","exportAnswers":"Εξαγωγή κειμένου","hideKeywords":"Απόκρυψη λίστας λέξεων - κλειδιά","showKeywords":"Εμφάνιση λίστας λέξεων - κλειδιά ","fullscreen":"Πλήρης οθόνη","exitFullscreen":"Κλείσιμο προβολής πλήρους οθόνης","prevSlide":"Προηγούμενη διαφάνεια","nextSlide":"Επόμενη διαφάνεια","currentSlide":"Τρέχουσα διαφάνεια","lastSlide":"Τελευταία διαφάνεια","solutionModeTitle":"Έξοδος από λειτουργία λύσης","solutionModeText":"Λειτουργία λύσης","summaryMultipleTaskText":"Πολλαπλές ασκήσεις","scoreMessage":"Έχεις πετύχει:","shareFacebook":"Κοινοποίηση στο Facebook","shareTwitter":"Κοινοποίηση στο Twitter","shareGoogle":"Κοινοποίηση στο Google+","summary":"Σύνοψη","solutionsButtonTitle":"Εμφάνιση σχολίων","printTitle":"Εκτύπωση","printIngress":"Πώς θέλετε να εκτυπώσετε την παρουσίαση;","printAllSlides":"Εκτύπωση όλων των διαφανειών","printCurrentSlide":"Εκτύπωση τρέχουσας διαφάνειας","noTitle":"Χωρίς τίτλο","accessibilitySlideNavigationExplanation":"Χρησιμοποίησε το δεξί και το αριστερό βέλος για εναλλαγή διαφανειών προς την αντίστοιχη κατεύθυνση","accessibilityCanvasLabel":"Επιφάνειας προβολής διαφανειών. Χρησιμοποίησε το αριστερό και το δεξί βέλος για την πλοήγηση στις διαφάνειες.","accessibilityProgressBarLabel":"Επιλέξτε διαφάνεια για προβολή","containsNotCompleted":"H διαφάνεια @slideName έχει μη ολοκληρωμένο διαδραστικό στοιχείο","containsCompleted":"H διαφάνεια @slideName έχει ολοκληρωμένο διαδραστικό στοιχείο","slideCount":"Διαφάνεια @index από @total","containsOnlyCorrect":"Η διαφάνεια @slideName έχει μόνο σωστές απαντήσεις","containsIncorrectAnswers":"Η διαφάνεια @slideName έχει λάθος απαντήσεις","shareResult":"Κοινοποίηση αποτελέσματος","accessibilityTotalScore":"Η βαθμολογία σου είναι @score από @maxScore","accessibilityEnteredFullscreen":"Είσοδος σε πλήρη οθόνη","accessibilityExitedFullscreen":"Έξοδος από πλήρη οθόνη","confirmDialogHeader":"Υποβολή των απαντήσεών σας","confirmDialogText":"Αυτή η ενέργεια θα υποβάλει τις απαντήσεις σας, θέλετε να συνεχίσετε;","confirmDialogConfirmText":"Υποβολή απαντήσεων και προβολή αποτελεσμάτων","slideshowNavigationLabel":"Πλοήγηση σε διαφάνειες"}}',
      library: "H5P.CoursePresentation 1.25",
      metadata: {
        license: "U",
        title: "Ψηφιογραφικές και διανυσματικές εικόνες",
        defaultLanguage: "el",
      },
      scripts: [
        "/h5p/libraries/H5P.Image-1.1/image.js?version=1.1.22",
        "/h5p/libraries/H5P.AdvancedText-1.1/text.js?version=1.1.14",
        "/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.SingleChoiceSet-1.11/scripts/stop-watch.js?version=1.11.44",
        "/h5p/libraries/H5P.SingleChoiceSet-1.11/scripts/sound-effects.js?version=1.11.44",
        "/h5p/libraries/H5P.SingleChoiceSet-1.11/scripts/xapi-event-builder.js?version=1.11.44",
        "/h5p/libraries/H5P.SingleChoiceSet-1.11/scripts/result-slide.js?version=1.11.44",
        "/h5p/libraries/H5P.SingleChoiceSet-1.11/scripts/solution-view.js?version=1.11.44",
        "/h5p/libraries/H5P.SingleChoiceSet-1.11/scripts/single-choice-alternative.js?version=1.11.44",
        "/h5p/libraries/H5P.SingleChoiceSet-1.11/scripts/single-choice.js?version=1.11.44",
        "/h5p/libraries/H5P.SingleChoiceSet-1.11/scripts/single-choice-set.js?version=1.11.44",
        "/h5p/libraries/H5P.TrueFalse-1.8/scripts/h5p-true-false.js?version=1.8.8",
        "/h5p/libraries/H5P.TrueFalse-1.8/scripts/h5p-true-false-answer-group.js?version=1.8.8",
        "/h5p/libraries/H5P.TrueFalse-1.8/scripts/h5p-true-false-answer.js?version=1.8.8",
        "/h5p/libraries/jQuery.ui-1.10/h5p-jquery-ui.js?version=1.10.22",
        "/h5p/libraries/H5P.DragText-1.10/dist/h5p-drag-text.js?version=1.10.12",
        "/h5p/libraries/H5P.MultiMediaChoice-0.3/dist/h5p-multi-media-choice.js?version=0.3.14",
        "/h5p/libraries/H5P.CoursePresentation-1.25/dist/h5p-course-presentation.js?version=1.25.9",
      ],
      styles: [
        "/h5p/libraries/H5P.Image-1.1/image.css?version=1.1.22",
        "/h5p/libraries/H5P.AdvancedText-1.1/text.css?version=1.1.14",
        "/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.SingleChoiceSet-1.11/styles/single-choice-set.css?version=1.11.44",
        "/h5p/libraries/H5P.TrueFalse-1.8/styles/h5p-true-false.css?version=1.8.8",
        "/h5p/libraries/jQuery.ui-1.10/h5p-jquery-ui.css?version=1.10.22",
        "/h5p/libraries/H5P.DragText-1.10/dist/h5p-drag-text.css?version=1.10.12",
        "/h5p/libraries/H5P.MaterialDesignIcons-1.0/h5p-material-icons.css?version=1.0.0",
        "/h5p/libraries/H5P.MultiMediaChoice-0.3/dist/h5p-multi-media-choice.css?version=0.3.14",
        "/h5p/libraries/H5P.CoursePresentation-1.25/dist/h5p-course-presentation.css?version=1.25.9",
      ],
      url: "3106236996",
      exportUrl: "/h5p/download/3106236996",
    },
  },
  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-" + "3106236996"].displayOptions.embed = false;
} else {
  H5PIntegration.contents["cid-" + "3106236996"].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-" + "3106236996"].resizeCode = "";
}

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

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

                      )
                        if (1 === r.nodeType && ++p && r === t) {
                          s[f] = [k, a, p];
                          break;
                        }
                    } else if (
                      !1 ===
                      (p = d
                        ? (a =
                            (n =
                              (s =
                                (o = (r = t)[P] || (r[P] = {}))[r.uniqueID] ||
                                (o[r.uniqueID] = {}))[f] || [])[0] === k &&
                            n[1])
                        : p)
                    )
                      for (
                        ;
                        (r = (++a && r && r[c]) || (p = a = 0) || l.pop()) &&
                        ((y
                          ? r.nodeName.toLowerCase() !== u
                          : 1 !== r.nodeType) ||
                          !++p ||
                          (d &&
                            ((s =
                              (o = r[P] || (r[P] = {}))[r.uniqueID] ||
                              (o[r.uniqueID] = {}))[f] = [k, p]),
                          r !== t));

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

                    )
                      if (a(o, e || C, i)) {
                        n.push(o);
                        break;
                      }
                    s && (k = f);
                  }
                  b && ((o = !a && o) && l--, t && h.push(o));
                }
                if (((l += c), b && c !== l)) {
                  for (r = 0; (a = v[r++]); ) a(h, u, e, i);
                  if (t) {
                    if (0 < l) for (; c--; ) h[c] || u[c] || (u[c] = O.call(n));
                    u = wt(u);
                  }
                  $.apply(n, u),
                    s &&
                      !t &&
                      0 < u.length &&
                      1 < l + v.length &&
                      at.uniqueSort(n);
                }
                return s && ((k = f), (_ = d)), h;
              }),
              b ? ct(n) : n)
            )).selector = t;
          }
          return r;
        }),
      (m = at.select =
        function (t, e, i, n) {
          var s,
            o,
            r,
            a,
            l,
            c = "function" == typeof t && t,
            h = !n && f((t = c.selector || t));
          if (((i = i || []), 1 === h.length)) {
            if (
              2 < (o = h[0] = h[0].slice(0)).length &&
              "ID" === (r = o[0]).type &&
              9 === e.nodeType &&
              S &&
              w.relative[o[1].type]
            ) {
              if (!(e = (w.find.ID(r.matches[0].replace(st, u), e) || [])[0]))
                return i;
              c && (e = e.parentNode), (t = t.slice(o.shift().value.length));
            }
            for (
              s = G.needsContext.test(t) ? 0 : o.length;
              s-- && ((r = o[s]), !w.relative[(a = r.type)]);

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

        )
          (n = Q.get(r[a], t + "queueHooks")) &&
            n.empty &&
            (s++, n.empty.add(i));
        return i(), o.promise(e);
      },
    });
  var tt = /[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,
    et = new RegExp("^(?:([+-])=|)(" + tt + ")([a-z%]*)$", "i"),
    it = ["Top", "Right", "Bottom", "Left"],
    nt = C.documentElement,
    st = function (t) {
      return S.contains(t.ownerDocument, t);
    },
    ot = { composed: !0 };
  nt.getRootNode &&
    (st = function (t) {
      return (
        S.contains(t.ownerDocument, t) || t.getRootNode(ot) === t.ownerDocument
      );
    });
  function rt(t, e) {
    return (
      "none" === (t = e || t).style.display ||
      ("" === t.style.display && st(t) && "none" === S.css(t, "display"))
    );
  }
  function at(t, e, i, n) {
    var s,
      o,
      r = 20,
      a = n
        ? function () {
            return n.cur();
          }
        : function () {
            return S.css(t, e, "");
          },
      l = a(),
      c = (i && i[3]) || (S.cssNumber[e] ? "" : "px"),
      h =
        t.nodeType &&
        (S.cssNumber[e] || ("px" !== c && +l)) &&
        et.exec(S.css(t, e));
    if (h && h[3] !== c) {
      for (c = c || h[3], h = +(l /= 2) || 1; r--; )
        S.style(t, e, h + c),
          (1 - o) * (1 - (o = a() / l || 0.5)) <= 0 && (r = 0),
          (h /= o);
      S.style(t, e, (h *= 2) + c), (i = i || []);
    }
    return (
      i &&
        ((h = +h || +l || 0),
        (s = i[1] ? h + (i[1] + 1) * i[2] : +i[2]),
        n && ((n.unit = c), (n.start = h), (n.end = s))),
      s
    );
  }
  var lt = {};
  function ct(t, e) {
    for (var i, n, s, o, r, a, l = [], c = 0, h = t.length; c < h; c++)
      (n = t[c]).style &&
        ((i = n.style.display),
        e
          ? ("none" === i &&
              ((l[c] = Q.get(n, "display") || null),
              l[c] || (n.style.display = "")),
            "" === n.style.display &&
              rt(n) &&
              (l[c] =
                ((a = o = s = void 0),
                (o = n.ownerDocument),
                (r = n.nodeName),
                (a = lt[r]) ||
                  ((s = o.body.appendChild(o.createElement(r))),
                  (a = S.css(s, "display")),
                  s.parentNode.removeChild(s),
                  (lt[r] = a = "none" === a ? "block" : a)))))
          : "none" !== i && ((l[c] = "none"), Q.set(n, "display", i)));
    for (c = 0; c < h; c++) null != l[c] && (t[c].style.display = l[c]);
    return t;
  }
  S.fn.extend({
    show: function () {
      return ct(this, !0);
    },
    hide: function () {
      return ct(this);
    },
    toggle: function (t) {
      return "boolean" == typeof t
        ? t
          ? this.show()
          : this.hide()
        : this.each(function () {
            rt(this) ? S(this).show() : S(this).hide();
          });
    },
  });
  var ht = /^(?:checkbox|radio)$/i,
    ut = /<([a-z][^\/\0>\x20\t\r\n\f]*)/i,
    dt = /^$|^module$|\/(?:java|ecma)script/i,
    u = C.createDocumentFragment().appendChild(C.createElement("div"));
  (p = C.createElement("input")).setAttribute("type", "radio"),
    p.setAttribute("checked", "checked"),
    p.setAttribute("name", "t"),
    u.appendChild(p),
    (y.checkClone = u.cloneNode(!0).cloneNode(!0).lastChild.checked),
    (u.innerHTML = "<textarea>x</textarea>"),
    (y.noCloneChecked = !!u.cloneNode(!0).lastChild.defaultValue),
    (u.innerHTML = "<option></option>"),
    (y.option = !!u.lastChild);
  var pt = {
    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 ft(t, e) {
    var i =
      void 0 !== t.getElementsByTagName
        ? t.getElementsByTagName(e || "*")
        : void 0 !== t.querySelectorAll
        ? t.querySelectorAll(e || "*")
        : [];
    return void 0 === e || (e && T(t, e)) ? S.merge([t], i) : i;
  }
  function gt(t, e) {
    for (var i = 0, n = t.length; i < n; i++)
      Q.set(t[i], "globalEval", !e || Q.get(e[i], "globalEval"));
  }
  (pt.tbody = pt.tfoot = pt.colgroup = pt.caption = pt.thead),
    (pt.th = pt.td),
    y.option ||
      (pt.optgroup = pt.option =
        [1, "<select multiple='multiple'>", "</select>"]);
  var mt = /<|&#?\w+;/;
  function vt(t, e, i, n, s) {
    for (
      var o,
        r,
        a,
        l,
        c,
        h = e.createDocumentFragment(),
        u = [],
        d = 0,
        p = t.length;
      d < p;
      d++
    )
      if ((o = t[d]) || 0 === o)
        if ("object" === f(o)) S.merge(u, o.nodeType ? [o] : o);
        else if (mt.test(o)) {
          for (
            r = r || h.appendChild(e.createElement("div")),
              a = (ut.exec(o) || ["", ""])[1].toLowerCase(),
              a = pt[a] || pt._default,
              r.innerHTML = a[1] + S.htmlPrefilter(o) + a[2],
              c = a[0];
            c--;

          )
            r = r.lastChild;
          S.merge(u, r.childNodes), ((r = h.firstChild).textContent = "");
        } else u.push(e.createTextNode(o));
    for (h.textContent = "", d = 0; (o = u[d++]); )
      if (n && -1 < S.inArray(o, n)) s && s.push(o);
      else if (
        ((l = st(o)), (r = ft(h.appendChild(o), "script")), l && gt(r), i)
      )
        for (c = 0; (o = r[c++]); ) dt.test(o.type || "") && i.push(o);
    return h;
  }
  var bt = /^key/,
    yt = /^(?:mouse|pointer|contextmenu|drag|drop)|click/,
    wt = /^([^.]*)(?:\.(.+)|)/;
  function _t() {
    return !0;
  }
  function xt() {
    return !1;
  }
  function Ct(t, e) {
    return (
      (t ===
        (function () {
          try {
            return C.activeElement;
          } catch (t) {}
        })()) ==
      ("focus" === e)
    );
  }
  function St(t, e, i, n, s, o) {
    var r, a;
    if ("object" == typeof e) {
      for (a in ("string" != typeof i && ((n = n || i), (i = void 0)), e))
        St(t, a, i, n, e[a], o);
      return t;
    }
    if (
      (null == n && null == s
        ? ((s = i), (n = i = void 0))
        : null == s &&
          ("string" == typeof i
            ? ((s = n), (n = void 0))
            : ((s = n), (n = i), (i = void 0))),
      !1 === s)
    )
      s = xt;
    else if (!s) return t;
    return (
      1 === o &&
        ((r = s),
        ((s = function (t) {
          return S().off(t), r.apply(this, arguments);
        }).guid = r.guid || (r.guid = S.guid++))),
      t.each(function () {
        S.event.add(this, e, s, n, i);
      })
    );
  }
  function Pt(t, s, o) {
    o
      ? (Q.set(t, s, !1),
        S.event.add(t, s, {
          namespace: !1,
          handler: function (t) {
            var e,
              i,
              n = Q.get(this, s);
            if (1 & t.isTrigger && this[s]) {
              if (n.length)
                (S.event.special[s] || {}).delegateType && t.stopPropagation();
              else if (
                ((n = a.call(arguments)),
                Q.set(this, s, n),
                (e = o(this, s)),
                this[s](),
                n !== (i = Q.get(this, s)) || e ? Q.set(this, s, !1) : (i = {}),
                n !== i)
              )
                return (
                  t.stopImmediatePropagation(), t.preventDefault(), i.value
                );
            } else
              n.length &&
                (Q.set(this, s, {
                  value: S.event.trigger(
                    S.extend(n[0], S.Event.prototype),
                    n.slice(1),
                    this
                  ),
                }),
                t.stopImmediatePropagation());
          },
        }))
      : void 0 === Q.get(t, s) && S.event.add(t, s, _t);
  }
  (S.event = {
    global: {},
    add: function (e, t, i, n, s) {
      var o,
        r,
        a,
        l,
        c,
        h,
        u,
        d,
        p,
        f = Q.get(e);
      if (Y(e))
        for (
          i.handler && ((i = (o = i).handler), (s = o.selector)),
            s && S.find.matchesSelector(nt, s),
            i.guid || (i.guid = S.guid++),
            (a = f.events) || (a = f.events = Object.create(null)),
            (r = f.handle) ||
              (r = f.handle =
                function (t) {
                  return void 0 !== S && S.event.triggered !== t.type
                    ? S.event.dispatch.apply(e, arguments)
                    : void 0;
                }),
            l = (t = (t || "").match(L) || [""]).length;
          l--;

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

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

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

          )
            (a.rnamespace &&
              !1 !== s.namespace &&
              !a.rnamespace.test(s.namespace)) ||
              ((a.handleObj = s),
              (a.data = s.data),
              void 0 !==
                (s = (
                  (S.event.special[s.origType] || {}).handle || s.handler
                ).apply(n.elem, r)) &&
                !1 === (a.result = s) &&
                (a.preventDefault(), a.stopPropagation()));
        return t.postDispatch && t.postDispatch.call(this, a), a.result;
      }
    },
    handlers: function (t, e) {
      var i,
        n,
        s,
        o,
        r,
        a = [],
        l = e.delegateCount,
        c = t.target;
      if (l && c.nodeType && !("click" === t.type && 1 <= t.button))
        for (; c !== this; c = c.parentNode || this)
          if (1 === c.nodeType && ("click" !== t.type || !0 !== c.disabled)) {
            for (o = [], r = {}, i = 0; i < l; i++)
              void 0 === r[(s = (n = e[i]).selector + " ")] &&
                (r[s] = n.needsContext
                  ? -1 < S(s, this).index(c)
                  : S.find(s, this, null, [c]).length),
                r[s] && o.push(n);
            o.length && a.push({ elem: c, handlers: o });
          }
      return (
        (c = this), l < e.length && a.push({ elem: c, handlers: e.slice(l) }), a
      );
    },
    addProp: function (e, t) {
      Object.defineProperty(S.Event.prototype, e, {
        enumerable: !0,
        configurable: !0,
        get: g(t)
          ? function () {
              if (this.originalEvent) return t(this.originalEvent);
            }
          : function () {
              if (this.originalEvent) return this.originalEvent[e];
            },
        set: function (t) {
          Object.defineProperty(this, e, {
            enumerable: !0,
            configurable: !0,
            writable: !0,
            value: t,
          });
        },
      });
    },
    fix: function (t) {
      return t[S.expando] ? t : new S.Event(t);
    },
    special: {
      load: { noBubble: !0 },
      click: {
        setup: function (t) {
          t = this || t;
          return (
            ht.test(t.type) && t.click && T(t, "input") && Pt(t, "click", _t),
            !1
          );
        },
        trigger: function (t) {
          t = this || t;
          return (
            ht.test(t.type) && t.click && T(t, "input") && Pt(t, "click"), !0
          );
        },
        _default: function (t) {
          t = t.target;
          return (
            (ht.test(t.type) &&
              t.click &&
              T(t, "input") &&
              Q.get(t, "click")) ||
            T(t, "a")
          );
        },
      },
      beforeunload: {
        postDispatch: function (t) {
          void 0 !== t.result &&
            t.originalEvent &&
            (t.originalEvent.returnValue = t.result);
        },
      },
    },
  }),
    (S.removeEvent = function (t, e, i) {
      t.removeEventListener && t.removeEventListener(e, i);
    }),
    (S.Event = function (t, e) {
      if (!(this instanceof S.Event)) return new S.Event(t, e);
      t && t.type
        ? ((this.originalEvent = t),
          (this.type = t.type),
          (this.isDefaultPrevented =
            t.defaultPrevented ||
            (void 0 === t.defaultPrevented && !1 === t.returnValue)
              ? _t
              : xt),
          (this.target =
            t.target && 3 === t.target.nodeType
              ? t.target.parentNode
              : t.target),
          (this.currentTarget = t.currentTarget),
          (this.relatedTarget = t.relatedTarget))
        : (this.type = t),
        e && S.extend(this, e),
        (this.timeStamp = (t && t.timeStamp) || Date.now()),
        (this[S.expando] = !0);
    }),
    (S.Event.prototype = {
      constructor: S.Event,
      isDefaultPrevented: xt,
      isPropagationStopped: xt,
      isImmediatePropagationStopped: xt,
      isSimulated: !1,
      preventDefault: function () {
        var t = this.originalEvent;
        (this.isDefaultPrevented = _t),
          t && !this.isSimulated && t.preventDefault();
      },
      stopPropagation: function () {
        var t = this.originalEvent;
        (this.isPropagationStopped = _t),
          t && !this.isSimulated && t.stopPropagation();
      },
      stopImmediatePropagation: function () {
        var t = this.originalEvent;
        (this.isImmediatePropagationStopped = _t),
          t && !this.isSimulated && t.stopImmediatePropagation(),
          this.stopPropagation();
      },
    }),
    S.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 (t) {
          var e = t.button;
          return null == t.which && bt.test(t.type)
            ? null != t.charCode
              ? t.charCode
              : t.keyCode
            : !t.which && void 0 !== e && yt.test(t.type)
            ? 1 & e
              ? 1
              : 2 & e
              ? 3
              : 4 & e
              ? 2
              : 0
            : t.which;
        },
      },
      S.event.addProp
    ),
    S.each({ focus: "focusin", blur: "focusout" }, function (t, e) {
      S.event.special[t] = {
        setup: function () {
          return Pt(this, t, Ct), !1;
        },
        trigger: function () {
          return Pt(this, t), !0;
        },
        delegateType: e,
      };
    }),
    S.each(
      {
        mouseenter: "mouseover",
        mouseleave: "mouseout",
        pointerenter: "pointerover",
        pointerleave: "pointerout",
      },
      function (t, s) {
        S.event.special[t] = {
          delegateType: s,
          bindType: s,
          handle: function (t) {
            var e,
              i = t.relatedTarget,
              n = t.handleObj;
            return (
              (i && (i === this || S.contains(this, i))) ||
                ((t.type = n.origType),
                (e = n.handler.apply(this, arguments)),
                (t.type = s)),
              e
            );
          },
        };
      }
    ),
    S.fn.extend({
      on: function (t, e, i, n) {
        return St(this, t, e, i, n);
      },
      one: function (t, e, i, n) {
        return St(this, t, e, i, n, 1);
      },
      off: function (t, e, i) {
        var n, s;
        if (t && t.preventDefault && t.handleObj)
          return (
            (n = t.handleObj),
            S(t.delegateTarget).off(
              n.namespace ? n.origType + "." + n.namespace : n.origType,
              n.selector,
              n.handler
            ),
            this
          );
        if ("object" != typeof t)
          return (
            (!1 !== e && "function" != typeof e) || ((i = e), (e = void 0)),
            !1 === i && (i = xt),
            this.each(function () {
              S.event.remove(this, t, i, e);
            })
          );
        for (s in t) this.off(s, e, t[s]);
        return this;
      },
    });
  var kt = /<script|<style|<link/i,
    Tt = /checked\s*(?:[^=]|=\s*.checked.)/i,
    Dt = /^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g;
  function Ht(t, e) {
    return (
      (T(t, "table") &&
        T(11 !== e.nodeType ? e : e.firstChild, "tr") &&
        S(t).children("tbody")[0]) ||
      t
    );
  }
  function It(t) {
    return (t.type = (null !== t.getAttribute("type")) + "/" + t.type), t;
  }
  function Et(t) {
    return (
      "true/" === (t.type || "").slice(0, 5)
        ? (t.type = t.type.slice(5))
        : t.removeAttribute("type"),
      t
    );
  }
  function At(t, e) {
    var i, n, s, o;
    if (1 === e.nodeType) {
      if (Q.hasData(t) && (o = Q.get(t).events))
        for (s in (Q.remove(e, "handle events"), o))
          for (i = 0, n = o[s].length; i < n; i++) S.event.add(e, s, o[s][i]);
      X.hasData(t) && ((t = X.access(t)), (t = S.extend({}, t)), X.set(e, t));
    }
  }
  function Mt(i, n, s, o) {
    n = v(n);
    var t,
      e,
      r,
      a,
      l,
      c,
      h = 0,
      u = i.length,
      d = u - 1,
      p = n[0],
      f = g(p);
    if (f || (1 < u && "string" == typeof p && !y.checkClone && Tt.test(p)))
      return i.each(function (t) {
        var e = i.eq(t);
        f && (n[0] = p.call(this, t, e.html())), Mt(e, n, s, o);
      });
    if (
      u &&
      ((e = (t = vt(n, i[0].ownerDocument, !1, i, o)).firstChild),
      1 === t.childNodes.length && (t = e),
      e || o)
    ) {
      for (a = (r = S.map(ft(t, "script"), It)).length; h < u; h++)
        (l = t),
          h !== d &&
            ((l = S.clone(l, !0, !0)), a && S.merge(r, ft(l, "script"))),
          s.call(i[h], l, h);
      if (a)
        for (c = r[r.length - 1].ownerDocument, S.map(r, Et), h = 0; h < a; h++)
          (l = r[h]),
            dt.test(l.type || "") &&
              !Q.access(l, "globalEval") &&
              S.contains(c, l) &&
              (l.src && "module" !== (l.type || "").toLowerCase()
                ? S._evalUrl &&
                  !l.noModule &&
                  S._evalUrl(
                    l.src,
                    { nonce: l.nonce || l.getAttribute("nonce") },
                    c
                  )
                : w(l.textContent.replace(Dt, ""), l, c));
    }
    return i;
  }
  function Ot(t, e, i) {
    for (var n, s = e ? S.filter(e, t) : t, o = 0; null != (n = s[o]); o++)
      i || 1 !== n.nodeType || S.cleanData(ft(n)),
        n.parentNode &&
          (i && st(n) && gt(ft(n, "script")), n.parentNode.removeChild(n));
    return t;
  }
  S.extend({
    htmlPrefilter: function (t) {
      return t;
    },
    clone: function (t, e, i) {
      var n,
        s,
        o,
        r,
        a,
        l,
        c,
        h = t.cloneNode(!0),
        u = st(t);
      if (
        !(
          y.noCloneChecked ||
          (1 !== t.nodeType && 11 !== t.nodeType) ||
          S.isXMLDoc(t)
        )
      )
        for (r = ft(h), n = 0, s = (o = ft(t)).length; n < s; n++)
          (a = o[n]),
            "input" === (c = (l = r[n]).nodeName.toLowerCase()) &&
            ht.test(a.type)
              ? (l.checked = a.checked)
              : ("input" !== c && "textarea" !== c) ||
                (l.defaultValue = a.defaultValue);
      if (e)
        if (i)
          for (o = o || ft(t), r = r || ft(h), n = 0, s = o.length; n < s; n++)
            At(o[n], r[n]);
        else At(t, h);
      return (
        0 < (r = ft(h, "script")).length && gt(r, !u && ft(t, "script")), h
      );
    },
    cleanData: function (t) {
      for (var e, i, n, s = S.event.special, o = 0; void 0 !== (i = t[o]); o++)
        if (Y(i)) {
          if ((e = i[Q.expando])) {
            if (e.events)
              for (n in e.events)
                s[n] ? S.event.remove(i, n) : S.removeEvent(i, n, e.handle);
            i[Q.expando] = void 0;
          }
          i[X.expando] && (i[X.expando] = void 0);
        }
    },
  }),
    S.fn.extend({
      detach: function (t) {
        return Ot(this, t, !0);
      },
      remove: function (t) {
        return Ot(this, t);
      },
      text: function (t) {
        return j(
          this,
          function (t) {
            return void 0 === t
              ? S.text(this)
              : this.empty().each(function () {
                  (1 !== this.nodeType &&
                    11 !== this.nodeType &&
                    9 !== this.nodeType) ||
                    (this.textContent = t);
                });
          },
          null,
          t,
          arguments.length
        );
      },
      append: function () {
        return Mt(this, arguments, function (t) {
          (1 !== this.nodeType &&
            11 !== this.nodeType &&
            9 !== this.nodeType) ||
            Ht(this, t).appendChild(t);
        });
      },
      prepend: function () {
        return Mt(this, arguments, function (t) {
          var e;
          (1 !== this.nodeType &&
            11 !== this.nodeType &&
            9 !== this.nodeType) ||
            (e = Ht(this, t)).insertBefore(t, e.firstChild);
        });
      },
      before: function () {
        return Mt(this, arguments, function (t) {
          this.parentNode && this.parentNode.insertBefore(t, this);
        });
      },
      after: function () {
        return Mt(this, arguments, function (t) {
          this.parentNode && this.parentNode.insertBefore(t, this.nextSibling);
        });
      },
      empty: function () {
        for (var t, e = 0; null != (t = this[e]); e++)
          1 === t.nodeType && (S.cleanData(ft(t, !1)), (t.textContent = ""));
        return this;
      },
      clone: function (t, e) {
        return (
          (t = null != t && t),
          (e = null == e ? t : e),
          this.map(function () {
            return S.clone(this, t, e);
          })
        );
      },
      html: function (t) {
        return j(
          this,
          function (t) {
            var e = this[0] || {},
              i = 0,
              n = this.length;
            if (void 0 === t && 1 === e.nodeType) return e.innerHTML;
            if (
              "string" == typeof t &&
              !kt.test(t) &&
              !pt[(ut.exec(t) || ["", ""])[1].toLowerCase()]
            ) {
              t = S.htmlPrefilter(t);
              try {
                for (; i < n; i++)
                  1 === (e = this[i] || {}).nodeType &&
                    (S.cleanData(ft(e, !1)), (e.innerHTML = t));
                e = 0;
              } catch (t) {}
            }
            e && this.empty().append(t);
          },
          null,
          t,
          arguments.length
        );
      },
      replaceWith: function () {
        var i = [];
        return Mt(
          this,
          arguments,
          function (t) {
            var e = this.parentNode;
            S.inArray(this, i) < 0 &&
              (S.cleanData(ft(this)), e && e.replaceChild(t, this));
          },
          i
        );
      },
    }),
    S.each(
      {
        appendTo: "append",
        prependTo: "prepend",
        insertBefore: "before",
        insertAfter: "after",
        replaceAll: "replaceWith",
      },
      function (t, r) {
        S.fn[t] = function (t) {
          for (var e, i = [], n = S(t), s = n.length - 1, o = 0; o <= s; o++)
            (e = o === s ? this : this.clone(!0)),
              S(n[o])[r](e),
              l.apply(i, e.get());
          return this.pushStack(i);
        };
      }
    );
  function Lt(t) {
    var e = t.ownerDocument.defaultView;
    return (e = !e || !e.opener ? x : e).getComputedStyle(t);
  }
  function $t(t, e, i) {
    var n,
      s = {};
    for (n in e) (s[n] = t.style[n]), (t.style[n] = e[n]);
    for (n in ((i = i.call(t)), e)) t.style[n] = s[n];
    return i;
  }
  var Nt,
    zt,
    Bt,
    Ft,
    Rt,
    jt,
    Wt,
    qt,
    Ut = new RegExp("^(" + tt + ")(?!px)[a-z%]+$", "i"),
    Vt = new RegExp(it.join("|"), "i");
  function Yt(t, e, i) {
    var n,
      s,
      o = t.style;
    return (
      (i = i || Lt(t)) &&
        ("" !== (s = i.getPropertyValue(e) || i[e]) ||
          st(t) ||
          (s = S.style(t, e)),
        !y.pixelBoxStyles() &&
          Ut.test(s) &&
          Vt.test(e) &&
          ((n = o.width),
          (t = o.minWidth),
          (e = o.maxWidth),
          (o.minWidth = o.maxWidth = o.width = s),
          (s = i.width),
          (o.width = n),
          (o.minWidth = t),
          (o.maxWidth = e))),
      void 0 !== s ? s + "" : s
    );
  }
  function Kt(t, e) {
    return {
      get: function () {
        if (!t()) return (this.get = e).apply(this, arguments);
        delete this.get;
      },
    };
  }
  function Qt() {
    var t;
    qt &&
      ((Wt.style.cssText =
        "position:absolute;left:-11111px;width:60px;margin-top:1px;padding:0;border:0"),
      (qt.style.cssText =
        "position:relative;display:block;box-sizing:border-box;overflow:scroll;margin:auto;border:1px;padding:1px;width:60%;top:1%"),
      nt.appendChild(Wt).appendChild(qt),
      (t = x.getComputedStyle(qt)),
      (Nt = "1%" !== t.top),
      (jt = 12 === Xt(t.marginLeft)),
      (qt.style.right = "60%"),
      (Ft = 36 === Xt(t.right)),
      (zt = 36 === Xt(t.width)),
      (qt.style.position = "absolute"),
      (Bt = 12 === Xt(qt.offsetWidth / 3)),
      nt.removeChild(Wt),
      (qt = null));
  }
  function Xt(t) {
    return Math.round(parseFloat(t));
  }
  (Wt = C.createElement("div")),
    (qt = C.createElement("div")).style &&
      ((qt.style.backgroundClip = "content-box"),
      (qt.cloneNode(!0).style.backgroundClip = ""),
      (y.clearCloneStyle = "content-box" === qt.style.backgroundClip),
      S.extend(y, {
        boxSizingReliable: function () {
          return Qt(), zt;
        },
        pixelBoxStyles: function () {
          return Qt(), Ft;
        },
        pixelPosition: function () {
          return Qt(), Nt;
        },
        reliableMarginLeft: function () {
          return Qt(), jt;
        },
        scrollboxSize: function () {
          return Qt(), Bt;
        },
        reliableTrDimensions: function () {
          var t, e, i;
          return (
            null == Rt &&
              ((t = C.createElement("table")),
              (i = C.createElement("tr")),
              (e = C.createElement("div")),
              (t.style.cssText = "position:absolute;left:-11111px"),
              (i.style.height = "1px"),
              (e.style.height = "9px"),
              nt.appendChild(t).appendChild(i).appendChild(e),
              (i = x.getComputedStyle(i)),
              (Rt = 3 < parseInt(i.height)),
              nt.removeChild(t)),
            Rt
          );
        },
      }));
  var Gt = ["Webkit", "Moz", "ms"],
    Jt = C.createElement("div").style,
    Zt = {};
  function te(t) {
    return (
      S.cssProps[t] ||
      Zt[t] ||
      (t in Jt
        ? t
        : (Zt[t] =
            (function (t) {
              for (
                var e = t[0].toUpperCase() + t.slice(1), i = Gt.length;
                i--;

              )
                if ((t = Gt[i] + e) in Jt) return t;
            })(t) || t))
    );
  }
  var ee = /^(none|table(?!-c[ea]).+)/,
    ie = /^--/,
    ne = { position: "absolute", visibility: "hidden", display: "block" },
    se = { letterSpacing: "0", fontWeight: "400" };
  function oe(t, e, i) {
    var n = et.exec(e);
    return n ? Math.max(0, n[2] - (i || 0)) + (n[3] || "px") : e;
  }
  function re(t, e, i, n, s, o) {
    var r = "width" === e ? 1 : 0,
      a = 0,
      l = 0;
    if (i === (n ? "border" : "content")) return 0;
    for (; r < 4; r += 2)
      "margin" === i && (l += S.css(t, i + it[r], !0, s)),
        n
          ? ("content" === i && (l -= S.css(t, "padding" + it[r], !0, s)),
            "margin" !== i &&
              (l -= S.css(t, "border" + it[r] + "Width", !0, s)))
          : ((l += S.css(t, "padding" + it[r], !0, s)),
            "padding" !== i
              ? (l += S.css(t, "border" + it[r] + "Width", !0, s))
              : (a += S.css(t, "border" + it[r] + "Width", !0, s)));
    return (
      !n &&
        0 <= o &&
        (l +=
          Math.max(
            0,
            Math.ceil(
              t["offset" + e[0].toUpperCase() + e.slice(1)] - o - l - a - 0.5
            )
          ) || 0),
      l
    );
  }
  function ae(t, e, i) {
    var n = Lt(t),
      s =
        (!y.boxSizingReliable() || i) &&
        "border-box" === S.css(t, "boxSizing", !1, n),
      o = s,
      r = Yt(t, e, n),
      a = "offset" + e[0].toUpperCase() + e.slice(1);
    if (Ut.test(r)) {
      if (!i) return r;
      r = "auto";
    }
    return (
      ((!y.boxSizingReliable() && s) ||
        (!y.reliableTrDimensions() && T(t, "tr")) ||
        "auto" === r ||
        (!parseFloat(r) && "inline" === S.css(t, "display", !1, n))) &&
        t.getClientRects().length &&
        ((s = "border-box" === S.css(t, "boxSizing", !1, n)),
        (o = a in t) && (r = t[a])),
      (r = parseFloat(r) || 0) +
        re(t, e, i || (s ? "border" : "content"), o, n, r) +
        "px"
    );
  }
  function le(t, e, i, n, s) {
    return new le.prototype.init(t, e, i, n, s);
  }
  S.extend({
    cssHooks: {
      opacity: {
        get: function (t, e) {
          if (e) {
            t = Yt(t, "opacity");
            return "" === t ? "1" : t;
          }
        },
      },
    },
    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 (t, e, i, n) {
      if (t && 3 !== t.nodeType && 8 !== t.nodeType && t.style) {
        var s,
          o,
          r,
          a = V(e),
          l = ie.test(e),
          c = t.style;
        if (
          (l || (e = te(a)), (r = S.cssHooks[e] || S.cssHooks[a]), void 0 === i)
        )
          return r && "get" in r && void 0 !== (s = r.get(t, !1, n)) ? s : c[e];
        "string" == (o = typeof i) &&
          (s = et.exec(i)) &&
          s[1] &&
          ((i = at(t, e, s)), (o = "number")),
          null != i &&
            i == i &&
            ("number" !== o ||
              l ||
              (i += (s && s[3]) || (S.cssNumber[a] ? "" : "px")),
            y.clearCloneStyle ||
              "" !== i ||
              0 !== e.indexOf("background") ||
              (c[e] = "inherit"),
            (r && "set" in r && void 0 === (i = r.set(t, i, n))) ||
              (l ? c.setProperty(e, i) : (c[e] = i)));
      }
    },
    css: function (t, e, i, n) {
      var s,
        o = V(e);
      return (
        ie.test(e) || (e = te(o)),
        "normal" ===
          (s =
            void 0 ===
            (s =
              (o = S.cssHooks[e] || S.cssHooks[o]) && "get" in o
                ? o.get(t, !0, i)
                : s)
              ? Yt(t, e, n)
              : s) &&
          e in se &&
          (s = se[e]),
        "" === i || i
          ? ((e = parseFloat(s)), !0 === i || isFinite(e) ? e || 0 : s)
          : s
      );
    },
  }),
    S.each(["height", "width"], function (t, a) {
      S.cssHooks[a] = {
        get: function (t, e, i) {
          if (e)
            return !ee.test(S.css(t, "display")) ||
              (t.getClientRects().length && t.getBoundingClientRect().width)
              ? ae(t, a, i)
              : $t(t, ne, function () {
                  return ae(t, a, i);
                });
        },
        set: function (t, e, i) {
          var n,
            s = Lt(t),
            o = !y.scrollboxSize() && "absolute" === s.position,
            r = (o || i) && "border-box" === S.css(t, "boxSizing", !1, s),
            i = i ? re(t, a, i, r, s) : 0;
          return (
            r &&
              o &&
              (i -= Math.ceil(
                t["offset" + a[0].toUpperCase() + a.slice(1)] -
                  parseFloat(s[a]) -
                  re(t, a, "border", !1, s) -
                  0.5
              )),
            i &&
              (n = et.exec(e)) &&
              "px" !== (n[3] || "px") &&
              ((t.style[a] = e), (e = S.css(t, a))),
            oe(0, e, i)
          );
        },
      };
    }),
    (S.cssHooks.marginLeft = Kt(y.reliableMarginLeft, function (t, e) {
      if (e)
        return (
          (parseFloat(Yt(t, "marginLeft")) ||
            t.getBoundingClientRect().left -
              $t(t, { marginLeft: 0 }, function () {
                return t.getBoundingClientRect().left;
              })) + "px"
        );
    })),
    S.each({ margin: "", padding: "", border: "Width" }, function (s, o) {
      (S.cssHooks[s + o] = {
        expand: function (t) {
          for (
            var e = 0, i = {}, n = "string" == typeof t ? t.split(" ") : [t];
            e < 4;
            e++
          )
            i[s + it[e] + o] = n[e] || n[e - 2] || n[0];
          return i;
        },
      }),
        "margin" !== s && (S.cssHooks[s + o].set = oe);
    }),
    S.fn.extend({
      css: function (t, e) {
        return j(
          this,
          function (t, e, i) {
            var n,
              s,
              o = {},
              r = 0;
            if (Array.isArray(e)) {
              for (n = Lt(t), s = e.length; r < s; r++)
                o[e[r]] = S.css(t, e[r], !1, n);
              return o;
            }
            return void 0 !== i ? S.style(t, e, i) : S.css(t, e);
          },
          t,
          e,
          1 < arguments.length
        );
      },
    }),
    (((S.Tween = le).prototype = {
      constructor: le,
      init: function (t, e, i, n, s, o) {
        (this.elem = t),
          (this.prop = i),
          (this.easing = s || S.easing._default),
          (this.options = e),
          (this.start = this.now = this.cur()),
          (this.end = n),
          (this.unit = o || (S.cssNumber[i] ? "" : "px"));
      },
      cur: function () {
        var t = le.propHooks[this.prop];
        return (t && t.get ? t : le.propHooks._default).get(this);
      },
      run: function (t) {
        var e,
          i = le.propHooks[this.prop];
        return (
          this.options.duration
            ? (this.pos = e =
                S.easing[this.easing](
                  t,
                  this.options.duration * t,
                  0,
                  1,
                  this.options.duration
                ))
            : (this.pos = e = t),
          (this.now = (this.end - this.start) * e + this.start),
          this.options.step &&
            this.options.step.call(this.elem, this.now, this),
          (i && i.set ? i : le.propHooks._default).set(this),
          this
        );
      },
    }).init.prototype = le.prototype),
    ((le.propHooks = {
      _default: {
        get: function (t) {
          return 1 !== t.elem.nodeType ||
            (null != t.elem[t.prop] && null == t.elem.style[t.prop])
            ? t.elem[t.prop]
            : (t = S.css(t.elem, t.prop, "")) && "auto" !== t
            ? t
            : 0;
        },
        set: function (t) {
          S.fx.step[t.prop]
            ? S.fx.step[t.prop](t)
            : 1 !== t.elem.nodeType ||
              (!S.cssHooks[t.prop] && null == t.elem.style[te(t.prop)])
            ? (t.elem[t.prop] = t.now)
            : S.style(t.elem, t.prop, t.now + t.unit);
        },
      },
    }).scrollTop = le.propHooks.scrollLeft =
      {
        set: function (t) {
          t.elem.nodeType && t.elem.parentNode && (t.elem[t.prop] = t.now);
        },
      }),
    (S.easing = {
      linear: function (t) {
        return t;
      },
      swing: function (t) {
        return 0.5 - Math.cos(t * Math.PI) / 2;
      },
      _default: "swing",
    }),
    (S.fx = le.prototype.init),
    (S.fx.step = {});
  var ce,
    he,
    ue = /^(?:toggle|show|hide)$/,
    de = /queueHooks$/;
  function pe() {
    he &&
      (!1 === C.hidden && x.requestAnimationFrame
        ? x.requestAnimationFrame(pe)
        : x.setTimeout(pe, S.fx.interval),
      S.fx.tick());
  }
  function fe() {
    return (
      x.setTimeout(function () {
        ce = void 0;
      }),
      (ce = Date.now())
    );
  }
  function ge(t, e) {
    var i,
      n = 0,
      s = { height: t };
    for (e = e ? 1 : 0; n < 4; n += 2 - e)
      s["margin" + (i = it[n])] = s["padding" + i] = t;
    return e && (s.opacity = s.width = t), s;
  }
  function me(t, e, i) {
    for (
      var n,
        s = (ve.tweeners[e] || []).concat(ve.tweeners["*"]),
        o = 0,
        r = s.length;
      o < r;
      o++
    )
      if ((n = s[o].call(i, e, t))) return n;
  }
  function ve(s, t, e) {
    var i,
      o,
      n = 0,
      r = ve.prefilters.length,
      a = S.Deferred().always(function () {
        delete l.elem;
      }),
      l = function () {
        if (o) return !1;
        for (
          var t = ce || fe(),
            t = Math.max(0, c.startTime + c.duration - t),
            e = 1 - (t / c.duration || 0),
            i = 0,
            n = c.tweens.length;
          i < n;
          i++
        )
          c.tweens[i].run(e);
        return (
          a.notifyWith(s, [c, e, t]),
          e < 1 && n
            ? t
            : (n || a.notifyWith(s, [c, 1, 0]), a.resolveWith(s, [c]), !1)
        );
      },
      c = a.promise({
        elem: s,
        props: S.extend({}, t),
        opts: S.extend(!0, { specialEasing: {}, easing: S.easing._default }, e),
        originalProperties: t,
        originalOptions: e,
        startTime: ce || fe(),
        duration: e.duration,
        tweens: [],
        createTween: function (t, e) {
          t = S.Tween(
            s,
            c.opts,
            t,
            e,
            c.opts.specialEasing[t] || c.opts.easing
          );
          return c.tweens.push(t), t;
        },
        stop: function (t) {
          var e = 0,
            i = t ? c.tweens.length : 0;
          if (o) return this;
          for (o = !0; e < i; e++) c.tweens[e].run(1);
          return (
            t
              ? (a.notifyWith(s, [c, 1, 0]), a.resolveWith(s, [c, t]))
              : a.rejectWith(s, [c, t]),
            this
          );
        },
      }),
      h = c.props;
    for (
      (function (t, e) {
        var i, n, s, o, r;
        for (i in t)
          if (
            ((s = e[(n = V(i))]),
            (o = t[i]),
            Array.isArray(o) && ((s = o[1]), (o = t[i] = o[0])),
            i !== n && ((t[n] = o), delete t[i]),
            (r = S.cssHooks[n]) && ("expand" in r))
          )
            for (i in ((o = r.expand(o)), delete t[n], o))
              (i in t) || ((t[i] = o[i]), (e[i] = s));
          else e[n] = s;
      })(h, c.opts.specialEasing);
      n < r;
      n++
    )
      if ((i = ve.prefilters[n].call(c, s, h, c.opts)))
        return (
          g(i.stop) &&
            (S._queueHooks(c.elem, c.opts.queue).stop = i.stop.bind(i)),
          i
        );
    return (
      S.map(h, me, c),
      g(c.opts.start) && c.opts.start.call(s, c),
      c
        .progress(c.opts.progress)
        .done(c.opts.done, c.opts.complete)
        .fail(c.opts.fail)
        .always(c.opts.always),
      S.fx.timer(S.extend(l, { elem: s, anim: c, queue: c.opts.queue })),
      c
    );
  }
  (S.Animation = S.extend(ve, {
    tweeners: {
      "*": [
        function (t, e) {
          var i = this.createTween(t, e);
          return at(i.elem, t, et.exec(e), i), i;
        },
      ],
    },
    tweener: function (t, e) {
      for (
        var i, n = 0, s = (t = g(t) ? ((e = t), ["*"]) : t.match(L)).length;
        n < s;
        n++
      )
        (i = t[n]),
          (ve.tweeners[i] = ve.tweeners[i] || []),
          ve.tweeners[i].unshift(e);
    },
    prefilters: [
      function (t, e, i) {
        var n,
          s,
          o,
          r,
          a,
          l,
          c,
          h = "width" in e || "height" in e,
          u = this,
          d = {},
          p = t.style,
          f = t.nodeType && rt(t),
          g = Q.get(t, "fxshow");
        for (n in (i.queue ||
          (null == (r = S._queueHooks(t, "fx")).unqueued &&
            ((r.unqueued = 0),
            (a = r.empty.fire),
            (r.empty.fire = function () {
              r.unqueued || a();
            })),
          r.unqueued++,
          u.always(function () {
            u.always(function () {
              r.unqueued--, S.queue(t, "fx").length || r.empty.fire();
            });
          })),
        e))
          if (((s = e[n]), ue.test(s))) {
            if (
              (delete e[n],
              (o = o || "toggle" === s),
              s === (f ? "hide" : "show"))
            ) {
              if ("show" !== s || !g || void 0 === g[n]) continue;
              f = !0;
            }
            d[n] = (g && g[n]) || S.style(t, n);
          }
        if ((l = !S.isEmptyObject(e)) || !S.isEmptyObject(d))
          for (n in (h &&
            1 === t.nodeType &&
            ((i.overflow = [p.overflow, p.overflowX, p.overflowY]),
            null == (c = g && g.display) && (c = Q.get(t, "display")),
            "none" === (h = S.css(t, "display")) &&
              (c
                ? (h = c)
                : (ct([t], !0),
                  (c = t.style.display || c),
                  (h = S.css(t, "display")),
                  ct([t]))),
            ("inline" === h || ("inline-block" === h && null != c)) &&
              "none" === S.css(t, "float") &&
              (l ||
                (u.done(function () {
                  p.display = c;
                }),
                null == c && ((h = p.display), (c = "none" === h ? "" : h))),
              (p.display = "inline-block"))),
          i.overflow &&
            ((p.overflow = "hidden"),
            u.always(function () {
              (p.overflow = i.overflow[0]),
                (p.overflowX = i.overflow[1]),
                (p.overflowY = i.overflow[2]);
            })),
          (l = !1),
          d))
            l ||
              (g
                ? "hidden" in g && (f = g.hidden)
                : (g = Q.access(t, "fxshow", { display: c })),
              o && (g.hidden = !f),
              f && ct([t], !0),
              u.done(function () {
                for (n in (f || ct([t]), Q.remove(t, "fxshow"), d))
                  S.style(t, n, d[n]);
              })),
              (l = me(f ? g[n] : 0, n, u)),
              n in g ||
                ((g[n] = l.start), f && ((l.end = l.start), (l.start = 0)));
      },
    ],
    prefilter: function (t, e) {
      e ? ve.prefilters.unshift(t) : ve.prefilters.push(t);
    },
  })),
    (S.speed = function (t, e, i) {
      var n =
        t && "object" == typeof t
          ? S.extend({}, t)
          : {
              complete: i || (!i && e) || (g(t) && t),
              duration: t,
              easing: (i && e) || (e && !g(e) && e),
            };
      return (
        S.fx.off
          ? (n.duration = 0)
          : "number" != typeof n.duration &&
            (n.duration in S.fx.speeds
              ? (n.duration = S.fx.speeds[n.duration])
              : (n.duration = S.fx.speeds._default)),
        (null != n.queue && !0 !== n.queue) || (n.queue = "fx"),
        (n.old = n.complete),
        (n.complete = function () {
          g(n.old) && n.old.call(this), n.queue && S.dequeue(this, n.queue);
        }),
        n
      );
    }),
    S.fn.extend({
      fadeTo: function (t, e, i, n) {
        return this.filter(rt)
          .css("opacity", 0)
          .show()
          .end()
          .animate({ opacity: e }, t, i, n);
      },
      animate: function (e, t, i, n) {
        function s() {
          var t = ve(this, S.extend({}, e), r);
          (o || Q.get(this, "finish")) && t.stop(!0);
        }
        var o = S.isEmptyObject(e),
          r = S.speed(t, i, n);
        return (
          (s.finish = s),
          o || !1 === r.queue ? this.each(s) : this.queue(r.queue, s)
        );
      },
      stop: function (s, t, o) {
        function r(t) {
          var e = t.stop;
          delete t.stop, e(o);
        }
        return (
          "string" != typeof s && ((o = t), (t = s), (s = void 0)),
          t && this.queue(s || "fx", []),
          this.each(function () {
            var t = !0,
              e = null != s && s + "queueHooks",
              i = S.timers,
              n = Q.get(this);
            if (e) n[e] && n[e].stop && r(n[e]);
            else for (e in n) n[e] && n[e].stop && de.test(e) && r(n[e]);
            for (e = i.length; e--; )
              i[e].elem !== this ||
                (null != s && i[e].queue !== s) ||
                (i[e].anim.stop(o), (t = !1), i.splice(e, 1));
            (!t && o) || S.dequeue(this, s);
          })
        );
      },
      finish: function (r) {
        return (
          !1 !== r && (r = r || "fx"),
          this.each(function () {
            var t,
              e = Q.get(this),
              i = e[r + "queue"],
              n = e[r + "queueHooks"],
              s = S.timers,
              o = i ? i.length : 0;
            for (
              e.finish = !0,
                S.queue(this, r, []),
                n && n.stop && n.stop.call(this, !0),
                t = s.length;
              t--;

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

            )
              ((n = s[r]).selected =
                -1 < S.inArray(S.valHooks.option.get(n), o)) && (i = !0);
            return i || (t.selectedIndex = -1), o;
          },
        },
      },
    }),
    S.each(["radio", "checkbox"], function () {
      (S.valHooks[this] = {
        set: function (t, e) {
          if (Array.isArray(e))
            return (t.checked = -1 < S.inArray(S(t).val(), e));
        },
      }),
        y.checkOn ||
          (S.valHooks[this].get = function (t) {
            return null === t.getAttribute("value") ? "on" : t.value;
          });
    }),
    (y.focusin = "onfocusin" in x);
  function ke(t) {
    t.stopPropagation();
  }
  var Te = /^(?:focusinfocus|focusoutblur)$/;
  S.extend(S.event, {
    trigger: function (t, e, i, n) {
      var s,
        o,
        r,
        a,
        l,
        c,
        h,
        u = [i || C],
        d = b.call(t, "type") ? t.type : t,
        p = b.call(t, "namespace") ? t.namespace.split(".") : [],
        f = (h = o = i = i || C);
      if (
        3 !== i.nodeType &&
        8 !== i.nodeType &&
        !Te.test(d + S.event.triggered) &&
        (-1 < d.indexOf(".") && ((d = (p = d.split(".")).shift()), p.sort()),
        (a = d.indexOf(":") < 0 && "on" + d),
        ((t = t[S.expando]
          ? t
          : new S.Event(d, "object" == typeof t && t)).isTrigger = n ? 2 : 3),
        (t.namespace = p.join(".")),
        (t.rnamespace = t.namespace
          ? new RegExp("(^|\\.)" + p.join("\\.(?:.*\\.|)") + "(\\.|$)")
          : null),
        (t.result = void 0),
        t.target || (t.target = i),
        (e = null == e ? [t] : S.makeArray(e, [t])),
        (c = S.event.special[d] || {}),
        n || !c.trigger || !1 !== c.trigger.apply(i, e))
      ) {
        if (!n && !c.noBubble && !m(i)) {
          for (
            r = c.delegateType || d, Te.test(r + d) || (f = f.parentNode);
            f;
            f = f.parentNode
          )
            u.push(f), (o = f);
          o === (i.ownerDocument || C) &&
            u.push(o.defaultView || o.parentWindow || x);
        }
        for (s = 0; (f = u[s++]) && !t.isPropagationStopped(); )
          (h = f),
            (t.type = 1 < s ? r : c.bindType || d),
            (l =
              (Q.get(f, "events") || Object.create(null))[t.type] &&
              Q.get(f, "handle")) && l.apply(f, e),
            (l = a && f[a]) &&
              l.apply &&
              Y(f) &&
              ((t.result = l.apply(f, e)),
              !1 === t.result && t.preventDefault());
        return (
          (t.type = d),
          n ||
            t.isDefaultPrevented() ||
            (c._default && !1 !== c._default.apply(u.pop(), e)) ||
            !Y(i) ||
            (a &&
              g(i[d]) &&
              !m(i) &&
              ((o = i[a]) && (i[a] = null),
              (S.event.triggered = d),
              t.isPropagationStopped() && h.addEventListener(d, ke),
              i[d](),
              t.isPropagationStopped() && h.removeEventListener(d, ke),
              (S.event.triggered = void 0),
              o && (i[a] = o))),
          t.result
        );
      }
    },
    simulate: function (t, e, i) {
      t = S.extend(new S.Event(), i, { type: t, isSimulated: !0 });
      S.event.trigger(t, null, e);
    },
  }),
    S.fn.extend({
      trigger: function (t, e) {
        return this.each(function () {
          S.event.trigger(t, e, this);
        });
      },
      triggerHandler: function (t, e) {
        var i = this[0];
        if (i) return S.event.trigger(t, e, i, !0);
      },
    }),
    y.focusin ||
      S.each({ focus: "focusin", blur: "focusout" }, function (i, n) {
        function s(t) {
          S.event.simulate(n, t.target, S.event.fix(t));
        }
        S.event.special[n] = {
          setup: function () {
            var t = this.ownerDocument || this.document || this,
              e = Q.access(t, n);
            e || t.addEventListener(i, s, !0), Q.access(t, n, (e || 0) + 1);
          },
          teardown: function () {
            var t = this.ownerDocument || this.document || this,
              e = Q.access(t, n) - 1;
            e
              ? Q.access(t, n, e)
              : (t.removeEventListener(i, s, !0), Q.remove(t, n));
          },
        };
      });
  var De = x.location,
    He = { guid: Date.now() },
    Ie = /\?/;
  S.parseXML = function (t) {
    var e;
    if (!t || "string" != typeof t) return null;
    try {
      e = new x.DOMParser().parseFromString(t, "text/xml");
    } catch (t) {
      e = void 0;
    }
    return (
      (e && !e.getElementsByTagName("parsererror").length) ||
        S.error("Invalid XML: " + t),
      e
    );
  };
  var Ee = /\[\]$/,
    Ae = /\r?\n/g,
    Me = /^(?:submit|button|image|reset|file)$/i,
    Oe = /^(?:input|select|textarea|keygen)/i;
  (S.param = function (t, e) {
    function i(t, e) {
      (e = g(e) ? e() : e),
        (s[s.length] =
          encodeURIComponent(t) + "=" + encodeURIComponent(null == e ? "" : e));
    }
    var n,
      s = [];
    if (null == t) return "";
    if (Array.isArray(t) || (t.jquery && !S.isPlainObject(t)))
      S.each(t, function () {
        i(this.name, this.value);
      });
    else
      for (n in t)
        !(function i(n, t, s, o) {
          if (Array.isArray(t))
            S.each(t, function (t, e) {
              s || Ee.test(n)
                ? o(n, e)
                : i(
                    n +
                      "[" +
                      ("object" == typeof e && null != e ? t : "") +
                      "]",
                    e,
                    s,
                    o
                  );
            });
          else if (s || "object" !== f(t)) o(n, t);
          else for (var e in t) i(n + "[" + e + "]", t[e], s, o);
        })(n, t[n], e, i);
    return s.join("&");
  }),
    S.fn.extend({
      serialize: function () {
        return S.param(this.serializeArray());
      },
      serializeArray: function () {
        return this.map(function () {
          var t = S.prop(this, "elements");
          return t ? S.makeArray(t) : this;
        })
          .filter(function () {
            var t = this.type;
            return (
              this.name &&
              !S(this).is(":disabled") &&
              Oe.test(this.nodeName) &&
              !Me.test(t) &&
              (this.checked || !ht.test(t))
            );
          })
          .map(function (t, e) {
            var i = S(this).val();
            return null == i
              ? null
              : Array.isArray(i)
              ? S.map(i, function (t) {
                  return { name: e.name, value: t.replace(Ae, "\r\n") };
                })
              : { name: e.name, value: i.replace(Ae, "\r\n") };
          })
          .get();
      },
    });
  var Le = /%20/g,
    $e = /#.*$/,
    Ne = /([?&])_=[^&]*/,
    ze = /^(.*?):[ \t]*([^\r\n]*)$/gm,
    Be = /^(?:GET|HEAD)$/,
    Fe = /^\/\//,
    Re = {},
    je = {},
    We = "*/".concat("*"),
    qe = C.createElement("a");
  function Ue(o) {
    return function (t, e) {
      "string" != typeof t && ((e = t), (t = "*"));
      var i,
        n = 0,
        s = t.toLowerCase().match(L) || [];
      if (g(e))
        for (; (i = s[n++]); )
          "+" === i[0]
            ? ((i = i.slice(1) || "*"), (o[i] = o[i] || []).unshift(e))
            : (o[i] = o[i] || []).push(e);
    };
  }
  function Ve(e, n, s, o) {
    var r = {},
      a = e === je;
    function l(t) {
      var i;
      return (
        (r[t] = !0),
        S.each(e[t] || [], function (t, e) {
          e = e(n, s, o);
          return "string" != typeof e || a || r[e]
            ? a
              ? !(i = e)
              : void 0
            : (n.dataTypes.unshift(e), l(e), !1);
        }),
        i
      );
    }
    return l(n.dataTypes[0]) || (!r["*"] && l("*"));
  }
  function Ye(t, e) {
    var i,
      n,
      s = S.ajaxSettings.flatOptions || {};
    for (i in e) void 0 !== e[i] && ((s[i] ? t : (n = n || {}))[i] = e[i]);
    return n && S.extend(!0, t, n), t;
  }
  (qe.href = De.href),
    S.extend({
      active: 0,
      lastModified: {},
      etag: {},
      ajaxSettings: {
        url: De.href,
        type: "GET",
        isLocal:
          /^(?:about|app|app-storage|.+-extension|file|res|widget):$/.test(
            De.protocol
          ),
        global: !0,
        processData: !0,
        async: !0,
        contentType: "application/x-www-form-urlencoded; charset=UTF-8",
        accepts: {
          "*": We,
          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": S.parseXML,
        },
        flatOptions: { url: !0, context: !0 },
      },
      ajaxSetup: function (t, e) {
        return e ? Ye(Ye(t, S.ajaxSettings), e) : Ye(S.ajaxSettings, t);
      },
      ajaxPrefilter: Ue(Re),
      ajaxTransport: Ue(je),
      ajax: function (t, e) {
        "object" == typeof t && ((e = t), (t = void 0));
        var l,
          c,
          h,
          i,
          u,
          d,
          p,
          n,
          s,
          f = S.ajaxSetup({}, (e = e || {})),
          g = f.context || f,
          m = f.context && (g.nodeType || g.jquery) ? S(g) : S.event,
          v = S.Deferred(),
          b = S.Callbacks("once memory"),
          y = f.statusCode || {},
          o = {},
          r = {},
          a = "canceled",
          w = {
            readyState: 0,
            getResponseHeader: function (t) {
              var e;
              if (d) {
                if (!i)
                  for (i = {}; (e = ze.exec(h)); )
                    i[e[1].toLowerCase() + " "] = (
                      i[e[1].toLowerCase() + " "] || []
                    ).concat(e[2]);
                e = i[t.toLowerCase() + " "];
              }
              return null == e ? null : e.join(", ");
            },
            getAllResponseHeaders: function () {
              return d ? h : null;
            },
            setRequestHeader: function (t, e) {
              return (
                null == d &&
                  ((t = r[t.toLowerCase()] = r[t.toLowerCase()] || t),
                  (o[t] = e)),
                this
              );
            },
            overrideMimeType: function (t) {
              return null == d && (f.mimeType = t), this;
            },
            statusCode: function (t) {
              if (t)
                if (d) w.always(t[w.status]);
                else for (var e in t) y[e] = [y[e], t[e]];
              return this;
            },
            abort: function (t) {
              t = t || a;
              return l && l.abort(t), _(0, t), this;
            },
          };
        if (
          (v.promise(w),
          (f.url = ((t || f.url || De.href) + "").replace(
            Fe,
            De.protocol + "//"
          )),
          (f.type = e.method || e.type || f.method || f.type),
          (f.dataTypes = (f.dataType || "*").toLowerCase().match(L) || [""]),
          null == f.crossDomain)
        ) {
          s = C.createElement("a");
          try {
            (s.href = f.url),
              (s.href = s.href),
              (f.crossDomain =
                qe.protocol + "//" + qe.host != s.protocol + "//" + s.host);
          } catch (t) {
            f.crossDomain = !0;
          }
        }
        if (
          (f.data &&
            f.processData &&
            "string" != typeof f.data &&
            (f.data = S.param(f.data, f.traditional)),
          Ve(Re, f, e, w),
          d)
        )
          return w;
        for (n in ((p = S.event && f.global) &&
          0 == S.active++ &&
          S.event.trigger("ajaxStart"),
        (f.type = f.type.toUpperCase()),
        (f.hasContent = !Be.test(f.type)),
        (c = f.url.replace($e, "")),
        f.hasContent
          ? f.data &&
            f.processData &&
            0 ===
              (f.contentType || "").indexOf(
                "application/x-www-form-urlencoded"
              ) &&
            (f.data = f.data.replace(Le, "+"))
          : ((s = f.url.slice(c.length)),
            f.data &&
              (f.processData || "string" == typeof f.data) &&
              ((c += (Ie.test(c) ? "&" : "?") + f.data), delete f.data),
            !1 === f.cache &&
              ((c = c.replace(Ne, "$1")),
              (s = (Ie.test(c) ? "&" : "?") + "_=" + He.guid++ + s)),
            (f.url = c + s)),
        f.ifModified &&
          (S.lastModified[c] &&
            w.setRequestHeader("If-Modified-Since", S.lastModified[c]),
          S.etag[c] && w.setRequestHeader("If-None-Match", S.etag[c])),
        ((f.data && f.hasContent && !1 !== f.contentType) || e.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] ? ", " + We + "; q=0.01" : "")
            : f.accepts["*"]
        ),
        f.headers))
          w.setRequestHeader(n, f.headers[n]);
        if (f.beforeSend && (!1 === f.beforeSend.call(g, w, f) || d))
          return w.abort();
        if (
          ((a = "abort"),
          b.add(f.complete),
          w.done(f.success),
          w.fail(f.error),
          (l = Ve(je, f, e, w)))
        ) {
          if (((w.readyState = 1), p && m.trigger("ajaxSend", [w, f]), d))
            return w;
          f.async &&
            0 < f.timeout &&
            (u = x.setTimeout(function () {
              w.abort("timeout");
            }, f.timeout));
          try {
            (d = !1), l.send(o, _);
          } catch (t) {
            if (d) throw t;
            _(-1, t);
          }
        } else _(-1, "No Transport");
        function _(t, e, i, n) {
          var s,
            o,
            r,
            a = e;
          d ||
            ((d = !0),
            u && x.clearTimeout(u),
            (l = void 0),
            (h = n || ""),
            (w.readyState = 0 < t ? 4 : 0),
            (n = (200 <= t && t < 300) || 304 === t),
            i &&
              (r = (function (t, e, i) {
                for (
                  var n, s, o, r, a = t.contents, l = t.dataTypes;
                  "*" === l[0];

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

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

          )
            t = t.offsetParent;
          return t || nt;
        });
      },
    }),
    S.each(
      { scrollLeft: "pageXOffset", scrollTop: "pageYOffset" },
      function (e, s) {
        var o = "pageYOffset" === s;
        S.fn[e] = function (t) {
          return j(
            this,
            function (t, e, i) {
              var n;
              return (
                m(t) ? (n = t) : 9 === t.nodeType && (n = t.defaultView),
                void 0 === i
                  ? n
                    ? n[s]
                    : t[e]
                  : void (n
                      ? n.scrollTo(o ? n.pageXOffset : i, o ? i : n.pageYOffset)
                      : (t[e] = i))
              );
            },
            e,
            t,
            arguments.length
          );
        };
      }
    ),
    S.each(["top", "left"], function (t, i) {
      S.cssHooks[i] = Kt(y.pixelPosition, function (t, e) {
        if (e)
          return (e = Yt(t, i)), Ut.test(e) ? S(t).position()[i] + "px" : e;
      });
    }),
    S.each({ Height: "height", Width: "width" }, function (r, a) {
      S.each(
        { padding: "inner" + r, content: a, "": "outer" + r },
        function (n, o) {
          S.fn[o] = function (t, e) {
            var i = arguments.length && (n || "boolean" != typeof t),
              s = n || (!0 === t || !0 === e ? "margin" : "border");
            return j(
              this,
              function (t, e, i) {
                var n;
                return m(t)
                  ? 0 === o.indexOf("outer")
                    ? t["inner" + r]
                    : t.document.documentElement["client" + r]
                  : 9 === t.nodeType
                  ? ((n = t.documentElement),
                    Math.max(
                      t.body["scroll" + r],
                      n["scroll" + r],
                      t.body["offset" + r],
                      n["offset" + r],
                      n["client" + r]
                    ))
                  : void 0 === i
                  ? S.css(t, e, s)
                  : S.style(t, e, i, s);
              },
              a,
              i ? t : void 0,
              i
            );
          };
        }
      );
    }),
    S.each(
      [
        "ajaxStart",
        "ajaxStop",
        "ajaxComplete",
        "ajaxError",
        "ajaxSuccess",
        "ajaxSend",
      ],
      function (t, e) {
        S.fn[e] = function (t) {
          return this.on(e, t);
        };
      }
    ),
    S.fn.extend({
      bind: function (t, e, i) {
        return this.on(t, null, e, i);
      },
      unbind: function (t, e) {
        return this.off(t, null, e);
      },
      delegate: function (t, e, i, n) {
        return this.on(e, t, i, n);
      },
      undelegate: function (t, e, i) {
        return 1 === arguments.length
          ? this.off(t, "**")
          : this.off(e, t || "**", i);
      },
      hover: function (t, e) {
        return this.mouseenter(t).mouseleave(e || t);
      },
    }),
    S.each(
      "blur focus focusin focusout resize scroll click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup contextmenu".split(
        " "
      ),
      function (t, i) {
        S.fn[i] = function (t, e) {
          return 0 < arguments.length
            ? this.on(i, null, t, e)
            : this.trigger(i);
        };
      }
    );
  var Je = /^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g;
  (S.proxy = function (t, e) {
    var i, n;
    if (("string" == typeof e && ((n = t[e]), (e = t), (t = n)), g(t)))
      return (
        (i = a.call(arguments, 2)),
        ((n = function () {
          return t.apply(e || this, i.concat(a.call(arguments)));
        }).guid = t.guid =
          t.guid || S.guid++),
        n
      );
  }),
    (S.holdReady = function (t) {
      t ? S.readyWait++ : S.ready(!0);
    }),
    (S.isArray = Array.isArray),
    (S.parseJSON = JSON.parse),
    (S.nodeName = T),
    (S.isFunction = g),
    (S.isWindow = m),
    (S.camelCase = V),
    (S.type = f),
    (S.now = Date.now),
    (S.isNumeric = function (t) {
      var e = S.type(t);
      return ("number" === e || "string" === e) && !isNaN(t - parseFloat(t));
    }),
    (S.trim = function (t) {
      return null == t ? "" : (t + "").replace(Je, "");
    }),
    "function" == typeof define &&
      define.amd &&
      define("jquery", [], function () {
        return S;
      });
  var Ze = x.jQuery,
    ti = x.$;
  return (
    (S.noConflict = function (t) {
      return x.$ === S && (x.$ = ti), t && x.jQuery === S && (x.jQuery = Ze), S;
    }),
    void 0 === t && (x.jQuery = x.$ = S),
    S
  );
});
var H5P = (window.H5P = window.H5P || {});
(H5P.jQuery = jQuery.noConflict(!0)),
  (H5P.jQuery.fn.__originalLoad = H5P.jQuery.load),
  (H5P.jQuery.fn.load = function (t, e, i) {
    if ("function" != typeof t)
      return H5P.jQuery.fn.__originalLoad.apply(this, arguments);
    {
      console.warn("You are using a deprecated H5P library. Please upgrade!");
      let t = Array.prototype.slice.call(arguments);
      return t.unshift("load"), H5P.jQuery.fn.on.apply(this, t);
    }
  }),
  ((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 (t) {
    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)", t).each(function () {
        var e = H5P.jQuery(this).addClass("h5p-initialized"),
          i = H5P.jQuery('<div class="h5p-container"></div>').appendTo(e),
          s = e.data("content-id"),
          o = H5PIntegration.contents["cid-" + s];
        if (void 0 === o)
          return H5P.error(
            "No data for content id " + s + ". Perhaps the library is gone?"
          );
        var r = {
          library: o.library,
          params: JSON.parse(o.jsonContent),
          metadata: o.metadata,
        };
        H5P.getUserData(s, "state", function (t, e) {
          var n;
          e
            ? (r.userDatas = { state: e })
            : null === e &&
              H5PIntegration.saveFreq &&
              (delete o.contentUserData,
              (n = new H5P.Dialog(
                "content-user-data-reset",
                "Data Reset",
                "<p>" +
                  H5P.t("contentChanged") +
                  "</p><p>" +
                  H5P.t("startingOver") +
                  '</p><div class="h5p-dialog-ok-button" tabIndex="0" role="button">OK</div>',
                i
              )),
              H5P.jQuery(n)
                .on("dialog-opened", function (t, e) {
                  function i(t) {
                    ("click" !== t.type && 32 !== t.which) ||
                      (n.close(), H5P.deleteUserData(s, "state", 0));
                  }
                  e.find(".h5p-dialog-ok-button").click(i).keypress(i),
                    H5P.trigger(a, "resize");
                })
                .on("dialog-closed", function () {
                  H5P.trigger(a, "resize");
                }),
              n.open());
        });
        var a = H5P.newRunnable(r, s, i, !0, { standalone: !0 });
        (H5P.offlineRequestQueue = new H5P.OfflineRequestQueue({
          instance: a,
        })),
          1 == o.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(i)
              .children()
              .click(function () {
                H5P.fullScreen(i, a);
              })
              .keydown(function (t) {
                if (32 === t.which || 13 === t.which)
                  return H5P.fullScreen(i, a), !1;
              });
        var t,
          n,
          l,
          c,
          h,
          u,
          d,
          p = o.displayOptions,
          f = !1;
        p.frame &&
          (p.copyright &&
            ((t = H5P.getCopyrights(a, r.params, s, r.metadata)) ||
              (p.copyright = !1)),
          (p = new H5P.ActionBar(p)),
          (n = p.getDOMElement()),
          p.on("reuse", function () {
            H5P.openReuseDialog(n, o, r, a, s), a.triggerXAPI("accessed-reuse");
          }),
          p.on("copyrights", function () {
            new H5P.Dialog(
              "copyrights",
              H5P.t("copyrightInformation"),
              t,
              i
            ).open(!0),
              a.triggerXAPI("accessed-copyright");
          }),
          p.on("embed", function () {
            H5P.openEmbedDialog(
              n,
              o.embedCode,
              o.resizeCode,
              { width: e.width(), height: e.height() },
              a
            ),
              a.triggerXAPI("accessed-embed");
          }),
          p.hasActions() && ((f = !0), n.insertAfter(i))),
          e.addClass(f ? "h5p-frame" : "h5p-no-frame"),
          (H5P.opened[s] = new Date()),
          H5P.on(a, "finish", function (t) {
            void 0 !== t.data &&
              H5P.setFinished(s, t.data.score, t.data.maxScore, t.data.time);
          }),
          H5P.on(a, "xAPI", H5P.xAPICompletedListener),
          !1 !== H5PIntegration.saveFreq &&
            (a.getCurrentState instanceof Function ||
              "function" == typeof a.getCurrentState) &&
            ((c = function () {
              var t = a.getCurrentState();
              void 0 !== t &&
                H5P.setUserData(s, "state", t, { deleteOnChange: !0 }),
                H5PIntegration.saveFreq &&
                  (l = setTimeout(c, 1e3 * H5PIntegration.saveFreq));
            }),
            H5PIntegration.saveFreq &&
              (l = setTimeout(c, 1e3 * H5PIntegration.saveFreq)),
            H5P.on(a, "xAPI", function (t) {
              t = t.getVerb();
              ("completed" !== t && "progressed" !== t) ||
                (clearTimeout(l), (l = setTimeout(c, 3e3)));
            })),
          H5P.isFramed &&
            (!1 === H5P.externalEmbed
              ? ((u = window.frameElement),
                H5P.on(a, "resize", function () {
                  clearTimeout(h),
                    (h = setTimeout(function () {
                      var t;
                      window.parent.H5P.isFullscreen ||
                        ((t = u.parentElement.style.height),
                        (u.parentElement.style.height =
                          u.parentElement.clientHeight + "px"),
                        u.getBoundingClientRect(),
                        (u.style.height = "1px"),
                        (u.style.height =
                          u.contentDocument.body.scrollHeight + "px"),
                        (u.parentElement.style.height = t));
                    }, 1));
                }))
              : H5P.communicator &&
                ((d = !1),
                H5P.communicator.on("ready", function () {
                  H5P.communicator.send("hello");
                }),
                H5P.communicator.on("hello", function () {
                  (d = !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(h),
                    (h = setTimeout(function () {
                      d
                        ? 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"),
          e.addClass("using-mouse"),
          e.on("mousedown keydown keyup", function (t) {
            e.toggleClass("using-mouse", "mousedown" === t.type);
          }),
          H5P.externalDispatcher &&
            H5P.externalDispatcher.trigger("initialized");
      }),
      H5P.jQuery("iframe.h5p-iframe:not(.h5p-initialized)", t).each(
        function () {
          var t = H5P.jQuery(this)
              .addClass("h5p-initialized")
              .data("content-id"),
            e = H5PIntegration.contents["cid-" + t],
            e =
              e && e.metadata && e.metadata.defaultLanguage
                ? e.metadata.defaultLanguage
                : "en";
          this.contentDocument.open(),
            this.contentDocument.write(
              '<!doctype html><html class="h5p-iframe" lang="' +
                e +
                '"><head>' +
                H5P.getHeadTags(t) +
                '</head><body><div class="h5p-content" data-content-id="' +
                t +
                '"/></body></html>'
            ),
            this.contentDocument.close();
        }
      );
  }),
  (H5P.getHeadTags = function (t) {
    function e(t) {
      for (var e = "", i = 0; i < t.length; i++)
        e += '<link rel="stylesheet" href="' + t[i] + '">';
      return e;
    }
    function i(t) {
      for (var e = "", i = 0; i < t.length; i++)
        e += '<script src="' + t[i] + '"></script>';
      return e;
    }
    return (
      '<base target="_parent">' +
      e(H5PIntegration.core.styles) +
      e(H5PIntegration.contents["cid-" + t].styles) +
      i(H5PIntegration.core.scripts) +
      i(H5PIntegration.contents["cid-" + t].scripts) +
      "<script>H5PIntegration = window.parent.H5PIntegration; var H5P = H5P || {}; H5P.externalEmbed = false;</script>"
    );
  }),
  (H5P.communicator =
    window.postMessage && window.addEventListener
      ? new (function () {
          var i = {};
          window.addEventListener(
            "message",
            function (t) {
              window.parent === t.source &&
                "h5p" === t.data.context &&
                void 0 !== i[t.data.action] &&
                i[t.data.action](t.data);
            },
            !1
          ),
            (this.on = function (t, e) {
              i[t] = e;
            }),
            (this.send = function (t, e) {
              ((e = void 0 === e ? {} : e).context = "h5p"),
                (e.action = t),
                window.parent.postMessage(e, "*");
            });
        })()
      : void 0),
  (H5P.semiFullScreen = function (t, e, i, n) {
    H5P.fullScreen(t, e, i, n, !0);
  }),
  (H5P.fullScreen = function (t, e, i, n, s) {
    if (void 0 === H5P.exitFullScreen) {
      if (H5P.isFramed && !1 === H5P.externalEmbed)
        return (
          window.parent.H5P.fullScreen(t, e, i, H5P.$body.get(), s),
          (H5P.isFullscreen = !0),
          (H5P.exitFullScreen = function () {
            window.parent.H5P.exitFullScreen();
          }),
          void H5P.on(e, "exitFullScreen", function () {
            (H5P.isFullscreen = !1), (H5P.exitFullScreen = void 0);
          })
        );
      var o,
        r,
        a,
        l = t;
      void 0 === n
        ? (o = H5P.$body)
        : ((r = (o = H5P.jQuery(n)).add(t.get())),
          (n = "#h5p-iframe-" + t.parent().data("content-id")),
          (t = (a = H5P.jQuery(n)).parent())),
        (r = t.add(H5P.$body).add(r));
      function c(t) {
        r.addClass(t), void 0 !== a && a.css("height", "");
      }
      function h() {
        H5P.trigger(e, "resize"),
          H5P.trigger(e, "focus"),
          H5P.trigger(e, "enterFullScreen");
      }
      function u(t) {
        (H5P.isFullscreen = !1),
          r.removeClass(t),
          H5P.trigger(e, "resize"),
          H5P.trigger(e, "focus"),
          (H5P.exitFullScreen = void 0) !== i && i(),
          H5P.trigger(e, "exitFullScreen");
      }
      if (
        ((H5P.isFullscreen = !0),
        void 0 === H5P.fullScreenBrowserPrefix || !0 === s)
      ) {
        if (!H5P.isFramed) {
          c("h5p-semi-fullscreen");
          var d,
            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 () {
              d ? (p.content = d) : v.removeChild(p),
                f.remove(),
                o.unbind("keyup", m),
                u("h5p-semi-fullscreen");
            }),
            m = function (t) {
              27 === t.keyCode && g();
            };
          f.click(g), o.keyup(m);
          for (
            var v, b = document.getElementsByTagName("meta"), y = 0;
            y < b.length;
            y++
          )
            if ("viewport" === b[y].name) {
              (p = b[y]), (d = p.content);
              break;
            }
          d || ((p = document.createElement("meta")).name = "viewport"),
            (p.content =
              "width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0"),
            d || (v = document.getElementsByTagName("head")[0]).appendChild(p),
            h();
        }
      } else {
        c("h5p-fullscreen");
        var w,
          _ =
            "ms" === H5P.fullScreenBrowserPrefix
              ? "MSFullscreenChange"
              : H5P.fullScreenBrowserPrefix + "fullscreenchange";
        document.addEventListener(_, function () {
          return void 0 === w
            ? ((w = !1), void h())
            : (u("h5p-fullscreen"),
              void document.removeEventListener(_, arguments.callee, !1));
        }),
          "" === H5P.fullScreenBrowserPrefix
            ? t[0].requestFullScreen()
            : ((s =
                "ms" === H5P.fullScreenBrowserPrefix
                  ? "msRequestFullscreen"
                  : H5P.fullScreenBrowserPrefix + "RequestFullScreen"),
              (l =
                "webkit" === H5P.fullScreenBrowserPrefix &&
                0 === H5P.safariBrowser
                  ? Element.ALLOW_KEYBOARD_INPUT
                  : void 0),
              t[0][s](l)),
          (H5P.exitFullScreen = function () {
            "" === H5P.fullScreenBrowserPrefix
              ? document.exitFullscreen()
              : "moz" === H5P.fullScreenBrowserPrefix
              ? document.mozCancelFullScreen()
              : document[H5P.fullScreenBrowserPrefix + "ExitFullscreen"]();
          });
      }
    }
  }),
  (function () {
    (H5P.addQueryParameter = function (t, e) {
      let i, n;
      const s = t.split("?");
      return (
        (i = s[1]
          ? ((n = s[1].split("#")), s[0] + "?" + n[0] + "&")
          : ((n = s[0].split("#")), n[0] + "?")),
        (i += e),
        n[1] && (i += "#" + n[1]),
        i
      );
    }),
      (H5P.setSource = function (t, e, i) {
        let n = e.path;
        e = H5P.getCrossOrigin(e);
        e
          ? ((t.crossOrigin = e),
            H5PIntegration.crossoriginCacheBuster &&
              (n = H5P.addQueryParameter(
                n,
                H5PIntegration.crossoriginCacheBuster
              )))
          : t.removeAttribute("crossorigin"),
          (t.src = H5P.getPath(n, i));
      });
    function s(t) {
      return t.match(/^[a-z0-9]+:\/\//i);
    }
    (H5P.getCrossOrigin = function (t) {
      return "object" != typeof t
        ? H5PIntegration.crossorigin &&
          H5PIntegration.crossoriginRegex &&
          t.match(H5PIntegration.crossoriginRegex)
          ? H5PIntegration.crossorigin
          : null
        : H5PIntegration.crossorigin && !s(t.path)
        ? H5PIntegration.crossorigin
        : void 0;
    }),
      (H5P.getPath = function (t, e) {
        if (s(t)) return t;
        var i,
          n = "#tmp" === t.substr(-4, 4);
        if (void 0 === e || n) {
          if (void 0 === window.H5PEditor) return;
          i = H5PEditor.filesPath;
        } else
          i =
            (i =
              void 0 !== H5PIntegration.contents &&
              H5PIntegration.contents["cid-" + e]
                ? H5PIntegration.contents["cid-" + e].contentUrl
                : i) || H5PIntegration.url + "/content/" + e;
        return (
          (i = !s(i)
            ? window.location.protocol + "//" + window.location.host + i
            : i) +
          "/" +
          t
        );
      });
  })(),
  (H5P.getContentPath = function (t) {
    return H5PIntegration.url + "/content/" + t;
  }),
  (H5P.classFromName = function (t) {
    t = t.split(".");
    return this[t[t.length - 1]];
  }),
  (H5P.newRunnable = function (e, t, i, n, s) {
    var o, r;
    try {
      (r = (a = e.library.split(" ", 2))[0]), (o = a[1].split(".", 2));
    } catch (t) {
      return H5P.error("Invalid library string: " + e.library);
    }
    if (e.params instanceof Object != !0 || e.params instanceof Array == !0)
      return (
        H5P.error("Invalid library params for: " + e.library),
        H5P.error(e.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 (t) {
      return H5P.error("Unable to find constructor for: " + e.library);
    }
    void 0 === s && (s = {}),
      e.subContentId && (s.subContentId = e.subContentId),
      e.userDatas &&
        e.userDatas.state &&
        H5PIntegration.saveFreq &&
        (s.previousState = e.userDatas.state),
      e.metadata && (s.metadata = e.metadata);
    var h,
      u = s.standalone || !1;
    return (
      (l.prototype = H5P.jQuery.extend(
        {},
        H5P.ContentType(u).prototype,
        l.prototype
      )),
      void 0 ===
        (h =
          -1 <
          H5P.jQuery.inArray(e.library, [
            "H5P.CoursePresentation 1.0",
            "H5P.CoursePresentation 1.1",
            "H5P.CoursePresentation 1.2",
            "H5P.CoursePresentation 1.3",
          ])
            ? new l(e.params, t)
            : new l(e.params, t, s)).$ && (h.$ = H5P.jQuery(h)),
      void 0 === h.contentId && (h.contentId = t),
      void 0 === h.subContentId &&
        e.subContentId &&
        (h.subContentId = e.subContentId),
      void 0 === h.parent && s && s.parent && (h.parent = s.parent),
      void 0 === h.libraryInfo &&
        (h.libraryInfo = {
          versionedName: e.library,
          versionedNameNoSpaces: r + "-" + o[0] + "." + o[1],
          machineName: r,
          majorVersion: o[0],
          minorVersion: o[1],
        }),
      void 0 !== i &&
        (i.toggleClass("h5p-standalone", u),
        h.attach(i),
        H5P.trigger(
          h,
          "domChanged",
          { $target: i, library: r, key: "newLibrary" },
          { bubbles: !0, external: !0 }
        ),
        (void 0 !== n && n) || H5P.trigger(h, "resize")),
      h
    );
  }),
  (H5P.error = function (t) {
    void 0 !== window.console &&
      void 0 !== console.error &&
      console.error(t.stack || t);
  }),
  (H5P.t = function (t, e, i) {
    if ((void 0 === i && (i = "H5P"), void 0 === H5PIntegration.l10n[i]))
      return '[Missing translation namespace "' + i + '"]';
    if (void 0 === H5PIntegration.l10n[i][t])
      return '[Missing translation "' + t + '" in "' + i + '"]';
    var n = H5PIntegration.l10n[i][t];
    if (void 0 !== e) for (var s in e) n = n.replace(s, e[s]);
    return n;
  }),
  (H5P.Dialog = function (t, e, i, n) {
    var s = this,
      o = H5P.jQuery(
        '<div class="h5p-popup-dialog h5p-' +
          t +
          '-dialog" role="dialog" tabindex="-1">                              <div class="h5p-inner">                                <h2>' +
          e +
          '</h2>                                <div class="h5p-scroll-content">' +
          i +
          '</div>                                <div class="h5p-close" role="button" tabindex="0" aria-label="' +
          H5P.t("close") +
          '" title="' +
          H5P.t("close") +
          '"></div>                              </div>                            </div>'
      )
        .insertAfter(n)
        .click(function (t) {
          (t && t.originalEvent && t.originalEvent.preventClosing) || s.close();
        })
        .children(".h5p-inner")
        .click(function (t) {
          t.originalEvent.preventClosing = !0;
        })
        .find(".h5p-close")
        .click(function () {
          s.close();
        })
        .keypress(function (t) {
          if (13 === t.which || 32 === t.which) return s.close(), !1;
        })
        .end()
        .find("a")
        .click(function (t) {
          t.stopPropagation();
        })
        .end()
        .end();
    (s.open = function (t) {
      t && o.css("height", "100%"),
        setTimeout(function () {
          o.addClass("h5p-open"),
            H5P.jQuery(s).trigger("dialog-opened", [o]),
            o.focus();
        }, 1);
    }),
      (s.close = function () {
        o.removeClass("h5p-open"),
          setTimeout(function () {
            o.remove(),
              H5P.jQuery(s).trigger("dialog-closed", [o]),
              n.attr("tabindex", "-1"),
              n.focus();
          }, 200);
      });
  }),
  (H5P.getCopyrights = function (t, e, i, n) {
    var s;
    if (void 0 !== t.getCopyrights)
      try {
        s = t.getCopyrights();
      } catch (t) {}
    void 0 === s &&
      ((s = new H5P.ContentCopyrights()), H5P.findCopyrights(s, e, i));
    t = H5P.buildMetadataCopyrights(n, t.libraryInfo.machineName);
    return (
      void 0 !== t && s.addMediaInFront(t),
      (s = void 0 !== s ? s.toString() : s)
    );
  }),
  (H5P.findCopyrights = function (o, t, e, i) {
    var n, s, r, a;
    for (s in (i && ((i.params = t), l(i, i.machineName, e)), t))
      t.hasOwnProperty(s) &&
        ("overrideSettings" !== s
          ? ((r = t[s]) && r.library && "string" == typeof r.library
              ? (n = r.library.split(" ")[0])
              : r &&
                r.library &&
                "object" == typeof r.library &&
                (n =
                  r.library.library && "string" == typeof r.library.library
                    ? r.library.library.split(" ")[0]
                    : n),
            r instanceof Array
              ? H5P.findCopyrights(o, r, e)
              : r instanceof Object &&
                (l(r, n, e),
                void 0 === r.copyright ||
                void 0 === r.copyright.license ||
                void 0 === r.path ||
                void 0 === r.mime
                  ? H5P.findCopyrights(o, r, e)
                  : ((a = new H5P.MediaCopyright(r.copyright)),
                    void 0 !== r.width &&
                      void 0 !== r.height &&
                      a.setThumbnail(
                        new H5P.Thumbnail(
                          H5P.getPath(r.path, e),
                          r.width,
                          r.height
                        )
                      ),
                    o.addMedia(a))))
          : (console.warn(
              "The semantics field 'overrideSettings' is DEPRECATED and should not be used."
            ),
            console.warn(t)));
    function l(t, e, i) {
      if (t.metadata) {
        const s = H5P.buildMetadataCopyrights(t.metadata, e);
        var n;
        void 0 !== s &&
          (t.params &&
            "Image" === t.params.contentName &&
            t.params.file &&
            ((n = t.params.file.path),
            (e = t.params.file.width),
            (t = t.params.file.height),
            s.setThumbnail(new H5P.Thumbnail(H5P.getPath(n, i), e, t))),
          o.addMedia(s));
      }
    }
  }),
  (H5P.buildMetadataCopyrights = function (t) {
    if (t && void 0 !== t.license && "U" !== t.license) {
      t = {
        contentType: t.contentType,
        title: t.title,
        author:
          t.authors && 0 < t.authors.length
            ? t.authors
                .map(function (t) {
                  return t.role ? t.name + " (" + t.role + ")" : t.name;
                })
                .join(", ")
            : void 0,
        source: t.source,
        year: t.yearFrom
          ? t.yearFrom + (t.yearTo ? "-" + t.yearTo : "")
          : void 0,
        license: t.license,
        version: t.licenseVersion,
        licenseExtras: t.licenseExtras,
        changes:
          t.changes && 0 < t.changes.length
            ? t.changes
                .map(function (t) {
                  return (
                    t.log +
                    (t.author ? ", " + t.author : "") +
                    (t.date ? ", " + t.date : "")
                  );
                })
                .join(" / ")
            : void 0,
      };
      return new H5P.MediaCopyright(t);
    }
  }),
  (H5P.openReuseDialog = function (t, i, n, s, o) {
    let e = "";
    i.displayOptions.export &&
      (e +=
        '<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>'),
      i.displayOptions.export &&
        i.displayOptions.copy &&
        (e += '<div class="h5p-horizontal-line-text"><span>or</span></div>'),
      i.displayOptions.copy &&
        (e +=
          '<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 r = new H5P.Dialog("reuse", H5P.t("reuseContent"), e, t);
    H5P.jQuery(r)
      .on("dialog-opened", function (t, e) {
        H5P.jQuery(
          '<a href="https://h5p.org/node/442225" target="_blank">More Info</a>'
        )
          .click(function (t) {
            t.stopPropagation();
          })
          .appendTo(e.find("h2")),
          e.find(".h5p-download-button").click(function () {
            (window.location.href = i.exportUrl),
              s.triggerXAPI("downloaded"),
              r.close();
          }),
          e.find(".h5p-copy-button").click(function () {
            const t = new H5P.ClipboardItem(n);
            (t.contentId = o),
              H5P.setClipboard(t),
              s.triggerXAPI("copied"),
              r.close(),
              H5P.attachToastTo(
                H5P.jQuery(".h5p-content:first")[0],
                H5P.t("contentCopied"),
                {
                  position: {
                    horizontal: "centered",
                    vertical: "centered",
                    noOverflowX: !0,
                  },
                }
              );
          }),
          H5P.trigger(s, "resize");
      })
      .on("dialog-closed", function () {
        H5P.trigger(s, "resize");
      }),
      r.open();
  }),
  (H5P.openEmbedDialog = function (t, e, i, c, h) {
    var u = e + i,
      t = 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">' +
          i +
          "</textarea></div>",
        t
      );
    H5P.jQuery(t)
      .on("dialog-opened", function (t, i) {
        function n() {
          H5P.trigger(h, "resize");
        }
        function e(t, e) {
          return (t = parseFloat(t.val())), isNaN(t) ? e : Math.ceil(t);
        }
        function s() {
          i.find(".h5p-embed-code-container:first").val(
            u.replace(":w", e(r, c.width)).replace(":h", e(a, c.height))
          );
        }
        var o = i.find(".h5p-inner").find(".h5p-scroll-content"),
          r =
            (o.outerHeight(), o.innerHeight(), i.find(".h5p-embed-size:eq(0)")),
          a = i.find(".h5p-embed-size:eq(1)");
        r.change(s),
          a.change(s),
          s(),
          i.find(".h5p-embed-code-container").each(function () {
            H5P.jQuery(this)
              .css("height", this.scrollHeight + "px")
              .focus(function () {
                H5P.jQuery(this).select();
              });
          }),
          i.find(".h5p-embed-code-container").eq(0).select(),
          n();
        function l() {
          var t = H5P.jQuery(this),
            e = t.next();
          e.is(":visible")
            ? (t
                .removeClass("h5p-open")
                .text(H5P.t("showAdvanced"))
                .attr("aria-expanded", "true"),
              e.hide())
            : (t
                .addClass("h5p-open")
                .text(H5P.t("hideAdvanced"))
                .attr("aria-expanded", "false"),
              e.show()),
            i.find(".h5p-embed-code-container").each(function () {
              H5P.jQuery(this).css("height", this.scrollHeight + "px");
            }),
            n();
        }
        i.find(".h5p-expander")
          .click(l)
          .keypress(function (t) {
            if (32 === t.keyCode) return l.apply(this), !1;
          });
      })
      .on("dialog-closed", function () {
        H5P.trigger(h, "resize");
      }),
      t.open();
  }),
  (H5P.attachToastTo = function (e, t, i) {
    if (void 0 === e || void 0 === t) return;
    function n(t) {
      -1 === s(t).indexOf(e) && (clearTimeout(l), o());
    }
    const s = function (t) {
        var e = (t.composedPath && t.composedPath()) || t.path,
          t = t.target;
        return null != e
          ? e.indexOf(window) < 0
            ? e.concat(window)
            : e
          : t === window
          ? [window]
          : [t].concat(
              (function t(e, i) {
                i = i || [];
                e = e.parentNode;
                return e ? t(e, i.concat(e)) : i;
              })(t),
              window
            );
      },
      o = function () {
        document.removeEventListener("click", n),
          r.parentNode && r.parentNode.removeChild(r);
      };
    ((i = i || {}).style = i.style || "h5p-toast"),
      (i.duration = i.duration || 3e3);
    const r = document.createElement("div");
    r.setAttribute("id", i.style),
      r.classList.add("h5p-toast-disabled"),
      r.classList.add(i.style);
    const a = document.createElement("span");
    (a.innerHTML = t), r.appendChild(a), document.body.appendChild(r);
    t = (function (t, e, i) {
      ((i = i || {}).offsetHorizontal = i.offsetHorizontal || 0),
        (i.offsetVertical = i.offsetVertical || 0);
      var n = e.getBoundingClientRect(),
        s = t.getBoundingClientRect();
      let o = 0,
        r = 0;
      switch (i.horizontal) {
        case "before":
          o = s.left - n.width - i.offsetHorizontal;
          break;
        case "after":
          o = s.left + s.width + i.offsetHorizontal;
          break;
        case "left":
          o = s.left + i.offsetHorizontal;
          break;
        case "right":
          o = s.left + s.width - n.width - i.offsetHorizontal;
          break;
        default:
          o = s.left + s.width / 2 - n.width / 2 + i.offsetHorizontal;
      }
      switch (i.vertical) {
        case "above":
          r = s.top - n.height - i.offsetVertical;
          break;
        case "below":
          r = s.top + s.height + i.offsetVertical;
          break;
        case "top":
          r = s.top + i.offsetVertical;
          break;
        case "bottom":
          r = s.top + s.height - n.height - i.offsetVertical;
          break;
        case "centered":
          r = s.top + s.height / 2 - n.height / 2 + i.offsetVertical;
          break;
        default:
          r = s.top + s.height + i.offsetVertical;
      }
      const a = document.body;
      t = a.getBoundingClientRect();
      return (
        (i.noOverflowLeft || i.noOverflowX) && o < t.x && (o = t.x),
        (i.noOverflowRight || i.noOverflowX) &&
          o + n.width > t.x + t.width &&
          (o = t.x + t.width - n.width),
        (i.noOverflowTop || i.noOverflowY) && r < t.y && (r = t.y),
        (i.noOverflowBottom || i.noOverflowY) &&
          r + n.height > t.y + t.height &&
          (o = t.y + t.height - n.height),
        { left: o, top: r }
      );
    })(e, r, i.position);
    (r.style.left = Math.round(t.left) + "px"),
      (r.style.top = Math.round(t.top) + "px"),
      r.classList.remove("h5p-toast-disabled");
    const l = setTimeout(o, i.duration);
    document.addEventListener("click", n);
  }),
  (H5P.ContentCopyrights = function () {
    var i,
      n = [],
      s = [];
    (this.setLabel = function (t) {
      i = t;
    }),
      (this.addMedia = function (t) {
        void 0 !== t && n.push(t);
      }),
      (this.addMediaInFront = function (t) {
        void 0 !== t && n.unshift(t);
      }),
      (this.addContent = function (t) {
        void 0 !== t && s.push(t);
      }),
      (this.toString = function () {
        for (var t = "", e = 0; e < n.length; e++) t += n[e];
        for (e = 0; e < s.length; e++) t += s[e];
        return (t =
          "" !== t
            ? '<div class="h5p-content-copyrights">' +
              (t = void 0 !== i ? "<h3>" + i + "</h3>" + t : t) +
              "</div>"
            : t);
      });
  }),
  (H5P.MediaCopyright = function (t, e, i, n) {
    function s(t) {
      return void 0 === e || void 0 === e[t] ? H5P.t(t) : e[t];
    }
    function o(t, e) {
      var i,
        n = H5P.copyrightLicenses[t],
        s = "";
      ("PD" === t && e) || (s += n.hasOwnProperty("label") ? n.label : n),
        (i =
          n.versions &&
          (e =
            !n.versions.default || (e && n.versions[e])
              ? e
              : n.versions.default) &&
          n.versions[e]
            ? n.versions[e]
            : i) &&
          (s && (s += " "), (s += i.hasOwnProperty("label") ? i.label : i)),
        n.hasOwnProperty("link")
          ? (o = n.link.replace(
              ":version",
              n.linkVersions ? n.linkVersions[e] : e
            ))
          : i && n.hasOwnProperty("link") && (o = i.link),
        o && (s = '<a href="' + o + '" target="_blank">' + s + "</a>");
      var o = "";
      return (
        "PD" !== t && "C" !== t && (o += t),
        e && "CC0 1.0" !== e && (o && "GNU GPL" !== t && (o += " "), (o += e)),
        o && (s += " (" + o + ")"),
        "C" === t && (s += " &copy;"),
        s
      );
    }
    var r,
      a = new H5P.DefinitionList();
    if (void 0 !== t) {
      for (var l in n) n.hasOwnProperty(l) && (t[l] = n[l]);
      void 0 === i &&
        (i = [
          "contentType",
          "title",
          "license",
          "author",
          "year",
          "source",
          "licenseExtras",
          "changes",
        ]);
      for (var c = 0; c < i.length; c++) {
        var h,
          u = i[c];
        void 0 !== t[u] &&
          "" !== t[u] &&
          ((h = t[u]),
          "license" === u && (h = o(t.license, t.version)),
          "source" === u &&
            (h = h
              ? '<a href="' + h + '" target="_blank">' + h + "</a>"
              : void 0),
          a.add(new H5P.Field(s(u), h)));
      }
    }
    (this.setThumbnail = function (t) {
      r = t;
    }),
      (this.undisclosed = function () {
        if (1 === a.size()) {
          var t = a.get(0);
          if (t.getLabel() === s("license") && t.getValue() === o("U"))
            return !0;
        }
        return !1;
      }),
      (this.toString = function () {
        var t = "";
        return this.undisclosed()
          ? t
          : (void 0 !== r && (t += r),
            "" !== (t += a)
              ? '<div class="h5p-media-copyright">' + t + "</div>"
              : t);
      });
  }),
  (H5P.Thumbnail = function (t, e, i) {
    var n;
    void 0 !== e && (n = Math.round((e / i) * 100)),
      (this.toString = function () {
        return (
          '<img src="' +
          t +
          '" alt="' +
          H5P.t("thumbnail") +
          '" class="h5p-thumbnail" height="100"' +
          (void 0 === n ? "" : ' width="' + n + '"') +
          "/>"
        );
      });
  }),
  (H5P.Field = function (t, e) {
    (this.getLabel = function () {
      return t;
    }),
      (this.getValue = function () {
        return e;
      });
  }),
  (H5P.DefinitionList = function () {
    var n = [];
    (this.add = function (t) {
      n.push(t);
    }),
      (this.size = function () {
        return n.length;
      }),
      (this.get = function (t) {
        return n[t];
      }),
      (this.toString = function () {
        for (var t = "", e = 0; e < n.length; e++) {
          var i = n[e];
          t += "<dt>" + i.getLabel() + "</dt><dd>" + i.getValue() + "</dd>";
        }
        return "" === t ? t : '<dl class="h5p-definition-list">' + t + "</dl>";
      });
  }),
  (H5P.Coords = function (t, e, i, n) {
    return this instanceof H5P.Coords
      ? ((this.x = 0),
        (this.y = 0),
        (this.w = 1),
        (this.h = 1),
        "object" == typeof t
          ? ((this.x = t.x), (this.y = t.y), (this.w = t.w), (this.h = t.h))
          : (void 0 !== t && (this.x = t),
            void 0 !== e && (this.y = e),
            void 0 !== i && (this.w = i),
            void 0 !== n && (this.h = n)),
        this)
      : new H5P.Coords(t, e, i, n);
  }),
  (H5P.libraryFromString = function (t) {
    t = /(.+)\s(\d+)\.(\d+)$/g.exec(t);
    return (
      null !== t && {
        machineName: t[1],
        majorVersion: parseInt(t[2]),
        minorVersion: parseInt(t[3]),
      }
    );
  }),
  (H5P.getLibraryPath = function (t) {
    return void 0 !== H5PIntegration.urlLibraries
      ? H5PIntegration.urlLibraries + "/" + t
      : H5PIntegration.url + "/libraries/" + t;
  }),
  (H5P.cloneObject = function (t, e) {
    var i,
      n = t instanceof Array ? [] : {};
    for (i in t)
      t.hasOwnProperty(i) &&
        (void 0 !== e && e && "object" == typeof t[i]
          ? (n[i] = H5P.cloneObject(t[i], e))
          : (n[i] = t[i]));
    return n;
  }),
  (H5P.trim = function (t) {
    return t.replace(/^\s+|\s+$/g, "");
  }),
  (H5P.jsLoaded = function (t) {
    return (
      (H5PIntegration.loadedJs = H5PIntegration.loadedJs || []),
      -1 !== H5P.jQuery.inArray(t, H5PIntegration.loadedJs)
    );
  }),
  (H5P.cssLoaded = function (t) {
    return (
      (H5PIntegration.loadedCss = H5PIntegration.loadedCss || []),
      -1 !== H5P.jQuery.inArray(t, H5PIntegration.loadedCss)
    );
  }),
  (H5P.shuffleArray = function (t) {
    if (t instanceof Array) {
      var e,
        i,
        n,
        s = t.length;
      if (0 === s) return !1;
      for (; --s; )
        (e = Math.floor(Math.random() * (s + 1))),
          (i = t[s]),
          (n = t[e]),
          (t[s] = n),
          (t[e] = i);
      return t;
    }
  }),
  (H5P.setFinished = function (t, e, i, n) {
    if (
      ("number" == typeof e || e instanceof Number) &&
      !0 === H5PIntegration.postUserStatistics
    ) {
      function s(t) {
        return Math.round(t.getTime() / 1e3);
      }
      const o = {
        contentId: t,
        score: e,
        maxScore: i,
        opened: s(H5P.opened[t]),
        finished: s(new Date()),
        time: n,
      };
      H5P.jQuery.post(H5PIntegration.ajax.setFinished, o).fail(function () {
        H5P.offlineRequestQueue.add(H5PIntegration.ajax.setFinished, o);
      });
    }
  }),
  Array.prototype.indexOf ||
    (Array.prototype.indexOf = function (t) {
      for (var e = 0; e < this.length; e++) if (this[e] === t) return e;
      return -1;
    }),
  void 0 === String.prototype.trim &&
    (String.prototype.trim = function () {
      return H5P.trim(this);
    }),
  (H5P.trigger = function (t, e, i, n) {
    void 0 !== t.trigger
      ? t.trigger(e, i, n)
      : void 0 !== t.$ && void 0 !== t.$.trigger && t.$.trigger(e);
  }),
  (H5P.on = function (t, e, i) {
    void 0 !== t.on
      ? t.on(e, i)
      : void 0 !== t.$ && void 0 !== t.$.on && t.$.on(e, i);
  }),
  (H5P.createUUID = function () {
    return "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(
      /[xy]/g,
      function (t) {
        var e = (16 * Math.random()) | 0;
        return ("x" === t ? e : (3 & e) | 8).toString(16);
      }
    );
  }),
  (H5P.createTitle = function (t, e) {
    if (!t) return "";
    void 0 === e && (e = 60);
    t = H5P.jQuery("<div></div>")
      .text(t.replace(/(<([^>]+)>)/gi, ""))
      .text();
    return (t = t.length > e ? t.substr(0, e - 3) + "..." : t);
  }),
  (function (l) {
    function a(t, e, i, n, s, o, r, a) {
      void 0 !== H5PIntegration.user
        ? ((a = {
            url: H5PIntegration.ajax.contentUserData
              .replace(":contentId", t)
              .replace(":dataType", e)
              .replace(":subContentId", i || 0),
            dataType: "json",
            async: void 0 === a || a,
          }),
          void 0 !== s
            ? ((a.type = "POST"),
              (a.data = {
                data: null === s ? 0 : s,
                preload: o ? 1 : 0,
                invalidate: r ? 1 : 0,
              }))
            : (a.type = "GET"),
          void 0 !== n &&
            ((a.error = function (t, e) {
              n(e);
            }),
            (a.success = function (t) {
              t.success
                ? !1 !== t.data && void 0 !== t.data
                  ? n(void 0, t.data)
                  : n()
                : n(t.message);
            })),
          l.ajax(a))
        : n("Not signed in.");
    }
    (H5P.getUserData = function (t, i, n, s) {
      (s = s || 0), (H5PIntegration.contents = H5PIntegration.contents || {});
      var o = H5PIntegration.contents["cid-" + t] || {},
        r = o.contentUserData;
      if (r && r[s] && void 0 !== r[s][i])
        if ("RESET" !== r[s][i])
          try {
            n(void 0, JSON.parse(r[s][i]));
          } catch (t) {
            n(t);
          }
        else n(void 0, null);
      else
        a(t, i, s, function (t, e) {
          if (t || void 0 === e) n(t, e);
          else {
            void 0 === o.contentUserData && (o.contentUserData = r = {}),
              void 0 === r[s] && (r[s] = {}),
              (r[s][i] = e);
            try {
              n(void 0, JSON.parse(e));
            } catch (t) {
              n(t);
            }
          }
        });
    }),
      (H5P.setUserData = function (t, e, i, n) {
        var s = H5P.jQuery.extend(
          !0,
          {},
          { subContentId: 0, preloaded: !0, deleteOnChange: !1, async: !0 },
          n
        );
        try {
          i = JSON.stringify(i);
        } catch (t) {
          return void (s.errorCallback && s.errorCallback(t));
        }
        n = H5PIntegration.contents["cid-" + t];
        (n = void 0 === n ? (H5PIntegration.contents["cid-" + t] = {}) : n)
          .contentUserData || (n.contentUserData = {});
        n = n.contentUserData;
        void 0 === n[s.subContentId] && (n[s.subContentId] = {}),
          i !== n[s.subContentId][e] &&
            ((n[s.subContentId][e] = i),
            a(
              t,
              e,
              s.subContentId,
              function (t) {
                s.errorCallback && t && s.errorCallback(t);
              },
              i,
              s.preloaded,
              s.deleteOnChange,
              s.async
            ));
      }),
      (H5P.deleteUserData = function (t, e, i) {
        i = i || 0;
        var n = H5PIntegration.contents["cid-" + t].contentUserData;
        n && n[i] && n[i][e] && delete n[i][e], a(t, e, i, void 0, null);
      }),
      (H5P.getContentForInstance = function (t) {
        t = "cid-" + t;
        return H5PIntegration &&
          H5PIntegration.contents &&
          H5PIntegration.contents[t]
          ? H5PIntegration.contents[t]
          : void 0;
      }),
      (H5P.ClipboardItem = function (t, e, i) {
        var n = this;
        e || ((e = "action"), (t = { action: t })),
          (n.specific = t),
          e && t[e] && (n.generic = e),
          i && (n.from = i),
          window.H5PEditor &&
            H5PEditor.contentId &&
            (n.contentId = H5PEditor.contentId),
          n.specific.width ||
            n.specific.height ||
            !n.generic ||
            ((i = n.specific[n.generic]).params.file &&
              i.params.file.width &&
              i.params.file.height &&
              ((n.width = 20),
              (n.height =
                (i.params.file.height / i.params.file.width) * n.width)));
      }),
      (H5P.clipboardify = function (t) {
        t instanceof H5P.ClipboardItem || (t = new H5P.ClipboardItem(t)),
          H5P.setClipboard(t);
      }),
      (H5P.getClipboard = function () {
        return t();
      }),
      (H5P.setClipboard = function (t) {
        localStorage.setItem("h5pClipboard", JSON.stringify(t)),
          H5P.externalDispatcher.trigger("datainclipboard", { reset: !1 });
      }),
      (H5P.getLibraryConfig = function (t) {
        return H5PIntegration.libraryConfig && H5PIntegration.libraryConfig[t]
          ? H5PIntegration.libraryConfig[t]
          : {};
      });
    var t = function () {
        var e = localStorage.getItem("h5pClipboard");
        if (e) {
          try {
            e = JSON.parse(e);
          } catch (t) {
            return void console.error(
              "Unable to parse JSON from clipboard.",
              t
            );
          }
          return (
            n(e.specific, function (t) {
              return "#tmp" === t.substr(-4, 4) ||
                !e.contentId ||
                t.match(/^https?:\/\//i)
                ? t
                : H5PEditor.contentId
                ? "../" + e.contentId + "/" + t
                : (H5PEditor.contentRelUrl || "../content/") +
                  e.contentId +
                  "/" +
                  t;
            }),
            e.generic && (e.generic = e.specific[e.generic]),
            e
          );
        }
      },
      n = function (t, e) {
        for (var i in t)
          t.hasOwnProperty(i) &&
            t[i] instanceof Object &&
            (void 0 !== (i = t[i]).path && void 0 !== i.mime
              ? (i.path = e(i.path))
              : (void 0 !== i.library &&
                  void 0 !== i.subContentId &&
                  delete i.subContentId,
                n(i, e)));
      };
    l(document).ready(function () {
      window.addEventListener("storage", function (t) {
        "h5pClipboard" === t.key &&
          H5P.externalDispatcher.trigger("datainclipboard", {
            reset: null === t.newValue,
          });
      });
      var s,
        t,
        e = {
          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: e,
        },
        "CC BY-SA": {
          label: H5P.t("licenseCCBYSA"),
          link: "http://creativecommons.org/licenses/by-sa/:version",
          versions: e,
        },
        "CC BY-ND": {
          label: H5P.t("licenseCCBYND"),
          link: "http://creativecommons.org/licenses/by-nd/:version",
          versions: e,
        },
        "CC BY-NC": {
          label: H5P.t("licenseCCBYNC"),
          link: "http://creativecommons.org/licenses/by-nc/:version",
          versions: e,
        },
        "CC BY-NC-SA": {
          label: H5P.t("licenseCCBYNCSA"),
          link: "http://creativecommons.org/licenses/by-nc-sa/:version",
          versions: e,
        },
        "CC BY-NC-ND": {
          label: H5P.t("licenseCCBYNCND"),
          link: "http://creativecommons.org/licenses/by-nc-nd/:version",
          versions: e,
        },
        "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 (t) {
            window.parent.H5P.externalDispatcher.trigger.call(this, t);
          }),
        H5P.preventInit || H5P.init(document.body),
        !1 !== H5PIntegration.saveFreq &&
          ((s = 0),
          (t = function () {
            var t = new Date().getTime();
            if (250 < t - s) {
              s = t;
              for (var e = 0; e < H5P.instances.length; e++) {
                var i,
                  n = H5P.instances[e];
                !(
                  n.getCurrentState instanceof Function ||
                  "function" == typeof n.getCurrentState
                ) ||
                  (void 0 !== (i = n.getCurrentState()) &&
                    H5P.setUserData(n.contentId, "state", i, {
                      deleteOnChange: !0,
                      async: !1,
                    }));
              }
            }
          }),
          H5P.$window.one("beforeunload unload", function () {
            H5P.$window.off("pagehide beforeunload unload"), t();
          }),
          H5P.$window.on("pagehide", t));
    });
  })(H5P.jQuery),
  ((H5P = window.H5P = window.H5P || {}).Event = function (t, e, i) {
    (this.type = t), (this.data = e);
    var n = !1,
      s = !1,
      o = !1;
    !0 === (i = void 0 === i ? {} : i).bubbles && (n = !0),
      !0 === i.external && (s = !0),
      (this.preventBubbling = function () {
        n = !1;
      }),
      (this.getBubbles = function () {
        return n;
      }),
      (this.scheduleForExternal = function () {
        return !(!s || o) && (o = !0);
      });
  }),
  (H5P.EventDispatcher = function () {
    var s = this,
      r = {};
    function n(t, e) {
      if (void 0 !== r[t])
        for (var i = r[t].slice(), n = 0; n < i.length; n++) {
          var s = i[n],
            o = s.thisArg || this;
          s.listener.call(o, e);
        }
    }
    (this.on = function (t, e, i) {
      if ("function" != typeof e)
        throw TypeError("listener must be a function");
      s.trigger("newListener", { type: t, listener: e });
      i = { listener: e, thisArg: i };
      r[t] ? r[t].push(i) : (r[t] = [i]);
    }),
      (this.once = function (t, e, i) {
        if (!(e instanceof Function))
          throw TypeError("listener must be a function");
        var n = function (t) {
          s.off(t.type, n), e.call(this, t);
        };
        s.on(t, n, i);
      }),
      (this.off = function (t, e) {
        if (void 0 !== e && !(e instanceof Function))
          throw TypeError("listener must be a function");
        if (void 0 !== r[t]) {
          if (void 0 === e)
            return delete r[t], void s.trigger("removeListener", t);
          for (var i = 0; i < r[t].length; i++)
            if (r[t][i].listener === e) {
              r[t].splice(i, 1),
                s.trigger("removeListener", t, { listener: e });
              break;
            }
          r[t].length || delete r[t];
        }
      }),
      (this.trigger = function (t, e, i) {
        void 0 !== t &&
          (t instanceof String || "string" == typeof t
            ? (t = new H5P.Event(t, e, i))
            : void 0 !== e && (t.data = e),
          (e = t.scheduleForExternal()),
          n.call(this, t.type, t),
          n.call(this, "*", t),
          t.getBubbles() &&
            s.parent instanceof H5P.EventDispatcher &&
            (s.parent.trigger instanceof Function ||
              "function" == typeof s.parent.trigger) &&
            s.parent.trigger(t),
          e && H5P.externalDispatcher.trigger.call(this, t));
      });
  }),
  ((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 (t, e, i, n, s) {
    (this.data.statement.result = {}),
      void 0 !== t &&
        (void 0 === e
          ? (this.data.statement.result.score = { raw: t })
          : ((this.data.statement.result.score = { min: 0, max: e, raw: t }),
            0 < e &&
              (this.data.statement.result.score.scaled =
                Math.round((t / e) * 1e4) / 1e4))),
      (this.data.statement.result.completion =
        void 0 === n
          ? "completed" === this.getVerb() || "answered" === this.getVerb()
          : n),
      void 0 !== s && (this.data.statement.result.success = s),
      i &&
        i.activityStartTime &&
        ((i = Math.round((Date.now() - i.activityStartTime) / 10) / 100),
        (this.data.statement.result.duration = "PT" + i + "S"));
  }),
  (H5P.XAPIEvent.prototype.setVerb = function (t) {
    -1 !== H5P.jQuery.inArray(t, H5P.XAPIEvent.allowedXAPIVerbs)
      ? (this.data.statement.verb = {
          id: "http://adlnet.gov/expapi/verbs/" + t,
          display: { "en-US": t },
        })
      : void 0 !== t.id && (this.data.statement.verb = t);
  }),
  (H5P.XAPIEvent.prototype.getVerb = function (t) {
    var e = this.data.statement;
    return "verb" in e ? (!0 === t ? e.verb : e.verb.id.slice(31)) : null;
  }),
  (H5P.XAPIEvent.prototype.setObject = function (t) {
    t.contentId
      ? ((this.data.statement.object = {
          id: this.getContentXAPIId(t),
          objectType: "Activity",
          definition: {
            extensions: {
              "http://h5p.org/x-api/h5p-local-content-id": t.contentId,
            },
          },
        }),
        t.subContentId
          ? ((this.data.statement.object.definition.extensions[
              "http://h5p.org/x-api/h5p-subContentId"
            ] = t.subContentId),
            "function" == typeof t.getTitle &&
              (this.data.statement.object.definition.name = {
                "en-US": t.getTitle(),
              }))
          : (t = H5P.getContentForInstance(t.contentId)) &&
            t.metadata &&
            t.metadata.title &&
            (this.data.statement.object.definition.name = {
              "en-US": H5P.createTitle(t.metadata.title),
            }))
      : (this.data.statement.object = { definition: {} });
  }),
  (H5P.XAPIEvent.prototype.setContext = function (t) {
    t.parent &&
      (t.parent.contentId || t.parent.subContentId) &&
      (this.data.statement.context = {
        contextActivities: {
          parent: [
            { id: this.getContentXAPIId(t.parent), objectType: "Activity" },
          ],
        },
      }),
      t.libraryInfo &&
        (void 0 === this.data.statement.context &&
          (this.data.statement.context = { contextActivities: {} }),
        (this.data.statement.context.contextActivities.category = [
          {
            id:
              "http://h5p.org/libraries/" + t.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 e;
      try {
        localStorage.H5PUserUUID
          ? (e = localStorage.H5PUserUUID)
          : ((e = H5P.createUUID()), (localStorage.H5PUserUUID = e));
      } catch (t) {
        e = "not-trackable-" + H5P.createUUID();
      }
      this.data.statement.actor = {
        account: { name: e, 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 (t) {
    var e;
    return (
      t.contentId &&
        H5PIntegration &&
        H5PIntegration.contents &&
        H5PIntegration.contents["cid-" + t.contentId] &&
        ((e = H5PIntegration.contents["cid-" + t.contentId].url),
        t.subContentId && (e += "?subContentId=" + t.subContentId)),
      e
    );
  }),
  (H5P.XAPIEvent.prototype.isFromChild = function () {
    var t = this.getVerifiedStatementValue([
      "context",
      "contextActivities",
      "parent",
      0,
      "id",
    ]);
    return !t || -1 === t.indexOf("subContentId");
  }),
  (H5P.XAPIEvent.prototype.getVerifiedStatementValue = function (t) {
    for (var e = this.data.statement, i = 0; i < t.length; i++) {
      if (void 0 === e[t[i]]) return null;
      e = e[t[i]];
    }
    return e;
  }),
  (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 (t, e) {
    this.trigger(this.createXAPIEventTemplate(t, e));
  }),
  (H5P.EventDispatcher.prototype.createXAPIEventTemplate = function (t, e) {
    var i = new H5P.XAPIEvent();
    if ((i.setActor(), i.setVerb(t), void 0 !== e))
      for (var n in e) i.data.statement[n] = e[n];
    return (
      "object" in i.data.statement || i.setObject(this),
      "context" in i.data.statement || i.setContext(this),
      i
    );
  }),
  (H5P.EventDispatcher.prototype.triggerXAPICompleted = function (t, e, i) {
    this.triggerXAPIScored(t, e, "completed", !0, i);
  }),
  (H5P.EventDispatcher.prototype.triggerXAPIScored = function (t, e, i, n, s) {
    i = this.createXAPIEventTemplate(i);
    i.setScoredResult(t, e, this, n, s), this.trigger(i);
  }),
  (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 (t) {
    var e, i;
    ("completed" !== t.getVerb() && "answered" !== t.getVerb()) ||
      t.getVerifiedStatementValue(["context", "contextActivities", "parent"]) ||
      ((e = t.getScore()),
      (i = t.getMaxScore()),
      (t = t.getVerifiedStatementValue([
        "object",
        "definition",
        "extensions",
        "http://h5p.org/x-api/h5p-local-content-id",
      ])),
      H5P.setFinished(t, e, i));
  }) /*!@license js/h5p-content-type.js by Joubel and other contributors, licensed under GNU GENERAL PUBLIC LICENSE Version 3*/,
  (H5P.ContentType = function (t) {
    function e() {}
    return (
      ((e.prototype = new H5P.EventDispatcher()).isRoot = function () {
        return t;
      }),
      (e.prototype.getLibraryFilePath = function (t) {
        return (
          H5P.getLibraryPath(this.libraryInfo.versionedNameNoSpaces) + "/" + t
        );
      }),
      e
    );
  }) /*!@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 t(i) {
      C.call(this);
      var n = this;
      H5P.ConfirmationDialog.uniqueId += 1;
      var t = H5P.ConfirmationDialog.uniqueId;
      function e(t) {
        n.hide(), n.trigger("confirmed"), t.preventDefault();
      }
      function s(t) {
        n.hide(), n.trigger("canceled"), t.preventDefault();
      }
      function o(t, e) {
        t.focus(), e.preventDefault();
      }
      ((i = i || {}).headerText = i.headerText || H5P.t("confirmDialogHeader")),
        (i.dialogText = i.dialogText || H5P.t("confirmDialogBody")),
        (i.cancelText = i.cancelText || H5P.t("cancelLabel")),
        (i.confirmText = i.confirmText || H5P.t("confirmLabel"));
      var r = 32,
        a = 8,
        l = !1,
        c = document.createElement("div");
      c.classList.add("h5p-confirmation-dialog-background", "hidden", "hiding");
      var h = document.createElement("div");
      h.classList.add("h5p-confirmation-dialog-popup", "hidden"),
        i.classes &&
          i.classes.forEach(function (t) {
            h.classList.add(t);
          }),
        h.setAttribute("role", "dialog"),
        h.setAttribute(
          "aria-labelledby",
          "h5p-confirmation-dialog-dialog-text-" + t
        ),
        c.appendChild(h),
        h.addEventListener("keydown", function (t) {
          27 === t.which && s(t);
        });
      var u = document.createElement("div");
      u.classList.add("h5p-confirmation-dialog-header"), h.appendChild(u);
      var d = document.createElement("div");
      d.classList.add("h5p-confirmation-dialog-header-text"),
        (d.innerHTML = i.headerText),
        u.appendChild(d);
      u = document.createElement("div");
      u.classList.add("h5p-confirmation-dialog-body"), h.appendChild(u);
      d = document.createElement("div");
      d.classList.add("h5p-confirmation-dialog-text"),
        (d.innerHTML = i.dialogText),
        (d.id = "h5p-confirmation-dialog-dialog-text-" + t),
        u.appendChild(d);
      d = document.createElement("div");
      d.classList.add("h5p-confirmation-dialog-buttons"), u.appendChild(d);
      var p = document.createElement("button");
      p.classList.add("h5p-core-cancel-button"), (p.textContent = i.cancelText);
      var f = document.createElement("button");
      f.classList.add("h5p-core-button"),
        f.classList.add("h5p-confirmation-dialog-confirm-button"),
        (f.textContent = i.confirmText);
      var g,
        m,
        u = document.createElement("button");
      u.classList.add("h5p-confirmation-dialog-exit"),
        u.setAttribute("aria-hidden", "true"),
        (u.tabIndex = -1),
        (u.title = i.cancelText),
        p.addEventListener("click", s),
        p.addEventListener("keydown", function (t) {
          32 === t.which ? s(t) : 9 === t.which && t.shiftKey && o(f, t);
        }),
        i.hideCancel ? d.classList.add("center") : d.appendChild(p),
        f.addEventListener("click", e),
        f.addEventListener("keydown", function (t) {
          32 === t.which
            ? e(t)
            : 9 !== t.which || t.shiftKey || o(i.hideCancel ? f : p, t);
        }),
        d.appendChild(f),
        u.addEventListener("click", s),
        u.addEventListener("keydown", function (t) {
          32 === t.which && s(t);
        }),
        i.hideExit || h.appendChild(u);
      var v,
        b = [],
        y = [];
      this.appendTo = function (t) {
        return (g = t), this;
      };
      var w = function (t) {
          c.contains(t.target) || (t.preventDefault(), f.focus());
        },
        _ = function (t) {
          for (
            var e = [], i = t.parentNode.children, n = 0;
            n < i.length;
            n += 1
          )
            (e[n] = !!i[n].getAttribute("aria-hidden")),
              i[n] !== t && i[n].setAttribute("aria-hidden", !0);
          return e;
        },
        x = function (t, e) {
          for (var i = t.parentNode.children, n = 0; n < i.length; n += 1)
            i[n] === t || e[n] || i[n].removeAttribute("aria-hidden");
        };
      (this.show = function (t) {
        var e;
        return (
          (v = document.activeElement),
          g.appendChild(c),
          (m = g.parentNode || g).addEventListener("focus", w, !0),
          (b = _(g)),
          (y = _(c)),
          c.classList.remove("hidden"),
          (e = t),
          (t = parseInt(h.style.top, 10)),
          (t =
            (t = (t = void 0 !== e ? e : t) || 0) + h.offsetHeight >
            g.offsetHeight
              ? g.offsetHeight - h.offsetHeight - a
              : t) -
            r <=
            0 && ((t = r + a), (l = !0)),
          (h.style.top = t + "px"),
          setTimeout(function () {
            h.classList.remove("hidden"),
              c.classList.remove("hiding"),
              setTimeout(function () {
                var t;
                f.focus(),
                  l &&
                    i.instance &&
                    ((t = parseInt(h.offsetHeight, 10) + r + 2 * a),
                    n.setViewPortMinimumHeight(t),
                    i.instance.trigger("resize"),
                    (l = !1));
              }, 100);
          }, 0),
          this
        );
      }),
        (this.hide = function () {
          return (
            c.classList.add("hiding"),
            h.classList.add("hidden"),
            m.removeAttribute("aria-hidden"),
            m.removeEventListener("focus", w, !0),
            i.skipRestoreFocus || v.focus(),
            x(g, b),
            x(c, y),
            setTimeout(function () {
              c.classList.add("hidden"),
                g.removeChild(c),
                n.setViewPortMinimumHeight(null);
            }, 100),
            this
          );
        }),
        (this.getElement = function () {
          return h;
        }),
        (this.getPreviouslyFocused = function () {
          return v;
        }),
        (this.setViewPortMinimumHeight = function (t) {
          (
            document.querySelector(".h5p-container") || document.body
          ).style.minHeight = "number" == typeof t ? t + "px" : t;
        });
    }
    return ((t.prototype = Object.create(C.prototype)).constructor = t);
  })(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 (i) {
    "use strict";
    function t(t) {
      i.call(this);
      function e(t, e) {
        function i() {
          n.trigger(t);
        }
        H5P.jQuery("<li/>", {
          class: "h5p-button h5p-noselect h5p-" + (e || t),
          role: "button",
          tabindex: 0,
          title: H5P.t(t + "Description"),
          html: H5P.t(t),
          on: {
            click: i,
            keypress: function (t) {
              32 === t.which && (i(), t.preventDefault());
            },
          },
          appendTo: o,
        }),
          (s = !0);
      }
      var n = this,
        s = !1,
        o = H5P.jQuery('<ul class="h5p-actions"></ul>');
      (t.export || t.copy) && e("reuse", "export"),
        t.copyright && e("copyrights"),
        t.embed && e("embed"),
        t.icon &&
          (H5P.jQuery(
            '<li><a class="h5p-link" href="http://h5p.org" target="_blank" title="' +
              H5P.t("h5pDescription") +
              '"></a></li>'
          ).appendTo(o),
          (s = !0)),
        (n.getDOMElement = function () {
          return o;
        }),
        (n.hasActions = function () {
          return s;
        });
    }
    return ((t.prototype = Object.create(i.prototype)).constructor = t);
  })(
    (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 (i, e) {
    function t(t) {
      e.call(this),
        (this.processingQueue = !1),
        (this.showToast = (t = t || {}).showToast),
        (this.itemName = "requestQueue");
    }
    return (
      (t.prototype.add = function (t, e) {
        if (!window.localStorage) return !1;
        let i = this.getStoredRequests();
        return (
          (i = i || []),
          i.push({ url: t, data: e }),
          window.localStorage.setItem(this.itemName, JSON.stringify(i)),
          this.trigger("requestQueued", {
            storedStatements: i,
            processingQueue: this.processingQueue,
          }),
          !0
        );
      }),
      (t.prototype.getStoredRequests = function () {
        if (!window.localStorage) return !1;
        var t = window.localStorage.getItem(this.itemName);
        return t ? JSON.parse(t) : [];
      }),
      (t.prototype.clearQueue = function () {
        return (
          !!window.localStorage &&
          (window.localStorage.removeItem(this.itemName), !0)
        );
      }),
      (t.prototype.resumeQueue = function () {
        if (!H5PIntegration || !window.navigator || !window.localStorage)
          return !1;
        if (this.processingQueue) return !1;
        var t = this.getStoredRequests(),
          e = t.length;
        return (
          this.clearQueue(),
          e
            ? ((this.processingQueue = !0), this.processQueue(t))
            : this.trigger("emptiedQueue", t),
          !0
        );
      }),
      (t.prototype.processQueue = function (t) {
        var e;
        t.length &&
          (this.trigger("processingQueue"),
          (e = t.shift()),
          i
            .post(e.url, e.data)
            .fail(this.onQueuedRequestFail.bind(this, e))
            .always(this.onQueuedRequestProcessed.bind(this, t)));
      }),
      (t.prototype.onQueuedRequestFail = function (t) {
        window.navigator.onLine || this.add(t.url, t.data);
      }),
      (t.prototype.onQueuedRequestProcessed = function (t) {
        t.length
          ? this.processQueue(t)
          : ((this.processingQueue = !1),
            (t = this.getStoredRequests()),
            this.trigger("queueEmptied", t));
      }),
      (t.prototype.displayToastMessage = function (t, e, i) {
        (this.showToast || e) &&
          ((i = H5P.jQuery.extend(
            !0,
            {},
            {
              position: {
                horizontal: "centered",
                vertical: "centered",
                noOverflowX: !0,
              },
            },
            i
          )),
          H5P.attachToastTo(H5P.jQuery(".h5p-content:first")[0], t, i));
      }),
      t
    );
  })(H5P.jQuery, H5P.EventDispatcher)),
  (H5P.OfflineRequestQueue = (function (w, _) {
    return function (t) {
      const i = new w();
      i.clearQueue();
      let n = null;
      const s = [10, 20, 40, 60, 120, 300, 600];
      let o = -1,
        e = null,
        r = !1,
        a = !1,
        l = !1;
      t = t.instance;
      const c = new _({
          headerText: H5P.t("offlineDialogHeader"),
          dialogText: H5P.t("offlineDialogBody"),
          confirmText: H5P.t("offlineDialogRetryButtonLabel"),
          hideCancel: !0,
          hideExit: !0,
          classes: ["offline"],
          instance: t,
          skipRestoreFocus: !0,
        }),
        h = c.getElement(),
        u = document.createElement("div");
      u.classList.add("count-down"),
        (u.innerHTML = H5P.t("offlineDialogRetryMessage").replace(
          ":num",
          '<span class="count-down-num">0</span>'
        )),
        h.querySelector(".h5p-confirmation-dialog-text").appendChild(u);
      const d = u.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),
        i.on(
          "requestQueued",
          function (t) {
            if (!t.data || !t.data.processingQueue) {
              if (!r) {
                const e = document.body.querySelector(".h5p-content");
                if (!e) return;
                c.appendTo(e), e.appendChild(p), (r = !0);
              }
              b();
            }
          }.bind(this)
        ),
        i.on(
          "queueEmptied",
          function (t) {
            t.data && t.data.length
              ? b(!0)
              : (clearInterval(e),
                g(!1),
                (o = -1),
                a && (c.hide(), (a = !1)),
                i.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 (t) {
            window.parent === t.source &&
              "h5p" === t.data.context &&
              "queueRequest" === t.data.action &&
              this.add(t.data.url, t.data.data);
          }.bind(this)
        );
      const g = function (t) {
          (l = !l),
            void 0 !== t && (l = t),
            l && a && (c.hide(), (a = !1)),
            l ? p.classList.add("show") : p.classList.remove("show");
        },
        m = function () {
          clearInterval(e), g(!0), i.resumeQueue();
        },
        v = function () {
          (o += 1), o >= s.length && (o = s.length - 1);
        },
        b = function (t) {
          a ||
            (g(!1),
            a ||
              (t
                ? setTimeout(function () {
                    c.show(0);
                  }, 100)
                : c.show(0)),
            (a = !0),
            (n = new Date().getTime()),
            v(),
            clearInterval(e),
            (e = setInterval(y, 100)));
        },
        y = function () {
          var t = new Date().getTime(),
            t = Math.floor((t - n) / 1e3);
          const e = s[o] - t;
          (d.textContent = e.toString()), e <= 0 && m();
        };
      this.add = function (t, e) {
        if (window.navigator.onLine) return !1;
        i.add(t, e);
      };
    };
  })(H5P.RequestQueue, H5P.ConfirmationDialog)),
  (function (n) {
    (H5P.Image = function (t, e, i) {
      H5P.EventDispatcher.call(this),
        (this.extras = i),
        void 0 !== t.file && t.file instanceof Object
          ? ((this.source = H5P.getPath(t.file.path, e)),
            (this.width = t.file.width),
            (this.height = t.file.height))
          : (this.placeholder = !0),
        (this.alt =
          t.decorative || void 0 === t.alt
            ? ""
            : this.stripHTML(this.htmlDecode(t.alt))),
        void 0 !== t.title &&
          (this.title = this.stripHTML(this.htmlDecode(t.title)));
    }),
      (H5P.Image.prototype = Object.create(H5P.EventDispatcher.prototype)),
      (H5P.Image.prototype.constructor = H5P.Image),
      (H5P.Image.prototype.attach = function (t) {
        var e = this,
          i = this.source;
        void 0 === e.$img &&
          (e.placeholder
            ? (e.$img = n("<div>", {
                width: "100%",
                height: "100%",
                class: "h5p-placeholder",
                title: void 0 === this.title ? "" : this.title,
                on: {
                  load: function () {
                    e.trigger("loaded");
                  },
                },
              }))
            : (e.$img = n("<img>", {
                width: "100%",
                height: "100%",
                src: i,
                alt: this.alt,
                title: void 0 === this.title ? "" : this.title,
                on: {
                  load: function () {
                    e.trigger("loaded");
                  },
                },
              }))),
          t.addClass("h5p-image").html(e.$img);
      }),
      (H5P.Image.prototype.htmlDecode = function (t) {
        return new DOMParser().parseFromString(t, "text/html").documentElement
          .textContent;
      }),
      (H5P.Image.prototype.stripHTML = function (t) {
        const e = document.createElement("div");
        return (e.innerHTML = t), e.textContent || e.innerText || "";
      }),
      H5P.Image;
  })((H5P = H5P || {}).jQuery),
  /*!@license H5P.AdvancedText-1.1/text.js by Joubel licensed under unknown license*/ (H5P.AdvancedText =
    (function (n) {
      function t(t, e) {
        n.call(this);
        var i = void 0 === t.text ? "<em>New text</em>" : t.text;
        this.attach = function (t) {
          t.addClass("h5p-advanced-text").html(i);
        };
      }
      return ((t.prototype = Object.create(n.prototype)).constructor = t);
    })((H5P.jQuery, H5P.EventDispatcher))),
  ((H5P = H5P || {}).Transition = (function () {
    Transition = {
      transitionEndEventNames: {
        WebkitTransition: "webkitTransitionEnd",
        transition: "transitionend",
        MozTransition: "transitionend",
        OTransition: "oTransitionEnd",
        msTransition: "MSTransitionEnd",
      },
      cache: [],
      getVendorPropertyName: function (t) {
        if (void 0 !== Transition.cache[t]) return Transition.cache[t];
        var e = document.createElement("div");
        if (t in e.style) Transition.cache[t] = t;
        else {
          var i = ["Moz", "Webkit", "O", "ms"],
            n = t.charAt(0).toUpperCase() + t.substr(1);
          if (t in e.style) Transition.cache[t] = t;
          else
            for (var s = 0; s < i.length; ++s) {
              var o = i[s] + n;
              if (o in e.style) {
                Transition.cache[t] = o;
                break;
              }
            }
        }
        return Transition.cache[t];
      },
      getTransitionEndEventName: function () {
        return (
          Transition.transitionEndEventNames[
            Transition.getVendorPropertyName("transition")
          ] || void 0
        );
      },
      onTransitionEnd: function (t, e, i) {
        (i = i || 1e3),
          (Transition.transitionEndEventName =
            Transition.transitionEndEventName ||
            Transition.getTransitionEndEventName());
        function n() {
          s ||
            (t.off(Transition.transitionEndEventName, e),
            (s = !0),
            clearTimeout(o),
            e());
        }
        var s = !1,
          o = setTimeout(function () {
            n();
          }, i);
        t.on(Transition.transitionEndEventName, function () {
          n();
        });
      },
    };
    function n(t, e) {
      var i;
      e >= t.length ||
        ((i = t[e]),
        H5P.Transition.onTransitionEnd(
          i.$element,
          function () {
            i.end && i.end(), !0 !== i.break && n(t, e + 1);
          },
          i.timeout || void 0
        ));
    }
    return (
      (Transition.sequence = function (t) {
        n(t, 0);
      }),
      Transition
    );
  })(H5P.jQuery)),
  ((H5P = H5P || {}).JoubelHelpTextDialog = (function (h) {
    var u = 0;
    function t(t, e, i) {
      H5P.EventDispatcher.call(this);
      var n = this,
        s = "joubel-help-text-header-" + ++u,
        o = "joubel-help-text-body-" + u,
        r = h("<div>", {
          class: "joubel-help-text-dialog-box",
          role: "dialog",
          "aria-labelledby": s,
          "aria-describedby": o,
        });
      h("<div>", { class: "joubel-help-text-dialog-background" }).appendTo(r);
      var a = h("<div>", {
        class: "joubel-help-text-dialog-container",
      }).appendTo(r);
      h("<div>", {
        class: "joubel-help-text-header",
        id: s,
        role: "header",
        html: t,
      }).appendTo(a),
        h("<div>", {
          class: "joubel-help-text-body",
          id: o,
          html: e,
          role: "document",
          tabindex: 0,
        }).appendTo(a);
      function l() {
        r.remove(), n.trigger("closed");
      }
      var c = h("<div>", {
        class: "joubel-help-text-remove",
        role: "button",
        title: i,
        tabindex: 1,
        click: l,
        keydown: function (t) {
          -1 !== [32, 13].indexOf(t.which) && (t.preventDefault(), l());
        },
      }).appendTo(a);
      (n.getElement = function () {
        return r;
      }),
        (n.focus = function () {
          c.focus();
        });
    }
    return ((t.prototype = Object.create(
      H5P.EventDispatcher.prototype
    )).constructor = t);
  })(H5P.jQuery)),
  ((H5P = H5P || {}).JoubelMessageDialog = (function (o) {
    return function (t, e) {
      function i() {
        n.remove(), clearTimeout(s), t.off("click.messageDialog");
      }
      var n = o("<div/>", { class: "joubel-message-dialog", text: e }).appendTo(
          t
        ),
        s = setTimeout(i, 3e3);
      return t.on("click.messageDialog", i), n;
    };
  })(H5P.jQuery)),
  ((H5P = H5P || {}).JoubelProgressCircle = (function (a) {
    function t(e, t, i, n) {
      (i = i || "#f0f0f0"), (n = n || "#ffffff");
      var s = this.hexToRgb((t = t || "#1a73d9"));
      try {
        if ("" === (e = Number(e))) throw "is empty";
        if (isNaN(e)) throw "is not a number";
      } catch (t) {
        e = "err";
      }
      100 < e && (e = 100);
      var o =
          "rgb(" +
          parseInt(s.r, 10) +
          "," +
          parseInt(s.g, 10) +
          "," +
          parseInt(s.b, 10) +
          ")",
        r = a("<div/>", { class: "joubel-progress-circle-wrapper" }),
        t = a("<div/>", {
          class: "joubel-progress-circle-active-border",
        }).appendTo(r),
        s = a("<div/>", { class: "joubel-progress-circle-circle" }).appendTo(t);
      a("<span/>", {
        text: e + "%",
        class: "joubel-progress-circle-percentage",
      }).appendTo(s);
      e *= 3.6;
      return (
        (e <= 180
          ? t.css(
              "background-image",
              "linear-gradient(" +
                (90 + e) +
                "deg, transparent 50%, " +
                i +
                " 50%),linear-gradient(90deg, " +
                i +
                " 50%, transparent 50%)"
            )
          : t.css(
              "background-image",
              "linear-gradient(" +
                (e - 90) +
                "deg, transparent 50%, " +
                o +
                " 50%),linear-gradient(90deg, " +
                i +
                " 50%, transparent 50%)"
            )
        )
          .css("border", "2px solid" + n)
          .css("background-color", o),
        (this.$activeBorder = t),
        (this.$backgroundCircle = s),
        (this.$wrapper = r),
        this.initResizeFunctionality(),
        r
      );
    }
    return (
      (t.prototype.initResizeFunctionality = function () {
        var t = this;
        a(window).resize(function () {
          setTimeout(function () {
            t.resize();
          });
        }),
          setTimeout(function () {
            t.resize();
          }, 0);
      }),
      (t.prototype.resize = function () {
        var t,
          e,
          i,
          n = this.$wrapper.parent();
        void 0 !== n &&
          n &&
          ((i = parseInt(n.css("font-size"), 10)),
          (e =
            (t =
              parseInt(i / 4.5, 10) % 2 == 0
                ? parseInt(i / 4.5, 10) + 4
                : parseInt(i / 4.5, 10) + 5) / 2),
          this.$activeBorder.css({
            width: (n = 3.75 * i),
            height: (i = 3.75 * i),
          }),
          this.$backgroundCircle.css({
            width: n - t,
            height: i - t,
            top: e,
            left: e,
          }));
      }),
      (t.prototype.hexToRgb = function (t) {
        t = /^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(t);
        return t
          ? {
              r: parseInt(t[1], 16),
              g: parseInt(t[2], 16),
              b: parseInt(t[3], 16),
            }
          : null;
      }),
      t
    );
  })(H5P.jQuery)),
  ((H5P = H5P || {}).SimpleRoundedButton = (function (i) {
    return function (t) {
      var e = i("<div>", {
        class: "joubel-simple-rounded-button",
        title: t,
        role: "button",
        tabindex: "0",
      }).keydown(function (t) {
        -1 !== [32, 13].indexOf(t.which) &&
          (i(this).click(), t.preventDefault());
      });
      return (
        i("<span>", {
          class: "joubel-simple-rounded-button-text",
          html: t,
        }).appendTo(e),
        e
      );
    };
  })(H5P.jQuery)),
  ((H5P = H5P || {}).JoubelSpeechBubble = (function (o) {
    var r,
      a,
      l,
      c,
      h,
      u,
      d = !!navigator.userAgent.match(/iPod|iPhone|iPad/g);
    function p(t) {
      var e = t.closest(".h5p-frame");
      return (e = !e.length ? t.closest(".h5p-container") : e);
    }
    function f() {
      g(r, a, u, l, c);
    }
    function g(t, e, i, n, s) {
      var o = (function (t, e) {
          (t = t[0].getBoundingClientRect()),
            (e = e[0].getBoundingClientRect());
          return {
            top: e.top - t.top,
            right: t.right - e.right,
            bottom: t.bottom - e.bottom,
            left: e.left - t.left,
            innerWidth: e.width,
            innerHeight: e.height,
            outerWidth: t.width,
            outerHeight: t.height,
          };
        })(p(e), e),
        r = o.bottom > o.top ? "bottom" : "top",
        a = 0.9 * o.outerWidth,
        i = i < a ? i : a,
        a = (function (t, e) {
          var i = {},
            n = t / 2;
          (i.top = e.top + e.innerHeight),
            (i.bottom = e.bottom + e.innerHeight + 9),
            e.left < n
              ? (i.left = 3)
              : e.left + n > e.outerWidth
              ? (i.left = e.outerWidth - t - 3)
              : (i.left = e.left - n + e.innerWidth / 2);
          return i;
        })(i, o),
        e = (function (t, e, i, n) {
          var s = {},
            t = t - 20;
          (s.left = i.left - e.left + n / 2 - 6), s.left < 9 && (s.left = 9);
          s.left > t && (s.left = t);
          return (s.top = -6), (s.bottom = -6), s;
        })(i, a, o, e.width());
      t.css(
        ((t = i),
        (i = a),
        (a = 16),
        "top" === r
          ? {
              width: t + "px",
              bottom: i.bottom + "px",
              left: i.left + "px",
              fontSize: a + "px",
              top: "",
            }
          : {
              width: t + "px",
              top: i.top + "px",
              left: i.left + "px",
              fontSize: a + "px",
              bottom: "",
            })
      );
      (e = e),
        (e =
          "top" === r
            ? { bottom: e.bottom + "px", left: e.left + "px", top: "" }
            : { top: e.top + "px", left: e.left + "px", bottom: "" });
      n.css(e), s.css(e);
    }
    H5P.externalDispatcher.on("domHidden", function (t) {
      void 0 !== r && 0 !== t.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"),
        d && H5P.$body.css("cursor", ""),
        void 0 !== r &&
          (r.removeClass("show"),
          clearTimeout(h),
          (h = setTimeout(function () {
            r.remove(), (r = void 0);
          }, 500)));
    };
    function v(t) {
      t.target !== a[0] && (m(), (a = void 0));
    }
    return function (t, e, i) {
      (u = i = i || 400),
        (a = t),
        (this.isCurrent = function (t) {
          return t.is(a);
        }),
        (this.remove = function () {
          m();
        }),
        void 0 !== r && m();
      var n,
        s = p(t);
      return (
        (n = r) &&
          (clearTimeout(h),
          n.removeClass("show"),
          setTimeout(function () {
            n && (n.remove(), (n = void 0));
          }, 500)),
        (l = o('<div class="joubel-speech-bubble-tail"></div>')),
        (c = o('<div class="joubel-speech-bubble-inner-tail"></div>')),
        (e = o(
          '<div class="joubel-speech-bubble-inner"><div class="joubel-speech-bubble-text">' +
            e +
            "</div></div>"
        ).prepend(c)),
        (r = o('<div class="joubel-speech-bubble" aria-live="assertive">')
          .append([l, e])
          .appendTo(s)),
        setTimeout(function () {
          r.addClass("show");
        }, 0),
        g(r, a, i, l, c),
        H5P.$body.on("mousedown.speechBubble", v),
        H5P.$window.on("resize", "", f),
        t.parents(".h5p-dialog").on("mousedown.speechBubble", v),
        d && H5P.$body.css("cursor", "pointer"),
        this
      );
    };
  })(H5P.jQuery)),
  ((H5P = H5P || {}).JoubelThrobber = (function (t) {
    return function () {
      return t("<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 (e, i) {
        var n,
          t = l.html(e).text().trim();
        if ("" !== t) {
          i = a.extend(
            { tipLabel: t, helpIcon: !1, showSpeechBubble: !0, tabcontrol: !1 },
            i
          );
          var s = a("<div/>", {
            class:
              "joubel-tip-container" + (i.showSpeechBubble ? "" : " be-quiet"),
            "aria-label": i.tipLabel,
            "aria-expanded": !1,
            role: "button",
            tabindex: i.tabcontrol ? -1 : 0,
            click: function (t) {
              o(), t.preventDefault();
            },
            keydown: function (t) {
              32 === t.which || 13 === t.which
                ? (o(), t.stopPropagation(), t.preventDefault())
                : o(!1);
            },
            html:
              '<span class="joubel-icon-tip-normal ' +
              (i.helpIcon ? " help-icon" : "") +
              '"><span class="h5p-icon-shadow"></span><span class="h5p-icon-speech-bubble"></span><span class="h5p-icon-info"></span></span>',
          });
          const r = a("<div>", {
            class: "hidden-but-read",
            "aria-live": "polite",
            appendTo: s,
          });
          var o = function (t) {
            void 0 !== n && n.isCurrent(s)
              ? (n.remove(),
                (n = void 0),
                s.attr("aria-expanded", !1),
                r.html(""))
              : !1 !== t &&
                i.showSpeechBubble &&
                ((n = H5P.JoubelSpeechBubble(s, e)),
                s.attr("aria-expanded", !0),
                r.html(e));
          };
          return s;
        }
      };
    })(H5P.jQuery)),
  ((H5P = H5P || {}).JoubelSlider = (function (e) {
    function t(t) {
      H5P.EventDispatcher.call(this),
        (this.$slider = e(
          "<div>",
          e.extend({ class: "h5p-joubel-ui-slider" }, t)
        )),
        (this.$slides = []),
        (this.currentIndex = 0),
        (this.numSlides = 0);
    }
    return (
      (((t.prototype = Object.create(
        H5P.EventDispatcher.prototype
      )).constructor = t).prototype.addSlide = function (t) {
        t
          .addClass("h5p-joubel-ui-slide")
          .css({ left: 100 * this.numSlides + "%" }),
          this.$slider.append(t),
          this.$slides.push(t),
          this.numSlides++,
          1 === this.numSlides && t.addClass("current");
      }),
      (t.prototype.attach = function (t) {
        t.append(this.$slider);
      }),
      (t.prototype.move = function (t) {
        var e = this;
        0 === t && e.trigger("first-slide"),
          t + 1 === e.numSlides && e.trigger("last-slide"),
          e.trigger("move");
        var i = e.$slides[this.currentIndex];
        H5P.Transition.onTransitionEnd(this.$slider, function () {
          i.removeClass("current"), e.trigger("moved");
        }),
          this.$slides[t].addClass("current");
        var n = "translateX(" + 100 * -t + "%)";
        this.$slider.css({
          "-webkit-transform": n,
          "-moz-transform": n,
          "-ms-transform": n,
          transform: n,
        }),
          (this.currentIndex = t);
      }),
      (t.prototype.remove = function () {
        this.$slider.remove();
      }),
      (t.prototype.next = function () {
        this.currentIndex + 1 >= this.numSlides ||
          this.move(this.currentIndex + 1);
      }),
      (t.prototype.previous = function () {
        this.move(this.currentIndex - 1);
      }),
      (t.prototype.first = function () {
        this.move(0);
      }),
      (t.prototype.last = function () {
        this.move(this.numSlides - 1);
      }),
      t
    );
  })(H5P.jQuery)),
  ((H5P = H5P || {}).JoubelScoreBar = (function (r) {
    var a = 0;
    return function (t, e, i, n) {
      var s = this;
      function o(t) {
        return e ? e.replace(":num", t).replace(":total", s.maxScore) : "";
      }
      (s.maxScore = t),
        (s.score = 0),
        a++,
        (s.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>'),
        (s.appendTo = function (t) {
          s.$scoreBar.appendTo(t);
        }),
        (s.setScore = function (t) {
          t !== s.score &&
            ((s.score = t > s.maxScore ? s.maxScore : t), s.updateVisuals());
        }),
        (s.incrementScore = function (t) {
          s.setScore(s.score + (t || 1));
        }),
        (s.setMaxScore = function (t) {
          s.maxScore = t;
        }),
        (s.updateVisuals = function () {
          s.$progress.html(o(s.score)),
            s.$scoreCounter.text(s.score),
            s.$maxScore.text(s.maxScore),
            setTimeout(function () {
              s.$progress.css({ width: (s.score / s.maxScore) * 100 + "%" }),
                H5P.Transition.onTransitionEnd(
                  s.$progress,
                  function () {
                    s.$scoreBar.toggleClass(
                      "h5p-joubelui-score-bar-full-score",
                      s.score === s.maxScore
                    ),
                      s.$scoreBar.toggleClass(
                        "h5p-joubelui-score-bar-animation-active",
                        s.score === s.maxScore
                      ),
                      s.$scoreBar.one("animationend", function () {
                        s.$scoreBar.removeClass(
                          "h5p-joubelui-score-bar-animation-active"
                        );
                      });
                  },
                  600
                );
            }, 300);
        }),
        (s.reset = function () {
          s.$scoreBar.removeClass("h5p-joubelui-score-bar-full-score");
        }),
        (function () {
          s.$scoreBar = r("<div>", { class: "h5p-joubelui-score-bar" });
          var t = r("<div>", {
            class: "h5p-joubelui-score-bar-visuals",
            appendTo: s.$scoreBar,
          });
          (s.$progressWrapper = r("<div>", {
            class: "h5p-joubelui-score-bar-progress-wrapper",
            appendTo: t,
          })),
            (s.$progress = r("<div>", {
              class: "h5p-joubelui-score-bar-progress",
              html: o(s.score),
              appendTo: s.$progressWrapper,
            })),
            r("<div>", {
              class: "h5p-joubelui-score-bar-star",
              html: s.STAR_MARKUP,
            }).appendTo(t);
          t = r("<div>", {
            class: "h5p-joubelui-score-numeric",
            appendTo: s.$scoreBar,
            "aria-hidden": !0,
          });
          (s.$scoreCounter = r("<span>", {
            class:
              "h5p-joubelui-score-number h5p-joubelui-score-number-counter",
            text: 0,
            appendTo: t,
          })),
            r("<span>", {
              class: "h5p-joubelui-score-number-separator",
              text: "/",
              appendTo: t,
            }),
            (s.$maxScore = r("<span>", {
              class: "h5p-joubelui-score-number h5p-joubelui-score-max",
              text: s.maxScore,
              appendTo: t,
            })),
            i &&
              (H5P.JoubelUI.createTip(i, {
                tipLabel: n || i,
                helpIcon: !0,
              }).appendTo(s.$scoreBar),
              s.$scoreBar.addClass("h5p-score-bar-has-help"));
        })();
    };
  })(H5P.jQuery)),
  ((H5P = H5P || {}).JoubelProgressbar = (function (i) {
    function t(t, e) {
      H5P.EventDispatcher.call(this);
      (this.options = i.extend({ progressText: "Slide :num of :total" }, e)),
        (this.currentStep = 0),
        (this.steps = t),
        (this.$progressbar = i("<div>", { class: "h5p-joubelui-progressbar" })),
        (this.$background = i("<div>", {
          class: "h5p-joubelui-progressbar-background",
        }).appendTo(this.$progressbar));
    }
    return (
      (((t.prototype = Object.create(
        H5P.EventDispatcher.prototype
      )).constructor = t).prototype.updateAria = function () {
        var t;
        this.options.disableAria ||
          (this.$currentStatus ||
            (this.$currentStatus = i("<div>", {
              class: "h5p-joubelui-progressbar-slide-status-text",
              "aria-live": "assertive",
            }).appendTo(this.$progressbar)),
          (t = this.options.progressText
            .replace(":num", this.currentStep)
            .replace(":total", this.steps)),
          this.$currentStatus.html(t));
      }),
      (t.prototype.appendTo = function (t) {
        this.$progressbar.appendTo(t);
      }),
      (t.prototype.setProgress = function (t) {
        t > this.steps ||
          t < 0 ||
          ((this.currentStep = t),
          this.$background.css({
            width: (this.currentStep / this.steps) * 100 + "%",
          }),
          this.updateAria());
      }),
      (t.prototype.next = function () {
        this.setProgress(this.currentStep + 1);
      }),
      (t.prototype.reset = function () {
        this.setProgress(0);
      }),
      (t.prototype.isLastStep = function () {
        return this.steps === this.currentStep;
      }),
      t
    );
  })(H5P.jQuery)),
  ((H5P = H5P || {}).JoubelUI = (function (i) {
    function t() {}
    var e;
    return (
      (t.createTip = function (t, e) {
        return new H5P.JoubelTip(t, e);
      }),
      (t.createMessageDialog = function (t, e) {
        return new H5P.JoubelMessageDialog(t, e);
      }),
      (t.createHelpTextDialog = function (t, e, i) {
        return new H5P.JoubelHelpTextDialog(t, e, i);
      }),
      (t.createProgressCircle = function (t, e, i, n) {
        return new H5P.JoubelProgressCircle(t, e, i, n);
      }),
      (t.createThrobber = function () {
        return new H5P.JoubelThrobber();
      }),
      (t.createSimpleRoundedButton = function (t) {
        return new H5P.SimpleRoundedButton(t);
      }),
      (t.createSlider = function (t) {
        return new H5P.JoubelSlider(t);
      }),
      (t.createScoreBar = function (t, e, i, n) {
        return new H5P.JoubelScoreBar(t, e, i, n);
      }),
      (t.createProgressbar = function (t, e) {
        return new H5P.JoubelProgressbar(t, e);
      }),
      (t.createButton = function (t) {
        var e = "button";
        return (
          t.href ? (e = "a") : (t.type = "button"),
          t.class
            ? (t.class += " h5p-joubelui-button")
            : (t.class = "h5p-joubelui-button"),
          i("<" + e + "/>", t)
        );
      }),
      H5P.isFramed &&
        !H5P.hasiOSiframeScrollFix &&
        /iPad|iPhone|iPod/.test(navigator.userAgent) &&
        ((H5P.hasiOSiframeScrollFix = !0),
        (e = 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") &&
            e.call(this);
        })),
      t
    );
  })(H5P.jQuery)),
  /*!@license H5P.Question-1.5/scripts/question.js by Joubel licensed under MIT*/ (H5P.Tooltip =
    H5P.Tooltip || function () {}),
  (H5P.Question = (function (j, t, W) {
    function e(s) {
      var h = this;
      t.call(h),
        (h.order = [
          "video",
          "image",
          "audio",
          "introduction",
          "content",
          "explanation",
          "feedback",
          "scorebar",
          "buttons",
          "read",
        ]);
      function u(t, e) {
        (y[t] = {}),
          (t = y[t].$element = j("<div/>", { class: "h5p-question-" + t })),
          e && t[e instanceof j ? "append" : "html"](e);
      }
      function d(t, e) {
        e instanceof j
          ? y[t].$element.html("").append(e)
          : y[t].$element.html(e);
      }
      function p() {
        if (void 0 !== y.buttons) {
          clearTimeout(l);
          for (var t = 0; t < C.length; t++)
            H(_, C[t].id, w, y.buttons.$element), (w[C[t].id].isVisible = !0);
          for (var e = 0, i = !(C = []), n = 0; n < x.length; n++) {
            var s = w[x[n].id];
            s.isVisible && (e += 1), s.$element.is(":focus") && (i = !0);
          }
          var o = 150;
          y.feedback &&
            y.feedback.$element.hasClass("h5p-question-popup") &&
            (o = 0),
            e === y.buttons.$element.children().length
              ? (F(y.buttons), A(i))
              : (A(i),
                y.buttons.$element.is(":empty") ||
                  (B(y.buttons),
                  E(y.buttons.$element),
                  (l = setTimeout(function () {
                    h.trigger("resize");
                  }, o))),
                L()),
            (r = void 0);
        }
      }
      function a() {
        var t = y.image.$element;
        clearTimeout(i),
          t.addClass("animatable"),
          (i =
            ((k = k
              ? (j(this).attr("aria-expanded", !0),
                t.addClass("h5p-question-image-fill-width"),
                !1)
              : (j(this).attr("aria-expanded", !1),
                t.removeClass("h5p-question-image-fill-width"),
                !0)),
            setTimeout(function () {
              h.trigger("resize");
            }, 600)));
      }
      function n(t, e, i) {
        for (var n = 0; n < i.length; n++) if (i[n][e] === t) return n;
        return -1;
      }
      var f,
        g,
        m,
        v,
        r,
        l,
        e,
        i,
        b,
        o,
        c,
        y = {},
        w = {},
        _ = [],
        x = [],
        C = [],
        S = !1,
        P = { disableFeedback: !1, disableReadSpeaker: !1 },
        k = !0,
        T = !1,
        D = !1,
        H = function (t, e, i, n) {
          for (var s = 0; s < t.length; s++)
            if (t[s] === e) {
              for (
                ;
                0 < s && (void 0 === i[t[s - 1]] || !i[t[s - 1]].isVisible);

              )
                s--;
              0 === s
                ? i[e].$element.prependTo(n)
                : i[e].$element.insertAfter(i[t[s - 1]].$element),
                (i[e].isVisible = !0);
              break;
            }
        },
        I = function (t, e) {
          var i,
            n,
            s,
            o,
            r = t.parent(),
            a = t.siblings(".h5p-question-feedback-tail"),
            l = t.outerWidth(),
            c = E(t),
            h = !1,
            u = r.height() / 2 - c / 2,
            d = r.width() / 2 - l / 2,
            p = 0,
            f = 0,
            g = 0;
          null != e
            ? ((i = e[0].offsetTop < 15),
              (n = e[0].offsetTop + e.height() > r.height() - 15),
              (s = e[0].offsetLeft < 15),
              (o = e[0].offsetLeft + e.width() > r.width() - 15),
              (d = e[0].offsetLeft - l / 2 + e.width() / 2),
              (u = e[0].offsetTop - c - 15),
              (p = d + l / 2 - a.width() / 2),
              (f = u + c - a.height() / 2),
              (g = 225),
              c + 15 > e[0].offsetTop &&
                ((f = (u = e[0].offsetTop + e.height() + 15) - a.height() / 2),
                (g = 45)),
              (d = d < 0 ? 0 : d) + l > r.width() && (d = r.width() - l),
              i && (s || o)
                ? ((d = e[0].offsetLeft + (s ? e.width() : -l)),
                  (u = e[0].offsetTop + e.height()),
                  (h = !0))
                : n && (s || o)
                ? ((d = e[0].offsetLeft + (s ? e.width() : -l)),
                  (u = e[0].offsetTop - c),
                  (h = !0))
                : i ||
                  n ||
                  ((s || o) &&
                    ((u = e[0].offsetTop - c / 2 + e.width() / 2),
                    (d = e[0].offsetLeft + (s ? e.width() + 15 : -l - 15)) < 0
                      ? (h = !(d = 0))
                      : ((p = d + (s ? -a.width() / 2 : l - a.width() / 2)),
                        (f = u + c / 2 - a.height() / 2),
                        (g = s ? 315 : 135)))),
              u + c > r.height() &&
                ((u = r.height() - c),
                c > r.height() - (e[0].offsetTop + e.height() + 15) &&
                  (h = !0)))
            : (h = !0),
            t.css({ top: (u = u < 0 ? 0 : u), left: d }),
            a.css({ top: f, left: p }),
            h
              ? a.hide()
              : a
                  .css({ left: p, top: f, transform: "rotate(" + g + "deg)" })
                  .show();
        },
        E = function (t) {
          if (t.is(":visible")) {
            var e = t.hasClass("h5p-question-popup"),
              i = t
                .clone()
                .css({
                  position: "absolute",
                  "max-height": "none",
                  width: e ? "" : "100%",
                })
                .appendTo(t.parent()),
              n =
                parseFloat(t.css("margin-left")) +
                parseFloat(t.css("margin-right")),
              e = i.css("width") ? i.css("width") : "100%";
            i.css("width", "calc(" + e + " - " + n + "px)");
            (e = Math.round(i.get(0).getBoundingClientRect().height)),
              (n = parseFloat(t.css("fontSize")));
            return (
              t.css("max-height", e / n + "em"),
              i.remove(),
              0 < e &&
                y.buttons &&
                y.buttons.$element === t &&
                (B(y.buttons), setTimeout(L, 150)),
              e
            );
          }
          t.css("max-height", "none");
        },
        A = function (t) {
          for (var e = 0; e < x.length; e++) M(x[e].id);
          (x = []), t && h.focusButton();
        },
        M = function (t) {
          w[t].$element.detach(), (w[t].isVisible = !1);
        },
        O = function (t, e, i) {
          if (
            ((e = e || 0),
            (i = i || 5),
            t && t instanceof j && document !== t.get(0) && !(i <= e))
          )
            return "auto" === t.css("overflow-y") ? t : O(t.parent(), e + 1, i);
        },
        L = function () {
          var t;
          w &&
            y.buttons &&
            ((t = function () {
              if (y.buttons.$element.is(":visible")) {
                var t,
                  e = { max: 0, min: 0, current: 0 };
                for (t in w) {
                  var i = w[t];
                  i.isVisible &&
                    (R(w[t]),
                    (e.max += i.width.max),
                    (e.min += i.width.min),
                    (e.current += i.isTruncated ? i.width.min : i.width.max));
                }
                function n(t) {
                  return e.max < t
                    ? (e.max !== e.current && z(e.current, t), !0)
                    : e.min < t && ((e.current > t ? N : z)(e.current, t), !0);
                }
                $(!1),
                  n(Math.floor(y.buttons.$element.width()) - 1) ||
                    ($(!0), n(Math.floor(y.buttons.$element.width()) - 1));
              }
            }),
            y.buttons.$element.is(":visible")
              ? t()
              : (e && clearTimeout(e),
                (e = setTimeout(function () {
                  (e = void 0), t();
                }, 0))));
        },
        $ = function (t) {
          y.scorebar &&
          y.scorebar.$element &&
          y.scorebar.$element.hasClass("h5p-question-visible")
            ? (y.buttons.$element.addClass("has-scorebar"),
              y.buttons.$element.toggleClass("wrap", t),
              y.scorebar.$element.toggleClass("full-width", t))
            : y.buttons.$element.removeClass("has-scorebar");
        },
        N = function (t, e) {
          for (var i = _.length - 1; 0 <= i; i--) {
            var n = _[i],
              s = w[n];
            if (!s.isTruncated && s.isVisible) {
              var o = s.$element;
              t -= s.width.max - s.width.min;
              n = o.text();
              if (
                (o.attr("data-tooltip", n),
                s.ariaLabel || o.attr("aria-label", n),
                o.html("").addClass("truncated"),
                (s.isTruncated = !0),
                t <= e)
              )
                return;
            }
          }
        },
        z = function (t, e) {
          for (var i = 0; i < _.length; i++) {
            var n = _[i],
              n = w[n];
            if (n.isTruncated && n.isVisible) {
              if (e < (t += n.width.max - n.width.min + 1)) return;
              n.$element.html(n.text),
                n.$element.removeAttr("data-tooltip"),
                n.ariaLabel || n.$element.removeAttr("aria-label"),
                n.$element.removeClass("truncated"),
                (n.isTruncated = !1);
            }
          }
        },
        B = function (t) {
          t.$element.addClass("h5p-question-visible"), (t.isVisible = !0);
        },
        F = function (t) {
          t.$element.css("max-height", ""),
            (t.isVisible = !1),
            setTimeout(function () {
              t.isVisible || t.$element.removeClass("h5p-question-visible");
            }, 150);
        };
      (h.setBehaviour = function (t) {
        j.extend(P, t);
      }),
        (h.setVideo = function (t) {
          (y.video = {
            $element: j("<div/>", { class: "h5p-question-video" }),
          }),
            D && t.params.playback && (t.params.playback.autoplay = !1),
            t.params.visuals || (t.params.visuals = {}),
            (t.params.visuals.fit = !1),
            (y.video.instance = H5P.newRunnable(
              t,
              h.contentId,
              y.video.$element,
              !0
            ));
          var e = !1;
          return (
            y.video.instance.on("resize", function () {
              (e = !0), h.trigger("resize"), (e = !1);
            }),
            h.on("resize", function () {
              e || y.video.instance.trigger("resize");
            }),
            h
          );
        }),
        (h.setAudio = function (t) {
          return (
            (t.params = t.params || {}),
            (y.audio = {
              $element: j("<div/>", { class: "h5p-question-audio" }),
            }),
            D
              ? (t.params.autoplay = !1)
              : "transparent" === t.params.playerMode &&
                (t.params.autoplay = !0),
            (y.audio.instance = H5P.newRunnable(
              t,
              h.contentId,
              y.audio.$element,
              !0
            )),
            y.audio.instance.audio &&
              (y.audio.instance.audio.style.height = ""),
            h
          );
        }),
        (h.pause = function () {
          y.video && y.video.isVisible && y.video.instance.pause(),
            y.audio && y.audio.isVisible && y.audio.instance.pause();
        }),
        (h.play = function () {
          y.video && y.video.isVisible && y.video.instance.play(),
            y.audio && y.audio.isVisible && y.audio.instance.play();
        }),
        (h.disableAutoPlay = function () {
          D = !0;
        }),
        (h.massageAttributeOutput = function (t) {
          t = new DOMParser().parseFromString(t, "text/html");
          const e = document.createElement("div");
          return (
            (e.innerHTML = t.documentElement.textContent),
            e.textContent || e.innerText || ""
          );
        }),
        (h.setImage = function (t, e) {
          (e = e || {}),
            (y.image = {}),
            (y.image.$element = j("<div/>", {
              class: "h5p-question-image h5p-question-image-fill-width",
            }));
          var i = j("<div/>", {
              class: "h5p-question-image-wrap",
              appendTo: y.image.$element,
            }),
            n = j("<img/>", {
              src: H5P.getPath(t, h.contentId),
              alt: void 0 === e.alt ? "" : h.massageAttributeOutput(e.alt),
              title:
                void 0 === e.title ? "" : h.massageAttributeOutput(e.title),
              on: {
                load: function () {
                  h.trigger("imageLoaded", this), h.trigger("resize");
                },
              },
              appendTo: i,
            });
          if (!e.disableImageZooming) {
            const r = () => {
              var t =
                "true" === i.attr("aria-expanded")
                  ? e.minimizeImage
                  : e.expandImage;
              i.attr("aria-label", t + " " + e.alt);
            };
            var s = !1;
            return (
              h.on("resize", function () {
                !s &&
                  n.is(":visible") &&
                  (i
                    .addClass("h5p-question-image-scalable")
                    .attr("aria-expanded", !1)
                    .attr("role", "button")
                    .attr("tabIndex", "0")
                    .on("click", function (t) {
                      1 === t.which && (a.apply(this), r());
                    })
                    .on("keypress", function (t) {
                      32 === t.which &&
                        (t.preventDefault(), a.apply(this), r());
                    }),
                  r(),
                  y.image.$element.removeClass("h5p-question-image-fill-width"),
                  (s = !0));
              }),
              h
            );
          }
          n.css("maxHeight", "none");
          function o() {
            var t = y.image.$element.get(0).getBoundingClientRect().width;
            i.css({ "-webkit-transition": "none", transition: "none" });
            var e =
              2 *
              (i.get(0).getBoundingClientRect().left -
                y.image.$element.get(0).getBoundingClientRect().left);
            n.get(0).naturalWidth >= t - e
              ? y.image.$element.addClass("h5p-question-image-fill-width")
              : y.image.$element.removeClass("h5p-question-image-fill-width"),
              i.css({ "-webkit-transition": "", transition: "" });
          }
          n.is(":visible") ? o() : n.on("load", o);
        }),
        (h.setIntroduction = function (t) {
          return u("introduction", t), h;
        }),
        (h.setContent = function (t, e) {
          return (
            u("content", t),
            e && e.class && y.content.$element.addClass(e.class),
            h
          );
        }),
        (h.read = function (t) {
          o &&
            (c ? (c += ("." === c.substr(-1, 1) ? " " : ". ") + t) : (c = t),
            o.html(c),
            setTimeout(function () {
              (c = null), o.html("");
            }, 100));
        }),
        (h.readFeedback = function () {
          var t;
          P.disableReadSpeaker ||
            !v ||
            !y.feedback ||
            !y.feedback.$element ||
            ((t = j(
              ".h5p-question-feedback-content-text",
              y.feedback.$element
            )) &&
              t.html() &&
              t.html().length &&
              h.read(t.html()));
        }),
        (h.removeFeedback = function () {
          return (
            clearTimeout(b),
            y.feedback &&
              v &&
              ((v = !1),
              F(y.scorebar),
              F(y.feedback),
              (T = !0),
              (b = setTimeout(function () {
                v ||
                  (y.feedback.$element.children().detach(),
                  y.scorebar.$element.children().detach(),
                  h.trigger("resize")),
                  (T = !1),
                  m.setScore(0);
              }, 150)),
              f && f.find(".h5p-question-feedback-tail").remove()),
            h
          );
        }),
        (h.setFeedback = function (t, e, i, n, s, o, r) {
          if (P.disableFeedback) return h;
          p(),
            (g = null != o && null != o.click ? o.click : null),
            clearTimeout(b);
          var a = j("<div>", { class: "h5p-question-feedback-container" }),
            l = j("<div>", { class: "h5p-question-feedback-content" }).appendTo(
              a
            );
          j("<div>", {
            class: "h5p-question-feedback-content-text",
            html: t,
          }).appendTo(l);
          var c = j("<div>", { class: "h5p-question-scorebar-container" });
          return (
            (m = void 0 === m ? W.createScoreBar(i, n, s, r) : m).appendTo(c),
            l.toggleClass("has-content", void 0 !== t && 0 < t.length),
            !P.disableReadSpeaker &&
              n &&
              h.read(
                n.replace(":num", e).replace(":total", i) + ". " + (t || "")
              ),
            (v = !0),
            y.feedback
              ? (d("feedback", a), d("scorebar", c))
              : (u("feedback", a),
                u("scorebar", c),
                S &&
                  f &&
                  (H(h.order, "feedback", y, f), H(h.order, "scorebar", y, f))),
            B(y.feedback),
            B(y.scorebar),
            L(),
            null != o && 1 == o.showAsPopup
              ? ((function (t) {
                  var e = y.feedback.$element,
                    i = y.content.$element,
                    n = null != g ? g.$element : null;
                  e.appendTo(i).addClass("h5p-question-popup"),
                    y.scorebar && y.scorebar.$element.appendTo(e),
                    i.addClass("h5p-has-question-popup");
                  var s = j("<div/>", { class: "h5p-question-feedback-tail" })
                      .hide()
                      .appendTo(i),
                    t = j("<div/>", {
                      class: "h5p-question-feedback-close",
                      tabindex: 0,
                      title: t,
                      on: {
                        click: function (t) {
                          e.remove(), s.remove(), t.preventDefault();
                        },
                        keydown: function (t) {
                          switch (t.which) {
                            case 13:
                            case 32:
                              e.remove(), s.remove(), t.preventDefault();
                          }
                        },
                      },
                    })
                      .hide()
                      .appendTo(e);
                  null != n &&
                    (n.hasClass("correct")
                      ? (e.addClass("h5p-question-feedback-correct"),
                        t.show(),
                        y.buttons.$element.hide())
                      : y.buttons.$element.appendTo(y.feedback.$element)),
                    I(e, n);
                })(o.closeText),
                m.setScore(e))
              : (b = setTimeout(function () {
                  var t;
                  E(y.feedback.$element),
                    E(y.scorebar.$element),
                    (T = !0),
                    !f ||
                      (f.hasClass("h5p-standalone") && !H5P.isFullscreen) ||
                      ((t = O(f)) &&
                        t.animate({ scrollTop: f.css("height") }, "slow")),
                    (b = setTimeout(function () {
                      (T = !1), h.trigger("resize"), m.setScore(e);
                    }, 150));
                }, 0)),
            h
          );
        }),
        (h.updateFeedbackContent = function (t, e) {
          return (
            y.feedback &&
              y.feedback.$element &&
              (e &&
                (t =
                  j(
                    ".h5p-question-feedback-content",
                    y.feedback.$element
                  ).html() +
                  " " +
                  t),
              j(".h5p-question-feedback-content", y.feedback.$element)
                .html(t)
                .addClass("has-content"),
              E(y.feedback.$element),
              setTimeout(h.trigger.bind(h, "resize"), 150)),
            h
          );
        }),
        (h.setExplanation = function (t, e) {
          return (
            t
              ? ((t = new H5P.Question.Explainer(e, t)),
                y.explanation
                  ? d("explanation", t.getElement())
                  : (u("explanation", t.getElement()),
                    S && f && H(h.order, "explanation", y, f)))
              : y.explanation && y.explanation.$element.children().detach(),
            h
          );
        }),
        (h.hasButton = function (t) {
          return void 0 !== w[t];
        }),
        (h.addButton = function (t, e, i, n, s, o) {
          if (w[t]) return h;
          void 0 === y.buttons &&
            (u("buttons"), S && H(h.order, "buttons", y, f)),
            ((o = o || {}).confirmationDialog = o.confirmationDialog || {}),
            (s = s || {});
          function r() {
            o.confirmationDialog.enable && a
              ? (o.confirmationDialog.$parentElement ||
                  y.popups.$element.removeClass("hidden"),
                a.show(c.position().top))
              : i();
          }
          var a = h.addConfirmationDialogToButton(o.confirmationDialog, i);
          o.contentData &&
            o.contentData.standalone &&
            (o.contentData.isScoringEnabled ||
              o.contentData.isReportingEnabled) &&
            o.textIfSubmitting &&
            (e = o.textIfSubmitting),
            (w[t] = {
              isTruncated: !1,
              text: e,
              isVisible: !1,
              ariaLabel: s["aria-label"],
            });
          var l = void 0 !== s.href,
            c = (w[t].$element = W.createButton(
              j.extend(
                {
                  class: "h5p-question-" + t,
                  html: e,
                  on: {
                    click: function (t) {
                      r(), l && t.preventDefault();
                    },
                  },
                },
                s
              )
            ));
          return (
            _.push(t),
            H5P.Tooltip(c.get(0), { tooltipSource: "data-tooltip" }),
            l &&
              c.on("keypress", function (t) {
                32 === t.which && (r(), t.preventDefault());
              }),
            (void 0 !== n && !n) ||
              (c.appendTo(y.buttons.$element),
              (w[t].isVisible = !0),
              B(y.buttons)),
            h
          );
        });
      var R = function (t) {
        var e = t.$element,
          e = e
            .clone()
            .css({
              position: "absolute",
              "white-space": "nowrap",
              "max-width": "none",
            })
            .removeClass("truncated")
            .html(t.text)
            .appendTo(e.parent());
        (t.width = {
          max: Math.ceil(
            e.outerWidth() +
              parseFloat(e.css("margin-left")) +
              parseFloat(e.css("margin-right"))
          ),
        }),
          e.html("").addClass("truncated"),
          (t.width.min = Math.ceil(
            e.outerWidth() +
              parseFloat(e.css("margin-left")) +
              parseFloat(e.css("margin-right"))
          )),
          e.remove();
      };
      (h.addConfirmationDialogToButton = function (e, t) {
        if ((e = e || {}).enable) {
          var i = new H5P.ConfirmationDialog({
            instance: e.instance,
            headerText: e.l10n.header,
            dialogText: e.l10n.body,
            cancelText: e.l10n.cancelLabel,
            confirmText: e.l10n.confirmLabel,
          });
          if (e.$parentElement) {
            const n = e.$parentElement.get(0);
            let t;
            n.classList.contains("h5p-content") &&
              (t = n.querySelector(".h5p-container")),
              i.appendTo(t ?? n);
          } else
            void 0 === y.popups &&
              (u("popups"),
              S && H(h.order, "popups", y, f),
              y.popups.$element.addClass("hidden"),
              h.order.push("popups")),
              i.appendTo(y.popups.$element.get(0));
          return (
            i.on("confirmed", function () {
              e.$parentElement || y.popups.$element.addClass("hidden"),
                t(),
                h.trigger("confirmed");
            }),
            i.on("canceled", function () {
              e.$parentElement || y.popups.$element.addClass("hidden"),
                h.trigger("canceled");
            }),
            i
          );
        }
      }),
        (h.showButton = function (t, e) {
          var i = -1 !== n(t, "id", x);
          if (void 0 === w[t] || (!0 === w[t].isVisible && !i)) return h;
          e = e || 0;
          i = n(t, "id", C);
          if (-1 !== i) return C[i].priority < e && (C[i].priority = e), h;
          i = n(t, "id", x);
          return (
            -1 !== i
              ? x[i].priority <= e &&
                (x.splice(i, 1), C.push({ id: t, priority: e }))
              : w[t].$element.is(":visible") || C.push({ id: t, priority: e }),
            (r = r || setTimeout(p, 0)),
            h
          );
        }),
        (h.hideButton = function (t, e) {
          var i = -1 !== n(t, "id", C);
          if (void 0 === w[t] || (!1 === w[t].isVisible && !i)) return h;
          e = e || 0;
          i = n(t, "id", x);
          if (-1 !== i) return x[i].priority < e && (x[i].priority = e), h;
          i = n(t, "id", C);
          return (
            -1 !== i
              ? C[i].priority <= e &&
                (C.splice(i, 1), x.push({ id: t, priority: e }))
              : w[t].$element.is(":visible")
              ? x.push({ id: t, priority: e })
              : M(t),
            (r = r || setTimeout(p, 0)),
            h
          );
        }),
        (h.focusButton = function (t) {
          if (void 0 === t)
            for (var e = 0; e < _.length; e++) {
              var i = w[_[e]];
              if (i && i.isVisible) {
                i.$element.focus();
                break;
              }
            }
          else w[t] && w[t].$element.is(":visible") && w[t].$element.focus();
          return h;
        }),
        (h.toggleReadSpeaker = function (t) {
          P.disableReadSpeaker = t || !P.disableReadSpeaker;
        }),
        (h.insertSectionAtElement = function (t, e) {
          return (
            void 0 === y[t] && u(t), (y[t].parent = e), S || H([t], t, y, e), h
          );
        }),
        (h.attach = function (t) {
          h.isRoot() && h.setActivityStarted(),
            void 0 === f &&
              (void 0 !== h.registerDomElements &&
                (h.registerDomElements instanceof Function ||
                  "function" == typeof h.registerDomElements) &&
                h.registerDomElements(),
              (o = j("<div/>", {
                "aria-live": "polite",
                class: "h5p-hidden-read",
              })),
              u("read", o),
              h.trigger("registerDomElements")),
            (f = t).html("").addClass("h5p-question h5p-" + s);
          for (var e = [], i = 0; i < h.order.length; i++) {
            var n = h.order[i];
            y[n] &&
              (y[n].parent
                ? y[n].$element.appendTo(y[n].parent)
                : e.push(y[n].$element),
              (y[n].isVisible = !0));
          }
          return (
            t.append(e),
            h.trigger(
              "domChanged",
              {
                $target: t,
                library: h.libraryInfo.machineName,
                contentId: h.contentId,
                key: "newLibrary",
              },
              { bubbles: !0, external: !0 }
            ),
            (S = !0),
            h
          );
        }),
        (h.detachSections = function () {
          for (var t in ((S = !1), y)) y[t].$element.detach();
          return h;
        }),
        h.on("resize", function () {
          !T && y.feedback && v && E(y.feedback.$element);
          var t = y.feedback,
            e = g;
          null != t &&
            null != t.$element &&
            null != e &&
            null != e.$element &&
            setTimeout(function () {
              I(t.$element, e.$element);
            }, 10),
            L();
        });
    }
    return (
      (((e.prototype = Object.create(t.prototype)).constructor =
        e).determineOverallFeedback = function (t, e) {
        e = Math.floor(100 * e);
        for (var i = 0; i < t.length; i++) {
          var n = t[i],
            s = void 0 !== n.feedback && 0 !== n.feedback.trim().length;
          if (n.from <= e && n.to >= e && s) return n.feedback;
        }
        return "";
      }),
      e
    );
  })(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 (o, r) {
        var a = this;
        !(function () {
          (a.$explanation = l("<div>", {
            class: "h5p-question-explanation-container",
          })),
            l("<div>", {
              class: "h5p-question-explanation-title",
              role: "heading",
              html: o,
              appendTo: a.$explanation,
            });
          for (
            var t = l("<ul>", {
                class: "h5p-question-explanation-list",
                appendTo: a.$explanation,
              }),
              e = 0;
            e < r.length;
            e++
          ) {
            var i = r[e],
              n = l("<li>", {
                class: "h5p-question-explanation-item",
                appendTo: t,
              }),
              s = l("<div>", { class: "h5p-question-explanation-status" });
            i.correct &&
              l("<span>", {
                class: "h5p-question-explanation-correct",
                html: i.correct,
                appendTo: s,
              }),
              i.wrong &&
                l("<span>", {
                  class: "h5p-question-explanation-wrong",
                  html: i.wrong,
                  appendTo: s,
                }),
              s.appendTo(n),
              i.text &&
                l("<div>", {
                  class: "h5p-question-explanation-text",
                  html: i.text,
                  appendTo: n,
                });
          }
        })(),
          (a.getElement = function () {
            return a.$explanation;
          });
      };
    })(H5P.jQuery)),
  (H5P.Question.ScorePoints = function () {
    var i,
      n = [];
    this.getElement = function (t) {
      var e = document.createElement("div");
      return (
        e.classList.add(t ? "h5p-question-plus-one" : "h5p-question-minus-one"),
        e.classList.add("h5p-question-hidden-one"),
        n.push(e),
        i && clearTimeout(i),
        (i = setTimeout(s, 0)),
        e
      );
    };
    var s = function () {
        var t = 0,
          e = 150;
        n.length && n.length > Math.ceil(1e3 / e) && (e = 1e3 / n.length);
        for (var i = 0; i < n.length; i++) setTimeout(o(n[i]), t), (t += e);
      },
      o = function (t) {
        return function () {
          t.classList.remove("h5p-question-hidden-one");
        };
      };
  }),
  ((H5P = H5P || {}).SingleChoiceSet = H5P.SingleChoiceSet || {}),
  (H5P.SingleChoiceSet.StopWatch = (function () {
    function t() {
      this.duration = 0;
    }
    return (
      (t.prototype.start = function () {
        return (this.startTime = Date.now()), this;
      }),
      (t.prototype.stop = function () {
        return (
          (this.duration = this.duration + Date.now() - this.startTime),
          this.passedTime()
        );
      }),
      (t.prototype.reset = function () {
        this.duration = 0;
      }),
      (t.prototype.passedTime = function () {
        return Math.round(this.duration / 10) / 100;
      }),
      t
    );
  })()),
  /*!@license H5P.SingleChoiceSet-1.11/scripts/sound-effects.js by Joubel licensed under MIT*/ (H5P.SingleChoiceSet =
    H5P.SingleChoiceSet || {}),
  (H5P.SingleChoiceSet.SoundEffects = (function () {
    let t = !1;
    const e = { types: ["positive-short", "negative-short"] },
      o = {};
    return (
      (e.setup = function (s) {
        return (
          !t &&
          ((t = !0),
          e.types.forEach(async function (t) {
            const e = new Audio();
            var i = e.canPlayType("audio/ogg") ? "ogg" : "mp3";
            const n = await fetch(s + "sounds/" + t + "." + i);
            i = await n.blob();
            (e.src = URL.createObjectURL(i)), (o[t] = e);
          }),
          !0)
        );
      }),
      (e.play = function (t, e) {
        o[t] &&
          setTimeout(function () {
            o[t].play();
          }, e || 0);
      }),
      e
    );
  })()),
  ((H5P = H5P || {}).SingleChoiceSet = H5P.SingleChoiceSet || {}),
  (H5P.SingleChoiceSet.XApiEventBuilder = (function (e, t) {
    function i() {
      t.call(this), (this.attributes = {});
    }
    function n() {
      t.call(this), (this.attributes = {});
    }
    function s() {
      t.call(this), (this.attributes = {});
    }
    (((i.prototype = Object.create(t.prototype)).constructor =
      i).prototype.name = function (t) {
      return (this.attributes.name = t), this;
    }),
      (i.prototype.description = function (t) {
        return (this.attributes.description = t), this;
      }),
      (i.prototype.interactionType = function (t) {
        return (this.attributes.interactionType = t), this;
      }),
      (i.prototype.correctResponsesPattern = function (t) {
        return (this.attributes.correctResponsesPattern = t), this;
      }),
      (i.prototype.optional = function (t) {
        return (this.attributes.optional = t), this;
      }),
      (i.prototype.build = function () {
        var t = {};
        return (
          c(t, "name", o(this.attributes.name)),
          c(t, "description", o(this.attributes.description)),
          c(t, "interactionType", this.attributes.interactionType),
          c(
            t,
            "correctResponsesPattern",
            this.attributes.correctResponsesPattern
          ),
          c(t, "type", "http://adlnet.gov/expapi/activities/cmi.interaction"),
          this.attributes.optional && e.extend(t, this.attributes.optional),
          t
        );
      }),
      (((n.prototype = Object.create(t.prototype)).constructor =
        n).prototype.completion = function (t) {
        return (this.attributes.completion = t), this;
      }),
      (n.prototype.success = function (t) {
        return (this.attributes.success = t), this;
      }),
      (n.prototype.duration = function (t) {
        return (this.attributes.duration = t), this;
      }),
      (n.prototype.response = function (t) {
        return (
          (this.attributes.response = "string" == typeof t ? t : t.join("[,]")),
          this
        );
      }),
      (n.prototype.score = function (t, e) {
        return (
          (this.attributes.rawScore = t), (this.attributes.maxScore = e), this
        );
      }),
      (n.prototype.build = function () {
        var t = {};
        return (
          c(t, "response", this.attributes.response),
          c(t, "completion", this.attributes.completion),
          c(t, "success", this.attributes.success),
          l(this.attributes.duration) &&
            c(t, "duration", "PT" + this.attributes.duration + "S"),
          l(this.attributes.rawScore) &&
            ((t.score = {}),
            c(t.score, "raw", this.attributes.rawScore),
            l(this.attributes.maxScore) &&
              0 < this.attributes.maxScore &&
              (c(t.score, "min", 0),
              c(t.score, "max", this.attributes.maxScore),
              c(t.score, "min", 0),
              c(
                t.score,
                "scaled",
                Math.round(
                  (this.attributes.rawScore / this.attributes.maxScore) * 1e4
                ) / 1e4
              ))),
          t
        );
      }),
      (((s.prototype = Object.create(t.prototype)).constructor =
        s).prototype.verb = function (t) {
        return (this.attributes.verb = t), this;
      }),
      (s.prototype.actor = function (t, e, i) {
        return (
          (this.attributes.actor = { name: t, mbox: e, objectType: i }), this
        );
      }),
      (s.prototype.contentId = function (t, e) {
        return (
          (this.attributes.contentId = t),
          (this.attributes.subContentId = e),
          this
        );
      }),
      (s.prototype.context = function (t, e) {
        return (
          (this.attributes.parentContentId = t),
          (this.attributes.parentSubContentId = e),
          this
        );
      }),
      (s.prototype.result = function (t) {
        return (this.attributes.result = t), this;
      }),
      (s.prototype.objectDefinition = function (t) {
        return (this.attributes.objectDefinition = t), this;
      }),
      (s.prototype.build = function () {
        var t,
          e = new H5P.XAPIEvent();
        return (
          e.setActor(),
          e.setVerb(this.attributes.verb),
          (this.attributes.parentContentId ||
            this.attributes.parentSubContentId) &&
            ((e.data.statement.context = {
              contextActivities: {
                parent: [
                  {
                    id: r(
                      this.attributes.parentContentId,
                      this.attributes.parentSubContentId
                    ),
                    objectType: "Activity",
                  },
                ],
              },
            }),
            H5P.xApiSessionId &&
              (e.data.statement.context.extensions = {
                "https://h5p.com/xapi/session-id": H5P.xApiSessionId,
              })),
          (e.data.statement.object = {
            id: r(this.attributes.contentId, this.attributes.subContentId),
            objectType: "Activity",
          }),
          c(e.data, "actor", this.attributes.actor),
          c(e.data.statement, "result", this.attributes.result),
          c(
            e.data.statement.object,
            "definition",
            this.attributes.objectDefinition
          ),
          e.data.statement.object.definition &&
            (this.attributes.contentId || this.attributes.subContentId) &&
            (c(
              (t = e.data.statement.object.definition.extensions = {}),
              "http://h5p.org/x-api/h5p-local-content-id",
              this.attributes.contentId
            ),
            c(
              t,
              "http://h5p.org/x-api/h5p-subContentId",
              this.attributes.subContentId
            )),
          e
        );
      });
    var o = function (t) {
        if (null != t) return { "en-US": a(t) };
      },
      r = function (t, e) {
        var i = "cid-" + t;
        if (
          t &&
          H5PIntegration &&
          H5PIntegration.contents &&
          H5PIntegration.contents[i]
        ) {
          i = H5PIntegration.contents[i].url;
          return e && (i += "?subContentId=" + e), i;
        }
      },
      a = function (t) {
        return e("<div>" + t + "</div>")
          .text()
          .trim();
      },
      l = function (t) {
        return void 0 !== t;
      };
    function c(t, e, i, n) {
      l(i)
        ? (t[e] = i)
        : n &&
          console.error("xApiEventBuilder: No value for [" + e + "] in", t);
    }
    return (
      (s.create = function () {
        return new s();
      }),
      (s.createDefinition = function () {
        return new i();
      }),
      (s.createResult = function () {
        return new n();
      }),
      (s.createChoice = function (t, e) {
        return { id: t, description: o(e) };
      }),
      (s.createCorrectResponsePattern = function (t) {
        return t.join("[,]");
      }),
      (s.interactionTypes = {
        CHOICE: "choice",
        COMPOUND: "compound",
        FILL_IN: "fill-in",
        MATCHING: "matching",
        TRUE_FALSE: "true-false",
      }),
      (s.verbs = { ANSWERED: "answered" }),
      s
    );
  })(H5P.jQuery, H5P.EventDispatcher)),
  ((H5P = H5P || {}).SingleChoiceSet = H5P.SingleChoiceSet || {}),
  (H5P.SingleChoiceSet.ResultSlide = (function (i, n) {
    function t(t) {
      n.call(this),
        (this.$feedbackContainer = i("<div>", {
          class: "h5p-sc-feedback-container",
          tabindex: "-1",
        })),
        (this.$buttonContainer = i("<div/>", {
          class: "h5p-sc-button-container",
        }));
      var e = i("<div/>", { class: "h5p-sc-result-container" })
        .append(this.$feedbackContainer)
        .append(this.$buttonContainer);
      this.$resultSlide = i("<div>", {
        class: "h5p-sc-slide h5p-sc-set-results",
        css: { left: 100 * t + "%" },
      }).append(e);
    }
    return (
      (((t.prototype = Object.create(n.prototype)).constructor =
        t).prototype.focusScore = function () {
        this.$feedbackContainer.focus();
      }),
      (t.prototype.appendTo = function (t) {
        return this.$resultSlide.appendTo(t), this.$resultSlide;
      }),
      t
    );
  })(H5P.jQuery, H5P.EventDispatcher)),
  ((H5P = H5P || {}).SingleChoiceSet = H5P.SingleChoiceSet || {}),
  (H5P.SingleChoiceSet.SolutionView = (function (s, o) {
    function t(t, e, i) {
      o.call(this);
      var n = this;
      (n.id = t),
        (this.choices = e),
        (n.l10n = i),
        (this.$solutionView = s("<div>", { class: "h5p-sc-solution-view" })),
        (this.$header = s("<div>", {
          class: "h5p-sc-solution-view-header",
        }).appendTo(this.$solutionView)),
        (this.$title = s("<div>", {
          class: "h5p-sc-solution-view-title",
          html: i.solutionViewTitle,
          tabindex: "-1",
        })),
        (this.$title = this.addAriaPunctuation(this.$title)),
        this.$header.append(this.$title),
        s("<button>", {
          role: "button",
          "aria-label": i.closeButtonLabel + ".",
          class: "h5p-joubelui-button h5p-sc-close-solution-view",
          click: function () {
            n.hide();
          },
        }).appendTo(this.$header),
        n.populate();
    }
    return (
      (t.prototype.appendTo = function (t) {
        this.$solutionView.appendTo(t);
      }),
      (t.prototype.show = function () {
        var e = this;
        e.$solutionView.addClass("visible"),
          e.$title.focus(),
          s(document).on("keyup.solutionview", function (t) {
            27 === t.keyCode &&
              (e.hide(), s(document).off("keyup.solutionview"));
          });
      }),
      (t.prototype.hide = function () {
        this.$solutionView.removeClass("visible"), this.trigger("hide", this);
      }),
      (t.prototype.populate = function () {
        var i = this;
        (i.$choices = s("<dl>", {
          class: "h5p-sc-solution-choices",
          tabindex: -1,
        })),
          this.choices.forEach(function (t, e) {
            t.question &&
              t.answers &&
              0 !== t.answers.length &&
              ((e = i.addAriaPunctuation(
                s("<dt>", {
                  class: "h5p-sc-solution-question",
                  html:
                    '<span class="h5p-hidden-read">' +
                    i.l10n.solutionListQuestionNumber.replace(":num", e + 1) +
                    "</span>" +
                    t.question,
                })
              )),
              i.$choices.append(e),
              (t = i.addAriaPunctuation(
                s("<dd>", {
                  class: "h5p-sc-solution-answer",
                  html: t.answers[0],
                })
              )),
              i.$choices.append(t));
          }),
          i.$choices.appendTo(this.$solutionView);
      }),
      (t.prototype.addAriaPunctuation = function (t) {
        var e = t.text().trim();
        return this.hasPunctuation(e) || t.attr("aria-label", e + "."), t;
      }),
      (t.prototype.hasPunctuation = function (t) {
        return /[,.?!]$/.test(t);
      }),
      t
    );
  })(H5P.jQuery, H5P.EventDispatcher)),
  ((H5P = H5P || {}).SingleChoiceSet = H5P.SingleChoiceSet || {}),
  (H5P.SingleChoiceSet.Alternative = (function (n, s) {
    function t(t) {
      s.call(this);
      var e = this;
      this.options = t;
      function i(t) {
        e.trigger("alternative-selected", {
          correct: e.options.correct,
          $element: e.$alternative,
          answerIndex: e.options.answerIndex,
        }),
          t.preventDefault();
      }
      (this.$alternative = n("<li>", {
        class:
          "h5p-sc-alternative h5p-sc-is-" +
          (this.options.correct ? "correct" : "wrong"),
        role: "radio",
        tabindex: -1,
        on: {
          keydown: function (t) {
            switch (t.which) {
              case 13:
              case 32:
                i(t);
                break;
              case 35:
                e.trigger("lastOption", t), t.preventDefault();
                break;
              case 36:
                e.trigger("firstOption", t), t.preventDefault();
                break;
              case 37:
              case 38:
                e.trigger("previousOption", t), t.preventDefault();
                break;
              case 39:
              case 40:
                e.trigger("nextOption", t), t.preventDefault();
            }
          },
        },
        focus: function (t) {
          e.trigger("focus", t);
        },
        click: i,
      })),
        this.$alternative.append(n("<div>", { class: "h5p-sc-progressbar" })),
        this.$alternative.append(
          n("<div>", { class: "h5p-sc-label", html: this.options.text })
        ),
        this.$alternative.append(n("<div>", { class: "h5p-sc-status" })),
        this.$alternative.append(
          n("<div>", { class: "h5p-sc-a11y", "aria-hidden": "true" })
        );
    }
    return (
      (((t.prototype = Object.create(s.prototype)).constructor =
        t).prototype.isCorrect = function () {
        return this.options.correct;
      }),
      (t.prototype.focus = function () {
        this.$alternative.focus();
      }),
      (t.prototype.tabbable = function () {
        this.$alternative.attr("tabindex", 0);
      }),
      (t.prototype.notTabbable = function () {
        this.$alternative.attr("tabindex", -1);
      }),
      (t.prototype.appendTo = function (t) {
        return t.append(this.$alternative), this.$alternative;
      }),
      t
    );
  })(H5P.jQuery, H5P.EventDispatcher)),
  ((H5P = H5P || {}).SingleChoiceSet = H5P.SingleChoiceSet || {}),
  (H5P.SingleChoiceSet.SingleChoice = (function (p, o, f) {
    function t(t, e, i, n) {
      o.call(this),
        (this.options = p.extend(!0, {}, { question: "", answers: [] }, t)),
        (this.isAutoConfinue = n),
        (this.index = e),
        (this.id = i),
        (this.answered = !1);
      for (var s = 0; s < this.options.answers.length; s++)
        this.options.answers[s] = {
          text: this.options.answers[s],
          correct: 0 === s,
          answerIndex: s,
        };
      this.options.answers = H5P.shuffleArray(this.options.answers);
    }
    return (
      (((t.prototype = Object.create(o.prototype)).constructor =
        t).prototype.appendTo = function (t, e) {
        var i,
          s = this;
        (this.$container = t),
          (this.$choice = p("<div>", {
            class: "h5p-sc-slide h5p-sc" + (e ? " h5p-sc-current-slide" : ""),
            css: { left: 100 * s.index + "%" },
          }));
        e = "single-choice-" + s.id + "-question-" + s.index;
        this.$choice.append(
          p("<div>", {
            id: e,
            class: "h5p-sc-question",
            html: this.options.question,
          })
        );
        var n = p("<ul>", {
          class: "h5p-sc-alternatives",
          role: "radiogroup",
          "aria-labelledby": e,
        });
        this.alternatives = s.options.answers.map(function (t) {
          return new f(t);
        });
        function o(t) {
          var e = t.data.$element,
            i = t.data.correct,
            n = t.data.answerIndex;
          e.parent().hasClass("h5p-sc-selected") ||
            (s.trigger("alternative-selected", {
              correct: i,
              index: s.index,
              answerIndex: n,
              currentIndex: e.index(),
            }),
            H5P.Transition.onTransitionEnd(
              e.find(".h5p-sc-progressbar"),
              function () {
                e.addClass("h5p-sc-drummed"), s.showResult(i, n);
              },
              700
            ),
            e.addClass("h5p-sc-selected").parent().addClass("h5p-sc-selected"),
            this.setAnswered(!0));
        }
        function r(t, e) {
          (i = e),
            s.alternatives.forEach(function (t) {
              t.notTabbable();
            }),
            t.tabbable();
        }
        function a() {
          0 === i
            ? this.focusOnAlternative(s.alternatives.length - 1)
            : this.focusOnAlternative(i - 1);
        }
        function l() {
          i === this.alternatives.length - 1
            ? this.focusOnAlternative(0)
            : this.focusOnAlternative(i + 1);
        }
        function c() {
          this.focusOnAlternative(0);
        }
        function h() {
          this.focusOnAlternative(s.alternatives.length - 1);
        }
        for (var u = 0; u < this.alternatives.length; u++) {
          var d = this.alternatives[u];
          0 === u && d.tabbable(),
            d.appendTo(n),
            d.on("focus", r.bind(this, d, u), this),
            d.on("alternative-selected", o, this),
            d.on("previousOption", a, this),
            d.on("nextOption", l, this),
            d.on("firstOption", c, this),
            d.on("lastOption", h, this);
        }
        return this.$choice.append(n), t.append(this.$choice), this.$choice;
      }),
      (t.prototype.focusOnAlternative = function (t) {
        (this.answered && this.isAutoConfinue) || this.alternatives[t].focus();
      }),
      (t.prototype.setAnswered = function (t) {
        this.answered = t;
      }),
      (t.prototype.showResult = function (t, e) {
        var i = this,
          n = i.$choice.find(".h5p-sc-is-correct");
        H5P.Transition.onTransitionEnd(
          n,
          function () {
            i.trigger("finished", {
              correct: t,
              index: i.index,
              answerIndex: e,
            }),
              i.setAriaAttributes();
          },
          600
        ),
          i.$choice.find(".h5p-sc-is-wrong").addClass("h5p-sc-reveal-wrong"),
          n.addClass("h5p-sc-reveal-correct");
      }),
      (t.prototype.resetA11yText = function () {
        this.$choice.find(".h5p-sc-a11y").text("");
      }),
      (t.prototype.setA11yTextReadable = function () {
        this.$choice.find(".h5p-sc-a11y").attr("aria-hidden", !1);
      }),
      (t.prototype.setAriaAttributes = function () {
        this.isAutoConfinue ||
          (this.$choice
            .find(".h5p-sc-alternative.h5p-sc-selected")
            .attr("aria-checked", !0),
          this.$choice.find(".h5p-sc-alternative").attr("aria-disabled", !0));
      }),
      (t.prototype.resetAriaAttributes = function () {
        if (!this.isAutoConfinue) {
          const t = this.$choice.find(".h5p-sc-alternative");
          t.removeAttr("aria-disabled"), t.removeAttr("aria-checked");
        }
      }),
      t
    );
  })(H5P.jQuery, H5P.EventDispatcher, H5P.SingleChoiceSet.Alternative)),
  ((H5P = H5P || {}).SingleChoiceSet = (function (r, a, l, c, h, u, d, o, e) {
    function t(t, e, i) {
      var n = this;
      (this.contentId = e),
        (this.contentData = i),
        (this.userResponses = []),
        l.call(this, "single-choice-set"),
        (this.options = r.extend(
          !0,
          {},
          {
            choices: [],
            overallFeedback: [],
            behaviour: {
              autoContinue: !0,
              timeoutCorrect: 2e3,
              timeoutWrong: 3e3,
              soundEffectsEnabled: !0,
              enableRetry: !0,
              enableSolutionsButton: !0,
              passPercentage: 100,
            },
          },
          t
        )),
        i &&
          void 0 !== i.previousState &&
          ((this.currentIndex = i.previousState.progress),
          (this.results = i.previousState.answers),
          (this.userResponses =
            void 0 !== i.previousState.userResponses
              ? i.previousState.userResponses
              : [])),
        (this.currentIndex = this.currentIndex || 0),
        (this.results = this.results || { corrects: 0, wrongs: 0 }),
        this.options.behaviour.autoContinue ||
          ((this.options.behaviour.timeoutCorrect = 0),
          (this.options.behaviour.timeoutWrong = 0)),
        (this.stopWatches = []),
        this.startStopWatch(this.currentIndex),
        (this.muted = !1 === this.options.behaviour.soundEffectsEnabled),
        (this.l10n = H5P.jQuery.extend(
          {
            correctText: "Correct!",
            incorrectText: "Incorrect!",
            shouldSelect: "Should have been selected",
            shouldNotSelect: "Should not have been selected",
            nextButtonLabel: "Next question",
            showSolutionButtonLabel: "Show solution",
            retryButtonLabel: "Retry",
            closeButtonLabel: "Close",
            solutionViewTitle: "Solution",
            slideOfTotal: "Slide :num of :total",
            muteButtonLabel: "Mute feedback sound",
            scoreBarLabel: "You got :num out of :total points",
            solutionListQuestionNumber: "Question :num",
            a11yShowSolution:
              "Show the solution. The task will be marked with its correct solution.",
            a11yRetry:
              "Retry the task. Reset all responses and start the task over again.",
          },
          void 0 !== t.l10n ? t.l10n : {}
        )),
        (this.$container = r("<div>", {
          class:
            "h5p-sc-set-wrapper navigatable" +
            (this.options.behaviour.autoContinue ? "" : " next-button-mode"),
        })),
        (this.$slides = []),
        (this.choices = []),
        (n.buttonsToBeHidden = []),
        (this.solutionView = new h(e, this.options.choices, this.l10n)),
        (this.$choices = r("<div>", { class: "h5p-sc-set h5p-sc-animate" })),
        (this.options.choices = this.options.choices.filter(function (t) {
          return void 0 !== t && !!t.answers;
        }));
      e = this.options.choices.length;
      (n.progressbar = a.createProgressbar(e + 1, {
        progressText: this.l10n.slideOfTotal,
      })),
        n.progressbar.setProgress(this.currentIndex);
      for (var s = 0; s < this.options.choices.length; s++) {
        var o = new c(
          this.options.choices[s],
          s,
          this.contentId,
          this.options.behaviour.autoContinue
        );
        o.on("finished", this.handleQuestionFinished, this),
          o.on("alternative-selected", this.handleAlternativeSelected, this),
          o.appendTo(this.$choices, s === this.currentIndex),
          this.choices.push(o),
          this.$slides.push(o.$choice);
      }
      (this.resultSlide = new u(this.options.choices.length)),
        this.resultSlide.appendTo(this.$choices),
        this.resultSlide.on(
          "retry",
          function () {
            n.resetTask(!0);
          },
          this
        ),
        this.resultSlide.on("view-solution", this.handleViewSolution, this),
        this.$slides.push(this.resultSlide.$resultSlide),
        this.on("resize", this.resize, this),
        this.recklessJump(this.currentIndex),
        this.options.choices.length === this.currentIndex &&
          (this.resultSlide.$resultSlide.addClass("h5p-sc-current-slide"),
          this.setScore(this.results.corrects, !0)),
        this.muted ||
          setTimeout(function () {
            d.setup(n.getLibraryFilePath(""));
          }, 1),
        (this.superHideButton = n.hideButton),
        (this.hideButton = function (t) {
          return n.scoreTimeout
            ? (n.buttonsToBeHidden.push(t), this)
            : n.superHideButton(t);
        });
    }
    (((t.prototype = Object.create(l.prototype)).constructor =
      t).prototype.setTabbable = function (t, e) {
      t && t.attr("tabindex", e ? 0 : -1);
    }),
      (t.prototype.handleAlternativeSelected = function (t) {
        (this.lastAnswerIsCorrect = t.data.correct),
          this.toggleNextButton(!0),
          this.results[this.lastAnswerIsCorrect ? "corrects" : "wrongs"]++,
          this.triggerXAPI("interacted"),
          this.readA11yFriendlyText(t.data.index, t.data.currentIndex),
          this.muted ||
            d.play(
              this.lastAnswerIsCorrect ? "positive-short" : "negative-short",
              700
            );
      }),
      (t.prototype.handleQuestionFinished = function (t) {
        var e = this,
          i = t.data.index,
          n = (e.userResponses[i] = t.data.answerIndex),
          t = this.stopStopWatch(i),
          t = e.createXApiAnsweredEvent(e.options.choices[i], n, t);
        e.trigger(t), e.continue(i);
      }),
      (t.prototype.continue = function (t) {
        var e,
          i,
          n = this;
        n.choices[t].setA11yTextReadable(),
          n.options.behaviour.autoContinue
            ? ((e = function () {
                n.$container.off("click.impatient keydown.impatient"),
                  clearTimeout(i),
                  n.next();
              }),
              (i = setTimeout(
                function () {
                  e();
                },
                n.lastAnswerIsCorrect
                  ? n.options.behaviour.timeoutCorrect
                  : n.options.behaviour.timeoutWrong
              )),
              n.onImpatientUser(e))
            : n.$nextButton.focus();
      }),
      (t.prototype.onImpatientUser = function (e) {
        this.$container.off("click.impatient keydown.impatient"),
          this.$container.one("click.impatient", e),
          this.$container.one("keydown.impatient", function (t) {
            [13, 32, 39].indexOf(t.which) && e();
          });
      }),
      (t.prototype.next = function () {
        this.move(this.currentIndex + 1);
      }),
      (t.prototype.createXApiAnsweredEvent = function (t, e, i) {
        var n = this,
          s = o.interactionTypes,
          s = o
            .createDefinition()
            .interactionType(s.CHOICE)
            .description(t.question)
            .correctResponsesPattern(n.getXApiCorrectResponsePattern())
            .optional(n.getXApiChoices(t.answers))
            .build(),
          e = o
            .createResult()
            .response(e.toString())
            .duration(i)
            .score(0 === e ? 1 : 0, 1)
            .completion(!0)
            .success(0 === e)
            .build();
        return o
          .create()
          .verb(o.verbs.ANSWERED)
          .objectDefinition(s)
          .context(n.contentId, n.subContentId)
          .contentId(n.contentId, t.subContentId)
          .result(e)
          .build();
      }),
      (t.prototype.getXApiCorrectResponsePattern = function () {
        return [o.createCorrectResponsePattern([(0).toString()])];
      }),
      (t.prototype.getXApiChoices = function (t) {
        return {
          choices: t.map(function (t, e) {
            return o.createChoice(e.toString(), t);
          }),
        };
      }),
      (t.prototype.handleQueuedButtonChanges = function () {
        var e = this;
        e.buttonsToBeHidden.length &&
          e.buttonsToBeHidden.forEach(function (t) {
            e.superHideButton(t);
          }),
          (e.buttonsToBeHidden = []);
      }),
      (t.prototype.setScore = function (t, e) {
        var i,
          n = this;
        n.choices.length &&
          ((i = s(n.options.overallFeedback, t / n.options.choices.length)
            .replace(":numcorrect", t)
            .replace(":maxscore", n.options.choices.length.toString())),
          n.setFeedback(i, t, n.options.choices.length, n.l10n.scoreBarLabel),
          t === n.options.choices.length
            ? (n.hideButton("try-again"), n.hideButton("show-solution"))
            : (n.showButton("try-again"), n.showButton("show-solution")),
          n.handleQueuedButtonChanges(),
          (n.scoreTimeout = void 0),
          e ||
            n.triggerXAPIScored(
              t,
              n.options.choices.length,
              "completed",
              !0,
              (100 * t) / n.options.choices.length >=
                n.options.behaviour.passPercentage
            ),
          n.trigger("resize"));
      }),
      (t.prototype.handleViewSolution = function () {
        var e = this,
          t = r(".h5p-question-try-again", e.$container),
          i = r(".h5p-question-show-solution", e.$container),
          n = [e.$muteButton, t, i];
        n.forEach(function (t) {
          e.setTabbable(t, !1);
        }),
          e.solutionView.on("hide", function () {
            n.forEach(function (t) {
              e.setTabbable(t, !0);
            }),
              e.toggleAriaVisibility(!0),
              e.focusButton();
          }),
          e.solutionView.show(),
          e.toggleAriaVisibility(!1);
      }),
      (t.prototype.toggleAriaVisibility = function (t) {
        t = t ? "" : "true";
        this.$muteButton && this.$muteButton.attr("aria-hidden", t),
          this.progressbar.$progressbar.attr("aria-hidden", t),
          this.$choices.attr("aria-hidden", t);
      }),
      (t.prototype.registerDomElements = function () {
        this.setContent(this.createQuestion()),
          this.addButtons(),
          this.insertSectionAtElement(
            "feedback",
            this.resultSlide.$feedbackContainer
          ),
          this.insertSectionAtElement(
            "scorebar",
            this.resultSlide.$feedbackContainer
          ),
          this.insertSectionAtElement(
            "buttons",
            this.resultSlide.$buttonContainer
          ),
          this.options.choices.length === this.currentIndex &&
            this.trigger("question-finished"),
          this.trigger("resize");
      }),
      (t.prototype.addButtons = function () {
        var t = this;
        this.options.behaviour.enableRetry &&
          this.addButton(
            "try-again",
            this.l10n.retryButtonLabel,
            function () {
              t.resetTask(!0);
            },
            t.results.corrects !== t.options.choices.length,
            { "aria-label": this.l10n.a11yRetry }
          ),
          this.options.behaviour.enableSolutionsButton &&
            this.addButton(
              "show-solution",
              this.l10n.showSolutionButtonLabel,
              function () {
                t.showSolutions();
              },
              t.results.corrects !== t.options.choices.length,
              { "aria-label": this.l10n.a11yShowSolution }
            );
      }),
      (t.prototype.createQuestion = function () {
        var e,
          i = this;
        function n(t) {
          var e = r(t.target);
          t.preventDefault(),
            (i.muted = !i.muted),
            e.attr("aria-pressed", i.muted);
        }
        return (
          i.progressbar.appendTo(i.$container),
          i.$container.append(i.$choices),
          this.options.behaviour.autoContinue ||
            ((i.$nextButton = a.createButton({
              class: "h5p-ssc-next-button",
              "aria-label": i.l10n.nextButtonLabel,
              click: (e = function () {
                "true" !== i.$nextButton.attr("aria-disabled") && i.next();
              }),
              keydown: function (t) {
                switch (t.which) {
                  case 13:
                  case 32:
                    e(), t.preventDefault();
                }
              },
              appendTo: i.$container,
            })),
            i.toggleNextButton(!1)),
          i.options.behaviour.soundEffectsEnabled &&
            (i.$muteButton = r("<div>", {
              class: "h5p-sc-sound-control",
              tabindex: 0,
              role: "button",
              "aria-label": i.l10n.muteButtonLabel,
              "aria-pressed": !1,
              on: {
                keydown: function (t) {
                  switch (t.which) {
                    case 13:
                    case 32:
                      n(t);
                  }
                },
              },
              click: n,
              prependTo: i.$container,
            })),
          i.solutionView.appendTo(i.$container),
          i.resize(),
          i.$container.addClass("initialized"),
          i.$container
        );
      }),
      (t.prototype.resize = function () {
        var e = 0;
        this.choices.forEach(function (t) {
          t = t.$choice.outerHeight();
          e = e < t ? t : e;
        }),
          this.$choices.css({ minHeight: e + "px" });
      }),
      (t.prototype.toggleNextButton = function (t) {
        this.$nextButton && this.$nextButton.attr("aria-disabled", !t);
      }),
      (t.prototype.recklessJump = function (t) {
        var e = "translateX(" + 100 * -t + "%)";
        this.$choices.css({
          "-webkit-transform": e,
          "-moz-transform": e,
          "-ms-transform": e,
          transform: e,
        }),
          this.progressbar.setProgress(t + 1);
      }),
      (t.prototype.move = function (t, e = !0) {
        var i,
          n,
          s,
          o,
          r = this;
        t === this.currentIndex ||
          t > r.$slides.length - 1 ||
          ((i = r.$slides[r.currentIndex]),
          (n = r.choices[t]),
          (s = r.$slides[t]),
          (o = t >= r.choices.length),
          r.toggleNextButton(!1),
          H5P.Transition.onTransitionEnd(
            r.$choices,
            function () {
              i.removeClass("h5p-sc-current-slide"),
                o || (!e && !r.isRoot())
                  ? r.resultSlide.focusScore()
                  : n.focusOnAlternative(0);
            },
            600
          ),
          o && r.setScore(r.results.corrects),
          r.$container.toggleClass("navigatable", !o),
          this.startStopWatch(t),
          s.addClass("h5p-sc-current-slide"),
          r.recklessJump(t),
          (r.currentIndex = t));
      }),
      (t.prototype.startStopWatch = function (t) {
        (this.stopWatches[t] = this.stopWatches[t] || new e()),
          this.stopWatches[t].start();
      }),
      (t.prototype.stopStopWatch = function (t) {
        this.stopWatches[t] && this.stopWatches[t].stop();
      }),
      (t.prototype.timePassedInStopWatch = function (t) {
        return void 0 !== this.stopWatches[t]
          ? this.stopWatches[t].passedTime()
          : 0;
      }),
      (t.prototype.getTotalPassedTime = function () {
        return this.stopWatches
          .filter(function (t) {
            return null != t;
          })
          .reduce(function (t, e) {
            return t + e.passedTime();
          }, 0);
      }),
      (t.prototype.getScore = function () {
        return this.results.corrects;
      }),
      (t.prototype.getMaxScore = function () {
        return this.options.choices.length;
      }),
      (t.prototype.getAnswerGiven = function () {
        return 0 < this.results.corrects + this.results.wrongs;
      }),
      (t.prototype.getTitle = function () {
        return H5P.createTitle(
          this.contentData &&
            this.contentData.metadata &&
            this.contentData.metadata.title
            ? this.contentData.metadata.title
            : "Single Choice Set"
        );
      }),
      (t.prototype.getXAPIData = function () {
        var n = this,
          t = n.options.choices.map(function (t, e) {
            var i = 0 <= n.userResponses[e] ? n.userResponses[e] : "",
              e = n.timePassedInStopWatch(e);
            return {
              statement: n.createXApiAnsweredEvent(t, i, e).data.statement,
            };
          }),
          e = o
            .createResult()
            .score(n.getScore(), n.getMaxScore())
            .duration(n.getTotalPassedTime())
            .build(),
          i = o
            .createDefinition()
            .interactionType(o.interactionTypes.COMPOUND)
            .build();
        return {
          statement: o
            .create()
            .verb(o.verbs.ANSWERED)
            .contentId(n.contentId, n.subContentId)
            .context(
              n.getParentAttribute("contentId"),
              n.getParentAttribute("subContentId")
            )
            .objectDefinition(i)
            .result(e)
            .build().data.statement,
          children: t,
        };
      }),
      (t.prototype.getParentAttribute = function (t) {
        if (void 0 !== this.parent) return this.parent[t];
      }),
      (t.prototype.showSolutions = function () {
        this.handleViewSolution();
      }),
      (t.prototype.resetTask = function (t = !1) {
        var e = this;
        this.solutionView.hide();
        for (
          var i = [
              "h5p-sc-reveal-wrong",
              "h5p-sc-reveal-correct",
              "h5p-sc-selected",
              "h5p-sc-drummed",
              "h5p-sc-correct-answer",
            ],
            n = 0;
          n < i.length;
          n++
        )
          this.$choices.find("." + i[n]).removeClass(i[n]);
        (this.results = { corrects: 0, wrongs: 0 }),
          this.choices.forEach(function (t) {
            t.setAnswered(!1), t.resetA11yText(), t.resetAriaAttributes();
          }),
          this.stopWatches.forEach(function (t) {
            t && t.reset();
          }),
          this.move(0, t),
          (this.userResponses = []),
          H5P.Transition.onTransitionEnd(
            this.$choices,
            function () {
              e.removeFeedback();
            },
            600
          );
      }),
      (t.prototype.getCurrentState = function () {
        return 0 < this.userResponses.length
          ? {
              progress: this.currentIndex,
              answers: this.results,
              userResponses: this.userResponses,
            }
          : void 0;
      }),
      (t.prototype.readA11yFriendlyText = function (t, e) {
        var i = this,
          t = i.$choices
            .find(".h5p-sc-is-correct")
            [t].textContent.replace(/[\n\r]+|[\s]{2,}/g, " ")
            .trim();
        let n = this.lastAnswerIsCorrect
          ? i.l10n.correctText
          : i.l10n.incorrectText;
        i.options.behaviour.autoContinue ||
          ((n = this.lastAnswerIsCorrect
            ? i.l10n.correctText + i.l10n.shouldSelect
            : i.l10n.incorrectText + i.l10n.shouldNotSelect),
          i.$choices
            .find(".h5p-sc-current-slide .h5p-sc-is-correct .h5p-sc-a11y")
            .text(i.l10n.shouldSelect),
          i.$choices
            .find(".h5p-sc-current-slide .h5p-sc-is-wrong .h5p-sc-a11y")
            .text(i.l10n.shouldNotSelect),
          i.$choices
            .find(".h5p-sc-current-slide .h5p-sc-alternative")
            .eq(e)
            .find(".h5p-sc-a11y")
            .text(n),
          (n = this.lastAnswerIsCorrect
            ? i.l10n.correctText
            : i.l10n.incorrectText + t + i.l10n.shouldSelect)),
          i.read(n);
      });
    var s = function (t, e) {
      e = Math.floor(100 * e);
      for (var i = 0; i < t.length; i++) {
        var n = t[i],
          s = void 0 !== n.feedback && 0 !== n.feedback.trim().length;
        if (n.from <= e && n.to >= e && s) return n.feedback;
      }
      return "";
    };
    return t;
  })(
    H5P.jQuery,
    H5P.JoubelUI,
    H5P.Question,
    H5P.SingleChoiceSet.SingleChoice,
    H5P.SingleChoiceSet.SolutionView,
    H5P.SingleChoiceSet.ResultSlide,
    H5P.SingleChoiceSet.SoundEffects,
    H5P.SingleChoiceSet.XApiEventBuilder,
    H5P.SingleChoiceSet.StopWatch
  )),
  /*!@license H5P.TrueFalse-1.8/scripts/h5p-true-false.js by Joubel licensed under MIT*/ (H5P.TrueFalse =
    (function (g, m) {
      "use strict";
      var v = Object.freeze({
          ONGOING: 1,
          FINISHED_WRONG: 2,
          FINISHED_CORRECT: 3,
          INTERNAL_SOLUTION: 4,
          EXTERNAL_SOLUTION: 5,
        }),
        b = Object.freeze({
          CHECK: "check-answer",
          TRYAGAIN: "try-again",
          SHOW_SOLUTION: "show-solution",
        });
      function y(t, e, i) {
        var n = this;
        m.call(n, "true-false");
        var s = g.extend(
          !0,
          {
            question: "No question text provided",
            correct: "true",
            l10n: {
              trueText: "True",
              falseText: "False",
              score: "You got @score of @total points",
              checkAnswer: "Check",
              submitAnswer: "Submit",
              showSolutionButton: "Show solution",
              tryAgain: "Retry",
              wrongAnswerMessage: "Wrong answer",
              correctAnswerMessage: "Correct answer",
              scoreBarLabel: "You got :num out of :total points",
              a11yCheck:
                "Check the answers. The responses will be marked as correct, incorrect, or unanswered.",
              a11yShowSolution:
                "Show the solution. The task will be marked with its correct solution.",
              a11yRetry:
                "Retry the task. Reset all responses and start the task over again.",
            },
            behaviour: {
              enableRetry: !0,
              enableSolutionsButton: !0,
              enableCheckButton: !0,
              confirmCheckDialog: !1,
              confirmRetryDialog: !1,
              autoCheck: !1,
            },
          },
          t
        );
        y.counter = void 0 === y.counter ? 0 : y.counter + 1;
        var o = "h5p-tfq" + H5P.TrueFalse.counter;
        (this.contentId = e), (this.contentData = i);
        var r = new H5P.TrueFalse.AnswerGroup(o, s.correct, s.l10n);
        void 0 !== i.previousState &&
          void 0 !== i.previousState.answer &&
          r.check(i.previousState.answer),
          r.on("selected", function () {
            n.triggerXAPI("interacted"), s.behaviour.autoCheck && (f(), a());
          });
        var a = function () {
            var t = n.createXAPIEventTemplate("answered");
            l(t), u(t), n.trigger(t);
          },
          l = function (t) {
            t = t.getVerifiedStatementValue(["object", "definition"]);
            (t.description = {
              "en-US": g("<div>" + s.question + "</div>").text(),
            }),
              (t.type = "http://adlnet.gov/expapi/activities/cmi.interaction"),
              (t.interactionType = "true-false"),
              (t.correctResponsesPattern = [c()]);
          },
          c = function () {
            return "true" === s.correct ? "true" : "false";
          },
          h = function () {
            return "false" === s.correct ? "true" : "false";
          },
          u = function (t) {
            var e = r.isCorrect();
            t.setScoredResult(e ? 1 : 0, 1, n, !0, e),
              (t.data.statement.result.response = (e ? c : h)());
          },
          d = function (t, e) {
            !0 === e ? n.showButton(t) : n.hideButton(t);
          },
          p = function (t) {
            d(b.SHOW_SOLUTION, t === v.FINISHED_WRONG),
              d(b.CHECK, t === v.ONGOING),
              d(
                b.TRYAGAIN,
                t === v.FINISHED_WRONG || t === v.INTERNAL_SOLUTION
              );
          },
          f = function () {
            var t,
              e = n.getScore();
            p(1 === e ? v.FINISHED_CORRECT : v.FINISHED_WRONG),
              (t = (t =
                1 === e && s.behaviour.feedbackOnCorrect
                  ? s.behaviour.feedbackOnCorrect
                  : 0 === e && s.behaviour.feedbackOnWrong
                  ? s.behaviour.feedbackOnWrong
                  : s.l10n.score)
                .replace("@score", e)
                .replace("@total", 1)),
              n.setFeedback(t, e, 1, s.l10n.scoreBarLabel),
              r.reveal();
          };
        (n.registerDomElements = function () {
          var t,
            e = this,
            i = s.media;
          i &&
            i.type &&
            i.type.library &&
            ("H5P.Image" === (t = (i = i.type).library.split(" ")[0])
              ? i.params.file &&
                e.setImage(i.params.file.path, {
                  disableImageZooming: s.media.disableImageZooming || !1,
                  alt: i.params.alt,
                  title: i.params.title,
                  expandImage: i.params.expandImage,
                  minimizeImage: i.params.minimizeImage,
                })
              : "H5P.Video" === t
              ? i.params.sources && e.setVideo(i)
              : "H5P.Audio" === t && i.params.files && e.setAudio(i)),
            e.setIntroduction('<div id="' + o + '">' + s.question + "</div>"),
            (e.$content = r.getDomElement()),
            e.setContent(e.$content),
            (i = g('[data-content-id="' + n.contentId + '"].h5p-content')),
            (i =
              0 !== (e = i.parents(".h5p-container")).length
                ? e.last()
                : 0 !== i.length
                ? i
                : g(document.body)),
            !0 === s.behaviour.enableSolutionsButton &&
              n.addButton(
                b.SHOW_SOLUTION,
                s.l10n.showSolutionButton,
                function () {
                  n.showSolutions(!0);
                },
                !1,
                { "aria-label": s.l10n.a11yShowSolution }
              ),
            !s.behaviour.autoCheck &&
              s.behaviour.enableCheckButton &&
              n.addButton(
                b.CHECK,
                s.l10n.checkAnswer,
                function () {
                  f(), a();
                },
                !0,
                { "aria-label": s.l10n.a11yCheck },
                {
                  confirmationDialog: {
                    enable: s.behaviour.confirmCheckDialog,
                    l10n: s.confirmCheck,
                    instance: n,
                    $parentElement: i,
                  },
                  contentData: n.contentData,
                  textIfSubmitting: s.l10n.submitAnswer,
                }
              ),
            !0 === s.behaviour.enableRetry &&
              n.addButton(
                b.TRYAGAIN,
                s.l10n.tryAgain,
                function () {
                  n.resetTask();
                },
                !0,
                { "aria-label": s.l10n.a11yRetry },
                {
                  confirmationDialog: {
                    enable: s.behaviour.confirmRetryDialog,
                    l10n: s.confirmRetry,
                    instance: n,
                    $parentElement: i,
                  },
                }
              ),
            p(v.ONGOING);
        }),
          (n.getCurrentState = function () {
            return { answer: r.getAnswer() };
          }),
          (n.getAnswerGiven = function () {
            return r.hasAnswered();
          }),
          (n.getScore = function () {
            return r.isCorrect() ? 1 : 0;
          }),
          (n.getMaxScore = function () {
            return 1;
          }),
          (n.getTitle = function () {
            return H5P.createTitle(
              n.contentData &&
                n.contentData.metadata &&
                n.contentData.metadata.title
                ? n.contentData.metadata.title
                : "True-False"
            );
          }),
          (n.showSolutions = function (t) {
            f(),
              r.showSolution(),
              p(t ? v.INTERNAL_SOLUTION : v.EXTERNAL_SOLUTION);
          }),
          (n.resetTask = function () {
            r.reset(), n.removeFeedback(), p(v.ONGOING);
          }),
          (n.getXAPIData = function () {
            var t = this.createXAPIEventTemplate("answered");
            return (
              this.addQuestionToXAPI(t),
              this.addResponseToXAPI(t),
              { statement: t.data.statement }
            );
          }),
          (n.addQuestionToXAPI = function (t) {
            t = t.getVerifiedStatementValue(["object", "definition"]);
            g.extend(t, this.getxAPIDefinition());
          }),
          (n.getxAPIDefinition = function () {
            var t = {
              interactionType: "true-false",
              type: "http://adlnet.gov/expapi/activities/cmi.interaction",
            };
            return (
              (t.description = {
                "en-US": g("<div>" + s.question + "</div>").text(),
              }),
              (t.correctResponsesPattern = [c()]),
              t
            );
          }),
          (n.addResponseToXAPI = function (t) {
            var e = r.isCorrect(),
              i = "";
            t.setScoredResult(e ? 1 : 0, 1, n, !0, e),
              void 0 !== n.getCurrentState().answer &&
                (i += (r.isCorrect() ? c : h)()),
              (t.data.statement.result.response = i);
          });
      }
      return ((y.prototype = Object.create(m.prototype)).constructor = y);
    })(H5P.jQuery, H5P.Question)),
  /*!@license H5P.TrueFalse-1.8/scripts/h5p-true-false-answer-group.js by Joubel licensed under MIT*/ (H5P.TrueFalse.AnswerGroup =
    (function (p, f) {
      "use strict";
      function t(t, e, i) {
        var n = this;
        f.call(n);
        function s(t, e) {
          return function () {
            (o = t), e.uncheck(), n.trigger("selected");
          };
        }
        var o,
          r = p("<div>", {
            class: "h5p-true-false-answers",
            role: "radiogroup",
            "aria-labelledby": t,
          }),
          a = new H5P.TrueFalse.Answer(
            i.trueText,
            i.correctAnswerMessage,
            i.wrongAnswerMessage
          ),
          l = new H5P.TrueFalse.Answer(
            i.falseText,
            i.correctAnswerMessage,
            i.wrongAnswerMessage
          ),
          c = "true" === e ? a : l,
          h = "false" === e ? a : l;
        a.on("checked", s(!0, l)), l.on("checked", s(!1, a));
        function u(t, e) {
          return function () {
            (o = t), e.check(), n.trigger("selected");
          };
        }
        a.on("invert", u(!1, l)), l.on("invert", u(!0, a));
        function d(t, e) {
          return function () {
            (e && n.hasAnswered() && !t.isChecked()) || t.tabable(e);
          };
        }
        a.on("focus", d(l, !1)),
          l.on("focus", d(a, !1)),
          a.on("blur", d(l, !0)),
          l.on("blur", d(a, !0)),
          r.append(a.getDomElement()),
          r.append(l.getDomElement()),
          (n.getDomElement = function () {
            return r;
          }),
          (n.check = function (t) {
            (t ? a : l).check();
          }),
          (n.getAnswer = function () {
            return o;
          }),
          (n.hasAnswered = function () {
            return void 0 !== o;
          }),
          (n.isCorrect = function () {
            return c.isChecked();
          }),
          (n.enable = function () {
            a.enable().tabable(!0), l.enable();
          }),
          (n.disable = function () {
            a.disable(), l.disable();
          }),
          (n.reveal = function () {
            n.hasAnswered() &&
              (n.isCorrect() ? c.markCorrect() : h.markWrong()),
              n.disable();
          }),
          (n.reset = function () {
            a.reset(), l.reset(), n.enable(), (o = void 0);
          }),
          (n.showSolution = function () {
            c.markCorrect(), h.unmark();
          });
      }
      return ((t.prototype = Object.create(f.prototype)).constructor = t);
    })(H5P.jQuery, H5P.EventDispatcher)),
  /*!@license H5P.TrueFalse-1.8/scripts/h5p-true-false-answer.js by Joubel licensed under MIT*/ (H5P.TrueFalse.Answer =
    (function (c, h) {
      "use strict";
      var u = {
        ENTER: 13,
        SPACE: 32,
        LEFT_ARROW: 37,
        UP_ARROW: 38,
        RIGHT_ARROW: 39,
        DOWN_ARROW: 40,
      };
      function t(t, e, i) {
        var n = this;
        h.call(n);
        function s(t) {
          setTimeout(function () {
            t();
          }, 0);
        }
        var o = !1,
          r = !0,
          a = c("<div>", {
            class: "h5p-true-false-answer",
            role: "radio",
            "aria-checked": !1,
            html: t + '<span class="aria-label"></span>',
            tabindex: 0,
            click: function (t) {
              1 === t.which && n.check();
            },
            keydown: function (t) {
              r &&
                (-1 !== [u.SPACE, u.ENTER].indexOf(t.keyCode)
                  ? (t.preventDefault(), n.check())
                  : -1 !==
                      [
                        u.LEFT_ARROW,
                        u.UP_ARROW,
                        u.RIGHT_ARROW,
                        u.DOWN_ARROW,
                      ].indexOf(t.keyCode) &&
                    (t.preventDefault(), n.uncheck(), n.trigger("invert")));
            },
            focus: function () {
              n.trigger("focus");
            },
            blur: function () {
              n.trigger("blur");
            },
          }),
          l = a.find(".aria-label");
        (n.getDomElement = function () {
          return a;
        }),
          (n.uncheck = function () {
            return (
              r &&
                (a.blur(),
                (o = !1),
                s(function () {
                  a.attr("aria-checked", o);
                })),
              n
            );
          }),
          (n.tabable = function (t) {
            return a.attr("tabIndex", t ? 0 : null), n;
          }),
          (n.check = function () {
            return (
              r &&
                ((o = !0),
                s(function () {
                  a.attr("aria-checked", o);
                }),
                n.trigger("checked"),
                a.focus()),
              n
            );
          }),
          (n.isChecked = function () {
            return o;
          }),
          (n.enable = function () {
            return a.attr({ "aria-disabled": "", tabIndex: 0 }), (r = !0), n;
          }),
          (n.disable = function () {
            return a.attr({ "aria-disabled": !0, tabIndex: null }), (r = !1), n;
          }),
          (n.reset = function () {
            return n.enable(), n.uncheck(), n.unmark(), l.html(""), n;
          }),
          (n.markWrong = function () {
            return (
              s(function () {
                a.addClass("wrong");
              }),
              l.html("." + i),
              n
            );
          }),
          (n.markCorrect = function () {
            return (
              s(function () {
                a.addClass("correct");
              }),
              l.html("." + e),
              n
            );
          }),
          (n.unmark = function () {
            return (
              s(function () {
                a.removeClass("wrong correct");
              }),
              n
            );
          });
      }
      return ((t.prototype = Object.create(h.prototype)).constructor = t);
    })(H5P.jQuery, H5P.EventDispatcher));
/*!@license jQuery.ui-1.10/h5p-jquery-ui.js by Jupiter licensed under MIT*/ var oldJQuery =
    jQuery,
  jQuery = H5P.jQuery;
!(function (t) {
  "use strict";
  "function" == typeof define && define.amd ? define(["jquery"], t) : t(jQuery);
})(function (Y) {
  "use strict";
  Y.ui = Y.ui || {};
  Y.ui.version = "1.13.0";
  var s,
    i = 0,
    r = Array.prototype.hasOwnProperty,
    a = Array.prototype.slice;
  (Y.cleanData =
    ((s = Y.cleanData),
    function (t) {
      for (var e, i, n = 0; null != (i = t[n]); n++)
        (e = Y._data(i, "events")) && e.remove && Y(i).triggerHandler("remove");
      s(t);
    })),
    (Y.widget = function (t, i, e) {
      var n,
        s,
        o,
        r = {},
        a = t.split(".")[0],
        l = a + "-" + (t = t.split(".")[1]);
      return (
        e || ((e = i), (i = Y.Widget)),
        Array.isArray(e) && (e = Y.extend.apply(null, [{}].concat(e))),
        (Y.expr.pseudos[l.toLowerCase()] = function (t) {
          return !!Y.data(t, l);
        }),
        (Y[a] = Y[a] || {}),
        (n = Y[a][t]),
        (s = Y[a][t] =
          function (t, e) {
            if (!this._createWidget) return new s(t, e);
            arguments.length && this._createWidget(t, e);
          }),
        Y.extend(s, n, {
          version: e.version,
          _proto: Y.extend({}, e),
          _childConstructors: [],
        }),
        ((o = new i()).options = Y.widget.extend({}, o.options)),
        Y.each(e, function (e, n) {
          function s() {
            return i.prototype[e].apply(this, arguments);
          }
          function o(t) {
            return i.prototype[e].apply(this, t);
          }
          r[e] =
            "function" == typeof n
              ? function () {
                  var t,
                    e = this._super,
                    i = this._superApply;
                  return (
                    (this._super = s),
                    (this._superApply = o),
                    (t = n.apply(this, arguments)),
                    (this._super = e),
                    (this._superApply = i),
                    t
                  );
                }
              : n;
        }),
        (s.prototype = Y.widget.extend(
          o,
          { widgetEventPrefix: (n && o.widgetEventPrefix) || t },
          r,
          { constructor: s, namespace: a, widgetName: t, widgetFullName: l }
        )),
        n
          ? (Y.each(n._childConstructors, function (t, e) {
              var i = e.prototype;
              Y.widget(i.namespace + "." + i.widgetName, s, e._proto);
            }),
            delete n._childConstructors)
          : i._childConstructors.push(s),
        Y.widget.bridge(t, s),
        s
      );
    }),
    (Y.widget.extend = function (t) {
      for (var e, i, n = a.call(arguments, 1), s = 0, o = n.length; s < o; s++)
        for (e in n[s])
          (i = n[s][e]),
            r.call(n[s], e) &&
              void 0 !== i &&
              (Y.isPlainObject(i)
                ? (t[e] = Y.isPlainObject(t[e])
                    ? Y.widget.extend({}, t[e], i)
                    : Y.widget.extend({}, i))
                : (t[e] = i));
      return t;
    }),
    (Y.widget.bridge = function (o, e) {
      var r = e.prototype.widgetFullName || o;
      Y.fn[o] = function (i) {
        var t = "string" == typeof i,
          n = a.call(arguments, 1),
          s = this;
        return (
          t
            ? this.length || "instance" !== i
              ? this.each(function () {
                  var t,
                    e = Y.data(this, r);
                  return "instance" === i
                    ? ((s = e), !1)
                    : e
                    ? "function" != typeof e[i] || "_" === i.charAt(0)
                      ? Y.error(
                          "no such method '" +
                            i +
                            "' for " +
                            o +
                            " widget instance"
                        )
                      : (t = e[i].apply(e, n)) !== e && void 0 !== t
                      ? ((s = t && t.jquery ? s.pushStack(t.get()) : t), !1)
                      : void 0
                    : Y.error(
                        "cannot call methods on " +
                          o +
                          " prior to initialization; attempted to call method '" +
                          i +
                          "'"
                      );
                })
              : (s = void 0)
            : (n.length && (i = Y.widget.extend.apply(null, [i].concat(n))),
              this.each(function () {
                var t = Y.data(this, r);
                t
                  ? (t.option(i || {}), t._init && t._init())
                  : Y.data(this, r, new e(i, this));
              })),
          s
        );
      };
    }),
    (Y.Widget = function () {}),
    (Y.Widget._childConstructors = []),
    (Y.Widget.prototype = {
      widgetName: "widget",
      widgetEventPrefix: "",
      defaultElement: "<div>",
      options: { classes: {}, disabled: !1, create: null },
      _createWidget: function (t, e) {
        (e = Y(e || this.defaultElement || this)[0]),
          (this.element = Y(e)),
          (this.uuid = i++),
          (this.eventNamespace = "." + this.widgetName + this.uuid),
          (this.bindings = Y()),
          (this.hoverable = Y()),
          (this.focusable = Y()),
          (this.classesElementLookup = {}),
          e !== this &&
            (Y.data(e, this.widgetFullName, this),
            this._on(!0, this.element, {
              remove: function (t) {
                t.target === e && this.destroy();
              },
            }),
            (this.document = Y(e.style ? e.ownerDocument : e.document || e)),
            (this.window = Y(
              this.document[0].defaultView || this.document[0].parentWindow
            ))),
          (this.options = Y.widget.extend(
            {},
            this.options,
            this._getCreateOptions(),
            t
          )),
          this._create(),
          this.options.disabled &&
            this._setOptionDisabled(this.options.disabled),
          this._trigger("create", null, this._getCreateEventData()),
          this._init();
      },
      _getCreateOptions: function () {
        return {};
      },
      _getCreateEventData: Y.noop,
      _create: Y.noop,
      _init: Y.noop,
      destroy: function () {
        var i = this;
        this._destroy(),
          Y.each(this.classesElementLookup, function (t, e) {
            i._removeClass(e, t);
          }),
          this.element.off(this.eventNamespace).removeData(this.widgetFullName),
          this.widget().off(this.eventNamespace).removeAttr("aria-disabled"),
          this.bindings.off(this.eventNamespace);
      },
      _destroy: Y.noop,
      widget: function () {
        return this.element;
      },
      option: function (t, e) {
        var i,
          n,
          s,
          o = t;
        if (0 === arguments.length) return Y.widget.extend({}, this.options);
        if ("string" == typeof t)
          if (((o = {}), (t = (i = t.split(".")).shift()), i.length)) {
            for (
              n = o[t] = Y.widget.extend({}, this.options[t]), s = 0;
              s < i.length - 1;
              s++
            )
              (n[i[s]] = n[i[s]] || {}), (n = n[i[s]]);
            if (((t = i.pop()), 1 === arguments.length))
              return void 0 === n[t] ? null : n[t];
            n[t] = e;
          } else {
            if (1 === arguments.length)
              return void 0 === this.options[t] ? null : this.options[t];
            o[t] = e;
          }
        return this._setOptions(o), this;
      },
      _setOptions: function (t) {
        for (var e in t) this._setOption(e, t[e]);
        return this;
      },
      _setOption: function (t, e) {
        return (
          "classes" === t && this._setOptionClasses(e),
          (this.options[t] = e),
          "disabled" === t && this._setOptionDisabled(e),
          this
        );
      },
      _setOptionClasses: function (t) {
        var e, i, n;
        for (e in t)
          (n = this.classesElementLookup[e]),
            t[e] !== this.options.classes[e] &&
              n &&
              n.length &&
              ((i = Y(n.get())),
              this._removeClass(n, e),
              i.addClass(
                this._classes({ element: i, keys: e, classes: t, add: !0 })
              ));
      },
      _setOptionDisabled: function (t) {
        this._toggleClass(
          this.widget(),
          this.widgetFullName + "-disabled",
          null,
          !!t
        ),
          t &&
            (this._removeClass(this.hoverable, null, "ui-state-hover"),
            this._removeClass(this.focusable, null, "ui-state-focus"));
      },
      enable: function () {
        return this._setOptions({ disabled: !1 });
      },
      disable: function () {
        return this._setOptions({ disabled: !0 });
      },
      _classes: function (s) {
        var o = [],
          r = this;
        function t(t, e) {
          for (var i, n = 0; n < t.length; n++)
            (i = r.classesElementLookup[t[n]] || Y()),
              (i = s.add
                ? (s.element.each(function (t, e) {
                    Y.map(r.classesElementLookup, function (t) {
                      return t;
                    }).some(function (t) {
                      return t.is(e);
                    }) || r._on(Y(e), { remove: "_untrackClassesElement" });
                  }),
                  Y(Y.uniqueSort(i.get().concat(s.element.get()))))
                : Y(i.not(s.element).get())),
              (r.classesElementLookup[t[n]] = i),
              o.push(t[n]),
              e && s.classes[t[n]] && o.push(s.classes[t[n]]);
        }
        return (
          (s = Y.extend(
            { element: this.element, classes: this.options.classes || {} },
            s
          )).keys && t(s.keys.match(/\S+/g) || [], !0),
          s.extra && t(s.extra.match(/\S+/g) || []),
          o.join(" ")
        );
      },
      _untrackClassesElement: function (i) {
        var n = this;
        Y.each(n.classesElementLookup, function (t, e) {
          -1 !== Y.inArray(i.target, e) &&
            (n.classesElementLookup[t] = Y(e.not(i.target).get()));
        }),
          this._off(Y(i.target));
      },
      _removeClass: function (t, e, i) {
        return this._toggleClass(t, e, i, !1);
      },
      _addClass: function (t, e, i) {
        return this._toggleClass(t, e, i, !0);
      },
      _toggleClass: function (t, e, i, n) {
        var s = "string" == typeof t || null === t,
          i = {
            extra: s ? e : i,
            keys: s ? t : e,
            element: s ? this.element : t,
            add: (n = "boolean" == typeof n ? n : i),
          };
        return i.element.toggleClass(this._classes(i), n), this;
      },
      _on: function (s, o, t) {
        var r,
          a = this;
        "boolean" != typeof s && ((t = o), (o = s), (s = !1)),
          t
            ? ((o = r = Y(o)), (this.bindings = this.bindings.add(o)))
            : ((t = o), (o = this.element), (r = this.widget())),
          Y.each(t, function (t, e) {
            function i() {
              if (
                s ||
                (!0 !== a.options.disabled &&
                  !Y(this).hasClass("ui-state-disabled"))
              )
                return ("string" == typeof e ? a[e] : e).apply(a, arguments);
            }
            "string" != typeof e &&
              (i.guid = e.guid = e.guid || i.guid || Y.guid++);
            var n = t.match(/^([\w:-]*)\s*(.*)$/),
              t = n[1] + a.eventNamespace,
              n = n[2];
            n ? r.on(t, n, i) : o.on(t, i);
          });
      },
      _off: function (t, e) {
        (e =
          (e || "").split(" ").join(this.eventNamespace + " ") +
          this.eventNamespace),
          t.off(e),
          (this.bindings = Y(this.bindings.not(t).get())),
          (this.focusable = Y(this.focusable.not(t).get())),
          (this.hoverable = Y(this.hoverable.not(t).get()));
      },
      _delay: function (t, e) {
        var i = this;
        return setTimeout(function () {
          return ("string" == typeof t ? i[t] : t).apply(i, arguments);
        }, e || 0);
      },
      _hoverable: function (t) {
        (this.hoverable = this.hoverable.add(t)),
          this._on(t, {
            mouseenter: function (t) {
              this._addClass(Y(t.currentTarget), null, "ui-state-hover");
            },
            mouseleave: function (t) {
              this._removeClass(Y(t.currentTarget), null, "ui-state-hover");
            },
          });
      },
      _focusable: function (t) {
        (this.focusable = this.focusable.add(t)),
          this._on(t, {
            focusin: function (t) {
              this._addClass(Y(t.currentTarget), null, "ui-state-focus");
            },
            focusout: function (t) {
              this._removeClass(Y(t.currentTarget), null, "ui-state-focus");
            },
          });
      },
      _trigger: function (t, e, i) {
        var n,
          s,
          o = this.options[t];
        if (
          ((i = i || {}),
          ((e = Y.Event(e)).type = (
            t === this.widgetEventPrefix ? t : this.widgetEventPrefix + t
          ).toLowerCase()),
          (e.target = this.element[0]),
          (s = e.originalEvent))
        )
          for (n in s) n in e || (e[n] = s[n]);
        return (
          this.element.trigger(e, i),
          !(
            ("function" == typeof o &&
              !1 === o.apply(this.element[0], [e].concat(i))) ||
            e.isDefaultPrevented()
          )
        );
      },
    }),
    Y.each({ show: "fadeIn", hide: "fadeOut" }, function (o, r) {
      Y.Widget.prototype["_" + o] = function (e, t, i) {
        var n,
          s = (t = "string" == typeof t ? { effect: t } : t)
            ? (!0 !== t && "number" != typeof t && t.effect) || r
            : o;
        "number" == typeof (t = t || {})
          ? (t = { duration: t })
          : !0 === t && (t = {}),
          (n = !Y.isEmptyObject(t)),
          (t.complete = i),
          t.delay && e.delay(t.delay),
          n && Y.effects && Y.effects.effect[s]
            ? e[o](t)
            : s !== o && e[s]
            ? e[s](t.duration, t.easing, i)
            : e.queue(function (t) {
                Y(this)[o](), i && i.call(e[0]), t();
              });
      };
    });
  var n, x, C, o, l, c, h, u, S;
  Y.widget;
  function P(t, e, i) {
    return [
      parseFloat(t[0]) * (u.test(t[0]) ? e / 100 : 1),
      parseFloat(t[1]) * (u.test(t[1]) ? i / 100 : 1),
    ];
  }
  function k(t, e) {
    return parseInt(Y.css(t, e), 10) || 0;
  }
  function T(t) {
    return null != t && t === t.window;
  }
  (x = Math.max),
    (C = Math.abs),
    (o = /left|center|right/),
    (l = /top|center|bottom/),
    (c = /[\+\-]\d+(\.[\d]+)?%?/),
    (h = /^\w+/),
    (u = /%$/),
    (S = Y.fn.position),
    (Y.position = {
      scrollbarWidth: function () {
        if (void 0 !== n) return n;
        var t,
          e = Y(
            "<div style='display:block;position:absolute;width:200px;height:200px;overflow:hidden;'><div style='height:300px;width:auto;'></div></div>"
          ),
          i = e.children()[0];
        return (
          Y("body").append(e),
          (t = i.offsetWidth),
          e.css("overflow", "scroll"),
          t === (i = i.offsetWidth) && (i = e[0].clientWidth),
          e.remove(),
          (n = t - i)
        );
      },
      getScrollInfo: function (t) {
        var e = t.isWindow || t.isDocument ? "" : t.element.css("overflow-x"),
          i = t.isWindow || t.isDocument ? "" : t.element.css("overflow-y"),
          e =
            "scroll" === e ||
            ("auto" === e && t.width < t.element[0].scrollWidth);
        return {
          width:
            "scroll" === i ||
            ("auto" === i && t.height < t.element[0].scrollHeight)
              ? Y.position.scrollbarWidth()
              : 0,
          height: e ? Y.position.scrollbarWidth() : 0,
        };
      },
      getWithinInfo: function (t) {
        var e = Y(t || window),
          i = T(e[0]),
          n = !!e[0] && 9 === e[0].nodeType;
        return {
          element: e,
          isWindow: i,
          isDocument: n,
          offset: !i && !n ? Y(t).offset() : { left: 0, top: 0 },
          scrollLeft: e.scrollLeft(),
          scrollTop: e.scrollTop(),
          width: e.outerWidth(),
          height: e.outerHeight(),
        };
      },
    }),
    (Y.fn.position = function (u) {
      if (!u || !u.of) return S.apply(this, arguments);
      var d,
        p,
        f,
        g,
        m,
        t,
        v =
          "string" == typeof (u = Y.extend({}, u)).of
            ? Y(document).find(u.of)
            : Y(u.of),
        b = Y.position.getWithinInfo(u.within),
        y = Y.position.getScrollInfo(b),
        w = (u.collision || "flip").split(" "),
        _ = {},
        e =
          9 === (t = (e = v)[0]).nodeType
            ? {
                width: e.width(),
                height: e.height(),
                offset: { top: 0, left: 0 },
              }
            : T(t)
            ? {
                width: e.width(),
                height: e.height(),
                offset: { top: e.scrollTop(), left: e.scrollLeft() },
              }
            : t.preventDefault
            ? { width: 0, height: 0, offset: { top: t.pageY, left: t.pageX } }
            : {
                width: e.outerWidth(),
                height: e.outerHeight(),
                offset: e.offset(),
              };
      return (
        v[0].preventDefault && (u.at = "left top"),
        (p = e.width),
        (f = e.height),
        (m = Y.extend({}, (g = e.offset))),
        Y.each(["my", "at"], function () {
          var t,
            e,
            i = (u[this] || "").split(" ");
          ((i =
            1 === i.length
              ? o.test(i[0])
                ? i.concat(["center"])
                : l.test(i[0])
                ? ["center"].concat(i)
                : ["center", "center"]
              : i)[0] = o.test(i[0]) ? i[0] : "center"),
            (i[1] = l.test(i[1]) ? i[1] : "center"),
            (t = c.exec(i[0])),
            (e = c.exec(i[1])),
            (_[this] = [t ? t[0] : 0, e ? e[0] : 0]),
            (u[this] = [h.exec(i[0])[0], h.exec(i[1])[0]]);
        }),
        1 === w.length && (w[1] = w[0]),
        "right" === u.at[0]
          ? (m.left += p)
          : "center" === u.at[0] && (m.left += p / 2),
        "bottom" === u.at[1]
          ? (m.top += f)
          : "center" === u.at[1] && (m.top += f / 2),
        (d = P(_.at, p, f)),
        (m.left += d[0]),
        (m.top += d[1]),
        this.each(function () {
          var i,
            t,
            r = Y(this),
            a = r.outerWidth(),
            l = r.outerHeight(),
            e = k(this, "marginLeft"),
            n = k(this, "marginTop"),
            s = a + e + k(this, "marginRight") + y.width,
            o = l + n + k(this, "marginBottom") + y.height,
            c = Y.extend({}, m),
            h = P(_.my, r.outerWidth(), r.outerHeight());
          "right" === u.my[0]
            ? (c.left -= a)
            : "center" === u.my[0] && (c.left -= a / 2),
            "bottom" === u.my[1]
              ? (c.top -= l)
              : "center" === u.my[1] && (c.top -= l / 2),
            (c.left += h[0]),
            (c.top += h[1]),
            (i = { marginLeft: e, marginTop: n }),
            Y.each(["left", "top"], function (t, e) {
              Y.ui.position[w[t]] &&
                Y.ui.position[w[t]][e](c, {
                  targetWidth: p,
                  targetHeight: f,
                  elemWidth: a,
                  elemHeight: l,
                  collisionPosition: i,
                  collisionWidth: s,
                  collisionHeight: o,
                  offset: [d[0] + h[0], d[1] + h[1]],
                  my: u.my,
                  at: u.at,
                  within: b,
                  elem: r,
                });
            }),
            u.using &&
              (t = function (t) {
                var e = g.left - c.left,
                  i = e + p - a,
                  n = g.top - c.top,
                  s = n + f - l,
                  o = {
                    target: {
                      element: v,
                      left: g.left,
                      top: g.top,
                      width: p,
                      height: f,
                    },
                    element: {
                      element: r,
                      left: c.left,
                      top: c.top,
                      width: a,
                      height: l,
                    },
                    horizontal: i < 0 ? "left" : 0 < e ? "right" : "center",
                    vertical: s < 0 ? "top" : 0 < n ? "bottom" : "middle",
                  };
                p < a && C(e + i) < p && (o.horizontal = "center"),
                  f < l && C(n + s) < f && (o.vertical = "middle"),
                  x(C(e), C(i)) > x(C(n), C(s))
                    ? (o.important = "horizontal")
                    : (o.important = "vertical"),
                  u.using.call(this, t, o);
              }),
            r.offset(Y.extend(c, { using: t }));
        })
      );
    }),
    (Y.ui.position = {
      fit: {
        left: function (t, e) {
          var i = e.within,
            n = i.isWindow ? i.scrollLeft : i.offset.left,
            s = i.width,
            o = t.left - e.collisionPosition.marginLeft,
            r = n - o,
            a = o + e.collisionWidth - s - n;
          e.collisionWidth > s
            ? 0 < r && a <= 0
              ? ((i = t.left + r + e.collisionWidth - s - n), (t.left += r - i))
              : (t.left =
                  !(0 < a && r <= 0) && a < r ? n + s - e.collisionWidth : n)
            : 0 < r
            ? (t.left += r)
            : 0 < a
            ? (t.left -= a)
            : (t.left = x(t.left - o, t.left));
        },
        top: function (t, e) {
          var i = e.within,
            n = i.isWindow ? i.scrollTop : i.offset.top,
            s = e.within.height,
            o = t.top - e.collisionPosition.marginTop,
            r = n - o,
            a = o + e.collisionHeight - s - n;
          e.collisionHeight > s
            ? 0 < r && a <= 0
              ? ((i = t.top + r + e.collisionHeight - s - n), (t.top += r - i))
              : (t.top =
                  !(0 < a && r <= 0) && a < r ? n + s - e.collisionHeight : n)
            : 0 < r
            ? (t.top += r)
            : 0 < a
            ? (t.top -= a)
            : (t.top = x(t.top - o, t.top));
        },
      },
      flip: {
        left: function (t, e) {
          var i = e.within,
            n = i.offset.left + i.scrollLeft,
            s = i.width,
            o = i.isWindow ? i.scrollLeft : i.offset.left,
            r = t.left - e.collisionPosition.marginLeft,
            a = r - o,
            l = r + e.collisionWidth - s - o,
            c =
              "left" === e.my[0]
                ? -e.elemWidth
                : "right" === e.my[0]
                ? e.elemWidth
                : 0,
            i =
              "left" === e.at[0]
                ? e.targetWidth
                : "right" === e.at[0]
                ? -e.targetWidth
                : 0,
            r = -2 * e.offset[0];
          a < 0
            ? ((n = t.left + c + i + r + e.collisionWidth - s - n) < 0 ||
                n < C(a)) &&
              (t.left += c + i + r)
            : 0 < l &&
              (0 <
                (o = t.left - e.collisionPosition.marginLeft + c + i + r - o) ||
                C(o) < l) &&
              (t.left += c + i + r);
        },
        top: function (t, e) {
          var i = e.within,
            n = i.offset.top + i.scrollTop,
            s = i.height,
            o = i.isWindow ? i.scrollTop : i.offset.top,
            r = t.top - e.collisionPosition.marginTop,
            a = r - o,
            l = r + e.collisionHeight - s - o,
            c =
              "top" === e.my[1]
                ? -e.elemHeight
                : "bottom" === e.my[1]
                ? e.elemHeight
                : 0,
            i =
              "top" === e.at[1]
                ? e.targetHeight
                : "bottom" === e.at[1]
                ? -e.targetHeight
                : 0,
            r = -2 * e.offset[1];
          a < 0
            ? ((n = t.top + c + i + r + e.collisionHeight - s - n) < 0 ||
                n < C(a)) &&
              (t.top += c + i + r)
            : 0 < l &&
              (0 <
                (o = t.top - e.collisionPosition.marginTop + c + i + r - o) ||
                C(o) < l) &&
              (t.top += c + i + r);
        },
      },
      flipfit: {
        left: function () {
          Y.ui.position.flip.left.apply(this, arguments),
            Y.ui.position.fit.left.apply(this, arguments);
        },
        top: function () {
          Y.ui.position.flip.top.apply(this, arguments),
            Y.ui.position.fit.top.apply(this, arguments);
        },
      },
    });
  Y.ui.position,
    Y.extend(Y.expr.pseudos, {
      data: Y.expr.createPseudo
        ? Y.expr.createPseudo(function (e) {
            return function (t) {
              return !!Y.data(t, e);
            };
          })
        : function (t, e, i) {
            return !!Y.data(t, i[3]);
          },
    }),
    Y.fn.extend({
      disableSelection:
        ((t =
          "onselectstart" in document.createElement("div")
            ? "selectstart"
            : "mousedown"),
        function () {
          return this.on(t + ".ui-disableSelection", function (t) {
            t.preventDefault();
          });
        }),
      enableSelection: function () {
        return this.off(".ui-disableSelection");
      },
    });
  var t,
    d = Y,
    p = {},
    e = p.toString,
    f = /^([\-+])=\s*(\d+\.?\d*)/,
    g = [
      {
        re: /rgba?\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/,
        parse: function (t) {
          return [t[1], t[2], t[3], t[4]];
        },
      },
      {
        re: /rgba?\(\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/,
        parse: function (t) {
          return [2.55 * t[1], 2.55 * t[2], 2.55 * t[3], t[4]];
        },
      },
      {
        re: /#([a-f0-9]{2})([a-f0-9]{2})([a-f0-9]{2})([a-f0-9]{2})?/,
        parse: function (t) {
          return [
            parseInt(t[1], 16),
            parseInt(t[2], 16),
            parseInt(t[3], 16),
            t[4] ? (parseInt(t[4], 16) / 255).toFixed(2) : 1,
          ];
        },
      },
      {
        re: /#([a-f0-9])([a-f0-9])([a-f0-9])([a-f0-9])?/,
        parse: function (t) {
          return [
            parseInt(t[1] + t[1], 16),
            parseInt(t[2] + t[2], 16),
            parseInt(t[3] + t[3], 16),
            t[4] ? (parseInt(t[4] + t[4], 16) / 255).toFixed(2) : 1,
          ];
        },
      },
      {
        re: /hsla?\(\s*(\d+(?:\.\d+)?)\s*,\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/,
        space: "hsla",
        parse: function (t) {
          return [t[1], t[2] / 100, t[3] / 100, t[4]];
        },
      },
    ],
    m = (d.Color = function (t, e, i, n) {
      return new d.Color.fn.parse(t, e, i, n);
    }),
    v = {
      rgba: {
        props: {
          red: { idx: 0, type: "byte" },
          green: { idx: 1, type: "byte" },
          blue: { idx: 2, type: "byte" },
        },
      },
      hsla: {
        props: {
          hue: { idx: 0, type: "degrees" },
          saturation: { idx: 1, type: "percent" },
          lightness: { idx: 2, type: "percent" },
        },
      },
    },
    b = {
      byte: { floor: !0, max: 255 },
      percent: { max: 1 },
      degrees: { mod: 360, floor: !0 },
    },
    y = (m.support = {}),
    w = d("<p>")[0],
    _ = d.each;
  function D(t) {
    return null == t
      ? t + ""
      : "object" == typeof t
      ? p[e.call(t)] || "object"
      : typeof t;
  }
  function H(t, e, i) {
    var n = b[e.type] || {};
    return null == t
      ? i || !e.def
        ? null
        : e.def
      : ((t = n.floor ? ~~t : parseFloat(t)),
        isNaN(t)
          ? e.def
          : n.mod
          ? (t + n.mod) % n.mod
          : Math.min(n.max, Math.max(0, t)));
  }
  function I(n) {
    var s = m(),
      o = (s._rgba = []);
    return (
      (n = n.toLowerCase()),
      _(g, function (t, e) {
        var i = e.re.exec(n),
          i = i && e.parse(i),
          e = e.space || "rgba";
        if (i)
          return (
            (i = s[e](i)),
            (s[v[e].cache] = i[v[e].cache]),
            (o = s._rgba = i._rgba),
            !1
          );
      }),
      o.length
        ? ("0,0,0,0" === o.join() && d.extend(o, j.transparent), s)
        : j[n]
    );
  }
  function E(t, e, i) {
    return 6 * (i = (i + 1) % 1) < 1
      ? t + (e - t) * i * 6
      : 2 * i < 1
      ? e
      : 3 * i < 2
      ? t + (e - t) * (2 / 3 - i) * 6
      : t;
  }
  (w.style.cssText = "background-color:rgba(1,1,1,.5)"),
    (y.rgba = -1 < w.style.backgroundColor.indexOf("rgba")),
    _(v, function (t, e) {
      (e.cache = "_" + t),
        (e.props.alpha = { idx: 3, type: "percent", def: 1 });
    }),
    d.each(
      "Boolean Number String Function Array Date RegExp Object Error Symbol".split(
        " "
      ),
      function (t, e) {
        p["[object " + e + "]"] = e.toLowerCase();
      }
    ),
    ((m.fn = d.extend(m.prototype, {
      parse: function (s, t, e, i) {
        if (void 0 === s) return (this._rgba = [null, null, null, null]), this;
        (s.jquery || s.nodeType) && ((s = d(s).css(t)), (t = void 0));
        var o = this,
          n = D(s),
          r = (this._rgba = []);
        return (
          void 0 !== t && ((s = [s, t, e, i]), (n = "array")),
          "string" === n
            ? this.parse(I(s) || j._default)
            : "array" === n
            ? (_(v.rgba.props, function (t, e) {
                r[e.idx] = H(s[e.idx], e);
              }),
              this)
            : "object" === n
            ? (_(
                v,
                s instanceof m
                  ? function (t, e) {
                      s[e.cache] && (o[e.cache] = s[e.cache].slice());
                    }
                  : function (t, i) {
                      var n = i.cache;
                      _(i.props, function (t, e) {
                        if (!o[n] && i.to) {
                          if ("alpha" === t || null == s[t]) return;
                          o[n] = i.to(o._rgba);
                        }
                        o[n][e.idx] = H(s[t], e, !0);
                      }),
                        o[n] &&
                          d.inArray(null, o[n].slice(0, 3)) < 0 &&
                          (null == o[n][3] && (o[n][3] = 1),
                          i.from && (o._rgba = i.from(o[n])));
                    }
              ),
              this)
            : void 0
        );
      },
      is: function (t) {
        var s = m(t),
          o = !0,
          r = this;
        return (
          _(v, function (t, e) {
            var i,
              n = s[e.cache];
            return (
              n &&
                ((i = r[e.cache] || (e.to && e.to(r._rgba)) || []),
                _(e.props, function (t, e) {
                  if (null != n[e.idx]) return (o = n[e.idx] === i[e.idx]);
                })),
              o
            );
          }),
          o
        );
      },
      _space: function () {
        var i = [],
          n = this;
        return (
          _(v, function (t, e) {
            n[e.cache] && i.push(t);
          }),
          i.pop()
        );
      },
      transition: function (t, r) {
        var e = (c = m(t))._space(),
          i = v[e],
          t = 0 === this.alpha() ? m("transparent") : this,
          a = t[i.cache] || i.to(t._rgba),
          l = a.slice(),
          c = c[i.cache];
        return (
          _(i.props, function (t, e) {
            var i = e.idx,
              n = a[i],
              s = c[i],
              o = b[e.type] || {};
            null !== s &&
              (null === n
                ? (l[i] = s)
                : (o.mod &&
                    (s - n > o.mod / 2
                      ? (n += o.mod)
                      : n - s > o.mod / 2 && (n -= o.mod)),
                  (l[i] = H((s - n) * r + n, e))));
          }),
          this[e](l)
        );
      },
      blend: function (t) {
        if (1 === this._rgba[3]) return this;
        var e = this._rgba.slice(),
          i = e.pop(),
          n = m(t)._rgba;
        return m(
          d.map(e, function (t, e) {
            return (1 - i) * n[e] + i * t;
          })
        );
      },
      toRgbaString: function () {
        var t = "rgba(",
          e = d.map(this._rgba, function (t, e) {
            return null != t ? t : 2 < e ? 1 : 0;
          });
        return 1 === e[3] && (e.pop(), (t = "rgb(")), t + e.join() + ")";
      },
      toHslaString: function () {
        var t = "hsla(",
          e = d.map(this.hsla(), function (t, e) {
            return (
              null == t && (t = 2 < e ? 1 : 0),
              (t = e && e < 3 ? Math.round(100 * t) + "%" : t)
            );
          });
        return 1 === e[3] && (e.pop(), (t = "hsl(")), t + e.join() + ")";
      },
      toHexString: function (t) {
        var e = this._rgba.slice(),
          i = e.pop();
        return (
          t && e.push(~~(255 * i)),
          "#" +
            d
              .map(e, function (t) {
                return 1 === (t = (t || 0).toString(16)).length ? "0" + t : t;
              })
              .join("")
        );
      },
      toString: function () {
        return 0 === this._rgba[3] ? "transparent" : this.toRgbaString();
      },
    })).parse.prototype = m.fn),
    (v.hsla.to = function (t) {
      if (null == t[0] || null == t[1] || null == t[2])
        return [null, null, null, t[3]];
      var e = t[0] / 255,
        i = t[1] / 255,
        n = t[2] / 255,
        s = t[3],
        o = Math.max(e, i, n),
        r = Math.min(e, i, n),
        a = o - r,
        l = o + r,
        t = 0.5 * l,
        i =
          r === o
            ? 0
            : e === o
            ? (60 * (i - n)) / a + 360
            : i === o
            ? (60 * (n - e)) / a + 120
            : (60 * (e - i)) / a + 240,
        l = 0 == a ? 0 : t <= 0.5 ? a / l : a / (2 - l);
      return [Math.round(i) % 360, l, t, null == s ? 1 : s];
    }),
    (v.hsla.from = function (t) {
      if (null == t[0] || null == t[1] || null == t[2])
        return [null, null, null, t[3]];
      var e = t[0] / 360,
        i = t[1],
        n = t[2],
        t = t[3],
        i = n <= 0.5 ? n * (1 + i) : n + i - n * i,
        n = 2 * n - i;
      return [
        Math.round(255 * E(n, i, e + 1 / 3)),
        Math.round(255 * E(n, i, e)),
        Math.round(255 * E(n, i, e - 1 / 3)),
        t,
      ];
    }),
    _(v, function (l, t) {
      var e = t.props,
        o = t.cache,
        r = t.to,
        a = t.from;
      (m.fn[l] = function (t) {
        if ((r && !this[o] && (this[o] = r(this._rgba)), void 0 === t))
          return this[o].slice();
        var i = D(t),
          n = "array" === i || "object" === i ? t : arguments,
          s = this[o].slice();
        return (
          _(e, function (t, e) {
            t = n["object" === i ? t : e.idx];
            null == t && (t = s[e.idx]), (s[e.idx] = H(t, e));
          }),
          a ? (((t = m(a(s)))[o] = s), t) : m(s)
        );
      }),
        _(e, function (r, a) {
          m.fn[r] ||
            (m.fn[r] = function (t) {
              var e,
                i = D(t),
                n = "alpha" === r ? (this._hsla ? "hsla" : "rgba") : l,
                s = this[n](),
                o = s[a.idx];
              return "undefined" === i
                ? o
                : ("function" === i && (i = D((t = t.call(this, o)))),
                  null == t && a.empty
                    ? this
                    : ("string" === i &&
                        (e = f.exec(t)) &&
                        (t = o + parseFloat(e[2]) * ("+" === e[1] ? 1 : -1)),
                      (s[a.idx] = t),
                      this[n](s)));
            });
        });
    }),
    (m.hook = function (t) {
      t = t.split(" ");
      _(t, function (t, o) {
        (d.cssHooks[o] = {
          set: function (t, e) {
            var i,
              n,
              s = "";
            if ("transparent" !== e && ("string" !== D(e) || (i = I(e)))) {
              if (((e = m(i || e)), !y.rgba && 1 !== e._rgba[3])) {
                for (
                  n = "backgroundColor" === o ? t.parentNode : t;
                  ("" === s || "transparent" === s) && n && n.style;

                )
                  try {
                    (s = d.css(n, "backgroundColor")), (n = n.parentNode);
                  } catch (t) {}
                e = e.blend(s && "transparent" !== s ? s : "_default");
              }
              e = e.toRgbaString();
            }
            try {
              t.style[o] = e;
            } catch (t) {}
          },
        }),
          (d.fx.step[o] = function (t) {
            t.colorInit ||
              ((t.start = m(t.elem, o)),
              (t.end = m(t.end)),
              (t.colorInit = !0)),
              d.cssHooks[o].set(t.elem, t.start.transition(t.end, t.pos));
          });
      });
    })(
      "backgroundColor borderBottomColor borderLeftColor borderRightColor borderTopColor color columnRuleColor outlineColor textDecorationColor textEmphasisColor"
    ),
    (d.cssHooks.borderColor = {
      expand: function (i) {
        var n = {};
        return (
          _(["Top", "Right", "Bottom", "Left"], function (t, e) {
            n["border" + e + "Color"] = i;
          }),
          n
        );
      },
    });
  var A,
    M,
    O,
    L,
    $,
    N,
    z,
    B,
    F,
    R,
    j = (d.Color.names = {
      aqua: "#00ffff",
      black: "#000000",
      blue: "#0000ff",
      fuchsia: "#ff00ff",
      gray: "#808080",
      green: "#008000",
      lime: "#00ff00",
      maroon: "#800000",
      navy: "#000080",
      olive: "#808000",
      purple: "#800080",
      red: "#ff0000",
      silver: "#c0c0c0",
      teal: "#008080",
      white: "#ffffff",
      yellow: "#ffff00",
      transparent: [null, null, null, 0],
      _default: "#ffffff",
    }),
    W = "ui-effects-",
    q = "ui-effects-style",
    U = "ui-effects-animated";
  function V(t) {
    var e,
      i,
      n = t.ownerDocument.defaultView
        ? t.ownerDocument.defaultView.getComputedStyle(t, null)
        : t.currentStyle,
      s = {};
    if (n && n.length && n[0] && n[n[0]])
      for (i = n.length; i--; )
        "string" == typeof n[(e = n[i])] &&
          (s[
            e.replace(/-([\da-z])/gi, function (t, e) {
              return e.toUpperCase();
            })
          ] = n[e]);
    else for (e in n) "string" == typeof n[e] && (s[e] = n[e]);
    return s;
  }
  function K(t, e, i, n) {
    return (
      (t = { effect: (t = Y.isPlainObject(t) ? (e = t).effect : t) }),
      "function" == typeof (e = null == e ? {} : e) &&
        ((n = e), (i = null), (e = {})),
      ("number" != typeof e && !Y.fx.speeds[e]) || ((n = i), (i = e), (e = {})),
      "function" == typeof i && ((n = i), (i = null)),
      e && Y.extend(t, e),
      (i = i || e.duration),
      (t.duration = Y.fx.off
        ? 0
        : "number" == typeof i
        ? i
        : i in Y.fx.speeds
        ? Y.fx.speeds[i]
        : Y.fx.speeds._default),
      (t.complete = n || e.complete),
      t
    );
  }
  function Q(t) {
    return (
      !t ||
      "number" == typeof t ||
      Y.fx.speeds[t] ||
      ("string" == typeof t && !Y.effects.effect[t]) ||
      "function" == typeof t ||
      ("object" == typeof t && !t.effect)
    );
  }
  function X(t, e) {
    var i = e.outerWidth(),
      e = e.outerHeight(),
      t =
        /^rect\((-?\d*\.?\d*px|-?\d+%|auto),?\s*(-?\d*\.?\d*px|-?\d+%|auto),?\s*(-?\d*\.?\d*px|-?\d+%|auto),?\s*(-?\d*\.?\d*px|-?\d+%|auto)\)$/.exec(
          t
        ) || ["", 0, i, e, 0];
    return {
      top: parseFloat(t[1]) || 0,
      right: "auto" === t[2] ? i : parseFloat(t[2]),
      bottom: "auto" === t[3] ? e : parseFloat(t[3]),
      left: parseFloat(t[4]) || 0,
    };
  }
  (Y.effects = { effect: {} }),
    (L = ["add", "remove", "toggle"]),
    ($ = {
      border: 1,
      borderBottom: 1,
      borderColor: 1,
      borderLeft: 1,
      borderRight: 1,
      borderTop: 1,
      borderWidth: 1,
      margin: 1,
      padding: 1,
    }),
    Y.each(
      [
        "borderLeftStyle",
        "borderRightStyle",
        "borderBottomStyle",
        "borderTopStyle",
      ],
      function (t, e) {
        Y.fx.step[e] = function (t) {
          (("none" !== t.end && !t.setAttr) || (1 === t.pos && !t.setAttr)) &&
            (d.style(t.elem, e, t.end), (t.setAttr = !0));
        };
      }
    ),
    Y.fn.addBack ||
      (Y.fn.addBack = function (t) {
        return this.add(
          null == t ? this.prevObject : this.prevObject.filter(t)
        );
      }),
    (Y.effects.animateClass = function (s, t, e, i) {
      var o = Y.speed(t, e, i);
      return this.queue(function () {
        var i = Y(this),
          t = i.attr("class") || "",
          e = (e = o.children ? i.find("*").addBack() : i).map(function () {
            return { el: Y(this), start: V(this) };
          }),
          n = function () {
            Y.each(L, function (t, e) {
              s[e] && i[e + "Class"](s[e]);
            });
          };
        n(),
          (e = e.map(function () {
            return (
              (this.end = V(this.el[0])),
              (this.diff = (function (t, e) {
                var i,
                  n,
                  s = {};
                for (i in e)
                  (n = e[i]),
                    t[i] !== n &&
                      ($[i] ||
                        (!Y.fx.step[i] && isNaN(parseFloat(n))) ||
                        (s[i] = n));
                return s;
              })(this.start, this.end)),
              this
            );
          })),
          i.attr("class", t),
          (e = e.map(function () {
            var t = this,
              e = Y.Deferred(),
              i = Y.extend({}, o, {
                queue: !1,
                complete: function () {
                  e.resolve(t);
                },
              });
            return this.el.animate(this.diff, i), e.promise();
          })),
          Y.when.apply(Y, e.get()).done(function () {
            n(),
              Y.each(arguments, function () {
                var e = this.el;
                Y.each(this.diff, function (t) {
                  e.css(t, "");
                });
              }),
              o.complete.call(i[0]);
          });
      });
    }),
    Y.fn.extend({
      addClass:
        ((O = Y.fn.addClass),
        function (t, e, i, n) {
          return e
            ? Y.effects.animateClass.call(this, { add: t }, e, i, n)
            : O.apply(this, arguments);
        }),
      removeClass:
        ((M = Y.fn.removeClass),
        function (t, e, i, n) {
          return 1 < arguments.length
            ? Y.effects.animateClass.call(this, { remove: t }, e, i, n)
            : M.apply(this, arguments);
        }),
      toggleClass:
        ((A = Y.fn.toggleClass),
        function (t, e, i, n, s) {
          return "boolean" == typeof e || void 0 === e
            ? i
              ? Y.effects.animateClass.call(
                  this,
                  e ? { add: t } : { remove: t },
                  i,
                  n,
                  s
                )
              : A.apply(this, arguments)
            : Y.effects.animateClass.call(this, { toggle: t }, e, i, n);
        }),
      switchClass: function (t, e, i, n, s) {
        return Y.effects.animateClass.call(
          this,
          { add: e, remove: t },
          i,
          n,
          s
        );
      },
    }),
    Y.expr &&
      Y.expr.pseudos &&
      Y.expr.pseudos.animated &&
      (Y.expr.pseudos.animated =
        ((N = Y.expr.pseudos.animated),
        function (t) {
          return !!Y(t).data(U) || N(t);
        })),
    !1 !== Y.uiBackCompat &&
      Y.extend(Y.effects, {
        save: function (t, e) {
          for (var i = 0, n = e.length; i < n; i++)
            null !== e[i] && t.data(W + e[i], t[0].style[e[i]]);
        },
        restore: function (t, e) {
          for (var i, n = 0, s = e.length; n < s; n++)
            null !== e[n] && ((i = t.data(W + e[n])), t.css(e[n], i));
        },
        setMode: function (t, e) {
          return (e = "toggle" === e ? (t.is(":hidden") ? "show" : "hide") : e);
        },
        createWrapper: function (i) {
          if (i.parent().is(".ui-effects-wrapper")) return i.parent();
          var n = {
              width: i.outerWidth(!0),
              height: i.outerHeight(!0),
              float: i.css("float"),
            },
            t = Y("<div></div>")
              .addClass("ui-effects-wrapper")
              .css({
                fontSize: "100%",
                background: "transparent",
                border: "none",
                margin: 0,
                padding: 0,
              }),
            e = { width: i.width(), height: i.height() },
            s = document.activeElement;
          try {
            s.id;
          } catch (t) {
            s = document.body;
          }
          return (
            i.wrap(t),
            (i[0] !== s && !Y.contains(i[0], s)) || Y(s).trigger("focus"),
            (t = i.parent()),
            "static" === i.css("position")
              ? (t.css({ position: "relative" }),
                i.css({ position: "relative" }))
              : (Y.extend(n, {
                  position: i.css("position"),
                  zIndex: i.css("z-index"),
                }),
                Y.each(["top", "left", "bottom", "right"], function (t, e) {
                  (n[e] = i.css(e)),
                    isNaN(parseInt(n[e], 10)) && (n[e] = "auto");
                }),
                i.css({
                  position: "relative",
                  top: 0,
                  left: 0,
                  right: "auto",
                  bottom: "auto",
                })),
            i.css(e),
            t.css(n).show()
          );
        },
        removeWrapper: function (t) {
          var e = document.activeElement;
          return (
            t.parent().is(".ui-effects-wrapper") &&
              (t.parent().replaceWith(t),
              (t[0] !== e && !Y.contains(t[0], e)) || Y(e).trigger("focus")),
            t
          );
        },
      }),
    Y.extend(Y.effects, {
      version: "1.13.0",
      define: function (t, e, i) {
        return (
          i || ((i = e), (e = "effect")),
          (Y.effects.effect[t] = i),
          (Y.effects.effect[t].mode = e),
          i
        );
      },
      scaledDimensions: function (t, e, i) {
        if (0 === e)
          return { height: 0, width: 0, outerHeight: 0, outerWidth: 0 };
        var n = "horizontal" !== i ? (e || 100) / 100 : 1,
          e = "vertical" !== i ? (e || 100) / 100 : 1;
        return {
          height: t.height() * e,
          width: t.width() * n,
          outerHeight: t.outerHeight() * e,
          outerWidth: t.outerWidth() * n,
        };
      },
      clipToBox: function (t) {
        return {
          width: t.clip.right - t.clip.left,
          height: t.clip.bottom - t.clip.top,
          left: t.clip.left,
          top: t.clip.top,
        };
      },
      unshift: function (t, e, i) {
        var n = t.queue();
        1 < e && n.splice.apply(n, [1, 0].concat(n.splice(e, i))), t.dequeue();
      },
      saveStyle: function (t) {
        t.data(q, t[0].style.cssText);
      },
      restoreStyle: function (t) {
        (t[0].style.cssText = t.data(q) || ""), t.removeData(q);
      },
      mode: function (t, e) {
        t = t.is(":hidden");
        return (
          "toggle" === e && (e = t ? "show" : "hide"),
          (e = (t ? "hide" === e : "show" === e) ? "none" : e)
        );
      },
      getBaseline: function (t, e) {
        var i, n;
        switch (t[0]) {
          case "top":
            i = 0;
            break;
          case "middle":
            i = 0.5;
            break;
          case "bottom":
            i = 1;
            break;
          default:
            i = t[0] / e.height;
        }
        switch (t[1]) {
          case "left":
            n = 0;
            break;
          case "center":
            n = 0.5;
            break;
          case "right":
            n = 1;
            break;
          default:
            n = t[1] / e.width;
        }
        return { x: n, y: i };
      },
      createPlaceholder: function (t) {
        var e,
          i = t.css("position"),
          n = t.position();
        return (
          t
            .css({
              marginTop: t.css("marginTop"),
              marginBottom: t.css("marginBottom"),
              marginLeft: t.css("marginLeft"),
              marginRight: t.css("marginRight"),
            })
            .outerWidth(t.outerWidth())
            .outerHeight(t.outerHeight()),
          /^(static|relative)/.test(i) &&
            ((i = "absolute"),
            (e = Y("<" + t[0].nodeName + ">")
              .insertAfter(t)
              .css({
                display: /^(inline|ruby)/.test(t.css("display"))
                  ? "inline-block"
                  : "block",
                visibility: "hidden",
                marginTop: t.css("marginTop"),
                marginBottom: t.css("marginBottom"),
                marginLeft: t.css("marginLeft"),
                marginRight: t.css("marginRight"),
                float: t.css("float"),
              })
              .outerWidth(t.outerWidth())
              .outerHeight(t.outerHeight())
              .addClass("ui-effects-placeholder")),
            t.data(W + "placeholder", e)),
          t.css({ position: i, left: n.left, top: n.top }),
          e
        );
      },
      removePlaceholder: function (t) {
        var e = W + "placeholder",
          i = t.data(e);
        i && (i.remove(), t.removeData(e));
      },
      cleanUp: function (t) {
        Y.effects.restoreStyle(t), Y.effects.removePlaceholder(t);
      },
      setTransition: function (n, t, s, o) {
        return (
          (o = o || {}),
          Y.each(t, function (t, e) {
            var i = n.cssUnit(e);
            0 < i[0] && (o[e] = i[0] * s + i[1]);
          }),
          o
        );
      },
    }),
    Y.fn.extend({
      effect: function () {
        function t(t) {
          var e = Y(this),
            i = Y.effects.mode(e, a) || o;
          e.data(U, !0),
            l.push(i),
            o && ("show" === i || (i === o && "hide" === i)) && e.show(),
            (o && "none" === i) || Y.effects.saveStyle(e),
            "function" == typeof t && t();
        }
        var n = K.apply(this, arguments),
          s = Y.effects.effect[n.effect],
          o = s.mode,
          e = n.queue,
          i = e || "fx",
          r = n.complete,
          a = n.mode,
          l = [];
        return Y.fx.off || !s
          ? a
            ? this[a](n.duration, r)
            : this.each(function () {
                r && r.call(this);
              })
          : !1 === e
          ? this.each(t).each(c)
          : this.queue(i, t).queue(i, c);
        function c(t) {
          var e = Y(this);
          function i() {
            "function" == typeof r && r.call(e[0]),
              "function" == typeof t && t();
          }
          (n.mode = l.shift()),
            !1 === Y.uiBackCompat || o
              ? "none" === n.mode
                ? (e[a](), i())
                : s.call(e[0], n, function () {
                    e.removeData(U),
                      Y.effects.cleanUp(e),
                      "hide" === n.mode && e.hide(),
                      i();
                  })
              : (e.is(":hidden") ? "hide" === a : "show" === a)
              ? (e[a](), i())
              : s.call(e[0], n, i);
        }
      },
      show:
        ((F = Y.fn.show),
        function (t) {
          if (Q(t)) return F.apply(this, arguments);
          t = K.apply(this, arguments);
          return (t.mode = "show"), this.effect.call(this, t);
        }),
      hide:
        ((B = Y.fn.hide),
        function (t) {
          if (Q(t)) return B.apply(this, arguments);
          t = K.apply(this, arguments);
          return (t.mode = "hide"), this.effect.call(this, t);
        }),
      toggle:
        ((z = Y.fn.toggle),
        function (t) {
          if (Q(t) || "boolean" == typeof t) return z.apply(this, arguments);
          t = K.apply(this, arguments);
          return (t.mode = "toggle"), this.effect.call(this, t);
        }),
      cssUnit: function (t) {
        var i = this.css(t),
          n = [];
        return (
          Y.each(["em", "px", "%", "pt"], function (t, e) {
            0 < i.indexOf(e) && (n = [parseFloat(i), e]);
          }),
          n
        );
      },
      cssClip: function (t) {
        return t
          ? this.css(
              "clip",
              "rect(" +
                t.top +
                "px " +
                t.right +
                "px " +
                t.bottom +
                "px " +
                t.left +
                "px)"
            )
          : X(this.css("clip"), this);
      },
      transfer: function (t, e) {
        var i = Y(this),
          n = Y(t.to),
          s = "fixed" === n.css("position"),
          o = Y("body"),
          r = s ? o.scrollTop() : 0,
          a = s ? o.scrollLeft() : 0,
          o = n.offset(),
          o = {
            top: o.top - r,
            left: o.left - a,
            height: n.innerHeight(),
            width: n.innerWidth(),
          },
          n = i.offset(),
          l = Y("<div class='ui-effects-transfer'></div>");
        l.appendTo("body")
          .addClass(t.className)
          .css({
            top: n.top - r,
            left: n.left - a,
            height: i.innerHeight(),
            width: i.innerWidth(),
            position: s ? "fixed" : "absolute",
          })
          .animate(o, t.duration, t.easing, function () {
            l.remove(), "function" == typeof e && e();
          });
      },
    }),
    (Y.fx.step.clip = function (t) {
      t.clipInit ||
        ((t.start = Y(t.elem).cssClip()),
        "string" == typeof t.end && (t.end = X(t.end, t.elem)),
        (t.clipInit = !0)),
        Y(t.elem).cssClip({
          top: t.pos * (t.end.top - t.start.top) + t.start.top,
          right: t.pos * (t.end.right - t.start.right) + t.start.right,
          bottom: t.pos * (t.end.bottom - t.start.bottom) + t.start.bottom,
          left: t.pos * (t.end.left - t.start.left) + t.start.left,
        });
    }),
    (R = {}),
    Y.each(["Quad", "Cubic", "Quart", "Quint", "Expo"], function (e, t) {
      R[t] = function (t) {
        return Math.pow(t, e + 2);
      };
    }),
    Y.extend(R, {
      Sine: function (t) {
        return 1 - Math.cos((t * Math.PI) / 2);
      },
      Circ: function (t) {
        return 1 - Math.sqrt(1 - t * t);
      },
      Elastic: function (t) {
        return 0 === t || 1 === t
          ? t
          : -Math.pow(2, 8 * (t - 1)) *
              Math.sin(((80 * (t - 1) - 7.5) * Math.PI) / 15);
      },
      Back: function (t) {
        return t * t * (3 * t - 2);
      },
      Bounce: function (t) {
        for (var e, i = 4; t < ((e = Math.pow(2, --i)) - 1) / 11; );
        return (
          1 / Math.pow(4, 3 - i) - 7.5625 * Math.pow((3 * e - 2) / 22 - t, 2)
        );
      },
    }),
    Y.each(R, function (t, e) {
      (Y.easing["easeIn" + t] = e),
        (Y.easing["easeOut" + t] = function (t) {
          return 1 - e(1 - t);
        }),
        (Y.easing["easeInOut" + t] = function (t) {
          return t < 0.5 ? e(2 * t) / 2 : 1 - e(-2 * t + 2) / 2;
        });
    });
  var w = Y.effects;
  Y.effects.define("blind", "hide", function (t, e) {
    var i = {
        up: ["bottom", "top"],
        vertical: ["bottom", "top"],
        down: ["top", "bottom"],
        left: ["right", "left"],
        horizontal: ["right", "left"],
        right: ["left", "right"],
      },
      n = Y(this),
      s = t.direction || "up",
      o = n.cssClip(),
      r = { clip: Y.extend({}, o) },
      a = Y.effects.createPlaceholder(n);
    (r.clip[i[s][0]] = r.clip[i[s][1]]),
      "show" === t.mode &&
        (n.cssClip(r.clip), a && a.css(Y.effects.clipToBox(r)), (r.clip = o)),
      a && a.animate(Y.effects.clipToBox(r), t.duration, t.easing),
      n.animate(r, {
        queue: !1,
        duration: t.duration,
        easing: t.easing,
        complete: e,
      });
  }),
    Y.effects.define("bounce", function (t, e) {
      var i,
        n,
        s = Y(this),
        o = t.mode,
        r = "hide" === o,
        a = "show" === o,
        l = t.direction || "up",
        c = t.distance,
        h = t.times || 5,
        o = 2 * h + (a || r ? 1 : 0),
        u = t.duration / o,
        d = t.easing,
        p = "up" === l || "down" === l ? "top" : "left",
        f = "up" === l || "left" === l,
        g = 0,
        t = s.queue().length;
      for (
        Y.effects.createPlaceholder(s),
          l = s.css(p),
          c = c || s["top" == p ? "outerHeight" : "outerWidth"]() / 3,
          a &&
            (((n = { opacity: 1 })[p] = l),
            s
              .css("opacity", 0)
              .css(p, f ? 2 * -c : 2 * c)
              .animate(n, u, d)),
          r && (c /= Math.pow(2, h - 1)),
          (n = {})[p] = l;
        g < h;
        g++
      )
        ((i = {})[p] = (f ? "-=" : "+=") + c),
          s.animate(i, u, d).animate(n, u, d),
          (c = r ? 2 * c : c / 2);
      r &&
        (((i = { opacity: 0 })[p] = (f ? "-=" : "+=") + c), s.animate(i, u, d)),
        s.queue(e),
        Y.effects.unshift(s, t, 1 + o);
    }),
    Y.effects.define("clip", "hide", function (t, e) {
      var i = {},
        n = Y(this),
        s = t.direction || "vertical",
        o = "both" === s,
        r = o || "horizontal" === s,
        o = o || "vertical" === s,
        s = n.cssClip();
      (i.clip = {
        top: o ? (s.bottom - s.top) / 2 : s.top,
        right: r ? (s.right - s.left) / 2 : s.right,
        bottom: o ? (s.bottom - s.top) / 2 : s.bottom,
        left: r ? (s.right - s.left) / 2 : s.left,
      }),
        Y.effects.createPlaceholder(n),
        "show" === t.mode && (n.cssClip(i.clip), (i.clip = s)),
        n.animate(i, {
          queue: !1,
          duration: t.duration,
          easing: t.easing,
          complete: e,
        });
    }),
    Y.effects.define("drop", "hide", function (t, e) {
      var i = Y(this),
        n = "show" === t.mode,
        s = t.direction || "left",
        o = "up" === s || "down" === s ? "top" : "left",
        r = "up" === s || "left" === s ? "-=" : "+=",
        a = "+=" == r ? "-=" : "+=",
        l = { opacity: 0 };
      Y.effects.createPlaceholder(i),
        (s =
          t.distance || i["top" == o ? "outerHeight" : "outerWidth"](!0) / 2),
        (l[o] = r + s),
        n && (i.css(l), (l[o] = a + s), (l.opacity = 1)),
        i.animate(l, {
          queue: !1,
          duration: t.duration,
          easing: t.easing,
          complete: e,
        });
    }),
    Y.effects.define("explode", "hide", function (t, e) {
      var i,
        n,
        s,
        o,
        r,
        a,
        l = t.pieces ? Math.round(Math.sqrt(t.pieces)) : 3,
        c = l,
        h = Y(this),
        u = "show" === t.mode,
        d = h.show().css("visibility", "hidden").offset(),
        p = Math.ceil(h.outerWidth() / c),
        f = Math.ceil(h.outerHeight() / l),
        g = [];
      function m() {
        g.push(this),
          g.length === l * c &&
            (h.css({ visibility: "visible" }), Y(g).remove(), e());
      }
      for (i = 0; i < l; i++)
        for (o = d.top + i * f, a = i - (l - 1) / 2, n = 0; n < c; n++)
          (s = d.left + n * p),
            (r = n - (c - 1) / 2),
            h
              .clone()
              .appendTo("body")
              .wrap("<div></div>")
              .css({
                position: "absolute",
                visibility: "visible",
                left: -n * p,
                top: -i * f,
              })
              .parent()
              .addClass("ui-effects-explode")
              .css({
                position: "absolute",
                overflow: "hidden",
                width: p,
                height: f,
                left: s + (u ? r * p : 0),
                top: o + (u ? a * f : 0),
                opacity: u ? 0 : 1,
              })
              .animate(
                {
                  left: s + (u ? 0 : r * p),
                  top: o + (u ? 0 : a * f),
                  opacity: u ? 1 : 0,
                },
                t.duration || 500,
                t.easing,
                m
              );
    }),
    Y.effects.define("fade", "toggle", function (t, e) {
      var i = "show" === t.mode;
      Y(this)
        .css("opacity", i ? 0 : 1)
        .animate(
          { opacity: i ? 1 : 0 },
          { queue: !1, duration: t.duration, easing: t.easing, complete: e }
        );
    }),
    Y.effects.define("fold", "hide", function (e, t) {
      var i = Y(this),
        n = e.mode,
        s = "show" === n,
        o = "hide" === n,
        r = e.size || 15,
        a = /([0-9]+)%/.exec(r),
        l = !!e.horizFirst ? ["right", "bottom"] : ["bottom", "right"],
        c = e.duration / 2,
        h = Y.effects.createPlaceholder(i),
        u = i.cssClip(),
        d = { clip: Y.extend({}, u) },
        p = { clip: Y.extend({}, u) },
        f = [u[l[0]], u[l[1]]],
        n = i.queue().length;
      a && (r = (parseInt(a[1], 10) / 100) * f[o ? 0 : 1]),
        (d.clip[l[0]] = r),
        (p.clip[l[0]] = r),
        (p.clip[l[1]] = 0),
        s &&
          (i.cssClip(p.clip), h && h.css(Y.effects.clipToBox(p)), (p.clip = u)),
        i
          .queue(function (t) {
            h &&
              h
                .animate(Y.effects.clipToBox(d), c, e.easing)
                .animate(Y.effects.clipToBox(p), c, e.easing),
              t();
          })
          .animate(d, c, e.easing)
          .animate(p, c, e.easing)
          .queue(t),
        Y.effects.unshift(i, n, 4);
    }),
    Y.effects.define("highlight", "show", function (t, e) {
      var i = Y(this),
        n = { backgroundColor: i.css("backgroundColor") };
      "hide" === t.mode && (n.opacity = 0),
        Y.effects.saveStyle(i),
        i
          .css({
            backgroundImage: "none",
            backgroundColor: t.color || "#ffff99",
          })
          .animate(n, {
            queue: !1,
            duration: t.duration,
            easing: t.easing,
            complete: e,
          });
    }),
    Y.effects.define("size", function (n, e) {
      var s,
        i = Y(this),
        t = ["fontSize"],
        o = [
          "borderTopWidth",
          "borderBottomWidth",
          "paddingTop",
          "paddingBottom",
        ],
        r = [
          "borderLeftWidth",
          "borderRightWidth",
          "paddingLeft",
          "paddingRight",
        ],
        a = n.mode,
        l = "effect" !== a,
        c = n.scale || "both",
        h = n.origin || ["middle", "center"],
        u = i.css("position"),
        d = i.position(),
        p = Y.effects.scaledDimensions(i),
        f = n.from || p,
        g = n.to || Y.effects.scaledDimensions(i, 0);
      Y.effects.createPlaceholder(i),
        "show" === a && ((a = f), (f = g), (g = a)),
        (s = {
          from: { y: f.height / p.height, x: f.width / p.width },
          to: { y: g.height / p.height, x: g.width / p.width },
        }),
        ("box" !== c && "both" !== c) ||
          (s.from.y !== s.to.y &&
            ((f = Y.effects.setTransition(i, o, s.from.y, f)),
            (g = Y.effects.setTransition(i, o, s.to.y, g))),
          s.from.x !== s.to.x &&
            ((f = Y.effects.setTransition(i, r, s.from.x, f)),
            (g = Y.effects.setTransition(i, r, s.to.x, g)))),
        ("content" !== c && "both" !== c) ||
          (s.from.y !== s.to.y &&
            ((f = Y.effects.setTransition(i, t, s.from.y, f)),
            (g = Y.effects.setTransition(i, t, s.to.y, g)))),
        h &&
          ((h = Y.effects.getBaseline(h, p)),
          (f.top = (p.outerHeight - f.outerHeight) * h.y + d.top),
          (f.left = (p.outerWidth - f.outerWidth) * h.x + d.left),
          (g.top = (p.outerHeight - g.outerHeight) * h.y + d.top),
          (g.left = (p.outerWidth - g.outerWidth) * h.x + d.left)),
        delete f.outerHeight,
        delete f.outerWidth,
        i.css(f),
        ("content" !== c && "both" !== c) ||
          ((o = o.concat(["marginTop", "marginBottom"]).concat(t)),
          (r = r.concat(["marginLeft", "marginRight"])),
          i.find("*[width]").each(function () {
            var t = Y(this),
              e = Y.effects.scaledDimensions(t),
              i = {
                height: e.height * s.from.y,
                width: e.width * s.from.x,
                outerHeight: e.outerHeight * s.from.y,
                outerWidth: e.outerWidth * s.from.x,
              },
              e = {
                height: e.height * s.to.y,
                width: e.width * s.to.x,
                outerHeight: e.height * s.to.y,
                outerWidth: e.width * s.to.x,
              };
            s.from.y !== s.to.y &&
              ((i = Y.effects.setTransition(t, o, s.from.y, i)),
              (e = Y.effects.setTransition(t, o, s.to.y, e))),
              s.from.x !== s.to.x &&
                ((i = Y.effects.setTransition(t, r, s.from.x, i)),
                (e = Y.effects.setTransition(t, r, s.to.x, e))),
              l && Y.effects.saveStyle(t),
              t.css(i),
              t.animate(e, n.duration, n.easing, function () {
                l && Y.effects.restoreStyle(t);
              });
          })),
        i.animate(g, {
          queue: !1,
          duration: n.duration,
          easing: n.easing,
          complete: function () {
            var t = i.offset();
            0 === g.opacity && i.css("opacity", f.opacity),
              l ||
                (i.css("position", "static" === u ? "relative" : u).offset(t),
                Y.effects.saveStyle(i)),
              e();
          },
        });
    }),
    Y.effects.define("scale", function (t, e) {
      var i = Y(this),
        n = t.mode,
        n =
          parseInt(t.percent, 10) ||
          (0 === parseInt(t.percent, 10) || "effect" !== n ? 0 : 100),
        n = Y.extend(
          !0,
          {
            from: Y.effects.scaledDimensions(i),
            to: Y.effects.scaledDimensions(i, n, t.direction || "both"),
            origin: t.origin || ["middle", "center"],
          },
          t
        );
      t.fade && ((n.from.opacity = 1), (n.to.opacity = 0)),
        Y.effects.effect.size.call(this, n, e);
    }),
    Y.effects.define("puff", "hide", function (t, e) {
      t = Y.extend(!0, {}, t, {
        fade: !0,
        percent: parseInt(t.percent, 10) || 150,
      });
      Y.effects.effect.scale.call(this, t, e);
    }),
    Y.effects.define("pulsate", "show", function (t, e) {
      var i = Y(this),
        n = t.mode,
        s = "show" === n,
        o = 2 * (t.times || 5) + (s || "hide" === n ? 1 : 0),
        r = t.duration / o,
        a = 0,
        l = 1,
        n = i.queue().length;
      for (
        (!s && i.is(":visible")) || (i.css("opacity", 0).show(), (a = 1));
        l < o;
        l++
      )
        i.animate({ opacity: a }, r, t.easing), (a = 1 - a);
      i.animate({ opacity: a }, r, t.easing),
        i.queue(e),
        Y.effects.unshift(i, n, 1 + o);
    }),
    Y.effects.define("shake", function (t, e) {
      var i = 1,
        n = Y(this),
        s = t.direction || "left",
        o = t.distance || 20,
        r = t.times || 3,
        a = 2 * r + 1,
        l = Math.round(t.duration / a),
        c = "up" === s || "down" === s ? "top" : "left",
        h = "up" === s || "left" === s,
        u = {},
        d = {},
        p = {},
        s = n.queue().length;
      for (
        Y.effects.createPlaceholder(n),
          u[c] = (h ? "-=" : "+=") + o,
          d[c] = (h ? "+=" : "-=") + 2 * o,
          p[c] = (h ? "-=" : "+=") + 2 * o,
          n.animate(u, l, t.easing);
        i < r;
        i++
      )
        n.animate(d, l, t.easing).animate(p, l, t.easing);
      n
        .animate(d, l, t.easing)
        .animate(u, l / 2, t.easing)
        .queue(e),
        Y.effects.unshift(n, s, 1 + a);
    }),
    Y.effects.define("slide", "show", function (t, e) {
      var i,
        n,
        s = Y(this),
        o = {
          up: ["bottom", "top"],
          down: ["top", "bottom"],
          left: ["right", "left"],
          right: ["left", "right"],
        },
        r = t.mode,
        a = t.direction || "left",
        l = "up" === a || "down" === a ? "top" : "left",
        c = "up" === a || "left" === a,
        h = t.distance || s["top" == l ? "outerHeight" : "outerWidth"](!0),
        u = {};
      Y.effects.createPlaceholder(s),
        (i = s.cssClip()),
        (n = s.position()[l]),
        (u[l] = (c ? -1 : 1) * h + n),
        (u.clip = s.cssClip()),
        (u.clip[o[a][1]] = u.clip[o[a][0]]),
        "show" === r &&
          (s.cssClip(u.clip), s.css(l, u[l]), (u.clip = i), (u[l] = n)),
        s.animate(u, {
          queue: !1,
          duration: t.duration,
          easing: t.easing,
          complete: e,
        });
    }),
    (w =
      !1 !== Y.uiBackCompat
        ? Y.effects.define("transfer", function (t, e) {
            Y(this).transfer(t, e);
          })
        : w);
  (Y.ui.focusable = function (t, e) {
    var i,
      n,
      s,
      o,
      r = t.nodeName.toLowerCase();
    return "area" === r
      ? ((n = (i = t.parentNode).name),
        !(!t.href || !n || "map" !== i.nodeName.toLowerCase()) &&
          0 < (n = Y("img[usemap='#" + n + "']")).length &&
          n.is(":visible"))
      : (/^(input|select|textarea|button|object)$/.test(r)
          ? (s = !t.disabled) &&
            (o = Y(t).closest("fieldset")[0]) &&
            (s = !o.disabled)
          : (s = ("a" === r && t.href) || e),
        s &&
          Y(t).is(":visible") &&
          (function (t) {
            var e = t.css("visibility");
            for (; "inherit" === e; )
              (t = t.parent()), (e = t.css("visibility"));
            return "visible" === e;
          })(Y(t)));
  }),
    Y.extend(Y.expr.pseudos, {
      focusable: function (t) {
        return Y.ui.focusable(t, null != Y.attr(t, "tabindex"));
      },
    });
  var G, J;
  Y.ui.focusable,
    (Y.fn._form = function () {
      return "string" == typeof this[0].form
        ? this.closest("form")
        : Y(this[0].form);
    }),
    (Y.ui.formResetMixin = {
      _formResetHandler: function () {
        var e = Y(this);
        setTimeout(function () {
          var t = e.data("ui-form-reset-instances");
          Y.each(t, function () {
            this.refresh();
          });
        });
      },
      _bindFormResetHandler: function () {
        var t;
        (this.form = this.element._form()),
          this.form.length &&
            ((t = this.form.data("ui-form-reset-instances") || []).length ||
              this.form.on("reset.ui-form-reset", this._formResetHandler),
            t.push(this),
            this.form.data("ui-form-reset-instances", t));
      },
      _unbindFormResetHandler: function () {
        var t;
        this.form.length &&
          ((t = this.form.data("ui-form-reset-instances")).splice(
            Y.inArray(this, t),
            1
          ),
          t.length
            ? this.form.data("ui-form-reset-instances", t)
            : this.form
                .removeData("ui-form-reset-instances")
                .off("reset.ui-form-reset"));
      },
    });
  Y.expr.pseudos || (Y.expr.pseudos = Y.expr[":"]),
    Y.uniqueSort || (Y.uniqueSort = Y.unique),
    Y.escapeSelector ||
      ((G = /([\0-\x1f\x7f]|^-?\d)|^-$|[^\x80-\uFFFF\w-]/g),
      (J = function (t, e) {
        return e
          ? "\0" === t
            ? "�"
            : t.slice(0, -1) +
              "\\" +
              t.charCodeAt(t.length - 1).toString(16) +
              " "
          : "\\" + t;
      }),
      (Y.escapeSelector = function (t) {
        return (t + "").replace(G, J);
      })),
    (Y.fn.even && Y.fn.odd) ||
      Y.fn.extend({
        even: function () {
          return this.filter(function (t) {
            return t % 2 == 0;
          });
        },
        odd: function () {
          return this.filter(function (t) {
            return t % 2 == 1;
          });
        },
      });
  var Z;
  (Y.ui.keyCode = {
    BACKSPACE: 8,
    COMMA: 188,
    DELETE: 46,
    DOWN: 40,
    END: 35,
    ENTER: 13,
    ESCAPE: 27,
    HOME: 36,
    LEFT: 37,
    PAGE_DOWN: 34,
    PAGE_UP: 33,
    PERIOD: 190,
    RIGHT: 39,
    SPACE: 32,
    TAB: 9,
    UP: 38,
  }),
    (Y.fn.labels = function () {
      var t, e, i;
      return this.length
        ? this[0].labels && this[0].labels.length
          ? this.pushStack(this[0].labels)
          : ((e = this.eq(0).parents("label")),
            (t = this.attr("id")) &&
              ((i = (i = this.eq(0).parents().last()).add(
                (i.length ? i : this).siblings()
              )),
              (t = "label[for='" + Y.escapeSelector(t) + "']"),
              (e = e.add(i.find(t).addBack(t)))),
            this.pushStack(e))
        : this.pushStack([]);
    }),
    (Y.fn.scrollParent = function (t) {
      var e = this.css("position"),
        i = "absolute" === e,
        n = t ? /(auto|scroll|hidden)/ : /(auto|scroll)/,
        t = this.parents()
          .filter(function () {
            var t = Y(this);
            return (
              (!i || "static" !== t.css("position")) &&
              n.test(
                t.css("overflow") + t.css("overflow-y") + t.css("overflow-x")
              )
            );
          })
          .eq(0);
      return "fixed" !== e && t.length
        ? t
        : Y(this[0].ownerDocument || document);
    }),
    Y.extend(Y.expr.pseudos, {
      tabbable: function (t) {
        var e = Y.attr(t, "tabindex"),
          i = null != e;
        return (!i || 0 <= e) && Y.ui.focusable(t, i);
      },
    }),
    Y.fn.extend({
      uniqueId:
        ((Z = 0),
        function () {
          return this.each(function () {
            this.id || (this.id = "ui-id-" + ++Z);
          });
        }),
      removeUniqueId: function () {
        return this.each(function () {
          /^ui-id-\d+$/.test(this.id) && Y(this).removeAttr("id");
        });
      },
    }),
    Y.widget("ui.accordion", {
      version: "1.13.0",
      options: {
        active: 0,
        animate: {},
        classes: {
          "ui-accordion-header": "ui-corner-top",
          "ui-accordion-header-collapsed": "ui-corner-all",
          "ui-accordion-content": "ui-corner-bottom",
        },
        collapsible: !1,
        event: "click",
        header: function (t) {
          return t.find("> li > :first-child").add(t.find("> :not(li)").even());
        },
        heightStyle: "auto",
        icons: {
          activeHeader: "ui-icon-triangle-1-s",
          header: "ui-icon-triangle-1-e",
        },
        activate: null,
        beforeActivate: null,
      },
      hideProps: {
        borderTopWidth: "hide",
        borderBottomWidth: "hide",
        paddingTop: "hide",
        paddingBottom: "hide",
        height: "hide",
      },
      showProps: {
        borderTopWidth: "show",
        borderBottomWidth: "show",
        paddingTop: "show",
        paddingBottom: "show",
        height: "show",
      },
      _create: function () {
        var t = this.options;
        (this.prevShow = this.prevHide = Y()),
          this._addClass("ui-accordion", "ui-widget ui-helper-reset"),
          this.element.attr("role", "tablist"),
          t.collapsible ||
            (!1 !== t.active && null != t.active) ||
            (t.active = 0),
          this._processPanels(),
          t.active < 0 && (t.active += this.headers.length),
          this._refresh();
      },
      _getCreateEventData: function () {
        return {
          header: this.active,
          panel: this.active.length ? this.active.next() : Y(),
        };
      },
      _createIcons: function () {
        var t,
          e = this.options.icons;
        e &&
          ((t = Y("<span>")),
          this._addClass(t, "ui-accordion-header-icon", "ui-icon " + e.header),
          t.prependTo(this.headers),
          (t = this.active.children(".ui-accordion-header-icon")),
          this._removeClass(t, e.header)
            ._addClass(t, null, e.activeHeader)
            ._addClass(this.headers, "ui-accordion-icons"));
      },
      _destroyIcons: function () {
        this._removeClass(this.headers, "ui-accordion-icons"),
          this.headers.children(".ui-accordion-header-icon").remove();
      },
      _destroy: function () {
        var t;
        this.element.removeAttr("role"),
          this.headers
            .removeAttr(
              "role aria-expanded aria-selected aria-controls tabIndex"
            )
            .removeUniqueId(),
          this._destroyIcons(),
          (t = this.headers
            .next()
            .css("display", "")
            .removeAttr("role aria-hidden aria-labelledby")
            .removeUniqueId()),
          "content" !== this.options.heightStyle && t.css("height", "");
      },
      _setOption: function (t, e) {
        "active" !== t
          ? ("event" === t &&
              (this.options.event &&
                this._off(this.headers, this.options.event),
              this._setupEvents(e)),
            this._super(t, e),
            "collapsible" !== t ||
              e ||
              !1 !== this.options.active ||
              this._activate(0),
            "icons" === t && (this._destroyIcons(), e && this._createIcons()))
          : this._activate(e);
      },
      _setOptionDisabled: function (t) {
        this._super(t),
          this.element.attr("aria-disabled", t),
          this._toggleClass(null, "ui-state-disabled", !!t),
          this._toggleClass(
            this.headers.add(this.headers.next()),
            null,
            "ui-state-disabled",
            !!t
          );
      },
      _keydown: function (t) {
        if (!t.altKey && !t.ctrlKey) {
          var e = Y.ui.keyCode,
            i = this.headers.length,
            n = this.headers.index(t.target),
            s = !1;
          switch (t.keyCode) {
            case e.RIGHT:
            case e.DOWN:
              s = this.headers[(n + 1) % i];
              break;
            case e.LEFT:
            case e.UP:
              s = this.headers[(n - 1 + i) % i];
              break;
            case e.SPACE:
            case e.ENTER:
              this._eventHandler(t);
              break;
            case e.HOME:
              s = this.headers[0];
              break;
            case e.END:
              s = this.headers[i - 1];
          }
          s &&
            (Y(t.target).attr("tabIndex", -1),
            Y(s).attr("tabIndex", 0),
            Y(s).trigger("focus"),
            t.preventDefault());
        }
      },
      _panelKeyDown: function (t) {
        t.keyCode === Y.ui.keyCode.UP &&
          t.ctrlKey &&
          Y(t.currentTarget).prev().trigger("focus");
      },
      refresh: function () {
        var t = this.options;
        this._processPanels(),
          (!1 === t.active && !0 === t.collapsible) || !this.headers.length
            ? ((t.active = !1), (this.active = Y()))
            : !1 === t.active
            ? this._activate(0)
            : this.active.length && !Y.contains(this.element[0], this.active[0])
            ? this.headers.length ===
              this.headers.find(".ui-state-disabled").length
              ? ((t.active = !1), (this.active = Y()))
              : this._activate(Math.max(0, t.active - 1))
            : (t.active = this.headers.index(this.active)),
          this._destroyIcons(),
          this._refresh();
      },
      _processPanels: function () {
        var t = this.headers,
          e = this.panels;
        "function" == typeof this.options.header
          ? (this.headers = this.options.header(this.element))
          : (this.headers = this.element.find(this.options.header)),
          this._addClass(
            this.headers,
            "ui-accordion-header ui-accordion-header-collapsed",
            "ui-state-default"
          ),
          (this.panels = this.headers
            .next()
            .filter(":not(.ui-accordion-content-active)")
            .hide()),
          this._addClass(
            this.panels,
            "ui-accordion-content",
            "ui-helper-reset ui-widget-content"
          ),
          e && (this._off(t.not(this.headers)), this._off(e.not(this.panels)));
      },
      _refresh: function () {
        var i,
          t = this.options,
          e = t.heightStyle,
          n = this.element.parent();
        (this.active = this._findActive(t.active)),
          this._addClass(
            this.active,
            "ui-accordion-header-active",
            "ui-state-active"
          )._removeClass(this.active, "ui-accordion-header-collapsed"),
          this._addClass(this.active.next(), "ui-accordion-content-active"),
          this.active.next().show(),
          this.headers
            .attr("role", "tab")
            .each(function () {
              var t = Y(this),
                e = t.uniqueId().attr("id"),
                i = t.next(),
                n = i.uniqueId().attr("id");
              t.attr("aria-controls", n), i.attr("aria-labelledby", e);
            })
            .next()
            .attr("role", "tabpanel"),
          this.headers
            .not(this.active)
            .attr({
              "aria-selected": "false",
              "aria-expanded": "false",
              tabIndex: -1,
            })
            .next()
            .attr({ "aria-hidden": "true" })
            .hide(),
          this.active.length
            ? this.active
                .attr({
                  "aria-selected": "true",
                  "aria-expanded": "true",
                  tabIndex: 0,
                })
                .next()
                .attr({ "aria-hidden": "false" })
            : this.headers.eq(0).attr("tabIndex", 0),
          this._createIcons(),
          this._setupEvents(t.event),
          "fill" === e
            ? ((i = n.height()),
              this.element.siblings(":visible").each(function () {
                var t = Y(this),
                  e = t.css("position");
                "absolute" !== e && "fixed" !== e && (i -= t.outerHeight(!0));
              }),
              this.headers.each(function () {
                i -= Y(this).outerHeight(!0);
              }),
              this.headers
                .next()
                .each(function () {
                  Y(this).height(
                    Math.max(0, i - Y(this).innerHeight() + Y(this).height())
                  );
                })
                .css("overflow", "auto"))
            : "auto" === e &&
              ((i = 0),
              this.headers
                .next()
                .each(function () {
                  var t = Y(this).is(":visible");
                  t || Y(this).show(),
                    (i = Math.max(i, Y(this).css("height", "").height())),
                    t || Y(this).hide();
                })
                .height(i));
      },
      _activate: function (t) {
        t = this._findActive(t)[0];
        t !== this.active[0] &&
          ((t = t || this.active[0]),
          this._eventHandler({
            target: t,
            currentTarget: t,
            preventDefault: Y.noop,
          }));
      },
      _findActive: function (t) {
        return "number" == typeof t ? this.headers.eq(t) : Y();
      },
      _setupEvents: function (t) {
        var i = { keydown: "_keydown" };
        t &&
          Y.each(t.split(" "), function (t, e) {
            i[e] = "_eventHandler";
          }),
          this._off(this.headers.add(this.headers.next())),
          this._on(this.headers, i),
          this._on(this.headers.next(), { keydown: "_panelKeyDown" }),
          this._hoverable(this.headers),
          this._focusable(this.headers);
      },
      _eventHandler: function (t) {
        var e = this.options,
          i = this.active,
          n = Y(t.currentTarget),
          s = n[0] === i[0],
          o = s && e.collapsible,
          r = o ? Y() : n.next(),
          a = i.next(),
          r = {
            oldHeader: i,
            oldPanel: a,
            newHeader: o ? Y() : n,
            newPanel: r,
          };
        t.preventDefault(),
          (s && !e.collapsible) ||
            !1 === this._trigger("beforeActivate", t, r) ||
            ((e.active = !o && this.headers.index(n)),
            (this.active = s ? Y() : n),
            this._toggle(r),
            this._removeClass(
              i,
              "ui-accordion-header-active",
              "ui-state-active"
            ),
            e.icons &&
              ((i = i.children(".ui-accordion-header-icon")),
              this._removeClass(i, null, e.icons.activeHeader)._addClass(
                i,
                null,
                e.icons.header
              )),
            s ||
              (this._removeClass(n, "ui-accordion-header-collapsed")._addClass(
                n,
                "ui-accordion-header-active",
                "ui-state-active"
              ),
              e.icons &&
                ((s = n.children(".ui-accordion-header-icon")),
                this._removeClass(s, null, e.icons.header)._addClass(
                  s,
                  null,
                  e.icons.activeHeader
                )),
              this._addClass(n.next(), "ui-accordion-content-active")));
      },
      _toggle: function (t) {
        var e = t.newPanel,
          i = this.prevShow.length ? this.prevShow : t.oldPanel;
        this.prevShow.add(this.prevHide).stop(!0, !0),
          (this.prevShow = e),
          (this.prevHide = i),
          this.options.animate
            ? this._animate(e, i, t)
            : (i.hide(), e.show(), this._toggleComplete(t)),
          i.attr({ "aria-hidden": "true" }),
          i.prev().attr({ "aria-selected": "false", "aria-expanded": "false" }),
          e.length && i.length
            ? i.prev().attr({ tabIndex: -1, "aria-expanded": "false" })
            : e.length &&
              this.headers
                .filter(function () {
                  return 0 === parseInt(Y(this).attr("tabIndex"), 10);
                })
                .attr("tabIndex", -1),
          e
            .attr("aria-hidden", "false")
            .prev()
            .attr({
              "aria-selected": "true",
              "aria-expanded": "true",
              tabIndex: 0,
            });
      },
      _animate: function (t, i, e) {
        function n() {
          a._toggleComplete(e);
        }
        var s,
          o,
          r,
          a = this,
          l = 0,
          c = t.css("box-sizing"),
          h = t.length && (!i.length || t.index() < i.index()),
          u = this.options.animate || {},
          h = (h && u.down) || u;
        return (
          (o = (o = "string" == typeof h ? h : o) || h.easing || u.easing),
          (r = (r = "number" == typeof h ? h : r) || h.duration || u.duration),
          i.length
            ? t.length
              ? ((s = t.show().outerHeight()),
                i.animate(this.hideProps, {
                  duration: r,
                  easing: o,
                  step: function (t, e) {
                    e.now = Math.round(t);
                  },
                }),
                void t.hide().animate(this.showProps, {
                  duration: r,
                  easing: o,
                  complete: n,
                  step: function (t, e) {
                    (e.now = Math.round(t)),
                      "height" !== e.prop
                        ? "content-box" === c && (l += e.now)
                        : "content" !== a.options.heightStyle &&
                          ((e.now = Math.round(s - i.outerHeight() - l)),
                          (l = 0));
                  },
                }))
              : i.animate(this.hideProps, r, o, n)
            : t.animate(this.showProps, r, o, n)
        );
      },
      _toggleComplete: function (t) {
        var e = t.oldPanel,
          i = e.prev();
        this._removeClass(e, "ui-accordion-content-active"),
          this._removeClass(i, "ui-accordion-header-active")._addClass(
            i,
            "ui-accordion-header-collapsed"
          ),
          e.length && (e.parent()[0].className = e.parent()[0].className),
          this._trigger("activate", null, t);
      },
    }),
    (Y.ui.safeActiveElement = function (e) {
      var i;
      try {
        i = e.activeElement;
      } catch (t) {
        i = e.body;
      }
      return (i = !(i = i || e.body).nodeName ? e.body : i);
    }),
    Y.widget("ui.menu", {
      version: "1.13.0",
      defaultElement: "<ul>",
      delay: 300,
      options: {
        icons: { submenu: "ui-icon-caret-1-e" },
        items: "> *",
        menus: "ul",
        position: { my: "left top", at: "right top" },
        role: "menu",
        blur: null,
        focus: null,
        select: null,
      },
      _create: function () {
        (this.activeMenu = this.element),
          (this.mouseHandled = !1),
          (this.lastMousePosition = { x: null, y: null }),
          this.element
            .uniqueId()
            .attr({ role: this.options.role, tabIndex: 0 }),
          this._addClass("ui-menu", "ui-widget ui-widget-content"),
          this._on({
            "mousedown .ui-menu-item": function (t) {
              t.preventDefault(), this._activateItem(t);
            },
            "click .ui-menu-item": function (t) {
              var e = Y(t.target),
                i = Y(Y.ui.safeActiveElement(this.document[0]));
              !this.mouseHandled &&
                e.not(".ui-state-disabled").length &&
                (this.select(t),
                t.isPropagationStopped() || (this.mouseHandled = !0),
                e.has(".ui-menu").length
                  ? this.expand(t)
                  : !this.element.is(":focus") &&
                    i.closest(".ui-menu").length &&
                    (this.element.trigger("focus", [!0]),
                    this.active &&
                      1 === this.active.parents(".ui-menu").length &&
                      clearTimeout(this.timer)));
            },
            "mouseenter .ui-menu-item": "_activateItem",
            "mousemove .ui-menu-item": "_activateItem",
            mouseleave: "collapseAll",
            "mouseleave .ui-menu": "collapseAll",
            focus: function (t, e) {
              var i = this.active || this._menuItems().first();
              e || this.focus(t, i);
            },
            blur: function (t) {
              this._delay(function () {
                Y.contains(
                  this.element[0],
                  Y.ui.safeActiveElement(this.document[0])
                ) || this.collapseAll(t);
              });
            },
            keydown: "_keydown",
          }),
          this.refresh(),
          this._on(this.document, {
            click: function (t) {
              this._closeOnDocumentClick(t) && this.collapseAll(t, !0),
                (this.mouseHandled = !1);
            },
          });
      },
      _activateItem: function (t) {
        var e, i;
        this.previousFilter ||
          (t.clientX === this.lastMousePosition.x &&
            t.clientY === this.lastMousePosition.y) ||
          ((this.lastMousePosition = { x: t.clientX, y: t.clientY }),
          (e = Y(t.target).closest(".ui-menu-item")),
          (i = Y(t.currentTarget)),
          e[0] === i[0] &&
            (i.is(".ui-state-active") ||
              (this._removeClass(
                i.siblings().children(".ui-state-active"),
                null,
                "ui-state-active"
              ),
              this.focus(t, i))));
      },
      _destroy: function () {
        var t = this.element
          .find(".ui-menu-item")
          .removeAttr("role aria-disabled")
          .children(".ui-menu-item-wrapper")
          .removeUniqueId()
          .removeAttr("tabIndex role aria-haspopup");
        this.element
          .removeAttr("aria-activedescendant")
          .find(".ui-menu")
          .addBack()
          .removeAttr(
            "role aria-labelledby aria-expanded aria-hidden aria-disabled tabIndex"
          )
          .removeUniqueId()
          .show(),
          t.children().each(function () {
            var t = Y(this);
            t.data("ui-menu-submenu-caret") && t.remove();
          });
      },
      _keydown: function (t) {
        var e,
          i,
          n,
          s = !0;
        switch (t.keyCode) {
          case Y.ui.keyCode.PAGE_UP:
            this.previousPage(t);
            break;
          case Y.ui.keyCode.PAGE_DOWN:
            this.nextPage(t);
            break;
          case Y.ui.keyCode.HOME:
            this._move("first", "first", t);
            break;
          case Y.ui.keyCode.END:
            this._move("last", "last", t);
            break;
          case Y.ui.keyCode.UP:
            this.previous(t);
            break;
          case Y.ui.keyCode.DOWN:
            this.next(t);
            break;
          case Y.ui.keyCode.LEFT:
            this.collapse(t);
            break;
          case Y.ui.keyCode.RIGHT:
            this.active &&
              !this.active.is(".ui-state-disabled") &&
              this.expand(t);
            break;
          case Y.ui.keyCode.ENTER:
          case Y.ui.keyCode.SPACE:
            this._activate(t);
            break;
          case Y.ui.keyCode.ESCAPE:
            this.collapse(t);
            break;
          default:
            (e = this.previousFilter || ""),
              (n = s = !1),
              (i =
                96 <= t.keyCode && t.keyCode <= 105
                  ? (t.keyCode - 96).toString()
                  : String.fromCharCode(t.keyCode)),
              clearTimeout(this.filterTimer),
              i === e ? (n = !0) : (i = e + i),
              (e = this._filterMenuItems(i)),
              (e =
                n && -1 !== e.index(this.active.next())
                  ? this.active.nextAll(".ui-menu-item")
                  : e).length ||
                ((i = String.fromCharCode(t.keyCode)),
                (e = this._filterMenuItems(i))),
              e.length
                ? (this.focus(t, e),
                  (this.previousFilter = i),
                  (this.filterTimer = this._delay(function () {
                    delete this.previousFilter;
                  }, 1e3)))
                : delete this.previousFilter;
        }
        s && t.preventDefault();
      },
      _activate: function (t) {
        this.active &&
          !this.active.is(".ui-state-disabled") &&
          (this.active.children("[aria-haspopup='true']").length
            ? this.expand(t)
            : this.select(t));
      },
      refresh: function () {
        var t,
          e,
          n = this,
          s = this.options.icons.submenu,
          i = this.element.find(this.options.menus);
        this._toggleClass(
          "ui-menu-icons",
          null,
          !!this.element.find(".ui-icon").length
        ),
          (e = i
            .filter(":not(.ui-menu)")
            .hide()
            .attr({
              role: this.options.role,
              "aria-hidden": "true",
              "aria-expanded": "false",
            })
            .each(function () {
              var t = Y(this),
                e = t.prev(),
                i = Y("<span>").data("ui-menu-submenu-caret", !0);
              n._addClass(i, "ui-menu-icon", "ui-icon " + s),
                e.attr("aria-haspopup", "true").prepend(i),
                t.attr("aria-labelledby", e.attr("id"));
            })),
          this._addClass(e, "ui-menu", "ui-widget ui-widget-content ui-front"),
          (t = i.add(this.element).find(this.options.items))
            .not(".ui-menu-item")
            .each(function () {
              var t = Y(this);
              n._isDivider(t) &&
                n._addClass(t, "ui-menu-divider", "ui-widget-content");
            }),
          (i = (e = t.not(".ui-menu-item, .ui-menu-divider"))
            .children()
            .not(".ui-menu")
            .uniqueId()
            .attr({ tabIndex: -1, role: this._itemRole() })),
          this._addClass(e, "ui-menu-item")._addClass(
            i,
            "ui-menu-item-wrapper"
          ),
          t.filter(".ui-state-disabled").attr("aria-disabled", "true"),
          this.active &&
            !Y.contains(this.element[0], this.active[0]) &&
            this.blur();
      },
      _itemRole: function () {
        return { menu: "menuitem", listbox: "option" }[this.options.role];
      },
      _setOption: function (t, e) {
        var i;
        "icons" === t &&
          ((i = this.element.find(".ui-menu-icon")),
          this._removeClass(i, null, this.options.icons.submenu)._addClass(
            i,
            null,
            e.submenu
          )),
          this._super(t, e);
      },
      _setOptionDisabled: function (t) {
        this._super(t),
          this.element.attr("aria-disabled", String(t)),
          this._toggleClass(null, "ui-state-disabled", !!t);
      },
      focus: function (t, e) {
        var i;
        this.blur(t, t && "focus" === t.type),
          this._scrollIntoView(e),
          (this.active = e.first()),
          (i = this.active.children(".ui-menu-item-wrapper")),
          this._addClass(i, null, "ui-state-active"),
          this.options.role &&
            this.element.attr("aria-activedescendant", i.attr("id")),
          (i = this.active
            .parent()
            .closest(".ui-menu-item")
            .children(".ui-menu-item-wrapper")),
          this._addClass(i, null, "ui-state-active"),
          t && "keydown" === t.type
            ? this._close()
            : (this.timer = this._delay(function () {
                this._close();
              }, this.delay)),
          (i = e.children(".ui-menu")).length &&
            t &&
            /^mouse/.test(t.type) &&
            this._startOpening(i),
          (this.activeMenu = e.parent()),
          this._trigger("focus", t, { item: e });
      },
      _scrollIntoView: function (t) {
        var e, i, n;
        this._hasScroll() &&
          ((i = parseFloat(Y.css(this.activeMenu[0], "borderTopWidth")) || 0),
          (n = parseFloat(Y.css(this.activeMenu[0], "paddingTop")) || 0),
          (e = t.offset().top - this.activeMenu.offset().top - i - n),
          (i = this.activeMenu.scrollTop()),
          (n = this.activeMenu.height()),
          (t = t.outerHeight()),
          e < 0
            ? this.activeMenu.scrollTop(i + e)
            : n < e + t && this.activeMenu.scrollTop(i + e - n + t));
      },
      blur: function (t, e) {
        e || clearTimeout(this.timer),
          this.active &&
            (this._removeClass(
              this.active.children(".ui-menu-item-wrapper"),
              null,
              "ui-state-active"
            ),
            this._trigger("blur", t, { item: this.active }),
            (this.active = null));
      },
      _startOpening: function (t) {
        clearTimeout(this.timer),
          "true" === t.attr("aria-hidden") &&
            (this.timer = this._delay(function () {
              this._close(), this._open(t);
            }, this.delay));
      },
      _open: function (t) {
        var e = Y.extend({ of: this.active }, this.options.position);
        clearTimeout(this.timer),
          this.element
            .find(".ui-menu")
            .not(t.parents(".ui-menu"))
            .hide()
            .attr("aria-hidden", "true"),
          t
            .show()
            .removeAttr("aria-hidden")
            .attr("aria-expanded", "true")
            .position(e);
      },
      collapseAll: function (e, i) {
        clearTimeout(this.timer),
          (this.timer = this._delay(
            function () {
              var t = i
                ? this.element
                : Y(e && e.target).closest(this.element.find(".ui-menu"));
              t.length || (t = this.element),
                this._close(t),
                this.blur(e),
                this._removeClass(
                  t.find(".ui-state-active"),
                  null,
                  "ui-state-active"
                ),
                (this.activeMenu = t);
            },
            i ? 0 : this.delay
          ));
      },
      _close: function (t) {
        (t = t || (this.active ? this.active.parent() : this.element))
          .find(".ui-menu")
          .hide()
          .attr("aria-hidden", "true")
          .attr("aria-expanded", "false");
      },
      _closeOnDocumentClick: function (t) {
        return !Y(t.target).closest(".ui-menu").length;
      },
      _isDivider: function (t) {
        return !/[^\-\u2014\u2013\s]/.test(t.text());
      },
      collapse: function (t) {
        var e =
          this.active &&
          this.active.parent().closest(".ui-menu-item", this.element);
        e && e.length && (this._close(), this.focus(t, e));
      },
      expand: function (t) {
        var e =
          this.active &&
          this._menuItems(this.active.children(".ui-menu")).first();
        e &&
          e.length &&
          (this._open(e.parent()),
          this._delay(function () {
            this.focus(t, e);
          }));
      },
      next: function (t) {
        this._move("next", "first", t);
      },
      previous: function (t) {
        this._move("prev", "last", t);
      },
      isFirstItem: function () {
        return this.active && !this.active.prevAll(".ui-menu-item").length;
      },
      isLastItem: function () {
        return this.active && !this.active.nextAll(".ui-menu-item").length;
      },
      _menuItems: function (t) {
        return (t || this.element)
          .find(this.options.items)
          .filter(".ui-menu-item");
      },
      _move: function (t, e, i) {
        var n;
        ((n = this.active
          ? "first" === t || "last" === t
            ? this.active["first" === t ? "prevAll" : "nextAll"](
                ".ui-menu-item"
              ).last()
            : this.active[t + "All"](".ui-menu-item").first()
          : n) &&
          n.length &&
          this.active) ||
          (n = this._menuItems(this.activeMenu)[e]()),
          this.focus(i, n);
      },
      nextPage: function (t) {
        var e, i, n;
        this.active
          ? this.isLastItem() ||
            (this._hasScroll()
              ? ((i = this.active.offset().top),
                (n = this.element.innerHeight()),
                0 === Y.fn.jquery.indexOf("3.2.") &&
                  (n +=
                    this.element[0].offsetHeight - this.element.outerHeight()),
                this.active.nextAll(".ui-menu-item").each(function () {
                  return (e = Y(this)).offset().top - i - n < 0;
                }),
                this.focus(t, e))
              : this.focus(
                  t,
                  this._menuItems(this.activeMenu)[
                    this.active ? "last" : "first"
                  ]()
                ))
          : this.next(t);
      },
      previousPage: function (t) {
        var e, i, n;
        this.active
          ? this.isFirstItem() ||
            (this._hasScroll()
              ? ((i = this.active.offset().top),
                (n = this.element.innerHeight()),
                0 === Y.fn.jquery.indexOf("3.2.") &&
                  (n +=
                    this.element[0].offsetHeight - this.element.outerHeight()),
                this.active.prevAll(".ui-menu-item").each(function () {
                  return 0 < (e = Y(this)).offset().top - i + n;
                }),
                this.focus(t, e))
              : this.focus(t, this._menuItems(this.activeMenu).first()))
          : this.next(t);
      },
      _hasScroll: function () {
        return this.element.outerHeight() < this.element.prop("scrollHeight");
      },
      select: function (t) {
        this.active = this.active || Y(t.target).closest(".ui-menu-item");
        var e = { item: this.active };
        this.active.has(".ui-menu").length || this.collapseAll(t, !0),
          this._trigger("select", t, e);
      },
      _filterMenuItems: function (t) {
        var t = t.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g, "\\$&"),
          e = new RegExp("^" + t, "i");
        return this.activeMenu
          .find(this.options.items)
          .filter(".ui-menu-item")
          .filter(function () {
            return e.test(
              String.prototype.trim.call(
                Y(this).children(".ui-menu-item-wrapper").text()
              )
            );
          });
      },
    });
  Y.widget("ui.autocomplete", {
    version: "1.13.0",
    defaultElement: "<input>",
    options: {
      appendTo: null,
      autoFocus: !1,
      delay: 300,
      minLength: 1,
      position: { my: "left top", at: "left bottom", collision: "none" },
      source: null,
      change: null,
      close: null,
      focus: null,
      open: null,
      response: null,
      search: null,
      select: null,
    },
    requestIndex: 0,
    pending: 0,
    _create: function () {
      var i,
        n,
        s,
        t = this.element[0].nodeName.toLowerCase(),
        e = "textarea" === t,
        t = "input" === t;
      (this.isMultiLine = e || (!t && this._isContentEditable(this.element))),
        (this.valueMethod = this.element[e || t ? "val" : "text"]),
        (this.isNewMenu = !0),
        this._addClass("ui-autocomplete-input"),
        this.element.attr("autocomplete", "off"),
        this._on(this.element, {
          keydown: function (t) {
            if (this.element.prop("readOnly")) n = s = i = !0;
            else {
              n = s = i = !1;
              var e = Y.ui.keyCode;
              switch (t.keyCode) {
                case e.PAGE_UP:
                  (i = !0), this._move("previousPage", t);
                  break;
                case e.PAGE_DOWN:
                  (i = !0), this._move("nextPage", t);
                  break;
                case e.UP:
                  (i = !0), this._keyEvent("previous", t);
                  break;
                case e.DOWN:
                  (i = !0), this._keyEvent("next", t);
                  break;
                case e.ENTER:
                  this.menu.active &&
                    ((i = !0), t.preventDefault(), this.menu.select(t));
                  break;
                case e.TAB:
                  this.menu.active && this.menu.select(t);
                  break;
                case e.ESCAPE:
                  this.menu.element.is(":visible") &&
                    (this.isMultiLine || this._value(this.term),
                    this.close(t),
                    t.preventDefault());
                  break;
                default:
                  (n = !0), this._searchTimeout(t);
              }
            }
          },
          keypress: function (t) {
            if (i)
              return (
                (i = !1),
                void (
                  (this.isMultiLine && !this.menu.element.is(":visible")) ||
                  t.preventDefault()
                )
              );
            if (!n) {
              var e = Y.ui.keyCode;
              switch (t.keyCode) {
                case e.PAGE_UP:
                  this._move("previousPage", t);
                  break;
                case e.PAGE_DOWN:
                  this._move("nextPage", t);
                  break;
                case e.UP:
                  this._keyEvent("previous", t);
                  break;
                case e.DOWN:
                  this._keyEvent("next", t);
              }
            }
          },
          input: function (t) {
            if (s) return (s = !1), void t.preventDefault();
            this._searchTimeout(t);
          },
          focus: function () {
            (this.selectedItem = null), (this.previous = this._value());
          },
          blur: function (t) {
            clearTimeout(this.searching), this.close(t), this._change(t);
          },
        }),
        this._initSource(),
        (this.menu = Y("<ul>")
          .appendTo(this._appendTo())
          .menu({ role: null })
          .hide()
          .attr({ unselectable: "on" })
          .menu("instance")),
        this._addClass(this.menu.element, "ui-autocomplete", "ui-front"),
        this._on(this.menu.element, {
          mousedown: function (t) {
            t.preventDefault();
          },
          menufocus: function (t, e) {
            var i;
            if (
              this.isNewMenu &&
              ((this.isNewMenu = !1),
              t.originalEvent && /^mouse/.test(t.originalEvent.type))
            )
              return (
                this.menu.blur(),
                void this.document.one("mousemove", function () {
                  Y(t.target).trigger(t.originalEvent);
                })
              );
            (i = e.item.data("ui-autocomplete-item")),
              !1 !== this._trigger("focus", t, { item: i }) &&
                t.originalEvent &&
                /^key/.test(t.originalEvent.type) &&
                this._value(i.value),
              (i = e.item.attr("aria-label") || i.value) &&
                String.prototype.trim.call(i).length &&
                (this.liveRegion.children().hide(),
                Y("<div>").text(i).appendTo(this.liveRegion));
          },
          menuselect: function (t, e) {
            var i = e.item.data("ui-autocomplete-item"),
              n = this.previous;
            this.element[0] !== Y.ui.safeActiveElement(this.document[0]) &&
              (this.element.trigger("focus"),
              (this.previous = n),
              this._delay(function () {
                (this.previous = n), (this.selectedItem = i);
              })),
              !1 !== this._trigger("select", t, { item: i }) &&
                this._value(i.value),
              (this.term = this._value()),
              this.close(t),
              (this.selectedItem = i);
          },
        }),
        (this.liveRegion = Y("<div>", {
          role: "status",
          "aria-live": "assertive",
          "aria-relevant": "additions",
        }).appendTo(this.document[0].body)),
        this._addClass(this.liveRegion, null, "ui-helper-hidden-accessible"),
        this._on(this.window, {
          beforeunload: function () {
            this.element.removeAttr("autocomplete");
          },
        });
    },
    _destroy: function () {
      clearTimeout(this.searching),
        this.element.removeAttr("autocomplete"),
        this.menu.element.remove(),
        this.liveRegion.remove();
    },
    _setOption: function (t, e) {
      this._super(t, e),
        "source" === t && this._initSource(),
        "appendTo" === t && this.menu.element.appendTo(this._appendTo()),
        "disabled" === t && e && this.xhr && this.xhr.abort();
    },
    _isEventTargetInWidget: function (t) {
      var e = this.menu.element[0];
      return (
        t.target === this.element[0] ||
        t.target === e ||
        Y.contains(e, t.target)
      );
    },
    _closeOnClickOutside: function (t) {
      this._isEventTargetInWidget(t) || this.close();
    },
    _appendTo: function () {
      var t = this.options.appendTo;
      return (t = !(t =
        !(t =
          t && (t.jquery || t.nodeType ? Y(t) : this.document.find(t).eq(0))) ||
        !t[0]
          ? this.element.closest(".ui-front, dialog")
          : t).length
        ? this.document[0].body
        : t);
    },
    _initSource: function () {
      var i,
        n,
        s = this;
      Array.isArray(this.options.source)
        ? ((i = this.options.source),
          (this.source = function (t, e) {
            e(Y.ui.autocomplete.filter(i, t.term));
          }))
        : "string" == typeof this.options.source
        ? ((n = this.options.source),
          (this.source = function (t, e) {
            s.xhr && s.xhr.abort(),
              (s.xhr = Y.ajax({
                url: n,
                data: t,
                dataType: "json",
                success: function (t) {
                  e(t);
                },
                error: function () {
                  e([]);
                },
              }));
          }))
        : (this.source = this.options.source);
    },
    _searchTimeout: function (n) {
      clearTimeout(this.searching),
        (this.searching = this._delay(function () {
          var t = this.term === this._value(),
            e = this.menu.element.is(":visible"),
            i = n.altKey || n.ctrlKey || n.metaKey || n.shiftKey;
          (t && (e || i)) || ((this.selectedItem = null), this.search(null, n));
        }, this.options.delay));
    },
    search: function (t, e) {
      return (
        (t = null != t ? t : this._value()),
        (this.term = this._value()),
        t.length < this.options.minLength
          ? this.close(e)
          : !1 !== this._trigger("search", e)
          ? this._search(t)
          : void 0
      );
    },
    _search: function (t) {
      this.pending++,
        this._addClass("ui-autocomplete-loading"),
        (this.cancelSearch = !1),
        this.source({ term: t }, this._response());
    },
    _response: function () {
      var e = ++this.requestIndex;
      return function (t) {
        e === this.requestIndex && this.__response(t),
          this.pending--,
          this.pending || this._removeClass("ui-autocomplete-loading");
      }.bind(this);
    },
    __response: function (t) {
      (t = t && this._normalize(t)),
        this._trigger("response", null, { content: t }),
        !this.options.disabled && t && t.length && !this.cancelSearch
          ? (this._suggest(t), this._trigger("open"))
          : this._close();
    },
    close: function (t) {
      (this.cancelSearch = !0), this._close(t);
    },
    _close: function (t) {
      this._off(this.document, "mousedown"),
        this.menu.element.is(":visible") &&
          (this.menu.element.hide(),
          this.menu.blur(),
          (this.isNewMenu = !0),
          this._trigger("close", t));
    },
    _change: function (t) {
      this.previous !== this._value() &&
        this._trigger("change", t, { item: this.selectedItem });
    },
    _normalize: function (t) {
      return t.length && t[0].label && t[0].value
        ? t
        : Y.map(t, function (t) {
            return "string" == typeof t
              ? { label: t, value: t }
              : Y.extend({}, t, {
                  label: t.label || t.value,
                  value: t.value || t.label,
                });
          });
    },
    _suggest: function (t) {
      var e = this.menu.element.empty();
      this._renderMenu(e, t),
        (this.isNewMenu = !0),
        this.menu.refresh(),
        e.show(),
        this._resizeMenu(),
        e.position(Y.extend({ of: this.element }, this.options.position)),
        this.options.autoFocus && this.menu.next(),
        this._on(this.document, { mousedown: "_closeOnClickOutside" });
    },
    _resizeMenu: function () {
      var t = this.menu.element;
      t.outerWidth(
        Math.max(t.width("").outerWidth() + 1, this.element.outerWidth())
      );
    },
    _renderMenu: function (i, t) {
      var n = this;
      Y.each(t, function (t, e) {
        n._renderItemData(i, e);
      });
    },
    _renderItemData: function (t, e) {
      return this._renderItem(t, e).data("ui-autocomplete-item", e);
    },
    _renderItem: function (t, e) {
      return Y("<li>").append(Y("<div>").text(e.label)).appendTo(t);
    },
    _move: function (t, e) {
      if (this.menu.element.is(":visible"))
        return (this.menu.isFirstItem() && /^previous/.test(t)) ||
          (this.menu.isLastItem() && /^next/.test(t))
          ? (this.isMultiLine || this._value(this.term), void this.menu.blur())
          : void this.menu[t](e);
      this.search(null, e);
    },
    widget: function () {
      return this.menu.element;
    },
    _value: function () {
      return this.valueMethod.apply(this.element, arguments);
    },
    _keyEvent: function (t, e) {
      (this.isMultiLine && !this.menu.element.is(":visible")) ||
        (this._move(t, e), e.preventDefault());
    },
    _isContentEditable: function (t) {
      if (!t.length) return !1;
      var e = t.prop("contentEditable");
      return "inherit" === e
        ? this._isContentEditable(t.parent())
        : "true" === e;
    },
  }),
    Y.extend(Y.ui.autocomplete, {
      escapeRegex: function (t) {
        return t.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g, "\\$&");
      },
      filter: function (t, e) {
        var i = new RegExp(Y.ui.autocomplete.escapeRegex(e), "i");
        return Y.grep(t, function (t) {
          return i.test(t.label || t.value || t);
        });
      },
    }),
    Y.widget("ui.autocomplete", Y.ui.autocomplete, {
      options: {
        messages: {
          noResults: "No search results.",
          results: function (t) {
            return (
              t +
              (1 < t ? " results are" : " result is") +
              " available, use up and down arrow keys to navigate."
            );
          },
        },
      },
      __response: function (t) {
        this._superApply(arguments),
          this.options.disabled ||
            this.cancelSearch ||
            ((t =
              t && t.length
                ? this.options.messages.results(t.length)
                : this.options.messages.noResults),
            this.liveRegion.children().hide(),
            Y("<div>").text(t).appendTo(this.liveRegion));
      },
    });
  Y.ui.autocomplete;
  var tt = /ui-corner-([a-z]){2,6}/g;
  Y.widget("ui.controlgroup", {
    version: "1.13.0",
    defaultElement: "<div>",
    options: {
      direction: "horizontal",
      disabled: null,
      onlyVisible: !0,
      items: {
        button:
          "input[type=button], input[type=submit], input[type=reset], button, a",
        controlgroupLabel: ".ui-controlgroup-label",
        checkboxradio: "input[type='checkbox'], input[type='radio']",
        selectmenu: "select",
        spinner: ".ui-spinner-input",
      },
    },
    _create: function () {
      this._enhance();
    },
    _enhance: function () {
      this.element.attr("role", "toolbar"), this.refresh();
    },
    _destroy: function () {
      this._callChildMethod("destroy"),
        this.childWidgets.removeData("ui-controlgroup-data"),
        this.element.removeAttr("role"),
        this.options.items.controlgroupLabel &&
          this.element
            .find(this.options.items.controlgroupLabel)
            .find(".ui-controlgroup-label-contents")
            .contents()
            .unwrap();
    },
    _initWidgets: function () {
      var o = this,
        r = [];
      Y.each(this.options.items, function (n, t) {
        var e,
          s = {};
        if (t)
          return "controlgroupLabel" === n
            ? ((e = o.element.find(t)).each(function () {
                var t = Y(this);
                t.children(".ui-controlgroup-label-contents").length ||
                  t
                    .contents()
                    .wrapAll(
                      "<span class='ui-controlgroup-label-contents'></span>"
                    );
              }),
              o._addClass(
                e,
                null,
                "ui-widget ui-widget-content ui-state-default"
              ),
              void (r = r.concat(e.get())))
            : void (
                Y.fn[n] &&
                ((s = o["_" + n + "Options"]
                  ? o["_" + n + "Options"]("middle")
                  : { classes: {} }),
                o.element.find(t).each(function () {
                  var t = Y(this),
                    e = t[n]("instance"),
                    i = Y.widget.extend({}, s);
                  ("button" === n && t.parent(".ui-spinner").length) ||
                    ((e = e || t[n]()[n]("instance")) &&
                      (i.classes = o._resolveClassesValues(i.classes, e)),
                    t[n](i),
                    (i = t[n]("widget")),
                    Y.data(i[0], "ui-controlgroup-data", e || t[n]("instance")),
                    r.push(i[0]));
                }))
              );
      }),
        (this.childWidgets = Y(Y.uniqueSort(r))),
        this._addClass(this.childWidgets, "ui-controlgroup-item");
    },
    _callChildMethod: function (e) {
      this.childWidgets.each(function () {
        var t = Y(this).data("ui-controlgroup-data");
        t && t[e] && t[e]();
      });
    },
    _updateCornerClass: function (t, e) {
      e = this._buildSimpleOptions(e, "label").classes.label;
      this._removeClass(
        t,
        null,
        "ui-corner-top ui-corner-bottom ui-corner-left ui-corner-right ui-corner-all"
      ),
        this._addClass(t, null, e);
    },
    _buildSimpleOptions: function (t, e) {
      var i = "vertical" === this.options.direction,
        n = { classes: {} };
      return (
        (n.classes[e] = {
          middle: "",
          first: "ui-corner-" + (i ? "top" : "left"),
          last: "ui-corner-" + (i ? "bottom" : "right"),
          only: "ui-corner-all",
        }[t]),
        n
      );
    },
    _spinnerOptions: function (t) {
      t = this._buildSimpleOptions(t, "ui-spinner");
      return (
        (t.classes["ui-spinner-up"] = ""),
        (t.classes["ui-spinner-down"] = ""),
        t
      );
    },
    _buttonOptions: function (t) {
      return this._buildSimpleOptions(t, "ui-button");
    },
    _checkboxradioOptions: function (t) {
      return this._buildSimpleOptions(t, "ui-checkboxradio-label");
    },
    _selectmenuOptions: function (t) {
      var e = "vertical" === this.options.direction;
      return {
        width: e && "auto",
        classes: {
          middle: {
            "ui-selectmenu-button-open": "",
            "ui-selectmenu-button-closed": "",
          },
          first: {
            "ui-selectmenu-button-open": "ui-corner-" + (e ? "top" : "tl"),
            "ui-selectmenu-button-closed": "ui-corner-" + (e ? "top" : "left"),
          },
          last: {
            "ui-selectmenu-button-open": e ? "" : "ui-corner-tr",
            "ui-selectmenu-button-closed":
              "ui-corner-" + (e ? "bottom" : "right"),
          },
          only: {
            "ui-selectmenu-button-open": "ui-corner-top",
            "ui-selectmenu-button-closed": "ui-corner-all",
          },
        }[t],
      };
    },
    _resolveClassesValues: function (i, n) {
      var s = {};
      return (
        Y.each(i, function (t) {
          var e = n.options.classes[t] || "",
            e = String.prototype.trim.call(e.replace(tt, ""));
          s[t] = (e + " " + i[t]).replace(/\s+/g, " ");
        }),
        s
      );
    },
    _setOption: function (t, e) {
      "direction" === t &&
        this._removeClass("ui-controlgroup-" + this.options.direction),
        this._super(t, e),
        "disabled" !== t
          ? this.refresh()
          : this._callChildMethod(e ? "disable" : "enable");
    },
    refresh: function () {
      var s,
        o = this;
      this._addClass(
        "ui-controlgroup ui-controlgroup-" + this.options.direction
      ),
        "horizontal" === this.options.direction &&
          this._addClass(null, "ui-helper-clearfix"),
        this._initWidgets(),
        (s = this.childWidgets),
        (s = this.options.onlyVisible ? s.filter(":visible") : s).length &&
          (Y.each(["first", "last"], function (t, e) {
            var i,
              n = s[e]().data("ui-controlgroup-data");
            n && o["_" + n.widgetName + "Options"]
              ? (((i = o["_" + n.widgetName + "Options"](
                  1 === s.length ? "only" : e
                )).classes = o._resolveClassesValues(i.classes, n)),
                n.element[n.widgetName](i))
              : o._updateCornerClass(s[e](), e);
          }),
          this._callChildMethod("refresh"));
    },
  });
  Y.widget("ui.checkboxradio", [
    Y.ui.formResetMixin,
    {
      version: "1.13.0",
      options: {
        disabled: null,
        label: null,
        icon: !0,
        classes: {
          "ui-checkboxradio-label": "ui-corner-all",
          "ui-checkboxradio-icon": "ui-corner-all",
        },
      },
      _getCreateOptions: function () {
        var t,
          e = this,
          i = this._super() || {};
        return (
          this._readType(),
          (t = this.element.labels()),
          (this.label = Y(t[t.length - 1])),
          this.label.length ||
            Y.error("No label found for checkboxradio widget"),
          (this.originalLabel = ""),
          this.label
            .contents()
            .not(this.element[0])
            .each(function () {
              e.originalLabel +=
                3 === this.nodeType ? Y(this).text() : this.outerHTML;
            }),
          this.originalLabel && (i.label = this.originalLabel),
          null != (t = this.element[0].disabled) && (i.disabled = t),
          i
        );
      },
      _create: function () {
        var t = this.element[0].checked;
        this._bindFormResetHandler(),
          null == this.options.disabled &&
            (this.options.disabled = this.element[0].disabled),
          this._setOption("disabled", this.options.disabled),
          this._addClass("ui-checkboxradio", "ui-helper-hidden-accessible"),
          this._addClass(
            this.label,
            "ui-checkboxradio-label",
            "ui-button ui-widget"
          ),
          "radio" === this.type &&
            this._addClass(this.label, "ui-checkboxradio-radio-label"),
          this.options.label && this.options.label !== this.originalLabel
            ? this._updateLabel()
            : this.originalLabel && (this.options.label = this.originalLabel),
          this._enhance(),
          t &&
            this._addClass(
              this.label,
              "ui-checkboxradio-checked",
              "ui-state-active"
            ),
          this._on({
            change: "_toggleClasses",
            focus: function () {
              this._addClass(
                this.label,
                null,
                "ui-state-focus ui-visual-focus"
              );
            },
            blur: function () {
              this._removeClass(
                this.label,
                null,
                "ui-state-focus ui-visual-focus"
              );
            },
          });
      },
      _readType: function () {
        var t = this.element[0].nodeName.toLowerCase();
        (this.type = this.element[0].type),
          ("input" === t && /radio|checkbox/.test(this.type)) ||
            Y.error(
              "Can't create checkboxradio on element.nodeName=" +
                t +
                " and element.type=" +
                this.type
            );
      },
      _enhance: function () {
        this._updateIcon(this.element[0].checked);
      },
      widget: function () {
        return this.label;
      },
      _getRadioGroup: function () {
        var t = this.element[0].name,
          e = "input[name='" + Y.escapeSelector(t) + "']";
        return t
          ? (this.form.length
              ? Y(this.form[0].elements).filter(e)
              : Y(e).filter(function () {
                  return 0 === Y(this)._form().length;
                })
            ).not(this.element)
          : Y([]);
      },
      _toggleClasses: function () {
        var t = this.element[0].checked;
        this._toggleClass(
          this.label,
          "ui-checkboxradio-checked",
          "ui-state-active",
          t
        ),
          this.options.icon &&
            "checkbox" === this.type &&
            this._toggleClass(
              this.icon,
              null,
              "ui-icon-check ui-state-checked",
              t
            )._toggleClass(this.icon, null, "ui-icon-blank", !t),
          "radio" === this.type &&
            this._getRadioGroup().each(function () {
              var t = Y(this).checkboxradio("instance");
              t &&
                t._removeClass(
                  t.label,
                  "ui-checkboxradio-checked",
                  "ui-state-active"
                );
            });
      },
      _destroy: function () {
        this._unbindFormResetHandler(),
          this.icon && (this.icon.remove(), this.iconSpace.remove());
      },
      _setOption: function (t, e) {
        if ("label" !== t || e) {
          if ((this._super(t, e), "disabled" === t))
            return (
              this._toggleClass(this.label, null, "ui-state-disabled", e),
              void (this.element[0].disabled = e)
            );
          this.refresh();
        }
      },
      _updateIcon: function (t) {
        var e = "ui-icon ui-icon-background ";
        this.options.icon
          ? (this.icon ||
              ((this.icon = Y("<span>")),
              (this.iconSpace = Y("<span> </span>")),
              this._addClass(this.iconSpace, "ui-checkboxradio-icon-space")),
            "checkbox" === this.type
              ? ((e += t ? "ui-icon-check ui-state-checked" : "ui-icon-blank"),
                this._removeClass(
                  this.icon,
                  null,
                  t ? "ui-icon-blank" : "ui-icon-check"
                ))
              : (e += "ui-icon-blank"),
            this._addClass(this.icon, "ui-checkboxradio-icon", e),
            t ||
              this._removeClass(
                this.icon,
                null,
                "ui-icon-check ui-state-checked"
              ),
            this.icon.prependTo(this.label).after(this.iconSpace))
          : void 0 !== this.icon &&
            (this.icon.remove(), this.iconSpace.remove(), delete this.icon);
      },
      _updateLabel: function () {
        var t = this.label.contents().not(this.element[0]);
        this.icon && (t = t.not(this.icon[0])),
          (t = this.iconSpace ? t.not(this.iconSpace[0]) : t).remove(),
          this.label.append(this.options.label);
      },
      refresh: function () {
        var t = this.element[0].checked,
          e = this.element[0].disabled;
        this._updateIcon(t),
          this._toggleClass(
            this.label,
            "ui-checkboxradio-checked",
            "ui-state-active",
            t
          ),
          null !== this.options.label && this._updateLabel(),
          e !== this.options.disabled && this._setOptions({ disabled: e });
      },
    },
  ]);
  var et;
  Y.ui.checkboxradio;
  Y.widget("ui.button", {
    version: "1.13.0",
    defaultElement: "<button>",
    options: {
      classes: { "ui-button": "ui-corner-all" },
      disabled: null,
      icon: null,
      iconPosition: "beginning",
      label: null,
      showLabel: !0,
    },
    _getCreateOptions: function () {
      var t,
        e = this._super() || {};
      return (
        (this.isInput = this.element.is("input")),
        null != (t = this.element[0].disabled) && (e.disabled = t),
        (this.originalLabel = this.isInput
          ? this.element.val()
          : this.element.html()),
        this.originalLabel && (e.label = this.originalLabel),
        e
      );
    },
    _create: function () {
      !this.option.showLabel & !this.options.icon &&
        (this.options.showLabel = !0),
        null == this.options.disabled &&
          (this.options.disabled = this.element[0].disabled || !1),
        (this.hasTitle = !!this.element.attr("title")),
        this.options.label &&
          this.options.label !== this.originalLabel &&
          (this.isInput
            ? this.element.val(this.options.label)
            : this.element.html(this.options.label)),
        this._addClass("ui-button", "ui-widget"),
        this._setOption("disabled", this.options.disabled),
        this._enhance(),
        this.element.is("a") &&
          this._on({
            keyup: function (t) {
              t.keyCode === Y.ui.keyCode.SPACE &&
                (t.preventDefault(),
                this.element[0].click
                  ? this.element[0].click()
                  : this.element.trigger("click"));
            },
          });
    },
    _enhance: function () {
      this.element.is("button") || this.element.attr("role", "button"),
        this.options.icon &&
          (this._updateIcon("icon", this.options.icon), this._updateTooltip());
    },
    _updateTooltip: function () {
      (this.title = this.element.attr("title")),
        this.options.showLabel ||
          this.title ||
          this.element.attr("title", this.options.label);
    },
    _updateIcon: function (t, e) {
      var i = "iconPosition" !== t,
        n = i ? this.options.iconPosition : e,
        t = "top" === n || "bottom" === n;
      this.icon
        ? i && this._removeClass(this.icon, null, this.options.icon)
        : ((this.icon = Y("<span>")),
          this._addClass(this.icon, "ui-button-icon", "ui-icon"),
          this.options.showLabel || this._addClass("ui-button-icon-only")),
        i && this._addClass(this.icon, null, e),
        this._attachIcon(n),
        t
          ? (this._addClass(this.icon, null, "ui-widget-icon-block"),
            this.iconSpace && this.iconSpace.remove())
          : (this.iconSpace ||
              ((this.iconSpace = Y("<span> </span>")),
              this._addClass(this.iconSpace, "ui-button-icon-space")),
            this._removeClass(this.icon, null, "ui-wiget-icon-block"),
            this._attachIconSpace(n));
    },
    _destroy: function () {
      this.element.removeAttr("role"),
        this.icon && this.icon.remove(),
        this.iconSpace && this.iconSpace.remove(),
        this.hasTitle || this.element.removeAttr("title");
    },
    _attachIconSpace: function (t) {
      this.icon[/^(?:end|bottom)/.test(t) ? "before" : "after"](this.iconSpace);
    },
    _attachIcon: function (t) {
      this.element[/^(?:end|bottom)/.test(t) ? "append" : "prepend"](this.icon);
    },
    _setOptions: function (t) {
      var e = (void 0 === t.showLabel ? this.options : t).showLabel,
        i = (void 0 === t.icon ? this.options : t).icon;
      e || i || (t.showLabel = !0), this._super(t);
    },
    _setOption: function (t, e) {
      "icon" === t &&
        (e
          ? this._updateIcon(t, e)
          : this.icon &&
            (this.icon.remove(), this.iconSpace && this.iconSpace.remove())),
        "iconPosition" === t && this._updateIcon(t, e),
        "showLabel" === t &&
          (this._toggleClass("ui-button-icon-only", null, !e),
          this._updateTooltip()),
        "label" === t &&
          (this.isInput
            ? this.element.val(e)
            : (this.element.html(e),
              this.icon &&
                (this._attachIcon(this.options.iconPosition),
                this._attachIconSpace(this.options.iconPosition)))),
        this._super(t, e),
        "disabled" === t &&
          (this._toggleClass(null, "ui-state-disabled", e),
          (this.element[0].disabled = e) && this.element.trigger("blur"));
    },
    refresh: function () {
      var t = this.element.is("input, button")
        ? this.element[0].disabled
        : this.element.hasClass("ui-button-disabled");
      t !== this.options.disabled && this._setOptions({ disabled: t }),
        this._updateTooltip();
    },
  }),
    !1 !== Y.uiBackCompat &&
      (Y.widget("ui.button", Y.ui.button, {
        options: { text: !0, icons: { primary: null, secondary: null } },
        _create: function () {
          this.options.showLabel &&
            !this.options.text &&
            (this.options.showLabel = this.options.text),
            !this.options.showLabel &&
              this.options.text &&
              (this.options.text = this.options.showLabel),
            this.options.icon ||
            (!this.options.icons.primary && !this.options.icons.secondary)
              ? this.options.icon &&
                (this.options.icons.primary = this.options.icon)
              : this.options.icons.primary
              ? (this.options.icon = this.options.icons.primary)
              : ((this.options.icon = this.options.icons.secondary),
                (this.options.iconPosition = "end")),
            this._super();
        },
        _setOption: function (t, e) {
          "text" !== t
            ? ("showLabel" === t && (this.options.text = e),
              "icon" === t && (this.options.icons.primary = e),
              "icons" === t &&
                (e.primary
                  ? (this._super("icon", e.primary),
                    this._super("iconPosition", "beginning"))
                  : e.secondary &&
                    (this._super("icon", e.secondary),
                    this._super("iconPosition", "end"))),
              this._superApply(arguments))
            : this._super("showLabel", e);
        },
      }),
      (Y.fn.button =
        ((et = Y.fn.button),
        function (i) {
          var t = "string" == typeof i,
            n = Array.prototype.slice.call(arguments, 1),
            s = this;
          return (
            t
              ? this.length || "instance" !== i
                ? this.each(function () {
                    var t = Y(this).attr("type"),
                      e = Y.data(
                        this,
                        "ui-" +
                          ("checkbox" !== t && "radio" !== t
                            ? "button"
                            : "checkboxradio")
                      );
                    return "instance" === i
                      ? ((s = e), !1)
                      : e
                      ? "function" != typeof e[i] || "_" === i.charAt(0)
                        ? Y.error(
                            "no such method '" +
                              i +
                              "' for button widget instance"
                          )
                        : (t = e[i].apply(e, n)) !== e && void 0 !== t
                        ? ((s = t && t.jquery ? s.pushStack(t.get()) : t), !1)
                        : void 0
                      : Y.error(
                          "cannot call methods on button prior to initialization; attempted to call method '" +
                            i +
                            "'"
                        );
                  })
                : (s = void 0)
              : (n.length && (i = Y.widget.extend.apply(null, [i].concat(n))),
                this.each(function () {
                  var t = Y(this).attr("type"),
                    e =
                      "checkbox" !== t && "radio" !== t
                        ? "button"
                        : "checkboxradio",
                    t = Y.data(this, "ui-" + e);
                  t
                    ? (t.option(i || {}), t._init && t._init())
                    : "button" != e
                    ? Y(this).checkboxradio(Y.extend({ icon: !1 }, i))
                    : et.call(Y(this), i);
                })),
            s
          );
        })),
      (Y.fn.buttonset = function () {
        return (
          Y.ui.controlgroup || Y.error("Controlgroup widget missing"),
          "option" === arguments[0] && "items" === arguments[1] && arguments[2]
            ? this.controlgroup.apply(this, [
                arguments[0],
                "items.button",
                arguments[2],
              ])
            : "option" === arguments[0] && "items" === arguments[1]
            ? this.controlgroup.apply(this, [arguments[0], "items.button"])
            : ("object" == typeof arguments[0] &&
                arguments[0].items &&
                (arguments[0].items = { button: arguments[0].items }),
              this.controlgroup.apply(this, arguments))
        );
      }));
  var it;
  Y.ui.button;
  function nt() {
    (this._curInst = null),
      (this._keyEvent = !1),
      (this._disabledInputs = []),
      (this._datepickerShowing = !1),
      (this._inDialog = !1),
      (this._mainDivId = "ui-datepicker-div"),
      (this._inlineClass = "ui-datepicker-inline"),
      (this._appendClass = "ui-datepicker-append"),
      (this._triggerClass = "ui-datepicker-trigger"),
      (this._dialogClass = "ui-datepicker-dialog"),
      (this._disableClass = "ui-datepicker-disabled"),
      (this._unselectableClass = "ui-datepicker-unselectable"),
      (this._currentClass = "ui-datepicker-current-day"),
      (this._dayOverClass = "ui-datepicker-days-cell-over"),
      (this.regional = []),
      (this.regional[""] = {
        closeText: "Done",
        prevText: "Prev",
        nextText: "Next",
        currentText: "Today",
        monthNames: [
          "January",
          "February",
          "March",
          "April",
          "May",
          "June",
          "July",
          "August",
          "September",
          "October",
          "November",
          "December",
        ],
        monthNamesShort: [
          "Jan",
          "Feb",
          "Mar",
          "Apr",
          "May",
          "Jun",
          "Jul",
          "Aug",
          "Sep",
          "Oct",
          "Nov",
          "Dec",
        ],
        dayNames: [
          "Sunday",
          "Monday",
          "Tuesday",
          "Wednesday",
          "Thursday",
          "Friday",
          "Saturday",
        ],
        dayNamesShort: ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"],
        dayNamesMin: ["Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"],
        weekHeader: "Wk",
        dateFormat: "mm/dd/yy",
        firstDay: 0,
        isRTL: !1,
        showMonthAfterYear: !1,
        yearSuffix: "",
        selectMonthLabel: "Select month",
        selectYearLabel: "Select year",
      }),
      (this._defaults = {
        showOn: "focus",
        showAnim: "fadeIn",
        showOptions: {},
        defaultDate: null,
        appendText: "",
        buttonText: "...",
        buttonImage: "",
        buttonImageOnly: !1,
        hideIfNoPrevNext: !1,
        navigationAsDateFormat: !1,
        gotoCurrent: !1,
        changeMonth: !1,
        changeYear: !1,
        yearRange: "c-10:c+10",
        showOtherMonths: !1,
        selectOtherMonths: !1,
        showWeek: !1,
        calculateWeek: this.iso8601Week,
        shortYearCutoff: "+10",
        minDate: null,
        maxDate: null,
        duration: "fast",
        beforeShowDay: null,
        beforeShow: null,
        onSelect: null,
        onChangeMonthYear: null,
        onClose: null,
        onUpdateDatepicker: null,
        numberOfMonths: 1,
        showCurrentAtPos: 0,
        stepMonths: 1,
        stepBigMonths: 12,
        altField: "",
        altFormat: "",
        constrainInput: !0,
        showButtonPanel: !1,
        autoSize: !1,
        disabled: !1,
      }),
      Y.extend(this._defaults, this.regional[""]),
      (this.regional.en = Y.extend(!0, {}, this.regional[""])),
      (this.regional["en-US"] = Y.extend(!0, {}, this.regional.en)),
      (this.dpDiv = st(
        Y(
          "<div id='" +
            this._mainDivId +
            "' class='ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all'></div>"
        )
      ));
  }
  function st(t) {
    var e =
      "button, .ui-datepicker-prev, .ui-datepicker-next, .ui-datepicker-calendar td a";
    return t
      .on("mouseout", e, function () {
        Y(this).removeClass("ui-state-hover"),
          -1 !== this.className.indexOf("ui-datepicker-prev") &&
            Y(this).removeClass("ui-datepicker-prev-hover"),
          -1 !== this.className.indexOf("ui-datepicker-next") &&
            Y(this).removeClass("ui-datepicker-next-hover");
      })
      .on("mouseover", e, ot);
  }
  function ot() {
    Y.datepicker._isDisabledDatepicker(
      (it.inline ? it.dpDiv.parent() : it.input)[0]
    ) ||
      (Y(this)
        .parents(".ui-datepicker-calendar")
        .find("a")
        .removeClass("ui-state-hover"),
      Y(this).addClass("ui-state-hover"),
      -1 !== this.className.indexOf("ui-datepicker-prev") &&
        Y(this).addClass("ui-datepicker-prev-hover"),
      -1 !== this.className.indexOf("ui-datepicker-next") &&
        Y(this).addClass("ui-datepicker-next-hover"));
  }
  function rt(t, e) {
    for (var i in (Y.extend(t, e), e)) null == e[i] && (t[i] = e[i]);
    return t;
  }
  Y.extend(Y.ui, { datepicker: { version: "1.13.0" } }),
    Y.extend(nt.prototype, {
      markerClassName: "hasDatepicker",
      maxRows: 4,
      _widgetDatepicker: function () {
        return this.dpDiv;
      },
      setDefaults: function (t) {
        return rt(this._defaults, t || {}), this;
      },
      _attachDatepicker: function (t, e) {
        var i,
          n = t.nodeName.toLowerCase(),
          s = "div" === n || "span" === n;
        t.id || ((this.uuid += 1), (t.id = "dp" + this.uuid)),
          ((i = this._newInst(Y(t), s)).settings = Y.extend({}, e || {})),
          "input" === n
            ? this._connectDatepicker(t, i)
            : s && this._inlineDatepicker(t, i);
      },
      _newInst: function (t, e) {
        return {
          id: t[0].id.replace(/([^A-Za-z0-9_\-])/g, "\\\\$1"),
          input: t,
          selectedDay: 0,
          selectedMonth: 0,
          selectedYear: 0,
          drawMonth: 0,
          drawYear: 0,
          inline: e,
          dpDiv: e
            ? st(
                Y(
                  "<div class='" +
                    this._inlineClass +
                    " ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all'></div>"
                )
              )
            : this.dpDiv,
        };
      },
      _connectDatepicker: function (t, e) {
        var i = Y(t);
        (e.append = Y([])),
          (e.trigger = Y([])),
          i.hasClass(this.markerClassName) ||
            (this._attachments(i, e),
            i
              .addClass(this.markerClassName)
              .on("keydown", this._doKeyDown)
              .on("keypress", this._doKeyPress)
              .on("keyup", this._doKeyUp),
            this._autoSize(e),
            Y.data(t, "datepicker", e),
            e.settings.disabled && this._disableDatepicker(t));
      },
      _attachments: function (t, e) {
        var i,
          n = this._get(e, "appendText"),
          s = this._get(e, "isRTL");
        e.append && e.append.remove(),
          n &&
            ((e.append = Y("<span>").addClass(this._appendClass).text(n)),
            t[s ? "before" : "after"](e.append)),
          t.off("focus", this._showDatepicker),
          e.trigger && e.trigger.remove(),
          ("focus" !== (i = this._get(e, "showOn")) && "both" !== i) ||
            t.on("focus", this._showDatepicker),
          ("button" !== i && "both" !== i) ||
            ((n = this._get(e, "buttonText")),
            (i = this._get(e, "buttonImage")),
            this._get(e, "buttonImageOnly")
              ? (e.trigger = Y("<img>")
                  .addClass(this._triggerClass)
                  .attr({ src: i, alt: n, title: n }))
              : ((e.trigger = Y("<button type='button'>").addClass(
                  this._triggerClass
                )),
                i
                  ? e.trigger.html(
                      Y("<img>").attr({ src: i, alt: n, title: n })
                    )
                  : e.trigger.text(n)),
            t[s ? "before" : "after"](e.trigger),
            e.trigger.on("click", function () {
              return (
                Y.datepicker._datepickerShowing &&
                Y.datepicker._lastInput === t[0]
                  ? Y.datepicker._hideDatepicker()
                  : (Y.datepicker._datepickerShowing &&
                      Y.datepicker._lastInput !== t[0] &&
                      Y.datepicker._hideDatepicker(),
                    Y.datepicker._showDatepicker(t[0])),
                !1
              );
            }));
      },
      _autoSize: function (t) {
        var e, i, n, s, o, r;
        this._get(t, "autoSize") &&
          !t.inline &&
          ((o = new Date(2009, 11, 20)),
          (r = this._get(t, "dateFormat")).match(/[DM]/) &&
            (o.setMonth(
              (e = function (t) {
                for (s = n = i = 0; s < t.length; s++)
                  t[s].length > i && ((i = t[s].length), (n = s));
                return n;
              })(this._get(t, r.match(/MM/) ? "monthNames" : "monthNamesShort"))
            ),
            o.setDate(
              e(this._get(t, r.match(/DD/) ? "dayNames" : "dayNamesShort")) +
                20 -
                o.getDay()
            )),
          t.input.attr("size", this._formatDate(t, o).length));
      },
      _inlineDatepicker: function (t, e) {
        var i = Y(t);
        i.hasClass(this.markerClassName) ||
          (i.addClass(this.markerClassName).append(e.dpDiv),
          Y.data(t, "datepicker", e),
          this._setDate(e, this._getDefaultDate(e), !0),
          this._updateDatepicker(e),
          this._updateAlternate(e),
          e.settings.disabled && this._disableDatepicker(t),
          e.dpDiv.css("display", "block"));
      },
      _dialogDatepicker: function (t, e, i, n, s) {
        var o,
          r = this._dialogInst;
        return (
          r ||
            ((this.uuid += 1),
            (o = "dp" + this.uuid),
            (this._dialogInput = Y(
              "<input type='text' id='" +
                o +
                "' style='position: absolute; top: -100px; width: 0px;'/>"
            )),
            this._dialogInput.on("keydown", this._doKeyDown),
            Y("body").append(this._dialogInput),
            ((r = this._dialogInst =
              this._newInst(this._dialogInput, !1)).settings = {}),
            Y.data(this._dialogInput[0], "datepicker", r)),
          rt(r.settings, n || {}),
          (e = e && e.constructor === Date ? this._formatDate(r, e) : e),
          this._dialogInput.val(e),
          (this._pos = s ? (s.length ? s : [s.pageX, s.pageY]) : null),
          this._pos ||
            ((o = document.documentElement.clientWidth),
            (n = document.documentElement.clientHeight),
            (e =
              document.documentElement.scrollLeft || document.body.scrollLeft),
            (s = document.documentElement.scrollTop || document.body.scrollTop),
            (this._pos = [o / 2 - 100 + e, n / 2 - 150 + s])),
          this._dialogInput
            .css("left", this._pos[0] + 20 + "px")
            .css("top", this._pos[1] + "px"),
          (r.settings.onSelect = i),
          (this._inDialog = !0),
          this.dpDiv.addClass(this._dialogClass),
          this._showDatepicker(this._dialogInput[0]),
          Y.blockUI && Y.blockUI(this.dpDiv),
          Y.data(this._dialogInput[0], "datepicker", r),
          this
        );
      },
      _destroyDatepicker: function (t) {
        var e,
          i = Y(t),
          n = Y.data(t, "datepicker");
        i.hasClass(this.markerClassName) &&
          ((e = t.nodeName.toLowerCase()),
          Y.removeData(t, "datepicker"),
          "input" === e
            ? (n.append.remove(),
              n.trigger.remove(),
              i
                .removeClass(this.markerClassName)
                .off("focus", this._showDatepicker)
                .off("keydown", this._doKeyDown)
                .off("keypress", this._doKeyPress)
                .off("keyup", this._doKeyUp))
            : ("div" !== e && "span" !== e) ||
              i.removeClass(this.markerClassName).empty(),
          it === n && ((it = null), (this._curInst = null)));
      },
      _enableDatepicker: function (e) {
        var t,
          i = Y(e),
          n = Y.data(e, "datepicker");
        i.hasClass(this.markerClassName) &&
          ("input" === (t = e.nodeName.toLowerCase())
            ? ((e.disabled = !1),
              n.trigger
                .filter("button")
                .each(function () {
                  this.disabled = !1;
                })
                .end()
                .filter("img")
                .css({ opacity: "1.0", cursor: "" }))
            : ("div" !== t && "span" !== t) ||
              ((i = i.children("." + this._inlineClass))
                .children()
                .removeClass("ui-state-disabled"),
              i
                .find("select.ui-datepicker-month, select.ui-datepicker-year")
                .prop("disabled", !1)),
          (this._disabledInputs = Y.map(this._disabledInputs, function (t) {
            return t === e ? null : t;
          })));
      },
      _disableDatepicker: function (e) {
        var t,
          i = Y(e),
          n = Y.data(e, "datepicker");
        i.hasClass(this.markerClassName) &&
          ("input" === (t = e.nodeName.toLowerCase())
            ? ((e.disabled = !0),
              n.trigger
                .filter("button")
                .each(function () {
                  this.disabled = !0;
                })
                .end()
                .filter("img")
                .css({ opacity: "0.5", cursor: "default" }))
            : ("div" !== t && "span" !== t) ||
              ((i = i.children("." + this._inlineClass))
                .children()
                .addClass("ui-state-disabled"),
              i
                .find("select.ui-datepicker-month, select.ui-datepicker-year")
                .prop("disabled", !0)),
          (this._disabledInputs = Y.map(this._disabledInputs, function (t) {
            return t === e ? null : t;
          })),
          (this._disabledInputs[this._disabledInputs.length] = e));
      },
      _isDisabledDatepicker: function (t) {
        if (!t) return !1;
        for (var e = 0; e < this._disabledInputs.length; e++)
          if (this._disabledInputs[e] === t) return !0;
        return !1;
      },
      _getInst: function (t) {
        try {
          return Y.data(t, "datepicker");
        } catch (t) {
          throw "Missing instance data for this datepicker";
        }
      },
      _optionDatepicker: function (t, e, i) {
        var n,
          s,
          o = this._getInst(t);
        if (2 === arguments.length && "string" == typeof e)
          return "defaults" === e
            ? Y.extend({}, Y.datepicker._defaults)
            : o
            ? "all" === e
              ? Y.extend({}, o.settings)
              : this._get(o, e)
            : null;
        (n = e || {}),
          "string" == typeof e && ((n = {})[e] = i),
          o &&
            (this._curInst === o && this._hideDatepicker(),
            (s = this._getDateDatepicker(t, !0)),
            (e = this._getMinMaxDate(o, "min")),
            (i = this._getMinMaxDate(o, "max")),
            rt(o.settings, n),
            null !== e &&
              void 0 !== n.dateFormat &&
              void 0 === n.minDate &&
              (o.settings.minDate = this._formatDate(o, e)),
            null !== i &&
              void 0 !== n.dateFormat &&
              void 0 === n.maxDate &&
              (o.settings.maxDate = this._formatDate(o, i)),
            "disabled" in n &&
              (n.disabled
                ? this._disableDatepicker(t)
                : this._enableDatepicker(t)),
            this._attachments(Y(t), o),
            this._autoSize(o),
            this._setDate(o, s),
            this._updateAlternate(o),
            this._updateDatepicker(o));
      },
      _changeDatepicker: function (t, e, i) {
        this._optionDatepicker(t, e, i);
      },
      _refreshDatepicker: function (t) {
        t = this._getInst(t);
        t && this._updateDatepicker(t);
      },
      _setDateDatepicker: function (t, e) {
        t = this._getInst(t);
        t &&
          (this._setDate(t, e),
          this._updateDatepicker(t),
          this._updateAlternate(t));
      },
      _getDateDatepicker: function (t, e) {
        t = this._getInst(t);
        return (
          t && !t.inline && this._setDateFromField(t, e),
          t ? this._getDate(t) : null
        );
      },
      _doKeyDown: function (t) {
        var e,
          i,
          n = Y.datepicker._getInst(t.target),
          s = !0,
          o = n.dpDiv.is(".ui-datepicker-rtl");
        if (((n._keyEvent = !0), Y.datepicker._datepickerShowing))
          switch (t.keyCode) {
            case 9:
              Y.datepicker._hideDatepicker(), (s = !1);
              break;
            case 13:
              return (
                (i = Y(
                  "td." +
                    Y.datepicker._dayOverClass +
                    ":not(." +
                    Y.datepicker._currentClass +
                    ")",
                  n.dpDiv
                ))[0] &&
                  Y.datepicker._selectDay(
                    t.target,
                    n.selectedMonth,
                    n.selectedYear,
                    i[0]
                  ),
                (e = Y.datepicker._get(n, "onSelect"))
                  ? ((i = Y.datepicker._formatDate(n)),
                    e.apply(n.input ? n.input[0] : null, [i, n]))
                  : Y.datepicker._hideDatepicker(),
                !1
              );
            case 27:
              Y.datepicker._hideDatepicker();
              break;
            case 33:
              Y.datepicker._adjustDate(
                t.target,
                t.ctrlKey
                  ? -Y.datepicker._get(n, "stepBigMonths")
                  : -Y.datepicker._get(n, "stepMonths"),
                "M"
              );
              break;
            case 34:
              Y.datepicker._adjustDate(
                t.target,
                t.ctrlKey
                  ? +Y.datepicker._get(n, "stepBigMonths")
                  : +Y.datepicker._get(n, "stepMonths"),
                "M"
              );
              break;
            case 35:
              (t.ctrlKey || t.metaKey) && Y.datepicker._clearDate(t.target),
                (s = t.ctrlKey || t.metaKey);
              break;
            case 36:
              (t.ctrlKey || t.metaKey) && Y.datepicker._gotoToday(t.target),
                (s = t.ctrlKey || t.metaKey);
              break;
            case 37:
              (t.ctrlKey || t.metaKey) &&
                Y.datepicker._adjustDate(t.target, o ? 1 : -1, "D"),
                (s = t.ctrlKey || t.metaKey),
                t.originalEvent.altKey &&
                  Y.datepicker._adjustDate(
                    t.target,
                    t.ctrlKey
                      ? -Y.datepicker._get(n, "stepBigMonths")
                      : -Y.datepicker._get(n, "stepMonths"),
                    "M"
                  );
              break;
            case 38:
              (t.ctrlKey || t.metaKey) &&
                Y.datepicker._adjustDate(t.target, -7, "D"),
                (s = t.ctrlKey || t.metaKey);
              break;
            case 39:
              (t.ctrlKey || t.metaKey) &&
                Y.datepicker._adjustDate(t.target, o ? -1 : 1, "D"),
                (s = t.ctrlKey || t.metaKey),
                t.originalEvent.altKey &&
                  Y.datepicker._adjustDate(
                    t.target,
                    t.ctrlKey
                      ? +Y.datepicker._get(n, "stepBigMonths")
                      : +Y.datepicker._get(n, "stepMonths"),
                    "M"
                  );
              break;
            case 40:
              (t.ctrlKey || t.metaKey) &&
                Y.datepicker._adjustDate(t.target, 7, "D"),
                (s = t.ctrlKey || t.metaKey);
              break;
            default:
              s = !1;
          }
        else
          36 === t.keyCode && t.ctrlKey
            ? Y.datepicker._showDatepicker(this)
            : (s = !1);
        s && (t.preventDefault(), t.stopPropagation());
      },
      _doKeyPress: function (t) {
        var e,
          i = Y.datepicker._getInst(t.target);
        if (Y.datepicker._get(i, "constrainInput"))
          return (
            (e = Y.datepicker._possibleChars(
              Y.datepicker._get(i, "dateFormat")
            )),
            (i = String.fromCharCode(
              null == t.charCode ? t.keyCode : t.charCode
            )),
            t.ctrlKey || t.metaKey || i < " " || !e || -1 < e.indexOf(i)
          );
      },
      _doKeyUp: function (t) {
        t = Y.datepicker._getInst(t.target);
        if (t.input.val() !== t.lastVal)
          try {
            Y.datepicker.parseDate(
              Y.datepicker._get(t, "dateFormat"),
              t.input ? t.input.val() : null,
              Y.datepicker._getFormatConfig(t)
            ) &&
              (Y.datepicker._setDateFromField(t),
              Y.datepicker._updateAlternate(t),
              Y.datepicker._updateDatepicker(t));
          } catch (t) {}
        return !0;
      },
      _showDatepicker: function (t) {
        var e, i, n, s;
        "input" !== (t = t.target || t).nodeName.toLowerCase() &&
          (t = Y("input", t.parentNode)[0]),
          Y.datepicker._isDisabledDatepicker(t) ||
            Y.datepicker._lastInput === t ||
            ((s = Y.datepicker._getInst(t)),
            Y.datepicker._curInst &&
              Y.datepicker._curInst !== s &&
              (Y.datepicker._curInst.dpDiv.stop(!0, !0),
              s &&
                Y.datepicker._datepickerShowing &&
                Y.datepicker._hideDatepicker(Y.datepicker._curInst.input[0])),
            !1 !==
              (i = (n = Y.datepicker._get(s, "beforeShow"))
                ? n.apply(t, [t, s])
                : {}) &&
              (rt(s.settings, i),
              (s.lastVal = null),
              (Y.datepicker._lastInput = t),
              Y.datepicker._setDateFromField(s),
              Y.datepicker._inDialog && (t.value = ""),
              Y.datepicker._pos ||
                ((Y.datepicker._pos = Y.datepicker._findPos(t)),
                (Y.datepicker._pos[1] += t.offsetHeight)),
              (e = !1),
              Y(t)
                .parents()
                .each(function () {
                  return !(e |= "fixed" === Y(this).css("position"));
                }),
              (n = { left: Y.datepicker._pos[0], top: Y.datepicker._pos[1] }),
              (Y.datepicker._pos = null),
              s.dpDiv.empty(),
              s.dpDiv.css({
                position: "absolute",
                display: "block",
                top: "-1000px",
              }),
              Y.datepicker._updateDatepicker(s),
              (n = Y.datepicker._checkOffset(s, n, e)),
              s.dpDiv.css({
                position:
                  Y.datepicker._inDialog && Y.blockUI
                    ? "static"
                    : e
                    ? "fixed"
                    : "absolute",
                display: "none",
                left: n.left + "px",
                top: n.top + "px",
              }),
              s.inline ||
                ((i = Y.datepicker._get(s, "showAnim")),
                (n = Y.datepicker._get(s, "duration")),
                s.dpDiv.css(
                  "z-index",
                  (function (t) {
                    for (var e, i; t.length && t[0] !== document; ) {
                      if (
                        ("absolute" === (e = t.css("position")) ||
                          "relative" === e ||
                          "fixed" === e) &&
                        ((i = parseInt(t.css("zIndex"), 10)),
                        !isNaN(i) && 0 !== i)
                      )
                        return i;
                      t = t.parent();
                    }
                    return 0;
                  })(Y(t)) + 1
                ),
                (Y.datepicker._datepickerShowing = !0),
                Y.effects && Y.effects.effect[i]
                  ? s.dpDiv.show(i, Y.datepicker._get(s, "showOptions"), n)
                  : s.dpDiv[i || "show"](i ? n : null),
                Y.datepicker._shouldFocusInput(s) && s.input.trigger("focus"),
                (Y.datepicker._curInst = s))));
      },
      _updateDatepicker: function (t) {
        (this.maxRows = 4),
          (it = t).dpDiv.empty().append(this._generateHTML(t)),
          this._attachHandlers(t);
        var e,
          i = this._getNumberOfMonths(t),
          n = i[1],
          s = t.dpDiv.find("." + this._dayOverClass + " a"),
          o = Y.datepicker._get(t, "onUpdateDatepicker");
        0 < s.length && ot.apply(s.get(0)),
          t.dpDiv
            .removeClass(
              "ui-datepicker-multi-2 ui-datepicker-multi-3 ui-datepicker-multi-4"
            )
            .width(""),
          1 < n &&
            t.dpDiv
              .addClass("ui-datepicker-multi-" + n)
              .css("width", 17 * n + "em"),
          t.dpDiv[(1 !== i[0] || 1 !== i[1] ? "add" : "remove") + "Class"](
            "ui-datepicker-multi"
          ),
          t.dpDiv[(this._get(t, "isRTL") ? "add" : "remove") + "Class"](
            "ui-datepicker-rtl"
          ),
          t === Y.datepicker._curInst &&
            Y.datepicker._datepickerShowing &&
            Y.datepicker._shouldFocusInput(t) &&
            t.input.trigger("focus"),
          t.yearshtml &&
            ((e = t.yearshtml),
            setTimeout(function () {
              e === t.yearshtml &&
                t.yearshtml &&
                t.dpDiv
                  .find("select.ui-datepicker-year")
                  .first()
                  .replaceWith(t.yearshtml),
                (e = t.yearshtml = null);
            }, 0)),
          o && o.apply(t.input ? t.input[0] : null, [t]);
      },
      _shouldFocusInput: function (t) {
        return (
          t.input &&
          t.input.is(":visible") &&
          !t.input.is(":disabled") &&
          !t.input.is(":focus")
        );
      },
      _checkOffset: function (t, e, i) {
        var n = t.dpDiv.outerWidth(),
          s = t.dpDiv.outerHeight(),
          o = t.input ? t.input.outerWidth() : 0,
          r = t.input ? t.input.outerHeight() : 0,
          a =
            document.documentElement.clientWidth +
            (i ? 0 : Y(document).scrollLeft()),
          l =
            document.documentElement.clientHeight +
            (i ? 0 : Y(document).scrollTop());
        return (
          (e.left -= this._get(t, "isRTL") ? n - o : 0),
          (e.left -=
            i && e.left === t.input.offset().left
              ? Y(document).scrollLeft()
              : 0),
          (e.top -=
            i && e.top === t.input.offset().top + r
              ? Y(document).scrollTop()
              : 0),
          (e.left -= Math.min(
            e.left,
            e.left + n > a && n < a ? Math.abs(e.left + n - a) : 0
          )),
          (e.top -= Math.min(
            e.top,
            e.top + s > l && s < l ? Math.abs(s + r) : 0
          )),
          e
        );
      },
      _findPos: function (t) {
        for (
          var e = this._getInst(t), i = this._get(e, "isRTL");
          t &&
          ("hidden" === t.type || 1 !== t.nodeType || Y.expr.pseudos.hidden(t));

        )
          t = t[i ? "previousSibling" : "nextSibling"];
        return [(e = Y(t).offset()).left, e.top];
      },
      _hideDatepicker: function (t) {
        var e,
          i,
          n = this._curInst;
        !n ||
          (t && n !== Y.data(t, "datepicker")) ||
          (this._datepickerShowing &&
            ((e = this._get(n, "showAnim")),
            (i = this._get(n, "duration")),
            (t = function () {
              Y.datepicker._tidyDialog(n);
            }),
            Y.effects && (Y.effects.effect[e] || Y.effects[e])
              ? n.dpDiv.hide(e, Y.datepicker._get(n, "showOptions"), i, t)
              : n.dpDiv[
                  "slideDown" === e
                    ? "slideUp"
                    : "fadeIn" === e
                    ? "fadeOut"
                    : "hide"
                ](e ? i : null, t),
            e || t(),
            (this._datepickerShowing = !1),
            (t = this._get(n, "onClose")) &&
              t.apply(n.input ? n.input[0] : null, [
                n.input ? n.input.val() : "",
                n,
              ]),
            (this._lastInput = null),
            this._inDialog &&
              (this._dialogInput.css({
                position: "absolute",
                left: "0",
                top: "-100px",
              }),
              Y.blockUI && (Y.unblockUI(), Y("body").append(this.dpDiv))),
            (this._inDialog = !1)));
      },
      _tidyDialog: function (t) {
        t.dpDiv.removeClass(this._dialogClass).off(".ui-datepicker-calendar");
      },
      _checkExternalClick: function (t) {
        var e;
        Y.datepicker._curInst &&
          ((e = Y(t.target)),
          (t = Y.datepicker._getInst(e[0])),
          ((e[0].id === Y.datepicker._mainDivId ||
            0 !== e.parents("#" + Y.datepicker._mainDivId).length ||
            e.hasClass(Y.datepicker.markerClassName) ||
            e.closest("." + Y.datepicker._triggerClass).length ||
            !Y.datepicker._datepickerShowing ||
            (Y.datepicker._inDialog && Y.blockUI)) &&
            (!e.hasClass(Y.datepicker.markerClassName) ||
              Y.datepicker._curInst === t)) ||
            Y.datepicker._hideDatepicker());
      },
      _adjustDate: function (t, e, i) {
        var n = Y(t),
          t = this._getInst(n[0]);
        this._isDisabledDatepicker(n[0]) ||
          (this._adjustInstDate(t, e, i), this._updateDatepicker(t));
      },
      _gotoToday: function (t) {
        var e = Y(t),
          i = this._getInst(e[0]);
        this._get(i, "gotoCurrent") && i.currentDay
          ? ((i.selectedDay = i.currentDay),
            (i.drawMonth = i.selectedMonth = i.currentMonth),
            (i.drawYear = i.selectedYear = i.currentYear))
          : ((t = new Date()),
            (i.selectedDay = t.getDate()),
            (i.drawMonth = i.selectedMonth = t.getMonth()),
            (i.drawYear = i.selectedYear = t.getFullYear())),
          this._notifyChange(i),
          this._adjustDate(e);
      },
      _selectMonthYear: function (t, e, i) {
        var n = Y(t),
          t = this._getInst(n[0]);
        (t["selected" + ("M" === i ? "Month" : "Year")] = t[
          "draw" + ("M" === i ? "Month" : "Year")
        ] =
          parseInt(e.options[e.selectedIndex].value, 10)),
          this._notifyChange(t),
          this._adjustDate(n);
      },
      _selectDay: function (t, e, i, n) {
        var s = Y(t);
        Y(n).hasClass(this._unselectableClass) ||
          this._isDisabledDatepicker(s[0]) ||
          (((s = this._getInst(s[0])).selectedDay = s.currentDay =
            parseInt(Y("a", n).attr("data-date"))),
          (s.selectedMonth = s.currentMonth = e),
          (s.selectedYear = s.currentYear = i),
          this._selectDate(
            t,
            this._formatDate(s, s.currentDay, s.currentMonth, s.currentYear)
          ));
      },
      _clearDate: function (t) {
        t = Y(t);
        this._selectDate(t, "");
      },
      _selectDate: function (t, e) {
        var i = Y(t),
          t = this._getInst(i[0]);
        (e = null != e ? e : this._formatDate(t)),
          t.input && t.input.val(e),
          this._updateAlternate(t),
          (i = this._get(t, "onSelect"))
            ? i.apply(t.input ? t.input[0] : null, [e, t])
            : t.input && t.input.trigger("change"),
          t.inline
            ? this._updateDatepicker(t)
            : (this._hideDatepicker(),
              (this._lastInput = t.input[0]),
              "object" != typeof t.input[0] && t.input.trigger("focus"),
              (this._lastInput = null));
      },
      _updateAlternate: function (t) {
        var e,
          i,
          n = this._get(t, "altField");
        n &&
          ((e = this._get(t, "altFormat") || this._get(t, "dateFormat")),
          (i = this._getDate(t)),
          (t = this.formatDate(e, i, this._getFormatConfig(t))),
          Y(document).find(n).val(t));
      },
      noWeekends: function (t) {
        t = t.getDay();
        return [0 < t && t < 6, ""];
      },
      iso8601Week: function (t) {
        var e = new Date(t.getTime());
        return (
          e.setDate(e.getDate() + 4 - (e.getDay() || 7)),
          (t = e.getTime()),
          e.setMonth(0),
          e.setDate(1),
          Math.floor(Math.round((t - e) / 864e5) / 7) + 1
        );
      },
      parseDate: function (e, s, t) {
        if (null == e || null == s) throw "Invalid arguments";
        if ("" === (s = "object" == typeof s ? s.toString() : s + ""))
          return null;
        for (
          var i,
            n,
            o,
            r = 0,
            a =
              (t ? t.shortYearCutoff : null) || this._defaults.shortYearCutoff,
            a =
              "string" != typeof a
                ? a
                : (new Date().getFullYear() % 100) + parseInt(a, 10),
            l = (t ? t.dayNamesShort : null) || this._defaults.dayNamesShort,
            c = (t ? t.dayNames : null) || this._defaults.dayNames,
            h =
              (t ? t.monthNamesShort : null) || this._defaults.monthNamesShort,
            u = (t ? t.monthNames : null) || this._defaults.monthNames,
            d = -1,
            p = -1,
            f = -1,
            g = -1,
            m = !1,
            v = function (t) {
              t = _ + 1 < e.length && e.charAt(_ + 1) === t;
              return t && _++, t;
            },
            b = function (t) {
              var e = v(t),
                e =
                  "@" === t
                    ? 14
                    : "!" === t
                    ? 20
                    : "y" === t && e
                    ? 4
                    : "o" === t
                    ? 3
                    : 2,
                e = new RegExp("^\\d{" + ("y" === t ? e : 1) + "," + e + "}"),
                e = s.substring(r).match(e);
              if (!e) throw "Missing number at position " + r;
              return (r += e[0].length), parseInt(e[0], 10);
            },
            y = function (t, e, i) {
              var n = -1,
                e = Y.map(v(t) ? i : e, function (t, e) {
                  return [[e, t]];
                }).sort(function (t, e) {
                  return -(t[1].length - e[1].length);
                });
              if (
                (Y.each(e, function (t, e) {
                  var i = e[1];
                  if (s.substr(r, i.length).toLowerCase() === i.toLowerCase())
                    return (n = e[0]), (r += i.length), !1;
                }),
                -1 !== n)
              )
                return n + 1;
              throw "Unknown name at position " + r;
            },
            w = function () {
              if (s.charAt(r) !== e.charAt(_))
                throw "Unexpected literal at position " + r;
              r++;
            },
            _ = 0;
          _ < e.length;
          _++
        )
          if (m) "'" !== e.charAt(_) || v("'") ? w() : (m = !1);
          else
            switch (e.charAt(_)) {
              case "d":
                f = b("d");
                break;
              case "D":
                y("D", l, c);
                break;
              case "o":
                g = b("o");
                break;
              case "m":
                p = b("m");
                break;
              case "M":
                p = y("M", h, u);
                break;
              case "y":
                d = b("y");
                break;
              case "@":
                (d = (o = new Date(b("@"))).getFullYear()),
                  (p = o.getMonth() + 1),
                  (f = o.getDate());
                break;
              case "!":
                (d = (o = new Date(
                  (b("!") - this._ticksTo1970) / 1e4
                )).getFullYear()),
                  (p = o.getMonth() + 1),
                  (f = o.getDate());
                break;
              case "'":
                v("'") ? w() : (m = !0);
                break;
              default:
                w();
            }
        if (r < s.length && ((n = s.substr(r)), !/^\s+/.test(n)))
          throw "Extra/unparsed characters found in date: " + n;
        if (
          (-1 === d
            ? (d = new Date().getFullYear())
            : d < 100 &&
              (d +=
                new Date().getFullYear() -
                (new Date().getFullYear() % 100) +
                (d <= a ? 0 : -100)),
          -1 < g)
        )
          for (p = 1, f = g; ; ) {
            if (f <= (i = this._getDaysInMonth(d, p - 1))) break;
            p++, (f -= i);
          }
        if (
          (o = this._daylightSavingAdjust(
            new Date(d, p - 1, f)
          )).getFullYear() !== d ||
          o.getMonth() + 1 !== p ||
          o.getDate() !== f
        )
          throw "Invalid date";
        return o;
      },
      ATOM: "yy-mm-dd",
      COOKIE: "D, dd M yy",
      ISO_8601: "yy-mm-dd",
      RFC_822: "D, d M y",
      RFC_850: "DD, dd-M-y",
      RFC_1036: "D, d M y",
      RFC_1123: "D, d M yy",
      RFC_2822: "D, d M yy",
      RSS: "D, d M y",
      TICKS: "!",
      TIMESTAMP: "@",
      W3C: "yy-mm-dd",
      _ticksTo1970:
        24 *
        (718685 + Math.floor(492.5) - Math.floor(19.7) + Math.floor(4.925)) *
        60 *
        60 *
        1e7,
      formatDate: function (e, t, i) {
        if (!t) return "";
        function n(t, e, i) {
          var n = "" + e;
          if (h(t)) for (; n.length < i; ) n = "0" + n;
          return n;
        }
        function s(t, e, i, n) {
          return (h(t) ? n : i)[e];
        }
        var o,
          r = (i ? i.dayNamesShort : null) || this._defaults.dayNamesShort,
          a = (i ? i.dayNames : null) || this._defaults.dayNames,
          l = (i ? i.monthNamesShort : null) || this._defaults.monthNamesShort,
          c = (i ? i.monthNames : null) || this._defaults.monthNames,
          h = function (t) {
            t = o + 1 < e.length && e.charAt(o + 1) === t;
            return t && o++, t;
          },
          u = "",
          d = !1;
        if (t)
          for (o = 0; o < e.length; o++)
            if (d)
              "'" !== e.charAt(o) || h("'") ? (u += e.charAt(o)) : (d = !1);
            else
              switch (e.charAt(o)) {
                case "d":
                  u += n("d", t.getDate(), 2);
                  break;
                case "D":
                  u += s("D", t.getDay(), r, a);
                  break;
                case "o":
                  u += n(
                    "o",
                    Math.round(
                      (new Date(
                        t.getFullYear(),
                        t.getMonth(),
                        t.getDate()
                      ).getTime() -
                        new Date(t.getFullYear(), 0, 0).getTime()) /
                        864e5
                    ),
                    3
                  );
                  break;
                case "m":
                  u += n("m", t.getMonth() + 1, 2);
                  break;
                case "M":
                  u += s("M", t.getMonth(), l, c);
                  break;
                case "y":
                  u += h("y")
                    ? t.getFullYear()
                    : (t.getFullYear() % 100 < 10 ? "0" : "") +
                      (t.getFullYear() % 100);
                  break;
                case "@":
                  u += t.getTime();
                  break;
                case "!":
                  u += 1e4 * t.getTime() + this._ticksTo1970;
                  break;
                case "'":
                  h("'") ? (u += "'") : (d = !0);
                  break;
                default:
                  u += e.charAt(o);
              }
        return u;
      },
      _possibleChars: function (e) {
        for (
          var t = "",
            i = !1,
            n = function (t) {
              t = s + 1 < e.length && e.charAt(s + 1) === t;
              return t && s++, t;
            },
            s = 0;
          s < e.length;
          s++
        )
          if (i) "'" !== e.charAt(s) || n("'") ? (t += e.charAt(s)) : (i = !1);
          else
            switch (e.charAt(s)) {
              case "d":
              case "m":
              case "y":
              case "@":
                t += "0123456789";
                break;
              case "D":
              case "M":
                return null;
              case "'":
                n("'") ? (t += "'") : (i = !0);
                break;
              default:
                t += e.charAt(s);
            }
        return t;
      },
      _get: function (t, e) {
        return (void 0 !== t.settings[e] ? t.settings : this._defaults)[e];
      },
      _setDateFromField: function (t, e) {
        if (t.input.val() !== t.lastVal) {
          var i = this._get(t, "dateFormat"),
            n = (t.lastVal = t.input ? t.input.val() : null),
            s = this._getDefaultDate(t),
            o = s,
            r = this._getFormatConfig(t);
          try {
            o = this.parseDate(i, n, r) || s;
          } catch (t) {
            n = e ? "" : n;
          }
          (t.selectedDay = o.getDate()),
            (t.drawMonth = t.selectedMonth = o.getMonth()),
            (t.drawYear = t.selectedYear = o.getFullYear()),
            (t.currentDay = n ? o.getDate() : 0),
            (t.currentMonth = n ? o.getMonth() : 0),
            (t.currentYear = n ? o.getFullYear() : 0),
            this._adjustInstDate(t);
        }
      },
      _getDefaultDate: function (t) {
        return this._restrictMinMax(
          t,
          this._determineDate(t, this._get(t, "defaultDate"), new Date())
        );
      },
      _determineDate: function (a, t, e) {
        var i,
          n,
          t =
            null == t || "" === t
              ? e
              : "string" == typeof t
              ? (function (t) {
                  try {
                    return Y.datepicker.parseDate(
                      Y.datepicker._get(a, "dateFormat"),
                      t,
                      Y.datepicker._getFormatConfig(a)
                    );
                  } catch (t) {}
                  for (
                    var e =
                        (t.toLowerCase().match(/^c/)
                          ? Y.datepicker._getDate(a)
                          : null) || new Date(),
                      i = e.getFullYear(),
                      n = e.getMonth(),
                      s = e.getDate(),
                      o = /([+\-]?[0-9]+)\s*(d|D|w|W|m|M|y|Y)?/g,
                      r = o.exec(t);
                    r;

                  ) {
                    switch (r[2] || "d") {
                      case "d":
                      case "D":
                        s += parseInt(r[1], 10);
                        break;
                      case "w":
                      case "W":
                        s += 7 * parseInt(r[1], 10);
                        break;
                      case "m":
                      case "M":
                        (n += parseInt(r[1], 10)),
                          (s = Math.min(s, Y.datepicker._getDaysInMonth(i, n)));
                        break;
                      case "y":
                      case "Y":
                        (i += parseInt(r[1], 10)),
                          (s = Math.min(s, Y.datepicker._getDaysInMonth(i, n)));
                    }
                    r = o.exec(t);
                  }
                  return new Date(i, n, s);
                })(t)
              : "number" == typeof t
              ? isNaN(t)
                ? e
                : ((i = t), (n = new Date()).setDate(n.getDate() + i), n)
              : new Date(t.getTime());
        return (
          (t = t && "Invalid Date" === t.toString() ? e : t) &&
            (t.setHours(0),
            t.setMinutes(0),
            t.setSeconds(0),
            t.setMilliseconds(0)),
          this._daylightSavingAdjust(t)
        );
      },
      _daylightSavingAdjust: function (t) {
        return t
          ? (t.setHours(12 < t.getHours() ? t.getHours() + 2 : 0), t)
          : null;
      },
      _setDate: function (t, e, i) {
        var n = !e,
          s = t.selectedMonth,
          o = t.selectedYear,
          e = this._restrictMinMax(t, this._determineDate(t, e, new Date()));
        (t.selectedDay = t.currentDay = e.getDate()),
          (t.drawMonth = t.selectedMonth = t.currentMonth = e.getMonth()),
          (t.drawYear = t.selectedYear = t.currentYear = e.getFullYear()),
          (s === t.selectedMonth && o === t.selectedYear) ||
            i ||
            this._notifyChange(t),
          this._adjustInstDate(t),
          t.input && t.input.val(n ? "" : this._formatDate(t));
      },
      _getDate: function (t) {
        return !t.currentYear || (t.input && "" === t.input.val())
          ? null
          : this._daylightSavingAdjust(
              new Date(t.currentYear, t.currentMonth, t.currentDay)
            );
      },
      _attachHandlers: function (t) {
        var e = this._get(t, "stepMonths"),
          i = "#" + t.id.replace(/\\\\/g, "\\");
        t.dpDiv.find("[data-handler]").map(function () {
          var t = {
            prev: function () {
              Y.datepicker._adjustDate(i, -e, "M");
            },
            next: function () {
              Y.datepicker._adjustDate(i, +e, "M");
            },
            hide: function () {
              Y.datepicker._hideDatepicker();
            },
            today: function () {
              Y.datepicker._gotoToday(i);
            },
            selectDay: function () {
              return (
                Y.datepicker._selectDay(
                  i,
                  +this.getAttribute("data-month"),
                  +this.getAttribute("data-year"),
                  this
                ),
                !1
              );
            },
            selectMonth: function () {
              return Y.datepicker._selectMonthYear(i, this, "M"), !1;
            },
            selectYear: function () {
              return Y.datepicker._selectMonthYear(i, this, "Y"), !1;
            },
          };
          Y(this).on(
            this.getAttribute("data-event"),
            t[this.getAttribute("data-handler")]
          );
        });
      },
      _generateHTML: function (t) {
        var e,
          i,
          n,
          s,
          o,
          r,
          a,
          l,
          c,
          h,
          u,
          d,
          p,
          f,
          g,
          m,
          v,
          b,
          y,
          w,
          _,
          x,
          C,
          S,
          P,
          k,
          T,
          D,
          H,
          I,
          E,
          A,
          M = new Date(),
          O = this._daylightSavingAdjust(
            new Date(M.getFullYear(), M.getMonth(), M.getDate())
          ),
          L = this._get(t, "isRTL"),
          $ = this._get(t, "showButtonPanel"),
          N = this._get(t, "hideIfNoPrevNext"),
          z = this._get(t, "navigationAsDateFormat"),
          B = this._getNumberOfMonths(t),
          F = this._get(t, "showCurrentAtPos"),
          M = this._get(t, "stepMonths"),
          R = 1 !== B[0] || 1 !== B[1],
          j = this._daylightSavingAdjust(
            t.currentDay
              ? new Date(t.currentYear, t.currentMonth, t.currentDay)
              : new Date(9999, 9, 9)
          ),
          W = this._getMinMaxDate(t, "min"),
          q = this._getMinMaxDate(t, "max"),
          U = t.drawMonth - F,
          V = t.drawYear;
        if ((U < 0 && ((U += 12), V--), q))
          for (
            e = this._daylightSavingAdjust(
              new Date(
                q.getFullYear(),
                q.getMonth() - B[0] * B[1] + 1,
                q.getDate()
              )
            ),
              e = W && e < W ? W : e;
            this._daylightSavingAdjust(new Date(V, U, 1)) > e;

          )
            --U < 0 && ((U = 11), V--);
        for (
          t.drawMonth = U,
            t.drawYear = V,
            F = this._get(t, "prevText"),
            F = z
              ? this.formatDate(
                  F,
                  this._daylightSavingAdjust(new Date(V, U - M, 1)),
                  this._getFormatConfig(t)
                )
              : F,
            i = this._canAdjustMonth(t, -1, V, U)
              ? Y("<a>")
                  .attr({
                    class: "ui-datepicker-prev ui-corner-all",
                    "data-handler": "prev",
                    "data-event": "click",
                    title: F,
                  })
                  .append(
                    Y("<span>")
                      .addClass(
                        "ui-icon ui-icon-circle-triangle-" + (L ? "e" : "w")
                      )
                      .text(F)
                  )[0].outerHTML
              : N
              ? ""
              : Y("<a>")
                  .attr({
                    class: "ui-datepicker-prev ui-corner-all ui-state-disabled",
                    title: F,
                  })
                  .append(
                    Y("<span>")
                      .addClass(
                        "ui-icon ui-icon-circle-triangle-" + (L ? "e" : "w")
                      )
                      .text(F)
                  )[0].outerHTML,
            F = this._get(t, "nextText"),
            F = z
              ? this.formatDate(
                  F,
                  this._daylightSavingAdjust(new Date(V, U + M, 1)),
                  this._getFormatConfig(t)
                )
              : F,
            n = this._canAdjustMonth(t, 1, V, U)
              ? Y("<a>")
                  .attr({
                    class: "ui-datepicker-next ui-corner-all",
                    "data-handler": "next",
                    "data-event": "click",
                    title: F,
                  })
                  .append(
                    Y("<span>")
                      .addClass(
                        "ui-icon ui-icon-circle-triangle-" + (L ? "w" : "e")
                      )
                      .text(F)
                  )[0].outerHTML
              : N
              ? ""
              : Y("<a>")
                  .attr({
                    class: "ui-datepicker-next ui-corner-all ui-state-disabled",
                    title: F,
                  })
                  .append(
                    Y("<span>")
                      .attr(
                        "class",
                        "ui-icon ui-icon-circle-triangle-" + (L ? "w" : "e")
                      )
                      .text(F)
                  )[0].outerHTML,
            M = this._get(t, "currentText"),
            N = this._get(t, "gotoCurrent") && t.currentDay ? j : O,
            M = z ? this.formatDate(M, N, this._getFormatConfig(t)) : M,
            F = "",
            t.inline ||
              (F = Y("<button>")
                .attr({
                  type: "button",
                  class:
                    "ui-datepicker-close ui-state-default ui-priority-primary ui-corner-all",
                  "data-handler": "hide",
                  "data-event": "click",
                })
                .text(this._get(t, "closeText"))[0].outerHTML),
            z = "",
            $ &&
              (z = Y("<div class='ui-datepicker-buttonpane ui-widget-content'>")
                .append(L ? F : "")
                .append(
                  this._isInRange(t, N)
                    ? Y("<button>")
                        .attr({
                          type: "button",
                          class:
                            "ui-datepicker-current ui-state-default ui-priority-secondary ui-corner-all",
                          "data-handler": "today",
                          "data-event": "click",
                        })
                        .text(M)
                    : ""
                )
                .append(L ? "" : F)[0].outerHTML),
            s = parseInt(this._get(t, "firstDay"), 10),
            s = isNaN(s) ? 0 : s,
            o = this._get(t, "showWeek"),
            r = this._get(t, "dayNames"),
            a = this._get(t, "dayNamesMin"),
            l = this._get(t, "monthNames"),
            c = this._get(t, "monthNamesShort"),
            h = this._get(t, "beforeShowDay"),
            u = this._get(t, "showOtherMonths"),
            d = this._get(t, "selectOtherMonths"),
            p = this._getDefaultDate(t),
            f = "",
            m = 0;
          m < B[0];
          m++
        ) {
          for (v = "", this.maxRows = 4, b = 0; b < B[1]; b++) {
            if (
              ((y = this._daylightSavingAdjust(new Date(V, U, t.selectedDay))),
              (w = " ui-corner-all"),
              (_ = ""),
              R)
            ) {
              if (((_ += "<div class='ui-datepicker-group"), 1 < B[1]))
                switch (b) {
                  case 0:
                    (_ += " ui-datepicker-group-first"),
                      (w = " ui-corner-" + (L ? "right" : "left"));
                    break;
                  case B[1] - 1:
                    (_ += " ui-datepicker-group-last"),
                      (w = " ui-corner-" + (L ? "left" : "right"));
                    break;
                  default:
                    (_ += " ui-datepicker-group-middle"), (w = "");
                }
              _ += "'>";
            }
            for (
              _ +=
                "<div class='ui-datepicker-header ui-widget-header ui-helper-clearfix" +
                w +
                "'>" +
                (/all|left/.test(w) && 0 === m ? (L ? n : i) : "") +
                (/all|right/.test(w) && 0 === m ? (L ? i : n) : "") +
                this._generateMonthYearHeader(
                  t,
                  U,
                  V,
                  W,
                  q,
                  0 < m || 0 < b,
                  l,
                  c
                ) +
                "</div><table class='ui-datepicker-calendar'><thead><tr>",
                x = o
                  ? "<th class='ui-datepicker-week-col'>" +
                    this._get(t, "weekHeader") +
                    "</th>"
                  : "",
                g = 0;
              g < 7;
              g++
            )
              x +=
                "<th scope='col'" +
                (5 <= (g + s + 6) % 7
                  ? " class='ui-datepicker-week-end'"
                  : "") +
                "><span title='" +
                r[(C = (g + s) % 7)] +
                "'>" +
                a[C] +
                "</span></th>";
            for (
              _ += x + "</tr></thead><tbody>",
                P = this._getDaysInMonth(V, U),
                V === t.selectedYear &&
                  U === t.selectedMonth &&
                  (t.selectedDay = Math.min(t.selectedDay, P)),
                S = (this._getFirstDayOfMonth(V, U) - s + 7) % 7,
                P = Math.ceil((S + P) / 7),
                k = R && this.maxRows > P ? this.maxRows : P,
                this.maxRows = k,
                T = this._daylightSavingAdjust(new Date(V, U, 1 - S)),
                D = 0;
              D < k;
              D++
            ) {
              for (
                _ += "<tr>",
                  H = o
                    ? "<td class='ui-datepicker-week-col'>" +
                      this._get(t, "calculateWeek")(T) +
                      "</td>"
                    : "",
                  g = 0;
                g < 7;
                g++
              )
                (I = h ? h.apply(t.input ? t.input[0] : null, [T]) : [!0, ""]),
                  (A =
                    ((E = T.getMonth() !== U) && !d) ||
                    !I[0] ||
                    (W && T < W) ||
                    (q && q < T)),
                  (H +=
                    "<td class='" +
                    (5 <= (g + s + 6) % 7 ? " ui-datepicker-week-end" : "") +
                    (E ? " ui-datepicker-other-month" : "") +
                    ((T.getTime() === y.getTime() &&
                      U === t.selectedMonth &&
                      t._keyEvent) ||
                    (p.getTime() === T.getTime() && p.getTime() === y.getTime())
                      ? " " + this._dayOverClass
                      : "") +
                    (A
                      ? " " + this._unselectableClass + " ui-state-disabled"
                      : "") +
                    (E && !u
                      ? ""
                      : " " +
                        I[1] +
                        (T.getTime() === j.getTime()
                          ? " " + this._currentClass
                          : "") +
                        (T.getTime() === O.getTime()
                          ? " ui-datepicker-today"
                          : "")) +
                    "'" +
                    ((E && !u) || !I[2]
                      ? ""
                      : " title='" + I[2].replace(/'/g, "&#39;") + "'") +
                    (A
                      ? ""
                      : " data-handler='selectDay' data-event='click' data-month='" +
                        T.getMonth() +
                        "' data-year='" +
                        T.getFullYear() +
                        "'") +
                    ">" +
                    (E && !u
                      ? "&#xa0;"
                      : A
                      ? "<span class='ui-state-default'>" +
                        T.getDate() +
                        "</span>"
                      : "<a class='ui-state-default" +
                        (T.getTime() === O.getTime()
                          ? " ui-state-highlight"
                          : "") +
                        (T.getTime() === j.getTime()
                          ? " ui-state-active"
                          : "") +
                        (E ? " ui-priority-secondary" : "") +
                        "' href='#' aria-current='" +
                        (T.getTime() === j.getTime() ? "true" : "false") +
                        "' data-date='" +
                        T.getDate() +
                        "'>" +
                        T.getDate() +
                        "</a>") +
                    "</td>"),
                  T.setDate(T.getDate() + 1),
                  (T = this._daylightSavingAdjust(T));
              _ += H + "</tr>";
            }
            11 < ++U && ((U = 0), V++),
              (v += _ +=
                "</tbody></table>" +
                (R
                  ? "</div>" +
                    (0 < B[0] && b === B[1] - 1
                      ? "<div class='ui-datepicker-row-break'></div>"
                      : "")
                  : ""));
          }
          f += v;
        }
        return (f += z), (t._keyEvent = !1), f;
      },
      _generateMonthYearHeader: function (t, e, i, n, s, o, r, a) {
        var l,
          c,
          h,
          u,
          d,
          p,
          f = this._get(t, "changeMonth"),
          g = this._get(t, "changeYear"),
          m = this._get(t, "showMonthAfterYear"),
          v = this._get(t, "selectMonthLabel"),
          b = this._get(t, "selectYearLabel"),
          y = "<div class='ui-datepicker-title'>",
          w = "";
        if (o || !f)
          w += "<span class='ui-datepicker-month'>" + r[e] + "</span>";
        else {
          for (
            l = n && n.getFullYear() === i,
              c = s && s.getFullYear() === i,
              w +=
                "<select class='ui-datepicker-month' aria-label='" +
                v +
                "' data-handler='selectMonth' data-event='change'>",
              h = 0;
            h < 12;
            h++
          )
            (!l || h >= n.getMonth()) &&
              (!c || h <= s.getMonth()) &&
              (w +=
                "<option value='" +
                h +
                "'" +
                (h === e ? " selected='selected'" : "") +
                ">" +
                a[h] +
                "</option>");
          w += "</select>";
        }
        if ((m || (y += w + (!o && f && g ? "" : "&#xa0;")), !t.yearshtml))
          if (((t.yearshtml = ""), o || !g))
            y += "<span class='ui-datepicker-year'>" + i + "</span>";
          else {
            for (
              r = this._get(t, "yearRange").split(":"),
                u = new Date().getFullYear(),
                d = (v = function (t) {
                  t = t.match(/c[+\-].*/)
                    ? i + parseInt(t.substring(1), 10)
                    : t.match(/[+\-].*/)
                    ? u + parseInt(t, 10)
                    : parseInt(t, 10);
                  return isNaN(t) ? u : t;
                })(r[0]),
                p = Math.max(d, v(r[1] || "")),
                d = n ? Math.max(d, n.getFullYear()) : d,
                p = s ? Math.min(p, s.getFullYear()) : p,
                t.yearshtml +=
                  "<select class='ui-datepicker-year' aria-label='" +
                  b +
                  "' data-handler='selectYear' data-event='change'>";
              d <= p;
              d++
            )
              t.yearshtml +=
                "<option value='" +
                d +
                "'" +
                (d === i ? " selected='selected'" : "") +
                ">" +
                d +
                "</option>";
            (t.yearshtml += "</select>"),
              (y += t.yearshtml),
              (t.yearshtml = null);
          }
        return (
          (y += this._get(t, "yearSuffix")),
          m && (y += (!o && f && g ? "" : "&#xa0;") + w),
          (y += "</div>")
        );
      },
      _adjustInstDate: function (t, e, i) {
        var n = t.selectedYear + ("Y" === i ? e : 0),
          s = t.selectedMonth + ("M" === i ? e : 0),
          e =
            Math.min(t.selectedDay, this._getDaysInMonth(n, s)) +
            ("D" === i ? e : 0),
          e = this._restrictMinMax(
            t,
            this._daylightSavingAdjust(new Date(n, s, e))
          );
        (t.selectedDay = e.getDate()),
          (t.drawMonth = t.selectedMonth = e.getMonth()),
          (t.drawYear = t.selectedYear = e.getFullYear()),
          ("M" !== i && "Y" !== i) || this._notifyChange(t);
      },
      _restrictMinMax: function (t, e) {
        var i = this._getMinMaxDate(t, "min"),
          t = this._getMinMaxDate(t, "max"),
          e = i && e < i ? i : e;
        return t && t < e ? t : e;
      },
      _notifyChange: function (t) {
        var e = this._get(t, "onChangeMonthYear");
        e &&
          e.apply(t.input ? t.input[0] : null, [
            t.selectedYear,
            t.selectedMonth + 1,
            t,
          ]);
      },
      _getNumberOfMonths: function (t) {
        t = this._get(t, "numberOfMonths");
        return null == t ? [1, 1] : "number" == typeof t ? [1, t] : t;
      },
      _getMinMaxDate: function (t, e) {
        return this._determineDate(t, this._get(t, e + "Date"), null);
      },
      _getDaysInMonth: function (t, e) {
        return 32 - this._daylightSavingAdjust(new Date(t, e, 32)).getDate();
      },
      _getFirstDayOfMonth: function (t, e) {
        return new Date(t, e, 1).getDay();
      },
      _canAdjustMonth: function (t, e, i, n) {
        var s = this._getNumberOfMonths(t),
          s = this._daylightSavingAdjust(
            new Date(i, n + (e < 0 ? e : s[0] * s[1]), 1)
          );
        return (
          e < 0 &&
            s.setDate(this._getDaysInMonth(s.getFullYear(), s.getMonth())),
          this._isInRange(t, s)
        );
      },
      _isInRange: function (t, e) {
        var i = this._getMinMaxDate(t, "min"),
          n = this._getMinMaxDate(t, "max"),
          s = null,
          o = null,
          r = this._get(t, "yearRange");
        return (
          r &&
            ((t = r.split(":")),
            (r = new Date().getFullYear()),
            (s = parseInt(t[0], 10)),
            (o = parseInt(t[1], 10)),
            t[0].match(/[+\-].*/) && (s += r),
            t[1].match(/[+\-].*/) && (o += r)),
          (!i || e.getTime() >= i.getTime()) &&
            (!n || e.getTime() <= n.getTime()) &&
            (!s || e.getFullYear() >= s) &&
            (!o || e.getFullYear() <= o)
        );
      },
      _getFormatConfig: function (t) {
        var e = this._get(t, "shortYearCutoff");
        return {
          shortYearCutoff: (e =
            "string" != typeof e
              ? e
              : (new Date().getFullYear() % 100) + parseInt(e, 10)),
          dayNamesShort: this._get(t, "dayNamesShort"),
          dayNames: this._get(t, "dayNames"),
          monthNamesShort: this._get(t, "monthNamesShort"),
          monthNames: this._get(t, "monthNames"),
        };
      },
      _formatDate: function (t, e, i, n) {
        e ||
          ((t.currentDay = t.selectedDay),
          (t.currentMonth = t.selectedMonth),
          (t.currentYear = t.selectedYear));
        e = e
          ? "object" == typeof e
            ? e
            : this._daylightSavingAdjust(new Date(n, i, e))
          : this._daylightSavingAdjust(
              new Date(t.currentYear, t.currentMonth, t.currentDay)
            );
        return this.formatDate(
          this._get(t, "dateFormat"),
          e,
          this._getFormatConfig(t)
        );
      },
    }),
    (Y.fn.datepicker = function (t) {
      if (!this.length) return this;
      Y.datepicker.initialized ||
        (Y(document).on("mousedown", Y.datepicker._checkExternalClick),
        (Y.datepicker.initialized = !0)),
        0 === Y("#" + Y.datepicker._mainDivId).length &&
          Y("body").append(Y.datepicker.dpDiv);
      var e = Array.prototype.slice.call(arguments, 1);
      return ("string" == typeof t &&
        ("isDisabled" === t || "getDate" === t || "widget" === t)) ||
        ("option" === t &&
          2 === arguments.length &&
          "string" == typeof arguments[1])
        ? Y.datepicker["_" + t + "Datepicker"].apply(
            Y.datepicker,
            [this[0]].concat(e)
          )
        : this.each(function () {
            "string" == typeof t
              ? Y.datepicker["_" + t + "Datepicker"].apply(
                  Y.datepicker,
                  [this].concat(e)
                )
              : Y.datepicker._attachDatepicker(this, t);
          });
    }),
    (Y.datepicker = new nt()),
    (Y.datepicker.initialized = !1),
    (Y.datepicker.uuid = new Date().getTime()),
    (Y.datepicker.version = "1.13.0");
  Y.datepicker,
    (Y.ui.ie = !!/msie [\w.]+/.exec(navigator.userAgent.toLowerCase()));
  var at = !1;
  Y(document).on("mouseup", function () {
    at = !1;
  });
  Y.widget("ui.mouse", {
    version: "1.13.0",
    options: {
      cancel: "input, textarea, button, select, option",
      distance: 1,
      delay: 0,
    },
    _mouseInit: function () {
      var e = this;
      this.element
        .on("mousedown." + this.widgetName, function (t) {
          return e._mouseDown(t);
        })
        .on("click." + this.widgetName, function (t) {
          if (!0 === Y.data(t.target, e.widgetName + ".preventClickEvent"))
            return (
              Y.removeData(t.target, e.widgetName + ".preventClickEvent"),
              t.stopImmediatePropagation(),
              !1
            );
        }),
        (this.started = !1);
    },
    _mouseDestroy: function () {
      this.element.off("." + this.widgetName),
        this._mouseMoveDelegate &&
          this.document
            .off("mousemove." + this.widgetName, this._mouseMoveDelegate)
            .off("mouseup." + this.widgetName, this._mouseUpDelegate);
    },
    _mouseDown: function (t) {
      if (!at) {
        (this._mouseMoved = !1),
          this._mouseStarted && this._mouseUp(t),
          (this._mouseDownEvent = t);
        var e = this,
          i = 1 === t.which,
          n =
            !("string" != typeof this.options.cancel || !t.target.nodeName) &&
            Y(t.target).closest(this.options.cancel).length;
        return i && !n && this._mouseCapture(t)
          ? ((this.mouseDelayMet = !this.options.delay),
            this.mouseDelayMet ||
              (this._mouseDelayTimer = setTimeout(function () {
                e.mouseDelayMet = !0;
              }, this.options.delay)),
            this._mouseDistanceMet(t) &&
            this._mouseDelayMet(t) &&
            ((this._mouseStarted = !1 !== this._mouseStart(t)),
            !this._mouseStarted)
              ? (t.preventDefault(), !0)
              : (!0 ===
                  Y.data(t.target, this.widgetName + ".preventClickEvent") &&
                  Y.removeData(
                    t.target,
                    this.widgetName + ".preventClickEvent"
                  ),
                (this._mouseMoveDelegate = function (t) {
                  return e._mouseMove(t);
                }),
                (this._mouseUpDelegate = function (t) {
                  return e._mouseUp(t);
                }),
                this.document
                  .on("mousemove." + this.widgetName, this._mouseMoveDelegate)
                  .on("mouseup." + this.widgetName, this._mouseUpDelegate),
                "slider" === this.widgetName && t.preventDefault(),
                (at = !0)))
          : !0;
      }
    },
    _mouseMove: function (t) {
      if (this._mouseMoved) {
        if (
          Y.ui.ie &&
          (!document.documentMode || document.documentMode < 9) &&
          !t.button
        )
          return this._mouseUp(t);
        if (!t.which)
          if (
            t.originalEvent.altKey ||
            t.originalEvent.ctrlKey ||
            t.originalEvent.metaKey ||
            t.originalEvent.shiftKey
          )
            this.ignoreMissingWhich = !0;
          else if (!this.ignoreMissingWhich) return this._mouseUp(t);
      }
      return (
        (t.which || t.button) && (this._mouseMoved = !0),
        this._mouseStarted
          ? (this._mouseDrag(t), t.preventDefault())
          : (this._mouseDistanceMet(t) &&
              this._mouseDelayMet(t) &&
              ((this._mouseStarted =
                !1 !== this._mouseStart(this._mouseDownEvent, t)),
              this._mouseStarted ? this._mouseDrag(t) : this._mouseUp(t)),
            !this._mouseStarted)
      );
    },
    _mouseUp: function (t) {
      this.document
        .off("mousemove." + this.widgetName, this._mouseMoveDelegate)
        .off("mouseup." + this.widgetName, this._mouseUpDelegate),
        this._mouseStarted &&
          ((this._mouseStarted = !1),
          t.target === this._mouseDownEvent.target &&
            Y.data(t.target, this.widgetName + ".preventClickEvent", !0),
          this._mouseStop(t)),
        this._mouseDelayTimer &&
          (clearTimeout(this._mouseDelayTimer), delete this._mouseDelayTimer),
        (this.ignoreMissingWhich = !1),
        (at = !1),
        t.preventDefault();
    },
    _mouseDistanceMet: function (t) {
      return (
        Math.max(
          Math.abs(this._mouseDownEvent.pageX - t.pageX),
          Math.abs(this._mouseDownEvent.pageY - t.pageY)
        ) >= this.options.distance
      );
    },
    _mouseDelayMet: function () {
      return this.mouseDelayMet;
    },
    _mouseStart: function () {},
    _mouseDrag: function () {},
    _mouseStop: function () {},
    _mouseCapture: function () {
      return !0;
    },
  }),
    (Y.ui.plugin = {
      add: function (t, e, i) {
        var n,
          s = Y.ui[t].prototype;
        for (n in i)
          (s.plugins[n] = s.plugins[n] || []), s.plugins[n].push([e, i[n]]);
      },
      call: function (t, e, i, n) {
        var s,
          o = t.plugins[e];
        if (
          o &&
          (n ||
            (t.element[0].parentNode &&
              11 !== t.element[0].parentNode.nodeType))
        )
          for (s = 0; s < o.length; s++)
            t.options[o[s][0]] && o[s][1].apply(t.element, i);
      },
    }),
    (Y.ui.safeBlur = function (t) {
      t && "body" !== t.nodeName.toLowerCase() && Y(t).trigger("blur");
    });
  Y.widget("ui.draggable", Y.ui.mouse, {
    version: "1.13.0",
    widgetEventPrefix: "drag",
    options: {
      addClasses: !0,
      appendTo: "parent",
      axis: !1,
      connectToSortable: !1,
      containment: !1,
      cursor: "auto",
      cursorAt: !1,
      grid: !1,
      handle: !1,
      helper: "original",
      iframeFix: !1,
      opacity: !1,
      refreshPositions: !1,
      revert: !1,
      revertDuration: 500,
      scope: "default",
      scroll: !0,
      scrollSensitivity: 20,
      scrollSpeed: 20,
      snap: !1,
      snapMode: "both",
      snapTolerance: 20,
      stack: !1,
      zIndex: !1,
      drag: null,
      start: null,
      stop: null,
    },
    _create: function () {
      "original" === this.options.helper && this._setPositionRelative(),
        this.options.addClasses && this._addClass("ui-draggable"),
        this._setHandleClassName(),
        this._mouseInit();
    },
    _setOption: function (t, e) {
      this._super(t, e),
        "handle" === t &&
          (this._removeHandleClassName(), this._setHandleClassName());
    },
    _destroy: function () {
      (this.helper || this.element).is(".ui-draggable-dragging")
        ? (this.destroyOnClear = !0)
        : (this._removeHandleClassName(), this._mouseDestroy());
    },
    _mouseCapture: function (t) {
      var e = this.options;
      return (
        !(
          this.helper ||
          e.disabled ||
          0 < Y(t.target).closest(".ui-resizable-handle").length
        ) &&
        ((this.handle = this._getHandle(t)),
        !!this.handle &&
          (this._blurActiveElement(t),
          this._blockFrames(!0 === e.iframeFix ? "iframe" : e.iframeFix),
          !0))
      );
    },
    _blockFrames: function (t) {
      this.iframeBlocks = this.document.find(t).map(function () {
        var t = Y(this);
        return Y("<div>")
          .css("position", "absolute")
          .appendTo(t.parent())
          .outerWidth(t.outerWidth())
          .outerHeight(t.outerHeight())
          .offset(t.offset())[0];
      });
    },
    _unblockFrames: function () {
      this.iframeBlocks &&
        (this.iframeBlocks.remove(), delete this.iframeBlocks);
    },
    _blurActiveElement: function (t) {
      var e = Y.ui.safeActiveElement(this.document[0]);
      Y(t.target).closest(e).length || Y.ui.safeBlur(e);
    },
    _mouseStart: function (t) {
      var e = this.options;
      return (
        (this.helper = this._createHelper(t)),
        this._addClass(this.helper, "ui-draggable-dragging"),
        this._cacheHelperProportions(),
        Y.ui.ddmanager && (Y.ui.ddmanager.current = this),
        this._cacheMargins(),
        (this.cssPosition = this.helper.css("position")),
        (this.scrollParent = this.helper.scrollParent(!0)),
        (this.offsetParent = this.helper.offsetParent()),
        (this.hasFixedAncestor =
          0 <
          this.helper.parents().filter(function () {
            return "fixed" === Y(this).css("position");
          }).length),
        (this.positionAbs = this.element.offset()),
        this._refreshOffsets(t),
        (this.originalPosition = this.position = this._generatePosition(t, !1)),
        (this.originalPageX = t.pageX),
        (this.originalPageY = t.pageY),
        e.cursorAt && this._adjustOffsetFromHelper(e.cursorAt),
        this._setContainment(),
        !1 === this._trigger("start", t)
          ? (this._clear(), !1)
          : (this._cacheHelperProportions(),
            Y.ui.ddmanager &&
              !e.dropBehaviour &&
              Y.ui.ddmanager.prepareOffsets(this, t),
            this._mouseDrag(t, !0),
            Y.ui.ddmanager && Y.ui.ddmanager.dragStart(this, t),
            !0)
      );
    },
    _refreshOffsets: function (t) {
      (this.offset = {
        top: this.positionAbs.top - this.margins.top,
        left: this.positionAbs.left - this.margins.left,
        scroll: !1,
        parent: this._getParentOffset(),
        relative: this._getRelativeOffset(),
      }),
        (this.offset.click = {
          left: t.pageX - this.offset.left,
          top: t.pageY - this.offset.top,
        });
    },
    _mouseDrag: function (t, e) {
      if (
        (this.hasFixedAncestor &&
          (this.offset.parent = this._getParentOffset()),
        (this.position = this._generatePosition(t, !0)),
        (this.positionAbs = this._convertPositionTo("absolute")),
        !e)
      ) {
        e = this._uiHash();
        if (!1 === this._trigger("drag", t, e))
          return this._mouseUp(new Y.Event("mouseup", t)), !1;
        this.position = e.position;
      }
      return (
        (this.helper[0].style.left = this.position.left + "px"),
        (this.helper[0].style.top = this.position.top + "px"),
        Y.ui.ddmanager && Y.ui.ddmanager.drag(this, t),
        !1
      );
    },
    _mouseStop: function (t) {
      var e = this,
        i = !1;
      return (
        Y.ui.ddmanager &&
          !this.options.dropBehaviour &&
          (i = Y.ui.ddmanager.drop(this, t)),
        this.dropped && ((i = this.dropped), (this.dropped = !1)),
        ("invalid" === this.options.revert && !i) ||
        ("valid" === this.options.revert && i) ||
        !0 === this.options.revert ||
        ("function" == typeof this.options.revert &&
          this.options.revert.call(this.element, i))
          ? Y(this.helper).animate(
              this.originalPosition,
              parseInt(this.options.revertDuration, 10),
              function () {
                !1 !== e._trigger("stop", t) && e._clear();
              }
            )
          : !1 !== this._trigger("stop", t) && this._clear(),
        !1
      );
    },
    _mouseUp: function (t) {
      return (
        this._unblockFrames(),
        Y.ui.ddmanager && Y.ui.ddmanager.dragStop(this, t),
        this.handleElement.is(t.target) && this.element.trigger("focus"),
        Y.ui.mouse.prototype._mouseUp.call(this, t)
      );
    },
    cancel: function () {
      return (
        this.helper.is(".ui-draggable-dragging")
          ? this._mouseUp(new Y.Event("mouseup", { target: this.element[0] }))
          : this._clear(),
        this
      );
    },
    _getHandle: function (t) {
      return (
        !this.options.handle ||
        !!Y(t.target).closest(this.element.find(this.options.handle)).length
      );
    },
    _setHandleClassName: function () {
      (this.handleElement = this.options.handle
        ? this.element.find(this.options.handle)
        : this.element),
        this._addClass(this.handleElement, "ui-draggable-handle");
    },
    _removeHandleClassName: function () {
      this._removeClass(this.handleElement, "ui-draggable-handle");
    },
    _createHelper: function (t) {
      var e = this.options,
        i = "function" == typeof e.helper,
        t = i
          ? Y(e.helper.apply(this.element[0], [t]))
          : "clone" === e.helper
          ? this.element.clone().removeAttr("id")
          : this.element;
      return (
        t.parents("body").length ||
          t.appendTo(
            "parent" === e.appendTo ? this.element[0].parentNode : e.appendTo
          ),
        i && t[0] === this.element[0] && this._setPositionRelative(),
        t[0] === this.element[0] ||
          /(fixed|absolute)/.test(t.css("position")) ||
          t.css("position", "absolute"),
        t
      );
    },
    _setPositionRelative: function () {
      /^(?:r|a|f)/.test(this.element.css("position")) ||
        (this.element[0].style.position = "relative");
    },
    _adjustOffsetFromHelper: function (t) {
      "string" == typeof t && (t = t.split(" ")),
        "left" in
          (t = Array.isArray(t) ? { left: +t[0], top: +t[1] || 0 } : t) &&
          (this.offset.click.left = t.left + this.margins.left),
        "right" in t &&
          (this.offset.click.left =
            this.helperProportions.width - t.right + this.margins.left),
        "top" in t && (this.offset.click.top = t.top + this.margins.top),
        "bottom" in t &&
          (this.offset.click.top =
            this.helperProportions.height - t.bottom + this.margins.top);
    },
    _isRootNode: function (t) {
      return /(html|body)/i.test(t.tagName) || t === this.document[0];
    },
    _getParentOffset: function () {
      var t = this.offsetParent.offset(),
        e = this.document[0];
      return (
        "absolute" === this.cssPosition &&
          this.scrollParent[0] !== e &&
          Y.contains(this.scrollParent[0], this.offsetParent[0]) &&
          ((t.left += this.scrollParent.scrollLeft()),
          (t.top += this.scrollParent.scrollTop())),
        {
          top:
            (t = this._isRootNode(this.offsetParent[0])
              ? { top: 0, left: 0 }
              : t).top +
            (parseInt(this.offsetParent.css("borderTopWidth"), 10) || 0),
          left:
            t.left +
            (parseInt(this.offsetParent.css("borderLeftWidth"), 10) || 0),
        }
      );
    },
    _getRelativeOffset: function () {
      if ("relative" !== this.cssPosition) return { top: 0, left: 0 };
      var t = this.element.position(),
        e = this._isRootNode(this.scrollParent[0]);
      return {
        top:
          t.top -
          (parseInt(this.helper.css("top"), 10) || 0) +
          (e ? 0 : this.scrollParent.scrollTop()),
        left:
          t.left -
          (parseInt(this.helper.css("left"), 10) || 0) +
          (e ? 0 : this.scrollParent.scrollLeft()),
      };
    },
    _cacheMargins: function () {
      this.margins = {
        left: parseInt(this.element.css("marginLeft"), 10) || 0,
        top: parseInt(this.element.css("marginTop"), 10) || 0,
        right: parseInt(this.element.css("marginRight"), 10) || 0,
        bottom: parseInt(this.element.css("marginBottom"), 10) || 0,
      };
    },
    _cacheHelperProportions: function () {
      this.helperProportions = {
        width: this.helper.outerWidth(),
        height: this.helper.outerHeight(),
      };
    },
    _setContainment: function () {
      var t,
        e,
        i,
        n = this.options,
        s = this.document[0];
      (this.relativeContainer = null),
        n.containment
          ? "window" !== n.containment
            ? "document" !== n.containment
              ? n.containment.constructor !== Array
                ? ("parent" === n.containment &&
                    (n.containment = this.helper[0].parentNode),
                  (i = (e = Y(n.containment))[0]) &&
                    ((t = /(scroll|auto)/.test(e.css("overflow"))),
                    (this.containment = [
                      (parseInt(e.css("borderLeftWidth"), 10) || 0) +
                        (parseInt(e.css("paddingLeft"), 10) || 0),
                      (parseInt(e.css("borderTopWidth"), 10) || 0) +
                        (parseInt(e.css("paddingTop"), 10) || 0),
                      (t
                        ? Math.max(i.scrollWidth, i.offsetWidth)
                        : i.offsetWidth) -
                        (parseInt(e.css("borderRightWidth"), 10) || 0) -
                        (parseInt(e.css("paddingRight"), 10) || 0) -
                        this.helperProportions.width -
                        this.margins.left -
                        this.margins.right,
                      (t
                        ? Math.max(i.scrollHeight, i.offsetHeight)
                        : i.offsetHeight) -
                        (parseInt(e.css("borderBottomWidth"), 10) || 0) -
                        (parseInt(e.css("paddingBottom"), 10) || 0) -
                        this.helperProportions.height -
                        this.margins.top -
                        this.margins.bottom,
                    ]),
                    (this.relativeContainer = e)))
                : (this.containment = n.containment)
              : (this.containment = [
                  0,
                  0,
                  Y(s).width() -
                    this.helperProportions.width -
                    this.margins.left,
                  (Y(s).height() || s.body.parentNode.scrollHeight) -
                    this.helperProportions.height -
                    this.margins.top,
                ])
            : (this.containment = [
                Y(window).scrollLeft() -
                  this.offset.relative.left -
                  this.offset.parent.left,
                Y(window).scrollTop() -
                  this.offset.relative.top -
                  this.offset.parent.top,
                Y(window).scrollLeft() +
                  Y(window).width() -
                  this.helperProportions.width -
                  this.margins.left,
                Y(window).scrollTop() +
                  (Y(window).height() || s.body.parentNode.scrollHeight) -
                  this.helperProportions.height -
                  this.margins.top,
              ])
          : (this.containment = null);
    },
    _convertPositionTo: function (t, e) {
      e = e || this.position;
      var i = "absolute" === t ? 1 : -1,
        t = this._isRootNode(this.scrollParent[0]);
      return {
        top:
          e.top +
          this.offset.relative.top * i +
          this.offset.parent.top * i -
          ("fixed" === this.cssPosition
            ? -this.offset.scroll.top
            : t
            ? 0
            : this.offset.scroll.top) *
            i,
        left:
          e.left +
          this.offset.relative.left * i +
          this.offset.parent.left * i -
          ("fixed" === this.cssPosition
            ? -this.offset.scroll.left
            : t
            ? 0
            : this.offset.scroll.left) *
            i,
      };
    },
    _generatePosition: function (t, e) {
      var i,
        n = this.options,
        s = this._isRootNode(this.scrollParent[0]),
        o = t.pageX,
        r = t.pageY;
      return (
        (s && this.offset.scroll) ||
          (this.offset.scroll = {
            top: this.scrollParent.scrollTop(),
            left: this.scrollParent.scrollLeft(),
          }),
        e &&
          (this.containment &&
            ((i = this.relativeContainer
              ? ((i = this.relativeContainer.offset()),
                [
                  this.containment[0] + i.left,
                  this.containment[1] + i.top,
                  this.containment[2] + i.left,
                  this.containment[3] + i.top,
                ])
              : this.containment),
            t.pageX - this.offset.click.left < i[0] &&
              (o = i[0] + this.offset.click.left),
            t.pageY - this.offset.click.top < i[1] &&
              (r = i[1] + this.offset.click.top),
            t.pageX - this.offset.click.left > i[2] &&
              (o = i[2] + this.offset.click.left),
            t.pageY - this.offset.click.top > i[3] &&
              (r = i[3] + this.offset.click.top)),
          n.grid &&
            ((t = n.grid[1]
              ? this.originalPageY +
                Math.round((r - this.originalPageY) / n.grid[1]) * n.grid[1]
              : this.originalPageY),
            (r =
              !i ||
              t - this.offset.click.top >= i[1] ||
              t - this.offset.click.top > i[3]
                ? t
                : t - this.offset.click.top >= i[1]
                ? t - n.grid[1]
                : t + n.grid[1]),
            (t = n.grid[0]
              ? this.originalPageX +
                Math.round((o - this.originalPageX) / n.grid[0]) * n.grid[0]
              : this.originalPageX),
            (o =
              !i ||
              t - this.offset.click.left >= i[0] ||
              t - this.offset.click.left > i[2]
                ? t
                : t - this.offset.click.left >= i[0]
                ? t - n.grid[0]
                : t + n.grid[0])),
          "y" === n.axis && (o = this.originalPageX),
          "x" === n.axis && (r = this.originalPageY)),
        {
          top:
            r -
            this.offset.click.top -
            this.offset.relative.top -
            this.offset.parent.top +
            ("fixed" === this.cssPosition
              ? -this.offset.scroll.top
              : s
              ? 0
              : this.offset.scroll.top),
          left:
            o -
            this.offset.click.left -
            this.offset.relative.left -
            this.offset.parent.left +
            ("fixed" === this.cssPosition
              ? -this.offset.scroll.left
              : s
              ? 0
              : this.offset.scroll.left),
        }
      );
    },
    _clear: function () {
      this._removeClass(this.helper, "ui-draggable-dragging"),
        this.helper[0] === this.element[0] ||
          this.cancelHelperRemoval ||
          this.helper.remove(),
        (this.helper = null),
        (this.cancelHelperRemoval = !1),
        this.destroyOnClear && this.destroy();
    },
    _trigger: function (t, e, i) {
      return (
        (i = i || this._uiHash()),
        Y.ui.plugin.call(this, t, [e, i, this], !0),
        /^(drag|start|stop)/.test(t) &&
          ((this.positionAbs = this._convertPositionTo("absolute")),
          (i.offset = this.positionAbs)),
        Y.Widget.prototype._trigger.call(this, t, e, i)
      );
    },
    plugins: {},
    _uiHash: function () {
      return {
        helper: this.helper,
        position: this.position,
        originalPosition: this.originalPosition,
        offset: this.positionAbs,
      };
    },
  }),
    Y.ui.plugin.add("draggable", "connectToSortable", {
      start: function (e, t, i) {
        var n = Y.extend({}, t, { item: i.element });
        (i.sortables = []),
          Y(i.options.connectToSortable).each(function () {
            var t = Y(this).sortable("instance");
            t &&
              !t.options.disabled &&
              (i.sortables.push(t),
              t.refreshPositions(),
              t._trigger("activate", e, n));
          });
      },
      stop: function (e, t, i) {
        var n = Y.extend({}, t, { item: i.element });
        (i.cancelHelperRemoval = !1),
          Y.each(i.sortables, function () {
            var t = this;
            t.isOver
              ? ((t.isOver = 0),
                (i.cancelHelperRemoval = !0),
                (t.cancelHelperRemoval = !1),
                (t._storedCSS = {
                  position: t.placeholder.css("position"),
                  top: t.placeholder.css("top"),
                  left: t.placeholder.css("left"),
                }),
                t._mouseStop(e),
                (t.options.helper = t.options._helper))
              : ((t.cancelHelperRemoval = !0), t._trigger("deactivate", e, n));
          });
      },
      drag: function (i, n, s) {
        Y.each(s.sortables, function () {
          var t = !1,
            e = this;
          (e.positionAbs = s.positionAbs),
            (e.helperProportions = s.helperProportions),
            (e.offset.click = s.offset.click),
            e._intersectsWith(e.containerCache) &&
              ((t = !0),
              Y.each(s.sortables, function () {
                return (
                  (this.positionAbs = s.positionAbs),
                  (this.helperProportions = s.helperProportions),
                  (this.offset.click = s.offset.click),
                  (t =
                    this !== e &&
                    this._intersectsWith(this.containerCache) &&
                    Y.contains(e.element[0], this.element[0])
                      ? !1
                      : t)
                );
              })),
            t
              ? (e.isOver ||
                  ((e.isOver = 1),
                  (s._parent = n.helper.parent()),
                  (e.currentItem = n.helper
                    .appendTo(e.element)
                    .data("ui-sortable-item", !0)),
                  (e.options._helper = e.options.helper),
                  (e.options.helper = function () {
                    return n.helper[0];
                  }),
                  (i.target = e.currentItem[0]),
                  e._mouseCapture(i, !0),
                  e._mouseStart(i, !0, !0),
                  (e.offset.click.top = s.offset.click.top),
                  (e.offset.click.left = s.offset.click.left),
                  (e.offset.parent.left -=
                    s.offset.parent.left - e.offset.parent.left),
                  (e.offset.parent.top -=
                    s.offset.parent.top - e.offset.parent.top),
                  s._trigger("toSortable", i),
                  (s.dropped = e.element),
                  Y.each(s.sortables, function () {
                    this.refreshPositions();
                  }),
                  (s.currentItem = s.element),
                  (e.fromOutside = s)),
                e.currentItem && (e._mouseDrag(i), (n.position = e.position)))
              : e.isOver &&
                ((e.isOver = 0),
                (e.cancelHelperRemoval = !0),
                (e.options._revert = e.options.revert),
                (e.options.revert = !1),
                e._trigger("out", i, e._uiHash(e)),
                e._mouseStop(i, !0),
                (e.options.revert = e.options._revert),
                (e.options.helper = e.options._helper),
                e.placeholder && e.placeholder.remove(),
                n.helper.appendTo(s._parent),
                s._refreshOffsets(i),
                (n.position = s._generatePosition(i, !0)),
                s._trigger("fromSortable", i),
                (s.dropped = !1),
                Y.each(s.sortables, function () {
                  this.refreshPositions();
                }));
        });
      },
    }),
    Y.ui.plugin.add("draggable", "cursor", {
      start: function (t, e, i) {
        var n = Y("body"),
          i = i.options;
        n.css("cursor") && (i._cursor = n.css("cursor")),
          n.css("cursor", i.cursor);
      },
      stop: function (t, e, i) {
        i = i.options;
        i._cursor && Y("body").css("cursor", i._cursor);
      },
    }),
    Y.ui.plugin.add("draggable", "opacity", {
      start: function (t, e, i) {
        (e = Y(e.helper)), (i = i.options);
        e.css("opacity") && (i._opacity = e.css("opacity")),
          e.css("opacity", i.opacity);
      },
      stop: function (t, e, i) {
        i = i.options;
        i._opacity && Y(e.helper).css("opacity", i._opacity);
      },
    }),
    Y.ui.plugin.add("draggable", "scroll", {
      start: function (t, e, i) {
        i.scrollParentNotHidden ||
          (i.scrollParentNotHidden = i.helper.scrollParent(!1)),
          i.scrollParentNotHidden[0] !== i.document[0] &&
            "HTML" !== i.scrollParentNotHidden[0].tagName &&
            (i.overflowOffset = i.scrollParentNotHidden.offset());
      },
      drag: function (t, e, i) {
        var n = i.options,
          s = !1,
          o = i.scrollParentNotHidden[0],
          r = i.document[0];
        o !== r && "HTML" !== o.tagName
          ? ((n.axis && "x" === n.axis) ||
              (i.overflowOffset.top + o.offsetHeight - t.pageY <
              n.scrollSensitivity
                ? (o.scrollTop = s = o.scrollTop + n.scrollSpeed)
                : t.pageY - i.overflowOffset.top < n.scrollSensitivity &&
                  (o.scrollTop = s = o.scrollTop - n.scrollSpeed)),
            (n.axis && "y" === n.axis) ||
              (i.overflowOffset.left + o.offsetWidth - t.pageX <
              n.scrollSensitivity
                ? (o.scrollLeft = s = o.scrollLeft + n.scrollSpeed)
                : t.pageX - i.overflowOffset.left < n.scrollSensitivity &&
                  (o.scrollLeft = s = o.scrollLeft - n.scrollSpeed)))
          : ((n.axis && "x" === n.axis) ||
              (t.pageY - Y(r).scrollTop() < n.scrollSensitivity
                ? (s = Y(r).scrollTop(Y(r).scrollTop() - n.scrollSpeed))
                : Y(window).height() - (t.pageY - Y(r).scrollTop()) <
                    n.scrollSensitivity &&
                  (s = Y(r).scrollTop(Y(r).scrollTop() + n.scrollSpeed))),
            (n.axis && "y" === n.axis) ||
              (t.pageX - Y(r).scrollLeft() < n.scrollSensitivity
                ? (s = Y(r).scrollLeft(Y(r).scrollLeft() - n.scrollSpeed))
                : Y(window).width() - (t.pageX - Y(r).scrollLeft()) <
                    n.scrollSensitivity &&
                  (s = Y(r).scrollLeft(Y(r).scrollLeft() + n.scrollSpeed)))),
          !1 !== s &&
            Y.ui.ddmanager &&
            !n.dropBehaviour &&
            Y.ui.ddmanager.prepareOffsets(i, t);
      },
    }),
    Y.ui.plugin.add("draggable", "snap", {
      start: function (t, e, i) {
        var n = i.options;
        (i.snapElements = []),
          Y(
            n.snap.constructor !== String
              ? n.snap.items || ":data(ui-draggable)"
              : n.snap
          ).each(function () {
            var t = Y(this),
              e = t.offset();
            this !== i.element[0] &&
              i.snapElements.push({
                item: this,
                width: t.outerWidth(),
                height: t.outerHeight(),
                top: e.top,
                left: e.left,
              });
          });
      },
      drag: function (t, e, i) {
        for (
          var n,
            s,
            o,
            r,
            a,
            l,
            c,
            h,
            u,
            d = i.options,
            p = d.snapTolerance,
            f = e.offset.left,
            g = f + i.helperProportions.width,
            m = e.offset.top,
            v = m + i.helperProportions.height,
            b = i.snapElements.length - 1;
          0 <= b;
          b--
        )
          (l =
            (a = i.snapElements[b].left - i.margins.left) +
            i.snapElements[b].width),
            (h =
              (c = i.snapElements[b].top - i.margins.top) +
              i.snapElements[b].height),
            g < a - p ||
            l + p < f ||
            v < c - p ||
            h + p < m ||
            !Y.contains(
              i.snapElements[b].item.ownerDocument,
              i.snapElements[b].item
            )
              ? (i.snapElements[b].snapping &&
                  i.options.snap.release &&
                  i.options.snap.release.call(
                    i.element,
                    t,
                    Y.extend(i._uiHash(), { snapItem: i.snapElements[b].item })
                  ),
                (i.snapElements[b].snapping = !1))
              : ("inner" !== d.snapMode &&
                  ((n = Math.abs(c - v) <= p),
                  (s = Math.abs(h - m) <= p),
                  (o = Math.abs(a - g) <= p),
                  (r = Math.abs(l - f) <= p),
                  n &&
                    (e.position.top = i._convertPositionTo("relative", {
                      top: c - i.helperProportions.height,
                      left: 0,
                    }).top),
                  s &&
                    (e.position.top = i._convertPositionTo("relative", {
                      top: h,
                      left: 0,
                    }).top),
                  o &&
                    (e.position.left = i._convertPositionTo("relative", {
                      top: 0,
                      left: a - i.helperProportions.width,
                    }).left),
                  r &&
                    (e.position.left = i._convertPositionTo("relative", {
                      top: 0,
                      left: l,
                    }).left)),
                (u = n || s || o || r),
                "outer" !== d.snapMode &&
                  ((n = Math.abs(c - m) <= p),
                  (s = Math.abs(h - v) <= p),
                  (o = Math.abs(a - f) <= p),
                  (r = Math.abs(l - g) <= p),
                  n &&
                    (e.position.top = i._convertPositionTo("relative", {
                      top: c,
                      left: 0,
                    }).top),
                  s &&
                    (e.position.top = i._convertPositionTo("relative", {
                      top: h - i.helperProportions.height,
                      left: 0,
                    }).top),
                  o &&
                    (e.position.left = i._convertPositionTo("relative", {
                      top: 0,
                      left: a,
                    }).left),
                  r &&
                    (e.position.left = i._convertPositionTo("relative", {
                      top: 0,
                      left: l - i.helperProportions.width,
                    }).left)),
                !i.snapElements[b].snapping &&
                  (n || s || o || r || u) &&
                  i.options.snap.snap &&
                  i.options.snap.snap.call(
                    i.element,
                    t,
                    Y.extend(i._uiHash(), { snapItem: i.snapElements[b].item })
                  ),
                (i.snapElements[b].snapping = n || s || o || r || u));
      },
    }),
    Y.ui.plugin.add("draggable", "stack", {
      start: function (t, e, i) {
        var n,
          i = i.options,
          i = Y.makeArray(Y(i.stack)).sort(function (t, e) {
            return (
              (parseInt(Y(t).css("zIndex"), 10) || 0) -
              (parseInt(Y(e).css("zIndex"), 10) || 0)
            );
          });
        i.length &&
          ((n = parseInt(Y(i[0]).css("zIndex"), 10) || 0),
          Y(i).each(function (t) {
            Y(this).css("zIndex", n + t);
          }),
          this.css("zIndex", n + i.length));
      },
    }),
    Y.ui.plugin.add("draggable", "zIndex", {
      start: function (t, e, i) {
        (e = Y(e.helper)), (i = i.options);
        e.css("zIndex") && (i._zIndex = e.css("zIndex")),
          e.css("zIndex", i.zIndex);
      },
      stop: function (t, e, i) {
        i = i.options;
        i._zIndex && Y(e.helper).css("zIndex", i._zIndex);
      },
    });
  Y.ui.draggable;
  Y.widget("ui.resizable", Y.ui.mouse, {
    version: "1.13.0",
    widgetEventPrefix: "resize",
    options: {
      alsoResize: !1,
      animate: !1,
      animateDuration: "slow",
      animateEasing: "swing",
      aspectRatio: !1,
      autoHide: !1,
      classes: { "ui-resizable-se": "ui-icon ui-icon-gripsmall-diagonal-se" },
      containment: !1,
      ghost: !1,
      grid: !1,
      handles: "e,s,se",
      helper: !1,
      maxHeight: null,
      maxWidth: null,
      minHeight: 10,
      minWidth: 10,
      zIndex: 90,
      resize: null,
      start: null,
      stop: null,
    },
    _num: function (t) {
      return parseFloat(t) || 0;
    },
    _isNumber: function (t) {
      return !isNaN(parseFloat(t));
    },
    _hasScroll: function (t, e) {
      if ("hidden" === Y(t).css("overflow")) return !1;
      var i = e && "left" === e ? "scrollLeft" : "scrollTop",
        e = !1;
      if (0 < t[i]) return !0;
      try {
        (t[i] = 1), (e = 0 < t[i]), (t[i] = 0);
      } catch (t) {}
      return e;
    },
    _create: function () {
      var t,
        e = this.options,
        i = this;
      this._addClass("ui-resizable"),
        Y.extend(this, {
          _aspectRatio: !!e.aspectRatio,
          aspectRatio: e.aspectRatio,
          originalElement: this.element,
          _proportionallyResizeElements: [],
          _helper:
            e.helper || e.ghost || e.animate
              ? e.helper || "ui-resizable-helper"
              : null,
        }),
        this.element[0].nodeName.match(
          /^(canvas|textarea|input|select|button|img)$/i
        ) &&
          (this.element.wrap(
            Y("<div class='ui-wrapper'></div>").css({
              overflow: "hidden",
              position: this.element.css("position"),
              width: this.element.outerWidth(),
              height: this.element.outerHeight(),
              top: this.element.css("top"),
              left: this.element.css("left"),
            })
          ),
          (this.element = this.element
            .parent()
            .data("ui-resizable", this.element.resizable("instance"))),
          (this.elementIsWrapper = !0),
          (t = {
            marginTop: this.originalElement.css("marginTop"),
            marginRight: this.originalElement.css("marginRight"),
            marginBottom: this.originalElement.css("marginBottom"),
            marginLeft: this.originalElement.css("marginLeft"),
          }),
          this.element.css(t),
          this.originalElement.css("margin", 0),
          (this.originalResizeStyle = this.originalElement.css("resize")),
          this.originalElement.css("resize", "none"),
          this._proportionallyResizeElements.push(
            this.originalElement.css({
              position: "static",
              zoom: 1,
              display: "block",
            })
          ),
          this.originalElement.css(t),
          this._proportionallyResize()),
        this._setupHandles(),
        e.autoHide &&
          Y(this.element)
            .on("mouseenter", function () {
              e.disabled ||
                (i._removeClass("ui-resizable-autohide"), i._handles.show());
            })
            .on("mouseleave", function () {
              e.disabled ||
                i.resizing ||
                (i._addClass("ui-resizable-autohide"), i._handles.hide());
            }),
        this._mouseInit();
    },
    _destroy: function () {
      this._mouseDestroy(), this._addedHandles.remove();
      function t(t) {
        Y(t)
          .removeData("resizable")
          .removeData("ui-resizable")
          .off(".resizable");
      }
      var e;
      return (
        this.elementIsWrapper &&
          (t(this.element),
          (e = this.element),
          this.originalElement
            .css({
              position: e.css("position"),
              width: e.outerWidth(),
              height: e.outerHeight(),
              top: e.css("top"),
              left: e.css("left"),
            })
            .insertAfter(e),
          e.remove()),
        this.originalElement.css("resize", this.originalResizeStyle),
        t(this.originalElement),
        this
      );
    },
    _setOption: function (t, e) {
      switch ((this._super(t, e), t)) {
        case "handles":
          this._removeHandles(), this._setupHandles();
          break;
        case "aspectRatio":
          this._aspectRatio = !!e;
      }
    },
    _setupHandles: function () {
      var t,
        e,
        i,
        n,
        s,
        o = this.options,
        r = this;
      if (
        ((this.handles =
          o.handles ||
          (Y(".ui-resizable-handle", this.element).length
            ? {
                n: ".ui-resizable-n",
                e: ".ui-resizable-e",
                s: ".ui-resizable-s",
                w: ".ui-resizable-w",
                se: ".ui-resizable-se",
                sw: ".ui-resizable-sw",
                ne: ".ui-resizable-ne",
                nw: ".ui-resizable-nw",
              }
            : "e,s,se")),
        (this._handles = Y()),
        (this._addedHandles = Y()),
        this.handles.constructor === String)
      )
        for (
          "all" === this.handles && (this.handles = "n,e,s,w,se,sw,ne,nw"),
            i = this.handles.split(","),
            this.handles = {},
            e = 0;
          e < i.length;
          e++
        )
          (n = "ui-resizable-" + (t = String.prototype.trim.call(i[e]))),
            (s = Y("<div>")),
            this._addClass(s, "ui-resizable-handle " + n),
            s.css({ zIndex: o.zIndex }),
            (this.handles[t] = ".ui-resizable-" + t),
            this.element.children(this.handles[t]).length ||
              (this.element.append(s),
              (this._addedHandles = this._addedHandles.add(s)));
      (this._renderAxis = function (t) {
        var e, i, n;
        for (e in ((t = t || this.element), this.handles))
          this.handles[e].constructor === String
            ? (this.handles[e] = this.element
                .children(this.handles[e])
                .first()
                .show())
            : (this.handles[e].jquery || this.handles[e].nodeType) &&
              ((this.handles[e] = Y(this.handles[e])),
              this._on(this.handles[e], { mousedown: r._mouseDown })),
            this.elementIsWrapper &&
              this.originalElement[0].nodeName.match(
                /^(textarea|input|select|button)$/i
              ) &&
              ((i = Y(this.handles[e], this.element)),
              (n = /sw|ne|nw|se|n|s/.test(e)
                ? i.outerHeight()
                : i.outerWidth()),
              (i = [
                "padding",
                /ne|nw|n/.test(e)
                  ? "Top"
                  : /se|sw|s/.test(e)
                  ? "Bottom"
                  : /^e$/.test(e)
                  ? "Right"
                  : "Left",
              ].join("")),
              t.css(i, n),
              this._proportionallyResize()),
            (this._handles = this._handles.add(this.handles[e]));
      }),
        this._renderAxis(this.element),
        (this._handles = this._handles.add(
          this.element.find(".ui-resizable-handle")
        )),
        this._handles.disableSelection(),
        this._handles.on("mouseover", function () {
          r.resizing ||
            (this.className &&
              (s = this.className.match(/ui-resizable-(se|sw|ne|nw|n|e|s|w)/i)),
            (r.axis = s && s[1] ? s[1] : "se"));
        }),
        o.autoHide &&
          (this._handles.hide(), this._addClass("ui-resizable-autohide"));
    },
    _removeHandles: function () {
      this._addedHandles.remove();
    },
    _mouseCapture: function (t) {
      var e,
        i,
        n = !1;
      for (e in this.handles)
        ((i = Y(this.handles[e])[0]) !== t.target &&
          !Y.contains(i, t.target)) ||
          (n = !0);
      return !this.options.disabled && n;
    },
    _mouseStart: function (t) {
      var e,
        i,
        n = this.options,
        s = this.element;
      return (
        (this.resizing = !0),
        this._renderProxy(),
        (e = this._num(this.helper.css("left"))),
        (i = this._num(this.helper.css("top"))),
        n.containment &&
          ((e += Y(n.containment).scrollLeft() || 0),
          (i += Y(n.containment).scrollTop() || 0)),
        (this.offset = this.helper.offset()),
        (this.position = { left: e, top: i }),
        (this.size = this._helper
          ? { width: this.helper.width(), height: this.helper.height() }
          : { width: s.width(), height: s.height() }),
        (this.originalSize = this._helper
          ? { width: s.outerWidth(), height: s.outerHeight() }
          : { width: s.width(), height: s.height() }),
        (this.sizeDiff = {
          width: s.outerWidth() - s.width(),
          height: s.outerHeight() - s.height(),
        }),
        (this.originalPosition = { left: e, top: i }),
        (this.originalMousePosition = { left: t.pageX, top: t.pageY }),
        (this.aspectRatio =
          "number" == typeof n.aspectRatio
            ? n.aspectRatio
            : this.originalSize.width / this.originalSize.height || 1),
        (n = Y(".ui-resizable-" + this.axis).css("cursor")),
        Y("body").css("cursor", "auto" === n ? this.axis + "-resize" : n),
        this._addClass("ui-resizable-resizing"),
        this._propagate("start", t),
        !0
      );
    },
    _mouseDrag: function (t) {
      var e = this.originalMousePosition,
        i = this.axis,
        n = t.pageX - e.left || 0,
        e = t.pageY - e.top || 0,
        i = this._change[i];
      return (
        this._updatePrevProperties(),
        i &&
          ((e = i.apply(this, [t, n, e])),
          this._updateVirtualBoundaries(t.shiftKey),
          (this._aspectRatio || t.shiftKey) && (e = this._updateRatio(e, t)),
          (e = this._respectSize(e, t)),
          this._updateCache(e),
          this._propagate("resize", t),
          (e = this._applyChanges()),
          !this._helper &&
            this._proportionallyResizeElements.length &&
            this._proportionallyResize(),
          Y.isEmptyObject(e) ||
            (this._updatePrevProperties(),
            this._trigger("resize", t, this.ui()),
            this._applyChanges())),
        !1
      );
    },
    _mouseStop: function (t) {
      this.resizing = !1;
      var e,
        i,
        n,
        s = this.options,
        o = this;
      return (
        this._helper &&
          ((n =
            (e =
              (i = this._proportionallyResizeElements).length &&
              /textarea/i.test(i[0].nodeName)) && this._hasScroll(i[0], "left")
              ? 0
              : o.sizeDiff.height),
          (i = e ? 0 : o.sizeDiff.width),
          (e = { width: o.helper.width() - i, height: o.helper.height() - n }),
          (i =
            parseFloat(o.element.css("left")) +
              (o.position.left - o.originalPosition.left) || null),
          (n =
            parseFloat(o.element.css("top")) +
              (o.position.top - o.originalPosition.top) || null),
          s.animate || this.element.css(Y.extend(e, { top: n, left: i })),
          o.helper.height(o.size.height),
          o.helper.width(o.size.width),
          this._helper && !s.animate && this._proportionallyResize()),
        Y("body").css("cursor", "auto"),
        this._removeClass("ui-resizable-resizing"),
        this._propagate("stop", t),
        this._helper && this.helper.remove(),
        !1
      );
    },
    _updatePrevProperties: function () {
      (this.prevPosition = {
        top: this.position.top,
        left: this.position.left,
      }),
        (this.prevSize = { width: this.size.width, height: this.size.height });
    },
    _applyChanges: function () {
      var t = {};
      return (
        this.position.top !== this.prevPosition.top &&
          (t.top = this.position.top + "px"),
        this.position.left !== this.prevPosition.left &&
          (t.left = this.position.left + "px"),
        this.size.width !== this.prevSize.width &&
          (t.width = this.size.width + "px"),
        this.size.height !== this.prevSize.height &&
          (t.height = this.size.height + "px"),
        this.helper.css(t),
        t
      );
    },
    _updateVirtualBoundaries: function (t) {
      var e,
        i,
        n = this.options,
        s = {
          minWidth: this._isNumber(n.minWidth) ? n.minWidth : 0,
          maxWidth: this._isNumber(n.maxWidth) ? n.maxWidth : 1 / 0,
          minHeight: this._isNumber(n.minHeight) ? n.minHeight : 0,
          maxHeight: this._isNumber(n.maxHeight) ? n.maxHeight : 1 / 0,
        };
      (this._aspectRatio || t) &&
        ((e = s.minHeight * this.aspectRatio),
        (i = s.minWidth / this.aspectRatio),
        (n = s.maxHeight * this.aspectRatio),
        (t = s.maxWidth / this.aspectRatio),
        e > s.minWidth && (s.minWidth = e),
        i > s.minHeight && (s.minHeight = i),
        n < s.maxWidth && (s.maxWidth = n),
        t < s.maxHeight && (s.maxHeight = t)),
        (this._vBoundaries = s);
    },
    _updateCache: function (t) {
      (this.offset = this.helper.offset()),
        this._isNumber(t.left) && (this.position.left = t.left),
        this._isNumber(t.top) && (this.position.top = t.top),
        this._isNumber(t.height) && (this.size.height = t.height),
        this._isNumber(t.width) && (this.size.width = t.width);
    },
    _updateRatio: function (t) {
      var e = this.position,
        i = this.size,
        n = this.axis;
      return (
        this._isNumber(t.height)
          ? (t.width = t.height * this.aspectRatio)
          : this._isNumber(t.width) && (t.height = t.width / this.aspectRatio),
        "sw" === n && ((t.left = e.left + (i.width - t.width)), (t.top = null)),
        "nw" === n &&
          ((t.top = e.top + (i.height - t.height)),
          (t.left = e.left + (i.width - t.width))),
        t
      );
    },
    _respectSize: function (t) {
      var e = this._vBoundaries,
        i = this.axis,
        n = this._isNumber(t.width) && e.maxWidth && e.maxWidth < t.width,
        s = this._isNumber(t.height) && e.maxHeight && e.maxHeight < t.height,
        o = this._isNumber(t.width) && e.minWidth && e.minWidth > t.width,
        r = this._isNumber(t.height) && e.minHeight && e.minHeight > t.height,
        a = this.originalPosition.left + this.originalSize.width,
        l = this.originalPosition.top + this.originalSize.height,
        c = /sw|nw|w/.test(i),
        i = /nw|ne|n/.test(i);
      return (
        o && (t.width = e.minWidth),
        r && (t.height = e.minHeight),
        n && (t.width = e.maxWidth),
        s && (t.height = e.maxHeight),
        o && c && (t.left = a - e.minWidth),
        n && c && (t.left = a - e.maxWidth),
        r && i && (t.top = l - e.minHeight),
        s && i && (t.top = l - e.maxHeight),
        t.width || t.height || t.left || !t.top
          ? t.width || t.height || t.top || !t.left || (t.left = null)
          : (t.top = null),
        t
      );
    },
    _getPaddingPlusBorderDimensions: function (t) {
      for (
        var e = 0,
          i = [],
          n = [
            t.css("borderTopWidth"),
            t.css("borderRightWidth"),
            t.css("borderBottomWidth"),
            t.css("borderLeftWidth"),
          ],
          s = [
            t.css("paddingTop"),
            t.css("paddingRight"),
            t.css("paddingBottom"),
            t.css("paddingLeft"),
          ];
        e < 4;
        e++
      )
        (i[e] = parseFloat(n[e]) || 0), (i[e] += parseFloat(s[e]) || 0);
      return { height: i[0] + i[2], width: i[1] + i[3] };
    },
    _proportionallyResize: function () {
      if (this._proportionallyResizeElements.length)
        for (
          var t, e = 0, i = this.helper || this.element;
          e < this._proportionallyResizeElements.length;
          e++
        )
          (t = this._proportionallyResizeElements[e]),
            this.outerDimensions ||
              (this.outerDimensions = this._getPaddingPlusBorderDimensions(t)),
            t.css({
              height: i.height() - this.outerDimensions.height || 0,
              width: i.width() - this.outerDimensions.width || 0,
            });
    },
    _renderProxy: function () {
      var t = this.element,
        e = this.options;
      (this.elementOffset = t.offset()),
        this._helper
          ? ((this.helper =
              this.helper || Y("<div></div>").css({ overflow: "hidden" })),
            this._addClass(this.helper, this._helper),
            this.helper.css({
              width: this.element.outerWidth(),
              height: this.element.outerHeight(),
              position: "absolute",
              left: this.elementOffset.left + "px",
              top: this.elementOffset.top + "px",
              zIndex: ++e.zIndex,
            }),
            this.helper.appendTo("body").disableSelection())
          : (this.helper = this.element);
    },
    _change: {
      e: function (t, e) {
        return { width: this.originalSize.width + e };
      },
      w: function (t, e) {
        var i = this.originalSize;
        return { left: this.originalPosition.left + e, width: i.width - e };
      },
      n: function (t, e, i) {
        var n = this.originalSize;
        return { top: this.originalPosition.top + i, height: n.height - i };
      },
      s: function (t, e, i) {
        return { height: this.originalSize.height + i };
      },
      se: function (t, e, i) {
        return Y.extend(
          this._change.s.apply(this, arguments),
          this._change.e.apply(this, [t, e, i])
        );
      },
      sw: function (t, e, i) {
        return Y.extend(
          this._change.s.apply(this, arguments),
          this._change.w.apply(this, [t, e, i])
        );
      },
      ne: function (t, e, i) {
        return Y.extend(
          this._change.n.apply(this, arguments),
          this._change.e.apply(this, [t, e, i])
        );
      },
      nw: function (t, e, i) {
        return Y.extend(
          this._change.n.apply(this, arguments),
          this._change.w.apply(this, [t, e, i])
        );
      },
    },
    _propagate: function (t, e) {
      Y.ui.plugin.call(this, t, [e, this.ui()]),
        "resize" !== t && this._trigger(t, e, this.ui());
    },
    plugins: {},
    ui: function () {
      return {
        originalElement: this.originalElement,
        element: this.element,
        helper: this.helper,
        position: this.position,
        size: this.size,
        originalSize: this.originalSize,
        originalPosition: this.originalPosition,
      };
    },
  }),
    Y.ui.plugin.add("resizable", "animate", {
      stop: function (e) {
        var i = Y(this).resizable("instance"),
          t = i.options,
          n = i._proportionallyResizeElements,
          s = n.length && /textarea/i.test(n[0].nodeName),
          o = s && i._hasScroll(n[0], "left") ? 0 : i.sizeDiff.height,
          r = s ? 0 : i.sizeDiff.width,
          s = { width: i.size.width - r, height: i.size.height - o },
          r =
            parseFloat(i.element.css("left")) +
              (i.position.left - i.originalPosition.left) || null,
          o =
            parseFloat(i.element.css("top")) +
              (i.position.top - i.originalPosition.top) || null;
        i.element.animate(Y.extend(s, o && r ? { top: o, left: r } : {}), {
          duration: t.animateDuration,
          easing: t.animateEasing,
          step: function () {
            var t = {
              width: parseFloat(i.element.css("width")),
              height: parseFloat(i.element.css("height")),
              top: parseFloat(i.element.css("top")),
              left: parseFloat(i.element.css("left")),
            };
            n && n.length && Y(n[0]).css({ width: t.width, height: t.height }),
              i._updateCache(t),
              i._propagate("resize", e);
          },
        });
      },
    }),
    Y.ui.plugin.add("resizable", "containment", {
      start: function () {
        var i,
          n,
          s = Y(this).resizable("instance"),
          t = s.options,
          e = s.element,
          o = t.containment,
          r =
            o instanceof Y
              ? o.get(0)
              : /parent/.test(o)
              ? e.parent().get(0)
              : o;
        r &&
          ((s.containerElement = Y(r)),
          /document/.test(o) || o === document
            ? ((s.containerOffset = { left: 0, top: 0 }),
              (s.containerPosition = { left: 0, top: 0 }),
              (s.parentData = {
                element: Y(document),
                left: 0,
                top: 0,
                width: Y(document).width(),
                height:
                  Y(document).height() || document.body.parentNode.scrollHeight,
              }))
            : ((i = Y(r)),
              (n = []),
              Y(["Top", "Right", "Left", "Bottom"]).each(function (t, e) {
                n[t] = s._num(i.css("padding" + e));
              }),
              (s.containerOffset = i.offset()),
              (s.containerPosition = i.position()),
              (s.containerSize = {
                height: i.innerHeight() - n[3],
                width: i.innerWidth() - n[1],
              }),
              (t = s.containerOffset),
              (e = s.containerSize.height),
              (o = s.containerSize.width),
              (o = s._hasScroll(r, "left") ? r.scrollWidth : o),
              (e = s._hasScroll(r) ? r.scrollHeight : e),
              (s.parentData = {
                element: r,
                left: t.left,
                top: t.top,
                width: o,
                height: e,
              })));
      },
      resize: function (t) {
        var e = Y(this).resizable("instance"),
          i = e.options,
          n = e.containerOffset,
          s = e.position,
          o = e._aspectRatio || t.shiftKey,
          r = { top: 0, left: 0 },
          a = e.containerElement,
          t = !0;
        a[0] !== document && /static/.test(a.css("position")) && (r = n),
          s.left < (e._helper ? n.left : 0) &&
            ((e.size.width =
              e.size.width +
              (e._helper
                ? e.position.left - n.left
                : e.position.left - r.left)),
            o && ((e.size.height = e.size.width / e.aspectRatio), (t = !1)),
            (e.position.left = i.helper ? n.left : 0)),
          s.top < (e._helper ? n.top : 0) &&
            ((e.size.height =
              e.size.height +
              (e._helper ? e.position.top - n.top : e.position.top)),
            o && ((e.size.width = e.size.height * e.aspectRatio), (t = !1)),
            (e.position.top = e._helper ? n.top : 0)),
          (i = e.containerElement.get(0) === e.element.parent().get(0)),
          (s = /relative|absolute/.test(e.containerElement.css("position"))),
          i && s
            ? ((e.offset.left = e.parentData.left + e.position.left),
              (e.offset.top = e.parentData.top + e.position.top))
            : ((e.offset.left = e.element.offset().left),
              (e.offset.top = e.element.offset().top)),
          (s = Math.abs(
            e.sizeDiff.width +
              (e._helper ? e.offset.left - r.left : e.offset.left - n.left)
          )),
          (n = Math.abs(
            e.sizeDiff.height +
              (e._helper ? e.offset.top - r.top : e.offset.top - n.top)
          )),
          s + e.size.width >= e.parentData.width &&
            ((e.size.width = e.parentData.width - s),
            o && ((e.size.height = e.size.width / e.aspectRatio), (t = !1))),
          n + e.size.height >= e.parentData.height &&
            ((e.size.height = e.parentData.height - n),
            o && ((e.size.width = e.size.height * e.aspectRatio), (t = !1))),
          t ||
            ((e.position.left = e.prevPosition.left),
            (e.position.top = e.prevPosition.top),
            (e.size.width = e.prevSize.width),
            (e.size.height = e.prevSize.height));
      },
      stop: function () {
        var t = Y(this).resizable("instance"),
          e = t.options,
          i = t.containerOffset,
          n = t.containerPosition,
          s = t.containerElement,
          o = Y(t.helper),
          r = o.offset(),
          a = o.outerWidth() - t.sizeDiff.width,
          o = o.outerHeight() - t.sizeDiff.height;
        t._helper &&
          !e.animate &&
          /relative/.test(s.css("position")) &&
          Y(this).css({ left: r.left - n.left - i.left, width: a, height: o }),
          t._helper &&
            !e.animate &&
            /static/.test(s.css("position")) &&
            Y(this).css({
              left: r.left - n.left - i.left,
              width: a,
              height: o,
            });
      },
    }),
    Y.ui.plugin.add("resizable", "alsoResize", {
      start: function () {
        var t = Y(this).resizable("instance").options;
        Y(t.alsoResize).each(function () {
          var t = Y(this);
          t.data("ui-resizable-alsoresize", {
            width: parseFloat(t.width()),
            height: parseFloat(t.height()),
            left: parseFloat(t.css("left")),
            top: parseFloat(t.css("top")),
          });
        });
      },
      resize: function (t, i) {
        var e = Y(this).resizable("instance"),
          n = e.options,
          s = e.originalSize,
          o = e.originalPosition,
          r = {
            height: e.size.height - s.height || 0,
            width: e.size.width - s.width || 0,
            top: e.position.top - o.top || 0,
            left: e.position.left - o.left || 0,
          };
        Y(n.alsoResize).each(function () {
          var t = Y(this),
            n = Y(this).data("ui-resizable-alsoresize"),
            s = {},
            e = t.parents(i.originalElement[0]).length
              ? ["width", "height"]
              : ["width", "height", "top", "left"];
          Y.each(e, function (t, e) {
            var i = (n[e] || 0) + (r[e] || 0);
            i && 0 <= i && (s[e] = i || null);
          }),
            t.css(s);
        });
      },
      stop: function () {
        Y(this).removeData("ui-resizable-alsoresize");
      },
    }),
    Y.ui.plugin.add("resizable", "ghost", {
      start: function () {
        var t = Y(this).resizable("instance"),
          e = t.size;
        (t.ghost = t.originalElement.clone()),
          t.ghost.css({
            opacity: 0.25,
            display: "block",
            position: "relative",
            height: e.height,
            width: e.width,
            margin: 0,
            left: 0,
            top: 0,
          }),
          t._addClass(t.ghost, "ui-resizable-ghost"),
          !1 !== Y.uiBackCompat &&
            "string" == typeof t.options.ghost &&
            t.ghost.addClass(this.options.ghost),
          t.ghost.appendTo(t.helper);
      },
      resize: function () {
        var t = Y(this).resizable("instance");
        t.ghost &&
          t.ghost.css({
            position: "relative",
            height: t.size.height,
            width: t.size.width,
          });
      },
      stop: function () {
        var t = Y(this).resizable("instance");
        t.ghost && t.helper && t.helper.get(0).removeChild(t.ghost.get(0));
      },
    }),
    Y.ui.plugin.add("resizable", "grid", {
      resize: function () {
        var t,
          e = Y(this).resizable("instance"),
          i = e.options,
          n = e.size,
          s = e.originalSize,
          o = e.originalPosition,
          r = e.axis,
          a = "number" == typeof i.grid ? [i.grid, i.grid] : i.grid,
          l = a[0] || 1,
          c = a[1] || 1,
          h = Math.round((n.width - s.width) / l) * l,
          u = Math.round((n.height - s.height) / c) * c,
          d = s.width + h,
          p = s.height + u,
          f = i.maxWidth && i.maxWidth < d,
          g = i.maxHeight && i.maxHeight < p,
          m = i.minWidth && i.minWidth > d,
          n = i.minHeight && i.minHeight > p;
        (i.grid = a),
          m && (d += l),
          n && (p += c),
          f && (d -= l),
          g && (p -= c),
          /^(se|s|e)$/.test(r)
            ? ((e.size.width = d), (e.size.height = p))
            : /^(ne)$/.test(r)
            ? ((e.size.width = d),
              (e.size.height = p),
              (e.position.top = o.top - u))
            : /^(sw)$/.test(r)
            ? ((e.size.width = d),
              (e.size.height = p),
              (e.position.left = o.left - h))
            : ((p - c <= 0 || d - l <= 0) &&
                (t = e._getPaddingPlusBorderDimensions(this)),
              0 < p - c
                ? ((e.size.height = p), (e.position.top = o.top - u))
                : ((p = c - t.height),
                  (e.size.height = p),
                  (e.position.top = o.top + s.height - p)),
              0 < d - l
                ? ((e.size.width = d), (e.position.left = o.left - h))
                : ((d = l - t.width),
                  (e.size.width = d),
                  (e.position.left = o.left + s.width - d)));
      },
    });
  Y.ui.resizable;
  Y.widget("ui.dialog", {
    version: "1.13.0",
    options: {
      appendTo: "body",
      autoOpen: !0,
      buttons: [],
      classes: {
        "ui-dialog": "ui-corner-all",
        "ui-dialog-titlebar": "ui-corner-all",
      },
      closeOnEscape: !0,
      closeText: "Close",
      draggable: !0,
      hide: null,
      height: "auto",
      maxHeight: null,
      maxWidth: null,
      minHeight: 150,
      minWidth: 150,
      modal: !1,
      position: {
        my: "center",
        at: "center",
        of: window,
        collision: "fit",
        using: function (t) {
          var e = Y(this).css(t).offset().top;
          e < 0 && Y(this).css("top", t.top - e);
        },
      },
      resizable: !0,
      show: null,
      title: null,
      width: 300,
      beforeClose: null,
      close: null,
      drag: null,
      dragStart: null,
      dragStop: null,
      focus: null,
      open: null,
      resize: null,
      resizeStart: null,
      resizeStop: null,
    },
    sizeRelatedOptions: {
      buttons: !0,
      height: !0,
      maxHeight: !0,
      maxWidth: !0,
      minHeight: !0,
      minWidth: !0,
      width: !0,
    },
    resizableRelatedOptions: {
      maxHeight: !0,
      maxWidth: !0,
      minHeight: !0,
      minWidth: !0,
    },
    _create: function () {
      (this.originalCss = {
        display: this.element[0].style.display,
        width: this.element[0].style.width,
        minHeight: this.element[0].style.minHeight,
        maxHeight: this.element[0].style.maxHeight,
        height: this.element[0].style.height,
      }),
        (this.originalPosition = {
          parent: this.element.parent(),
          index: this.element.parent().children().index(this.element),
        }),
        (this.originalTitle = this.element.attr("title")),
        null == this.options.title &&
          null != this.originalTitle &&
          (this.options.title = this.originalTitle),
        this.options.disabled && (this.options.disabled = !1),
        this._createWrapper(),
        this.element.show().removeAttr("title").appendTo(this.uiDialog),
        this._addClass("ui-dialog-content", "ui-widget-content"),
        this._createTitlebar(),
        this._createButtonPane(),
        this.options.draggable && Y.fn.draggable && this._makeDraggable(),
        this.options.resizable && Y.fn.resizable && this._makeResizable(),
        (this._isOpen = !1),
        this._trackFocus();
    },
    _init: function () {
      this.options.autoOpen && this.open();
    },
    _appendTo: function () {
      var t = this.options.appendTo;
      return t && (t.jquery || t.nodeType)
        ? Y(t)
        : this.document.find(t || "body").eq(0);
    },
    _destroy: function () {
      var t,
        e = this.originalPosition;
      this._untrackInstance(),
        this._destroyOverlay(),
        this.element.removeUniqueId().css(this.originalCss).detach(),
        this.uiDialog.remove(),
        this.originalTitle && this.element.attr("title", this.originalTitle),
        (t = e.parent.children().eq(e.index)).length && t[0] !== this.element[0]
          ? t.before(this.element)
          : e.parent.append(this.element);
    },
    widget: function () {
      return this.uiDialog;
    },
    disable: Y.noop,
    enable: Y.noop,
    close: function (t) {
      var e = this;
      this._isOpen &&
        !1 !== this._trigger("beforeClose", t) &&
        ((this._isOpen = !1),
        (this._focusedElement = null),
        this._destroyOverlay(),
        this._untrackInstance(),
        this.opener.filter(":focusable").trigger("focus").length ||
          Y.ui.safeBlur(Y.ui.safeActiveElement(this.document[0])),
        this._hide(this.uiDialog, this.options.hide, function () {
          e._trigger("close", t);
        }));
    },
    isOpen: function () {
      return this._isOpen;
    },
    moveToTop: function () {
      this._moveToTop();
    },
    _moveToTop: function (t, e) {
      var i = !1,
        n = this.uiDialog
          .siblings(".ui-front:visible")
          .map(function () {
            return +Y(this).css("z-index");
          })
          .get(),
        n = Math.max.apply(null, n);
      return (
        n >= +this.uiDialog.css("z-index") &&
          (this.uiDialog.css("z-index", n + 1), (i = !0)),
        i && !e && this._trigger("focus", t),
        i
      );
    },
    open: function () {
      var t = this;
      this._isOpen
        ? this._moveToTop() && this._focusTabbable()
        : ((this._isOpen = !0),
          (this.opener = Y(Y.ui.safeActiveElement(this.document[0]))),
          this._size(),
          this._position(),
          this._createOverlay(),
          this._moveToTop(null, !0),
          this.overlay &&
            this.overlay.css("z-index", this.uiDialog.css("z-index") - 1),
          this._show(this.uiDialog, this.options.show, function () {
            t._focusTabbable(), t._trigger("focus");
          }),
          this._makeFocusTarget(),
          this._trigger("open"));
    },
    _focusTabbable: function () {
      var t = this._focusedElement;
      (t = !(t = !(t = !(t = !(t = t || this.element.find("[autofocus]")).length
        ? this.element.find(":tabbable")
        : t).length
        ? this.uiDialogButtonPane.find(":tabbable")
        : t).length
        ? this.uiDialogTitlebarClose.filter(":tabbable")
        : t).length
        ? this.uiDialog
        : t)
        .eq(0)
        .trigger("focus");
    },
    _restoreTabbableFocus: function () {
      var t = Y.ui.safeActiveElement(this.document[0]);
      this.uiDialog[0] === t ||
        Y.contains(this.uiDialog[0], t) ||
        this._focusTabbable();
    },
    _keepFocus: function (t) {
      t.preventDefault(),
        this._restoreTabbableFocus(),
        this._delay(this._restoreTabbableFocus);
    },
    _createWrapper: function () {
      (this.uiDialog = Y("<div>")
        .hide()
        .attr({ tabIndex: -1, role: "dialog" })
        .appendTo(this._appendTo())),
        this._addClass(
          this.uiDialog,
          "ui-dialog",
          "ui-widget ui-widget-content ui-front"
        ),
        this._on(this.uiDialog, {
          keydown: function (t) {
            if (
              this.options.closeOnEscape &&
              !t.isDefaultPrevented() &&
              t.keyCode &&
              t.keyCode === Y.ui.keyCode.ESCAPE
            )
              return t.preventDefault(), void this.close(t);
            var e, i, n;
            t.keyCode !== Y.ui.keyCode.TAB ||
              t.isDefaultPrevented() ||
              ((e = this.uiDialog.find(":tabbable")),
              (i = e.first()),
              (n = e.last()),
              (t.target !== n[0] && t.target !== this.uiDialog[0]) || t.shiftKey
                ? (t.target !== i[0] && t.target !== this.uiDialog[0]) ||
                  !t.shiftKey ||
                  (this._delay(function () {
                    n.trigger("focus");
                  }),
                  t.preventDefault())
                : (this._delay(function () {
                    i.trigger("focus");
                  }),
                  t.preventDefault()));
          },
          mousedown: function (t) {
            this._moveToTop(t) && this._focusTabbable();
          },
        }),
        this.element.find("[aria-describedby]").length ||
          this.uiDialog.attr({
            "aria-describedby": this.element.uniqueId().attr("id"),
          });
    },
    _createTitlebar: function () {
      var t;
      (this.uiDialogTitlebar = Y("<div>")),
        this._addClass(
          this.uiDialogTitlebar,
          "ui-dialog-titlebar",
          "ui-widget-header ui-helper-clearfix"
        ),
        this._on(this.uiDialogTitlebar, {
          mousedown: function (t) {
            Y(t.target).closest(".ui-dialog-titlebar-close") ||
              this.uiDialog.trigger("focus");
          },
        }),
        (this.uiDialogTitlebarClose = Y("<button type='button'></button>")
          .button({
            label: Y("<a>").text(this.options.closeText).html(),
            icon: "ui-icon-closethick",
            showLabel: !1,
          })
          .appendTo(this.uiDialogTitlebar)),
        this._addClass(this.uiDialogTitlebarClose, "ui-dialog-titlebar-close"),
        this._on(this.uiDialogTitlebarClose, {
          click: function (t) {
            t.preventDefault(), this.close(t);
          },
        }),
        (t = Y("<span>").uniqueId().prependTo(this.uiDialogTitlebar)),
        this._addClass(t, "ui-dialog-title"),
        this._title(t),
        this.uiDialogTitlebar.prependTo(this.uiDialog),
        this.uiDialog.attr({ "aria-labelledby": t.attr("id") });
    },
    _title: function (t) {
      this.options.title ? t.text(this.options.title) : t.html("&#160;");
    },
    _createButtonPane: function () {
      (this.uiDialogButtonPane = Y("<div>")),
        this._addClass(
          this.uiDialogButtonPane,
          "ui-dialog-buttonpane",
          "ui-widget-content ui-helper-clearfix"
        ),
        (this.uiButtonSet = Y("<div>").appendTo(this.uiDialogButtonPane)),
        this._addClass(this.uiButtonSet, "ui-dialog-buttonset"),
        this._createButtons();
    },
    _createButtons: function () {
      var n = this,
        t = this.options.buttons;
      this.uiDialogButtonPane.remove(),
        this.uiButtonSet.empty(),
        Y.isEmptyObject(t) || (Array.isArray(t) && !t.length)
          ? this._removeClass(this.uiDialog, "ui-dialog-buttons")
          : (Y.each(t, function (t, e) {
              var i;
              (e = Y.extend(
                { type: "button" },
                (e = "function" == typeof e ? { click: e, text: t } : e)
              )),
                (i = e.click),
                (t = {
                  icon: e.icon,
                  iconPosition: e.iconPosition,
                  showLabel: e.showLabel,
                  icons: e.icons,
                  text: e.text,
                }),
                delete e.click,
                delete e.icon,
                delete e.iconPosition,
                delete e.showLabel,
                delete e.icons,
                "boolean" == typeof e.text && delete e.text,
                Y("<button></button>", e)
                  .button(t)
                  .appendTo(n.uiButtonSet)
                  .on("click", function () {
                    i.apply(n.element[0], arguments);
                  });
            }),
            this._addClass(this.uiDialog, "ui-dialog-buttons"),
            this.uiDialogButtonPane.appendTo(this.uiDialog));
    },
    _makeDraggable: function () {
      var s = this,
        o = this.options;
      function r(t) {
        return { position: t.position, offset: t.offset };
      }
      this.uiDialog.draggable({
        cancel: ".ui-dialog-content, .ui-dialog-titlebar-close",
        handle: ".ui-dialog-titlebar",
        containment: "document",
        start: function (t, e) {
          s._addClass(Y(this), "ui-dialog-dragging"),
            s._blockFrames(),
            s._trigger("dragStart", t, r(e));
        },
        drag: function (t, e) {
          s._trigger("drag", t, r(e));
        },
        stop: function (t, e) {
          var i = e.offset.left - s.document.scrollLeft(),
            n = e.offset.top - s.document.scrollTop();
          (o.position = {
            my: "left top",
            at:
              "left" +
              (0 <= i ? "+" : "") +
              i +
              " top" +
              (0 <= n ? "+" : "") +
              n,
            of: s.window,
          }),
            s._removeClass(Y(this), "ui-dialog-dragging"),
            s._unblockFrames(),
            s._trigger("dragStop", t, r(e));
        },
      });
    },
    _makeResizable: function () {
      var s = this,
        o = this.options,
        t = o.resizable,
        e = this.uiDialog.css("position"),
        t = "string" == typeof t ? t : "n,e,s,w,se,sw,ne,nw";
      function r(t) {
        return {
          originalPosition: t.originalPosition,
          originalSize: t.originalSize,
          position: t.position,
          size: t.size,
        };
      }
      this.uiDialog
        .resizable({
          cancel: ".ui-dialog-content",
          containment: "document",
          alsoResize: this.element,
          maxWidth: o.maxWidth,
          maxHeight: o.maxHeight,
          minWidth: o.minWidth,
          minHeight: this._minHeight(),
          handles: t,
          start: function (t, e) {
            s._addClass(Y(this), "ui-dialog-resizing"),
              s._blockFrames(),
              s._trigger("resizeStart", t, r(e));
          },
          resize: function (t, e) {
            s._trigger("resize", t, r(e));
          },
          stop: function (t, e) {
            var i = s.uiDialog.offset(),
              n = i.left - s.document.scrollLeft(),
              i = i.top - s.document.scrollTop();
            (o.height = s.uiDialog.height()),
              (o.width = s.uiDialog.width()),
              (o.position = {
                my: "left top",
                at:
                  "left" +
                  (0 <= n ? "+" : "") +
                  n +
                  " top" +
                  (0 <= i ? "+" : "") +
                  i,
                of: s.window,
              }),
              s._removeClass(Y(this), "ui-dialog-resizing"),
              s._unblockFrames(),
              s._trigger("resizeStop", t, r(e));
          },
        })
        .css("position", e);
    },
    _trackFocus: function () {
      this._on(this.widget(), {
        focusin: function (t) {
          this._makeFocusTarget(), (this._focusedElement = Y(t.target));
        },
      });
    },
    _makeFocusTarget: function () {
      this._untrackInstance(), this._trackingInstances().unshift(this);
    },
    _untrackInstance: function () {
      var t = this._trackingInstances(),
        e = Y.inArray(this, t);
      -1 !== e && t.splice(e, 1);
    },
    _trackingInstances: function () {
      var t = this.document.data("ui-dialog-instances");
      return t || this.document.data("ui-dialog-instances", (t = [])), t;
    },
    _minHeight: function () {
      var t = this.options;
      return "auto" === t.height
        ? t.minHeight
        : Math.min(t.minHeight, t.height);
    },
    _position: function () {
      var t = this.uiDialog.is(":visible");
      t || this.uiDialog.show(),
        this.uiDialog.position(this.options.position),
        t || this.uiDialog.hide();
    },
    _setOptions: function (t) {
      var i = this,
        n = !1,
        s = {};
      Y.each(t, function (t, e) {
        i._setOption(t, e),
          t in i.sizeRelatedOptions && (n = !0),
          t in i.resizableRelatedOptions && (s[t] = e);
      }),
        n && (this._size(), this._position()),
        this.uiDialog.is(":data(ui-resizable)") &&
          this.uiDialog.resizable("option", s);
    },
    _setOption: function (t, e) {
      var i,
        n = this.uiDialog;
      "disabled" !== t &&
        (this._super(t, e),
        "appendTo" === t && this.uiDialog.appendTo(this._appendTo()),
        "buttons" === t && this._createButtons(),
        "closeText" === t &&
          this.uiDialogTitlebarClose.button({
            label: Y("<a>")
              .text("" + this.options.closeText)
              .html(),
          }),
        "draggable" === t &&
          ((i = n.is(":data(ui-draggable)")) && !e && n.draggable("destroy"),
          !i && e && this._makeDraggable()),
        "position" === t && this._position(),
        "resizable" === t &&
          ((i = n.is(":data(ui-resizable)")) && !e && n.resizable("destroy"),
          i && "string" == typeof e && n.resizable("option", "handles", e),
          i || !1 === e || this._makeResizable()),
        "title" === t &&
          this._title(this.uiDialogTitlebar.find(".ui-dialog-title")));
    },
    _size: function () {
      var t,
        e,
        i,
        n = this.options;
      this.element
        .show()
        .css({ width: "auto", minHeight: 0, maxHeight: "none", height: 0 }),
        n.minWidth > n.width && (n.width = n.minWidth),
        (t = this.uiDialog
          .css({ height: "auto", width: n.width })
          .outerHeight()),
        (e = Math.max(0, n.minHeight - t)),
        (i =
          "number" == typeof n.maxHeight
            ? Math.max(0, n.maxHeight - t)
            : "none"),
        "auto" === n.height
          ? this.element.css({ minHeight: e, maxHeight: i, height: "auto" })
          : this.element.height(Math.max(0, n.height - t)),
        this.uiDialog.is(":data(ui-resizable)") &&
          this.uiDialog.resizable("option", "minHeight", this._minHeight());
    },
    _blockFrames: function () {
      this.iframeBlocks = this.document.find("iframe").map(function () {
        var t = Y(this);
        return Y("<div>")
          .css({
            position: "absolute",
            width: t.outerWidth(),
            height: t.outerHeight(),
          })
          .appendTo(t.parent())
          .offset(t.offset())[0];
      });
    },
    _unblockFrames: function () {
      this.iframeBlocks &&
        (this.iframeBlocks.remove(), delete this.iframeBlocks);
    },
    _allowInteraction: function (t) {
      return (
        !!Y(t.target).closest(".ui-dialog").length ||
        !!Y(t.target).closest(".ui-datepicker").length
      );
    },
    _createOverlay: function () {
      var i, n;
      this.options.modal &&
        ((i = Y.fn.jquery.substring(0, 4)),
        (n = !0),
        this._delay(function () {
          n = !1;
        }),
        this.document.data("ui-dialog-overlays") ||
          this.document.on(
            "focusin.ui-dialog",
            function (t) {
              var e;
              n ||
                (e = this._trackingInstances()[0])._allowInteraction(t) ||
                (t.preventDefault(),
                e._focusTabbable(),
                ("3.4." !== i && "3.5." !== i) ||
                  e._delay(e._restoreTabbableFocus));
            }.bind(this)
          ),
        (this.overlay = Y("<div>").appendTo(this._appendTo())),
        this._addClass(this.overlay, null, "ui-widget-overlay ui-front"),
        this._on(this.overlay, { mousedown: "_keepFocus" }),
        this.document.data(
          "ui-dialog-overlays",
          (this.document.data("ui-dialog-overlays") || 0) + 1
        ));
    },
    _destroyOverlay: function () {
      var t;
      this.options.modal &&
        this.overlay &&
        ((t = this.document.data("ui-dialog-overlays") - 1)
          ? this.document.data("ui-dialog-overlays", t)
          : (this.document.off("focusin.ui-dialog"),
            this.document.removeData("ui-dialog-overlays")),
        this.overlay.remove(),
        (this.overlay = null));
    },
  }),
    !1 !== Y.uiBackCompat &&
      Y.widget("ui.dialog", Y.ui.dialog, {
        options: { dialogClass: "" },
        _createWrapper: function () {
          this._super(), this.uiDialog.addClass(this.options.dialogClass);
        },
        _setOption: function (t, e) {
          "dialogClass" === t &&
            this.uiDialog.removeClass(this.options.dialogClass).addClass(e),
            this._superApply(arguments);
        },
      });
  Y.ui.dialog;
  function lt(t, e, i) {
    return e <= t && t < e + i;
  }
  Y.widget("ui.droppable", {
    version: "1.13.0",
    widgetEventPrefix: "drop",
    options: {
      accept: "*",
      addClasses: !0,
      greedy: !1,
      scope: "default",
      tolerance: "intersect",
      activate: null,
      deactivate: null,
      drop: null,
      out: null,
      over: null,
    },
    _create: function () {
      var t,
        e = this.options,
        i = e.accept;
      (this.isover = !1),
        (this.isout = !0),
        (this.accept =
          "function" == typeof i
            ? i
            : function (t) {
                return t.is(i);
              }),
        (this.proportions = function () {
          if (!arguments.length)
            return (t = t || {
              width: this.element[0].offsetWidth,
              height: this.element[0].offsetHeight,
            });
          t = arguments[0];
        }),
        this._addToManager(e.scope),
        e.addClasses && this._addClass("ui-droppable");
    },
    _addToManager: function (t) {
      (Y.ui.ddmanager.droppables[t] = Y.ui.ddmanager.droppables[t] || []),
        Y.ui.ddmanager.droppables[t].push(this);
    },
    _splice: function (t) {
      for (var e = 0; e < t.length; e++) t[e] === this && t.splice(e, 1);
    },
    _destroy: function () {
      var t = Y.ui.ddmanager.droppables[this.options.scope];
      this._splice(t);
    },
    _setOption: function (t, e) {
      var i;
      "accept" === t
        ? (this.accept =
            "function" == typeof e
              ? e
              : function (t) {
                  return t.is(e);
                })
        : "scope" === t &&
          ((i = Y.ui.ddmanager.droppables[this.options.scope]),
          this._splice(i),
          this._addToManager(e)),
        this._super(t, e);
    },
    _activate: function (t) {
      var e = Y.ui.ddmanager.current;
      this._addActiveClass(), e && this._trigger("activate", t, this.ui(e));
    },
    _deactivate: function (t) {
      var e = Y.ui.ddmanager.current;
      this._removeActiveClass(),
        e && this._trigger("deactivate", t, this.ui(e));
    },
    _over: function (t) {
      var e = Y.ui.ddmanager.current;
      e &&
        (e.currentItem || e.element)[0] !== this.element[0] &&
        this.accept.call(this.element[0], e.currentItem || e.element) &&
        (this._addHoverClass(), this._trigger("over", t, this.ui(e)));
    },
    _out: function (t) {
      var e = Y.ui.ddmanager.current;
      e &&
        (e.currentItem || e.element)[0] !== this.element[0] &&
        this.accept.call(this.element[0], e.currentItem || e.element) &&
        (this._removeHoverClass(), this._trigger("out", t, this.ui(e)));
    },
    _drop: function (e, t) {
      var i = t || Y.ui.ddmanager.current,
        n = !1;
      return (
        !(!i || (i.currentItem || i.element)[0] === this.element[0]) &&
        (this.element
          .find(":data(ui-droppable)")
          .not(".ui-draggable-dragging")
          .each(function () {
            var t = Y(this).droppable("instance");
            if (
              t.options.greedy &&
              !t.options.disabled &&
              t.options.scope === i.options.scope &&
              t.accept.call(t.element[0], i.currentItem || i.element) &&
              Y.ui.intersect(
                i,
                Y.extend(t, { offset: t.element.offset() }),
                t.options.tolerance,
                e
              )
            )
              return !(n = !0);
          }),
        !n &&
          !!this.accept.call(this.element[0], i.currentItem || i.element) &&
          (this._removeActiveClass(),
          this._removeHoverClass(),
          this._trigger("drop", e, this.ui(i)),
          this.element))
      );
    },
    ui: function (t) {
      return {
        draggable: t.currentItem || t.element,
        helper: t.helper,
        position: t.position,
        offset: t.positionAbs,
      };
    },
    _addHoverClass: function () {
      this._addClass("ui-droppable-hover");
    },
    _removeHoverClass: function () {
      this._removeClass("ui-droppable-hover");
    },
    _addActiveClass: function () {
      this._addClass("ui-droppable-active");
    },
    _removeActiveClass: function () {
      this._removeClass("ui-droppable-active");
    },
  }),
    (Y.ui.intersect = function (t, e, i, n) {
      if (!e.offset) return !1;
      var s = (t.positionAbs || t.position.absolute).left + t.margins.left,
        o = (t.positionAbs || t.position.absolute).top + t.margins.top,
        r = s + t.helperProportions.width,
        a = o + t.helperProportions.height,
        l = e.offset.left,
        c = e.offset.top,
        h = l + e.proportions().width,
        u = c + e.proportions().height;
      switch (i) {
        case "fit":
          return l <= s && r <= h && c <= o && a <= u;
        case "intersect":
          return (
            l < s + t.helperProportions.width / 2 &&
            r - t.helperProportions.width / 2 < h &&
            c < o + t.helperProportions.height / 2 &&
            a - t.helperProportions.height / 2 < u
          );
        case "pointer":
          return (
            lt(n.pageY, c, e.proportions().height) &&
            lt(n.pageX, l, e.proportions().width)
          );
        case "touch":
          return (
            ((c <= o && o <= u) || (c <= a && a <= u) || (o < c && u < a)) &&
            ((l <= s && s <= h) || (l <= r && r <= h) || (s < l && h < r))
          );
        default:
          return !1;
      }
    }),
    !(Y.ui.ddmanager = {
      current: null,
      droppables: { default: [] },
      prepareOffsets: function (t, e) {
        var i,
          n,
          s = Y.ui.ddmanager.droppables[t.options.scope] || [],
          o = e ? e.type : null,
          r = (t.currentItem || t.element)
            .find(":data(ui-droppable)")
            .addBack();
        t: for (i = 0; i < s.length; i++)
          if (
            !(
              s[i].options.disabled ||
              (t &&
                !s[i].accept.call(s[i].element[0], t.currentItem || t.element))
            )
          ) {
            for (n = 0; n < r.length; n++)
              if (r[n] === s[i].element[0]) {
                s[i].proportions().height = 0;
                continue t;
              }
            (s[i].visible = "none" !== s[i].element.css("display")),
              s[i].visible &&
                ("mousedown" === o && s[i]._activate.call(s[i], e),
                (s[i].offset = s[i].element.offset()),
                s[i].proportions({
                  width: s[i].element[0].offsetWidth,
                  height: s[i].element[0].offsetHeight,
                }));
          }
      },
      drop: function (t, e) {
        var i = !1;
        return (
          Y.each(
            (Y.ui.ddmanager.droppables[t.options.scope] || []).slice(),
            function () {
              this.options &&
                (!this.options.disabled &&
                  this.visible &&
                  Y.ui.intersect(t, this, this.options.tolerance, e) &&
                  (i = this._drop.call(this, e) || i),
                !this.options.disabled &&
                  this.visible &&
                  this.accept.call(
                    this.element[0],
                    t.currentItem || t.element
                  ) &&
                  ((this.isout = !0),
                  (this.isover = !1),
                  this._deactivate.call(this, e)));
            }
          ),
          i
        );
      },
      dragStart: function (t, e) {
        t.element.parentsUntil("body").on("scroll.droppable", function () {
          t.options.refreshPositions || Y.ui.ddmanager.prepareOffsets(t, e);
        });
      },
      drag: function (s, o) {
        s.options.refreshPositions && Y.ui.ddmanager.prepareOffsets(s, o),
          Y.each(Y.ui.ddmanager.droppables[s.options.scope] || [], function () {
            var t, e, i, n;
            this.options.disabled ||
              this.greedyChild ||
              !this.visible ||
              ((n =
                !(i = Y.ui.intersect(s, this, this.options.tolerance, o)) &&
                this.isover
                  ? "isout"
                  : i && !this.isover
                  ? "isover"
                  : null) &&
                (this.options.greedy &&
                  ((e = this.options.scope),
                  (i = this.element
                    .parents(":data(ui-droppable)")
                    .filter(function () {
                      return Y(this).droppable("instance").options.scope === e;
                    })).length &&
                    ((t = Y(i[0]).droppable("instance")).greedyChild =
                      "isover" === n)),
                t &&
                  "isover" === n &&
                  ((t.isover = !1), (t.isout = !0), t._out.call(t, o)),
                (this[n] = !0),
                (this["isout" === n ? "isover" : "isout"] = !1),
                this["isover" === n ? "_over" : "_out"].call(this, o),
                t &&
                  "isout" === n &&
                  ((t.isout = !1), (t.isover = !0), t._over.call(t, o))));
          });
      },
      dragStop: function (t, e) {
        t.element.parentsUntil("body").off("scroll.droppable"),
          t.options.refreshPositions || Y.ui.ddmanager.prepareOffsets(t, e);
      },
    }) !== Y.uiBackCompat &&
      Y.widget("ui.droppable", Y.ui.droppable, {
        options: { hoverClass: !1, activeClass: !1 },
        _addActiveClass: function () {
          this._super(),
            this.options.activeClass &&
              this.element.addClass(this.options.activeClass);
        },
        _removeActiveClass: function () {
          this._super(),
            this.options.activeClass &&
              this.element.removeClass(this.options.activeClass);
        },
        _addHoverClass: function () {
          this._super(),
            this.options.hoverClass &&
              this.element.addClass(this.options.hoverClass);
        },
        _removeHoverClass: function () {
          this._super(),
            this.options.hoverClass &&
              this.element.removeClass(this.options.hoverClass);
        },
      });
  Y.ui.droppable,
    Y.widget("ui.progressbar", {
      version: "1.13.0",
      options: {
        classes: {
          "ui-progressbar": "ui-corner-all",
          "ui-progressbar-value": "ui-corner-left",
          "ui-progressbar-complete": "ui-corner-right",
        },
        max: 100,
        value: 0,
        change: null,
        complete: null,
      },
      min: 0,
      _create: function () {
        (this.oldValue = this.options.value = this._constrainedValue()),
          this.element.attr({ role: "progressbar", "aria-valuemin": this.min }),
          this._addClass("ui-progressbar", "ui-widget ui-widget-content"),
          (this.valueDiv = Y("<div>").appendTo(this.element)),
          this._addClass(
            this.valueDiv,
            "ui-progressbar-value",
            "ui-widget-header"
          ),
          this._refreshValue();
      },
      _destroy: function () {
        this.element.removeAttr(
          "role aria-valuemin aria-valuemax aria-valuenow"
        ),
          this.valueDiv.remove();
      },
      value: function (t) {
        if (void 0 === t) return this.options.value;
        (this.options.value = this._constrainedValue(t)), this._refreshValue();
      },
      _constrainedValue: function (t) {
        return (
          void 0 === t && (t = this.options.value),
          (this.indeterminate = !1 === t),
          "number" != typeof t && (t = 0),
          !this.indeterminate &&
            Math.min(this.options.max, Math.max(this.min, t))
        );
      },
      _setOptions: function (t) {
        var e = t.value;
        delete t.value,
          this._super(t),
          (this.options.value = this._constrainedValue(e)),
          this._refreshValue();
      },
      _setOption: function (t, e) {
        "max" === t && (e = Math.max(this.min, e)), this._super(t, e);
      },
      _setOptionDisabled: function (t) {
        this._super(t),
          this.element.attr("aria-disabled", t),
          this._toggleClass(null, "ui-state-disabled", !!t);
      },
      _percentage: function () {
        return this.indeterminate
          ? 100
          : (100 * (this.options.value - this.min)) /
              (this.options.max - this.min);
      },
      _refreshValue: function () {
        var t = this.options.value,
          e = this._percentage();
        this.valueDiv
          .toggle(this.indeterminate || t > this.min)
          .width(e.toFixed(0) + "%"),
          this._toggleClass(
            this.valueDiv,
            "ui-progressbar-complete",
            null,
            t === this.options.max
          )._toggleClass(
            "ui-progressbar-indeterminate",
            null,
            this.indeterminate
          ),
          this.indeterminate
            ? (this.element.removeAttr("aria-valuenow"),
              this.overlayDiv ||
                ((this.overlayDiv = Y("<div>").appendTo(this.valueDiv)),
                this._addClass(this.overlayDiv, "ui-progressbar-overlay")))
            : (this.element.attr({
                "aria-valuemax": this.options.max,
                "aria-valuenow": t,
              }),
              this.overlayDiv &&
                (this.overlayDiv.remove(), (this.overlayDiv = null))),
          this.oldValue !== t && ((this.oldValue = t), this._trigger("change")),
          t === this.options.max && this._trigger("complete");
      },
    }),
    Y.widget("ui.selectable", Y.ui.mouse, {
      version: "1.13.0",
      options: {
        appendTo: "body",
        autoRefresh: !0,
        distance: 0,
        filter: "*",
        tolerance: "touch",
        selected: null,
        selecting: null,
        start: null,
        stop: null,
        unselected: null,
        unselecting: null,
      },
      _create: function () {
        var i = this;
        this._addClass("ui-selectable"),
          (this.dragged = !1),
          (this.refresh = function () {
            (i.elementPos = Y(i.element[0]).offset()),
              (i.selectees = Y(i.options.filter, i.element[0])),
              i._addClass(i.selectees, "ui-selectee"),
              i.selectees.each(function () {
                var t = Y(this),
                  e = t.offset(),
                  e = {
                    left: e.left - i.elementPos.left,
                    top: e.top - i.elementPos.top,
                  };
                Y.data(this, "selectable-item", {
                  element: this,
                  $element: t,
                  left: e.left,
                  top: e.top,
                  right: e.left + t.outerWidth(),
                  bottom: e.top + t.outerHeight(),
                  startselected: !1,
                  selected: t.hasClass("ui-selected"),
                  selecting: t.hasClass("ui-selecting"),
                  unselecting: t.hasClass("ui-unselecting"),
                });
              });
          }),
          this.refresh(),
          this._mouseInit(),
          (this.helper = Y("<div>")),
          this._addClass(this.helper, "ui-selectable-helper");
      },
      _destroy: function () {
        this.selectees.removeData("selectable-item"), this._mouseDestroy();
      },
      _mouseStart: function (i) {
        var n = this,
          t = this.options;
        (this.opos = [i.pageX, i.pageY]),
          (this.elementPos = Y(this.element[0]).offset()),
          this.options.disabled ||
            ((this.selectees = Y(t.filter, this.element[0])),
            this._trigger("start", i),
            Y(t.appendTo).append(this.helper),
            this.helper.css({
              left: i.pageX,
              top: i.pageY,
              width: 0,
              height: 0,
            }),
            t.autoRefresh && this.refresh(),
            this.selectees.filter(".ui-selected").each(function () {
              var t = Y.data(this, "selectable-item");
              (t.startselected = !0),
                i.metaKey ||
                  i.ctrlKey ||
                  (n._removeClass(t.$element, "ui-selected"),
                  (t.selected = !1),
                  n._addClass(t.$element, "ui-unselecting"),
                  (t.unselecting = !0),
                  n._trigger("unselecting", i, { unselecting: t.element }));
            }),
            Y(i.target)
              .parents()
              .addBack()
              .each(function () {
                var t,
                  e = Y.data(this, "selectable-item");
                if (e)
                  return (
                    (t =
                      (!i.metaKey && !i.ctrlKey) ||
                      !e.$element.hasClass("ui-selected")),
                    n
                      ._removeClass(
                        e.$element,
                        t ? "ui-unselecting" : "ui-selected"
                      )
                      ._addClass(
                        e.$element,
                        t ? "ui-selecting" : "ui-unselecting"
                      ),
                    (e.unselecting = !t),
                    (e.selecting = t),
                    (e.selected = t)
                      ? n._trigger("selecting", i, { selecting: e.element })
                      : n._trigger("unselecting", i, {
                          unselecting: e.element,
                        }),
                    !1
                  );
              }));
      },
      _mouseDrag: function (n) {
        if (((this.dragged = !0), !this.options.disabled)) {
          var t,
            s = this,
            o = this.options,
            r = this.opos[0],
            a = this.opos[1],
            l = n.pageX,
            c = n.pageY;
          return (
            l < r && ((t = l), (l = r), (r = t)),
            c < a && ((t = c), (c = a), (a = t)),
            this.helper.css({ left: r, top: a, width: l - r, height: c - a }),
            this.selectees.each(function () {
              var t = Y.data(this, "selectable-item"),
                e = !1,
                i = {};
              t &&
                t.element !== s.element[0] &&
                ((i.left = t.left + s.elementPos.left),
                (i.right = t.right + s.elementPos.left),
                (i.top = t.top + s.elementPos.top),
                (i.bottom = t.bottom + s.elementPos.top),
                "touch" === o.tolerance
                  ? (e = !(
                      i.left > l ||
                      i.right < r ||
                      i.top > c ||
                      i.bottom < a
                    ))
                  : "fit" === o.tolerance &&
                    (e =
                      i.left > r && i.right < l && i.top > a && i.bottom < c),
                e
                  ? (t.selected &&
                      (s._removeClass(t.$element, "ui-selected"),
                      (t.selected = !1)),
                    t.unselecting &&
                      (s._removeClass(t.$element, "ui-unselecting"),
                      (t.unselecting = !1)),
                    t.selecting ||
                      (s._addClass(t.$element, "ui-selecting"),
                      (t.selecting = !0),
                      s._trigger("selecting", n, { selecting: t.element })))
                  : (t.selecting &&
                      ((n.metaKey || n.ctrlKey) && t.startselected
                        ? (s._removeClass(t.$element, "ui-selecting"),
                          (t.selecting = !1),
                          s._addClass(t.$element, "ui-selected"),
                          (t.selected = !0))
                        : (s._removeClass(t.$element, "ui-selecting"),
                          (t.selecting = !1),
                          t.startselected &&
                            (s._addClass(t.$element, "ui-unselecting"),
                            (t.unselecting = !0)),
                          s._trigger("unselecting", n, {
                            unselecting: t.element,
                          }))),
                    t.selected &&
                      (n.metaKey ||
                        n.ctrlKey ||
                        t.startselected ||
                        (s._removeClass(t.$element, "ui-selected"),
                        (t.selected = !1),
                        s._addClass(t.$element, "ui-unselecting"),
                        (t.unselecting = !0),
                        s._trigger("unselecting", n, {
                          unselecting: t.element,
                        })))));
            }),
            !1
          );
        }
      },
      _mouseStop: function (e) {
        var i = this;
        return (
          (this.dragged = !1),
          Y(".ui-unselecting", this.element[0]).each(function () {
            var t = Y.data(this, "selectable-item");
            i._removeClass(t.$element, "ui-unselecting"),
              (t.unselecting = !1),
              (t.startselected = !1),
              i._trigger("unselected", e, { unselected: t.element });
          }),
          Y(".ui-selecting", this.element[0]).each(function () {
            var t = Y.data(this, "selectable-item");
            i
              ._removeClass(t.$element, "ui-selecting")
              ._addClass(t.$element, "ui-selected"),
              (t.selecting = !1),
              (t.selected = !0),
              (t.startselected = !0),
              i._trigger("selected", e, { selected: t.element });
          }),
          this._trigger("stop", e),
          this.helper.remove(),
          !1
        );
      },
    }),
    Y.widget("ui.selectmenu", [
      Y.ui.formResetMixin,
      {
        version: "1.13.0",
        defaultElement: "<select>",
        options: {
          appendTo: null,
          classes: {
            "ui-selectmenu-button-open": "ui-corner-top",
            "ui-selectmenu-button-closed": "ui-corner-all",
          },
          disabled: null,
          icons: { button: "ui-icon-triangle-1-s" },
          position: { my: "left top", at: "left bottom", collision: "none" },
          width: !1,
          change: null,
          close: null,
          focus: null,
          open: null,
          select: null,
        },
        _create: function () {
          var t = this.element.uniqueId().attr("id");
          (this.ids = { element: t, button: t + "-button", menu: t + "-menu" }),
            this._drawButton(),
            this._drawMenu(),
            this._bindFormResetHandler(),
            (this._rendered = !1),
            (this.menuItems = Y());
        },
        _drawButton: function () {
          var t,
            e = this,
            i = this._parseOption(
              this.element.find("option:selected"),
              this.element[0].selectedIndex
            );
          (this.labels = this.element.labels().attr("for", this.ids.button)),
            this._on(this.labels, {
              click: function (t) {
                this.button.trigger("focus"), t.preventDefault();
              },
            }),
            this.element.hide(),
            (this.button = Y("<span>", {
              tabindex: this.options.disabled ? -1 : 0,
              id: this.ids.button,
              role: "combobox",
              "aria-expanded": "false",
              "aria-autocomplete": "list",
              "aria-owns": this.ids.menu,
              "aria-haspopup": "true",
              title: this.element.attr("title"),
            }).insertAfter(this.element)),
            this._addClass(
              this.button,
              "ui-selectmenu-button ui-selectmenu-button-closed",
              "ui-button ui-widget"
            ),
            (t = Y("<span>").appendTo(this.button)),
            this._addClass(
              t,
              "ui-selectmenu-icon",
              "ui-icon " + this.options.icons.button
            ),
            (this.buttonItem = this._renderButtonItem(i).appendTo(this.button)),
            !1 !== this.options.width && this._resizeButton(),
            this._on(this.button, this._buttonEvents),
            this.button.one("focusin", function () {
              e._rendered || e._refreshMenu();
            });
        },
        _drawMenu: function () {
          var i = this;
          (this.menu = Y("<ul>", {
            "aria-hidden": "true",
            "aria-labelledby": this.ids.button,
            id: this.ids.menu,
          })),
            (this.menuWrap = Y("<div>").append(this.menu)),
            this._addClass(this.menuWrap, "ui-selectmenu-menu", "ui-front"),
            this.menuWrap.appendTo(this._appendTo()),
            (this.menuInstance = this.menu
              .menu({
                classes: { "ui-menu": "ui-corner-bottom" },
                role: "listbox",
                select: function (t, e) {
                  t.preventDefault(),
                    i._setSelection(),
                    i._select(e.item.data("ui-selectmenu-item"), t);
                },
                focus: function (t, e) {
                  e = e.item.data("ui-selectmenu-item");
                  null != i.focusIndex &&
                    e.index !== i.focusIndex &&
                    (i._trigger("focus", t, { item: e }),
                    i.isOpen || i._select(e, t)),
                    (i.focusIndex = e.index),
                    i.button.attr(
                      "aria-activedescendant",
                      i.menuItems.eq(e.index).attr("id")
                    );
                },
              })
              .menu("instance")),
            this.menuInstance._off(this.menu, "mouseleave"),
            (this.menuInstance._closeOnDocumentClick = function () {
              return !1;
            }),
            (this.menuInstance._isDivider = function () {
              return !1;
            });
        },
        refresh: function () {
          this._refreshMenu(),
            this.buttonItem.replaceWith(
              (this.buttonItem = this._renderButtonItem(
                this._getSelectedItem().data("ui-selectmenu-item") || {}
              ))
            ),
            null === this.options.width && this._resizeButton();
        },
        _refreshMenu: function () {
          var t = this.element.find("option");
          this.menu.empty(),
            this._parseOptions(t),
            this._renderMenu(this.menu, this.items),
            this.menuInstance.refresh(),
            (this.menuItems = this.menu
              .find("li")
              .not(".ui-selectmenu-optgroup")
              .find(".ui-menu-item-wrapper")),
            (this._rendered = !0),
            t.length &&
              ((t = this._getSelectedItem()),
              this.menuInstance.focus(null, t),
              this._setAria(t.data("ui-selectmenu-item")),
              this._setOption("disabled", this.element.prop("disabled")));
        },
        open: function (t) {
          this.options.disabled ||
            (this._rendered
              ? (this._removeClass(
                  this.menu.find(".ui-state-active"),
                  null,
                  "ui-state-active"
                ),
                this.menuInstance.focus(null, this._getSelectedItem()))
              : this._refreshMenu(),
            this.menuItems.length &&
              ((this.isOpen = !0),
              this._toggleAttr(),
              this._resizeMenu(),
              this._position(),
              this._on(this.document, this._documentClick),
              this._trigger("open", t)));
        },
        _position: function () {
          this.menuWrap.position(
            Y.extend({ of: this.button }, this.options.position)
          );
        },
        close: function (t) {
          this.isOpen &&
            ((this.isOpen = !1),
            this._toggleAttr(),
            (this.range = null),
            this._off(this.document),
            this._trigger("close", t));
        },
        widget: function () {
          return this.button;
        },
        menuWidget: function () {
          return this.menu;
        },
        _renderButtonItem: function (t) {
          var e = Y("<span>");
          return (
            this._setText(e, t.label),
            this._addClass(e, "ui-selectmenu-text"),
            e
          );
        },
        _renderMenu: function (n, t) {
          var s = this,
            o = "";
          Y.each(t, function (t, e) {
            var i;
            e.optgroup !== o &&
              ((i = Y("<li>", { text: e.optgroup })),
              s._addClass(
                i,
                "ui-selectmenu-optgroup",
                "ui-menu-divider" +
                  (e.element.parent("optgroup").prop("disabled")
                    ? " ui-state-disabled"
                    : "")
              ),
              i.appendTo(n),
              (o = e.optgroup)),
              s._renderItemData(n, e);
          });
        },
        _renderItemData: function (t, e) {
          return this._renderItem(t, e).data("ui-selectmenu-item", e);
        },
        _renderItem: function (t, e) {
          var i = Y("<li>"),
            n = Y("<div>", { title: e.element.attr("title") });
          return (
            e.disabled && this._addClass(i, null, "ui-state-disabled"),
            this._setText(n, e.label),
            i.append(n).appendTo(t)
          );
        },
        _setText: function (t, e) {
          e ? t.text(e) : t.html("&#160;");
        },
        _move: function (t, e) {
          var i,
            n = ".ui-menu-item";
          this.isOpen
            ? (i = this.menuItems.eq(this.focusIndex).parent("li"))
            : ((i = this.menuItems
                .eq(this.element[0].selectedIndex)
                .parent("li")),
              (n += ":not(.ui-state-disabled)")),
            (n =
              "first" === t || "last" === t
                ? i["first" === t ? "prevAll" : "nextAll"](n).eq(-1)
                : i[t + "All"](n).eq(0)).length &&
              this.menuInstance.focus(e, n);
        },
        _getSelectedItem: function () {
          return this.menuItems.eq(this.element[0].selectedIndex).parent("li");
        },
        _toggle: function (t) {
          this[this.isOpen ? "close" : "open"](t);
        },
        _setSelection: function () {
          var t;
          this.range &&
            (window.getSelection
              ? ((t = window.getSelection()).removeAllRanges(),
                t.addRange(this.range))
              : this.range.select(),
            this.button.focus());
        },
        _documentClick: {
          mousedown: function (t) {
            this.isOpen &&
              (Y(t.target).closest(
                ".ui-selectmenu-menu, #" + Y.escapeSelector(this.ids.button)
              ).length ||
                this.close(t));
          },
        },
        _buttonEvents: {
          mousedown: function () {
            var t;
            window.getSelection
              ? (t = window.getSelection()).rangeCount &&
                (this.range = t.getRangeAt(0))
              : (this.range = document.selection.createRange());
          },
          click: function (t) {
            this._setSelection(), this._toggle(t);
          },
          keydown: function (t) {
            var e = !0;
            switch (t.keyCode) {
              case Y.ui.keyCode.TAB:
              case Y.ui.keyCode.ESCAPE:
                this.close(t), (e = !1);
                break;
              case Y.ui.keyCode.ENTER:
                this.isOpen && this._selectFocusedItem(t);
                break;
              case Y.ui.keyCode.UP:
                t.altKey ? this._toggle(t) : this._move("prev", t);
                break;
              case Y.ui.keyCode.DOWN:
                t.altKey ? this._toggle(t) : this._move("next", t);
                break;
              case Y.ui.keyCode.SPACE:
                this.isOpen ? this._selectFocusedItem(t) : this._toggle(t);
                break;
              case Y.ui.keyCode.LEFT:
                this._move("prev", t);
                break;
              case Y.ui.keyCode.RIGHT:
                this._move("next", t);
                break;
              case Y.ui.keyCode.HOME:
              case Y.ui.keyCode.PAGE_UP:
                this._move("first", t);
                break;
              case Y.ui.keyCode.END:
              case Y.ui.keyCode.PAGE_DOWN:
                this._move("last", t);
                break;
              default:
                this.menu.trigger(t), (e = !1);
            }
            e && t.preventDefault();
          },
        },
        _selectFocusedItem: function (t) {
          var e = this.menuItems.eq(this.focusIndex).parent("li");
          e.hasClass("ui-state-disabled") ||
            this._select(e.data("ui-selectmenu-item"), t);
        },
        _select: function (t, e) {
          var i = this.element[0].selectedIndex;
          (this.element[0].selectedIndex = t.index),
            this.buttonItem.replaceWith(
              (this.buttonItem = this._renderButtonItem(t))
            ),
            this._setAria(t),
            this._trigger("select", e, { item: t }),
            t.index !== i && this._trigger("change", e, { item: t }),
            this.close(e);
        },
        _setAria: function (t) {
          t = this.menuItems.eq(t.index).attr("id");
          this.button.attr({
            "aria-labelledby": t,
            "aria-activedescendant": t,
          }),
            this.menu.attr("aria-activedescendant", t);
        },
        _setOption: function (t, e) {
          var i;
          "icons" === t &&
            ((i = this.button.find("span.ui-icon")),
            this._removeClass(i, null, this.options.icons.button)._addClass(
              i,
              null,
              e.button
            )),
            this._super(t, e),
            "appendTo" === t && this.menuWrap.appendTo(this._appendTo()),
            "width" === t && this._resizeButton();
        },
        _setOptionDisabled: function (t) {
          this._super(t),
            this.menuInstance.option("disabled", t),
            this.button.attr("aria-disabled", t),
            this._toggleClass(this.button, null, "ui-state-disabled", t),
            this.element.prop("disabled", t),
            t
              ? (this.button.attr("tabindex", -1), this.close())
              : this.button.attr("tabindex", 0);
        },
        _appendTo: function () {
          var t = this.options.appendTo;
          return (t = !(t =
            !(t =
              t &&
              (t.jquery || t.nodeType ? Y(t) : this.document.find(t).eq(0))) ||
            !t[0]
              ? this.element.closest(".ui-front, dialog")
              : t).length
            ? this.document[0].body
            : t);
        },
        _toggleAttr: function () {
          this.button.attr("aria-expanded", this.isOpen),
            this._removeClass(
              this.button,
              "ui-selectmenu-button-" + (this.isOpen ? "closed" : "open")
            )
              ._addClass(
                this.button,
                "ui-selectmenu-button-" + (this.isOpen ? "open" : "closed")
              )
              ._toggleClass(
                this.menuWrap,
                "ui-selectmenu-open",
                null,
                this.isOpen
              ),
            this.menu.attr("aria-hidden", !this.isOpen);
        },
        _resizeButton: function () {
          var t = this.options.width;
          !1 !== t
            ? (null === t &&
                ((t = this.element.show().outerWidth()), this.element.hide()),
              this.button.outerWidth(t))
            : this.button.css("width", "");
        },
        _resizeMenu: function () {
          this.menu.outerWidth(
            Math.max(
              this.button.outerWidth(),
              this.menu.width("").outerWidth() + 1
            )
          );
        },
        _getCreateOptions: function () {
          var t = this._super();
          return (t.disabled = this.element.prop("disabled")), t;
        },
        _parseOptions: function (t) {
          var i = this,
            n = [];
          t.each(function (t, e) {
            e.hidden || n.push(i._parseOption(Y(e), t));
          }),
            (this.items = n);
        },
        _parseOption: function (t, e) {
          var i = t.parent("optgroup");
          return {
            element: t,
            index: e,
            value: t.val(),
            label: t.text(),
            optgroup: i.attr("label") || "",
            disabled: i.prop("disabled") || t.prop("disabled"),
          };
        },
        _destroy: function () {
          this._unbindFormResetHandler(),
            this.menuWrap.remove(),
            this.button.remove(),
            this.element.show(),
            this.element.removeUniqueId(),
            this.labels.attr("for", this.ids.element);
        },
      },
    ]),
    Y.widget("ui.slider", Y.ui.mouse, {
      version: "1.13.0",
      widgetEventPrefix: "slide",
      options: {
        animate: !1,
        classes: {
          "ui-slider": "ui-corner-all",
          "ui-slider-handle": "ui-corner-all",
          "ui-slider-range": "ui-corner-all ui-widget-header",
        },
        distance: 0,
        max: 100,
        min: 0,
        orientation: "horizontal",
        range: !1,
        step: 1,
        value: 0,
        values: null,
        change: null,
        slide: null,
        start: null,
        stop: null,
      },
      numPages: 5,
      _create: function () {
        (this._keySliding = !1),
          (this._mouseSliding = !1),
          (this._animateOff = !0),
          (this._handleIndex = null),
          this._detectOrientation(),
          this._mouseInit(),
          this._calculateNewMax(),
          this._addClass(
            "ui-slider ui-slider-" + this.orientation,
            "ui-widget ui-widget-content"
          ),
          this._refresh(),
          (this._animateOff = !1);
      },
      _refresh: function () {
        this._createRange(),
          this._createHandles(),
          this._setupEvents(),
          this._refreshValue();
      },
      _createHandles: function () {
        var t,
          e = this.options,
          i = this.element.find(".ui-slider-handle"),
          n = [],
          s = (e.values && e.values.length) || 1;
        for (
          i.length > s && (i.slice(s).remove(), (i = i.slice(0, s))),
            t = i.length;
          t < s;
          t++
        )
          n.push("<span tabindex='0'></span>");
        (this.handles = i.add(Y(n.join("")).appendTo(this.element))),
          this._addClass(this.handles, "ui-slider-handle", "ui-state-default"),
          (this.handle = this.handles.eq(0)),
          this.handles.each(function (t) {
            Y(this).data("ui-slider-handle-index", t).attr("tabIndex", 0);
          });
      },
      _createRange: function () {
        var t = this.options;
        t.range
          ? (!0 === t.range &&
              (t.values
                ? t.values.length && 2 !== t.values.length
                  ? (t.values = [t.values[0], t.values[0]])
                  : Array.isArray(t.values) && (t.values = t.values.slice(0))
                : (t.values = [this._valueMin(), this._valueMin()])),
            this.range && this.range.length
              ? (this._removeClass(
                  this.range,
                  "ui-slider-range-min ui-slider-range-max"
                ),
                this.range.css({ left: "", bottom: "" }))
              : ((this.range = Y("<div>").appendTo(this.element)),
                this._addClass(this.range, "ui-slider-range")),
            ("min" !== t.range && "max" !== t.range) ||
              this._addClass(this.range, "ui-slider-range-" + t.range))
          : (this.range && this.range.remove(), (this.range = null));
      },
      _setupEvents: function () {
        this._off(this.handles),
          this._on(this.handles, this._handleEvents),
          this._hoverable(this.handles),
          this._focusable(this.handles);
      },
      _destroy: function () {
        this.handles.remove(),
          this.range && this.range.remove(),
          this._mouseDestroy();
      },
      _mouseCapture: function (t) {
        var i,
          n,
          s,
          o,
          e,
          r,
          a = this,
          l = this.options;
        return (
          !l.disabled &&
          ((this.elementSize = {
            width: this.element.outerWidth(),
            height: this.element.outerHeight(),
          }),
          (this.elementOffset = this.element.offset()),
          (r = { x: t.pageX, y: t.pageY }),
          (i = this._normValueFromMouse(r)),
          (n = this._valueMax() - this._valueMin() + 1),
          this.handles.each(function (t) {
            var e = Math.abs(i - a.values(t));
            (e < n ||
              (n === e &&
                (t === a._lastChangedValue || a.values(t) === l.min))) &&
              ((n = e), (s = Y(this)), (o = t));
          }),
          !1 !== this._start(t, o) &&
            ((this._mouseSliding = !0),
            (this._handleIndex = o),
            this._addClass(s, null, "ui-state-active"),
            s.trigger("focus"),
            (e = s.offset()),
            (r = !Y(t.target).parents().addBack().is(".ui-slider-handle")),
            (this._clickOffset = r
              ? { left: 0, top: 0 }
              : {
                  left: t.pageX - e.left - s.width() / 2,
                  top:
                    t.pageY -
                    e.top -
                    s.height() / 2 -
                    (parseInt(s.css("borderTopWidth"), 10) || 0) -
                    (parseInt(s.css("borderBottomWidth"), 10) || 0) +
                    (parseInt(s.css("marginTop"), 10) || 0),
                }),
            this.handles.hasClass("ui-state-hover") || this._slide(t, o, i),
            (this._animateOff = !0)))
        );
      },
      _mouseStart: function () {
        return !0;
      },
      _mouseDrag: function (t) {
        var e = { x: t.pageX, y: t.pageY },
          e = this._normValueFromMouse(e);
        return this._slide(t, this._handleIndex, e), !1;
      },
      _mouseStop: function (t) {
        return (
          this._removeClass(this.handles, null, "ui-state-active"),
          (this._mouseSliding = !1),
          this._stop(t, this._handleIndex),
          this._change(t, this._handleIndex),
          (this._handleIndex = null),
          (this._clickOffset = null),
          (this._animateOff = !1)
        );
      },
      _detectOrientation: function () {
        this.orientation =
          "vertical" === this.options.orientation ? "vertical" : "horizontal";
      },
      _normValueFromMouse: function (t) {
        var e,
          t =
            "horizontal" === this.orientation
              ? ((e = this.elementSize.width),
                t.x -
                  this.elementOffset.left -
                  (this._clickOffset ? this._clickOffset.left : 0))
              : ((e = this.elementSize.height),
                t.y -
                  this.elementOffset.top -
                  (this._clickOffset ? this._clickOffset.top : 0)),
          t = t / e;
        return (
          (t = 1 < t ? 1 : t) < 0 && (t = 0),
          "vertical" === this.orientation && (t = 1 - t),
          (e = this._valueMax() - this._valueMin()),
          (e = this._valueMin() + t * e),
          this._trimAlignValue(e)
        );
      },
      _uiHash: function (t, e, i) {
        var n = {
          handle: this.handles[t],
          handleIndex: t,
          value: void 0 !== e ? e : this.value(),
        };
        return (
          this._hasMultipleValues() &&
            ((n.value = void 0 !== e ? e : this.values(t)),
            (n.values = i || this.values())),
          n
        );
      },
      _hasMultipleValues: function () {
        return this.options.values && this.options.values.length;
      },
      _start: function (t, e) {
        return this._trigger("start", t, this._uiHash(e));
      },
      _slide: function (t, e, i) {
        var n,
          s = this.value(),
          o = this.values();
        this._hasMultipleValues() &&
          ((n = this.values(e ? 0 : 1)),
          (s = this.values(e)),
          2 === this.options.values.length &&
            !0 === this.options.range &&
            (i = 0 === e ? Math.min(n, i) : Math.max(n, i)),
          (o[e] = i)),
          i !== s &&
            !1 !== this._trigger("slide", t, this._uiHash(e, i, o)) &&
            (this._hasMultipleValues() ? this.values(e, i) : this.value(i));
      },
      _stop: function (t, e) {
        this._trigger("stop", t, this._uiHash(e));
      },
      _change: function (t, e) {
        this._keySliding ||
          this._mouseSliding ||
          ((this._lastChangedValue = e),
          this._trigger("change", t, this._uiHash(e)));
      },
      value: function (t) {
        return arguments.length
          ? ((this.options.value = this._trimAlignValue(t)),
            this._refreshValue(),
            void this._change(null, 0))
          : this._value();
      },
      values: function (t, e) {
        var i, n, s;
        if (1 < arguments.length)
          return (
            (this.options.values[t] = this._trimAlignValue(e)),
            this._refreshValue(),
            void this._change(null, t)
          );
        if (!arguments.length) return this._values();
        if (!Array.isArray(t))
          return this._hasMultipleValues() ? this._values(t) : this.value();
        for (i = this.options.values, n = t, s = 0; s < i.length; s += 1)
          (i[s] = this._trimAlignValue(n[s])), this._change(null, s);
        this._refreshValue();
      },
      _setOption: function (t, e) {
        var i,
          n = 0;
        switch (
          ("range" === t &&
            !0 === this.options.range &&
            ("min" === e
              ? ((this.options.value = this._values(0)),
                (this.options.values = null))
              : "max" === e &&
                ((this.options.value = this._values(
                  this.options.values.length - 1
                )),
                (this.options.values = null))),
          Array.isArray(this.options.values) &&
            (n = this.options.values.length),
          this._super(t, e),
          t)
        ) {
          case "orientation":
            this._detectOrientation(),
              this._removeClass(
                "ui-slider-horizontal ui-slider-vertical"
              )._addClass("ui-slider-" + this.orientation),
              this._refreshValue(),
              this.options.range && this._refreshRange(e),
              this.handles.css("horizontal" === e ? "bottom" : "left", "");
            break;
          case "value":
            (this._animateOff = !0),
              this._refreshValue(),
              this._change(null, 0),
              (this._animateOff = !1);
            break;
          case "values":
            for (
              this._animateOff = !0, this._refreshValue(), i = n - 1;
              0 <= i;
              i--
            )
              this._change(null, i);
            this._animateOff = !1;
            break;
          case "step":
          case "min":
          case "max":
            (this._animateOff = !0),
              this._calculateNewMax(),
              this._refreshValue(),
              (this._animateOff = !1);
            break;
          case "range":
            (this._animateOff = !0), this._refresh(), (this._animateOff = !1);
        }
      },
      _setOptionDisabled: function (t) {
        this._super(t), this._toggleClass(null, "ui-state-disabled", !!t);
      },
      _value: function () {
        var t = this.options.value;
        return (t = this._trimAlignValue(t));
      },
      _values: function (t) {
        var e, i;
        if (arguments.length)
          return (t = this.options.values[t]), this._trimAlignValue(t);
        if (this._hasMultipleValues()) {
          for (e = this.options.values.slice(), i = 0; i < e.length; i += 1)
            e[i] = this._trimAlignValue(e[i]);
          return e;
        }
        return [];
      },
      _trimAlignValue: function (t) {
        if (t <= this._valueMin()) return this._valueMin();
        if (t >= this._valueMax()) return this._valueMax();
        var e = 0 < this.options.step ? this.options.step : 1,
          i = (t - this._valueMin()) % e,
          t = t - i;
        return (
          2 * Math.abs(i) >= e && (t += 0 < i ? e : -e),
          parseFloat(t.toFixed(5))
        );
      },
      _calculateNewMax: function () {
        var t = this.options.max,
          e = this._valueMin(),
          i = this.options.step;
        (t = Math.round((t - e) / i) * i + e) > this.options.max && (t -= i),
          (this.max = parseFloat(t.toFixed(this._precision())));
      },
      _precision: function () {
        var t = this._precisionOf(this.options.step);
        return (t =
          null !== this.options.min
            ? Math.max(t, this._precisionOf(this.options.min))
            : t);
      },
      _precisionOf: function (t) {
        var e = t.toString(),
          t = e.indexOf(".");
        return -1 === t ? 0 : e.length - t - 1;
      },
      _valueMin: function () {
        return this.options.min;
      },
      _valueMax: function () {
        return this.max;
      },
      _refreshRange: function (t) {
        "vertical" === t && this.range.css({ width: "", left: "" }),
          "horizontal" === t && this.range.css({ height: "", bottom: "" });
      },
      _refreshValue: function () {
        var e,
          i,
          t,
          n,
          s,
          o = this.options.range,
          r = this.options,
          a = this,
          l = !this._animateOff && r.animate,
          c = {};
        this._hasMultipleValues()
          ? this.handles.each(function (t) {
              (i =
                ((a.values(t) - a._valueMin()) /
                  (a._valueMax() - a._valueMin())) *
                100),
                (c["horizontal" === a.orientation ? "left" : "bottom"] =
                  i + "%"),
                Y(this).stop(1, 1)[l ? "animate" : "css"](c, r.animate),
                !0 === a.options.range &&
                  ("horizontal" === a.orientation
                    ? (0 === t &&
                        a.range
                          .stop(1, 1)
                          [l ? "animate" : "css"]({ left: i + "%" }, r.animate),
                      1 === t &&
                        a.range[l ? "animate" : "css"](
                          { width: i - e + "%" },
                          { queue: !1, duration: r.animate }
                        ))
                    : (0 === t &&
                        a.range
                          .stop(1, 1)
                          [l ? "animate" : "css"](
                            { bottom: i + "%" },
                            r.animate
                          ),
                      1 === t &&
                        a.range[l ? "animate" : "css"](
                          { height: i - e + "%" },
                          { queue: !1, duration: r.animate }
                        ))),
                (e = i);
            })
          : ((t = this.value()),
            (n = this._valueMin()),
            (s = this._valueMax()),
            (i = s !== n ? ((t - n) / (s - n)) * 100 : 0),
            (c["horizontal" === this.orientation ? "left" : "bottom"] =
              i + "%"),
            this.handle.stop(1, 1)[l ? "animate" : "css"](c, r.animate),
            "min" === o &&
              "horizontal" === this.orientation &&
              this.range
                .stop(1, 1)
                [l ? "animate" : "css"]({ width: i + "%" }, r.animate),
            "max" === o &&
              "horizontal" === this.orientation &&
              this.range
                .stop(1, 1)
                [l ? "animate" : "css"]({ width: 100 - i + "%" }, r.animate),
            "min" === o &&
              "vertical" === this.orientation &&
              this.range
                .stop(1, 1)
                [l ? "animate" : "css"]({ height: i + "%" }, r.animate),
            "max" === o &&
              "vertical" === this.orientation &&
              this.range
                .stop(1, 1)
                [l ? "animate" : "css"]({ height: 100 - i + "%" }, r.animate));
      },
      _handleEvents: {
        keydown: function (t) {
          var e,
            i,
            n,
            s = Y(t.target).data("ui-slider-handle-index");
          switch (t.keyCode) {
            case Y.ui.keyCode.HOME:
            case Y.ui.keyCode.END:
            case Y.ui.keyCode.PAGE_UP:
            case Y.ui.keyCode.PAGE_DOWN:
            case Y.ui.keyCode.UP:
            case Y.ui.keyCode.RIGHT:
            case Y.ui.keyCode.DOWN:
            case Y.ui.keyCode.LEFT:
              if (
                (t.preventDefault(),
                !this._keySliding &&
                  ((this._keySliding = !0),
                  this._addClass(Y(t.target), null, "ui-state-active"),
                  !1 === this._start(t, s)))
              )
                return;
          }
          switch (
            ((n = this.options.step),
            (e = i = this._hasMultipleValues() ? this.values(s) : this.value()),
            t.keyCode)
          ) {
            case Y.ui.keyCode.HOME:
              i = this._valueMin();
              break;
            case Y.ui.keyCode.END:
              i = this._valueMax();
              break;
            case Y.ui.keyCode.PAGE_UP:
              i = this._trimAlignValue(
                e + (this._valueMax() - this._valueMin()) / this.numPages
              );
              break;
            case Y.ui.keyCode.PAGE_DOWN:
              i = this._trimAlignValue(
                e - (this._valueMax() - this._valueMin()) / this.numPages
              );
              break;
            case Y.ui.keyCode.UP:
            case Y.ui.keyCode.RIGHT:
              if (e === this._valueMax()) return;
              i = this._trimAlignValue(e + n);
              break;
            case Y.ui.keyCode.DOWN:
            case Y.ui.keyCode.LEFT:
              if (e === this._valueMin()) return;
              i = this._trimAlignValue(e - n);
          }
          this._slide(t, s, i);
        },
        keyup: function (t) {
          var e = Y(t.target).data("ui-slider-handle-index");
          this._keySliding &&
            ((this._keySliding = !1),
            this._stop(t, e),
            this._change(t, e),
            this._removeClass(Y(t.target), null, "ui-state-active"));
        },
      },
    }),
    Y.widget("ui.sortable", Y.ui.mouse, {
      version: "1.13.0",
      widgetEventPrefix: "sort",
      ready: !1,
      options: {
        appendTo: "parent",
        axis: !1,
        connectWith: !1,
        containment: !1,
        cursor: "auto",
        cursorAt: !1,
        dropOnEmpty: !0,
        forcePlaceholderSize: !1,
        forceHelperSize: !1,
        grid: !1,
        handle: !1,
        helper: "original",
        items: "> *",
        opacity: !1,
        placeholder: !1,
        revert: !1,
        scroll: !0,
        scrollSensitivity: 20,
        scrollSpeed: 20,
        scope: "default",
        tolerance: "intersect",
        zIndex: 1e3,
        activate: null,
        beforeStop: null,
        change: null,
        deactivate: null,
        out: null,
        over: null,
        receive: null,
        remove: null,
        sort: null,
        start: null,
        stop: null,
        update: null,
      },
      _isOverAxis: function (t, e, i) {
        return e <= t && t < e + i;
      },
      _isFloating: function (t) {
        return (
          /left|right/.test(t.css("float")) ||
          /inline|table-cell/.test(t.css("display"))
        );
      },
      _create: function () {
        (this.containerCache = {}),
          this._addClass("ui-sortable"),
          this.refresh(),
          (this.offset = this.element.offset()),
          this._mouseInit(),
          this._setHandleClassName(),
          (this.ready = !0);
      },
      _setOption: function (t, e) {
        this._super(t, e), "handle" === t && this._setHandleClassName();
      },
      _setHandleClassName: function () {
        var t = this;
        this._removeClass(
          this.element.find(".ui-sortable-handle"),
          "ui-sortable-handle"
        ),
          Y.each(this.items, function () {
            t._addClass(
              this.instance.options.handle
                ? this.item.find(this.instance.options.handle)
                : this.item,
              "ui-sortable-handle"
            );
          });
      },
      _destroy: function () {
        this._mouseDestroy();
        for (var t = this.items.length - 1; 0 <= t; t--)
          this.items[t].item.removeData(this.widgetName + "-item");
        return this;
      },
      _mouseCapture: function (t, e) {
        var i = null,
          n = !1,
          s = this;
        return (
          !this.reverting &&
          !this.options.disabled &&
          "static" !== this.options.type &&
          (this._refreshItems(t),
          Y(t.target)
            .parents()
            .each(function () {
              if (Y.data(this, s.widgetName + "-item") === s)
                return (i = Y(this)), !1;
            }),
          !!(i =
            Y.data(t.target, s.widgetName + "-item") === s ? Y(t.target) : i) &&
            !(
              this.options.handle &&
              !e &&
              (Y(this.options.handle, i)
                .find("*")
                .addBack()
                .each(function () {
                  this === t.target && (n = !0);
                }),
              !n)
            ) &&
            ((this.currentItem = i), this._removeCurrentsFromItems(), !0))
        );
      },
      _mouseStart: function (t, e, i) {
        var n,
          s,
          o = this.options;
        if (
          ((this.currentContainer = this).refreshPositions(),
          (this.appendTo = Y(
            "parent" !== o.appendTo ? o.appendTo : this.currentItem.parent()
          )),
          (this.helper = this._createHelper(t)),
          this._cacheHelperProportions(),
          this._cacheMargins(),
          (this.offset = this.currentItem.offset()),
          (this.offset = {
            top: this.offset.top - this.margins.top,
            left: this.offset.left - this.margins.left,
          }),
          Y.extend(this.offset, {
            click: {
              left: t.pageX - this.offset.left,
              top: t.pageY - this.offset.top,
            },
            relative: this._getRelativeOffset(),
          }),
          this.helper.css("position", "absolute"),
          (this.cssPosition = this.helper.css("position")),
          o.cursorAt && this._adjustOffsetFromHelper(o.cursorAt),
          (this.domPosition = {
            prev: this.currentItem.prev()[0],
            parent: this.currentItem.parent()[0],
          }),
          this.helper[0] !== this.currentItem[0] && this.currentItem.hide(),
          this._createPlaceholder(),
          (this.scrollParent = this.placeholder.scrollParent()),
          Y.extend(this.offset, { parent: this._getParentOffset() }),
          o.containment && this._setContainment(),
          o.cursor &&
            "auto" !== o.cursor &&
            ((s = this.document.find("body")),
            (this.storedCursor = s.css("cursor")),
            s.css("cursor", o.cursor),
            (this.storedStylesheet = Y(
              "<style>*{ cursor: " + o.cursor + " !important; }</style>"
            ).appendTo(s))),
          o.zIndex &&
            (this.helper.css("zIndex") &&
              (this._storedZIndex = this.helper.css("zIndex")),
            this.helper.css("zIndex", o.zIndex)),
          o.opacity &&
            (this.helper.css("opacity") &&
              (this._storedOpacity = this.helper.css("opacity")),
            this.helper.css("opacity", o.opacity)),
          this.scrollParent[0] !== this.document[0] &&
            "HTML" !== this.scrollParent[0].tagName &&
            (this.overflowOffset = this.scrollParent.offset()),
          this._trigger("start", t, this._uiHash()),
          this._preserveHelperProportions || this._cacheHelperProportions(),
          !i)
        )
          for (n = this.containers.length - 1; 0 <= n; n--)
            this.containers[n]._trigger("activate", t, this._uiHash(this));
        return (
          Y.ui.ddmanager && (Y.ui.ddmanager.current = this),
          Y.ui.ddmanager &&
            !o.dropBehaviour &&
            Y.ui.ddmanager.prepareOffsets(this, t),
          (this.dragging = !0),
          this._addClass(this.helper, "ui-sortable-helper"),
          this.helper.parent().is(this.appendTo) ||
            (this.helper.detach().appendTo(this.appendTo),
            (this.offset.parent = this._getParentOffset())),
          (this.position = this.originalPosition = this._generatePosition(t)),
          (this.originalPageX = t.pageX),
          (this.originalPageY = t.pageY),
          (this.lastPositionAbs = this.positionAbs =
            this._convertPositionTo("absolute")),
          this._mouseDrag(t),
          !0
        );
      },
      _scroll: function (t) {
        var e = this.options,
          i = !1;
        return (
          this.scrollParent[0] !== this.document[0] &&
          "HTML" !== this.scrollParent[0].tagName
            ? (this.overflowOffset.top +
                this.scrollParent[0].offsetHeight -
                t.pageY <
              e.scrollSensitivity
                ? (this.scrollParent[0].scrollTop = i =
                    this.scrollParent[0].scrollTop + e.scrollSpeed)
                : t.pageY - this.overflowOffset.top < e.scrollSensitivity &&
                  (this.scrollParent[0].scrollTop = i =
                    this.scrollParent[0].scrollTop - e.scrollSpeed),
              this.overflowOffset.left +
                this.scrollParent[0].offsetWidth -
                t.pageX <
              e.scrollSensitivity
                ? (this.scrollParent[0].scrollLeft = i =
                    this.scrollParent[0].scrollLeft + e.scrollSpeed)
                : t.pageX - this.overflowOffset.left < e.scrollSensitivity &&
                  (this.scrollParent[0].scrollLeft = i =
                    this.scrollParent[0].scrollLeft - e.scrollSpeed))
            : (t.pageY - this.document.scrollTop() < e.scrollSensitivity
                ? (i = this.document.scrollTop(
                    this.document.scrollTop() - e.scrollSpeed
                  ))
                : this.window.height() - (t.pageY - this.document.scrollTop()) <
                    e.scrollSensitivity &&
                  (i = this.document.scrollTop(
                    this.document.scrollTop() + e.scrollSpeed
                  )),
              t.pageX - this.document.scrollLeft() < e.scrollSensitivity
                ? (i = this.document.scrollLeft(
                    this.document.scrollLeft() - e.scrollSpeed
                  ))
                : this.window.width() - (t.pageX - this.document.scrollLeft()) <
                    e.scrollSensitivity &&
                  (i = this.document.scrollLeft(
                    this.document.scrollLeft() + e.scrollSpeed
                  ))),
          i
        );
      },
      _mouseDrag: function (t) {
        var e,
          i,
          n,
          s,
          o = this.options;
        if (
          ((this.position = this._generatePosition(t)),
          (this.positionAbs = this._convertPositionTo("absolute")),
          (this.options.axis && "y" === this.options.axis) ||
            (this.helper[0].style.left = this.position.left + "px"),
          (this.options.axis && "x" === this.options.axis) ||
            (this.helper[0].style.top = this.position.top + "px"),
          this._contactContainers(t),
          null !== this.innermostContainer)
        )
          for (
            o.scroll &&
              !1 !== this._scroll(t) &&
              (this._refreshItemPositions(!0),
              Y.ui.ddmanager &&
                !o.dropBehaviour &&
                Y.ui.ddmanager.prepareOffsets(this, t)),
              this.dragDirection = {
                vertical: this._getDragVerticalDirection(),
                horizontal: this._getDragHorizontalDirection(),
              },
              e = this.items.length - 1;
            0 <= e;
            e--
          )
            if (
              ((n = (i = this.items[e]).item[0]),
              (s = this._intersectsWithPointer(i)) &&
                i.instance === this.currentContainer &&
                !(
                  n === this.currentItem[0] ||
                  this.placeholder[1 === s ? "next" : "prev"]()[0] === n ||
                  Y.contains(this.placeholder[0], n) ||
                  ("semi-dynamic" === this.options.type &&
                    Y.contains(this.element[0], n))
                ))
            ) {
              if (
                ((this.direction = 1 === s ? "down" : "up"),
                "pointer" !== this.options.tolerance &&
                  !this._intersectsWithSides(i))
              )
                break;
              this._rearrange(t, i), this._trigger("change", t, this._uiHash());
              break;
            }
        return (
          Y.ui.ddmanager && Y.ui.ddmanager.drag(this, t),
          this._trigger("sort", t, this._uiHash()),
          (this.lastPositionAbs = this.positionAbs),
          !1
        );
      },
      _mouseStop: function (t, e) {
        var i, n, s, o;
        if (t)
          return (
            Y.ui.ddmanager &&
              !this.options.dropBehaviour &&
              Y.ui.ddmanager.drop(this, t),
            this.options.revert
              ? ((n = (i = this).placeholder.offset()),
                (o = {}),
                ((s = this.options.axis) && "x" !== s) ||
                  (o.left =
                    n.left -
                    this.offset.parent.left -
                    this.margins.left +
                    (this.offsetParent[0] === this.document[0].body
                      ? 0
                      : this.offsetParent[0].scrollLeft)),
                (s && "y" !== s) ||
                  (o.top =
                    n.top -
                    this.offset.parent.top -
                    this.margins.top +
                    (this.offsetParent[0] === this.document[0].body
                      ? 0
                      : this.offsetParent[0].scrollTop)),
                (this.reverting = !0),
                Y(this.helper).animate(
                  o,
                  parseInt(this.options.revert, 10) || 500,
                  function () {
                    i._clear(t);
                  }
                ))
              : this._clear(t, e),
            !1
          );
      },
      cancel: function () {
        if (this.dragging) {
          this._mouseUp(new Y.Event("mouseup", { target: null })),
            "original" === this.options.helper
              ? (this.currentItem.css(this._storedCSS),
                this._removeClass(this.currentItem, "ui-sortable-helper"))
              : this.currentItem.show();
          for (var t = this.containers.length - 1; 0 <= t; t--)
            this.containers[t]._trigger("deactivate", null, this._uiHash(this)),
              this.containers[t].containerCache.over &&
                (this.containers[t]._trigger("out", null, this._uiHash(this)),
                (this.containers[t].containerCache.over = 0));
        }
        return (
          this.placeholder &&
            (this.placeholder[0].parentNode &&
              this.placeholder[0].parentNode.removeChild(this.placeholder[0]),
            "original" !== this.options.helper &&
              this.helper &&
              this.helper[0].parentNode &&
              this.helper.remove(),
            Y.extend(this, {
              helper: null,
              dragging: !1,
              reverting: !1,
              _noFinalSort: null,
            }),
            this.domPosition.prev
              ? Y(this.domPosition.prev).after(this.currentItem)
              : Y(this.domPosition.parent).prepend(this.currentItem)),
          this
        );
      },
      serialize: function (e) {
        var t = this._getItemsAsjQuery(e && e.connected),
          i = [];
        return (
          (e = e || {}),
          Y(t).each(function () {
            var t = (Y(e.item || this).attr(e.attribute || "id") || "").match(
              e.expression || /(.+)[\-=_](.+)/
            );
            t &&
              i.push(
                (e.key || t[1] + "[]") +
                  "=" +
                  (e.key && e.expression ? t[1] : t[2])
              );
          }),
          !i.length && e.key && i.push(e.key + "="),
          i.join("&")
        );
      },
      toArray: function (t) {
        var e = this._getItemsAsjQuery(t && t.connected),
          i = [];
        return (
          (t = t || {}),
          e.each(function () {
            i.push(Y(t.item || this).attr(t.attribute || "id") || "");
          }),
          i
        );
      },
      _intersectsWith: function (t) {
        var e = this.positionAbs.left,
          i = e + this.helperProportions.width,
          n = this.positionAbs.top,
          s = n + this.helperProportions.height,
          o = t.left,
          r = o + t.width,
          a = t.top,
          l = a + t.height,
          c = this.offset.click.top,
          h = this.offset.click.left,
          c = "x" === this.options.axis || (a < n + c && n + c < l),
          h = "y" === this.options.axis || (o < e + h && e + h < r);
        return "pointer" === this.options.tolerance ||
          this.options.forcePointerForContainers ||
          ("pointer" !== this.options.tolerance &&
            this.helperProportions[this.floating ? "width" : "height"] >
              t[this.floating ? "width" : "height"])
          ? c && h
          : o < e + this.helperProportions.width / 2 &&
              i - this.helperProportions.width / 2 < r &&
              a < n + this.helperProportions.height / 2 &&
              s - this.helperProportions.height / 2 < l;
      },
      _intersectsWithPointer: function (t) {
        var e =
            "x" === this.options.axis ||
            this._isOverAxis(
              this.positionAbs.top + this.offset.click.top,
              t.top,
              t.height
            ),
          t =
            "y" === this.options.axis ||
            this._isOverAxis(
              this.positionAbs.left + this.offset.click.left,
              t.left,
              t.width
            );
        return (
          !(!e || !t) &&
          ((e = this.dragDirection.vertical),
          (t = this.dragDirection.horizontal),
          this.floating
            ? "right" === t || "down" === e
              ? 2
              : 1
            : e && ("down" === e ? 2 : 1))
        );
      },
      _intersectsWithSides: function (t) {
        var e = this._isOverAxis(
            this.positionAbs.top + this.offset.click.top,
            t.top + t.height / 2,
            t.height
          ),
          i = this._isOverAxis(
            this.positionAbs.left + this.offset.click.left,
            t.left + t.width / 2,
            t.width
          ),
          n = this.dragDirection.vertical,
          t = this.dragDirection.horizontal;
        return this.floating && t
          ? ("right" === t && i) || ("left" === t && !i)
          : n && (("down" === n && e) || ("up" === n && !e));
      },
      _getDragVerticalDirection: function () {
        var t = this.positionAbs.top - this.lastPositionAbs.top;
        return 0 != t && (0 < t ? "down" : "up");
      },
      _getDragHorizontalDirection: function () {
        var t = this.positionAbs.left - this.lastPositionAbs.left;
        return 0 != t && (0 < t ? "right" : "left");
      },
      refresh: function (t) {
        return (
          this._refreshItems(t),
          this._setHandleClassName(),
          this.refreshPositions(),
          this
        );
      },
      _connectWith: function () {
        var t = this.options;
        return t.connectWith.constructor === String
          ? [t.connectWith]
          : t.connectWith;
      },
      _getItemsAsjQuery: function (t) {
        var e,
          i,
          n,
          s,
          o = [],
          r = [],
          a = this._connectWith();
        if (a && t)
          for (e = a.length - 1; 0 <= e; e--)
            for (i = (n = Y(a[e], this.document[0])).length - 1; 0 <= i; i--)
              (s = Y.data(n[i], this.widgetFullName)) &&
                s !== this &&
                !s.options.disabled &&
                r.push([
                  "function" == typeof s.options.items
                    ? s.options.items.call(s.element)
                    : Y(s.options.items, s.element)
                        .not(".ui-sortable-helper")
                        .not(".ui-sortable-placeholder"),
                  s,
                ]);
        function l() {
          o.push(this);
        }
        for (
          r.push([
            "function" == typeof this.options.items
              ? this.options.items.call(this.element, null, {
                  options: this.options,
                  item: this.currentItem,
                })
              : Y(this.options.items, this.element)
                  .not(".ui-sortable-helper")
                  .not(".ui-sortable-placeholder"),
            this,
          ]),
            e = r.length - 1;
          0 <= e;
          e--
        )
          r[e][0].each(l);
        return Y(o);
      },
      _removeCurrentsFromItems: function () {
        var i = this.currentItem.find(":data(" + this.widgetName + "-item)");
        this.items = Y.grep(this.items, function (t) {
          for (var e = 0; e < i.length; e++) if (i[e] === t.item[0]) return !1;
          return !0;
        });
      },
      _refreshItems: function (t) {
        (this.items = []), (this.containers = [this]);
        var e,
          i,
          n,
          s,
          o,
          r,
          a,
          l,
          c = this.items,
          h = [
            [
              "function" == typeof this.options.items
                ? this.options.items.call(this.element[0], t, {
                    item: this.currentItem,
                  })
                : Y(this.options.items, this.element),
              this,
            ],
          ],
          u = this._connectWith();
        if (u && this.ready)
          for (e = u.length - 1; 0 <= e; e--)
            for (i = (n = Y(u[e], this.document[0])).length - 1; 0 <= i; i--)
              (s = Y.data(n[i], this.widgetFullName)) &&
                s !== this &&
                !s.options.disabled &&
                (h.push([
                  "function" == typeof s.options.items
                    ? s.options.items.call(s.element[0], t, {
                        item: this.currentItem,
                      })
                    : Y(s.options.items, s.element),
                  s,
                ]),
                this.containers.push(s));
        for (e = h.length - 1; 0 <= e; e--)
          for (o = h[e][1], l = (r = h[e][(i = 0)]).length; i < l; i++)
            (a = Y(r[i])).data(this.widgetName + "-item", o),
              c.push({
                item: a,
                instance: o,
                width: 0,
                height: 0,
                left: 0,
                top: 0,
              });
      },
      _refreshItemPositions: function (t) {
        for (var e, i, n = this.items.length - 1; 0 <= n; n--)
          (e = this.items[n]),
            (this.currentContainer &&
              e.instance !== this.currentContainer &&
              e.item[0] !== this.currentItem[0]) ||
              ((i = this.options.toleranceElement
                ? Y(this.options.toleranceElement, e.item)
                : e.item),
              t || ((e.width = i.outerWidth()), (e.height = i.outerHeight())),
              (i = i.offset()),
              (e.left = i.left),
              (e.top = i.top));
      },
      refreshPositions: function (t) {
        var e, i;
        if (
          ((this.floating =
            !!this.items.length &&
            ("x" === this.options.axis ||
              this._isFloating(this.items[0].item))),
          null !== this.innermostContainer && this._refreshItemPositions(t),
          this.options.custom && this.options.custom.refreshContainers)
        )
          this.options.custom.refreshContainers.call(this);
        else
          for (e = this.containers.length - 1; 0 <= e; e--)
            (i = this.containers[e].element.offset()),
              (this.containers[e].containerCache.left = i.left),
              (this.containers[e].containerCache.top = i.top),
              (this.containers[e].containerCache.width =
                this.containers[e].element.outerWidth()),
              (this.containers[e].containerCache.height =
                this.containers[e].element.outerHeight());
        return this;
      },
      _createPlaceholder: function (i) {
        var n,
          s,
          o = (i = i || this).options;
        (o.placeholder && o.placeholder.constructor !== String) ||
          ((n = o.placeholder),
          (s = i.currentItem[0].nodeName.toLowerCase()),
          (o.placeholder = {
            element: function () {
              var t = Y("<" + s + ">", i.document[0]);
              return (
                i
                  ._addClass(
                    t,
                    "ui-sortable-placeholder",
                    n || i.currentItem[0].className
                  )
                  ._removeClass(t, "ui-sortable-helper"),
                "tbody" === s
                  ? i._createTrPlaceholder(
                      i.currentItem.find("tr").eq(0),
                      Y("<tr>", i.document[0]).appendTo(t)
                    )
                  : "tr" === s
                  ? i._createTrPlaceholder(i.currentItem, t)
                  : "img" === s && t.attr("src", i.currentItem.attr("src")),
                n || t.css("visibility", "hidden"),
                t
              );
            },
            update: function (t, e) {
              (n && !o.forcePlaceholderSize) ||
                ((e.height() &&
                  (!o.forcePlaceholderSize || ("tbody" !== s && "tr" !== s))) ||
                  e.height(
                    i.currentItem.innerHeight() -
                      parseInt(i.currentItem.css("paddingTop") || 0, 10) -
                      parseInt(i.currentItem.css("paddingBottom") || 0, 10)
                  ),
                e.width() ||
                  e.width(
                    i.currentItem.innerWidth() -
                      parseInt(i.currentItem.css("paddingLeft") || 0, 10) -
                      parseInt(i.currentItem.css("paddingRight") || 0, 10)
                  ));
            },
          })),
          (i.placeholder = Y(
            o.placeholder.element.call(i.element, i.currentItem)
          )),
          i.currentItem.after(i.placeholder),
          o.placeholder.update(i, i.placeholder);
      },
      _createTrPlaceholder: function (t, e) {
        var i = this;
        t.children().each(function () {
          Y("<td>&#160;</td>", i.document[0])
            .attr("colspan", Y(this).attr("colspan") || 1)
            .appendTo(e);
        });
      },
      _contactContainers: function (t) {
        for (
          var e,
            i,
            n,
            s,
            o,
            r,
            a,
            l,
            c,
            h = null,
            u = null,
            d = this.containers.length - 1;
          0 <= d;
          d--
        )
          Y.contains(this.currentItem[0], this.containers[d].element[0]) ||
            (this._intersectsWith(this.containers[d].containerCache)
              ? (h &&
                  Y.contains(this.containers[d].element[0], h.element[0])) ||
                ((h = this.containers[d]), (u = d))
              : this.containers[d].containerCache.over &&
                (this.containers[d]._trigger("out", t, this._uiHash(this)),
                (this.containers[d].containerCache.over = 0)));
        if ((this.innermostContainer = h))
          if (1 === this.containers.length)
            this.containers[u].containerCache.over ||
              (this.containers[u]._trigger("over", t, this._uiHash(this)),
              (this.containers[u].containerCache.over = 1));
          else {
            for (
              i = 1e4,
                n = null,
                s = (l = h.floating || this._isFloating(this.currentItem))
                  ? "left"
                  : "top",
                o = l ? "width" : "height",
                c = l ? "pageX" : "pageY",
                e = this.items.length - 1;
              0 <= e;
              e--
            )
              Y.contains(
                this.containers[u].element[0],
                this.items[e].item[0]
              ) &&
                this.items[e].item[0] !== this.currentItem[0] &&
                ((r = this.items[e].item.offset()[s]),
                (a = !1),
                t[c] - r > this.items[e][o] / 2 && (a = !0),
                Math.abs(t[c] - r) < i &&
                  ((i = Math.abs(t[c] - r)),
                  (n = this.items[e]),
                  (this.direction = a ? "up" : "down")));
            (n || this.options.dropOnEmpty) &&
              (this.currentContainer !== this.containers[u]
                ? (n
                    ? this._rearrange(t, n, null, !0)
                    : this._rearrange(t, null, this.containers[u].element, !0),
                  this._trigger("change", t, this._uiHash()),
                  this.containers[u]._trigger("change", t, this._uiHash(this)),
                  (this.currentContainer = this.containers[u]),
                  this.options.placeholder.update(
                    this.currentContainer,
                    this.placeholder
                  ),
                  (this.scrollParent = this.placeholder.scrollParent()),
                  this.scrollParent[0] !== this.document[0] &&
                    "HTML" !== this.scrollParent[0].tagName &&
                    (this.overflowOffset = this.scrollParent.offset()),
                  this.containers[u]._trigger("over", t, this._uiHash(this)),
                  (this.containers[u].containerCache.over = 1))
                : this.currentContainer.containerCache.over ||
                  (this.containers[u]._trigger("over", t, this._uiHash()),
                  (this.currentContainer.containerCache.over = 1)));
          }
      },
      _createHelper: function (t) {
        var e = this.options,
          t =
            "function" == typeof e.helper
              ? Y(e.helper.apply(this.element[0], [t, this.currentItem]))
              : "clone" === e.helper
              ? this.currentItem.clone()
              : this.currentItem;
        return (
          t.parents("body").length || this.appendTo[0].appendChild(t[0]),
          t[0] === this.currentItem[0] &&
            (this._storedCSS = {
              width: this.currentItem[0].style.width,
              height: this.currentItem[0].style.height,
              position: this.currentItem.css("position"),
              top: this.currentItem.css("top"),
              left: this.currentItem.css("left"),
            }),
          (t[0].style.width && !e.forceHelperSize) ||
            t.width(this.currentItem.width()),
          (t[0].style.height && !e.forceHelperSize) ||
            t.height(this.currentItem.height()),
          t
        );
      },
      _adjustOffsetFromHelper: function (t) {
        "string" == typeof t && (t = t.split(" ")),
          "left" in
            (t = Array.isArray(t) ? { left: +t[0], top: +t[1] || 0 } : t) &&
            (this.offset.click.left = t.left + this.margins.left),
          "right" in t &&
            (this.offset.click.left =
              this.helperProportions.width - t.right + this.margins.left),
          "top" in t && (this.offset.click.top = t.top + this.margins.top),
          "bottom" in t &&
            (this.offset.click.top =
              this.helperProportions.height - t.bottom + this.margins.top);
      },
      _getParentOffset: function () {
        this.offsetParent = this.helper.offsetParent();
        var t = this.offsetParent.offset();
        return (
          "absolute" === this.cssPosition &&
            this.scrollParent[0] !== this.document[0] &&
            Y.contains(this.scrollParent[0], this.offsetParent[0]) &&
            ((t.left += this.scrollParent.scrollLeft()),
            (t.top += this.scrollParent.scrollTop())),
          {
            top:
              (t =
                this.offsetParent[0] === this.document[0].body ||
                (this.offsetParent[0].tagName &&
                  "html" === this.offsetParent[0].tagName.toLowerCase() &&
                  Y.ui.ie)
                  ? { top: 0, left: 0 }
                  : t).top +
              (parseInt(this.offsetParent.css("borderTopWidth"), 10) || 0),
            left:
              t.left +
              (parseInt(this.offsetParent.css("borderLeftWidth"), 10) || 0),
          }
        );
      },
      _getRelativeOffset: function () {
        if ("relative" !== this.cssPosition) return { top: 0, left: 0 };
        var t = this.currentItem.position();
        return {
          top:
            t.top -
            (parseInt(this.helper.css("top"), 10) || 0) +
            this.scrollParent.scrollTop(),
          left:
            t.left -
            (parseInt(this.helper.css("left"), 10) || 0) +
            this.scrollParent.scrollLeft(),
        };
      },
      _cacheMargins: function () {
        this.margins = {
          left: parseInt(this.currentItem.css("marginLeft"), 10) || 0,
          top: parseInt(this.currentItem.css("marginTop"), 10) || 0,
        };
      },
      _cacheHelperProportions: function () {
        this.helperProportions = {
          width: this.helper.outerWidth(),
          height: this.helper.outerHeight(),
        };
      },
      _setContainment: function () {
        var t,
          e,
          i = this.options;
        "parent" === i.containment &&
          (i.containment = this.helper[0].parentNode),
          ("document" !== i.containment && "window" !== i.containment) ||
            (this.containment = [
              0 - this.offset.relative.left - this.offset.parent.left,
              0 - this.offset.relative.top - this.offset.parent.top,
              "document" === i.containment
                ? this.document.width()
                : this.window.width() -
                  this.helperProportions.width -
                  this.margins.left,
              ("document" === i.containment
                ? this.document.height() ||
                  document.body.parentNode.scrollHeight
                : this.window.height() ||
                  this.document[0].body.parentNode.scrollHeight) -
                this.helperProportions.height -
                this.margins.top,
            ]),
          /^(document|window|parent)$/.test(i.containment) ||
            ((t = Y(i.containment)[0]),
            (e = Y(i.containment).offset()),
            (i = "hidden" !== Y(t).css("overflow")),
            (this.containment = [
              e.left +
                (parseInt(Y(t).css("borderLeftWidth"), 10) || 0) +
                (parseInt(Y(t).css("paddingLeft"), 10) || 0) -
                this.margins.left,
              e.top +
                (parseInt(Y(t).css("borderTopWidth"), 10) || 0) +
                (parseInt(Y(t).css("paddingTop"), 10) || 0) -
                this.margins.top,
              e.left +
                (i ? Math.max(t.scrollWidth, t.offsetWidth) : t.offsetWidth) -
                (parseInt(Y(t).css("borderLeftWidth"), 10) || 0) -
                (parseInt(Y(t).css("paddingRight"), 10) || 0) -
                this.helperProportions.width -
                this.margins.left,
              e.top +
                (i
                  ? Math.max(t.scrollHeight, t.offsetHeight)
                  : t.offsetHeight) -
                (parseInt(Y(t).css("borderTopWidth"), 10) || 0) -
                (parseInt(Y(t).css("paddingBottom"), 10) || 0) -
                this.helperProportions.height -
                this.margins.top,
            ]));
      },
      _convertPositionTo: function (t, e) {
        e = e || this.position;
        var i = "absolute" === t ? 1 : -1,
          n =
            "absolute" !== this.cssPosition ||
            (this.scrollParent[0] !== this.document[0] &&
              Y.contains(this.scrollParent[0], this.offsetParent[0]))
              ? this.scrollParent
              : this.offsetParent,
          t = /(html|body)/i.test(n[0].tagName);
        return {
          top:
            e.top +
            this.offset.relative.top * i +
            this.offset.parent.top * i -
            ("fixed" === this.cssPosition
              ? -this.scrollParent.scrollTop()
              : t
              ? 0
              : n.scrollTop()) *
              i,
          left:
            e.left +
            this.offset.relative.left * i +
            this.offset.parent.left * i -
            ("fixed" === this.cssPosition
              ? -this.scrollParent.scrollLeft()
              : t
              ? 0
              : n.scrollLeft()) *
              i,
        };
      },
      _generatePosition: function (t) {
        var e = this.options,
          i = t.pageX,
          n = t.pageY,
          s =
            "absolute" !== this.cssPosition ||
            (this.scrollParent[0] !== this.document[0] &&
              Y.contains(this.scrollParent[0], this.offsetParent[0]))
              ? this.scrollParent
              : this.offsetParent,
          o = /(html|body)/i.test(s[0].tagName);
        return (
          "relative" !== this.cssPosition ||
            (this.scrollParent[0] !== this.document[0] &&
              this.scrollParent[0] !== this.offsetParent[0]) ||
            (this.offset.relative = this._getRelativeOffset()),
          this.originalPosition &&
            (this.containment &&
              (t.pageX - this.offset.click.left < this.containment[0] &&
                (i = this.containment[0] + this.offset.click.left),
              t.pageY - this.offset.click.top < this.containment[1] &&
                (n = this.containment[1] + this.offset.click.top),
              t.pageX - this.offset.click.left > this.containment[2] &&
                (i = this.containment[2] + this.offset.click.left),
              t.pageY - this.offset.click.top > this.containment[3] &&
                (n = this.containment[3] + this.offset.click.top)),
            e.grid &&
              ((t =
                this.originalPageY +
                Math.round((n - this.originalPageY) / e.grid[1]) * e.grid[1]),
              (n =
                !this.containment ||
                (t - this.offset.click.top >= this.containment[1] &&
                  t - this.offset.click.top <= this.containment[3])
                  ? t
                  : t - this.offset.click.top >= this.containment[1]
                  ? t - e.grid[1]
                  : t + e.grid[1]),
              (t =
                this.originalPageX +
                Math.round((i - this.originalPageX) / e.grid[0]) * e.grid[0]),
              (i =
                !this.containment ||
                (t - this.offset.click.left >= this.containment[0] &&
                  t - this.offset.click.left <= this.containment[2])
                  ? t
                  : t - this.offset.click.left >= this.containment[0]
                  ? t - e.grid[0]
                  : t + e.grid[0]))),
          {
            top:
              n -
              this.offset.click.top -
              this.offset.relative.top -
              this.offset.parent.top +
              ("fixed" === this.cssPosition
                ? -this.scrollParent.scrollTop()
                : o
                ? 0
                : s.scrollTop()),
            left:
              i -
              this.offset.click.left -
              this.offset.relative.left -
              this.offset.parent.left +
              ("fixed" === this.cssPosition
                ? -this.scrollParent.scrollLeft()
                : o
                ? 0
                : s.scrollLeft()),
          }
        );
      },
      _rearrange: function (t, e, i, n) {
        i
          ? i[0].appendChild(this.placeholder[0])
          : e.item[0].parentNode.insertBefore(
              this.placeholder[0],
              "down" === this.direction ? e.item[0] : e.item[0].nextSibling
            ),
          (this.counter = this.counter ? ++this.counter : 1);
        var s = this.counter;
        this._delay(function () {
          s === this.counter && this.refreshPositions(!n);
        });
      },
      _clear: function (t, e) {
        this.reverting = !1;
        var i,
          n = [];
        if (
          (!this._noFinalSort &&
            this.currentItem.parent().length &&
            this.placeholder.before(this.currentItem),
          (this._noFinalSort = null),
          this.helper[0] === this.currentItem[0])
        ) {
          for (i in this._storedCSS)
            ("auto" !== this._storedCSS[i] &&
              "static" !== this._storedCSS[i]) ||
              (this._storedCSS[i] = "");
          this.currentItem.css(this._storedCSS),
            this._removeClass(this.currentItem, "ui-sortable-helper");
        } else this.currentItem.show();
        function s(e, i, n) {
          return function (t) {
            n._trigger(e, t, i._uiHash(i));
          };
        }
        for (
          this.fromOutside &&
            !e &&
            n.push(function (t) {
              this._trigger("receive", t, this._uiHash(this.fromOutside));
            }),
            (!this.fromOutside &&
              this.domPosition.prev ===
                this.currentItem.prev().not(".ui-sortable-helper")[0] &&
              this.domPosition.parent === this.currentItem.parent()[0]) ||
              e ||
              n.push(function (t) {
                this._trigger("update", t, this._uiHash());
              }),
            this !== this.currentContainer &&
              (e ||
                (n.push(function (t) {
                  this._trigger("remove", t, this._uiHash());
                }),
                n.push(
                  function (e) {
                    return function (t) {
                      e._trigger("receive", t, this._uiHash(this));
                    };
                  }.call(this, this.currentContainer)
                ),
                n.push(
                  function (e) {
                    return function (t) {
                      e._trigger("update", t, this._uiHash(this));
                    };
                  }.call(this, this.currentContainer)
                ))),
            i = this.containers.length - 1;
          0 <= i;
          i--
        )
          e || n.push(s("deactivate", this, this.containers[i])),
            this.containers[i].containerCache.over &&
              (n.push(s("out", this, this.containers[i])),
              (this.containers[i].containerCache.over = 0));
        if (
          (this.storedCursor &&
            (this.document.find("body").css("cursor", this.storedCursor),
            this.storedStylesheet.remove()),
          this._storedOpacity &&
            this.helper.css("opacity", this._storedOpacity),
          this._storedZIndex &&
            this.helper.css(
              "zIndex",
              "auto" === this._storedZIndex ? "" : this._storedZIndex
            ),
          (this.dragging = !1),
          e || this._trigger("beforeStop", t, this._uiHash()),
          this.placeholder[0].parentNode.removeChild(this.placeholder[0]),
          this.cancelHelperRemoval ||
            (this.helper[0] !== this.currentItem[0] && this.helper.remove(),
            (this.helper = null)),
          !e)
        ) {
          for (i = 0; i < n.length; i++) n[i].call(this, t);
          this._trigger("stop", t, this._uiHash());
        }
        return (this.fromOutside = !1), !this.cancelHelperRemoval;
      },
      _trigger: function () {
        !1 === Y.Widget.prototype._trigger.apply(this, arguments) &&
          this.cancel();
      },
      _uiHash: function (t) {
        var e = t || this;
        return {
          helper: e.helper,
          placeholder: e.placeholder || Y([]),
          position: e.position,
          originalPosition: e.originalPosition,
          offset: e.positionAbs,
          item: e.currentItem,
          sender: t ? t.element : null,
        };
      },
    });
  function ct(e) {
    return function () {
      var t = this.element.val();
      e.apply(this, arguments),
        this._refresh(),
        t !== this.element.val() && this._trigger("change");
    };
  }
  Y.widget("ui.spinner", {
    version: "1.13.0",
    defaultElement: "<input>",
    widgetEventPrefix: "spin",
    options: {
      classes: {
        "ui-spinner": "ui-corner-all",
        "ui-spinner-down": "ui-corner-br",
        "ui-spinner-up": "ui-corner-tr",
      },
      culture: null,
      icons: { down: "ui-icon-triangle-1-s", up: "ui-icon-triangle-1-n" },
      incremental: !0,
      max: null,
      min: null,
      numberFormat: null,
      page: 10,
      step: 1,
      change: null,
      spin: null,
      start: null,
      stop: null,
    },
    _create: function () {
      this._setOption("max", this.options.max),
        this._setOption("min", this.options.min),
        this._setOption("step", this.options.step),
        "" !== this.value() && this._value(this.element.val(), !0),
        this._draw(),
        this._on(this._events),
        this._refresh(),
        this._on(this.window, {
          beforeunload: function () {
            this.element.removeAttr("autocomplete");
          },
        });
    },
    _getCreateOptions: function () {
      var n = this._super(),
        s = this.element;
      return (
        Y.each(["min", "max", "step"], function (t, e) {
          var i = s.attr(e);
          null != i && i.length && (n[e] = i);
        }),
        n
      );
    },
    _events: {
      keydown: function (t) {
        this._start(t) && this._keydown(t) && t.preventDefault();
      },
      keyup: "_stop",
      focus: function () {
        this.previous = this.element.val();
      },
      blur: function (t) {
        this.cancelBlur
          ? delete this.cancelBlur
          : (this._stop(),
            this._refresh(),
            this.previous !== this.element.val() && this._trigger("change", t));
      },
      mousewheel: function (t, e) {
        var i = Y.ui.safeActiveElement(this.document[0]);
        if (this.element[0] === i && e) {
          if (!this.spinning && !this._start(t)) return !1;
          this._spin((0 < e ? 1 : -1) * this.options.step, t),
            clearTimeout(this.mousewheelTimer),
            (this.mousewheelTimer = this._delay(function () {
              this.spinning && this._stop(t);
            }, 100)),
            t.preventDefault();
        }
      },
      "mousedown .ui-spinner-button": function (t) {
        var e;
        function i() {
          this.element[0] === Y.ui.safeActiveElement(this.document[0]) ||
            (this.element.trigger("focus"),
            (this.previous = e),
            this._delay(function () {
              this.previous = e;
            }));
        }
        (e =
          this.element[0] === Y.ui.safeActiveElement(this.document[0])
            ? this.previous
            : this.element.val()),
          t.preventDefault(),
          i.call(this),
          (this.cancelBlur = !0),
          this._delay(function () {
            delete this.cancelBlur, i.call(this);
          }),
          !1 !== this._start(t) &&
            this._repeat(
              null,
              Y(t.currentTarget).hasClass("ui-spinner-up") ? 1 : -1,
              t
            );
      },
      "mouseup .ui-spinner-button": "_stop",
      "mouseenter .ui-spinner-button": function (t) {
        if (Y(t.currentTarget).hasClass("ui-state-active"))
          return (
            !1 !== this._start(t) &&
            void this._repeat(
              null,
              Y(t.currentTarget).hasClass("ui-spinner-up") ? 1 : -1,
              t
            )
          );
      },
      "mouseleave .ui-spinner-button": "_stop",
    },
    _enhance: function () {
      this.uiSpinner = this.element
        .attr("autocomplete", "off")
        .wrap("<span>")
        .parent()
        .append("<a></a><a></a>");
    },
    _draw: function () {
      this._enhance(),
        this._addClass(
          this.uiSpinner,
          "ui-spinner",
          "ui-widget ui-widget-content"
        ),
        this._addClass("ui-spinner-input"),
        this.element.attr("role", "spinbutton"),
        (this.buttons = this.uiSpinner
          .children("a")
          .attr("tabIndex", -1)
          .attr("aria-hidden", !0)
          .button({ classes: { "ui-button": "" } })),
        this._removeClass(this.buttons, "ui-corner-all"),
        this._addClass(this.buttons.first(), "ui-spinner-button ui-spinner-up"),
        this._addClass(
          this.buttons.last(),
          "ui-spinner-button ui-spinner-down"
        ),
        this.buttons
          .first()
          .button({ icon: this.options.icons.up, showLabel: !1 }),
        this.buttons
          .last()
          .button({ icon: this.options.icons.down, showLabel: !1 }),
        this.buttons.height() > Math.ceil(0.5 * this.uiSpinner.height()) &&
          0 < this.uiSpinner.height() &&
          this.uiSpinner.height(this.uiSpinner.height());
    },
    _keydown: function (t) {
      var e = this.options,
        i = Y.ui.keyCode;
      switch (t.keyCode) {
        case i.UP:
          return this._repeat(null, 1, t), !0;
        case i.DOWN:
          return this._repeat(null, -1, t), !0;
        case i.PAGE_UP:
          return this._repeat(null, e.page, t), !0;
        case i.PAGE_DOWN:
          return this._repeat(null, -e.page, t), !0;
      }
      return !1;
    },
    _start: function (t) {
      return (
        !(!this.spinning && !1 === this._trigger("start", t)) &&
        (this.counter || (this.counter = 1), (this.spinning = !0))
      );
    },
    _repeat: function (t, e, i) {
      (t = t || 500),
        clearTimeout(this.timer),
        (this.timer = this._delay(function () {
          this._repeat(40, e, i);
        }, t)),
        this._spin(e * this.options.step, i);
    },
    _spin: function (t, e) {
      var i = this.value() || 0;
      this.counter || (this.counter = 1),
        (i = this._adjustValue(i + t * this._increment(this.counter))),
        (this.spinning && !1 === this._trigger("spin", e, { value: i })) ||
          (this._value(i), this.counter++);
    },
    _increment: function (t) {
      var e = this.options.incremental;
      return e
        ? "function" == typeof e
          ? e(t)
          : Math.floor((t * t * t) / 5e4 - (t * t) / 500 + (17 * t) / 200 + 1)
        : 1;
    },
    _precision: function () {
      var t = this._precisionOf(this.options.step);
      return (t =
        null !== this.options.min
          ? Math.max(t, this._precisionOf(this.options.min))
          : t);
    },
    _precisionOf: function (t) {
      var e = t.toString(),
        t = e.indexOf(".");
      return -1 === t ? 0 : e.length - t - 1;
    },
    _adjustValue: function (t) {
      var e = this.options,
        i = null !== e.min ? e.min : 0,
        n = t - i;
      return (
        (t = i + Math.round(n / e.step) * e.step),
        (t = parseFloat(t.toFixed(this._precision()))),
        null !== e.max && t > e.max
          ? e.max
          : null !== e.min && t < e.min
          ? e.min
          : t
      );
    },
    _stop: function (t) {
      this.spinning &&
        (clearTimeout(this.timer),
        clearTimeout(this.mousewheelTimer),
        (this.counter = 0),
        (this.spinning = !1),
        this._trigger("stop", t));
    },
    _setOption: function (t, e) {
      var i;
      if ("culture" === t || "numberFormat" === t)
        return (
          (i = this._parse(this.element.val())),
          (this.options[t] = e),
          void this.element.val(this._format(i))
        );
      ("max" !== t && "min" !== t && "step" !== t) ||
        ("string" == typeof e && (e = this._parse(e))),
        "icons" === t &&
          ((i = this.buttons.first().find(".ui-icon")),
          this._removeClass(i, null, this.options.icons.up),
          this._addClass(i, null, e.up),
          (i = this.buttons.last().find(".ui-icon")),
          this._removeClass(i, null, this.options.icons.down),
          this._addClass(i, null, e.down)),
        this._super(t, e);
    },
    _setOptionDisabled: function (t) {
      this._super(t),
        this._toggleClass(this.uiSpinner, null, "ui-state-disabled", !!t),
        this.element.prop("disabled", !!t),
        this.buttons.button(t ? "disable" : "enable");
    },
    _setOptions: ct(function (t) {
      this._super(t);
    }),
    _parse: function (t) {
      return "" ===
        (t =
          "string" == typeof t && "" !== t
            ? window.Globalize && this.options.numberFormat
              ? Globalize.parseFloat(t, 10, this.options.culture)
              : +t
            : t) || isNaN(t)
        ? null
        : t;
    },
    _format: function (t) {
      return "" === t
        ? ""
        : window.Globalize && this.options.numberFormat
        ? Globalize.format(t, this.options.numberFormat, this.options.culture)
        : t;
    },
    _refresh: function () {
      this.element.attr({
        "aria-valuemin": this.options.min,
        "aria-valuemax": this.options.max,
        "aria-valuenow": this._parse(this.element.val()),
      });
    },
    isValid: function () {
      var t = this.value();
      return null !== t && t === this._adjustValue(t);
    },
    _value: function (t, e) {
      var i;
      "" !== t &&
        null !== (i = this._parse(t)) &&
        (e || (i = this._adjustValue(i)), (t = this._format(i))),
        this.element.val(t),
        this._refresh();
    },
    _destroy: function () {
      this.element
        .prop("disabled", !1)
        .removeAttr(
          "autocomplete role aria-valuemin aria-valuemax aria-valuenow"
        ),
        this.uiSpinner.replaceWith(this.element);
    },
    stepUp: ct(function (t) {
      this._stepUp(t);
    }),
    _stepUp: function (t) {
      this._start() && (this._spin((t || 1) * this.options.step), this._stop());
    },
    stepDown: ct(function (t) {
      this._stepDown(t);
    }),
    _stepDown: function (t) {
      this._start() &&
        (this._spin((t || 1) * -this.options.step), this._stop());
    },
    pageUp: ct(function (t) {
      this._stepUp((t || 1) * this.options.page);
    }),
    pageDown: ct(function (t) {
      this._stepDown((t || 1) * this.options.page);
    }),
    value: function (t) {
      if (!arguments.length) return this._parse(this.element.val());
      ct(this._value).call(this, t);
    },
    widget: function () {
      return this.uiSpinner;
    },
  }),
    !1 !== Y.uiBackCompat &&
      Y.widget("ui.spinner", Y.ui.spinner, {
        _enhance: function () {
          this.uiSpinner = this.element
            .attr("autocomplete", "off")
            .wrap(this._uiSpinnerHtml())
            .parent()
            .append(this._buttonHtml());
        },
        _uiSpinnerHtml: function () {
          return "<span>";
        },
        _buttonHtml: function () {
          return "<a></a><a></a>";
        },
      });
  var ht;
  Y.ui.spinner;
  Y.widget("ui.tabs", {
    version: "1.13.0",
    delay: 300,
    options: {
      active: null,
      classes: {
        "ui-tabs": "ui-corner-all",
        "ui-tabs-nav": "ui-corner-all",
        "ui-tabs-panel": "ui-corner-bottom",
        "ui-tabs-tab": "ui-corner-top",
      },
      collapsible: !1,
      event: "click",
      heightStyle: "content",
      hide: null,
      show: null,
      activate: null,
      beforeActivate: null,
      beforeLoad: null,
      load: null,
    },
    _isLocal:
      ((ht = /#.*$/),
      function (t) {
        var e = t.href.replace(ht, ""),
          i = location.href.replace(ht, "");
        try {
          e = decodeURIComponent(e);
        } catch (t) {}
        try {
          i = decodeURIComponent(i);
        } catch (t) {}
        return 1 < t.hash.length && e === i;
      }),
    _create: function () {
      var e = this,
        t = this.options;
      (this.running = !1),
        this._addClass("ui-tabs", "ui-widget ui-widget-content"),
        this._toggleClass("ui-tabs-collapsible", null, t.collapsible),
        this._processTabs(),
        (t.active = this._initialActive()),
        Array.isArray(t.disabled) &&
          (t.disabled = Y.uniqueSort(
            t.disabled.concat(
              Y.map(this.tabs.filter(".ui-state-disabled"), function (t) {
                return e.tabs.index(t);
              })
            )
          ).sort()),
        !1 !== this.options.active && this.anchors.length
          ? (this.active = this._findActive(t.active))
          : (this.active = Y()),
        this._refresh(),
        this.active.length && this.load(t.active);
    },
    _initialActive: function () {
      var i = this.options.active,
        t = this.options.collapsible,
        n = location.hash.substring(1);
      return (
        null === i &&
          (n &&
            this.tabs.each(function (t, e) {
              if (Y(e).attr("aria-controls") === n) return (i = t), !1;
            }),
          (null !==
            (i =
              null === i
                ? this.tabs.index(this.tabs.filter(".ui-tabs-active"))
                : i) &&
            -1 !== i) ||
            (i = !!this.tabs.length && 0)),
        !1 !== i &&
          -1 === (i = this.tabs.index(this.tabs.eq(i))) &&
          (i = !t && 0),
        (i = !t && !1 === i && this.anchors.length ? 0 : i)
      );
    },
    _getCreateEventData: function () {
      return {
        tab: this.active,
        panel: this.active.length ? this._getPanelForTab(this.active) : Y(),
      };
    },
    _tabKeydown: function (t) {
      var e = Y(Y.ui.safeActiveElement(this.document[0])).closest("li"),
        i = this.tabs.index(e),
        n = !0;
      if (!this._handlePageNav(t)) {
        switch (t.keyCode) {
          case Y.ui.keyCode.RIGHT:
          case Y.ui.keyCode.DOWN:
            i++;
            break;
          case Y.ui.keyCode.UP:
          case Y.ui.keyCode.LEFT:
            (n = !1), i--;
            break;
          case Y.ui.keyCode.END:
            i = this.anchors.length - 1;
            break;
          case Y.ui.keyCode.HOME:
            i = 0;
            break;
          case Y.ui.keyCode.SPACE:
            return (
              t.preventDefault(),
              clearTimeout(this.activating),
              void this._activate(i)
            );
          case Y.ui.keyCode.ENTER:
            return (
              t.preventDefault(),
              clearTimeout(this.activating),
              void this._activate(i !== this.options.active && i)
            );
          default:
            return;
        }
        t.preventDefault(),
          clearTimeout(this.activating),
          (i = this._focusNextTab(i, n)),
          t.ctrlKey ||
            t.metaKey ||
            (e.attr("aria-selected", "false"),
            this.tabs.eq(i).attr("aria-selected", "true"),
            (this.activating = this._delay(function () {
              this.option("active", i);
            }, this.delay)));
      }
    },
    _panelKeydown: function (t) {
      this._handlePageNav(t) ||
        (t.ctrlKey &&
          t.keyCode === Y.ui.keyCode.UP &&
          (t.preventDefault(), this.active.trigger("focus")));
    },
    _handlePageNav: function (t) {
      return t.altKey && t.keyCode === Y.ui.keyCode.PAGE_UP
        ? (this._activate(this._focusNextTab(this.options.active - 1, !1)), !0)
        : t.altKey && t.keyCode === Y.ui.keyCode.PAGE_DOWN
        ? (this._activate(this._focusNextTab(this.options.active + 1, !0)), !0)
        : void 0;
    },
    _findNextTab: function (t, e) {
      var i = this.tabs.length - 1;
      for (
        ;
        -1 !==
        Y.inArray((t = (t = i < t ? 0 : t) < 0 ? i : t), this.options.disabled);

      )
        t = e ? t + 1 : t - 1;
      return t;
    },
    _focusNextTab: function (t, e) {
      return (t = this._findNextTab(t, e)), this.tabs.eq(t).trigger("focus"), t;
    },
    _setOption: function (t, e) {
      "active" !== t
        ? (this._super(t, e),
          "collapsible" === t &&
            (this._toggleClass("ui-tabs-collapsible", null, e),
            e || !1 !== this.options.active || this._activate(0)),
          "event" === t && this._setupEvents(e),
          "heightStyle" === t && this._setupHeightStyle(e))
        : this._activate(e);
    },
    _sanitizeSelector: function (t) {
      return t ? t.replace(/[!"$%&'()*+,.\/:;<=>?@\[\]\^`{|}~]/g, "\\$&") : "";
    },
    refresh: function () {
      var t = this.options,
        e = this.tablist.children(":has(a[href])");
      (t.disabled = Y.map(e.filter(".ui-state-disabled"), function (t) {
        return e.index(t);
      })),
        this._processTabs(),
        !1 !== t.active && this.anchors.length
          ? this.active.length && !Y.contains(this.tablist[0], this.active[0])
            ? this.tabs.length === t.disabled.length
              ? ((t.active = !1), (this.active = Y()))
              : this._activate(this._findNextTab(Math.max(0, t.active - 1), !1))
            : (t.active = this.tabs.index(this.active))
          : ((t.active = !1), (this.active = Y())),
        this._refresh();
    },
    _refresh: function () {
      this._setOptionDisabled(this.options.disabled),
        this._setupEvents(this.options.event),
        this._setupHeightStyle(this.options.heightStyle),
        this.tabs
          .not(this.active)
          .attr({
            "aria-selected": "false",
            "aria-expanded": "false",
            tabIndex: -1,
          }),
        this.panels
          .not(this._getPanelForTab(this.active))
          .hide()
          .attr({ "aria-hidden": "true" }),
        this.active.length
          ? (this.active.attr({
              "aria-selected": "true",
              "aria-expanded": "true",
              tabIndex: 0,
            }),
            this._addClass(this.active, "ui-tabs-active", "ui-state-active"),
            this._getPanelForTab(this.active)
              .show()
              .attr({ "aria-hidden": "false" }))
          : this.tabs.eq(0).attr("tabIndex", 0);
    },
    _processTabs: function () {
      var l = this,
        t = this.tabs,
        e = this.anchors,
        i = this.panels;
      (this.tablist = this._getList().attr("role", "tablist")),
        this._addClass(
          this.tablist,
          "ui-tabs-nav",
          "ui-helper-reset ui-helper-clearfix ui-widget-header"
        ),
        this.tablist
          .on("mousedown" + this.eventNamespace, "> li", function (t) {
            Y(this).is(".ui-state-disabled") && t.preventDefault();
          })
          .on("focus" + this.eventNamespace, ".ui-tabs-anchor", function () {
            Y(this).closest("li").is(".ui-state-disabled") && this.blur();
          }),
        (this.tabs = this.tablist
          .find("> li:has(a[href])")
          .attr({ role: "tab", tabIndex: -1 })),
        this._addClass(this.tabs, "ui-tabs-tab", "ui-state-default"),
        (this.anchors = this.tabs
          .map(function () {
            return Y("a", this)[0];
          })
          .attr({ tabIndex: -1 })),
        this._addClass(this.anchors, "ui-tabs-anchor"),
        (this.panels = Y()),
        this.anchors.each(function (t, e) {
          var i,
            n,
            s,
            o = Y(e).uniqueId().attr("id"),
            r = Y(e).closest("li"),
            a = r.attr("aria-controls");
          l._isLocal(e)
            ? ((s = (i = e.hash).substring(1)),
              (n = l.element.find(l._sanitizeSelector(i))))
            : ((s = r.attr("aria-controls") || Y({}).uniqueId()[0].id),
              (n = l.element.find((i = "#" + s))).length ||
                (n = l._createPanel(s)).insertAfter(
                  l.panels[t - 1] || l.tablist
                ),
              n.attr("aria-live", "polite")),
            n.length && (l.panels = l.panels.add(n)),
            a && r.data("ui-tabs-aria-controls", a),
            r.attr({ "aria-controls": s, "aria-labelledby": o }),
            n.attr("aria-labelledby", o);
        }),
        this.panels.attr("role", "tabpanel"),
        this._addClass(this.panels, "ui-tabs-panel", "ui-widget-content"),
        t &&
          (this._off(t.not(this.tabs)),
          this._off(e.not(this.anchors)),
          this._off(i.not(this.panels)));
    },
    _getList: function () {
      return this.tablist || this.element.find("ol, ul").eq(0);
    },
    _createPanel: function (t) {
      return Y("<div>").attr("id", t).data("ui-tabs-destroy", !0);
    },
    _setOptionDisabled: function (t) {
      var e, i;
      for (
        Array.isArray(t) &&
          (t.length ? t.length === this.anchors.length && (t = !0) : (t = !1)),
          i = 0;
        (e = this.tabs[i]);
        i++
      )
        (e = Y(e)),
          !0 === t || -1 !== Y.inArray(i, t)
            ? (e.attr("aria-disabled", "true"),
              this._addClass(e, null, "ui-state-disabled"))
            : (e.removeAttr("aria-disabled"),
              this._removeClass(e, null, "ui-state-disabled"));
      (this.options.disabled = t),
        this._toggleClass(
          this.widget(),
          this.widgetFullName + "-disabled",
          null,
          !0 === t
        );
    },
    _setupEvents: function (t) {
      var i = {};
      t &&
        Y.each(t.split(" "), function (t, e) {
          i[e] = "_eventHandler";
        }),
        this._off(this.anchors.add(this.tabs).add(this.panels)),
        this._on(!0, this.anchors, {
          click: function (t) {
            t.preventDefault();
          },
        }),
        this._on(this.anchors, i),
        this._on(this.tabs, { keydown: "_tabKeydown" }),
        this._on(this.panels, { keydown: "_panelKeydown" }),
        this._focusable(this.tabs),
        this._hoverable(this.tabs);
    },
    _setupHeightStyle: function (t) {
      var i,
        e = this.element.parent();
      "fill" === t
        ? ((i = e.height()),
          (i -= this.element.outerHeight() - this.element.height()),
          this.element.siblings(":visible").each(function () {
            var t = Y(this),
              e = t.css("position");
            "absolute" !== e && "fixed" !== e && (i -= t.outerHeight(!0));
          }),
          this.element
            .children()
            .not(this.panels)
            .each(function () {
              i -= Y(this).outerHeight(!0);
            }),
          this.panels
            .each(function () {
              Y(this).height(
                Math.max(0, i - Y(this).innerHeight() + Y(this).height())
              );
            })
            .css("overflow", "auto"))
        : "auto" === t &&
          ((i = 0),
          this.panels
            .each(function () {
              i = Math.max(i, Y(this).height("").height());
            })
            .height(i));
    },
    _eventHandler: function (t) {
      var e = this.options,
        i = this.active,
        n = Y(t.currentTarget).closest("li"),
        s = n[0] === i[0],
        o = s && e.collapsible,
        r = o ? Y() : this._getPanelForTab(n),
        a = i.length ? this._getPanelForTab(i) : Y(),
        i = { oldTab: i, oldPanel: a, newTab: o ? Y() : n, newPanel: r };
      t.preventDefault(),
        n.hasClass("ui-state-disabled") ||
          n.hasClass("ui-tabs-loading") ||
          this.running ||
          (s && !e.collapsible) ||
          !1 === this._trigger("beforeActivate", t, i) ||
          ((e.active = !o && this.tabs.index(n)),
          (this.active = s ? Y() : n),
          this.xhr && this.xhr.abort(),
          a.length ||
            r.length ||
            Y.error("jQuery UI Tabs: Mismatching fragment identifier."),
          r.length && this.load(this.tabs.index(n), t),
          this._toggle(t, i));
    },
    _toggle: function (t, e) {
      var i = this,
        n = e.newPanel,
        s = e.oldPanel;
      function o() {
        (i.running = !1), i._trigger("activate", t, e);
      }
      function r() {
        i._addClass(
          e.newTab.closest("li"),
          "ui-tabs-active",
          "ui-state-active"
        ),
          n.length && i.options.show
            ? i._show(n, i.options.show, o)
            : (n.show(), o());
      }
      (this.running = !0),
        s.length && this.options.hide
          ? this._hide(s, this.options.hide, function () {
              i._removeClass(
                e.oldTab.closest("li"),
                "ui-tabs-active",
                "ui-state-active"
              ),
                r();
            })
          : (this._removeClass(
              e.oldTab.closest("li"),
              "ui-tabs-active",
              "ui-state-active"
            ),
            s.hide(),
            r()),
        s.attr("aria-hidden", "true"),
        e.oldTab.attr({ "aria-selected": "false", "aria-expanded": "false" }),
        n.length && s.length
          ? e.oldTab.attr("tabIndex", -1)
          : n.length &&
            this.tabs
              .filter(function () {
                return 0 === Y(this).attr("tabIndex");
              })
              .attr("tabIndex", -1),
        n.attr("aria-hidden", "false"),
        e.newTab.attr({
          "aria-selected": "true",
          "aria-expanded": "true",
          tabIndex: 0,
        });
    },
    _activate: function (t) {
      var t = this._findActive(t);
      t[0] !== this.active[0] &&
        ((t = (t = !t.length ? this.active : t).find(".ui-tabs-anchor")[0]),
        this._eventHandler({
          target: t,
          currentTarget: t,
          preventDefault: Y.noop,
        }));
    },
    _findActive: function (t) {
      return !1 === t ? Y() : this.tabs.eq(t);
    },
    _getIndex: function (t) {
      return (t =
        "string" == typeof t
          ? this.anchors.index(
              this.anchors.filter("[href$='" + Y.escapeSelector(t) + "']")
            )
          : t);
    },
    _destroy: function () {
      this.xhr && this.xhr.abort(),
        this.tablist.removeAttr("role").off(this.eventNamespace),
        this.anchors.removeAttr("role tabIndex").removeUniqueId(),
        this.tabs.add(this.panels).each(function () {
          Y.data(this, "ui-tabs-destroy")
            ? Y(this).remove()
            : Y(this).removeAttr(
                "role tabIndex aria-live aria-busy aria-selected aria-labelledby aria-hidden aria-expanded"
              );
        }),
        this.tabs.each(function () {
          var t = Y(this),
            e = t.data("ui-tabs-aria-controls");
          e
            ? t.attr("aria-controls", e).removeData("ui-tabs-aria-controls")
            : t.removeAttr("aria-controls");
        }),
        this.panels.show(),
        "content" !== this.options.heightStyle && this.panels.css("height", "");
    },
    enable: function (i) {
      var t = this.options.disabled;
      !1 !== t &&
        ((t =
          void 0 !== i &&
          ((i = this._getIndex(i)),
          Array.isArray(t)
            ? Y.map(t, function (t) {
                return t !== i ? t : null;
              })
            : Y.map(this.tabs, function (t, e) {
                return e !== i ? e : null;
              }))),
        this._setOptionDisabled(t));
    },
    disable: function (t) {
      var e = this.options.disabled;
      if (!0 !== e) {
        if (void 0 === t) e = !0;
        else {
          if (((t = this._getIndex(t)), -1 !== Y.inArray(t, e))) return;
          e = Array.isArray(e) ? Y.merge([t], e).sort() : [t];
        }
        this._setOptionDisabled(e);
      }
    },
    load: function (t, n) {
      t = this._getIndex(t);
      function s(t, e) {
        "abort" === e && o.panels.stop(!1, !0),
          o._removeClass(i, "ui-tabs-loading"),
          r.removeAttr("aria-busy"),
          t === o.xhr && delete o.xhr;
      }
      var o = this,
        i = this.tabs.eq(t),
        t = i.find(".ui-tabs-anchor"),
        r = this._getPanelForTab(i),
        a = { tab: i, panel: r };
      this._isLocal(t[0]) ||
        ((this.xhr = Y.ajax(this._ajaxSettings(t, n, a))),
        this.xhr &&
          "canceled" !== this.xhr.statusText &&
          (this._addClass(i, "ui-tabs-loading"),
          r.attr("aria-busy", "true"),
          this.xhr
            .done(function (t, e, i) {
              setTimeout(function () {
                r.html(t), o._trigger("load", n, a), s(i, e);
              }, 1);
            })
            .fail(function (t, e) {
              setTimeout(function () {
                s(t, e);
              }, 1);
            })));
    },
    _ajaxSettings: function (t, i, n) {
      var s = this;
      return {
        url: t.attr("href").replace(/#.*$/, ""),
        beforeSend: function (t, e) {
          return s._trigger(
            "beforeLoad",
            i,
            Y.extend({ jqXHR: t, ajaxSettings: e }, n)
          );
        },
      };
    },
    _getPanelForTab: function (t) {
      t = Y(t).attr("aria-controls");
      return this.element.find(this._sanitizeSelector("#" + t));
    },
  }),
    !1 !== Y.uiBackCompat &&
      Y.widget("ui.tabs", Y.ui.tabs, {
        _processTabs: function () {
          this._superApply(arguments), this._addClass(this.tabs, "ui-tab");
        },
      });
  Y.ui.tabs;
  Y.widget("ui.tooltip", {
    version: "1.13.0",
    options: {
      classes: { "ui-tooltip": "ui-corner-all ui-widget-shadow" },
      content: function () {
        var t = Y(this).attr("title");
        return Y("<a>").text(t).html();
      },
      hide: !0,
      items: "[title]:not([disabled])",
      position: {
        my: "left top+15",
        at: "left bottom",
        collision: "flipfit flip",
      },
      show: !0,
      track: !1,
      close: null,
      open: null,
    },
    _addDescribedBy: function (t, e) {
      var i = (t.attr("aria-describedby") || "").split(/\s+/);
      i.push(e),
        t
          .data("ui-tooltip-id", e)
          .attr("aria-describedby", String.prototype.trim.call(i.join(" ")));
    },
    _removeDescribedBy: function (t) {
      var e = t.data("ui-tooltip-id"),
        i = (t.attr("aria-describedby") || "").split(/\s+/),
        e = Y.inArray(e, i);
      -1 !== e && i.splice(e, 1),
        t.removeData("ui-tooltip-id"),
        (i = String.prototype.trim.call(i.join(" ")))
          ? t.attr("aria-describedby", i)
          : t.removeAttr("aria-describedby");
    },
    _create: function () {
      this._on({ mouseover: "open", focusin: "open" }),
        (this.tooltips = {}),
        (this.parents = {}),
        (this.liveRegion = Y("<div>")
          .attr({
            role: "log",
            "aria-live": "assertive",
            "aria-relevant": "additions",
          })
          .appendTo(this.document[0].body)),
        this._addClass(this.liveRegion, null, "ui-helper-hidden-accessible"),
        (this.disabledTitles = Y([]));
    },
    _setOption: function (t, e) {
      var i = this;
      this._super(t, e),
        "content" === t &&
          Y.each(this.tooltips, function (t, e) {
            i._updateContent(e.element);
          });
    },
    _setOptionDisabled: function (t) {
      this[t ? "_disable" : "_enable"]();
    },
    _disable: function () {
      var n = this;
      Y.each(this.tooltips, function (t, e) {
        var i = Y.Event("blur");
        (i.target = i.currentTarget = e.element[0]), n.close(i, !0);
      }),
        (this.disabledTitles = this.disabledTitles.add(
          this.element
            .find(this.options.items)
            .addBack()
            .filter(function () {
              var t = Y(this);
              if (t.is("[title]"))
                return t
                  .data("ui-tooltip-title", t.attr("title"))
                  .removeAttr("title");
            })
        ));
    },
    _enable: function () {
      this.disabledTitles.each(function () {
        var t = Y(this);
        t.data("ui-tooltip-title") &&
          t.attr("title", t.data("ui-tooltip-title"));
      }),
        (this.disabledTitles = Y([]));
    },
    open: function (t) {
      var i = this,
        e = Y(t ? t.target : this.element).closest(this.options.items);
      e.length &&
        !e.data("ui-tooltip-id") &&
        (e.attr("title") && e.data("ui-tooltip-title", e.attr("title")),
        e.data("ui-tooltip-open", !0),
        t &&
          "mouseover" === t.type &&
          e.parents().each(function () {
            var t,
              e = Y(this);
            e.data("ui-tooltip-open") &&
              (((t = Y.Event("blur")).target = t.currentTarget = this),
              i.close(t, !0)),
              e.attr("title") &&
                (e.uniqueId(),
                (i.parents[this.id] = {
                  element: this,
                  title: e.attr("title"),
                }),
                e.attr("title", ""));
          }),
        this._registerCloseHandlers(t, e),
        this._updateContent(e, t));
    },
    _updateContent: function (e, i) {
      var t = this.options.content,
        n = this,
        s = i ? i.type : null;
      if ("string" == typeof t || t.nodeType || t.jquery)
        return this._open(i, e, t);
      (t = t.call(e[0], function (t) {
        n._delay(function () {
          e.data("ui-tooltip-open") && (i && (i.type = s), this._open(i, e, t));
        });
      })) && this._open(i, e, t);
    },
    _open: function (t, e, i) {
      var n,
        s,
        o,
        r = Y.extend({}, this.options.position);
      function a(t) {
        (r.of = t), s.is(":hidden") || s.position(r);
      }
      i &&
        ((n = this._find(e))
          ? n.tooltip.find(".ui-tooltip-content").html(i)
          : (e.is("[title]") &&
              (t && "mouseover" === t.type
                ? e.attr("title", "")
                : e.removeAttr("title")),
            (n = this._tooltip(e)),
            (s = n.tooltip),
            this._addDescribedBy(e, s.attr("id")),
            s.find(".ui-tooltip-content").html(i),
            this.liveRegion.children().hide(),
            (i = Y("<div>").html(s.find(".ui-tooltip-content").html()))
              .removeAttr("name")
              .find("[name]")
              .removeAttr("name"),
            i.removeAttr("id").find("[id]").removeAttr("id"),
            i.appendTo(this.liveRegion),
            this.options.track && t && /^mouse/.test(t.type)
              ? (this._on(this.document, { mousemove: a }), a(t))
              : s.position(Y.extend({ of: e }, this.options.position)),
            s.hide(),
            this._show(s, this.options.show),
            this.options.track &&
              this.options.show &&
              this.options.show.delay &&
              (o = this.delayedShow =
                setInterval(function () {
                  s.is(":visible") && (a(r.of), clearInterval(o));
                }, 13)),
            this._trigger("open", t, { tooltip: s })));
    },
    _registerCloseHandlers: function (t, e) {
      var i = {
        keyup: function (t) {
          t.keyCode === Y.ui.keyCode.ESCAPE &&
            (((t = Y.Event(t)).currentTarget = e[0]), this.close(t, !0));
        },
      };
      e[0] !== this.element[0] &&
        (i.remove = function () {
          this._removeTooltip(this._find(e).tooltip);
        }),
        (t && "mouseover" !== t.type) || (i.mouseleave = "close"),
        (t && "focusin" !== t.type) || (i.focusout = "close"),
        this._on(!0, e, i);
    },
    close: function (t) {
      var e,
        i = this,
        n = Y(t ? t.currentTarget : this.element),
        s = this._find(n);
      s
        ? ((e = s.tooltip),
          s.closing ||
            (clearInterval(this.delayedShow),
            n.data("ui-tooltip-title") &&
              !n.attr("title") &&
              n.attr("title", n.data("ui-tooltip-title")),
            this._removeDescribedBy(n),
            (s.hiding = !0),
            e.stop(!0),
            this._hide(e, this.options.hide, function () {
              i._removeTooltip(Y(this));
            }),
            n.removeData("ui-tooltip-open"),
            this._off(n, "mouseleave focusout keyup"),
            n[0] !== this.element[0] && this._off(n, "remove"),
            this._off(this.document, "mousemove"),
            t &&
              "mouseleave" === t.type &&
              Y.each(this.parents, function (t, e) {
                Y(e.element).attr("title", e.title), delete i.parents[t];
              }),
            (s.closing = !0),
            this._trigger("close", t, { tooltip: e }),
            s.hiding || (s.closing = !1)))
        : n.removeData("ui-tooltip-open");
    },
    _tooltip: function (t) {
      var e = Y("<div>").attr("role", "tooltip"),
        i = Y("<div>").appendTo(e),
        n = e.uniqueId().attr("id");
      return (
        this._addClass(i, "ui-tooltip-content"),
        this._addClass(e, "ui-tooltip", "ui-widget ui-widget-content"),
        e.appendTo(this._appendTo(t)),
        (this.tooltips[n] = { element: t, tooltip: e })
      );
    },
    _find: function (t) {
      t = t.data("ui-tooltip-id");
      return t ? this.tooltips[t] : null;
    },
    _removeTooltip: function (t) {
      clearInterval(this.delayedShow),
        t.remove(),
        delete this.tooltips[t.attr("id")];
    },
    _appendTo: function (t) {
      t = t.closest(".ui-front, dialog");
      return (t = !t.length ? this.document[0].body : t);
    },
    _destroy: function () {
      var n = this;
      Y.each(this.tooltips, function (t, e) {
        var i = Y.Event("blur"),
          e = e.element;
        (i.target = i.currentTarget = e[0]),
          n.close(i, !0),
          Y("#" + t).remove(),
          e.data("ui-tooltip-title") &&
            (e.attr("title") || e.attr("title", e.data("ui-tooltip-title")),
            e.removeData("ui-tooltip-title"));
      }),
        this.liveRegion.remove();
    },
  }),
    !1 !== Y.uiBackCompat &&
      Y.widget("ui.tooltip", Y.ui.tooltip, {
        options: { tooltipClass: null },
        _tooltip: function () {
          var t = this._superApply(arguments);
          return (
            this.options.tooltipClass &&
              t.tooltip.addClass(this.options.tooltipClass),
            t
          );
        },
      });
  Y.ui.tooltip;
}),
  (function (t) {
    var e, i, n;
    function s(t, e) {
      var i, n;
      1 < t.originalEvent.touches.length ||
        (t.preventDefault(),
        (i = t.originalEvent.changedTouches[0]),
        (n = document.createEvent("MouseEvents")).initMouseEvent(
          e,
          !0,
          !0,
          window,
          1,
          i.screenX,
          i.screenY,
          i.clientX,
          i.clientY,
          !1,
          !1,
          !1,
          !1,
          0,
          null
        ),
        t.target.dispatchEvent(n));
    }
    (t.support.touch =
      "ontouchend" in document || 0 < navigator.maxTouchPoints),
      t.support.touch &&
        ((e = t.ui.mouse.prototype),
        (i = e._mouseInit),
        (e._touchStart = function (t) {
          !n &&
            this._mouseCapture(t.originalEvent.changedTouches[0]) &&
            ((n = !0),
            (this._touchMoved = !1),
            s(t, "mouseover"),
            s(t, "mousemove"),
            s(t, "mousedown"));
        }),
        (e._touchMove = function (t) {
          n && ((this._touchMoved = !0), s(t, "mousemove"));
        }),
        (e._touchEnd = function (t) {
          n &&
            (s(t, "mouseup"),
            s(t, "mouseout"),
            this._touchMoved || s(t, "click"),
            (n = !1));
        }),
        (e._mouseInit = function () {
          this.element
            .bind("touchstart", t.proxy(this, "_touchStart"))
            .bind("touchmove", t.proxy(this, "_touchMove"))
            .bind("touchend", t.proxy(this, "_touchEnd")),
            i.call(this);
        }));
  })(jQuery),
  (function (t) {
    t.widget("ui.dialog", t.ui.dialog, {
      _allowInteraction: function (t) {
        return !0;
      },
    }),
      (t.ui.dialog.prototype._focusTabbable = function () {});
  })(jQuery),
  (jQuery = oldJQuery),
  /*!@license H5P.DragText-1.10/dist/h5p-drag-text.js by Joubel licensed under MIT*/ (() => {
    var i = {
        568: (t, e, i) => {
          "use strict";
          i.d(e, { Z: () => dt });
          function n(t) {
            var n = t.length;
            return function e() {
              var i = Array.prototype.slice.call(arguments, 0);
              return i.length >= n
                ? t.apply(null, i)
                : function () {
                    var t = Array.prototype.slice.call(arguments, 0);
                    return e.apply(null, i.concat(t));
                  };
            };
          }
          function s(t, e) {
            return e.substr(0, 1) === t;
          }
          function o(t, e) {
            return e.substr(-1) === t;
          }
          const r = {
            curry: n,
            cleanCharacter: n(function (t, e) {
              return (
                s(t, e) && (e = e.slice(1)), (e = o(t, e) ? e.slice(0, -1) : e)
              );
            }),
            startsWith: s,
            endsWith: o,
            shuffle: function (t) {
              for (var e = t.length; 0 < e; ) {
                var i = Math.floor(Math.random() * e),
                  n = t[--e];
                (t[e] = t[i]), (t[i] = n);
              }
              return t;
            },
            createElementWithTextPart: function (t) {
              var e = document.createElement("span");
              return (e.innerHTML = t), e;
            },
          };
          function a(t) {
            return t.split(/(\*.*?\*)/).filter(function (t) {
              return 0 < t.length;
            });
          }
          function l(t) {
            var e = t.match(/(:([^\\*]+))/g),
              i = t.match(/(\\\+([^\\*:]+))/g),
              n = t.match(/(\\\-([^\\*:]+))/g),
              t = r.cleanCharacter("*", t);
            return (
              e &&
                ((t = t.replace(e, "")),
                (e = (e = e[0].replace(":", "")).replace(/\s+$/, ""))),
              i &&
                ((t = t.replace(i, "")),
                (i = (i = i[0].replace("\\+", "")).replace(/\s+$/, ""))),
              n &&
                ((t = t.replace(n, "")),
                (n = (n = n[0].replace("\\-", "")).replace(/\s+$/, ""))),
              {
                tip: e,
                correctFeedback: i,
                incorrectFeedback: n,
                text: (t = t.replace(/\s+$/, "")),
              }
            );
          }
          e = {};
          function c() {
            this.duration = 0;
          }
          (e.DragText = e.DragText || {}),
            (e.DragText.StopWatch =
              ((c.prototype.start = function () {
                return (this.startTime = Date.now()), this;
              }),
              (c.prototype.stop = function () {
                return (
                  (this.duration = this.duration + Date.now() - this.startTime),
                  this.passedTime()
                );
              }),
              (c.prototype.reset = function () {
                (this.duration = 0), (this.startTime = Date.now());
              }),
              (c.prototype.passedTime = function () {
                return Math.round(this.duration / 10) / 100;
              }),
              c));
          const h = e.DragText.StopWatch;
          function u(t) {
            return t.stopPropagation();
          }
          var d, p, f, g, m, v, b, y, w, _, x, C;
          function S(t, e, i) {
            H5P.EventDispatcher.call(this);
            var n = this;
            (n.text = t),
              (n.insideDropzone = null),
              (n.$draggable = d(e)),
              (n.$ariaLabel = n.$draggable.find(".h5p-hidden-read")),
              (n.index = i),
              (n.initialIndex = i),
              (n.shortFormat = n.text),
              20 < n.shortFormat.length &&
                !n.shortFormat.match(/\\\(.+\\\)|\\\[.+\\\]|\$\$.+\$\$/) &&
                (n.shortFormat = n.shortFormat.slice(0, 17) + "..."),
              n.$draggable.on("touchstart", u),
              n.$draggable.on("touchmove", u),
              n.$draggable.on("touchend", u);
          }
          H5P.TextDraggable =
            ((d = H5P.jQuery),
            (p = "h5p-drag-dropped"),
            (((S.prototype = Object.create(
              H5P.EventDispatcher.prototype
            )).constructor = S).prototype.getIndex = function () {
              return this.index;
            }),
            (S.prototype.setIndex = function (t) {
              return (this.index = t), this;
            }),
            (S.prototype.getInitialIndex = function () {
              return this.initialIndex;
            }),
            (S.prototype.hasInitialIndex = function (t) {
              return this.initialIndex === t;
            }),
            (S.prototype.appendDraggableTo = function (t) {
              var e = this.$draggable[0] === document.activeElement;
              this.$draggable.detach().css({ left: 0, top: 0 }).appendTo(t),
                e && this.$draggable.focus();
            }),
            (S.prototype.revertDraggableTo = function (t) {
              var e = this.$draggable.offset().left - t.offset().left,
                i = this.$draggable.offset().top - t.offset().top;
              this.$draggable
                .detach()
                .prependTo(t)
                .css({ left: e, top: i })
                .animate({ left: 0, top: 0 });
            }),
            (S.prototype.toggleDroppedFeedback = function (t) {
              t ? this.$draggable.addClass(p) : this.$draggable.removeClass(p);
            }),
            (S.prototype.disableDraggable = function () {
              this.$draggable.draggable({ disabled: !0 });
            }),
            (S.prototype.enableDraggable = function () {
              this.$draggable.draggable({ disabled: !1 });
            }),
            (S.prototype.getDraggableElement = function () {
              return this.$draggable;
            }),
            (S.prototype.updateAriaLabel = function (t) {
              this.$ariaLabel.html(t);
            }),
            (S.prototype.updateAriaDescription = function (t) {
              this.$draggable.attr("aria-description", t);
            }),
            (S.prototype.getElement = function () {
              return this.$draggable.get(0);
            }),
            (S.prototype.removeFromZone = function () {
              var t = this.insideDropzone;
              return (
                null !== this.insideDropzone &&
                  (this.insideDropzone.removeFeedback(),
                  this.insideDropzone.removeDraggable()),
                this.toggleDroppedFeedback(!1),
                this.removeShortFormat(),
                this.updateAriaDescription(""),
                (this.insideDropzone = null),
                t
              );
            }),
            (S.prototype.addToZone = function (t) {
              null !== this.insideDropzone &&
                this.insideDropzone.removeDraggable(),
                this.toggleDroppedFeedback(!0),
                (this.insideDropzone = t),
                this.setShortFormat(),
                this.trigger("addedToZone");
            }),
            (S.prototype.getAnswerText = function () {
              return this.text;
            }),
            (S.prototype.setShortFormat = function () {
              this.$draggable.html(this.shortFormat);
            }),
            (S.prototype.getShortFormat = function () {
              return this.shortFormat;
            }),
            (S.prototype.removeShortFormat = function () {
              this.$draggable.html(this.text);
            }),
            (S.prototype.getInsideDropzone = function () {
              return this.insideDropzone;
            }),
            (S.prototype.isInsideDropZone = function () {
              return !!this.insideDropzone;
            }),
            S);
          const P = H5P.TextDraggable;
          function k(t, e, i, n, s, o, r, a) {
            var l = this;
            (l.text = t),
              (l.tip = e),
              (l.correctFeedback = i),
              (l.incorrectFeedback = n),
              (l.index = r),
              (l.params = a),
              (l.containedDraggable = null),
              (l.$dropzone = f(s)),
              (l.$dropzoneContainer = f(o)),
              l.tip &&
                ((l.$tip = H5P.JoubelUI.createTip(l.tip, {
                  tipLabel: l.params.tipLabel,
                  tabcontrol: !0,
                })),
                l.$dropzoneContainer.append(l.$tip),
                l.$dropzone.focus(function () {
                  return l.$tip.attr("tabindex", "0");
                }),
                l.$dropzone.blur(function () {
                  return l.removeTipTabIndexIfNoFocus();
                }),
                l.$tip.blur(function () {
                  return l.removeTipTabIndexIfNoFocus();
                })),
              (l.$incorrectText = f("<div/>", {
                html: l.params.incorrectText + " " + l.params.correctAnswer,
                class: "correct-answer",
              })),
              (l.$correctText = f("<div/>", {
                html: l.params.correctText,
                class: "correct-answer",
              })),
              (l.$showSolution = f("<div/>", {
                class: "h5p-drag-show-solution-container",
              })
                .appendTo(l.$dropzoneContainer)
                .hide());
          }
          H5P.TextDroppable =
            ((f = H5P.jQuery),
            (g = "h5p-drag-correct-feedback"),
            (m = "h5p-drag-wrong-feedback"),
            (v = "h5p-drag-draggable-correct"),
            (b = "h5p-drag-draggable-wrong"),
            (k.prototype.removeTipTabIndexIfNoFocus = function () {
              var t = this;
              setTimeout(function () {
                t.$dropzone.is(":focus") ||
                  t.$tip.is(":focus") ||
                  t.$tip.attr("tabindex", "-1");
              }, 0);
            }),
            (k.prototype.showSolution = function () {
              var t =
                null !== this.containedDraggable &&
                this.containedDraggable.getAnswerText() === this.text;
              t || this.$showSolution.html(this.text),
                this.$showSolution.prepend(
                  t ? this.$correctText : this.$incorrectText
                ),
                this.$showSolution.toggleClass("incorrect", !t),
                this.$showSolution.show();
            }),
            (k.prototype.hideSolution = function () {
              this.$showSolution.html(""), this.$showSolution.hide();
            }),
            (k.prototype.getElement = function () {
              return this.$dropzone.get(0);
            }),
            (k.prototype.appendDroppableTo = function (t) {
              this.$dropzoneContainer.appendTo(t);
            }),
            (k.prototype.appendInsideDroppableTo = function (t) {
              if (null !== this.containedDraggable)
                return (
                  this.containedDraggable.revertDraggableTo(t),
                  this.containedDraggable
                );
            }),
            (k.prototype.setDraggable = function (t) {
              this.containedDraggable !== t &&
                (null !== this.containedDraggable &&
                  this.containedDraggable.removeFromZone(),
                (this.containedDraggable = t).addToZone(this));
            }),
            (k.prototype.hasDraggable = function () {
              return !!this.containedDraggable;
            }),
            (k.prototype.removeDraggable = function () {
              null !== this.containedDraggable &&
                (this.containedDraggable = null);
            }),
            (k.prototype.isCorrect = function () {
              return (
                null !== this.containedDraggable &&
                this.containedDraggable.getAnswerText() === this.text
              );
            }),
            (k.prototype.addFeedback = function () {
              this.isCorrect()
                ? (this.$dropzone.removeClass(m).addClass(g),
                  this.containedDraggable
                    .getDraggableElement()
                    .removeClass(b)
                    .addClass(v))
                : null === this.containedDraggable
                ? this.$dropzone.removeClass(m).removeClass(g)
                : (this.$dropzone.removeClass(g).addClass(m),
                  null !== this.containedDraggable &&
                    this.containedDraggable
                      .getDraggableElement()
                      .addClass(b)
                      .removeClass(v));
            }),
            (k.prototype.removeFeedback = function () {
              this.$dropzone.removeClass(m).removeClass(g),
                null !== this.containedDraggable &&
                  this.containedDraggable
                    .getDraggableElement()
                    .removeClass(b)
                    .removeClass(v);
            }),
            (k.prototype.hasFeedback = function () {
              return this.$dropzone.hasClass(m) || this.$dropzone.hasClass(g);
            }),
            (k.prototype.setShortFormat = function () {
              null !== this.containedDraggable &&
                this.containedDraggable.setShortFormat();
            }),
            (k.prototype.disableDropzoneAndContainedDraggable = function () {
              null !== this.containedDraggable &&
                this.containedDraggable.disableDraggable(),
                this.$dropzone.droppable({ disabled: !0 });
            }),
            (k.prototype.enableDropzone = function () {
              this.$dropzone.droppable({ disabled: !1 });
            }),
            (k.prototype.removeShortFormat = function () {
              null !== this.containedDraggable &&
                this.containedDraggable.removeShortFormat();
            }),
            (k.prototype.getDropzone = function () {
              return this.$dropzone;
            }),
            (k.prototype.getIndex = function () {
              return this.index;
            }),
            k);
          function T(t) {
            const n = t.length;
            return function e() {
              const i = Array.prototype.slice.call(arguments, 0);
              return i.length >= n
                ? t.apply(null, i)
                : function () {
                    var t = Array.prototype.slice.call(arguments, 0);
                    return e.apply(null, i.concat(t));
                  };
            };
          }
          const D = H5P.TextDroppable,
            H = (...t) =>
              t.reduce(
                (e, i) =>
                  (...t) =>
                    e(i(...t))
              ),
            I = T(function (t, e) {
              e.forEach(t);
            }),
            E =
              (T(function (t, e) {
                return e.map(t);
              }),
              T(function (t, e) {
                return e.filter(t);
              })),
            A = T(function (t, e) {
              return e.some(t);
            }),
            M = T(function (t, e) {
              return -1 != e.indexOf(t);
            }),
            O = T(function (e, t) {
              return E((t) => !M(t, e), t);
            }),
            L = T((t, e) => e.getAttribute(t)),
            $ = T((t, e, i) => i.setAttribute(t, e)),
            N = T((t, e) => e.removeAttribute(t)),
            z = T((t, e) => e.hasAttribute(t)),
            B = T((t, e, i) => i.getAttribute(t) === e),
            F =
              (T((t, e) => {
                var i = L(t, e);
                $(t, ("true" !== i).toString(), e);
              }),
              T((t, e) => t.appendChild(e)),
              T((t, e) => e.querySelector(t)),
              T((t, e) => {
                return (
                  (t = e.querySelectorAll(t)), Array.prototype.slice.call(t)
                );
              }),
              T((t, e) => t.removeChild(e)),
              T((t, e) => e.classList.contains(t)),
              T((t, e) => e.classList.add(t))),
            R = T((t, e) => e.classList.remove(t)),
            j = F("hidden"),
            W = R("hidden"),
            q =
              (T((t, e) => (t ? W : j)(e)),
              T((t, e, i) => {
                i.classList[e ? "add" : "remove"](t);
              }),
              N("tabindex")),
            U = (I(q), $("tabindex", "0")),
            V = $("tabindex", "-1"),
            Y = z("tabindex");
          class K {
            constructor(t) {
              Object.assign(this, {
                listeners: {},
                on: function (t, e, i) {
                  i = { listener: e, scope: i };
                  return (
                    (this.listeners[t] = this.listeners[t] || []),
                    this.listeners[t].push(i),
                    this
                  );
                },
                fire: function (t, e) {
                  return (this.listeners[t] || []).every(function (t) {
                    return !1 !== t.listener.call(t.scope || this, e);
                  });
                },
                propagate: function (t, i) {
                  let n = this;
                  t.forEach((e) => i.on(e, (t) => n.fire(e, t)));
                },
              }),
                (this.plugins = t || []),
                (this.elements = []),
                (this.negativeTabIndexAllowed = !1),
                this.on("nextElement", this.nextElement, this),
                this.on("previousElement", this.previousElement, this),
                this.on("firstElement", this.firstElement, this),
                this.on("lastElement", this.lastElement, this),
                this.initPlugins();
            }
            addElement(t) {
              this.elements.push(t),
                this.firesEvent("addElement", t),
                1 === this.elements.length && this.setTabbable(t);
            }
            insertElementAt(t, e) {
              this.elements.splice(e, 0, t),
                this.firesEvent("addElement", t),
                1 === this.elements.length && this.setTabbable(t);
            }
            removeElement(t) {
              (this.elements = O([t], this.elements)),
                Y(t) &&
                  (this.setUntabbable(t),
                  this.elements[0] && this.setTabbable(this.elements[0])),
                this.firesEvent("removeElement", t);
            }
            count() {
              return this.elements.length;
            }
            firesEvent(t, e) {
              var i = this.elements.indexOf(e);
              return this.fire(t, {
                element: e,
                index: i,
                elements: this.elements,
                oldElement: this.tabbableElement,
              });
            }
            nextElement({ index: t }) {
              const e = t === this.elements.length - 1,
                i = this.elements[e ? 0 : t + 1];
              this.setTabbable(i), i.focus();
            }
            firstElement() {
              const t = this.elements[0];
              this.setTabbable(t), t.focus();
            }
            lastElement() {
              const t = this.elements[this.elements.length - 1];
              this.setTabbable(t), t.focus();
            }
            setTabbableByIndex(t) {
              t = this.elements[t];
              t && this.setTabbable(t);
            }
            setTabbable(t) {
              I(this.setUntabbable.bind(this), this.elements),
                U(t),
                (this.tabbableElement = t);
            }
            setUntabbable(t) {
              t !== document.activeElement &&
                (this.negativeTabIndexAllowed ? V : q)(t);
            }
            previousElement({ index: t }) {
              const e = 0 === t,
                i = this.elements[e ? this.elements.length - 1 : t - 1];
              this.setTabbable(i), i.focus();
            }
            useNegativeTabIndex() {
              (this.negativeTabIndexAllowed = !0),
                this.elements.forEach((t) => {
                  t.hasAttribute("tabindex") || V(t);
                });
            }
            initPlugins() {
              this.plugins.forEach(function (t) {
                void 0 !== t.init && t.init(this);
              }, this);
            }
          }
          const Q = "aria-grabbed",
            X = $(Q),
            G = B(Q, "true"),
            J = E(z(Q)),
            Z = H(I($(Q, "false")), J),
            tt = H(A(G), J);
          class et {
            init(t) {
              (this.controls = t),
                this.controls.on("select", this.select, this);
            }
            addElement(t) {
              X("false", t), this.controls.addElement(t);
            }
            setAllGrabbedToFalse() {
              Z(this.controls.elements);
            }
            hasAnyGrabbed() {
              return tt(this.controls.elements);
            }
            select({ element: t }) {
              var e = G(t);
              this.setAllGrabbedToFalse(), e || X("true", t);
            }
          }
          const it = "aria-dropeffect",
            nt = $(it, "none"),
            st = $(it, "move"),
            ot = E(z(it)),
            rt = H(I(st), ot),
            at = H(I(nt), ot);
          class lt {
            init(t) {
              this.controls = t;
            }
            setAllToMove() {
              rt(this.controls.elements);
            }
            setAllToNone() {
              at(this.controls.elements);
            }
          }
          lt.DropEffect = {
            COPY: "copy",
            MOVE: "move",
            EXECUTE: "execute",
            POPUP: "popup",
            NONE: "none",
          };
          class ct {
            constructor() {
              this.selectability = !0;
            }
            init(t) {
              (this.boundHandleKeyDown = this.handleKeyDown.bind(this)),
                (this.controls = t),
                this.controls.on("addElement", this.listenForKeyDown, this),
                this.controls.on(
                  "removeElement",
                  this.removeKeyDownListener,
                  this
                );
            }
            listenForKeyDown({ element: t }) {
              t.addEventListener("keydown", this.boundHandleKeyDown);
            }
            removeKeyDownListener({ element: t }) {
              t.removeEventListener("keydown", this.boundHandleKeyDown);
            }
            handleKeyDown(t) {
              switch (t.which) {
                case 27:
                  this.close(t.target), t.preventDefault(), t.stopPropagation();
                  break;
                case 35:
                  this.lastElement(t.target),
                    t.preventDefault(),
                    t.stopPropagation();
                  break;
                case 36:
                  this.firstElement(t.target),
                    t.preventDefault(),
                    t.stopPropagation();
                  break;
                case 13:
                case 32:
                  this.select(t.target),
                    t.preventDefault(),
                    t.stopPropagation();
                  break;
                case 37:
                case 38:
                  this.hasChromevoxModifiers(t) ||
                    (this.previousElement(t.target),
                    t.preventDefault(),
                    t.stopPropagation());
                  break;
                case 39:
                case 40:
                  this.hasChromevoxModifiers(t) ||
                    (this.nextElement(t.target),
                    t.preventDefault(),
                    t.stopPropagation());
              }
            }
            hasChromevoxModifiers(t) {
              return t.shiftKey || t.ctrlKey;
            }
            previousElement(t) {
              !1 !== this.controls.firesEvent("beforePreviousElement", t) &&
                (this.controls.firesEvent("previousElement", t),
                this.controls.firesEvent("afterPreviousElement", t));
            }
            nextElement(t) {
              !1 !== this.controls.firesEvent("beforeNextElement", t) &&
                (this.controls.firesEvent("nextElement", t),
                this.controls.firesEvent("afterNextElement", t));
            }
            select(t) {
              this.selectability &&
                !1 !== this.controls.firesEvent("before-select", t) &&
                (this.controls.firesEvent("select", t),
                this.controls.firesEvent("after-select", t));
            }
            firstElement(t) {
              !1 !== this.controls.firesEvent("beforeFirstElement", t) &&
                (this.controls.firesEvent("firstElement", t),
                this.controls.firesEvent("afterFirstElement", t));
            }
            lastElement(t) {
              !1 !== this.controls.firesEvent("beforeLastElement", t) &&
                (this.controls.firesEvent("lastElement", t),
                this.controls.firesEvent("afterLastElement", t));
            }
            disableSelectability() {
              this.selectability = !1;
            }
            enableSelectability() {
              this.selectability = !0;
            }
            close(t) {
              !1 !== this.controls.firesEvent("before-close", t) &&
                (this.controls.firesEvent("close", t),
                this.controls.firesEvent("after-close", t));
            }
          }
          class ht {
            constructor() {
              (this.selectability = !0),
                (this.handleClickBound = this.handleClick.bind(this)),
                (this.handleDragBound = this.handleDrag.bind(this));
            }
            init(t) {
              (this.controls = t),
                this.controls.on("addElement", this.listenForKeyDown, this),
                this.controls.on(
                  "removeElement",
                  this.unlistenForKeyDown,
                  this
                );
            }
            listenForKeyDown({ element: t }) {
              t.addEventListener("click", this.handleClickBound),
                t.addEventListener("drag", this.handleClickBound);
            }
            unlistenForKeyDown({ element: t }) {
              t.removeEventListener("click", this.handleClickBound),
                t.removeEventListener("drag", this.handleDragBound);
            }
            handleClick(t) {
              this.controls.firesEvent("select", t.currentTarget);
            }
            handleDrag(t) {
              this.controls.firesEvent("drag", t.currentTarget);
            }
            disableSelectability() {
              this.selectability = !1;
            }
            enableSelectability() {
              this.selectability = !0;
            }
          }
          function ut(t, e, i) {
            var n = this;
            (this.$ = y(this)),
              (this.contentId = e),
              (this.contentData = i),
              w.call(this, "drag-text"),
              (this.params = y.extend(
                !0,
                {
                  media: {},
                  taskDescription:
                    "Set in adjectives in the following sentence",
                  textField:
                    "This is a *nice*, *flexible* content type, which allows you to highlight all the *wonderful* words in this *exciting* sentence.\nThis is another line of *fantastic* text.",
                  distractors: "",
                  overallFeedback: [],
                  checkAnswer: "Check",
                  submitAnswer: "Submit",
                  tryAgain: "Retry",
                  behaviour: {
                    enableRetry: !0,
                    enableSolutionsButton: !0,
                    enableCheckButton: !0,
                    instantFeedback: !1,
                  },
                  showSolution: "Show solution",
                  dropZoneIndex: "Drop Zone @index.",
                  empty: "Empty.",
                  contains: "Drop Zone @index contains draggable @draggable.",
                  ariaDraggableIndex: "@index of @count.",
                  tipLabel: "Show tip",
                  correctText: "Correct!",
                  incorrectText: "Incorrect!",
                  resetDropTitle: "Reset drop",
                  resetDropDescription:
                    "Are you sure you want to reset this drop zone?",
                  grabbed: "Draggable is grabbed.",
                  cancelledDragging: "Cancelled dragging.",
                  correctAnswer: "Correct answer:",
                  scoreBarLabel: "You got :num out of :total points",
                  a11yCheck:
                    "Check the answers. The responses will be marked as correct, incorrect, or unanswered.",
                  a11yShowSolution:
                    "Show the solution. The task will be marked with its correct solution.",
                  a11yRetry:
                    "Retry the task. Reset all responses and start the task over again.",
                },
                t
              )),
              (this.contentData = i),
              void 0 !== this.contentData &&
                void 0 !== this.contentData.previousState &&
                void 0 !== this.contentData.previousState.length &&
                (this.previousState = this.contentData.previousState),
              (this.answered = !1),
              (this.textFieldHtml = this.params.textField.replace(
                /(\r\n|\n|\r)/gm,
                "<br/>"
              )),
              (this.distractorsHtml = this.params.distractors.replace(
                /(\r\n|\n|\r)/gm,
                "<br/>"
              )),
              (this.introductionId = "h5p-drag-text-" + e + "-introduction"),
              (this.selectedElement = void 0),
              (this.ariaDragControls = new et()),
              (this.ariaDropControls = new lt()),
              (this.dragControls = new K([
                new ct(),
                new ht(),
                this.ariaDragControls,
              ])),
              this.dragControls.useNegativeTabIndex(),
              (this.dropControls = new K([
                new ct(),
                new ht(),
                this.ariaDropControls,
              ])),
              this.dropControls.useNegativeTabIndex(),
              this.dragControls.on("before-select", function (t) {
                return !n.isElementDisabled(t.element);
              }),
              this.dragControls.on(
                "select",
                this.keyboardDraggableSelected,
                this
              ),
              this.dropControls.on(
                "select",
                this.keyboardDroppableSelected,
                this
              ),
              this.on("start", this.addAllDroppablesToControls, this),
              this.on("revert", this.removeControlsFromEmptyDropZones, this),
              this.on(
                "stop",
                function (t) {
                  t.data.target || n.removeControlsFromDropZonesIfAllEmpty();
                },
                this
              ),
              this.on("drop", this.removeControlsFromEmptyDropZones, this),
              this.on("start", function (t) {
                var e = t.data.element,
                  t = n.getDraggableByElement(e);
                n.toggleDropEffect(),
                  e.setAttribute("aria-grabbed", "true"),
                  n.setDraggableAriaLabel(t);
              }),
              this.on("stop", function (t) {
                var e = t.data.element,
                  t = n.getDraggableByElement(e);
                n.toggleDropEffect(),
                  e.setAttribute("aria-grabbed", "false"),
                  n.setDraggableAriaLabel(t);
              }),
              this.on(
                "drop",
                this.ariaDropControls.setAllToNone,
                this.ariaDropControls
              ),
              this.on(
                "drop",
                function (t) {
                  this.dragControls.removeElement(t.data.element);
                },
                this
              ),
              this.on(
                "revert",
                function (t) {
                  this.dragControls.insertElementAt(t.data.element, 0);
                },
                this
              ),
              this.on("drop", this.updateDroppableElement, this),
              this.on("revert", this.updateDroppableElement, this),
              this.initDragText(),
              (this.stopWatch = new h()),
              this.stopWatch.start(),
              this.on("resize", this.resize, this),
              this.on("revert", this.toggleDraggablesContainer, this),
              this.on("drop", this.toggleDraggablesContainer, this),
              this.on("stop", function (t) {
                t.data.target || n.read(n.params.cancelledDragging);
              }),
              this.params.behaviour.instantFeedback &&
                this.on("revert", function () {
                  return n.instantFeedbackEvaluation();
                });
          }
          (H5P.DragText =
            ((y = H5P.jQuery),
            (w = H5P.Question),
            (_ = H5P.ConfirmationDialog),
            (x = "h5p-drag-wide-screen"),
            (C = "h5p-drag-draggable-wide-screen"),
            (((ut.prototype = Object.create(w.prototype)).constructor =
              ut).prototype.updateDroppableElement = function (t) {
              var e = t.data.target,
                i = t.data.element,
                t = this.getDroppableByElement(e);
              e && this.setDroppableLabel(e, i.textContent, t.getIndex());
            }),
            (ut.prototype.removeControlsFromDropZonesIfAllEmpty = function () {
              this.anyDropZoneHasDraggable() ||
                this.removeAllDroppablesFromControls();
            }),
            (ut.prototype.removeControlsFromEmptyDropZones = function () {
              var e = this;
              this.droppables
                .filter(function (t) {
                  return !t.hasDraggable();
                })
                .map(function (t) {
                  return t.getElement();
                })
                .forEach(function (t) {
                  e.dropControls.removeElement(t);
                });
            }),
            (ut.prototype.addAllDroppablesToControls = function () {
              var e = this;
              0 < this.dropControls.count() &&
                this.removeAllDroppablesFromControls(),
                this.droppables
                  .map(function (t) {
                    return t.getElement();
                  })
                  .forEach(function (t) {
                    return e.dropControls.addElement(t);
                  });
            }),
            (ut.prototype.removeAllDroppablesFromControls = function () {
              var e = this;
              this.droppables
                .map(function (t) {
                  return t.getElement();
                })
                .forEach(function (t) {
                  return e.dropControls.removeElement(t);
                });
            }),
            (ut.prototype.anyDropZoneHasDraggable = function () {
              return this.droppables.some(function (t) {
                return t.hasDraggable();
              });
            }),
            (ut.prototype.setDroppableLabel = function (t, e, i) {
              this.params.dropZoneIndex.replace("@index", i.toString());
              var n,
                s = t.classList.contains("h5p-drag-correct-feedback"),
                o = t.classList.contains("h5p-drag-wrong-feedback"),
                r = 0 < t.childNodes.length;
              t &&
                (s || o
                  ? ((o = this.getDroppableByElement(t)),
                    (n = s
                      ? o.correctFeedback || this.params.correctText
                      : o.incorrectFeedback || this.params.incorrectText),
                    (n = ""
                      .concat(
                        this.params.contains
                          .replace("@index", i.toString())
                          .replace("@draggable", e),
                        " "
                      )
                      .concat(n, ".")),
                    o &&
                      o.containedDraggable &&
                      o.containedDraggable.updateAriaDescription(
                        s ? this.params.correctText : this.params.incorrectText
                      ))
                  : (n = "".concat(
                      r
                        ? this.params.contains
                            .replace("@index", i.toString())
                            .replace("@draggable", e)
                        : this.params.empty.replace("@index", i.toString())
                    )),
                t.setAttribute("aria-label", n));
            }),
            (ut.prototype.registerDomElements = function () {
              var t,
                e = this.params.media;
              e &&
                e.type &&
                e.type.library &&
                ("H5P.Image" === (t = (e = e.type).library.split(" ")[0])
                  ? e.params.file &&
                    this.setImage(e.params.file.path, {
                      disableImageZooming:
                        this.params.media.disableImageZooming || !1,
                      alt: e.params.alt,
                      title: e.params.title,
                      expandImage: e.params.expandImage,
                      minimizeImage: e.params.minimizeImage,
                    })
                  : "H5P.Video" === t
                  ? e.params.sources && this.setVideo(e)
                  : "H5P.Audio" === t && e.params.files && this.setAudio(e)),
                (this.$introduction = y(
                  '<p id="' +
                    this.introductionId +
                    '">' +
                    this.params.taskDescription +
                    "</p>"
                )),
                this.setIntroduction(this.$introduction),
                this.$introduction.parent().attr("tabindex", "-1"),
                this.setContent(this.$inner),
                this.addButtons();
            }),
            (ut.prototype.initDragText = function () {
              return (
                (this.$inner = y("<div/>", {
                  "aria-describedby": this.introductionId,
                  class: "h5p-drag-inner",
                })),
                this.addTaskTo(this.$inner),
                this.setH5PUserState(),
                this.$inner
              );
            }),
            (ut.prototype.resize = function () {
              this.changeLayoutToFitWidth();
            }),
            (ut.prototype.changeLayoutToFitWidth = function () {
              var t,
                e = this;
              e.addDropzoneWidth(),
                43 <
                  e.$inner.width() /
                    parseFloat(e.$inner.css("font-size"), 10) &&
                e.widestDraggable <= e.$inner.width() / 3
                  ? (e.$draggables.addClass(x),
                    (t = document.activeElement),
                    e.$wordContainer.detach().appendTo(e.$taskContainer),
                    t !== document.activeElement && t.focus(),
                    e.draggables.forEach(function (t) {
                      t.getDraggableElement().addClass(C);
                    }),
                    e.$wordContainer.css({
                      "margin-right": e.$draggables.width(),
                    }))
                  : (e.$wordContainer.css({ "margin-right": 0 }),
                    e.$draggables.removeClass(x),
                    e.$draggables.detach().appendTo(e.$taskContainer),
                    e.draggables.forEach(function (t) {
                      t.getDraggableElement().removeClass(C);
                    }));
            }),
            (ut.prototype.addButtons = function () {
              var e = this;
              e.params.behaviour.enableCheckButton &&
                e.addButton(
                  "check-answer",
                  e.params.checkAnswer,
                  function () {
                    (e.answered = !0),
                      e.removeAllElementsFromDragControl(),
                      e.showEvaluation()
                        ? (e.hideButton("show-solution"),
                          e.hideButton("try-again"),
                          e.hideButton("check-answer"))
                        : (e.params.behaviour.enableRetry &&
                            e.showButton("try-again"),
                          e.params.behaviour.enableSolutionsButton &&
                            e.showButton("show-solution"),
                          e.hideButton("check-answer"),
                          e.disableDraggables()),
                      e.$introduction.parent().focus();
                  },
                  !e.params.behaviour.instantFeedback,
                  { "aria-label": e.params.a11yCheck },
                  {
                    contentData: e.contentData,
                    textIfSubmitting: e.params.submitAnswer,
                  }
                ),
                e.addButton(
                  "show-solution",
                  e.params.showSolution,
                  function () {
                    e.droppables.forEach(function (t) {
                      t.showSolution();
                    }),
                      e.draggables.forEach(function (t) {
                        return e.setDraggableAriaLabel(t);
                      }),
                      e.disableDraggables(),
                      e.removeAllDroppablesFromControls(),
                      e.hideButton("show-solution");
                  },
                  e.initShowShowSolutionButton || !1,
                  { "aria-label": e.params.a11yShowSolution }
                ),
                e.addButton(
                  "try-again",
                  e.params.tryAgain,
                  function () {
                    e.answered && e.resetDraggables(),
                      (e.answered = !1),
                      e.hideEvaluation(),
                      e.hideExplanation(),
                      e.hideButton("try-again"),
                      e.hideButton("show-solution"),
                      e.params.behaviour.instantFeedback
                        ? e.enableAllDropzonesAndDraggables()
                        : (e.showButton("check-answer"), e.enableDraggables()),
                      e.hideAllSolutions(),
                      e.stopWatch.reset(),
                      e.read(e.params.taskDescription);
                  },
                  e.initShowTryAgainButton || !1,
                  { "aria-label": e.params.a11yRetry }
                );
            }),
            (ut.prototype.removeAllElementsFromDragControl = function () {
              var e = this;
              this.dragControls.elements.forEach(function (t) {
                return e.dragControls.removeElement(t);
              });
            }),
            (ut.prototype.keyboardDraggableSelected = function (t) {
              var e = this.selectedElement,
                i = void 0 !== this.selectedElement,
                n = this.selectedElement === t.element;
              i &&
                ((this.selectedElement = void 0),
                this.trigger("stop", { element: e })),
                (i && n) ||
                  this.isElementDisabled(t.element) ||
                  ((this.selectedElement = t.element),
                  this.trigger("start", { element: t.element }),
                  this.focusOnFirstEmptyDropZone());
            }),
            (ut.prototype.focusOnFirstEmptyDropZone = function () {
              var t = this.droppables
                .filter(function (t) {
                  return !t.hasDraggable();
                })[0]
                .getElement();
              this.dropControls.setTabbable(t), t.focus();
            }),
            (ut.prototype.isElementDisabled = function (t) {
              return "true" === t.getAttribute("aria-disabled");
            }),
            (ut.prototype.keyboardDroppableSelected = function (t) {
              var e,
                i = this,
                n = t.element,
                s = i.getDroppableByElement(n),
                o = i.getDraggableByElement(this.selectedElement),
                r = this.params.behaviour.instantFeedback && s && s.isCorrect(),
                a = !this.params.behaviour.instantFeedback && s.hasFeedback();
              o && s && !r
                ? ((t = i.selectedElement),
                  i.drop(o, s),
                  (i.selectedElement = void 0),
                  this.trigger("stop", { element: t, target: s.getElement() }))
                : s &&
                  s.hasDraggable() &&
                  !a &&
                  !r &&
                  ((e = n.querySelector("[aria-grabbed]")),
                  this.createConfirmResetDialog(function () {
                    i.revert(i.getDraggableByElement(e));
                  }).show());
            }),
            (ut.prototype.toggleDraggablesContainer = function () {
              var t = 0 === this.$draggables.children().length;
              this.$draggables.toggleClass("hide", t);
            }),
            (ut.prototype.createConfirmResetDialog = function (t, e) {
              var i = new _({
                headerText: this.params.resetDropTitle,
                dialogText: this.params.resetDropDescription,
              });
              return (
                i.appendTo(document.body), i.on("confirmed", t, e || this), i
              );
            }),
            (ut.prototype.showDropzoneFeedback = function () {
              var i = this;
              this.droppables.forEach(function (t) {
                t.addFeedback();
                var e = t.containedDraggable;
                t &&
                  e &&
                  (i.setDroppableLabel(
                    t.getElement(),
                    e.getElement().textContent,
                    t.getIndex()
                  ),
                  i.setDraggableAriaLabel(e));
              });
            }),
            (ut.prototype.showExplanation = function () {
              var i = [];
              this.droppables.forEach(function (t) {
                var e = t.containedDraggable;
                t &&
                  e &&
                  (t.isCorrect() &&
                    t.correctFeedback &&
                    i.push({ correct: e.text, text: t.correctFeedback }),
                  !t.isCorrect() &&
                    t.incorrectFeedback &&
                    i.push({
                      correct: t.text,
                      wrong: e.text,
                      text: t.incorrectFeedback,
                    }));
              }),
                0 !== i.length &&
                  this.setExplanation(i, this.params.feedbackHeader);
            }),
            (ut.prototype.showEvaluation = function (t) {
              this.hideEvaluation(),
                this.showDropzoneFeedback(),
                this.showExplanation();
              var e = this.calculateScore(),
                i = this.droppables.length;
              t ||
                ((n = this.createXAPIEventTemplate("answered")),
                this.addQuestionToXAPI(n),
                this.addResponseToXAPI(n),
                this.trigger(n));
              var n = H5P.Question.determineOverallFeedback(
                this.params.overallFeedback,
                e / i
              )
                .replace(/@score/g, e.toString())
                .replace(/@total/g, i.toString());
              return (
                e === i &&
                  (this.hideButton("check-answer"),
                  this.hideButton("show-solution"),
                  this.hideButton("try-again"),
                  this.disableDraggables()),
                this.trigger("resize"),
                this.setFeedback(n, e, i, this.params.scoreBarLabel),
                e === i
              );
            }),
            (ut.prototype.calculateScore = function () {
              return this.droppables.reduce(function (t, e) {
                return t + (e.isCorrect() ? 1 : 0);
              }, 0);
            }),
            (ut.prototype.hideEvaluation = function () {
              this.removeFeedback(), this.trigger("resize");
            }),
            (ut.prototype.hideExplanation = function () {
              this.setExplanation(), this.trigger("resize");
            }),
            (ut.prototype.hideAllSolutions = function () {
              this.droppables.forEach(function (t) {
                t.hideSolution();
              }),
                this.trigger("resize");
            }),
            (ut.prototype.addTaskTo = function (t) {
              var i = this;
              (i.widest = 0),
                (i.widestDraggable = 0),
                (i.droppables = []),
                (i.draggables = []),
                (i.$taskContainer = y("<div/>", { class: "h5p-drag-task" })),
                (i.$draggables = y("<div/>", {
                  class: "h5p-drag-draggables-container",
                })),
                (i.$wordContainer = y("<div/>", {
                  class: "h5p-drag-droppable-words",
                })),
                a(i.textFieldHtml).forEach(function (t) {
                  var e;
                  i.isAnswerPart(t)
                    ? ((e = l(t)),
                      i.createDraggable(e.text),
                      i.createDroppable(
                        e.text,
                        e.tip,
                        e.correctFeedback,
                        e.incorrectFeedback
                      ))
                    : ((t = r.createElementWithTextPart(t)),
                      i.$wordContainer.append(t));
                }),
                a(i.distractorsHtml).forEach(function (t) {
                  "" !== t.trim() &&
                    "*" === t.substring(0, 1) &&
                    "*" === t.substring(t.length - 1, t.length) &&
                    ((t = l(t)), i.createDraggable(t.text));
                }),
                i.shuffleAndAddDraggables(i.$draggables),
                i.$draggables.appendTo(i.$taskContainer),
                i.$wordContainer.appendTo(i.$taskContainer),
                i.$taskContainer.appendTo(t),
                i.addDropzoneWidth();
            }),
            (ut.prototype.isAnswerPart = function (t) {
              return r.startsWith("*", t) && r.endsWith("*", t);
            }),
            (ut.prototype.addDropzoneWidth = function () {
              var e = this,
                n = 0,
                s = 0,
                t = parseInt(this.$inner.css("font-size"), 10),
                i = 3 * t,
                o = t;
              this.draggables.forEach(function (t) {
                var e = t.getDraggableElement(),
                  i = e
                    .clone()
                    .css({
                      position: "absolute",
                      "white-space": "nowrap",
                      width: "auto",
                      padding: 0,
                      margin: 0,
                    })
                    .html(t.getAnswerText())
                    .appendTo(e.parent()),
                  e = i.outerWidth();
                (s = s < e ? e : s),
                  20 <= i.text().length &&
                    (i.html(t.getShortFormat()), (e = i.width())),
                  n < e + o && (n = e + o),
                  i.remove();
              }),
                n < i && (n = i),
                (this.widestDraggable = s),
                (this.widest = n),
                this.droppables.forEach(function (t) {
                  t.getDropzone().width(e.widest);
                });
            }),
            (ut.prototype.createDraggable = function (t) {
              var e = this,
                i = y("<div/>", {
                  html: "<span>".concat(t, "</span>"),
                  role: "button",
                  "aria-grabbed": "false",
                  tabindex: "-1",
                })
                  .draggable({
                    revert: function (t) {
                      return t || e.revert(n), !1;
                    },
                    drag: e.propagateDragEvent("drag", e),
                    start: e.propagateDragEvent("start", e),
                    stop: function (t) {
                      e.trigger("stop", {
                        element: n.getElement(),
                        target: t.target,
                      });
                    },
                    containment: e.$taskContainer,
                  })
                  .append(y("<span>", { class: "h5p-hidden-read" })),
                n = new P(t, i, e.draggables.length);
              return (
                n.on("addedToZone", function () {
                  e.triggerXAPI("interacted");
                }),
                e.draggables.push(n),
                n
              );
            }),
            (ut.prototype.createDroppable = function (t, e, i, n) {
              var s = this,
                o = this.draggables.length,
                r = y("<div/>", { class: "h5p-drag-dropzone-container" }),
                a = y("<div/>", {
                  "aria-dropeffect": "none",
                  "aria-label":
                    this.params.dropZoneIndex.replace("@index", o.toString()) +
                    " " +
                    this.params.empty.replace("@index", o.toString()),
                  tabindex: "-1",
                })
                  .appendTo(r)
                  .droppable({
                    tolerance: "pointer",
                    drop: function (t, e) {
                      (e = s.getDraggableByElement(e.draggable[0])),
                        (t = s.getDroppableByElement(t.target));
                      e && t && s.drop(e, t);
                    },
                  }),
                o = new D(t, e, i, n, a, r, o, s.params);
              return (
                o.appendDroppableTo(s.$wordContainer), s.droppables.push(o), o
              );
            }),
            (ut.prototype.propagateDragEvent = r.curry(function (t, e, i) {
              e.trigger(t, { element: i.target });
            })),
            (ut.prototype.revert = function (t) {
              var e = t.removeFromZone(),
                e = e ? e.getElement() : void 0;
              t.revertDraggableTo(this.$draggables),
                this.setDraggableAriaLabel(t),
                this.trigger("revert", { element: t.getElement(), target: e }),
                this.trigger("resize");
            }),
            (ut.prototype.drop = function (t, e) {
              (this.answered = !0), t.removeFromZone();
              var i = e.appendInsideDroppableTo(this.$draggables);
              i &&
                this.trigger("revert", {
                  element: i.getElement(),
                  target: e.getElement(),
                }),
                e.setDraggable(t),
                t.appendDraggableTo(e.getDropzone()),
                this.params.behaviour.instantFeedback &&
                  (e.addFeedback(),
                  this.instantFeedbackEvaluation(),
                  (this.params.behaviour.enableRetry && !e.isCorrect()) ||
                    e.disableDropzoneAndContainedDraggable()),
                this.trigger("drop", {
                  element: t.getElement(),
                  target: e.getElement(),
                }),
                this.trigger("resize");
            }),
            (ut.prototype.shuffleAndAddDraggables = function (e) {
              var i = this;
              return r
                .shuffle(this.draggables)
                .map(function (t, e) {
                  return t.setIndex(e);
                })
                .map(function (t) {
                  return i.addDraggableToContainer(e, t);
                })
                .map(function (t) {
                  return i.setDraggableAriaLabel(t);
                })
                .map(function (t) {
                  return i.addDraggableToControls(i.dragControls, t);
                });
            }),
            (ut.prototype.setDraggableAriaLabel = function (t) {
              return (
                t.updateAriaLabel(
                  this.params.ariaDraggableIndex
                    .replace("@index", (t.getIndex() + 1).toString())
                    .replace("@count", this.draggables.length.toString())
                ),
                t
              );
            }),
            (ut.prototype.isGrabbed = function (t) {
              return "true" === t.getAttribute("aria-grabbed");
            }),
            (ut.prototype.addDraggableToContainer = function (t, e) {
              return e.appendDraggableTo(t), e;
            }),
            (ut.prototype.addDraggableToControls = function (t, e) {
              return t.addElement(e.getElement()), e;
            }),
            (ut.prototype.instantFeedbackEvaluation = function () {
              this.isAllAnswersFilled()
                ? (this.params.behaviour.enableSolutionsButton &&
                    this.showButton("show-solution"),
                  this.params.behaviour.enableRetry &&
                    this.showButton("try-again"),
                  this.showEvaluation())
                : (this.hideButton("try-again"),
                  this.hideButton("show-solution"),
                  this.hideEvaluation());
            }),
            (ut.prototype.isAllAnswersFilled = function () {
              return this.droppables.every(function (t) {
                return t.hasDraggable();
              });
            }),
            (ut.prototype.enableAllDropzonesAndDraggables = function () {
              this.enableDraggables(),
                this.droppables.forEach(function (t) {
                  t.enableDropzone();
                });
            }),
            (ut.prototype.disableDraggables = function () {
              this.draggables.forEach(function (t) {
                t.disableDraggable();
              });
            }),
            (ut.prototype.enableDraggables = function () {
              this.draggables.forEach(function (t) {
                t.enableDraggable();
              });
            }),
            (ut.prototype.getAnswerGiven = function () {
              return this.answered;
            }),
            (ut.prototype.getScore = function () {
              return this.calculateScore();
            }),
            (ut.prototype.getMaxScore = function () {
              return this.droppables.length;
            }),
            (ut.prototype.getTitle = function () {
              return H5P.createTitle(
                this.contentData &&
                  this.contentData.metadata &&
                  this.contentData.metadata.title
                  ? this.contentData.metadata.title
                  : "Drag the Words"
              );
            }),
            (ut.prototype.toggleDropEffect = function () {
              var t = void 0 !== this.selectedElement;
              this.ariaDropControls[t ? "setAllToMove" : "setAllToNone"]();
            }),
            (ut.prototype.getDraggableByElement = function (e) {
              return this.draggables.filter(function (t) {
                return t.$draggable.get(0) === e;
              }, this)[0];
            }),
            (ut.prototype.getDroppableByElement = function (e) {
              return this.droppables.filter(function (t) {
                return t.$dropzone.get(0) === e;
              }, this)[0];
            }),
            (ut.prototype.showSolutions = function () {
              this.showEvaluation(!0),
                this.droppables.forEach(function (t) {
                  t.addFeedback(), t.showSolution();
                }),
                this.removeAllDroppablesFromControls(),
                this.disableDraggables(),
                this.hideButton("try-again"),
                this.hideButton("show-solution"),
                this.hideButton("check-answer"),
                this.trigger("resize");
            }),
            (ut.prototype.resetTask = function () {
              var t = this;
              (t.answered = !1),
                t.resetDraggables(),
                t.hideEvaluation(),
                t.hideExplanation(),
                t.enableAllDropzonesAndDraggables(),
                t.hideButton("try-again"),
                t.hideButton("show-solution"),
                t.params.behaviour.instantFeedback ||
                  t.showButton("check-answer"),
                t.hideAllSolutions(),
                this.trigger("resize");
            }),
            (ut.prototype.resetDraggables = function () {
              r.shuffle(this.draggables).forEach(this.revert, this);
            }),
            (ut.prototype.getCurrentState = function () {
              var e = this;
              if (void 0 !== this.draggables)
                return this.draggables
                  .filter(function (t) {
                    return null !== t.getInsideDropzone();
                  })
                  .map(function (t) {
                    return {
                      draggable: t.getInitialIndex(),
                      droppable: e.droppables.indexOf(t.getInsideDropzone()),
                    };
                  });
            }),
            (ut.prototype.setH5PUserState = function () {
              var i = this,
                n = this;
              void 0 !== this.previousState &&
                (this.previousState.forEach(function (t) {
                  if (
                    !n.isValidIndex(t.draggable) ||
                    !n.isValidIndex(t.droppable)
                  )
                    throw new Error("Stored user state is invalid");
                  var e = i.getDraggableByInitialIndex(t.draggable),
                    t = n.droppables[t.droppable];
                  n.drop(e, t),
                    n.params.behaviour.instantFeedback &&
                      (null !== t && t.addFeedback(),
                      t.isCorrect() &&
                        t.disableDropzoneAndContainedDraggable());
                }),
                n.params.behaviour.instantFeedback &&
                  n.isAllAnswersFilled() &&
                  !n.showEvaluation() &&
                  (n.params.behaviour.enableSolutionsButton &&
                    (n.initShowShowSolutionButton = !0),
                  n.params.behaviour.enableRetry &&
                    (n.initShowTryAgainButton = !0)));
            }),
            (ut.prototype.isValidIndex = function (t) {
              return !isNaN(t) && t < this.draggables.length && 0 <= t;
            }),
            (ut.prototype.getDraggableByInitialIndex = function (e) {
              return this.draggables.filter(function (t) {
                return t.hasInitialIndex(e);
              })[0];
            }),
            (ut.prototype.getXAPIData = function () {
              var t = this.createXAPIEventTemplate("answered");
              return (
                this.addQuestionToXAPI(t),
                this.addResponseToXAPI(t),
                { statement: t.data.statement }
              );
            }),
            (ut.prototype.addQuestionToXAPI = function (t) {
              t = t.getVerifiedStatementValue(["object", "definition"]);
              y.extend(t, this.getxAPIDefinition());
            }),
            (ut.prototype.getxAPIDefinition = function () {
              var t = {
                  interactionType: "fill-in",
                  type: "http://adlnet.gov/expapi/activities/cmi.interaction",
                },
                e = this.textFieldHtml.replaceAll(/_{10,}/gi, "_________"),
                i =
                  this.params.taskDescription.replaceAll(
                    /_{10,}/gi,
                    "_________"
                  ) + "<br/>";
              return (
                (t.description = {
                  "en-US": i + this.replaceSolutionsWithBlanks(e),
                }),
                (t.correctResponsesPattern = [
                  this.getSolutionsFromQuestion(e),
                ]),
                t
              );
            }),
            (ut.prototype.addResponseToXAPI = function (t) {
              var e,
                i = this.getScore(),
                n = this.droppables.length;
              t.setScoredResult(i, n, this);
              n = {
                min: 0,
                raw: i,
                max: n,
                scaled: Math.round((i / n) * 1e4) / 1e4,
              };
              this.stopWatch && (e = "PT" + this.stopWatch.stop() + "S"),
                (t.data.statement.result = {
                  response: this.getXAPIResponse(),
                  score: n,
                  duration: e,
                  completion: !0,
                });
            }),
            (ut.prototype.getXAPIResponse = function () {
              return this.droppables
                .map(function (t) {
                  return t.hasDraggable() ? t.containedDraggable.text : "";
                })
                .join("[,]");
            }),
            (ut.prototype.replaceSolutionsWithBlanks = function (t) {
              var e = this;
              return a(t)
                .map(function (t) {
                  return e.isAnswerPart(t) ? "__________" : t;
                })
                .join("");
            }),
            (ut.prototype.getSolutionsFromQuestion = function (t) {
              return a(t)
                .filter(this.isAnswerPart)
                .map(l)
                .map(function (t) {
                  return t.text;
                })
                .join("[,]");
            }),
            (ut.prototype.parseText = a),
            ut)),
            (H5P.DragText.parseText = function (t) {
              return a(t).map(function (t) {
                return (
                  (e = t),
                  r.startsWith("*", e) && r.endsWith("*", e)
                    ? { type: "answer", correct: l(t).text }
                    : { type: "text", content: t }
                );
                var e;
              });
            });
          const dt = H5P.DragText;
        },
        428: (t, e, i) => {
          "use strict";
          i.r(e);
        },
      },
      n = {};
    function s(t) {
      var e = n[t];
      if (void 0 !== e) return e.exports;
      e = n[t] = { exports: {} };
      return i[t](e, e.exports, s), e.exports;
    }
    (s.d = (t, e) => {
      for (var i in e)
        s.o(e, i) &&
          !s.o(t, i) &&
          Object.defineProperty(t, i, { enumerable: !0, get: e[i] });
    }),
      (s.o = (t, e) => Object.prototype.hasOwnProperty.call(t, e)),
      (s.r = (t) => {
        "undefined" != typeof Symbol &&
          Symbol.toStringTag &&
          Object.defineProperty(t, Symbol.toStringTag, { value: "Module" }),
          Object.defineProperty(t, "__esModule", { value: !0 });
      }),
      s(428),
      ((H5P = H5P || {}).DragText = s(568).Z);
  })() /*!@license H5P.MultiMediaChoice-0.3/dist/h5p-multi-media-choice.js by Joubel AS licensed under MIT*/,
  (() => {
    var i = {
        237: (t, e, i) => {
          var n;
          !(function () {
            "use strict";
            void 0 ===
              (n =
                "function" ==
                typeof (n = function () {
                  "use strict";
                  var i = (function () {
                    var t = window.Element.prototype;
                    if (t.matches) return "matches";
                    if (t.matchesSelector) return "matchesSelector";
                    for (
                      var e = ["webkit", "moz", "ms", "o"], i = 0;
                      i < e.length;
                      i++
                    ) {
                      var n = e[i] + "MatchesSelector";
                      if (t[n]) return n;
                    }
                  })();
                  return function (t, e) {
                    return t[i](e);
                  };
                })
                  ? n.call(e, i, e, t)
                  : n) || (t.exports = n);
          })(window);
        },
        439: function (t, e, i) {
          var n;
          void 0 ===
            (n =
              "function" ==
              typeof (n = function () {
                "use strict";
                function t() {}
                var e = t.prototype;
                return (
                  (e.on = function (t, e) {
                    if (t && e) {
                      var i = (this._events = this._events || {}),
                        t = (i[t] = i[t] || []);
                      return -1 == t.indexOf(e) && t.push(e), this;
                    }
                  }),
                  (e.once = function (t, e) {
                    if (t && e) {
                      this.on(t, e);
                      var i = (this._onceEvents = this._onceEvents || {});
                      return ((i[t] = i[t] || {})[e] = !0), this;
                    }
                  }),
                  (e.off = function (t, e) {
                    t = this._events && this._events[t];
                    if (t && t.length) {
                      e = t.indexOf(e);
                      return -1 != e && t.splice(e, 1), this;
                    }
                  }),
                  (e.emitEvent = function (t, e) {
                    var i = this._events && this._events[t];
                    if (i && i.length) {
                      (i = i.slice(0)), (e = e || []);
                      for (
                        var n = this._onceEvents && this._onceEvents[t], s = 0;
                        s < i.length;
                        s++
                      ) {
                        var o = i[s];
                        n && n[o] && (this.off(t, o), delete n[o]),
                          o.apply(this, e);
                      }
                      return this;
                    }
                  }),
                  (e.allOff = function () {
                    delete this._events, delete this._onceEvents;
                  }),
                  t
                );
              })
                ? n.call(e, i, e, t)
                : n) || (t.exports = n);
        },
        285: (t, e, i) => {
          var n;
          (n = window),
            (i = [i(237)]),
            void 0 ===
              (i = function (t) {
                return (function (i, o) {
                  "use strict";
                  var l = {
                      extend: function (t, e) {
                        for (var i in e) t[i] = e[i];
                        return t;
                      },
                      modulo: function (t, e) {
                        return ((t % e) + e) % e;
                      },
                    },
                    e = Array.prototype.slice;
                  (l.makeArray = function (t) {
                    return Array.isArray(t)
                      ? t
                      : null == t
                      ? []
                      : "object" == typeof t && "number" == typeof t.length
                      ? e.call(t)
                      : [t];
                  }),
                    (l.removeFrom = function (t, e) {
                      e = t.indexOf(e);
                      -1 != e && t.splice(e, 1);
                    }),
                    (l.getParent = function (t, e) {
                      for (; t.parentNode && t != document.body; )
                        if (((t = t.parentNode), o(t, e))) return t;
                    }),
                    (l.getQueryElement = function (t) {
                      return "string" == typeof t
                        ? document.querySelector(t)
                        : t;
                    }),
                    (l.handleEvent = function (t) {
                      var e = "on" + t.type;
                      this[e] && this[e](t);
                    }),
                    (l.filterFindElements = function (t, n) {
                      t = l.makeArray(t);
                      var s = [];
                      return (
                        t.forEach(function (t) {
                          if (t instanceof HTMLElement)
                            if (n) {
                              o(t, n) && s.push(t);
                              for (
                                var e = t.querySelectorAll(n), i = 0;
                                i < e.length;
                                i++
                              )
                                s.push(e[i]);
                            } else s.push(t);
                        }),
                        s
                      );
                    }),
                    (l.debounceMethod = function (t, e, n) {
                      n = n || 100;
                      var s = t.prototype[e],
                        o = e + "Timeout";
                      t.prototype[e] = function () {
                        var t = this[o];
                        clearTimeout(t);
                        var e = arguments,
                          i = this;
                        this[o] = setTimeout(function () {
                          s.apply(i, e), delete i[o];
                        }, n);
                      };
                    }),
                    (l.docReady = function (t) {
                      var e = document.readyState;
                      "complete" == e || "interactive" == e
                        ? setTimeout(t)
                        : document.addEventListener("DOMContentLoaded", t);
                    }),
                    (l.toDashed = function (t) {
                      return t
                        .replace(/(.)([A-Z])/g, function (t, e, i) {
                          return e + "-" + i;
                        })
                        .toLowerCase();
                    });
                  var c = i.console;
                  return (
                    (l.htmlInit = function (r, a) {
                      l.docReady(function () {
                        var t = l.toDashed(a),
                          n = "data-" + t,
                          e = document.querySelectorAll("[" + n + "]"),
                          t = document.querySelectorAll(".js-" + t),
                          t = l.makeArray(e).concat(l.makeArray(t)),
                          s = n + "-options",
                          o = i.jQuery;
                        t.forEach(function (e) {
                          var t = e.getAttribute(n) || e.getAttribute(s);
                          try {
                            i = t && JSON.parse(t);
                          } catch (t) {
                            return void (
                              c &&
                              c.error(
                                "Error parsing " +
                                  n +
                                  " on " +
                                  e.className +
                                  ": " +
                                  t
                              )
                            );
                          }
                          var i = new r(e, i);
                          o && o.data(e, a, i);
                        });
                      });
                    }),
                    l
                  );
                })(n, t);
              }.apply(e, i)) || (t.exports = i);
        },
        735: (t, e, i) => {
          var n;
          window,
            void 0 ===
              (n =
                "function" ==
                typeof (n = function () {
                  "use strict";
                  function p(t) {
                    var e = parseFloat(t);
                    return -1 == t.indexOf("%") && !isNaN(e) && e;
                  }
                  var e =
                      "undefined" == typeof console
                        ? function () {}
                        : function (t) {},
                    f = [
                      "paddingLeft",
                      "paddingRight",
                      "paddingTop",
                      "paddingBottom",
                      "marginLeft",
                      "marginRight",
                      "marginTop",
                      "marginBottom",
                      "borderLeftWidth",
                      "borderRightWidth",
                      "borderTopWidth",
                      "borderBottomWidth",
                    ],
                    g = f.length;
                  function m(t) {
                    t = getComputedStyle(t);
                    return (
                      t ||
                        e(
                          "Style returned " +
                            t +
                            ". Are you running this code in a hidden iframe on Firefox? See https://bit.ly/getsizebug1"
                        ),
                      t
                    );
                  }
                  var v,
                    b = !1;
                  function y(t) {
                    if (
                      (b ||
                        ((b = !0),
                        ((d = document.createElement("div")).style.width =
                          "200px"),
                        (d.style.padding = "1px 2px 3px 4px"),
                        (d.style.borderStyle = "solid"),
                        (d.style.borderWidth = "1px 2px 3px 4px"),
                        (d.style.boxSizing = "border-box"),
                        (u =
                          document.body ||
                          document.documentElement).appendChild(d),
                        (h = m(d)),
                        (v = 200 == Math.round(p(h.width))),
                        (y.isBoxSizeOuter = v),
                        u.removeChild(d)),
                      (t =
                        "string" == typeof t ? document.querySelector(t) : t) &&
                        "object" == typeof t &&
                        t.nodeType)
                    ) {
                      var e = m(t);
                      if ("none" == e.display)
                        return (function () {
                          for (
                            var t = {
                                width: 0,
                                height: 0,
                                innerWidth: 0,
                                innerHeight: 0,
                                outerWidth: 0,
                                outerHeight: 0,
                              },
                              e = 0;
                            e < g;
                            e++
                          )
                            t[f[e]] = 0;
                          return t;
                        })();
                      var i = {};
                      (i.width = t.offsetWidth), (i.height = t.offsetHeight);
                      for (
                        var n = (i.isBorderBox = "border-box" == e.boxSizing),
                          s = 0;
                        s < g;
                        s++
                      ) {
                        var o = f[s],
                          r = e[o],
                          r = parseFloat(r);
                        i[o] = isNaN(r) ? 0 : r;
                      }
                      var a = i.paddingLeft + i.paddingRight,
                        l = i.paddingTop + i.paddingBottom,
                        c = i.marginLeft + i.marginRight,
                        h = i.marginTop + i.marginBottom,
                        u = i.borderLeftWidth + i.borderRightWidth,
                        d = i.borderTopWidth + i.borderBottomWidth,
                        t = n && v,
                        n = p(e.width);
                      !1 !== n && (i.width = n + (t ? 0 : a + u));
                      n = p(e.height);
                      return (
                        !1 !== n && (i.height = n + (t ? 0 : l + d)),
                        (i.innerWidth = i.width - (a + u)),
                        (i.innerHeight = i.height - (l + d)),
                        (i.outerWidth = i.width + c),
                        (i.outerHeight = i.height + h),
                        i
                      );
                    }
                    var d, u, h;
                  }
                  return y;
                })
                  ? n.call(e, i, e, t)
                  : n) || (t.exports = n);
        },
        904: (t, e, i) => {
          var n;
          window,
            (n = [i(397), i(735)]),
            void 0 ===
              (i =
                "function" ==
                typeof (i = function (t, a) {
                  "use strict";
                  var e = t.create("masonry");
                  e.compatOptions.fitWidth = "isFitWidth";
                  t = e.prototype;
                  return (
                    (t._resetLayout = function () {
                      this.getSize(),
                        this._getMeasurement("columnWidth", "outerWidth"),
                        this._getMeasurement("gutter", "outerWidth"),
                        this.measureColumns(),
                        (this.colYs = []);
                      for (var t = 0; t < this.cols; t++) this.colYs.push(0);
                      (this.maxY = 0), (this.horizontalColIndex = 0);
                    }),
                    (t.measureColumns = function () {
                      this.getContainerWidth(),
                        this.columnWidth ||
                          ((i = (e = this.items[0]) && e.element),
                          (this.columnWidth =
                            (i && a(i).outerWidth) || this.containerWidth));
                      var t = (this.columnWidth += this.gutter),
                        e = this.containerWidth + this.gutter,
                        i = e / t,
                        t = t - (e % t),
                        i = Math[t && t < 1 ? "round" : "floor"](i);
                      this.cols = Math.max(i, 1);
                    }),
                    (t.getContainerWidth = function () {
                      var t = this._getOption("fitWidth")
                          ? this.element.parentNode
                          : this.element,
                        t = a(t);
                      this.containerWidth = t && t.innerWidth;
                    }),
                    (t._getItemLayoutPosition = function (t) {
                      t.getSize();
                      for (
                        var e = t.size.outerWidth % this.columnWidth,
                          i = Math[e && e < 1 ? "round" : "ceil"](
                            t.size.outerWidth / this.columnWidth
                          ),
                          i = Math.min(i, this.cols),
                          n = this[
                            this.options.horizontalOrder
                              ? "_getHorizontalColPosition"
                              : "_getTopColPosition"
                          ](i, t),
                          e = { x: this.columnWidth * n.col, y: n.y },
                          s = n.y + t.size.outerHeight,
                          o = i + n.col,
                          r = n.col;
                        r < o;
                        r++
                      )
                        this.colYs[r] = s;
                      return e;
                    }),
                    (t._getTopColPosition = function (t) {
                      var e = this._getTopColGroup(t),
                        t = Math.min.apply(Math, e);
                      return { col: e.indexOf(t), y: t };
                    }),
                    (t._getTopColGroup = function (t) {
                      if (t < 2) return this.colYs;
                      for (var e = [], i = this.cols + 1 - t, n = 0; n < i; n++)
                        e[n] = this._getColGroupY(n, t);
                      return e;
                    }),
                    (t._getColGroupY = function (t, e) {
                      if (e < 2) return this.colYs[t];
                      e = this.colYs.slice(t, t + e);
                      return Math.max.apply(Math, e);
                    }),
                    (t._getHorizontalColPosition = function (t, e) {
                      var i = this.horizontalColIndex % this.cols,
                        i = 1 < t && i + t > this.cols ? 0 : i,
                        e = e.size.outerWidth && e.size.outerHeight;
                      return (
                        (this.horizontalColIndex = e
                          ? i + t
                          : this.horizontalColIndex),
                        { col: i, y: this._getColGroupY(i, t) }
                      );
                    }),
                    (t._manageStamp = function (t) {
                      var e = a(t),
                        i = this._getElementOffset(t),
                        n = this._getOption("originLeft") ? i.left : i.right,
                        t = n + e.outerWidth,
                        n = Math.floor(n / this.columnWidth),
                        n = Math.max(0, n),
                        s = Math.floor(t / this.columnWidth);
                      s -= t % this.columnWidth ? 0 : 1;
                      for (
                        var s = Math.min(this.cols - 1, s),
                          o =
                            (this._getOption("originTop") ? i.top : i.bottom) +
                            e.outerHeight,
                          r = n;
                        r <= s;
                        r++
                      )
                        this.colYs[r] = Math.max(o, this.colYs[r]);
                    }),
                    (t._getContainerSize = function () {
                      this.maxY = Math.max.apply(Math, this.colYs);
                      var t = { height: this.maxY };
                      return (
                        this._getOption("fitWidth") &&
                          (t.width = this._getContainerFitWidth()),
                        t
                      );
                    }),
                    (t._getContainerFitWidth = function () {
                      for (
                        var t = 0, e = this.cols;
                        --e && 0 === this.colYs[e];

                      )
                        t++;
                      return (this.cols - t) * this.columnWidth - this.gutter;
                    }),
                    (t.needsResizeLayout = function () {
                      var t = this.containerWidth;
                      return this.getContainerWidth(), t != this.containerWidth;
                    }),
                    e
                  );
                })
                  ? i.apply(e, n)
                  : i) || (t.exports = i);
        },
        787: (t, e, i) => {
          var n;
          window,
            (n = [i(439), i(735)]),
            void 0 ===
              (i =
                "function" ==
                typeof (i = function (t, e) {
                  "use strict";
                  var i = document.documentElement.style,
                    n =
                      "string" == typeof i.transition
                        ? "transition"
                        : "WebkitTransition",
                    i =
                      "string" == typeof i.transform
                        ? "transform"
                        : "WebkitTransform",
                    s = {
                      WebkitTransition: "webkitTransitionEnd",
                      transition: "transitionend",
                    }[n],
                    o = {
                      transform: i,
                      transition: n,
                      transitionDuration: n + "Duration",
                      transitionProperty: n + "Property",
                      transitionDelay: n + "Delay",
                    };
                  function r(t, e) {
                    t &&
                      ((this.element = t),
                      (this.layout = e),
                      (this.position = { x: 0, y: 0 }),
                      this._create());
                  }
                  t = r.prototype = Object.create(t.prototype);
                  (t.constructor = r),
                    (t._create = function () {
                      (this._transn = {
                        ingProperties: {},
                        clean: {},
                        onEnd: {},
                      }),
                        this.css({ position: "absolute" });
                    }),
                    (t.handleEvent = function (t) {
                      var e = "on" + t.type;
                      this[e] && this[e](t);
                    }),
                    (t.getSize = function () {
                      this.size = e(this.element);
                    }),
                    (t.css = function (t) {
                      var e,
                        i = this.element.style;
                      for (e in t) i[o[e] || e] = t[e];
                    }),
                    (t.getPosition = function () {
                      var t = getComputedStyle(this.element),
                        e = this.layout._getOption("originLeft"),
                        i = this.layout._getOption("originTop"),
                        n = t[e ? "left" : "right"],
                        s = t[i ? "top" : "bottom"],
                        o = parseFloat(n),
                        r = parseFloat(s),
                        t = this.layout.size;
                      -1 != n.indexOf("%") && (o = (o / 100) * t.width),
                        -1 != s.indexOf("%") && (r = (r / 100) * t.height),
                        (o = isNaN(o) ? 0 : o),
                        (r = isNaN(r) ? 0 : r),
                        (o -= e ? t.paddingLeft : t.paddingRight),
                        (r -= i ? t.paddingTop : t.paddingBottom),
                        (this.position.x = o),
                        (this.position.y = r);
                    }),
                    (t.layoutPosition = function () {
                      var t = this.layout.size,
                        e = {},
                        i = this.layout._getOption("originLeft"),
                        n = this.layout._getOption("originTop"),
                        s = i ? "right" : "left",
                        o =
                          this.position.x +
                          t[i ? "paddingLeft" : "paddingRight"];
                      (e[i ? "left" : "right"] = this.getXValue(o)),
                        (e[s] = "");
                      (s = n ? "bottom" : "top"),
                        (t =
                          this.position.y +
                          t[n ? "paddingTop" : "paddingBottom"]);
                      (e[n ? "top" : "bottom"] = this.getYValue(t)),
                        (e[s] = ""),
                        this.css(e),
                        this.emitEvent("layout", [this]);
                    }),
                    (t.getXValue = function (t) {
                      var e = this.layout._getOption("horizontal");
                      return this.layout.options.percentPosition && !e
                        ? (t / this.layout.size.width) * 100 + "%"
                        : t + "px";
                    }),
                    (t.getYValue = function (t) {
                      var e = this.layout._getOption("horizontal");
                      return this.layout.options.percentPosition && e
                        ? (t / this.layout.size.height) * 100 + "%"
                        : t + "px";
                    }),
                    (t._transitionTo = function (t, e) {
                      this.getPosition();
                      var i = this.position.x,
                        n = this.position.y,
                        s = t == this.position.x && e == this.position.y;
                      this.setPosition(t, e),
                        !s || this.isTransitioning
                          ? (((s = {}).transform = this.getTranslate(
                              t - i,
                              e - n
                            )),
                            this.transition({
                              to: s,
                              onTransitionEnd: {
                                transform: this.layoutPosition,
                              },
                              isCleaning: !0,
                            }))
                          : this.layoutPosition();
                    }),
                    (t.getTranslate = function (t, e) {
                      return (
                        "translate3d(" +
                        (t = this.layout._getOption("originLeft") ? t : -t) +
                        "px, " +
                        (this.layout._getOption("originTop") ? e : -e) +
                        "px, 0)"
                      );
                    }),
                    (t.goTo = function (t, e) {
                      this.setPosition(t, e), this.layoutPosition();
                    }),
                    (t.moveTo = t._transitionTo),
                    (t.setPosition = function (t, e) {
                      (this.position.x = parseFloat(t)),
                        (this.position.y = parseFloat(e));
                    }),
                    (t._nonTransition = function (t) {
                      for (var e in (this.css(t.to),
                      t.isCleaning && this._removeStyles(t.to),
                      t.onTransitionEnd))
                        t.onTransitionEnd[e].call(this);
                    }),
                    (t.transition = function (t) {
                      if (parseFloat(this.layout.options.transitionDuration)) {
                        var e,
                          i = this._transn;
                        for (e in t.onTransitionEnd)
                          i.onEnd[e] = t.onTransitionEnd[e];
                        for (e in t.to)
                          (i.ingProperties[e] = !0),
                            t.isCleaning && (i.clean[e] = !0);
                        t.from && (this.css(t.from), this.element.offsetHeight),
                          this.enableTransition(t.to),
                          this.css(t.to),
                          (this.isTransitioning = !0);
                      } else this._nonTransition(t);
                    });
                  var a =
                    "opacity," +
                    i.replace(/([A-Z])/g, function (t) {
                      return "-" + t.toLowerCase();
                    });
                  (t.enableTransition = function () {
                    var t;
                    this.isTransitioning ||
                      ((t =
                        "number" ==
                        typeof (t = this.layout.options.transitionDuration)
                          ? t + "ms"
                          : t),
                      this.css({
                        transitionProperty: a,
                        transitionDuration: t,
                        transitionDelay: this.staggerDelay || 0,
                      }),
                      this.element.addEventListener(s, this, !1));
                  }),
                    (t.onwebkitTransitionEnd = function (t) {
                      this.ontransitionend(t);
                    }),
                    (t.onotransitionend = function (t) {
                      this.ontransitionend(t);
                    });
                  var l = { "-webkit-transform": "transform" };
                  (t.ontransitionend = function (t) {
                    var e, i;
                    t.target === this.element &&
                      ((e = this._transn),
                      (i = l[t.propertyName] || t.propertyName),
                      delete e.ingProperties[i],
                      (function (t) {
                        for (var e in t) return;
                        return 1;
                      })(e.ingProperties) && this.disableTransition(),
                      i in e.clean &&
                        ((this.element.style[t.propertyName] = ""),
                        delete e.clean[i]),
                      i in e.onEnd &&
                        (e.onEnd[i].call(this), delete e.onEnd[i]),
                      this.emitEvent("transitionEnd", [this]));
                  }),
                    (t.disableTransition = function () {
                      this.removeTransitionStyles(),
                        this.element.removeEventListener(s, this, !1),
                        (this.isTransitioning = !1);
                    }),
                    (t._removeStyles = function (t) {
                      var e,
                        i = {};
                      for (e in t) i[e] = "";
                      this.css(i);
                    });
                  var c = {
                    transitionProperty: "",
                    transitionDuration: "",
                    transitionDelay: "",
                  };
                  return (
                    (t.removeTransitionStyles = function () {
                      this.css(c);
                    }),
                    (t.stagger = function (t) {
                      (t = isNaN(t) ? 0 : t), (this.staggerDelay = t + "ms");
                    }),
                    (t.removeElem = function () {
                      this.element.parentNode.removeChild(this.element),
                        this.css({ display: "" }),
                        this.emitEvent("remove", [this]);
                    }),
                    (t.remove = function () {
                      n && parseFloat(this.layout.options.transitionDuration)
                        ? (this.once("transitionEnd", function () {
                            this.removeElem();
                          }),
                          this.hide())
                        : this.removeElem();
                    }),
                    (t.reveal = function () {
                      delete this.isHidden, this.css({ display: "" });
                      var t = this.layout.options,
                        e = {};
                      (e[
                        this.getHideRevealTransitionEndProperty("visibleStyle")
                      ] = this.onRevealTransitionEnd),
                        this.transition({
                          from: t.hiddenStyle,
                          to: t.visibleStyle,
                          isCleaning: !0,
                          onTransitionEnd: e,
                        });
                    }),
                    (t.onRevealTransitionEnd = function () {
                      this.isHidden || this.emitEvent("reveal");
                    }),
                    (t.getHideRevealTransitionEndProperty = function (t) {
                      var e,
                        t = this.layout.options[t];
                      if (t.opacity) return "opacity";
                      for (e in t) return e;
                    }),
                    (t.hide = function () {
                      (this.isHidden = !0), this.css({ display: "" });
                      var t = this.layout.options,
                        e = {};
                      (e[
                        this.getHideRevealTransitionEndProperty("hiddenStyle")
                      ] = this.onHideTransitionEnd),
                        this.transition({
                          from: t.visibleStyle,
                          to: t.hiddenStyle,
                          isCleaning: !0,
                          onTransitionEnd: e,
                        });
                    }),
                    (t.onHideTransitionEnd = function () {
                      this.isHidden &&
                        (this.css({ display: "none" }), this.emitEvent("hide"));
                    }),
                    (t.destroy = function () {
                      this.css({
                        position: "",
                        left: "",
                        right: "",
                        top: "",
                        bottom: "",
                        transition: "",
                        transform: "",
                      });
                    }),
                    r
                  );
                })
                  ? i.apply(e, n)
                  : i) || (t.exports = i);
        },
        397: (t, e, i) => {
          var n;
          !(function (s) {
            "use strict";
            (n = [i(439), i(735), i(285), i(787)]),
              void 0 ===
                (n = function (t, e, i, n) {
                  return (function (t, e, s, n, o) {
                    function i() {}
                    var r = t.console,
                      a = t.jQuery,
                      l = 0,
                      c = {};
                    function h(t, e) {
                      var i = n.getQueryElement(t);
                      i
                        ? ((this.element = i),
                          a && (this.$element = a(this.element)),
                          (this.options = n.extend(
                            {},
                            this.constructor.defaults
                          )),
                          this.option(e),
                          (e = ++l),
                          (this.element.outlayerGUID = e),
                          (c[e] = this)._create(),
                          this._getOption("initLayout") && this.layout())
                        : r &&
                          r.error(
                            "Bad element for " +
                              this.constructor.namespace +
                              ": " +
                              (i || t)
                          );
                    }
                    (h.namespace = "outlayer"),
                      (h.Item = o),
                      (h.defaults = {
                        containerStyle: { position: "relative" },
                        initLayout: !0,
                        originLeft: !0,
                        originTop: !0,
                        resize: !0,
                        resizeContainer: !0,
                        transitionDuration: "0.4s",
                        hiddenStyle: { opacity: 0, transform: "scale(0.001)" },
                        visibleStyle: { opacity: 1, transform: "scale(1)" },
                      });
                    var u = h.prototype;
                    function d(t) {
                      function e() {
                        t.apply(this, arguments);
                      }
                      return ((e.prototype = Object.create(
                        t.prototype
                      )).constructor = e);
                    }
                    n.extend(u, e.prototype),
                      (u.option = function (t) {
                        n.extend(this.options, t);
                      }),
                      (u._getOption = function (t) {
                        var e = this.constructor.compatOptions[t];
                        return e && void 0 !== this.options[e]
                          ? this.options[e]
                          : this.options[t];
                      }),
                      (h.compatOptions = {
                        initLayout: "isInitLayout",
                        horizontal: "isHorizontal",
                        layoutInstant: "isLayoutInstant",
                        originLeft: "isOriginLeft",
                        originTop: "isOriginTop",
                        resize: "isResizeBound",
                        resizeContainer: "isResizingContainer",
                      }),
                      (u._create = function () {
                        this.reloadItems(),
                          (this.stamps = []),
                          this.stamp(this.options.stamp),
                          n.extend(
                            this.element.style,
                            this.options.containerStyle
                          ),
                          this._getOption("resize") && this.bindResize();
                      }),
                      (u.reloadItems = function () {
                        this.items = this._itemize(this.element.children);
                      }),
                      (u._itemize = function (t) {
                        for (
                          var e = this._filterFindItemElements(t),
                            i = this.constructor.Item,
                            n = [],
                            s = 0;
                          s < e.length;
                          s++
                        ) {
                          var o = new i(e[s], this);
                          n.push(o);
                        }
                        return n;
                      }),
                      (u._filterFindItemElements = function (t) {
                        return n.filterFindElements(
                          t,
                          this.options.itemSelector
                        );
                      }),
                      (u.getItemElements = function () {
                        return this.items.map(function (t) {
                          return t.element;
                        });
                      }),
                      (u.layout = function () {
                        this._resetLayout(), this._manageStamps();
                        var t = this._getOption("layoutInstant"),
                          t = void 0 !== t ? t : !this._isLayoutInited;
                        this.layoutItems(this.items, t),
                          (this._isLayoutInited = !0);
                      }),
                      (u._init = u.layout),
                      (u._resetLayout = function () {
                        this.getSize();
                      }),
                      (u.getSize = function () {
                        this.size = s(this.element);
                      }),
                      (u._getMeasurement = function (t, e) {
                        var i,
                          n = this.options[t];
                        n
                          ? ("string" == typeof n
                              ? (i = this.element.querySelector(n))
                              : n instanceof HTMLElement && (i = n),
                            (this[t] = i ? s(i)[e] : n))
                          : (this[t] = 0);
                      }),
                      (u.layoutItems = function (t, e) {
                        (t = this._getItemsForLayout(t)),
                          this._layoutItems(t, e),
                          this._postLayout();
                      }),
                      (u._getItemsForLayout = function (t) {
                        return t.filter(function (t) {
                          return !t.isIgnored;
                        });
                      }),
                      (u._layoutItems = function (t, i) {
                        var n;
                        this._emitCompleteOnItems("layout", t),
                          t &&
                            t.length &&
                            ((n = []),
                            t.forEach(function (t) {
                              var e = this._getItemLayoutPosition(t);
                              (e.item = t),
                                (e.isInstant = i || t.isLayoutInstant),
                                n.push(e);
                            }, this),
                            this._processLayoutQueue(n));
                      }),
                      (u._getItemLayoutPosition = function () {
                        return { x: 0, y: 0 };
                      }),
                      (u._processLayoutQueue = function (t) {
                        this.updateStagger(),
                          t.forEach(function (t, e) {
                            this._positionItem(
                              t.item,
                              t.x,
                              t.y,
                              t.isInstant,
                              e
                            );
                          }, this);
                      }),
                      (u.updateStagger = function () {
                        var t = this.options.stagger;
                        if (null != t)
                          return (
                            (this.stagger = (function (t) {
                              if ("number" == typeof t) return t;
                              var e = t.match(/(^\d*\.?\d*)(\w*)/),
                                t = e && e[1],
                                e = e && e[2];
                              return t.length
                                ? (t = parseFloat(t)) * (p[e] || 1)
                                : 0;
                            })(t)),
                            this.stagger
                          );
                        this.stagger = 0;
                      }),
                      (u._positionItem = function (t, e, i, n, s) {
                        n
                          ? t.goTo(e, i)
                          : (t.stagger(s * this.stagger), t.moveTo(e, i));
                      }),
                      (u._postLayout = function () {
                        this.resizeContainer();
                      }),
                      (u.resizeContainer = function () {
                        var t;
                        !this._getOption("resizeContainer") ||
                          ((t = this._getContainerSize()) &&
                            (this._setContainerMeasure(t.width, !0),
                            this._setContainerMeasure(t.height, !1)));
                      }),
                      (u._getContainerSize = i),
                      (u._setContainerMeasure = function (t, e) {
                        var i;
                        void 0 !== t &&
                          ((i = this.size).isBorderBox &&
                            (t += e
                              ? i.paddingLeft +
                                i.paddingRight +
                                i.borderLeftWidth +
                                i.borderRightWidth
                              : i.paddingBottom +
                                i.paddingTop +
                                i.borderTopWidth +
                                i.borderBottomWidth),
                          (t = Math.max(t, 0)),
                          (this.element.style[e ? "width" : "height"] =
                            t + "px"));
                      }),
                      (u._emitCompleteOnItems = function (e, t) {
                        var i = this;
                        function n() {
                          i.dispatchEvent(e + "Complete", null, [t]);
                        }
                        var s,
                          o = t.length;
                        function r() {
                          ++s == o && n();
                        }
                        t && o
                          ? ((s = 0),
                            t.forEach(function (t) {
                              t.once(e, r);
                            }))
                          : n();
                      }),
                      (u.dispatchEvent = function (t, e, i) {
                        var n = e ? [e].concat(i) : i;
                        this.emitEvent(t, n),
                          a &&
                            ((this.$element = this.$element || a(this.element)),
                            e
                              ? (((e = a.Event(e)).type = t),
                                this.$element.trigger(e, i))
                              : this.$element.trigger(t, i));
                      }),
                      (u.ignore = function (t) {
                        t = this.getItem(t);
                        t && (t.isIgnored = !0);
                      }),
                      (u.unignore = function (t) {
                        t = this.getItem(t);
                        t && delete t.isIgnored;
                      }),
                      (u.stamp = function (t) {
                        (t = this._find(t)) &&
                          ((this.stamps = this.stamps.concat(t)),
                          t.forEach(this.ignore, this));
                      }),
                      (u.unstamp = function (t) {
                        (t = this._find(t)) &&
                          t.forEach(function (t) {
                            n.removeFrom(this.stamps, t), this.unignore(t);
                          }, this);
                      }),
                      (u._find = function (t) {
                        if (t)
                          return (
                            "string" == typeof t &&
                              (t = this.element.querySelectorAll(t)),
                            n.makeArray(t)
                          );
                      }),
                      (u._manageStamps = function () {
                        this.stamps &&
                          this.stamps.length &&
                          (this._getBoundingRect(),
                          this.stamps.forEach(this._manageStamp, this));
                      }),
                      (u._getBoundingRect = function () {
                        var t = this.element.getBoundingClientRect(),
                          e = this.size;
                        this._boundingRect = {
                          left: t.left + e.paddingLeft + e.borderLeftWidth,
                          top: t.top + e.paddingTop + e.borderTopWidth,
                          right:
                            t.right - (e.paddingRight + e.borderRightWidth),
                          bottom:
                            t.bottom - (e.paddingBottom + e.borderBottomWidth),
                        };
                      }),
                      (u._manageStamp = i),
                      (u._getElementOffset = function (t) {
                        var e = t.getBoundingClientRect(),
                          i = this._boundingRect,
                          t = s(t);
                        return {
                          left: e.left - i.left - t.marginLeft,
                          top: e.top - i.top - t.marginTop,
                          right: i.right - e.right - t.marginRight,
                          bottom: i.bottom - e.bottom - t.marginBottom,
                        };
                      }),
                      (u.handleEvent = n.handleEvent),
                      (u.bindResize = function () {
                        t.addEventListener("resize", this),
                          (this.isResizeBound = !0);
                      }),
                      (u.unbindResize = function () {
                        t.removeEventListener("resize", this),
                          (this.isResizeBound = !1);
                      }),
                      (u.onresize = function () {
                        this.resize();
                      }),
                      n.debounceMethod(h, "onresize", 100),
                      (u.resize = function () {
                        this.isResizeBound &&
                          this.needsResizeLayout() &&
                          this.layout();
                      }),
                      (u.needsResizeLayout = function () {
                        var t = s(this.element);
                        return (
                          this.size &&
                          t &&
                          t.innerWidth !== this.size.innerWidth
                        );
                      }),
                      (u.addItems = function (t) {
                        t = this._itemize(t);
                        return (
                          t.length && (this.items = this.items.concat(t)), t
                        );
                      }),
                      (u.appended = function (t) {
                        t = this.addItems(t);
                        t.length && (this.layoutItems(t, !0), this.reveal(t));
                      }),
                      (u.prepended = function (t) {
                        var e = this._itemize(t);
                        e.length &&
                          ((t = this.items.slice(0)),
                          (this.items = e.concat(t)),
                          this._resetLayout(),
                          this._manageStamps(),
                          this.layoutItems(e, !0),
                          this.reveal(e),
                          this.layoutItems(t));
                      }),
                      (u.reveal = function (t) {
                        var i;
                        this._emitCompleteOnItems("reveal", t),
                          t &&
                            t.length &&
                            ((i = this.updateStagger()),
                            t.forEach(function (t, e) {
                              t.stagger(e * i), t.reveal();
                            }));
                      }),
                      (u.hide = function (t) {
                        var i;
                        this._emitCompleteOnItems("hide", t),
                          t &&
                            t.length &&
                            ((i = this.updateStagger()),
                            t.forEach(function (t, e) {
                              t.stagger(e * i), t.hide();
                            }));
                      }),
                      (u.revealItemElements = function (t) {
                        t = this.getItems(t);
                        this.reveal(t);
                      }),
                      (u.hideItemElements = function (t) {
                        t = this.getItems(t);
                        this.hide(t);
                      }),
                      (u.getItem = function (t) {
                        for (var e = 0; e < this.items.length; e++) {
                          var i = this.items[e];
                          if (i.element == t) return i;
                        }
                      }),
                      (u.getItems = function (t) {
                        t = n.makeArray(t);
                        var e = [];
                        return (
                          t.forEach(function (t) {
                            t = this.getItem(t);
                            t && e.push(t);
                          }, this),
                          e
                        );
                      }),
                      (u.remove = function (t) {
                        t = this.getItems(t);
                        this._emitCompleteOnItems("remove", t),
                          t &&
                            t.length &&
                            t.forEach(function (t) {
                              t.remove(), n.removeFrom(this.items, t);
                            }, this);
                      }),
                      (u.destroy = function () {
                        var t = this.element.style;
                        (t.height = ""),
                          (t.position = ""),
                          (t.width = ""),
                          this.items.forEach(function (t) {
                            t.destroy();
                          }),
                          this.unbindResize();
                        t = this.element.outlayerGUID;
                        delete c[t],
                          delete this.element.outlayerGUID,
                          a &&
                            a.removeData(
                              this.element,
                              this.constructor.namespace
                            );
                      }),
                      (h.data = function (t) {
                        t = (t = n.getQueryElement(t)) && t.outlayerGUID;
                        return t && c[t];
                      }),
                      (h.create = function (t, e) {
                        var i = d(h);
                        return (
                          (i.defaults = n.extend({}, h.defaults)),
                          n.extend(i.defaults, e),
                          (i.compatOptions = n.extend({}, h.compatOptions)),
                          (i.namespace = t),
                          (i.data = h.data),
                          (i.Item = d(o)),
                          n.htmlInit(i, t),
                          a && a.bridget && a.bridget(t, i),
                          i
                        );
                      });
                    var p = { ms: 1, s: 1e3 };
                    return (h.Item = o), h;
                  })(s, t, e, i, n);
                }.apply(e, n)) || (t.exports = n);
          })(window);
        },
      },
      n = {};
    function p(t) {
      var e = n[t];
      if (void 0 !== e) return e.exports;
      e = n[t] = { exports: {} };
      return i[t].call(e.exports, e, e.exports, p), e.exports;
    }
    (() => {
      "use strict";
      function s(t) {
        return (s =
          "function" == typeof Symbol && "symbol" == typeof Symbol.iterator
            ? function (t) {
                return typeof t;
              }
            : function (t) {
                return t &&
                  "function" == typeof Symbol &&
                  t.constructor === Symbol &&
                  t !== Symbol.prototype
                  ? "symbol"
                  : typeof t;
              })(t);
      }
      var o =
          ((h.extendParams = function (t) {
            return h.deepExtend(
              {
                question: "No question text provided",
                behaviour: {
                  enableSolutionsButton: !0,
                  enableRetry: !0,
                  questionType: "auto",
                  confirmCheckDialog: !1,
                  confirmRetryDialog: !1,
                  aspectRatio: "auto",
                  maxAlternativesPerRow: 4,
                },
                l10n: {
                  checkAnswerButtonText: "Check",
                  submitAnswerButtonText: "Submit",
                  checkAnswer:
                    "Check the answers. The responses will be marked as correct, incorrect, or unanswered.",
                  showSolutionButtonText: "Show solution",
                  showSolution:
                    "Show the solution. The task will be marked with its correct solution.",
                  correctAnswer: "Correct answer",
                  wrongAnswer: "Wrong answer",
                  shouldCheck: "Should have been checked",
                  shouldNotCheck: "Should not have been checked",
                  noAnswer: "Please answer before viewing the solution",
                  retryText: "Retry",
                  retry:
                    "Retry the task. Reset all responses and start the task over again.",
                  result: "You got :num out of :total points",
                  confirmCheck: {
                    header: "Finish?",
                    body: "Are you sure you want to finish?",
                    cancelLabel: "Cancel",
                    confirmLabel: "Finish",
                  },
                  confirmRetry: {
                    header: "Retry?",
                    body: "Are you sure you wish to retry?",
                    cancelLabel: "Cancel",
                    confirmLabel: "Retry",
                  },
                  missingAltText: "Alt text missing",
                },
              },
              t
            );
          }),
          (h.deepExtend = function (t) {
            t = t || {};
            for (var e = 1; e < arguments.length; e++) {
              var i = arguments[e];
              if (i)
                for (var n in (Array.isArray(i) && (t = i), i))
                  Object.prototype.hasOwnProperty.call(i, n) &&
                    ("object" === s(i[n])
                      ? (t[n] = h.deepExtend(t[n], i[n]))
                      : (t[n] = i[n]));
            }
            return t;
          }),
          h),
        c = function (t) {
          var e = document.createElement("div");
          return (e.innerHTML = t), e.textContent;
        },
        r =
          (((i = e.prototype).createMediaContent = function () {
            var t = document.createElement("div");
            if (
              (t.classList.add("h5p-multi-media-choice-media-wrapper"),
              "auto" !== this.aspectRatio &&
                (t.classList.add(
                  "h5p-multi-media-choice-media-wrapper-specific-ratio"
                ),
                t.classList.add(
                  "h5p-multi-media-choice-media-wrapper-".concat(
                    this.aspectRatio
                  )
                )),
              "H5P.Image" === this.media.library.split(" ")[0])
            )
              return t.appendChild(this.buildImage(this.option)), t;
          }),
          (i.getDescription = function () {
            return "H5P.Image" === this.media.library.split(" ")[0]
              ? this.media.params.alt || this.missingAltText
              : "";
          }),
          (i.buildImage = function () {
            var t = this.media.params.alt || "",
              e = this.media.params.title || "",
              i = "";
            this.media.params.file &&
              (i = H5P.getPath(this.media.params.file.path, this.contentId));
            var n = document.createElement("img");
            return (
              n.setAttribute("src", i),
              this.content.setAttribute("aria-label", c(t)),
              n.addEventListener("load", this.callbacks.triggerResize),
              this.content.setAttribute("title", c(e)),
              n.classList.add("h5p-multi-media-choice-media"),
              n.setAttribute("alt", c(t)),
              "auto" !== this.aspectRatio &&
                n.classList.add("h5p-multi-media-choice-media-specific-ratio"),
              n
            );
          }),
          (i.isSelected = function () {
            return "true" === this.content.getAttribute("aria-checked");
          }),
          (i.isCorrect = function () {
            return this.correct;
          }),
          (i.isDisabled = function () {
            return "true" === this.content.getAttribute("aria-disabled");
          }),
          (i.getDOM = function () {
            return this.content;
          }),
          (i.setTabIndex = function (t) {
            -1 === t
              ? this.content.setAttribute("tabindex", "-1")
              : this.content.setAttribute("tabindex", "0");
          }),
          (i.toggle = function () {
            this.isSelected()
              ? (this.content.setAttribute("aria-checked", "false"),
                this.wrapper.classList.remove(
                  "h5p-multi-media-choice-selected"
                ))
              : (this.content.setAttribute("aria-checked", "true"),
                this.wrapper.classList.add("h5p-multi-media-choice-selected"));
          }),
          (i.uncheck = function () {
            this.content.setAttribute("aria-checked", "false"),
              this.wrapper.classList.remove("h5p-multi-media-choice-selected");
          }),
          (i.focus = function () {
            this.content.focus();
          }),
          (i.enable = function () {
            this.content.setAttribute("aria-disabled", "false"),
              this.wrapper.classList.add("h5p-multi-media-choice-enabled");
          }),
          (i.disable = function () {
            this.content.setAttribute("aria-disabled", "true"),
              this.content.setAttribute("tabindex", "-1"),
              this.wrapper.classList.remove("h5p-multi-media-choice-enabled");
          }),
          (i.showSelectedSolution = function (t) {
            var e = t.correctAnswer,
              t = t.wrongAnswer;
            this.wrapper.classList.remove("h5p-multi-media-choice-selected"),
              this.isSelected() &&
                (this.correct
                  ? (this.wrapper.classList.add(
                      "h5p-multi-media-choice-correct"
                    ),
                    this.addAccessibilitySolutionText(e))
                  : (this.wrapper.classList.add("h5p-multi-media-choice-wrong"),
                    this.addAccessibilitySolutionText(t)));
          }),
          (i.showUnselectedSolution = function (t) {
            var e = t.shouldCheck,
              t = t.shouldNotCheck;
            this.isSelected() ||
              (this.correct
                ? (this.wrapper.classList.add(
                    "h5p-multi-media-choice-show-correct"
                  ),
                  this.addAccessibilitySolutionText(e))
                : this.addAccessibilitySolutionText(t));
          }),
          (i.addAccessibilitySolutionText = function (t) {
            (this.accessibilitySolutionText = document.createElement("span")),
              this.accessibilitySolutionText.classList.add(
                "hidden-accessibility-solution-text"
              ),
              (this.accessibilitySolutionText.innerText = "".concat(t, ".")),
              this.wrapper.appendChild(this.accessibilitySolutionText);
          }),
          (i.hideSolution = function () {
            this.wrapper.classList.remove("h5p-multi-media-choice-correct"),
              this.wrapper.classList.remove(
                "h5p-multi-media-choice-show-correct"
              ),
              this.wrapper.classList.remove("h5p-multi-media-choice-wrong"),
              this.accessibilitySolutionText &&
                this.accessibilitySolutionText.parentNode &&
                this.accessibilitySolutionText.parentNode.removeChild(
                  this.accessibilitySolutionText
                );
          }),
          (i.addKeyboardHandlers = function () {
            var e = this;
            this.content.addEventListener("keydown", function (t) {
              switch (t.key) {
                case "Enter":
                case " ":
                  if (e.isDisabled()) return;
                  t.preventDefault(), e.callbacks.onKeyboardSelect(e);
                  break;
                case "ArrowLeft":
                case "ArrowUp":
                  if (!e.singleAnswer) return;
                  if (
                    (t.preventDefault(),
                    e.getDOM() === e.getDOM().parentNode.firstChild)
                  )
                    return;
                  e.callbacks.onKeyboardArrowKey(t.code.replace("Arrow", ""));
                  break;
                case "ArrowRight":
                case "ArrowDown":
                  if (!e.singleAnswer) return;
                  if (
                    (t.preventDefault(),
                    e.getDOM() === e.getDOM().parentNode.lastChild)
                  )
                    return;
                  e.callbacks.onKeyboardArrowKey(t.code.replace("Arrow", ""));
              }
            });
          }),
          e),
        a = p(904),
        l =
          (((i = t.prototype).buildOptionList = function () {
            var e = document.createElement("ul");
            return (
              e.setAttribute(
                "role",
                this.isSingleAnswer ? "radiogroup" : "group"
              ),
              e.setAttribute(
                "aria-labelledby",
                "h5p-media-choice".concat(this.contentId)
              ),
              e.classList.add("h5p-multi-media-choice-option-list"),
              this.options.forEach(function (t) {
                e.appendChild(t.getDOM());
              }),
              e
            );
          }),
          (i.getDOM = function () {
            return this.content;
          }),
          (i.singleAnswer = function () {
            return this.isSingleAnswer;
          }),
          (i.getOptions = function () {
            return this.options;
          }),
          (i.getMaxScore = function () {
            return this.params.behaviour.singlePoint ||
              this.isSingleAnswer ||
              this.isBlankCorrect()
              ? 1
              : this.numberOfCorrectOptions;
          }),
          (i.getScore = function () {
            if (
              this.params.behaviour.singlePoint &&
              0 === this.params.behaviour.passPercentage
            )
              return 1;
            if (!this.isAnyAnswerSelected())
              return this.isBlankCorrect() ? 1 : 0;
            if (this.isSingleAnswer)
              return this.lastSelectedRadioButtonOption.isCorrect() ? 1 : 0;
            var e = 0;
            return (
              this.options.forEach(function (t) {
                t.isSelected() && (t.isCorrect() ? e++ : e--);
              }),
              (e = Math.max(0, e)),
              this.params.behaviour.singlePoint
                ? (100 * e) / this.numberOfCorrectOptions >=
                  this.params.behaviour.passPercentage
                  ? 1
                  : 0
                : e
            );
          }),
          (i.getSelectedOptions = function () {
            return this.options.filter(function (t) {
              return t.isSelected();
            });
          }),
          (i.isAnyAnswerSelected = function () {
            return 0 < this.getSelectedOptions().length;
          }),
          (i.isBlankCorrect = function () {
            return 0 === this.numberOfCorrectOptions;
          }),
          (i.isPassed = function () {
            return (
              (100 * this.getScore()) / this.getMaxScore() >=
              this.params.behaviour.passPercentage
            );
          }),
          (i.showSelectedSolutions = function () {
            var e = this;
            this.options.forEach(function (t) {
              return t.showSelectedSolution({
                correctAnswer: e.params.l10n.correctAnswer,
                wrongAnswer: e.params.l10n.wrongAnswer,
              });
            });
          }),
          (i.showUnselectedSolutions = function () {
            var e = this;
            this.options.forEach(function (t) {
              return t.showUnselectedSolution({
                shouldCheck: e.params.l10n.shouldCheck,
                shouldNotCheck: e.params.l10n.shouldNotCheck,
              });
            });
          }),
          (i.focusUnselectedSolution = function () {
            var t = document.getElementsByClassName(
              "h5p-multi-media-choice-show-correct"
            )[0];
            t && t.parentNode && t.parentNode.focus();
          }),
          (i.hideSolutions = function () {
            this.options.forEach(function (t) {
              return t.hideSolution();
            });
          }),
          (i.toggleSelected = function (t) {
            var e =
                !(1 < arguments.length && void 0 !== arguments[1]) ||
                arguments[1],
              t = this.options[t];
            if (!t.isDisabled()) {
              if (this.isSingleAnswer) {
                if (t.isSelected()) return;
                this.lastSelectedRadioButtonOption &&
                  (this.lastSelectedRadioButtonOption.uncheck(),
                  this.lastSelectedRadioButtonOption.setTabIndex(-1)),
                  (this.lastSelectedRadioButtonOption = t),
                  this.lastSelectedRadioButtonOption.setTabIndex(0);
              }
              t.toggle(), e && this.callbacks.triggerInteracted();
            }
          }),
          (i.resetSelections = function () {
            (this.lastSelectedRadioButtonOption = null),
              this.setTabIndexes(),
              this.options.forEach(function (t) {
                t.uncheck(), t.enable();
              });
          }),
          (i.disableSelectables = function () {
            this.options.forEach(function (t) {
              return t.disable();
            }),
              this.setTabIndexes(-1);
          }),
          (i.setTabIndexes = function () {
            var e =
              0 < arguments.length && void 0 !== arguments[0]
                ? arguments[0]
                : null;
            this.isSingleAnswer
              ? (this.options.forEach(function (t) {
                  return t.setTabIndex(null !== e ? e : -1);
                }),
                this.options[0].setTabIndex(null !== e ? e : 0))
              : this.options.forEach(function (t) {
                  return t.setTabIndex(null !== e ? e : 0);
                });
          }),
          (i.handleOptionArrowKey = function (t, e) {
            ["Left", "Right", "Up", "Down"].includes(e) &&
              (this.toggleSelected(
                (e = t + { Right: 1, Down: 1, Left: -1, Up: -1 }[e])
              ),
              this.options[e].focus(),
              this.options[e].setTabIndex(0),
              this.options[t].setTabIndex(-1));
          }),
          (i.resizeGridItem = function (t, e) {
            t.style.width = e + "px";
          }),
          (i.setColumnProperties = function () {
            for (
              var t = this.optionList.getBoundingClientRect().width / 230,
                t = Math.floor(
                  Math.min(t, this.maxAlternativesPerRow, this.options.length)
                ),
                e = this.optionList.getBoundingClientRect().width / t - 20,
                i = 0;
              i < this.options.length;
              i++
            )
              this.resizeGridItem(this.options[i].getDOM(), e);
            this.masonry.layout();
          }),
          (i.getSelectedIndexes = function () {
            for (var t = [], e = 0; e < this.options.length; e++)
              this.options[e].isSelected() && t.push(e);
            return t;
          }),
          (i.setMultiMediaOptionsPlaceholder = function (i) {
            var n,
              s = this;
            this.options.forEach(function (t) {
              var e;
              t.media.params.file ||
                ((e = "auto" === s.aspectRatio ? "1to1" : s.aspectRatio),
                (n = "".concat(i, "/placeholder").concat(e, ".svg")),
                (t.wrapper.querySelector("img").src = n));
            });
          }),
          (i.getAnswerGiven = function () {
            return this.isAnyAnswerSelected() || this.isBlankCorrect();
          }),
          t);
      function t() {
        var i = this,
          t =
            0 < arguments.length && void 0 !== arguments[0] ? arguments[0] : {},
          n = 1 < arguments.length ? arguments[1] : void 0,
          e =
            2 < arguments.length && void 0 !== arguments[2] ? arguments[2] : {},
          s = 3 < arguments.length ? arguments[3] : void 0;
        (this.params = t),
          (this.contentId = n),
          (this.callbacks = e),
          (this.callbacks.triggerResize =
            this.callbacks.triggerResize || function () {}),
          (this.callbacks.triggerInteracted =
            this.callbacks.triggerInteracted || function () {}),
          (this.maxAlternativesPerRow =
            this.params.behaviour.maxAlternativesPerRow),
          (this.numberOfCorrectOptions = t.options
            ? t.options.filter(function (t) {
                return t.correct;
              }).length
            : 0),
          (this.isSingleAnswer =
            "auto" === this.params.behaviour.questionType
              ? 1 === this.numberOfCorrectOptions
              : "single" === this.params.behaviour.questionType),
          (this.aspectRatio = this.params.behaviour.aspectRatio),
          (this.lastSelectedRadioButtonOption = null),
          (this.content = document.createElement("div")),
          this.content.classList.add("h5p-multi-media-choice-content"),
          (!this.params.options || this.params.options.length < 2) &&
            ((t = {
              media: {
                params: { contentName: "Image" },
                library: "H5P.Image",
                subContentId: t.contentId,
                metadata: {
                  contentType: "Image",
                  license: "U",
                  title: "Untitled Image",
                },
              },
              correct: !1,
            }),
            this.params.options && 1 === this.params.options.length
              ? this.params.options.push(t)
              : (this.params.options = [{}, {}].fill(t))),
          (this.options = this.params.options
            ? this.params.options.map(function (t, e) {
                return new r(
                  t,
                  n,
                  i.aspectRatio,
                  i.isSingleAnswer,
                  i.params.l10n.missingAltText,
                  {
                    onClick: function () {
                      return i.toggleSelected(e);
                    },
                    onKeyboardSelect: function () {
                      return i.toggleSelected(e);
                    },
                    onKeyboardArrowKey: function (t) {
                      return i.handleOptionArrowKey(e, t);
                    },
                    triggerResize: i.callbacks.triggerResize,
                  }
                );
              })
            : []),
          (this.optionList = this.buildOptionList(this.options)),
          this.content.appendChild(this.optionList),
          this.setTabIndexes(),
          (this.masonry = new a(this.optionList, {
            gutter: 20,
            itemSelector: ".h5p-multi-media-choice-list-item",
          })),
          s.forEach(function (t) {
            return i.toggleSelected(t, !1);
          });
      }
      function e(t, e, i, n, s, o) {
        (this.contentId = e),
          (this.aspectRatio = i),
          (this.singleAnswer = n),
          (this.missingAltText = s),
          (this.media = t.media),
          (this.correct = t.correct),
          (this.callbacks = o || {}),
          (this.callbacks.onClick = this.callbacks.onClick || function () {}),
          (this.callbacks.onKeyboardSelect =
            this.callbacks.onKeyboardSelect || function () {}),
          (this.callbacks.onKeyboardArrowKey =
            this.callbacks.onKeyboardArrowKey || function () {}),
          (this.callbacks.triggerResize =
            this.callbacks.triggerResize || function () {}),
          (this.content = document.createElement("li")),
          this.content.classList.add("h5p-multi-media-choice-list-item"),
          (this.wrapper = document.createElement("div")),
          this.wrapper.classList.add("h5p-multi-media-choice-option"),
          this.content.appendChild(this.wrapper),
          n
            ? this.content.setAttribute("role", "radio")
            : this.content.setAttribute("role", "checkbox"),
          this.content.setAttribute("aria-checked", "false"),
          this.enable(),
          this.content.addEventListener("click", this.callbacks.onClick);
        n = this.createMediaContent();
        this.wrapper.appendChild(n), this.addKeyboardHandlers();
      }
      function h() {}
      function u(t, e, i, n, s, o) {
        var r,
          a,
          l = t.createXAPIEventTemplate("answered");
        return (
          (r = i),
          (a = e),
          ((e = l.getVerifiedStatementValue([
            "object",
            "definition",
          ])).description = { "en-US": c(a) }),
          (e.type = "http://adlnet.gov/expapi/activities/cmi.interaction"),
          (e.interactionType = "choice"),
          (e.choices = r.map(function (t, e) {
            return {
              id: e.toString(),
              description: { "en-US": c(t.getDescription()) },
            };
          })),
          (e.correctResponsesPattern = [
            r
              .flatMap(function (t, e) {
                return t.isCorrect() ? e : [];
              })
              .toString()
              .replaceAll(",", "[,]"),
          ]),
          l.setScoredResult(n, s, t, !0, o),
          (l.data.statement.result.response = i
            .flatMap(function (t, e) {
              return t.isSelected() ? e : [];
            })
            .toString()
            .replaceAll(",", "[,]")),
          l
        );
      }
      function d(t) {
        if (void 0 === t)
          throw new ReferenceError(
            "this hasn't been initialised - super() hasn't been called"
          );
        return t;
      }
      function n(t, e) {
        return (n = Object.setPrototypeOf
          ? Object.setPrototypeOf.bind()
          : function (t, e) {
              return (t.__proto__ = e), t;
            })(t, e);
      }
      var i = (function (s) {
        var t;
        function e(e, i) {
          var t =
              2 < arguments.length && void 0 !== arguments[2]
                ? arguments[2]
                : {},
            n = s.call(this, "multi-media-choice") || this;
          return (
            H5P.EventDispatcher.call(d(n)),
            (n.contentId = i),
            (n.extras = t),
            (n.answerState =
              t.previousState && t.previousState.answers
                ? t.previousState.answers
                : []),
            (n.params = o.extendParams(e)),
            (n.content = new l(
              n.params,
              i,
              {
                triggerResize: function () {
                  n.trigger("resize");
                },
                triggerInteracted: function () {
                  n.triggerXAPI("interacted");
                },
              },
              n.answerState
            )),
            (n.registerDomElements = function () {
              var t;
              n.params.media &&
                n.params.media.type &&
                n.params.media.type.library &&
                ((t = n.params.media.type).library.includes("H5P.Image")
                  ? t.params.file &&
                    n.setImage(t.params.file.path, {
                      disableImageZooming: e.media.disableImageZooming || !1,
                      alt: t.params.alt,
                      title: t.params.title,
                      expandImage: t.params.expandImage,
                      minimizeImage: t.params.minimizeImage,
                    })
                  : t.library.includes("H5P.Video")
                  ? t.params.sources && n.setVideo(t)
                  : t.library.includes("H5P.Audio") &&
                    t.params.files &&
                    n.setAudio(t)),
                n.params.question &&
                  ((n.introduction = document.createElement("div")),
                  (n.introduction.innerHTML = n.params.question),
                  n.introduction.setAttribute(
                    "id",
                    "h5p-media-choice".concat(i)
                  ),
                  (document.createElement("img").src = n.getLibraryFilePath(
                    "assets/placeholder1to1.svg"
                  )),
                  n.setIntroduction(n.introduction)),
                n.content.setMultiMediaOptionsPlaceholder(
                  n.getLibraryFilePath("assets")
                ),
                n.setContent(n.content.getDOM()),
                n.addButtons(),
                n.on("resize", function () {
                  return n.content.setColumnProperties();
                });
            }),
            (n.getScore = function () {
              return n.content.getScore();
            }),
            (n.getMaxScore = function () {
              return n.content.getMaxScore();
            }),
            (n.handleRead = function (t) {
              n.read(t);
            }),
            (n.checkAnswer = function () {
              n.content.disableSelectables();
              var t = n.getScore(),
                e = n.getMaxScore(),
                i = H5P.Question.determineOverallFeedback(
                  n.params.overallFeedback,
                  t / e
                );
              n.setFeedback(i, t, e, n.params.l10n.result),
                n.params.behaviour.enableSolutionsButton &&
                  t !== e &&
                  n.showButton("show-solution"),
                n.params.behaviour.enableRetry &&
                  t !== e &&
                  n.showButton("try-again"),
                n.hideButton("check-answer"),
                n.content.showSelectedSolutions(),
                n.trigger(
                  u(
                    d(n),
                    n.params.question,
                    n.content.getOptions(),
                    n.getScore(),
                    n.getMaxScore(),
                    n.content.isPassed()
                  )
                );
            }),
            (n.showSolutions = function () {
              var t =
                0 < arguments.length && void 0 !== arguments[0] && arguments[0];
              n.hideButton("check-answer"),
                n.hideButton("show-solution"),
                n.params.behaviour.showSolutionsRequiresInput &&
                !n.content.isAnyAnswerSelected() &&
                t
                  ? (n.updateFeedbackContent(n.params.l10n.noAnswer),
                    n.handleRead(n.params.l10n.noAnswer))
                  : (n.content.showSelectedSolutions(),
                    n.content.showUnselectedSolutions(),
                    n.content.focusUnselectedSolution()),
                n.trigger("resize");
            }),
            (n.resetTask = function () {
              n.content.resetSelections(),
                n.showButton("check-answer"),
                n.hideButton("try-again"),
                n.hideButton("show-solution"),
                n.content.hideSolutions(),
                n.removeFeedback();
            }),
            (n.getAnswerGiven = function () {
              return n.content.getAnswerGiven();
            }),
            n
          );
        }
        (i = s),
          ((t = e).prototype = Object.create(i.prototype)),
          n((t.prototype.constructor = t), i);
        var i = e.prototype;
        return (
          (i.addButtons = function () {
            var t = this;
            (null != this.params.behaviour.enableCheckButton &&
              !this.params.behaviour.enableCheckButton) ||
              this.addButton(
                "check-answer",
                this.params.l10n.checkAnswerButtonText,
                function () {
                  t.checkAnswer();
                },
                !0,
                { "aria-label": this.params.l10n.checkAnswer },
                {
                  confirmationDialog: {
                    enable: this.params.behaviour.confirmCheckDialog,
                    l10n: this.params.l10n.confirmCheck,
                    instance: this,
                  },
                  contentData: this.extras,
                  textIfSubmitting: this.params.l10n.submitAnswerButtonText,
                }
              ),
              this.addButton(
                "show-solution",
                this.params.l10n.showSolutionButtonText,
                function () {
                  t.showSolutions(!0);
                },
                !1,
                { "aria-label": this.params.l10n.showSolution },
                {}
              ),
              this.addButton(
                "try-again",
                this.params.l10n.retryText,
                function () {
                  t.resetTask();
                },
                !1,
                { "aria-label": this.params.l10n.retry },
                {
                  confirmationDialog: {
                    enable: this.params.behaviour.confirmRetryDialog,
                    l10n: this.params.l10n.confirmRetry,
                    instance: this,
                  },
                }
              );
          }),
          (i.getCurrentState = function () {
            return { answers: this.content.getSelectedIndexes() };
          }),
          (i.getXAPIData = function () {
            return (
              (t = this.params.question),
              (e = this.content.getOptions()),
              (i = this.getScore()),
              (n = this.getMaxScore()),
              (s = this.content.isPassed()),
              { statement: u(this, t, e, i, n, s).data.statement }
            );
            var t, e, i, n, s;
          }),
          (i.getTitle = function () {
            return H5P.createTitle(
              this.extras && this.extras.metadata && this.extras.metadata.title
                ? this.extras.metadata.title
                : "Image Choice"
            );
          }),
          e
        );
      })(H5P.Question);
      (H5P = H5P || {}).MultiMediaChoice = i;
    })();
  })(),
  /*!@license H5P.CoursePresentation-1.25/dist/h5p-course-presentation.js by Joubel licensed under MIT*/ (() => {
    var i = {
        46: (t) => {
          t.exports = function (t, e) {
            (this.index = t), (this.parent = e);
          };
        },
        575: (t, e, i) => {
          const r = i(46),
            a = H5P.EventDispatcher;
          function n(n, e) {
            const s = this;
            a.call(s), (s.children = []);
            function o(e) {
              for (let t = e; t < s.children.length; t++)
                s.children[t].index = t;
            }
            if (
              ((s.addChild = function (t, e) {
                void 0 === e && (e = s.children.length);
                var i = new r(e, s);
                return (
                  e === s.children.length
                    ? s.children.push(i)
                    : (s.children.splice(e, 0, i), o(e)),
                  n.call(i, t),
                  i
                );
              }),
              (s.removeChild = function (t) {
                s.children.splice(t, 1), o(t);
              }),
              (s.moveChild = function (t, e) {
                var i = s.children.splice(t, 1)[0];
                s.children.splice(e, 0, i), o(e < t ? e : t);
              }),
              e)
            )
              for (let t = 0; t < e.length; t++) s.addChild(e[t]);
          }
          (n.prototype = Object.create(a.prototype)),
            (t.exports = n.prototype.constructor = n);
        },
      },
      n = {};
    function rt(t) {
      var e = n[t];
      if (void 0 !== e) return e.exports;
      e = n[t] = { exports: {} };
      return i[t](e, e.exports, rt), e.exports;
    }
    (rt.n = (t) => {
      var e = t && t.__esModule ? () => t.default : () => t;
      return rt.d(e, { a: e }), e;
    }),
      (rt.d = (t, e) => {
        for (var i in e)
          rt.o(e, i) &&
            !rt.o(t, i) &&
            Object.defineProperty(t, i, { enumerable: !0, get: e[i] });
      }),
      (rt.o = (t, e) => Object.prototype.hasOwnProperty.call(t, e)),
      (() => {
        "use strict";
        function n(t) {
          return t.concat.apply([], t);
        }
        function l(t) {
          return "function" == typeof t;
        }
        function o(t, e) {
          return -1 !== t.indexOf(e);
        }
        function s(t, e) {
          return void 0 !== t ? t : e;
        }
        function b(t, e, i) {
          t.click(function (t) {
            e.call(i || this, t);
          }),
            t.keydown(function (t) {
              o([13, 32], t.which) &&
                (t.preventDefault(), e.call(i || this, t));
            });
        }
        var c,
          a,
          t = rt(575),
          r = rt.n(t),
          y = H5P.jQuery,
          h = H5P.EventDispatcher,
          u = H5P.JoubelUI,
          i = null !== navigator.userAgent.match(/iPad/i),
          d = null !== navigator.userAgent.match(/iPad|iPod|iPhone/i),
          p = y("<div>");
        const f =
          ((e.prototype.updateSummarySlide = function (t, e) {
            var i,
              n,
              s,
              o,
              r = this,
              a =
                void 0 === this.cp.editor &&
                void 0 !== this.$summarySlide &&
                t >= this.cp.slides.length - 1,
              t = !this.cp.showSummarySlide && this.cp.hasAnswerElements;
            a &&
              (r.cp.presentation.keywordListEnabled &&
                r.cp.presentation.keywordListAlwaysShow &&
                r.cp.hideKeywords(),
              this.$summarySlide.children().remove(),
              (a = r.cp.getSlideScores(e)),
              (e = r.outputScoreStats(a)),
              y(e).appendTo(r.$summarySlide),
              t ||
                ((i = r.totalScores(a)),
                isNaN(i.totalPercentage) ||
                  ((a = u.createScoreBar(i.totalMaxScore, "", "", "")).setScore(
                    i.totalScore
                  ),
                  (n = y(".h5p-summary-total-score", r.$summarySlide)),
                  a.appendTo(n),
                  setTimeout(function () {
                    n.append(
                      y("<div/>", {
                        "aria-live": "polite",
                        class: "hidden-but-read",
                        html:
                          r.cp.l10n.summary +
                          ". " +
                          r.cp.l10n.accessibilityTotalScore
                            .replace("@score", i.totalScore)
                            .replace("@maxScore", i.totalMaxScore),
                      })
                    );
                  }, 100)),
                1 == r.cp.enableTwitterShare &&
                  ((s = y(".h5p-summary-twitter-message", r.$summarySlide)),
                  this.addTwitterScoreLinkTo(s, i)),
                1 == r.cp.enableFacebookShare &&
                  ((s = y(".h5p-summary-facebook-message", r.$summarySlide)),
                  this.addFacebookScoreLinkTo(s, i)),
                1 == r.cp.enableGoogleShare &&
                  ((o = y(".h5p-summary-google-message", r.$summarySlide)),
                  this.addGoogleScoreLinkTo(o)),
                r.$summarySlide
                  .find(".h5p-td > .h5p-slide-link")
                  .each(function () {
                    var e = y(this);
                    e.click(function (t) {
                      r.cp.jumpToSlide(parseInt(e.data("slide"), 10) - 1),
                        t.preventDefault();
                    });
                  })),
              (o = y(".h5p-summary-footer", r.$summarySlide)),
              this.cp.showSummarySlideSolutionButton &&
                u.createButton({
                  class: "h5p-show-solutions",
                  html: r.cp.l10n.showSolutions,
                  on: {
                    click: function () {
                      r.toggleSolutionMode(!0);
                    },
                  },
                  appendTo: o,
                }),
              this.cp.showSummarySlideRetryButton &&
                u.createButton({
                  class: "h5p-cp-retry-button",
                  html: r.cp.l10n.retry,
                  on: {
                    click: function () {
                      r.cp.resetTask();
                    },
                  },
                  appendTo: o,
                }),
              r.cp.hasAnswerElements &&
                u.createButton({
                  class: "h5p-eta-export",
                  html: r.cp.l10n.exportAnswers,
                  on: {
                    click: function () {
                      H5P.ExportableTextArea.Exporter.run(
                        r.cp.slides,
                        r.cp.elementInstances
                      );
                    },
                  },
                  appendTo: o,
                }));
          }),
          (e.prototype.outputScoreStats = function (t) {
            if (void 0 === t)
              return (
                this.$summarySlide.addClass("h5p-summary-only-export"),
                '<div class="h5p-summary-footer"></div>'
              );
            for (
              var e = this, i = 0, n = 0, s = "", o = 0, r = "", a = 0;
              a < t.length;
              a += 1
            )
              (r = this.getSlideDescription(t[a])),
                (o = Math.round((t[a].score / t[a].maxScore) * 100)),
                isNaN(o) && (o = 0),
                (s +=
                  '<tr><td class="h5p-td h5p-summary-task-title"><a href="#" class="h5p-slide-link"  aria-label=" ' +
                  e.cp.l10n.slide +
                  " " +
                  t[a].slide +
                  ": " +
                  r.replace(/(<([^>]+)>)/gi, "") +
                  " " +
                  o +
                  '%" data-slide="' +
                  t[a].slide +
                  '">' +
                  e.cp.l10n.slide +
                  " " +
                  t[a].slide +
                  ": " +
                  r.replace(/(<([^>]+)>)/gi, "") +
                  '</a></td><td class="h5p-td h5p-summary-score-bar"><p class="hidden-but-read">' +
                  o +
                  "%</p><p>" +
                  t[a].score +
                  "<span>/</span>" +
                  t[a].maxScore +
                  "</p></td></tr>"),
                (i += t[a].score),
                (n += t[a].maxScore);
            this.cp.isSolutionMode || e.cp.triggerXAPICompleted(i, n);
            var l =
                e.cp.enableTwitterShare ||
                e.cp.enableFacebookShare ||
                e.cp.enableGoogleShare
                  ? '<span class="h5p-show-results-text">' +
                    e.cp.l10n.shareResult +
                    "</span>"
                  : "",
              c =
                1 == e.cp.enableTwitterShare
                  ? '<span class="h5p-summary-twitter-message" aria-label="' +
                    e.cp.l10n.shareTwitter +
                    '"></span>'
                  : "",
              h =
                1 == e.cp.enableFacebookShare
                  ? '<span class="h5p-summary-facebook-message" aria-label="' +
                    e.cp.l10n.shareFacebook +
                    '"></span>'
                  : "",
              u =
                1 == e.cp.enableGoogleShare
                  ? '<span class="h5p-summary-google-message" aria-label="' +
                    e.cp.l10n.shareGoogle +
                    '"></span>'
                  : "";
            return (
              '<div class="h5p-summary-table-holder"><div class="h5p-summary-table-pages"><table class="h5p-score-table"><thead><tr><th class="h5p-summary-table-header slide">' +
              e.cp.l10n.slide +
              '</th><th class="h5p-summary-table-header score">' +
              e.cp.l10n.score +
              "<span>/</span>" +
              e.cp.l10n.total.toLowerCase() +
              "</th></tr></thead><tbody>" +
              s +
              '</tbody></table></div><div class="h5p-summary-total-table"><div class="h5p-summary-social">' +
              l +
              h +
              c +
              u +
              '</div><div class="h5p-summary-total-score"><p>' +
              e.cp.l10n.totalScore +
              '</p></div></div></div><div class="h5p-summary-footer"></div>'
            );
          }),
          (e.prototype.getSlideDescription = function (t) {
            var e,
              i,
              n,
              s = this.cp.slides[t.slide - 1].elements;
            return (
              1 < t.indexes.length
                ? (e = this.cp.l10n.summaryMultipleTaskText)
                : void 0 !== s[t.indexes[0]] &&
                  s[0] &&
                  ((s = s[t.indexes[0]].action),
                  "function" ==
                  typeof this.cp.elementInstances[t.slide - 1][t.indexes[0]]
                    .getTitle
                    ? (e =
                        this.cp.elementInstances[t.slide - 1][
                          t.indexes[0]
                        ].getTitle())
                    : void 0 !== s.library &&
                      s.library &&
                      ((i = s.library
                        .split(" ")[0]
                        .split(".")[1]
                        .split(/(?=[A-Z])/)),
                      (n = ""),
                      i.forEach(function (t, e) {
                        0 !== e && (t = t.toLowerCase()),
                          (n += t),
                          e <= i.length - 1 && (n += " ");
                      }),
                      (e = n))),
              e
            );
          }),
          (e.prototype.addTwitterScoreLinkTo = function (t, e) {
            var i = this,
              n = i.cp.twitterShareStatement || "",
              s = i.cp.twitterShareHashtags || "",
              o = (o = i.cp.twitterShareUrl || "").replace(
                "@currentpageurl",
                window.location.href
              ),
              n = n
                .replace("@score", e.totalScore)
                .replace("@maxScore", e.totalMaxScore)
                .replace("@percentage", e.totalPercentage + "%")
                .replace("@currentpageurl", window.location.href),
              s = s.trim().replace(" ", "");
            (n = encodeURIComponent(n)),
              (s = encodeURIComponent(s)),
              (o = encodeURIComponent(o));
            var r = "https://twitter.com/intent/tweet?";
            (r += 0 < n.length ? "text=" + n + "&" : ""),
              (r += 0 < o.length ? "url=" + o + "&" : ""),
              (r += 0 < s.length ? "hashtags=" + s : "");
            var a = window.innerWidth / 2,
              l = window.innerHeight / 2;
            t.attr("tabindex", "0").attr("role", "button"),
              b(t, function () {
                return (
                  window.open(
                    r,
                    i.cp.l10n.shareTwitter,
                    "width=800,height=300,left=" + a + ",top=" + l
                  ),
                  !1
                );
              });
          }),
          (e.prototype.addFacebookScoreLinkTo = function (t, e) {
            var i = this,
              n = i.cp.facebookShareUrl || "",
              s = i.cp.facebookShareQuote || "",
              n = n.replace("@currentpageurl", window.location.href),
              s = s
                .replace("@currentpageurl", window.location.href)
                .replace("@percentage", e.totalPercentage + "%")
                .replace("@score", e.totalScore)
                .replace("@maxScore", e.totalMaxScore);
            (n = encodeURIComponent(n)), (s = encodeURIComponent(s));
            var o = "https://www.facebook.com/sharer/sharer.php?";
            (o += 0 < n.length ? "u=" + n + "&" : ""),
              (o += 0 < s.length ? "quote=" + s : "");
            var r = window.innerWidth / 2,
              a = window.innerHeight / 2;
            t.attr("tabindex", "0").attr("role", "button"),
              b(t, function () {
                return (
                  window.open(
                    o,
                    i.cp.l10n.shareFacebook,
                    "width=800,height=300,left=" + r + ",top=" + a
                  ),
                  !1
                );
              });
          }),
          (e.prototype.addGoogleScoreLinkTo = function (t) {
            var e = this,
              i = (i = e.cp.googleShareUrl || "").replace(
                "@currentpageurl",
                window.location.href
              );
            i = encodeURIComponent(i);
            var n = "https://plus.google.com/share?";
            n += 0 < i.length ? "url=" + i : "";
            var s = window.innerWidth / 2,
              o = window.innerHeight / 2;
            t.attr("tabindex", "0").attr("role", "button"),
              b(t, function () {
                return (
                  window.open(
                    n,
                    e.cp.l10n.shareGoogle,
                    "width=401,height=437,left=" + s + ",top=" + o
                  ),
                  !1
                );
              });
          }),
          (e.prototype.totalScores = function (t) {
            if (void 0 === t)
              return { totalScore: 0, totalMaxScore: 0, totalPercentage: 0 };
            for (var e = 0, i = 0, n = 0; n < t.length; n += 1)
              (e += t[n].score), (i += t[n].maxScore);
            var s = Math.round((e / i) * 100);
            return {
              totalScore: e,
              totalMaxScore: i,
              totalPercentage: (s = isNaN(s) ? 0 : s),
            };
          }),
          (e.prototype.toggleSolutionMode = function (t) {
            (this.cp.isSolutionMode = t)
              ? ((t = this.cp.showSolutions()),
                this.cp.setProgressBarFeedback(t),
                this.cp.$footer.addClass("h5p-footer-solution-mode"),
                this.setFooterSolutionModeText(this.cp.l10n.solutionModeText))
              : (this.cp.$footer.removeClass("h5p-footer-solution-mode"),
                this.setFooterSolutionModeText(),
                this.cp.setProgressBarFeedback());
          }),
          (e.prototype.setFooterSolutionModeText = function (t) {
            void 0 !== t && t
              ? this.cp.$exitSolutionModeText.html(t)
              : this.cp.$exitSolutionModeText &&
                this.cp.$exitSolutionModeText.html("");
          }),
          e);
        function e(t, e) {
          (this.$summarySlide = e), (this.cp = t);
        }
        function g() {}
        function m(t) {
          const n = t.length;
          return function e() {
            const i = Array.prototype.slice.call(arguments, 0);
            return i.length >= n
              ? t.apply(null, i)
              : function () {
                  var t = Array.prototype.slice.call(arguments, 0);
                  return e.apply(null, i.concat(t));
                };
          };
        }
        const v =
            ((c = H5P.jQuery),
            (a = 0),
            (g.supported = function () {
              return "function" == typeof window.print;
            }),
            (g.print = function (t, e, i) {
              t.trigger("printing", { finished: !1, allSlides: i });
              var n = c(".h5p-slide.h5p-current"),
                s = n.height(),
                o = n.width() / 670,
                r = c(".h5p-slide");
              r.css({
                height: s / o + "px",
                width: "670px",
                fontSize: Math.floor(100 / o) + "%",
              });
              var a = e.height();
              e.css("height", "auto"),
                r.toggleClass("doprint", !0 === i),
                n.addClass("doprint"),
                setTimeout(function () {
                  window.print(),
                    r.css({ height: "", width: "", fontSize: "" }),
                    e.css("height", a + "px"),
                    t.trigger("printing", { finished: !0 });
                }, 500);
            }),
            (g.showDialog = function (t, e, i) {
              var n = this,
                s = a++,
                o = "h5p-cp-print-dialog-".concat(s, "-title"),
                s = "h5p-cp-print-dialog-".concat(s, "-ingress"),
                r = c(
                  '<div class="h5p-popup-dialog h5p-print-dialog">\n                      <div role="dialog" aria-labelledby="'
                    .concat(o, '" aria-describedby="')
                    .concat(
                      s,
                      '" tabindex="-1" class="h5p-inner">\n                        <h2 id="'
                    )
                    .concat(o, '">')
                    .concat(
                      t.printTitle,
                      '</h2>\n                        <div class="h5p-scroll-content"></div>\n                        <div class="h5p-close" role="button" tabindex="0" title="'
                    )
                    .concat(
                      H5P.t("close"),
                      '">\n                      </div>\n                    </div>'
                    )
                )
                  .insertAfter(e)
                  .click(function () {
                    n.close();
                  })
                  .children(".h5p-inner")
                  .click(function () {
                    return !1;
                  })
                  .end();
              b(r.find(".h5p-close"), function () {
                return n.close();
              });
              e = r.find(".h5p-scroll-content");
              return (
                e.append(
                  c("<div>", {
                    class: "h5p-cp-print-ingress",
                    id: s,
                    html: t.printIngress,
                  })
                ),
                H5P.JoubelUI.createButton({
                  html: t.printAllSlides,
                  class: "h5p-cp-print-all-slides",
                  click: function () {
                    n.close(), i(!0);
                  },
                }).appendTo(e),
                H5P.JoubelUI.createButton({
                  html: t.printCurrentSlide,
                  class: "h5p-cp-print-current-slide",
                  click: function () {
                    n.close(), i(!1);
                  },
                }).appendTo(e),
                (this.open = function () {
                  setTimeout(function () {
                    r.addClass("h5p-open"),
                      H5P.jQuery(n).trigger("dialog-opened", [r]);
                  }, 1);
                }),
                (this.close = function () {
                  r.removeClass("h5p-open"),
                    setTimeout(function () {
                      r.remove();
                    }, 200);
                }),
                this.open(),
                r
              );
            }),
            g),
          w = m(function (t, e) {
            e.forEach(t);
          }),
          _ =
            (m(function (t, e) {
              return e.map(t);
            }),
            m(function (t, e) {
              return e.filter(t);
            })),
          x =
            (m(function (t, e) {
              return e.some(t);
            }),
            m(function (t, e) {
              return -1 != e.indexOf(t);
            })),
          C = m(function (e, t) {
            return _((t) => !x(t, e), t);
          }),
          S = m((t, e) => e.getAttribute(t)),
          P = m((t, e, i) => i.setAttribute(t, e)),
          k = m((t, e) => e.removeAttribute(t)),
          T = m((t, e) => e.hasAttribute(t)),
          D =
            (m((t, e, i) => i.getAttribute(t) === e),
            m((t, e) => {
              var i = S(t, e);
              P(t, ("true" !== i).toString(), e);
            }),
            m((t, e) => t.appendChild(e)),
            m((t, e) => e.querySelector(t)),
            m((t, e) => {
              return (t = e.querySelectorAll(t)), Array.prototype.slice.call(t);
            }),
            m((t, e) => t.removeChild(e)),
            m((t, e) => e.classList.contains(t)),
            m((t, e) => e.classList.add(t))),
          H = m((t, e) => e.classList.remove(t)),
          I = D("hidden"),
          E = H("hidden"),
          A =
            (m((t, e) => (t ? E : I)(e)),
            m((t, e, i) => {
              i.classList[e ? "add" : "remove"](t);
            }),
            k("tabindex")),
          M = (w(A), P("tabindex", "0")),
          O = P("tabindex", "-1"),
          L = T("tabindex");
        class $ {
          constructor(t) {
            Object.assign(this, {
              listeners: {},
              on: function (t, e, i) {
                i = { listener: e, scope: i };
                return (
                  (this.listeners[t] = this.listeners[t] || []),
                  this.listeners[t].push(i),
                  this
                );
              },
              fire: function (t, e) {
                return (this.listeners[t] || []).every(function (t) {
                  return !1 !== t.listener.call(t.scope || this, e);
                });
              },
              propagate: function (t, i) {
                let n = this;
                t.forEach((e) => i.on(e, (t) => n.fire(e, t)));
              },
            }),
              (this.plugins = t || []),
              (this.elements = []),
              (this.negativeTabIndexAllowed = !1),
              this.on("nextElement", this.nextElement, this),
              this.on("previousElement", this.previousElement, this),
              this.on("firstElement", this.firstElement, this),
              this.on("lastElement", this.lastElement, this),
              this.initPlugins();
          }
          addElement(t) {
            this.elements.push(t),
              this.firesEvent("addElement", t),
              1 === this.elements.length && this.setTabbable(t);
          }
          insertElementAt(t, e) {
            this.elements.splice(e, 0, t),
              this.firesEvent("addElement", t),
              1 === this.elements.length && this.setTabbable(t);
          }
          removeElement(t) {
            (this.elements = C([t], this.elements)),
              L(t) &&
                (this.setUntabbable(t),
                this.elements[0] && this.setTabbable(this.elements[0])),
              this.firesEvent("removeElement", t);
          }
          count() {
            return this.elements.length;
          }
          firesEvent(t, e) {
            var i = this.elements.indexOf(e);
            return this.fire(t, {
              element: e,
              index: i,
              elements: this.elements,
              oldElement: this.tabbableElement,
            });
          }
          nextElement({ index: t }) {
            const e = t === this.elements.length - 1,
              i = this.elements[e ? 0 : t + 1];
            this.setTabbable(i), i.focus();
          }
          firstElement() {
            const t = this.elements[0];
            this.setTabbable(t), t.focus();
          }
          lastElement() {
            const t = this.elements[this.elements.length - 1];
            this.setTabbable(t), t.focus();
          }
          setTabbableByIndex(t) {
            t = this.elements[t];
            t && this.setTabbable(t);
          }
          setTabbable(t) {
            w(this.setUntabbable.bind(this), this.elements),
              M(t),
              (this.tabbableElement = t);
          }
          setUntabbable(t) {
            t !== document.activeElement &&
              (this.negativeTabIndexAllowed ? O : A)(t);
          }
          previousElement({ index: t }) {
            const e = 0 === t,
              i = this.elements[e ? this.elements.length - 1 : t - 1];
            this.setTabbable(i), i.focus();
          }
          useNegativeTabIndex() {
            (this.negativeTabIndexAllowed = !0),
              this.elements.forEach((t) => {
                t.hasAttribute("tabindex") || O(t);
              });
          }
          initPlugins() {
            this.plugins.forEach(function (t) {
              void 0 !== t.init && t.init(this);
            }, this);
          }
        }
        class N {
          constructor() {
            this.selectability = !0;
          }
          init(t) {
            (this.boundHandleKeyDown = this.handleKeyDown.bind(this)),
              (this.controls = t),
              this.controls.on("addElement", this.listenForKeyDown, this),
              this.controls.on(
                "removeElement",
                this.removeKeyDownListener,
                this
              );
          }
          listenForKeyDown({ element: t }) {
            t.addEventListener("keydown", this.boundHandleKeyDown);
          }
          removeKeyDownListener({ element: t }) {
            t.removeEventListener("keydown", this.boundHandleKeyDown);
          }
          handleKeyDown(t) {
            switch (t.which) {
              case 27:
                this.close(t.target), t.preventDefault(), t.stopPropagation();
                break;
              case 35:
                this.lastElement(t.target),
                  t.preventDefault(),
                  t.stopPropagation();
                break;
              case 36:
                this.firstElement(t.target),
                  t.preventDefault(),
                  t.stopPropagation();
                break;
              case 13:
              case 32:
                this.select(t.target), t.preventDefault(), t.stopPropagation();
                break;
              case 37:
              case 38:
                this.hasChromevoxModifiers(t) ||
                  (this.previousElement(t.target),
                  t.preventDefault(),
                  t.stopPropagation());
                break;
              case 39:
              case 40:
                this.hasChromevoxModifiers(t) ||
                  (this.nextElement(t.target),
                  t.preventDefault(),
                  t.stopPropagation());
            }
          }
          hasChromevoxModifiers(t) {
            return t.shiftKey || t.ctrlKey;
          }
          previousElement(t) {
            !1 !== this.controls.firesEvent("beforePreviousElement", t) &&
              (this.controls.firesEvent("previousElement", t),
              this.controls.firesEvent("afterPreviousElement", t));
          }
          nextElement(t) {
            !1 !== this.controls.firesEvent("beforeNextElement", t) &&
              (this.controls.firesEvent("nextElement", t),
              this.controls.firesEvent("afterNextElement", t));
          }
          select(t) {
            this.selectability &&
              !1 !== this.controls.firesEvent("before-select", t) &&
              (this.controls.firesEvent("select", t),
              this.controls.firesEvent("after-select", t));
          }
          firstElement(t) {
            !1 !== this.controls.firesEvent("beforeFirstElement", t) &&
              (this.controls.firesEvent("firstElement", t),
              this.controls.firesEvent("afterFirstElement", t));
          }
          lastElement(t) {
            !1 !== this.controls.firesEvent("beforeLastElement", t) &&
              (this.controls.firesEvent("lastElement", t),
              this.controls.firesEvent("afterLastElement", t));
          }
          disableSelectability() {
            this.selectability = !1;
          }
          enableSelectability() {
            this.selectability = !0;
          }
          close(t) {
            !1 !== this.controls.firesEvent("before-close", t) &&
              (this.controls.firesEvent("close", t),
              this.controls.firesEvent("after-close", t));
          }
        }
        function z(t, e, i) {
          return (
            e in t
              ? Object.defineProperty(t, e, {
                  value: i,
                  enumerable: !0,
                  configurable: !0,
                  writable: !0,
                })
              : (t[e] = i),
            t
          );
        }
        var B,
          F = "not-answered",
          R = "answered",
          j = "has-only-correct",
          W = "has-incorrect";
        function q(t) {
          (this.cp = t),
            (this.answeredLabels =
              (z((t = {}), F, this.cp.l10n.containsNotCompleted + "."),
              z(t, R, this.cp.l10n.containsCompleted + "."),
              z(t, j, this.cp.l10n.containsOnlyCorrect + "."),
              z(t, W, this.cp.l10n.containsIncorrectAnswers + "."),
              z(t, "none", ""),
              t)),
            this.initProgressbar(this.cp.slidesWithSolutions),
            this.initFooter(),
            this.initTaskAnsweredListener(),
            this.toggleNextAndPreviousButtonDisabled(
              this.cp.getCurrentSlideIndex()
            );
        }
        const U =
          ((B = H5P.jQuery),
          (q.prototype.initTaskAnsweredListener = function () {
            var s = this;
            this.cp.elementInstances.forEach(function (t, n) {
              t.filter(function (t) {
                return l(t.on);
              }).forEach(function (t) {
                t.on("xAPI", function (t) {
                  var e,
                    i = t.getVerb();
                  o(["interacted", "answered", "attempted"], i)
                    ? ((e = s.cp.slideHasAnsweredTask(n)),
                      s.setTaskAnswered(n, e))
                    : "completed" === i && t.setVerb("answered"),
                    void 0 === t.data.statement.context.extensions &&
                      (t.data.statement.context.extensions = {}),
                    (t.data.statement.context.extensions[
                      "http://id.tincanapi.com/extension/ending-point"
                    ] = n + 1);
                });
              });
            });
          }),
          (q.prototype.initProgressbar = function (t) {
            var e = this,
              i = (e.cp.previousState && e.cp.previousState.progress) || 0;
            (this.progresbarKeyboardControls = new $([new N()])),
              (this.progresbarKeyboardControls.negativeTabIndexAllowed = !0),
              this.progresbarKeyboardControls.on("select", function (t) {
                e.displaySlide(B(t.element).data("slideNumber"));
              }),
              this.progresbarKeyboardControls.on(
                "beforeNextElement",
                function (t) {
                  return t.index !== t.elements.length - 1;
                }
              ),
              this.progresbarKeyboardControls.on(
                "beforePreviousElement",
                function (t) {
                  return 0 !== t.index;
                }
              ),
              void 0 !== this.cp.progressbarParts &&
                this.cp.progressbarParts &&
                this.cp.progressbarParts.forEach(function (t) {
                  e.progresbarKeyboardControls.removeElement(
                    t.children("a").get(0)
                  ),
                    t.remove();
                }),
              (e.cp.progressbarParts = []);
            for (
              var n = function (t) {
                  t.preventDefault();
                  t = B(this).data("slideNumber");
                  e.progresbarKeyboardControls.setTabbableByIndex(t),
                    e.displaySlide(t),
                    e.cp.focus();
                },
                s = 0;
              s < this.cp.slides.length;
              s += 1
            ) {
              var o = this.cp.slides[s],
                r = this.createSlideTitle(s),
                a = B("<div>", {
                  class: "h5p-progressbar-part",
                  id: "progressbar-part-" + s,
                  role: "tab",
                  "aria-label": r,
                  "aria-controls": "slide-" + s,
                  "aria-selected": !1,
                }).appendTo(e.cp.$progressbar),
                r = B("<a>", {
                  href: "#",
                  html:
                    '<span class="h5p-progressbar-part-title hidden-but-read">' +
                    r +
                    "</span>",
                  tabindex: "-1",
                })
                  .data("slideNumber", s)
                  .click(n)
                  .appendTo(a);
              this.progresbarKeyboardControls.addElement(r.get(0)),
                this.isSummarySlide(s) &&
                  a.addClass("progressbar-part-summary-slide"),
                d || H5P.Tooltip(a.get(0), { position: "top" }),
                0 === s && a.addClass("h5p-progressbar-part-show"),
                s === i &&
                  a
                    .addClass("h5p-progressbar-part-selected")
                    .attr("aria-selected", !0),
                e.cp.progressbarParts.push(a),
                this.updateSlideTitle(s),
                this.cp.slides.length <= 60 &&
                  o.elements &&
                  0 < o.elements.length &&
                  ((a = t[s] && 0 < t[s].length),
                  (o = !!(
                    e.cp.previousState &&
                    e.cp.previousState.answered &&
                    e.cp.previousState.answered[s]
                  )),
                  a &&
                    (B("<div>", {
                      class: "h5p-progressbar-part-has-task",
                    }).appendTo(r),
                    this.setTaskAnswered(s, o)));
            }
          }),
          (q.prototype.displaySlide = function (e) {
            var i = this;
            this.cp.jumpToSlide(e, !1, function () {
              var t = i.cp.getCurrentSlideIndex();
              i.updateSlideTitle(e, { isCurrent: !0 }),
                i.updateSlideTitle(t, { isCurrent: !1 }),
                i.toggleNextAndPreviousButtonDisabled(e);
            });
          }),
          (q.prototype.createSlideTitle = function (t) {
            var e = this.cp.slides[t];
            return e.keywords && 0 < e.keywords.length
              ? e.keywords[0].main
              : this.isSummarySlide(t)
              ? this.cp.l10n.summary
              : this.cp.l10n.slide + " " + (t + 1);
          }),
          (q.prototype.isSummarySlide = function (t) {
            return !(
              void 0 !== this.cp.editor ||
              t !== this.cp.slides.length - 1 ||
              !this.cp.showSummarySlide
            );
          }),
          (q.prototype.initFooter = function () {
            var t = this,
              e = this,
              i = this.cp.$footer,
              n = B("<div/>", { class: "h5p-footer-left-adjusted" }).appendTo(
                i
              ),
              s = B("<div/>", { class: "h5p-footer-center-adjusted" }).appendTo(
                i
              ),
              i = B("<div/>", {
                role: "toolbar",
                class: "h5p-footer-right-adjusted",
              }).appendTo(i);
            (this.cp.$keywordsButton = B("<div/>", {
              class: "h5p-footer-button h5p-footer-toggle-keywords",
              "aria-expanded": "false",
              "aria-label": this.cp.l10n.showKeywords,
              role: "button",
              tabindex: "0",
              html: '<span class="h5p-icon-menu"></span><span class="current-slide-title"></span>',
            }).appendTo(n)),
              H5P.Tooltip(this.cp.$keywordsButton.get(0)),
              b(this.cp.$keywordsButton, function (t) {
                e.cp.presentation.keywordListAlwaysShow ||
                  (e.cp.toggleKeywords(), t.stopPropagation());
              }),
              (!this.cp.presentation.keywordListAlwaysShow &&
                this.cp.initKeywords) ||
                this.cp.$keywordsButton.hide(),
              this.cp.presentation.keywordListEnabled ||
                this.cp.$keywordsWrapper.add(this.$keywordsButton).hide(),
              this.updateFooterKeyword(0),
              (this.cp.$prevSlideButton = B("<div/>", {
                class: "h5p-footer-button h5p-footer-previous-slide",
                "aria-label": this.cp.l10n.prevSlide,
                role: "button",
                tabindex: "-1",
                "aria-disabled": "true",
              }).appendTo(s)),
              new H5P.Tooltip(this.cp.$prevSlideButton.get(0), {
                position: "left",
              }),
              b(this.cp.$prevSlideButton, function () {
                return t.cp.previousSlide(void 0, !1);
              });
            n = B("<div/>", { class: "h5p-footer-slide-count" }).appendTo(s);
            (this.cp.$footerCurrentSlide = B("<div/>", {
              html: "1",
              class: "h5p-footer-slide-count-current",
              title: this.cp.l10n.currentSlide,
              "aria-hidden": "true",
            }).appendTo(n)),
              (this.cp.$footerCounter = B("<div/>", {
                class: "hidden-but-read",
                html: this.cp.l10n.slideCount
                  .replace("@index", "1")
                  .replace("@total", this.cp.slides.length.toString()),
              }).appendTo(s)),
              B("<div/>", {
                html: "/",
                class: "h5p-footer-slide-count-delimiter",
                "aria-hidden": "true",
              }).appendTo(n),
              (this.cp.$footerMaxSlide = B("<div/>", {
                html: this.cp.slides.length,
                class: "h5p-footer-slide-count-max",
                title: this.cp.l10n.lastSlide,
                "aria-hidden": "true",
              }).appendTo(n)),
              (this.cp.$nextSlideButton = B("<div/>", {
                class: "h5p-footer-button h5p-footer-next-slide",
                "aria-label": this.cp.l10n.nextSlide,
                role: "button",
                tabindex: "0",
              }).appendTo(s)),
              H5P.Tooltip(this.cp.$nextSlideButton.get(0), {
                position: "right",
              }),
              b(this.cp.$nextSlideButton, function () {
                return t.cp.nextSlide(void 0, !1);
              }),
              void 0 === this.cp.editor &&
                ((this.cp.$exitSolutionModeButton = B("<div/>", {
                  role: "button",
                  class: "h5p-footer-exit-solution-mode",
                  "aria-label": this.cp.l10n.solutionModeTitle,
                  tabindex: "0",
                }).appendTo(i)),
                H5P.Tooltip(this.cp.$exitSolutionModeButton.get(0)),
                b(this.cp.$exitSolutionModeButton, function () {
                  return e.cp.jumpToSlide(e.cp.slides.length - 1);
                }),
                this.cp.enablePrintButton &&
                  v.supported() &&
                  ((this.cp.$printButton = B("<div/>", {
                    class: "h5p-footer-button h5p-footer-print",
                    "aria-label": this.cp.l10n.printTitle,
                    role: "button",
                    tabindex: "0",
                  }).appendTo(i)),
                  H5P.Tooltip(this.cp.$printButton.get(0)),
                  b(this.cp.$printButton, function () {
                    return e.openPrintDialog();
                  })),
                H5P.fullscreenSupported &&
                  ((this.cp.$fullScreenButton = B("<div/>", {
                    class: "h5p-footer-button h5p-footer-toggle-full-screen",
                    "aria-label": this.cp.l10n.fullscreen,
                    role: "button",
                    tabindex: "0",
                  })),
                  H5P.Tooltip(this.cp.$fullScreenButton.get(0), {
                    position: "left",
                  }),
                  b(this.cp.$fullScreenButton, function () {
                    return e.cp.toggleFullScreen();
                  }),
                  this.cp.$fullScreenButton.appendTo(i))),
              (this.cp.$exitSolutionModeText = B("<div/>", {
                html: "",
                class: "h5p-footer-exit-solution-mode-text",
              }).appendTo(this.cp.$exitSolutionModeButton));
          }),
          (q.prototype.openPrintDialog = function () {
            var e = this,
              i = B(".h5p-wrapper");
            v.showDialog(this.cp.l10n, i, function (t) {
              v.print(e.cp, i, t);
            })
              .children('[role="dialog"]')
              .focus();
          }),
          (q.prototype.updateProgressBar = function (t, e, i) {
            for (var n = this, s = 0; s < n.cp.progressbarParts.length; s += 1)
              s < t + 1
                ? n.cp.progressbarParts[s].addClass("h5p-progressbar-part-show")
                : n.cp.progressbarParts[s].removeClass(
                    "h5p-progressbar-part-show"
                  );
            n.progresbarKeyboardControls.setTabbableByIndex(t),
              n.cp.progressbarParts[t]
                .addClass("h5p-progressbar-part-selected")
                .attr("aria-selected", !0)
                .siblings()
                .removeClass("h5p-progressbar-part-selected")
                .attr("aria-selected", !1),
              void 0 !== e
                ? i || n.cp.editor
                : n.cp.progressbarParts.forEach(function (t, e) {
                    n.setTaskAnswered(e, !1);
                  });
          }),
          (q.prototype.setTaskAnswered = function (t, e) {
            this.cp.progressbarParts[t]
              .find(".h5p-progressbar-part-has-task")
              .toggleClass("h5p-answered", e),
              this.updateSlideTitle(t, { state: e ? R : F });
          }),
          (q.prototype.updateSlideTitle = function (t) {
            var e = (
              1 < arguments.length && void 0 !== arguments[1]
                ? arguments[1]
                : {}
            ).state;
            this.setSlideTitle(t, { state: s(e, this.getAnsweredState(t)) });
          }),
          (q.prototype.setSlideTitle = function (t, e) {
            var i = e.state,
              e = void 0 === i ? "none" : i,
              i = this.cp.progressbarParts[t].find(
                ".h5p-progressbar-part-title"
              ),
              t = this.answeredLabels[e].replace(
                "@slideName",
                this.createSlideTitle(t)
              );
            i.html("".concat(t));
          }),
          (q.prototype.getAnsweredState = function (t) {
            var e = this.cp.progressbarParts[t],
              i = this.slideHasInteraction(t),
              t = this.cp.slideHasAnsweredTask(t);
            return i
              ? 0 < e.find(".h5p-is-correct").length
                ? j
                : 0 < e.find(".h5p-is-wrong").length
                ? W
                : t
                ? R
                : F
              : "none";
          }),
          (q.prototype.slideHasInteraction = function (t) {
            return (
              0 <
              this.cp.progressbarParts[t].find(".h5p-progressbar-part-has-task")
                .length
            );
          }),
          (q.prototype.updateFooter = function (t) {
            this.cp.$footerCurrentSlide.html(t + 1),
              this.cp.$footerMaxSlide.html(this.cp.slides.length),
              this.cp.$footerCounter.html(
                this.cp.l10n.slideCount
                  .replace("@index", (t + 1).toString())
                  .replace("@total", this.cp.slides.length.toString())
              ),
              this.cp.isSolutionMode && t === this.cp.slides.length - 1
                ? this.cp.$footer.addClass("summary-slide")
                : this.cp.$footer.removeClass("summary-slide"),
              this.toggleNextAndPreviousButtonDisabled(t),
              this.updateFooterKeyword(t);
          }),
          (q.prototype.toggleNextAndPreviousButtonDisabled = function (t) {
            var e = this.cp.slides.length - 1;
            this.cp.$prevSlideButton.attr(
              "aria-disabled",
              (0 === t).toString()
            ),
              this.cp.$nextSlideButton.attr(
                "aria-disabled",
                (t === e).toString()
              ),
              this.cp.$prevSlideButton.attr("tabindex", 0 === t ? "-1" : "0"),
              this.cp.$nextSlideButton.attr("tabindex", t === e ? "-1" : "0");
          }),
          (q.prototype.updateFooterKeyword = function (t) {
            var e = this.cp.slides[t],
              i = "";
            e && e.keywords && e.keywords[0] && (i = e.keywords[0].main),
              !this.cp.isEditor() &&
                this.cp.showSummarySlide &&
                t >= this.cp.slides.length - 1 &&
                (i = this.cp.l10n.summary),
              this.cp.$keywordsButton
                .children(".current-slide-title")
                .html(s(i, ""));
          }),
          q);
        function V(s) {
          function i(t, e, i) {
            var n = s.$slidesWrapper
              .children()
              .filter(":not(.h5p-summary-slide)");
            void 0 !== i && (n = n.eq(i)),
              t && "" !== t
                ? n
                    .addClass("has-background")
                    .css("background-image", "")
                    .css("background-color", t)
                : e &&
                  e.path &&
                  n
                    .addClass("has-background")
                    .css("background-color", "")
                    .css(
                      "background-image",
                      "url(" + H5P.getPath(e.path, s.contentId) + ")"
                    );
          }
          var t = s.presentation,
            e = (t = y.extend(
              !0,
              {
                globalBackgroundSelector: {
                  fillGlobalBackground: "",
                  imageGlobalBackground: {},
                },
                slides: [
                  {
                    slideBackgroundSelector: {
                      fillSlideBackground: "",
                      imageSlideBackground: {},
                    },
                  },
                ],
              },
              t
            )).globalBackgroundSelector;
          i(e.fillGlobalBackground, e.imageGlobalBackground),
            t.slides.forEach(function (t, e) {
              t = t.slideBackgroundSelector;
              t && i(t.fillSlideBackground, t.imageSlideBackground, e);
            });
        }
        function Y(t) {
          return parseInt(t.dataset.index);
        }
        var K =
            (((t = G.prototype).init = function (t) {
              var e = this;
              return (
                (this.menuItemElements = t.map(function (t) {
                  return e.createMenuItemElement(t);
                })),
                this.menuItemElements.forEach(function (t) {
                  return e.menuElement.appendChild(t);
                }),
                this.menuItemElements.forEach(function (t) {
                  return e.controls.addElement(t);
                }),
                this.setCurrentSlideIndex(this.state.currentIndex),
                this.menuItemElements
              );
            }),
            (t.on = function (t, e) {
              this.eventDispatcher.on(t, e);
            }),
            (t.getElement = function () {
              return this.menuElement;
            }),
            (t.removeAllMenuItemElements = function () {
              var e = this;
              this.menuItemElements.forEach(function (t) {
                e.controls.removeElement(t), e.menuElement.removeChild(t);
              }),
                (this.menuItemElements = []);
            }),
            (t.createMenuElement = function () {
              var t = (this.menuElement = document.createElement("ol"));
              return (
                t.setAttribute("role", "menu"),
                t.classList.add("list-unstyled"),
                t
              );
            }),
            (t.createMenuItemElement = function (t) {
              var e = this,
                i = document.createElement("li");
              return (
                i.setAttribute("role", "menuitem"),
                i.addEventListener("click", function (t) {
                  e.onMenuItemSelect(Y(t.currentTarget));
                }),
                this.applyConfigToMenuItemElement(i, t),
                i
              );
            }),
            (t.applyConfigToMenuItemElement = function (t, e) {
              (t.innerHTML = '<div class="h5p-keyword-subtitle">'
                .concat(e.subtitle, '</div><span class="h5p-keyword-title">')
                .concat(e.title, "</span>")),
                (t.dataset.index = e.index);
            }),
            (t.onMenuItemSelect = function (t) {
              this.setCurrentSlideIndex(t),
                this.eventDispatcher.trigger("select", { index: t });
            }),
            (t.setCurrentSlideIndex = function (t) {
              var e = this.getElementByIndex(this.menuItemElements, t);
              e &&
                ((this.state.currentIndex = t),
                this.updateCurrentlySelected(this.menuItemElements, this.state),
                this.controls.setTabbable(e));
            }),
            (t.updateCurrentlySelected = function (t, i) {
              var n = this;
              t.forEach(function (t) {
                var e = i.currentIndex === Y(t);
                t.classList.toggle("h5p-current", e),
                  e && t.appendChild(n.currentSlideMarkerElement);
              });
            }),
            (t.scrollToKeywords = function (t) {
              var e = this.getFirstElementAfter(t);
              e &&
                ((e =
                  (t = y(this.menuElement)).scrollTop() +
                  y(e).position().top -
                  8),
                i ? t.scrollTop(e) : t.stop().animate({ scrollTop: e }, 250));
            }),
            (t.getFirstElementAfter = function (e) {
              return this.menuItemElements.filter(function (t) {
                return Y(t) >= e;
              })[0];
            }),
            (t.getElementByIndex = function (t, e) {
              return t.filter(function (t) {
                return Y(t) === e;
              })[0];
            }),
            (t.createCurrentSlideMarkerElement = function () {
              var t = document.createElement("div");
              return (
                t.classList.add("hidden-but-read"),
                (t.innerHTML = this.l10n.currentSlide),
                t
              );
            }),
            G),
          Q =
            (((t = X.prototype).attach = function (t) {
              t.html("").addClass("h5p-go-to-slide").append(this.$element);
            }),
            (t.on = function (t, e) {
              this.eventDispatcher.on(t, e);
            }),
            X);
        function X(t, e) {
          var i = this,
            n = t.title,
            s = t.goToSlide,
            o = void 0 === s ? 1 : s,
            r = t.invisible,
            a = t.goToSlideType,
            s = void 0 === a ? "specified" : a,
            l = e.l10n,
            t = e.currentIndex;
          this.eventDispatcher = new h();
          (a = "h5p-press-to-go"), (e = 0);
          if (r) (n = void 0), (e = -1);
          else {
            if (!n)
              switch (s) {
                case "specified":
                  n = l.goToSlide.replace(":num", o.toString());
                  break;
                case "next":
                  n = l.goToSlide.replace(":num", l.nextSlide);
                  break;
                case "previous":
                  n = l.goToSlide.replace(":num", l.prevSlide);
              }
            a += " h5p-visible";
          }
          var c = o - 1;
          "next" === s ? (c = t + 1) : "previous" === s && (c = t - 1),
            (this.$element = y("<a/>", {
              href: "#",
              class: a,
              tabindex: e,
              title: n,
            })),
            b(this.$element, function (t) {
              i.eventDispatcher.trigger("navigate", c), t.preventDefault();
            });
        }
        function G(t) {
          var e = this,
            i = t.l10n,
            t = t.currentIndex;
          (this.l10n = i),
            (this.state = { currentIndex: s(t, 0) }),
            (this.eventDispatcher = new h()),
            (this.controls = new $([new N()])),
            this.controls.on("select", function (t) {
              e.onMenuItemSelect(Y(t.element));
            }),
            this.controls.on("close", function () {
              return e.eventDispatcher.trigger("close");
            }),
            (this.menuElement = this.createMenuElement()),
            (this.currentSlideMarkerElement =
              this.createCurrentSlideMarkerElement());
        }
        function J(t) {
          var e,
            i,
            n = this;
          void 0 === t.action
            ? ((n.instance = new Q(t, {
                l10n: n.parent.parent.l10n,
                currentIndex: n.parent.index,
              })),
              n.parent.parent.isEditor() ||
                n.instance.on("navigate", function (t) {
                  t = t.data;
                  n.parent.parent.jumpToSlide(t);
                }))
            : ((e = n.parent.parent.isEditor()
                ? H5P.jQuery.extend(
                    !0,
                    {},
                    t.action,
                    n.parent.parent.elementsOverride
                  )
                : H5P.jQuery.extend(
                    !0,
                    t.action,
                    n.parent.parent.elementsOverride
                  )),
              (i = n.parent.parent.elementInstances[n.parent.index]
                ? n.parent.parent.elementInstances[n.parent.index].length
                : 0),
              n.parent.parent.previousState &&
                n.parent.parent.previousState.answers &&
                n.parent.parent.previousState.answers[n.parent.index] &&
                n.parent.parent.previousState.answers[n.parent.index][i] &&
                (e.userDatas = {
                  state:
                    n.parent.parent.previousState.answers[n.parent.index][i],
                }),
              (e.params = e.params || {}),
              (n.instance = H5P.newRunnable(
                e,
                n.parent.parent.contentId,
                void 0,
                !0,
                { parent: n.parent.parent }
              )),
              void 0 !== n.instance.preventResize &&
                (n.instance.preventResize = !0)),
            void 0 === n.parent.parent.elementInstances[n.parent.index]
              ? (n.parent.parent.elementInstances[n.parent.index] = [
                  n.instance,
                ])
              : n.parent.parent.elementInstances[n.parent.index].push(
                  n.instance
                ),
            void 0 !== n.instance.showCPComments ||
            n.instance.isTask ||
            (void 0 === n.instance.isTask &&
              void 0 !== n.instance.showSolutions)
              ? ((n.instance.coursePresentationIndexOnSlide =
                  n.parent.parent.elementInstances[n.parent.index].length - 1),
                void 0 ===
                  n.parent.parent.slidesWithSolutions[n.parent.index] &&
                  (n.parent.parent.slidesWithSolutions[n.parent.index] = []),
                n.parent.parent.slidesWithSolutions[n.parent.index].push(
                  n.instance
                ))
              : t.solution &&
                (void 0 ===
                  n.parent.parent.showCommentsAfterSolution[n.parent.index] &&
                  (n.parent.parent.showCommentsAfterSolution[n.parent.index] =
                    []),
                n.parent.parent.showCommentsAfterSolution[n.parent.index].push(
                  n.instance
                )),
            void 0 !== n.instance.exportAnswers &&
              n.instance.exportAnswers &&
              (n.parent.parent.hasAnswerElements = !0),
            n.parent.parent.isTask ||
              n.parent.parent.hideSummarySlide ||
              ((n.instance.isTask ||
                (void 0 === n.instance.isTask &&
                  void 0 !== n.instance.showSolutions)) &&
                (n.parent.parent.isTask = !0));
        }
        function Z(e, t) {
          var i,
            n = Object.keys(e);
          return (
            Object.getOwnPropertySymbols &&
              ((i = Object.getOwnPropertySymbols(e)),
              t &&
                (i = i.filter(function (t) {
                  return Object.getOwnPropertyDescriptor(e, t).enumerable;
                })),
              n.push.apply(n, i)),
            n
          );
        }
        function tt(n) {
          for (var t = 1; t < arguments.length; t++) {
            var s = null != arguments[t] ? arguments[t] : {};
            t % 2
              ? Z(Object(s), !0).forEach(function (t) {
                  var e, i;
                  (e = n),
                    (t = s[(i = t)]),
                    i in e
                      ? Object.defineProperty(e, i, {
                          value: t,
                          enumerable: !0,
                          configurable: !0,
                          writable: !0,
                        })
                      : (e[i] = t);
                })
              : Object.getOwnPropertyDescriptors
              ? Object.defineProperties(n, Object.getOwnPropertyDescriptors(s))
              : Z(Object(s)).forEach(function (t) {
                  Object.defineProperty(
                    n,
                    t,
                    Object.getOwnPropertyDescriptor(s, t)
                  );
                });
          }
          return n;
        }
        function et(e) {
          var i,
            n = this;
          r().call(n, J, e.elements),
            (n.getElement = function () {
              return (i =
                i ||
                H5P.jQuery(
                  et.createHTML(tt(tt({}, e), {}, { index: n.index }))
                ));
            }),
            (n.setCurrent = function () {
              this.parent.$current = i.addClass("h5p-current");
            }),
            (n.appendElements = function () {
              for (var t = 0; t < n.children.length; t++)
                n.parent.attachElement(
                  e.elements[t],
                  n.children[t].instance,
                  i,
                  n.index
                );
              (n.parent.elementsAttached[n.index] = !0),
                n.parent.trigger(
                  "domChanged",
                  {
                    $target: i,
                    library: "CoursePresentation",
                    key: "newSlide",
                  },
                  { bubbles: !0, external: !0 }
                );
            });
        }
        et.createHTML = function (t) {
          return (
            '<div role="tabpanel" id="slide-' +
            t.index +
            '" aria-labelledby="progressbar-part-' +
            t.index +
            '" class="h5p-slide"> <div role="document" tabindex="0" ' +
            (void 0 !== t.background
              ? ' style="background:' + t.background + '"'
              : "") +
            "></div></div>"
          );
        };
        const it = et;
        function nt(t, e) {
          (null == e || e > t.length) && (e = t.length);
          for (var i = 0, n = new Array(e); i < e; i++) n[i] = t[i];
          return n;
        }
        function st(t) {
          return (st =
            "function" == typeof Symbol && "symbol" == typeof Symbol.iterator
              ? function (t) {
                  return typeof t;
                }
              : function (t) {
                  return t &&
                    "function" == typeof Symbol &&
                    t.constructor === Symbol &&
                    t !== Symbol.prototype
                    ? "symbol"
                    : typeof t;
                })(t);
        }
        function ot(t, e, i) {
          var n = this;
          (this.presentation = t.presentation),
            (this.slides = this.presentation.slides),
            (this.contentId = e),
            (this.elementInstances = []),
            (this.elementsAttached = []),
            (this.slidesWithSolutions = []),
            (this.showCommentsAfterSolution = []),
            (this.hasAnswerElements = !1),
            (this.ignoreResize = !1),
            (this.isTask = !1),
            (this.standalone = !0),
            (this.isReportingEnabled = !1),
            (this.popups = {}),
            i.cpEditor && (this.editor = i.cpEditor),
            i &&
              ((this.previousState = i.previousState),
              (this.standalone = i.standalone),
              (this.isReportingEnabled =
                i.isReportingEnabled || i.isScoringEnabled)),
            (this.currentSlideIndex =
              this.previousState && this.previousState.progress
                ? this.previousState.progress
                : 0),
            (this.presentation.keywordListEnabled =
              void 0 === t.presentation.keywordListEnabled ||
              t.presentation.keywordListEnabled),
            (this.l10n = y.extend(
              {
                slide: "Slide",
                score: "Score",
                yourScore: "Your score",
                maxScore: "Max score",
                total: "Total",
                totalScore: "Total Score",
                showSolutions: "Show solutions",
                summary: "summary",
                retry: "Retry",
                exportAnswers: "Export text",
                close: "Close",
                hideKeywords: "Hide sidebar navigation menu",
                showKeywords: "Show sidebar navigation menu",
                fullscreen: "Fullscreen",
                exitFullscreen: "Exit fullscreen",
                prevSlide: "Previous slide",
                nextSlide: "Next slide",
                currentSlide: "Current slide",
                lastSlide: "Last slide",
                solutionModeTitle: "Exit solution mode",
                solutionModeText: "Solution Mode",
                summaryMultipleTaskText: "Multiple tasks",
                scoreMessage: "You achieved:",
                shareFacebook: "Share on Facebook",
                shareTwitter: "Share on Twitter",
                shareGoogle: "Share on Google+",
                goToSlide: "Go to slide :num",
                solutionsButtonTitle: "Show comments",
                printTitle: "Print",
                printIngress: "How would you like to print this presentation?",
                printAllSlides: "Print all slides",
                printCurrentSlide: "Print current slide",
                noTitle: "No title",
                accessibilitySlideNavigationExplanation:
                  "Use left and right arrow to change slide in that direction whenever canvas is selected.",
                accessibilityProgressBarLabel: "Choose slide to display",
                containsNotCompleted:
                  "@slideName contains not completed interaction",
                containsCompleted: "@slideName contains completed interaction",
                slideCount: "Slide @index of @total",
                accessibilityCanvasLabel:
                  "Presentation canvas. Use left and right arrow to move between slides.",
                containsOnlyCorrect: "@slideName only has correct answers",
                containsIncorrectAnswers: "@slideName has incorrect answers",
                shareResult: "Share Result",
                accessibilityTotalScore:
                  "You got @score of @maxScore points in total",
                accessibilityEnteredFullscreen: "Entered fullscreen",
                accessibilityExitedFullscreen: "Exited fullscreen",
                confirmDialogHeader: "Submit your answers",
                confirmDialogText:
                  "This will submit your results, do you want to continue?",
                confirmDialogConfirmText: "Submit and see results",
                slideshowNavigationLabel: "Slideshow navigation",
              },
              void 0 !== t.l10n ? t.l10n : {}
            )),
            t.override &&
              ((this.activeSurface = !!t.override.activeSurface),
              (this.hideSummarySlide = !!t.override.hideSummarySlide),
              (this.enablePrintButton = !!t.override.enablePrintButton),
              (this.showSummarySlideSolutionButton =
                void 0 === t.override.summarySlideSolutionButton ||
                t.override.summarySlideSolutionButton),
              (this.showSummarySlideRetryButton =
                void 0 === t.override.summarySlideRetryButton ||
                t.override.summarySlideRetryButton),
              t.override.social &&
                ((this.enableTwitterShare =
                  !!t.override.social.showTwitterShare),
                (this.enableFacebookShare =
                  !!t.override.social.showFacebookShare),
                (this.enableGoogleShare = !!t.override.social.showGoogleShare),
                (this.twitterShareStatement =
                  t.override.social.twitterShare.statement),
                (this.twitterShareHashtags =
                  t.override.social.twitterShare.hashtags),
                (this.twitterShareUrl = t.override.social.twitterShare.url),
                (this.facebookShareUrl = t.override.social.facebookShare.url),
                (this.facebookShareQuote =
                  t.override.social.facebookShare.quote),
                (this.googleShareUrl = t.override.social.googleShareUrl))),
            (this.keywordMenu = new K({
              l10n: this.l10n,
              currentIndex:
                void 0 !== this.previousState ? this.previousState.progress : 0,
            })),
            this.setElementsOverride(t.override),
            r().call(this, it, t.presentation.slides),
            this.on("resize", this.resize, this),
            this.on("printing", function (t) {
              (n.ignoreResize = !t.data.finished),
                t.data.finished
                  ? n.resize()
                  : t.data.allSlides && n.attachAllElements();
            });
        }
        (((ot.prototype = Object.create(r().prototype)).constructor =
          ot).prototype.getCurrentState = function () {
          var i = this,
            t = this.previousState || {};
          (t.progress = this.getCurrentSlideIndex()),
            t.answers || (t.answers = []),
            (t.answered = this.elementInstances.map(function (t, e) {
              return i.slideHasAnsweredTask(e);
            }));
          for (var e = 0; e < this.elementInstances.length; e++)
            if (this.elementInstances[e])
              for (var n = 0; n < this.elementInstances[e].length; n++) {
                var s = this.elementInstances[e][n];
                (s.getCurrentState instanceof Function ||
                  "function" == typeof s.getCurrentState) &&
                  (t.answers[e] || (t.answers[e] = []),
                  (t.answers[e][n] = s.getCurrentState()));
              }
          return t;
        }),
          (ot.prototype.slideHasAnsweredTask = function (t) {
            return (this.slidesWithSolutions[t] || [])
              .filter(function (t) {
                return l(t.getAnswerGiven);
              })
              .some(function (t) {
                return t.getAnswerGiven();
              });
          }),
          (ot.prototype.attach = function (t) {
            var e = this,
              o = this;
            void 0 !== this.isRoot &&
              this.isRoot() &&
              this.setActivityStarted();
            var i =
              '<div class="h5p-keymap-explanation hidden-but-read">' +
              this.l10n.accessibilitySlideNavigationExplanation +
              '</div><div class="h5p-fullscreen-announcer hidden-but-read" aria-live="polite"></div><div class="h5p-wrapper" tabindex="0" role="region" aria-roledescription="carousel" aria-label="' +
              this.l10n.accessibilityCanvasLabel +
              '">  <div class="h5p-current-slide-announcer hidden-but-read" aria-live="polite"></div>  <div tabindex="-1"></div>  <div class="h5p-box-wrapper">    <div class="h5p-presentation-wrapper">      <div class="h5p-keywords-wrapper"></div>     <div class="h5p-slides-wrapper"></div>    </div>  </div>  <nav class="h5p-cp-navigation" aria-label="' +
              this.l10n.slideshowNavigationLabel +
              '">    <div class="h5p-progressbar" role="tablist" aria-label="' +
              this.l10n.accessibilityProgressBarLabel +
              '"></div>  </nav>  <div class="h5p-footer"></div></div>';
            t
              .attr("role", "application")
              .addClass("h5p-course-presentation")
              .html(i),
              (this.$container = t),
              (this.$slideAnnouncer = t.find(".h5p-current-slide-announcer")),
              (this.$fullscreenAnnouncer = t.find(".h5p-fullscreen-announcer")),
              (this.$slideTop = this.$slideAnnouncer.next()),
              (this.$wrapper = t.children(".h5p-wrapper")),
              this.activeSurface &&
                this.$wrapper.addClass(
                  "h5p-course-presentation-active-surface"
                ),
              this.$wrapper
                .focus(function () {
                  o.initKeyEvents();
                })
                .blur(function () {
                  void 0 !== o.keydown &&
                    (H5P.jQuery("body").unbind("keydown", o.keydown),
                    delete o.keydown);
                })
                .click(function (t) {
                  var e = H5P.jQuery(t.target),
                    i = o.belongsToTagName(
                      t.target,
                      ["input", "textarea", "a", "button"],
                      t.currentTarget
                    ),
                    n = -1 !== t.target.tabIndex,
                    s = e.closest(".h5p-popup-container"),
                    t = 0 !== s.length;
                  i ||
                    n ||
                    o.editor ||
                    (t
                      ? 1 ===
                        (t = e.closest("[tabindex]")).closest(
                          ".h5p-popup-container"
                        ).length
                        ? t
                        : s.find(".h5p-close-popup")
                      : o.$wrapper
                    ).focus(),
                    o.presentation.keywordListEnabled &&
                      !o.presentation.keywordListAlwaysShow &&
                      o.presentation.keywordListAutoHide &&
                      !e.is("textarea, .h5p-icon-pencil, span") &&
                      o.hideKeywords();
                }),
              this.on("exitFullScreen", function () {
                e.$footer.removeClass("footer-full-screen"),
                  e.$fullScreenButton.attr("aria-label", e.l10n.fullscreen),
                  e.$fullscreenAnnouncer.html(
                    e.l10n.accessibilityExitedFullscreen
                  );
              }),
              this.on("enterFullScreen", function () {
                e.$fullscreenAnnouncer.html(
                  e.l10n.accessibilityEnteredFullscreen
                );
              });
            t = parseInt(this.$wrapper.css("width"));
            this.width = 0 !== t ? t : 640;
            t = parseInt(this.$wrapper.css("height"));
            (this.height = 0 !== t ? t : 400),
              (this.ratio = 16 / 9),
              (this.fontSize = 16),
              (this.$boxWrapper = this.$wrapper.children(".h5p-box-wrapper"));
            var n,
              t = this.$boxWrapper.children(".h5p-presentation-wrapper");
            (this.$slidesWrapper = t.children(".h5p-slides-wrapper")),
              (this.$keywordsWrapper = t.children(".h5p-keywords-wrapper")),
              (this.$progressbar = this.$wrapper.find(".h5p-progressbar")),
              (this.$footer = this.$wrapper.children(".h5p-footer")),
              (this.initKeywords =
                void 0 === this.presentation.keywordListEnabled ||
                !0 === this.presentation.keywordListEnabled ||
                void 0 !== this.editor),
              this.activeSurface &&
                void 0 === this.editor &&
                ((this.initKeywords = !1),
                this.$boxWrapper.css("height", "100%")),
              (this.isSolutionMode = !1),
              this.createSlides(),
              (this.elementsAttached[this.currentSlideIndex] = !0),
              (this.showSummarySlide = !1),
              this.hideSummarySlide
                ? (this.showSummarySlide = !this.hideSummarySlide)
                : this.slidesWithSolutions.forEach(function (t) {
                    o.showSummarySlide = t.length;
                  }),
              void 0 === this.editor &&
                (this.showSummarySlide || this.hasAnswerElements) &&
                (this.slides.push((s = { elements: [], keywords: [] })),
                (n = H5P.jQuery(it.createHTML(s)).appendTo(
                  this.$slidesWrapper
                )).addClass("h5p-summary-slide"),
                this.isCurrentSlide(this.slides.length - 1) &&
                  (this.$current = n));
            var s = this.getKeywordMenuConfig();
            0 < s.length || this.isEditor()
              ? (this.keywordMenu.init(s),
                this.keywordMenu.on("select", function (t) {
                  return e.keywordClick(t.data.index);
                }),
                this.keywordMenu.on("close", function () {
                  return e.hideKeywords();
                }),
                this.keywordMenu.on("select", function () {
                  e.$currentKeyword = e.$keywords.children(".h5p-current");
                }),
                (this.$keywords = y(this.keywordMenu.getElement()).appendTo(
                  this.$keywordsWrapper
                )),
                (this.$currentKeyword =
                  this.$keywords.children(".h5p-current")),
                void 0 !== this.presentation.keywordListOpacity &&
                  this.setKeywordsOpacity(this.presentation.keywordListOpacity),
                this.presentation.keywordListAlwaysShow && this.showKeywords())
              : (this.$keywordsWrapper.remove(), (this.initKeywords = !1)),
              void 0 === this.editor && this.activeSurface
                ? (this.$progressbar.add(this.$footer).remove(),
                  H5P.fullscreenSupported &&
                    ((this.$fullScreenButton = H5P.jQuery("<div/>", {
                      class: "h5p-toggle-full-screen",
                      "aria-label": this.l10n.fullscreen,
                      role: "button",
                      tabindex: 0,
                      appendTo: this.$wrapper,
                    })),
                    H5P.Tooltip(this.$fullScreenButton.get(0), {
                      position: "left",
                    }),
                    b(this.$fullScreenButton, function () {
                      return o.toggleFullScreen();
                    })))
                : (this.initTouchEvents(),
                  (this.navigationLine = new U(this)),
                  (this.previousState && this.previousState.progress) ||
                    this.setSlideNumberAnnouncer(0, !1),
                  (this.summarySlideObject = new f(this, n))),
              V(this),
              this.previousState &&
                this.previousState.progress &&
                this.jumpToSlide(this.previousState.progress, !1, null, !1, !0);
          }),
          (ot.prototype.belongsToTagName = function (t, e, i) {
            if (!t) return !1;
            (i = i || document.body),
              (e = (e = "string" == typeof e ? [e] : e).map(function (t) {
                return t.toLowerCase();
              }));
            var n = t.tagName.toLowerCase();
            return (
              -1 !== e.indexOf(n) ||
              (i !== t && this.belongsToTagName(t.parentNode, e, i))
            );
          }),
          (ot.prototype.updateKeywordMenuFromSlides = function () {
            this.keywordMenu.removeAllMenuItemElements();
            var t = this.getKeywordMenuConfig();
            return y(this.keywordMenu.init(t));
          }),
          (ot.prototype.getKeywordMenuConfig = function () {
            var i = this;
            return this.slides
              .map(function (t, e) {
                return {
                  title: i.createSlideTitle(t),
                  subtitle: "".concat(i.l10n.slide, " ").concat(e + 1),
                  index: e,
                };
              })
              .filter(function (t) {
                return null !== t.title;
              });
          }),
          (ot.prototype.createSlideTitle = function (t) {
            var e = this.isEditor() ? this.l10n.noTitle : null;
            return this.hasKeywords(t) ? t.keywords[0].main : e;
          }),
          (ot.prototype.isEditor = function () {
            return void 0 !== this.editor;
          }),
          (ot.prototype.hasKeywords = function (t) {
            return void 0 !== t.keywords && 0 < t.keywords.length;
          }),
          (ot.prototype.createSlides = function () {
            for (var t = 0; t < this.children.length; t++) {
              var e = t === this.currentSlideIndex;
              this.children[t].getElement().appendTo(this.$slidesWrapper),
                e && this.children[t].setCurrent(),
                (this.isEditor() || 0 === t || 1 === t || e) &&
                  this.children[t].appendElements();
            }
          }),
          (ot.prototype.hasScoreData = function (t) {
            return (
              "undefined" !== st(t) &&
              "function" == typeof t.getScore &&
              "function" == typeof t.getMaxScore
            );
          }),
          (ot.prototype.getScore = function () {
            var i = this;
            return n(i.slidesWithSolutions).reduce(function (t, e) {
              return t + (i.hasScoreData(e) ? e.getScore() : 0);
            }, 0);
          }),
          (ot.prototype.getMaxScore = function () {
            var i = this;
            return n(i.slidesWithSolutions).reduce(function (t, e) {
              return t + (i.hasScoreData(e) ? e.getMaxScore() : 0);
            }, 0);
          }),
          (ot.prototype.setProgressBarFeedback = function (t) {
            var n = this;
            void 0 !== t && t
              ? t.forEach(function (t) {
                  var e,
                    i = n.progressbarParts[t.slide - 1].find(
                      ".h5p-progressbar-part-has-task"
                    );
                  i.hasClass("h5p-answered") &&
                    ((e = t.score >= t.maxScore),
                    i.addClass(e ? "h5p-is-correct" : "h5p-is-wrong"),
                    n.navigationLine.updateSlideTitle(t.slide - 1));
                })
              : this.progressbarParts.forEach(function (t) {
                  t.find(".h5p-progressbar-part-has-task")
                    .removeClass("h5p-is-correct")
                    .removeClass("h5p-is-wrong");
                });
          }),
          (ot.prototype.toggleKeywords = function () {
            this[
              this.$keywordsWrapper.hasClass("h5p-open")
                ? "hideKeywords"
                : "showKeywords"
            ]();
          }),
          (ot.prototype.hideKeywords = function () {
            this.$keywordsWrapper.hasClass("h5p-open") &&
              (void 0 !== this.$keywordsButton &&
                (this.$keywordsButton.attr(
                  "aria-label",
                  this.l10n.showKeywords
                ),
                this.$keywordsButton.attr("aria-expanded", "false"),
                this.$keywordsButton.focus()),
              this.$keywordsWrapper.removeClass("h5p-open"));
          }),
          (ot.prototype.showKeywords = function () {
            this.$keywordsWrapper.hasClass("h5p-open") ||
              (void 0 !== this.$keywordsButton &&
                (this.$keywordsButton.attr(
                  "aria-label",
                  this.l10n.hideKeywords
                ),
                this.$keywordsButton.attr("aria-expanded", "true")),
              this.$keywordsWrapper.addClass("h5p-open"),
              this.presentation.keywordListAlwaysShow ||
                this.$keywordsWrapper.find('li[tabindex="0"]').focus());
          }),
          (ot.prototype.setKeywordsOpacity = function (t) {
            var e, i, n;
            "" !== this.$keywordsWrapper.css("background-color") &&
              ((i = this.$keywordsWrapper
                .css("background-color")
                .match(/\d+/g)),
              (n = 3),
              (i = (e =
                (function (t) {
                  if (Array.isArray(t)) return t;
                })(i) ||
                (function (t, e) {
                  var i =
                    null == t
                      ? null
                      : ("undefined" != typeof Symbol && t[Symbol.iterator]) ||
                        t["@@iterator"];
                  if (null != i) {
                    var n,
                      s,
                      o = [],
                      r = !0,
                      a = !1;
                    try {
                      for (
                        i = i.call(t);
                        !(r = (n = i.next()).done) &&
                        (o.push(n.value), !e || o.length !== e);
                        r = !0
                      );
                    } catch (t) {
                      (a = !0), (s = t);
                    } finally {
                      try {
                        r || null == i.return || i.return();
                      } finally {
                        if (a) throw s;
                      }
                    }
                    return o;
                  }
                })(i, n) ||
                (function (t, e) {
                  if (t) {
                    if ("string" == typeof t) return nt(t, e);
                    var i = Object.prototype.toString.call(t).slice(8, -1);
                    return "Map" ===
                      (i =
                        "Object" === i && t.constructor
                          ? t.constructor.name
                          : i) || "Set" === i
                      ? Array.from(t)
                      : "Arguments" === i ||
                        /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)
                      ? nt(t, e)
                      : void 0;
                  }
                })(i, n) ||
                (function () {
                  throw new TypeError(
                    "Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."
                  );
                })())[0]),
              (n = e[1]),
              (e = e[2]),
              this.$keywordsWrapper.css(
                "background-color",
                "rgba("
                  .concat(i, ", ")
                  .concat(n, ", ")
                  .concat(e, ", ")
                  .concat(t / 100, ")")
              ));
          }),
          (ot.prototype.fitCT = function () {
            void 0 === this.editor &&
              this.$current.find(".h5p-ct").each(function () {
                for (
                  var t = 100, e = H5P.jQuery(this), i = e.parent().height();
                  e.outerHeight() > i &&
                  (e.css({ fontSize: --t + "%", lineHeight: t + 65 + "%" }),
                  !(t < 0));

                );
              });
          }),
          (ot.prototype.resize = function () {
            var t =
              this.$container.hasClass("h5p-fullscreen") ||
              this.$container.hasClass("h5p-semi-fullscreen");
            if (!this.ignoreResize) {
              this.$wrapper.css("width", "auto");
              var e = this.$container.width(),
                i = {};
              !t ||
                (e / (n = this.$container.height()) > this.ratio &&
                  ((e = n * this.ratio), (i.width = e + "px")));
              var n = e / this.width;
              (i.height = e / this.ratio + "px"),
                (i.fontSize = this.fontSize * n + "px"),
                void 0 !== this.editor &&
                  this.editor.setContainerEm(this.fontSize * n * 0.75),
                this.$wrapper.css(i),
                (this.swipeThreshold = 100 * n);
              var s = this.elementInstances[this.$current.index()];
              if (void 0 !== s)
                for (
                  var o = this.slides[this.$current.index()].elements, r = 0;
                  r < s.length;
                  r++
                ) {
                  var a = s[r];
                  (void 0 !== a.preventResize && !1 !== a.preventResize) ||
                    void 0 === a.$ ||
                    o[r].displayAsButton ||
                    H5P.trigger(a, "resize");
                }
              this.fitCT();
            }
          }),
          (ot.prototype.toggleFullScreen = function () {
            H5P.isFullscreen ||
            this.$container.hasClass("h5p-fullscreen") ||
            this.$container.hasClass("h5p-semi-fullscreen")
              ? void 0 !== H5P.exitFullScreen &&
                void 0 !== H5P.fullScreenBrowserPrefix
                ? H5P.exitFullScreen()
                : void 0 === H5P.fullScreenBrowserPrefix
                ? H5P.jQuery(".h5p-disable-fullscreen").click()
                : "" === H5P.fullScreenBrowserPrefix
                ? window.top.document.exitFullScreen()
                : "ms" === H5P.fullScreenBrowserPrefix
                ? window.top.document.msExitFullscreen()
                : window.top.document[
                    H5P.fullScreenBrowserPrefix + "CancelFullScreen"
                  ]()
              : (this.$footer.addClass("footer-full-screen"),
                this.$fullScreenButton.attr(
                  "aria-label",
                  this.l10n.exitFullscreen
                ),
                H5P.fullScreen(this.$container, this),
                void 0 === H5P.fullScreenBrowserPrefix &&
                  H5P.jQuery(".h5p-disable-fullscreen").hide());
          }),
          (ot.prototype.focus = function () {
            this.$wrapper.focus();
          }),
          (ot.prototype.keywordClick = function (t) {
            this.shouldHideKeywordsAfterSelect() && this.hideKeywords(),
              this.jumpToSlide(t, !0);
          }),
          (ot.prototype.shouldHideKeywordsAfterSelect = function () {
            return (
              this.presentation.keywordListEnabled &&
              !this.presentation.keywordListAlwaysShow &&
              this.presentation.keywordListAutoHide &&
              void 0 === this.editor
            );
          }),
          (ot.prototype.setElementsOverride = function (t) {
            (this.elementsOverride = { params: {} }),
              t &&
                ((this.elementsOverride.params.behaviour = {}),
                t.showSolutionButton &&
                  (this.elementsOverride.params.behaviour.enableSolutionsButton =
                    "on" === t.showSolutionButton),
                t.retryButton &&
                  (this.elementsOverride.params.behaviour.enableRetry =
                    "on" === t.retryButton));
          }),
          (ot.prototype.attachElements = function (t, e) {
            if (void 0 === this.elementsAttached[e]) {
              var i = this.slides[e],
                n = this.elementInstances[e];
              if (void 0 !== i.elements)
                for (var s = 0; s < i.elements.length; s++)
                  this.attachElement(i.elements[s], n[s], t, e);
              this.trigger(
                "domChanged",
                { $target: t, library: "CoursePresentation", key: "newSlide" },
                { bubbles: !0, external: !0 }
              ),
                (this.elementsAttached[e] = !0);
            }
          }),
          (ot.prototype.attachElement = function (t, e, i, n) {
            var s = void 0 !== t.displayAsButton && t.displayAsButton,
              o =
                void 0 !== t.buttonSize
                  ? "h5p-element-button-" + t.buttonSize
                  : "",
              r = H5P.jQuery("<div>", {
                class:
                  "h5p-element" +
                  (s ? " h5p-element-button-wrapper" : "") +
                  (o.length ? " " + o : ""),
              })
                .css({
                  left: t.x + "%",
                  top: t.y + "%",
                  width: t.width + "%",
                  height: t.height + "%",
                })
                .appendTo(i.children('[role="document"]').first()),
              i = void 0 === t.backgroundOpacity || 0 === t.backgroundOpacity;
            return (
              r.toggleClass("h5p-transparent", i),
              s
                ? this.createInteractionButton(t, e).appendTo(r)
                : ((s =
                    t.action && t.action.library
                      ? this.getLibraryTypePmz(t.action.library)
                      : "other"),
                  (s = H5P.jQuery("<div>", {
                    class: "h5p-element-outer ".concat(s, "-outer-element"),
                  })
                    .css({
                      background:
                        "rgba(255,255,255," +
                        (void 0 === t.backgroundOpacity
                          ? 0
                          : t.backgroundOpacity / 100) +
                        ")",
                    })
                    .appendTo(r)),
                  (s = H5P.jQuery("<div>", {
                    class: "h5p-element-inner",
                  }).appendTo(s)),
                  e.on("set-size", function (t) {
                    for (var e in t.data) r.get(0).style[e] = t.data[e];
                  }),
                  e.attach(s),
                  void 0 !== t.action &&
                    "H5P.InteractiveVideo" === t.action.library.substr(0, 20) &&
                    ((s = function () {
                      e.$container.addClass("h5p-fullscreen"),
                        e.controls.$fullscreen &&
                          e.controls.$fullscreen.remove(),
                        (e.hasFullScreen = !0),
                        e.controls.$play.hasClass("h5p-pause")
                          ? e.$controls.addClass("h5p-autohide")
                          : e.enableAutoHide();
                    }),
                    void 0 !== e.controls ? s() : e.on("controls", s)),
                  this.setOverflowTabIndex()),
              void 0 !== this.editor
                ? this.editor.processElement(t, r, n, e)
                : (t.solution && this.addElementSolutionButton(t, e, r),
                  (this.hasAnswerElements =
                    this.hasAnswerElements || void 0 !== e.exportAnswers)),
              r
            );
          }),
          (ot.prototype.disableTabIndexes = function () {
            var i = this.$container.find(".h5p-popup-container");
            this.$tabbables = this.$container
              .find(
                "a[href], area[href], input:not([disabled]), select:not([disabled]), textarea:not([disabled]), button:not([disabled]), iframe, object, embed, *[tabindex], *[contenteditable]"
              )
              .filter(function () {
                var t = y(this),
                  e = y.contains(i.get(0), t.get(0));
                if (t.data("tabindex")) return !0;
                if (e) return !1;
                e = t.attr("tabindex");
                return t.data("tabindex", e), t.attr("tabindex", "-1"), !0;
              });
          }),
          (ot.prototype.restoreTabIndexes = function () {
            this.$tabbables &&
              this.$tabbables.each(function () {
                var t = y(this),
                  e = t.data("tabindex");
                t.hasClass("ui-slider-handle")
                  ? (t.attr("tabindex", 0), t.removeData("tabindex"))
                  : void 0 !== e
                  ? (t.attr("tabindex", e), t.removeData("tabindex"))
                  : t.removeAttr("tabindex");
              });
          }),
          (ot.prototype.createInteractionButton = function (t, e) {
            var i = this,
              n = t.action.metadata ? t.action.metadata.title : "";
            "" === n &&
              (n =
                (t.action.params && t.action.params.contentName) ||
                t.action.library.split(" ")[0].split(".")[1]);
            var s = this.getLibraryTypePmz(t.action.library),
              o = y("<div>", {
                role: "button",
                tabindex: 0,
                "aria-label": n,
                "aria-popup": !0,
                "aria-expanded": !1,
                class: "h5p-element-button h5p-element-button-"
                  .concat(t.buttonSize, " ")
                  .concat(s, "-button"),
              }),
              r = y('<div class="h5p-button-element"></div>');
            e.attach(r);
            var a = "h5p-advancedtext" === s ? { x: t.x, y: t.y } : null;
            return (
              b(o, function () {
                var t;
                o.attr("aria-expanded", "true"),
                  i.showInteractionPopup(
                    e,
                    o,
                    r,
                    s,
                    ((t = o),
                    function () {
                      return t.attr("aria-expanded", "false");
                    }),
                    a
                  );
              }),
              void 0 !== t.action &&
                "H5P.InteractiveVideo" === t.action.library.substr(0, 20) &&
                e.on("controls", function () {
                  e.controls.$fullscreen && e.controls.$fullscreen.remove();
                }),
              o
            );
          }),
          (ot.prototype.showInteractionPopup = function (t, e, i, n, s) {
            function o() {
              t.trigger("resize");
            }
            var r = this,
              a =
                5 < arguments.length && void 0 !== arguments[5]
                  ? arguments[5]
                  : null;
            this.isEditor() ||
              (this.on("exitFullScreen", o),
              this.showPopup({
                popupContent: i,
                $focusOnClose: e,
                parentPosition: a,
                remove: function () {
                  (0 < arguments.length &&
                    void 0 !== arguments[0] &&
                    arguments[0]) ||
                    i.detach(),
                    r.off("exitFullScreen", o),
                    s();
                },
                classes: n,
                instance: t,
                keepInDOM: "h5p-interactivevideo" === n,
              }),
              H5P.trigger(t, "resize"),
              "h5p-image" === n && this.resizePopupImage(i),
              setTimeout(function () {
                var t = i.find(":input").add(i.find("[tabindex]"));
                t.length ? t[0].focus() : (i.attr("tabindex", 0), i.focus());
              }, 200),
              l(t.setActivityStarted) &&
                l(t.getScore) &&
                t.setActivityStarted());
          }),
          (ot.prototype.getLibraryTypePmz = function (t) {
            return t.split(" ")[0].replace(/[\W]/g, "-").toLowerCase();
          }),
          (ot.prototype.resizePopupImage = function (i) {
            function t(t, e) {
              e / n < 18.5 ||
                ((t = t / e), i.css({ width: (e = 18.5 * n) * t, height: e }));
            }
            var n = Number(i.css("fontSize").replace("px", "")),
              e = i.find("img");
            e.height()
              ? t(e.width(), e.height())
              : e.one("load", function () {
                  t(this.width, this.height);
                });
          }),
          (ot.prototype.addElementSolutionButton = function (n, t, s) {
            var o = this;
            (t.showCPComments = function () {
              var e, i, t;
              0 === s.children(".h5p-element-solution").length &&
                ((t = n.solution), 0 < p.html(t).text().trim().length) &&
                ((e = y("<div/>", {
                  role: "button",
                  tabindex: 0,
                  title: o.l10n.solutionsButtonTitle,
                  "aria-haspopup": "dialog",
                  "aria-expanded": !1,
                  class: "h5p-element-solution",
                })
                  .append(
                    '<span class="joubel-icon-comment-normal"><span class="h5p-icon-shadow"></span><span class="h5p-icon-speech-bubble"></span><span class="h5p-icon-question"></span></span>'
                  )
                  .appendTo(s)),
                (i = { x: n.x, y: n.y }),
                n.displayAsButton ||
                  ((i.x += n.width - 4), (i.y += n.height - 12)),
                b(e, function (t) {
                  o.showPopup({
                    popupContent: n.solution,
                    $focusOnClose: e,
                    parentPosition: i,
                    updateAriaExpanded: !0,
                  }),
                    e.attr("aria-expanded", !0),
                    t.stopPropagation();
                }));
            }),
              void 0 !== n.alwaysDisplayComments &&
                n.alwaysDisplayComments &&
                t.showCPComments();
          }),
          (ot.prototype.showPopup = function (t) {
            var e,
              i = this,
              n = t.popupContent,
              s = t.$focusOnClose,
              o = t.parentPosition,
              r = void 0 === o ? null : o,
              a = t.remove,
              l = t.classes,
              c = void 0 === l ? "h5p-popup-comment-field" : l,
              h = t.instance,
              o = t.keepInDOM,
              u = void 0 !== o && o,
              d = t.updateAriaExpanded,
              p = this;
            this.popupId = void 0 === this.popupId ? 0 : this.popupId + 1;
            function f(t) {
              e
                ? (e = !1)
                : (p.restoreTabIndexes(),
                  s.focus(),
                  d && s.attr("aria-expanded", !1),
                  void 0 !== a &&
                    setTimeout(function () {
                      a(u);
                    }, 100),
                  t.preventDefault(),
                  g.addClass("h5p-animate"),
                  g.find(".h5p-popup-container").addClass("h5p-animate"),
                  setTimeout(function () {
                    u ? g.hide() : g.remove();
                  }, 100));
            }
            var g, m;
            void 0 ===
              (g =
                u && h && p.popups[h.subContentId]
                  ? p.popups[h.subContentId]
                  : g) &&
              ((v = (g = y(
                '<div class="h5p-popup-overlay ' +
                  c +
                  '"><div class="h5p-popup-container" role="dialog"aria-modal="true" aria-live="true" aria-labelledby="popup-title-' +
                  this.popupId +
                  '"> <div role="button" tabindex="0" class="h5p-close-popup" title="' +
                  this.l10n.close +
                  '"></div><div class="h5p-popup-wrapper" role="document"></div></div></div>'
              )).find(".h5p-popup-wrapper")),
              n instanceof H5P.jQuery ? v.append(n) : v.html(n),
              (m = ""),
              v.children().each(function (t, e) {
                e.setAttribute("id", "popup-content-" + i.popupId + "-" + t),
                  (m += "popup-content-" + i.popupId + "-" + t + " ");
              }),
              g.find(".h5p-popup-container").attr("aria-describedby", m),
              h && h.subContentId && (p.popups[h.subContentId] = g));
            var v,
              l = g.find(".h5p-popup-container");
            return (
              (o = g),
              (t = l),
              (c = r) &&
                (t.css({ visibility: "hidden" }),
                o.prependTo(i.$wrapper),
                (n = t.height()),
                (v = t.width()),
                (r = n * (100 / (h = o.height()))),
                50 < (n = v * (100 / o.width())) && 50 < r
                  ? o.detach()
                  : (r < n &&
                      r < 45 &&
                      ((n = Math.sqrt(n * r)), t.css({ width: n + "%" })),
                    90 < n ? (n = 90) : n < 22 && (n = 22),
                    (v = c.x),
                    c.x > (n = 100 - n - 5) ? (v = n) : c.x < 5 && (v = 5),
                    (h = 100 - (r = t.height() * (100 / h)) - 10),
                    (r = c.y),
                    c.y > h ? (r = h) : c.y < 10 && (r = 10),
                    o.detach(),
                    t.css({ left: v + "%", top: r + "%" }))),
              g.addClass("h5p-animate"),
              l.css({ visibility: "" }).addClass("h5p-animate"),
              0 === g.parent().length ? g.prependTo(this.$wrapper) : g.show(),
              g
                .removeClass("h5p-animate")
                .click(f)
                .find(".h5p-popup-container")
                .removeClass("h5p-animate")
                .click(function () {
                  e = !0;
                })
                .keydown(function (t) {
                  27 === t.which && f(t);
                })
                .find(".h5p-close-popup")
                .focus(),
              this.disableTabIndexes(),
              b(g.find(".h5p-close-popup"), f),
              g
            );
          }),
          (ot.prototype.checkForSolutions = function (t) {
            return void 0 !== t.showSolutions || void 0 !== t.showCPComments;
          }),
          (ot.prototype.initKeyEvents = function () {
            var e, i;
            void 0 !== this.keydown ||
              this.activeSurface ||
              ((i = !1),
              ((e = this).keydown = function (t) {
                i ||
                  ((((37 !== t.keyCode && 33 !== t.keyCode) ||
                    !e.previousSlide(void 0, !1)) &&
                    ((39 !== t.keyCode && 34 !== t.keyCode) ||
                      !e.nextSlide(void 0, !1))) ||
                    (t.preventDefault(), (i = !0)),
                  i &&
                    setTimeout(function () {
                      i = !1;
                    }, 300));
              }),
              H5P.jQuery("body").keydown(this.keydown));
          }),
          (ot.prototype.initTouchEvents = function () {
            function n(t) {
              return {
                "-webkit-transform": t,
                "-moz-transform": t,
                "-ms-transform": t,
                transform: t,
              };
            }
            var s,
              o,
              r,
              a,
              l,
              c,
              h = this,
              u = !1,
              d = !1,
              e = n("");
            this.$slidesWrapper
              .bind("touchstart", function (t) {
                (d = !1),
                  (r = s = t.originalEvent.touches[0].pageX),
                  (o = t.originalEvent.touches[0].pageY);
                t = h.$slidesWrapper.width();
                (a = 0 === h.currentSlideIndex ? 0 : -t),
                  (l = h.currentSlideIndex + 1 >= h.slides.length ? 0 : t),
                  (u = !(c = null));
              })
              .bind("touchmove", function (t) {
                var e = t.originalEvent.touches;
                u &&
                  (h.$current.prev().addClass("h5p-touch-move"),
                  h.$current.next().addClass("h5p-touch-move"),
                  (u = !1)),
                  (r = e[0].pageX);
                var i = s - r;
                null === c &&
                  (c =
                    Math.abs(o - t.originalEvent.touches[0].pageY) >
                    Math.abs(i)),
                  1 !== e.length ||
                    c ||
                    (t.preventDefault(),
                    d ||
                      (i < 0
                        ? h.$current
                            .prev()
                            .css(n("translateX(" + (a - i) + "px"))
                        : h.$current
                            .next()
                            .css(n("translateX(" + (l - i) + "px)")),
                      h.$current.css(n("translateX(" + -i + "px)"))));
              })
              .bind("touchend", function () {
                if (!c) {
                  var t = s - r;
                  if (
                    (t > h.swipeThreshold && h.nextSlide(void 0, !1)) ||
                    (t < -h.swipeThreshold && h.previousSlide(void 0, !1))
                  )
                    return;
                }
                h.$slidesWrapper
                  .children()
                  .css(e)
                  .removeClass("h5p-touch-move");
              });
          }),
          (ot.prototype.updateTouchPopup = function (t, e, i, n) {
            var s;
            arguments.length <= 0
              ? void 0 !== this.touchPopup && this.touchPopup.remove()
              : ((s = ""),
                void 0 !== this.$keywords &&
                void 0 !==
                  this.$keywords
                    .children(":eq(" + e + ")")
                    .find("span")
                    .html()
                  ? (s += this.$keywords
                      .children(":eq(" + e + ")")
                      .find("span")
                      .html())
                  : (s += this.l10n.slide + " " + (e + 1)),
                void 0 === this.editor &&
                  e >= this.slides.length - 1 &&
                  (s = this.l10n.showSolutions),
                void 0 === this.touchPopup
                  ? (this.touchPopup = H5P.jQuery("<div/>", {
                      class: "h5p-touch-popup",
                    }).insertAfter(t))
                  : this.touchPopup.insertAfter(t),
                n - 0.15 * t.parent().height() < 0
                  ? (n = 0)
                  : (n -= 0.15 * t.parent().height()),
                this.touchPopup.css({
                  "max-width": t.width() - i,
                  left: i,
                  top: n,
                }),
                this.touchPopup.html(s));
          }),
          (ot.prototype.previousSlide = function (t) {
            var e =
                !(1 < arguments.length && void 0 !== arguments[1]) ||
                arguments[1],
              i = this.$current.prev();
            return (
              !!i.length &&
              (e
                ? this.processJumpToSlide(i.index(), t, !1)
                : this.jumpToSlide(i.index(), t, null, !1))
            );
          }),
          (ot.prototype.nextSlide = function (t) {
            var e =
                !(1 < arguments.length && void 0 !== arguments[1]) ||
                arguments[1],
              i = this.$current.next();
            return (
              !!i.length &&
              (e
                ? this.processJumpToSlide(i.index(), t, !1)
                : this.jumpToSlide(i.index(), t, null, !1))
            );
          }),
          (ot.prototype.isCurrentSlide = function (t) {
            return this.currentSlideIndex === t;
          }),
          (ot.prototype.getCurrentSlideIndex = function () {
            return this.currentSlideIndex;
          }),
          (ot.prototype.attachAllElements = function () {
            for (
              var t = this.$slidesWrapper.children(), e = 0;
              e < this.slides.length;
              e++
            )
              this.attachElements(t.eq(e), e);
            void 0 !== this.summarySlideObject &&
              this.summarySlideObject.updateSummarySlide(
                this.slides.length - 1,
                !0
              );
          }),
          (ot.prototype.processJumpToSlide = function (t, e, i) {
            var n = this;
            if (
              (void 0 === this.editor &&
                this.contentId &&
                (((l =
                  this.createXAPIEventTemplate(
                    "progressed"
                  )).data.statement.object.definition.extensions[
                  "http://id.tincanapi.com/extension/ending-point"
                ] = t + 1),
                this.trigger(l)),
              !this.$current.hasClass("h5p-animate"))
            ) {
              var s = this.$current.addClass("h5p-animate"),
                o = n.$slidesWrapper.children(),
                r = o.filter(":lt(" + t + ")");
              this.$current = o.eq(t).addClass("h5p-animate");
              var a = this.currentSlideIndex;
              (this.currentSlideIndex = t),
                this.attachElements(this.$current, t);
              var l = this.$current.next();
              return (
                l.length && this.attachElements(l, t + 1),
                this.setOverflowTabIndex(),
                setTimeout(function () {
                  s.removeClass("h5p-current"),
                    o
                      .css({
                        "-webkit-transform": "",
                        "-moz-transform": "",
                        "-ms-transform": "",
                        transform: "",
                      })
                      .removeClass("h5p-touch-move")
                      .removeClass("h5p-previous"),
                    r.addClass("h5p-previous"),
                    n.$current.addClass("h5p-current"),
                    n.trigger("changedSlide", n.$current.index());
                }, 1),
                setTimeout(function () {
                  if (
                    (n.$slidesWrapper.children().removeClass("h5p-animate"),
                    void 0 === n.editor)
                  ) {
                    var t = n.elementInstances[n.currentSlideIndex],
                      e = n.slides[n.currentSlideIndex].elements;
                    if (void 0 !== t)
                      for (var i = 0; i < t.length; i++)
                        e[i].displayAsButton ||
                          "function" != typeof t[i].setActivityStarted ||
                          "function" != typeof t[i].getScore ||
                          t[i].setActivityStarted();
                  }
                }, 250),
                void 0 !== this.$keywords &&
                  (this.keywordMenu.setCurrentSlideIndex(t),
                  (this.$currentKeyword = this.$keywords.find(".h5p-current")),
                  e || this.keywordMenu.scrollToKeywords(t)),
                n.presentation.keywordListEnabled &&
                  n.presentation.keywordListAlwaysShow &&
                  n.showKeywords(),
                n.navigationLine &&
                  (n.navigationLine.updateProgressBar(
                    t,
                    a,
                    this.isSolutionMode
                  ),
                  n.navigationLine.updateFooter(t),
                  this.setSlideNumberAnnouncer(t, i)),
                n.summarySlideObject &&
                  n.summarySlideObject.updateSummarySlide(t, !0),
                void 0 !== this.editor &&
                  void 0 !== this.editor.dnb &&
                  (this.editor.dnb.setContainer(this.$current),
                  this.editor.dnb.blurAll()),
                this.trigger("resize"),
                this.fitCT(),
                !0
              );
            }
          }),
          (ot.prototype.jumpToSlide = function (t) {
            var e = this,
              i =
                1 < arguments.length && void 0 !== arguments[1] && arguments[1],
              n =
                2 < arguments.length && void 0 !== arguments[2]
                  ? arguments[2]
                  : null,
              s =
                3 < arguments.length && void 0 !== arguments[3] && arguments[3];
            if (
              this.standalone &&
              this.showSummarySlide &&
              t === this.slides.length - 1 &&
              !this.isSolutionMode &&
              this.isReportingEnabled &&
              !(4 < arguments.length && void 0 !== arguments[4] && arguments[4])
            ) {
              if (this.currentSlideIndex === this.slides.length - 1) return !1;
              var o = (function (t) {
                t = new H5P.ConfirmationDialog(t).appendTo(document.body);
                return (
                  t.getElement().classList.add("h5p-cp-confirmation-dialog"),
                  t.show(),
                  t
                );
              })({
                headerText: this.l10n.confirmDialogHeader,
                dialogText: this.l10n.confirmDialogText,
                confirmText: this.l10n.confirmDialogConfirmationText,
              });
              o.on("canceled", function () {
                return !1;
              }),
                o.on("confirmed", function () {
                  e.processJumpToSlide(t, i, s), n && n();
                });
            } else this.processJumpToSlide(t, i, s), n && n();
          }),
          (ot.prototype.setOverflowTabIndex = function () {
            void 0 !== this.$current &&
              this.$current.find(".h5p-element-inner").each(function () {
                var t,
                  e = y(this);
                this.classList.contains("h5p-table") &&
                  (t = e.find(".h5p-table").outerHeight());
                var i = e.closest(".h5p-element-outer").innerHeight();
                void 0 !== t && null !== i && i < t && e.attr("tabindex", 0);
              });
          }),
          (ot.prototype.setSlideNumberAnnouncer = function (t) {
            var e =
                1 < arguments.length && void 0 !== arguments[1] && arguments[1],
              i = "";
            if (!this.navigationLine) return i;
            var n = this.slides[t];
            n.keywords &&
              0 < n.keywords.length &&
              !this.navigationLine.isSummarySlide(t) &&
              (i += this.l10n.slide + " " + (t + 1) + ": "),
              (i += this.navigationLine.createSlideTitle(t)),
              this.$slideAnnouncer.html(i),
              e && this.$slideTop.focus();
          }),
          (ot.prototype.resetTask = function () {
            this.summarySlideObject.toggleSolutionMode(!1);
            for (var t = 0; t < this.slidesWithSolutions.length; t++)
              if (void 0 !== this.slidesWithSolutions[t])
                for (var e = 0; e < this.slidesWithSolutions[t].length; e++) {
                  var i = this.slidesWithSolutions[t][e];
                  i.resetTask && i.resetTask();
                }
            this.navigationLine.updateProgressBar(0),
              this.jumpToSlide(0, !1),
              this.$container.find(".h5p-popup-overlay").remove();
          }),
          (ot.prototype.showSolutions = function () {
            for (
              var t = !1, e = [], i = !1, n = 0;
              n < this.slidesWithSolutions.length;
              n++
            ) {
              if (void 0 !== this.slidesWithSolutions[n]) {
                this.elementsAttached[n] ||
                  this.attachElements(
                    this.$slidesWrapper.children(":eq(" + n + ")"),
                    n
                  ),
                  t || (this.jumpToSlide(n, !1), (t = !0));
                for (
                  var s = 0, o = 0, r = [], a = 0;
                  a < this.slidesWithSolutions[n].length;
                  a++
                ) {
                  var l = this.slidesWithSolutions[n][a];
                  void 0 !== l.addSolutionButton && l.addSolutionButton(),
                    l.showSolutions && l.showSolutions(),
                    l.showCPComments && l.showCPComments(),
                    void 0 !== l.getMaxScore &&
                      ((o += l.getMaxScore()),
                      (s += l.getScore()),
                      (i = !0),
                      r.push(l.coursePresentationIndexOnSlide));
                }
                e.push({ indexes: r, slide: n + 1, score: s, maxScore: o });
              }
              if (this.showCommentsAfterSolution[n])
                for (
                  var c = 0;
                  c < this.showCommentsAfterSolution[n].length;
                  c++
                )
                  "function" ==
                    typeof this.showCommentsAfterSolution[n][c]
                      .showCPComments &&
                    this.showCommentsAfterSolution[n][c].showCPComments();
            }
            if (i) return e;
          }),
          (ot.prototype.getSlideScores = function (t) {
            for (
              var e = !0 === t, i = [], n = !1, s = 0;
              s < this.slidesWithSolutions.length;
              s++
            )
              if (void 0 !== this.slidesWithSolutions[s]) {
                this.elementsAttached[s] ||
                  this.attachElements(
                    this.$slidesWrapper.children(":eq(" + s + ")"),
                    s
                  ),
                  e || (this.jumpToSlide(s, !1), (e = !0));
                for (
                  var o = 0, r = 0, a = [], l = 0;
                  l < this.slidesWithSolutions[s].length;
                  l++
                ) {
                  var c = this.slidesWithSolutions[s][l];
                  void 0 !== c.getMaxScore &&
                    ((r += c.getMaxScore()),
                    (o += c.getScore()),
                    (n = !0),
                    a.push(c.coursePresentationIndexOnSlide));
                }
                i.push({ indexes: a, slide: s + 1, score: o, maxScore: r });
              }
            if (n) return i;
          }),
          (ot.prototype.getCopyrights = function () {
            var t,
              e,
              i = new H5P.ContentCopyrights();
            this.presentation &&
              this.presentation.globalBackgroundSelector &&
              this.presentation.globalBackgroundSelector
                .imageGlobalBackground &&
              ((t =
                this.presentation.globalBackgroundSelector
                  .imageGlobalBackground),
              (e = new H5P.MediaCopyright(t.copyright)).setThumbnail(
                new H5P.Thumbnail(
                  H5P.getPath(t.path, this.contentId),
                  t.width,
                  t.height
                )
              ),
              i.addMedia(e));
            for (var n = 0; n < this.slides.length; n++) {
              var s,
                o,
                r = new H5P.ContentCopyrights();
              if (
                (r.setLabel(this.l10n.slide + " " + (n + 1)),
                this.slides[n] &&
                  this.slides[n].slideBackgroundSelector &&
                  this.slides[n].slideBackgroundSelector.imageSlideBackground &&
                  ((s =
                    this.slides[n].slideBackgroundSelector
                      .imageSlideBackground),
                  (o = new H5P.MediaCopyright(s.copyright)).setThumbnail(
                    new H5P.Thumbnail(
                      H5P.getPath(s.path, this.contentId),
                      s.width,
                      s.height
                    )
                  ),
                  r.addMedia(o)),
                void 0 !== this.elementInstances[n])
              )
                for (var a = 0; a < this.elementInstances[n].length; a++) {
                  var l,
                    c,
                    h,
                    u = this.elementInstances[n][a];
                  this.slides[n].elements[a].action &&
                    ((l = this.slides[n].elements[a].action.params),
                    (h = this.slides[n].elements[a].action.metadata),
                    (c = void 0) ===
                      (c =
                        void 0 !== u.getCopyrights ? u.getCopyrights() : c) &&
                      ((c = new H5P.ContentCopyrights()),
                      H5P.findCopyrights(c, l, this.contentId, {
                        metadata: h,
                        machineName: u.libraryInfo.machineName,
                      })),
                    (h = a + 1),
                    void 0 !== l.contentName
                      ? (h += ": " + l.contentName)
                      : void 0 !== u.getTitle
                      ? (h += ": " + u.getTitle())
                      : l.l10n && l.l10n.name && (h += ": " + l.l10n.name),
                    c.setLabel(h),
                    r.addContent(c));
                }
              i.addContent(r);
            }
            return i;
          }),
          (ot.prototype.getXAPIData = function () {
            var t = this.createXAPIEventTemplate("answered"),
              e = t.getVerifiedStatementValue(["object", "definition"]);
            H5P.jQuery.extend(e, {
              interactionType: "compound",
              type: "http://adlnet.gov/expapi/activities/cmi.interaction",
            });
            var i = this.getScore(),
              e = this.getMaxScore();
            t.setScoredResult(i, e, this, !0, i === e);
            e = n(this.slidesWithSolutions)
              .map(function (t) {
                if (t && t.getXAPIData) return t.getXAPIData();
              })
              .filter(function (t) {
                return !!t;
              });
            return { statement: t.data.statement, children: e };
          }),
          (ot.prototype.getContext = function () {
            return { type: "slide", value: this.currentSlideIndex + 1 };
          });
        t = ot;
        ((H5P = H5P || {}).Tooltip = H5P.Tooltip || function () {}),
          (H5P.CoursePresentation = t);
      })();
  })();
const realH5PGetPath = H5P.getPath;
H5P.getPath = function (t, e) {
  return t.startsWith("data:") ? t : realH5PGetPath(t, e);
};
var furtherH5PInlineResources = {
  "H5P.SingleChoiceSet-1.11/sounds/negative-short.mp3":
    "data:audio/mpeg;base64, ",
  "H5P.SingleChoiceSet-1.11/sounds/negative-short.ogg":
    "data:audio/ogg;base64, ",
  "H5P.SingleChoiceSet-1.11/sounds/positive-short.mp3":
    "data:audio/mpeg;base64, ",
  "H5P.SingleChoiceSet-1.11/sounds/positive-short.ogg":
    "data:audio/ogg;base64, ",
  "jQuery.ui-1.10/images/animated-overlay.gif":
    "data:image/gif;base64,R0lGODlhKAAoAIABAAAAAP///yH/C05FVFNDQVBFMi4wAwEAAAAh+QQJAQABACwAAAAAKAAoAAACkYwNqXrdC52DS06a7MFZI+4FHBCKoDeWKXqymPqGqxvJrXZbMx7Ttc+w9XgU2FB3lOyQRWET2IFGiU9m1frDVpxZZc6bfHwv4c1YXP6k1Vdy292Fb6UkuvFtXpvWSzA+HycXJHUXiGYIiMg2R6W459gnWGfHNdjIqDWVqemH2ekpObkpOlppWUqZiqr6edqqWQAAIfkECQEAAQAsAAAAACgAKAAAApSMgZnGfaqcg1E2uuzDmmHUBR8Qil95hiPKqWn3aqtLsS18y7G1SzNeowWBENtQd+T1JktP05nzPTdJZlR6vUxNWWjV+vUWhWNkWFwxl9VpZRedYcflIOLafaa28XdsH/ynlcc1uPVDZxQIR0K25+cICCmoqCe5mGhZOfeYSUh5yJcJyrkZWWpaR8doJ2o4NYq62lAAACH5BAkBAAEALAAAAAAoACgAAAKVDI4Yy22ZnINRNqosw0Bv7i1gyHUkFj7oSaWlu3ovC8GxNso5fluz3qLVhBVeT/Lz7ZTHyxL5dDalQWPVOsQWtRnuwXaFTj9jVVh8pma9JjZ4zYSj5ZOyma7uuolffh+IR5aW97cHuBUXKGKXlKjn+DiHWMcYJah4N0lYCMlJOXipGRr5qdgoSTrqWSq6WFl2ypoaUAAAIfkECQEAAQAsAAAAACgAKAAAApaEb6HLgd/iO7FNWtcFWe+ufODGjRfoiJ2akShbueb0wtI50zm02pbvwfWEMWBQ1zKGlLIhskiEPm9R6vRXxV4ZzWT2yHOGpWMyorblKlNp8HmHEb/lCXjcW7bmtXP8Xt229OVWR1fod2eWqNfHuMjXCPkIGNileOiImVmCOEmoSfn3yXlJWmoHGhqp6ilYuWYpmTqKUgAAIfkECQEAAQAsAAAAACgAKAAAApiEH6kb58biQ3FNWtMFWW3eNVcojuFGfqnZqSebuS06w5V80/X02pKe8zFwP6EFWOT1lDFk8rGERh1TTNOocQ61Hm4Xm2VexUHpzjymViHrFbiELsefVrn6XKfnt2Q9G/+Xdie499XHd2g4h7ioOGhXGJboGAnXSBnoBwKYyfioubZJ2Hn0RuRZaflZOil56Zp6iioKSXpUAAAh+QQJAQABACwAAAAAKAAoAAACkoQRqRvnxuI7kU1a1UU5bd5tnSeOZXhmn5lWK3qNTWvRdQxP8qvaC+/yaYQzXO7BMvaUEmJRd3TsiMAgswmNYrSgZdYrTX6tSHGZO73ezuAw2uxuQ+BbeZfMxsexY35+/Qe4J1inV0g4x3WHuMhIl2jXOKT2Q+VU5fgoSUI52VfZyfkJGkha6jmY+aaYdirq+lQAACH5BAkBAAEALAAAAAAoACgAAAKWBIKpYe0L3YNKToqswUlvznigd4wiR4KhZrKt9Upqip61i9E3vMvxRdHlbEFiEXfk9YARYxOZZD6VQ2pUunBmtRXo1Lf8hMVVcNl8JafV38aM2/Fu5V16Bn63r6xt97j09+MXSFi4BniGFae3hzbH9+hYBzkpuUh5aZmHuanZOZgIuvbGiNeomCnaxxap2upaCZsq+1kAACH5BAkBAAEALAAAAAAoACgAAAKXjI8By5zf4kOxTVrXNVlv1X0d8IGZGKLnNpYtm8Lr9cqVeuOSvfOW79D9aDHizNhDJidFZhNydEahOaDH6nomtJjp1tutKoNWkvA6JqfRVLHU/QUfau9l2x7G54d1fl995xcIGAdXqMfBNadoYrhH+Mg2KBlpVpbluCiXmMnZ2Sh4GBqJ+ckIOqqJ6LmKSllZmsoq6wpQAAAh+QQJAQABACwAAAAAKAAoAAAClYx/oLvoxuJDkU1a1YUZbJ59nSd2ZXhWqbRa2/gF8Gu2DY3iqs7yrq+xBYEkYvFSM8aSSObE+ZgRl1BHFZNr7pRCavZ5BW2142hY3AN/zWtsmf12p9XxxFl2lpLn1rseztfXZjdIWIf2s5dItwjYKBgo9yg5pHgzJXTEeGlZuenpyPmpGQoKOWkYmSpaSnqKileI2FAAACH5BAkBAAEALAAAAAAoACgAAAKVjB+gu+jG4kORTVrVhRlsnn2dJ3ZleFaptFrb+CXmO9OozeL5VfP99HvAWhpiUdcwkpBH3825AwYdU8xTqlLGhtCosArKMpvfa1mMRae9VvWZfeB2XfPkeLmm18lUcBj+p5dnN8jXZ3YIGEhYuOUn45aoCDkp16hl5IjYJvjWKcnoGQpqyPlpOhr3aElaqrq56Bq7VAAAOw==",
  "jQuery.ui-1.10/images/ui-bg_flat_0_aaaaaa_40x100.png":
    "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACgAAABkCAYAAAD0ZHJ6AAAAe0lEQVRoge3OMQHAIBAAMcC/kjdZJHTI0A4XBdkz86wfO18H3hRUBVVBVVAVVAVVQVVQFVQFVUFVUBVUBVVBVVAVVAVVQVVQFVQFVUFVUBVUBVVBVVAVVAVVQVVQFVQFVUFVUBVUBVVBVVAVVAVVQVVQFVQFVUFVUBVUF8O8A8WdY6opAAAAAElFTkSuQmCC",
  "jQuery.ui-1.10/images/ui-bg_flat_75_ffffff_40x100.png":
    "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACgAAABkCAYAAAD0ZHJ6AAAAeUlEQVRoge3OMQHAIBAAsVL/nh8JDDfAkCjImpn5HvbfDpwIVoKVYCVYCVaClWAlWAlWgpVgJVgJVoKVYCVYCVaClWAlWAlWgpVgJVgJVoKVYCVYCVaClWAlWAlWgpVgJVgJVoKVYCVYCVaClWAlWAlWgpVgJVgJVhtqiwTEKTLXTgAAAABJRU5ErkJggg==",
  "jQuery.ui-1.10/images/ui-bg_glass_55_fbf9ee_1x400.png":
    "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAGQCAYAAABvWArbAAAAP0lEQVQ4je3PMQrAMABC0a/3v2zX0mCXNkOgc6C4PARd5DqPGKCU8luS8SbAQhiCQRgJE56kZTfbbP9RSvnkBsWcEAZRWcgqAAAAAElFTkSuQmCC",
  "jQuery.ui-1.10/images/ui-bg_glass_65_ffffff_1x400.png":
    "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAGQCAYAAABvWArbAAAAMElEQVQ4je3LIQ4AIBTD0O3f/8wrFgmKhMy8pKJKwkhSKeVbbGuAPU9f4PIopTxgAeS0DRtI4yK0AAAAAElFTkSuQmCC",
  "jQuery.ui-1.10/images/ui-bg_glass_75_dadada_1x400.png":
    "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAGQCAYAAABvWArbAAAANklEQVQ4jWN48uTJfyYGBgaGUWKUGCWGLfHt2zcoi5GREYNgYmJCZiG42IiB98woMUqMEtgIAMdjCdyg+eEBAAAAAElFTkSuQmCC",
  "jQuery.ui-1.10/images/ui-bg_glass_75_e6e6e6_1x400.png":
    "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAGQCAYAAABvWArbAAAANUlEQVQ4je3LMQoAIBADwb38/6t5wFXaWAiCtUiaYZvF9hBACOFbuntVVe11B0CSjjeE8BwThQIJ8dhEl0YAAAAASUVORK5CYII=",
  "jQuery.ui-1.10/images/ui-bg_glass_95_fef1ec_1x400.png":
    "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAGQCAYAAABvWArbAAAAPklEQVQ4je3PMQqAMABD0Z/c/7aCIAXjJIhD10LJ8vgZw30eMUApZV/GhZNgSTjoLYElY/hNMJ/S6gullCkPiCIPCr4NiEwAAAAASUVORK5CYII=",
  "jQuery.ui-1.10/images/ui-bg_highlight-soft_75_cccccc_1x100.png":
    "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAABkCAYAAABHLFpgAAAALElEQVQYlWN49OjRfyYGBgaGIUT8//8fSqBx0Yh///4RL8vAwAAVQ2MNOwIAl6g6KkOJwk8AAAAASUVORK5CYII=",
  "jQuery.ui-1.10/images/ui-icons_2e83ff_256x240.png":
    "data:image/png;base64, ",
  "jQuery.ui-1.10/images/ui-icons_222222_256x240.png":
    "data:image/png;base64, ",
  "jQuery.ui-1.10/images/ui-icons_454545_256x240.png":
    "data:image/png;base64, ",
  "jQuery.ui-1.10/images/ui-icons_888888_256x240.png":
    "data:image/png;base64, ",
  "jQuery.ui-1.10/images/ui-icons_cd0a0a_256x240.png":
    "data:image/png;base64, ",
  "H5P.CoursePresentation-1.25/dist/515d9d92daf54ec52fcf.svg":
    "data:image/svg+xml;base64, ",
  "H5P.CoursePresentation-1.25/dist/e9124eab8eb09ecd01ea.svg":
    "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4KPCEtLSBHZW5lcmF0b3I6IEFkb2JlIElsbHVzdHJhdG9yIDIwLjEuMCwgU1ZHIEV4cG9ydCBQbHVnLUluIC4gU1ZHIFZlcnNpb246IDYuMDAgQnVpbGQgMCkgIC0tPgo8c3ZnIHZlcnNpb249IjEuMSIgaWQ9IkxheWVyXzEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHg9IjBweCIgeT0iMHB4IgoJIHZpZXdCb3g9IjAgMCAyNCAyNCIgc3R5bGU9ImVuYWJsZS1iYWNrZ3JvdW5kOm5ldyAwIDAgMjQgMjQ7IiB4bWw6c3BhY2U9InByZXNlcnZlIj4KPHN0eWxlIHR5cGU9InRleHQvY3NzIj4KCS5zdDB7Y2xpcC1wYXRoOnVybCgjU1ZHSURfMl8pO2ZpbGw6I0U4RThFODt9Cgkuc3Qxe2NsaXAtcGF0aDp1cmwoI1NWR0lEXzRfKTtmaWxsOiNFOEU4RTg7fQo8L3N0eWxlPgo8Zz4KCTxnPgoJCTxnPgoJCQk8Zz4KCQkJCTxkZWZzPgoJCQkJCTxyZWN0IGlkPSJTVkdJRF8xXyIgeT0iMCIgd2lkdGg9IjI0IiBoZWlnaHQ9IjI0Ii8+CgkJCQk8L2RlZnM+CgkJCQk8Y2xpcFBhdGggaWQ9IlNWR0lEXzJfIj4KCQkJCQk8dXNlIHhsaW5rOmhyZWY9IiNTVkdJRF8xXyIgIHN0eWxlPSJvdmVyZmxvdzp2aXNpYmxlOyIvPgoJCQkJPC9jbGlwUGF0aD4KCQkJCTxwYXRoIGNsYXNzPSJzdDAiIGQ9Ik0yMS42LDExYzAtMC4xLTAuMS0wLjItMC4zLTAuMkwxOSwxMC41YzAsMC0xLjEtMi4yLTEuMy0yLjNsMCwwbDAsMGwwLDBjLTAuMSwwLjEtMS4yLDIuMy0xLjIsMi4zCgkJCQkJbC0yLjMsMC4zYy0wLjIsMC0wLjMsMC4xLTAuMywwLjJjMCwwLjEsMCwwLjEsMC4xLDAuMmwxLjYsMS43bC0wLjQsMi40djAuMWMwLDAuMSwwLjEsMC4yLDAuMiwwLjJzMi4zLTEuMiwyLjMtMS4yCgkJCQkJczIuMiwxLjIsMi4zLDEuMnMwLjItMC4xLDAuMi0wLjJ2LTAuMWwtMC40LTIuNEMxOS44LDEyLjksMjEuNiwxMS4xLDIxLjYsMTF6Ii8+CgkJCTwvZz4KCQk8L2c+Cgk8L2c+Cgk8Zz4KCQk8Zz4KCQkJPGc+CgkJCQk8ZGVmcz4KCQkJCQk8cmVjdCBpZD0iU1ZHSURfM18iIHk9IjAiIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIvPgoJCQkJPC9kZWZzPgoJCQkJPGNsaXBQYXRoIGlkPSJTVkdJRF80XyI+CgkJCQkJPHVzZSB4bGluazpocmVmPSIjU1ZHSURfM18iICBzdHlsZT0ib3ZlcmZsb3c6dmlzaWJsZTsiLz4KCQkJCTwvY2xpcFBhdGg+CgkJCQk8cGF0aCBjbGFzcz0ic3QxIiBkPSJNMTIuNywxMi40Yy0wLjUtMC41LTAuNi0xLjEtMC42LTEuNGMwLTAuMiwwLTAuMywwLjEtMC41aC04Yy0xLDAtMS44LDAuOC0xLjgsMS44bDAsMGMwLDEsMC44LDEuOCwxLjgsMS44CgkJCQkJaDkuNWwwLjEtMC43TDEyLjcsMTIuNHoiLz4KCQkJPC9nPgoJCTwvZz4KCTwvZz4KPC9nPgo8L3N2Zz4K",
  "H5P.MultiMediaChoice-0.3/assets/placeholder1to1.svg":
    "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4KPCEtLSBHZW5lcmF0b3I6IEFkb2JlIElsbHVzdHJhdG9yIDI1LjMuMSwgU1ZHIEV4cG9ydCBQbHVnLUluIC4gU1ZHIFZlcnNpb246IDYuMDAgQnVpbGQgMCkgIC0tPgo8c3ZnIHZlcnNpb249IjEuMSIgaWQ9IkxheWVyXzEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHg9IjBweCIgeT0iMHB4IgoJIHZpZXdCb3g9IjAgMCA1MDAgNTAwIiBzdHlsZT0iZW5hYmxlLWJhY2tncm91bmQ6bmV3IDAgMCA1MDAgNTAwOyIgeG1sOnNwYWNlPSJwcmVzZXJ2ZSI+CjxzdHlsZSB0eXBlPSJ0ZXh0L2NzcyI+Cgkuc3Qwe2ZpbGw6I0RDRTJFOTt9Cgkuc3Qxe2ZpbGw6I0FEQjNCQTt9Cgkuc3Qye2ZpbGw6I0I2QkNDMjt9Cjwvc3R5bGU+CjxyZWN0IGNsYXNzPSJzdDAiIHdpZHRoPSI1MDAiIGhlaWdodD0iNTAwIi8+Cjxwb2x5Z29uIGNsYXNzPSJzdDEiIHBvaW50cz0iMjU1LjIsNTAwIDI1NS4yLDM5OC44IDEyMi43LDMxNy40IDAsNDA0LjggMCw1MDAgIi8+Cjxwb2x5Z29uIGNsYXNzPSJzdDIiIHBvaW50cz0iMCw0MzYuMyAxNDUuNSwzMzIuNSAxMjMuMSwzMTcgMCw0MDMuNSAiLz4KPHBhdGggY2xhc3M9InN0MiIgZD0iTTY0LDBjMzEsNzcuMiwxMDYuNCwxMzEuNywxOTQuNywxMzEuN2M4OC4yLDAsMTYzLjctNTQuNiwxOTQuNi0xMzEuN0g2NHoiLz4KPGc+Cgk8Zz4KCQk8cGF0aCBjbGFzcz0ic3QxIiBkPSJNMjg1LjEsMEwxNDcsOTkuM2MzMi4zLDIwLjQsNzAuNiwzMi4yLDExMS43LDMyLjJjODguMiwwLDE2My42LTU0LjQsMTk0LjYtMTMxLjZIMjg1LjF6Ii8+Cgk8L2c+CjwvZz4KPHBvbHlnb24gY2xhc3M9InN0MSIgcG9pbnRzPSI1MDAsMzE3LjUgNDA3LjMsMjYwLjYgNzEuMSw1MDAgNTAwLDUwMCAiLz4KPHBvbHlnb24gY2xhc3M9InN0MiIgcG9pbnRzPSIxMjkuNSw1MDAgNDM3LjEsMjgwLjQgNDA3LjgsMjYwLjEgNjYuMyw1MDAgIi8+Cjwvc3ZnPgo=",
  "H5P.MultiMediaChoice-0.3/assets/placeholder16to9.svg":
    "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4KPCEtLSBHZW5lcmF0b3I6IEFkb2JlIElsbHVzdHJhdG9yIDI1LjMuMSwgU1ZHIEV4cG9ydCBQbHVnLUluIC4gU1ZHIFZlcnNpb246IDYuMDAgQnVpbGQgMCkgIC0tPgo8c3ZnIHZlcnNpb249IjEuMSIgaWQ9IkxheWVyXzEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHg9IjBweCIgeT0iMHB4IgoJIHZpZXdCb3g9IjAgMCA2NDAgMzYwIiBzdHlsZT0iZW5hYmxlLWJhY2tncm91bmQ6bmV3IDAgMCA2NDAgMzYwOyIgeG1sOnNwYWNlPSJwcmVzZXJ2ZSI+CjxzdHlsZSB0eXBlPSJ0ZXh0L2NzcyI+Cgkuc3Qwe2ZpbGw6I0RDRTJFOTt9Cgkuc3Qxe2ZpbGw6I0FEQjNCQTt9Cgkuc3Qye2ZpbGw6I0I2QkNDMjt9Cjwvc3R5bGU+CjxyZWN0IHg9IjAuMSIgY2xhc3M9InN0MCIgd2lkdGg9IjYzOS44IiBoZWlnaHQ9IjMyNy4yIi8+Cjxwb2x5Z29uIGNsYXNzPSJzdDEiIHBvaW50cz0iMzc0LjEsMzYwLjEgMzc0LjEsMjcxLjIgMjU4LDE5OS43IDMyLjksMzYwLjEgIi8+Cjxwb2x5Z29uIGNsYXNzPSJzdDEiIHBvaW50cz0iNjM5LjksMjA2LjUgNTIwLjIsMTM0LjQgMjAzLjcsMzYwLjEgNjM5LjksMzYwLjEgIi8+Cjxwb2x5Z29uIGNsYXNzPSJzdDEiIHBvaW50cz0iMjc4LjQsMzYwLjEgNzMuNSwyMTMuOSAwLjEsMjY4LjEgMC4xLDM2MC4xICIvPgo8cG9seWdvbiBjbGFzcz0ic3QyIiBwb2ludHM9IjAuMSwyOTIuOCA5My4xLDIyOC40IDcyLjYsMjE1LjEgMC4xLDI2OC40ICIvPgo8cG9seWdvbiBjbGFzcz0ic3QyIiBwb2ludHM9IjI2Mi43LDM2MC4xIDU0OC4zLDE1My4xIDUyMC4yLDEzNC40IDIwNi42LDM2MC4xICIvPgo8cG9seWdvbiBjbGFzcz0ic3QyIiBwb2ludHM9IjcxLjksMzYwLjEgMjc3LjksMjEzIDI1OC4zLDE5OS40IDI5LjcsMzYwLjEgIi8+CjxwYXRoIGNsYXNzPSJzdDIiIGQ9Ik04MSwwYzIyLjEsNTQuNSw3NS40LDkzLDEzNy43LDkzUzMzNC41LDU0LjUsMzU2LjUsMEg4MXoiLz4KPGc+Cgk8Zz4KCQk8cGF0aCBjbGFzcz0ic3QxIiBkPSJNMjM2LjksMGwtOTcuMyw3MGMyMi45LDE0LjUsNTAsMjIuOSw3OS4xLDIyLjljNjIuMywwLDExNS43LTM4LjQsMTM3LjctOTIuOUgyMzYuOXoiLz4KCTwvZz4KPC9nPgo8L3N2Zz4K",
  "H5P.MultiMediaChoice-0.3/assets/placeholder3to2.svg":
    "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4KPCEtLSBHZW5lcmF0b3I6IEFkb2JlIElsbHVzdHJhdG9yIDI1LjMuMSwgU1ZHIEV4cG9ydCBQbHVnLUluIC4gU1ZHIFZlcnNpb246IDYuMDAgQnVpbGQgMCkgIC0tPgo8c3ZnIHZlcnNpb249IjEuMSIgaWQ9IkxheWVyXzEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHg9IjBweCIgeT0iMHB4IgoJIHZpZXdCb3g9IjAgMCAzMDAgMjAwIiBzdHlsZT0iZW5hYmxlLWJhY2tncm91bmQ6bmV3IDAgMCAzMDAgMjAwOyIgeG1sOnNwYWNlPSJwcmVzZXJ2ZSI+CjxzdHlsZSB0eXBlPSJ0ZXh0L2NzcyI+Cgkuc3Qwe2ZpbGw6I0RDRTJFOTt9Cgkuc3Qxe2ZpbGw6I0FEQjNCQTt9Cgkuc3Qye2ZpbGw6I0I2QkNDMjt9Cjwvc3R5bGU+CjxyZWN0IHg9IjAiIHk9IjAiIGNsYXNzPSJzdDAiIHdpZHRoPSIzMDAuMSIgaGVpZ2h0PSIyMDAuMSIvPgo8cG9seWdvbiBjbGFzcz0ic3QxIiBwb2ludHM9IjIyNy45LDIwMC4xIDIyNy45LDE0Ni42IDE1Ni4yLDEwMi40IDE5LDIwMC4xICIvPgo8cG9seWdvbiBjbGFzcz0ic3QxIiBwb2ludHM9IjMwMC4xLDc1LjEgMTI0LjYsMjAwLjEgMzAwLjEsMjAwLjEgIi8+Cjxwb2x5Z29uIGNsYXNzPSJzdDEiIHBvaW50cz0iMCwyMDAuMSAxNjYuOSwyMDAuMSA0Mi4yLDExMS4zIDAsMTQyLjQgIi8+Cjxwb2x5Z29uIGNsYXNzPSJzdDIiIHBvaW50cz0iMCwxNTcuOCA1NC40LDEyMC4yIDQxLjcsMTEyLjEgMCwxNDIuNSAiLz4KPHBvbHlnb24gY2xhc3M9InN0MiIgcG9pbnRzPSIzMDAuMSw3NS4yIDEyNi40LDIwMC4xIDE2MSwyMDAuMSAzMDAuMSw5OS40ICIvPgo8cG9seWdvbiBjbGFzcz0ic3QyIiBwb2ludHM9IjQzLjIsMjAwLjEgMTY4LjUsMTEwLjYgMTU2LjQsMTAyLjIgMTcuMSwyMDAuMSAiLz4KPHBhdGggY2xhc3M9InN0MiIgZD0iTTUwLjUsMGMxMy43LDMzLjUsNDYuNSw1Ny4xLDg1LDU3LjFjMzguNSwwLDcxLjMtMjMuNyw4NS01Ny4xSDUwLjV6Ii8+CjxnPgoJPGc+CgkJPHBhdGggY2xhc3M9InN0MSIgZD0iTTE0Ni40LDBMODYuNiw0M2MxNC4xLDguOSwzMC45LDE0LjEsNDguOSwxNC4xYzM4LjUsMCw3MS4zLTIzLjYsODUtNTcuMUgxNDYuNHoiLz4KCTwvZz4KPC9nPgo8L3N2Zz4K",
  "H5P.MultiMediaChoice-0.3/assets/placeholder4to3.svg":
    "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4KPCEtLSBHZW5lcmF0b3I6IEFkb2JlIElsbHVzdHJhdG9yIDI1LjMuMSwgU1ZHIEV4cG9ydCBQbHVnLUluIC4gU1ZHIFZlcnNpb246IDYuMDAgQnVpbGQgMCkgIC0tPgo8c3ZnIHZlcnNpb249IjEuMSIgaWQ9IkxheWVyXzEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHg9IjBweCIgeT0iMHB4IgoJIHZpZXdCb3g9IjAgMCA0MDAgMzAwIiBzdHlsZT0iZW5hYmxlLWJhY2tncm91bmQ6bmV3IDAgMCA0MDAgMzAwOyIgeG1sOnNwYWNlPSJwcmVzZXJ2ZSI+CjxzdHlsZSB0eXBlPSJ0ZXh0L2NzcyI+Cgkuc3Qwe2ZpbGw6I0RDRTJFOTt9Cgkuc3Qxe2ZpbGw6I0FEQjNCQTt9Cgkuc3Qye2ZpbGw6I0I2QkNDMjt9Cjwvc3R5bGU+CjxyZWN0IHg9IjAuMSIgeT0iMCIgY2xhc3M9InN0MCIgd2lkdGg9IjQwMCIgaGVpZ2h0PSIzMDAiLz4KPHBvbHlnb24gY2xhc3M9InN0MSIgcG9pbnRzPSIzNDMuMiwzMDAgMzQzLjIsMjE5LjggMjM1LjYsMTUzLjYgMzAuMSwzMDAgIi8+Cjxwb2x5Z29uIGNsYXNzPSJzdDEiIHBvaW50cz0iNDAwLDMwMCA0MDAsMTQ5LjEgMTg4LjIsMzAwICIvPgo8cG9seWdvbiBjbGFzcz0ic3QxIiBwb2ludHM9IjAuMSwzMDAgMjUxLjYsMzAwIDY0LjcsMTY2LjcgMC4xLDIxNC42ICIvPgo8cG9seWdvbiBjbGFzcz0ic3QyIiBwb2ludHM9IjAuMSwyMzcuNCA4MywxODAuMSA2NCwxNjcuOSAwLjEsMjE0LjcgIi8+Cjxwb2x5Z29uIGNsYXNzPSJzdDIiIHBvaW50cz0iMjQyLjksMzAwIDQwMCwxODYuMSA0MDAsMTQ5LjYgMTkxLDMwMCAiLz4KPHBvbHlnb24gY2xhc3M9InN0MiIgcG9pbnRzPSI2Ni4zLDMwMCAyNTQuMSwxNjUuOCAyMzUuOSwxNTMuMyAyNy4yLDMwMCAiLz4KPHBhdGggY2xhc3M9InN0MiIgZD0iTTc3LjcsMEM5OC4zLDUwLjIsMTQ3LjUsODUuNSwyMDUsODUuNWM1Ny41LDAsMTA2LjgtMzUuNCwxMjcuMy04NS41SDc3Ljd6Ii8+CjxnPgoJPGc+CgkJPHBhdGggY2xhc3M9InN0MSIgZD0iTTIyMS4xLDBsLTg5LjQsNjQuMkMxNTIuOSw3Ny43LDE3OCw4NS40LDIwNSw4NS40YzU3LjUsMCwxMDYuNy0zNS4yLDEyNy4yLTg1LjRIMjIxLjF6Ii8+Cgk8L2c+CjwvZz4KPC9zdmc+Cg==",
  "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;
};
