From 099ff6edc6edf12e75225ca4878f1e039dc57ac4 Mon Sep 17 00:00:00 2001 From: Chibuike Nwachukwu Date: Thu, 4 Jan 2024 02:03:53 +0100 Subject: [PATCH 01/16] Adds timer feature with pause/resume and unanswered filter --- README.md | 23 ++ src/docs/index.jsx | 2 + src/lib/Core.jsx | 231 +++++++++++++++---- src/lib/Locale.jsx | 2 + src/lib/Quiz.jsx | 4 + src/lib/core-components/QuizResultFilter.jsx | 27 ++- src/lib/styles.css | 23 ++ 7 files changed, 262 insertions(+), 50 deletions(-) diff --git a/README.md b/README.md index 419139a..b04d8b9 100644 --- a/README.md +++ b/README.md @@ -24,6 +24,9 @@ react-quiz-component is a ReactJS component allowing users to attempt a quiz. - Allow Picture in Question - Scoring System - Shuffling Questions / Answers +- Timer Support +- Support Pause/Resume Timer +- Shows unanswered questions ## Installing @@ -258,6 +261,24 @@ import { quiz } from './quiz'; ``` + +## Timer Feature + +```js +import { quiz } from './quiz'; +... + +``` + + +## Pause/Resume Timer Feature + +```js +import { quiz } from './quiz'; +... + +``` + ## Props |Name|Type|Default|Required|Description| @@ -272,6 +293,8 @@ import { quiz } from './quiz'; |continueTillCorrect|`boolean`|`false`|N|Continue to select an answer until it is correct| |onQuestionSubmit|`function`|`null`|N|A user response for a question will be returned| |disableSynopsis|`boolean`|`false`|N|Disable synopsis before quiz| +|timer|`number`|`false`|N|Sets timer in seconds| +|allowPauseTimer|`boolean`|`false`|N|Pause/Resume timer| ## Contribution diff --git a/src/docs/index.jsx b/src/docs/index.jsx index db5b494..72409b8 100644 --- a/src/docs/index.jsx +++ b/src/docs/index.jsx @@ -20,6 +20,8 @@ function App() { onComplete={setQuizResult} onQuestionSubmit={(obj) => console.log('user question results:', obj)} disableSynopsis + timer={60} + allowPauseTimer /> ); diff --git a/src/lib/Core.jsx b/src/lib/Core.jsx index a7b808d..83b6289 100644 --- a/src/lib/Core.jsx +++ b/src/lib/Core.jsx @@ -10,7 +10,7 @@ import Explanation from './core-components/Explanation'; function Core({ questions, appLocale, showDefaultResult, onComplete, customResultPage, showInstantFeedback, continueTillCorrect, revealAnswerOnSubmit, allowNavigation, - onQuestionSubmit, + onQuestionSubmit, timer, allowPauseTimer, }) { const [incorrectAnswer, setIncorrectAnswer] = useState(false); const [isCorrect, setIsCorrect] = useState(false); @@ -20,6 +20,7 @@ function Core({ const [buttons, setButtons] = useState({}); const [correct, setCorrect] = useState([]); const [incorrect, setIncorrect] = useState([]); + const [unanswered, setUnanswered] = useState([]); const [userInput, setUserInput] = useState([]); const [filteredValue, setFilteredValue] = useState('all'); const [userAttempt, setUserAttempt] = useState(1); @@ -30,6 +31,8 @@ function Core({ const [correctPoints, setCorrectPoints] = useState(0); const [activeQuestion, setActiveQuestion] = useState(questions[currentQuestionIndex]); const [questionSummary, setQuestionSummary] = useState(undefined); + const [timeRemaining, setTimeRemaining] = useState(timer); + const [isRunning, setIsRunning] = useState(true); useEffect(() => { setShowDefaultResult(showDefaultResult !== undefined ? showDefaultResult : true); @@ -47,6 +50,7 @@ function Core({ useEffect(() => { if (endQuiz) { + setIsRunning(false); let totalPointsTemp = 0; let correctPointsTemp = 0; for (let i = 0; i < questions.length; i += 1) { @@ -122,12 +126,24 @@ function Core({ return answers.map((answer, index) => { if (answerSelectionType === 'single') { // correctAnswer - is string - answerBtnCorrectClassName = (`${index + 1}` === correctAnswer ? 'correct' : ''); - answerBtnIncorrectClassName = (`${userInputIndex}` !== correctAnswer && `${index + 1}` === `${userInputIndex}` ? 'incorrect' : ''); + answerBtnCorrectClassName = `${index + 1}` === correctAnswer ? 'correct' : ''; + answerBtnIncorrectClassName = `${userInputIndex}` !== correctAnswer + && `${index + 1}` === `${userInputIndex}` ? 'incorrect' : ''; + + if (userInputIndex === undefined && `${index + 1}` !== correctAnswer) { + answerBtnIncorrectClassName = ' unanswered'; + } } else { // correctAnswer - is array of numbers - answerBtnCorrectClassName = (correctAnswer.includes(index + 1) ? 'correct' : ''); - answerBtnIncorrectClassName = (!correctAnswer.includes(index + 1) && userInputIndex.includes(index + 1) ? 'incorrect' : ''); + answerBtnCorrectClassName = correctAnswer.includes(index + 1) + ? 'correct' + : ''; + answerBtnIncorrectClassName = !correctAnswer.includes(index + 1) + && userInputIndex?.includes(index + 1) ? 'incorrect' : ''; + + if (userInputIndex === undefined && !correctAnswer.includes(index + 1)) { + answerBtnIncorrectClassName = ' unanswered'; + } } return ( @@ -184,25 +200,54 @@ function Core({ if (filteredValue !== 'all') { if (filteredValue === 'correct') { - filteredQuestions = questions.filter((question, index) => correct.indexOf(index) !== -1); - filteredUserInput = userInput.filter((input, index) => correct.indexOf(index) !== -1); - } else { - filteredQuestions = questions.filter((question, index) => incorrect.indexOf(index) !== -1); - filteredUserInput = userInput.filter((input, index) => incorrect.indexOf(index) !== -1); + filteredQuestions = questions.filter( + (question, index) => correct.indexOf(index) !== -1, + ); + filteredUserInput = userInput.filter( + (input, index) => correct.indexOf(index) !== -1, + ); + } else if (filteredValue === 'incorrect') { + filteredQuestions = questions.filter( + (question, index) => incorrect.indexOf(index) !== -1, + ); + filteredUserInput = userInput.filter( + (input, index) => incorrect.indexOf(index) !== -1, + ); + } else if (filteredValue === 'unanswered') { + filteredQuestions = questions.filter( + (question, index) => unanswered.indexOf(index) !== -1, + ); + filteredUserInput = userInput.filter( + (input, index) => unanswered.indexOf(index) !== -1, + ); } } return (filteredQuestions || questions).map((question, index) => { - const userInputIndex = filteredUserInput ? filteredUserInput[index] : userInput[index]; + const userInputIndex = filteredUserInput + ? filteredUserInput[index] + : userInput[index]; // Default single to avoid code breaking due to automatic version upgrade const answerSelectionType = question.answerSelectionType || 'single'; return (
-

', question.point)}`)} /> - {question.questionPic && question} - {renderTags(answerSelectionType, question.correctAnswer.length, question.segment)} +

', question.point)}`, + )} + /> + {question.questionPic && ( + question + )} + {renderTags( + answerSelectionType, + question.correctAnswer.length, + question.segment, + )}
{renderAnswerInResult(question, userInputIndex)}
@@ -292,6 +337,14 @@ function Core({ )); }; + const getUnansweredQuestions = () => { + questions.forEach((question, index) => { + if (userInput[index] === undefined) { + setUnanswered((oldArray) => [...oldArray, index]); + } + }); + }; + const renderResult = () => (

@@ -313,48 +366,132 @@ function Core({ {renderQuizResultQuestions()}

); + + useEffect(() => { + let countdown; + + if (timer && isRunning && timeRemaining > 0) { + countdown = setInterval(() => { + setTimeRemaining((prevTime) => prevTime - 1); + }, 1000); + } + return () => timer && clearInterval(countdown); + }, [isRunning, timeRemaining, timer]); + + const toggleTimer = () => { + setIsRunning(!isRunning); + }; + + const displayTime = (time) => { + const hours = Math.floor(time / 3600); + const minutes = Math.floor((time % 3600) / 60); + const seconds = time % 60; + + return `${hours}:${minutes < 10 ? '0' : ''}${minutes}:${ + seconds < 10 ? '0' : '' + }${seconds}`; + }; + + const handleTimeUp = () => { + setIsRunning(false); + setEndQuiz(true); + getUnansweredQuestions(); + }; + return (
- {!endQuiz - && ( + {timer && !isRunning && ( +
+ Time Taken: + {displayTime(timer - timeRemaining)} +
+ )} + + {timer && isRunning && ( +
+ Time Remaining: + {displayTime(timeRemaining)} +
+ )} + {timer && timeRemaining === 0 && isRunning && handleTimeUp()} + + {!endQuiz && (
-
- -
- {`${appLocale.question} ${(currentQuestionIndex + 1)} / ${questions.length}:`} -
-

', activeQuestion.point)}`)} /> - - {activeQuestion && activeQuestion.questionPic && question} - {activeQuestion && renderTags(answerSelectionTypeState, activeQuestion.correctAnswer.length, activeQuestion.segment)} - {activeQuestion && renderAnswers(activeQuestion, buttons)} - {(showNextQuestionButton || allowNavigation) - && ( -
- {(allowNavigation && currentQuestionIndex > 0) && ( - )} -
+ {isRunning ? ( + <> +

', + activeQuestion.point, + )}`, + )} + /> + {activeQuestion && activeQuestion.questionPic && ( + question + )} + {activeQuestion + && renderTags( + answerSelectionTypeState, + activeQuestion.correctAnswer.length, + activeQuestion.segment, + )} + {activeQuestion && renderAnswers(activeQuestion, buttons)} + {(showNextQuestionButton || allowNavigation) && ( +
+ {allowNavigation && currentQuestionIndex > 0 && ( + + )} + + + +
+ +
+
+ )} + + ) : ( + +
+
+ {appLocale.pauseScreenDisplay} +
)}

- )} + )} {endQuiz && showDefaultResultState && customResultPage === undefined && renderResult()} {endQuiz && !showDefaultResultState && customResultPage !== undefined diff --git a/src/lib/Locale.jsx b/src/lib/Locale.jsx index d78111b..27a3ed3 100644 --- a/src/lib/Locale.jsx +++ b/src/lib/Locale.jsx @@ -5,10 +5,12 @@ const defaultLocale = { resultFilterAll: 'All', resultFilterCorrect: 'Correct', resultFilterIncorrect: 'Incorrect', + resultFilterUnanswered: 'Unanswered', nextQuestionBtn: 'Next', prevQuestionBtn: 'Prev', resultPageHeaderText: 'You have completed the quiz. You got out of questions.', resultPagePoint: 'You scored out of .', + pauseScreenDisplay: 'Test is paused. Clicked the Resume button to continue', singleSelectionTagText: 'Single Selection', multipleSelectionTagText: 'Multiple Selection', pickNumberOfSelection: 'Pick ', diff --git a/src/lib/Quiz.jsx b/src/lib/Quiz.jsx index 82e167d..6cf885e 100644 --- a/src/lib/Quiz.jsx +++ b/src/lib/Quiz.jsx @@ -16,6 +16,8 @@ function Quiz({ allowNavigation, onQuestionSubmit, disableSynopsis, + timer, + allowPauseTimer, }) { const [start, setStart] = useState(false); const [questions, setQuestions] = useState(quiz.questions); @@ -208,6 +210,8 @@ function Quiz({ allowNavigation={allowNavigation} appLocale={appLocale} onQuestionSubmit={onQuestionSubmit} + timer={timer} + allowPauseTimer={allowPauseTimer} /> )}
diff --git a/src/lib/core-components/QuizResultFilter.jsx b/src/lib/core-components/QuizResultFilter.jsx index d1ad32f..3866d38 100644 --- a/src/lib/core-components/QuizResultFilter.jsx +++ b/src/lib/core-components/QuizResultFilter.jsx @@ -55,7 +55,9 @@ function QuizResultFilter({ filteredValue, handleChange, appLocale }) { aria-labelledby="quiz-filter" >
handleOptionClick('all')} onKeyDown={(e) => { if (e.key === 'Enter') { @@ -68,7 +70,9 @@ function QuizResultFilter({ filteredValue, handleChange, appLocale }) { {appLocale.resultFilterAll}
handleOptionClick('correct')} onKeyDown={(e) => { if (e.key === 'Enter') { @@ -81,7 +85,9 @@ function QuizResultFilter({ filteredValue, handleChange, appLocale }) { {appLocale.resultFilterCorrect}
handleOptionClick('incorrect')} onKeyDown={(e) => { if (e.key === 'Enter') { @@ -93,6 +99,21 @@ function QuizResultFilter({ filteredValue, handleChange, appLocale }) { > {appLocale.resultFilterIncorrect}
+
handleOptionClick('unanswered')} + onKeyDown={(e) => { + if (e.key === 'Enter') { + handleOptionClick('unanswered'); + } + }} + role="menuitem" + tabIndex={0} + > + {appLocale.resultFilterUnanswered} +

)} diff --git a/src/lib/styles.css b/src/lib/styles.css index 1edf030..2997087 100644 --- a/src/lib/styles.css +++ b/src/lib/styles.css @@ -41,6 +41,24 @@ color: white; } +.timerBtn { + background: green; + border: 0 !important; + width: 80px; + color: #fff; + padding: 5px; + margin-bottom: 10px; + border-radius: 10px; + position: relative; + float: right; + cursor: pointer; +} + +.timerPauseScreen { + font-size: 30px; +} + + .react-quiz-container .questionModal .alert { padding: 20px; margin-bottom: 21px; @@ -58,6 +76,11 @@ color: white; } +.react-quiz-container .unanswered { + background: grey; + color: white; +} + .react-quiz-container .questionWrapper img { width: 100%; } From 1c8070654bba2d5e799b7474d9f998b7ed3eea40 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Thu, 4 Jan 2024 13:48:25 +0000 Subject: [PATCH 02/16] fix(deps): update dependency dompurify to v3.0.7 --- package-lock.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/package-lock.json b/package-lock.json index 55329d4..127130a 100644 --- a/package-lock.json +++ b/package-lock.json @@ -4571,9 +4571,9 @@ } }, "node_modules/dompurify": { - "version": "3.0.6", - "resolved": "https://registry.npmjs.org/dompurify/-/dompurify-3.0.6.tgz", - "integrity": "sha512-ilkD8YEnnGh1zJ240uJsW7AzE+2qpbOUYjacomn3AvJ6J4JhKGSZ2nh4wUIXPZrEPppaCLx5jFe8T89Rk8tQ7w==" + "version": "3.0.7", + "resolved": "https://registry.npmjs.org/dompurify/-/dompurify-3.0.7.tgz", + "integrity": "sha512-BViYTZoqP3ak/ULKOc101y+CtHDUvBsVgSxIF1ku0HmK6BRf+C03MC+tArMvOPtVtZp83DDh5puywKDu4sbVjQ==" }, "node_modules/domutils": { "version": "2.8.0", From d3f36549d4b280350c985ee776c467c06e5deecc Mon Sep 17 00:00:00 2001 From: Chibuike Nwachukwu Date: Thu, 4 Jan 2024 15:05:13 +0100 Subject: [PATCH 03/16] Resolves issues --- src/lib/Core.jsx | 66 ++++++++++++++++++++-------------------------- src/lib/Locale.jsx | 4 +++ src/lib/Quiz.jsx | 10 +++++++ src/lib/styles.css | 2 +- 4 files changed, 44 insertions(+), 38 deletions(-) diff --git a/src/lib/Core.jsx b/src/lib/Core.jsx index 83b6289..afa32db 100644 --- a/src/lib/Core.jsx +++ b/src/lib/Core.jsx @@ -131,7 +131,7 @@ function Core({ && `${index + 1}` === `${userInputIndex}` ? 'incorrect' : ''; if (userInputIndex === undefined && `${index + 1}` !== correctAnswer) { - answerBtnIncorrectClassName = ' unanswered'; + answerBtnIncorrectClassName = 'unanswered'; } } else { // correctAnswer - is array of numbers @@ -142,7 +142,7 @@ function Core({ && userInputIndex?.includes(index + 1) ? 'incorrect' : ''; if (userInputIndex === undefined && !correctAnswer.includes(index + 1)) { - answerBtnIncorrectClassName = ' unanswered'; + answerBtnIncorrectClassName = 'unanswered'; } } @@ -199,28 +199,18 @@ function Core({ let filteredUserInput; if (filteredValue !== 'all') { + let targetQuestions = unanswered; if (filteredValue === 'correct') { - filteredQuestions = questions.filter( - (question, index) => correct.indexOf(index) !== -1, - ); - filteredUserInput = userInput.filter( - (input, index) => correct.indexOf(index) !== -1, - ); + targetQuestions = correct; } else if (filteredValue === 'incorrect') { - filteredQuestions = questions.filter( - (question, index) => incorrect.indexOf(index) !== -1, - ); - filteredUserInput = userInput.filter( - (input, index) => incorrect.indexOf(index) !== -1, - ); - } else if (filteredValue === 'unanswered') { - filteredQuestions = questions.filter( - (question, index) => unanswered.indexOf(index) !== -1, - ); - filteredUserInput = userInput.filter( - (input, index) => unanswered.indexOf(index) !== -1, - ); + targetQuestions = incorrect; } + filteredQuestions = questions.filter( + (_, index) => targetQuestions.indexOf(index) !== -1, + ); + filteredUserInput = userInput.filter( + (_, index) => targetQuestions.indexOf(index) !== -1, + ); } return (filteredQuestions || questions).map((question, index) => { @@ -382,13 +372,14 @@ function Core({ setIsRunning(!isRunning); }; + const formatTime = (time) => (time < 10 ? '0' : ''); const displayTime = (time) => { const hours = Math.floor(time / 3600); const minutes = Math.floor((time % 3600) / 60); const seconds = time % 60; - return `${hours}:${minutes < 10 ? '0' : ''}${minutes}:${ - seconds < 10 ? '0' : '' + return `${formatTime(hours)}${hours}:${formatTime(minutes)}${minutes}:${ + formatTime(seconds) }${seconds}`; }; @@ -402,14 +393,16 @@ function Core({
{timer && !isRunning && (
- Time Taken: + {appLocale.timerTimeTaken} + : {displayTime(timer - timeRemaining)}
)} {timer && isRunning && (
- Time Remaining: + {appLocale.timerTimeRemaining} + : {displayTime(timeRemaining)}
)} @@ -424,7 +417,7 @@ function Core({
{timer && allowPauseTimer && ( )}
@@ -449,6 +442,16 @@ function Core({ activeQuestion.correctAnswer.length, activeQuestion.segment, )} +
+ +
{activeQuestion && renderAnswers(activeQuestion, buttons)} {(showNextQuestionButton || allowNavigation) && (
@@ -469,17 +472,6 @@ function Core({ > {appLocale.nextQuestionBtn} - -
- -
)} diff --git a/src/lib/Locale.jsx b/src/lib/Locale.jsx index 27a3ed3..e6f213e 100644 --- a/src/lib/Locale.jsx +++ b/src/lib/Locale.jsx @@ -11,6 +11,10 @@ const defaultLocale = { resultPageHeaderText: 'You have completed the quiz. You got out of questions.', resultPagePoint: 'You scored out of .', pauseScreenDisplay: 'Test is paused. Clicked the Resume button to continue', + timerTimeRemaining: 'Time Remaining', + timerTimeTaken: 'Time Taken', + pauseScreenPause: 'Pause', + pauseScreenResume: 'Resume', singleSelectionTagText: 'Single Selection', multipleSelectionTagText: 'Multiple Selection', pickNumberOfSelection: 'Pick ', diff --git a/src/lib/Quiz.jsx b/src/lib/Quiz.jsx index 6cf885e..e73367c 100644 --- a/src/lib/Quiz.jsx +++ b/src/lib/Quiz.jsx @@ -98,6 +98,16 @@ function Quiz({ return false; } + if ((timer && typeof timer !== 'number') || (timer < 1)) { + console.error(timer && typeof timer !== 'number' ? 'timer must be a number' : 'timer must be a number greater than 0'); + return false; + } + + if (allowPauseTimer && typeof allowPauseTimer !== 'boolean') { + console.error('allowPauseTimer must be a Boolean'); + return false; + } + for (let i = 0; i < questions.length; i += 1) { const { question, diff --git a/src/lib/styles.css b/src/lib/styles.css index 2997087..442ccb3 100644 --- a/src/lib/styles.css +++ b/src/lib/styles.css @@ -47,7 +47,7 @@ width: 80px; color: #fff; padding: 5px; - margin-bottom: 10px; + top: -35px; border-radius: 10px; position: relative; float: right; From 80c9a45b340865244a443cd463993a7f4f5756f2 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Fri, 5 Jan 2024 08:04:32 +0000 Subject: [PATCH 04/16] chore(deps): update dependency rollup to v4.9.3 --- package-lock.json | 119 ++++++++++++++++++++++++---------------------- 1 file changed, 61 insertions(+), 58 deletions(-) diff --git a/package-lock.json b/package-lock.json index 127130a..cf53b02 100644 --- a/package-lock.json +++ b/package-lock.json @@ -2406,9 +2406,9 @@ "dev": true }, "node_modules/@rollup/rollup-android-arm-eabi": { - "version": "4.9.2", - "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.9.2.tgz", - "integrity": "sha512-RKzxFxBHq9ysZ83fn8Iduv3A283K7zPPYuhL/z9CQuyFrjwpErJx0h4aeb/bnJ+q29GRLgJpY66ceQ/Wcsn3wA==", + "version": "4.9.3", + "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.9.3.tgz", + "integrity": "sha512-nvh9bB41vXEoKKvlWCGptpGt8EhrEwPQFDCY0VAto+R+qpSbaErPS3OjMZuXR8i/2UVw952Dtlnl2JFxH31Qvg==", "cpu": [ "arm" ], @@ -2419,9 +2419,9 @@ ] }, "node_modules/@rollup/rollup-android-arm64": { - "version": "4.9.2", - "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm64/-/rollup-android-arm64-4.9.2.tgz", - "integrity": "sha512-yZ+MUbnwf3SHNWQKJyWh88ii2HbuHCFQnAYTeeO1Nb8SyEiWASEi5dQUygt3ClHWtA9My9RQAYkjvrsZ0WK8Xg==", + "version": "4.9.3", + "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm64/-/rollup-android-arm64-4.9.3.tgz", + "integrity": "sha512-kffYCJ2RhDL1DlshLzYPyJtVeusHlA8Q1j6k6s4AEVKLq/3HfGa2ADDycLsmPo3OW83r4XtOPqRMbcFzFsEIzQ==", "cpu": [ "arm64" ], @@ -2432,9 +2432,9 @@ ] }, "node_modules/@rollup/rollup-darwin-arm64": { - "version": "4.9.2", - "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.9.2.tgz", - "integrity": "sha512-vqJ/pAUh95FLc/G/3+xPqlSBgilPnauVf2EXOQCZzhZJCXDXt/5A8mH/OzU6iWhb3CNk5hPJrh8pqJUPldN5zw==", + "version": "4.9.3", + "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.9.3.tgz", + "integrity": "sha512-Fo7DR6Q9/+ztTyMBZ79+WJtb8RWZonyCgkBCjV51rW5K/dizBzImTW6HLC0pzmHaAevwM0jW1GtB5LCFE81mSw==", "cpu": [ "arm64" ], @@ -2445,9 +2445,9 @@ ] }, "node_modules/@rollup/rollup-darwin-x64": { - "version": "4.9.2", - "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-x64/-/rollup-darwin-x64-4.9.2.tgz", - "integrity": "sha512-otPHsN5LlvedOprd3SdfrRNhOahhVBwJpepVKUN58L0RnC29vOAej1vMEaVU6DadnpjivVsNTM5eNt0CcwTahw==", + "version": "4.9.3", + "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-x64/-/rollup-darwin-x64-4.9.3.tgz", + "integrity": "sha512-5HcxDF9fqHucIlTiw/gmMb3Qv23L8bLCg904I74Q2lpl4j/20z9ogaD3tWkeguRuz+/17cuS321PT3PAuyjQdg==", "cpu": [ "x64" ], @@ -2458,9 +2458,9 @@ ] }, "node_modules/@rollup/rollup-linux-arm-gnueabihf": { - "version": "4.9.2", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-gnueabihf/-/rollup-linux-arm-gnueabihf-4.9.2.tgz", - "integrity": "sha512-ewG5yJSp+zYKBYQLbd1CUA7b1lSfIdo9zJShNTyc2ZP1rcPrqyZcNlsHgs7v1zhgfdS+kW0p5frc0aVqhZCiYQ==", + "version": "4.9.3", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-gnueabihf/-/rollup-linux-arm-gnueabihf-4.9.3.tgz", + "integrity": "sha512-cO6hKV+99D1V7uNJQn1chWaF9EGp7qV2N8sGH99q9Y62bsbN6Il55EwJppEWT+JiqDRg396vWCgwdHwje8itBQ==", "cpu": [ "arm" ], @@ -2471,9 +2471,9 @@ ] }, "node_modules/@rollup/rollup-linux-arm64-gnu": { - "version": "4.9.2", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-gnu/-/rollup-linux-arm64-gnu-4.9.2.tgz", - "integrity": "sha512-pL6QtV26W52aCWTG1IuFV3FMPL1m4wbsRG+qijIvgFO/VBsiXJjDPE/uiMdHBAO6YcpV4KvpKtd0v3WFbaxBtg==", + "version": "4.9.3", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-gnu/-/rollup-linux-arm64-gnu-4.9.3.tgz", + "integrity": "sha512-xANyq6lVg6KMO8UUs0LjA4q7di3tPpDbzLPgVEU2/F1ngIZ54eli8Zdt3uUUTMXVbgTCafIO+JPeGMhu097i3w==", "cpu": [ "arm64" ], @@ -2484,9 +2484,9 @@ ] }, "node_modules/@rollup/rollup-linux-arm64-musl": { - "version": "4.9.2", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-musl/-/rollup-linux-arm64-musl-4.9.2.tgz", - "integrity": "sha512-On+cc5EpOaTwPSNetHXBuqylDW+765G/oqB9xGmWU3npEhCh8xu0xqHGUA+4xwZLqBbIZNcBlKSIYfkBm6ko7g==", + "version": "4.9.3", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-musl/-/rollup-linux-arm64-musl-4.9.3.tgz", + "integrity": "sha512-TZJUfRTugVFATQToCMD8DNV6jv/KpSwhE1lLq5kXiQbBX3Pqw6dRKtzNkh5wcp0n09reBBq/7CGDERRw9KmE+g==", "cpu": [ "arm64" ], @@ -2497,9 +2497,9 @@ ] }, "node_modules/@rollup/rollup-linux-riscv64-gnu": { - "version": "4.9.2", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-gnu/-/rollup-linux-riscv64-gnu-4.9.2.tgz", - "integrity": "sha512-Wnx/IVMSZ31D/cO9HSsU46FjrPWHqtdF8+0eyZ1zIB5a6hXaZXghUKpRrC4D5DcRTZOjml2oBhXoqfGYyXKipw==", + "version": "4.9.3", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-gnu/-/rollup-linux-riscv64-gnu-4.9.3.tgz", + "integrity": "sha512-4/QVaRyaB5tkEAGfjVvWrmWdPF6F2NoaoO5uEP7N0AyeBw7l8SeCWWKAGrbx/00PUdHrJVURJiYikazslSKttQ==", "cpu": [ "riscv64" ], @@ -2510,9 +2510,9 @@ ] }, "node_modules/@rollup/rollup-linux-x64-gnu": { - "version": "4.9.2", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.9.2.tgz", - "integrity": "sha512-ym5x1cj4mUAMBummxxRkI4pG5Vht1QMsJexwGP8547TZ0sox9fCLDHw9KCH9c1FO5d9GopvkaJsBIOkTKxksdw==", + "version": "4.9.3", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.9.3.tgz", + "integrity": "sha512-koLC6D3pj1YLZSkTy/jsk3HOadp7q2h6VQl/lPX854twOmmLNekHB6yuS+MkWcKdGGdW1JPuPBv/ZYhr5Yhtdg==", "cpu": [ "x64" ], @@ -2523,9 +2523,9 @@ ] }, "node_modules/@rollup/rollup-linux-x64-musl": { - "version": "4.9.2", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-musl/-/rollup-linux-x64-musl-4.9.2.tgz", - "integrity": "sha512-m0hYELHGXdYx64D6IDDg/1vOJEaiV8f1G/iO+tejvRCJNSwK4jJ15e38JQy5Q6dGkn1M/9KcyEOwqmlZ2kqaZg==", + "version": "4.9.3", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-musl/-/rollup-linux-x64-musl-4.9.3.tgz", + "integrity": "sha512-0OAkQ4HBp+JO2ip2Lgt/ShlrveOMzyhwt2D0KvqH28jFPqfZco28KSq76zymZwmU+F6GRojdxtQMJiNSXKNzeA==", "cpu": [ "x64" ], @@ -2536,9 +2536,9 @@ ] }, "node_modules/@rollup/rollup-win32-arm64-msvc": { - "version": "4.9.2", - "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-arm64-msvc/-/rollup-win32-arm64-msvc-4.9.2.tgz", - "integrity": "sha512-x1CWburlbN5JjG+juenuNa4KdedBdXLjZMp56nHFSHTOsb/MI2DYiGzLtRGHNMyydPGffGId+VgjOMrcltOksA==", + "version": "4.9.3", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-arm64-msvc/-/rollup-win32-arm64-msvc-4.9.3.tgz", + "integrity": "sha512-z5uvoMvdRWggigOnsb9OOCLERHV0ykRZoRB5O+URPZC9zM3pkoMg5fN4NKu2oHqgkzZtfx9u4njqqlYEzM1v9A==", "cpu": [ "arm64" ], @@ -2549,9 +2549,9 @@ ] }, "node_modules/@rollup/rollup-win32-ia32-msvc": { - "version": "4.9.2", - "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-ia32-msvc/-/rollup-win32-ia32-msvc-4.9.2.tgz", - "integrity": "sha512-VVzCB5yXR1QlfsH1Xw1zdzQ4Pxuzv+CPr5qpElpKhVxlxD3CRdfubAG9mJROl6/dmj5gVYDDWk8sC+j9BI9/kQ==", + "version": "4.9.3", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-ia32-msvc/-/rollup-win32-ia32-msvc-4.9.3.tgz", + "integrity": "sha512-wxomCHjBVKws+O4N1WLnniKCXu7vkLtdq9Fl9CN/EbwEldojvUrkoHE/fBLZzC7IT/x12Ut6d6cRs4dFvqJkMg==", "cpu": [ "ia32" ], @@ -2562,9 +2562,9 @@ ] }, "node_modules/@rollup/rollup-win32-x64-msvc": { - "version": "4.9.2", - "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.9.2.tgz", - "integrity": "sha512-SYRedJi+mweatroB+6TTnJYLts0L0bosg531xnQWtklOI6dezEagx4Q0qDyvRdK+qgdA3YZpjjGuPFtxBmddBA==", + "version": "4.9.3", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.9.3.tgz", + "integrity": "sha512-1Qf/qk/iEtx0aOi+AQQt5PBoW0mFngsm7bPuxHClC/hWh2hHBktR6ktSfUg5b5rC9v8hTwNmHE7lBWXkgqluUQ==", "cpu": [ "x64" ], @@ -2648,9 +2648,9 @@ } }, "node_modules/@types/estree": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.2.tgz", - "integrity": "sha512-VeiPZ9MMwXjO32/Xu7+OwflfmeoRwkE/qzndw42gGtgJwZopBnzy2gD//NN1+go1mADzkDcqf/KnFRSjTJ8xJA==", + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.5.tgz", + "integrity": "sha512-/kYRxGDLWzHOB7q+wtSUQlFrtcdUccpfy+X+9iMBpHK8QLLhx2wIPYuS5DYtR9Wa/YlZAbIovy7qVdB1Aq6Lyw==", "dev": true }, "node_modules/@types/express": { @@ -9056,10 +9056,13 @@ } }, "node_modules/rollup": { - "version": "4.9.2", - "resolved": "https://registry.npmjs.org/rollup/-/rollup-4.9.2.tgz", - "integrity": "sha512-66RB8OtFKUTozmVEh3qyNfH+b+z2RXBVloqO2KCC/pjFaGaHtxP9fVfOQKPSGXg2mElmjmxjW/fZ7iKrEpMH5Q==", + "version": "4.9.3", + "resolved": "https://registry.npmjs.org/rollup/-/rollup-4.9.3.tgz", + "integrity": "sha512-JnchF0ZGFiqGpAPjg3e89j656Ne4tTtCY1VZc1AxtoQcRIxjTu9jyYHBAtkDXE+X681n4un/nX9SU52AroSRzg==", "dev": true, + "dependencies": { + "@types/estree": "1.0.5" + }, "bin": { "rollup": "dist/bin/rollup" }, @@ -9068,19 +9071,19 @@ "npm": ">=8.0.0" }, "optionalDependencies": { - "@rollup/rollup-android-arm-eabi": "4.9.2", - "@rollup/rollup-android-arm64": "4.9.2", - "@rollup/rollup-darwin-arm64": "4.9.2", - "@rollup/rollup-darwin-x64": "4.9.2", - "@rollup/rollup-linux-arm-gnueabihf": "4.9.2", - "@rollup/rollup-linux-arm64-gnu": "4.9.2", - "@rollup/rollup-linux-arm64-musl": "4.9.2", - "@rollup/rollup-linux-riscv64-gnu": "4.9.2", - "@rollup/rollup-linux-x64-gnu": "4.9.2", - "@rollup/rollup-linux-x64-musl": "4.9.2", - "@rollup/rollup-win32-arm64-msvc": "4.9.2", - "@rollup/rollup-win32-ia32-msvc": "4.9.2", - "@rollup/rollup-win32-x64-msvc": "4.9.2", + "@rollup/rollup-android-arm-eabi": "4.9.3", + "@rollup/rollup-android-arm64": "4.9.3", + "@rollup/rollup-darwin-arm64": "4.9.3", + "@rollup/rollup-darwin-x64": "4.9.3", + "@rollup/rollup-linux-arm-gnueabihf": "4.9.3", + "@rollup/rollup-linux-arm64-gnu": "4.9.3", + "@rollup/rollup-linux-arm64-musl": "4.9.3", + "@rollup/rollup-linux-riscv64-gnu": "4.9.3", + "@rollup/rollup-linux-x64-gnu": "4.9.3", + "@rollup/rollup-linux-x64-musl": "4.9.3", + "@rollup/rollup-win32-arm64-msvc": "4.9.3", + "@rollup/rollup-win32-ia32-msvc": "4.9.3", + "@rollup/rollup-win32-x64-msvc": "4.9.3", "fsevents": "~2.3.2" } }, From f01a5a207a43f5ef8a0a35059877d24c8f50f56a Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Fri, 5 Jan 2024 18:15:45 +0000 Subject: [PATCH 05/16] fix(deps): update dependency dompurify to v3.0.8 --- package-lock.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/package-lock.json b/package-lock.json index cf53b02..ba82e07 100644 --- a/package-lock.json +++ b/package-lock.json @@ -4571,9 +4571,9 @@ } }, "node_modules/dompurify": { - "version": "3.0.7", - "resolved": "https://registry.npmjs.org/dompurify/-/dompurify-3.0.7.tgz", - "integrity": "sha512-BViYTZoqP3ak/ULKOc101y+CtHDUvBsVgSxIF1ku0HmK6BRf+C03MC+tArMvOPtVtZp83DDh5puywKDu4sbVjQ==" + "version": "3.0.8", + "resolved": "https://registry.npmjs.org/dompurify/-/dompurify-3.0.8.tgz", + "integrity": "sha512-b7uwreMYL2eZhrSCRC4ahLTeZcPZxSmYfmcQGXGkXiZSNW1X85v+SDM5KsWcpivIiUBH47Ji7NtyUdpLeF5JZQ==" }, "node_modules/domutils": { "version": "2.8.0", From 80deafda76e4dcdece68c5fa751c0f696f55127d Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Sat, 6 Jan 2024 11:23:07 +0000 Subject: [PATCH 06/16] chore(deps): update dependency rollup to v4.9.4 --- package-lock.json | 110 +++++++++++++++++++++++----------------------- 1 file changed, 55 insertions(+), 55 deletions(-) diff --git a/package-lock.json b/package-lock.json index ba82e07..b3be0a8 100644 --- a/package-lock.json +++ b/package-lock.json @@ -2406,9 +2406,9 @@ "dev": true }, "node_modules/@rollup/rollup-android-arm-eabi": { - "version": "4.9.3", - "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.9.3.tgz", - "integrity": "sha512-nvh9bB41vXEoKKvlWCGptpGt8EhrEwPQFDCY0VAto+R+qpSbaErPS3OjMZuXR8i/2UVw952Dtlnl2JFxH31Qvg==", + "version": "4.9.4", + "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.9.4.tgz", + "integrity": "sha512-ub/SN3yWqIv5CWiAZPHVS1DloyZsJbtXmX4HxUTIpS0BHm9pW5iYBo2mIZi+hE3AeiTzHz33blwSnhdUo+9NpA==", "cpu": [ "arm" ], @@ -2419,9 +2419,9 @@ ] }, "node_modules/@rollup/rollup-android-arm64": { - "version": "4.9.3", - "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm64/-/rollup-android-arm64-4.9.3.tgz", - "integrity": "sha512-kffYCJ2RhDL1DlshLzYPyJtVeusHlA8Q1j6k6s4AEVKLq/3HfGa2ADDycLsmPo3OW83r4XtOPqRMbcFzFsEIzQ==", + "version": "4.9.4", + "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm64/-/rollup-android-arm64-4.9.4.tgz", + "integrity": "sha512-ehcBrOR5XTl0W0t2WxfTyHCR/3Cq2jfb+I4W+Ch8Y9b5G+vbAecVv0Fx/J1QKktOrgUYsIKxWAKgIpvw56IFNA==", "cpu": [ "arm64" ], @@ -2432,9 +2432,9 @@ ] }, "node_modules/@rollup/rollup-darwin-arm64": { - "version": "4.9.3", - "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.9.3.tgz", - "integrity": "sha512-Fo7DR6Q9/+ztTyMBZ79+WJtb8RWZonyCgkBCjV51rW5K/dizBzImTW6HLC0pzmHaAevwM0jW1GtB5LCFE81mSw==", + "version": "4.9.4", + "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.9.4.tgz", + "integrity": "sha512-1fzh1lWExwSTWy8vJPnNbNM02WZDS8AW3McEOb7wW+nPChLKf3WG2aG7fhaUmfX5FKw9zhsF5+MBwArGyNM7NA==", "cpu": [ "arm64" ], @@ -2445,9 +2445,9 @@ ] }, "node_modules/@rollup/rollup-darwin-x64": { - "version": "4.9.3", - "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-x64/-/rollup-darwin-x64-4.9.3.tgz", - "integrity": "sha512-5HcxDF9fqHucIlTiw/gmMb3Qv23L8bLCg904I74Q2lpl4j/20z9ogaD3tWkeguRuz+/17cuS321PT3PAuyjQdg==", + "version": "4.9.4", + "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-x64/-/rollup-darwin-x64-4.9.4.tgz", + "integrity": "sha512-Gc6cukkF38RcYQ6uPdiXi70JB0f29CwcQ7+r4QpfNpQFVHXRd0DfWFidoGxjSx1DwOETM97JPz1RXL5ISSB0pA==", "cpu": [ "x64" ], @@ -2458,9 +2458,9 @@ ] }, "node_modules/@rollup/rollup-linux-arm-gnueabihf": { - "version": "4.9.3", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-gnueabihf/-/rollup-linux-arm-gnueabihf-4.9.3.tgz", - "integrity": "sha512-cO6hKV+99D1V7uNJQn1chWaF9EGp7qV2N8sGH99q9Y62bsbN6Il55EwJppEWT+JiqDRg396vWCgwdHwje8itBQ==", + "version": "4.9.4", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-gnueabihf/-/rollup-linux-arm-gnueabihf-4.9.4.tgz", + "integrity": "sha512-g21RTeFzoTl8GxosHbnQZ0/JkuFIB13C3T7Y0HtKzOXmoHhewLbVTFBQZu+z5m9STH6FZ7L/oPgU4Nm5ErN2fw==", "cpu": [ "arm" ], @@ -2471,9 +2471,9 @@ ] }, "node_modules/@rollup/rollup-linux-arm64-gnu": { - "version": "4.9.3", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-gnu/-/rollup-linux-arm64-gnu-4.9.3.tgz", - "integrity": "sha512-xANyq6lVg6KMO8UUs0LjA4q7di3tPpDbzLPgVEU2/F1ngIZ54eli8Zdt3uUUTMXVbgTCafIO+JPeGMhu097i3w==", + "version": "4.9.4", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-gnu/-/rollup-linux-arm64-gnu-4.9.4.tgz", + "integrity": "sha512-TVYVWD/SYwWzGGnbfTkrNpdE4HON46orgMNHCivlXmlsSGQOx/OHHYiQcMIOx38/GWgwr/po2LBn7wypkWw/Mg==", "cpu": [ "arm64" ], @@ -2484,9 +2484,9 @@ ] }, "node_modules/@rollup/rollup-linux-arm64-musl": { - "version": "4.9.3", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-musl/-/rollup-linux-arm64-musl-4.9.3.tgz", - "integrity": "sha512-TZJUfRTugVFATQToCMD8DNV6jv/KpSwhE1lLq5kXiQbBX3Pqw6dRKtzNkh5wcp0n09reBBq/7CGDERRw9KmE+g==", + "version": "4.9.4", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-musl/-/rollup-linux-arm64-musl-4.9.4.tgz", + "integrity": "sha512-XcKvuendwizYYhFxpvQ3xVpzje2HHImzg33wL9zvxtj77HvPStbSGI9czrdbfrf8DGMcNNReH9pVZv8qejAQ5A==", "cpu": [ "arm64" ], @@ -2497,9 +2497,9 @@ ] }, "node_modules/@rollup/rollup-linux-riscv64-gnu": { - "version": "4.9.3", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-gnu/-/rollup-linux-riscv64-gnu-4.9.3.tgz", - "integrity": "sha512-4/QVaRyaB5tkEAGfjVvWrmWdPF6F2NoaoO5uEP7N0AyeBw7l8SeCWWKAGrbx/00PUdHrJVURJiYikazslSKttQ==", + "version": "4.9.4", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-gnu/-/rollup-linux-riscv64-gnu-4.9.4.tgz", + "integrity": "sha512-LFHS/8Q+I9YA0yVETyjonMJ3UA+DczeBd/MqNEzsGSTdNvSJa1OJZcSH8GiXLvcizgp9AlHs2walqRcqzjOi3A==", "cpu": [ "riscv64" ], @@ -2510,9 +2510,9 @@ ] }, "node_modules/@rollup/rollup-linux-x64-gnu": { - "version": "4.9.3", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.9.3.tgz", - "integrity": "sha512-koLC6D3pj1YLZSkTy/jsk3HOadp7q2h6VQl/lPX854twOmmLNekHB6yuS+MkWcKdGGdW1JPuPBv/ZYhr5Yhtdg==", + "version": "4.9.4", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.9.4.tgz", + "integrity": "sha512-dIYgo+j1+yfy81i0YVU5KnQrIJZE8ERomx17ReU4GREjGtDW4X+nvkBak2xAUpyqLs4eleDSj3RrV72fQos7zw==", "cpu": [ "x64" ], @@ -2523,9 +2523,9 @@ ] }, "node_modules/@rollup/rollup-linux-x64-musl": { - "version": "4.9.3", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-musl/-/rollup-linux-x64-musl-4.9.3.tgz", - "integrity": "sha512-0OAkQ4HBp+JO2ip2Lgt/ShlrveOMzyhwt2D0KvqH28jFPqfZco28KSq76zymZwmU+F6GRojdxtQMJiNSXKNzeA==", + "version": "4.9.4", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-musl/-/rollup-linux-x64-musl-4.9.4.tgz", + "integrity": "sha512-RoaYxjdHQ5TPjaPrLsfKqR3pakMr3JGqZ+jZM0zP2IkDtsGa4CqYaWSfQmZVgFUCgLrTnzX+cnHS3nfl+kB6ZQ==", "cpu": [ "x64" ], @@ -2536,9 +2536,9 @@ ] }, "node_modules/@rollup/rollup-win32-arm64-msvc": { - "version": "4.9.3", - "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-arm64-msvc/-/rollup-win32-arm64-msvc-4.9.3.tgz", - "integrity": "sha512-z5uvoMvdRWggigOnsb9OOCLERHV0ykRZoRB5O+URPZC9zM3pkoMg5fN4NKu2oHqgkzZtfx9u4njqqlYEzM1v9A==", + "version": "4.9.4", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-arm64-msvc/-/rollup-win32-arm64-msvc-4.9.4.tgz", + "integrity": "sha512-T8Q3XHV+Jjf5e49B4EAaLKV74BbX7/qYBRQ8Wop/+TyyU0k+vSjiLVSHNWdVd1goMjZcbhDmYZUYW5RFqkBNHQ==", "cpu": [ "arm64" ], @@ -2549,9 +2549,9 @@ ] }, "node_modules/@rollup/rollup-win32-ia32-msvc": { - "version": "4.9.3", - "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-ia32-msvc/-/rollup-win32-ia32-msvc-4.9.3.tgz", - "integrity": "sha512-wxomCHjBVKws+O4N1WLnniKCXu7vkLtdq9Fl9CN/EbwEldojvUrkoHE/fBLZzC7IT/x12Ut6d6cRs4dFvqJkMg==", + "version": "4.9.4", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-ia32-msvc/-/rollup-win32-ia32-msvc-4.9.4.tgz", + "integrity": "sha512-z+JQ7JirDUHAsMecVydnBPWLwJjbppU+7LZjffGf+Jvrxq+dVjIE7By163Sc9DKc3ADSU50qPVw0KonBS+a+HQ==", "cpu": [ "ia32" ], @@ -2562,9 +2562,9 @@ ] }, "node_modules/@rollup/rollup-win32-x64-msvc": { - "version": "4.9.3", - "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.9.3.tgz", - "integrity": "sha512-1Qf/qk/iEtx0aOi+AQQt5PBoW0mFngsm7bPuxHClC/hWh2hHBktR6ktSfUg5b5rC9v8hTwNmHE7lBWXkgqluUQ==", + "version": "4.9.4", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.9.4.tgz", + "integrity": "sha512-LfdGXCV9rdEify1oxlN9eamvDSjv9md9ZVMAbNHA87xqIfFCxImxan9qZ8+Un54iK2nnqPlbnSi4R54ONtbWBw==", "cpu": [ "x64" ], @@ -9056,9 +9056,9 @@ } }, "node_modules/rollup": { - "version": "4.9.3", - "resolved": "https://registry.npmjs.org/rollup/-/rollup-4.9.3.tgz", - "integrity": "sha512-JnchF0ZGFiqGpAPjg3e89j656Ne4tTtCY1VZc1AxtoQcRIxjTu9jyYHBAtkDXE+X681n4un/nX9SU52AroSRzg==", + "version": "4.9.4", + "resolved": "https://registry.npmjs.org/rollup/-/rollup-4.9.4.tgz", + "integrity": "sha512-2ztU7pY/lrQyXSCnnoU4ICjT/tCG9cdH3/G25ERqE3Lst6vl2BCM5hL2Nw+sslAvAf+ccKsAq1SkKQALyqhR7g==", "dev": true, "dependencies": { "@types/estree": "1.0.5" @@ -9071,19 +9071,19 @@ "npm": ">=8.0.0" }, "optionalDependencies": { - "@rollup/rollup-android-arm-eabi": "4.9.3", - "@rollup/rollup-android-arm64": "4.9.3", - "@rollup/rollup-darwin-arm64": "4.9.3", - "@rollup/rollup-darwin-x64": "4.9.3", - "@rollup/rollup-linux-arm-gnueabihf": "4.9.3", - "@rollup/rollup-linux-arm64-gnu": "4.9.3", - "@rollup/rollup-linux-arm64-musl": "4.9.3", - "@rollup/rollup-linux-riscv64-gnu": "4.9.3", - "@rollup/rollup-linux-x64-gnu": "4.9.3", - "@rollup/rollup-linux-x64-musl": "4.9.3", - "@rollup/rollup-win32-arm64-msvc": "4.9.3", - "@rollup/rollup-win32-ia32-msvc": "4.9.3", - "@rollup/rollup-win32-x64-msvc": "4.9.3", + "@rollup/rollup-android-arm-eabi": "4.9.4", + "@rollup/rollup-android-arm64": "4.9.4", + "@rollup/rollup-darwin-arm64": "4.9.4", + "@rollup/rollup-darwin-x64": "4.9.4", + "@rollup/rollup-linux-arm-gnueabihf": "4.9.4", + "@rollup/rollup-linux-arm64-gnu": "4.9.4", + "@rollup/rollup-linux-arm64-musl": "4.9.4", + "@rollup/rollup-linux-riscv64-gnu": "4.9.4", + "@rollup/rollup-linux-x64-gnu": "4.9.4", + "@rollup/rollup-linux-x64-musl": "4.9.4", + "@rollup/rollup-win32-arm64-msvc": "4.9.4", + "@rollup/rollup-win32-ia32-msvc": "4.9.4", + "@rollup/rollup-win32-x64-msvc": "4.9.4", "fsevents": "~2.3.2" } }, From ba13061497f6d465d73c2f6bc8597cbf381492fc Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Mon, 8 Jan 2024 19:36:43 +0000 Subject: [PATCH 07/16] chore(deps): update dependency @babel/preset-env to v7.23.8 --- package-lock.json | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/package-lock.json b/package-lock.json index b3be0a8..e09e90c 100644 --- a/package-lock.json +++ b/package-lock.json @@ -964,16 +964,15 @@ } }, "node_modules/@babel/plugin-transform-classes": { - "version": "7.23.5", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-classes/-/plugin-transform-classes-7.23.5.tgz", - "integrity": "sha512-jvOTR4nicqYC9yzOHIhXG5emiFEOpappSJAl73SDSEDcybD+Puuze8Tnpb9p9qEyYup24tq891gkaygIFvWDqg==", + "version": "7.23.8", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-classes/-/plugin-transform-classes-7.23.8.tgz", + "integrity": "sha512-yAYslGsY1bX6Knmg46RjiCiNSwJKv2IUC8qOdYKqMMr0491SXFhcHqOdRDeCRohOOIzwN/90C6mQ9qAKgrP7dg==", "dev": true, "dependencies": { "@babel/helper-annotate-as-pure": "^7.22.5", - "@babel/helper-compilation-targets": "^7.22.15", + "@babel/helper-compilation-targets": "^7.23.6", "@babel/helper-environment-visitor": "^7.22.20", "@babel/helper-function-name": "^7.23.0", - "@babel/helper-optimise-call-expression": "^7.22.5", "@babel/helper-plugin-utils": "^7.22.5", "@babel/helper-replace-supers": "^7.22.20", "@babel/helper-split-export-declaration": "^7.22.6", @@ -1689,9 +1688,9 @@ } }, "node_modules/@babel/preset-env": { - "version": "7.23.7", - "resolved": "https://registry.npmjs.org/@babel/preset-env/-/preset-env-7.23.7.tgz", - "integrity": "sha512-SY27X/GtTz/L4UryMNJ6p4fH4nsgWbz84y9FE0bQeWJP6O5BhgVCt53CotQKHCOeXJel8VyhlhujhlltKms/CA==", + "version": "7.23.8", + "resolved": "https://registry.npmjs.org/@babel/preset-env/-/preset-env-7.23.8.tgz", + "integrity": "sha512-lFlpmkApLkEP6woIKprO6DO60RImpatTQKtz4sUcDjVcK8M8mQ4sZsuxaTMNOZf0sqAq/ReYW1ZBHnOQwKpLWA==", "dev": true, "dependencies": { "@babel/compat-data": "^7.23.5", @@ -1727,7 +1726,7 @@ "@babel/plugin-transform-block-scoping": "^7.23.4", "@babel/plugin-transform-class-properties": "^7.23.3", "@babel/plugin-transform-class-static-block": "^7.23.4", - "@babel/plugin-transform-classes": "^7.23.5", + "@babel/plugin-transform-classes": "^7.23.8", "@babel/plugin-transform-computed-properties": "^7.23.3", "@babel/plugin-transform-destructuring": "^7.23.3", "@babel/plugin-transform-dotall-regex": "^7.23.3", From 1d82ce44518cb4e80f78cd8b1c0bb03be44d7b78 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Tue, 9 Jan 2024 18:23:38 +0000 Subject: [PATCH 08/16] chore(deps): update dependency css-loader to v6.9.0 --- package-lock.json | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/package-lock.json b/package-lock.json index b3be0a8..ef7c2ef 100644 --- a/package-lock.json +++ b/package-lock.json @@ -4011,19 +4011,19 @@ } }, "node_modules/css-loader": { - "version": "6.8.1", - "resolved": "https://registry.npmjs.org/css-loader/-/css-loader-6.8.1.tgz", - "integrity": "sha512-xDAXtEVGlD0gJ07iclwWVkLoZOpEvAWaSyf6W18S2pOC//K8+qUDIx8IIT3D+HjnmkJPQeesOPv5aiUaJsCM2g==", + "version": "6.9.0", + "resolved": "https://registry.npmjs.org/css-loader/-/css-loader-6.9.0.tgz", + "integrity": "sha512-3I5Nu4ytWlHvOP6zItjiHlefBNtrH+oehq8tnQa2kO305qpVyx9XNIT1CXIj5bgCJs7qICBCkgCYxQLKPANoLA==", "dev": true, "dependencies": { "icss-utils": "^5.1.0", - "postcss": "^8.4.21", + "postcss": "^8.4.31", "postcss-modules-extract-imports": "^3.0.0", "postcss-modules-local-by-default": "^4.0.3", - "postcss-modules-scope": "^3.0.0", + "postcss-modules-scope": "^3.1.0", "postcss-modules-values": "^4.0.0", "postcss-value-parser": "^4.2.0", - "semver": "^7.3.8" + "semver": "^7.5.4" }, "engines": { "node": ">= 12.13.0" @@ -8359,9 +8359,9 @@ } }, "node_modules/postcss-modules-scope": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/postcss-modules-scope/-/postcss-modules-scope-3.0.0.tgz", - "integrity": "sha512-hncihwFA2yPath8oZ15PZqvWGkWf+XUfQgUGamS4LqoP1anQLOsOJw0vr7J7IwLpoY9fatA2qiGUGmuZL0Iqlg==", + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/postcss-modules-scope/-/postcss-modules-scope-3.1.0.tgz", + "integrity": "sha512-SaIbK8XW+MZbd0xHPf7kdfA/3eOt7vxJ72IRecn3EzuZVLr1r0orzf0MX/pN8m+NMDoo6X/SQd8oeKqGZd8PXg==", "dev": true, "dependencies": { "postcss-selector-parser": "^6.0.4" From 13d1c73129f184dcae6657d3dbd5fd87d77b5496 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Wed, 10 Jan 2024 18:01:39 +0000 Subject: [PATCH 09/16] chore(deps): update dependency mini-css-extract-plugin to v2.7.7 --- package-lock.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/package-lock.json b/package-lock.json index ef7c2ef..1bc5549 100644 --- a/package-lock.json +++ b/package-lock.json @@ -7383,9 +7383,9 @@ } }, "node_modules/mini-css-extract-plugin": { - "version": "2.7.6", - "resolved": "https://registry.npmjs.org/mini-css-extract-plugin/-/mini-css-extract-plugin-2.7.6.tgz", - "integrity": "sha512-Qk7HcgaPkGG6eD77mLvZS1nmxlao3j+9PkrT9Uc7HAE1id3F41+DdBRYRYkbyfNRGzm8/YWtzhw7nVPmwhqTQw==", + "version": "2.7.7", + "resolved": "https://registry.npmjs.org/mini-css-extract-plugin/-/mini-css-extract-plugin-2.7.7.tgz", + "integrity": "sha512-+0n11YGyRavUR3IlaOzJ0/4Il1avMvJ1VJfhWfCn24ITQXhRr1gghbhhrda6tgtNcpZaWKdSuwKq20Jb7fnlyw==", "dev": true, "dependencies": { "schema-utils": "^4.0.0" From 8b751ae0d97b4a948df7e49faa0ec64bbd1d1f73 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Fri, 12 Jan 2024 11:39:13 +0000 Subject: [PATCH 10/16] chore(deps): update dependency rollup to v4.9.5 --- package-lock.json | 110 +++++++++++++++++++++++----------------------- 1 file changed, 55 insertions(+), 55 deletions(-) diff --git a/package-lock.json b/package-lock.json index ef7c2ef..546203f 100644 --- a/package-lock.json +++ b/package-lock.json @@ -2406,9 +2406,9 @@ "dev": true }, "node_modules/@rollup/rollup-android-arm-eabi": { - "version": "4.9.4", - "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.9.4.tgz", - "integrity": "sha512-ub/SN3yWqIv5CWiAZPHVS1DloyZsJbtXmX4HxUTIpS0BHm9pW5iYBo2mIZi+hE3AeiTzHz33blwSnhdUo+9NpA==", + "version": "4.9.5", + "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.9.5.tgz", + "integrity": "sha512-idWaG8xeSRCfRq9KpRysDHJ/rEHBEXcHuJ82XY0yYFIWnLMjZv9vF/7DOq8djQ2n3Lk6+3qfSH8AqlmHlmi1MA==", "cpu": [ "arm" ], @@ -2419,9 +2419,9 @@ ] }, "node_modules/@rollup/rollup-android-arm64": { - "version": "4.9.4", - "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm64/-/rollup-android-arm64-4.9.4.tgz", - "integrity": "sha512-ehcBrOR5XTl0W0t2WxfTyHCR/3Cq2jfb+I4W+Ch8Y9b5G+vbAecVv0Fx/J1QKktOrgUYsIKxWAKgIpvw56IFNA==", + "version": "4.9.5", + "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm64/-/rollup-android-arm64-4.9.5.tgz", + "integrity": "sha512-f14d7uhAMtsCGjAYwZGv6TwuS3IFaM4ZnGMUn3aCBgkcHAYErhV1Ad97WzBvS2o0aaDv4mVz+syiN0ElMyfBPg==", "cpu": [ "arm64" ], @@ -2432,9 +2432,9 @@ ] }, "node_modules/@rollup/rollup-darwin-arm64": { - "version": "4.9.4", - "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.9.4.tgz", - "integrity": "sha512-1fzh1lWExwSTWy8vJPnNbNM02WZDS8AW3McEOb7wW+nPChLKf3WG2aG7fhaUmfX5FKw9zhsF5+MBwArGyNM7NA==", + "version": "4.9.5", + "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.9.5.tgz", + "integrity": "sha512-ndoXeLx455FffL68OIUrVr89Xu1WLzAG4n65R8roDlCoYiQcGGg6MALvs2Ap9zs7AHg8mpHtMpwC8jBBjZrT/w==", "cpu": [ "arm64" ], @@ -2445,9 +2445,9 @@ ] }, "node_modules/@rollup/rollup-darwin-x64": { - "version": "4.9.4", - "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-x64/-/rollup-darwin-x64-4.9.4.tgz", - "integrity": "sha512-Gc6cukkF38RcYQ6uPdiXi70JB0f29CwcQ7+r4QpfNpQFVHXRd0DfWFidoGxjSx1DwOETM97JPz1RXL5ISSB0pA==", + "version": "4.9.5", + "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-x64/-/rollup-darwin-x64-4.9.5.tgz", + "integrity": "sha512-UmElV1OY2m/1KEEqTlIjieKfVwRg0Zwg4PLgNf0s3glAHXBN99KLpw5A5lrSYCa1Kp63czTpVll2MAqbZYIHoA==", "cpu": [ "x64" ], @@ -2458,9 +2458,9 @@ ] }, "node_modules/@rollup/rollup-linux-arm-gnueabihf": { - "version": "4.9.4", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-gnueabihf/-/rollup-linux-arm-gnueabihf-4.9.4.tgz", - "integrity": "sha512-g21RTeFzoTl8GxosHbnQZ0/JkuFIB13C3T7Y0HtKzOXmoHhewLbVTFBQZu+z5m9STH6FZ7L/oPgU4Nm5ErN2fw==", + "version": "4.9.5", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-gnueabihf/-/rollup-linux-arm-gnueabihf-4.9.5.tgz", + "integrity": "sha512-Q0LcU61v92tQB6ae+udZvOyZ0wfpGojtAKrrpAaIqmJ7+psq4cMIhT/9lfV6UQIpeItnq/2QDROhNLo00lOD1g==", "cpu": [ "arm" ], @@ -2471,9 +2471,9 @@ ] }, "node_modules/@rollup/rollup-linux-arm64-gnu": { - "version": "4.9.4", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-gnu/-/rollup-linux-arm64-gnu-4.9.4.tgz", - "integrity": "sha512-TVYVWD/SYwWzGGnbfTkrNpdE4HON46orgMNHCivlXmlsSGQOx/OHHYiQcMIOx38/GWgwr/po2LBn7wypkWw/Mg==", + "version": "4.9.5", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-gnu/-/rollup-linux-arm64-gnu-4.9.5.tgz", + "integrity": "sha512-dkRscpM+RrR2Ee3eOQmRWFjmV/payHEOrjyq1VZegRUa5OrZJ2MAxBNs05bZuY0YCtpqETDy1Ix4i/hRqX98cA==", "cpu": [ "arm64" ], @@ -2484,9 +2484,9 @@ ] }, "node_modules/@rollup/rollup-linux-arm64-musl": { - "version": "4.9.4", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-musl/-/rollup-linux-arm64-musl-4.9.4.tgz", - "integrity": "sha512-XcKvuendwizYYhFxpvQ3xVpzje2HHImzg33wL9zvxtj77HvPStbSGI9czrdbfrf8DGMcNNReH9pVZv8qejAQ5A==", + "version": "4.9.5", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-musl/-/rollup-linux-arm64-musl-4.9.5.tgz", + "integrity": "sha512-QaKFVOzzST2xzY4MAmiDmURagWLFh+zZtttuEnuNn19AiZ0T3fhPyjPPGwLNdiDT82ZE91hnfJsUiDwF9DClIQ==", "cpu": [ "arm64" ], @@ -2497,9 +2497,9 @@ ] }, "node_modules/@rollup/rollup-linux-riscv64-gnu": { - "version": "4.9.4", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-gnu/-/rollup-linux-riscv64-gnu-4.9.4.tgz", - "integrity": "sha512-LFHS/8Q+I9YA0yVETyjonMJ3UA+DczeBd/MqNEzsGSTdNvSJa1OJZcSH8GiXLvcizgp9AlHs2walqRcqzjOi3A==", + "version": "4.9.5", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-gnu/-/rollup-linux-riscv64-gnu-4.9.5.tgz", + "integrity": "sha512-HeGqmRJuyVg6/X6MpE2ur7GbymBPS8Np0S/vQFHDmocfORT+Zt76qu+69NUoxXzGqVP1pzaY6QIi0FJWLC3OPA==", "cpu": [ "riscv64" ], @@ -2510,9 +2510,9 @@ ] }, "node_modules/@rollup/rollup-linux-x64-gnu": { - "version": "4.9.4", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.9.4.tgz", - "integrity": "sha512-dIYgo+j1+yfy81i0YVU5KnQrIJZE8ERomx17ReU4GREjGtDW4X+nvkBak2xAUpyqLs4eleDSj3RrV72fQos7zw==", + "version": "4.9.5", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.9.5.tgz", + "integrity": "sha512-Dq1bqBdLaZ1Gb/l2e5/+o3B18+8TI9ANlA1SkejZqDgdU/jK/ThYaMPMJpVMMXy2uRHvGKbkz9vheVGdq3cJfA==", "cpu": [ "x64" ], @@ -2523,9 +2523,9 @@ ] }, "node_modules/@rollup/rollup-linux-x64-musl": { - "version": "4.9.4", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-musl/-/rollup-linux-x64-musl-4.9.4.tgz", - "integrity": "sha512-RoaYxjdHQ5TPjaPrLsfKqR3pakMr3JGqZ+jZM0zP2IkDtsGa4CqYaWSfQmZVgFUCgLrTnzX+cnHS3nfl+kB6ZQ==", + "version": "4.9.5", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-musl/-/rollup-linux-x64-musl-4.9.5.tgz", + "integrity": "sha512-ezyFUOwldYpj7AbkwyW9AJ203peub81CaAIVvckdkyH8EvhEIoKzaMFJj0G4qYJ5sw3BpqhFrsCc30t54HV8vg==", "cpu": [ "x64" ], @@ -2536,9 +2536,9 @@ ] }, "node_modules/@rollup/rollup-win32-arm64-msvc": { - "version": "4.9.4", - "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-arm64-msvc/-/rollup-win32-arm64-msvc-4.9.4.tgz", - "integrity": "sha512-T8Q3XHV+Jjf5e49B4EAaLKV74BbX7/qYBRQ8Wop/+TyyU0k+vSjiLVSHNWdVd1goMjZcbhDmYZUYW5RFqkBNHQ==", + "version": "4.9.5", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-arm64-msvc/-/rollup-win32-arm64-msvc-4.9.5.tgz", + "integrity": "sha512-aHSsMnUw+0UETB0Hlv7B/ZHOGY5bQdwMKJSzGfDfvyhnpmVxLMGnQPGNE9wgqkLUs3+gbG1Qx02S2LLfJ5GaRQ==", "cpu": [ "arm64" ], @@ -2549,9 +2549,9 @@ ] }, "node_modules/@rollup/rollup-win32-ia32-msvc": { - "version": "4.9.4", - "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-ia32-msvc/-/rollup-win32-ia32-msvc-4.9.4.tgz", - "integrity": "sha512-z+JQ7JirDUHAsMecVydnBPWLwJjbppU+7LZjffGf+Jvrxq+dVjIE7By163Sc9DKc3ADSU50qPVw0KonBS+a+HQ==", + "version": "4.9.5", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-ia32-msvc/-/rollup-win32-ia32-msvc-4.9.5.tgz", + "integrity": "sha512-AiqiLkb9KSf7Lj/o1U3SEP9Zn+5NuVKgFdRIZkvd4N0+bYrTOovVd0+LmYCPQGbocT4kvFyK+LXCDiXPBF3fyA==", "cpu": [ "ia32" ], @@ -2562,9 +2562,9 @@ ] }, "node_modules/@rollup/rollup-win32-x64-msvc": { - "version": "4.9.4", - "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.9.4.tgz", - "integrity": "sha512-LfdGXCV9rdEify1oxlN9eamvDSjv9md9ZVMAbNHA87xqIfFCxImxan9qZ8+Un54iK2nnqPlbnSi4R54ONtbWBw==", + "version": "4.9.5", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.9.5.tgz", + "integrity": "sha512-1q+mykKE3Vot1kaFJIDoUFv5TuW+QQVaf2FmTT9krg86pQrGStOSJJ0Zil7CFagyxDuouTepzt5Y5TVzyajOdQ==", "cpu": [ "x64" ], @@ -9056,9 +9056,9 @@ } }, "node_modules/rollup": { - "version": "4.9.4", - "resolved": "https://registry.npmjs.org/rollup/-/rollup-4.9.4.tgz", - "integrity": "sha512-2ztU7pY/lrQyXSCnnoU4ICjT/tCG9cdH3/G25ERqE3Lst6vl2BCM5hL2Nw+sslAvAf+ccKsAq1SkKQALyqhR7g==", + "version": "4.9.5", + "resolved": "https://registry.npmjs.org/rollup/-/rollup-4.9.5.tgz", + "integrity": "sha512-E4vQW0H/mbNMw2yLSqJyjtkHY9dslf/p0zuT1xehNRqUTBOFMqEjguDvqhXr7N7r/4ttb2jr4T41d3dncmIgbQ==", "dev": true, "dependencies": { "@types/estree": "1.0.5" @@ -9071,19 +9071,19 @@ "npm": ">=8.0.0" }, "optionalDependencies": { - "@rollup/rollup-android-arm-eabi": "4.9.4", - "@rollup/rollup-android-arm64": "4.9.4", - "@rollup/rollup-darwin-arm64": "4.9.4", - "@rollup/rollup-darwin-x64": "4.9.4", - "@rollup/rollup-linux-arm-gnueabihf": "4.9.4", - "@rollup/rollup-linux-arm64-gnu": "4.9.4", - "@rollup/rollup-linux-arm64-musl": "4.9.4", - "@rollup/rollup-linux-riscv64-gnu": "4.9.4", - "@rollup/rollup-linux-x64-gnu": "4.9.4", - "@rollup/rollup-linux-x64-musl": "4.9.4", - "@rollup/rollup-win32-arm64-msvc": "4.9.4", - "@rollup/rollup-win32-ia32-msvc": "4.9.4", - "@rollup/rollup-win32-x64-msvc": "4.9.4", + "@rollup/rollup-android-arm-eabi": "4.9.5", + "@rollup/rollup-android-arm64": "4.9.5", + "@rollup/rollup-darwin-arm64": "4.9.5", + "@rollup/rollup-darwin-x64": "4.9.5", + "@rollup/rollup-linux-arm-gnueabihf": "4.9.5", + "@rollup/rollup-linux-arm64-gnu": "4.9.5", + "@rollup/rollup-linux-arm64-musl": "4.9.5", + "@rollup/rollup-linux-riscv64-gnu": "4.9.5", + "@rollup/rollup-linux-x64-gnu": "4.9.5", + "@rollup/rollup-linux-x64-musl": "4.9.5", + "@rollup/rollup-win32-arm64-msvc": "4.9.5", + "@rollup/rollup-win32-ia32-msvc": "4.9.5", + "@rollup/rollup-win32-x64-msvc": "4.9.5", "fsevents": "~2.3.2" } }, From fa415657c060a3c21aa0ea008f7629f8a852e18f Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Wed, 17 Jan 2024 14:17:19 +0000 Subject: [PATCH 11/16] chore(deps): update dependency css-minimizer-webpack-plugin to v6 --- package-lock.json | 426 ++++++++++++++++++++++++---------------------- package.json | 2 +- 2 files changed, 225 insertions(+), 203 deletions(-) diff --git a/package-lock.json b/package-lock.json index 1fea615..ddb0764 100644 --- a/package-lock.json +++ b/package-lock.json @@ -29,7 +29,7 @@ "@rollup/plugin-terser": "^0.4.4", "babel-loader": "^9.1.3", "css-loader": "^6.0.0", - "css-minimizer-webpack-plugin": "^5.0.1", + "css-minimizer-webpack-plugin": "^6.0.0", "eslint": "^8.4.1", "eslint-config-airbnb": "^19.0.2", "eslint-plugin-import": "^2.25.3", @@ -2144,9 +2144,9 @@ "dev": true }, "node_modules/@jridgewell/trace-mapping": { - "version": "0.3.20", - "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.20.tgz", - "integrity": "sha512-R8LcPeWZol2zR8mmH3JeKQ6QRCFb7XgUhV9ZlGhHLGyg4wpPiPZNQOOWhFZhxKw8u//yTbNGI42Bx/3paXEQ+Q==", + "version": "0.3.21", + "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.21.tgz", + "integrity": "sha512-SRfKmRe1KvYnxjEMtxEr+J4HIeMX5YBg/qhRHpxEIGjhX1rshcHlnFUE9K0GazhVKWM7B+nARSkV8LuvJdJ5/g==", "dev": true, "dependencies": { "@jridgewell/resolve-uri": "^3.1.0", @@ -4069,20 +4069,20 @@ "dev": true }, "node_modules/css-minimizer-webpack-plugin": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/css-minimizer-webpack-plugin/-/css-minimizer-webpack-plugin-5.0.1.tgz", - "integrity": "sha512-3caImjKFQkS+ws1TGcFn0V1HyDJFq1Euy589JlD6/3rV2kj+w7r5G9WDMgSHvpvXHNZ2calVypZWuEDQd9wfLg==", + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/css-minimizer-webpack-plugin/-/css-minimizer-webpack-plugin-6.0.0.tgz", + "integrity": "sha512-BLpR9CCDkKvhO3i0oZQgad6v9pCxUuhSc5RT6iUEy9M8hBXi4TJb5vqF2GQ2deqYHmRi3O6IR9hgAZQWg0EBwA==", "dev": true, "dependencies": { - "@jridgewell/trace-mapping": "^0.3.18", - "cssnano": "^6.0.1", - "jest-worker": "^29.4.3", - "postcss": "^8.4.24", - "schema-utils": "^4.0.1", - "serialize-javascript": "^6.0.1" + "@jridgewell/trace-mapping": "^0.3.21", + "cssnano": "^6.0.3", + "jest-worker": "^29.7.0", + "postcss": "^8.4.33", + "schema-utils": "^4.2.0", + "serialize-javascript": "^6.0.2" }, "engines": { - "node": ">= 14.15.0" + "node": ">= 18.12.0" }, "funding": { "type": "opencollective", @@ -4258,13 +4258,13 @@ } }, "node_modules/cssnano": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/cssnano/-/cssnano-6.0.1.tgz", - "integrity": "sha512-fVO1JdJ0LSdIGJq68eIxOqFpIJrZqXUsBt8fkrBcztCQqAjQD51OhZp7tc0ImcbwXD4k7ny84QTV90nZhmqbkg==", + "version": "6.0.3", + "resolved": "https://registry.npmjs.org/cssnano/-/cssnano-6.0.3.tgz", + "integrity": "sha512-MRq4CIj8pnyZpcI2qs6wswoYoDD1t0aL28n+41c1Ukcpm56m1h6mCexIHBGjfZfnTqtGSSCP4/fB1ovxgjBOiw==", "dev": true, "dependencies": { - "cssnano-preset-default": "^6.0.1", - "lilconfig": "^2.1.0" + "cssnano-preset-default": "^6.0.3", + "lilconfig": "^3.0.0" }, "engines": { "node": "^14 || ^16 || >=18.0" @@ -4274,62 +4274,83 @@ "url": "https://opencollective.com/cssnano" }, "peerDependencies": { - "postcss": "^8.2.15" + "postcss": "^8.4.31" } }, "node_modules/cssnano-preset-default": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/cssnano-preset-default/-/cssnano-preset-default-6.0.1.tgz", - "integrity": "sha512-7VzyFZ5zEB1+l1nToKyrRkuaJIx0zi/1npjvZfbBwbtNTzhLtlvYraK/7/uqmX2Wb2aQtd983uuGw79jAjLSuQ==", - "dev": true, - "dependencies": { - "css-declaration-sorter": "^6.3.1", - "cssnano-utils": "^4.0.0", - "postcss-calc": "^9.0.0", - "postcss-colormin": "^6.0.0", - "postcss-convert-values": "^6.0.0", - "postcss-discard-comments": "^6.0.0", - "postcss-discard-duplicates": "^6.0.0", - "postcss-discard-empty": "^6.0.0", - "postcss-discard-overridden": "^6.0.0", - "postcss-merge-longhand": "^6.0.0", - "postcss-merge-rules": "^6.0.1", - "postcss-minify-font-values": "^6.0.0", - "postcss-minify-gradients": "^6.0.0", - "postcss-minify-params": "^6.0.0", - "postcss-minify-selectors": "^6.0.0", - "postcss-normalize-charset": "^6.0.0", - "postcss-normalize-display-values": "^6.0.0", - "postcss-normalize-positions": "^6.0.0", - "postcss-normalize-repeat-style": "^6.0.0", - "postcss-normalize-string": "^6.0.0", - "postcss-normalize-timing-functions": "^6.0.0", - "postcss-normalize-unicode": "^6.0.0", - "postcss-normalize-url": "^6.0.0", - "postcss-normalize-whitespace": "^6.0.0", - "postcss-ordered-values": "^6.0.0", - "postcss-reduce-initial": "^6.0.0", - "postcss-reduce-transforms": "^6.0.0", - "postcss-svgo": "^6.0.0", - "postcss-unique-selectors": "^6.0.0" + "version": "6.0.3", + "resolved": "https://registry.npmjs.org/cssnano-preset-default/-/cssnano-preset-default-6.0.3.tgz", + "integrity": "sha512-4y3H370aZCkT9Ev8P4SO4bZbt+AExeKhh8wTbms/X7OLDo5E7AYUUy6YPxa/uF5Grf+AJwNcCnxKhZynJ6luBA==", + "dev": true, + "dependencies": { + "css-declaration-sorter": "^7.1.1", + "cssnano-utils": "^4.0.1", + "postcss-calc": "^9.0.1", + "postcss-colormin": "^6.0.2", + "postcss-convert-values": "^6.0.2", + "postcss-discard-comments": "^6.0.1", + "postcss-discard-duplicates": "^6.0.1", + "postcss-discard-empty": "^6.0.1", + "postcss-discard-overridden": "^6.0.1", + "postcss-merge-longhand": "^6.0.2", + "postcss-merge-rules": "^6.0.3", + "postcss-minify-font-values": "^6.0.1", + "postcss-minify-gradients": "^6.0.1", + "postcss-minify-params": "^6.0.2", + "postcss-minify-selectors": "^6.0.2", + "postcss-normalize-charset": "^6.0.1", + "postcss-normalize-display-values": "^6.0.1", + "postcss-normalize-positions": "^6.0.1", + "postcss-normalize-repeat-style": "^6.0.1", + "postcss-normalize-string": "^6.0.1", + "postcss-normalize-timing-functions": "^6.0.1", + "postcss-normalize-unicode": "^6.0.2", + "postcss-normalize-url": "^6.0.1", + "postcss-normalize-whitespace": "^6.0.1", + "postcss-ordered-values": "^6.0.1", + "postcss-reduce-initial": "^6.0.2", + "postcss-reduce-transforms": "^6.0.1", + "postcss-svgo": "^6.0.2", + "postcss-unique-selectors": "^6.0.2" }, "engines": { "node": "^14 || ^16 || >=18.0" }, "peerDependencies": { - "postcss": "^8.2.15" + "postcss": "^8.4.31" + } + }, + "node_modules/cssnano-preset-default/node_modules/css-declaration-sorter": { + "version": "7.1.1", + "resolved": "https://registry.npmjs.org/css-declaration-sorter/-/css-declaration-sorter-7.1.1.tgz", + "integrity": "sha512-dZ3bVTEEc1vxr3Bek9vGwfB5Z6ESPULhcRvO472mfjVnj8jRcTnKO8/JTczlvxM10Myb+wBM++1MtdO76eWcaQ==", + "dev": true, + "engines": { + "node": "^14 || ^16 || >=18" + }, + "peerDependencies": { + "postcss": "^8.0.9" } }, "node_modules/cssnano-utils": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/cssnano-utils/-/cssnano-utils-4.0.0.tgz", - "integrity": "sha512-Z39TLP+1E0KUcd7LGyF4qMfu8ZufI0rDzhdyAMsa/8UyNUU8wpS0fhdBxbQbv32r64ea00h4878gommRVg2BHw==", + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/cssnano-utils/-/cssnano-utils-4.0.1.tgz", + "integrity": "sha512-6qQuYDqsGoiXssZ3zct6dcMxiqfT6epy7x4R0TQJadd4LWO3sPR6JH6ZByOvVLoZ6EdwPGgd7+DR1EmX3tiXQQ==", "dev": true, "engines": { "node": "^14 || ^16 || >=18.0" }, "peerDependencies": { - "postcss": "^8.2.15" + "postcss": "^8.4.31" + } + }, + "node_modules/cssnano/node_modules/lilconfig": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/lilconfig/-/lilconfig-3.0.0.tgz", + "integrity": "sha512-K2U4W2Ff5ibV7j7ydLr+zLAkIg5JJ4lPn1Ltsdt+Tz/IjQ8buJ55pZAxoP34lqIiwtF9iAvtLv3JGv7CAyAg+g==", + "dev": true, + "engines": { + "node": ">=14" } }, "node_modules/csso": { @@ -7500,9 +7521,9 @@ } }, "node_modules/nanoid": { - "version": "3.3.6", - "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.6.tgz", - "integrity": "sha512-BGcqMMJuToF7i1rt+2PWSNVnWIkGCU78jBG3RxO/bZlnZPK2Cmi2QaffxGO/2RvWi9sL+FAiRiXMgsyxQ1DIDA==", + "version": "3.3.7", + "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.7.tgz", + "integrity": "sha512-eSRppjcPIatRIMC1U6UngP8XFcz8MQWGQdt1MTBQ7NaAmvXDfvNxbvWV3x2y6CdEUciCSsDHDQZbhYaB8QEo2g==", "dev": true, "funding": [ { @@ -8057,9 +8078,9 @@ } }, "node_modules/postcss": { - "version": "8.4.31", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.31.tgz", - "integrity": "sha512-PS08Iboia9mts/2ygV3eLpY5ghnUcfLV/EXTOW1E2qYxJKGGBUtNjN76FYHnMs36RmARn41bC0AZmn+rR0OVpQ==", + "version": "8.4.33", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.33.tgz", + "integrity": "sha512-Kkpbhhdjw2qQs2O2DGX+8m5OVqEcbB9HRBvuYM9pgrjEFUg30A9LmXNlTAUj4S9kgtGyrMbTzVjH7E+s5Re2yg==", "dev": true, "funding": [ { @@ -8076,7 +8097,7 @@ } ], "dependencies": { - "nanoid": "^3.3.6", + "nanoid": "^3.3.7", "picocolors": "^1.0.0", "source-map-js": "^1.0.2" }, @@ -8101,12 +8122,12 @@ } }, "node_modules/postcss-colormin": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/postcss-colormin/-/postcss-colormin-6.0.0.tgz", - "integrity": "sha512-EuO+bAUmutWoZYgHn2T1dG1pPqHU6L4TjzPlu4t1wZGXQ/fxV16xg2EJmYi0z+6r+MGV1yvpx1BHkUaRrPa2bw==", + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/postcss-colormin/-/postcss-colormin-6.0.2.tgz", + "integrity": "sha512-TXKOxs9LWcdYo5cgmcSHPkyrLAh86hX1ijmyy6J8SbOhyv6ua053M3ZAM/0j44UsnQNIWdl8gb5L7xX2htKeLw==", "dev": true, "dependencies": { - "browserslist": "^4.21.4", + "browserslist": "^4.22.2", "caniuse-api": "^3.0.0", "colord": "^2.9.1", "postcss-value-parser": "^4.2.0" @@ -8115,71 +8136,71 @@ "node": "^14 || ^16 || >=18.0" }, "peerDependencies": { - "postcss": "^8.2.15" + "postcss": "^8.4.31" } }, "node_modules/postcss-convert-values": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/postcss-convert-values/-/postcss-convert-values-6.0.0.tgz", - "integrity": "sha512-U5D8QhVwqT++ecmy8rnTb+RL9n/B806UVaS3m60lqle4YDFcpbS3ae5bTQIh3wOGUSDHSEtMYLs/38dNG7EYFw==", + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/postcss-convert-values/-/postcss-convert-values-6.0.2.tgz", + "integrity": "sha512-aeBmaTnGQ+NUSVQT8aY0sKyAD/BaLJenEKZ03YK0JnDE1w1Rr8XShoxdal2V2H26xTJKr3v5haByOhJuyT4UYw==", "dev": true, "dependencies": { - "browserslist": "^4.21.4", + "browserslist": "^4.22.2", "postcss-value-parser": "^4.2.0" }, "engines": { "node": "^14 || ^16 || >=18.0" }, "peerDependencies": { - "postcss": "^8.2.15" + "postcss": "^8.4.31" } }, "node_modules/postcss-discard-comments": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/postcss-discard-comments/-/postcss-discard-comments-6.0.0.tgz", - "integrity": "sha512-p2skSGqzPMZkEQvJsgnkBhCn8gI7NzRH2683EEjrIkoMiwRELx68yoUJ3q3DGSGuQ8Ug9Gsn+OuDr46yfO+eFw==", + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/postcss-discard-comments/-/postcss-discard-comments-6.0.1.tgz", + "integrity": "sha512-f1KYNPtqYLUeZGCHQPKzzFtsHaRuECe6jLakf/RjSRqvF5XHLZnM2+fXLhb8Qh/HBFHs3M4cSLb1k3B899RYIg==", "dev": true, "engines": { "node": "^14 || ^16 || >=18.0" }, "peerDependencies": { - "postcss": "^8.2.15" + "postcss": "^8.4.31" } }, "node_modules/postcss-discard-duplicates": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/postcss-discard-duplicates/-/postcss-discard-duplicates-6.0.0.tgz", - "integrity": "sha512-bU1SXIizMLtDW4oSsi5C/xHKbhLlhek/0/yCnoMQany9k3nPBq+Ctsv/9oMmyqbR96HYHxZcHyK2HR5P/mqoGA==", + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/postcss-discard-duplicates/-/postcss-discard-duplicates-6.0.1.tgz", + "integrity": "sha512-1hvUs76HLYR8zkScbwyJ8oJEugfPV+WchpnA+26fpJ7Smzs51CzGBHC32RS03psuX/2l0l0UKh2StzNxOrKCYg==", "dev": true, "engines": { "node": "^14 || ^16 || >=18.0" }, "peerDependencies": { - "postcss": "^8.2.15" + "postcss": "^8.4.31" } }, "node_modules/postcss-discard-empty": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/postcss-discard-empty/-/postcss-discard-empty-6.0.0.tgz", - "integrity": "sha512-b+h1S1VT6dNhpcg+LpyiUrdnEZfICF0my7HAKgJixJLW7BnNmpRH34+uw/etf5AhOlIhIAuXApSzzDzMI9K/gQ==", + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/postcss-discard-empty/-/postcss-discard-empty-6.0.1.tgz", + "integrity": "sha512-yitcmKwmVWtNsrrRqGJ7/C0YRy53i0mjexBDQ9zYxDwTWVBgbU4+C9jIZLmQlTDT9zhml+u0OMFJh8+31krmOg==", "dev": true, "engines": { "node": "^14 || ^16 || >=18.0" }, "peerDependencies": { - "postcss": "^8.2.15" + "postcss": "^8.4.31" } }, "node_modules/postcss-discard-overridden": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/postcss-discard-overridden/-/postcss-discard-overridden-6.0.0.tgz", - "integrity": "sha512-4VELwssYXDFigPYAZ8vL4yX4mUepF/oCBeeIT4OXsJPYOtvJumyz9WflmJWTfDwCUcpDR+z0zvCWBXgTx35SVw==", + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/postcss-discard-overridden/-/postcss-discard-overridden-6.0.1.tgz", + "integrity": "sha512-qs0ehZMMZpSESbRkw1+inkf51kak6OOzNRaoLd/U7Fatp0aN2HQ1rxGOrJvYcRAN9VpX8kUF13R2ofn8OlvFVA==", "dev": true, "engines": { "node": "^14 || ^16 || >=18.0" }, "peerDependencies": { - "postcss": "^8.2.15" + "postcss": "^8.4.31" } }, "node_modules/postcss-load-config": { @@ -8212,43 +8233,43 @@ } }, "node_modules/postcss-merge-longhand": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/postcss-merge-longhand/-/postcss-merge-longhand-6.0.0.tgz", - "integrity": "sha512-4VSfd1lvGkLTLYcxFuISDtWUfFS4zXe0FpF149AyziftPFQIWxjvFSKhA4MIxMe4XM3yTDgQMbSNgzIVxChbIg==", + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/postcss-merge-longhand/-/postcss-merge-longhand-6.0.2.tgz", + "integrity": "sha512-+yfVB7gEM8SrCo9w2lCApKIEzrTKl5yS1F4yGhV3kSim6JzbfLGJyhR1B6X+6vOT0U33Mgx7iv4X9MVWuaSAfw==", "dev": true, "dependencies": { "postcss-value-parser": "^4.2.0", - "stylehacks": "^6.0.0" + "stylehacks": "^6.0.2" }, "engines": { "node": "^14 || ^16 || >=18.0" }, "peerDependencies": { - "postcss": "^8.2.15" + "postcss": "^8.4.31" } }, "node_modules/postcss-merge-rules": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/postcss-merge-rules/-/postcss-merge-rules-6.0.1.tgz", - "integrity": "sha512-a4tlmJIQo9SCjcfiCcCMg/ZCEe0XTkl/xK0XHBs955GWg9xDX3NwP9pwZ78QUOWB8/0XCjZeJn98Dae0zg6AAw==", + "version": "6.0.3", + "resolved": "https://registry.npmjs.org/postcss-merge-rules/-/postcss-merge-rules-6.0.3.tgz", + "integrity": "sha512-yfkDqSHGohy8sGYIJwBmIGDv4K4/WrJPX355XrxQb/CSsT4Kc/RxDi6akqn5s9bap85AWgv21ArcUWwWdGNSHA==", "dev": true, "dependencies": { - "browserslist": "^4.21.4", + "browserslist": "^4.22.2", "caniuse-api": "^3.0.0", - "cssnano-utils": "^4.0.0", - "postcss-selector-parser": "^6.0.5" + "cssnano-utils": "^4.0.1", + "postcss-selector-parser": "^6.0.15" }, "engines": { "node": "^14 || ^16 || >=18.0" }, "peerDependencies": { - "postcss": "^8.2.15" + "postcss": "^8.4.31" } }, "node_modules/postcss-minify-font-values": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/postcss-minify-font-values/-/postcss-minify-font-values-6.0.0.tgz", - "integrity": "sha512-zNRAVtyh5E8ndZEYXA4WS8ZYsAp798HiIQ1V2UF/C/munLp2r1UGHwf1+6JFu7hdEhJFN+W1WJQKBrtjhFgEnA==", + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/postcss-minify-font-values/-/postcss-minify-font-values-6.0.1.tgz", + "integrity": "sha512-tIwmF1zUPoN6xOtA/2FgVk1ZKrLcCvE0dpZLtzyyte0j9zUeB8RTbCqrHZGjJlxOvNWKMYtunLrrl7HPOiR46w==", "dev": true, "dependencies": { "postcss-value-parser": "^4.2.0" @@ -8257,56 +8278,56 @@ "node": "^14 || ^16 || >=18.0" }, "peerDependencies": { - "postcss": "^8.2.15" + "postcss": "^8.4.31" } }, "node_modules/postcss-minify-gradients": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/postcss-minify-gradients/-/postcss-minify-gradients-6.0.0.tgz", - "integrity": "sha512-wO0F6YfVAR+K1xVxF53ueZJza3L+R3E6cp0VwuXJQejnNUH0DjcAFe3JEBeTY1dLwGa0NlDWueCA1VlEfiKgAA==", + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/postcss-minify-gradients/-/postcss-minify-gradients-6.0.1.tgz", + "integrity": "sha512-M1RJWVjd6IOLPl1hYiOd5HQHgpp6cvJVLrieQYS9y07Yo8itAr6jaekzJphaJFR0tcg4kRewCk3kna9uHBxn/w==", "dev": true, "dependencies": { "colord": "^2.9.1", - "cssnano-utils": "^4.0.0", + "cssnano-utils": "^4.0.1", "postcss-value-parser": "^4.2.0" }, "engines": { "node": "^14 || ^16 || >=18.0" }, "peerDependencies": { - "postcss": "^8.2.15" + "postcss": "^8.4.31" } }, "node_modules/postcss-minify-params": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/postcss-minify-params/-/postcss-minify-params-6.0.0.tgz", - "integrity": "sha512-Fz/wMQDveiS0n5JPcvsMeyNXOIMrwF88n7196puSuQSWSa+/Ofc1gDOSY2xi8+A4PqB5dlYCKk/WfqKqsI+ReQ==", + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/postcss-minify-params/-/postcss-minify-params-6.0.2.tgz", + "integrity": "sha512-zwQtbrPEBDj+ApELZ6QylLf2/c5zmASoOuA4DzolyVGdV38iR2I5QRMsZcHkcdkZzxpN8RS4cN7LPskOkTwTZw==", "dev": true, "dependencies": { - "browserslist": "^4.21.4", - "cssnano-utils": "^4.0.0", + "browserslist": "^4.22.2", + "cssnano-utils": "^4.0.1", "postcss-value-parser": "^4.2.0" }, "engines": { "node": "^14 || ^16 || >=18.0" }, "peerDependencies": { - "postcss": "^8.2.15" + "postcss": "^8.4.31" } }, "node_modules/postcss-minify-selectors": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/postcss-minify-selectors/-/postcss-minify-selectors-6.0.0.tgz", - "integrity": "sha512-ec/q9JNCOC2CRDNnypipGfOhbYPuUkewGwLnbv6omue/PSASbHSU7s6uSQ0tcFRVv731oMIx8k0SP4ZX6be/0g==", + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/postcss-minify-selectors/-/postcss-minify-selectors-6.0.2.tgz", + "integrity": "sha512-0b+m+w7OAvZejPQdN2GjsXLv5o0jqYHX3aoV0e7RBKPCsB7TYG5KKWBFhGnB/iP3213Ts8c5H4wLPLMm7z28Sg==", "dev": true, "dependencies": { - "postcss-selector-parser": "^6.0.5" + "postcss-selector-parser": "^6.0.15" }, "engines": { "node": "^14 || ^16 || >=18.0" }, "peerDependencies": { - "postcss": "^8.2.15" + "postcss": "^8.4.31" } }, "node_modules/postcss-modules": { @@ -8388,21 +8409,21 @@ } }, "node_modules/postcss-normalize-charset": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/postcss-normalize-charset/-/postcss-normalize-charset-6.0.0.tgz", - "integrity": "sha512-cqundwChbu8yO/gSWkuFDmKrCZ2vJzDAocheT2JTd0sFNA4HMGoKMfbk2B+J0OmO0t5GUkiAkSM5yF2rSLUjgQ==", + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/postcss-normalize-charset/-/postcss-normalize-charset-6.0.1.tgz", + "integrity": "sha512-aW5LbMNRZ+oDV57PF9K+WI1Z8MPnF+A8qbajg/T8PP126YrGX1f9IQx21GI2OlGz7XFJi/fNi0GTbY948XJtXg==", "dev": true, "engines": { "node": "^14 || ^16 || >=18.0" }, "peerDependencies": { - "postcss": "^8.2.15" + "postcss": "^8.4.31" } }, "node_modules/postcss-normalize-display-values": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/postcss-normalize-display-values/-/postcss-normalize-display-values-6.0.0.tgz", - "integrity": "sha512-Qyt5kMrvy7dJRO3OjF7zkotGfuYALETZE+4lk66sziWSPzlBEt7FrUshV6VLECkI4EN8Z863O6Nci4NXQGNzYw==", + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/postcss-normalize-display-values/-/postcss-normalize-display-values-6.0.1.tgz", + "integrity": "sha512-mc3vxp2bEuCb4LgCcmG1y6lKJu1Co8T+rKHrcbShJwUmKJiEl761qb/QQCfFwlrvSeET3jksolCR/RZuMURudw==", "dev": true, "dependencies": { "postcss-value-parser": "^4.2.0" @@ -8411,13 +8432,13 @@ "node": "^14 || ^16 || >=18.0" }, "peerDependencies": { - "postcss": "^8.2.15" + "postcss": "^8.4.31" } }, "node_modules/postcss-normalize-positions": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/postcss-normalize-positions/-/postcss-normalize-positions-6.0.0.tgz", - "integrity": "sha512-mPCzhSV8+30FZyWhxi6UoVRYd3ZBJgTRly4hOkaSifo0H+pjDYcii/aVT4YE6QpOil15a5uiv6ftnY3rm0igPg==", + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/postcss-normalize-positions/-/postcss-normalize-positions-6.0.1.tgz", + "integrity": "sha512-HRsq8u/0unKNvm0cvwxcOUEcakFXqZ41fv3FOdPn916XFUrympjr+03oaLkuZENz3HE9RrQE9yU0Xv43ThWjQg==", "dev": true, "dependencies": { "postcss-value-parser": "^4.2.0" @@ -8426,13 +8447,13 @@ "node": "^14 || ^16 || >=18.0" }, "peerDependencies": { - "postcss": "^8.2.15" + "postcss": "^8.4.31" } }, "node_modules/postcss-normalize-repeat-style": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/postcss-normalize-repeat-style/-/postcss-normalize-repeat-style-6.0.0.tgz", - "integrity": "sha512-50W5JWEBiOOAez2AKBh4kRFm2uhrT3O1Uwdxz7k24aKtbD83vqmcVG7zoIwo6xI2FZ/HDlbrCopXhLeTpQib1A==", + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/postcss-normalize-repeat-style/-/postcss-normalize-repeat-style-6.0.1.tgz", + "integrity": "sha512-Gbb2nmCy6tTiA7Sh2MBs3fj9W8swonk6lw+dFFeQT68B0Pzwp1kvisJQkdV6rbbMSd9brMlS8I8ts52tAGWmGQ==", "dev": true, "dependencies": { "postcss-value-parser": "^4.2.0" @@ -8441,13 +8462,13 @@ "node": "^14 || ^16 || >=18.0" }, "peerDependencies": { - "postcss": "^8.2.15" + "postcss": "^8.4.31" } }, "node_modules/postcss-normalize-string": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/postcss-normalize-string/-/postcss-normalize-string-6.0.0.tgz", - "integrity": "sha512-KWkIB7TrPOiqb8ZZz6homet2KWKJwIlysF5ICPZrXAylGe2hzX/HSf4NTX2rRPJMAtlRsj/yfkrWGavFuB+c0w==", + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/postcss-normalize-string/-/postcss-normalize-string-6.0.1.tgz", + "integrity": "sha512-5Fhx/+xzALJD9EI26Aq23hXwmv97Zfy2VFrt5PLT8lAhnBIZvmaT5pQk+NuJ/GWj/QWaKSKbnoKDGLbV6qnhXg==", "dev": true, "dependencies": { "postcss-value-parser": "^4.2.0" @@ -8456,13 +8477,13 @@ "node": "^14 || ^16 || >=18.0" }, "peerDependencies": { - "postcss": "^8.2.15" + "postcss": "^8.4.31" } }, "node_modules/postcss-normalize-timing-functions": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/postcss-normalize-timing-functions/-/postcss-normalize-timing-functions-6.0.0.tgz", - "integrity": "sha512-tpIXWciXBp5CiFs8sem90IWlw76FV4oi6QEWfQwyeREVwUy39VSeSqjAT7X0Qw650yAimYW5gkl2Gd871N5SQg==", + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/postcss-normalize-timing-functions/-/postcss-normalize-timing-functions-6.0.1.tgz", + "integrity": "sha512-4zcczzHqmCU7L5dqTB9rzeqPWRMc0K2HoR+Bfl+FSMbqGBUcP5LRfgcH4BdRtLuzVQK1/FHdFoGT3F7rkEnY+g==", "dev": true, "dependencies": { "postcss-value-parser": "^4.2.0" @@ -8471,29 +8492,29 @@ "node": "^14 || ^16 || >=18.0" }, "peerDependencies": { - "postcss": "^8.2.15" + "postcss": "^8.4.31" } }, "node_modules/postcss-normalize-unicode": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/postcss-normalize-unicode/-/postcss-normalize-unicode-6.0.0.tgz", - "integrity": "sha512-ui5crYkb5ubEUDugDc786L/Me+DXp2dLg3fVJbqyAl0VPkAeALyAijF2zOsnZyaS1HyfPuMH0DwyY18VMFVNkg==", + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/postcss-normalize-unicode/-/postcss-normalize-unicode-6.0.2.tgz", + "integrity": "sha512-Ff2VdAYCTGyMUwpevTZPZ4w0+mPjbZzLLyoLh/RMpqUqeQKZ+xMm31hkxBavDcGKcxm6ACzGk0nBfZ8LZkStKA==", "dev": true, "dependencies": { - "browserslist": "^4.21.4", + "browserslist": "^4.22.2", "postcss-value-parser": "^4.2.0" }, "engines": { "node": "^14 || ^16 || >=18.0" }, "peerDependencies": { - "postcss": "^8.2.15" + "postcss": "^8.4.31" } }, "node_modules/postcss-normalize-url": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/postcss-normalize-url/-/postcss-normalize-url-6.0.0.tgz", - "integrity": "sha512-98mvh2QzIPbb02YDIrYvAg4OUzGH7s1ZgHlD3fIdTHLgPLRpv1ZTKJDnSAKr4Rt21ZQFzwhGMXxpXlfrUBKFHw==", + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/postcss-normalize-url/-/postcss-normalize-url-6.0.1.tgz", + "integrity": "sha512-jEXL15tXSvbjm0yzUV7FBiEXwhIa9H88JOXDGQzmcWoB4mSjZIsmtto066s2iW9FYuIrIF4k04HA2BKAOpbsaQ==", "dev": true, "dependencies": { "postcss-value-parser": "^4.2.0" @@ -8502,13 +8523,13 @@ "node": "^14 || ^16 || >=18.0" }, "peerDependencies": { - "postcss": "^8.2.15" + "postcss": "^8.4.31" } }, "node_modules/postcss-normalize-whitespace": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/postcss-normalize-whitespace/-/postcss-normalize-whitespace-6.0.0.tgz", - "integrity": "sha512-7cfE1AyLiK0+ZBG6FmLziJzqQCpTQY+8XjMhMAz8WSBSCsCNNUKujgIgjCAmDT3cJ+3zjTXFkoD15ZPsckArVw==", + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/postcss-normalize-whitespace/-/postcss-normalize-whitespace-6.0.1.tgz", + "integrity": "sha512-76i3NpWf6bB8UHlVuLRxG4zW2YykF9CTEcq/9LGAiz2qBuX5cBStadkk0jSkg9a9TCIXbMQz7yzrygKoCW9JuA==", "dev": true, "dependencies": { "postcss-value-parser": "^4.2.0" @@ -8517,45 +8538,45 @@ "node": "^14 || ^16 || >=18.0" }, "peerDependencies": { - "postcss": "^8.2.15" + "postcss": "^8.4.31" } }, "node_modules/postcss-ordered-values": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/postcss-ordered-values/-/postcss-ordered-values-6.0.0.tgz", - "integrity": "sha512-K36XzUDpvfG/nWkjs6d1hRBydeIxGpKS2+n+ywlKPzx1nMYDYpoGbcjhj5AwVYJK1qV2/SDoDEnHzlPD6s3nMg==", + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/postcss-ordered-values/-/postcss-ordered-values-6.0.1.tgz", + "integrity": "sha512-XXbb1O/MW9HdEhnBxitZpPFbIvDgbo9NK4c/5bOfiKpnIGZDoL2xd7/e6jW5DYLsWxBbs+1nZEnVgnjnlFViaA==", "dev": true, "dependencies": { - "cssnano-utils": "^4.0.0", + "cssnano-utils": "^4.0.1", "postcss-value-parser": "^4.2.0" }, "engines": { "node": "^14 || ^16 || >=18.0" }, "peerDependencies": { - "postcss": "^8.2.15" + "postcss": "^8.4.31" } }, "node_modules/postcss-reduce-initial": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/postcss-reduce-initial/-/postcss-reduce-initial-6.0.0.tgz", - "integrity": "sha512-s2UOnidpVuXu6JiiI5U+fV2jamAw5YNA9Fdi/GRK0zLDLCfXmSGqQtzpUPtfN66RtCbb9fFHoyZdQaxOB3WxVA==", + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/postcss-reduce-initial/-/postcss-reduce-initial-6.0.2.tgz", + "integrity": "sha512-YGKalhNlCLcjcLvjU5nF8FyeCTkCO5UtvJEt0hrPZVCTtRLSOH4z00T1UntQPj4dUmIYZgMj8qK77JbSX95hSw==", "dev": true, "dependencies": { - "browserslist": "^4.21.4", + "browserslist": "^4.22.2", "caniuse-api": "^3.0.0" }, "engines": { "node": "^14 || ^16 || >=18.0" }, "peerDependencies": { - "postcss": "^8.2.15" + "postcss": "^8.4.31" } }, "node_modules/postcss-reduce-transforms": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/postcss-reduce-transforms/-/postcss-reduce-transforms-6.0.0.tgz", - "integrity": "sha512-FQ9f6xM1homnuy1wLe9lP1wujzxnwt1EwiigtWwuyf8FsqqXUDUp2Ulxf9A5yjlUOTdCJO6lonYjg1mgqIIi2w==", + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/postcss-reduce-transforms/-/postcss-reduce-transforms-6.0.1.tgz", + "integrity": "sha512-fUbV81OkUe75JM+VYO1gr/IoA2b/dRiH6HvMwhrIBSUrxq3jNZQZitSnugcTLDi1KkQh1eR/zi+iyxviUNBkcQ==", "dev": true, "dependencies": { "postcss-value-parser": "^4.2.0" @@ -8564,13 +8585,13 @@ "node": "^14 || ^16 || >=18.0" }, "peerDependencies": { - "postcss": "^8.2.15" + "postcss": "^8.4.31" } }, "node_modules/postcss-selector-parser": { - "version": "6.0.13", - "resolved": "https://registry.npmjs.org/postcss-selector-parser/-/postcss-selector-parser-6.0.13.tgz", - "integrity": "sha512-EaV1Gl4mUEV4ddhDnv/xtj7sxwrwxdetHdWUGnT4VJQf+4d05v6lHYZr8N573k5Z0BViss7BDhfWtKS3+sfAqQ==", + "version": "6.0.15", + "resolved": "https://registry.npmjs.org/postcss-selector-parser/-/postcss-selector-parser-6.0.15.tgz", + "integrity": "sha512-rEYkQOMUCEMhsKbK66tbEU9QVIxbhN18YiniAwA7XQYTVBqrBy+P2p5JcdqsHgKM2zWylp8d7J6eszocfds5Sw==", "dev": true, "dependencies": { "cssesc": "^3.0.0", @@ -8581,34 +8602,34 @@ } }, "node_modules/postcss-svgo": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/postcss-svgo/-/postcss-svgo-6.0.0.tgz", - "integrity": "sha512-r9zvj/wGAoAIodn84dR/kFqwhINp5YsJkLoujybWG59grR/IHx+uQ2Zo+IcOwM0jskfYX3R0mo+1Kip1VSNcvw==", + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/postcss-svgo/-/postcss-svgo-6.0.2.tgz", + "integrity": "sha512-IH5R9SjkTkh0kfFOQDImyy1+mTCb+E830+9SV1O+AaDcoHTvfsvt6WwJeo7KwcHbFnevZVCsXhDmjFiGVuwqFQ==", "dev": true, "dependencies": { "postcss-value-parser": "^4.2.0", - "svgo": "^3.0.2" + "svgo": "^3.2.0" }, "engines": { "node": "^14 || ^16 || >= 18" }, "peerDependencies": { - "postcss": "^8.2.15" + "postcss": "^8.4.31" } }, "node_modules/postcss-unique-selectors": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/postcss-unique-selectors/-/postcss-unique-selectors-6.0.0.tgz", - "integrity": "sha512-EPQzpZNxOxP7777t73RQpZE5e9TrnCrkvp7AH7a0l89JmZiPnS82y216JowHXwpBCQitfyxrof9TK3rYbi7/Yw==", + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/postcss-unique-selectors/-/postcss-unique-selectors-6.0.2.tgz", + "integrity": "sha512-8IZGQ94nechdG7Y9Sh9FlIY2b4uS8/k8kdKRX040XHsS3B6d1HrJAkXrBSsSu4SuARruSsUjW3nlSw8BHkaAYQ==", "dev": true, "dependencies": { - "postcss-selector-parser": "^6.0.5" + "postcss-selector-parser": "^6.0.15" }, "engines": { "node": "^14 || ^16 || >=18.0" }, "peerDependencies": { - "postcss": "^8.2.15" + "postcss": "^8.4.31" } }, "node_modules/postcss-value-parser": { @@ -9967,9 +9988,9 @@ } }, "node_modules/serialize-javascript": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-6.0.1.tgz", - "integrity": "sha512-owoXEFjWRllis8/M1Q+Cw5k8ZH40e3zhp/ovX+Xr/vi1qj6QesbyXXViFbpNvWvPNAD62SutwEXavefrLJWj7w==", + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-6.0.2.tgz", + "integrity": "sha512-Saa1xPByTTq2gdeFZYLLo+RFE35NHZkAbqZeWNd3BpzppeVisAqpDjcp8dyf6uIvEqJRd46jemmyA4iFIeVk8g==", "dev": true, "dependencies": { "randombytes": "^2.1.0" @@ -10384,19 +10405,19 @@ "dev": true }, "node_modules/stylehacks": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/stylehacks/-/stylehacks-6.0.0.tgz", - "integrity": "sha512-+UT589qhHPwz6mTlCLSt/vMNTJx8dopeJlZAlBMJPWA3ORqu6wmQY7FBXf+qD+FsqoBJODyqNxOUP3jdntFRdw==", + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/stylehacks/-/stylehacks-6.0.2.tgz", + "integrity": "sha512-00zvJGnCu64EpMjX8b5iCZ3us2Ptyw8+toEkb92VdmkEaRaSGBNKAoK6aWZckhXxmQP8zWiTaFaiMGIU8Ve8sg==", "dev": true, "dependencies": { - "browserslist": "^4.21.4", - "postcss-selector-parser": "^6.0.4" + "browserslist": "^4.22.2", + "postcss-selector-parser": "^6.0.15" }, "engines": { "node": "^14 || ^16 || >=18.0" }, "peerDependencies": { - "postcss": "^8.2.15" + "postcss": "^8.4.31" } }, "node_modules/supports-color": { @@ -10424,16 +10445,17 @@ } }, "node_modules/svgo": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/svgo/-/svgo-3.0.3.tgz", - "integrity": "sha512-X4UZvLhOglD5Xrp834HzGHf8RKUW0Ahigg/08yRO1no9t2NxffOkMiQ0WmaMIbaGlVTlSst2zWANsdhz5ybXgA==", + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/svgo/-/svgo-3.2.0.tgz", + "integrity": "sha512-4PP6CMW/V7l/GmKRKzsLR8xxjdHTV4IMvhTnpuHwwBazSIlw5W/5SmPjN8Dwyt7lKbSJrRDgp4t9ph0HgChFBQ==", "dev": true, "dependencies": { "@trysound/sax": "0.2.0", "commander": "^7.2.0", "css-select": "^5.1.0", - "css-tree": "^2.2.1", - "csso": "5.0.5", + "css-tree": "^2.3.1", + "css-what": "^6.1.0", + "csso": "^5.0.5", "picocolors": "^1.0.0" }, "bin": { diff --git a/package.json b/package.json index 36708da..5b7061a 100644 --- a/package.json +++ b/package.json @@ -39,7 +39,7 @@ "eslint-plugin-react-hooks": "^4.3.0", "html-webpack-plugin": "5.6.0", "mini-css-extract-plugin": "^2.7.6", - "css-minimizer-webpack-plugin": "^5.0.1", + "css-minimizer-webpack-plugin": "^6.0.0", "prop-types": "^15.7.2", "rollup": "^4.3.0", "rollup-plugin-peer-deps-external": "^2.2.4", From 968a0f9a5ab266a9fa106d73e87c0d4075e56687 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Thu, 18 Jan 2024 20:07:48 +0000 Subject: [PATCH 12/16] chore(deps): update dependency css-loader to v6.9.1 --- package-lock.json | 38 +++++++++++++++++++------------------- 1 file changed, 19 insertions(+), 19 deletions(-) diff --git a/package-lock.json b/package-lock.json index 1fea615..5a0ccfd 100644 --- a/package-lock.json +++ b/package-lock.json @@ -4010,16 +4010,16 @@ } }, "node_modules/css-loader": { - "version": "6.9.0", - "resolved": "https://registry.npmjs.org/css-loader/-/css-loader-6.9.0.tgz", - "integrity": "sha512-3I5Nu4ytWlHvOP6zItjiHlefBNtrH+oehq8tnQa2kO305qpVyx9XNIT1CXIj5bgCJs7qICBCkgCYxQLKPANoLA==", + "version": "6.9.1", + "resolved": "https://registry.npmjs.org/css-loader/-/css-loader-6.9.1.tgz", + "integrity": "sha512-OzABOh0+26JKFdMzlK6PY1u5Zx8+Ck7CVRlcGNZoY9qwJjdfu2VWFuprTIpPW+Av5TZTVViYWcFQaEEQURLknQ==", "dev": true, "dependencies": { "icss-utils": "^5.1.0", - "postcss": "^8.4.31", + "postcss": "^8.4.33", "postcss-modules-extract-imports": "^3.0.0", - "postcss-modules-local-by-default": "^4.0.3", - "postcss-modules-scope": "^3.1.0", + "postcss-modules-local-by-default": "^4.0.4", + "postcss-modules-scope": "^3.1.1", "postcss-modules-values": "^4.0.0", "postcss-value-parser": "^4.2.0", "semver": "^7.5.4" @@ -7500,9 +7500,9 @@ } }, "node_modules/nanoid": { - "version": "3.3.6", - "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.6.tgz", - "integrity": "sha512-BGcqMMJuToF7i1rt+2PWSNVnWIkGCU78jBG3RxO/bZlnZPK2Cmi2QaffxGO/2RvWi9sL+FAiRiXMgsyxQ1DIDA==", + "version": "3.3.7", + "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.7.tgz", + "integrity": "sha512-eSRppjcPIatRIMC1U6UngP8XFcz8MQWGQdt1MTBQ7NaAmvXDfvNxbvWV3x2y6CdEUciCSsDHDQZbhYaB8QEo2g==", "dev": true, "funding": [ { @@ -8057,9 +8057,9 @@ } }, "node_modules/postcss": { - "version": "8.4.31", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.31.tgz", - "integrity": "sha512-PS08Iboia9mts/2ygV3eLpY5ghnUcfLV/EXTOW1E2qYxJKGGBUtNjN76FYHnMs36RmARn41bC0AZmn+rR0OVpQ==", + "version": "8.4.33", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.33.tgz", + "integrity": "sha512-Kkpbhhdjw2qQs2O2DGX+8m5OVqEcbB9HRBvuYM9pgrjEFUg30A9LmXNlTAUj4S9kgtGyrMbTzVjH7E+s5Re2yg==", "dev": true, "funding": [ { @@ -8076,7 +8076,7 @@ } ], "dependencies": { - "nanoid": "^3.3.6", + "nanoid": "^3.3.7", "picocolors": "^1.0.0", "source-map-js": "^1.0.2" }, @@ -8341,9 +8341,9 @@ } }, "node_modules/postcss-modules-local-by-default": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/postcss-modules-local-by-default/-/postcss-modules-local-by-default-4.0.3.tgz", - "integrity": "sha512-2/u2zraspoACtrbFRnTijMiQtb4GW4BvatjaG/bCjYQo8kLTdevCUlwuBHx2sCnSyrI3x3qj4ZK1j5LQBgzmwA==", + "version": "4.0.4", + "resolved": "https://registry.npmjs.org/postcss-modules-local-by-default/-/postcss-modules-local-by-default-4.0.4.tgz", + "integrity": "sha512-L4QzMnOdVwRm1Qb8m4x8jsZzKAaPAgrUF1r/hjDR2Xj7R+8Zsf97jAlSQzWtKx5YNiNGN8QxmPFIc/sh+RQl+Q==", "dev": true, "dependencies": { "icss-utils": "^5.0.0", @@ -8358,9 +8358,9 @@ } }, "node_modules/postcss-modules-scope": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/postcss-modules-scope/-/postcss-modules-scope-3.1.0.tgz", - "integrity": "sha512-SaIbK8XW+MZbd0xHPf7kdfA/3eOt7vxJ72IRecn3EzuZVLr1r0orzf0MX/pN8m+NMDoo6X/SQd8oeKqGZd8PXg==", + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/postcss-modules-scope/-/postcss-modules-scope-3.1.1.tgz", + "integrity": "sha512-uZgqzdTleelWjzJY+Fhti6F3C9iF1JR/dODLs/JDefozYcKTBCdD8BIl6nNPbTbcLnGrk56hzwZC2DaGNvYjzA==", "dev": true, "dependencies": { "postcss-selector-parser": "^6.0.4" From 1ccbf7e4a5a28f31435f6b4d5b2d656267356544 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Sun, 21 Jan 2024 07:00:02 +0000 Subject: [PATCH 13/16] chore(deps): update dependency rollup to v4.9.6 --- package-lock.json | 110 +++++++++++++++++++++++----------------------- 1 file changed, 55 insertions(+), 55 deletions(-) diff --git a/package-lock.json b/package-lock.json index 5a0ccfd..9883482 100644 --- a/package-lock.json +++ b/package-lock.json @@ -2405,9 +2405,9 @@ "dev": true }, "node_modules/@rollup/rollup-android-arm-eabi": { - "version": "4.9.5", - "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.9.5.tgz", - "integrity": "sha512-idWaG8xeSRCfRq9KpRysDHJ/rEHBEXcHuJ82XY0yYFIWnLMjZv9vF/7DOq8djQ2n3Lk6+3qfSH8AqlmHlmi1MA==", + "version": "4.9.6", + "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.9.6.tgz", + "integrity": "sha512-MVNXSSYN6QXOulbHpLMKYi60ppyO13W9my1qogeiAqtjb2yR4LSmfU2+POvDkLzhjYLXz9Rf9+9a3zFHW1Lecg==", "cpu": [ "arm" ], @@ -2418,9 +2418,9 @@ ] }, "node_modules/@rollup/rollup-android-arm64": { - "version": "4.9.5", - "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm64/-/rollup-android-arm64-4.9.5.tgz", - "integrity": "sha512-f14d7uhAMtsCGjAYwZGv6TwuS3IFaM4ZnGMUn3aCBgkcHAYErhV1Ad97WzBvS2o0aaDv4mVz+syiN0ElMyfBPg==", + "version": "4.9.6", + "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm64/-/rollup-android-arm64-4.9.6.tgz", + "integrity": "sha512-T14aNLpqJ5wzKNf5jEDpv5zgyIqcpn1MlwCrUXLrwoADr2RkWA0vOWP4XxbO9aiO3dvMCQICZdKeDrFl7UMClw==", "cpu": [ "arm64" ], @@ -2431,9 +2431,9 @@ ] }, "node_modules/@rollup/rollup-darwin-arm64": { - "version": "4.9.5", - "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.9.5.tgz", - "integrity": "sha512-ndoXeLx455FffL68OIUrVr89Xu1WLzAG4n65R8roDlCoYiQcGGg6MALvs2Ap9zs7AHg8mpHtMpwC8jBBjZrT/w==", + "version": "4.9.6", + "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.9.6.tgz", + "integrity": "sha512-CqNNAyhRkTbo8VVZ5R85X73H3R5NX9ONnKbXuHisGWC0qRbTTxnF1U4V9NafzJbgGM0sHZpdO83pLPzq8uOZFw==", "cpu": [ "arm64" ], @@ -2444,9 +2444,9 @@ ] }, "node_modules/@rollup/rollup-darwin-x64": { - "version": "4.9.5", - "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-x64/-/rollup-darwin-x64-4.9.5.tgz", - "integrity": "sha512-UmElV1OY2m/1KEEqTlIjieKfVwRg0Zwg4PLgNf0s3glAHXBN99KLpw5A5lrSYCa1Kp63czTpVll2MAqbZYIHoA==", + "version": "4.9.6", + "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-x64/-/rollup-darwin-x64-4.9.6.tgz", + "integrity": "sha512-zRDtdJuRvA1dc9Mp6BWYqAsU5oeLixdfUvkTHuiYOHwqYuQ4YgSmi6+/lPvSsqc/I0Omw3DdICx4Tfacdzmhog==", "cpu": [ "x64" ], @@ -2457,9 +2457,9 @@ ] }, "node_modules/@rollup/rollup-linux-arm-gnueabihf": { - "version": "4.9.5", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-gnueabihf/-/rollup-linux-arm-gnueabihf-4.9.5.tgz", - "integrity": "sha512-Q0LcU61v92tQB6ae+udZvOyZ0wfpGojtAKrrpAaIqmJ7+psq4cMIhT/9lfV6UQIpeItnq/2QDROhNLo00lOD1g==", + "version": "4.9.6", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-gnueabihf/-/rollup-linux-arm-gnueabihf-4.9.6.tgz", + "integrity": "sha512-oNk8YXDDnNyG4qlNb6is1ojTOGL/tRhbbKeE/YuccItzerEZT68Z9gHrY3ROh7axDc974+zYAPxK5SH0j/G+QQ==", "cpu": [ "arm" ], @@ -2470,9 +2470,9 @@ ] }, "node_modules/@rollup/rollup-linux-arm64-gnu": { - "version": "4.9.5", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-gnu/-/rollup-linux-arm64-gnu-4.9.5.tgz", - "integrity": "sha512-dkRscpM+RrR2Ee3eOQmRWFjmV/payHEOrjyq1VZegRUa5OrZJ2MAxBNs05bZuY0YCtpqETDy1Ix4i/hRqX98cA==", + "version": "4.9.6", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-gnu/-/rollup-linux-arm64-gnu-4.9.6.tgz", + "integrity": "sha512-Z3O60yxPtuCYobrtzjo0wlmvDdx2qZfeAWTyfOjEDqd08kthDKexLpV97KfAeUXPosENKd8uyJMRDfFMxcYkDQ==", "cpu": [ "arm64" ], @@ -2483,9 +2483,9 @@ ] }, "node_modules/@rollup/rollup-linux-arm64-musl": { - "version": "4.9.5", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-musl/-/rollup-linux-arm64-musl-4.9.5.tgz", - "integrity": "sha512-QaKFVOzzST2xzY4MAmiDmURagWLFh+zZtttuEnuNn19AiZ0T3fhPyjPPGwLNdiDT82ZE91hnfJsUiDwF9DClIQ==", + "version": "4.9.6", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-musl/-/rollup-linux-arm64-musl-4.9.6.tgz", + "integrity": "sha512-gpiG0qQJNdYEVad+1iAsGAbgAnZ8j07FapmnIAQgODKcOTjLEWM9sRb+MbQyVsYCnA0Im6M6QIq6ax7liws6eQ==", "cpu": [ "arm64" ], @@ -2496,9 +2496,9 @@ ] }, "node_modules/@rollup/rollup-linux-riscv64-gnu": { - "version": "4.9.5", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-gnu/-/rollup-linux-riscv64-gnu-4.9.5.tgz", - "integrity": "sha512-HeGqmRJuyVg6/X6MpE2ur7GbymBPS8Np0S/vQFHDmocfORT+Zt76qu+69NUoxXzGqVP1pzaY6QIi0FJWLC3OPA==", + "version": "4.9.6", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-gnu/-/rollup-linux-riscv64-gnu-4.9.6.tgz", + "integrity": "sha512-+uCOcvVmFUYvVDr27aiyun9WgZk0tXe7ThuzoUTAukZJOwS5MrGbmSlNOhx1j80GdpqbOty05XqSl5w4dQvcOA==", "cpu": [ "riscv64" ], @@ -2509,9 +2509,9 @@ ] }, "node_modules/@rollup/rollup-linux-x64-gnu": { - "version": "4.9.5", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.9.5.tgz", - "integrity": "sha512-Dq1bqBdLaZ1Gb/l2e5/+o3B18+8TI9ANlA1SkejZqDgdU/jK/ThYaMPMJpVMMXy2uRHvGKbkz9vheVGdq3cJfA==", + "version": "4.9.6", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.9.6.tgz", + "integrity": "sha512-HUNqM32dGzfBKuaDUBqFB7tP6VMN74eLZ33Q9Y1TBqRDn+qDonkAUyKWwF9BR9unV7QUzffLnz9GrnKvMqC/fw==", "cpu": [ "x64" ], @@ -2522,9 +2522,9 @@ ] }, "node_modules/@rollup/rollup-linux-x64-musl": { - "version": "4.9.5", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-musl/-/rollup-linux-x64-musl-4.9.5.tgz", - "integrity": "sha512-ezyFUOwldYpj7AbkwyW9AJ203peub81CaAIVvckdkyH8EvhEIoKzaMFJj0G4qYJ5sw3BpqhFrsCc30t54HV8vg==", + "version": "4.9.6", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-musl/-/rollup-linux-x64-musl-4.9.6.tgz", + "integrity": "sha512-ch7M+9Tr5R4FK40FHQk8VnML0Szi2KRujUgHXd/HjuH9ifH72GUmw6lStZBo3c3GB82vHa0ZoUfjfcM7JiiMrQ==", "cpu": [ "x64" ], @@ -2535,9 +2535,9 @@ ] }, "node_modules/@rollup/rollup-win32-arm64-msvc": { - "version": "4.9.5", - "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-arm64-msvc/-/rollup-win32-arm64-msvc-4.9.5.tgz", - "integrity": "sha512-aHSsMnUw+0UETB0Hlv7B/ZHOGY5bQdwMKJSzGfDfvyhnpmVxLMGnQPGNE9wgqkLUs3+gbG1Qx02S2LLfJ5GaRQ==", + "version": "4.9.6", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-arm64-msvc/-/rollup-win32-arm64-msvc-4.9.6.tgz", + "integrity": "sha512-VD6qnR99dhmTQ1mJhIzXsRcTBvTjbfbGGwKAHcu+52cVl15AC/kplkhxzW/uT0Xl62Y/meBKDZvoJSJN+vTeGA==", "cpu": [ "arm64" ], @@ -2548,9 +2548,9 @@ ] }, "node_modules/@rollup/rollup-win32-ia32-msvc": { - "version": "4.9.5", - "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-ia32-msvc/-/rollup-win32-ia32-msvc-4.9.5.tgz", - "integrity": "sha512-AiqiLkb9KSf7Lj/o1U3SEP9Zn+5NuVKgFdRIZkvd4N0+bYrTOovVd0+LmYCPQGbocT4kvFyK+LXCDiXPBF3fyA==", + "version": "4.9.6", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-ia32-msvc/-/rollup-win32-ia32-msvc-4.9.6.tgz", + "integrity": "sha512-J9AFDq/xiRI58eR2NIDfyVmTYGyIZmRcvcAoJ48oDld/NTR8wyiPUu2X/v1navJ+N/FGg68LEbX3Ejd6l8B7MQ==", "cpu": [ "ia32" ], @@ -2561,9 +2561,9 @@ ] }, "node_modules/@rollup/rollup-win32-x64-msvc": { - "version": "4.9.5", - "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.9.5.tgz", - "integrity": "sha512-1q+mykKE3Vot1kaFJIDoUFv5TuW+QQVaf2FmTT9krg86pQrGStOSJJ0Zil7CFagyxDuouTepzt5Y5TVzyajOdQ==", + "version": "4.9.6", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.9.6.tgz", + "integrity": "sha512-jqzNLhNDvIZOrt69Ce4UjGRpXJBzhUBzawMwnaDAwyHriki3XollsewxWzOzz+4yOFDkuJHtTsZFwMxhYJWmLQ==", "cpu": [ "x64" ], @@ -9055,9 +9055,9 @@ } }, "node_modules/rollup": { - "version": "4.9.5", - "resolved": "https://registry.npmjs.org/rollup/-/rollup-4.9.5.tgz", - "integrity": "sha512-E4vQW0H/mbNMw2yLSqJyjtkHY9dslf/p0zuT1xehNRqUTBOFMqEjguDvqhXr7N7r/4ttb2jr4T41d3dncmIgbQ==", + "version": "4.9.6", + "resolved": "https://registry.npmjs.org/rollup/-/rollup-4.9.6.tgz", + "integrity": "sha512-05lzkCS2uASX0CiLFybYfVkwNbKZG5NFQ6Go0VWyogFTXXbR039UVsegViTntkk4OglHBdF54ccApXRRuXRbsg==", "dev": true, "dependencies": { "@types/estree": "1.0.5" @@ -9070,19 +9070,19 @@ "npm": ">=8.0.0" }, "optionalDependencies": { - "@rollup/rollup-android-arm-eabi": "4.9.5", - "@rollup/rollup-android-arm64": "4.9.5", - "@rollup/rollup-darwin-arm64": "4.9.5", - "@rollup/rollup-darwin-x64": "4.9.5", - "@rollup/rollup-linux-arm-gnueabihf": "4.9.5", - "@rollup/rollup-linux-arm64-gnu": "4.9.5", - "@rollup/rollup-linux-arm64-musl": "4.9.5", - "@rollup/rollup-linux-riscv64-gnu": "4.9.5", - "@rollup/rollup-linux-x64-gnu": "4.9.5", - "@rollup/rollup-linux-x64-musl": "4.9.5", - "@rollup/rollup-win32-arm64-msvc": "4.9.5", - "@rollup/rollup-win32-ia32-msvc": "4.9.5", - "@rollup/rollup-win32-x64-msvc": "4.9.5", + "@rollup/rollup-android-arm-eabi": "4.9.6", + "@rollup/rollup-android-arm64": "4.9.6", + "@rollup/rollup-darwin-arm64": "4.9.6", + "@rollup/rollup-darwin-x64": "4.9.6", + "@rollup/rollup-linux-arm-gnueabihf": "4.9.6", + "@rollup/rollup-linux-arm64-gnu": "4.9.6", + "@rollup/rollup-linux-arm64-musl": "4.9.6", + "@rollup/rollup-linux-riscv64-gnu": "4.9.6", + "@rollup/rollup-linux-x64-gnu": "4.9.6", + "@rollup/rollup-linux-x64-musl": "4.9.6", + "@rollup/rollup-win32-arm64-msvc": "4.9.6", + "@rollup/rollup-win32-ia32-msvc": "4.9.6", + "@rollup/rollup-win32-x64-msvc": "4.9.6", "fsevents": "~2.3.2" } }, From 2a4c8e19b5e9f1d665790e0e5afff2ec4abcb82e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D5=A1=C9=A8=D5=BC=C9=A2=D3=84=D5=A1=D6=85=D5=BC=C9=A2?= Date: Sun, 21 Jan 2024 20:15:52 +0800 Subject: [PATCH 14/16] docs: add space between slash --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index b04d8b9..09907e5 100644 --- a/README.md +++ b/README.md @@ -271,7 +271,7 @@ import { quiz } from './quiz'; ``` -## Pause/Resume Timer Feature +## Pause / Resume Timer Feature ```js import { quiz } from './quiz'; @@ -294,7 +294,7 @@ import { quiz } from './quiz'; |onQuestionSubmit|`function`|`null`|N|A user response for a question will be returned| |disableSynopsis|`boolean`|`false`|N|Disable synopsis before quiz| |timer|`number`|`false`|N|Sets timer in seconds| -|allowPauseTimer|`boolean`|`false`|N|Pause/Resume timer| +|allowPauseTimer|`boolean`|`false`|N|Pause / Resume timer| ## Contribution From 87fe7d185249cca941b38da5637c4b9c75a74233 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D5=A1=C9=A8=D5=BC=C9=A2=D3=84=D5=A1=D6=85=D5=BC=C9=A2?= Date: Sun, 21 Jan 2024 20:16:17 +0800 Subject: [PATCH 15/16] chore(lib): add space before displayTime --- src/lib/Core.jsx | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/lib/Core.jsx b/src/lib/Core.jsx index afa32db..3d0151a 100644 --- a/src/lib/Core.jsx +++ b/src/lib/Core.jsx @@ -395,6 +395,7 @@ function Core({
{appLocale.timerTimeTaken} : + {' '} {displayTime(timer - timeRemaining)}
)} @@ -403,7 +404,10 @@ function Core({
{appLocale.timerTimeRemaining} : - {displayTime(timeRemaining)} + {' '} + + {displayTime(timeRemaining)} +
)} {timer && timeRemaining === 0 && isRunning && handleTimeUp()} From b499aa4a8b51988108451b22bd10b6c9d99ce03f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D5=A1=C9=A8=D5=BC=C9=A2=D3=84=D5=A1=D6=85=D5=BC=C9=A2?= Date: Sun, 21 Jan 2024 20:18:28 +0800 Subject: [PATCH 16/16] 0.8.0 Release --- CHANGELOG.md | 6 ++++++ dist/index.es.js | 4 ++-- dist/index.js | 4 ++-- docs/bundle.js | 2 +- docs/main.css | 2 +- package-lock.json | 4 ++-- package.json | 2 +- 7 files changed, 15 insertions(+), 9 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index c6b93d8..d946662 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,11 @@ # CHANGELOG +## 0.8.0 + +- Bumped dependencies +- Introduced Timer Support with Pause / Resume +- Supported unanswered questions + ## 0.7.1 - Bumped dependencies diff --git a/dist/index.es.js b/dist/index.es.js index 932fe43..d442b46 100644 --- a/dist/index.es.js +++ b/dist/index.es.js @@ -1,2 +1,2 @@ -import e,{useState as t,useRef as n,useEffect as r,useCallback as o,Fragment as i}from"react";function a(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function c(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,r=new Array(t);n",""],_:["",""],"*":["",""],"~":["",""],"\n":["
"]," ":["
"],"-":["
"]};function L(e){return e.replace(RegExp("^"+(e.match(/^(\t| )+/)||"")[0],"gm"),"")}function D(e){return(e+"").replace(/"/g,""").replace(//g,">")}function q(e,t){var n,r,o,i,a,c=/((?:^|\n+)(?:\n---+|\* \*(?: \*)+)\n)|(?:^``` *(\w*)\n([\s\S]*?)\n```$)|((?:(?:^|\n+)(?:\t| {2,}).+)+\n*)|((?:(?:^|\n)([>*+-]|\d+\.)\s+.*)+)|(?:!\[([^\]]*?)\]\(([^)]+?)\))|(\[)|(\](?:\(([^)]+?)\))?)|(?:(?:^|\n+)([^\s].*)\n(-{3,}|={3,})(?:\n+|$))|(?:(?:^|\n+)(#{1,6})\s*(.+)(?:\n+|$))|(?:`([^`].*?)`)|( \n\n*|\n{2,}|__|\*\*|[_*]|~~)/gm,s=[],l="",u=t||{},d=0;function p(e){var t=R[e[1]||""],n=s[s.length-1]==e;return t?t[1]?(n?s.pop():s.push(e),t[0|n]):t[0]:e}function f(){for(var e="";s.length;)e+=p(s[s.length-1]);return e}for(e=e.replace(/^\[(.+?)\]:\s*(.+)$/gm,(function(e,t,n){return u[t.toLowerCase()]=n,""})).replace(/^\n+|\n+$/g,"");o=c.exec(e);)r=e.substring(d,o.index),d=c.lastIndex,n=o[0],r.match(/[^\\](\\\\)*\\$/)||((a=o[3]||o[4])?n='
"+L(D(a).replace(/^\n+|\n+$/g,""))+"
":(a=o[6])?(a.match(/\./)&&(o[5]=o[5].replace(/^\d+/gm,"")),i=q(L(o[5].replace(/^\s*[>*+.-]/gm,""))),">"==a?a="blockquote":(a=a.match(/\./)?"ol":"ul",i=i.replace(/^(.*)(\n|$)/gm,"
  • $1
  • ")),n="<"+a+">"+i+""):o[8]?n=''+D(o[7])+'':o[10]?(l=l.replace("",''),n=f()+""):o[9]?n="":o[12]||o[14]?n="<"+(a="h"+(o[14]?o[14].length:o[13]>"="?1:2))+">"+q(o[12]||o[15],u)+"":o[16]?n=""+D(o[16])+"":(o[17]||o[1])&&(n=p(o[17]||"--"))),l+=r,l+=n;return(l+e.substring(d)+f()).replace(/^\n+|\n+$/g,"")}var j={exports:{}}; -/*! @license DOMPurify 3.0.6 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.0.6/LICENSE */j.exports=function(){const{entries:e,setPrototypeOf:t,isFrozen:n,getPrototypeOf:r,getOwnPropertyDescriptor:o}=Object;let{freeze:i,seal:a,create:c}=Object,{apply:s,construct:l}="undefined"!=typeof Reflect&&Reflect;i||(i=function(e){return e}),a||(a=function(e){return e}),s||(s=function(e,t,n){return e.apply(t,n)}),l||(l=function(e,t){return new e(...t)});const u=v(Array.prototype.forEach),d=v(Array.prototype.pop),p=v(Array.prototype.push),f=v(String.prototype.toLowerCase),m=v(String.prototype.toString),g=v(String.prototype.match),h=v(String.prototype.replace),b=v(String.prototype.indexOf),y=v(String.prototype.trim),x=v(RegExp.prototype.test),w=T(TypeError);function v(e){return function(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),o=1;o2&&void 0!==arguments[2]?arguments[2]:f;t&&t(e,null);let i=r.length;for(;i--;){let t=r[i];if("string"==typeof t){const e=o(t);e!==t&&(n(r)||(r[i]=e),t=e)}e[t]=!0}return e}function N(t){const n=c(null);for(const[r,i]of e(t))void 0!==o(t,r)&&(n[r]=i);return n}function S(e,t){for(;null!==e;){const n=o(e,t);if(n){if(n.get)return v(n.get);if("function"==typeof n.value)return v(n.value)}e=r(e)}function n(e){return console.warn("fallback value for",e),null}return n}const E=i(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","section","select","shadow","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),O=i(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","filter","font","g","glyph","glyphref","hkern","image","line","lineargradient","marker","mask","metadata","mpath","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),_=i(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),k=i(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),I=i(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),C=i(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),R=i(["#text"]),L=i(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","face","for","headers","height","hidden","high","href","hreflang","id","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","pattern","placeholder","playsinline","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","xmlns","slot"]),D=i(["accent-height","accumulate","additive","alignment-baseline","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),q=i(["accent","accentunder","align","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lspace","lquote","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),j=i(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),z=a(/\{\{[\w\W]*|[\w\W]*\}\}/gm),P=a(/<%[\w\W]*|[\w\W]*%>/gm),M=a(/\${[\w\W]*}/gm),U=a(/^data-[\-\w.\u00B7-\uFFFF]/),F=a(/^aria-[\-\w]+$/),B=a(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),H=a(/^(?:\w+script|data):/i),Q=a(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),W=a(/^html$/i);var Y=Object.freeze({__proto__:null,MUSTACHE_EXPR:z,ERB_EXPR:P,TMPLIT_EXPR:M,DATA_ATTR:U,ARIA_ATTR:F,IS_ALLOWED_URI:B,IS_SCRIPT_OR_DATA:H,ATTR_WHITESPACE:Q,DOCTYPE_NAME:W});const G=function(){return"undefined"==typeof window?null:window},$=function(e,t){if("object"!=typeof e||"function"!=typeof e.createPolicy)return null;let n=null;const r="data-tt-policy-suffix";t&&t.hasAttribute(r)&&(n=t.getAttribute(r));const o="dompurify"+(n?"#"+n:"");try{return e.createPolicy(o,{createHTML:e=>e,createScriptURL:e=>e})}catch(e){return console.warn("TrustedTypes policy "+o+" could not be created."),null}};function V(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:G();const n=e=>V(e);if(n.version="3.0.6",n.removed=[],!t||!t.document||9!==t.document.nodeType)return n.isSupported=!1,n;let{document:r}=t;const o=r,a=o.currentScript,{DocumentFragment:s,HTMLTemplateElement:l,Node:v,Element:T,NodeFilter:z,NamedNodeMap:P=t.NamedNodeMap||t.MozNamedAttrMap,HTMLFormElement:M,DOMParser:U,trustedTypes:F}=t,H=T.prototype,Q=S(H,"cloneNode"),K=S(H,"nextSibling"),X=S(H,"childNodes"),Z=S(H,"parentNode");if("function"==typeof l){const e=r.createElement("template");e.content&&e.content.ownerDocument&&(r=e.content.ownerDocument)}let J,ee="";const{implementation:te,createNodeIterator:ne,createDocumentFragment:re,getElementsByTagName:oe}=r,{importNode:ie}=o;let ae={};n.isSupported="function"==typeof e&&"function"==typeof Z&&te&&void 0!==te.createHTMLDocument;const{MUSTACHE_EXPR:ce,ERB_EXPR:se,TMPLIT_EXPR:le,DATA_ATTR:ue,ARIA_ATTR:de,IS_SCRIPT_OR_DATA:pe,ATTR_WHITESPACE:fe}=Y;let{IS_ALLOWED_URI:me}=Y,ge=null;const he=A({},[...E,...O,..._,...I,...R]);let be=null;const ye=A({},[...L,...D,...q,...j]);let xe=Object.seal(c(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),we=null,ve=null,Te=!0,Ae=!0,Ne=!1,Se=!0,Ee=!1,Oe=!1,_e=!1,ke=!1,Ie=!1,Ce=!1,Re=!1,Le=!0,De=!1;const qe="user-content-";let je=!0,ze=!1,Pe={},Me=null;const Ue=A({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]);let Fe=null;const Be=A({},["audio","video","img","source","image","track"]);let He=null;const Qe=A({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),We="http://www.w3.org/1998/Math/MathML",Ye="http://www.w3.org/2000/svg",Ge="http://www.w3.org/1999/xhtml";let $e=Ge,Ve=!1,Ke=null;const Xe=A({},[We,Ye,Ge],m);let Ze=null;const Je=["application/xhtml+xml","text/html"],et="text/html";let tt=null,nt=null;const rt=r.createElement("form"),ot=function(e){return e instanceof RegExp||e instanceof Function},it=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!nt||nt!==e){if(e&&"object"==typeof e||(e={}),e=N(e),Ze=Ze=-1===Je.indexOf(e.PARSER_MEDIA_TYPE)?et:e.PARSER_MEDIA_TYPE,tt="application/xhtml+xml"===Ze?m:f,ge="ALLOWED_TAGS"in e?A({},e.ALLOWED_TAGS,tt):he,be="ALLOWED_ATTR"in e?A({},e.ALLOWED_ATTR,tt):ye,Ke="ALLOWED_NAMESPACES"in e?A({},e.ALLOWED_NAMESPACES,m):Xe,He="ADD_URI_SAFE_ATTR"in e?A(N(Qe),e.ADD_URI_SAFE_ATTR,tt):Qe,Fe="ADD_DATA_URI_TAGS"in e?A(N(Be),e.ADD_DATA_URI_TAGS,tt):Be,Me="FORBID_CONTENTS"in e?A({},e.FORBID_CONTENTS,tt):Ue,we="FORBID_TAGS"in e?A({},e.FORBID_TAGS,tt):{},ve="FORBID_ATTR"in e?A({},e.FORBID_ATTR,tt):{},Pe="USE_PROFILES"in e&&e.USE_PROFILES,Te=!1!==e.ALLOW_ARIA_ATTR,Ae=!1!==e.ALLOW_DATA_ATTR,Ne=e.ALLOW_UNKNOWN_PROTOCOLS||!1,Se=!1!==e.ALLOW_SELF_CLOSE_IN_ATTR,Ee=e.SAFE_FOR_TEMPLATES||!1,Oe=e.WHOLE_DOCUMENT||!1,Ie=e.RETURN_DOM||!1,Ce=e.RETURN_DOM_FRAGMENT||!1,Re=e.RETURN_TRUSTED_TYPE||!1,ke=e.FORCE_BODY||!1,Le=!1!==e.SANITIZE_DOM,De=e.SANITIZE_NAMED_PROPS||!1,je=!1!==e.KEEP_CONTENT,ze=e.IN_PLACE||!1,me=e.ALLOWED_URI_REGEXP||B,$e=e.NAMESPACE||Ge,xe=e.CUSTOM_ELEMENT_HANDLING||{},e.CUSTOM_ELEMENT_HANDLING&&ot(e.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(xe.tagNameCheck=e.CUSTOM_ELEMENT_HANDLING.tagNameCheck),e.CUSTOM_ELEMENT_HANDLING&&ot(e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(xe.attributeNameCheck=e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),e.CUSTOM_ELEMENT_HANDLING&&"boolean"==typeof e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements&&(xe.allowCustomizedBuiltInElements=e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),Ee&&(Ae=!1),Ce&&(Ie=!0),Pe&&(ge=A({},[...R]),be=[],!0===Pe.html&&(A(ge,E),A(be,L)),!0===Pe.svg&&(A(ge,O),A(be,D),A(be,j)),!0===Pe.svgFilters&&(A(ge,_),A(be,D),A(be,j)),!0===Pe.mathMl&&(A(ge,I),A(be,q),A(be,j))),e.ADD_TAGS&&(ge===he&&(ge=N(ge)),A(ge,e.ADD_TAGS,tt)),e.ADD_ATTR&&(be===ye&&(be=N(be)),A(be,e.ADD_ATTR,tt)),e.ADD_URI_SAFE_ATTR&&A(He,e.ADD_URI_SAFE_ATTR,tt),e.FORBID_CONTENTS&&(Me===Ue&&(Me=N(Me)),A(Me,e.FORBID_CONTENTS,tt)),je&&(ge["#text"]=!0),Oe&&A(ge,["html","head","body"]),ge.table&&(A(ge,["tbody"]),delete we.tbody),e.TRUSTED_TYPES_POLICY){if("function"!=typeof e.TRUSTED_TYPES_POLICY.createHTML)throw w('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if("function"!=typeof e.TRUSTED_TYPES_POLICY.createScriptURL)throw w('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');J=e.TRUSTED_TYPES_POLICY,ee=J.createHTML("")}else void 0===J&&(J=$(F,a)),null!==J&&"string"==typeof ee&&(ee=J.createHTML(""));i&&i(e),nt=e}},at=A({},["mi","mo","mn","ms","mtext"]),ct=A({},["foreignobject","desc","title","annotation-xml"]),st=A({},["title","style","font","a","script"]),lt=A({},O);A(lt,_),A(lt,k);const ut=A({},I);A(ut,C);const dt=function(e){let t=Z(e);t&&t.tagName||(t={namespaceURI:$e,tagName:"template"});const n=f(e.tagName),r=f(t.tagName);return!!Ke[e.namespaceURI]&&(e.namespaceURI===Ye?t.namespaceURI===Ge?"svg"===n:t.namespaceURI===We?"svg"===n&&("annotation-xml"===r||at[r]):Boolean(lt[n]):e.namespaceURI===We?t.namespaceURI===Ge?"math"===n:t.namespaceURI===Ye?"math"===n&&ct[r]:Boolean(ut[n]):e.namespaceURI===Ge?!(t.namespaceURI===Ye&&!ct[r])&&!(t.namespaceURI===We&&!at[r])&&!ut[n]&&(st[n]||!lt[n]):!("application/xhtml+xml"!==Ze||!Ke[e.namespaceURI]))},pt=function(e){p(n.removed,{element:e});try{e.parentNode.removeChild(e)}catch(t){e.remove()}},ft=function(e,t){try{p(n.removed,{attribute:t.getAttributeNode(e),from:t})}catch(e){p(n.removed,{attribute:null,from:t})}if(t.removeAttribute(e),"is"===e&&!be[e])if(Ie||Ce)try{pt(t)}catch(e){}else try{t.setAttribute(e,"")}catch(e){}},mt=function(e){let t=null,n=null;if(ke)e=""+e;else{const t=g(e,/^[\r\n\t ]+/);n=t&&t[0]}"application/xhtml+xml"===Ze&&$e===Ge&&(e=''+e+"");const o=J?J.createHTML(e):e;if($e===Ge)try{t=(new U).parseFromString(o,Ze)}catch(e){}if(!t||!t.documentElement){t=te.createDocument($e,"template",null);try{t.documentElement.innerHTML=Ve?ee:o}catch(e){}}const i=t.body||t.documentElement;return e&&n&&i.insertBefore(r.createTextNode(n),i.childNodes[0]||null),$e===Ge?oe.call(t,Oe?"html":"body")[0]:Oe?t.documentElement:i},gt=function(e){return ne.call(e.ownerDocument||e,e,z.SHOW_ELEMENT|z.SHOW_COMMENT|z.SHOW_TEXT,null)},ht=function(e){return e instanceof M&&("string"!=typeof e.nodeName||"string"!=typeof e.textContent||"function"!=typeof e.removeChild||!(e.attributes instanceof P)||"function"!=typeof e.removeAttribute||"function"!=typeof e.setAttribute||"string"!=typeof e.namespaceURI||"function"!=typeof e.insertBefore||"function"!=typeof e.hasChildNodes)},bt=function(e){return"function"==typeof v&&e instanceof v},yt=function(e,t,r){ae[e]&&u(ae[e],(e=>{e.call(n,t,r,nt)}))},xt=function(e){let t=null;if(yt("beforeSanitizeElements",e,null),ht(e))return pt(e),!0;const r=tt(e.nodeName);if(yt("uponSanitizeElement",e,{tagName:r,allowedTags:ge}),e.hasChildNodes()&&!bt(e.firstElementChild)&&x(/<[/\w]/g,e.innerHTML)&&x(/<[/\w]/g,e.textContent))return pt(e),!0;if(!ge[r]||we[r]){if(!we[r]&&vt(r)){if(xe.tagNameCheck instanceof RegExp&&x(xe.tagNameCheck,r))return!1;if(xe.tagNameCheck instanceof Function&&xe.tagNameCheck(r))return!1}if(je&&!Me[r]){const t=Z(e)||e.parentNode,n=X(e)||e.childNodes;if(n&&t)for(let r=n.length-1;r>=0;--r)t.insertBefore(Q(n[r],!0),K(e))}return pt(e),!0}return e instanceof T&&!dt(e)?(pt(e),!0):"noscript"!==r&&"noembed"!==r&&"noframes"!==r||!x(/<\/no(script|embed|frames)/i,e.innerHTML)?(Ee&&3===e.nodeType&&(t=e.textContent,u([ce,se,le],(e=>{t=h(t,e," ")})),e.textContent!==t&&(p(n.removed,{element:e.cloneNode()}),e.textContent=t)),yt("afterSanitizeElements",e,null),!1):(pt(e),!0)},wt=function(e,t,n){if(Le&&("id"===t||"name"===t)&&(n in r||n in rt))return!1;if(Ae&&!ve[t]&&x(ue,t));else if(Te&&x(de,t));else if(!be[t]||ve[t]){if(!(vt(e)&&(xe.tagNameCheck instanceof RegExp&&x(xe.tagNameCheck,e)||xe.tagNameCheck instanceof Function&&xe.tagNameCheck(e))&&(xe.attributeNameCheck instanceof RegExp&&x(xe.attributeNameCheck,t)||xe.attributeNameCheck instanceof Function&&xe.attributeNameCheck(t))||"is"===t&&xe.allowCustomizedBuiltInElements&&(xe.tagNameCheck instanceof RegExp&&x(xe.tagNameCheck,n)||xe.tagNameCheck instanceof Function&&xe.tagNameCheck(n))))return!1}else if(He[t]);else if(x(me,h(n,fe,"")));else if("src"!==t&&"xlink:href"!==t&&"href"!==t||"script"===e||0!==b(n,"data:")||!Fe[e])if(Ne&&!x(pe,h(n,fe,"")));else if(n)return!1;return!0},vt=function(e){return e.indexOf("-")>0},Tt=function(e){yt("beforeSanitizeAttributes",e,null);const{attributes:t}=e;if(!t)return;const r={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:be};let o=t.length;for(;o--;){const i=t[o],{name:a,namespaceURI:c,value:s}=i,l=tt(a);let p="value"===a?s:y(s);if(r.attrName=l,r.attrValue=p,r.keepAttr=!0,r.forceKeepAttr=void 0,yt("uponSanitizeAttribute",e,r),p=r.attrValue,r.forceKeepAttr)continue;if(ft(a,e),!r.keepAttr)continue;if(!Se&&x(/\/>/i,p)){ft(a,e);continue}Ee&&u([ce,se,le],(e=>{p=h(p,e," ")}));const f=tt(e.nodeName);if(wt(f,l,p)){if(!De||"id"!==l&&"name"!==l||(ft(a,e),p=qe+p),J&&"object"==typeof F&&"function"==typeof F.getAttributeType)if(c);else switch(F.getAttributeType(f,l)){case"TrustedHTML":p=J.createHTML(p);break;case"TrustedScriptURL":p=J.createScriptURL(p)}try{c?e.setAttributeNS(c,a,p):e.setAttribute(a,p),d(n.removed)}catch(e){}}}yt("afterSanitizeAttributes",e,null)},At=function e(t){let n=null;const r=gt(t);for(yt("beforeSanitizeShadowDOM",t,null);n=r.nextNode();)yt("uponSanitizeShadowNode",n,null),xt(n)||(n.content instanceof s&&e(n.content),Tt(n));yt("afterSanitizeShadowDOM",t,null)};return n.sanitize=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=null,i=null,a=null,c=null;if(Ve=!e,Ve&&(e="\x3c!--\x3e"),"string"!=typeof e&&!bt(e)){if("function"!=typeof e.toString)throw w("toString is not a function");if("string"!=typeof(e=e.toString()))throw w("dirty is not a string, aborting")}if(!n.isSupported)return e;if(_e||it(t),n.removed=[],"string"==typeof e&&(ze=!1),ze){if(e.nodeName){const t=tt(e.nodeName);if(!ge[t]||we[t])throw w("root node is forbidden and cannot be sanitized in-place")}}else if(e instanceof v)r=mt("\x3c!----\x3e"),i=r.ownerDocument.importNode(e,!0),1===i.nodeType&&"BODY"===i.nodeName||"HTML"===i.nodeName?r=i:r.appendChild(i);else{if(!Ie&&!Ee&&!Oe&&-1===e.indexOf("<"))return J&&Re?J.createHTML(e):e;if(r=mt(e),!r)return Ie?null:Re?ee:""}r&&ke&&pt(r.firstChild);const l=gt(ze?e:r);for(;a=l.nextNode();)xt(a)||(a.content instanceof s&&At(a.content),Tt(a));if(ze)return e;if(Ie){if(Ce)for(c=re.call(r.ownerDocument);r.firstChild;)c.appendChild(r.firstChild);else c=r;return(be.shadowroot||be.shadowrootmode)&&(c=ie.call(o,c,!0)),c}let d=Oe?r.outerHTML:r.innerHTML;return Oe&&ge["!doctype"]&&r.ownerDocument&&r.ownerDocument.doctype&&r.ownerDocument.doctype.name&&x(W,r.ownerDocument.doctype.name)&&(d="\n"+d),Ee&&u([ce,se,le],(e=>{d=h(d,e," ")})),J&&Re?J.createHTML(d):d},n.setConfig=function(){it(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}),_e=!0},n.clearConfig=function(){nt=null,_e=!1},n.isValidAttribute=function(e,t,n){nt||it({});const r=tt(e),o=tt(t);return wt(r,o,n)},n.addHook=function(e,t){"function"==typeof t&&(ae[e]=ae[e]||[],p(ae[e],t))},n.removeHook=function(e){if(ae[e])return d(ae[e])},n.removeHooks=function(e){ae[e]&&(ae[e]=[])},n.removeAllHooks=function(){ae={}},n}var K=V();return K}();var z=w(j.exports),P=function(e){return{__html:q((0,z.sanitize)(e))}},M=function(e,t,n,r,o){var i=o.userInput,a=o.userAttempt,s=o.currentQuestionIndex,u=o.continueTillCorrect,p=o.showNextQuestionButton,f=o.incorrect,m=o.correct,g=o.setButtons,h=o.setIsCorrect,b=o.setIncorrectAnswer,y=o.setCorrect,x=o.setIncorrect,w=o.setShowNextQuestionButton,v=o.setUserInput,T=o.setUserAttempt,A="".concat(e),N={0:{disabled:!0},1:{disabled:!0},2:{disabled:!0},3:{disabled:!0}},S=d(i);if("single"===n)void 0===S[s]&&(S[s]=e),A===t?(f.indexOf(s)<0&&m.indexOf(s)<0&&m.push(s),g((function(n){return c(c(c({},n),N),{},l({},e-1,{className:A===t?"correct":"incorrect"}))})),h(!0),b(!1),y(m),w(!0)):(m.indexOf(s)<0&&f.indexOf(s)<0&&f.push(s),u?g((function(t){return c(c({},t),{},l({},e-1,{disabled:!t[e-1]}))})):(g((function(n){return c(c(c({},n),N),{},l({},e-1,{className:A===t?"correct":"incorrect"}))})),w(!0)),b(!0),h(!1),x(f));else{var E=t.length;if(void 0===S[s]&&(S[s]=[]),S[s].length=0&&u.splice(u.indexOf(i),1)):(u.indexOf(i)<0&&u.push(i),f.indexOf(i)>=0&&f.splice(f.indexOf(i),1)),m(f),g(u),a((function(t){return c(c(c({},t),b),{},l({},e-1,{className:"selected"}))})),s(!0);else{if(void 0===y[i]&&(y[i]=[]),y[i].includes(e)?y[i].splice(y[i].indexOf(e),1):y[i].push(e),y[i].length===t.length){var x,w=!0,v=function(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=p(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,c=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){c=!0,i=e},f:function(){try{a||null==n.return||n.return()}finally{if(c)throw i}}}}(o[i]);try{for(v.s();!(x=v.n()).done;){var T=x.value;if(!t.includes(T)){w=!1,u.indexOf(i)<0&&u.push(i),f.indexOf(i)>=0&&f.splice(f.indexOf(i),1);break}}}catch(e){v.e(e)}finally{v.f()}w&&(f.indexOf(i)<0&&f.push(i),u.indexOf(i)>=0&&u.splice(u.indexOf(i),1))}else u.indexOf(i)<0&&u.push(i),f.indexOf(i)>=0&&f.splice(f.indexOf(i),1);m(f),g(u),a((function(t){return c(c({},t),{},l({},e-1,{className:y[i].includes(e)?"selected":void 0}))})),y[i].length>0&&s(!0)}h(y)};function F(e){var t=e.question,n=e.isResultPage,r=t.explanation;return r?n?I.jsx("div",{className:"explanation",children:r}):I.jsxs("div",{children:[I.jsx("br",{}),r]}):null}var B=function(e){return e.messageForCorrectAnswer||"You are correct. Please click Next to continue."},H=function(e){return e.messageForIncorrectAnswer||"Incorrect answer. Please try again."};function Q(e){var t=e.showInstantFeedback,n=e.incorrectAnswer,o=e.correctAnswer,i=e.question,a=e.onQuestionSubmit,c=e.userAnswer;return r((function(){a&&(o||n)&&a({question:i,userAnswer:c,isCorrect:o})}),[o,n]),I.jsxs(I.Fragment,{children:[n&&t&&I.jsx("div",{className:"alert incorrect",children:H(i)}),o&&t&&I.jsxs("div",{className:"alert correct",children:[B(i),I.jsx(F,{question:i,isResultPage:!1})]})]})}function W(e){var n=e.questions,a=e.appLocale,c=e.showDefaultResult,l=e.onComplete,p=e.customResultPage,f=e.showInstantFeedback,m=e.continueTillCorrect,g=e.revealAnswerOnSubmit,h=e.allowNavigation,b=e.onQuestionSubmit,y=u(t(!1),2),w=y[0],v=y[1],T=u(t(!1),2),A=T[0],N=T[1],S=u(t(!1),2),E=S[0],O=S[1],_=u(t(!1),2),k=_[0],R=_[1],L=u(t(0),2),D=L[0],q=L[1],j=u(t({}),2),z=j[0],B=j[1],H=u(t([]),2),W=H[0],Y=H[1],G=u(t([]),2),$=G[0],V=G[1],K=u(t([]),2),X=K[0],Z=K[1],J=u(t("all"),2),ee=J[0],te=J[1],ne=u(t(1),2),re=ne[0],oe=ne[1],ie=u(t(!0),2),ae=ie[0],ce=ie[1],se=u(t(void 0),2),le=se[0],ue=se[1],de=u(t(0),2),pe=de[0],fe=de[1],me=u(t(0),2),ge=me[0],he=me[1],be=u(t(n[D]),2),ye=be[0],xe=be[1],we=u(t(void 0),2),ve=we[0],Te=we[1];r((function(){ce(void 0===c||c)}),[c]),r((function(){xe(n[D])}),[D,n]),r((function(){var e=ye.answerSelectionType;ue(e||"single")}),[ye,D]),r((function(){if(k){for(var e=0,t=0,r=0;r",t)}),n&&I.jsx("span",{className:"selection-tag segment",children:n})]})},ze=function(e,t){return"string"==typeof t?e===Number(t):"object"===s(t)&&void 0!==t.find((function(t){return t===e}))},Pe=o((function(){var e,t;return"all"!==ee&&("correct"===ee?(e=n.filter((function(e,t){return-1!==W.indexOf(t)})),t=X.filter((function(e,t){return-1!==W.indexOf(t)}))):(e=n.filter((function(e,t){return-1!==$.indexOf(t)})),t=X.filter((function(e,t){return-1!==$.indexOf(t)})))),(e||n).map((function(e,n){var r=t?t[n]:X[n],o=e.answerSelectionType||"single";return I.jsxs("div",{className:"result-answer-wrapper",children:[I.jsx("h3",{dangerouslySetInnerHTML:P("Q".concat(e.questionIndex,": ").concat(e.question," ").concat(a.marksOfQuestion.replace("",e.point)))}),e.questionPic&&I.jsx("img",{src:e.questionPic,alt:"question"}),je(o,e.correctAnswer.length,e.segment),I.jsx("div",{className:"result-answer",children:qe(e,r)}),I.jsx(F,{question:e,isResultPage:!0})]},x())}))}),[k,ee]);return I.jsxs("div",{className:"questionWrapper",children:[!k&&I.jsxs("div",{className:"questionWrapperBody",children:[I.jsx("div",{className:"questionModal",children:I.jsx(Q,{question:ye,showInstantFeedback:f,correctAnswer:A,incorrectAnswer:w,onQuestionSubmit:b,userAnswer:d(X).pop()})}),I.jsx("div",{children:"".concat(a.question," ").concat(D+1," / ").concat(n.length,":")}),I.jsx("h3",{dangerouslySetInnerHTML:P("".concat(ye&&ye.question," ").concat(a.marksOfQuestion.replace("",ye.point)))}),ye&&ye.questionPic&&I.jsx("img",{src:ye.questionPic,alt:"question"}),ye&&je(le,ye.correctAnswer.length,ye.segment),ye&&(Ae=ye,Ne=z,Se=Ae.answers,Ee=Ae.correctAnswer,Oe=Ae.questionType,_e=Ae.questionIndex,ke=Ae.answerSelectionType,Ie=function(e){return M(e+1,Ee,ke,Se,{userInput:X,userAttempt:re,currentQuestionIndex:D,continueTillCorrect:m,showNextQuestionButton:E,incorrect:$,correct:W,setButtons:B,setIsCorrect:N,setIncorrectAnswer:v,setCorrect:Y,setIncorrect:V,setShowNextQuestionButton:O,setUserInput:Z,setUserAttempt:oe})},Ce=function(e){return U(e+1,Ee,ke,{userInput:X,currentQuestionIndex:D,setButtons:B,setShowNextQuestionButton:O,incorrect:$,correct:W,setCorrect:Y,setIncorrect:V,setUserInput:Z})},Re=function(e){return void 0!==X[_e-1]&&("single"===ke?X[_e-1]===e:Array.isArray(X[_e-1])&&X[_e-1].includes(e))},ke=ke||"single",Se.map((function(e,t){return I.jsx(i,{children:void 0!==Ne[t]?I.jsxs("button",{type:"button",disabled:Ne[t].disabled||!1,className:"".concat(Ne[t].className," answerBtn btn ").concat(ze(t+1,Ee)&&f?"correct":""),onClick:function(){return g?Ce(t):Ie(t)},children:["text"===Oe&&I.jsx("span",{children:e}),"photo"===Oe&&I.jsx("img",{src:e,alt:"answer"})]}):I.jsxs("button",{type:"button",onClick:function(){return g?Ce(t):Ie(t)},className:"answerBtn btn ".concat(h&&Re(t+1)?"selected":null),children:["text"===Oe&&e,"photo"===Oe&&I.jsx("img",{src:e,alt:"answer"})]})},x())}))),(E||h)&&I.jsxs("div",{className:"questionBtnContainer",children:[h&&D>0&&I.jsx("button",{onClick:function(){return Le(D-2)},className:"prevQuestionBtn btn",type:"button",children:a.prevQuestionBtn}),I.jsx("button",{onClick:function(){return Le(D)},className:"nextQuestionBtn btn",type:"button",children:a.nextQuestionBtn})]})]}),k&&ae&&void 0===p&&I.jsxs("div",{className:"card-body",children:[I.jsx("h2",{children:a.resultPageHeaderText.replace("",W.length).replace("",n.length)}),I.jsx("h2",{children:a.resultPagePoint.replace("",ge).replace("",pe)}),I.jsx("br",{}),I.jsx(C,{filteredValue:ee,handleChange:De,appLocale:a}),Pe()]}),k&&!ae&&void 0!==p&&p(ve)]})}var Y={landingHeaderText:" Questions",question:"Question",startQuizBtn:"Start Quiz",resultFilterAll:"All",resultFilterCorrect:"Correct",resultFilterIncorrect:"Incorrect",nextQuestionBtn:"Next",prevQuestionBtn:"Prev",resultPageHeaderText:"You have completed the quiz. You got out of questions.",resultPagePoint:"You scored out of .",singleSelectionTagText:"Single Selection",multipleSelectionTagText:"Multiple Selection",pickNumberOfSelection:"Pick ",marksOfQuestion:"( marks)"};function G(e){var n=e.quiz,i=e.shuffle,a=e.shuffleAnswer,s=e.showDefaultResult,l=e.onComplete,d=e.customResultPage,p=e.showInstantFeedback,f=e.continueTillCorrect,m=e.revealAnswerOnSubmit,g=e.allowNavigation,h=e.onQuestionSubmit,b=e.disableSynopsis,y=u(t(!1),2),x=y[0],w=y[1],v=u(t(n.questions),2),T=v[0],A=v[1],N=n.nrOfQuestions&&n.nrOfQuestions0;t-=1){var n=Math.floor(Math.random()*(t+1)),r=[e[n],e[t]];e[t]=r[0],e[n]=r[1]}return e}),[]);r((function(){b&&w(!0)}),[]),r((function(){var e=n.questions;i&&(e=S(e)),a&&(e=function(){return(arguments.length>0&&void 0!==arguments[0]?arguments[0]:[]).map((function(e){var t,n=(null===(t=e.answers)||void 0===t?void 0:t.map((function(e,t){return[e,t]}))).sort((function(){return Math.random()-.5})),r=n.map((function(e){return e[0]}));if("single"===e.answerSelectionType){var o=e.correctAnswer,i=n.findIndex((function(e){return"".concat(e[1]+1)==="".concat(o)}))+1;return c(c({},e),{},{correctAnswer:"".concat(i),answers:r})}if("multiple"===e.answerSelectionType){var a=e.correctAnswer.map((function(e){return n.findIndex((function(t){return"".concat(t[1]+1)==="".concat(e)}))+1}));return c(c({},e),{},{correctAnswer:a,answers:r})}return e}))}(e)),e.length=N,e=e.map((function(e,t){return c(c({},e),{},{questionIndex:t+1})})),A(e)}),[x]);if(!function(e){if(!e)return console.error("Quiz object is required."),!1;for(var t=0;t",N)}),n.quizSynopsis&&I.jsx("div",{className:"quiz-synopsis",children:n.quizSynopsis}),I.jsx("div",{className:"startQuizWrapper",children:I.jsx("button",{type:"button",onClick:function(){return w(!0)},className:"startQuizBtn btn",children:E.startQuizBtn})})]}),x&&I.jsx(W,{questions:T,showDefaultResult:s,onComplete:l,customResultPage:d,showInstantFeedback:p,continueTillCorrect:f,revealAnswerOnSubmit:m,allowNavigation:g,appLocale:E,onQuestionSubmit:h})]})}!function(e,t){void 0===t&&(t={});var n=t.insertAt;if(e&&"undefined"!=typeof document){var r=document.head||document.getElementsByTagName("head")[0],o=document.createElement("style");o.type="text/css","top"===n&&r.firstChild?r.insertBefore(o,r.firstChild):r.appendChild(o),o.styleSheet?o.styleSheet.cssText=e:o.appendChild(document.createTextNode(e))}}('.react-quiz-container{margin:20px;max-width:500px}.react-quiz-container .startQuizWrapper{margin-top:10px}.react-quiz-container .btn{background-image:none;border:1px solid transparent;cursor:pointer;font-weight:600;margin-bottom:0;padding:11px 12px;text-align:center;touch-action:manipulation;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;vertical-align:middle;white-space:nowrap}.react-quiz-container .questionWrapper .btn{border:1px solid #e8e8e8;border-radius:4px;display:block;font-size:15px;margin-bottom:10px;margin-top:10px;text-align:unset;white-space:normal}.react-quiz-container .questionWrapper .btn.correct{background:green;color:#fff}.react-quiz-container .questionModal .alert{border:1px solid transparent;border-radius:2px;color:#fff;margin-bottom:21px;padding:20px}.react-quiz-container .correct{background:green}.react-quiz-container .incorrect{background:red;color:#fff}.react-quiz-container .answerBtn,.react-quiz-container .questionWrapper img{width:100%}.react-quiz-container .selected{background:#007bff;color:#fff}.react-quiz-container .startQuizWrapper .startQuizBtn{background-color:#fff;border:1px solid #d9d9d9;border-radius:2px;color:rgba(0,0,0,.65);font-size:15px;line-height:1.35135}.react-quiz-container .result-answer-wrapper{border:1px solid #e8e8e8;border-bottom-left-radius:5px;border-bottom-right-radius:5px;margin-bottom:20px}.react-quiz-container .result-answer-wrapper h3{background-color:#fafafa;border-top-left-radius:5px;border-top-right-radius:5px;color:rgba(0,0,0,.9);margin:0;opacity:.8;padding:10px}.react-quiz-container .result-answer-wrapper .explanation{border:1px solid #e8e8e8;margin:0 20px 20px;padding:20px}.react-quiz-container .result-answer-wrapper .tag-container{margin:20px}.react-quiz-container .result-answer{padding:0 20px}.react-quiz-container .quiz-synopsis{margin:15px 0}.react-quiz-container .tag-container{display:flex;flex-wrap:wrap;gap:5px;margin-bottom:20px;margin-top:20px}.react-quiz-container .number-of-selection,.react-quiz-container .selection-tag{border-radius:5px;color:#fff;padding:7px}.react-quiz-container .number-of-selection{background:#673ab7;margin-left:5px}.react-quiz-container .selection-tag.single{background:#3f51b5}.react-quiz-container .selection-tag.multiple{background:#ff9800}.react-quiz-container .selection-tag.segment{background:#3db4b9;margin-left:5px}.react-quiz-container .questionBtnContainer{display:flex;justify-content:space-between}.react-quiz-container .quiz-result-filter{bottom:15px;position:relative;width:120px;.filter-dropdown-select{background-color:#fcfcfc;border:2px solid #c2c5c7;border-radius:7px;bottom:10px;color:#333;cursor:pointer;font-size:16px;height:12px;margin-top:2px;padding:8px;position:relative;text-transform:capitalize}.filter-dropdown-select:after{color:#a5a5a5;content:"▼";font-size:11px;position:absolute;right:10px;top:57%;transform:translateY(-50%);transition:all .3s ease}.filter-dropdown-select:hover{border:2px solid #51aae6;box-shadow:0 0 6px rgba(109,179,250,.5)}.dropdown-options{background-color:#fcfcfc;border-radius:10px;box-shadow:0 0 10px hsla(210,2%,56%,.5);left:0;list-style:none;margin:0;padding:0;position:absolute;top:85%;width:100%;z-index:1}.filter-dropdown-select.open{border:2px solid #51aae6;box-shadow:0 0 6px rgba(109,179,250,.5)}.dropdown-options .dropdown-options-item{cursor:pointer;font-size:16px;padding:10px}.dropdown-options .dropdown-options-item:hover{background-color:hsla(0,0%,89%,.852);border-radius:5px}.dropdown-options .dropdown-options-item:focus{background-color:#d7f1f9;font-weight:700}.filter-dropdown-select .selected-option.selected-open{color:#c6c2c2;font-weight:lighter}.filter-dropdown-select .selected-option{bottom:2px;font-size:16px;position:relative}.filter-dropdown-select:focus+.dropdown-options{max-height:200px}.dropdown-options .dropdown-options-item.selected{background-color:#d7f1f9;color:#333;font-weight:700}.dropdown-options.open{max-height:200px}}');export{G as default}; +import e,{useState as t,useRef as n,useEffect as r,useCallback as o,Fragment as i}from"react";function a(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function c(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,r=new Array(t);n",""],_:["",""],"*":["",""],"~":["",""],"\n":["
    "]," ":["
    "],"-":["
    "]};function L(e){return e.replace(RegExp("^"+(e.match(/^(\t| )+/)||"")[0],"gm"),"")}function D(e){return(e+"").replace(/"/g,""").replace(//g,">")}function j(e,t){var n,r,o,i,a,c=/((?:^|\n+)(?:\n---+|\* \*(?: \*)+)\n)|(?:^``` *(\w*)\n([\s\S]*?)\n```$)|((?:(?:^|\n+)(?:\t| {2,}).+)+\n*)|((?:(?:^|\n)([>*+-]|\d+\.)\s+.*)+)|(?:!\[([^\]]*?)\]\(([^)]+?)\))|(\[)|(\](?:\(([^)]+?)\))?)|(?:(?:^|\n+)([^\s].*)\n(-{3,}|={3,})(?:\n+|$))|(?:(?:^|\n+)(#{1,6})\s*(.+)(?:\n+|$))|(?:`([^`].*?)`)|( \n\n*|\n{2,}|__|\*\*|[_*]|~~)/gm,s=[],l="",u=t||{},d=0;function p(e){var t=R[e[1]||""],n=s[s.length-1]==e;return t?t[1]?(n?s.pop():s.push(e),t[0|n]):t[0]:e}function f(){for(var e="";s.length;)e+=p(s[s.length-1]);return e}for(e=e.replace(/^\[(.+?)\]:\s*(.+)$/gm,(function(e,t,n){return u[t.toLowerCase()]=n,""})).replace(/^\n+|\n+$/g,"");o=c.exec(e);)r=e.substring(d,o.index),d=c.lastIndex,n=o[0],r.match(/[^\\](\\\\)*\\$/)||((a=o[3]||o[4])?n='
    "+L(D(a).replace(/^\n+|\n+$/g,""))+"
    ":(a=o[6])?(a.match(/\./)&&(o[5]=o[5].replace(/^\d+/gm,"")),i=j(L(o[5].replace(/^\s*[>*+.-]/gm,""))),">"==a?a="blockquote":(a=a.match(/\./)?"ol":"ul",i=i.replace(/^(.*)(\n|$)/gm,"
  • $1
  • ")),n="<"+a+">"+i+""):o[8]?n=''+D(o[7])+'':o[10]?(l=l.replace("
    ",''),n=f()+""):o[9]?n="":o[12]||o[14]?n="<"+(a="h"+(o[14]?o[14].length:o[13]>"="?1:2))+">"+j(o[12]||o[15],u)+"":o[16]?n=""+D(o[16])+"":(o[17]||o[1])&&(n=p(o[17]||"--"))),l+=r,l+=n;return(l+e.substring(d)+f()).replace(/^\n+|\n+$/g,"")}var q={exports:{}}; +/*! @license DOMPurify 3.0.8 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.0.8/LICENSE */q.exports=function(){const{entries:e,setPrototypeOf:t,isFrozen:n,getPrototypeOf:r,getOwnPropertyDescriptor:o}=Object;let{freeze:i,seal:a,create:c}=Object,{apply:s,construct:l}="undefined"!=typeof Reflect&&Reflect;i||(i=function(e){return e}),a||(a=function(e){return e}),s||(s=function(e,t,n){return e.apply(t,n)}),l||(l=function(e,t){return new e(...t)});const u=v(Array.prototype.forEach),d=v(Array.prototype.pop),p=v(Array.prototype.push),f=v(String.prototype.toLowerCase),m=v(String.prototype.toString),g=v(String.prototype.match),h=v(String.prototype.replace),b=v(String.prototype.indexOf),y=v(String.prototype.trim),x=v(RegExp.prototype.test),w=T(TypeError);function v(e){return function(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),o=1;o2&&void 0!==arguments[2]?arguments[2]:f;t&&t(e,null);let i=r.length;for(;i--;){let t=r[i];if("string"==typeof t){const e=o(t);e!==t&&(n(r)||(r[i]=e),t=e)}e[t]=!0}return e}function S(e){for(let t=0;t/gm),U=a(/\${[\w\W]*}/gm),F=a(/^data-[\-\w.\u00B7-\uFFFF]/),B=a(/^aria-[\-\w]+$/),H=a(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),Q=a(/^(?:\w+script|data):/i),W=a(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),Y=a(/^html$/i);var G=Object.freeze({__proto__:null,MUSTACHE_EXPR:z,ERB_EXPR:M,TMPLIT_EXPR:U,DATA_ATTR:F,ARIA_ATTR:B,IS_ALLOWED_URI:H,IS_SCRIPT_OR_DATA:Q,ATTR_WHITESPACE:W,DOCTYPE_NAME:Y});const $=function(){return"undefined"==typeof window?null:window},K=function(e,t){if("object"!=typeof e||"function"!=typeof e.createPolicy)return null;let n=null;const r="data-tt-policy-suffix";t&&t.hasAttribute(r)&&(n=t.getAttribute(r));const o="dompurify"+(n?"#"+n:"");try{return e.createPolicy(o,{createHTML:e=>e,createScriptURL:e=>e})}catch(e){return console.warn("TrustedTypes policy "+o+" could not be created."),null}};function V(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:$();const n=e=>V(e);if(n.version="3.0.8",n.removed=[],!t||!t.document||9!==t.document.nodeType)return n.isSupported=!1,n;let{document:r}=t;const o=r,a=o.currentScript,{DocumentFragment:s,HTMLTemplateElement:l,Node:v,Element:T,NodeFilter:S,NamedNodeMap:z=t.NamedNodeMap||t.MozNamedAttrMap,HTMLFormElement:M,DOMParser:U,trustedTypes:F}=t,B=T.prototype,Q=E(B,"cloneNode"),W=E(B,"nextSibling"),X=E(B,"childNodes"),Z=E(B,"parentNode");if("function"==typeof l){const e=r.createElement("template");e.content&&e.content.ownerDocument&&(r=e.content.ownerDocument)}let J,ee="";const{implementation:te,createNodeIterator:ne,createDocumentFragment:re,getElementsByTagName:oe}=r,{importNode:ie}=o;let ae={};n.isSupported="function"==typeof e&&"function"==typeof Z&&te&&void 0!==te.createHTMLDocument;const{MUSTACHE_EXPR:ce,ERB_EXPR:se,TMPLIT_EXPR:le,DATA_ATTR:ue,ARIA_ATTR:de,IS_SCRIPT_OR_DATA:pe,ATTR_WHITESPACE:fe}=G;let{IS_ALLOWED_URI:me}=G,ge=null;const he=A({},[...k,..._,...O,...C,...L]);let be=null;const ye=A({},[...D,...j,...q,...P]);let xe=Object.seal(c(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),we=null,ve=null,Te=!0,Ae=!0,Se=!1,Ne=!0,Ee=!1,ke=!1,_e=!1,Oe=!1,Ie=!1,Ce=!1,Re=!1,Le=!0,De=!1;const je="user-content-";let qe=!0,Pe=!1,ze={},Me=null;const Ue=A({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]);let Fe=null;const Be=A({},["audio","video","img","source","image","track"]);let He=null;const Qe=A({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),We="http://www.w3.org/1998/Math/MathML",Ye="http://www.w3.org/2000/svg",Ge="http://www.w3.org/1999/xhtml";let $e=Ge,Ke=!1,Ve=null;const Xe=A({},[We,Ye,Ge],m);let Ze=null;const Je=["application/xhtml+xml","text/html"],et="text/html";let tt=null,nt=null;const rt=r.createElement("form"),ot=function(e){return e instanceof RegExp||e instanceof Function},it=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!nt||nt!==e){if(e&&"object"==typeof e||(e={}),e=N(e),Ze=-1===Je.indexOf(e.PARSER_MEDIA_TYPE)?et:e.PARSER_MEDIA_TYPE,tt="application/xhtml+xml"===Ze?m:f,ge="ALLOWED_TAGS"in e?A({},e.ALLOWED_TAGS,tt):he,be="ALLOWED_ATTR"in e?A({},e.ALLOWED_ATTR,tt):ye,Ve="ALLOWED_NAMESPACES"in e?A({},e.ALLOWED_NAMESPACES,m):Xe,He="ADD_URI_SAFE_ATTR"in e?A(N(Qe),e.ADD_URI_SAFE_ATTR,tt):Qe,Fe="ADD_DATA_URI_TAGS"in e?A(N(Be),e.ADD_DATA_URI_TAGS,tt):Be,Me="FORBID_CONTENTS"in e?A({},e.FORBID_CONTENTS,tt):Ue,we="FORBID_TAGS"in e?A({},e.FORBID_TAGS,tt):{},ve="FORBID_ATTR"in e?A({},e.FORBID_ATTR,tt):{},ze="USE_PROFILES"in e&&e.USE_PROFILES,Te=!1!==e.ALLOW_ARIA_ATTR,Ae=!1!==e.ALLOW_DATA_ATTR,Se=e.ALLOW_UNKNOWN_PROTOCOLS||!1,Ne=!1!==e.ALLOW_SELF_CLOSE_IN_ATTR,Ee=e.SAFE_FOR_TEMPLATES||!1,ke=e.WHOLE_DOCUMENT||!1,Ie=e.RETURN_DOM||!1,Ce=e.RETURN_DOM_FRAGMENT||!1,Re=e.RETURN_TRUSTED_TYPE||!1,Oe=e.FORCE_BODY||!1,Le=!1!==e.SANITIZE_DOM,De=e.SANITIZE_NAMED_PROPS||!1,qe=!1!==e.KEEP_CONTENT,Pe=e.IN_PLACE||!1,me=e.ALLOWED_URI_REGEXP||H,$e=e.NAMESPACE||Ge,xe=e.CUSTOM_ELEMENT_HANDLING||{},e.CUSTOM_ELEMENT_HANDLING&&ot(e.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(xe.tagNameCheck=e.CUSTOM_ELEMENT_HANDLING.tagNameCheck),e.CUSTOM_ELEMENT_HANDLING&&ot(e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(xe.attributeNameCheck=e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),e.CUSTOM_ELEMENT_HANDLING&&"boolean"==typeof e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements&&(xe.allowCustomizedBuiltInElements=e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),Ee&&(Ae=!1),Ce&&(Ie=!0),ze&&(ge=A({},L),be=[],!0===ze.html&&(A(ge,k),A(be,D)),!0===ze.svg&&(A(ge,_),A(be,j),A(be,P)),!0===ze.svgFilters&&(A(ge,O),A(be,j),A(be,P)),!0===ze.mathMl&&(A(ge,C),A(be,q),A(be,P))),e.ADD_TAGS&&(ge===he&&(ge=N(ge)),A(ge,e.ADD_TAGS,tt)),e.ADD_ATTR&&(be===ye&&(be=N(be)),A(be,e.ADD_ATTR,tt)),e.ADD_URI_SAFE_ATTR&&A(He,e.ADD_URI_SAFE_ATTR,tt),e.FORBID_CONTENTS&&(Me===Ue&&(Me=N(Me)),A(Me,e.FORBID_CONTENTS,tt)),qe&&(ge["#text"]=!0),ke&&A(ge,["html","head","body"]),ge.table&&(A(ge,["tbody"]),delete we.tbody),e.TRUSTED_TYPES_POLICY){if("function"!=typeof e.TRUSTED_TYPES_POLICY.createHTML)throw w('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if("function"!=typeof e.TRUSTED_TYPES_POLICY.createScriptURL)throw w('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');J=e.TRUSTED_TYPES_POLICY,ee=J.createHTML("")}else void 0===J&&(J=K(F,a)),null!==J&&"string"==typeof ee&&(ee=J.createHTML(""));i&&i(e),nt=e}},at=A({},["mi","mo","mn","ms","mtext"]),ct=A({},["foreignobject","desc","title","annotation-xml"]),st=A({},["title","style","font","a","script"]),lt=A({},[..._,...O,...I]),ut=A({},[...C,...R]),dt=function(e){let t=Z(e);t&&t.tagName||(t={namespaceURI:$e,tagName:"template"});const n=f(e.tagName),r=f(t.tagName);return!!Ve[e.namespaceURI]&&(e.namespaceURI===Ye?t.namespaceURI===Ge?"svg"===n:t.namespaceURI===We?"svg"===n&&("annotation-xml"===r||at[r]):Boolean(lt[n]):e.namespaceURI===We?t.namespaceURI===Ge?"math"===n:t.namespaceURI===Ye?"math"===n&&ct[r]:Boolean(ut[n]):e.namespaceURI===Ge?!(t.namespaceURI===Ye&&!ct[r])&&!(t.namespaceURI===We&&!at[r])&&!ut[n]&&(st[n]||!lt[n]):!("application/xhtml+xml"!==Ze||!Ve[e.namespaceURI]))},pt=function(e){p(n.removed,{element:e});try{e.parentNode.removeChild(e)}catch(t){e.remove()}},ft=function(e,t){try{p(n.removed,{attribute:t.getAttributeNode(e),from:t})}catch(e){p(n.removed,{attribute:null,from:t})}if(t.removeAttribute(e),"is"===e&&!be[e])if(Ie||Ce)try{pt(t)}catch(e){}else try{t.setAttribute(e,"")}catch(e){}},mt=function(e){let t=null,n=null;if(Oe)e=""+e;else{const t=g(e,/^[\r\n\t ]+/);n=t&&t[0]}"application/xhtml+xml"===Ze&&$e===Ge&&(e=''+e+"");const o=J?J.createHTML(e):e;if($e===Ge)try{t=(new U).parseFromString(o,Ze)}catch(e){}if(!t||!t.documentElement){t=te.createDocument($e,"template",null);try{t.documentElement.innerHTML=Ke?ee:o}catch(e){}}const i=t.body||t.documentElement;return e&&n&&i.insertBefore(r.createTextNode(n),i.childNodes[0]||null),$e===Ge?oe.call(t,ke?"html":"body")[0]:ke?t.documentElement:i},gt=function(e){return ne.call(e.ownerDocument||e,e,S.SHOW_ELEMENT|S.SHOW_COMMENT|S.SHOW_TEXT,null)},ht=function(e){return e instanceof M&&("string"!=typeof e.nodeName||"string"!=typeof e.textContent||"function"!=typeof e.removeChild||!(e.attributes instanceof z)||"function"!=typeof e.removeAttribute||"function"!=typeof e.setAttribute||"string"!=typeof e.namespaceURI||"function"!=typeof e.insertBefore||"function"!=typeof e.hasChildNodes)},bt=function(e){return"function"==typeof v&&e instanceof v},yt=function(e,t,r){ae[e]&&u(ae[e],(e=>{e.call(n,t,r,nt)}))},xt=function(e){let t=null;if(yt("beforeSanitizeElements",e,null),ht(e))return pt(e),!0;const r=tt(e.nodeName);if(yt("uponSanitizeElement",e,{tagName:r,allowedTags:ge}),e.hasChildNodes()&&!bt(e.firstElementChild)&&x(/<[/\w]/g,e.innerHTML)&&x(/<[/\w]/g,e.textContent))return pt(e),!0;if(!ge[r]||we[r]){if(!we[r]&&vt(r)){if(xe.tagNameCheck instanceof RegExp&&x(xe.tagNameCheck,r))return!1;if(xe.tagNameCheck instanceof Function&&xe.tagNameCheck(r))return!1}if(qe&&!Me[r]){const t=Z(e)||e.parentNode,n=X(e)||e.childNodes;if(n&&t)for(let r=n.length-1;r>=0;--r)t.insertBefore(Q(n[r],!0),W(e))}return pt(e),!0}return e instanceof T&&!dt(e)?(pt(e),!0):"noscript"!==r&&"noembed"!==r&&"noframes"!==r||!x(/<\/no(script|embed|frames)/i,e.innerHTML)?(Ee&&3===e.nodeType&&(t=e.textContent,u([ce,se,le],(e=>{t=h(t,e," ")})),e.textContent!==t&&(p(n.removed,{element:e.cloneNode()}),e.textContent=t)),yt("afterSanitizeElements",e,null),!1):(pt(e),!0)},wt=function(e,t,n){if(Le&&("id"===t||"name"===t)&&(n in r||n in rt))return!1;if(Ae&&!ve[t]&&x(ue,t));else if(Te&&x(de,t));else if(!be[t]||ve[t]){if(!(vt(e)&&(xe.tagNameCheck instanceof RegExp&&x(xe.tagNameCheck,e)||xe.tagNameCheck instanceof Function&&xe.tagNameCheck(e))&&(xe.attributeNameCheck instanceof RegExp&&x(xe.attributeNameCheck,t)||xe.attributeNameCheck instanceof Function&&xe.attributeNameCheck(t))||"is"===t&&xe.allowCustomizedBuiltInElements&&(xe.tagNameCheck instanceof RegExp&&x(xe.tagNameCheck,n)||xe.tagNameCheck instanceof Function&&xe.tagNameCheck(n))))return!1}else if(He[t]);else if(x(me,h(n,fe,"")));else if("src"!==t&&"xlink:href"!==t&&"href"!==t||"script"===e||0!==b(n,"data:")||!Fe[e])if(Se&&!x(pe,h(n,fe,"")));else if(n)return!1;return!0},vt=function(e){return e.indexOf("-")>0},Tt=function(e){yt("beforeSanitizeAttributes",e,null);const{attributes:t}=e;if(!t)return;const r={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:be};let o=t.length;for(;o--;){const i=t[o],{name:a,namespaceURI:c,value:s}=i,l=tt(a);let p="value"===a?s:y(s);if(r.attrName=l,r.attrValue=p,r.keepAttr=!0,r.forceKeepAttr=void 0,yt("uponSanitizeAttribute",e,r),p=r.attrValue,r.forceKeepAttr)continue;if(ft(a,e),!r.keepAttr)continue;if(!Ne&&x(/\/>/i,p)){ft(a,e);continue}Ee&&u([ce,se,le],(e=>{p=h(p,e," ")}));const f=tt(e.nodeName);if(wt(f,l,p)){if(!De||"id"!==l&&"name"!==l||(ft(a,e),p=je+p),J&&"object"==typeof F&&"function"==typeof F.getAttributeType)if(c);else switch(F.getAttributeType(f,l)){case"TrustedHTML":p=J.createHTML(p);break;case"TrustedScriptURL":p=J.createScriptURL(p)}try{c?e.setAttributeNS(c,a,p):e.setAttribute(a,p),d(n.removed)}catch(e){}}}yt("afterSanitizeAttributes",e,null)},At=function e(t){let n=null;const r=gt(t);for(yt("beforeSanitizeShadowDOM",t,null);n=r.nextNode();)yt("uponSanitizeShadowNode",n,null),xt(n)||(n.content instanceof s&&e(n.content),Tt(n));yt("afterSanitizeShadowDOM",t,null)};return n.sanitize=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=null,i=null,a=null,c=null;if(Ke=!e,Ke&&(e="\x3c!--\x3e"),"string"!=typeof e&&!bt(e)){if("function"!=typeof e.toString)throw w("toString is not a function");if("string"!=typeof(e=e.toString()))throw w("dirty is not a string, aborting")}if(!n.isSupported)return e;if(_e||it(t),n.removed=[],"string"==typeof e&&(Pe=!1),Pe){if(e.nodeName){const t=tt(e.nodeName);if(!ge[t]||we[t])throw w("root node is forbidden and cannot be sanitized in-place")}}else if(e instanceof v)r=mt("\x3c!----\x3e"),i=r.ownerDocument.importNode(e,!0),1===i.nodeType&&"BODY"===i.nodeName||"HTML"===i.nodeName?r=i:r.appendChild(i);else{if(!Ie&&!Ee&&!ke&&-1===e.indexOf("<"))return J&&Re?J.createHTML(e):e;if(r=mt(e),!r)return Ie?null:Re?ee:""}r&&Oe&&pt(r.firstChild);const l=gt(Pe?e:r);for(;a=l.nextNode();)xt(a)||(a.content instanceof s&&At(a.content),Tt(a));if(Pe)return e;if(Ie){if(Ce)for(c=re.call(r.ownerDocument);r.firstChild;)c.appendChild(r.firstChild);else c=r;return(be.shadowroot||be.shadowrootmode)&&(c=ie.call(o,c,!0)),c}let d=ke?r.outerHTML:r.innerHTML;return ke&&ge["!doctype"]&&r.ownerDocument&&r.ownerDocument.doctype&&r.ownerDocument.doctype.name&&x(Y,r.ownerDocument.doctype.name)&&(d="\n"+d),Ee&&u([ce,se,le],(e=>{d=h(d,e," ")})),J&&Re?J.createHTML(d):d},n.setConfig=function(){it(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}),_e=!0},n.clearConfig=function(){nt=null,_e=!1},n.isValidAttribute=function(e,t,n){nt||it({});const r=tt(e),o=tt(t);return wt(r,o,n)},n.addHook=function(e,t){"function"==typeof t&&(ae[e]=ae[e]||[],p(ae[e],t))},n.removeHook=function(e){if(ae[e])return d(ae[e])},n.removeHooks=function(e){ae[e]&&(ae[e]=[])},n.removeAllHooks=function(){ae={}},n}var X=V();return X}();var P=w(q.exports),z=function(e){return{__html:j((0,P.sanitize)(e))}},M=function(e,t,n,r,o){var i=o.userInput,a=o.userAttempt,s=o.currentQuestionIndex,u=o.continueTillCorrect,p=o.showNextQuestionButton,f=o.incorrect,m=o.correct,g=o.setButtons,h=o.setIsCorrect,b=o.setIncorrectAnswer,y=o.setCorrect,x=o.setIncorrect,w=o.setShowNextQuestionButton,v=o.setUserInput,T=o.setUserAttempt,A="".concat(e),S={0:{disabled:!0},1:{disabled:!0},2:{disabled:!0},3:{disabled:!0}},N=d(i);if("single"===n)void 0===N[s]&&(N[s]=e),A===t?(f.indexOf(s)<0&&m.indexOf(s)<0&&m.push(s),g((function(n){return c(c(c({},n),S),{},l({},e-1,{className:A===t?"correct":"incorrect"}))})),h(!0),b(!1),y(m),w(!0)):(m.indexOf(s)<0&&f.indexOf(s)<0&&f.push(s),u?g((function(t){return c(c({},t),{},l({},e-1,{disabled:!t[e-1]}))})):(g((function(n){return c(c(c({},n),S),{},l({},e-1,{className:A===t?"correct":"incorrect"}))})),w(!0)),b(!0),h(!1),x(f));else{var E=t.length;if(void 0===N[s]&&(N[s]=[]),N[s].length=0&&u.splice(u.indexOf(i),1)):(u.indexOf(i)<0&&u.push(i),f.indexOf(i)>=0&&f.splice(f.indexOf(i),1)),m(f),g(u),a((function(t){return c(c(c({},t),b),{},l({},e-1,{className:"selected"}))})),s(!0);else{if(void 0===y[i]&&(y[i]=[]),y[i].includes(e)?y[i].splice(y[i].indexOf(e),1):y[i].push(e),y[i].length===t.length){var x,w=!0,v=function(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=p(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,c=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){c=!0,i=e},f:function(){try{a||null==n.return||n.return()}finally{if(c)throw i}}}}(o[i]);try{for(v.s();!(x=v.n()).done;){var T=x.value;if(!t.includes(T)){w=!1,u.indexOf(i)<0&&u.push(i),f.indexOf(i)>=0&&f.splice(f.indexOf(i),1);break}}}catch(e){v.e(e)}finally{v.f()}w&&(f.indexOf(i)<0&&f.push(i),u.indexOf(i)>=0&&u.splice(u.indexOf(i),1))}else u.indexOf(i)<0&&u.push(i),f.indexOf(i)>=0&&f.splice(f.indexOf(i),1);m(f),g(u),a((function(t){return c(c({},t),{},l({},e-1,{className:y[i].includes(e)?"selected":void 0}))})),y[i].length>0&&s(!0)}h(y)};function F(e){var t=e.question,n=e.isResultPage,r=t.explanation;return r?n?I.jsx("div",{className:"explanation",children:r}):I.jsxs("div",{children:[I.jsx("br",{}),r]}):null}var B=function(e){return e.messageForCorrectAnswer||"You are correct. Please click Next to continue."},H=function(e){return e.messageForIncorrectAnswer||"Incorrect answer. Please try again."};function Q(e){var t=e.showInstantFeedback,n=e.incorrectAnswer,o=e.correctAnswer,i=e.question,a=e.onQuestionSubmit,c=e.userAnswer;return r((function(){a&&(o||n)&&a({question:i,userAnswer:c,isCorrect:o})}),[o,n]),I.jsxs(I.Fragment,{children:[n&&t&&I.jsx("div",{className:"alert incorrect",children:H(i)}),o&&t&&I.jsxs("div",{className:"alert correct",children:[B(i),I.jsx(F,{question:i,isResultPage:!1})]})]})}function W(e){var n=e.questions,a=e.appLocale,c=e.showDefaultResult,l=e.onComplete,p=e.customResultPage,f=e.showInstantFeedback,m=e.continueTillCorrect,g=e.revealAnswerOnSubmit,h=e.allowNavigation,b=e.onQuestionSubmit,y=e.timer,w=e.allowPauseTimer,v=u(t(!1),2),T=v[0],A=v[1],S=u(t(!1),2),N=S[0],E=S[1],k=u(t(!1),2),_=k[0],O=k[1],R=u(t(!1),2),L=R[0],D=R[1],j=u(t(0),2),q=j[0],P=j[1],B=u(t({}),2),H=B[0],W=B[1],Y=u(t([]),2),G=Y[0],$=Y[1],K=u(t([]),2),V=K[0],X=K[1],Z=u(t([]),2),J=Z[0],ee=Z[1],te=u(t([]),2),ne=te[0],re=te[1],oe=u(t("all"),2),ie=oe[0],ae=oe[1],ce=u(t(1),2),se=ce[0],le=ce[1],ue=u(t(!0),2),de=ue[0],pe=ue[1],fe=u(t(void 0),2),me=fe[0],ge=fe[1],he=u(t(0),2),be=he[0],ye=he[1],xe=u(t(0),2),we=xe[0],ve=xe[1],Te=u(t(n[q]),2),Ae=Te[0],Se=Te[1],Ne=u(t(void 0),2),Ee=Ne[0],ke=Ne[1],_e=u(t(y),2),Oe=_e[0],Ie=_e[1],Ce=u(t(!0),2),Re=Ce[0],Le=Ce[1];r((function(){pe(void 0===c||c)}),[c]),r((function(){Se(n[q])}),[q,n]),r((function(){var e=Ae.answerSelectionType;ge(e||"single")}),[Ae,q]),r((function(){if(L){Le(!1);for(var e=0,t=0,r=0;r",t)}),n&&I.jsx("span",{className:"selection-tag segment",children:n})]})},ze=function(e,t){return"string"==typeof t?e===Number(t):"object"===s(t)&&void 0!==t.find((function(t){return t===e}))},Me=o((function(){var e,t;if("all"!==ie){var r=J;"correct"===ie?r=G:"incorrect"===ie&&(r=V),e=n.filter((function(e,t){return-1!==r.indexOf(t)})),t=ne.filter((function(e,t){return-1!==r.indexOf(t)}))}return(e||n).map((function(e,n){var r=t?t[n]:ne[n],o=e.answerSelectionType||"single";return I.jsxs("div",{className:"result-answer-wrapper",children:[I.jsx("h3",{dangerouslySetInnerHTML:z("Q".concat(e.questionIndex,": ").concat(e.question," ").concat(a.marksOfQuestion.replace("",e.point)))}),e.questionPic&&I.jsx("img",{src:e.questionPic,alt:"question"}),Pe(o,e.correctAnswer.length,e.segment),I.jsx("div",{className:"result-answer",children:qe(e,r)}),I.jsx(F,{question:e,isResultPage:!0})]},x())}))}),[L,ie]);r((function(){var e;return y&&Re&&Oe>0&&(e=setInterval((function(){Ie((function(e){return e-1}))}),1e3)),function(){return y&&clearInterval(e)}}),[Re,Oe,y]);var Ue,Fe,Be,He,Qe,We,Ye,Ge,$e,Ke,Ve=function(e){return e<10?"0":""},Xe=function(e){var t=Math.floor(e/3600),n=Math.floor(e%3600/60),r=e%60;return"".concat(Ve(t)).concat(t,":").concat(Ve(n)).concat(n,":").concat(Ve(r)).concat(r)};return I.jsxs("div",{className:"questionWrapper",children:[y&&!Re&&I.jsxs("div",{children:[a.timerTimeTaken,":"," ",I.jsx("b",{children:Xe(y-Oe)})]}),y&&Re&&I.jsxs("div",{children:[a.timerTimeRemaining,":"," ",I.jsx("b",{children:Xe(Oe)})]}),y&&0===Oe&&Re&&(Le(!1),D(!0),void n.forEach((function(e,t){void 0===ne[t]&&ee((function(e){return[].concat(d(e),[t])}))}))),!L&&I.jsxs("div",{className:"questionWrapperBody",children:[I.jsxs("div",{children:["".concat(a.question," ").concat(q+1," / ").concat(n.length,":"),I.jsx("br",{}),y&&w&&I.jsx("button",{type:"button",className:"timerBtn",onClick:function(){Le(!Re)},children:Re?a.pauseScreenPause:a.pauseScreenResume})]}),Re?I.jsxs(I.Fragment,{children:[I.jsx("h3",{dangerouslySetInnerHTML:z("".concat(Ae&&Ae.question," ").concat(a.marksOfQuestion.replace("",Ae.point)))}),Ae&&Ae.questionPic&&I.jsx("img",{src:Ae.questionPic,alt:"question"}),Ae&&Pe(me,Ae.correctAnswer.length,Ae.segment),I.jsx("div",{className:"questionModal",children:I.jsx(Q,{question:Ae,showInstantFeedback:f,correctAnswer:N,incorrectAnswer:T,onQuestionSubmit:b,userAnswer:d(ne).pop()})}),Ae&&(Ue=Ae,Fe=H,Be=Ue.answers,He=Ue.correctAnswer,Qe=Ue.questionType,We=Ue.questionIndex,Ye=Ue.answerSelectionType,Ge=function(e){return M(e+1,He,Ye,Be,{userInput:ne,userAttempt:se,currentQuestionIndex:q,continueTillCorrect:m,showNextQuestionButton:_,incorrect:V,correct:G,setButtons:W,setIsCorrect:E,setIncorrectAnswer:A,setCorrect:$,setIncorrect:X,setShowNextQuestionButton:O,setUserInput:re,setUserAttempt:le})},$e=function(e){return U(e+1,He,Ye,{userInput:ne,currentQuestionIndex:q,setButtons:W,setShowNextQuestionButton:O,incorrect:V,correct:G,setCorrect:$,setIncorrect:X,setUserInput:re})},Ke=function(e){return void 0!==ne[We-1]&&("single"===Ye?ne[We-1]===e:Array.isArray(ne[We-1])&&ne[We-1].includes(e))},Ye=Ye||"single",Be.map((function(e,t){return I.jsx(i,{children:void 0!==Fe[t]?I.jsxs("button",{type:"button",disabled:Fe[t].disabled||!1,className:"".concat(Fe[t].className," answerBtn btn ").concat(ze(t+1,He)&&f?"correct":""),onClick:function(){return g?$e(t):Ge(t)},children:["text"===Qe&&I.jsx("span",{children:e}),"photo"===Qe&&I.jsx("img",{src:e,alt:"answer"})]}):I.jsxs("button",{type:"button",onClick:function(){return g?$e(t):Ge(t)},className:"answerBtn btn ".concat(h&&Ke(t+1)?"selected":null),children:["text"===Qe&&e,"photo"===Qe&&I.jsx("img",{src:e,alt:"answer"})]})},x())}))),(_||h)&&I.jsxs("div",{className:"questionBtnContainer",children:[h&&q>0&&I.jsx("button",{onClick:function(){return De(q-2)},className:"prevQuestionBtn btn",type:"button",children:a.prevQuestionBtn}),I.jsx("button",{onClick:function(){return De(q)},className:"nextQuestionBtn btn",type:"button",children:a.nextQuestionBtn})]})]}):I.jsxs("span",{className:"timerPauseScreen dark:text-white text-black",children:[I.jsx("br",{}),I.jsx("br",{}),a.pauseScreenDisplay]})]}),L&&de&&void 0===p&&I.jsxs("div",{className:"card-body",children:[I.jsx("h2",{children:a.resultPageHeaderText.replace("",G.length).replace("",n.length)}),I.jsx("h2",{children:a.resultPagePoint.replace("",we).replace("",be)}),I.jsx("br",{}),I.jsx(C,{filteredValue:ie,handleChange:je,appLocale:a}),Me()]}),L&&!de&&void 0!==p&&p(Ee)]})}var Y={landingHeaderText:" Questions",question:"Question",startQuizBtn:"Start Quiz",resultFilterAll:"All",resultFilterCorrect:"Correct",resultFilterIncorrect:"Incorrect",resultFilterUnanswered:"Unanswered",nextQuestionBtn:"Next",prevQuestionBtn:"Prev",resultPageHeaderText:"You have completed the quiz. You got out of questions.",resultPagePoint:"You scored out of .",pauseScreenDisplay:"Test is paused. Clicked the Resume button to continue",timerTimeRemaining:"Time Remaining",timerTimeTaken:"Time Taken",pauseScreenPause:"Pause",pauseScreenResume:"Resume",singleSelectionTagText:"Single Selection",multipleSelectionTagText:"Multiple Selection",pickNumberOfSelection:"Pick ",marksOfQuestion:"( marks)"};function G(e){var n=e.quiz,i=e.shuffle,a=e.shuffleAnswer,s=e.showDefaultResult,l=e.onComplete,d=e.customResultPage,p=e.showInstantFeedback,f=e.continueTillCorrect,m=e.revealAnswerOnSubmit,g=e.allowNavigation,h=e.onQuestionSubmit,b=e.disableSynopsis,y=e.timer,x=e.allowPauseTimer,w=u(t(!1),2),v=w[0],T=w[1],A=u(t(n.questions),2),S=A[0],N=A[1],E=n.nrOfQuestions&&n.nrOfQuestions0;t-=1){var n=Math.floor(Math.random()*(t+1)),r=[e[n],e[t]];e[t]=r[0],e[n]=r[1]}return e}),[]);r((function(){b&&T(!0)}),[]),r((function(){var e=n.questions;i&&(e=k(e)),a&&(e=function(){return(arguments.length>0&&void 0!==arguments[0]?arguments[0]:[]).map((function(e){var t,n=(null===(t=e.answers)||void 0===t?void 0:t.map((function(e,t){return[e,t]}))).sort((function(){return Math.random()-.5})),r=n.map((function(e){return e[0]}));if("single"===e.answerSelectionType){var o=e.correctAnswer,i=n.findIndex((function(e){return"".concat(e[1]+1)==="".concat(o)}))+1;return c(c({},e),{},{correctAnswer:"".concat(i),answers:r})}if("multiple"===e.answerSelectionType){var a=e.correctAnswer.map((function(e){return n.findIndex((function(t){return"".concat(t[1]+1)==="".concat(e)}))+1}));return c(c({},e),{},{correctAnswer:a,answers:r})}return e}))}(e)),e.length=E,e=e.map((function(e,t){return c(c({},e),{},{questionIndex:t+1})})),N(e)}),[v]);if(!function(e){if(!e)return console.error("Quiz object is required."),!1;if(y&&"number"!=typeof y||y<1)return console.error(y&&"number"!=typeof y?"timer must be a number":"timer must be a number greater than 0"),!1;if(x&&"boolean"!=typeof x)return console.error("allowPauseTimer must be a Boolean"),!1;for(var t=0;t",E)}),n.quizSynopsis&&I.jsx("div",{className:"quiz-synopsis",children:n.quizSynopsis}),I.jsx("div",{className:"startQuizWrapper",children:I.jsx("button",{type:"button",onClick:function(){return T(!0)},className:"startQuizBtn btn",children:_.startQuizBtn})})]}),v&&I.jsx(W,{questions:S,showDefaultResult:s,onComplete:l,customResultPage:d,showInstantFeedback:p,continueTillCorrect:f,revealAnswerOnSubmit:m,allowNavigation:g,appLocale:_,onQuestionSubmit:h,timer:y,allowPauseTimer:x})]})}!function(e,t){void 0===t&&(t={});var n=t.insertAt;if(e&&"undefined"!=typeof document){var r=document.head||document.getElementsByTagName("head")[0],o=document.createElement("style");o.type="text/css","top"===n&&r.firstChild?r.insertBefore(o,r.firstChild):r.appendChild(o),o.styleSheet?o.styleSheet.cssText=e:o.appendChild(document.createTextNode(e))}}('.react-quiz-container{margin:20px;max-width:500px}.react-quiz-container .startQuizWrapper{margin-top:10px}.react-quiz-container .btn{background-image:none;border:1px solid transparent;cursor:pointer;font-weight:600;margin-bottom:0;padding:11px 12px;text-align:center;touch-action:manipulation;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;vertical-align:middle;white-space:nowrap}.react-quiz-container .questionWrapper .btn{border:1px solid #e8e8e8;border-radius:4px;display:block;font-size:15px;margin-bottom:10px;margin-top:10px;text-align:unset;white-space:normal}.react-quiz-container .questionWrapper .btn.correct,.timerBtn{background:green;color:#fff}.timerBtn{border:0!important;border-radius:10px;cursor:pointer;float:right;padding:5px;position:relative;top:-35px;width:80px}.timerPauseScreen{font-size:30px}.react-quiz-container .questionModal .alert{border:1px solid transparent;border-radius:2px;color:#fff;margin-bottom:21px;padding:20px}.react-quiz-container .correct{background:green}.react-quiz-container .incorrect{background:red;color:#fff}.react-quiz-container .unanswered{background:grey;color:#fff}.react-quiz-container .answerBtn,.react-quiz-container .questionWrapper img{width:100%}.react-quiz-container .selected{background:#007bff;color:#fff}.react-quiz-container .startQuizWrapper .startQuizBtn{background-color:#fff;border:1px solid #d9d9d9;border-radius:2px;color:rgba(0,0,0,.65);font-size:15px;line-height:1.35135}.react-quiz-container .result-answer-wrapper{border:1px solid #e8e8e8;border-bottom-left-radius:5px;border-bottom-right-radius:5px;margin-bottom:20px}.react-quiz-container .result-answer-wrapper h3{background-color:#fafafa;border-top-left-radius:5px;border-top-right-radius:5px;color:rgba(0,0,0,.9);margin:0;opacity:.8;padding:10px}.react-quiz-container .result-answer-wrapper .explanation{border:1px solid #e8e8e8;margin:0 20px 20px;padding:20px}.react-quiz-container .result-answer-wrapper .tag-container{margin:20px}.react-quiz-container .result-answer{padding:0 20px}.react-quiz-container .quiz-synopsis{margin:15px 0}.react-quiz-container .tag-container{display:flex;flex-wrap:wrap;gap:5px;margin-bottom:20px;margin-top:20px}.react-quiz-container .number-of-selection,.react-quiz-container .selection-tag{border-radius:5px;color:#fff;padding:7px}.react-quiz-container .number-of-selection{background:#673ab7;margin-left:5px}.react-quiz-container .selection-tag.single{background:#3f51b5}.react-quiz-container .selection-tag.multiple{background:#ff9800}.react-quiz-container .selection-tag.segment{background:#3db4b9;margin-left:5px}.react-quiz-container .questionBtnContainer{display:flex;justify-content:space-between}.react-quiz-container .quiz-result-filter{bottom:15px;position:relative;width:120px;.filter-dropdown-select{background-color:#fcfcfc;border:2px solid #c2c5c7;border-radius:7px;bottom:10px;color:#333;cursor:pointer;font-size:16px;height:12px;margin-top:2px;padding:8px;position:relative;text-transform:capitalize}.filter-dropdown-select:after{color:#a5a5a5;content:"▼";font-size:11px;position:absolute;right:10px;top:57%;transform:translateY(-50%);transition:all .3s ease}.filter-dropdown-select:hover{border:2px solid #51aae6;box-shadow:0 0 6px rgba(109,179,250,.5)}.dropdown-options{background-color:#fcfcfc;border-radius:10px;box-shadow:0 0 10px hsla(210,2%,56%,.5);left:0;list-style:none;margin:0;padding:0;position:absolute;top:85%;width:100%;z-index:1}.filter-dropdown-select.open{border:2px solid #51aae6;box-shadow:0 0 6px rgba(109,179,250,.5)}.dropdown-options .dropdown-options-item{cursor:pointer;font-size:16px;padding:10px}.dropdown-options .dropdown-options-item:hover{background-color:hsla(0,0%,89%,.852);border-radius:5px}.dropdown-options .dropdown-options-item:focus{background-color:#d7f1f9;font-weight:700}.filter-dropdown-select .selected-option.selected-open{color:#c6c2c2;font-weight:lighter}.filter-dropdown-select .selected-option{bottom:2px;font-size:16px;position:relative}.filter-dropdown-select:focus+.dropdown-options{max-height:200px}.dropdown-options .dropdown-options-item.selected{background-color:#d7f1f9;color:#333;font-weight:700}.dropdown-options.open{max-height:200px}}');export{G as default}; diff --git a/dist/index.js b/dist/index.js index 0333c9a..72e15d7 100644 --- a/dist/index.js +++ b/dist/index.js @@ -1,2 +1,2 @@ -"use strict";var e=require("react");function t(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function n(e){for(var n=1;ne.length)&&(t=e.length);for(var n=0,r=new Array(t);n",""],_:["",""],"*":["",""],"~":["",""],"\n":["
    "]," ":["
    "],"-":["
    "]};function _(e){return e.replace(RegExp("^"+(e.match(/^(\t| )+/)||"")[0],"gm"),"")}function k(e){return(e+"").replace(/"/g,""").replace(//g,">")}function I(e,t){var n,r,o,i,a,s=/((?:^|\n+)(?:\n---+|\* \*(?: \*)+)\n)|(?:^``` *(\w*)\n([\s\S]*?)\n```$)|((?:(?:^|\n+)(?:\t| {2,}).+)+\n*)|((?:(?:^|\n)([>*+-]|\d+\.)\s+.*)+)|(?:!\[([^\]]*?)\]\(([^)]+?)\))|(\[)|(\](?:\(([^)]+?)\))?)|(?:(?:^|\n+)([^\s].*)\n(-{3,}|={3,})(?:\n+|$))|(?:(?:^|\n+)(#{1,6})\s*(.+)(?:\n+|$))|(?:`([^`].*?)`)|( \n\n*|\n{2,}|__|\*\*|[_*]|~~)/gm,c=[],l="",u=t||{},d=0;function p(e){var t=O[e[1]||""],n=c[c.length-1]==e;return t?t[1]?(n?c.pop():c.push(e),t[0|n]):t[0]:e}function f(){for(var e="";c.length;)e+=p(c[c.length-1]);return e}for(e=e.replace(/^\[(.+?)\]:\s*(.+)$/gm,(function(e,t,n){return u[t.toLowerCase()]=n,""})).replace(/^\n+|\n+$/g,"");o=s.exec(e);)r=e.substring(d,o.index),d=s.lastIndex,n=o[0],r.match(/[^\\](\\\\)*\\$/)||((a=o[3]||o[4])?n='
    "+_(k(a).replace(/^\n+|\n+$/g,""))+"
    ":(a=o[6])?(a.match(/\./)&&(o[5]=o[5].replace(/^\d+/gm,"")),i=I(_(o[5].replace(/^\s*[>*+.-]/gm,""))),">"==a?a="blockquote":(a=a.match(/\./)?"ol":"ul",i=i.replace(/^(.*)(\n|$)/gm,"
  • $1
  • ")),n="<"+a+">"+i+""):o[8]?n=''+k(o[7])+'':o[10]?(l=l.replace("
    ",''),n=f()+""):o[9]?n="":o[12]||o[14]?n="<"+(a="h"+(o[14]?o[14].length:o[13]>"="?1:2))+">"+I(o[12]||o[15],u)+"":o[16]?n=""+k(o[16])+"":(o[17]||o[1])&&(n=p(o[17]||"--"))),l+=r,l+=n;return(l+e.substring(d)+f()).replace(/^\n+|\n+$/g,"")}var C={exports:{}}; -/*! @license DOMPurify 3.0.6 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.0.6/LICENSE */C.exports=function(){const{entries:e,setPrototypeOf:t,isFrozen:n,getPrototypeOf:r,getOwnPropertyDescriptor:o}=Object;let{freeze:i,seal:a,create:s}=Object,{apply:c,construct:l}="undefined"!=typeof Reflect&&Reflect;i||(i=function(e){return e}),a||(a=function(e){return e}),c||(c=function(e,t,n){return e.apply(t,n)}),l||(l=function(e,t){return new e(...t)});const u=v(Array.prototype.forEach),d=v(Array.prototype.pop),p=v(Array.prototype.push),f=v(String.prototype.toLowerCase),m=v(String.prototype.toString),g=v(String.prototype.match),h=v(String.prototype.replace),b=v(String.prototype.indexOf),y=v(String.prototype.trim),x=v(RegExp.prototype.test),w=T(TypeError);function v(e){return function(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),o=1;o2&&void 0!==arguments[2]?arguments[2]:f;t&&t(e,null);let i=r.length;for(;i--;){let t=r[i];if("string"==typeof t){const e=o(t);e!==t&&(n(r)||(r[i]=e),t=e)}e[t]=!0}return e}function A(t){const n=s(null);for(const[r,i]of e(t))void 0!==o(t,r)&&(n[r]=i);return n}function N(e,t){for(;null!==e;){const n=o(e,t);if(n){if(n.get)return v(n.get);if("function"==typeof n.value)return v(n.value)}e=r(e)}function n(e){return console.warn("fallback value for",e),null}return n}const E=i(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","section","select","shadow","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),O=i(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","filter","font","g","glyph","glyphref","hkern","image","line","lineargradient","marker","mask","metadata","mpath","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),_=i(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),k=i(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),I=i(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),C=i(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),R=i(["#text"]),L=i(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","face","for","headers","height","hidden","high","href","hreflang","id","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","pattern","placeholder","playsinline","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","xmlns","slot"]),D=i(["accent-height","accumulate","additive","alignment-baseline","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),q=i(["accent","accentunder","align","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lspace","lquote","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),j=i(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),z=a(/\{\{[\w\W]*|[\w\W]*\}\}/gm),P=a(/<%[\w\W]*|[\w\W]*%>/gm),M=a(/\${[\w\W]*}/gm),U=a(/^data-[\-\w.\u00B7-\uFFFF]/),F=a(/^aria-[\-\w]+$/),B=a(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),H=a(/^(?:\w+script|data):/i),Q=a(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),W=a(/^html$/i);var Y=Object.freeze({__proto__:null,MUSTACHE_EXPR:z,ERB_EXPR:P,TMPLIT_EXPR:M,DATA_ATTR:U,ARIA_ATTR:F,IS_ALLOWED_URI:B,IS_SCRIPT_OR_DATA:H,ATTR_WHITESPACE:Q,DOCTYPE_NAME:W});const G=function(){return"undefined"==typeof window?null:window},$=function(e,t){if("object"!=typeof e||"function"!=typeof e.createPolicy)return null;let n=null;const r="data-tt-policy-suffix";t&&t.hasAttribute(r)&&(n=t.getAttribute(r));const o="dompurify"+(n?"#"+n:"");try{return e.createPolicy(o,{createHTML:e=>e,createScriptURL:e=>e})}catch(e){return console.warn("TrustedTypes policy "+o+" could not be created."),null}};function V(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:G();const n=e=>V(e);if(n.version="3.0.6",n.removed=[],!t||!t.document||9!==t.document.nodeType)return n.isSupported=!1,n;let{document:r}=t;const o=r,a=o.currentScript,{DocumentFragment:c,HTMLTemplateElement:l,Node:v,Element:T,NodeFilter:z,NamedNodeMap:P=t.NamedNodeMap||t.MozNamedAttrMap,HTMLFormElement:M,DOMParser:U,trustedTypes:F}=t,H=T.prototype,Q=N(H,"cloneNode"),K=N(H,"nextSibling"),X=N(H,"childNodes"),Z=N(H,"parentNode");if("function"==typeof l){const e=r.createElement("template");e.content&&e.content.ownerDocument&&(r=e.content.ownerDocument)}let J,ee="";const{implementation:te,createNodeIterator:ne,createDocumentFragment:re,getElementsByTagName:oe}=r,{importNode:ie}=o;let ae={};n.isSupported="function"==typeof e&&"function"==typeof Z&&te&&void 0!==te.createHTMLDocument;const{MUSTACHE_EXPR:se,ERB_EXPR:ce,TMPLIT_EXPR:le,DATA_ATTR:ue,ARIA_ATTR:de,IS_SCRIPT_OR_DATA:pe,ATTR_WHITESPACE:fe}=Y;let{IS_ALLOWED_URI:me}=Y,ge=null;const he=S({},[...E,...O,..._,...I,...R]);let be=null;const ye=S({},[...L,...D,...q,...j]);let xe=Object.seal(s(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),we=null,ve=null,Te=!0,Se=!0,Ae=!1,Ne=!0,Ee=!1,Oe=!1,_e=!1,ke=!1,Ie=!1,Ce=!1,Re=!1,Le=!0,De=!1;const qe="user-content-";let je=!0,ze=!1,Pe={},Me=null;const Ue=S({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]);let Fe=null;const Be=S({},["audio","video","img","source","image","track"]);let He=null;const Qe=S({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),We="http://www.w3.org/1998/Math/MathML",Ye="http://www.w3.org/2000/svg",Ge="http://www.w3.org/1999/xhtml";let $e=Ge,Ve=!1,Ke=null;const Xe=S({},[We,Ye,Ge],m);let Ze=null;const Je=["application/xhtml+xml","text/html"],et="text/html";let tt=null,nt=null;const rt=r.createElement("form"),ot=function(e){return e instanceof RegExp||e instanceof Function},it=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!nt||nt!==e){if(e&&"object"==typeof e||(e={}),e=A(e),Ze=Ze=-1===Je.indexOf(e.PARSER_MEDIA_TYPE)?et:e.PARSER_MEDIA_TYPE,tt="application/xhtml+xml"===Ze?m:f,ge="ALLOWED_TAGS"in e?S({},e.ALLOWED_TAGS,tt):he,be="ALLOWED_ATTR"in e?S({},e.ALLOWED_ATTR,tt):ye,Ke="ALLOWED_NAMESPACES"in e?S({},e.ALLOWED_NAMESPACES,m):Xe,He="ADD_URI_SAFE_ATTR"in e?S(A(Qe),e.ADD_URI_SAFE_ATTR,tt):Qe,Fe="ADD_DATA_URI_TAGS"in e?S(A(Be),e.ADD_DATA_URI_TAGS,tt):Be,Me="FORBID_CONTENTS"in e?S({},e.FORBID_CONTENTS,tt):Ue,we="FORBID_TAGS"in e?S({},e.FORBID_TAGS,tt):{},ve="FORBID_ATTR"in e?S({},e.FORBID_ATTR,tt):{},Pe="USE_PROFILES"in e&&e.USE_PROFILES,Te=!1!==e.ALLOW_ARIA_ATTR,Se=!1!==e.ALLOW_DATA_ATTR,Ae=e.ALLOW_UNKNOWN_PROTOCOLS||!1,Ne=!1!==e.ALLOW_SELF_CLOSE_IN_ATTR,Ee=e.SAFE_FOR_TEMPLATES||!1,Oe=e.WHOLE_DOCUMENT||!1,Ie=e.RETURN_DOM||!1,Ce=e.RETURN_DOM_FRAGMENT||!1,Re=e.RETURN_TRUSTED_TYPE||!1,ke=e.FORCE_BODY||!1,Le=!1!==e.SANITIZE_DOM,De=e.SANITIZE_NAMED_PROPS||!1,je=!1!==e.KEEP_CONTENT,ze=e.IN_PLACE||!1,me=e.ALLOWED_URI_REGEXP||B,$e=e.NAMESPACE||Ge,xe=e.CUSTOM_ELEMENT_HANDLING||{},e.CUSTOM_ELEMENT_HANDLING&&ot(e.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(xe.tagNameCheck=e.CUSTOM_ELEMENT_HANDLING.tagNameCheck),e.CUSTOM_ELEMENT_HANDLING&&ot(e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(xe.attributeNameCheck=e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),e.CUSTOM_ELEMENT_HANDLING&&"boolean"==typeof e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements&&(xe.allowCustomizedBuiltInElements=e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),Ee&&(Se=!1),Ce&&(Ie=!0),Pe&&(ge=S({},[...R]),be=[],!0===Pe.html&&(S(ge,E),S(be,L)),!0===Pe.svg&&(S(ge,O),S(be,D),S(be,j)),!0===Pe.svgFilters&&(S(ge,_),S(be,D),S(be,j)),!0===Pe.mathMl&&(S(ge,I),S(be,q),S(be,j))),e.ADD_TAGS&&(ge===he&&(ge=A(ge)),S(ge,e.ADD_TAGS,tt)),e.ADD_ATTR&&(be===ye&&(be=A(be)),S(be,e.ADD_ATTR,tt)),e.ADD_URI_SAFE_ATTR&&S(He,e.ADD_URI_SAFE_ATTR,tt),e.FORBID_CONTENTS&&(Me===Ue&&(Me=A(Me)),S(Me,e.FORBID_CONTENTS,tt)),je&&(ge["#text"]=!0),Oe&&S(ge,["html","head","body"]),ge.table&&(S(ge,["tbody"]),delete we.tbody),e.TRUSTED_TYPES_POLICY){if("function"!=typeof e.TRUSTED_TYPES_POLICY.createHTML)throw w('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if("function"!=typeof e.TRUSTED_TYPES_POLICY.createScriptURL)throw w('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');J=e.TRUSTED_TYPES_POLICY,ee=J.createHTML("")}else void 0===J&&(J=$(F,a)),null!==J&&"string"==typeof ee&&(ee=J.createHTML(""));i&&i(e),nt=e}},at=S({},["mi","mo","mn","ms","mtext"]),st=S({},["foreignobject","desc","title","annotation-xml"]),ct=S({},["title","style","font","a","script"]),lt=S({},O);S(lt,_),S(lt,k);const ut=S({},I);S(ut,C);const dt=function(e){let t=Z(e);t&&t.tagName||(t={namespaceURI:$e,tagName:"template"});const n=f(e.tagName),r=f(t.tagName);return!!Ke[e.namespaceURI]&&(e.namespaceURI===Ye?t.namespaceURI===Ge?"svg"===n:t.namespaceURI===We?"svg"===n&&("annotation-xml"===r||at[r]):Boolean(lt[n]):e.namespaceURI===We?t.namespaceURI===Ge?"math"===n:t.namespaceURI===Ye?"math"===n&&st[r]:Boolean(ut[n]):e.namespaceURI===Ge?!(t.namespaceURI===Ye&&!st[r])&&!(t.namespaceURI===We&&!at[r])&&!ut[n]&&(ct[n]||!lt[n]):!("application/xhtml+xml"!==Ze||!Ke[e.namespaceURI]))},pt=function(e){p(n.removed,{element:e});try{e.parentNode.removeChild(e)}catch(t){e.remove()}},ft=function(e,t){try{p(n.removed,{attribute:t.getAttributeNode(e),from:t})}catch(e){p(n.removed,{attribute:null,from:t})}if(t.removeAttribute(e),"is"===e&&!be[e])if(Ie||Ce)try{pt(t)}catch(e){}else try{t.setAttribute(e,"")}catch(e){}},mt=function(e){let t=null,n=null;if(ke)e=""+e;else{const t=g(e,/^[\r\n\t ]+/);n=t&&t[0]}"application/xhtml+xml"===Ze&&$e===Ge&&(e=''+e+"");const o=J?J.createHTML(e):e;if($e===Ge)try{t=(new U).parseFromString(o,Ze)}catch(e){}if(!t||!t.documentElement){t=te.createDocument($e,"template",null);try{t.documentElement.innerHTML=Ve?ee:o}catch(e){}}const i=t.body||t.documentElement;return e&&n&&i.insertBefore(r.createTextNode(n),i.childNodes[0]||null),$e===Ge?oe.call(t,Oe?"html":"body")[0]:Oe?t.documentElement:i},gt=function(e){return ne.call(e.ownerDocument||e,e,z.SHOW_ELEMENT|z.SHOW_COMMENT|z.SHOW_TEXT,null)},ht=function(e){return e instanceof M&&("string"!=typeof e.nodeName||"string"!=typeof e.textContent||"function"!=typeof e.removeChild||!(e.attributes instanceof P)||"function"!=typeof e.removeAttribute||"function"!=typeof e.setAttribute||"string"!=typeof e.namespaceURI||"function"!=typeof e.insertBefore||"function"!=typeof e.hasChildNodes)},bt=function(e){return"function"==typeof v&&e instanceof v},yt=function(e,t,r){ae[e]&&u(ae[e],(e=>{e.call(n,t,r,nt)}))},xt=function(e){let t=null;if(yt("beforeSanitizeElements",e,null),ht(e))return pt(e),!0;const r=tt(e.nodeName);if(yt("uponSanitizeElement",e,{tagName:r,allowedTags:ge}),e.hasChildNodes()&&!bt(e.firstElementChild)&&x(/<[/\w]/g,e.innerHTML)&&x(/<[/\w]/g,e.textContent))return pt(e),!0;if(!ge[r]||we[r]){if(!we[r]&&vt(r)){if(xe.tagNameCheck instanceof RegExp&&x(xe.tagNameCheck,r))return!1;if(xe.tagNameCheck instanceof Function&&xe.tagNameCheck(r))return!1}if(je&&!Me[r]){const t=Z(e)||e.parentNode,n=X(e)||e.childNodes;if(n&&t)for(let r=n.length-1;r>=0;--r)t.insertBefore(Q(n[r],!0),K(e))}return pt(e),!0}return e instanceof T&&!dt(e)?(pt(e),!0):"noscript"!==r&&"noembed"!==r&&"noframes"!==r||!x(/<\/no(script|embed|frames)/i,e.innerHTML)?(Ee&&3===e.nodeType&&(t=e.textContent,u([se,ce,le],(e=>{t=h(t,e," ")})),e.textContent!==t&&(p(n.removed,{element:e.cloneNode()}),e.textContent=t)),yt("afterSanitizeElements",e,null),!1):(pt(e),!0)},wt=function(e,t,n){if(Le&&("id"===t||"name"===t)&&(n in r||n in rt))return!1;if(Se&&!ve[t]&&x(ue,t));else if(Te&&x(de,t));else if(!be[t]||ve[t]){if(!(vt(e)&&(xe.tagNameCheck instanceof RegExp&&x(xe.tagNameCheck,e)||xe.tagNameCheck instanceof Function&&xe.tagNameCheck(e))&&(xe.attributeNameCheck instanceof RegExp&&x(xe.attributeNameCheck,t)||xe.attributeNameCheck instanceof Function&&xe.attributeNameCheck(t))||"is"===t&&xe.allowCustomizedBuiltInElements&&(xe.tagNameCheck instanceof RegExp&&x(xe.tagNameCheck,n)||xe.tagNameCheck instanceof Function&&xe.tagNameCheck(n))))return!1}else if(He[t]);else if(x(me,h(n,fe,"")));else if("src"!==t&&"xlink:href"!==t&&"href"!==t||"script"===e||0!==b(n,"data:")||!Fe[e])if(Ae&&!x(pe,h(n,fe,"")));else if(n)return!1;return!0},vt=function(e){return e.indexOf("-")>0},Tt=function(e){yt("beforeSanitizeAttributes",e,null);const{attributes:t}=e;if(!t)return;const r={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:be};let o=t.length;for(;o--;){const i=t[o],{name:a,namespaceURI:s,value:c}=i,l=tt(a);let p="value"===a?c:y(c);if(r.attrName=l,r.attrValue=p,r.keepAttr=!0,r.forceKeepAttr=void 0,yt("uponSanitizeAttribute",e,r),p=r.attrValue,r.forceKeepAttr)continue;if(ft(a,e),!r.keepAttr)continue;if(!Ne&&x(/\/>/i,p)){ft(a,e);continue}Ee&&u([se,ce,le],(e=>{p=h(p,e," ")}));const f=tt(e.nodeName);if(wt(f,l,p)){if(!De||"id"!==l&&"name"!==l||(ft(a,e),p=qe+p),J&&"object"==typeof F&&"function"==typeof F.getAttributeType)if(s);else switch(F.getAttributeType(f,l)){case"TrustedHTML":p=J.createHTML(p);break;case"TrustedScriptURL":p=J.createScriptURL(p)}try{s?e.setAttributeNS(s,a,p):e.setAttribute(a,p),d(n.removed)}catch(e){}}}yt("afterSanitizeAttributes",e,null)},St=function e(t){let n=null;const r=gt(t);for(yt("beforeSanitizeShadowDOM",t,null);n=r.nextNode();)yt("uponSanitizeShadowNode",n,null),xt(n)||(n.content instanceof c&&e(n.content),Tt(n));yt("afterSanitizeShadowDOM",t,null)};return n.sanitize=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=null,i=null,a=null,s=null;if(Ve=!e,Ve&&(e="\x3c!--\x3e"),"string"!=typeof e&&!bt(e)){if("function"!=typeof e.toString)throw w("toString is not a function");if("string"!=typeof(e=e.toString()))throw w("dirty is not a string, aborting")}if(!n.isSupported)return e;if(_e||it(t),n.removed=[],"string"==typeof e&&(ze=!1),ze){if(e.nodeName){const t=tt(e.nodeName);if(!ge[t]||we[t])throw w("root node is forbidden and cannot be sanitized in-place")}}else if(e instanceof v)r=mt("\x3c!----\x3e"),i=r.ownerDocument.importNode(e,!0),1===i.nodeType&&"BODY"===i.nodeName||"HTML"===i.nodeName?r=i:r.appendChild(i);else{if(!Ie&&!Ee&&!Oe&&-1===e.indexOf("<"))return J&&Re?J.createHTML(e):e;if(r=mt(e),!r)return Ie?null:Re?ee:""}r&&ke&&pt(r.firstChild);const l=gt(ze?e:r);for(;a=l.nextNode();)xt(a)||(a.content instanceof c&&St(a.content),Tt(a));if(ze)return e;if(Ie){if(Ce)for(s=re.call(r.ownerDocument);r.firstChild;)s.appendChild(r.firstChild);else s=r;return(be.shadowroot||be.shadowrootmode)&&(s=ie.call(o,s,!0)),s}let d=Oe?r.outerHTML:r.innerHTML;return Oe&&ge["!doctype"]&&r.ownerDocument&&r.ownerDocument.doctype&&r.ownerDocument.doctype.name&&x(W,r.ownerDocument.doctype.name)&&(d="\n"+d),Ee&&u([se,ce,le],(e=>{d=h(d,e," ")})),J&&Re?J.createHTML(d):d},n.setConfig=function(){it(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}),_e=!0},n.clearConfig=function(){nt=null,_e=!1},n.isValidAttribute=function(e,t,n){nt||it({});const r=tt(e),o=tt(t);return wt(r,o,n)},n.addHook=function(e,t){"function"==typeof t&&(ae[e]=ae[e]||[],p(ae[e],t))},n.removeHook=function(e){if(ae[e])return d(ae[e])},n.removeHooks=function(e){ae[e]&&(ae[e]=[])},n.removeAllHooks=function(){ae={}},n}var K=V();return K}();var R=g(C.exports),L=function(e){return{__html:I((0,R.sanitize)(e))}},D=function(e,t,r,i,s){var c=s.userInput,l=s.userAttempt,u=s.currentQuestionIndex,d=s.continueTillCorrect,p=s.showNextQuestionButton,f=s.incorrect,m=s.correct,g=s.setButtons,h=s.setIsCorrect,b=s.setIncorrectAnswer,y=s.setCorrect,x=s.setIncorrect,w=s.setShowNextQuestionButton,v=s.setUserInput,T=s.setUserAttempt,S="".concat(e),A={0:{disabled:!0},1:{disabled:!0},2:{disabled:!0},3:{disabled:!0}},N=a(c);if("single"===r)void 0===N[u]&&(N[u]=e),S===t?(f.indexOf(u)<0&&m.indexOf(u)<0&&m.push(u),g((function(r){return n(n(n({},r),A),{},o({},e-1,{className:S===t?"correct":"incorrect"}))})),h(!0),b(!1),y(m),w(!0)):(m.indexOf(u)<0&&f.indexOf(u)<0&&f.push(u),d?g((function(t){return n(n({},t),{},o({},e-1,{disabled:!t[e-1]}))})):(g((function(r){return n(n(n({},r),A),{},o({},e-1,{className:S===t?"correct":"incorrect"}))})),w(!0)),b(!0),h(!1),x(f));else{var E=t.length;if(void 0===N[u]&&(N[u]=[]),N[u].length=0&&p.splice(p.indexOf(l),1)):(p.indexOf(l)<0&&p.push(l),f.indexOf(l)>=0&&f.splice(f.indexOf(l),1)),m(f),g(p),u((function(t){return n(n(n({},t),b),{},o({},e-1,{className:"selected"}))})),d(!0);else{if(void 0===y[l]&&(y[l]=[]),y[l].includes(e)?y[l].splice(y[l].indexOf(e),1):y[l].push(e),y[l].length===t.length){var x,w=!0,v=function(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=s(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,c=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){c=!0,i=e},f:function(){try{a||null==n.return||n.return()}finally{if(c)throw i}}}}(c[l]);try{for(v.s();!(x=v.n()).done;){var T=x.value;if(!t.includes(T)){w=!1,p.indexOf(l)<0&&p.push(l),f.indexOf(l)>=0&&f.splice(f.indexOf(l),1);break}}}catch(e){v.e(e)}finally{v.f()}w&&(f.indexOf(l)<0&&f.push(l),p.indexOf(l)>=0&&p.splice(p.indexOf(l),1))}else p.indexOf(l)<0&&p.push(l),f.indexOf(l)>=0&&f.splice(f.indexOf(l),1);m(f),g(p),u((function(t){return n(n({},t),{},o({},e-1,{className:y[l].includes(e)?"selected":void 0}))})),y[l].length>0&&d(!0)}h(y)};function j(e){var t=e.question,n=e.isResultPage,r=t.explanation;return r?n?N.jsx("div",{className:"explanation",children:r}):N.jsxs("div",{children:[N.jsx("br",{}),r]}):null}var z=function(e){return e.messageForCorrectAnswer||"You are correct. Please click Next to continue."},P=function(e){return e.messageForIncorrectAnswer||"Incorrect answer. Please try again."};function M(t){var n=t.showInstantFeedback,r=t.incorrectAnswer,o=t.correctAnswer,i=t.question,a=t.onQuestionSubmit,s=t.userAnswer;return e.useEffect((function(){a&&(o||r)&&a({question:i,userAnswer:s,isCorrect:o})}),[o,r]),N.jsxs(N.Fragment,{children:[r&&n&&N.jsx("div",{className:"alert incorrect",children:P(i)}),o&&n&&N.jsxs("div",{className:"alert correct",children:[z(i),N.jsx(j,{question:i,isResultPage:!1})]})]})}function U(t){var n=t.questions,o=t.appLocale,s=t.showDefaultResult,c=t.onComplete,l=t.customResultPage,u=t.showInstantFeedback,d=t.continueTillCorrect,p=t.revealAnswerOnSubmit,f=t.allowNavigation,g=t.onQuestionSubmit,h=i(e.useState(!1),2),b=h[0],y=h[1],x=i(e.useState(!1),2),w=x[0],v=x[1],T=i(e.useState(!1),2),S=T[0],A=T[1],O=i(e.useState(!1),2),_=O[0],k=O[1],I=i(e.useState(0),2),C=I[0],R=I[1],z=i(e.useState({}),2),P=z[0],U=z[1],F=i(e.useState([]),2),B=F[0],H=F[1],Q=i(e.useState([]),2),W=Q[0],Y=Q[1],G=i(e.useState([]),2),$=G[0],V=G[1],K=i(e.useState("all"),2),X=K[0],Z=K[1],J=i(e.useState(1),2),ee=J[0],te=J[1],ne=i(e.useState(!0),2),re=ne[0],oe=ne[1],ie=i(e.useState(void 0),2),ae=ie[0],se=ie[1],ce=i(e.useState(0),2),le=ce[0],ue=ce[1],de=i(e.useState(0),2),pe=de[0],fe=de[1],me=i(e.useState(n[C]),2),ge=me[0],he=me[1],be=i(e.useState(void 0),2),ye=be[0],xe=be[1];e.useEffect((function(){oe(void 0===s||s)}),[s]),e.useEffect((function(){he(n[C])}),[C,n]),e.useEffect((function(){var e=ge.answerSelectionType;se(e||"single")}),[ge,C]),e.useEffect((function(){if(_){for(var e=0,t=0,r=0;r",t)}),n&&N.jsx("span",{className:"selection-tag segment",children:n})]})},De=function(e,t){return"string"==typeof t?e===Number(t):"object"===r(t)&&void 0!==t.find((function(t){return t===e}))},qe=e.useCallback((function(){var e,t;return"all"!==X&&("correct"===X?(e=n.filter((function(e,t){return-1!==B.indexOf(t)})),t=$.filter((function(e,t){return-1!==B.indexOf(t)}))):(e=n.filter((function(e,t){return-1!==W.indexOf(t)})),t=$.filter((function(e,t){return-1!==W.indexOf(t)})))),(e||n).map((function(e,n){var r=t?t[n]:$[n],i=e.answerSelectionType||"single";return N.jsxs("div",{className:"result-answer-wrapper",children:[N.jsx("h3",{dangerouslySetInnerHTML:L("Q".concat(e.questionIndex,": ").concat(e.question," ").concat(o.marksOfQuestion.replace("",e.point)))}),e.questionPic&&N.jsx("img",{src:e.questionPic,alt:"question"}),Le(i,e.correctAnswer.length,e.segment),N.jsx("div",{className:"result-answer",children:Re(e,r)}),N.jsx(j,{question:e,isResultPage:!0})]},m())}))}),[_,X]);return N.jsxs("div",{className:"questionWrapper",children:[!_&&N.jsxs("div",{className:"questionWrapperBody",children:[N.jsx("div",{className:"questionModal",children:N.jsx(M,{question:ge,showInstantFeedback:u,correctAnswer:w,incorrectAnswer:b,onQuestionSubmit:g,userAnswer:a($).pop()})}),N.jsx("div",{children:"".concat(o.question," ").concat(C+1," / ").concat(n.length,":")}),N.jsx("h3",{dangerouslySetInnerHTML:L("".concat(ge&&ge.question," ").concat(o.marksOfQuestion.replace("",ge.point)))}),ge&&ge.questionPic&&N.jsx("img",{src:ge.questionPic,alt:"question"}),ge&&Le(ae,ge.correctAnswer.length,ge.segment),ge&&(we=ge,ve=P,Te=we.answers,Se=we.correctAnswer,Ae=we.questionType,Ne=we.questionIndex,Ee=we.answerSelectionType,Oe=function(e){return D(e+1,Se,Ee,Te,{userInput:$,userAttempt:ee,currentQuestionIndex:C,continueTillCorrect:d,showNextQuestionButton:S,incorrect:W,correct:B,setButtons:U,setIsCorrect:v,setIncorrectAnswer:y,setCorrect:H,setIncorrect:Y,setShowNextQuestionButton:A,setUserInput:V,setUserAttempt:te})},_e=function(e){return q(e+1,Se,Ee,{userInput:$,currentQuestionIndex:C,setButtons:U,setShowNextQuestionButton:A,incorrect:W,correct:B,setCorrect:H,setIncorrect:Y,setUserInput:V})},ke=function(e){return void 0!==$[Ne-1]&&("single"===Ee?$[Ne-1]===e:Array.isArray($[Ne-1])&&$[Ne-1].includes(e))},Ee=Ee||"single",Te.map((function(t,n){return N.jsx(e.Fragment,{children:void 0!==ve[n]?N.jsxs("button",{type:"button",disabled:ve[n].disabled||!1,className:"".concat(ve[n].className," answerBtn btn ").concat(De(n+1,Se)&&u?"correct":""),onClick:function(){return p?_e(n):Oe(n)},children:["text"===Ae&&N.jsx("span",{children:t}),"photo"===Ae&&N.jsx("img",{src:t,alt:"answer"})]}):N.jsxs("button",{type:"button",onClick:function(){return p?_e(n):Oe(n)},className:"answerBtn btn ".concat(f&&ke(n+1)?"selected":null),children:["text"===Ae&&t,"photo"===Ae&&N.jsx("img",{src:t,alt:"answer"})]})},m())}))),(S||f)&&N.jsxs("div",{className:"questionBtnContainer",children:[f&&C>0&&N.jsx("button",{onClick:function(){return Ie(C-2)},className:"prevQuestionBtn btn",type:"button",children:o.prevQuestionBtn}),N.jsx("button",{onClick:function(){return Ie(C)},className:"nextQuestionBtn btn",type:"button",children:o.nextQuestionBtn})]})]}),_&&re&&void 0===l&&N.jsxs("div",{className:"card-body",children:[N.jsx("h2",{children:o.resultPageHeaderText.replace("",B.length).replace("",n.length)}),N.jsx("h2",{children:o.resultPagePoint.replace("",pe).replace("",le)}),N.jsx("br",{}),N.jsx(E,{filteredValue:X,handleChange:Ce,appLocale:o}),qe()]}),_&&!re&&void 0!==l&&l(ye)]})}var F={landingHeaderText:" Questions",question:"Question",startQuizBtn:"Start Quiz",resultFilterAll:"All",resultFilterCorrect:"Correct",resultFilterIncorrect:"Incorrect",nextQuestionBtn:"Next",prevQuestionBtn:"Prev",resultPageHeaderText:"You have completed the quiz. You got out of questions.",resultPagePoint:"You scored out of .",singleSelectionTagText:"Single Selection",multipleSelectionTagText:"Multiple Selection",pickNumberOfSelection:"Pick ",marksOfQuestion:"( marks)"};!function(e,t){void 0===t&&(t={});var n=t.insertAt;if(e&&"undefined"!=typeof document){var r=document.head||document.getElementsByTagName("head")[0],o=document.createElement("style");o.type="text/css","top"===n&&r.firstChild?r.insertBefore(o,r.firstChild):r.appendChild(o),o.styleSheet?o.styleSheet.cssText=e:o.appendChild(document.createTextNode(e))}}('.react-quiz-container{margin:20px;max-width:500px}.react-quiz-container .startQuizWrapper{margin-top:10px}.react-quiz-container .btn{background-image:none;border:1px solid transparent;cursor:pointer;font-weight:600;margin-bottom:0;padding:11px 12px;text-align:center;touch-action:manipulation;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;vertical-align:middle;white-space:nowrap}.react-quiz-container .questionWrapper .btn{border:1px solid #e8e8e8;border-radius:4px;display:block;font-size:15px;margin-bottom:10px;margin-top:10px;text-align:unset;white-space:normal}.react-quiz-container .questionWrapper .btn.correct{background:green;color:#fff}.react-quiz-container .questionModal .alert{border:1px solid transparent;border-radius:2px;color:#fff;margin-bottom:21px;padding:20px}.react-quiz-container .correct{background:green}.react-quiz-container .incorrect{background:red;color:#fff}.react-quiz-container .answerBtn,.react-quiz-container .questionWrapper img{width:100%}.react-quiz-container .selected{background:#007bff;color:#fff}.react-quiz-container .startQuizWrapper .startQuizBtn{background-color:#fff;border:1px solid #d9d9d9;border-radius:2px;color:rgba(0,0,0,.65);font-size:15px;line-height:1.35135}.react-quiz-container .result-answer-wrapper{border:1px solid #e8e8e8;border-bottom-left-radius:5px;border-bottom-right-radius:5px;margin-bottom:20px}.react-quiz-container .result-answer-wrapper h3{background-color:#fafafa;border-top-left-radius:5px;border-top-right-radius:5px;color:rgba(0,0,0,.9);margin:0;opacity:.8;padding:10px}.react-quiz-container .result-answer-wrapper .explanation{border:1px solid #e8e8e8;margin:0 20px 20px;padding:20px}.react-quiz-container .result-answer-wrapper .tag-container{margin:20px}.react-quiz-container .result-answer{padding:0 20px}.react-quiz-container .quiz-synopsis{margin:15px 0}.react-quiz-container .tag-container{display:flex;flex-wrap:wrap;gap:5px;margin-bottom:20px;margin-top:20px}.react-quiz-container .number-of-selection,.react-quiz-container .selection-tag{border-radius:5px;color:#fff;padding:7px}.react-quiz-container .number-of-selection{background:#673ab7;margin-left:5px}.react-quiz-container .selection-tag.single{background:#3f51b5}.react-quiz-container .selection-tag.multiple{background:#ff9800}.react-quiz-container .selection-tag.segment{background:#3db4b9;margin-left:5px}.react-quiz-container .questionBtnContainer{display:flex;justify-content:space-between}.react-quiz-container .quiz-result-filter{bottom:15px;position:relative;width:120px;.filter-dropdown-select{background-color:#fcfcfc;border:2px solid #c2c5c7;border-radius:7px;bottom:10px;color:#333;cursor:pointer;font-size:16px;height:12px;margin-top:2px;padding:8px;position:relative;text-transform:capitalize}.filter-dropdown-select:after{color:#a5a5a5;content:"▼";font-size:11px;position:absolute;right:10px;top:57%;transform:translateY(-50%);transition:all .3s ease}.filter-dropdown-select:hover{border:2px solid #51aae6;box-shadow:0 0 6px rgba(109,179,250,.5)}.dropdown-options{background-color:#fcfcfc;border-radius:10px;box-shadow:0 0 10px hsla(210,2%,56%,.5);left:0;list-style:none;margin:0;padding:0;position:absolute;top:85%;width:100%;z-index:1}.filter-dropdown-select.open{border:2px solid #51aae6;box-shadow:0 0 6px rgba(109,179,250,.5)}.dropdown-options .dropdown-options-item{cursor:pointer;font-size:16px;padding:10px}.dropdown-options .dropdown-options-item:hover{background-color:hsla(0,0%,89%,.852);border-radius:5px}.dropdown-options .dropdown-options-item:focus{background-color:#d7f1f9;font-weight:700}.filter-dropdown-select .selected-option.selected-open{color:#c6c2c2;font-weight:lighter}.filter-dropdown-select .selected-option{bottom:2px;font-size:16px;position:relative}.filter-dropdown-select:focus+.dropdown-options{max-height:200px}.dropdown-options .dropdown-options-item.selected{background-color:#d7f1f9;color:#333;font-weight:700}.dropdown-options.open{max-height:200px}}'),module.exports=function(t){var r=t.quiz,o=t.shuffle,a=t.shuffleAnswer,s=t.showDefaultResult,c=t.onComplete,l=t.customResultPage,u=t.showInstantFeedback,d=t.continueTillCorrect,p=t.revealAnswerOnSubmit,f=t.allowNavigation,m=t.onQuestionSubmit,g=t.disableSynopsis,h=i(e.useState(!1),2),b=h[0],y=h[1],x=i(e.useState(r.questions),2),w=x[0],v=x[1],T=r.nrOfQuestions&&r.nrOfQuestions0;t-=1){var n=Math.floor(Math.random()*(t+1)),r=[e[n],e[t]];e[t]=r[0],e[n]=r[1]}return e}),[]);if(e.useEffect((function(){g&&y(!0)}),[]),e.useEffect((function(){var e=r.questions;o&&(e=S(e)),a&&(e=function(){return(arguments.length>0&&void 0!==arguments[0]?arguments[0]:[]).map((function(e){var t,r=(null===(t=e.answers)||void 0===t?void 0:t.map((function(e,t){return[e,t]}))).sort((function(){return Math.random()-.5})),o=r.map((function(e){return e[0]}));if("single"===e.answerSelectionType){var i=e.correctAnswer,a=r.findIndex((function(e){return"".concat(e[1]+1)==="".concat(i)}))+1;return n(n({},e),{},{correctAnswer:"".concat(a),answers:o})}if("multiple"===e.answerSelectionType){var s=e.correctAnswer.map((function(e){return r.findIndex((function(t){return"".concat(t[1]+1)==="".concat(e)}))+1}));return n(n({},e),{},{correctAnswer:s,answers:o})}return e}))}(e)),e.length=T,e=e.map((function(e,t){return n(n({},e),{},{questionIndex:t+1})})),v(e)}),[b]),!function(e){if(!e)return console.error("Quiz object is required."),!1;for(var t=0;t",T)}),r.quizSynopsis&&N.jsx("div",{className:"quiz-synopsis",children:r.quizSynopsis}),N.jsx("div",{className:"startQuizWrapper",children:N.jsx("button",{type:"button",onClick:function(){return y(!0)},className:"startQuizBtn btn",children:A.startQuizBtn})})]}),b&&N.jsx(U,{questions:w,showDefaultResult:s,onComplete:c,customResultPage:l,showInstantFeedback:u,continueTillCorrect:d,revealAnswerOnSubmit:p,allowNavigation:f,appLocale:A,onQuestionSubmit:m})]})}; +"use strict";var e=require("react");function t(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function n(e){for(var n=1;ne.length)&&(t=e.length);for(var n=0,r=new Array(t);n",""],_:["",""],"*":["",""],"~":["",""],"\n":["
    "]," ":["
    "],"-":["
    "]};function _(e){return e.replace(RegExp("^"+(e.match(/^(\t| )+/)||"")[0],"gm"),"")}function O(e){return(e+"").replace(/"/g,""").replace(//g,">")}function I(e,t){var n,r,o,i,a,s=/((?:^|\n+)(?:\n---+|\* \*(?: \*)+)\n)|(?:^``` *(\w*)\n([\s\S]*?)\n```$)|((?:(?:^|\n+)(?:\t| {2,}).+)+\n*)|((?:(?:^|\n)([>*+-]|\d+\.)\s+.*)+)|(?:!\[([^\]]*?)\]\(([^)]+?)\))|(\[)|(\](?:\(([^)]+?)\))?)|(?:(?:^|\n+)([^\s].*)\n(-{3,}|={3,})(?:\n+|$))|(?:(?:^|\n+)(#{1,6})\s*(.+)(?:\n+|$))|(?:`([^`].*?)`)|( \n\n*|\n{2,}|__|\*\*|[_*]|~~)/gm,c=[],l="",u=t||{},d=0;function p(e){var t=k[e[1]||""],n=c[c.length-1]==e;return t?t[1]?(n?c.pop():c.push(e),t[0|n]):t[0]:e}function f(){for(var e="";c.length;)e+=p(c[c.length-1]);return e}for(e=e.replace(/^\[(.+?)\]:\s*(.+)$/gm,(function(e,t,n){return u[t.toLowerCase()]=n,""})).replace(/^\n+|\n+$/g,"");o=s.exec(e);)r=e.substring(d,o.index),d=s.lastIndex,n=o[0],r.match(/[^\\](\\\\)*\\$/)||((a=o[3]||o[4])?n='
    "+_(O(a).replace(/^\n+|\n+$/g,""))+"
    ":(a=o[6])?(a.match(/\./)&&(o[5]=o[5].replace(/^\d+/gm,"")),i=I(_(o[5].replace(/^\s*[>*+.-]/gm,""))),">"==a?a="blockquote":(a=a.match(/\./)?"ol":"ul",i=i.replace(/^(.*)(\n|$)/gm,"
  • $1
  • ")),n="<"+a+">"+i+""):o[8]?n=''+O(o[7])+'':o[10]?(l=l.replace("
    ",''),n=f()+""):o[9]?n="":o[12]||o[14]?n="<"+(a="h"+(o[14]?o[14].length:o[13]>"="?1:2))+">"+I(o[12]||o[15],u)+"":o[16]?n=""+O(o[16])+"":(o[17]||o[1])&&(n=p(o[17]||"--"))),l+=r,l+=n;return(l+e.substring(d)+f()).replace(/^\n+|\n+$/g,"")}var C={exports:{}}; +/*! @license DOMPurify 3.0.8 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.0.8/LICENSE */C.exports=function(){const{entries:e,setPrototypeOf:t,isFrozen:n,getPrototypeOf:r,getOwnPropertyDescriptor:o}=Object;let{freeze:i,seal:a,create:s}=Object,{apply:c,construct:l}="undefined"!=typeof Reflect&&Reflect;i||(i=function(e){return e}),a||(a=function(e){return e}),c||(c=function(e,t,n){return e.apply(t,n)}),l||(l=function(e,t){return new e(...t)});const u=v(Array.prototype.forEach),d=v(Array.prototype.pop),p=v(Array.prototype.push),f=v(String.prototype.toLowerCase),m=v(String.prototype.toString),g=v(String.prototype.match),h=v(String.prototype.replace),b=v(String.prototype.indexOf),y=v(String.prototype.trim),x=v(RegExp.prototype.test),w=T(TypeError);function v(e){return function(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),o=1;o2&&void 0!==arguments[2]?arguments[2]:f;t&&t(e,null);let i=r.length;for(;i--;){let t=r[i];if("string"==typeof t){const e=o(t);e!==t&&(n(r)||(r[i]=e),t=e)}e[t]=!0}return e}function A(e){for(let t=0;t/gm),U=a(/\${[\w\W]*}/gm),F=a(/^data-[\-\w.\u00B7-\uFFFF]/),B=a(/^aria-[\-\w]+$/),H=a(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),Q=a(/^(?:\w+script|data):/i),W=a(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),Y=a(/^html$/i);var G=Object.freeze({__proto__:null,MUSTACHE_EXPR:z,ERB_EXPR:M,TMPLIT_EXPR:U,DATA_ATTR:F,ARIA_ATTR:B,IS_ALLOWED_URI:H,IS_SCRIPT_OR_DATA:Q,ATTR_WHITESPACE:W,DOCTYPE_NAME:Y});const $=function(){return"undefined"==typeof window?null:window},K=function(e,t){if("object"!=typeof e||"function"!=typeof e.createPolicy)return null;let n=null;const r="data-tt-policy-suffix";t&&t.hasAttribute(r)&&(n=t.getAttribute(r));const o="dompurify"+(n?"#"+n:"");try{return e.createPolicy(o,{createHTML:e=>e,createScriptURL:e=>e})}catch(e){return console.warn("TrustedTypes policy "+o+" could not be created."),null}};function V(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:$();const n=e=>V(e);if(n.version="3.0.8",n.removed=[],!t||!t.document||9!==t.document.nodeType)return n.isSupported=!1,n;let{document:r}=t;const o=r,a=o.currentScript,{DocumentFragment:c,HTMLTemplateElement:l,Node:v,Element:T,NodeFilter:A,NamedNodeMap:z=t.NamedNodeMap||t.MozNamedAttrMap,HTMLFormElement:M,DOMParser:U,trustedTypes:F}=t,B=T.prototype,Q=E(B,"cloneNode"),W=E(B,"nextSibling"),X=E(B,"childNodes"),Z=E(B,"parentNode");if("function"==typeof l){const e=r.createElement("template");e.content&&e.content.ownerDocument&&(r=e.content.ownerDocument)}let J,ee="";const{implementation:te,createNodeIterator:ne,createDocumentFragment:re,getElementsByTagName:oe}=r,{importNode:ie}=o;let ae={};n.isSupported="function"==typeof e&&"function"==typeof Z&&te&&void 0!==te.createHTMLDocument;const{MUSTACHE_EXPR:se,ERB_EXPR:ce,TMPLIT_EXPR:le,DATA_ATTR:ue,ARIA_ATTR:de,IS_SCRIPT_OR_DATA:pe,ATTR_WHITESPACE:fe}=G;let{IS_ALLOWED_URI:me}=G,ge=null;const he=S({},[...k,..._,...O,...C,...L]);let be=null;const ye=S({},[...D,...j,...q,...P]);let xe=Object.seal(s(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),we=null,ve=null,Te=!0,Se=!0,Ae=!1,Ne=!0,Ee=!1,ke=!1,_e=!1,Oe=!1,Ie=!1,Ce=!1,Re=!1,Le=!0,De=!1;const je="user-content-";let qe=!0,Pe=!1,ze={},Me=null;const Ue=S({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]);let Fe=null;const Be=S({},["audio","video","img","source","image","track"]);let He=null;const Qe=S({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),We="http://www.w3.org/1998/Math/MathML",Ye="http://www.w3.org/2000/svg",Ge="http://www.w3.org/1999/xhtml";let $e=Ge,Ke=!1,Ve=null;const Xe=S({},[We,Ye,Ge],m);let Ze=null;const Je=["application/xhtml+xml","text/html"],et="text/html";let tt=null,nt=null;const rt=r.createElement("form"),ot=function(e){return e instanceof RegExp||e instanceof Function},it=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!nt||nt!==e){if(e&&"object"==typeof e||(e={}),e=N(e),Ze=-1===Je.indexOf(e.PARSER_MEDIA_TYPE)?et:e.PARSER_MEDIA_TYPE,tt="application/xhtml+xml"===Ze?m:f,ge="ALLOWED_TAGS"in e?S({},e.ALLOWED_TAGS,tt):he,be="ALLOWED_ATTR"in e?S({},e.ALLOWED_ATTR,tt):ye,Ve="ALLOWED_NAMESPACES"in e?S({},e.ALLOWED_NAMESPACES,m):Xe,He="ADD_URI_SAFE_ATTR"in e?S(N(Qe),e.ADD_URI_SAFE_ATTR,tt):Qe,Fe="ADD_DATA_URI_TAGS"in e?S(N(Be),e.ADD_DATA_URI_TAGS,tt):Be,Me="FORBID_CONTENTS"in e?S({},e.FORBID_CONTENTS,tt):Ue,we="FORBID_TAGS"in e?S({},e.FORBID_TAGS,tt):{},ve="FORBID_ATTR"in e?S({},e.FORBID_ATTR,tt):{},ze="USE_PROFILES"in e&&e.USE_PROFILES,Te=!1!==e.ALLOW_ARIA_ATTR,Se=!1!==e.ALLOW_DATA_ATTR,Ae=e.ALLOW_UNKNOWN_PROTOCOLS||!1,Ne=!1!==e.ALLOW_SELF_CLOSE_IN_ATTR,Ee=e.SAFE_FOR_TEMPLATES||!1,ke=e.WHOLE_DOCUMENT||!1,Ie=e.RETURN_DOM||!1,Ce=e.RETURN_DOM_FRAGMENT||!1,Re=e.RETURN_TRUSTED_TYPE||!1,Oe=e.FORCE_BODY||!1,Le=!1!==e.SANITIZE_DOM,De=e.SANITIZE_NAMED_PROPS||!1,qe=!1!==e.KEEP_CONTENT,Pe=e.IN_PLACE||!1,me=e.ALLOWED_URI_REGEXP||H,$e=e.NAMESPACE||Ge,xe=e.CUSTOM_ELEMENT_HANDLING||{},e.CUSTOM_ELEMENT_HANDLING&&ot(e.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(xe.tagNameCheck=e.CUSTOM_ELEMENT_HANDLING.tagNameCheck),e.CUSTOM_ELEMENT_HANDLING&&ot(e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(xe.attributeNameCheck=e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),e.CUSTOM_ELEMENT_HANDLING&&"boolean"==typeof e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements&&(xe.allowCustomizedBuiltInElements=e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),Ee&&(Se=!1),Ce&&(Ie=!0),ze&&(ge=S({},L),be=[],!0===ze.html&&(S(ge,k),S(be,D)),!0===ze.svg&&(S(ge,_),S(be,j),S(be,P)),!0===ze.svgFilters&&(S(ge,O),S(be,j),S(be,P)),!0===ze.mathMl&&(S(ge,C),S(be,q),S(be,P))),e.ADD_TAGS&&(ge===he&&(ge=N(ge)),S(ge,e.ADD_TAGS,tt)),e.ADD_ATTR&&(be===ye&&(be=N(be)),S(be,e.ADD_ATTR,tt)),e.ADD_URI_SAFE_ATTR&&S(He,e.ADD_URI_SAFE_ATTR,tt),e.FORBID_CONTENTS&&(Me===Ue&&(Me=N(Me)),S(Me,e.FORBID_CONTENTS,tt)),qe&&(ge["#text"]=!0),ke&&S(ge,["html","head","body"]),ge.table&&(S(ge,["tbody"]),delete we.tbody),e.TRUSTED_TYPES_POLICY){if("function"!=typeof e.TRUSTED_TYPES_POLICY.createHTML)throw w('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if("function"!=typeof e.TRUSTED_TYPES_POLICY.createScriptURL)throw w('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');J=e.TRUSTED_TYPES_POLICY,ee=J.createHTML("")}else void 0===J&&(J=K(F,a)),null!==J&&"string"==typeof ee&&(ee=J.createHTML(""));i&&i(e),nt=e}},at=S({},["mi","mo","mn","ms","mtext"]),st=S({},["foreignobject","desc","title","annotation-xml"]),ct=S({},["title","style","font","a","script"]),lt=S({},[..._,...O,...I]),ut=S({},[...C,...R]),dt=function(e){let t=Z(e);t&&t.tagName||(t={namespaceURI:$e,tagName:"template"});const n=f(e.tagName),r=f(t.tagName);return!!Ve[e.namespaceURI]&&(e.namespaceURI===Ye?t.namespaceURI===Ge?"svg"===n:t.namespaceURI===We?"svg"===n&&("annotation-xml"===r||at[r]):Boolean(lt[n]):e.namespaceURI===We?t.namespaceURI===Ge?"math"===n:t.namespaceURI===Ye?"math"===n&&st[r]:Boolean(ut[n]):e.namespaceURI===Ge?!(t.namespaceURI===Ye&&!st[r])&&!(t.namespaceURI===We&&!at[r])&&!ut[n]&&(ct[n]||!lt[n]):!("application/xhtml+xml"!==Ze||!Ve[e.namespaceURI]))},pt=function(e){p(n.removed,{element:e});try{e.parentNode.removeChild(e)}catch(t){e.remove()}},ft=function(e,t){try{p(n.removed,{attribute:t.getAttributeNode(e),from:t})}catch(e){p(n.removed,{attribute:null,from:t})}if(t.removeAttribute(e),"is"===e&&!be[e])if(Ie||Ce)try{pt(t)}catch(e){}else try{t.setAttribute(e,"")}catch(e){}},mt=function(e){let t=null,n=null;if(Oe)e=""+e;else{const t=g(e,/^[\r\n\t ]+/);n=t&&t[0]}"application/xhtml+xml"===Ze&&$e===Ge&&(e=''+e+"");const o=J?J.createHTML(e):e;if($e===Ge)try{t=(new U).parseFromString(o,Ze)}catch(e){}if(!t||!t.documentElement){t=te.createDocument($e,"template",null);try{t.documentElement.innerHTML=Ke?ee:o}catch(e){}}const i=t.body||t.documentElement;return e&&n&&i.insertBefore(r.createTextNode(n),i.childNodes[0]||null),$e===Ge?oe.call(t,ke?"html":"body")[0]:ke?t.documentElement:i},gt=function(e){return ne.call(e.ownerDocument||e,e,A.SHOW_ELEMENT|A.SHOW_COMMENT|A.SHOW_TEXT,null)},ht=function(e){return e instanceof M&&("string"!=typeof e.nodeName||"string"!=typeof e.textContent||"function"!=typeof e.removeChild||!(e.attributes instanceof z)||"function"!=typeof e.removeAttribute||"function"!=typeof e.setAttribute||"string"!=typeof e.namespaceURI||"function"!=typeof e.insertBefore||"function"!=typeof e.hasChildNodes)},bt=function(e){return"function"==typeof v&&e instanceof v},yt=function(e,t,r){ae[e]&&u(ae[e],(e=>{e.call(n,t,r,nt)}))},xt=function(e){let t=null;if(yt("beforeSanitizeElements",e,null),ht(e))return pt(e),!0;const r=tt(e.nodeName);if(yt("uponSanitizeElement",e,{tagName:r,allowedTags:ge}),e.hasChildNodes()&&!bt(e.firstElementChild)&&x(/<[/\w]/g,e.innerHTML)&&x(/<[/\w]/g,e.textContent))return pt(e),!0;if(!ge[r]||we[r]){if(!we[r]&&vt(r)){if(xe.tagNameCheck instanceof RegExp&&x(xe.tagNameCheck,r))return!1;if(xe.tagNameCheck instanceof Function&&xe.tagNameCheck(r))return!1}if(qe&&!Me[r]){const t=Z(e)||e.parentNode,n=X(e)||e.childNodes;if(n&&t)for(let r=n.length-1;r>=0;--r)t.insertBefore(Q(n[r],!0),W(e))}return pt(e),!0}return e instanceof T&&!dt(e)?(pt(e),!0):"noscript"!==r&&"noembed"!==r&&"noframes"!==r||!x(/<\/no(script|embed|frames)/i,e.innerHTML)?(Ee&&3===e.nodeType&&(t=e.textContent,u([se,ce,le],(e=>{t=h(t,e," ")})),e.textContent!==t&&(p(n.removed,{element:e.cloneNode()}),e.textContent=t)),yt("afterSanitizeElements",e,null),!1):(pt(e),!0)},wt=function(e,t,n){if(Le&&("id"===t||"name"===t)&&(n in r||n in rt))return!1;if(Se&&!ve[t]&&x(ue,t));else if(Te&&x(de,t));else if(!be[t]||ve[t]){if(!(vt(e)&&(xe.tagNameCheck instanceof RegExp&&x(xe.tagNameCheck,e)||xe.tagNameCheck instanceof Function&&xe.tagNameCheck(e))&&(xe.attributeNameCheck instanceof RegExp&&x(xe.attributeNameCheck,t)||xe.attributeNameCheck instanceof Function&&xe.attributeNameCheck(t))||"is"===t&&xe.allowCustomizedBuiltInElements&&(xe.tagNameCheck instanceof RegExp&&x(xe.tagNameCheck,n)||xe.tagNameCheck instanceof Function&&xe.tagNameCheck(n))))return!1}else if(He[t]);else if(x(me,h(n,fe,"")));else if("src"!==t&&"xlink:href"!==t&&"href"!==t||"script"===e||0!==b(n,"data:")||!Fe[e])if(Ae&&!x(pe,h(n,fe,"")));else if(n)return!1;return!0},vt=function(e){return e.indexOf("-")>0},Tt=function(e){yt("beforeSanitizeAttributes",e,null);const{attributes:t}=e;if(!t)return;const r={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:be};let o=t.length;for(;o--;){const i=t[o],{name:a,namespaceURI:s,value:c}=i,l=tt(a);let p="value"===a?c:y(c);if(r.attrName=l,r.attrValue=p,r.keepAttr=!0,r.forceKeepAttr=void 0,yt("uponSanitizeAttribute",e,r),p=r.attrValue,r.forceKeepAttr)continue;if(ft(a,e),!r.keepAttr)continue;if(!Ne&&x(/\/>/i,p)){ft(a,e);continue}Ee&&u([se,ce,le],(e=>{p=h(p,e," ")}));const f=tt(e.nodeName);if(wt(f,l,p)){if(!De||"id"!==l&&"name"!==l||(ft(a,e),p=je+p),J&&"object"==typeof F&&"function"==typeof F.getAttributeType)if(s);else switch(F.getAttributeType(f,l)){case"TrustedHTML":p=J.createHTML(p);break;case"TrustedScriptURL":p=J.createScriptURL(p)}try{s?e.setAttributeNS(s,a,p):e.setAttribute(a,p),d(n.removed)}catch(e){}}}yt("afterSanitizeAttributes",e,null)},St=function e(t){let n=null;const r=gt(t);for(yt("beforeSanitizeShadowDOM",t,null);n=r.nextNode();)yt("uponSanitizeShadowNode",n,null),xt(n)||(n.content instanceof c&&e(n.content),Tt(n));yt("afterSanitizeShadowDOM",t,null)};return n.sanitize=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=null,i=null,a=null,s=null;if(Ke=!e,Ke&&(e="\x3c!--\x3e"),"string"!=typeof e&&!bt(e)){if("function"!=typeof e.toString)throw w("toString is not a function");if("string"!=typeof(e=e.toString()))throw w("dirty is not a string, aborting")}if(!n.isSupported)return e;if(_e||it(t),n.removed=[],"string"==typeof e&&(Pe=!1),Pe){if(e.nodeName){const t=tt(e.nodeName);if(!ge[t]||we[t])throw w("root node is forbidden and cannot be sanitized in-place")}}else if(e instanceof v)r=mt("\x3c!----\x3e"),i=r.ownerDocument.importNode(e,!0),1===i.nodeType&&"BODY"===i.nodeName||"HTML"===i.nodeName?r=i:r.appendChild(i);else{if(!Ie&&!Ee&&!ke&&-1===e.indexOf("<"))return J&&Re?J.createHTML(e):e;if(r=mt(e),!r)return Ie?null:Re?ee:""}r&&Oe&&pt(r.firstChild);const l=gt(Pe?e:r);for(;a=l.nextNode();)xt(a)||(a.content instanceof c&&St(a.content),Tt(a));if(Pe)return e;if(Ie){if(Ce)for(s=re.call(r.ownerDocument);r.firstChild;)s.appendChild(r.firstChild);else s=r;return(be.shadowroot||be.shadowrootmode)&&(s=ie.call(o,s,!0)),s}let d=ke?r.outerHTML:r.innerHTML;return ke&&ge["!doctype"]&&r.ownerDocument&&r.ownerDocument.doctype&&r.ownerDocument.doctype.name&&x(Y,r.ownerDocument.doctype.name)&&(d="\n"+d),Ee&&u([se,ce,le],(e=>{d=h(d,e," ")})),J&&Re?J.createHTML(d):d},n.setConfig=function(){it(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}),_e=!0},n.clearConfig=function(){nt=null,_e=!1},n.isValidAttribute=function(e,t,n){nt||it({});const r=tt(e),o=tt(t);return wt(r,o,n)},n.addHook=function(e,t){"function"==typeof t&&(ae[e]=ae[e]||[],p(ae[e],t))},n.removeHook=function(e){if(ae[e])return d(ae[e])},n.removeHooks=function(e){ae[e]&&(ae[e]=[])},n.removeAllHooks=function(){ae={}},n}var X=V();return X}();var R=g(C.exports),L=function(e){return{__html:I((0,R.sanitize)(e))}},D=function(e,t,r,i,s){var c=s.userInput,l=s.userAttempt,u=s.currentQuestionIndex,d=s.continueTillCorrect,p=s.showNextQuestionButton,f=s.incorrect,m=s.correct,g=s.setButtons,h=s.setIsCorrect,b=s.setIncorrectAnswer,y=s.setCorrect,x=s.setIncorrect,w=s.setShowNextQuestionButton,v=s.setUserInput,T=s.setUserAttempt,S="".concat(e),A={0:{disabled:!0},1:{disabled:!0},2:{disabled:!0},3:{disabled:!0}},N=a(c);if("single"===r)void 0===N[u]&&(N[u]=e),S===t?(f.indexOf(u)<0&&m.indexOf(u)<0&&m.push(u),g((function(r){return n(n(n({},r),A),{},o({},e-1,{className:S===t?"correct":"incorrect"}))})),h(!0),b(!1),y(m),w(!0)):(m.indexOf(u)<0&&f.indexOf(u)<0&&f.push(u),d?g((function(t){return n(n({},t),{},o({},e-1,{disabled:!t[e-1]}))})):(g((function(r){return n(n(n({},r),A),{},o({},e-1,{className:S===t?"correct":"incorrect"}))})),w(!0)),b(!0),h(!1),x(f));else{var E=t.length;if(void 0===N[u]&&(N[u]=[]),N[u].length=0&&p.splice(p.indexOf(l),1)):(p.indexOf(l)<0&&p.push(l),f.indexOf(l)>=0&&f.splice(f.indexOf(l),1)),m(f),g(p),u((function(t){return n(n(n({},t),b),{},o({},e-1,{className:"selected"}))})),d(!0);else{if(void 0===y[l]&&(y[l]=[]),y[l].includes(e)?y[l].splice(y[l].indexOf(e),1):y[l].push(e),y[l].length===t.length){var x,w=!0,v=function(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=s(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,c=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){c=!0,i=e},f:function(){try{a||null==n.return||n.return()}finally{if(c)throw i}}}}(c[l]);try{for(v.s();!(x=v.n()).done;){var T=x.value;if(!t.includes(T)){w=!1,p.indexOf(l)<0&&p.push(l),f.indexOf(l)>=0&&f.splice(f.indexOf(l),1);break}}}catch(e){v.e(e)}finally{v.f()}w&&(f.indexOf(l)<0&&f.push(l),p.indexOf(l)>=0&&p.splice(p.indexOf(l),1))}else p.indexOf(l)<0&&p.push(l),f.indexOf(l)>=0&&f.splice(f.indexOf(l),1);m(f),g(p),u((function(t){return n(n({},t),{},o({},e-1,{className:y[l].includes(e)?"selected":void 0}))})),y[l].length>0&&d(!0)}h(y)};function q(e){var t=e.question,n=e.isResultPage,r=t.explanation;return r?n?N.jsx("div",{className:"explanation",children:r}):N.jsxs("div",{children:[N.jsx("br",{}),r]}):null}var P=function(e){return e.messageForCorrectAnswer||"You are correct. Please click Next to continue."},z=function(e){return e.messageForIncorrectAnswer||"Incorrect answer. Please try again."};function M(t){var n=t.showInstantFeedback,r=t.incorrectAnswer,o=t.correctAnswer,i=t.question,a=t.onQuestionSubmit,s=t.userAnswer;return e.useEffect((function(){a&&(o||r)&&a({question:i,userAnswer:s,isCorrect:o})}),[o,r]),N.jsxs(N.Fragment,{children:[r&&n&&N.jsx("div",{className:"alert incorrect",children:z(i)}),o&&n&&N.jsxs("div",{className:"alert correct",children:[P(i),N.jsx(q,{question:i,isResultPage:!1})]})]})}function U(t){var n=t.questions,o=t.appLocale,s=t.showDefaultResult,c=t.onComplete,l=t.customResultPage,u=t.showInstantFeedback,d=t.continueTillCorrect,p=t.revealAnswerOnSubmit,f=t.allowNavigation,g=t.onQuestionSubmit,h=t.timer,b=t.allowPauseTimer,y=i(e.useState(!1),2),x=y[0],w=y[1],v=i(e.useState(!1),2),T=v[0],S=v[1],A=i(e.useState(!1),2),k=A[0],_=A[1],O=i(e.useState(!1),2),I=O[0],C=O[1],R=i(e.useState(0),2),P=R[0],z=R[1],U=i(e.useState({}),2),F=U[0],B=U[1],H=i(e.useState([]),2),Q=H[0],W=H[1],Y=i(e.useState([]),2),G=Y[0],$=Y[1],K=i(e.useState([]),2),V=K[0],X=K[1],Z=i(e.useState([]),2),J=Z[0],ee=Z[1],te=i(e.useState("all"),2),ne=te[0],re=te[1],oe=i(e.useState(1),2),ie=oe[0],ae=oe[1],se=i(e.useState(!0),2),ce=se[0],le=se[1],ue=i(e.useState(void 0),2),de=ue[0],pe=ue[1],fe=i(e.useState(0),2),me=fe[0],ge=fe[1],he=i(e.useState(0),2),be=he[0],ye=he[1],xe=i(e.useState(n[P]),2),we=xe[0],ve=xe[1],Te=i(e.useState(void 0),2),Se=Te[0],Ae=Te[1],Ne=i(e.useState(h),2),Ee=Ne[0],ke=Ne[1],_e=i(e.useState(!0),2),Oe=_e[0],Ie=_e[1];e.useEffect((function(){le(void 0===s||s)}),[s]),e.useEffect((function(){ve(n[P])}),[P,n]),e.useEffect((function(){var e=we.answerSelectionType;pe(e||"single")}),[we,P]),e.useEffect((function(){if(I){Ie(!1);for(var e=0,t=0,r=0;r",t)}),n&&N.jsx("span",{className:"selection-tag segment",children:n})]})},je=function(e,t){return"string"==typeof t?e===Number(t):"object"===r(t)&&void 0!==t.find((function(t){return t===e}))},qe=e.useCallback((function(){var e,t;if("all"!==ne){var r=V;"correct"===ne?r=Q:"incorrect"===ne&&(r=G),e=n.filter((function(e,t){return-1!==r.indexOf(t)})),t=J.filter((function(e,t){return-1!==r.indexOf(t)}))}return(e||n).map((function(e,n){var r=t?t[n]:J[n],i=e.answerSelectionType||"single";return N.jsxs("div",{className:"result-answer-wrapper",children:[N.jsx("h3",{dangerouslySetInnerHTML:L("Q".concat(e.questionIndex,": ").concat(e.question," ").concat(o.marksOfQuestion.replace("",e.point)))}),e.questionPic&&N.jsx("img",{src:e.questionPic,alt:"question"}),De(i,e.correctAnswer.length,e.segment),N.jsx("div",{className:"result-answer",children:Le(e,r)}),N.jsx(q,{question:e,isResultPage:!0})]},m())}))}),[I,ne]);e.useEffect((function(){var e;return h&&Oe&&Ee>0&&(e=setInterval((function(){ke((function(e){return e-1}))}),1e3)),function(){return h&&clearInterval(e)}}),[Oe,Ee,h]);var Pe,ze,Me,Ue,Fe,Be,He,Qe,We,Ye,Ge=function(e){return e<10?"0":""},$e=function(e){var t=Math.floor(e/3600),n=Math.floor(e%3600/60),r=e%60;return"".concat(Ge(t)).concat(t,":").concat(Ge(n)).concat(n,":").concat(Ge(r)).concat(r)};return N.jsxs("div",{className:"questionWrapper",children:[h&&!Oe&&N.jsxs("div",{children:[o.timerTimeTaken,":"," ",N.jsx("b",{children:$e(h-Ee)})]}),h&&Oe&&N.jsxs("div",{children:[o.timerTimeRemaining,":"," ",N.jsx("b",{children:$e(Ee)})]}),h&&0===Ee&&Oe&&(Ie(!1),C(!0),void n.forEach((function(e,t){void 0===J[t]&&X((function(e){return[].concat(a(e),[t])}))}))),!I&&N.jsxs("div",{className:"questionWrapperBody",children:[N.jsxs("div",{children:["".concat(o.question," ").concat(P+1," / ").concat(n.length,":"),N.jsx("br",{}),h&&b&&N.jsx("button",{type:"button",className:"timerBtn",onClick:function(){Ie(!Oe)},children:Oe?o.pauseScreenPause:o.pauseScreenResume})]}),Oe?N.jsxs(N.Fragment,{children:[N.jsx("h3",{dangerouslySetInnerHTML:L("".concat(we&&we.question," ").concat(o.marksOfQuestion.replace("",we.point)))}),we&&we.questionPic&&N.jsx("img",{src:we.questionPic,alt:"question"}),we&&De(de,we.correctAnswer.length,we.segment),N.jsx("div",{className:"questionModal",children:N.jsx(M,{question:we,showInstantFeedback:u,correctAnswer:T,incorrectAnswer:x,onQuestionSubmit:g,userAnswer:a(J).pop()})}),we&&(Pe=we,ze=F,Me=Pe.answers,Ue=Pe.correctAnswer,Fe=Pe.questionType,Be=Pe.questionIndex,He=Pe.answerSelectionType,Qe=function(e){return D(e+1,Ue,He,Me,{userInput:J,userAttempt:ie,currentQuestionIndex:P,continueTillCorrect:d,showNextQuestionButton:k,incorrect:G,correct:Q,setButtons:B,setIsCorrect:S,setIncorrectAnswer:w,setCorrect:W,setIncorrect:$,setShowNextQuestionButton:_,setUserInput:ee,setUserAttempt:ae})},We=function(e){return j(e+1,Ue,He,{userInput:J,currentQuestionIndex:P,setButtons:B,setShowNextQuestionButton:_,incorrect:G,correct:Q,setCorrect:W,setIncorrect:$,setUserInput:ee})},Ye=function(e){return void 0!==J[Be-1]&&("single"===He?J[Be-1]===e:Array.isArray(J[Be-1])&&J[Be-1].includes(e))},He=He||"single",Me.map((function(t,n){return N.jsx(e.Fragment,{children:void 0!==ze[n]?N.jsxs("button",{type:"button",disabled:ze[n].disabled||!1,className:"".concat(ze[n].className," answerBtn btn ").concat(je(n+1,Ue)&&u?"correct":""),onClick:function(){return p?We(n):Qe(n)},children:["text"===Fe&&N.jsx("span",{children:t}),"photo"===Fe&&N.jsx("img",{src:t,alt:"answer"})]}):N.jsxs("button",{type:"button",onClick:function(){return p?We(n):Qe(n)},className:"answerBtn btn ".concat(f&&Ye(n+1)?"selected":null),children:["text"===Fe&&t,"photo"===Fe&&N.jsx("img",{src:t,alt:"answer"})]})},m())}))),(k||f)&&N.jsxs("div",{className:"questionBtnContainer",children:[f&&P>0&&N.jsx("button",{onClick:function(){return Ce(P-2)},className:"prevQuestionBtn btn",type:"button",children:o.prevQuestionBtn}),N.jsx("button",{onClick:function(){return Ce(P)},className:"nextQuestionBtn btn",type:"button",children:o.nextQuestionBtn})]})]}):N.jsxs("span",{className:"timerPauseScreen dark:text-white text-black",children:[N.jsx("br",{}),N.jsx("br",{}),o.pauseScreenDisplay]})]}),I&&ce&&void 0===l&&N.jsxs("div",{className:"card-body",children:[N.jsx("h2",{children:o.resultPageHeaderText.replace("",Q.length).replace("",n.length)}),N.jsx("h2",{children:o.resultPagePoint.replace("",be).replace("",me)}),N.jsx("br",{}),N.jsx(E,{filteredValue:ne,handleChange:Re,appLocale:o}),qe()]}),I&&!ce&&void 0!==l&&l(Se)]})}var F={landingHeaderText:" Questions",question:"Question",startQuizBtn:"Start Quiz",resultFilterAll:"All",resultFilterCorrect:"Correct",resultFilterIncorrect:"Incorrect",resultFilterUnanswered:"Unanswered",nextQuestionBtn:"Next",prevQuestionBtn:"Prev",resultPageHeaderText:"You have completed the quiz. You got out of questions.",resultPagePoint:"You scored out of .",pauseScreenDisplay:"Test is paused. Clicked the Resume button to continue",timerTimeRemaining:"Time Remaining",timerTimeTaken:"Time Taken",pauseScreenPause:"Pause",pauseScreenResume:"Resume",singleSelectionTagText:"Single Selection",multipleSelectionTagText:"Multiple Selection",pickNumberOfSelection:"Pick ",marksOfQuestion:"( marks)"};!function(e,t){void 0===t&&(t={});var n=t.insertAt;if(e&&"undefined"!=typeof document){var r=document.head||document.getElementsByTagName("head")[0],o=document.createElement("style");o.type="text/css","top"===n&&r.firstChild?r.insertBefore(o,r.firstChild):r.appendChild(o),o.styleSheet?o.styleSheet.cssText=e:o.appendChild(document.createTextNode(e))}}('.react-quiz-container{margin:20px;max-width:500px}.react-quiz-container .startQuizWrapper{margin-top:10px}.react-quiz-container .btn{background-image:none;border:1px solid transparent;cursor:pointer;font-weight:600;margin-bottom:0;padding:11px 12px;text-align:center;touch-action:manipulation;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;vertical-align:middle;white-space:nowrap}.react-quiz-container .questionWrapper .btn{border:1px solid #e8e8e8;border-radius:4px;display:block;font-size:15px;margin-bottom:10px;margin-top:10px;text-align:unset;white-space:normal}.react-quiz-container .questionWrapper .btn.correct,.timerBtn{background:green;color:#fff}.timerBtn{border:0!important;border-radius:10px;cursor:pointer;float:right;padding:5px;position:relative;top:-35px;width:80px}.timerPauseScreen{font-size:30px}.react-quiz-container .questionModal .alert{border:1px solid transparent;border-radius:2px;color:#fff;margin-bottom:21px;padding:20px}.react-quiz-container .correct{background:green}.react-quiz-container .incorrect{background:red;color:#fff}.react-quiz-container .unanswered{background:grey;color:#fff}.react-quiz-container .answerBtn,.react-quiz-container .questionWrapper img{width:100%}.react-quiz-container .selected{background:#007bff;color:#fff}.react-quiz-container .startQuizWrapper .startQuizBtn{background-color:#fff;border:1px solid #d9d9d9;border-radius:2px;color:rgba(0,0,0,.65);font-size:15px;line-height:1.35135}.react-quiz-container .result-answer-wrapper{border:1px solid #e8e8e8;border-bottom-left-radius:5px;border-bottom-right-radius:5px;margin-bottom:20px}.react-quiz-container .result-answer-wrapper h3{background-color:#fafafa;border-top-left-radius:5px;border-top-right-radius:5px;color:rgba(0,0,0,.9);margin:0;opacity:.8;padding:10px}.react-quiz-container .result-answer-wrapper .explanation{border:1px solid #e8e8e8;margin:0 20px 20px;padding:20px}.react-quiz-container .result-answer-wrapper .tag-container{margin:20px}.react-quiz-container .result-answer{padding:0 20px}.react-quiz-container .quiz-synopsis{margin:15px 0}.react-quiz-container .tag-container{display:flex;flex-wrap:wrap;gap:5px;margin-bottom:20px;margin-top:20px}.react-quiz-container .number-of-selection,.react-quiz-container .selection-tag{border-radius:5px;color:#fff;padding:7px}.react-quiz-container .number-of-selection{background:#673ab7;margin-left:5px}.react-quiz-container .selection-tag.single{background:#3f51b5}.react-quiz-container .selection-tag.multiple{background:#ff9800}.react-quiz-container .selection-tag.segment{background:#3db4b9;margin-left:5px}.react-quiz-container .questionBtnContainer{display:flex;justify-content:space-between}.react-quiz-container .quiz-result-filter{bottom:15px;position:relative;width:120px;.filter-dropdown-select{background-color:#fcfcfc;border:2px solid #c2c5c7;border-radius:7px;bottom:10px;color:#333;cursor:pointer;font-size:16px;height:12px;margin-top:2px;padding:8px;position:relative;text-transform:capitalize}.filter-dropdown-select:after{color:#a5a5a5;content:"▼";font-size:11px;position:absolute;right:10px;top:57%;transform:translateY(-50%);transition:all .3s ease}.filter-dropdown-select:hover{border:2px solid #51aae6;box-shadow:0 0 6px rgba(109,179,250,.5)}.dropdown-options{background-color:#fcfcfc;border-radius:10px;box-shadow:0 0 10px hsla(210,2%,56%,.5);left:0;list-style:none;margin:0;padding:0;position:absolute;top:85%;width:100%;z-index:1}.filter-dropdown-select.open{border:2px solid #51aae6;box-shadow:0 0 6px rgba(109,179,250,.5)}.dropdown-options .dropdown-options-item{cursor:pointer;font-size:16px;padding:10px}.dropdown-options .dropdown-options-item:hover{background-color:hsla(0,0%,89%,.852);border-radius:5px}.dropdown-options .dropdown-options-item:focus{background-color:#d7f1f9;font-weight:700}.filter-dropdown-select .selected-option.selected-open{color:#c6c2c2;font-weight:lighter}.filter-dropdown-select .selected-option{bottom:2px;font-size:16px;position:relative}.filter-dropdown-select:focus+.dropdown-options{max-height:200px}.dropdown-options .dropdown-options-item.selected{background-color:#d7f1f9;color:#333;font-weight:700}.dropdown-options.open{max-height:200px}}'),module.exports=function(t){var r=t.quiz,o=t.shuffle,a=t.shuffleAnswer,s=t.showDefaultResult,c=t.onComplete,l=t.customResultPage,u=t.showInstantFeedback,d=t.continueTillCorrect,p=t.revealAnswerOnSubmit,f=t.allowNavigation,m=t.onQuestionSubmit,g=t.disableSynopsis,h=t.timer,b=t.allowPauseTimer,y=i(e.useState(!1),2),x=y[0],w=y[1],v=i(e.useState(r.questions),2),T=v[0],S=v[1],A=r.nrOfQuestions&&r.nrOfQuestions0;t-=1){var n=Math.floor(Math.random()*(t+1)),r=[e[n],e[t]];e[t]=r[0],e[n]=r[1]}return e}),[]);if(e.useEffect((function(){g&&w(!0)}),[]),e.useEffect((function(){var e=r.questions;o&&(e=E(e)),a&&(e=function(){return(arguments.length>0&&void 0!==arguments[0]?arguments[0]:[]).map((function(e){var t,r=(null===(t=e.answers)||void 0===t?void 0:t.map((function(e,t){return[e,t]}))).sort((function(){return Math.random()-.5})),o=r.map((function(e){return e[0]}));if("single"===e.answerSelectionType){var i=e.correctAnswer,a=r.findIndex((function(e){return"".concat(e[1]+1)==="".concat(i)}))+1;return n(n({},e),{},{correctAnswer:"".concat(a),answers:o})}if("multiple"===e.answerSelectionType){var s=e.correctAnswer.map((function(e){return r.findIndex((function(t){return"".concat(t[1]+1)==="".concat(e)}))+1}));return n(n({},e),{},{correctAnswer:s,answers:o})}return e}))}(e)),e.length=A,e=e.map((function(e,t){return n(n({},e),{},{questionIndex:t+1})})),S(e)}),[x]),!function(e){if(!e)return console.error("Quiz object is required."),!1;if(h&&"number"!=typeof h||h<1)return console.error(h&&"number"!=typeof h?"timer must be a number":"timer must be a number greater than 0"),!1;if(b&&"boolean"!=typeof b)return console.error("allowPauseTimer must be a Boolean"),!1;for(var t=0;t",A)}),r.quizSynopsis&&N.jsx("div",{className:"quiz-synopsis",children:r.quizSynopsis}),N.jsx("div",{className:"startQuizWrapper",children:N.jsx("button",{type:"button",onClick:function(){return w(!0)},className:"startQuizBtn btn",children:k.startQuizBtn})})]}),x&&N.jsx(U,{questions:T,showDefaultResult:s,onComplete:c,customResultPage:l,showInstantFeedback:u,continueTillCorrect:d,revealAnswerOnSubmit:p,allowNavigation:f,appLocale:k,onQuestionSubmit:m,timer:h,allowPauseTimer:b})]})}; diff --git a/docs/bundle.js b/docs/bundle.js index 9418015..c8c5bc3 100644 --- a/docs/bundle.js +++ b/docs/bundle.js @@ -1 +1 @@ -(()=>{var __webpack_modules__={412:(__unused_webpack_module,__unused_webpack___webpack_exports__,__webpack_require__)=>{"use strict";eval('\n// EXTERNAL MODULE: ./node_modules/react/index.js\nvar react = __webpack_require__(294);\n// EXTERNAL MODULE: ./node_modules/react-dom/client.js\nvar client = __webpack_require__(745);\n;// CONCATENATED MODULE: ./node_modules/uuid/dist/esm-browser/native.js\nconst randomUUID = typeof crypto !== \'undefined\' && crypto.randomUUID && crypto.randomUUID.bind(crypto);\n/* harmony default export */ const esm_browser_native = ({\n randomUUID\n});\n;// CONCATENATED MODULE: ./node_modules/uuid/dist/esm-browser/rng.js\n// Unique ID creation requires a high quality random # generator. In the browser we therefore\n// require the crypto API and do not support built-in fallback to lower quality random number\n// generators (like Math.random()).\nlet getRandomValues;\nconst rnds8 = new Uint8Array(16);\nfunction rng() {\n // lazy load so that environments that need to polyfill have a chance to do so\n if (!getRandomValues) {\n // getRandomValues needs to be invoked in a context where "this" is a Crypto implementation.\n getRandomValues = typeof crypto !== \'undefined\' && crypto.getRandomValues && crypto.getRandomValues.bind(crypto);\n\n if (!getRandomValues) {\n throw new Error(\'crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported\');\n }\n }\n\n return getRandomValues(rnds8);\n}\n;// CONCATENATED MODULE: ./node_modules/uuid/dist/esm-browser/stringify.js\n\n/**\n * Convert array of 16 byte values to UUID string format of the form:\n * XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX\n */\n\nconst byteToHex = [];\n\nfor (let i = 0; i < 256; ++i) {\n byteToHex.push((i + 0x100).toString(16).slice(1));\n}\n\nfunction unsafeStringify(arr, offset = 0) {\n // Note: Be careful editing this code! It\'s been tuned for performance\n // and works in ways you may not expect. See https://github.com/uuidjs/uuid/pull/434\n return byteToHex[arr[offset + 0]] + byteToHex[arr[offset + 1]] + byteToHex[arr[offset + 2]] + byteToHex[arr[offset + 3]] + \'-\' + byteToHex[arr[offset + 4]] + byteToHex[arr[offset + 5]] + \'-\' + byteToHex[arr[offset + 6]] + byteToHex[arr[offset + 7]] + \'-\' + byteToHex[arr[offset + 8]] + byteToHex[arr[offset + 9]] + \'-\' + byteToHex[arr[offset + 10]] + byteToHex[arr[offset + 11]] + byteToHex[arr[offset + 12]] + byteToHex[arr[offset + 13]] + byteToHex[arr[offset + 14]] + byteToHex[arr[offset + 15]];\n}\n\nfunction stringify(arr, offset = 0) {\n const uuid = unsafeStringify(arr, offset); // Consistency check for valid UUID. If this throws, it\'s likely due to one\n // of the following:\n // - One or more input array values don\'t map to a hex octet (leading to\n // "undefined" in the uuid)\n // - Invalid input values for the RFC `version` or `variant` fields\n\n if (!validate(uuid)) {\n throw TypeError(\'Stringified UUID is invalid\');\n }\n\n return uuid;\n}\n\n/* harmony default export */ const esm_browser_stringify = ((/* unused pure expression or super */ null && (stringify)));\n;// CONCATENATED MODULE: ./node_modules/uuid/dist/esm-browser/v4.js\n\n\n\n\nfunction v4(options, buf, offset) {\n if (esm_browser_native.randomUUID && !buf && !options) {\n return esm_browser_native.randomUUID();\n }\n\n options = options || {};\n const rnds = options.random || (options.rng || rng)(); // Per 4.4, set bits for version and `clock_seq_hi_and_reserved`\n\n rnds[6] = rnds[6] & 0x0f | 0x40;\n rnds[8] = rnds[8] & 0x3f | 0x80; // Copy bytes to buffer, if provided\n\n if (buf) {\n offset = offset || 0;\n\n for (let i = 0; i < 16; ++i) {\n buf[offset + i] = rnds[i];\n }\n\n return buf;\n }\n\n return unsafeStringify(rnds);\n}\n\n/* harmony default export */ const esm_browser_v4 = (v4);\n;// CONCATENATED MODULE: ./src/lib/core-components/QuizResultFilter.jsx\nfunction _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }\nfunction _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }\nfunction _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }\nfunction _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }\nfunction _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t["return"] && (u = t["return"](), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }\nfunction _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }\n\nfunction QuizResultFilter(_ref) {\n var filteredValue = _ref.filteredValue,\n handleChange = _ref.handleChange,\n appLocale = _ref.appLocale;\n var _useState = (0,react.useState)(false),\n _useState2 = _slicedToArray(_useState, 2),\n isOpen = _useState2[0],\n setIsOpen = _useState2[1];\n var dropdownRef = (0,react.useRef)(null);\n var toggleDropdown = function toggleDropdown() {\n setIsOpen(!isOpen);\n };\n var handleOptionClick = function handleOptionClick(value) {\n handleChange({\n target: {\n value: value\n }\n });\n setIsOpen(false);\n };\n var selectedOptionClass = isOpen ? \'selected-open\' : \'\';\n (0,react.useEffect)(function () {\n var handleOutsideClick = function handleOutsideClick(e) {\n if (isOpen && dropdownRef.current && !dropdownRef.current.contains(e.target)) {\n setIsOpen(false);\n }\n };\n document.addEventListener(\'click\', handleOutsideClick);\n return function () {\n document.removeEventListener(\'click\', handleOutsideClick);\n };\n }, [isOpen]);\n return /*#__PURE__*/react.createElement("div", {\n className: "quiz-result-filter"\n }, /*#__PURE__*/react.createElement("div", {\n ref: dropdownRef,\n className: "filter-dropdown-select ".concat(isOpen ? \'open\' : \'\'),\n onClick: toggleDropdown,\n onKeyDown: function onKeyDown(e) {\n if (e.key === \'Enter\') {\n toggleDropdown();\n }\n },\n role: "button",\n tabIndex: 0\n }, /*#__PURE__*/react.createElement("div", {\n className: "selected-option ".concat(selectedOptionClass)\n }, filteredValue === \'all\' ? appLocale.resultFilterAll : filteredValue), /*#__PURE__*/react.createElement("span", {\n className: "arrow ".concat(isOpen ? \'up\' : \'down\')\n })), isOpen && /*#__PURE__*/react.createElement("div", {\n className: "dropdown-options",\n role: "menu",\n "aria-labelledby": "quiz-filter"\n }, /*#__PURE__*/react.createElement("div", {\n className: "dropdown-options-item ".concat(filteredValue === \'all\' ? \'selected\' : \'\'),\n onClick: function onClick() {\n return handleOptionClick(\'all\');\n },\n onKeyDown: function onKeyDown(e) {\n if (e.key === \'Enter\') {\n handleOptionClick(\'all\');\n }\n },\n role: "menuitem",\n tabIndex: 0\n }, appLocale.resultFilterAll), /*#__PURE__*/react.createElement("div", {\n className: "dropdown-options-item ".concat(filteredValue === \'correct\' ? \'selected\' : \'\'),\n onClick: function onClick() {\n return handleOptionClick(\'correct\');\n },\n onKeyDown: function onKeyDown(e) {\n if (e.key === \'Enter\') {\n handleOptionClick(\'correct\');\n }\n },\n role: "menuitem",\n tabIndex: 0\n }, appLocale.resultFilterCorrect), /*#__PURE__*/react.createElement("div", {\n className: "dropdown-options-item ".concat(filteredValue === \'incorrect\' ? \'selected\' : \'\'),\n onClick: function onClick() {\n return handleOptionClick(\'incorrect\');\n },\n onKeyDown: function onKeyDown(e) {\n if (e.key === \'Enter\') {\n handleOptionClick(\'incorrect\');\n }\n },\n role: "menuitem",\n tabIndex: 0\n }, appLocale.resultFilterIncorrect)));\n}\n/* harmony default export */ const core_components_QuizResultFilter = (QuizResultFilter);\n;// CONCATENATED MODULE: ./node_modules/snarkdown/dist/snarkdown.es.js\nvar e={"":["",""],_:["",""],"*":["",""],"~":["",""],"\\n":["
    "]," ":["
    "],"-":["
    "]};function n(e){return e.replace(RegExp("^"+(e.match(/^(\\t| )+/)||"")[0],"gm"),"")}function r(e){return(e+"").replace(/"/g,""").replace(//g,">")}function t(a,c){var o,l,g,s,p,u=/((?:^|\\n+)(?:\\n---+|\\* \\*(?: \\*)+)\\n)|(?:^``` *(\\w*)\\n([\\s\\S]*?)\\n```$)|((?:(?:^|\\n+)(?:\\t| {2,}).+)+\\n*)|((?:(?:^|\\n)([>*+-]|\\d+\\.)\\s+.*)+)|(?:!\\[([^\\]]*?)\\]\\(([^)]+?)\\))|(\\[)|(\\](?:\\(([^)]+?)\\))?)|(?:(?:^|\\n+)([^\\s].*)\\n(-{3,}|={3,})(?:\\n+|$))|(?:(?:^|\\n+)(#{1,6})\\s*(.+)(?:\\n+|$))|(?:`([^`].*?)`)|( \\n\\n*|\\n{2,}|__|\\*\\*|[_*]|~~)/gm,m=[],h="",i=c||{},d=0;function f(n){var r=e[n[1]||""],t=m[m.length-1]==n;return r?r[1]?(t?m.pop():m.push(n),r[0|t]):r[0]:n}function $(){for(var e="";m.length;)e+=f(m[m.length-1]);return e}for(a=a.replace(/^\\[(.+?)\\]:\\s*(.+)$/gm,function(e,n,r){return i[n.toLowerCase()]=r,""}).replace(/^\\n+|\\n+$/g,"");g=u.exec(a);)l=a.substring(d,g.index),d=u.lastIndex,o=g[0],l.match(/[^\\\\](\\\\\\\\)*\\\\$/)||((p=g[3]||g[4])?o=\'
    "+n(r(p).replace(/^\\n+|\\n+$/g,""))+"
    ":(p=g[6])?(p.match(/\\./)&&(g[5]=g[5].replace(/^\\d+/gm,"")),s=t(n(g[5].replace(/^\\s*[>*+.-]/gm,""))),">"==p?p="blockquote":(p=p.match(/\\./)?"ol":"ul",s=s.replace(/^(.*)(\\n|$)/gm,"
  • $1
  • ")),o="<"+p+">"+s+""):g[8]?o=\'\'+r(g[7])+\'\':g[10]?(h=h.replace("
    ",\'\'),o=$()+""):g[9]?o="":g[12]||g[14]?o="<"+(p="h"+(g[14]?g[14].length:g[13]>"="?1:2))+">"+t(g[12]||g[15],i)+"":g[16]?o=""+r(g[16])+"":(g[17]||g[1])&&(o=f(g[17]||"--"))),h+=l,h+=o;return(h+a.substring(d)+$()).replace(/^\\n+|\\n+$/g,"")}\n//# sourceMappingURL=snarkdown.es.js.map\n\n// EXTERNAL MODULE: ./node_modules/dompurify/dist/purify.js\nvar purify = __webpack_require__(856);\nvar purify_default = /*#__PURE__*/__webpack_require__.n(purify);\n;// CONCATENATED MODULE: ./src/lib/core-components/helpers.jsx\nfunction _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }\nfunction _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"]; if (!it) { if (Array.isArray(o) || (it = helpers_unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it["return"] != null) it["return"](); } finally { if (didErr) throw err; } } }; }\nfunction ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }\nfunction _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }\nfunction _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\nfunction _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }\nfunction _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }\nfunction _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || helpers_unsupportedIterableToArray(arr) || _nonIterableSpread(); }\nfunction _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }\nfunction helpers_unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return helpers_arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return helpers_arrayLikeToArray(o, minLen); }\nfunction _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }\nfunction _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return helpers_arrayLikeToArray(arr); }\nfunction helpers_arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }\n\n\nvar rawMarkup = function rawMarkup(data) {\n var sanitizer = (purify_default()).sanitize;\n return {\n __html: t(sanitizer(data))\n };\n};\nvar checkAnswer = function checkAnswer(index, correctAnswer, answerSelectionType, answers, _ref) {\n var userInput = _ref.userInput,\n userAttempt = _ref.userAttempt,\n currentQuestionIndex = _ref.currentQuestionIndex,\n continueTillCorrect = _ref.continueTillCorrect,\n showNextQuestionButton = _ref.showNextQuestionButton,\n incorrect = _ref.incorrect,\n correct = _ref.correct,\n setButtons = _ref.setButtons,\n setIsCorrect = _ref.setIsCorrect,\n setIncorrectAnswer = _ref.setIncorrectAnswer,\n setCorrect = _ref.setCorrect,\n setIncorrect = _ref.setIncorrect,\n setShowNextQuestionButton = _ref.setShowNextQuestionButton,\n setUserInput = _ref.setUserInput,\n setUserAttempt = _ref.setUserAttempt;\n var indexStr = "".concat(index);\n var disabledAll = {\n 0: {\n disabled: true\n },\n 1: {\n disabled: true\n },\n 2: {\n disabled: true\n },\n 3: {\n disabled: true\n }\n };\n var userInputCopy = _toConsumableArray(userInput);\n if (answerSelectionType === \'single\') {\n if (userInputCopy[currentQuestionIndex] === undefined) {\n userInputCopy[currentQuestionIndex] = index;\n }\n if (indexStr === correctAnswer) {\n if (incorrect.indexOf(currentQuestionIndex) < 0 && correct.indexOf(currentQuestionIndex) < 0) {\n correct.push(currentQuestionIndex);\n }\n setButtons(function (prevState) {\n return _objectSpread(_objectSpread(_objectSpread({}, prevState), disabledAll), {}, _defineProperty({}, index - 1, {\n className: indexStr === correctAnswer ? \'correct\' : \'incorrect\'\n }));\n });\n setIsCorrect(true);\n setIncorrectAnswer(false);\n setCorrect(correct);\n setShowNextQuestionButton(true);\n } else {\n if (correct.indexOf(currentQuestionIndex) < 0 && incorrect.indexOf(currentQuestionIndex) < 0) {\n incorrect.push(currentQuestionIndex);\n }\n if (continueTillCorrect) {\n setButtons(function (prevState) {\n return _objectSpread(_objectSpread({}, prevState), {}, _defineProperty({}, index - 1, {\n disabled: !prevState[index - 1]\n }));\n });\n } else {\n setButtons(function (prevState) {\n return _objectSpread(_objectSpread(_objectSpread({}, prevState), disabledAll), {}, _defineProperty({}, index - 1, {\n className: indexStr === correctAnswer ? \'correct\' : \'incorrect\'\n }));\n });\n setShowNextQuestionButton(true);\n }\n setIncorrectAnswer(true);\n setIsCorrect(false);\n setIncorrect(incorrect);\n }\n } else {\n var maxNumberOfMultipleSelection = correctAnswer.length;\n if (userInputCopy[currentQuestionIndex] === undefined) {\n userInputCopy[currentQuestionIndex] = [];\n }\n if (userInputCopy[currentQuestionIndex].length < maxNumberOfMultipleSelection) {\n userInputCopy[currentQuestionIndex].push(index);\n if (correctAnswer.includes(index)) {\n if (userInputCopy[currentQuestionIndex].length <= maxNumberOfMultipleSelection) {\n setButtons(function (prevState) {\n return _objectSpread(_objectSpread({}, prevState), {}, _defineProperty({}, index - 1, {\n disabled: !prevState[index - 1],\n className: correctAnswer.includes(index) ? \'correct\' : \'incorrect\'\n }));\n });\n }\n } else if (userInputCopy[currentQuestionIndex].length <= maxNumberOfMultipleSelection) {\n setButtons(function (prevState) {\n return _objectSpread(_objectSpread({}, prevState), {}, _defineProperty({}, index - 1, {\n className: correctAnswer.includes(index) ? \'correct\' : \'incorrect\'\n }));\n });\n }\n }\n if (maxNumberOfMultipleSelection === userAttempt) {\n var cnt = 0;\n for (var i = 0; i < correctAnswer.length; i += 1) {\n if (userInputCopy[currentQuestionIndex].includes(correctAnswer[i])) {\n cnt += 1;\n }\n }\n var _loop = function _loop(_i) {\n if (correctAnswer.includes(_i + 1)) {\n setButtons(function (prevState) {\n return _objectSpread(_objectSpread({}, prevState), {}, _defineProperty({}, _i, {}));\n });\n }\n };\n for (var _i = 0; _i < answers.length; _i += 1) {\n _loop(_i);\n }\n if (cnt === maxNumberOfMultipleSelection) {\n correct.push(currentQuestionIndex);\n setIsCorrect(true);\n setIncorrectAnswer(false);\n setCorrect(correct);\n setShowNextQuestionButton(true);\n setUserAttempt(1);\n } else {\n incorrect.push(currentQuestionIndex);\n setIncorrectAnswer(true);\n setIsCorrect(false);\n setIncorrect(incorrect);\n setShowNextQuestionButton(true);\n setUserAttempt(1);\n }\n } else if (!showNextQuestionButton) {\n setUserAttempt(userAttempt + 1);\n }\n }\n setUserInput(userInputCopy);\n};\nvar selectAnswer = function selectAnswer(index, correctAnswer, answerSelectionType, _ref2) {\n var userInput = _ref2.userInput,\n currentQuestionIndex = _ref2.currentQuestionIndex,\n setButtons = _ref2.setButtons,\n setShowNextQuestionButton = _ref2.setShowNextQuestionButton,\n incorrect = _ref2.incorrect,\n correct = _ref2.correct,\n setCorrect = _ref2.setCorrect,\n setIncorrect = _ref2.setIncorrect,\n setUserInput = _ref2.setUserInput;\n var selectedButtons = {\n 0: {\n selected: false\n },\n 1: {\n selected: false\n },\n 2: {\n selected: false\n },\n 3: {\n selected: false\n }\n };\n var userInputCopy = _toConsumableArray(userInput);\n if (answerSelectionType === \'single\') {\n correctAnswer = Number(correctAnswer);\n userInputCopy[currentQuestionIndex] = index;\n if (index === correctAnswer) {\n if (correct.indexOf(currentQuestionIndex) < 0) {\n correct.push(currentQuestionIndex);\n }\n if (incorrect.indexOf(currentQuestionIndex) >= 0) {\n incorrect.splice(incorrect.indexOf(currentQuestionIndex), 1);\n }\n } else {\n if (incorrect.indexOf(currentQuestionIndex) < 0) {\n incorrect.push(currentQuestionIndex);\n }\n if (correct.indexOf(currentQuestionIndex) >= 0) {\n correct.splice(correct.indexOf(currentQuestionIndex), 1);\n }\n }\n setCorrect(correct);\n setIncorrect(incorrect);\n setButtons(function (prevState) {\n return _objectSpread(_objectSpread(_objectSpread({}, prevState), selectedButtons), {}, _defineProperty({}, index - 1, {\n className: \'selected\'\n }));\n });\n setShowNextQuestionButton(true);\n } else {\n if (userInputCopy[currentQuestionIndex] === undefined) {\n userInputCopy[currentQuestionIndex] = [];\n }\n if (userInputCopy[currentQuestionIndex].includes(index)) {\n userInputCopy[currentQuestionIndex].splice(userInputCopy[currentQuestionIndex].indexOf(index), 1);\n } else {\n userInputCopy[currentQuestionIndex].push(index);\n }\n if (userInputCopy[currentQuestionIndex].length === correctAnswer.length) {\n var exactMatch = true;\n // eslint-disable-next-line no-restricted-syntax\n var _iterator = _createForOfIteratorHelper(userInput[currentQuestionIndex]),\n _step;\n try {\n for (_iterator.s(); !(_step = _iterator.n()).done;) {\n var input = _step.value;\n if (!correctAnswer.includes(input)) {\n exactMatch = false;\n if (incorrect.indexOf(currentQuestionIndex) < 0) {\n incorrect.push(currentQuestionIndex);\n }\n if (correct.indexOf(currentQuestionIndex) >= 0) {\n correct.splice(correct.indexOf(currentQuestionIndex), 1);\n }\n break;\n }\n }\n } catch (err) {\n _iterator.e(err);\n } finally {\n _iterator.f();\n }\n if (exactMatch) {\n if (correct.indexOf(currentQuestionIndex) < 0) {\n correct.push(currentQuestionIndex);\n }\n if (incorrect.indexOf(currentQuestionIndex) >= 0) {\n incorrect.splice(incorrect.indexOf(currentQuestionIndex), 1);\n }\n }\n } else {\n if (incorrect.indexOf(currentQuestionIndex) < 0) {\n incorrect.push(currentQuestionIndex);\n }\n if (correct.indexOf(currentQuestionIndex) >= 0) {\n correct.splice(correct.indexOf(currentQuestionIndex), 1);\n }\n }\n setCorrect(correct);\n setIncorrect(incorrect);\n setButtons(function (prevState) {\n return _objectSpread(_objectSpread({}, prevState), {}, _defineProperty({}, index - 1, {\n className: userInputCopy[currentQuestionIndex].includes(index) ? \'selected\' : undefined\n }));\n });\n if (userInputCopy[currentQuestionIndex].length > 0) {\n setShowNextQuestionButton(true);\n }\n }\n setUserInput(userInputCopy);\n};\n;// CONCATENATED MODULE: ./src/lib/core-components/Explanation.jsx\n\nfunction Explanation(_ref) {\n var question = _ref.question,\n isResultPage = _ref.isResultPage;\n var explanation = question.explanation;\n if (!explanation) {\n return null;\n }\n if (isResultPage) {\n return /*#__PURE__*/react.createElement("div", {\n className: "explanation"\n }, explanation);\n }\n return /*#__PURE__*/react.createElement("div", null, /*#__PURE__*/react.createElement("br", null), explanation);\n}\n/* harmony default export */ const core_components_Explanation = (Explanation);\n;// CONCATENATED MODULE: ./src/lib/core-components/InstantFeedback.jsx\n\n\nvar renderMessageForCorrectAnswer = function renderMessageForCorrectAnswer(question) {\n var defaultMessage = \'You are correct. Please click Next to continue.\';\n return question.messageForCorrectAnswer || defaultMessage;\n};\nvar renderMessageForIncorrectAnswer = function renderMessageForIncorrectAnswer(question) {\n var defaultMessage = \'Incorrect answer. Please try again.\';\n return question.messageForIncorrectAnswer || defaultMessage;\n};\nfunction InstantFeedback(_ref) {\n var showInstantFeedback = _ref.showInstantFeedback,\n incorrectAnswer = _ref.incorrectAnswer,\n correctAnswer = _ref.correctAnswer,\n question = _ref.question,\n onQuestionSubmit = _ref.onQuestionSubmit,\n userAnswer = _ref.userAnswer;\n (0,react.useEffect)(function () {\n if (onQuestionSubmit && (correctAnswer || incorrectAnswer)) {\n onQuestionSubmit({\n question: question,\n userAnswer: userAnswer,\n isCorrect: correctAnswer\n });\n }\n }, [correctAnswer, incorrectAnswer]);\n return /*#__PURE__*/react.createElement(react.Fragment, null, incorrectAnswer && showInstantFeedback && /*#__PURE__*/react.createElement("div", {\n className: "alert incorrect"\n }, renderMessageForIncorrectAnswer(question)), correctAnswer && showInstantFeedback && /*#__PURE__*/react.createElement("div", {\n className: "alert correct"\n }, renderMessageForCorrectAnswer(question), /*#__PURE__*/react.createElement(core_components_Explanation, {\n question: question,\n isResultPage: false\n })));\n}\n/* harmony default export */ const core_components_InstantFeedback = (InstantFeedback);\n;// CONCATENATED MODULE: ./src/lib/Core.jsx\nfunction Core_toConsumableArray(arr) { return Core_arrayWithoutHoles(arr) || Core_iterableToArray(arr) || Core_unsupportedIterableToArray(arr) || Core_nonIterableSpread(); }\nfunction Core_nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }\nfunction Core_iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }\nfunction Core_arrayWithoutHoles(arr) { if (Array.isArray(arr)) return Core_arrayLikeToArray(arr); }\nfunction Core_typeof(o) { "@babel/helpers - typeof"; return Core_typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, Core_typeof(o); }\nfunction Core_slicedToArray(arr, i) { return Core_arrayWithHoles(arr) || Core_iterableToArrayLimit(arr, i) || Core_unsupportedIterableToArray(arr, i) || Core_nonIterableRest(); }\nfunction Core_nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }\nfunction Core_unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return Core_arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return Core_arrayLikeToArray(o, minLen); }\nfunction Core_arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }\nfunction Core_iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t["return"] && (u = t["return"](), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }\nfunction Core_arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }\n\n\n\n\n\n\nfunction Core(_ref) {\n var questions = _ref.questions,\n appLocale = _ref.appLocale,\n showDefaultResult = _ref.showDefaultResult,\n onComplete = _ref.onComplete,\n customResultPage = _ref.customResultPage,\n showInstantFeedback = _ref.showInstantFeedback,\n continueTillCorrect = _ref.continueTillCorrect,\n revealAnswerOnSubmit = _ref.revealAnswerOnSubmit,\n allowNavigation = _ref.allowNavigation,\n onQuestionSubmit = _ref.onQuestionSubmit;\n var _useState = (0,react.useState)(false),\n _useState2 = Core_slicedToArray(_useState, 2),\n incorrectAnswer = _useState2[0],\n setIncorrectAnswer = _useState2[1];\n var _useState3 = (0,react.useState)(false),\n _useState4 = Core_slicedToArray(_useState3, 2),\n isCorrect = _useState4[0],\n setIsCorrect = _useState4[1];\n var _useState5 = (0,react.useState)(false),\n _useState6 = Core_slicedToArray(_useState5, 2),\n showNextQuestionButton = _useState6[0],\n setShowNextQuestionButton = _useState6[1];\n var _useState7 = (0,react.useState)(false),\n _useState8 = Core_slicedToArray(_useState7, 2),\n endQuiz = _useState8[0],\n setEndQuiz = _useState8[1];\n var _useState9 = (0,react.useState)(0),\n _useState10 = Core_slicedToArray(_useState9, 2),\n currentQuestionIndex = _useState10[0],\n setCurrentQuestionIndex = _useState10[1];\n var _useState11 = (0,react.useState)({}),\n _useState12 = Core_slicedToArray(_useState11, 2),\n buttons = _useState12[0],\n setButtons = _useState12[1];\n var _useState13 = (0,react.useState)([]),\n _useState14 = Core_slicedToArray(_useState13, 2),\n correct = _useState14[0],\n setCorrect = _useState14[1];\n var _useState15 = (0,react.useState)([]),\n _useState16 = Core_slicedToArray(_useState15, 2),\n incorrect = _useState16[0],\n setIncorrect = _useState16[1];\n var _useState17 = (0,react.useState)([]),\n _useState18 = Core_slicedToArray(_useState17, 2),\n userInput = _useState18[0],\n setUserInput = _useState18[1];\n var _useState19 = (0,react.useState)(\'all\'),\n _useState20 = Core_slicedToArray(_useState19, 2),\n filteredValue = _useState20[0],\n setFilteredValue = _useState20[1];\n var _useState21 = (0,react.useState)(1),\n _useState22 = Core_slicedToArray(_useState21, 2),\n userAttempt = _useState22[0],\n setUserAttempt = _useState22[1];\n var _useState23 = (0,react.useState)(true),\n _useState24 = Core_slicedToArray(_useState23, 2),\n showDefaultResultState = _useState24[0],\n setShowDefaultResult = _useState24[1];\n var _useState25 = (0,react.useState)(undefined),\n _useState26 = Core_slicedToArray(_useState25, 2),\n answerSelectionTypeState = _useState26[0],\n setAnswerSelectionType = _useState26[1];\n var _useState27 = (0,react.useState)(0),\n _useState28 = Core_slicedToArray(_useState27, 2),\n totalPoints = _useState28[0],\n setTotalPoints = _useState28[1];\n var _useState29 = (0,react.useState)(0),\n _useState30 = Core_slicedToArray(_useState29, 2),\n correctPoints = _useState30[0],\n setCorrectPoints = _useState30[1];\n var _useState31 = (0,react.useState)(questions[currentQuestionIndex]),\n _useState32 = Core_slicedToArray(_useState31, 2),\n activeQuestion = _useState32[0],\n setActiveQuestion = _useState32[1];\n var _useState33 = (0,react.useState)(undefined),\n _useState34 = Core_slicedToArray(_useState33, 2),\n questionSummary = _useState34[0],\n setQuestionSummary = _useState34[1];\n (0,react.useEffect)(function () {\n setShowDefaultResult(showDefaultResult !== undefined ? showDefaultResult : true);\n }, [showDefaultResult]);\n (0,react.useEffect)(function () {\n setActiveQuestion(questions[currentQuestionIndex]);\n }, [currentQuestionIndex, questions]);\n (0,react.useEffect)(function () {\n var answerSelectionType = activeQuestion.answerSelectionType;\n // Default single to avoid code breaking due to automatic version upgrade\n setAnswerSelectionType(answerSelectionType || \'single\');\n }, [activeQuestion, currentQuestionIndex]);\n (0,react.useEffect)(function () {\n if (endQuiz) {\n var totalPointsTemp = 0;\n var correctPointsTemp = 0;\n for (var i = 0; i < questions.length; i += 1) {\n var point = questions[i].point || 0;\n if (typeof point === \'string\' || point instanceof String) {\n point = parseInt(point, 10);\n }\n totalPointsTemp += point;\n if (correct.includes(i)) {\n correctPointsTemp += point;\n }\n }\n setTotalPoints(totalPointsTemp);\n setCorrectPoints(correctPointsTemp);\n }\n }, [endQuiz]);\n (0,react.useEffect)(function () {\n setQuestionSummary({\n numberOfQuestions: questions.length,\n numberOfCorrectAnswers: correct.length,\n numberOfIncorrectAnswers: incorrect.length,\n questions: questions,\n userInput: userInput,\n totalPoints: totalPoints,\n correctPoints: correctPoints\n });\n }, [totalPoints, correctPoints]);\n (0,react.useEffect)(function () {\n if (endQuiz && onComplete !== undefined && questionSummary !== undefined) {\n onComplete(questionSummary);\n }\n }, [questionSummary]);\n var nextQuestion = function nextQuestion(currentQuestionIdx) {\n setIncorrectAnswer(false);\n setIsCorrect(false);\n setShowNextQuestionButton(false);\n setButtons({});\n if (currentQuestionIdx + 1 === questions.length) {\n if (userInput.length !== questions.length) {\n alert(\'Quiz is incomplete\');\n } else if (allowNavigation) {\n var submitQuiz = confirm(\'You have finished all the questions. Submit Quiz now?\');\n if (submitQuiz) {\n setEndQuiz(true);\n }\n } else {\n setEndQuiz(true);\n }\n } else {\n setCurrentQuestionIndex(currentQuestionIdx + 1);\n }\n };\n var handleChange = function handleChange(event) {\n setFilteredValue(event.target.value);\n };\n var renderAnswerInResult = function renderAnswerInResult(question, userInputIndex) {\n var answers = question.answers,\n correctAnswer = question.correctAnswer,\n questionType = question.questionType;\n var answerSelectionType = question.answerSelectionType;\n var answerBtnCorrectClassName;\n var answerBtnIncorrectClassName;\n\n // Default single to avoid code breaking due to automatic version upgrade\n answerSelectionType = answerSelectionType || \'single\';\n return answers.map(function (answer, index) {\n if (answerSelectionType === \'single\') {\n // correctAnswer - is string\n answerBtnCorrectClassName = "".concat(index + 1) === correctAnswer ? \'correct\' : \'\';\n answerBtnIncorrectClassName = "".concat(userInputIndex) !== correctAnswer && "".concat(index + 1) === "".concat(userInputIndex) ? \'incorrect\' : \'\';\n } else {\n // correctAnswer - is array of numbers\n answerBtnCorrectClassName = correctAnswer.includes(index + 1) ? \'correct\' : \'\';\n answerBtnIncorrectClassName = !correctAnswer.includes(index + 1) && userInputIndex.includes(index + 1) ? \'incorrect\' : \'\';\n }\n return /*#__PURE__*/react.createElement("div", {\n key: esm_browser_v4()\n }, /*#__PURE__*/react.createElement("button", {\n type: "button",\n disabled: true,\n className: "answerBtn btn ".concat(answerBtnCorrectClassName).concat(answerBtnIncorrectClassName)\n }, questionType === \'text\' && /*#__PURE__*/react.createElement("span", null, answer), questionType === \'photo\' && /*#__PURE__*/react.createElement("img", {\n src: answer,\n alt: "answer"\n })));\n });\n };\n var renderTags = function renderTags(answerSelectionType, numberOfSelection, segment) {\n var singleSelectionTagText = appLocale.singleSelectionTagText,\n multipleSelectionTagText = appLocale.multipleSelectionTagText,\n pickNumberOfSelection = appLocale.pickNumberOfSelection;\n return /*#__PURE__*/react.createElement("div", {\n className: "tag-container"\n }, answerSelectionType === \'single\' && /*#__PURE__*/react.createElement("span", {\n className: "single selection-tag"\n }, singleSelectionTagText), answerSelectionType === \'multiple\' && /*#__PURE__*/react.createElement("span", {\n className: "multiple selection-tag"\n }, multipleSelectionTagText), /*#__PURE__*/react.createElement("span", {\n className: "number-of-selection"\n }, pickNumberOfSelection.replace(\'\', numberOfSelection)), segment && /*#__PURE__*/react.createElement("span", {\n className: "selection-tag segment"\n }, segment));\n };\n var isCorrectCheck = function isCorrectCheck(index, correctAnswerIndex) {\n if (typeof correctAnswerIndex === \'string\') {\n return index === Number(correctAnswerIndex);\n }\n if (Core_typeof(correctAnswerIndex) === \'object\') {\n return correctAnswerIndex.find(function (element) {\n return element === index;\n }) !== undefined;\n }\n return false;\n };\n var renderQuizResultQuestions = (0,react.useCallback)(function () {\n var filteredQuestions;\n var filteredUserInput;\n if (filteredValue !== \'all\') {\n if (filteredValue === \'correct\') {\n filteredQuestions = questions.filter(function (question, index) {\n return correct.indexOf(index) !== -1;\n });\n filteredUserInput = userInput.filter(function (input, index) {\n return correct.indexOf(index) !== -1;\n });\n } else {\n filteredQuestions = questions.filter(function (question, index) {\n return incorrect.indexOf(index) !== -1;\n });\n filteredUserInput = userInput.filter(function (input, index) {\n return incorrect.indexOf(index) !== -1;\n });\n }\n }\n return (filteredQuestions || questions).map(function (question, index) {\n var userInputIndex = filteredUserInput ? filteredUserInput[index] : userInput[index];\n\n // Default single to avoid code breaking due to automatic version upgrade\n var answerSelectionType = question.answerSelectionType || \'single\';\n return /*#__PURE__*/react.createElement("div", {\n className: "result-answer-wrapper",\n key: esm_browser_v4()\n }, /*#__PURE__*/react.createElement("h3", {\n dangerouslySetInnerHTML: rawMarkup("Q".concat(question.questionIndex, ": ").concat(question.question, " ").concat(appLocale.marksOfQuestion.replace(\'\', question.point)))\n }), question.questionPic && /*#__PURE__*/react.createElement("img", {\n src: question.questionPic,\n alt: "question"\n }), renderTags(answerSelectionType, question.correctAnswer.length, question.segment), /*#__PURE__*/react.createElement("div", {\n className: "result-answer"\n }, renderAnswerInResult(question, userInputIndex)), /*#__PURE__*/react.createElement(core_components_Explanation, {\n question: question,\n isResultPage: true\n }));\n });\n }, [endQuiz, filteredValue]);\n var renderAnswers = function renderAnswers(question, answerButtons) {\n var answers = question.answers,\n correctAnswer = question.correctAnswer,\n questionType = question.questionType,\n questionIndex = question.questionIndex;\n var answerSelectionType = question.answerSelectionType;\n var onClickAnswer = function onClickAnswer(index) {\n return checkAnswer(index + 1, correctAnswer, answerSelectionType, answers, {\n userInput: userInput,\n userAttempt: userAttempt,\n currentQuestionIndex: currentQuestionIndex,\n continueTillCorrect: continueTillCorrect,\n showNextQuestionButton: showNextQuestionButton,\n incorrect: incorrect,\n correct: correct,\n setButtons: setButtons,\n setIsCorrect: setIsCorrect,\n setIncorrectAnswer: setIncorrectAnswer,\n setCorrect: setCorrect,\n setIncorrect: setIncorrect,\n setShowNextQuestionButton: setShowNextQuestionButton,\n setUserInput: setUserInput,\n setUserAttempt: setUserAttempt\n });\n };\n var onSelectAnswer = function onSelectAnswer(index) {\n return selectAnswer(index + 1, correctAnswer, answerSelectionType, {\n userInput: userInput,\n currentQuestionIndex: currentQuestionIndex,\n setButtons: setButtons,\n setShowNextQuestionButton: setShowNextQuestionButton,\n incorrect: incorrect,\n correct: correct,\n setCorrect: setCorrect,\n setIncorrect: setIncorrect,\n setUserInput: setUserInput\n });\n };\n var checkSelectedAnswer = function checkSelectedAnswer(index) {\n if (userInput[questionIndex - 1] === undefined) {\n return false;\n }\n if (answerSelectionType === \'single\') {\n return userInput[questionIndex - 1] === index;\n }\n return Array.isArray(userInput[questionIndex - 1]) && userInput[questionIndex - 1].includes(index);\n };\n\n // Default single to avoid code breaking due to automatic version upgrade\n answerSelectionType = answerSelectionType || \'single\';\n return answers.map(function (answer, index) {\n return /*#__PURE__*/react.createElement(react.Fragment, {\n key: esm_browser_v4()\n }, answerButtons[index] !== undefined ? /*#__PURE__*/react.createElement("button", {\n type: "button",\n disabled: answerButtons[index].disabled || false,\n className: "".concat(answerButtons[index].className, " answerBtn btn ").concat(isCorrectCheck(index + 1, correctAnswer) && showInstantFeedback ? \'correct\' : \'\'),\n onClick: function onClick() {\n return revealAnswerOnSubmit ? onSelectAnswer(index) : onClickAnswer(index);\n }\n }, questionType === \'text\' && /*#__PURE__*/react.createElement("span", null, answer), questionType === \'photo\' && /*#__PURE__*/react.createElement("img", {\n src: answer,\n alt: "answer"\n })) : /*#__PURE__*/react.createElement("button", {\n type: "button",\n onClick: function onClick() {\n return revealAnswerOnSubmit ? onSelectAnswer(index) : onClickAnswer(index);\n },\n className: "answerBtn btn ".concat(allowNavigation && checkSelectedAnswer(index + 1) ? \'selected\' : null)\n }, questionType === \'text\' && answer, questionType === \'photo\' && /*#__PURE__*/react.createElement("img", {\n src: answer,\n alt: "answer"\n })));\n });\n };\n var renderResult = function renderResult() {\n return /*#__PURE__*/react.createElement("div", {\n className: "card-body"\n }, /*#__PURE__*/react.createElement("h2", null, appLocale.resultPageHeaderText.replace(\'\', correct.length).replace(\'\', questions.length)), /*#__PURE__*/react.createElement("h2", null, appLocale.resultPagePoint.replace(\'\', correctPoints).replace(\'\', totalPoints)), /*#__PURE__*/react.createElement("br", null), /*#__PURE__*/react.createElement(core_components_QuizResultFilter, {\n filteredValue: filteredValue,\n handleChange: handleChange,\n appLocale: appLocale\n }), renderQuizResultQuestions());\n };\n return /*#__PURE__*/react.createElement("div", {\n className: "questionWrapper"\n }, !endQuiz && /*#__PURE__*/react.createElement("div", {\n className: "questionWrapperBody"\n }, /*#__PURE__*/react.createElement("div", {\n className: "questionModal"\n }, /*#__PURE__*/react.createElement(core_components_InstantFeedback, {\n question: activeQuestion,\n showInstantFeedback: showInstantFeedback,\n correctAnswer: isCorrect,\n incorrectAnswer: incorrectAnswer,\n onQuestionSubmit: onQuestionSubmit,\n userAnswer: Core_toConsumableArray(userInput).pop()\n })), /*#__PURE__*/react.createElement("div", null, "".concat(appLocale.question, " ").concat(currentQuestionIndex + 1, " / ").concat(questions.length, ":")), /*#__PURE__*/react.createElement("h3", {\n dangerouslySetInnerHTML: rawMarkup("".concat(activeQuestion && activeQuestion.question, " ").concat(appLocale.marksOfQuestion.replace(\'\', activeQuestion.point)))\n }), activeQuestion && activeQuestion.questionPic && /*#__PURE__*/react.createElement("img", {\n src: activeQuestion.questionPic,\n alt: "question"\n }), activeQuestion && renderTags(answerSelectionTypeState, activeQuestion.correctAnswer.length, activeQuestion.segment), activeQuestion && renderAnswers(activeQuestion, buttons), (showNextQuestionButton || allowNavigation) && /*#__PURE__*/react.createElement("div", {\n className: "questionBtnContainer"\n }, allowNavigation && currentQuestionIndex > 0 && /*#__PURE__*/react.createElement("button", {\n onClick: function onClick() {\n return nextQuestion(currentQuestionIndex - 2);\n },\n className: "prevQuestionBtn btn",\n type: "button"\n }, appLocale.prevQuestionBtn), /*#__PURE__*/react.createElement("button", {\n onClick: function onClick() {\n return nextQuestion(currentQuestionIndex);\n },\n className: "nextQuestionBtn btn",\n type: "button"\n }, appLocale.nextQuestionBtn))), endQuiz && showDefaultResultState && customResultPage === undefined && renderResult(), endQuiz && !showDefaultResultState && customResultPage !== undefined && customResultPage(questionSummary));\n}\n/* harmony default export */ const lib_Core = (Core);\n;// CONCATENATED MODULE: ./src/lib/Locale.jsx\nvar defaultLocale = {\n landingHeaderText: \' Questions\',\n question: \'Question\',\n startQuizBtn: \'Start Quiz\',\n resultFilterAll: \'All\',\n resultFilterCorrect: \'Correct\',\n resultFilterIncorrect: \'Incorrect\',\n nextQuestionBtn: \'Next\',\n prevQuestionBtn: \'Prev\',\n resultPageHeaderText: \'You have completed the quiz. You got out of questions.\',\n resultPagePoint: \'You scored out of .\',\n singleSelectionTagText: \'Single Selection\',\n multipleSelectionTagText: \'Multiple Selection\',\n pickNumberOfSelection: \'Pick \',\n marksOfQuestion: \'( marks)\'\n};\n/* harmony default export */ const Locale = (defaultLocale);\n;// CONCATENATED MODULE: ./src/lib/Quiz.jsx\nfunction Quiz_typeof(o) { "@babel/helpers - typeof"; return Quiz_typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, Quiz_typeof(o); }\nfunction Quiz_ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }\nfunction Quiz_objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? Quiz_ownKeys(Object(t), !0).forEach(function (r) { Quiz_defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : Quiz_ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }\nfunction Quiz_defineProperty(obj, key, value) { key = Quiz_toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\nfunction Quiz_toPropertyKey(arg) { var key = Quiz_toPrimitive(arg, "string"); return Quiz_typeof(key) === "symbol" ? key : String(key); }\nfunction Quiz_toPrimitive(input, hint) { if (Quiz_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (Quiz_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }\nfunction Quiz_slicedToArray(arr, i) { return Quiz_arrayWithHoles(arr) || Quiz_iterableToArrayLimit(arr, i) || Quiz_unsupportedIterableToArray(arr, i) || Quiz_nonIterableRest(); }\nfunction Quiz_nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }\nfunction Quiz_unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return Quiz_arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return Quiz_arrayLikeToArray(o, minLen); }\nfunction Quiz_arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }\nfunction Quiz_iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t["return"] && (u = t["return"](), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }\nfunction Quiz_arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }\n\n\n\n\nfunction Quiz(_ref) {\n var quiz = _ref.quiz,\n shuffle = _ref.shuffle,\n shuffleAnswer = _ref.shuffleAnswer,\n showDefaultResult = _ref.showDefaultResult,\n onComplete = _ref.onComplete,\n customResultPage = _ref.customResultPage,\n showInstantFeedback = _ref.showInstantFeedback,\n continueTillCorrect = _ref.continueTillCorrect,\n revealAnswerOnSubmit = _ref.revealAnswerOnSubmit,\n allowNavigation = _ref.allowNavigation,\n onQuestionSubmit = _ref.onQuestionSubmit,\n disableSynopsis = _ref.disableSynopsis;\n var _useState = (0,react.useState)(false),\n _useState2 = Quiz_slicedToArray(_useState, 2),\n start = _useState2[0],\n setStart = _useState2[1];\n var _useState3 = (0,react.useState)(quiz.questions),\n _useState4 = Quiz_slicedToArray(_useState3, 2),\n questions = _useState4[0],\n setQuestions = _useState4[1];\n var nrOfQuestions = quiz.nrOfQuestions && quiz.nrOfQuestions < quiz.questions.length ? quiz.nrOfQuestions : quiz.questions.length;\n\n // Shuffle answers funtion here\n var shuffleAnswerSequence = function shuffleAnswerSequence() {\n var oldQuestions = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];\n var newQuestions = oldQuestions.map(function (question) {\n var _question$answers;\n var answerWithIndex = (_question$answers = question.answers) === null || _question$answers === void 0 ? void 0 : _question$answers.map(function (ans, i) {\n return [ans, i];\n });\n var shuffledAnswersWithIndex = answerWithIndex.sort(function () {\n return Math.random() - 0.5;\n });\n var shuffledAnswers = shuffledAnswersWithIndex.map(function (ans) {\n return ans[0];\n });\n if (question.answerSelectionType === \'single\') {\n var oldCorrectAnswer = question.correctAnswer;\n var newCorrectAnswer = shuffledAnswersWithIndex.findIndex(function (ans) {\n return "".concat(ans[1] + 1) === "".concat(oldCorrectAnswer);\n }) + 1;\n return Quiz_objectSpread(Quiz_objectSpread({}, question), {}, {\n correctAnswer: "".concat(newCorrectAnswer),\n answers: shuffledAnswers\n });\n }\n if (question.answerSelectionType === \'multiple\') {\n var _oldCorrectAnswer = question.correctAnswer;\n var _newCorrectAnswer = _oldCorrectAnswer.map(function (cans) {\n return shuffledAnswersWithIndex.findIndex(function (ans) {\n return "".concat(ans[1] + 1) === "".concat(cans);\n }) + 1;\n });\n return Quiz_objectSpread(Quiz_objectSpread({}, question), {}, {\n correctAnswer: _newCorrectAnswer,\n answers: shuffledAnswers\n });\n }\n return question;\n });\n return newQuestions;\n };\n var shuffleQuestions = (0,react.useCallback)(function (q) {\n for (var i = q.length - 1; i > 0; i -= 1) {\n var j = Math.floor(Math.random() * (i + 1));\n var _ref2 = [q[j], q[i]];\n q[i] = _ref2[0];\n q[j] = _ref2[1];\n }\n return q;\n }, []);\n (0,react.useEffect)(function () {\n if (disableSynopsis) setStart(true);\n }, []);\n (0,react.useEffect)(function () {\n var newQuestions = quiz.questions;\n if (shuffle) {\n newQuestions = shuffleQuestions(newQuestions);\n }\n if (shuffleAnswer) {\n newQuestions = shuffleAnswerSequence(newQuestions);\n }\n newQuestions.length = nrOfQuestions;\n newQuestions = newQuestions.map(function (question, index) {\n return Quiz_objectSpread(Quiz_objectSpread({}, question), {}, {\n questionIndex: index + 1\n });\n });\n setQuestions(newQuestions);\n }, [start]);\n var validateQuiz = function validateQuiz(q) {\n if (!q) {\n console.error(\'Quiz object is required.\');\n return false;\n }\n for (var i = 0; i < questions.length; i += 1) {\n var _questions$i = questions[i],\n question = _questions$i.question,\n questionType = _questions$i.questionType,\n answerSelectionType = _questions$i.answerSelectionType,\n answers = _questions$i.answers,\n correctAnswer = _questions$i.correctAnswer;\n if (!question) {\n console.error("Field \'question\' is required.");\n return false;\n }\n if (!questionType) {\n console.error("Field \'questionType\' is required.");\n return false;\n }\n if (questionType !== \'text\' && questionType !== \'photo\') {\n console.error("The value of \'questionType\' is either \'text\' or \'photo\'.");\n return false;\n }\n if (!answers) {\n console.error("Field \'answers\' is required.");\n return false;\n }\n if (!Array.isArray(answers)) {\n console.error("Field \'answers\' has to be an Array");\n return false;\n }\n if (!correctAnswer) {\n console.error("Field \'correctAnswer\' is required.");\n return false;\n }\n var selectType = answerSelectionType;\n if (!answerSelectionType) {\n // Default single to avoid code breaking due to automatic version upgrade\n console.warn(\'Field answerSelectionType should be defined since v0.3.0. Use single by default.\');\n selectType = answerSelectionType || \'single\';\n }\n if (selectType === \'single\' && !(typeof selectType === \'string\' || selectType instanceof String)) {\n console.error(\'answerSelectionType is single but expecting String in the field correctAnswer\');\n return false;\n }\n if (selectType === \'multiple\' && !Array.isArray(correctAnswer)) {\n console.error(\'answerSelectionType is multiple but expecting Array in the field correctAnswer\');\n return false;\n }\n }\n return true;\n };\n if (!validateQuiz(quiz)) {\n return null;\n }\n var appLocale = Quiz_objectSpread(Quiz_objectSpread({}, Locale), quiz.appLocale);\n return /*#__PURE__*/react.createElement("div", {\n className: "react-quiz-container"\n }, !start && /*#__PURE__*/react.createElement("div", null, /*#__PURE__*/react.createElement("h2", null, quiz.quizTitle), /*#__PURE__*/react.createElement("div", null, appLocale.landingHeaderText.replace(\'\', nrOfQuestions)), quiz.quizSynopsis && /*#__PURE__*/react.createElement("div", {\n className: "quiz-synopsis"\n }, quiz.quizSynopsis), /*#__PURE__*/react.createElement("div", {\n className: "startQuizWrapper"\n }, /*#__PURE__*/react.createElement("button", {\n type: "button",\n onClick: function onClick() {\n return setStart(true);\n },\n className: "startQuizBtn btn"\n }, appLocale.startQuizBtn))), start && /*#__PURE__*/react.createElement(lib_Core, {\n questions: questions,\n showDefaultResult: showDefaultResult,\n onComplete: onComplete,\n customResultPage: customResultPage,\n showInstantFeedback: showInstantFeedback,\n continueTillCorrect: continueTillCorrect,\n revealAnswerOnSubmit: revealAnswerOnSubmit,\n allowNavigation: allowNavigation,\n appLocale: appLocale,\n onQuestionSubmit: onQuestionSubmit\n }));\n}\n/* harmony default export */ const lib_Quiz = (Quiz);\n;// CONCATENATED MODULE: ./src/docs/quiz.jsx\nvar segment = {\n basic: \'Basic\',\n medium: \'Medium\',\n advanced: \'Advanced\'\n};\nvar quiz = {\n quizTitle: \'React Quiz Component Demo\',\n quizSynopsis: \'Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Aenean commodo ligula eget dolor. Aenean massa. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Donec quam felis, ultricies nec, pellentesque eu, pretium quis, sem. Nulla consequat massa quis enim\',\n nrOfQuestions: \'6\',\n questions: [{\n question: \'How can you access the state of a component from inside of a member function?\',\n questionPic: \'https://dummyimage.com/600x400/000/fff&text=X\',\n questionType: \'text\',\n answerSelectionType: \'single\',\n answers: [\'this.getState()\', \'this.prototype.stateValue\', \'this.state\', \'this.values\'],\n correctAnswer: \'3\',\n messageForCorrectAnswer: \'Correct answer. Good job.\',\n messageForIncorrectAnswer: \'Incorrect answer. Please try again.\',\n explanation: \'Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.\',\n point: \'20\',\n segment: segment.advanced\n }, {\n question: \'ReactJS is developed by ?\',\n questionType: \'text\',\n answerSelectionType: \'single\',\n answers: [\'Google Engineers\', \'Facebook Engineers\'],\n correctAnswer: \'2\',\n messageForCorrectAnswer: \'Correct answer. Good job.\',\n messageForIncorrectAnswer: \'Incorrect answer. Please try again.\',\n explanation: \'Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.\',\n point: \'20\',\n segment: segment.basic\n }, {\n question: \'ReactJS is an MVC based framework?\',\n questionType: \'text\',\n answerSelectionType: \'single\',\n answers: [\'True\', \'False\'],\n correctAnswer: \'2\',\n messageForCorrectAnswer: \'Correct answer. Good job.\',\n messageForIncorrectAnswer: \'Incorrect answer. Please try again.\',\n explanation: \'Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.\',\n point: \'10\'\n }, {\n question: \'Which of the following concepts is/are key to ReactJS?\',\n questionType: \'text\',\n answerSelectionType: \'single\',\n answers: [\'Component-oriented design\', \'Event delegation model\', \'Both of the above\'],\n correctAnswer: \'3\',\n messageForCorrectAnswer: \'Correct answer. Good job.\',\n messageForIncorrectAnswer: \'Incorrect answer. Please try again.\',\n explanation: \'Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.\',\n point: \'30\',\n segment: segment.medium\n }, {\n question: \'How does the initial page of any react project looks like if we create the project using vite\',\n questionType: \'photo\',\n answerSelectionType: \'single\',\n answers: [\'https://github.com/wingkwong/react-quiz-component/assets/35857179/e169cd44-13a7-4301-9d30-6c0859d3ac35\', \'https://github.com/wingkwong/react-quiz-component/assets/35857179/30b4aa3d-2523-4d73-9e3b-27ce44ffd50a\', \'https://github.com/wingkwong/react-quiz-component/assets/35857179/64da0348-30b7-4a13-9fea-791537c49109\', \'https://github.com/wingkwong/react-quiz-component/assets/35857179/660e9255-8a16-4e0f-a7e4-81ba6ac0f9bc\'],\n correctAnswer: \'1\',\n messageForCorrectAnswer: \'Correct answer. Good job.\',\n messageForIncorrectAnswer: \'Incorrect answer. Please try again.\',\n explanation: \'Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.\',\n point: \'20\'\n }, {\n question: \'What are the advantages of React JS?\',\n questionType: \'text\',\n answerSelectionType: \'multiple\',\n answers: [\'React can be used on client and as well as server side too\', \'Using React increases readability and makes maintainability easier. Component, Data patterns improves readability and thus makes it easier for manitaining larger apps\', \'React components have lifecycle events that fall into State/Property Updates\', \'React can be used with any other framework (Backbone.js, Angular.js) as it is only a view layer\'],\n correctAnswer: [1, 2, 4],\n messageForCorrectAnswer: \'Correct answer. Good job.\',\n messageForIncorrectAnswer: \'Incorrect answer. Please try again.\',\n explanation: \'Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.\',\n point: \'20\'\n }]\n};\n/* harmony default export */ const docs_quiz = (quiz);\n;// CONCATENATED MODULE: ./src/docs/index.jsx\nfunction docs_slicedToArray(arr, i) { return docs_arrayWithHoles(arr) || docs_iterableToArrayLimit(arr, i) || docs_unsupportedIterableToArray(arr, i) || docs_nonIterableRest(); }\nfunction docs_nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }\nfunction docs_unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return docs_arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return docs_arrayLikeToArray(o, minLen); }\nfunction docs_arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }\nfunction docs_iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t["return"] && (u = t["return"](), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }\nfunction docs_arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }\n\n\n\n\nvar container = document.getElementById(\'app\');\nvar root = (0,client/* createRoot */.s)(container);\nfunction App() {\n var _useState = (0,react.useState)(),\n _useState2 = docs_slicedToArray(_useState, 2),\n quizResult = _useState2[0],\n setQuizResult = _useState2[1];\n return /*#__PURE__*/react.createElement("div", {\n style: {\n margin: \'auto\',\n width: \'500px\'\n }\n }, /*#__PURE__*/react.createElement(lib_Quiz, {\n quiz: docs_quiz,\n shuffle: true,\n shuffleAnswer: true,\n showInstantFeedback: true\n // continueTillCorrect\n ,\n onComplete: setQuizResult,\n onQuestionSubmit: function onQuestionSubmit(obj) {\n return console.log(\'user question results:\', obj);\n },\n disableSynopsis: true\n }));\n}\nroot.render( /*#__PURE__*/react.createElement(App, null));//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiNDEyLmpzIiwibWFwcGluZ3MiOiI7Ozs7OztBQUFBO0FBQ0E7QUFDQTtBQUNBOztBQ0hBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTs7QUNqQkE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOztBQ2hDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOzs7Ozs7OztBQzVCQTtBQUVBO0FBQUE7QUFBQTtBQUFBO0FBQ0E7QUFBQTtBQUFBO0FBQUE7QUFDQTtBQUVBO0FBQ0E7QUFDQTtBQUVBO0FBQ0E7QUFBQTtBQU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wdGlvbiAke3NlbGVjdGVkT3B0aW9uQ2xhc3N9YH0+XG4gICAgICAgICAge2ZpbHRlcmVkVmFsdWUgPT09ICdhbGwnID8gYXBwTG9jYWxlLnJlc3VsdEZpbHRlckFsbCA6IGZpbHRlcmVkVmFsdWV9XG4gICAgICAgIDwvZGl2PlxuICAgICAgICA8c3BhbiBjbGFzc05hbWU9e2BhcnJvdyAke2lzT3BlbiA/ICd1cCcgOiAnZG93bid9YH0gLz5cbiAgICAgIDwvZGl2PlxuICAgICAge2lzT3BlbiAmJiAoXG4gICAgICAgIDxkaXZcbiAgICAgICAgICBjbGFzc05hbWU9XCJkcm9wZG93bi1vcHRpb25zXCJcbiAgICAgICAgICByb2xlPVwibWVudVwiXG4gICAgICAgICAgYXJpYS1sYWJlbGxlZGJ5PVwicXVpei1maWx0ZXJcIlxuICAgICAgICA+XG4gICAgICAgICAgPGRpdlxuICAgICAgICAgICAgY2xhc3NOYW1lPXtgZHJvcGRvd24tb3B0aW9ucy1pdGVtICR7ZmlsdGVyZWRWYWx1ZSA9PT0gJ2FsbCcgPyAnc2VsZWN0ZWQnIDogJyd9YH1cbiAgICAgICAgICAgIG9uQ2xpY2s9eygpID0+IGhhbmRsZU9wdGlvbkNsaWNrKCdhbGwnKX1cbiAgICAgICAgICAgIG9uS2V5RG93bj17KGUpID0+IHtcbiAgICAgICAgICAgICAgaWYgKGUua2V5ID09PSAnRW50ZXInKSB7XG4gICAgICAgICAgICAgICAgaGFuZGxlT3B0aW9uQ2xpY2soJ2FsbCcpO1xuICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9fVxuICAgICAgICAgICAgcm9sZT1cIm1lbnVpdGVtXCJcbiAgICAgICAgICAgIHRhYkluZGV4PXswfVxuICAgICAgICAgID5cbiAgICAgICAgICAgIHthcHBMb2NhbGUucmVzdWx0RmlsdGVyQWxsfVxuICAgICAgICAgIDwvZGl2PlxuICAgICAgICAgIDxkaXZcbiAgICAgICAgICAgIGNsYXNzTmFtZT17YGRyb3Bkb3duLW9wdGlvbnMtaXRlbSAke2ZpbHRlcmVkVmFsdWUgPT09ICdjb3JyZWN0JyA/ICdzZWxlY3RlZCcgOiAnJ31gfVxuICAgICAgICAgICAgb25DbGljaz17KCkgPT4gaGFuZGxlT3B0aW9uQ2xpY2soJ2NvcnJlY3QnKX1cbiAgICAgICAgICAgIG9uS2V5RG93bj17KGUpID0+IHtcbiAgICAgICAgICAgICAgaWYgKGUua2V5ID09PSAnRW50ZXInKSB7XG4gICAgICAgICAgICAgICAgaGFuZGxlT3B0aW9uQ2xpY2soJ2NvcnJlY3QnKTtcbiAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfX1cbiAgICAgICAgICAgIHJvbGU9XCJtZW51aXRlbVwiXG4gICAgICAgICAgICB0YWJJbmRleD17MH1cbiAgICAgICAgICA+XG4gICAgICAgICAgICB7YXBwTG9jYWxlLnJlc3VsdEZpbHRlckNvcnJlY3R9XG4gICAgICAgICAgPC9kaXY+XG4gICAgICAgICAgPGRpdlxuICAgICAgICAgICAgY2xhc3NOYW1lPXtgZHJvcGRvd24tb3B0aW9ucy1pdGVtICR7ZmlsdGVyZWRWYWx1ZSA9PT0gJ2luY29ycmVjdCcgPyAnc2VsZWN0ZWQnIDogJyd9YH1cbiAgICAgICAgICAgIG9uQ2xpY2s9eygpID0+IGhhbmRsZU9wdGlvbkNsaWNrKCdpbmNvcnJlY3QnKX1cbiAgICAgICAgICAgIG9uS2V5RG93bj17KGUpID0+IHtcbiAgICAgICAgICAgICAgaWYgKGUua2V5ID09PSAnRW50ZXInKSB7XG4gICAgICAgICAgICAgICAgaGFuZGxlT3B0aW9uQ2xpY2soJ2luY29ycmVjdCcpO1xuICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9fVxuICAgICAgICAgICAgcm9sZT1cIm1lbnVpdGVtXCJcbiAgICAgICAgICAgIHRhYkluZGV4PXswfVxuICAgICAgICAgID5cbiAgICAgICAgICAgIHthcHBMb2NhbGUucmVzdWx0RmlsdG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4gICAgICAgICAgICAgIGRpc2FibGVkOiAhcHJldlN0YXRlW2luZGV4IC0gMV0sXG4gICAgICAgICAgICB9LFxuICAgICAgICAgIH1cbiAgICAgICAgKSk7XG4gICAgICB9IGVsc2Uge1xuICAgICAgICBzZXRCdXR0b25zKChwcmV2U3RhdGUpID0+IChcbiAgICAgICAgICB7XG5cbiAgICAgICAgICAgIC4uLnByZXZTdGF0ZSxcbiAgICAgICAgICAgIC4uLmRpc2FibGVkQWxsLFxuICAgICAgICAgICAgW2luZGV4IC0gMV06IHtcbiAgICAgICAgICAgICAgY2xhc3NOYW1lOiAoaW5kZXhTdHIgPT09IGNvcnJlY3RBbnN3ZXIpID8gJ2NvcnJlY3QnIDogJ2luY29ycmVjdCcsXG4gICAgICAgICAgICB9LFxuICAgICAgICAgIH1cbiAgICAgICAgKSk7XG5cbiAgICAgICAgc2V0U2hvd05leHRRdWVzdGlvbkJ1dHRvbih0cnVlKTtcbiAgICAgIH1cblxuICAgICAgc2V0SW5jb3JyZWN0QW5zd2VyKHRydWUpO1xuICAgICAgc2V0SXNDb3JyZWN0KGZhbHNlKTtcbiAgICAgIHNldEluY29ycmVjdChpbmNvcnJlY3QpO1xuICAgIH1cbiAgfSBlbHNlIHtcbiAgICBjb25zdCBtYXhOdW1iZXJPZk11bHRpcGxlU2VsZWN0aW9uID0gY29ycmVjdEFuc3dlci5sZW5ndGg7XG5cbiAgICBpZiAodXNlcklucHV0Q29weVtjdXJyZW50UXVlc3Rpb25JbmRleF0gPT09IHVuZGVmaW5lZCkge1xuICAgICAgdXNlcklucHV0Q29weVtjdXJyZW50UXVlc3Rpb25JbmRleF0gPSBbXTtcbiAgICB9XG5cbiAgICBpZiAodXNlcklucHV0Q29weVtjdXJyZW50UXVlc3Rpb25JbmRleF0ubGVuZ3RoIDwgbWF4TnVtYmVyT2ZNdWx0aXBsZVNlbGVjdGlvbikge1xuICAgICAgdXNlcklucHV0Q29weVtjdXJyZW50UXVlc3Rpb25JbmRleF0ucHVz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3Rpb24gJiYgcmVuZGVyQW5zd2VycyhhY3RpdmVRdWVzdGlvbiwgYnV0dG9ucyl9XG4gICAgICAgICAgeyhzaG93TmV4dFF1ZXN0aW9uQnV0dG9uIHx8IGFsbG93TmF2aWdhdGlvbilcbiAgICAgICAgICAmJiAoXG4gICAgICAgICAgPGRpdiBjbGFzc05hbWU9XCJxdWVzdGlvbkJ0bkNvbnRhaW5lclwiPlxuICAgICAgICAgICAgeyhhbGxvd05hdmlnYXRpb24gJiYgY3VycmVudFF1ZXN0aW9uSW5kZXggPiAwKSAmJiAoXG4gICAgICAgICAgICAgIDxidXR0b25cbiAgICAgICAgICAgICAgICBvbkNsaWNrPXsoKSA9PiBuZXh0UXVlc3Rpb24oY3VycmVudFF1ZXN0aW9uSW5kZXggLSAyKX1cbiAgICAgICAgICAgICAgICBjbGFzc05hbWU9XCJwcmV2UXVlc3Rpb25CdG4gYnRuXCJcbiAgICAgICAgICAgICAgICB0eXBlPVwiYnV0dG9uXCJcbiAgICAgICAgICAgICAgPlxuICAgICAgICAgICAgICAgIHthcHBMb2NhbGUucHJldlF1ZXN0aW9uQnRufVxuICAgICAgICAgICAgICA8L2J1dHRvbj5cbiAgICAgICAgICAgICl9XG4gICAgICAgICAgICA8YnV0dG9uIG9uQ2xpY2s9eygpID0+IG5leHRRdWVzdGlvbihjdXJyZW50UXVlc3Rpb25JbmRleCl9IGNsYXNzTmFtZT1cIm5leHRRdWVzdGlvbkJ0biBidG5cIiB0eXBlPVwiYnV0dG9uXCI+XG4gICAgICAgICAgICAgIHthcHBMb2NhbGUubmV4dFF1ZXN0aW9uQnRufVxuICAgICAgICAgICAgPC9idXR0b24+XG4gICAgICAgICAgPC9kaXY+XG4gICAgICAgICAgKX1cbiAgICAgICAgPC9kaXY+XG4gICAgICAgICl9XG4gICAgICB7ZW5kUXVpeiAmJiBzaG93RGVmYXVsdFJlc3VsdFN0YXRlICYmIGN1c3RvbVJlc3VsdFBhZ2UgPT09IHVuZGVmaW5lZFxu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fVxuICAgIH1cblxuICAgIHJldHVybiB0cnVlO1xuICB9O1xuXG4gIGlmICghdmFsaWRhdGVRdWl6KHF1aXopKSB7XG4gICAgcmV0dXJuIG51bGw7XG4gIH1cblxuICBjb25zdCBhcHBMb2NhbGUgPSB7XG4gICAgLi4uZGVmYXVsdExvY2FsZSxcbiAgICAuLi5xdWl6LmFwcExvY2FsZSxcbiAgfTtcblxuICByZXR1cm4gKFxuICAgIDxkaXYgY2xhc3NOYW1lPVwicmVhY3QtcXVpei1jb250YWluZXJcIj5cbiAgICAgIHshc3RhcnQgJiYgKFxuICAgICAgICA8ZGl2PlxuICAgICAgICAgIDxoMj57cXVpei5xdWl6VGl0bGV9PC9oMj5cbiAgICAgICAgICA8ZGl2PlxuICAgICAgICAgICAge2FwcExvY2FsZS5sYW5kaW5nSGVhZGVyVGV4dC5yZXBsYWNlKFxuICAgICAgICAgICAgICAnPHF1ZXN0aW9uTGVuZ3RoPicsXG4gICAgICAgICAgICAgIG5yT2ZRdWVzdGlvbnMsXG4gICAgICAgICAgICApfVxuICAgICAgICAgIDwvZGl2PlxuICAgICAgICAgIHtxdWl6LnF1aXpTeW5vcHNpcyAmJiAoXG4gICAgICAgICAgICA8ZGl2IGNsYXNzTmFtZT1cInF1aXotc3lub3BzaXNcIj57cXVpei5xdWl6U3lub3BzaXN9PC9kaXY+XG4gICAgICAgICAgKX1cbiAgICAgICAgICA8ZGl2IGNsYXNzTmFtZT1cInN0YXJ0UXVpeldyYXBwZXJcIj5cbiAgICAgICAgICAgIDxidXR0b24gdHlwZT1cImJ1dHRvblwiIG9uQ2xpY2s9eygpID0+IHNldFN0YXJ0KHRydWUpfSBjbGFzc05hbWU9XCJzdGFydFF1aXpCdG4gYnRuXCI+XG4gICAgICAgICAgICAgIHthcHBMb2NhbGUuc3RhcnRRdWl6QnRufVxuICAgICAgICAgICAgPC9idXR0b24+XG4gICAgICAgICAgPC9kaXY+XG4gICAgICAgIDwvZGl2PlxuICAgICAgKX1cblxuICAg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IGNvbnN0IFtxdWl6UmVzdWx0LCBzZXRRdWl6UmVzdWx0XSA9IHVzZVN0YXRlKCk7XG5cbiAgcmV0dXJuIChcbiAgICA8ZGl2IHN0eWxlPXt7IG1hcmdpbjogJ2F1dG8nLCB3aWR0aDogJzUwMHB4JyB9fT5cbiAgICAgIDxRdWl6XG4gICAgICAgIHF1aXo9e3F1aXp9XG4gICAgICAgIHNodWZmbGVcbiAgICAgICAgc2h1ZmZsZUFuc3dlclxuICAgICAgICBzaG93SW5zdGFudEZlZWRiYWNrXG4gICAgICAvLyBjb250aW51ZVRpbGxDb3JyZWN0XG4gICAgICAgIG9uQ29tcGxldGU9e3NldFF1aXpSZXN1bHR9XG4gICAgICAgIG9uUXVlc3Rpb25TdWJtaXQ9eyhvYmopID0+IGNvbnNvbGUubG9nKCd1c2VyIHF1ZXN0aW9uIHJlc3VsdHM6Jywgb2JqKX1cbiAgICAgICAgZGlzYWJsZVN5bm9wc2lzXG4gICAgICAvPlxuICAgIDwvZGl2PlxuICApO1xufVxuXG5yb290LnJlbmRlcig8QXBwIC8+KTtcbiJdLCJuYW1lcyI6W10sInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///412\n')},856:function(module){eval("/*! @license DOMPurify 3.0.6 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.0.6/LICENSE */\n\n(function (global, factory) {\n true ? module.exports = factory() :\n 0;\n})(this, (function () { 'use strict';\n\n const {\n entries,\n setPrototypeOf,\n isFrozen,\n getPrototypeOf,\n getOwnPropertyDescriptor\n } = Object;\n let {\n freeze,\n seal,\n create\n } = Object; // eslint-disable-line import/no-mutable-exports\n\n let {\n apply,\n construct\n } = typeof Reflect !== 'undefined' && Reflect;\n\n if (!freeze) {\n freeze = function freeze(x) {\n return x;\n };\n }\n\n if (!seal) {\n seal = function seal(x) {\n return x;\n };\n }\n\n if (!apply) {\n apply = function apply(fun, thisValue, args) {\n return fun.apply(thisValue, args);\n };\n }\n\n if (!construct) {\n construct = function construct(Func, args) {\n return new Func(...args);\n };\n }\n\n const arrayForEach = unapply(Array.prototype.forEach);\n const arrayPop = unapply(Array.prototype.pop);\n const arrayPush = unapply(Array.prototype.push);\n const stringToLowerCase = unapply(String.prototype.toLowerCase);\n const stringToString = unapply(String.prototype.toString);\n const stringMatch = unapply(String.prototype.match);\n const stringReplace = unapply(String.prototype.replace);\n const stringIndexOf = unapply(String.prototype.indexOf);\n const stringTrim = unapply(String.prototype.trim);\n const regExpTest = unapply(RegExp.prototype.test);\n const typeErrorCreate = unconstruct(TypeError);\n /**\n * Creates a new function that calls the given function with a specified thisArg and arguments.\n *\n * @param {Function} func - The function to be wrapped and called.\n * @returns {Function} A new function that calls the given function with a specified thisArg and arguments.\n */\n\n function unapply(func) {\n return function (thisArg) {\n for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n args[_key - 1] = arguments[_key];\n }\n\n return apply(func, thisArg, args);\n };\n }\n /**\n * Creates a new function that constructs an instance of the given constructor function with the provided arguments.\n *\n * @param {Function} func - The constructor function to be wrapped and called.\n * @returns {Function} A new function that constructs an instance of the given constructor function with the provided arguments.\n */\n\n\n function unconstruct(func) {\n return function () {\n for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {\n args[_key2] = arguments[_key2];\n }\n\n return construct(func, args);\n };\n }\n /**\n * Add properties to a lookup table\n *\n * @param {Object} set - The set to which elements will be added.\n * @param {Array} array - The array containing elements to be added to the set.\n * @param {Function} transformCaseFunc - An optional function to transform the case of each element before adding to the set.\n * @returns {Object} The modified set with added elements.\n */\n\n\n function addToSet(set, array) {\n let transformCaseFunc = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : stringToLowerCase;\n\n if (setPrototypeOf) {\n // Make 'in' and truthy checks like Boolean(set.constructor)\n // independent of any properties defined on Object.prototype.\n // Prevent prototype setters from intercepting set as a this value.\n setPrototypeOf(set, null);\n }\n\n let l = array.length;\n\n while (l--) {\n let element = array[l];\n\n if (typeof element === 'string') {\n const lcElement = transformCaseFunc(element);\n\n if (lcElement !== element) {\n // Config presets (e.g. tags.js, attrs.js) are immutable.\n if (!isFrozen(array)) {\n array[l] = lcElement;\n }\n\n element = lcElement;\n }\n }\n\n set[element] = true;\n }\n\n return set;\n }\n /**\n * Shallow clone an object\n *\n * @param {Object} object - The object to be cloned.\n * @returns {Object} A new object that copies the original.\n */\n\n\n function clone(object) {\n const newObject = create(null);\n\n for (const [property, value] of entries(object)) {\n if (getOwnPropertyDescriptor(object, property) !== undefined) {\n newObject[property] = value;\n }\n }\n\n return newObject;\n }\n /**\n * This method automatically checks if the prop is function or getter and behaves accordingly.\n *\n * @param {Object} object - The object to look up the getter function in its prototype chain.\n * @param {String} prop - The property name for which to find the getter function.\n * @returns {Function} The getter function found in the prototype chain or a fallback function.\n */\n\n function lookupGetter(object, prop) {\n while (object !== null) {\n const desc = getOwnPropertyDescriptor(object, prop);\n\n if (desc) {\n if (desc.get) {\n return unapply(desc.get);\n }\n\n if (typeof desc.value === 'function') {\n return unapply(desc.value);\n }\n }\n\n object = getPrototypeOf(object);\n }\n\n function fallbackValue(element) {\n console.warn('fallback value for', element);\n return null;\n }\n\n return fallbackValue;\n }\n\n const html$1 = freeze(['a', 'abbr', 'acronym', 'address', 'area', 'article', 'aside', 'audio', 'b', 'bdi', 'bdo', 'big', 'blink', 'blockquote', 'body', 'br', 'button', 'canvas', 'caption', 'center', 'cite', 'code', 'col', 'colgroup', 'content', 'data', 'datalist', 'dd', 'decorator', 'del', 'details', 'dfn', 'dialog', 'dir', 'div', 'dl', 'dt', 'element', 'em', 'fieldset', 'figcaption', 'figure', 'font', 'footer', 'form', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'head', 'header', 'hgroup', 'hr', 'html', 'i', 'img', 'input', 'ins', 'kbd', 'label', 'legend', 'li', 'main', 'map', 'mark', 'marquee', 'menu', 'menuitem', 'meter', 'nav', 'nobr', 'ol', 'optgroup', 'option', 'output', 'p', 'picture', 'pre', 'progress', 'q', 'rp', 'rt', 'ruby', 's', 'samp', 'section', 'select', 'shadow', 'small', 'source', 'spacer', 'span', 'strike', 'strong', 'style', 'sub', 'summary', 'sup', 'table', 'tbody', 'td', 'template', 'textarea', 'tfoot', 'th', 'thead', 'time', 'tr', 'track', 'tt', 'u', 'ul', 'var', 'video', 'wbr']); // SVG\n\n const svg$1 = freeze(['svg', 'a', 'altglyph', 'altglyphdef', 'altglyphitem', 'animatecolor', 'animatemotion', 'animatetransform', 'circle', 'clippath', 'defs', 'desc', 'ellipse', 'filter', 'font', 'g', 'glyph', 'glyphref', 'hkern', 'image', 'line', 'lineargradient', 'marker', 'mask', 'metadata', 'mpath', 'path', 'pattern', 'polygon', 'polyline', 'radialgradient', 'rect', 'stop', 'style', 'switch', 'symbol', 'text', 'textpath', 'title', 'tref', 'tspan', 'view', 'vkern']);\n const svgFilters = freeze(['feBlend', 'feColorMatrix', 'feComponentTransfer', 'feComposite', 'feConvolveMatrix', 'feDiffuseLighting', 'feDisplacementMap', 'feDistantLight', 'feDropShadow', 'feFlood', 'feFuncA', 'feFuncB', 'feFuncG', 'feFuncR', 'feGaussianBlur', 'feImage', 'feMerge', 'feMergeNode', 'feMorphology', 'feOffset', 'fePointLight', 'feSpecularLighting', 'feSpotLight', 'feTile', 'feTurbulence']); // List of SVG elements that are disallowed by default.\n // We still need to know them so that we can do namespace\n // checks properly in case one wants to add them to\n // allow-list.\n\n const svgDisallowed = freeze(['animate', 'color-profile', 'cursor', 'discard', 'font-face', 'font-face-format', 'font-face-name', 'font-face-src', 'font-face-uri', 'foreignobject', 'hatch', 'hatchpath', 'mesh', 'meshgradient', 'meshpatch', 'meshrow', 'missing-glyph', 'script', 'set', 'solidcolor', 'unknown', 'use']);\n const mathMl$1 = freeze(['math', 'menclose', 'merror', 'mfenced', 'mfrac', 'mglyph', 'mi', 'mlabeledtr', 'mmultiscripts', 'mn', 'mo', 'mover', 'mpadded', 'mphantom', 'mroot', 'mrow', 'ms', 'mspace', 'msqrt', 'mstyle', 'msub', 'msup', 'msubsup', 'mtable', 'mtd', 'mtext', 'mtr', 'munder', 'munderover', 'mprescripts']); // Similarly to SVG, we want to know all MathML elements,\n // even those that we disallow by default.\n\n const mathMlDisallowed = freeze(['maction', 'maligngroup', 'malignmark', 'mlongdiv', 'mscarries', 'mscarry', 'msgroup', 'mstack', 'msline', 'msrow', 'semantics', 'annotation', 'annotation-xml', 'mprescripts', 'none']);\n const text = freeze(['#text']);\n\n const html = freeze(['accept', 'action', 'align', 'alt', 'autocapitalize', 'autocomplete', 'autopictureinpicture', 'autoplay', 'background', 'bgcolor', 'border', 'capture', 'cellpadding', 'cellspacing', 'checked', 'cite', 'class', 'clear', 'color', 'cols', 'colspan', 'controls', 'controlslist', 'coords', 'crossorigin', 'datetime', 'decoding', 'default', 'dir', 'disabled', 'disablepictureinpicture', 'disableremoteplayback', 'download', 'draggable', 'enctype', 'enterkeyhint', 'face', 'for', 'headers', 'height', 'hidden', 'high', 'href', 'hreflang', 'id', 'inputmode', 'integrity', 'ismap', 'kind', 'label', 'lang', 'list', 'loading', 'loop', 'low', 'max', 'maxlength', 'media', 'method', 'min', 'minlength', 'multiple', 'muted', 'name', 'nonce', 'noshade', 'novalidate', 'nowrap', 'open', 'optimum', 'pattern', 'placeholder', 'playsinline', 'poster', 'preload', 'pubdate', 'radiogroup', 'readonly', 'rel', 'required', 'rev', 'reversed', 'role', 'rows', 'rowspan', 'spellcheck', 'scope', 'selected', 'shape', 'size', 'sizes', 'span', 'srclang', 'start', 'src', 'srcset', 'step', 'style', 'summary', 'tabindex', 'title', 'translate', 'type', 'usemap', 'valign', 'value', 'width', 'xmlns', 'slot']);\n const svg = freeze(['accent-height', 'accumulate', 'additive', 'alignment-baseline', 'ascent', 'attributename', 'attributetype', 'azimuth', 'basefrequency', 'baseline-shift', 'begin', 'bias', 'by', 'class', 'clip', 'clippathunits', 'clip-path', 'clip-rule', 'color', 'color-interpolation', 'color-interpolation-filters', 'color-profile', 'color-rendering', 'cx', 'cy', 'd', 'dx', 'dy', 'diffuseconstant', 'direction', 'display', 'divisor', 'dur', 'edgemode', 'elevation', 'end', 'fill', 'fill-opacity', 'fill-rule', 'filter', 'filterunits', 'flood-color', 'flood-opacity', 'font-family', 'font-size', 'font-size-adjust', 'font-stretch', 'font-style', 'font-variant', 'font-weight', 'fx', 'fy', 'g1', 'g2', 'glyph-name', 'glyphref', 'gradientunits', 'gradienttransform', 'height', 'href', 'id', 'image-rendering', 'in', 'in2', 'k', 'k1', 'k2', 'k3', 'k4', 'kerning', 'keypoints', 'keysplines', 'keytimes', 'lang', 'lengthadjust', 'letter-spacing', 'kernelmatrix', 'kernelunitlength', 'lighting-color', 'local', 'marker-end', 'marker-mid', 'marker-start', 'markerheight', 'markerunits', 'markerwidth', 'maskcontentunits', 'maskunits', 'max', 'mask', 'media', 'method', 'mode', 'min', 'name', 'numoctaves', 'offset', 'operator', 'opacity', 'order', 'orient', 'orientation', 'origin', 'overflow', 'paint-order', 'path', 'pathlength', 'patterncontentunits', 'patterntransform', 'patternunits', 'points', 'preservealpha', 'preserveaspectratio', 'primitiveunits', 'r', 'rx', 'ry', 'radius', 'refx', 'refy', 'repeatcount', 'repeatdur', 'restart', 'result', 'rotate', 'scale', 'seed', 'shape-rendering', 'specularconstant', 'specularexponent', 'spreadmethod', 'startoffset', 'stddeviation', 'stitchtiles', 'stop-color', 'stop-opacity', 'stroke-dasharray', 'stroke-dashoffset', 'stroke-linecap', 'stroke-linejoin', 'stroke-miterlimit', 'stroke-opacity', 'stroke', 'stroke-width', 'style', 'surfacescale', 'systemlanguage', 'tabindex', 'targetx', 'targety', 'transform', 'transform-origin', 'text-anchor', 'text-decoration', 'text-rendering', 'textlength', 'type', 'u1', 'u2', 'unicode', 'values', 'viewbox', 'visibility', 'version', 'vert-adv-y', 'vert-origin-x', 'vert-origin-y', 'width', 'word-spacing', 'wrap', 'writing-mode', 'xchannelselector', 'ychannelselector', 'x', 'x1', 'x2', 'xmlns', 'y', 'y1', 'y2', 'z', 'zoomandpan']);\n const mathMl = freeze(['accent', 'accentunder', 'align', 'bevelled', 'close', 'columnsalign', 'columnlines', 'columnspan', 'denomalign', 'depth', 'dir', 'display', 'displaystyle', 'encoding', 'fence', 'frame', 'height', 'href', 'id', 'largeop', 'length', 'linethickness', 'lspace', 'lquote', 'mathbackground', 'mathcolor', 'mathsize', 'mathvariant', 'maxsize', 'minsize', 'movablelimits', 'notation', 'numalign', 'open', 'rowalign', 'rowlines', 'rowspacing', 'rowspan', 'rspace', 'rquote', 'scriptlevel', 'scriptminsize', 'scriptsizemultiplier', 'selection', 'separator', 'separators', 'stretchy', 'subscriptshift', 'supscriptshift', 'symmetric', 'voffset', 'width', 'xmlns']);\n const xml = freeze(['xlink:href', 'xml:id', 'xlink:title', 'xml:space', 'xmlns:xlink']);\n\n const MUSTACHE_EXPR = seal(/\\{\\{[\\w\\W]*|[\\w\\W]*\\}\\}/gm); // Specify template detection regex for SAFE_FOR_TEMPLATES mode\n\n const ERB_EXPR = seal(/<%[\\w\\W]*|[\\w\\W]*%>/gm);\n const TMPLIT_EXPR = seal(/\\${[\\w\\W]*}/gm);\n const DATA_ATTR = seal(/^data-[\\-\\w.\\u00B7-\\uFFFF]/); // eslint-disable-line no-useless-escape\n\n const ARIA_ATTR = seal(/^aria-[\\-\\w]+$/); // eslint-disable-line no-useless-escape\n\n const IS_ALLOWED_URI = seal(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp):|[^a-z]|[a-z+.\\-]+(?:[^a-z+.\\-:]|$))/i // eslint-disable-line no-useless-escape\n );\n const IS_SCRIPT_OR_DATA = seal(/^(?:\\w+script|data):/i);\n const ATTR_WHITESPACE = seal(/[\\u0000-\\u0020\\u00A0\\u1680\\u180E\\u2000-\\u2029\\u205F\\u3000]/g // eslint-disable-line no-control-regex\n );\n const DOCTYPE_NAME = seal(/^html$/i);\n\n var EXPRESSIONS = /*#__PURE__*/Object.freeze({\n __proto__: null,\n MUSTACHE_EXPR: MUSTACHE_EXPR,\n ERB_EXPR: ERB_EXPR,\n TMPLIT_EXPR: TMPLIT_EXPR,\n DATA_ATTR: DATA_ATTR,\n ARIA_ATTR: ARIA_ATTR,\n IS_ALLOWED_URI: IS_ALLOWED_URI,\n IS_SCRIPT_OR_DATA: IS_SCRIPT_OR_DATA,\n ATTR_WHITESPACE: ATTR_WHITESPACE,\n DOCTYPE_NAME: DOCTYPE_NAME\n });\n\n const getGlobal = function getGlobal() {\n return typeof window === 'undefined' ? null : window;\n };\n /**\n * Creates a no-op policy for internal use only.\n * Don't export this function outside this module!\n * @param {?TrustedTypePolicyFactory} trustedTypes The policy factory.\n * @param {HTMLScriptElement} purifyHostElement The Script element used to load DOMPurify (to determine policy name suffix).\n * @return {?TrustedTypePolicy} The policy created (or null, if Trusted Types\n * are not supported or creating the policy failed).\n */\n\n\n const _createTrustedTypesPolicy = function _createTrustedTypesPolicy(trustedTypes, purifyHostElement) {\n if (typeof trustedTypes !== 'object' || typeof trustedTypes.createPolicy !== 'function') {\n return null;\n } // Allow the callers to control the unique policy name\n // by adding a data-tt-policy-suffix to the script element with the DOMPurify.\n // Policy creation with duplicate names throws in Trusted Types.\n\n\n let suffix = null;\n const ATTR_NAME = 'data-tt-policy-suffix';\n\n if (purifyHostElement && purifyHostElement.hasAttribute(ATTR_NAME)) {\n suffix = purifyHostElement.getAttribute(ATTR_NAME);\n }\n\n const policyName = 'dompurify' + (suffix ? '#' + suffix : '');\n\n try {\n return trustedTypes.createPolicy(policyName, {\n createHTML(html) {\n return html;\n },\n\n createScriptURL(scriptUrl) {\n return scriptUrl;\n }\n\n });\n } catch (_) {\n // Policy creation failed (most likely another DOMPurify script has\n // already run). Skip creating the policy, as this will only cause errors\n // if TT are enforced.\n console.warn('TrustedTypes policy ' + policyName + ' could not be created.');\n return null;\n }\n };\n\n function createDOMPurify() {\n let window = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : getGlobal();\n\n const DOMPurify = root => createDOMPurify(root);\n /**\n * Version label, exposed for easier checks\n * if DOMPurify is up to date or not\n */\n\n\n DOMPurify.version = '3.0.6';\n /**\n * Array of elements that DOMPurify removed during sanitation.\n * Empty if nothing was removed.\n */\n\n DOMPurify.removed = [];\n\n if (!window || !window.document || window.document.nodeType !== 9) {\n // Not running in a browser, provide a factory function\n // so that you can pass your own Window\n DOMPurify.isSupported = false;\n return DOMPurify;\n }\n\n let {\n document\n } = window;\n const originalDocument = document;\n const currentScript = originalDocument.currentScript;\n const {\n DocumentFragment,\n HTMLTemplateElement,\n Node,\n Element,\n NodeFilter,\n NamedNodeMap = window.NamedNodeMap || window.MozNamedAttrMap,\n HTMLFormElement,\n DOMParser,\n trustedTypes\n } = window;\n const ElementPrototype = Element.prototype;\n const cloneNode = lookupGetter(ElementPrototype, 'cloneNode');\n const getNextSibling = lookupGetter(ElementPrototype, 'nextSibling');\n const getChildNodes = lookupGetter(ElementPrototype, 'childNodes');\n const getParentNode = lookupGetter(ElementPrototype, 'parentNode'); // As per issue #47, the web-components registry is inherited by a\n // new document created via createHTMLDocument. As per the spec\n // (http://w3c.github.io/webcomponents/spec/custom/#creating-and-passing-registries)\n // a new empty registry is used when creating a template contents owner\n // document, so we use that as our parent document to ensure nothing\n // is inherited.\n\n if (typeof HTMLTemplateElement === 'function') {\n const template = document.createElement('template');\n\n if (template.content && template.content.ownerDocument) {\n document = template.content.ownerDocument;\n }\n }\n\n let trustedTypesPolicy;\n let emptyHTML = '';\n const {\n implementation,\n createNodeIterator,\n createDocumentFragment,\n getElementsByTagName\n } = document;\n const {\n importNode\n } = originalDocument;\n let hooks = {};\n /**\n * Expose whether this browser supports running the full DOMPurify.\n */\n\n DOMPurify.isSupported = typeof entries === 'function' && typeof getParentNode === 'function' && implementation && implementation.createHTMLDocument !== undefined;\n const {\n MUSTACHE_EXPR,\n ERB_EXPR,\n TMPLIT_EXPR,\n DATA_ATTR,\n ARIA_ATTR,\n IS_SCRIPT_OR_DATA,\n ATTR_WHITESPACE\n } = EXPRESSIONS;\n let {\n IS_ALLOWED_URI: IS_ALLOWED_URI$1\n } = EXPRESSIONS;\n /**\n * We consider the elements and attributes below to be safe. Ideally\n * don't add any new ones but feel free to remove unwanted ones.\n */\n\n /* allowed element names */\n\n let ALLOWED_TAGS = null;\n const DEFAULT_ALLOWED_TAGS = addToSet({}, [...html$1, ...svg$1, ...svgFilters, ...mathMl$1, ...text]);\n /* Allowed attribute names */\n\n let ALLOWED_ATTR = null;\n const DEFAULT_ALLOWED_ATTR = addToSet({}, [...html, ...svg, ...mathMl, ...xml]);\n /*\n * Configure how DOMPUrify should handle custom elements and their attributes as well as customized built-in elements.\n * @property {RegExp|Function|null} tagNameCheck one of [null, regexPattern, predicate]. Default: `null` (disallow any custom elements)\n * @property {RegExp|Function|null} attributeNameCheck one of [null, regexPattern, predicate]. Default: `null` (disallow any attributes not on the allow list)\n * @property {boolean} allowCustomizedBuiltInElements allow custom elements derived from built-ins if they pass CUSTOM_ELEMENT_HANDLING.tagNameCheck. Default: `false`.\n */\n\n let CUSTOM_ELEMENT_HANDLING = Object.seal(create(null, {\n tagNameCheck: {\n writable: true,\n configurable: false,\n enumerable: true,\n value: null\n },\n attributeNameCheck: {\n writable: true,\n configurable: false,\n enumerable: true,\n value: null\n },\n allowCustomizedBuiltInElements: {\n writable: true,\n configurable: false,\n enumerable: true,\n value: false\n }\n }));\n /* Explicitly forbidden tags (overrides ALLOWED_TAGS/ADD_TAGS) */\n\n let FORBID_TAGS = null;\n /* Explicitly forbidden attributes (overrides ALLOWED_ATTR/ADD_ATTR) */\n\n let FORBID_ATTR = null;\n /* Decide if ARIA attributes are okay */\n\n let ALLOW_ARIA_ATTR = true;\n /* Decide if custom data attributes are okay */\n\n let ALLOW_DATA_ATTR = true;\n /* Decide if unknown protocols are okay */\n\n let ALLOW_UNKNOWN_PROTOCOLS = false;\n /* Decide if self-closing tags in attributes are allowed.\n * Usually removed due to a mXSS issue in jQuery 3.0 */\n\n let ALLOW_SELF_CLOSE_IN_ATTR = true;\n /* Output should be safe for common template engines.\n * This means, DOMPurify removes data attributes, mustaches and ERB\n */\n\n let SAFE_FOR_TEMPLATES = false;\n /* Decide if document with ... should be returned */\n\n let WHOLE_DOCUMENT = false;\n /* Track whether config is already set on this instance of DOMPurify. */\n\n let SET_CONFIG = false;\n /* Decide if all elements (e.g. style, script) must be children of\n * document.body. By default, browsers might move them to document.head */\n\n let FORCE_BODY = false;\n /* Decide if a DOM `HTMLBodyElement` should be returned, instead of a html\n * string (or a TrustedHTML object if Trusted Types are supported).\n * If `WHOLE_DOCUMENT` is enabled a `HTMLHtmlElement` will be returned instead\n */\n\n let RETURN_DOM = false;\n /* Decide if a DOM `DocumentFragment` should be returned, instead of a html\n * string (or a TrustedHTML object if Trusted Types are supported) */\n\n let RETURN_DOM_FRAGMENT = false;\n /* Try to return a Trusted Type object instead of a string, return a string in\n * case Trusted Types are not supported */\n\n let RETURN_TRUSTED_TYPE = false;\n /* Output should be free from DOM clobbering attacks?\n * This sanitizes markups named with colliding, clobberable built-in DOM APIs.\n */\n\n let SANITIZE_DOM = true;\n /* Achieve full DOM Clobbering protection by isolating the namespace of named\n * properties and JS variables, mitigating attacks that abuse the HTML/DOM spec rules.\n *\n * HTML/DOM spec rules that enable DOM Clobbering:\n * - Named Access on Window (§7.3.3)\n * - DOM Tree Accessors (§3.1.5)\n * - Form Element Parent-Child Relations (§4.10.3)\n * - Iframe srcdoc / Nested WindowProxies (§4.8.5)\n * - HTMLCollection (§4.2.10.2)\n *\n * Namespace isolation is implemented by prefixing `id` and `name` attributes\n * with a constant string, i.e., `user-content-`\n */\n\n let SANITIZE_NAMED_PROPS = false;\n const SANITIZE_NAMED_PROPS_PREFIX = 'user-content-';\n /* Keep element content when removing element? */\n\n let KEEP_CONTENT = true;\n /* If a `Node` is passed to sanitize(), then performs sanitization in-place instead\n * of importing it into a new Document and returning a sanitized copy */\n\n let IN_PLACE = false;\n /* Allow usage of profiles like html, svg and mathMl */\n\n let USE_PROFILES = {};\n /* Tags to ignore content of when KEEP_CONTENT is true */\n\n let FORBID_CONTENTS = null;\n const DEFAULT_FORBID_CONTENTS = addToSet({}, ['annotation-xml', 'audio', 'colgroup', 'desc', 'foreignobject', 'head', 'iframe', 'math', 'mi', 'mn', 'mo', 'ms', 'mtext', 'noembed', 'noframes', 'noscript', 'plaintext', 'script', 'style', 'svg', 'template', 'thead', 'title', 'video', 'xmp']);\n /* Tags that are safe for data: URIs */\n\n let DATA_URI_TAGS = null;\n const DEFAULT_DATA_URI_TAGS = addToSet({}, ['audio', 'video', 'img', 'source', 'image', 'track']);\n /* Attributes safe for values like \"javascript:\" */\n\n let URI_SAFE_ATTRIBUTES = null;\n const DEFAULT_URI_SAFE_ATTRIBUTES = addToSet({}, ['alt', 'class', 'for', 'id', 'label', 'name', 'pattern', 'placeholder', 'role', 'summary', 'title', 'value', 'style', 'xmlns']);\n const MATHML_NAMESPACE = 'http://www.w3.org/1998/Math/MathML';\n const SVG_NAMESPACE = 'http://www.w3.org/2000/svg';\n const HTML_NAMESPACE = 'http://www.w3.org/1999/xhtml';\n /* Document namespace */\n\n let NAMESPACE = HTML_NAMESPACE;\n let IS_EMPTY_INPUT = false;\n /* Allowed XHTML+XML namespaces */\n\n let ALLOWED_NAMESPACES = null;\n const DEFAULT_ALLOWED_NAMESPACES = addToSet({}, [MATHML_NAMESPACE, SVG_NAMESPACE, HTML_NAMESPACE], stringToString);\n /* Parsing of strict XHTML documents */\n\n let PARSER_MEDIA_TYPE = null;\n const SUPPORTED_PARSER_MEDIA_TYPES = ['application/xhtml+xml', 'text/html'];\n const DEFAULT_PARSER_MEDIA_TYPE = 'text/html';\n let transformCaseFunc = null;\n /* Keep a reference to config to pass to hooks */\n\n let CONFIG = null;\n /* Ideally, do not touch anything below this line */\n\n /* ______________________________________________ */\n\n const formElement = document.createElement('form');\n\n const isRegexOrFunction = function isRegexOrFunction(testValue) {\n return testValue instanceof RegExp || testValue instanceof Function;\n };\n /**\n * _parseConfig\n *\n * @param {Object} cfg optional config literal\n */\n // eslint-disable-next-line complexity\n\n\n const _parseConfig = function _parseConfig() {\n let cfg = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n\n if (CONFIG && CONFIG === cfg) {\n return;\n }\n /* Shield configuration object from tampering */\n\n\n if (!cfg || typeof cfg !== 'object') {\n cfg = {};\n }\n /* Shield configuration object from prototype pollution */\n\n\n cfg = clone(cfg);\n PARSER_MEDIA_TYPE = // eslint-disable-next-line unicorn/prefer-includes\n SUPPORTED_PARSER_MEDIA_TYPES.indexOf(cfg.PARSER_MEDIA_TYPE) === -1 ? PARSER_MEDIA_TYPE = DEFAULT_PARSER_MEDIA_TYPE : PARSER_MEDIA_TYPE = cfg.PARSER_MEDIA_TYPE; // HTML tags and attributes are not case-sensitive, converting to lowercase. Keeping XHTML as is.\n\n transformCaseFunc = PARSER_MEDIA_TYPE === 'application/xhtml+xml' ? stringToString : stringToLowerCase;\n /* Set configuration parameters */\n\n ALLOWED_TAGS = 'ALLOWED_TAGS' in cfg ? addToSet({}, cfg.ALLOWED_TAGS, transformCaseFunc) : DEFAULT_ALLOWED_TAGS;\n ALLOWED_ATTR = 'ALLOWED_ATTR' in cfg ? addToSet({}, cfg.ALLOWED_ATTR, transformCaseFunc) : DEFAULT_ALLOWED_ATTR;\n ALLOWED_NAMESPACES = 'ALLOWED_NAMESPACES' in cfg ? addToSet({}, cfg.ALLOWED_NAMESPACES, stringToString) : DEFAULT_ALLOWED_NAMESPACES;\n URI_SAFE_ATTRIBUTES = 'ADD_URI_SAFE_ATTR' in cfg ? addToSet(clone(DEFAULT_URI_SAFE_ATTRIBUTES), // eslint-disable-line indent\n cfg.ADD_URI_SAFE_ATTR, // eslint-disable-line indent\n transformCaseFunc // eslint-disable-line indent\n ) // eslint-disable-line indent\n : DEFAULT_URI_SAFE_ATTRIBUTES;\n DATA_URI_TAGS = 'ADD_DATA_URI_TAGS' in cfg ? addToSet(clone(DEFAULT_DATA_URI_TAGS), // eslint-disable-line indent\n cfg.ADD_DATA_URI_TAGS, // eslint-disable-line indent\n transformCaseFunc // eslint-disable-line indent\n ) // eslint-disable-line indent\n : DEFAULT_DATA_URI_TAGS;\n FORBID_CONTENTS = 'FORBID_CONTENTS' in cfg ? addToSet({}, cfg.FORBID_CONTENTS, transformCaseFunc) : DEFAULT_FORBID_CONTENTS;\n FORBID_TAGS = 'FORBID_TAGS' in cfg ? addToSet({}, cfg.FORBID_TAGS, transformCaseFunc) : {};\n FORBID_ATTR = 'FORBID_ATTR' in cfg ? addToSet({}, cfg.FORBID_ATTR, transformCaseFunc) : {};\n USE_PROFILES = 'USE_PROFILES' in cfg ? cfg.USE_PROFILES : false;\n ALLOW_ARIA_ATTR = cfg.ALLOW_ARIA_ATTR !== false; // Default true\n\n ALLOW_DATA_ATTR = cfg.ALLOW_DATA_ATTR !== false; // Default true\n\n ALLOW_UNKNOWN_PROTOCOLS = cfg.ALLOW_UNKNOWN_PROTOCOLS || false; // Default false\n\n ALLOW_SELF_CLOSE_IN_ATTR = cfg.ALLOW_SELF_CLOSE_IN_ATTR !== false; // Default true\n\n SAFE_FOR_TEMPLATES = cfg.SAFE_FOR_TEMPLATES || false; // Default false\n\n WHOLE_DOCUMENT = cfg.WHOLE_DOCUMENT || false; // Default false\n\n RETURN_DOM = cfg.RETURN_DOM || false; // Default false\n\n RETURN_DOM_FRAGMENT = cfg.RETURN_DOM_FRAGMENT || false; // Default false\n\n RETURN_TRUSTED_TYPE = cfg.RETURN_TRUSTED_TYPE || false; // Default false\n\n FORCE_BODY = cfg.FORCE_BODY || false; // Default false\n\n SANITIZE_DOM = cfg.SANITIZE_DOM !== false; // Default true\n\n SANITIZE_NAMED_PROPS = cfg.SANITIZE_NAMED_PROPS || false; // Default false\n\n KEEP_CONTENT = cfg.KEEP_CONTENT !== false; // Default true\n\n IN_PLACE = cfg.IN_PLACE || false; // Default false\n\n IS_ALLOWED_URI$1 = cfg.ALLOWED_URI_REGEXP || IS_ALLOWED_URI;\n NAMESPACE = cfg.NAMESPACE || HTML_NAMESPACE;\n CUSTOM_ELEMENT_HANDLING = cfg.CUSTOM_ELEMENT_HANDLING || {};\n\n if (cfg.CUSTOM_ELEMENT_HANDLING && isRegexOrFunction(cfg.CUSTOM_ELEMENT_HANDLING.tagNameCheck)) {\n CUSTOM_ELEMENT_HANDLING.tagNameCheck = cfg.CUSTOM_ELEMENT_HANDLING.tagNameCheck;\n }\n\n if (cfg.CUSTOM_ELEMENT_HANDLING && isRegexOrFunction(cfg.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)) {\n CUSTOM_ELEMENT_HANDLING.attributeNameCheck = cfg.CUSTOM_ELEMENT_HANDLING.attributeNameCheck;\n }\n\n if (cfg.CUSTOM_ELEMENT_HANDLING && typeof cfg.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements === 'boolean') {\n CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements = cfg.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements;\n }\n\n if (SAFE_FOR_TEMPLATES) {\n ALLOW_DATA_ATTR = false;\n }\n\n if (RETURN_DOM_FRAGMENT) {\n RETURN_DOM = true;\n }\n /* Parse profile info */\n\n\n if (USE_PROFILES) {\n ALLOWED_TAGS = addToSet({}, [...text]);\n ALLOWED_ATTR = [];\n\n if (USE_PROFILES.html === true) {\n addToSet(ALLOWED_TAGS, html$1);\n addToSet(ALLOWED_ATTR, html);\n }\n\n if (USE_PROFILES.svg === true) {\n addToSet(ALLOWED_TAGS, svg$1);\n addToSet(ALLOWED_ATTR, svg);\n addToSet(ALLOWED_ATTR, xml);\n }\n\n if (USE_PROFILES.svgFilters === true) {\n addToSet(ALLOWED_TAGS, svgFilters);\n addToSet(ALLOWED_ATTR, svg);\n addToSet(ALLOWED_ATTR, xml);\n }\n\n if (USE_PROFILES.mathMl === true) {\n addToSet(ALLOWED_TAGS, mathMl$1);\n addToSet(ALLOWED_ATTR, mathMl);\n addToSet(ALLOWED_ATTR, xml);\n }\n }\n /* Merge configuration parameters */\n\n\n if (cfg.ADD_TAGS) {\n if (ALLOWED_TAGS === DEFAULT_ALLOWED_TAGS) {\n ALLOWED_TAGS = clone(ALLOWED_TAGS);\n }\n\n addToSet(ALLOWED_TAGS, cfg.ADD_TAGS, transformCaseFunc);\n }\n\n if (cfg.ADD_ATTR) {\n if (ALLOWED_ATTR === DEFAULT_ALLOWED_ATTR) {\n ALLOWED_ATTR = clone(ALLOWED_ATTR);\n }\n\n addToSet(ALLOWED_ATTR, cfg.ADD_ATTR, transformCaseFunc);\n }\n\n if (cfg.ADD_URI_SAFE_ATTR) {\n addToSet(URI_SAFE_ATTRIBUTES, cfg.ADD_URI_SAFE_ATTR, transformCaseFunc);\n }\n\n if (cfg.FORBID_CONTENTS) {\n if (FORBID_CONTENTS === DEFAULT_FORBID_CONTENTS) {\n FORBID_CONTENTS = clone(FORBID_CONTENTS);\n }\n\n addToSet(FORBID_CONTENTS, cfg.FORBID_CONTENTS, transformCaseFunc);\n }\n /* Add #text in case KEEP_CONTENT is set to true */\n\n\n if (KEEP_CONTENT) {\n ALLOWED_TAGS['#text'] = true;\n }\n /* Add html, head and body to ALLOWED_TAGS in case WHOLE_DOCUMENT is true */\n\n\n if (WHOLE_DOCUMENT) {\n addToSet(ALLOWED_TAGS, ['html', 'head', 'body']);\n }\n /* Add tbody to ALLOWED_TAGS in case tables are permitted, see #286, #365 */\n\n\n if (ALLOWED_TAGS.table) {\n addToSet(ALLOWED_TAGS, ['tbody']);\n delete FORBID_TAGS.tbody;\n }\n\n if (cfg.TRUSTED_TYPES_POLICY) {\n if (typeof cfg.TRUSTED_TYPES_POLICY.createHTML !== 'function') {\n throw typeErrorCreate('TRUSTED_TYPES_POLICY configuration option must provide a \"createHTML\" hook.');\n }\n\n if (typeof cfg.TRUSTED_TYPES_POLICY.createScriptURL !== 'function') {\n throw typeErrorCreate('TRUSTED_TYPES_POLICY configuration option must provide a \"createScriptURL\" hook.');\n } // Overwrite existing TrustedTypes policy.\n\n\n trustedTypesPolicy = cfg.TRUSTED_TYPES_POLICY; // Sign local variables required by `sanitize`.\n\n emptyHTML = trustedTypesPolicy.createHTML('');\n } else {\n // Uninitialized policy, attempt to initialize the internal dompurify policy.\n if (trustedTypesPolicy === undefined) {\n trustedTypesPolicy = _createTrustedTypesPolicy(trustedTypes, currentScript);\n } // If creating the internal policy succeeded sign internal variables.\n\n\n if (trustedTypesPolicy !== null && typeof emptyHTML === 'string') {\n emptyHTML = trustedTypesPolicy.createHTML('');\n }\n } // Prevent further manipulation of configuration.\n // Not available in IE8, Safari 5, etc.\n\n\n if (freeze) {\n freeze(cfg);\n }\n\n CONFIG = cfg;\n };\n\n const MATHML_TEXT_INTEGRATION_POINTS = addToSet({}, ['mi', 'mo', 'mn', 'ms', 'mtext']);\n const HTML_INTEGRATION_POINTS = addToSet({}, ['foreignobject', 'desc', 'title', 'annotation-xml']); // Certain elements are allowed in both SVG and HTML\n // namespace. We need to specify them explicitly\n // so that they don't get erroneously deleted from\n // HTML namespace.\n\n const COMMON_SVG_AND_HTML_ELEMENTS = addToSet({}, ['title', 'style', 'font', 'a', 'script']);\n /* Keep track of all possible SVG and MathML tags\n * so that we can perform the namespace checks\n * correctly. */\n\n const ALL_SVG_TAGS = addToSet({}, svg$1);\n addToSet(ALL_SVG_TAGS, svgFilters);\n addToSet(ALL_SVG_TAGS, svgDisallowed);\n const ALL_MATHML_TAGS = addToSet({}, mathMl$1);\n addToSet(ALL_MATHML_TAGS, mathMlDisallowed);\n /**\n * @param {Element} element a DOM element whose namespace is being checked\n * @returns {boolean} Return false if the element has a\n * namespace that a spec-compliant parser would never\n * return. Return true otherwise.\n */\n\n const _checkValidNamespace = function _checkValidNamespace(element) {\n let parent = getParentNode(element); // In JSDOM, if we're inside shadow DOM, then parentNode\n // can be null. We just simulate parent in this case.\n\n if (!parent || !parent.tagName) {\n parent = {\n namespaceURI: NAMESPACE,\n tagName: 'template'\n };\n }\n\n const tagName = stringToLowerCase(element.tagName);\n const parentTagName = stringToLowerCase(parent.tagName);\n\n if (!ALLOWED_NAMESPACES[element.namespaceURI]) {\n return false;\n }\n\n if (element.namespaceURI === SVG_NAMESPACE) {\n // The only way to switch from HTML namespace to SVG\n // is via . If it happens via any other tag, then\n // it should be killed.\n if (parent.namespaceURI === HTML_NAMESPACE) {\n return tagName === 'svg';\n } // The only way to switch from MathML to SVG is via`\n // svg if parent is either or MathML\n // text integration points.\n\n\n if (parent.namespaceURI === MATHML_NAMESPACE) {\n return tagName === 'svg' && (parentTagName === 'annotation-xml' || MATHML_TEXT_INTEGRATION_POINTS[parentTagName]);\n } // We only allow elements that are defined in SVG\n // spec. All others are disallowed in SVG namespace.\n\n\n return Boolean(ALL_SVG_TAGS[tagName]);\n }\n\n if (element.namespaceURI === MATHML_NAMESPACE) {\n // The only way to switch from HTML namespace to MathML\n // is via . If it happens via any other tag, then\n // it should be killed.\n if (parent.namespaceURI === HTML_NAMESPACE) {\n return tagName === 'math';\n } // The only way to switch from SVG to MathML is via\n // and HTML integration points\n\n\n if (parent.namespaceURI === SVG_NAMESPACE) {\n return tagName === 'math' && HTML_INTEGRATION_POINTS[parentTagName];\n } // We only allow elements that are defined in MathML\n // spec. All others are disallowed in MathML namespace.\n\n\n return Boolean(ALL_MATHML_TAGS[tagName]);\n }\n\n if (element.namespaceURI === HTML_NAMESPACE) {\n // The only way to switch from SVG to HTML is via\n // HTML integration points, and from MathML to HTML\n // is via MathML text integration points\n if (parent.namespaceURI === SVG_NAMESPACE && !HTML_INTEGRATION_POINTS[parentTagName]) {\n return false;\n }\n\n if (parent.namespaceURI === MATHML_NAMESPACE && !MATHML_TEXT_INTEGRATION_POINTS[parentTagName]) {\n return false;\n } // We disallow tags that are specific for MathML\n // or SVG and should never appear in HTML namespace\n\n\n return !ALL_MATHML_TAGS[tagName] && (COMMON_SVG_AND_HTML_ELEMENTS[tagName] || !ALL_SVG_TAGS[tagName]);\n } // For XHTML and XML documents that support custom namespaces\n\n\n if (PARSER_MEDIA_TYPE === 'application/xhtml+xml' && ALLOWED_NAMESPACES[element.namespaceURI]) {\n return true;\n } // The code should never reach this place (this means\n // that the element somehow got namespace that is not\n // HTML, SVG, MathML or allowed via ALLOWED_NAMESPACES).\n // Return false just in case.\n\n\n return false;\n };\n /**\n * _forceRemove\n *\n * @param {Node} node a DOM node\n */\n\n\n const _forceRemove = function _forceRemove(node) {\n arrayPush(DOMPurify.removed, {\n element: node\n });\n\n try {\n // eslint-disable-next-line unicorn/prefer-dom-node-remove\n node.parentNode.removeChild(node);\n } catch (_) {\n node.remove();\n }\n };\n /**\n * _removeAttribute\n *\n * @param {String} name an Attribute name\n * @param {Node} node a DOM node\n */\n\n\n const _removeAttribute = function _removeAttribute(name, node) {\n try {\n arrayPush(DOMPurify.removed, {\n attribute: node.getAttributeNode(name),\n from: node\n });\n } catch (_) {\n arrayPush(DOMPurify.removed, {\n attribute: null,\n from: node\n });\n }\n\n node.removeAttribute(name); // We void attribute values for unremovable \"is\"\" attributes\n\n if (name === 'is' && !ALLOWED_ATTR[name]) {\n if (RETURN_DOM || RETURN_DOM_FRAGMENT) {\n try {\n _forceRemove(node);\n } catch (_) {}\n } else {\n try {\n node.setAttribute(name, '');\n } catch (_) {}\n }\n }\n };\n /**\n * _initDocument\n *\n * @param {String} dirty a string of dirty markup\n * @return {Document} a DOM, filled with the dirty markup\n */\n\n\n const _initDocument = function _initDocument(dirty) {\n /* Create a HTML document */\n let doc = null;\n let leadingWhitespace = null;\n\n if (FORCE_BODY) {\n dirty = '' + dirty;\n } else {\n /* If FORCE_BODY isn't used, leading whitespace needs to be preserved manually */\n const matches = stringMatch(dirty, /^[\\r\\n\\t ]+/);\n leadingWhitespace = matches && matches[0];\n }\n\n if (PARSER_MEDIA_TYPE === 'application/xhtml+xml' && NAMESPACE === HTML_NAMESPACE) {\n // Root of XHTML doc must contain xmlns declaration (see https://www.w3.org/TR/xhtml1/normative.html#strict)\n dirty = '' + dirty + '';\n }\n\n const dirtyPayload = trustedTypesPolicy ? trustedTypesPolicy.createHTML(dirty) : dirty;\n /*\n * Use the DOMParser API by default, fallback later if needs be\n * DOMParser not work for svg when has multiple root element.\n */\n\n if (NAMESPACE === HTML_NAMESPACE) {\n try {\n doc = new DOMParser().parseFromString(dirtyPayload, PARSER_MEDIA_TYPE);\n } catch (_) {}\n }\n /* Use createHTMLDocument in case DOMParser is not available */\n\n\n if (!doc || !doc.documentElement) {\n doc = implementation.createDocument(NAMESPACE, 'template', null);\n\n try {\n doc.documentElement.innerHTML = IS_EMPTY_INPUT ? emptyHTML : dirtyPayload;\n } catch (_) {// Syntax error if dirtyPayload is invalid xml\n }\n }\n\n const body = doc.body || doc.documentElement;\n\n if (dirty && leadingWhitespace) {\n body.insertBefore(document.createTextNode(leadingWhitespace), body.childNodes[0] || null);\n }\n /* Work on whole document or just its body */\n\n\n if (NAMESPACE === HTML_NAMESPACE) {\n return getElementsByTagName.call(doc, WHOLE_DOCUMENT ? 'html' : 'body')[0];\n }\n\n return WHOLE_DOCUMENT ? doc.documentElement : body;\n };\n /**\n * Creates a NodeIterator object that you can use to traverse filtered lists of nodes or elements in a document.\n *\n * @param {Node} root The root element or node to start traversing on.\n * @return {NodeIterator} The created NodeIterator\n */\n\n\n const _createNodeIterator = function _createNodeIterator(root) {\n return createNodeIterator.call(root.ownerDocument || root, root, // eslint-disable-next-line no-bitwise\n NodeFilter.SHOW_ELEMENT | NodeFilter.SHOW_COMMENT | NodeFilter.SHOW_TEXT, null);\n };\n /**\n * _isClobbered\n *\n * @param {Node} elm element to check for clobbering attacks\n * @return {Boolean} true if clobbered, false if safe\n */\n\n\n const _isClobbered = function _isClobbered(elm) {\n return elm instanceof HTMLFormElement && (typeof elm.nodeName !== 'string' || typeof elm.textContent !== 'string' || typeof elm.removeChild !== 'function' || !(elm.attributes instanceof NamedNodeMap) || typeof elm.removeAttribute !== 'function' || typeof elm.setAttribute !== 'function' || typeof elm.namespaceURI !== 'string' || typeof elm.insertBefore !== 'function' || typeof elm.hasChildNodes !== 'function');\n };\n /**\n * Checks whether the given object is a DOM node.\n *\n * @param {Node} object object to check whether it's a DOM node\n * @return {Boolean} true is object is a DOM node\n */\n\n\n const _isNode = function _isNode(object) {\n return typeof Node === 'function' && object instanceof Node;\n };\n /**\n * _executeHook\n * Execute user configurable hooks\n *\n * @param {String} entryPoint Name of the hook's entry point\n * @param {Node} currentNode node to work on with the hook\n * @param {Object} data additional hook parameters\n */\n\n\n const _executeHook = function _executeHook(entryPoint, currentNode, data) {\n if (!hooks[entryPoint]) {\n return;\n }\n\n arrayForEach(hooks[entryPoint], hook => {\n hook.call(DOMPurify, currentNode, data, CONFIG);\n });\n };\n /**\n * _sanitizeElements\n *\n * @protect nodeName\n * @protect textContent\n * @protect removeChild\n *\n * @param {Node} currentNode to check for permission to exist\n * @return {Boolean} true if node was killed, false if left alive\n */\n\n\n const _sanitizeElements = function _sanitizeElements(currentNode) {\n let content = null;\n /* Execute a hook if present */\n\n _executeHook('beforeSanitizeElements', currentNode, null);\n /* Check if element is clobbered or can clobber */\n\n\n if (_isClobbered(currentNode)) {\n _forceRemove(currentNode);\n\n return true;\n }\n /* Now let's check the element's type and name */\n\n\n const tagName = transformCaseFunc(currentNode.nodeName);\n /* Execute a hook if present */\n\n _executeHook('uponSanitizeElement', currentNode, {\n tagName,\n allowedTags: ALLOWED_TAGS\n });\n /* Detect mXSS attempts abusing namespace confusion */\n\n\n if (currentNode.hasChildNodes() && !_isNode(currentNode.firstElementChild) && regExpTest(/<[/\\w]/g, currentNode.innerHTML) && regExpTest(/<[/\\w]/g, currentNode.textContent)) {\n _forceRemove(currentNode);\n\n return true;\n }\n /* Remove element if anything forbids its presence */\n\n\n if (!ALLOWED_TAGS[tagName] || FORBID_TAGS[tagName]) {\n /* Check if we have a custom element to handle */\n if (!FORBID_TAGS[tagName] && _isBasicCustomElement(tagName)) {\n if (CUSTOM_ELEMENT_HANDLING.tagNameCheck instanceof RegExp && regExpTest(CUSTOM_ELEMENT_HANDLING.tagNameCheck, tagName)) {\n return false;\n }\n\n if (CUSTOM_ELEMENT_HANDLING.tagNameCheck instanceof Function && CUSTOM_ELEMENT_HANDLING.tagNameCheck(tagName)) {\n return false;\n }\n }\n /* Keep content except for bad-listed elements */\n\n\n if (KEEP_CONTENT && !FORBID_CONTENTS[tagName]) {\n const parentNode = getParentNode(currentNode) || currentNode.parentNode;\n const childNodes = getChildNodes(currentNode) || currentNode.childNodes;\n\n if (childNodes && parentNode) {\n const childCount = childNodes.length;\n\n for (let i = childCount - 1; i >= 0; --i) {\n parentNode.insertBefore(cloneNode(childNodes[i], true), getNextSibling(currentNode));\n }\n }\n }\n\n _forceRemove(currentNode);\n\n return true;\n }\n /* Check whether element has a valid namespace */\n\n\n if (currentNode instanceof Element && !_checkValidNamespace(currentNode)) {\n _forceRemove(currentNode);\n\n return true;\n }\n /* Make sure that older browsers don't get fallback-tag mXSS */\n\n\n if ((tagName === 'noscript' || tagName === 'noembed' || tagName === 'noframes') && regExpTest(/<\\/no(script|embed|frames)/i, currentNode.innerHTML)) {\n _forceRemove(currentNode);\n\n return true;\n }\n /* Sanitize element content to be template-safe */\n\n\n if (SAFE_FOR_TEMPLATES && currentNode.nodeType === 3) {\n /* Get the element's text content */\n content = currentNode.textContent;\n arrayForEach([MUSTACHE_EXPR, ERB_EXPR, TMPLIT_EXPR], expr => {\n content = stringReplace(content, expr, ' ');\n });\n\n if (currentNode.textContent !== content) {\n arrayPush(DOMPurify.removed, {\n element: currentNode.cloneNode()\n });\n currentNode.textContent = content;\n }\n }\n /* Execute a hook if present */\n\n\n _executeHook('afterSanitizeElements', currentNode, null);\n\n return false;\n };\n /**\n * _isValidAttribute\n *\n * @param {string} lcTag Lowercase tag name of containing element.\n * @param {string} lcName Lowercase attribute name.\n * @param {string} value Attribute value.\n * @return {Boolean} Returns true if `value` is valid, otherwise false.\n */\n // eslint-disable-next-line complexity\n\n\n const _isValidAttribute = function _isValidAttribute(lcTag, lcName, value) {\n /* Make sure attribute cannot clobber */\n if (SANITIZE_DOM && (lcName === 'id' || lcName === 'name') && (value in document || value in formElement)) {\n return false;\n }\n /* Allow valid data-* attributes: At least one character after \"-\"\n (https://html.spec.whatwg.org/multipage/dom.html#embedding-custom-non-visible-data-with-the-data-*-attributes)\n XML-compatible (https://html.spec.whatwg.org/multipage/infrastructure.html#xml-compatible and http://www.w3.org/TR/xml/#d0e804)\n We don't need to check the value; it's always URI safe. */\n\n\n if (ALLOW_DATA_ATTR && !FORBID_ATTR[lcName] && regExpTest(DATA_ATTR, lcName)) ; else if (ALLOW_ARIA_ATTR && regExpTest(ARIA_ATTR, lcName)) ; else if (!ALLOWED_ATTR[lcName] || FORBID_ATTR[lcName]) {\n if ( // First condition does a very basic check if a) it's basically a valid custom element tagname AND\n // b) if the tagName passes whatever the user has configured for CUSTOM_ELEMENT_HANDLING.tagNameCheck\n // and c) if the attribute name passes whatever the user has configured for CUSTOM_ELEMENT_HANDLING.attributeNameCheck\n _isBasicCustomElement(lcTag) && (CUSTOM_ELEMENT_HANDLING.tagNameCheck instanceof RegExp && regExpTest(CUSTOM_ELEMENT_HANDLING.tagNameCheck, lcTag) || CUSTOM_ELEMENT_HANDLING.tagNameCheck instanceof Function && CUSTOM_ELEMENT_HANDLING.tagNameCheck(lcTag)) && (CUSTOM_ELEMENT_HANDLING.attributeNameCheck instanceof RegExp && regExpTest(CUSTOM_ELEMENT_HANDLING.attributeNameCheck, lcName) || CUSTOM_ELEMENT_HANDLING.attributeNameCheck instanceof Function && CUSTOM_ELEMENT_HANDLING.attributeNameCheck(lcName)) || // Alternative, second condition checks if it's an `is`-attribute, AND\n // the value passes whatever the user has configured for CUSTOM_ELEMENT_HANDLING.tagNameCheck\n lcName === 'is' && CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements && (CUSTOM_ELEMENT_HANDLING.tagNameCheck instanceof RegExp && regExpTest(CUSTOM_ELEMENT_HANDLING.tagNameCheck, value) || CUSTOM_ELEMENT_HANDLING.tagNameCheck instanceof Function && CUSTOM_ELEMENT_HANDLING.tagNameCheck(value))) ; else {\n return false;\n }\n /* Check value is safe. First, is attr inert? If so, is safe */\n\n } else if (URI_SAFE_ATTRIBUTES[lcName]) ; else if (regExpTest(IS_ALLOWED_URI$1, stringReplace(value, ATTR_WHITESPACE, ''))) ; else if ((lcName === 'src' || lcName === 'xlink:href' || lcName === 'href') && lcTag !== 'script' && stringIndexOf(value, 'data:') === 0 && DATA_URI_TAGS[lcTag]) ; else if (ALLOW_UNKNOWN_PROTOCOLS && !regExpTest(IS_SCRIPT_OR_DATA, stringReplace(value, ATTR_WHITESPACE, ''))) ; else if (value) {\n return false;\n } else ;\n\n return true;\n };\n /**\n * _isBasicCustomElement\n * checks if at least one dash is included in tagName, and it's not the first char\n * for more sophisticated checking see https://github.com/sindresorhus/validate-element-name\n *\n * @param {string} tagName name of the tag of the node to sanitize\n * @returns {boolean} Returns true if the tag name meets the basic criteria for a custom element, otherwise false.\n */\n\n\n const _isBasicCustomElement = function _isBasicCustomElement(tagName) {\n return tagName.indexOf('-') > 0;\n };\n /**\n * _sanitizeAttributes\n *\n * @protect attributes\n * @protect nodeName\n * @protect removeAttribute\n * @protect setAttribute\n *\n * @param {Node} currentNode to sanitize\n */\n\n\n const _sanitizeAttributes = function _sanitizeAttributes(currentNode) {\n /* Execute a hook if present */\n _executeHook('beforeSanitizeAttributes', currentNode, null);\n\n const {\n attributes\n } = currentNode;\n /* Check if we have attributes; if not we might have a text node */\n\n if (!attributes) {\n return;\n }\n\n const hookEvent = {\n attrName: '',\n attrValue: '',\n keepAttr: true,\n allowedAttributes: ALLOWED_ATTR\n };\n let l = attributes.length;\n /* Go backwards over all attributes; safely remove bad ones */\n\n while (l--) {\n const attr = attributes[l];\n const {\n name,\n namespaceURI,\n value: attrValue\n } = attr;\n const lcName = transformCaseFunc(name);\n let value = name === 'value' ? attrValue : stringTrim(attrValue);\n /* Execute a hook if present */\n\n hookEvent.attrName = lcName;\n hookEvent.attrValue = value;\n hookEvent.keepAttr = true;\n hookEvent.forceKeepAttr = undefined; // Allows developers to see this is a property they can set\n\n _executeHook('uponSanitizeAttribute', currentNode, hookEvent);\n\n value = hookEvent.attrValue;\n /* Did the hooks approve of the attribute? */\n\n if (hookEvent.forceKeepAttr) {\n continue;\n }\n /* Remove attribute */\n\n\n _removeAttribute(name, currentNode);\n /* Did the hooks approve of the attribute? */\n\n\n if (!hookEvent.keepAttr) {\n continue;\n }\n /* Work around a security issue in jQuery 3.0 */\n\n\n if (!ALLOW_SELF_CLOSE_IN_ATTR && regExpTest(/\\/>/i, value)) {\n _removeAttribute(name, currentNode);\n\n continue;\n }\n /* Sanitize attribute content to be template-safe */\n\n\n if (SAFE_FOR_TEMPLATES) {\n arrayForEach([MUSTACHE_EXPR, ERB_EXPR, TMPLIT_EXPR], expr => {\n value = stringReplace(value, expr, ' ');\n });\n }\n /* Is `value` valid for this attribute? */\n\n\n const lcTag = transformCaseFunc(currentNode.nodeName);\n\n if (!_isValidAttribute(lcTag, lcName, value)) {\n continue;\n }\n /* Full DOM Clobbering protection via namespace isolation,\n * Prefix id and name attributes with `user-content-`\n */\n\n\n if (SANITIZE_NAMED_PROPS && (lcName === 'id' || lcName === 'name')) {\n // Remove the attribute with this value\n _removeAttribute(name, currentNode); // Prefix the value and later re-create the attribute with the sanitized value\n\n\n value = SANITIZE_NAMED_PROPS_PREFIX + value;\n }\n /* Handle attributes that require Trusted Types */\n\n\n if (trustedTypesPolicy && typeof trustedTypes === 'object' && typeof trustedTypes.getAttributeType === 'function') {\n if (namespaceURI) ; else {\n switch (trustedTypes.getAttributeType(lcTag, lcName)) {\n case 'TrustedHTML':\n {\n value = trustedTypesPolicy.createHTML(value);\n break;\n }\n\n case 'TrustedScriptURL':\n {\n value = trustedTypesPolicy.createScriptURL(value);\n break;\n }\n }\n }\n }\n /* Handle invalid data-* attribute set by try-catching it */\n\n\n try {\n if (namespaceURI) {\n currentNode.setAttributeNS(namespaceURI, name, value);\n } else {\n /* Fallback to setAttribute() for browser-unrecognized namespaces e.g. \"x-schema\". */\n currentNode.setAttribute(name, value);\n }\n\n arrayPop(DOMPurify.removed);\n } catch (_) {}\n }\n /* Execute a hook if present */\n\n\n _executeHook('afterSanitizeAttributes', currentNode, null);\n };\n /**\n * _sanitizeShadowDOM\n *\n * @param {DocumentFragment} fragment to iterate over recursively\n */\n\n\n const _sanitizeShadowDOM = function _sanitizeShadowDOM(fragment) {\n let shadowNode = null;\n\n const shadowIterator = _createNodeIterator(fragment);\n /* Execute a hook if present */\n\n\n _executeHook('beforeSanitizeShadowDOM', fragment, null);\n\n while (shadowNode = shadowIterator.nextNode()) {\n /* Execute a hook if present */\n _executeHook('uponSanitizeShadowNode', shadowNode, null);\n /* Sanitize tags and elements */\n\n\n if (_sanitizeElements(shadowNode)) {\n continue;\n }\n /* Deep shadow DOM detected */\n\n\n if (shadowNode.content instanceof DocumentFragment) {\n _sanitizeShadowDOM(shadowNode.content);\n }\n /* Check attributes, sanitize if necessary */\n\n\n _sanitizeAttributes(shadowNode);\n }\n /* Execute a hook if present */\n\n\n _executeHook('afterSanitizeShadowDOM', fragment, null);\n };\n /**\n * Sanitize\n * Public method providing core sanitation functionality\n *\n * @param {String|Node} dirty string or DOM node\n * @param {Object} cfg object\n */\n // eslint-disable-next-line complexity\n\n\n DOMPurify.sanitize = function (dirty) {\n let cfg = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n let body = null;\n let importedNode = null;\n let currentNode = null;\n let returnNode = null;\n /* Make sure we have a string to sanitize.\n DO NOT return early, as this will return the wrong type if\n the user has requested a DOM object rather than a string */\n\n IS_EMPTY_INPUT = !dirty;\n\n if (IS_EMPTY_INPUT) {\n dirty = '\x3c!--\x3e';\n }\n /* Stringify, in case dirty is an object */\n\n\n if (typeof dirty !== 'string' && !_isNode(dirty)) {\n if (typeof dirty.toString === 'function') {\n dirty = dirty.toString();\n\n if (typeof dirty !== 'string') {\n throw typeErrorCreate('dirty is not a string, aborting');\n }\n } else {\n throw typeErrorCreate('toString is not a function');\n }\n }\n /* Return dirty HTML if DOMPurify cannot run */\n\n\n if (!DOMPurify.isSupported) {\n return dirty;\n }\n /* Assign config vars */\n\n\n if (!SET_CONFIG) {\n _parseConfig(cfg);\n }\n /* Clean up removed elements */\n\n\n DOMPurify.removed = [];\n /* Check if dirty is correctly typed for IN_PLACE */\n\n if (typeof dirty === 'string') {\n IN_PLACE = false;\n }\n\n if (IN_PLACE) {\n /* Do some early pre-sanitization to avoid unsafe root nodes */\n if (dirty.nodeName) {\n const tagName = transformCaseFunc(dirty.nodeName);\n\n if (!ALLOWED_TAGS[tagName] || FORBID_TAGS[tagName]) {\n throw typeErrorCreate('root node is forbidden and cannot be sanitized in-place');\n }\n }\n } else if (dirty instanceof Node) {\n /* If dirty is a DOM element, append to an empty document to avoid\n elements being stripped by the parser */\n body = _initDocument('\x3c!----\x3e');\n importedNode = body.ownerDocument.importNode(dirty, true);\n\n if (importedNode.nodeType === 1 && importedNode.nodeName === 'BODY') {\n /* Node is already a body, use as is */\n body = importedNode;\n } else if (importedNode.nodeName === 'HTML') {\n body = importedNode;\n } else {\n // eslint-disable-next-line unicorn/prefer-dom-node-append\n body.appendChild(importedNode);\n }\n } else {\n /* Exit directly if we have nothing to do */\n if (!RETURN_DOM && !SAFE_FOR_TEMPLATES && !WHOLE_DOCUMENT && // eslint-disable-next-line unicorn/prefer-includes\n dirty.indexOf('<') === -1) {\n return trustedTypesPolicy && RETURN_TRUSTED_TYPE ? trustedTypesPolicy.createHTML(dirty) : dirty;\n }\n /* Initialize the document to work on */\n\n\n body = _initDocument(dirty);\n /* Check we have a DOM node from the data */\n\n if (!body) {\n return RETURN_DOM ? null : RETURN_TRUSTED_TYPE ? emptyHTML : '';\n }\n }\n /* Remove first element node (ours) if FORCE_BODY is set */\n\n\n if (body && FORCE_BODY) {\n _forceRemove(body.firstChild);\n }\n /* Get node iterator */\n\n\n const nodeIterator = _createNodeIterator(IN_PLACE ? dirty : body);\n /* Now start iterating over the created document */\n\n\n while (currentNode = nodeIterator.nextNode()) {\n /* Sanitize tags and elements */\n if (_sanitizeElements(currentNode)) {\n continue;\n }\n /* Shadow DOM detected, sanitize it */\n\n\n if (currentNode.content instanceof DocumentFragment) {\n _sanitizeShadowDOM(currentNode.content);\n }\n /* Check attributes, sanitize if necessary */\n\n\n _sanitizeAttributes(currentNode);\n }\n /* If we sanitized `dirty` in-place, return it. */\n\n\n if (IN_PLACE) {\n return dirty;\n }\n /* Return sanitized string or DOM */\n\n\n if (RETURN_DOM) {\n if (RETURN_DOM_FRAGMENT) {\n returnNode = createDocumentFragment.call(body.ownerDocument);\n\n while (body.firstChild) {\n // eslint-disable-next-line unicorn/prefer-dom-node-append\n returnNode.appendChild(body.firstChild);\n }\n } else {\n returnNode = body;\n }\n\n if (ALLOWED_ATTR.shadowroot || ALLOWED_ATTR.shadowrootmode) {\n /*\n AdoptNode() is not used because internal state is not reset\n (e.g. the past names map of a HTMLFormElement), this is safe\n in theory but we would rather not risk another attack vector.\n The state that is cloned by importNode() is explicitly defined\n by the specs.\n */\n returnNode = importNode.call(originalDocument, returnNode, true);\n }\n\n return returnNode;\n }\n\n let serializedHTML = WHOLE_DOCUMENT ? body.outerHTML : body.innerHTML;\n /* Serialize doctype if allowed */\n\n if (WHOLE_DOCUMENT && ALLOWED_TAGS['!doctype'] && body.ownerDocument && body.ownerDocument.doctype && body.ownerDocument.doctype.name && regExpTest(DOCTYPE_NAME, body.ownerDocument.doctype.name)) {\n serializedHTML = '\\n' + serializedHTML;\n }\n /* Sanitize final string template-safe */\n\n\n if (SAFE_FOR_TEMPLATES) {\n arrayForEach([MUSTACHE_EXPR, ERB_EXPR, TMPLIT_EXPR], expr => {\n serializedHTML = stringReplace(serializedHTML, expr, ' ');\n });\n }\n\n return trustedTypesPolicy && RETURN_TRUSTED_TYPE ? trustedTypesPolicy.createHTML(serializedHTML) : serializedHTML;\n };\n /**\n * Public method to set the configuration once\n * setConfig\n *\n * @param {Object} cfg configuration object\n */\n\n\n DOMPurify.setConfig = function () {\n let cfg = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n\n _parseConfig(cfg);\n\n SET_CONFIG = true;\n };\n /**\n * Public method to remove the configuration\n * clearConfig\n *\n */\n\n\n DOMPurify.clearConfig = function () {\n CONFIG = null;\n SET_CONFIG = false;\n };\n /**\n * Public method to check if an attribute value is valid.\n * Uses last set config, if any. Otherwise, uses config defaults.\n * isValidAttribute\n *\n * @param {String} tag Tag name of containing element.\n * @param {String} attr Attribute name.\n * @param {String} value Attribute value.\n * @return {Boolean} Returns true if `value` is valid. Otherwise, returns false.\n */\n\n\n DOMPurify.isValidAttribute = function (tag, attr, value) {\n /* Initialize shared config vars if necessary. */\n if (!CONFIG) {\n _parseConfig({});\n }\n\n const lcTag = transformCaseFunc(tag);\n const lcName = transformCaseFunc(attr);\n return _isValidAttribute(lcTag, lcName, value);\n };\n /**\n * AddHook\n * Public method to add DOMPurify hooks\n *\n * @param {String} entryPoint entry point for the hook to add\n * @param {Function} hookFunction function to execute\n */\n\n\n DOMPurify.addHook = function (entryPoint, hookFunction) {\n if (typeof hookFunction !== 'function') {\n return;\n }\n\n hooks[entryPoint] = hooks[entryPoint] || [];\n arrayPush(hooks[entryPoint], hookFunction);\n };\n /**\n * RemoveHook\n * Public method to remove a DOMPurify hook at a given entryPoint\n * (pops it from the stack of hooks if more are present)\n *\n * @param {String} entryPoint entry point for the hook to remove\n * @return {Function} removed(popped) hook\n */\n\n\n DOMPurify.removeHook = function (entryPoint) {\n if (hooks[entryPoint]) {\n return arrayPop(hooks[entryPoint]);\n }\n };\n /**\n * RemoveHooks\n * Public method to remove all DOMPurify hooks at a given entryPoint\n *\n * @param {String} entryPoint entry point for the hooks to remove\n */\n\n\n DOMPurify.removeHooks = function (entryPoint) {\n if (hooks[entryPoint]) {\n hooks[entryPoint] = [];\n }\n };\n /**\n * RemoveAllHooks\n * Public method to remove all DOMPurify hooks\n */\n\n\n DOMPurify.removeAllHooks = function () {\n hooks = {};\n };\n\n return DOMPurify;\n }\n\n var purify = createDOMPurify();\n\n return purify;\n\n}));\n//# sourceMappingURL=purify.js.map\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiODU2LmpzIiwibWFwcGluZ3MiOiJBQUFBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFFQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO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0eXBlb2YgdHJ1c3RlZFR5cGVzID09PSAnb2JqZWN0JyAmJiB0eXBlb2YgdHJ1c3RlZFR5cGVzLmdldEF0dHJpYnV0ZVR5cGUgPT09ICdmdW5jdGlvbicpIHtcbiAgICAgICAgICBpZiAobmFtZXNwYWNlVVJJKSA7IGVsc2Uge1xuICAgICAgICAgICAgc3dpdGNoICh0cnVzdGVkVHlwZXMuZ2V0QXR0cmlidXRlVHlwZShsY1RhZywgbGNOYW1lKSkge1xuICAgICAgICAgICAgICBjYXNlICdUcnVzdGVkSFRNTCc6XG4gICAgICAgICAgICAgICAge1xuICAgICAgICAgICAgICAgICAgdmFsdWUgPSB0cnVzdGVkVHlwZXNQb2xpY3kuY3JlYXRlSFRNTCh2YWx1ZSk7XG4gICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICB9XG5cbiAgICAgICAgICAgICAgY2FzZSAnVHJ1c3RlZFNjcmlwdFVSTCc6XG4gICAgICAgICAgICAgICAge1xuICAgICAgICAgICAgICAgICAgdmFsdWUgPSB0cnVzdGVkVHlwZXNQb2xpY3kuY3JlYXRlU2NyaXB0VVJMKHZhbHVlKTtcbiAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH1cbiAgICAgICAgICB9XG4gICAgICAgIH1cbiAgICAgICAgLyogSGFuZGxlIGludmFsaWQgZGF0YS0qIGF0dHJpYnV0ZSBzZXQgYnkgdHJ5LWNhdGNoaW5nIGl0ICovXG5cblxuICAgICAgICB0cnkge1xuICAgICAgICAgIGlmIChuYW1lc3BhY2VVUkkpIHtcbiAgICAgICAgICAgIGN1cnJlbnROb2RlLnNldEF0dHJpYnV0ZU5TKG5hbWVzcGFjZVVSSSwgbmFtZSwgdmFsdWUpO1xuICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAvKiBGYWxsYmFjayB0byBzZXRBdHRyaWJ1dGUoKSBmb3IgYnJvd3Nlci11bnJlY29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xuICAgIC8qKlxuICAgICAqIFJlbW92ZUFsbEhvb2tzXG4gICAgICogUHVibGljIG1ldGhvZCB0byByZW1vdmUgYWxsIERPTVB1cmlmeSBob29rc1xuICAgICAqL1xuXG5cbiAgICBET01QdXJpZnkucmVtb3ZlQWxsSG9va3MgPSBmdW5jdGlvbiAoKSB7XG4gICAgICBob29rcyA9IHt9O1xuICAgIH07XG5cbiAgICByZXR1cm4gRE9NUHVyaWZ5O1xuICB9XG5cbiAgdmFyIHB1cmlmeSA9IGNyZWF0ZURPTVB1cmlmeSgpO1xuXG4gIHJldHVybiBwdXJpZnk7XG5cbn0pKTtcbi8vIyBzb3VyY2VNYXBwaW5nVVJMPXB1cmlmeS5qcy5tYXBcbiJdLCJuYW1lcyI6W10sInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///856\n")},448:(__unused_webpack_module,exports,__webpack_require__)=>{"use strict";eval('/**\n * @license React\n * react-dom.production.min.js\n *\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n/*\n Modernizr 3.0.0pre (Custom Build) | MIT\n*/\nvar aa=__webpack_require__(294),ca=__webpack_require__(840);function p(a){for(var b="https://reactjs.org/docs/error-decoder.html?invariant="+a,c=1;cb}return!1}function v(a,b,c,d,e,f,g){this.acceptsBooleans=2===b||3===b||4===b;this.attributeName=d;this.attributeNamespace=e;this.mustUseProperty=c;this.propertyName=a;this.type=b;this.sanitizeURL=f;this.removeEmptyString=g}var z={};\n"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(a){z[a]=new v(a,0,!1,a,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(a){var b=a[0];z[b]=new v(b,1,!1,a[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(a){z[a]=new v(a,2,!1,a.toLowerCase(),null,!1,!1)});\n["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(a){z[a]=new v(a,2,!1,a,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(a){z[a]=new v(a,3,!1,a.toLowerCase(),null,!1,!1)});\n["checked","multiple","muted","selected"].forEach(function(a){z[a]=new v(a,3,!0,a,null,!1,!1)});["capture","download"].forEach(function(a){z[a]=new v(a,4,!1,a,null,!1,!1)});["cols","rows","size","span"].forEach(function(a){z[a]=new v(a,6,!1,a,null,!1,!1)});["rowSpan","start"].forEach(function(a){z[a]=new v(a,5,!1,a.toLowerCase(),null,!1,!1)});var ra=/[\\-:]([a-z])/g;function sa(a){return a[1].toUpperCase()}\n"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(a){var b=a.replace(ra,\nsa);z[b]=new v(b,1,!1,a,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(a){var b=a.replace(ra,sa);z[b]=new v(b,1,!1,a,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(a){var b=a.replace(ra,sa);z[b]=new v(b,1,!1,a,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(a){z[a]=new v(a,1,!1,a.toLowerCase(),null,!1,!1)});\nz.xlinkHref=new v("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(a){z[a]=new v(a,1,!1,a.toLowerCase(),null,!0,!0)});\nfunction ta(a,b,c,d){var e=z.hasOwnProperty(b)?z[b]:null;if(null!==e?0!==e.type:d||!(2h||e[g]!==f[h]){var k="\\n"+e[g].replace(" at new "," at ");a.displayName&&k.includes("")&&(k=k.replace("",a.displayName));return k}while(1<=g&&0<=h)}break}}}finally{Na=!1,Error.prepareStackTrace=c}return(a=a?a.displayName||a.name:"")?Ma(a):""}\nfunction Pa(a){switch(a.tag){case 5:return Ma(a.type);case 16:return Ma("Lazy");case 13:return Ma("Suspense");case 19:return Ma("SuspenseList");case 0:case 2:case 15:return a=Oa(a.type,!1),a;case 11:return a=Oa(a.type.render,!1),a;case 1:return a=Oa(a.type,!0),a;default:return""}}\nfunction Qa(a){if(null==a)return null;if("function"===typeof a)return a.displayName||a.name||null;if("string"===typeof a)return a;switch(a){case ya:return"Fragment";case wa:return"Portal";case Aa:return"Profiler";case za:return"StrictMode";case Ea:return"Suspense";case Fa:return"SuspenseList"}if("object"===typeof a)switch(a.$$typeof){case Ca:return(a.displayName||"Context")+".Consumer";case Ba:return(a._context.displayName||"Context")+".Provider";case Da:var b=a.render;a=a.displayName;a||(a=b.displayName||\nb.name||"",a=""!==a?"ForwardRef("+a+")":"ForwardRef");return a;case Ga:return b=a.displayName||null,null!==b?b:Qa(a.type)||"Memo";case Ha:b=a._payload;a=a._init;try{return Qa(a(b))}catch(c){}}return null}\nfunction Ra(a){var b=a.type;switch(a.tag){case 24:return"Cache";case 9:return(b.displayName||"Context")+".Consumer";case 10:return(b._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return a=b.render,a=a.displayName||a.name||"",b.displayName||(""!==a?"ForwardRef("+a+")":"ForwardRef");case 7:return"Fragment";case 5:return b;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return Qa(b);case 8:return b===za?"StrictMode":"Mode";case 22:return"Offscreen";\ncase 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if("function"===typeof b)return b.displayName||b.name||null;if("string"===typeof b)return b}return null}function Sa(a){switch(typeof a){case "boolean":case "number":case "string":case "undefined":return a;case "object":return a;default:return""}}\nfunction Ta(a){var b=a.type;return(a=a.nodeName)&&"input"===a.toLowerCase()&&("checkbox"===b||"radio"===b)}\nfunction Ua(a){var b=Ta(a)?"checked":"value",c=Object.getOwnPropertyDescriptor(a.constructor.prototype,b),d=""+a[b];if(!a.hasOwnProperty(b)&&"undefined"!==typeof c&&"function"===typeof c.get&&"function"===typeof c.set){var e=c.get,f=c.set;Object.defineProperty(a,b,{configurable:!0,get:function(){return e.call(this)},set:function(a){d=""+a;f.call(this,a)}});Object.defineProperty(a,b,{enumerable:c.enumerable});return{getValue:function(){return d},setValue:function(a){d=""+a},stopTracking:function(){a._valueTracker=\nnull;delete a[b]}}}}function Va(a){a._valueTracker||(a._valueTracker=Ua(a))}function Wa(a){if(!a)return!1;var b=a._valueTracker;if(!b)return!0;var c=b.getValue();var d="";a&&(d=Ta(a)?a.checked?"true":"false":a.value);a=d;return a!==c?(b.setValue(a),!0):!1}function Xa(a){a=a||("undefined"!==typeof document?document:void 0);if("undefined"===typeof a)return null;try{return a.activeElement||a.body}catch(b){return a.body}}\nfunction Ya(a,b){var c=b.checked;return A({},b,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:null!=c?c:a._wrapperState.initialChecked})}function Za(a,b){var c=null==b.defaultValue?"":b.defaultValue,d=null!=b.checked?b.checked:b.defaultChecked;c=Sa(null!=b.value?b.value:c);a._wrapperState={initialChecked:d,initialValue:c,controlled:"checkbox"===b.type||"radio"===b.type?null!=b.checked:null!=b.value}}function ab(a,b){b=b.checked;null!=b&&ta(a,"checked",b,!1)}\nfunction bb(a,b){ab(a,b);var c=Sa(b.value),d=b.type;if(null!=c)if("number"===d){if(0===c&&""===a.value||a.value!=c)a.value=""+c}else a.value!==""+c&&(a.value=""+c);else if("submit"===d||"reset"===d){a.removeAttribute("value");return}b.hasOwnProperty("value")?cb(a,b.type,c):b.hasOwnProperty("defaultValue")&&cb(a,b.type,Sa(b.defaultValue));null==b.checked&&null!=b.defaultChecked&&(a.defaultChecked=!!b.defaultChecked)}\nfunction db(a,b,c){if(b.hasOwnProperty("value")||b.hasOwnProperty("defaultValue")){var d=b.type;if(!("submit"!==d&&"reset"!==d||void 0!==b.value&&null!==b.value))return;b=""+a._wrapperState.initialValue;c||b===a.value||(a.value=b);a.defaultValue=b}c=a.name;""!==c&&(a.name="");a.defaultChecked=!!a._wrapperState.initialChecked;""!==c&&(a.name=c)}\nfunction cb(a,b,c){if("number"!==b||Xa(a.ownerDocument)!==a)null==c?a.defaultValue=""+a._wrapperState.initialValue:a.defaultValue!==""+c&&(a.defaultValue=""+c)}var eb=Array.isArray;\nfunction fb(a,b,c,d){a=a.options;if(b){b={};for(var e=0;e"+b.valueOf().toString()+"";for(b=mb.firstChild;a.firstChild;)a.removeChild(a.firstChild);for(;b.firstChild;)a.appendChild(b.firstChild)}});\nfunction ob(a,b){if(b){var c=a.firstChild;if(c&&c===a.lastChild&&3===c.nodeType){c.nodeValue=b;return}}a.textContent=b}\nvar pb={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,\nzoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},qb=["Webkit","ms","Moz","O"];Object.keys(pb).forEach(function(a){qb.forEach(function(b){b=b+a.charAt(0).toUpperCase()+a.substring(1);pb[b]=pb[a]})});function rb(a,b,c){return null==b||"boolean"===typeof b||""===b?"":c||"number"!==typeof b||0===b||pb.hasOwnProperty(a)&&pb[a]?(""+b).trim():b+"px"}\nfunction sb(a,b){a=a.style;for(var c in b)if(b.hasOwnProperty(c)){var d=0===c.indexOf("--"),e=rb(c,b[c],d);"float"===c&&(c="cssFloat");d?a.setProperty(c,e):a[c]=e}}var tb=A({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});\nfunction ub(a,b){if(b){if(tb[a]&&(null!=b.children||null!=b.dangerouslySetInnerHTML))throw Error(p(137,a));if(null!=b.dangerouslySetInnerHTML){if(null!=b.children)throw Error(p(60));if("object"!==typeof b.dangerouslySetInnerHTML||!("__html"in b.dangerouslySetInnerHTML))throw Error(p(61));}if(null!=b.style&&"object"!==typeof b.style)throw Error(p(62));}}\nfunction vb(a,b){if(-1===a.indexOf("-"))return"string"===typeof b.is;switch(a){case "annotation-xml":case "color-profile":case "font-face":case "font-face-src":case "font-face-uri":case "font-face-format":case "font-face-name":case "missing-glyph":return!1;default:return!0}}var wb=null;function xb(a){a=a.target||a.srcElement||window;a.correspondingUseElement&&(a=a.correspondingUseElement);return 3===a.nodeType?a.parentNode:a}var yb=null,zb=null,Ab=null;\nfunction Bb(a){if(a=Cb(a)){if("function"!==typeof yb)throw Error(p(280));var b=a.stateNode;b&&(b=Db(b),yb(a.stateNode,a.type,b))}}function Eb(a){zb?Ab?Ab.push(a):Ab=[a]:zb=a}function Fb(){if(zb){var a=zb,b=Ab;Ab=zb=null;Bb(a);if(b)for(a=0;a>>=0;return 0===a?32:31-(pc(a)/qc|0)|0}var rc=64,sc=4194304;\nfunction tc(a){switch(a&-a){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return a&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return a&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;\ndefault:return a}}function uc(a,b){var c=a.pendingLanes;if(0===c)return 0;var d=0,e=a.suspendedLanes,f=a.pingedLanes,g=c&268435455;if(0!==g){var h=g&~e;0!==h?d=tc(h):(f&=g,0!==f&&(d=tc(f)))}else g=c&~e,0!==g?d=tc(g):0!==f&&(d=tc(f));if(0===d)return 0;if(0!==b&&b!==d&&0===(b&e)&&(e=d&-d,f=b&-b,e>=f||16===e&&0!==(f&4194240)))return b;0!==(d&4)&&(d|=c&16);b=a.entangledLanes;if(0!==b)for(a=a.entanglements,b&=d;0c;c++)b.push(a);return b}\nfunction Ac(a,b,c){a.pendingLanes|=b;536870912!==b&&(a.suspendedLanes=0,a.pingedLanes=0);a=a.eventTimes;b=31-oc(b);a[b]=c}function Bc(a,b){var c=a.pendingLanes&~b;a.pendingLanes=b;a.suspendedLanes=0;a.pingedLanes=0;a.expiredLanes&=b;a.mutableReadLanes&=b;a.entangledLanes&=b;b=a.entanglements;var d=a.eventTimes;for(a=a.expirationTimes;0=be),ee=String.fromCharCode(32),fe=!1;\nfunction ge(a,b){switch(a){case "keyup":return-1!==$d.indexOf(b.keyCode);case "keydown":return 229!==b.keyCode;case "keypress":case "mousedown":case "focusout":return!0;default:return!1}}function he(a){a=a.detail;return"object"===typeof a&&"data"in a?a.data:null}var ie=!1;function je(a,b){switch(a){case "compositionend":return he(b);case "keypress":if(32!==b.which)return null;fe=!0;return ee;case "textInput":return a=b.data,a===ee&&fe?null:a;default:return null}}\nfunction ke(a,b){if(ie)return"compositionend"===a||!ae&&ge(a,b)?(a=nd(),md=ld=kd=null,ie=!1,a):null;switch(a){case "paste":return null;case "keypress":if(!(b.ctrlKey||b.altKey||b.metaKey)||b.ctrlKey&&b.altKey){if(b.char&&1=b)return{node:c,offset:b-a};a=d}a:{for(;c;){if(c.nextSibling){c=c.nextSibling;break a}c=c.parentNode}c=void 0}c=Je(c)}}function Le(a,b){return a&&b?a===b?!0:a&&3===a.nodeType?!1:b&&3===b.nodeType?Le(a,b.parentNode):"contains"in a?a.contains(b):a.compareDocumentPosition?!!(a.compareDocumentPosition(b)&16):!1:!1}\nfunction Me(){for(var a=window,b=Xa();b instanceof a.HTMLIFrameElement;){try{var c="string"===typeof b.contentWindow.location.href}catch(d){c=!1}if(c)a=b.contentWindow;else break;b=Xa(a.document)}return b}function Ne(a){var b=a&&a.nodeName&&a.nodeName.toLowerCase();return b&&("input"===b&&("text"===a.type||"search"===a.type||"tel"===a.type||"url"===a.type||"password"===a.type)||"textarea"===b||"true"===a.contentEditable)}\nfunction Oe(a){var b=Me(),c=a.focusedElem,d=a.selectionRange;if(b!==c&&c&&c.ownerDocument&&Le(c.ownerDocument.documentElement,c)){if(null!==d&&Ne(c))if(b=d.start,a=d.end,void 0===a&&(a=b),"selectionStart"in c)c.selectionStart=b,c.selectionEnd=Math.min(a,c.value.length);else if(a=(b=c.ownerDocument||document)&&b.defaultView||window,a.getSelection){a=a.getSelection();var e=c.textContent.length,f=Math.min(d.start,e);d=void 0===d.end?f:Math.min(d.end,e);!a.extend&&f>d&&(e=d,d=f,f=e);e=Ke(c,f);var g=Ke(c,\nd);e&&g&&(1!==a.rangeCount||a.anchorNode!==e.node||a.anchorOffset!==e.offset||a.focusNode!==g.node||a.focusOffset!==g.offset)&&(b=b.createRange(),b.setStart(e.node,e.offset),a.removeAllRanges(),f>d?(a.addRange(b),a.extend(g.node,g.offset)):(b.setEnd(g.node,g.offset),a.addRange(b)))}b=[];for(a=c;a=a.parentNode;)1===a.nodeType&&b.push({element:a,left:a.scrollLeft,top:a.scrollTop});"function"===typeof c.focus&&c.focus();for(c=0;c=document.documentMode,Qe=null,Re=null,Se=null,Te=!1;\nfunction Ue(a,b,c){var d=c.window===c?c.document:9===c.nodeType?c:c.ownerDocument;Te||null==Qe||Qe!==Xa(d)||(d=Qe,"selectionStart"in d&&Ne(d)?d={start:d.selectionStart,end:d.selectionEnd}:(d=(d.ownerDocument&&d.ownerDocument.defaultView||window).getSelection(),d={anchorNode:d.anchorNode,anchorOffset:d.anchorOffset,focusNode:d.focusNode,focusOffset:d.focusOffset}),Se&&Ie(Se,d)||(Se=d,d=oe(Re,"onSelect"),0Tf||(a.current=Sf[Tf],Sf[Tf]=null,Tf--)}function G(a,b){Tf++;Sf[Tf]=a.current;a.current=b}var Vf={},H=Uf(Vf),Wf=Uf(!1),Xf=Vf;function Yf(a,b){var c=a.type.contextTypes;if(!c)return Vf;var d=a.stateNode;if(d&&d.__reactInternalMemoizedUnmaskedChildContext===b)return d.__reactInternalMemoizedMaskedChildContext;var e={},f;for(f in c)e[f]=b[f];d&&(a=a.stateNode,a.__reactInternalMemoizedUnmaskedChildContext=b,a.__reactInternalMemoizedMaskedChildContext=e);return e}\nfunction Zf(a){a=a.childContextTypes;return null!==a&&void 0!==a}function $f(){E(Wf);E(H)}function ag(a,b,c){if(H.current!==Vf)throw Error(p(168));G(H,b);G(Wf,c)}function bg(a,b,c){var d=a.stateNode;b=b.childContextTypes;if("function"!==typeof d.getChildContext)return c;d=d.getChildContext();for(var e in d)if(!(e in b))throw Error(p(108,Ra(a)||"Unknown",e));return A({},c,d)}\nfunction cg(a){a=(a=a.stateNode)&&a.__reactInternalMemoizedMergedChildContext||Vf;Xf=H.current;G(H,a);G(Wf,Wf.current);return!0}function dg(a,b,c){var d=a.stateNode;if(!d)throw Error(p(169));c?(a=bg(a,b,Xf),d.__reactInternalMemoizedMergedChildContext=a,E(Wf),E(H),G(H,a)):E(Wf);G(Wf,c)}var eg=null,fg=!1,gg=!1;function hg(a){null===eg?eg=[a]:eg.push(a)}function ig(a){fg=!0;hg(a)}\nfunction jg(){if(!gg&&null!==eg){gg=!0;var a=0,b=C;try{var c=eg;for(C=1;a>=g;e-=g;rg=1<<32-oc(b)+e|c<w?(x=u,u=null):x=u.sibling;var n=r(e,u,h[w],k);if(null===n){null===u&&(u=x);break}a&&u&&null===n.alternate&&b(e,u);g=f(n,g,w);null===m?l=n:m.sibling=n;m=n;u=x}if(w===h.length)return c(e,u),I&&tg(e,w),l;if(null===u){for(;ww?(x=m,m=null):x=m.sibling;var t=r(e,m,n.value,k);if(null===t){null===m&&(m=x);break}a&&m&&null===t.alternate&&b(e,m);g=f(t,g,w);null===u?l=t:u.sibling=t;u=t;m=x}if(n.done)return c(e,\nm),I&&tg(e,w),l;if(null===m){for(;!n.done;w++,n=h.next())n=q(e,n.value,k),null!==n&&(g=f(n,g,w),null===u?l=n:u.sibling=n,u=n);I&&tg(e,w);return l}for(m=d(e,m);!n.done;w++,n=h.next())n=y(m,e,w,n.value,k),null!==n&&(a&&null!==n.alternate&&m.delete(null===n.key?w:n.key),g=f(n,g,w),null===u?l=n:u.sibling=n,u=n);a&&m.forEach(function(a){return b(e,a)});I&&tg(e,w);return l}function J(a,d,f,h){"object"===typeof f&&null!==f&&f.type===ya&&null===f.key&&(f=f.props.children);if("object"===typeof f&&null!==f){switch(f.$$typeof){case va:a:{for(var k=\nf.key,l=d;null!==l;){if(l.key===k){k=f.type;if(k===ya){if(7===l.tag){c(a,l.sibling);d=e(l,f.props.children);d.return=a;a=d;break a}}else if(l.elementType===k||"object"===typeof k&&null!==k&&k.$$typeof===Ha&&uh(k)===l.type){c(a,l.sibling);d=e(l,f.props);d.ref=sh(a,l,f);d.return=a;a=d;break a}c(a,l);break}else b(a,l);l=l.sibling}f.type===ya?(d=Ah(f.props.children,a.mode,h,f.key),d.return=a,a=d):(h=yh(f.type,f.key,f.props,null,a.mode,h),h.ref=sh(a,d,f),h.return=a,a=h)}return g(a);case wa:a:{for(l=f.key;null!==\nd;){if(d.key===l)if(4===d.tag&&d.stateNode.containerInfo===f.containerInfo&&d.stateNode.implementation===f.implementation){c(a,d.sibling);d=e(d,f.children||[]);d.return=a;a=d;break a}else{c(a,d);break}else b(a,d);d=d.sibling}d=zh(f,a.mode,h);d.return=a;a=d}return g(a);case Ha:return l=f._init,J(a,d,l(f._payload),h)}if(eb(f))return n(a,d,f,h);if(Ka(f))return t(a,d,f,h);th(a,f)}return"string"===typeof f&&""!==f||"number"===typeof f?(f=""+f,null!==d&&6===d.tag?(c(a,d.sibling),d=e(d,f),d.return=a,a=d):\n(c(a,d),d=xh(f,a.mode,h),d.return=a,a=d),g(a)):c(a,d)}return J}var Bh=vh(!0),Ch=vh(!1),Dh={},Eh=Uf(Dh),Fh=Uf(Dh),Gh=Uf(Dh);function Hh(a){if(a===Dh)throw Error(p(174));return a}function Ih(a,b){G(Gh,b);G(Fh,a);G(Eh,Dh);a=b.nodeType;switch(a){case 9:case 11:b=(b=b.documentElement)?b.namespaceURI:lb(null,"");break;default:a=8===a?b.parentNode:b,b=a.namespaceURI||null,a=a.tagName,b=lb(b,a)}E(Eh);G(Eh,b)}function Jh(){E(Eh);E(Fh);E(Gh)}\nfunction Kh(a){Hh(Gh.current);var b=Hh(Eh.current);var c=lb(b,a.type);b!==c&&(G(Fh,a),G(Eh,c))}function Lh(a){Fh.current===a&&(E(Eh),E(Fh))}var M=Uf(0);\nfunction Mh(a){for(var b=a;null!==b;){if(13===b.tag){var c=b.memoizedState;if(null!==c&&(c=c.dehydrated,null===c||"$?"===c.data||"$!"===c.data))return b}else if(19===b.tag&&void 0!==b.memoizedProps.revealOrder){if(0!==(b.flags&128))return b}else if(null!==b.child){b.child.return=b;b=b.child;continue}if(b===a)break;for(;null===b.sibling;){if(null===b.return||b.return===a)return null;b=b.return}b.sibling.return=b.return;b=b.sibling}return null}var Nh=[];\nfunction Oh(){for(var a=0;ac?c:4;a(!0);var d=Qh.transition;Qh.transition={};try{a(!1),b()}finally{C=c,Qh.transition=d}}function Fi(){return di().memoizedState}\nfunction Gi(a,b,c){var d=lh(a);c={lane:d,action:c,hasEagerState:!1,eagerState:null,next:null};if(Hi(a))Ii(b,c);else if(c=Yg(a,b,c,d),null!==c){var e=L();mh(c,a,d,e);Ji(c,b,d)}}\nfunction ri(a,b,c){var d=lh(a),e={lane:d,action:c,hasEagerState:!1,eagerState:null,next:null};if(Hi(a))Ii(b,e);else{var f=a.alternate;if(0===a.lanes&&(null===f||0===f.lanes)&&(f=b.lastRenderedReducer,null!==f))try{var g=b.lastRenderedState,h=f(g,c);e.hasEagerState=!0;e.eagerState=h;if(He(h,g)){var k=b.interleaved;null===k?(e.next=e,Xg(b)):(e.next=k.next,k.next=e);b.interleaved=e;return}}catch(l){}finally{}c=Yg(a,b,e,d);null!==c&&(e=L(),mh(c,a,d,e),Ji(c,b,d))}}\nfunction Hi(a){var b=a.alternate;return a===N||null!==b&&b===N}function Ii(a,b){Th=Sh=!0;var c=a.pending;null===c?b.next=b:(b.next=c.next,c.next=b);a.pending=b}function Ji(a,b,c){if(0!==(c&4194240)){var d=b.lanes;d&=a.pendingLanes;c|=d;b.lanes=c;Cc(a,c)}}\nvar ai={readContext:Vg,useCallback:Q,useContext:Q,useEffect:Q,useImperativeHandle:Q,useInsertionEffect:Q,useLayoutEffect:Q,useMemo:Q,useReducer:Q,useRef:Q,useState:Q,useDebugValue:Q,useDeferredValue:Q,useTransition:Q,useMutableSource:Q,useSyncExternalStore:Q,useId:Q,unstable_isNewReconciler:!1},Yh={readContext:Vg,useCallback:function(a,b){ci().memoizedState=[a,void 0===b?null:b];return a},useContext:Vg,useEffect:vi,useImperativeHandle:function(a,b,c){c=null!==c&&void 0!==c?c.concat([a]):null;return ti(4194308,\n4,yi.bind(null,b,a),c)},useLayoutEffect:function(a,b){return ti(4194308,4,a,b)},useInsertionEffect:function(a,b){return ti(4,2,a,b)},useMemo:function(a,b){var c=ci();b=void 0===b?null:b;a=a();c.memoizedState=[a,b];return a},useReducer:function(a,b,c){var d=ci();b=void 0!==c?c(b):b;d.memoizedState=d.baseState=b;a={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:a,lastRenderedState:b};d.queue=a;a=a.dispatch=Gi.bind(null,N,a);return[d.memoizedState,a]},useRef:function(a){var b=\nci();a={current:a};return b.memoizedState=a},useState:qi,useDebugValue:Ai,useDeferredValue:function(a){return ci().memoizedState=a},useTransition:function(){var a=qi(!1),b=a[0];a=Ei.bind(null,a[1]);ci().memoizedState=a;return[b,a]},useMutableSource:function(){},useSyncExternalStore:function(a,b,c){var d=N,e=ci();if(I){if(void 0===c)throw Error(p(407));c=c()}else{c=b();if(null===R)throw Error(p(349));0!==(Rh&30)||ni(d,b,c)}e.memoizedState=c;var f={value:c,getSnapshot:b};e.queue=f;vi(ki.bind(null,d,\nf,a),[a]);d.flags|=2048;li(9,mi.bind(null,d,f,c,b),void 0,null);return c},useId:function(){var a=ci(),b=R.identifierPrefix;if(I){var c=sg;var d=rg;c=(d&~(1<<32-oc(d)-1)).toString(32)+c;b=":"+b+"R"+c;c=Uh++;0\\x3c/script>",a=a.removeChild(a.firstChild)):\n"string"===typeof d.is?a=g.createElement(c,{is:d.is}):(a=g.createElement(c),"select"===c&&(g=a,d.multiple?g.multiple=!0:d.size&&(g.size=d.size))):a=g.createElementNS(a,c);a[Of]=b;a[Pf]=d;Aj(a,b,!1,!1);b.stateNode=a;a:{g=vb(c,d);switch(c){case "dialog":D("cancel",a);D("close",a);e=d;break;case "iframe":case "object":case "embed":D("load",a);e=d;break;case "video":case "audio":for(e=0;eHj&&(b.flags|=128,d=!0,Ej(f,!1),b.lanes=4194304)}else{if(!d)if(a=Mh(g),null!==a){if(b.flags|=128,d=!0,c=a.updateQueue,null!==c&&(b.updateQueue=c,b.flags|=4),Ej(f,!0),null===f.tail&&"hidden"===f.tailMode&&!g.alternate&&!I)return S(b),null}else 2*B()-f.renderingStartTime>Hj&&1073741824!==c&&(b.flags|=128,d=!0,Ej(f,!1),b.lanes=4194304);f.isBackwards?(g.sibling=b.child,b.child=g):(c=f.last,null!==c?c.sibling=g:b.child=g,f.last=g)}if(null!==f.tail)return b=f.tail,f.rendering=\nb,f.tail=b.sibling,f.renderingStartTime=B(),b.sibling=null,c=M.current,G(M,d?c&1|2:c&1),b;S(b);return null;case 22:case 23:return Ij(),d=null!==b.memoizedState,null!==a&&null!==a.memoizedState!==d&&(b.flags|=8192),d&&0!==(b.mode&1)?0!==(gj&1073741824)&&(S(b),b.subtreeFlags&6&&(b.flags|=8192)):S(b),null;case 24:return null;case 25:return null}throw Error(p(156,b.tag));}\nfunction Jj(a,b){wg(b);switch(b.tag){case 1:return Zf(b.type)&&$f(),a=b.flags,a&65536?(b.flags=a&-65537|128,b):null;case 3:return Jh(),E(Wf),E(H),Oh(),a=b.flags,0!==(a&65536)&&0===(a&128)?(b.flags=a&-65537|128,b):null;case 5:return Lh(b),null;case 13:E(M);a=b.memoizedState;if(null!==a&&null!==a.dehydrated){if(null===b.alternate)throw Error(p(340));Ig()}a=b.flags;return a&65536?(b.flags=a&-65537|128,b):null;case 19:return E(M),null;case 4:return Jh(),null;case 10:return Rg(b.type._context),null;case 22:case 23:return Ij(),\nnull;case 24:return null;default:return null}}var Kj=!1,U=!1,Lj="function"===typeof WeakSet?WeakSet:Set,V=null;function Mj(a,b){var c=a.ref;if(null!==c)if("function"===typeof c)try{c(null)}catch(d){W(a,b,d)}else c.current=null}function Nj(a,b,c){try{c()}catch(d){W(a,b,d)}}var Oj=!1;\nfunction Pj(a,b){Cf=dd;a=Me();if(Ne(a)){if("selectionStart"in a)var c={start:a.selectionStart,end:a.selectionEnd};else a:{c=(c=a.ownerDocument)&&c.defaultView||window;var d=c.getSelection&&c.getSelection();if(d&&0!==d.rangeCount){c=d.anchorNode;var e=d.anchorOffset,f=d.focusNode;d=d.focusOffset;try{c.nodeType,f.nodeType}catch(F){c=null;break a}var g=0,h=-1,k=-1,l=0,m=0,q=a,r=null;b:for(;;){for(var y;;){q!==c||0!==e&&3!==q.nodeType||(h=g+e);q!==f||0!==d&&3!==q.nodeType||(k=g+d);3===q.nodeType&&(g+=\nq.nodeValue.length);if(null===(y=q.firstChild))break;r=q;q=y}for(;;){if(q===a)break b;r===c&&++l===e&&(h=g);r===f&&++m===d&&(k=g);if(null!==(y=q.nextSibling))break;q=r;r=q.parentNode}q=y}c=-1===h||-1===k?null:{start:h,end:k}}else c=null}c=c||{start:0,end:0}}else c=null;Df={focusedElem:a,selectionRange:c};dd=!1;for(V=b;null!==V;)if(b=V,a=b.child,0!==(b.subtreeFlags&1028)&&null!==a)a.return=b,V=a;else for(;null!==V;){b=V;try{var n=b.alternate;if(0!==(b.flags&1024))switch(b.tag){case 0:case 11:case 15:break;\ncase 1:if(null!==n){var t=n.memoizedProps,J=n.memoizedState,x=b.stateNode,w=x.getSnapshotBeforeUpdate(b.elementType===b.type?t:Lg(b.type,t),J);x.__reactInternalSnapshotBeforeUpdate=w}break;case 3:var u=b.stateNode.containerInfo;1===u.nodeType?u.textContent="":9===u.nodeType&&u.documentElement&&u.removeChild(u.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(p(163));}}catch(F){W(b,b.return,F)}a=b.sibling;if(null!==a){a.return=b.return;V=a;break}V=b.return}n=Oj;Oj=!1;return n}\nfunction Qj(a,b,c){var d=b.updateQueue;d=null!==d?d.lastEffect:null;if(null!==d){var e=d=d.next;do{if((e.tag&a)===a){var f=e.destroy;e.destroy=void 0;void 0!==f&&Nj(b,c,f)}e=e.next}while(e!==d)}}function Rj(a,b){b=b.updateQueue;b=null!==b?b.lastEffect:null;if(null!==b){var c=b=b.next;do{if((c.tag&a)===a){var d=c.create;c.destroy=d()}c=c.next}while(c!==b)}}function Sj(a){var b=a.ref;if(null!==b){var c=a.stateNode;switch(a.tag){case 5:a=c;break;default:a=c}"function"===typeof b?b(a):b.current=a}}\nfunction Tj(a){var b=a.alternate;null!==b&&(a.alternate=null,Tj(b));a.child=null;a.deletions=null;a.sibling=null;5===a.tag&&(b=a.stateNode,null!==b&&(delete b[Of],delete b[Pf],delete b[of],delete b[Qf],delete b[Rf]));a.stateNode=null;a.return=null;a.dependencies=null;a.memoizedProps=null;a.memoizedState=null;a.pendingProps=null;a.stateNode=null;a.updateQueue=null}function Uj(a){return 5===a.tag||3===a.tag||4===a.tag}\nfunction Vj(a){a:for(;;){for(;null===a.sibling;){if(null===a.return||Uj(a.return))return null;a=a.return}a.sibling.return=a.return;for(a=a.sibling;5!==a.tag&&6!==a.tag&&18!==a.tag;){if(a.flags&2)continue a;if(null===a.child||4===a.tag)continue a;else a.child.return=a,a=a.child}if(!(a.flags&2))return a.stateNode}}\nfunction Wj(a,b,c){var d=a.tag;if(5===d||6===d)a=a.stateNode,b?8===c.nodeType?c.parentNode.insertBefore(a,b):c.insertBefore(a,b):(8===c.nodeType?(b=c.parentNode,b.insertBefore(a,c)):(b=c,b.appendChild(a)),c=c._reactRootContainer,null!==c&&void 0!==c||null!==b.onclick||(b.onclick=Bf));else if(4!==d&&(a=a.child,null!==a))for(Wj(a,b,c),a=a.sibling;null!==a;)Wj(a,b,c),a=a.sibling}\nfunction Xj(a,b,c){var d=a.tag;if(5===d||6===d)a=a.stateNode,b?c.insertBefore(a,b):c.appendChild(a);else if(4!==d&&(a=a.child,null!==a))for(Xj(a,b,c),a=a.sibling;null!==a;)Xj(a,b,c),a=a.sibling}var X=null,Yj=!1;function Zj(a,b,c){for(c=c.child;null!==c;)ak(a,b,c),c=c.sibling}\nfunction ak(a,b,c){if(lc&&"function"===typeof lc.onCommitFiberUnmount)try{lc.onCommitFiberUnmount(kc,c)}catch(h){}switch(c.tag){case 5:U||Mj(c,b);case 6:var d=X,e=Yj;X=null;Zj(a,b,c);X=d;Yj=e;null!==X&&(Yj?(a=X,c=c.stateNode,8===a.nodeType?a.parentNode.removeChild(c):a.removeChild(c)):X.removeChild(c.stateNode));break;case 18:null!==X&&(Yj?(a=X,c=c.stateNode,8===a.nodeType?Kf(a.parentNode,c):1===a.nodeType&&Kf(a,c),bd(a)):Kf(X,c.stateNode));break;case 4:d=X;e=Yj;X=c.stateNode.containerInfo;Yj=!0;\nZj(a,b,c);X=d;Yj=e;break;case 0:case 11:case 14:case 15:if(!U&&(d=c.updateQueue,null!==d&&(d=d.lastEffect,null!==d))){e=d=d.next;do{var f=e,g=f.destroy;f=f.tag;void 0!==g&&(0!==(f&2)?Nj(c,b,g):0!==(f&4)&&Nj(c,b,g));e=e.next}while(e!==d)}Zj(a,b,c);break;case 1:if(!U&&(Mj(c,b),d=c.stateNode,"function"===typeof d.componentWillUnmount))try{d.props=c.memoizedProps,d.state=c.memoizedState,d.componentWillUnmount()}catch(h){W(c,b,h)}Zj(a,b,c);break;case 21:Zj(a,b,c);break;case 22:c.mode&1?(U=(d=U)||null!==\nc.memoizedState,Zj(a,b,c),U=d):Zj(a,b,c);break;default:Zj(a,b,c)}}function bk(a){var b=a.updateQueue;if(null!==b){a.updateQueue=null;var c=a.stateNode;null===c&&(c=a.stateNode=new Lj);b.forEach(function(b){var d=ck.bind(null,a,b);c.has(b)||(c.add(b),b.then(d,d))})}}\nfunction dk(a,b){var c=b.deletions;if(null!==c)for(var d=0;de&&(e=g);d&=~f}d=e;d=B()-d;d=(120>d?120:480>d?480:1080>d?1080:1920>d?1920:3E3>d?3E3:4320>d?4320:1960*mk(d/1960))-d;if(10a?16:a;if(null===xk)var d=!1;else{a=xk;xk=null;yk=0;if(0!==(K&6))throw Error(p(331));var e=K;K|=4;for(V=a.current;null!==V;){var f=V,g=f.child;if(0!==(V.flags&16)){var h=f.deletions;if(null!==h){for(var k=0;kB()-gk?Lk(a,0):sk|=c);Ek(a,b)}function Zk(a,b){0===b&&(0===(a.mode&1)?b=1:(b=sc,sc<<=1,0===(sc&130023424)&&(sc=4194304)));var c=L();a=Zg(a,b);null!==a&&(Ac(a,b,c),Ek(a,c))}function vj(a){var b=a.memoizedState,c=0;null!==b&&(c=b.retryLane);Zk(a,c)}\nfunction ck(a,b){var c=0;switch(a.tag){case 13:var d=a.stateNode;var e=a.memoizedState;null!==e&&(c=e.retryLane);break;case 19:d=a.stateNode;break;default:throw Error(p(314));}null!==d&&d.delete(b);Zk(a,c)}var Wk;\nWk=function(a,b,c){if(null!==a)if(a.memoizedProps!==b.pendingProps||Wf.current)Ug=!0;else{if(0===(a.lanes&c)&&0===(b.flags&128))return Ug=!1,zj(a,b,c);Ug=0!==(a.flags&131072)?!0:!1}else Ug=!1,I&&0!==(b.flags&1048576)&&ug(b,ng,b.index);b.lanes=0;switch(b.tag){case 2:var d=b.type;jj(a,b);a=b.pendingProps;var e=Yf(b,H.current);Tg(b,c);e=Xh(null,b,d,a,e,c);var f=bi();b.flags|=1;"object"===typeof e&&null!==e&&"function"===typeof e.render&&void 0===e.$$typeof?(b.tag=1,b.memoizedState=null,b.updateQueue=\nnull,Zf(d)?(f=!0,cg(b)):f=!1,b.memoizedState=null!==e.state&&void 0!==e.state?e.state:null,ah(b),e.updater=nh,b.stateNode=e,e._reactInternals=b,rh(b,d,a,c),b=kj(null,b,d,!0,f,c)):(b.tag=0,I&&f&&vg(b),Yi(null,b,e,c),b=b.child);return b;case 16:d=b.elementType;a:{jj(a,b);a=b.pendingProps;e=d._init;d=e(d._payload);b.type=d;e=b.tag=$k(d);a=Lg(d,a);switch(e){case 0:b=dj(null,b,d,a,c);break a;case 1:b=ij(null,b,d,a,c);break a;case 11:b=Zi(null,b,d,a,c);break a;case 14:b=aj(null,b,d,Lg(d.type,a),c);break a}throw Error(p(306,\nd,""));}return b;case 0:return d=b.type,e=b.pendingProps,e=b.elementType===d?e:Lg(d,e),dj(a,b,d,e,c);case 1:return d=b.type,e=b.pendingProps,e=b.elementType===d?e:Lg(d,e),ij(a,b,d,e,c);case 3:a:{lj(b);if(null===a)throw Error(p(387));d=b.pendingProps;f=b.memoizedState;e=f.element;bh(a,b);gh(b,d,null,c);var g=b.memoizedState;d=g.element;if(f.isDehydrated)if(f={element:d,isDehydrated:!1,cache:g.cache,pendingSuspenseBoundaries:g.pendingSuspenseBoundaries,transitions:g.transitions},b.updateQueue.baseState=\nf,b.memoizedState=f,b.flags&256){e=Ki(Error(p(423)),b);b=mj(a,b,d,c,e);break a}else if(d!==e){e=Ki(Error(p(424)),b);b=mj(a,b,d,c,e);break a}else for(yg=Lf(b.stateNode.containerInfo.firstChild),xg=b,I=!0,zg=null,c=Ch(b,null,d,c),b.child=c;c;)c.flags=c.flags&-3|4096,c=c.sibling;else{Ig();if(d===e){b=$i(a,b,c);break a}Yi(a,b,d,c)}b=b.child}return b;case 5:return Kh(b),null===a&&Eg(b),d=b.type,e=b.pendingProps,f=null!==a?a.memoizedProps:null,g=e.children,Ef(d,e)?g=null:null!==f&&Ef(d,f)&&(b.flags|=32),\nhj(a,b),Yi(a,b,g,c),b.child;case 6:return null===a&&Eg(b),null;case 13:return pj(a,b,c);case 4:return Ih(b,b.stateNode.containerInfo),d=b.pendingProps,null===a?b.child=Bh(b,null,d,c):Yi(a,b,d,c),b.child;case 11:return d=b.type,e=b.pendingProps,e=b.elementType===d?e:Lg(d,e),Zi(a,b,d,e,c);case 7:return Yi(a,b,b.pendingProps,c),b.child;case 8:return Yi(a,b,b.pendingProps.children,c),b.child;case 12:return Yi(a,b,b.pendingProps.children,c),b.child;case 10:a:{d=b.type._context;e=b.pendingProps;f=b.memoizedProps;\ng=e.value;G(Mg,d._currentValue);d._currentValue=g;if(null!==f)if(He(f.value,g)){if(f.children===e.children&&!Wf.current){b=$i(a,b,c);break a}}else for(f=b.child,null!==f&&(f.return=b);null!==f;){var h=f.dependencies;if(null!==h){g=f.child;for(var k=h.firstContext;null!==k;){if(k.context===d){if(1===f.tag){k=ch(-1,c&-c);k.tag=2;var l=f.updateQueue;if(null!==l){l=l.shared;var m=l.pending;null===m?k.next=k:(k.next=m.next,m.next=k);l.pending=k}}f.lanes|=c;k=f.alternate;null!==k&&(k.lanes|=c);Sg(f.return,\nc,b);h.lanes|=c;break}k=k.next}}else if(10===f.tag)g=f.type===b.type?null:f.child;else if(18===f.tag){g=f.return;if(null===g)throw Error(p(341));g.lanes|=c;h=g.alternate;null!==h&&(h.lanes|=c);Sg(g,c,b);g=f.sibling}else g=f.child;if(null!==g)g.return=f;else for(g=f;null!==g;){if(g===b){g=null;break}f=g.sibling;if(null!==f){f.return=g.return;g=f;break}g=g.return}f=g}Yi(a,b,e.children,c);b=b.child}return b;case 9:return e=b.type,d=b.pendingProps.children,Tg(b,c),e=Vg(e),d=d(e),b.flags|=1,Yi(a,b,d,c),\nb.child;case 14:return d=b.type,e=Lg(d,b.pendingProps),e=Lg(d.type,e),aj(a,b,d,e,c);case 15:return cj(a,b,b.type,b.pendingProps,c);case 17:return d=b.type,e=b.pendingProps,e=b.elementType===d?e:Lg(d,e),jj(a,b),b.tag=1,Zf(d)?(a=!0,cg(b)):a=!1,Tg(b,c),ph(b,d,e),rh(b,d,e,c),kj(null,b,d,!0,a,c);case 19:return yj(a,b,c);case 22:return ej(a,b,c)}throw Error(p(156,b.tag));};function Gk(a,b){return ac(a,b)}\nfunction al(a,b,c,d){this.tag=a;this.key=c;this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null;this.index=0;this.ref=null;this.pendingProps=b;this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null;this.mode=d;this.subtreeFlags=this.flags=0;this.deletions=null;this.childLanes=this.lanes=0;this.alternate=null}function Bg(a,b,c,d){return new al(a,b,c,d)}function bj(a){a=a.prototype;return!(!a||!a.isReactComponent)}\nfunction $k(a){if("function"===typeof a)return bj(a)?1:0;if(void 0!==a&&null!==a){a=a.$$typeof;if(a===Da)return 11;if(a===Ga)return 14}return 2}\nfunction wh(a,b){var c=a.alternate;null===c?(c=Bg(a.tag,b,a.key,a.mode),c.elementType=a.elementType,c.type=a.type,c.stateNode=a.stateNode,c.alternate=a,a.alternate=c):(c.pendingProps=b,c.type=a.type,c.flags=0,c.subtreeFlags=0,c.deletions=null);c.flags=a.flags&14680064;c.childLanes=a.childLanes;c.lanes=a.lanes;c.child=a.child;c.memoizedProps=a.memoizedProps;c.memoizedState=a.memoizedState;c.updateQueue=a.updateQueue;b=a.dependencies;c.dependencies=null===b?null:{lanes:b.lanes,firstContext:b.firstContext};\nc.sibling=a.sibling;c.index=a.index;c.ref=a.ref;return c}\nfunction yh(a,b,c,d,e,f){var g=2;d=a;if("function"===typeof a)bj(a)&&(g=1);else if("string"===typeof a)g=5;else a:switch(a){case ya:return Ah(c.children,e,f,b);case za:g=8;e|=8;break;case Aa:return a=Bg(12,c,b,e|2),a.elementType=Aa,a.lanes=f,a;case Ea:return a=Bg(13,c,b,e),a.elementType=Ea,a.lanes=f,a;case Fa:return a=Bg(19,c,b,e),a.elementType=Fa,a.lanes=f,a;case Ia:return qj(c,e,f,b);default:if("object"===typeof a&&null!==a)switch(a.$$typeof){case Ba:g=10;break a;case Ca:g=9;break a;case Da:g=11;\nbreak a;case Ga:g=14;break a;case Ha:g=16;d=null;break a}throw Error(p(130,null==a?a:typeof a,""));}b=Bg(g,c,b,e);b.elementType=a;b.type=d;b.lanes=f;return b}function Ah(a,b,c,d){a=Bg(7,a,d,b);a.lanes=c;return a}function qj(a,b,c,d){a=Bg(22,a,d,b);a.elementType=Ia;a.lanes=c;a.stateNode={isHidden:!1};return a}function xh(a,b,c){a=Bg(6,a,null,b);a.lanes=c;return a}\nfunction zh(a,b,c){b=Bg(4,null!==a.children?a.children:[],a.key,b);b.lanes=c;b.stateNode={containerInfo:a.containerInfo,pendingChildren:null,implementation:a.implementation};return b}\nfunction bl(a,b,c,d,e){this.tag=b;this.containerInfo=a;this.finishedWork=this.pingCache=this.current=this.pendingChildren=null;this.timeoutHandle=-1;this.callbackNode=this.pendingContext=this.context=null;this.callbackPriority=0;this.eventTimes=zc(0);this.expirationTimes=zc(-1);this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0;this.entanglements=zc(0);this.identifierPrefix=d;this.onRecoverableError=e;this.mutableSourceEagerHydrationData=\nnull}function cl(a,b,c,d,e,f,g,h,k){a=new bl(a,b,c,h,k);1===b?(b=1,!0===f&&(b|=8)):b=0;f=Bg(3,null,null,b);a.current=f;f.stateNode=a;f.memoizedState={element:d,isDehydrated:c,cache:null,transitions:null,pendingSuspenseBoundaries:null};ah(f);return a}function dl(a,b,c){var d=3{"use strict";eval("var __webpack_unused_export__;\n\n\nvar m = __webpack_require__(935);\nif (true) {\n exports.s = m.createRoot;\n __webpack_unused_export__ = m.hydrateRoot;\n} else { var i; }\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiNzQ1LmpzIiwibWFwcGluZ3MiOiI7QUFBQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQSIsInNvdXJjZXMiOlsid2VicGFjazovL3JlYWN0LXF1aXotY29tcG9uZW50Ly4vbm9kZV9tb2R1bGVzL3JlYWN0LWRvbS9jbGllbnQuanM/MTFiMSJdLCJzb3VyY2VzQ29udGVudCI6WyIndXNlIHN0cmljdCc7XG5cbnZhciBtID0gcmVxdWlyZSgncmVhY3QtZG9tJyk7XG5pZiAocHJvY2Vzcy5lbnYuTk9ERV9FTlYgPT09ICdwcm9kdWN0aW9uJykge1xuICBleHBvcnRzLmNyZWF0ZVJvb3QgPSBtLmNyZWF0ZVJvb3Q7XG4gIGV4cG9ydHMuaHlkcmF0ZVJvb3QgPSBtLmh5ZHJhdGVSb290O1xufSBlbHNlIHtcbiAgdmFyIGkgPSBtLl9fU0VDUkVUX0lOVEVSTkFMU19ET19OT1RfVVNFX09SX1lPVV9XSUxMX0JFX0ZJUkVEO1xuICBleHBvcnRzLmNyZWF0ZVJvb3QgPSBmdW5jdGlvbihjLCBvKSB7XG4gICAgaS51c2luZ0NsaWVudEVudHJ5UG9pbnQgPSB0cnVlO1xuICAgIHRyeSB7XG4gICAgICByZXR1cm4gbS5jcmVhdGVSb290KGMsIG8pO1xuICAgIH0gZmluYWxseSB7XG4gICAgICBpLnVzaW5nQ2xpZW50RW50cnlQb2ludCA9IGZhbHNlO1xuICAgIH1cbiAgfTtcbiAgZXhwb3J0cy5oeWRyYXRlUm9vdCA9IGZ1bmN0aW9uKGMsIGgsIG8pIHtcbiAgICBpLnVzaW5nQ2xpZW50RW50cnlQb2ludCA9IHRydWU7XG4gICAgdHJ5IHtcbiAgICAgIHJldHVybiBtLmh5ZHJhdGVSb290KGMsIGgsIG8pO1xuICAgIH0gZmluYWxseSB7XG4gICAgICBpLnVzaW5nQ2xpZW50RW50cnlQb2ludCA9IGZhbHNlO1xuICAgIH1cbiAgfTtcbn1cbiJdLCJuYW1lcyI6W10sInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///745\n")},935:(module,__unused_webpack_exports,__webpack_require__)=>{"use strict";eval("\n\nfunction checkDCE() {\n /* global __REACT_DEVTOOLS_GLOBAL_HOOK__ */\n if (\n typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ === 'undefined' ||\n typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE !== 'function'\n ) {\n return;\n }\n if (false) {}\n try {\n // Verify that the code above has been dead code eliminated (DCE'd).\n __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(checkDCE);\n } catch (err) {\n // DevTools shouldn't crash React, no matter what.\n // We should still report in case we break this code.\n console.error(err);\n }\n}\n\nif (true) {\n // DCE check should happen before ReactDOM bundle executes so that\n // DevTools can report bad minification during injection.\n checkDCE();\n module.exports = __webpack_require__(448);\n} else {}\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIj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IHtcbiAgbW9kdWxlLmV4cG9ydHMgPSByZXF1aXJlKCcuL2Nqcy9yZWFjdC1kb20uZGV2ZWxvcG1lbnQuanMnKTtcbn1cbiJdLCJuYW1lcyI6W10sInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///935\n")},408:(__unused_webpack_module,exports)=>{"use strict";eval('/**\n * @license React\n * react.production.min.js\n *\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\nvar l=Symbol.for("react.element"),n=Symbol.for("react.portal"),p=Symbol.for("react.fragment"),q=Symbol.for("react.strict_mode"),r=Symbol.for("react.profiler"),t=Symbol.for("react.provider"),u=Symbol.for("react.context"),v=Symbol.for("react.forward_ref"),w=Symbol.for("react.suspense"),x=Symbol.for("react.memo"),y=Symbol.for("react.lazy"),z=Symbol.iterator;function A(a){if(null===a||"object"!==typeof a)return null;a=z&&a[z]||a["@@iterator"];return"function"===typeof a?a:null}\nvar B={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},C=Object.assign,D={};function E(a,b,e){this.props=a;this.context=b;this.refs=D;this.updater=e||B}E.prototype.isReactComponent={};\nE.prototype.setState=function(a,b){if("object"!==typeof a&&"function"!==typeof a&&null!=a)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,a,b,"setState")};E.prototype.forceUpdate=function(a){this.updater.enqueueForceUpdate(this,a,"forceUpdate")};function F(){}F.prototype=E.prototype;function G(a,b,e){this.props=a;this.context=b;this.refs=D;this.updater=e||B}var H=G.prototype=new F;\nH.constructor=G;C(H,E.prototype);H.isPureReactComponent=!0;var I=Array.isArray,J=Object.prototype.hasOwnProperty,K={current:null},L={key:!0,ref:!0,__self:!0,__source:!0};\nfunction M(a,b,e){var d,c={},k=null,h=null;if(null!=b)for(d in void 0!==b.ref&&(h=b.ref),void 0!==b.key&&(k=""+b.key),b)J.call(b,d)&&!L.hasOwnProperty(d)&&(c[d]=b[d]);var g=arguments.length-2;if(1===g)c.children=e;else if(1{"use strict";eval("\n\nif (true) {\n module.exports = __webpack_require__(408);\n} else {}\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMjk0LmpzIiwibWFwcGluZ3MiOiJBQUFBO0FBQ0E7QUFDQTtBQUNBO0FBQ0EiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly9yZWFjdC1xdWl6LWNvbXBvbmVudC8uL25vZGVfbW9kdWxlcy9yZWFjdC9pbmRleC5qcz9hYjViIl0sInNvdXJjZXNDb250ZW50IjpbIid1c2Ugc3RyaWN0JztcblxuaWYgKHByb2Nlc3MuZW52Lk5PREVfRU5WID09PSAncHJvZHVjdGlvbicpIHtcbiAgbW9kdWxlLmV4cG9ydHMgPSByZXF1aXJlKCcuL2Nqcy9yZWFjdC5wcm9kdWN0aW9uLm1pbi5qcycpO1xufSBlbHNlIHtcbiAgbW9kdWxlLmV4cG9ydHMgPSByZXF1aXJlKCcuL2Nqcy9yZWFjdC5kZXZlbG9wbWVudC5qcycpO1xufVxuIl0sIm5hbWVzIjpbXSwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///294\n")},53:(__unused_webpack_module,exports)=>{"use strict";eval('/**\n * @license React\n * scheduler.production.min.js\n *\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\nfunction f(a,b){var c=a.length;a.push(b);a:for(;0>>1,e=a[d];if(0>>1;dg(C,c))ng(x,C)?(a[d]=x,a[n]=c,d=n):(a[d]=C,a[m]=c,d=m);else if(ng(x,c))a[d]=x,a[n]=c,d=n;else break a}}return b}\nfunction g(a,b){var c=a.sortIndex-b.sortIndex;return 0!==c?c:a.id-b.id}if("object"===typeof performance&&"function"===typeof performance.now){var l=performance;exports.unstable_now=function(){return l.now()}}else{var p=Date,q=p.now();exports.unstable_now=function(){return p.now()-q}}var r=[],t=[],u=1,v=null,y=3,z=!1,A=!1,B=!1,D="function"===typeof setTimeout?setTimeout:null,E="function"===typeof clearTimeout?clearTimeout:null,F="undefined"!==typeof setImmediate?setImmediate:null;\n"undefined"!==typeof navigator&&void 0!==navigator.scheduling&&void 0!==navigator.scheduling.isInputPending&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function G(a){for(var b=h(t);null!==b;){if(null===b.callback)k(t);else if(b.startTime<=a)k(t),b.sortIndex=b.expirationTime,f(r,b);else break;b=h(t)}}function H(a){B=!1;G(a);if(!A)if(null!==h(r))A=!0,I(J);else{var b=h(t);null!==b&&K(H,b.startTime-a)}}\nfunction J(a,b){A=!1;B&&(B=!1,E(L),L=-1);z=!0;var c=y;try{G(b);for(v=h(r);null!==v&&(!(v.expirationTime>b)||a&&!M());){var d=v.callback;if("function"===typeof d){v.callback=null;y=v.priorityLevel;var e=d(v.expirationTime<=b);b=exports.unstable_now();"function"===typeof e?v.callback=e:v===h(r)&&k(r);G(b)}else k(r);v=h(r)}if(null!==v)var w=!0;else{var m=h(t);null!==m&&K(H,m.startTime-b);w=!1}return w}finally{v=null,y=c,z=!1}}var N=!1,O=null,L=-1,P=5,Q=-1;\nfunction M(){return exports.unstable_now()-Qa||125d?(a.sortIndex=c,f(t,a),null===h(r)&&a===h(t)&&(B?(E(L),L=-1):B=!0,K(H,c-d))):(a.sortIndex=e,f(r,a),A||z||(A=!0,I(J)));return a};\nexports.unstable_shouldYield=M;exports.unstable_wrapCallback=function(a){var b=y;return function(){var c=y;y=b;try{return a.apply(this,arguments)}finally{y=c}}};\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiNTMuanMiLCJtYXBwaW5ncyI6IkFBQUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0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2YXIgZT0tMTticmVhaztjYXNlIDI6ZT0yNTA7YnJlYWs7Y2FzZSA1OmU9MTA3Mzc0MTgyMzticmVhaztjYXNlIDQ6ZT0xRTQ7YnJlYWs7ZGVmYXVsdDplPTVFM31lPWMrZTthPXtpZDp1KyssY2FsbGJhY2s6Yixwcmlvcml0eUxldmVsOmEsc3RhcnRUaW1lOmMsZXhwaXJhdGlvblRpbWU6ZSxzb3J0SW5kZXg6LTF9O2M+ZD8oYS5zb3J0SW5kZXg9YyxmKHQsYSksbnVsbD09PWgocikmJmE9PT1oKHQpJiYoQj8oRShMKSxMPS0xKTpCPSEwLEsoSCxjLWQpKSk6KGEuc29ydEluZGV4PWUsZihyLGEpLEF8fHp8fChBPSEwLEkoSikpKTtyZXR1cm4gYX07XG5leHBvcnRzLnVuc3RhYmxlX3Nob3VsZFlpZWxkPU07ZXhwb3J0cy51bnN0YWJsZV93cmFwQ2FsbGJhY2s9ZnVuY3Rpb24oYSl7dmFyIGI9eTtyZXR1cm4gZnVuY3Rpb24oKXt2YXIgYz15O3k9Yjt0cnl7cmV0dXJuIGEuYXBwbHkodGhpcyxhcmd1bWVudHMpfWZpbmFsbHl7eT1jfX19O1xuIl0sIm5hbWVzIjpbXSwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///53\n')},840:(module,__unused_webpack_exports,__webpack_require__)=>{"use strict";eval("\n\nif (true) {\n module.exports = __webpack_require__(53);\n} else {}\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiODQwLmpzIiwibWFwcGluZ3MiOiJBQUFBO0FBQ0E7QUFDQTtBQUNBO0FBQ0EiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly9yZWFjdC1xdWl6LWNvbXBvbmVudC8uL25vZGVfbW9kdWxlcy9zY2hlZHVsZXIvaW5kZXguanM/NDAyOSJdLCJzb3VyY2VzQ29udGVudCI6WyIndXNlIHN0cmljdCc7XG5cbmlmIChwcm9jZXNzLmVudi5OT0RFX0VOViA9PT0gJ3Byb2R1Y3Rpb24nKSB7XG4gIG1vZHVsZS5leHBvcnRzID0gcmVxdWlyZSgnLi9janMvc2NoZWR1bGVyLnByb2R1Y3Rpb24ubWluLmpzJyk7XG59IGVsc2Uge1xuICBtb2R1bGUuZXhwb3J0cyA9IHJlcXVpcmUoJy4vY2pzL3NjaGVkdWxlci5kZXZlbG9wbWVudC5qcycpO1xufVxuIl0sIm5hbWVzIjpbXSwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///840\n")}},__webpack_module_cache__={};function __webpack_require__(e){var n=__webpack_module_cache__[e];if(void 0!==n)return n.exports;var l=__webpack_module_cache__[e]={exports:{}};return __webpack_modules__[e].call(l.exports,l,l.exports,__webpack_require__),l.exports}__webpack_require__.n=e=>{var n=e&&e.__esModule?()=>e.default:()=>e;return __webpack_require__.d(n,{a:n}),n},__webpack_require__.d=(e,n)=>{for(var l in n)__webpack_require__.o(n,l)&&!__webpack_require__.o(e,l)&&Object.defineProperty(e,l,{enumerable:!0,get:n[l]})},__webpack_require__.o=(e,n)=>Object.prototype.hasOwnProperty.call(e,n);var __webpack_exports__=__webpack_require__(412)})(); \ No newline at end of file +(()=>{var __webpack_modules__={412:(__unused_webpack_module,__unused_webpack___webpack_exports__,__webpack_require__)=>{"use strict";eval('\n// EXTERNAL MODULE: ./node_modules/react/index.js\nvar react = __webpack_require__(294);\n// EXTERNAL MODULE: ./node_modules/react-dom/client.js\nvar client = __webpack_require__(745);\n;// CONCATENATED MODULE: ./node_modules/uuid/dist/esm-browser/native.js\nconst randomUUID = typeof crypto !== \'undefined\' && crypto.randomUUID && crypto.randomUUID.bind(crypto);\n/* harmony default export */ const esm_browser_native = ({\n randomUUID\n});\n;// CONCATENATED MODULE: ./node_modules/uuid/dist/esm-browser/rng.js\n// Unique ID creation requires a high quality random # generator. In the browser we therefore\n// require the crypto API and do not support built-in fallback to lower quality random number\n// generators (like Math.random()).\nlet getRandomValues;\nconst rnds8 = new Uint8Array(16);\nfunction rng() {\n // lazy load so that environments that need to polyfill have a chance to do so\n if (!getRandomValues) {\n // getRandomValues needs to be invoked in a context where "this" is a Crypto implementation.\n getRandomValues = typeof crypto !== \'undefined\' && crypto.getRandomValues && crypto.getRandomValues.bind(crypto);\n\n if (!getRandomValues) {\n throw new Error(\'crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported\');\n }\n }\n\n return getRandomValues(rnds8);\n}\n;// CONCATENATED MODULE: ./node_modules/uuid/dist/esm-browser/stringify.js\n\n/**\n * Convert array of 16 byte values to UUID string format of the form:\n * XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX\n */\n\nconst byteToHex = [];\n\nfor (let i = 0; i < 256; ++i) {\n byteToHex.push((i + 0x100).toString(16).slice(1));\n}\n\nfunction unsafeStringify(arr, offset = 0) {\n // Note: Be careful editing this code! It\'s been tuned for performance\n // and works in ways you may not expect. See https://github.com/uuidjs/uuid/pull/434\n return byteToHex[arr[offset + 0]] + byteToHex[arr[offset + 1]] + byteToHex[arr[offset + 2]] + byteToHex[arr[offset + 3]] + \'-\' + byteToHex[arr[offset + 4]] + byteToHex[arr[offset + 5]] + \'-\' + byteToHex[arr[offset + 6]] + byteToHex[arr[offset + 7]] + \'-\' + byteToHex[arr[offset + 8]] + byteToHex[arr[offset + 9]] + \'-\' + byteToHex[arr[offset + 10]] + byteToHex[arr[offset + 11]] + byteToHex[arr[offset + 12]] + byteToHex[arr[offset + 13]] + byteToHex[arr[offset + 14]] + byteToHex[arr[offset + 15]];\n}\n\nfunction stringify(arr, offset = 0) {\n const uuid = unsafeStringify(arr, offset); // Consistency check for valid UUID. If this throws, it\'s likely due to one\n // of the following:\n // - One or more input array values don\'t map to a hex octet (leading to\n // "undefined" in the uuid)\n // - Invalid input values for the RFC `version` or `variant` fields\n\n if (!validate(uuid)) {\n throw TypeError(\'Stringified UUID is invalid\');\n }\n\n return uuid;\n}\n\n/* harmony default export */ const esm_browser_stringify = ((/* unused pure expression or super */ null && (stringify)));\n;// CONCATENATED MODULE: ./node_modules/uuid/dist/esm-browser/v4.js\n\n\n\n\nfunction v4(options, buf, offset) {\n if (esm_browser_native.randomUUID && !buf && !options) {\n return esm_browser_native.randomUUID();\n }\n\n options = options || {};\n const rnds = options.random || (options.rng || rng)(); // Per 4.4, set bits for version and `clock_seq_hi_and_reserved`\n\n rnds[6] = rnds[6] & 0x0f | 0x40;\n rnds[8] = rnds[8] & 0x3f | 0x80; // Copy bytes to buffer, if provided\n\n if (buf) {\n offset = offset || 0;\n\n for (let i = 0; i < 16; ++i) {\n buf[offset + i] = rnds[i];\n }\n\n return buf;\n }\n\n return unsafeStringify(rnds);\n}\n\n/* harmony default export */ const esm_browser_v4 = (v4);\n;// CONCATENATED MODULE: ./src/lib/core-components/QuizResultFilter.jsx\nfunction _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }\nfunction _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }\nfunction _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }\nfunction _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }\nfunction _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t["return"] && (u = t["return"](), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }\nfunction _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }\n\nfunction QuizResultFilter(_ref) {\n var filteredValue = _ref.filteredValue,\n handleChange = _ref.handleChange,\n appLocale = _ref.appLocale;\n var _useState = (0,react.useState)(false),\n _useState2 = _slicedToArray(_useState, 2),\n isOpen = _useState2[0],\n setIsOpen = _useState2[1];\n var dropdownRef = (0,react.useRef)(null);\n var toggleDropdown = function toggleDropdown() {\n setIsOpen(!isOpen);\n };\n var handleOptionClick = function handleOptionClick(value) {\n handleChange({\n target: {\n value: value\n }\n });\n setIsOpen(false);\n };\n var selectedOptionClass = isOpen ? \'selected-open\' : \'\';\n (0,react.useEffect)(function () {\n var handleOutsideClick = function handleOutsideClick(e) {\n if (isOpen && dropdownRef.current && !dropdownRef.current.contains(e.target)) {\n setIsOpen(false);\n }\n };\n document.addEventListener(\'click\', handleOutsideClick);\n return function () {\n document.removeEventListener(\'click\', handleOutsideClick);\n };\n }, [isOpen]);\n return /*#__PURE__*/react.createElement("div", {\n className: "quiz-result-filter"\n }, /*#__PURE__*/react.createElement("div", {\n ref: dropdownRef,\n className: "filter-dropdown-select ".concat(isOpen ? \'open\' : \'\'),\n onClick: toggleDropdown,\n onKeyDown: function onKeyDown(e) {\n if (e.key === \'Enter\') {\n toggleDropdown();\n }\n },\n role: "button",\n tabIndex: 0\n }, /*#__PURE__*/react.createElement("div", {\n className: "selected-option ".concat(selectedOptionClass)\n }, filteredValue === \'all\' ? appLocale.resultFilterAll : filteredValue), /*#__PURE__*/react.createElement("span", {\n className: "arrow ".concat(isOpen ? \'up\' : \'down\')\n })), isOpen && /*#__PURE__*/react.createElement("div", {\n className: "dropdown-options",\n role: "menu",\n "aria-labelledby": "quiz-filter"\n }, /*#__PURE__*/react.createElement("div", {\n className: "dropdown-options-item ".concat(filteredValue === \'all\' ? \'selected\' : \'\'),\n onClick: function onClick() {\n return handleOptionClick(\'all\');\n },\n onKeyDown: function onKeyDown(e) {\n if (e.key === \'Enter\') {\n handleOptionClick(\'all\');\n }\n },\n role: "menuitem",\n tabIndex: 0\n }, appLocale.resultFilterAll), /*#__PURE__*/react.createElement("div", {\n className: "dropdown-options-item ".concat(filteredValue === \'correct\' ? \'selected\' : \'\'),\n onClick: function onClick() {\n return handleOptionClick(\'correct\');\n },\n onKeyDown: function onKeyDown(e) {\n if (e.key === \'Enter\') {\n handleOptionClick(\'correct\');\n }\n },\n role: "menuitem",\n tabIndex: 0\n }, appLocale.resultFilterCorrect), /*#__PURE__*/react.createElement("div", {\n className: "dropdown-options-item ".concat(filteredValue === \'incorrect\' ? \'selected\' : \'\'),\n onClick: function onClick() {\n return handleOptionClick(\'incorrect\');\n },\n onKeyDown: function onKeyDown(e) {\n if (e.key === \'Enter\') {\n handleOptionClick(\'incorrect\');\n }\n },\n role: "menuitem",\n tabIndex: 0\n }, appLocale.resultFilterIncorrect), /*#__PURE__*/react.createElement("div", {\n className: "dropdown-options-item ".concat(filteredValue === \'unanswered\' ? \'selected\' : \'\'),\n onClick: function onClick() {\n return handleOptionClick(\'unanswered\');\n },\n onKeyDown: function onKeyDown(e) {\n if (e.key === \'Enter\') {\n handleOptionClick(\'unanswered\');\n }\n },\n role: "menuitem",\n tabIndex: 0\n }, appLocale.resultFilterUnanswered)));\n}\n/* harmony default export */ const core_components_QuizResultFilter = (QuizResultFilter);\n;// CONCATENATED MODULE: ./node_modules/snarkdown/dist/snarkdown.es.js\nvar e={"":["",""],_:["",""],"*":["",""],"~":["",""],"\\n":["
    "]," ":["
    "],"-":["
    "]};function n(e){return e.replace(RegExp("^"+(e.match(/^(\\t| )+/)||"")[0],"gm"),"")}function r(e){return(e+"").replace(/"/g,""").replace(//g,">")}function t(a,c){var o,l,g,s,p,u=/((?:^|\\n+)(?:\\n---+|\\* \\*(?: \\*)+)\\n)|(?:^``` *(\\w*)\\n([\\s\\S]*?)\\n```$)|((?:(?:^|\\n+)(?:\\t| {2,}).+)+\\n*)|((?:(?:^|\\n)([>*+-]|\\d+\\.)\\s+.*)+)|(?:!\\[([^\\]]*?)\\]\\(([^)]+?)\\))|(\\[)|(\\](?:\\(([^)]+?)\\))?)|(?:(?:^|\\n+)([^\\s].*)\\n(-{3,}|={3,})(?:\\n+|$))|(?:(?:^|\\n+)(#{1,6})\\s*(.+)(?:\\n+|$))|(?:`([^`].*?)`)|( \\n\\n*|\\n{2,}|__|\\*\\*|[_*]|~~)/gm,m=[],h="",i=c||{},d=0;function f(n){var r=e[n[1]||""],t=m[m.length-1]==n;return r?r[1]?(t?m.pop():m.push(n),r[0|t]):r[0]:n}function $(){for(var e="";m.length;)e+=f(m[m.length-1]);return e}for(a=a.replace(/^\\[(.+?)\\]:\\s*(.+)$/gm,function(e,n,r){return i[n.toLowerCase()]=r,""}).replace(/^\\n+|\\n+$/g,"");g=u.exec(a);)l=a.substring(d,g.index),d=u.lastIndex,o=g[0],l.match(/[^\\\\](\\\\\\\\)*\\\\$/)||((p=g[3]||g[4])?o=\'
    "+n(r(p).replace(/^\\n+|\\n+$/g,""))+"
    ":(p=g[6])?(p.match(/\\./)&&(g[5]=g[5].replace(/^\\d+/gm,"")),s=t(n(g[5].replace(/^\\s*[>*+.-]/gm,""))),">"==p?p="blockquote":(p=p.match(/\\./)?"ol":"ul",s=s.replace(/^(.*)(\\n|$)/gm,"
  • $1
  • ")),o="<"+p+">"+s+""):g[8]?o=\'\'+r(g[7])+\'\':g[10]?(h=h.replace("
    ",\'\'),o=$()+""):g[9]?o="":g[12]||g[14]?o="<"+(p="h"+(g[14]?g[14].length:g[13]>"="?1:2))+">"+t(g[12]||g[15],i)+"":g[16]?o=""+r(g[16])+"":(g[17]||g[1])&&(o=f(g[17]||"--"))),h+=l,h+=o;return(h+a.substring(d)+$()).replace(/^\\n+|\\n+$/g,"")}\n//# sourceMappingURL=snarkdown.es.js.map\n\n// EXTERNAL MODULE: ./node_modules/dompurify/dist/purify.js\nvar purify = __webpack_require__(856);\nvar purify_default = /*#__PURE__*/__webpack_require__.n(purify);\n;// CONCATENATED MODULE: ./src/lib/core-components/helpers.jsx\nfunction _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }\nfunction _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"]; if (!it) { if (Array.isArray(o) || (it = helpers_unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it["return"] != null) it["return"](); } finally { if (didErr) throw err; } } }; }\nfunction ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }\nfunction _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }\nfunction _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\nfunction _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }\nfunction _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }\nfunction _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || helpers_unsupportedIterableToArray(arr) || _nonIterableSpread(); }\nfunction _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }\nfunction helpers_unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return helpers_arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return helpers_arrayLikeToArray(o, minLen); }\nfunction _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }\nfunction _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return helpers_arrayLikeToArray(arr); }\nfunction helpers_arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }\n\n\nvar rawMarkup = function rawMarkup(data) {\n var sanitizer = (purify_default()).sanitize;\n return {\n __html: t(sanitizer(data))\n };\n};\nvar checkAnswer = function checkAnswer(index, correctAnswer, answerSelectionType, answers, _ref) {\n var userInput = _ref.userInput,\n userAttempt = _ref.userAttempt,\n currentQuestionIndex = _ref.currentQuestionIndex,\n continueTillCorrect = _ref.continueTillCorrect,\n showNextQuestionButton = _ref.showNextQuestionButton,\n incorrect = _ref.incorrect,\n correct = _ref.correct,\n setButtons = _ref.setButtons,\n setIsCorrect = _ref.setIsCorrect,\n setIncorrectAnswer = _ref.setIncorrectAnswer,\n setCorrect = _ref.setCorrect,\n setIncorrect = _ref.setIncorrect,\n setShowNextQuestionButton = _ref.setShowNextQuestionButton,\n setUserInput = _ref.setUserInput,\n setUserAttempt = _ref.setUserAttempt;\n var indexStr = "".concat(index);\n var disabledAll = {\n 0: {\n disabled: true\n },\n 1: {\n disabled: true\n },\n 2: {\n disabled: true\n },\n 3: {\n disabled: true\n }\n };\n var userInputCopy = _toConsumableArray(userInput);\n if (answerSelectionType === \'single\') {\n if (userInputCopy[currentQuestionIndex] === undefined) {\n userInputCopy[currentQuestionIndex] = index;\n }\n if (indexStr === correctAnswer) {\n if (incorrect.indexOf(currentQuestionIndex) < 0 && correct.indexOf(currentQuestionIndex) < 0) {\n correct.push(currentQuestionIndex);\n }\n setButtons(function (prevState) {\n return _objectSpread(_objectSpread(_objectSpread({}, prevState), disabledAll), {}, _defineProperty({}, index - 1, {\n className: indexStr === correctAnswer ? \'correct\' : \'incorrect\'\n }));\n });\n setIsCorrect(true);\n setIncorrectAnswer(false);\n setCorrect(correct);\n setShowNextQuestionButton(true);\n } else {\n if (correct.indexOf(currentQuestionIndex) < 0 && incorrect.indexOf(currentQuestionIndex) < 0) {\n incorrect.push(currentQuestionIndex);\n }\n if (continueTillCorrect) {\n setButtons(function (prevState) {\n return _objectSpread(_objectSpread({}, prevState), {}, _defineProperty({}, index - 1, {\n disabled: !prevState[index - 1]\n }));\n });\n } else {\n setButtons(function (prevState) {\n return _objectSpread(_objectSpread(_objectSpread({}, prevState), disabledAll), {}, _defineProperty({}, index - 1, {\n className: indexStr === correctAnswer ? \'correct\' : \'incorrect\'\n }));\n });\n setShowNextQuestionButton(true);\n }\n setIncorrectAnswer(true);\n setIsCorrect(false);\n setIncorrect(incorrect);\n }\n } else {\n var maxNumberOfMultipleSelection = correctAnswer.length;\n if (userInputCopy[currentQuestionIndex] === undefined) {\n userInputCopy[currentQuestionIndex] = [];\n }\n if (userInputCopy[currentQuestionIndex].length < maxNumberOfMultipleSelection) {\n userInputCopy[currentQuestionIndex].push(index);\n if (correctAnswer.includes(index)) {\n if (userInputCopy[currentQuestionIndex].length <= maxNumberOfMultipleSelection) {\n setButtons(function (prevState) {\n return _objectSpread(_objectSpread({}, prevState), {}, _defineProperty({}, index - 1, {\n disabled: !prevState[index - 1],\n className: correctAnswer.includes(index) ? \'correct\' : \'incorrect\'\n }));\n });\n }\n } else if (userInputCopy[currentQuestionIndex].length <= maxNumberOfMultipleSelection) {\n setButtons(function (prevState) {\n return _objectSpread(_objectSpread({}, prevState), {}, _defineProperty({}, index - 1, {\n className: correctAnswer.includes(index) ? \'correct\' : \'incorrect\'\n }));\n });\n }\n }\n if (maxNumberOfMultipleSelection === userAttempt) {\n var cnt = 0;\n for (var i = 0; i < correctAnswer.length; i += 1) {\n if (userInputCopy[currentQuestionIndex].includes(correctAnswer[i])) {\n cnt += 1;\n }\n }\n var _loop = function _loop(_i) {\n if (correctAnswer.includes(_i + 1)) {\n setButtons(function (prevState) {\n return _objectSpread(_objectSpread({}, prevState), {}, _defineProperty({}, _i, {}));\n });\n }\n };\n for (var _i = 0; _i < answers.length; _i += 1) {\n _loop(_i);\n }\n if (cnt === maxNumberOfMultipleSelection) {\n correct.push(currentQuestionIndex);\n setIsCorrect(true);\n setIncorrectAnswer(false);\n setCorrect(correct);\n setShowNextQuestionButton(true);\n setUserAttempt(1);\n } else {\n incorrect.push(currentQuestionIndex);\n setIncorrectAnswer(true);\n setIsCorrect(false);\n setIncorrect(incorrect);\n setShowNextQuestionButton(true);\n setUserAttempt(1);\n }\n } else if (!showNextQuestionButton) {\n setUserAttempt(userAttempt + 1);\n }\n }\n setUserInput(userInputCopy);\n};\nvar selectAnswer = function selectAnswer(index, correctAnswer, answerSelectionType, _ref2) {\n var userInput = _ref2.userInput,\n currentQuestionIndex = _ref2.currentQuestionIndex,\n setButtons = _ref2.setButtons,\n setShowNextQuestionButton = _ref2.setShowNextQuestionButton,\n incorrect = _ref2.incorrect,\n correct = _ref2.correct,\n setCorrect = _ref2.setCorrect,\n setIncorrect = _ref2.setIncorrect,\n setUserInput = _ref2.setUserInput;\n var selectedButtons = {\n 0: {\n selected: false\n },\n 1: {\n selected: false\n },\n 2: {\n selected: false\n },\n 3: {\n selected: false\n }\n };\n var userInputCopy = _toConsumableArray(userInput);\n if (answerSelectionType === \'single\') {\n correctAnswer = Number(correctAnswer);\n userInputCopy[currentQuestionIndex] = index;\n if (index === correctAnswer) {\n if (correct.indexOf(currentQuestionIndex) < 0) {\n correct.push(currentQuestionIndex);\n }\n if (incorrect.indexOf(currentQuestionIndex) >= 0) {\n incorrect.splice(incorrect.indexOf(currentQuestionIndex), 1);\n }\n } else {\n if (incorrect.indexOf(currentQuestionIndex) < 0) {\n incorrect.push(currentQuestionIndex);\n }\n if (correct.indexOf(currentQuestionIndex) >= 0) {\n correct.splice(correct.indexOf(currentQuestionIndex), 1);\n }\n }\n setCorrect(correct);\n setIncorrect(incorrect);\n setButtons(function (prevState) {\n return _objectSpread(_objectSpread(_objectSpread({}, prevState), selectedButtons), {}, _defineProperty({}, index - 1, {\n className: \'selected\'\n }));\n });\n setShowNextQuestionButton(true);\n } else {\n if (userInputCopy[currentQuestionIndex] === undefined) {\n userInputCopy[currentQuestionIndex] = [];\n }\n if (userInputCopy[currentQuestionIndex].includes(index)) {\n userInputCopy[currentQuestionIndex].splice(userInputCopy[currentQuestionIndex].indexOf(index), 1);\n } else {\n userInputCopy[currentQuestionIndex].push(index);\n }\n if (userInputCopy[currentQuestionIndex].length === correctAnswer.length) {\n var exactMatch = true;\n // eslint-disable-next-line no-restricted-syntax\n var _iterator = _createForOfIteratorHelper(userInput[currentQuestionIndex]),\n _step;\n try {\n for (_iterator.s(); !(_step = _iterator.n()).done;) {\n var input = _step.value;\n if (!correctAnswer.includes(input)) {\n exactMatch = false;\n if (incorrect.indexOf(currentQuestionIndex) < 0) {\n incorrect.push(currentQuestionIndex);\n }\n if (correct.indexOf(currentQuestionIndex) >= 0) {\n correct.splice(correct.indexOf(currentQuestionIndex), 1);\n }\n break;\n }\n }\n } catch (err) {\n _iterator.e(err);\n } finally {\n _iterator.f();\n }\n if (exactMatch) {\n if (correct.indexOf(currentQuestionIndex) < 0) {\n correct.push(currentQuestionIndex);\n }\n if (incorrect.indexOf(currentQuestionIndex) >= 0) {\n incorrect.splice(incorrect.indexOf(currentQuestionIndex), 1);\n }\n }\n } else {\n if (incorrect.indexOf(currentQuestionIndex) < 0) {\n incorrect.push(currentQuestionIndex);\n }\n if (correct.indexOf(currentQuestionIndex) >= 0) {\n correct.splice(correct.indexOf(currentQuestionIndex), 1);\n }\n }\n setCorrect(correct);\n setIncorrect(incorrect);\n setButtons(function (prevState) {\n return _objectSpread(_objectSpread({}, prevState), {}, _defineProperty({}, index - 1, {\n className: userInputCopy[currentQuestionIndex].includes(index) ? \'selected\' : undefined\n }));\n });\n if (userInputCopy[currentQuestionIndex].length > 0) {\n setShowNextQuestionButton(true);\n }\n }\n setUserInput(userInputCopy);\n};\n;// CONCATENATED MODULE: ./src/lib/core-components/Explanation.jsx\n\nfunction Explanation(_ref) {\n var question = _ref.question,\n isResultPage = _ref.isResultPage;\n var explanation = question.explanation;\n if (!explanation) {\n return null;\n }\n if (isResultPage) {\n return /*#__PURE__*/react.createElement("div", {\n className: "explanation"\n }, explanation);\n }\n return /*#__PURE__*/react.createElement("div", null, /*#__PURE__*/react.createElement("br", null), explanation);\n}\n/* harmony default export */ const core_components_Explanation = (Explanation);\n;// CONCATENATED MODULE: ./src/lib/core-components/InstantFeedback.jsx\n\n\nvar renderMessageForCorrectAnswer = function renderMessageForCorrectAnswer(question) {\n var defaultMessage = \'You are correct. Please click Next to continue.\';\n return question.messageForCorrectAnswer || defaultMessage;\n};\nvar renderMessageForIncorrectAnswer = function renderMessageForIncorrectAnswer(question) {\n var defaultMessage = \'Incorrect answer. Please try again.\';\n return question.messageForIncorrectAnswer || defaultMessage;\n};\nfunction InstantFeedback(_ref) {\n var showInstantFeedback = _ref.showInstantFeedback,\n incorrectAnswer = _ref.incorrectAnswer,\n correctAnswer = _ref.correctAnswer,\n question = _ref.question,\n onQuestionSubmit = _ref.onQuestionSubmit,\n userAnswer = _ref.userAnswer;\n (0,react.useEffect)(function () {\n if (onQuestionSubmit && (correctAnswer || incorrectAnswer)) {\n onQuestionSubmit({\n question: question,\n userAnswer: userAnswer,\n isCorrect: correctAnswer\n });\n }\n }, [correctAnswer, incorrectAnswer]);\n return /*#__PURE__*/react.createElement(react.Fragment, null, incorrectAnswer && showInstantFeedback && /*#__PURE__*/react.createElement("div", {\n className: "alert incorrect"\n }, renderMessageForIncorrectAnswer(question)), correctAnswer && showInstantFeedback && /*#__PURE__*/react.createElement("div", {\n className: "alert correct"\n }, renderMessageForCorrectAnswer(question), /*#__PURE__*/react.createElement(core_components_Explanation, {\n question: question,\n isResultPage: false\n })));\n}\n/* harmony default export */ const core_components_InstantFeedback = (InstantFeedback);\n;// CONCATENATED MODULE: ./src/lib/Core.jsx\nfunction Core_toConsumableArray(arr) { return Core_arrayWithoutHoles(arr) || Core_iterableToArray(arr) || Core_unsupportedIterableToArray(arr) || Core_nonIterableSpread(); }\nfunction Core_nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }\nfunction Core_iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }\nfunction Core_arrayWithoutHoles(arr) { if (Array.isArray(arr)) return Core_arrayLikeToArray(arr); }\nfunction Core_typeof(o) { "@babel/helpers - typeof"; return Core_typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, Core_typeof(o); }\nfunction Core_slicedToArray(arr, i) { return Core_arrayWithHoles(arr) || Core_iterableToArrayLimit(arr, i) || Core_unsupportedIterableToArray(arr, i) || Core_nonIterableRest(); }\nfunction Core_nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }\nfunction Core_unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return Core_arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return Core_arrayLikeToArray(o, minLen); }\nfunction Core_arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }\nfunction Core_iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t["return"] && (u = t["return"](), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }\nfunction Core_arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }\n\n\n\n\n\n\nfunction Core(_ref) {\n var questions = _ref.questions,\n appLocale = _ref.appLocale,\n showDefaultResult = _ref.showDefaultResult,\n onComplete = _ref.onComplete,\n customResultPage = _ref.customResultPage,\n showInstantFeedback = _ref.showInstantFeedback,\n continueTillCorrect = _ref.continueTillCorrect,\n revealAnswerOnSubmit = _ref.revealAnswerOnSubmit,\n allowNavigation = _ref.allowNavigation,\n onQuestionSubmit = _ref.onQuestionSubmit,\n timer = _ref.timer,\n allowPauseTimer = _ref.allowPauseTimer;\n var _useState = (0,react.useState)(false),\n _useState2 = Core_slicedToArray(_useState, 2),\n incorrectAnswer = _useState2[0],\n setIncorrectAnswer = _useState2[1];\n var _useState3 = (0,react.useState)(false),\n _useState4 = Core_slicedToArray(_useState3, 2),\n isCorrect = _useState4[0],\n setIsCorrect = _useState4[1];\n var _useState5 = (0,react.useState)(false),\n _useState6 = Core_slicedToArray(_useState5, 2),\n showNextQuestionButton = _useState6[0],\n setShowNextQuestionButton = _useState6[1];\n var _useState7 = (0,react.useState)(false),\n _useState8 = Core_slicedToArray(_useState7, 2),\n endQuiz = _useState8[0],\n setEndQuiz = _useState8[1];\n var _useState9 = (0,react.useState)(0),\n _useState10 = Core_slicedToArray(_useState9, 2),\n currentQuestionIndex = _useState10[0],\n setCurrentQuestionIndex = _useState10[1];\n var _useState11 = (0,react.useState)({}),\n _useState12 = Core_slicedToArray(_useState11, 2),\n buttons = _useState12[0],\n setButtons = _useState12[1];\n var _useState13 = (0,react.useState)([]),\n _useState14 = Core_slicedToArray(_useState13, 2),\n correct = _useState14[0],\n setCorrect = _useState14[1];\n var _useState15 = (0,react.useState)([]),\n _useState16 = Core_slicedToArray(_useState15, 2),\n incorrect = _useState16[0],\n setIncorrect = _useState16[1];\n var _useState17 = (0,react.useState)([]),\n _useState18 = Core_slicedToArray(_useState17, 2),\n unanswered = _useState18[0],\n setUnanswered = _useState18[1];\n var _useState19 = (0,react.useState)([]),\n _useState20 = Core_slicedToArray(_useState19, 2),\n userInput = _useState20[0],\n setUserInput = _useState20[1];\n var _useState21 = (0,react.useState)(\'all\'),\n _useState22 = Core_slicedToArray(_useState21, 2),\n filteredValue = _useState22[0],\n setFilteredValue = _useState22[1];\n var _useState23 = (0,react.useState)(1),\n _useState24 = Core_slicedToArray(_useState23, 2),\n userAttempt = _useState24[0],\n setUserAttempt = _useState24[1];\n var _useState25 = (0,react.useState)(true),\n _useState26 = Core_slicedToArray(_useState25, 2),\n showDefaultResultState = _useState26[0],\n setShowDefaultResult = _useState26[1];\n var _useState27 = (0,react.useState)(undefined),\n _useState28 = Core_slicedToArray(_useState27, 2),\n answerSelectionTypeState = _useState28[0],\n setAnswerSelectionType = _useState28[1];\n var _useState29 = (0,react.useState)(0),\n _useState30 = Core_slicedToArray(_useState29, 2),\n totalPoints = _useState30[0],\n setTotalPoints = _useState30[1];\n var _useState31 = (0,react.useState)(0),\n _useState32 = Core_slicedToArray(_useState31, 2),\n correctPoints = _useState32[0],\n setCorrectPoints = _useState32[1];\n var _useState33 = (0,react.useState)(questions[currentQuestionIndex]),\n _useState34 = Core_slicedToArray(_useState33, 2),\n activeQuestion = _useState34[0],\n setActiveQuestion = _useState34[1];\n var _useState35 = (0,react.useState)(undefined),\n _useState36 = Core_slicedToArray(_useState35, 2),\n questionSummary = _useState36[0],\n setQuestionSummary = _useState36[1];\n var _useState37 = (0,react.useState)(timer),\n _useState38 = Core_slicedToArray(_useState37, 2),\n timeRemaining = _useState38[0],\n setTimeRemaining = _useState38[1];\n var _useState39 = (0,react.useState)(true),\n _useState40 = Core_slicedToArray(_useState39, 2),\n isRunning = _useState40[0],\n setIsRunning = _useState40[1];\n (0,react.useEffect)(function () {\n setShowDefaultResult(showDefaultResult !== undefined ? showDefaultResult : true);\n }, [showDefaultResult]);\n (0,react.useEffect)(function () {\n setActiveQuestion(questions[currentQuestionIndex]);\n }, [currentQuestionIndex, questions]);\n (0,react.useEffect)(function () {\n var answerSelectionType = activeQuestion.answerSelectionType;\n // Default single to avoid code breaking due to automatic version upgrade\n setAnswerSelectionType(answerSelectionType || \'single\');\n }, [activeQuestion, currentQuestionIndex]);\n (0,react.useEffect)(function () {\n if (endQuiz) {\n setIsRunning(false);\n var totalPointsTemp = 0;\n var correctPointsTemp = 0;\n for (var i = 0; i < questions.length; i += 1) {\n var point = questions[i].point || 0;\n if (typeof point === \'string\' || point instanceof String) {\n point = parseInt(point, 10);\n }\n totalPointsTemp += point;\n if (correct.includes(i)) {\n correctPointsTemp += point;\n }\n }\n setTotalPoints(totalPointsTemp);\n setCorrectPoints(correctPointsTemp);\n }\n }, [endQuiz]);\n (0,react.useEffect)(function () {\n setQuestionSummary({\n numberOfQuestions: questions.length,\n numberOfCorrectAnswers: correct.length,\n numberOfIncorrectAnswers: incorrect.length,\n questions: questions,\n userInput: userInput,\n totalPoints: totalPoints,\n correctPoints: correctPoints\n });\n }, [totalPoints, correctPoints]);\n (0,react.useEffect)(function () {\n if (endQuiz && onComplete !== undefined && questionSummary !== undefined) {\n onComplete(questionSummary);\n }\n }, [questionSummary]);\n var nextQuestion = function nextQuestion(currentQuestionIdx) {\n setIncorrectAnswer(false);\n setIsCorrect(false);\n setShowNextQuestionButton(false);\n setButtons({});\n if (currentQuestionIdx + 1 === questions.length) {\n if (userInput.length !== questions.length) {\n alert(\'Quiz is incomplete\');\n } else if (allowNavigation) {\n var submitQuiz = confirm(\'You have finished all the questions. Submit Quiz now?\');\n if (submitQuiz) {\n setEndQuiz(true);\n }\n } else {\n setEndQuiz(true);\n }\n } else {\n setCurrentQuestionIndex(currentQuestionIdx + 1);\n }\n };\n var handleChange = function handleChange(event) {\n setFilteredValue(event.target.value);\n };\n var renderAnswerInResult = function renderAnswerInResult(question, userInputIndex) {\n var answers = question.answers,\n correctAnswer = question.correctAnswer,\n questionType = question.questionType;\n var answerSelectionType = question.answerSelectionType;\n var answerBtnCorrectClassName;\n var answerBtnIncorrectClassName;\n\n // Default single to avoid code breaking due to automatic version upgrade\n answerSelectionType = answerSelectionType || \'single\';\n return answers.map(function (answer, index) {\n if (answerSelectionType === \'single\') {\n // correctAnswer - is string\n answerBtnCorrectClassName = "".concat(index + 1) === correctAnswer ? \'correct\' : \'\';\n answerBtnIncorrectClassName = "".concat(userInputIndex) !== correctAnswer && "".concat(index + 1) === "".concat(userInputIndex) ? \'incorrect\' : \'\';\n if (userInputIndex === undefined && "".concat(index + 1) !== correctAnswer) {\n answerBtnIncorrectClassName = \'unanswered\';\n }\n } else {\n // correctAnswer - is array of numbers\n answerBtnCorrectClassName = correctAnswer.includes(index + 1) ? \'correct\' : \'\';\n answerBtnIncorrectClassName = !correctAnswer.includes(index + 1) && userInputIndex !== null && userInputIndex !== void 0 && userInputIndex.includes(index + 1) ? \'incorrect\' : \'\';\n if (userInputIndex === undefined && !correctAnswer.includes(index + 1)) {\n answerBtnIncorrectClassName = \'unanswered\';\n }\n }\n return /*#__PURE__*/react.createElement("div", {\n key: esm_browser_v4()\n }, /*#__PURE__*/react.createElement("button", {\n type: "button",\n disabled: true,\n className: "answerBtn btn ".concat(answerBtnCorrectClassName).concat(answerBtnIncorrectClassName)\n }, questionType === \'text\' && /*#__PURE__*/react.createElement("span", null, answer), questionType === \'photo\' && /*#__PURE__*/react.createElement("img", {\n src: answer,\n alt: "answer"\n })));\n });\n };\n var renderTags = function renderTags(answerSelectionType, numberOfSelection, segment) {\n var singleSelectionTagText = appLocale.singleSelectionTagText,\n multipleSelectionTagText = appLocale.multipleSelectionTagText,\n pickNumberOfSelection = appLocale.pickNumberOfSelection;\n return /*#__PURE__*/react.createElement("div", {\n className: "tag-container"\n }, answerSelectionType === \'single\' && /*#__PURE__*/react.createElement("span", {\n className: "single selection-tag"\n }, singleSelectionTagText), answerSelectionType === \'multiple\' && /*#__PURE__*/react.createElement("span", {\n className: "multiple selection-tag"\n }, multipleSelectionTagText), /*#__PURE__*/react.createElement("span", {\n className: "number-of-selection"\n }, pickNumberOfSelection.replace(\'\', numberOfSelection)), segment && /*#__PURE__*/react.createElement("span", {\n className: "selection-tag segment"\n }, segment));\n };\n var isCorrectCheck = function isCorrectCheck(index, correctAnswerIndex) {\n if (typeof correctAnswerIndex === \'string\') {\n return index === Number(correctAnswerIndex);\n }\n if (Core_typeof(correctAnswerIndex) === \'object\') {\n return correctAnswerIndex.find(function (element) {\n return element === index;\n }) !== undefined;\n }\n return false;\n };\n var renderQuizResultQuestions = (0,react.useCallback)(function () {\n var filteredQuestions;\n var filteredUserInput;\n if (filteredValue !== \'all\') {\n var targetQuestions = unanswered;\n if (filteredValue === \'correct\') {\n targetQuestions = correct;\n } else if (filteredValue === \'incorrect\') {\n targetQuestions = incorrect;\n }\n filteredQuestions = questions.filter(function (_, index) {\n return targetQuestions.indexOf(index) !== -1;\n });\n filteredUserInput = userInput.filter(function (_, index) {\n return targetQuestions.indexOf(index) !== -1;\n });\n }\n return (filteredQuestions || questions).map(function (question, index) {\n var userInputIndex = filteredUserInput ? filteredUserInput[index] : userInput[index];\n\n // Default single to avoid code breaking due to automatic version upgrade\n var answerSelectionType = question.answerSelectionType || \'single\';\n return /*#__PURE__*/react.createElement("div", {\n className: "result-answer-wrapper",\n key: esm_browser_v4()\n }, /*#__PURE__*/react.createElement("h3", {\n dangerouslySetInnerHTML: rawMarkup("Q".concat(question.questionIndex, ": ").concat(question.question, " ").concat(appLocale.marksOfQuestion.replace(\'\', question.point)))\n }), question.questionPic && /*#__PURE__*/react.createElement("img", {\n src: question.questionPic,\n alt: "question"\n }), renderTags(answerSelectionType, question.correctAnswer.length, question.segment), /*#__PURE__*/react.createElement("div", {\n className: "result-answer"\n }, renderAnswerInResult(question, userInputIndex)), /*#__PURE__*/react.createElement(core_components_Explanation, {\n question: question,\n isResultPage: true\n }));\n });\n }, [endQuiz, filteredValue]);\n var renderAnswers = function renderAnswers(question, answerButtons) {\n var answers = question.answers,\n correctAnswer = question.correctAnswer,\n questionType = question.questionType,\n questionIndex = question.questionIndex;\n var answerSelectionType = question.answerSelectionType;\n var onClickAnswer = function onClickAnswer(index) {\n return checkAnswer(index + 1, correctAnswer, answerSelectionType, answers, {\n userInput: userInput,\n userAttempt: userAttempt,\n currentQuestionIndex: currentQuestionIndex,\n continueTillCorrect: continueTillCorrect,\n showNextQuestionButton: showNextQuestionButton,\n incorrect: incorrect,\n correct: correct,\n setButtons: setButtons,\n setIsCorrect: setIsCorrect,\n setIncorrectAnswer: setIncorrectAnswer,\n setCorrect: setCorrect,\n setIncorrect: setIncorrect,\n setShowNextQuestionButton: setShowNextQuestionButton,\n setUserInput: setUserInput,\n setUserAttempt: setUserAttempt\n });\n };\n var onSelectAnswer = function onSelectAnswer(index) {\n return selectAnswer(index + 1, correctAnswer, answerSelectionType, {\n userInput: userInput,\n currentQuestionIndex: currentQuestionIndex,\n setButtons: setButtons,\n setShowNextQuestionButton: setShowNextQuestionButton,\n incorrect: incorrect,\n correct: correct,\n setCorrect: setCorrect,\n setIncorrect: setIncorrect,\n setUserInput: setUserInput\n });\n };\n var checkSelectedAnswer = function checkSelectedAnswer(index) {\n if (userInput[questionIndex - 1] === undefined) {\n return false;\n }\n if (answerSelectionType === \'single\') {\n return userInput[questionIndex - 1] === index;\n }\n return Array.isArray(userInput[questionIndex - 1]) && userInput[questionIndex - 1].includes(index);\n };\n\n // Default single to avoid code breaking due to automatic version upgrade\n answerSelectionType = answerSelectionType || \'single\';\n return answers.map(function (answer, index) {\n return /*#__PURE__*/react.createElement(react.Fragment, {\n key: esm_browser_v4()\n }, answerButtons[index] !== undefined ? /*#__PURE__*/react.createElement("button", {\n type: "button",\n disabled: answerButtons[index].disabled || false,\n className: "".concat(answerButtons[index].className, " answerBtn btn ").concat(isCorrectCheck(index + 1, correctAnswer) && showInstantFeedback ? \'correct\' : \'\'),\n onClick: function onClick() {\n return revealAnswerOnSubmit ? onSelectAnswer(index) : onClickAnswer(index);\n }\n }, questionType === \'text\' && /*#__PURE__*/react.createElement("span", null, answer), questionType === \'photo\' && /*#__PURE__*/react.createElement("img", {\n src: answer,\n alt: "answer"\n })) : /*#__PURE__*/react.createElement("button", {\n type: "button",\n onClick: function onClick() {\n return revealAnswerOnSubmit ? onSelectAnswer(index) : onClickAnswer(index);\n },\n className: "answerBtn btn ".concat(allowNavigation && checkSelectedAnswer(index + 1) ? \'selected\' : null)\n }, questionType === \'text\' && answer, questionType === \'photo\' && /*#__PURE__*/react.createElement("img", {\n src: answer,\n alt: "answer"\n })));\n });\n };\n var getUnansweredQuestions = function getUnansweredQuestions() {\n questions.forEach(function (question, index) {\n if (userInput[index] === undefined) {\n setUnanswered(function (oldArray) {\n return [].concat(Core_toConsumableArray(oldArray), [index]);\n });\n }\n });\n };\n var renderResult = function renderResult() {\n return /*#__PURE__*/react.createElement("div", {\n className: "card-body"\n }, /*#__PURE__*/react.createElement("h2", null, appLocale.resultPageHeaderText.replace(\'\', correct.length).replace(\'\', questions.length)), /*#__PURE__*/react.createElement("h2", null, appLocale.resultPagePoint.replace(\'\', correctPoints).replace(\'\', totalPoints)), /*#__PURE__*/react.createElement("br", null), /*#__PURE__*/react.createElement(core_components_QuizResultFilter, {\n filteredValue: filteredValue,\n handleChange: handleChange,\n appLocale: appLocale\n }), renderQuizResultQuestions());\n };\n (0,react.useEffect)(function () {\n var countdown;\n if (timer && isRunning && timeRemaining > 0) {\n countdown = setInterval(function () {\n setTimeRemaining(function (prevTime) {\n return prevTime - 1;\n });\n }, 1000);\n }\n return function () {\n return timer && clearInterval(countdown);\n };\n }, [isRunning, timeRemaining, timer]);\n var toggleTimer = function toggleTimer() {\n setIsRunning(!isRunning);\n };\n var formatTime = function formatTime(time) {\n return time < 10 ? \'0\' : \'\';\n };\n var displayTime = function displayTime(time) {\n var hours = Math.floor(time / 3600);\n var minutes = Math.floor(time % 3600 / 60);\n var seconds = time % 60;\n return "".concat(formatTime(hours)).concat(hours, ":").concat(formatTime(minutes)).concat(minutes, ":").concat(formatTime(seconds)).concat(seconds);\n };\n var handleTimeUp = function handleTimeUp() {\n setIsRunning(false);\n setEndQuiz(true);\n getUnansweredQuestions();\n };\n return /*#__PURE__*/react.createElement("div", {\n className: "questionWrapper"\n }, timer && !isRunning && /*#__PURE__*/react.createElement("div", null, appLocale.timerTimeTaken, ":", \' \', /*#__PURE__*/react.createElement("b", null, displayTime(timer - timeRemaining))), timer && isRunning && /*#__PURE__*/react.createElement("div", null, appLocale.timerTimeRemaining, ":", \' \', /*#__PURE__*/react.createElement("b", null, displayTime(timeRemaining))), timer && timeRemaining === 0 && isRunning && handleTimeUp(), !endQuiz && /*#__PURE__*/react.createElement("div", {\n className: "questionWrapperBody"\n }, /*#__PURE__*/react.createElement("div", null, "".concat(appLocale.question, " ").concat(currentQuestionIndex + 1, " / ").concat(questions.length, ":"), /*#__PURE__*/react.createElement("br", null), timer && allowPauseTimer && /*#__PURE__*/react.createElement("button", {\n type: "button",\n className: "timerBtn",\n onClick: toggleTimer\n }, isRunning ? appLocale.pauseScreenPause : appLocale.pauseScreenResume)), isRunning ? /*#__PURE__*/react.createElement(react.Fragment, null, /*#__PURE__*/react.createElement("h3", {\n dangerouslySetInnerHTML: rawMarkup("".concat(activeQuestion && activeQuestion.question, " ").concat(appLocale.marksOfQuestion.replace(\'\', activeQuestion.point)))\n }), activeQuestion && activeQuestion.questionPic && /*#__PURE__*/react.createElement("img", {\n src: activeQuestion.questionPic,\n alt: "question"\n }), activeQuestion && renderTags(answerSelectionTypeState, activeQuestion.correctAnswer.length, activeQuestion.segment), /*#__PURE__*/react.createElement("div", {\n className: "questionModal"\n }, /*#__PURE__*/react.createElement(core_components_InstantFeedback, {\n question: activeQuestion,\n showInstantFeedback: showInstantFeedback,\n correctAnswer: isCorrect,\n incorrectAnswer: incorrectAnswer,\n onQuestionSubmit: onQuestionSubmit,\n userAnswer: Core_toConsumableArray(userInput).pop()\n })), activeQuestion && renderAnswers(activeQuestion, buttons), (showNextQuestionButton || allowNavigation) && /*#__PURE__*/react.createElement("div", {\n className: "questionBtnContainer"\n }, allowNavigation && currentQuestionIndex > 0 && /*#__PURE__*/react.createElement("button", {\n onClick: function onClick() {\n return nextQuestion(currentQuestionIndex - 2);\n },\n className: "prevQuestionBtn btn",\n type: "button"\n }, appLocale.prevQuestionBtn), /*#__PURE__*/react.createElement("button", {\n onClick: function onClick() {\n return nextQuestion(currentQuestionIndex);\n },\n className: "nextQuestionBtn btn",\n type: "button"\n }, appLocale.nextQuestionBtn))) : /*#__PURE__*/react.createElement("span", {\n className: "timerPauseScreen dark:text-white text-black"\n }, /*#__PURE__*/react.createElement("br", null), /*#__PURE__*/react.createElement("br", null), appLocale.pauseScreenDisplay)), endQuiz && showDefaultResultState && customResultPage === undefined && renderResult(), endQuiz && !showDefaultResultState && customResultPage !== undefined && customResultPage(questionSummary));\n}\n/* harmony default export */ const lib_Core = (Core);\n;// CONCATENATED MODULE: ./src/lib/Locale.jsx\nvar defaultLocale = {\n landingHeaderText: \' Questions\',\n question: \'Question\',\n startQuizBtn: \'Start Quiz\',\n resultFilterAll: \'All\',\n resultFilterCorrect: \'Correct\',\n resultFilterIncorrect: \'Incorrect\',\n resultFilterUnanswered: \'Unanswered\',\n nextQuestionBtn: \'Next\',\n prevQuestionBtn: \'Prev\',\n resultPageHeaderText: \'You have completed the quiz. You got out of questions.\',\n resultPagePoint: \'You scored out of .\',\n pauseScreenDisplay: \'Test is paused. Clicked the Resume button to continue\',\n timerTimeRemaining: \'Time Remaining\',\n timerTimeTaken: \'Time Taken\',\n pauseScreenPause: \'Pause\',\n pauseScreenResume: \'Resume\',\n singleSelectionTagText: \'Single Selection\',\n multipleSelectionTagText: \'Multiple Selection\',\n pickNumberOfSelection: \'Pick \',\n marksOfQuestion: \'( marks)\'\n};\n/* harmony default export */ const Locale = (defaultLocale);\n;// CONCATENATED MODULE: ./src/lib/Quiz.jsx\nfunction Quiz_typeof(o) { "@babel/helpers - typeof"; return Quiz_typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, Quiz_typeof(o); }\nfunction Quiz_ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }\nfunction Quiz_objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? Quiz_ownKeys(Object(t), !0).forEach(function (r) { Quiz_defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : Quiz_ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }\nfunction Quiz_defineProperty(obj, key, value) { key = Quiz_toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\nfunction Quiz_toPropertyKey(arg) { var key = Quiz_toPrimitive(arg, "string"); return Quiz_typeof(key) === "symbol" ? key : String(key); }\nfunction Quiz_toPrimitive(input, hint) { if (Quiz_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (Quiz_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }\nfunction Quiz_slicedToArray(arr, i) { return Quiz_arrayWithHoles(arr) || Quiz_iterableToArrayLimit(arr, i) || Quiz_unsupportedIterableToArray(arr, i) || Quiz_nonIterableRest(); }\nfunction Quiz_nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }\nfunction Quiz_unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return Quiz_arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return Quiz_arrayLikeToArray(o, minLen); }\nfunction Quiz_arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }\nfunction Quiz_iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t["return"] && (u = t["return"](), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }\nfunction Quiz_arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }\n\n\n\n\nfunction Quiz(_ref) {\n var quiz = _ref.quiz,\n shuffle = _ref.shuffle,\n shuffleAnswer = _ref.shuffleAnswer,\n showDefaultResult = _ref.showDefaultResult,\n onComplete = _ref.onComplete,\n customResultPage = _ref.customResultPage,\n showInstantFeedback = _ref.showInstantFeedback,\n continueTillCorrect = _ref.continueTillCorrect,\n revealAnswerOnSubmit = _ref.revealAnswerOnSubmit,\n allowNavigation = _ref.allowNavigation,\n onQuestionSubmit = _ref.onQuestionSubmit,\n disableSynopsis = _ref.disableSynopsis,\n timer = _ref.timer,\n allowPauseTimer = _ref.allowPauseTimer;\n var _useState = (0,react.useState)(false),\n _useState2 = Quiz_slicedToArray(_useState, 2),\n start = _useState2[0],\n setStart = _useState2[1];\n var _useState3 = (0,react.useState)(quiz.questions),\n _useState4 = Quiz_slicedToArray(_useState3, 2),\n questions = _useState4[0],\n setQuestions = _useState4[1];\n var nrOfQuestions = quiz.nrOfQuestions && quiz.nrOfQuestions < quiz.questions.length ? quiz.nrOfQuestions : quiz.questions.length;\n\n // Shuffle answers funtion here\n var shuffleAnswerSequence = function shuffleAnswerSequence() {\n var oldQuestions = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];\n var newQuestions = oldQuestions.map(function (question) {\n var _question$answers;\n var answerWithIndex = (_question$answers = question.answers) === null || _question$answers === void 0 ? void 0 : _question$answers.map(function (ans, i) {\n return [ans, i];\n });\n var shuffledAnswersWithIndex = answerWithIndex.sort(function () {\n return Math.random() - 0.5;\n });\n var shuffledAnswers = shuffledAnswersWithIndex.map(function (ans) {\n return ans[0];\n });\n if (question.answerSelectionType === \'single\') {\n var oldCorrectAnswer = question.correctAnswer;\n var newCorrectAnswer = shuffledAnswersWithIndex.findIndex(function (ans) {\n return "".concat(ans[1] + 1) === "".concat(oldCorrectAnswer);\n }) + 1;\n return Quiz_objectSpread(Quiz_objectSpread({}, question), {}, {\n correctAnswer: "".concat(newCorrectAnswer),\n answers: shuffledAnswers\n });\n }\n if (question.answerSelectionType === \'multiple\') {\n var _oldCorrectAnswer = question.correctAnswer;\n var _newCorrectAnswer = _oldCorrectAnswer.map(function (cans) {\n return shuffledAnswersWithIndex.findIndex(function (ans) {\n return "".concat(ans[1] + 1) === "".concat(cans);\n }) + 1;\n });\n return Quiz_objectSpread(Quiz_objectSpread({}, question), {}, {\n correctAnswer: _newCorrectAnswer,\n answers: shuffledAnswers\n });\n }\n return question;\n });\n return newQuestions;\n };\n var shuffleQuestions = (0,react.useCallback)(function (q) {\n for (var i = q.length - 1; i > 0; i -= 1) {\n var j = Math.floor(Math.random() * (i + 1));\n var _ref2 = [q[j], q[i]];\n q[i] = _ref2[0];\n q[j] = _ref2[1];\n }\n return q;\n }, []);\n (0,react.useEffect)(function () {\n if (disableSynopsis) setStart(true);\n }, []);\n (0,react.useEffect)(function () {\n var newQuestions = quiz.questions;\n if (shuffle) {\n newQuestions = shuffleQuestions(newQuestions);\n }\n if (shuffleAnswer) {\n newQuestions = shuffleAnswerSequence(newQuestions);\n }\n newQuestions.length = nrOfQuestions;\n newQuestions = newQuestions.map(function (question, index) {\n return Quiz_objectSpread(Quiz_objectSpread({}, question), {}, {\n questionIndex: index + 1\n });\n });\n setQuestions(newQuestions);\n }, [start]);\n var validateQuiz = function validateQuiz(q) {\n if (!q) {\n console.error(\'Quiz object is required.\');\n return false;\n }\n if (timer && typeof timer !== \'number\' || timer < 1) {\n console.error(timer && typeof timer !== \'number\' ? \'timer must be a number\' : \'timer must be a number greater than 0\');\n return false;\n }\n if (allowPauseTimer && typeof allowPauseTimer !== \'boolean\') {\n console.error(\'allowPauseTimer must be a Boolean\');\n return false;\n }\n for (var i = 0; i < questions.length; i += 1) {\n var _questions$i = questions[i],\n question = _questions$i.question,\n questionType = _questions$i.questionType,\n answerSelectionType = _questions$i.answerSelectionType,\n answers = _questions$i.answers,\n correctAnswer = _questions$i.correctAnswer;\n if (!question) {\n console.error("Field \'question\' is required.");\n return false;\n }\n if (!questionType) {\n console.error("Field \'questionType\' is required.");\n return false;\n }\n if (questionType !== \'text\' && questionType !== \'photo\') {\n console.error("The value of \'questionType\' is either \'text\' or \'photo\'.");\n return false;\n }\n if (!answers) {\n console.error("Field \'answers\' is required.");\n return false;\n }\n if (!Array.isArray(answers)) {\n console.error("Field \'answers\' has to be an Array");\n return false;\n }\n if (!correctAnswer) {\n console.error("Field \'correctAnswer\' is required.");\n return false;\n }\n var selectType = answerSelectionType;\n if (!answerSelectionType) {\n // Default single to avoid code breaking due to automatic version upgrade\n console.warn(\'Field answerSelectionType should be defined since v0.3.0. Use single by default.\');\n selectType = answerSelectionType || \'single\';\n }\n if (selectType === \'single\' && !(typeof selectType === \'string\' || selectType instanceof String)) {\n console.error(\'answerSelectionType is single but expecting String in the field correctAnswer\');\n return false;\n }\n if (selectType === \'multiple\' && !Array.isArray(correctAnswer)) {\n console.error(\'answerSelectionType is multiple but expecting Array in the field correctAnswer\');\n return false;\n }\n }\n return true;\n };\n if (!validateQuiz(quiz)) {\n return null;\n }\n var appLocale = Quiz_objectSpread(Quiz_objectSpread({}, Locale), quiz.appLocale);\n return /*#__PURE__*/react.createElement("div", {\n className: "react-quiz-container"\n }, !start && /*#__PURE__*/react.createElement("div", null, /*#__PURE__*/react.createElement("h2", null, quiz.quizTitle), /*#__PURE__*/react.createElement("div", null, appLocale.landingHeaderText.replace(\'\', nrOfQuestions)), quiz.quizSynopsis && /*#__PURE__*/react.createElement("div", {\n className: "quiz-synopsis"\n }, quiz.quizSynopsis), /*#__PURE__*/react.createElement("div", {\n className: "startQuizWrapper"\n }, /*#__PURE__*/react.createElement("button", {\n type: "button",\n onClick: function onClick() {\n return setStart(true);\n },\n className: "startQuizBtn btn"\n }, appLocale.startQuizBtn))), start && /*#__PURE__*/react.createElement(lib_Core, {\n questions: questions,\n showDefaultResult: showDefaultResult,\n onComplete: onComplete,\n customResultPage: customResultPage,\n showInstantFeedback: showInstantFeedback,\n continueTillCorrect: continueTillCorrect,\n revealAnswerOnSubmit: revealAnswerOnSubmit,\n allowNavigation: allowNavigation,\n appLocale: appLocale,\n onQuestionSubmit: onQuestionSubmit,\n timer: timer,\n allowPauseTimer: allowPauseTimer\n }));\n}\n/* harmony default export */ const lib_Quiz = (Quiz);\n;// CONCATENATED MODULE: ./src/docs/quiz.jsx\nvar segment = {\n basic: \'Basic\',\n medium: \'Medium\',\n advanced: \'Advanced\'\n};\nvar quiz = {\n quizTitle: \'React Quiz Component Demo\',\n quizSynopsis: \'Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Aenean commodo ligula eget dolor. Aenean massa. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Donec quam felis, ultricies nec, pellentesque eu, pretium quis, sem. Nulla consequat massa quis enim\',\n nrOfQuestions: \'6\',\n questions: [{\n question: \'How can you access the state of a component from inside of a member function?\',\n questionPic: \'https://dummyimage.com/600x400/000/fff&text=X\',\n questionType: \'text\',\n answerSelectionType: \'single\',\n answers: [\'this.getState()\', \'this.prototype.stateValue\', \'this.state\', \'this.values\'],\n correctAnswer: \'3\',\n messageForCorrectAnswer: \'Correct answer. Good job.\',\n messageForIncorrectAnswer: \'Incorrect answer. Please try again.\',\n explanation: \'Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.\',\n point: \'20\',\n segment: segment.advanced\n }, {\n question: \'ReactJS is developed by ?\',\n questionType: \'text\',\n answerSelectionType: \'single\',\n answers: [\'Google Engineers\', \'Facebook Engineers\'],\n correctAnswer: \'2\',\n messageForCorrectAnswer: \'Correct answer. Good job.\',\n messageForIncorrectAnswer: \'Incorrect answer. Please try again.\',\n explanation: \'Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.\',\n point: \'20\',\n segment: segment.basic\n }, {\n question: \'ReactJS is an MVC based framework?\',\n questionType: \'text\',\n answerSelectionType: \'single\',\n answers: [\'True\', \'False\'],\n correctAnswer: \'2\',\n messageForCorrectAnswer: \'Correct answer. Good job.\',\n messageForIncorrectAnswer: \'Incorrect answer. Please try again.\',\n explanation: \'Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.\',\n point: \'10\'\n }, {\n question: \'Which of the following concepts is/are key to ReactJS?\',\n questionType: \'text\',\n answerSelectionType: \'single\',\n answers: [\'Component-oriented design\', \'Event delegation model\', \'Both of the above\'],\n correctAnswer: \'3\',\n messageForCorrectAnswer: \'Correct answer. Good job.\',\n messageForIncorrectAnswer: \'Incorrect answer. Please try again.\',\n explanation: \'Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.\',\n point: \'30\',\n segment: segment.medium\n }, {\n question: \'How does the initial page of any react project looks like if we create the project using vite\',\n questionType: \'photo\',\n answerSelectionType: \'single\',\n answers: [\'https://github.com/wingkwong/react-quiz-component/assets/35857179/e169cd44-13a7-4301-9d30-6c0859d3ac35\', \'https://github.com/wingkwong/react-quiz-component/assets/35857179/30b4aa3d-2523-4d73-9e3b-27ce44ffd50a\', \'https://github.com/wingkwong/react-quiz-component/assets/35857179/64da0348-30b7-4a13-9fea-791537c49109\', \'https://github.com/wingkwong/react-quiz-component/assets/35857179/660e9255-8a16-4e0f-a7e4-81ba6ac0f9bc\'],\n correctAnswer: \'1\',\n messageForCorrectAnswer: \'Correct answer. Good job.\',\n messageForIncorrectAnswer: \'Incorrect answer. Please try again.\',\n explanation: \'Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.\',\n point: \'20\'\n }, {\n question: \'What are the advantages of React JS?\',\n questionType: \'text\',\n answerSelectionType: \'multiple\',\n answers: [\'React can be used on client and as well as server side too\', \'Using React increases readability and makes maintainability easier. Component, Data patterns improves readability and thus makes it easier for manitaining larger apps\', \'React components have lifecycle events that fall into State/Property Updates\', \'React can be used with any other framework (Backbone.js, Angular.js) as it is only a view layer\'],\n correctAnswer: [1, 2, 4],\n messageForCorrectAnswer: \'Correct answer. Good job.\',\n messageForIncorrectAnswer: \'Incorrect answer. Please try again.\',\n explanation: \'Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.\',\n point: \'20\'\n }]\n};\n/* harmony default export */ const docs_quiz = (quiz);\n;// CONCATENATED MODULE: ./src/docs/index.jsx\nfunction docs_slicedToArray(arr, i) { return docs_arrayWithHoles(arr) || docs_iterableToArrayLimit(arr, i) || docs_unsupportedIterableToArray(arr, i) || docs_nonIterableRest(); }\nfunction docs_nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }\nfunction docs_unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return docs_arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return docs_arrayLikeToArray(o, minLen); }\nfunction docs_arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }\nfunction docs_iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t["return"] && (u = t["return"](), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }\nfunction docs_arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }\n\n\n\n\nvar container = document.getElementById(\'app\');\nvar root = (0,client/* createRoot */.s)(container);\nfunction App() {\n var _useState = (0,react.useState)(),\n _useState2 = docs_slicedToArray(_useState, 2),\n quizResult = _useState2[0],\n setQuizResult = _useState2[1];\n return /*#__PURE__*/react.createElement("div", {\n style: {\n margin: \'auto\',\n width: \'500px\'\n }\n }, /*#__PURE__*/react.createElement(lib_Quiz, {\n quiz: docs_quiz,\n shuffle: true,\n shuffleAnswer: true,\n showInstantFeedback: true\n // continueTillCorrect\n ,\n onComplete: setQuizResult,\n onQuestionSubmit: function onQuestionSubmit(obj) {\n return console.log(\'user question results:\', obj);\n },\n disableSynopsis: true,\n timer: 60,\n allowPauseTimer: true\n }));\n}\nroot.render( /*#__PURE__*/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WYWx1ZSA9PT0gJ2FsbCcgPyAnc2VsZWN0ZWQnIDogJydcbiAgICAgICAgICAgIH1gfVxuICAgICAgICAgICAgb25DbGljaz17KCkgPT4gaGFuZGxlT3B0aW9uQ2xpY2soJ2FsbCcpfVxuICAgICAgICAgICAgb25LZXlEb3duPXsoZSkgPT4ge1xuICAgICAgICAgICAgICBpZiAoZS5rZXkgPT09ICdFbnRlcicpIHtcbiAgICAgICAgICAgICAgICBoYW5kbGVPcHRpb25DbGljaygnYWxsJyk7XG4gICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH19XG4gICAgICAgICAgICByb2xlPVwibWVudWl0ZW1cIlxuICAgICAgICAgICAgdGFiSW5kZXg9ezB9XG4gICAgICAgICAgPlxuICAgICAgICAgICAge2FwcExvY2FsZS5yZXN1bHRGaWx0ZXJBbGx9XG4gICAgICAgICAgPC9kaXY+XG4gICAgICAgICAgPGRpdlxuICAgICAgICAgICAgY2xhc3NOYW1lPXtgZHJvcGRvd24tb3B0aW9ucy1pdGVtICR7XG4gICAgICAgICAgICAgIGZpbHRlcmVkVmFsdWUgPT09ICdjb3JyZWN0JyA/ICdzZWxlY3RlZCcgOiAnJ1xuICAgICAgICAgICAgfWB9XG4gICAgICAgICAgICBvbkNsaWNrPXsoKSA9PiBoYW5kbGVPcHRpb25DbGljaygnY29ycmVjdCcpfVxuICAgICAgICAgICAgb25LZXlEb3duPXsoZSkgPT4ge1xuICAgICAgICAgICAgICBpZiAoZS5rZXkgPT09ICdFbnRlcicpIHtcbiAgICAgICAgICAgICAgICBoYW5kbGVPcHRpb25DbGljaygnY29ycmVjdCcpO1xuICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9fVxuICAgICAgICAgICAgcm9sZT1cIm1lbnVpdGVtXCJcbiAgICAgICAgICAgIHRhYkluZGV4PXswfVxuICAgICAgICAgID5cbiAgICAgICAgICAgIHthcHBMb2NhbGUucmVzdWx0RmlsdGVyQ29ycmVjdH1cbiAgICAgICAgICA8L2Rpdj5cbiAgICAgICAgICA8ZGl2XG4gICAgICAgICAgICBjbGFzc05hbWU9e2Bkcm9wZG93bi1vcHRpb25zLWl0ZW0gJHtcbiAgICAgICAgICAgICAgZmlsdGVyZWRWYWx1ZSA9PT0gJ2luY29ycmVjdCcgPyAnc2VsZWN0ZWQnIDogJydcbiAgICAgICAgICAgIH1gfVxuICAgICAgICAgICAgb25DbGljaz17KCkgPT4gaGFuZGxlT3B0aW9uQ2xpY2soJ2luY29ycmVjdCcpfVxuICAgICAgICAgICAgb25LZXlEb3duPXsoZSkgPT4ge1xuICAgICAgICAgICAgICBpZiAoZS5rZXkgPT09ICdFbnRlcicpIHtcbiAgICAgICAgICAgICAgICBoYW5kbGVPcHRpb25DbGljaygnaW5jb3JyZWN0Jyk7XG4gICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH19XG4gICAgICAgICAgICByb2xlPVwibWVudWl0ZW1cIlxuICAgICAgICAgICAgdGFiSW5kZXg9ezB9XG4gICAgICAgICAgPlxuICAgICAgICAgICAge2FwcExvY2FsZS5yZXN1bHRGaWx0ZXJJbmNvcnJlY3R9XG4gICAgICAgICAgPC9kaXY+XG4gICAgICAgICAgPGRpdlxuICAgICAgICAgICAgY2xhc3NOYW1lPXtgZHJvcGRvd24tb3B0aW9ucy1pdGVtICR7XG4gICAgICAgICAgICAgIGZpbHRlcmVkVmFsdWUgPT09ICd1bmFuc3dlcmVkJyA/ICdzZWxlY3RlZCcgOiAnJ1xuICAgICAgICAgICAgfWB9XG4gICAgICAgICAgICBvbkNsaWNrPXsoKSA9PiBoYW5kbGVPcHRpb25DbGljaygndW5hbnN3ZXJlZCcpfVxuICAgICAgICAgICAgb25LZXlEb3duPXsoZSkgPT4ge1xuICAgICAgICAgICAgICBpZiAoZS5rZXkgPT09ICdFbnRlcicpIHtcbiAgICAgICAgICAgICAgICBoYW5kbGVPcHRpb25DbGljaygndW5hbnN3ZXJlZCcpO1xuICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9fVx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Agc2V0QnV0dG9ucygocHJldlN0YXRlKSA9PiAoXG4gICAgICAgICAge1xuXG4gICAgICAgICAgICAuLi5wcmV2U3RhdGUsXG4gICAgICAgICAgICBbaW5kZXggLSAxXToge1xuICAgICAgICAgICAgICBkaXNhYmxlZDogIXByZXZTdGF0ZVtpbmRleCAtIDFdLFxuICAgICAgICAgICAgfSxcbiAgICAgICAgICB9XG4gICAgICAgICkpO1xuICAgICAgfSBlbHNlIHtcbiAgICAgICAgc2V0QnV0dG9ucygocHJldlN0YXRlKSA9PiAoXG4gICAgICAgICAge1xuXG4gICAgICAgICAgICAuLi5wcmV2U3RhdGUsXG4gICAgICAgICAgICAuLi5kaXNhYmxlZEFsbCxcbiAgICAgICAgICAgIFtpbmRleCAtIDFdOiB7XG4gICAgICAgICAgICAgIGNsYXNzTmFtZTogKGluZGV4U3RyID09PSBjb3JyZWN0QW5zd2VyKSA/ICdjb3JyZWN0JyA6ICdpbmNvcnJlY3QnLFxuICAgICAgICAgICAgfSxcbiAgICAgICAgICB9XG4gICAgICAgICkpO1xuXG4gICAgICAgIHNldFNob3dOZXh0UXVlc3Rpb25CdXR0b24odHJ1ZSk7XG4gICAgICB9XG5cbiAgICAgIHNldEluY29ycmVjdEFuc3dlcih0cnVlKTtcbiAgICAgIHNldElzQ29ycmVjdChmYWxzZSk7XG4gICAgICBzZXRJbmNvcnJlY3QoaW5jb3JyZWN0KTtcbiAgICB9XG4gIH0gZWxzZSB7XG4gICAgY29uc3QgbWF4TnVtYmVyT2ZNdWx0aXBsZVNlbGVjdGlvbiA9IGNvcnJlY3RBbnN3ZXIubGVuZ3RoO1xuXG4gICAgaWYgKHVzZXJJbnB1dENvcHlbY3VycmVudFF1ZXN0aW9uSW5kZXhdID09PSB1bmRlZmluZWQpIHtcbiAgICAgIHVzZXJJbnB1dENvcHlbY3VycmVudFF1ZXN0aW9uSW5kZXhdID0gW107XG4gICAgfVxuXG4gICAgaWYgKHVzZXJJbnB1dENvcHlbY3VycmVudFF1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ZXIgJiYgIWlzUnVubmluZyAmJiAoXG4gICAgICAgIDxkaXY+XG4gICAgICAgICAge2FwcExvY2FsZS50aW1lclRpbWVUYWtlbn1cbiAgICAgICAgICA6XG4gICAgICAgICAgeycgJ31cbiAgICAgICAgICA8Yj57ZGlzcGxheVRpbWUodGltZXIgLSB0aW1lUmVtYWluaW5nKX08L2I+XG4gICAgICAgIDwvZGl2PlxuICAgICAgKX1cblxuICAgICAge3RpbWVyICYmIGlzUnVubmluZyAmJiAoXG4gICAgICAgIDxkaXY+XG4gICAgICAgICAge2FwcExvY2FsZS50aW1lclRpbWVSZW1haW5pbmd9XG4gICAgICAgICAgOlxuICAgICAgICAgIHsnICd9XG4gICAgICAgICAgPGI+XG4gICAgICAgICAgICB7ZGlzcGxheVRpbWUodGltZVJlbWFpbmluZyl9XG4gICAgICAgICAgPC9iPlxuICAgICAgICA8L2Rpdj5cbiAgICAgICl9XG4gICAgICB7dGltZXIgJiYgdGltZVJlbWFpbmluZyA9PT0gMCAmJiBpc1J1bm5pbmcgJiYgaGFuZGxlVGltZVVwKCl9XG5cbiAgICAgIHshZW5kUXVpeiAmJiAoXG4gICAgICAgIDxkaXYgY2xhc3NOYW1lPVwicXVlc3Rpb25XcmFwcGVyQm9keVwiPlxuICAgICAgICAgIDxkaXY+XG4gICAgICAgICAgICB7YCR7YXBwTG9jYWxlLnF1ZXN0aW9ufSAke2N1cnJlbnRRdWVzdGlvbkluZGV4ICsgMX0gLyAke1xuICAgICAgICAgICAgICBxdWVzdGlvbnMubGVuZ3RoXG4gICAgICAgICAgICB9OmB9XG4gICAgICAgICAgICA8YnIgLz5cbiAgICAgICAgICAgIHt0aW1lciAmJiBhbGxvd1BhdXNlVGltZXIgJiYgKFxuICAgICAgICAgICAgICA8YnV0dG9uIHR5cGU9XCJidXR0b25cIiBjbGFzc05hbWU9XCJ0aW1lckJ0blwiIG9uQ2xpY2s9e3RvZ2dsZVRpbWVyfT5cbiAgICAgICAgICAgICAgICB7aXNSdW5uaW5nID8gYXBwTG9jYWxlLnBhdXNlU2NyZWVuUGF1c2UgOiBhcHBMb2NhbGUucGF1c2VTY3JlZW5SZXN1bWV9XG4gICAgICAgICAgICAgIDwvYnV0dG9uPlxuICAgICAgICAgICAgKX1cbiAgICAgICAgICA8L2Rpdj5cbiAgICAgICAgICB7aXNSdW5uaW5nID8gKFxuICAgICAgICAgICAgPD5cbiAgICAgICAgICAgICAgPGgzXG4gICAgICAgICAgICAgICAgZGFuZ2Vyb3VzbHlTZXRJbm5lckhUTUw9e3Jhd01hcmt1cChcbiAgICAgICAgICAgICAgICAgIGAke1xuICAgICAgICAgICAgICAgICAgICBhY3RpdmVRdWVzdGlvbiAmJiBhY3RpdmVRdWVzdGlvbi5xdWVzdGlvblxuICAgICAgICAgICAgICAgICAgfSAke2FwcExvY2FsZS5tYXJrc09mUXVlc3Rpb24ucmVwbGFjZShcbiAgICAgICAgICAgICAgICAgICAgJzxtYXJrcz4nLFxuICAgICAgICAgICAgICAgICAgICBhY3RpdmVRdWVzdGlvbi5wb2ludCxcbiAgICAgICAgICAgICAgICAgICl9YCxcbiAgICAgICAgICAgICAgICApfVxuICAgICAgICAgICAgICAvPlxuICAgICAgICAgICAgICB7YWN0aXZlUXVlc3Rpb24gJiYgYWN0aXZlUXVlc3Rpb24ucXVlc3Rpb25QaWMgJiYgKFxuICAgICAgICAgICAgICAgIDxpbWcgc3JjPXthY3RpdmVRdWVzdGlvbi5xdWVzdGlvblBpY30gYWx0PVwicXVlc3Rpb25cIiAvPlxuICAgICAgICAgICAgICApfVxuICAgICAgICAgICAgICB7YWN0aXZlUXVlc3Rpb25cbiAgICAgICAgICAgICAgICAmJiByZW5kZXJUYWdzKFxuICAgICAgICAgICAgICAgICAgYW5zd2VyU2VsZWN0aW9uVHlwZVN0YXRlLFxuICAgICAgICAgICAgICAgICAgYWN0aXZlUXVlc3Rpb24uY29ycmVjdEFuc3dlci5sZW5ndGgsXG4gICAgICAgICAgICAgICAgICBhY3RpdmVRdWVzdGlvbi5zZWdtZW50LFxuICAgICAgICAgICAgICAgICl9XG4gICAgICAgICAgICAgIDxkaXYgY2xhc3NOYW1lPVwicXVlc3Rpb25Nb2RhbFwiPlxuICAgICAgICAgICAgICAgIDxJbnN0YW50RmVlZGJhY2tcbiAgICAgICAgICAgICAgICAgIHF1ZXN0aW9uPXthY3RpdmVRdWVzdGlvbn1cbiAgICAgICAgICAgICAgICAgIHNob3dJbnN0YW50RmVlZGJhY2s9e3Nob3dJbnN0YW50RmVlZGJhY2t9XG4gICAgICAgICAgICAgICAgICBjb3JyZWN0QW5zd2VyPXtpc0NvcnJlY3R9XG4gICAgICAgICAgICAgICAgICBpbmNvcnJlY3RBbnN3ZXI9e2luY29ycmVjdEFuc3dlcn1cbiAgICAgICAgICAgICAgICAgIG9uUXVlc3Rpb25TdWJtaXQ9e29uUXVlc3Rpb25TdWJtaXR9XG4gICAgICAgICAgICAgICAgICB1c2VyQW5zd2VyPXtbLi4udXNlcklucHV0XS5wb3AoKX1cbiAgICAgICAgICAgICAgICAvPlxuICAgICAgICAgICAgICA8L2Rpdj5cbiAgICAgICAgICAgICAge2FjdGl2ZVF1ZXN0aW9uICYmIHJlbmRlckFuc3dlcnMoYWN0aXZlUXVlc3Rpb24sIGJ1dHRvbnMpfVxuICAgICAgICAgICAgICB7KHNob3dOZXh0UXVlc3Rpb25CdXR0b24gfHwgYWxsb3dOYXZpZ2F0aW9uKSAmJiAoXG4gICAgICAgICAgICAgICAgPGRpdiBjbGFzc05hbWU9XCJxdWVzdGlvbkJ0bkNvbnRhaW5lclwiPlxuICAgICAgICAgICAgICAgICAge2FsbG93TmF2aWdhdGlvbiAmJiBjdXJyZW50UXVlc3Rpb25JbmRleCA+IDAgJiYgKFxuICAgICAgICAgICAgICAgICAgICA8YnV0dG9uXG4gICAgICAgICAgICAgICAgICAgICAgb25DbGljaz17KCkgPT4gbmV4dFF1ZXN0aW9uKGN1cnJlbnRRdWVzdGlvbkluZGV4IC0gMil9XG4gICAgICAgICAgICAgICAgICAgICAgY2xhc3NOYW1lPVwicHJldlF1ZXN0aW9uQnRuIGJ0blwiXG4gICAgICAgICAgICAgICAgICAgICAgdHlwZT1cImJ1dHRvblwiXG4gICAgICAgICAgICAgICAgICAgID5cbiAgICAgICAgICAgICAgICAgICAgICB7YXBwTG9jYWxlLnByZXZRdWVzdGlvbkJ0bn1cbiAgICAgICAgICAgICAgICAgICAgPC9idXR0b24+XG4gICAgICAgICAgICAgICAgICApfVxuXG4gICAgICAgICAgICAgICAgICA8YnV0dG9uXG4gICAgICAgICAgICAgICAgICAgIG9uQ2xpY2s9eygpID0+IG5leHRRdWVzdGlvbihjdXJyZW50UXVlc3Rpb25JbmRleCl9XG4gICAgICAgICAgICAgICAgICAgIGNsYXNzTmFtZT1cIm5leHRRdWVzdGlvbkJ0biBidG5cIlxuICAgICAgICAgICAgICAgICAgICB0eXBlPVwiYnV0dG9uXCJcbiAgICAgICAgICAgICAgICAgID5cbiAgICAgICAgICAgICAgICAgICAge2FwcExvY2FsZS5uZXh0UXVlc3Rpb25CdG59XG4gICAgICAgICAgICAgICAgICA8L2J1dHRvbj5cbiAgICAgICAgICAgICAgICA8L2Rpdj5cbiAgICAgICAgICAgICAgKX1cbiAgICAgICAgICAgIDwvPlxuICAgICAgICAgICkgOiAoXG4gICAgICAgICAgICA8c3BhbiBjbGFzc05hbWU9XCJ0aW1lclBhdXNlU2NyZWVuIGRhcms6dGV4dC13aGl0ZSB0ZXh0LWJsYWNrXCI+XG4gICAgICAgICAgICAgIDxiciAvPlxuICAgICAgICAgICAgICA8YnIgLz5cbiAgICAgICAgICAgICAge2FwcExvY2FsZS5wYXVzZVNjcmVlbkRpc3BsYXl9XG4gICAgICAgICAgICA8L3NwYW4+XG4gICAgICAgICAgKX1cbiAgICAgICAgPC9kaXY+XG4gICAgICApfVxuICAgICAge2VuZFF1aXogJiYgc2hvd0RlZmF1bHRSZXN1bHRTdGF0ZSAmJiBjdXN0b21SZXN1bHRQYWdlID09PSB1b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VmYXVsdExvY2FsZSxcbiAgICAuLi5xdWl6LmFwcExvY2FsZSxcbiAgfTtcblxuICByZXR1cm4gKFxuICAgIDxkaXYgY2xhc3NOYW1lPVwicmVhY3QtcXVpei1jb250YWluZXJcIj5cbiAgICAgIHshc3RhcnQgJiYgKFxuICAgICAgICA8ZGl2PlxuICAgICAgICAgIDxoMj57cXVpei5xdWl6VGl0bGV9PC9oMj5cbiAgICAgICAgICA8ZGl2PlxuICAgICAgICAgICAge2FwcExvY2FsZS5sYW5kaW5nSGVhZGVyVGV4dC5yZXBsYWNlKFxuICAgICAgICAgICAgICAnPHF1ZXN0aW9uTGVuZ3RoPicsXG4gICAgICAgICAgICAgIG5yT2ZRdWVzdGlvbnMsXG4gICAgICAgICAgICApfVxuICAgICAgICAgIDwvZGl2PlxuICAgICAgICAgIHtxdWl6LnF1aXpTeW5vcHNpcyAmJiAoXG4gICAgICAgICAgICA8ZGl2IGNsYXNzTmFtZT1cInF1aXotc3lub3BzaXNcIj57cXVpei5xdWl6U3lub3BzaXN9PC9kaXY+XG4gICAgICAgICAgKX1cbiAgICAgICAgICA8ZGl2IGNsYXNzTmFtZT1cInN0YXJ0UXVpeldyYXBwZXJcIj5cbiAgICAgICAgICAgIDxidXR0b24gdHlwZT1cImJ1dHRvblwiIG9uQ2xpY2s9eygpID0+IHNldFN0YXJ0KHRydWUpfSBjbGFzc05hbWU9XCJzdGFydFF1aXpCdG4gYnRuXCI+XG4gICAgICAgICAgICAgIHthcHBMb2NhbGUuc3RhcnRRdWl6QnRufVxuICAgICAgICAgICAgPC9idXR0b24+XG4gICAgICAgICAgPC9kaXY+XG4gICAgICAgIDwvZGl2PlxuICAgICAgKX1cblxuICAgICAge3N0YXJ0ICYmIChcbiAgICAgICAgPENvcmVcbiAgICAgICAgICBxdWVzdGlvbnM9e3F1ZXN0aW9uc31cbiAgICAgICAgICBzaG93RGVmYXVsdFJlc3VsdD17c2hvd0RlZmF1bHRSZXN1bHR9XG4gICAgICAgICAgb25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xuXG4gIHJldHVybiAoXG4gICAgPGRpdiBzdHlsZT17eyBtYXJnaW46ICdhdXRvJywgd2lkdGg6ICc1MDBweCcgfX0+XG4gICAgICA8UXVpelxuICAgICAgICBxdWl6PXtxdWl6fVxuICAgICAgICBzaHVmZmxlXG4gICAgICAgIHNodWZmbGVBbnN3ZXJcbiAgICAgICAgc2hvd0luc3RhbnRGZWVkYmFja1xuICAgICAgLy8gY29udGludWVUaWxsQ29ycmVjdFxuICAgICAgICBvbkNvbXBsZXRlPXtzZXRRdWl6UmVzdWx0fVxuICAgICAgICBvblF1ZXN0aW9uU3VibWl0PXsob2JqKSA9PiBjb25zb2xlLmxvZygndXNlciBxdWVzdGlvbiByZXN1bHRzOicsIG9iail9XG4gICAgICAgIGRpc2FibGVTeW5vcHNpc1xuICAgICAgICB0aW1lcj17NjB9XG4gICAgICAgIGFsbG93UGF1c2VUaW1lclxuICAgICAgLz5cbiAgICA8L2Rpdj5cbiAgKTtcbn1cblxucm9vdC5yZW5kZXIoPEFwcCAvPik7XG4iXSwibmFtZXMiOltdLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///412\n')},856:function(module){eval("/*! @license DOMPurify 3.0.8 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.0.8/LICENSE */\n\n(function (global, factory) {\n true ? module.exports = factory() :\n 0;\n})(this, (function () { 'use strict';\n\n const {\n entries,\n setPrototypeOf,\n isFrozen,\n getPrototypeOf,\n getOwnPropertyDescriptor\n } = Object;\n let {\n freeze,\n seal,\n create\n } = Object; // eslint-disable-line import/no-mutable-exports\n let {\n apply,\n construct\n } = typeof Reflect !== 'undefined' && Reflect;\n if (!freeze) {\n freeze = function freeze(x) {\n return x;\n };\n }\n if (!seal) {\n seal = function seal(x) {\n return x;\n };\n }\n if (!apply) {\n apply = function apply(fun, thisValue, args) {\n return fun.apply(thisValue, args);\n };\n }\n if (!construct) {\n construct = function construct(Func, args) {\n return new Func(...args);\n };\n }\n const arrayForEach = unapply(Array.prototype.forEach);\n const arrayPop = unapply(Array.prototype.pop);\n const arrayPush = unapply(Array.prototype.push);\n const stringToLowerCase = unapply(String.prototype.toLowerCase);\n const stringToString = unapply(String.prototype.toString);\n const stringMatch = unapply(String.prototype.match);\n const stringReplace = unapply(String.prototype.replace);\n const stringIndexOf = unapply(String.prototype.indexOf);\n const stringTrim = unapply(String.prototype.trim);\n const regExpTest = unapply(RegExp.prototype.test);\n const typeErrorCreate = unconstruct(TypeError);\n\n /**\n * Creates a new function that calls the given function with a specified thisArg and arguments.\n *\n * @param {Function} func - The function to be wrapped and called.\n * @returns {Function} A new function that calls the given function with a specified thisArg and arguments.\n */\n function unapply(func) {\n return function (thisArg) {\n for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n args[_key - 1] = arguments[_key];\n }\n return apply(func, thisArg, args);\n };\n }\n\n /**\n * Creates a new function that constructs an instance of the given constructor function with the provided arguments.\n *\n * @param {Function} func - The constructor function to be wrapped and called.\n * @returns {Function} A new function that constructs an instance of the given constructor function with the provided arguments.\n */\n function unconstruct(func) {\n return function () {\n for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {\n args[_key2] = arguments[_key2];\n }\n return construct(func, args);\n };\n }\n\n /**\n * Add properties to a lookup table\n *\n * @param {Object} set - The set to which elements will be added.\n * @param {Array} array - The array containing elements to be added to the set.\n * @param {Function} transformCaseFunc - An optional function to transform the case of each element before adding to the set.\n * @returns {Object} The modified set with added elements.\n */\n function addToSet(set, array) {\n let transformCaseFunc = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : stringToLowerCase;\n if (setPrototypeOf) {\n // Make 'in' and truthy checks like Boolean(set.constructor)\n // independent of any properties defined on Object.prototype.\n // Prevent prototype setters from intercepting set as a this value.\n setPrototypeOf(set, null);\n }\n let l = array.length;\n while (l--) {\n let element = array[l];\n if (typeof element === 'string') {\n const lcElement = transformCaseFunc(element);\n if (lcElement !== element) {\n // Config presets (e.g. tags.js, attrs.js) are immutable.\n if (!isFrozen(array)) {\n array[l] = lcElement;\n }\n element = lcElement;\n }\n }\n set[element] = true;\n }\n return set;\n }\n\n /**\n * Clean up an array to harden against CSPP\n *\n * @param {Array} array - The array to be cleaned.\n * @returns {Array} The cleaned version of the array\n */\n function cleanArray(array) {\n for (let index = 0; index < array.length; index++) {\n if (getOwnPropertyDescriptor(array, index) === undefined) {\n array[index] = null;\n }\n }\n return array;\n }\n\n /**\n * Shallow clone an object\n *\n * @param {Object} object - The object to be cloned.\n * @returns {Object} A new object that copies the original.\n */\n function clone(object) {\n const newObject = create(null);\n for (const [property, value] of entries(object)) {\n if (getOwnPropertyDescriptor(object, property) !== undefined) {\n if (Array.isArray(value)) {\n newObject[property] = cleanArray(value);\n } else if (value && typeof value === 'object' && value.constructor === Object) {\n newObject[property] = clone(value);\n } else {\n newObject[property] = value;\n }\n }\n }\n return newObject;\n }\n\n /**\n * This method automatically checks if the prop is function or getter and behaves accordingly.\n *\n * @param {Object} object - The object to look up the getter function in its prototype chain.\n * @param {String} prop - The property name for which to find the getter function.\n * @returns {Function} The getter function found in the prototype chain or a fallback function.\n */\n function lookupGetter(object, prop) {\n while (object !== null) {\n const desc = getOwnPropertyDescriptor(object, prop);\n if (desc) {\n if (desc.get) {\n return unapply(desc.get);\n }\n if (typeof desc.value === 'function') {\n return unapply(desc.value);\n }\n }\n object = getPrototypeOf(object);\n }\n function fallbackValue(element) {\n console.warn('fallback value for', element);\n return null;\n }\n return fallbackValue;\n }\n\n const html$1 = freeze(['a', 'abbr', 'acronym', 'address', 'area', 'article', 'aside', 'audio', 'b', 'bdi', 'bdo', 'big', 'blink', 'blockquote', 'body', 'br', 'button', 'canvas', 'caption', 'center', 'cite', 'code', 'col', 'colgroup', 'content', 'data', 'datalist', 'dd', 'decorator', 'del', 'details', 'dfn', 'dialog', 'dir', 'div', 'dl', 'dt', 'element', 'em', 'fieldset', 'figcaption', 'figure', 'font', 'footer', 'form', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'head', 'header', 'hgroup', 'hr', 'html', 'i', 'img', 'input', 'ins', 'kbd', 'label', 'legend', 'li', 'main', 'map', 'mark', 'marquee', 'menu', 'menuitem', 'meter', 'nav', 'nobr', 'ol', 'optgroup', 'option', 'output', 'p', 'picture', 'pre', 'progress', 'q', 'rp', 'rt', 'ruby', 's', 'samp', 'section', 'select', 'shadow', 'small', 'source', 'spacer', 'span', 'strike', 'strong', 'style', 'sub', 'summary', 'sup', 'table', 'tbody', 'td', 'template', 'textarea', 'tfoot', 'th', 'thead', 'time', 'tr', 'track', 'tt', 'u', 'ul', 'var', 'video', 'wbr']);\n\n // SVG\n const svg$1 = freeze(['svg', 'a', 'altglyph', 'altglyphdef', 'altglyphitem', 'animatecolor', 'animatemotion', 'animatetransform', 'circle', 'clippath', 'defs', 'desc', 'ellipse', 'filter', 'font', 'g', 'glyph', 'glyphref', 'hkern', 'image', 'line', 'lineargradient', 'marker', 'mask', 'metadata', 'mpath', 'path', 'pattern', 'polygon', 'polyline', 'radialgradient', 'rect', 'stop', 'style', 'switch', 'symbol', 'text', 'textpath', 'title', 'tref', 'tspan', 'view', 'vkern']);\n const svgFilters = freeze(['feBlend', 'feColorMatrix', 'feComponentTransfer', 'feComposite', 'feConvolveMatrix', 'feDiffuseLighting', 'feDisplacementMap', 'feDistantLight', 'feDropShadow', 'feFlood', 'feFuncA', 'feFuncB', 'feFuncG', 'feFuncR', 'feGaussianBlur', 'feImage', 'feMerge', 'feMergeNode', 'feMorphology', 'feOffset', 'fePointLight', 'feSpecularLighting', 'feSpotLight', 'feTile', 'feTurbulence']);\n\n // List of SVG elements that are disallowed by default.\n // We still need to know them so that we can do namespace\n // checks properly in case one wants to add them to\n // allow-list.\n const svgDisallowed = freeze(['animate', 'color-profile', 'cursor', 'discard', 'font-face', 'font-face-format', 'font-face-name', 'font-face-src', 'font-face-uri', 'foreignobject', 'hatch', 'hatchpath', 'mesh', 'meshgradient', 'meshpatch', 'meshrow', 'missing-glyph', 'script', 'set', 'solidcolor', 'unknown', 'use']);\n const mathMl$1 = freeze(['math', 'menclose', 'merror', 'mfenced', 'mfrac', 'mglyph', 'mi', 'mlabeledtr', 'mmultiscripts', 'mn', 'mo', 'mover', 'mpadded', 'mphantom', 'mroot', 'mrow', 'ms', 'mspace', 'msqrt', 'mstyle', 'msub', 'msup', 'msubsup', 'mtable', 'mtd', 'mtext', 'mtr', 'munder', 'munderover', 'mprescripts']);\n\n // Similarly to SVG, we want to know all MathML elements,\n // even those that we disallow by default.\n const mathMlDisallowed = freeze(['maction', 'maligngroup', 'malignmark', 'mlongdiv', 'mscarries', 'mscarry', 'msgroup', 'mstack', 'msline', 'msrow', 'semantics', 'annotation', 'annotation-xml', 'mprescripts', 'none']);\n const text = freeze(['#text']);\n\n const html = freeze(['accept', 'action', 'align', 'alt', 'autocapitalize', 'autocomplete', 'autopictureinpicture', 'autoplay', 'background', 'bgcolor', 'border', 'capture', 'cellpadding', 'cellspacing', 'checked', 'cite', 'class', 'clear', 'color', 'cols', 'colspan', 'controls', 'controlslist', 'coords', 'crossorigin', 'datetime', 'decoding', 'default', 'dir', 'disabled', 'disablepictureinpicture', 'disableremoteplayback', 'download', 'draggable', 'enctype', 'enterkeyhint', 'face', 'for', 'headers', 'height', 'hidden', 'high', 'href', 'hreflang', 'id', 'inputmode', 'integrity', 'ismap', 'kind', 'label', 'lang', 'list', 'loading', 'loop', 'low', 'max', 'maxlength', 'media', 'method', 'min', 'minlength', 'multiple', 'muted', 'name', 'nonce', 'noshade', 'novalidate', 'nowrap', 'open', 'optimum', 'pattern', 'placeholder', 'playsinline', 'poster', 'preload', 'pubdate', 'radiogroup', 'readonly', 'rel', 'required', 'rev', 'reversed', 'role', 'rows', 'rowspan', 'spellcheck', 'scope', 'selected', 'shape', 'size', 'sizes', 'span', 'srclang', 'start', 'src', 'srcset', 'step', 'style', 'summary', 'tabindex', 'title', 'translate', 'type', 'usemap', 'valign', 'value', 'width', 'xmlns', 'slot']);\n const svg = freeze(['accent-height', 'accumulate', 'additive', 'alignment-baseline', 'ascent', 'attributename', 'attributetype', 'azimuth', 'basefrequency', 'baseline-shift', 'begin', 'bias', 'by', 'class', 'clip', 'clippathunits', 'clip-path', 'clip-rule', 'color', 'color-interpolation', 'color-interpolation-filters', 'color-profile', 'color-rendering', 'cx', 'cy', 'd', 'dx', 'dy', 'diffuseconstant', 'direction', 'display', 'divisor', 'dur', 'edgemode', 'elevation', 'end', 'fill', 'fill-opacity', 'fill-rule', 'filter', 'filterunits', 'flood-color', 'flood-opacity', 'font-family', 'font-size', 'font-size-adjust', 'font-stretch', 'font-style', 'font-variant', 'font-weight', 'fx', 'fy', 'g1', 'g2', 'glyph-name', 'glyphref', 'gradientunits', 'gradienttransform', 'height', 'href', 'id', 'image-rendering', 'in', 'in2', 'k', 'k1', 'k2', 'k3', 'k4', 'kerning', 'keypoints', 'keysplines', 'keytimes', 'lang', 'lengthadjust', 'letter-spacing', 'kernelmatrix', 'kernelunitlength', 'lighting-color', 'local', 'marker-end', 'marker-mid', 'marker-start', 'markerheight', 'markerunits', 'markerwidth', 'maskcontentunits', 'maskunits', 'max', 'mask', 'media', 'method', 'mode', 'min', 'name', 'numoctaves', 'offset', 'operator', 'opacity', 'order', 'orient', 'orientation', 'origin', 'overflow', 'paint-order', 'path', 'pathlength', 'patterncontentunits', 'patterntransform', 'patternunits', 'points', 'preservealpha', 'preserveaspectratio', 'primitiveunits', 'r', 'rx', 'ry', 'radius', 'refx', 'refy', 'repeatcount', 'repeatdur', 'restart', 'result', 'rotate', 'scale', 'seed', 'shape-rendering', 'specularconstant', 'specularexponent', 'spreadmethod', 'startoffset', 'stddeviation', 'stitchtiles', 'stop-color', 'stop-opacity', 'stroke-dasharray', 'stroke-dashoffset', 'stroke-linecap', 'stroke-linejoin', 'stroke-miterlimit', 'stroke-opacity', 'stroke', 'stroke-width', 'style', 'surfacescale', 'systemlanguage', 'tabindex', 'targetx', 'targety', 'transform', 'transform-origin', 'text-anchor', 'text-decoration', 'text-rendering', 'textlength', 'type', 'u1', 'u2', 'unicode', 'values', 'viewbox', 'visibility', 'version', 'vert-adv-y', 'vert-origin-x', 'vert-origin-y', 'width', 'word-spacing', 'wrap', 'writing-mode', 'xchannelselector', 'ychannelselector', 'x', 'x1', 'x2', 'xmlns', 'y', 'y1', 'y2', 'z', 'zoomandpan']);\n const mathMl = freeze(['accent', 'accentunder', 'align', 'bevelled', 'close', 'columnsalign', 'columnlines', 'columnspan', 'denomalign', 'depth', 'dir', 'display', 'displaystyle', 'encoding', 'fence', 'frame', 'height', 'href', 'id', 'largeop', 'length', 'linethickness', 'lspace', 'lquote', 'mathbackground', 'mathcolor', 'mathsize', 'mathvariant', 'maxsize', 'minsize', 'movablelimits', 'notation', 'numalign', 'open', 'rowalign', 'rowlines', 'rowspacing', 'rowspan', 'rspace', 'rquote', 'scriptlevel', 'scriptminsize', 'scriptsizemultiplier', 'selection', 'separator', 'separators', 'stretchy', 'subscriptshift', 'supscriptshift', 'symmetric', 'voffset', 'width', 'xmlns']);\n const xml = freeze(['xlink:href', 'xml:id', 'xlink:title', 'xml:space', 'xmlns:xlink']);\n\n // eslint-disable-next-line unicorn/better-regex\n const MUSTACHE_EXPR = seal(/\\{\\{[\\w\\W]*|[\\w\\W]*\\}\\}/gm); // Specify template detection regex for SAFE_FOR_TEMPLATES mode\n const ERB_EXPR = seal(/<%[\\w\\W]*|[\\w\\W]*%>/gm);\n const TMPLIT_EXPR = seal(/\\${[\\w\\W]*}/gm);\n const DATA_ATTR = seal(/^data-[\\-\\w.\\u00B7-\\uFFFF]/); // eslint-disable-line no-useless-escape\n const ARIA_ATTR = seal(/^aria-[\\-\\w]+$/); // eslint-disable-line no-useless-escape\n const IS_ALLOWED_URI = seal(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp):|[^a-z]|[a-z+.\\-]+(?:[^a-z+.\\-:]|$))/i // eslint-disable-line no-useless-escape\n );\n\n const IS_SCRIPT_OR_DATA = seal(/^(?:\\w+script|data):/i);\n const ATTR_WHITESPACE = seal(/[\\u0000-\\u0020\\u00A0\\u1680\\u180E\\u2000-\\u2029\\u205F\\u3000]/g // eslint-disable-line no-control-regex\n );\n\n const DOCTYPE_NAME = seal(/^html$/i);\n\n var EXPRESSIONS = /*#__PURE__*/Object.freeze({\n __proto__: null,\n MUSTACHE_EXPR: MUSTACHE_EXPR,\n ERB_EXPR: ERB_EXPR,\n TMPLIT_EXPR: TMPLIT_EXPR,\n DATA_ATTR: DATA_ATTR,\n ARIA_ATTR: ARIA_ATTR,\n IS_ALLOWED_URI: IS_ALLOWED_URI,\n IS_SCRIPT_OR_DATA: IS_SCRIPT_OR_DATA,\n ATTR_WHITESPACE: ATTR_WHITESPACE,\n DOCTYPE_NAME: DOCTYPE_NAME\n });\n\n const getGlobal = function getGlobal() {\n return typeof window === 'undefined' ? null : window;\n };\n\n /**\n * Creates a no-op policy for internal use only.\n * Don't export this function outside this module!\n * @param {TrustedTypePolicyFactory} trustedTypes The policy factory.\n * @param {HTMLScriptElement} purifyHostElement The Script element used to load DOMPurify (to determine policy name suffix).\n * @return {TrustedTypePolicy} The policy created (or null, if Trusted Types\n * are not supported or creating the policy failed).\n */\n const _createTrustedTypesPolicy = function _createTrustedTypesPolicy(trustedTypes, purifyHostElement) {\n if (typeof trustedTypes !== 'object' || typeof trustedTypes.createPolicy !== 'function') {\n return null;\n }\n\n // Allow the callers to control the unique policy name\n // by adding a data-tt-policy-suffix to the script element with the DOMPurify.\n // Policy creation with duplicate names throws in Trusted Types.\n let suffix = null;\n const ATTR_NAME = 'data-tt-policy-suffix';\n if (purifyHostElement && purifyHostElement.hasAttribute(ATTR_NAME)) {\n suffix = purifyHostElement.getAttribute(ATTR_NAME);\n }\n const policyName = 'dompurify' + (suffix ? '#' + suffix : '');\n try {\n return trustedTypes.createPolicy(policyName, {\n createHTML(html) {\n return html;\n },\n createScriptURL(scriptUrl) {\n return scriptUrl;\n }\n });\n } catch (_) {\n // Policy creation failed (most likely another DOMPurify script has\n // already run). Skip creating the policy, as this will only cause errors\n // if TT are enforced.\n console.warn('TrustedTypes policy ' + policyName + ' could not be created.');\n return null;\n }\n };\n function createDOMPurify() {\n let window = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : getGlobal();\n const DOMPurify = root => createDOMPurify(root);\n\n /**\n * Version label, exposed for easier checks\n * if DOMPurify is up to date or not\n */\n DOMPurify.version = '3.0.8';\n\n /**\n * Array of elements that DOMPurify removed during sanitation.\n * Empty if nothing was removed.\n */\n DOMPurify.removed = [];\n if (!window || !window.document || window.document.nodeType !== 9) {\n // Not running in a browser, provide a factory function\n // so that you can pass your own Window\n DOMPurify.isSupported = false;\n return DOMPurify;\n }\n let {\n document\n } = window;\n const originalDocument = document;\n const currentScript = originalDocument.currentScript;\n const {\n DocumentFragment,\n HTMLTemplateElement,\n Node,\n Element,\n NodeFilter,\n NamedNodeMap = window.NamedNodeMap || window.MozNamedAttrMap,\n HTMLFormElement,\n DOMParser,\n trustedTypes\n } = window;\n const ElementPrototype = Element.prototype;\n const cloneNode = lookupGetter(ElementPrototype, 'cloneNode');\n const getNextSibling = lookupGetter(ElementPrototype, 'nextSibling');\n const getChildNodes = lookupGetter(ElementPrototype, 'childNodes');\n const getParentNode = lookupGetter(ElementPrototype, 'parentNode');\n\n // As per issue #47, the web-components registry is inherited by a\n // new document created via createHTMLDocument. As per the spec\n // (http://w3c.github.io/webcomponents/spec/custom/#creating-and-passing-registries)\n // a new empty registry is used when creating a template contents owner\n // document, so we use that as our parent document to ensure nothing\n // is inherited.\n if (typeof HTMLTemplateElement === 'function') {\n const template = document.createElement('template');\n if (template.content && template.content.ownerDocument) {\n document = template.content.ownerDocument;\n }\n }\n let trustedTypesPolicy;\n let emptyHTML = '';\n const {\n implementation,\n createNodeIterator,\n createDocumentFragment,\n getElementsByTagName\n } = document;\n const {\n importNode\n } = originalDocument;\n let hooks = {};\n\n /**\n * Expose whether this browser supports running the full DOMPurify.\n */\n DOMPurify.isSupported = typeof entries === 'function' && typeof getParentNode === 'function' && implementation && implementation.createHTMLDocument !== undefined;\n const {\n MUSTACHE_EXPR,\n ERB_EXPR,\n TMPLIT_EXPR,\n DATA_ATTR,\n ARIA_ATTR,\n IS_SCRIPT_OR_DATA,\n ATTR_WHITESPACE\n } = EXPRESSIONS;\n let {\n IS_ALLOWED_URI: IS_ALLOWED_URI$1\n } = EXPRESSIONS;\n\n /**\n * We consider the elements and attributes below to be safe. Ideally\n * don't add any new ones but feel free to remove unwanted ones.\n */\n\n /* allowed element names */\n let ALLOWED_TAGS = null;\n const DEFAULT_ALLOWED_TAGS = addToSet({}, [...html$1, ...svg$1, ...svgFilters, ...mathMl$1, ...text]);\n\n /* Allowed attribute names */\n let ALLOWED_ATTR = null;\n const DEFAULT_ALLOWED_ATTR = addToSet({}, [...html, ...svg, ...mathMl, ...xml]);\n\n /*\n * Configure how DOMPUrify should handle custom elements and their attributes as well as customized built-in elements.\n * @property {RegExp|Function|null} tagNameCheck one of [null, regexPattern, predicate]. Default: `null` (disallow any custom elements)\n * @property {RegExp|Function|null} attributeNameCheck one of [null, regexPattern, predicate]. Default: `null` (disallow any attributes not on the allow list)\n * @property {boolean} allowCustomizedBuiltInElements allow custom elements derived from built-ins if they pass CUSTOM_ELEMENT_HANDLING.tagNameCheck. Default: `false`.\n */\n let CUSTOM_ELEMENT_HANDLING = Object.seal(create(null, {\n tagNameCheck: {\n writable: true,\n configurable: false,\n enumerable: true,\n value: null\n },\n attributeNameCheck: {\n writable: true,\n configurable: false,\n enumerable: true,\n value: null\n },\n allowCustomizedBuiltInElements: {\n writable: true,\n configurable: false,\n enumerable: true,\n value: false\n }\n }));\n\n /* Explicitly forbidden tags (overrides ALLOWED_TAGS/ADD_TAGS) */\n let FORBID_TAGS = null;\n\n /* Explicitly forbidden attributes (overrides ALLOWED_ATTR/ADD_ATTR) */\n let FORBID_ATTR = null;\n\n /* Decide if ARIA attributes are okay */\n let ALLOW_ARIA_ATTR = true;\n\n /* Decide if custom data attributes are okay */\n let ALLOW_DATA_ATTR = true;\n\n /* Decide if unknown protocols are okay */\n let ALLOW_UNKNOWN_PROTOCOLS = false;\n\n /* Decide if self-closing tags in attributes are allowed.\n * Usually removed due to a mXSS issue in jQuery 3.0 */\n let ALLOW_SELF_CLOSE_IN_ATTR = true;\n\n /* Output should be safe for common template engines.\n * This means, DOMPurify removes data attributes, mustaches and ERB\n */\n let SAFE_FOR_TEMPLATES = false;\n\n /* Decide if document with ... should be returned */\n let WHOLE_DOCUMENT = false;\n\n /* Track whether config is already set on this instance of DOMPurify. */\n let SET_CONFIG = false;\n\n /* Decide if all elements (e.g. style, script) must be children of\n * document.body. By default, browsers might move them to document.head */\n let FORCE_BODY = false;\n\n /* Decide if a DOM `HTMLBodyElement` should be returned, instead of a html\n * string (or a TrustedHTML object if Trusted Types are supported).\n * If `WHOLE_DOCUMENT` is enabled a `HTMLHtmlElement` will be returned instead\n */\n let RETURN_DOM = false;\n\n /* Decide if a DOM `DocumentFragment` should be returned, instead of a html\n * string (or a TrustedHTML object if Trusted Types are supported) */\n let RETURN_DOM_FRAGMENT = false;\n\n /* Try to return a Trusted Type object instead of a string, return a string in\n * case Trusted Types are not supported */\n let RETURN_TRUSTED_TYPE = false;\n\n /* Output should be free from DOM clobbering attacks?\n * This sanitizes markups named with colliding, clobberable built-in DOM APIs.\n */\n let SANITIZE_DOM = true;\n\n /* Achieve full DOM Clobbering protection by isolating the namespace of named\n * properties and JS variables, mitigating attacks that abuse the HTML/DOM spec rules.\n *\n * HTML/DOM spec rules that enable DOM Clobbering:\n * - Named Access on Window (§7.3.3)\n * - DOM Tree Accessors (§3.1.5)\n * - Form Element Parent-Child Relations (§4.10.3)\n * - Iframe srcdoc / Nested WindowProxies (§4.8.5)\n * - HTMLCollection (§4.2.10.2)\n *\n * Namespace isolation is implemented by prefixing `id` and `name` attributes\n * with a constant string, i.e., `user-content-`\n */\n let SANITIZE_NAMED_PROPS = false;\n const SANITIZE_NAMED_PROPS_PREFIX = 'user-content-';\n\n /* Keep element content when removing element? */\n let KEEP_CONTENT = true;\n\n /* If a `Node` is passed to sanitize(), then performs sanitization in-place instead\n * of importing it into a new Document and returning a sanitized copy */\n let IN_PLACE = false;\n\n /* Allow usage of profiles like html, svg and mathMl */\n let USE_PROFILES = {};\n\n /* Tags to ignore content of when KEEP_CONTENT is true */\n let FORBID_CONTENTS = null;\n const DEFAULT_FORBID_CONTENTS = addToSet({}, ['annotation-xml', 'audio', 'colgroup', 'desc', 'foreignobject', 'head', 'iframe', 'math', 'mi', 'mn', 'mo', 'ms', 'mtext', 'noembed', 'noframes', 'noscript', 'plaintext', 'script', 'style', 'svg', 'template', 'thead', 'title', 'video', 'xmp']);\n\n /* Tags that are safe for data: URIs */\n let DATA_URI_TAGS = null;\n const DEFAULT_DATA_URI_TAGS = addToSet({}, ['audio', 'video', 'img', 'source', 'image', 'track']);\n\n /* Attributes safe for values like \"javascript:\" */\n let URI_SAFE_ATTRIBUTES = null;\n const DEFAULT_URI_SAFE_ATTRIBUTES = addToSet({}, ['alt', 'class', 'for', 'id', 'label', 'name', 'pattern', 'placeholder', 'role', 'summary', 'title', 'value', 'style', 'xmlns']);\n const MATHML_NAMESPACE = 'http://www.w3.org/1998/Math/MathML';\n const SVG_NAMESPACE = 'http://www.w3.org/2000/svg';\n const HTML_NAMESPACE = 'http://www.w3.org/1999/xhtml';\n /* Document namespace */\n let NAMESPACE = HTML_NAMESPACE;\n let IS_EMPTY_INPUT = false;\n\n /* Allowed XHTML+XML namespaces */\n let ALLOWED_NAMESPACES = null;\n const DEFAULT_ALLOWED_NAMESPACES = addToSet({}, [MATHML_NAMESPACE, SVG_NAMESPACE, HTML_NAMESPACE], stringToString);\n\n /* Parsing of strict XHTML documents */\n let PARSER_MEDIA_TYPE = null;\n const SUPPORTED_PARSER_MEDIA_TYPES = ['application/xhtml+xml', 'text/html'];\n const DEFAULT_PARSER_MEDIA_TYPE = 'text/html';\n let transformCaseFunc = null;\n\n /* Keep a reference to config to pass to hooks */\n let CONFIG = null;\n\n /* Ideally, do not touch anything below this line */\n /* ______________________________________________ */\n\n const formElement = document.createElement('form');\n const isRegexOrFunction = function isRegexOrFunction(testValue) {\n return testValue instanceof RegExp || testValue instanceof Function;\n };\n\n /**\n * _parseConfig\n *\n * @param {Object} cfg optional config literal\n */\n // eslint-disable-next-line complexity\n const _parseConfig = function _parseConfig() {\n let cfg = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n if (CONFIG && CONFIG === cfg) {\n return;\n }\n\n /* Shield configuration object from tampering */\n if (!cfg || typeof cfg !== 'object') {\n cfg = {};\n }\n\n /* Shield configuration object from prototype pollution */\n cfg = clone(cfg);\n PARSER_MEDIA_TYPE =\n // eslint-disable-next-line unicorn/prefer-includes\n SUPPORTED_PARSER_MEDIA_TYPES.indexOf(cfg.PARSER_MEDIA_TYPE) === -1 ? DEFAULT_PARSER_MEDIA_TYPE : cfg.PARSER_MEDIA_TYPE;\n\n // HTML tags and attributes are not case-sensitive, converting to lowercase. Keeping XHTML as is.\n transformCaseFunc = PARSER_MEDIA_TYPE === 'application/xhtml+xml' ? stringToString : stringToLowerCase;\n\n /* Set configuration parameters */\n ALLOWED_TAGS = 'ALLOWED_TAGS' in cfg ? addToSet({}, cfg.ALLOWED_TAGS, transformCaseFunc) : DEFAULT_ALLOWED_TAGS;\n ALLOWED_ATTR = 'ALLOWED_ATTR' in cfg ? addToSet({}, cfg.ALLOWED_ATTR, transformCaseFunc) : DEFAULT_ALLOWED_ATTR;\n ALLOWED_NAMESPACES = 'ALLOWED_NAMESPACES' in cfg ? addToSet({}, cfg.ALLOWED_NAMESPACES, stringToString) : DEFAULT_ALLOWED_NAMESPACES;\n URI_SAFE_ATTRIBUTES = 'ADD_URI_SAFE_ATTR' in cfg ? addToSet(clone(DEFAULT_URI_SAFE_ATTRIBUTES),\n // eslint-disable-line indent\n cfg.ADD_URI_SAFE_ATTR,\n // eslint-disable-line indent\n transformCaseFunc // eslint-disable-line indent\n ) // eslint-disable-line indent\n : DEFAULT_URI_SAFE_ATTRIBUTES;\n DATA_URI_TAGS = 'ADD_DATA_URI_TAGS' in cfg ? addToSet(clone(DEFAULT_DATA_URI_TAGS),\n // eslint-disable-line indent\n cfg.ADD_DATA_URI_TAGS,\n // eslint-disable-line indent\n transformCaseFunc // eslint-disable-line indent\n ) // eslint-disable-line indent\n : DEFAULT_DATA_URI_TAGS;\n FORBID_CONTENTS = 'FORBID_CONTENTS' in cfg ? addToSet({}, cfg.FORBID_CONTENTS, transformCaseFunc) : DEFAULT_FORBID_CONTENTS;\n FORBID_TAGS = 'FORBID_TAGS' in cfg ? addToSet({}, cfg.FORBID_TAGS, transformCaseFunc) : {};\n FORBID_ATTR = 'FORBID_ATTR' in cfg ? addToSet({}, cfg.FORBID_ATTR, transformCaseFunc) : {};\n USE_PROFILES = 'USE_PROFILES' in cfg ? cfg.USE_PROFILES : false;\n ALLOW_ARIA_ATTR = cfg.ALLOW_ARIA_ATTR !== false; // Default true\n ALLOW_DATA_ATTR = cfg.ALLOW_DATA_ATTR !== false; // Default true\n ALLOW_UNKNOWN_PROTOCOLS = cfg.ALLOW_UNKNOWN_PROTOCOLS || false; // Default false\n ALLOW_SELF_CLOSE_IN_ATTR = cfg.ALLOW_SELF_CLOSE_IN_ATTR !== false; // Default true\n SAFE_FOR_TEMPLATES = cfg.SAFE_FOR_TEMPLATES || false; // Default false\n WHOLE_DOCUMENT = cfg.WHOLE_DOCUMENT || false; // Default false\n RETURN_DOM = cfg.RETURN_DOM || false; // Default false\n RETURN_DOM_FRAGMENT = cfg.RETURN_DOM_FRAGMENT || false; // Default false\n RETURN_TRUSTED_TYPE = cfg.RETURN_TRUSTED_TYPE || false; // Default false\n FORCE_BODY = cfg.FORCE_BODY || false; // Default false\n SANITIZE_DOM = cfg.SANITIZE_DOM !== false; // Default true\n SANITIZE_NAMED_PROPS = cfg.SANITIZE_NAMED_PROPS || false; // Default false\n KEEP_CONTENT = cfg.KEEP_CONTENT !== false; // Default true\n IN_PLACE = cfg.IN_PLACE || false; // Default false\n IS_ALLOWED_URI$1 = cfg.ALLOWED_URI_REGEXP || IS_ALLOWED_URI;\n NAMESPACE = cfg.NAMESPACE || HTML_NAMESPACE;\n CUSTOM_ELEMENT_HANDLING = cfg.CUSTOM_ELEMENT_HANDLING || {};\n if (cfg.CUSTOM_ELEMENT_HANDLING && isRegexOrFunction(cfg.CUSTOM_ELEMENT_HANDLING.tagNameCheck)) {\n CUSTOM_ELEMENT_HANDLING.tagNameCheck = cfg.CUSTOM_ELEMENT_HANDLING.tagNameCheck;\n }\n if (cfg.CUSTOM_ELEMENT_HANDLING && isRegexOrFunction(cfg.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)) {\n CUSTOM_ELEMENT_HANDLING.attributeNameCheck = cfg.CUSTOM_ELEMENT_HANDLING.attributeNameCheck;\n }\n if (cfg.CUSTOM_ELEMENT_HANDLING && typeof cfg.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements === 'boolean') {\n CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements = cfg.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements;\n }\n if (SAFE_FOR_TEMPLATES) {\n ALLOW_DATA_ATTR = false;\n }\n if (RETURN_DOM_FRAGMENT) {\n RETURN_DOM = true;\n }\n\n /* Parse profile info */\n if (USE_PROFILES) {\n ALLOWED_TAGS = addToSet({}, text);\n ALLOWED_ATTR = [];\n if (USE_PROFILES.html === true) {\n addToSet(ALLOWED_TAGS, html$1);\n addToSet(ALLOWED_ATTR, html);\n }\n if (USE_PROFILES.svg === true) {\n addToSet(ALLOWED_TAGS, svg$1);\n addToSet(ALLOWED_ATTR, svg);\n addToSet(ALLOWED_ATTR, xml);\n }\n if (USE_PROFILES.svgFilters === true) {\n addToSet(ALLOWED_TAGS, svgFilters);\n addToSet(ALLOWED_ATTR, svg);\n addToSet(ALLOWED_ATTR, xml);\n }\n if (USE_PROFILES.mathMl === true) {\n addToSet(ALLOWED_TAGS, mathMl$1);\n addToSet(ALLOWED_ATTR, mathMl);\n addToSet(ALLOWED_ATTR, xml);\n }\n }\n\n /* Merge configuration parameters */\n if (cfg.ADD_TAGS) {\n if (ALLOWED_TAGS === DEFAULT_ALLOWED_TAGS) {\n ALLOWED_TAGS = clone(ALLOWED_TAGS);\n }\n addToSet(ALLOWED_TAGS, cfg.ADD_TAGS, transformCaseFunc);\n }\n if (cfg.ADD_ATTR) {\n if (ALLOWED_ATTR === DEFAULT_ALLOWED_ATTR) {\n ALLOWED_ATTR = clone(ALLOWED_ATTR);\n }\n addToSet(ALLOWED_ATTR, cfg.ADD_ATTR, transformCaseFunc);\n }\n if (cfg.ADD_URI_SAFE_ATTR) {\n addToSet(URI_SAFE_ATTRIBUTES, cfg.ADD_URI_SAFE_ATTR, transformCaseFunc);\n }\n if (cfg.FORBID_CONTENTS) {\n if (FORBID_CONTENTS === DEFAULT_FORBID_CONTENTS) {\n FORBID_CONTENTS = clone(FORBID_CONTENTS);\n }\n addToSet(FORBID_CONTENTS, cfg.FORBID_CONTENTS, transformCaseFunc);\n }\n\n /* Add #text in case KEEP_CONTENT is set to true */\n if (KEEP_CONTENT) {\n ALLOWED_TAGS['#text'] = true;\n }\n\n /* Add html, head and body to ALLOWED_TAGS in case WHOLE_DOCUMENT is true */\n if (WHOLE_DOCUMENT) {\n addToSet(ALLOWED_TAGS, ['html', 'head', 'body']);\n }\n\n /* Add tbody to ALLOWED_TAGS in case tables are permitted, see #286, #365 */\n if (ALLOWED_TAGS.table) {\n addToSet(ALLOWED_TAGS, ['tbody']);\n delete FORBID_TAGS.tbody;\n }\n if (cfg.TRUSTED_TYPES_POLICY) {\n if (typeof cfg.TRUSTED_TYPES_POLICY.createHTML !== 'function') {\n throw typeErrorCreate('TRUSTED_TYPES_POLICY configuration option must provide a \"createHTML\" hook.');\n }\n if (typeof cfg.TRUSTED_TYPES_POLICY.createScriptURL !== 'function') {\n throw typeErrorCreate('TRUSTED_TYPES_POLICY configuration option must provide a \"createScriptURL\" hook.');\n }\n\n // Overwrite existing TrustedTypes policy.\n trustedTypesPolicy = cfg.TRUSTED_TYPES_POLICY;\n\n // Sign local variables required by `sanitize`.\n emptyHTML = trustedTypesPolicy.createHTML('');\n } else {\n // Uninitialized policy, attempt to initialize the internal dompurify policy.\n if (trustedTypesPolicy === undefined) {\n trustedTypesPolicy = _createTrustedTypesPolicy(trustedTypes, currentScript);\n }\n\n // If creating the internal policy succeeded sign internal variables.\n if (trustedTypesPolicy !== null && typeof emptyHTML === 'string') {\n emptyHTML = trustedTypesPolicy.createHTML('');\n }\n }\n\n // Prevent further manipulation of configuration.\n // Not available in IE8, Safari 5, etc.\n if (freeze) {\n freeze(cfg);\n }\n CONFIG = cfg;\n };\n const MATHML_TEXT_INTEGRATION_POINTS = addToSet({}, ['mi', 'mo', 'mn', 'ms', 'mtext']);\n const HTML_INTEGRATION_POINTS = addToSet({}, ['foreignobject', 'desc', 'title', 'annotation-xml']);\n\n // Certain elements are allowed in both SVG and HTML\n // namespace. We need to specify them explicitly\n // so that they don't get erroneously deleted from\n // HTML namespace.\n const COMMON_SVG_AND_HTML_ELEMENTS = addToSet({}, ['title', 'style', 'font', 'a', 'script']);\n\n /* Keep track of all possible SVG and MathML tags\n * so that we can perform the namespace checks\n * correctly. */\n const ALL_SVG_TAGS = addToSet({}, [...svg$1, ...svgFilters, ...svgDisallowed]);\n const ALL_MATHML_TAGS = addToSet({}, [...mathMl$1, ...mathMlDisallowed]);\n\n /**\n * @param {Element} element a DOM element whose namespace is being checked\n * @returns {boolean} Return false if the element has a\n * namespace that a spec-compliant parser would never\n * return. Return true otherwise.\n */\n const _checkValidNamespace = function _checkValidNamespace(element) {\n let parent = getParentNode(element);\n\n // In JSDOM, if we're inside shadow DOM, then parentNode\n // can be null. We just simulate parent in this case.\n if (!parent || !parent.tagName) {\n parent = {\n namespaceURI: NAMESPACE,\n tagName: 'template'\n };\n }\n const tagName = stringToLowerCase(element.tagName);\n const parentTagName = stringToLowerCase(parent.tagName);\n if (!ALLOWED_NAMESPACES[element.namespaceURI]) {\n return false;\n }\n if (element.namespaceURI === SVG_NAMESPACE) {\n // The only way to switch from HTML namespace to SVG\n // is via . If it happens via any other tag, then\n // it should be killed.\n if (parent.namespaceURI === HTML_NAMESPACE) {\n return tagName === 'svg';\n }\n\n // The only way to switch from MathML to SVG is via`\n // svg if parent is either or MathML\n // text integration points.\n if (parent.namespaceURI === MATHML_NAMESPACE) {\n return tagName === 'svg' && (parentTagName === 'annotation-xml' || MATHML_TEXT_INTEGRATION_POINTS[parentTagName]);\n }\n\n // We only allow elements that are defined in SVG\n // spec. All others are disallowed in SVG namespace.\n return Boolean(ALL_SVG_TAGS[tagName]);\n }\n if (element.namespaceURI === MATHML_NAMESPACE) {\n // The only way to switch from HTML namespace to MathML\n // is via . If it happens via any other tag, then\n // it should be killed.\n if (parent.namespaceURI === HTML_NAMESPACE) {\n return tagName === 'math';\n }\n\n // The only way to switch from SVG to MathML is via\n // and HTML integration points\n if (parent.namespaceURI === SVG_NAMESPACE) {\n return tagName === 'math' && HTML_INTEGRATION_POINTS[parentTagName];\n }\n\n // We only allow elements that are defined in MathML\n // spec. All others are disallowed in MathML namespace.\n return Boolean(ALL_MATHML_TAGS[tagName]);\n }\n if (element.namespaceURI === HTML_NAMESPACE) {\n // The only way to switch from SVG to HTML is via\n // HTML integration points, and from MathML to HTML\n // is via MathML text integration points\n if (parent.namespaceURI === SVG_NAMESPACE && !HTML_INTEGRATION_POINTS[parentTagName]) {\n return false;\n }\n if (parent.namespaceURI === MATHML_NAMESPACE && !MATHML_TEXT_INTEGRATION_POINTS[parentTagName]) {\n return false;\n }\n\n // We disallow tags that are specific for MathML\n // or SVG and should never appear in HTML namespace\n return !ALL_MATHML_TAGS[tagName] && (COMMON_SVG_AND_HTML_ELEMENTS[tagName] || !ALL_SVG_TAGS[tagName]);\n }\n\n // For XHTML and XML documents that support custom namespaces\n if (PARSER_MEDIA_TYPE === 'application/xhtml+xml' && ALLOWED_NAMESPACES[element.namespaceURI]) {\n return true;\n }\n\n // The code should never reach this place (this means\n // that the element somehow got namespace that is not\n // HTML, SVG, MathML or allowed via ALLOWED_NAMESPACES).\n // Return false just in case.\n return false;\n };\n\n /**\n * _forceRemove\n *\n * @param {Node} node a DOM node\n */\n const _forceRemove = function _forceRemove(node) {\n arrayPush(DOMPurify.removed, {\n element: node\n });\n try {\n // eslint-disable-next-line unicorn/prefer-dom-node-remove\n node.parentNode.removeChild(node);\n } catch (_) {\n node.remove();\n }\n };\n\n /**\n * _removeAttribute\n *\n * @param {String} name an Attribute name\n * @param {Node} node a DOM node\n */\n const _removeAttribute = function _removeAttribute(name, node) {\n try {\n arrayPush(DOMPurify.removed, {\n attribute: node.getAttributeNode(name),\n from: node\n });\n } catch (_) {\n arrayPush(DOMPurify.removed, {\n attribute: null,\n from: node\n });\n }\n node.removeAttribute(name);\n\n // We void attribute values for unremovable \"is\"\" attributes\n if (name === 'is' && !ALLOWED_ATTR[name]) {\n if (RETURN_DOM || RETURN_DOM_FRAGMENT) {\n try {\n _forceRemove(node);\n } catch (_) {}\n } else {\n try {\n node.setAttribute(name, '');\n } catch (_) {}\n }\n }\n };\n\n /**\n * _initDocument\n *\n * @param {String} dirty a string of dirty markup\n * @return {Document} a DOM, filled with the dirty markup\n */\n const _initDocument = function _initDocument(dirty) {\n /* Create a HTML document */\n let doc = null;\n let leadingWhitespace = null;\n if (FORCE_BODY) {\n dirty = '' + dirty;\n } else {\n /* If FORCE_BODY isn't used, leading whitespace needs to be preserved manually */\n const matches = stringMatch(dirty, /^[\\r\\n\\t ]+/);\n leadingWhitespace = matches && matches[0];\n }\n if (PARSER_MEDIA_TYPE === 'application/xhtml+xml' && NAMESPACE === HTML_NAMESPACE) {\n // Root of XHTML doc must contain xmlns declaration (see https://www.w3.org/TR/xhtml1/normative.html#strict)\n dirty = '' + dirty + '';\n }\n const dirtyPayload = trustedTypesPolicy ? trustedTypesPolicy.createHTML(dirty) : dirty;\n /*\n * Use the DOMParser API by default, fallback later if needs be\n * DOMParser not work for svg when has multiple root element.\n */\n if (NAMESPACE === HTML_NAMESPACE) {\n try {\n doc = new DOMParser().parseFromString(dirtyPayload, PARSER_MEDIA_TYPE);\n } catch (_) {}\n }\n\n /* Use createHTMLDocument in case DOMParser is not available */\n if (!doc || !doc.documentElement) {\n doc = implementation.createDocument(NAMESPACE, 'template', null);\n try {\n doc.documentElement.innerHTML = IS_EMPTY_INPUT ? emptyHTML : dirtyPayload;\n } catch (_) {\n // Syntax error if dirtyPayload is invalid xml\n }\n }\n const body = doc.body || doc.documentElement;\n if (dirty && leadingWhitespace) {\n body.insertBefore(document.createTextNode(leadingWhitespace), body.childNodes[0] || null);\n }\n\n /* Work on whole document or just its body */\n if (NAMESPACE === HTML_NAMESPACE) {\n return getElementsByTagName.call(doc, WHOLE_DOCUMENT ? 'html' : 'body')[0];\n }\n return WHOLE_DOCUMENT ? doc.documentElement : body;\n };\n\n /**\n * Creates a NodeIterator object that you can use to traverse filtered lists of nodes or elements in a document.\n *\n * @param {Node} root The root element or node to start traversing on.\n * @return {NodeIterator} The created NodeIterator\n */\n const _createNodeIterator = function _createNodeIterator(root) {\n return createNodeIterator.call(root.ownerDocument || root, root,\n // eslint-disable-next-line no-bitwise\n NodeFilter.SHOW_ELEMENT | NodeFilter.SHOW_COMMENT | NodeFilter.SHOW_TEXT, null);\n };\n\n /**\n * _isClobbered\n *\n * @param {Node} elm element to check for clobbering attacks\n * @return {Boolean} true if clobbered, false if safe\n */\n const _isClobbered = function _isClobbered(elm) {\n return elm instanceof HTMLFormElement && (typeof elm.nodeName !== 'string' || typeof elm.textContent !== 'string' || typeof elm.removeChild !== 'function' || !(elm.attributes instanceof NamedNodeMap) || typeof elm.removeAttribute !== 'function' || typeof elm.setAttribute !== 'function' || typeof elm.namespaceURI !== 'string' || typeof elm.insertBefore !== 'function' || typeof elm.hasChildNodes !== 'function');\n };\n\n /**\n * Checks whether the given object is a DOM node.\n *\n * @param {Node} object object to check whether it's a DOM node\n * @return {Boolean} true is object is a DOM node\n */\n const _isNode = function _isNode(object) {\n return typeof Node === 'function' && object instanceof Node;\n };\n\n /**\n * _executeHook\n * Execute user configurable hooks\n *\n * @param {String} entryPoint Name of the hook's entry point\n * @param {Node} currentNode node to work on with the hook\n * @param {Object} data additional hook parameters\n */\n const _executeHook = function _executeHook(entryPoint, currentNode, data) {\n if (!hooks[entryPoint]) {\n return;\n }\n arrayForEach(hooks[entryPoint], hook => {\n hook.call(DOMPurify, currentNode, data, CONFIG);\n });\n };\n\n /**\n * _sanitizeElements\n *\n * @protect nodeName\n * @protect textContent\n * @protect removeChild\n *\n * @param {Node} currentNode to check for permission to exist\n * @return {Boolean} true if node was killed, false if left alive\n */\n const _sanitizeElements = function _sanitizeElements(currentNode) {\n let content = null;\n\n /* Execute a hook if present */\n _executeHook('beforeSanitizeElements', currentNode, null);\n\n /* Check if element is clobbered or can clobber */\n if (_isClobbered(currentNode)) {\n _forceRemove(currentNode);\n return true;\n }\n\n /* Now let's check the element's type and name */\n const tagName = transformCaseFunc(currentNode.nodeName);\n\n /* Execute a hook if present */\n _executeHook('uponSanitizeElement', currentNode, {\n tagName,\n allowedTags: ALLOWED_TAGS\n });\n\n /* Detect mXSS attempts abusing namespace confusion */\n if (currentNode.hasChildNodes() && !_isNode(currentNode.firstElementChild) && regExpTest(/<[/\\w]/g, currentNode.innerHTML) && regExpTest(/<[/\\w]/g, currentNode.textContent)) {\n _forceRemove(currentNode);\n return true;\n }\n\n /* Remove element if anything forbids its presence */\n if (!ALLOWED_TAGS[tagName] || FORBID_TAGS[tagName]) {\n /* Check if we have a custom element to handle */\n if (!FORBID_TAGS[tagName] && _isBasicCustomElement(tagName)) {\n if (CUSTOM_ELEMENT_HANDLING.tagNameCheck instanceof RegExp && regExpTest(CUSTOM_ELEMENT_HANDLING.tagNameCheck, tagName)) {\n return false;\n }\n if (CUSTOM_ELEMENT_HANDLING.tagNameCheck instanceof Function && CUSTOM_ELEMENT_HANDLING.tagNameCheck(tagName)) {\n return false;\n }\n }\n\n /* Keep content except for bad-listed elements */\n if (KEEP_CONTENT && !FORBID_CONTENTS[tagName]) {\n const parentNode = getParentNode(currentNode) || currentNode.parentNode;\n const childNodes = getChildNodes(currentNode) || currentNode.childNodes;\n if (childNodes && parentNode) {\n const childCount = childNodes.length;\n for (let i = childCount - 1; i >= 0; --i) {\n parentNode.insertBefore(cloneNode(childNodes[i], true), getNextSibling(currentNode));\n }\n }\n }\n _forceRemove(currentNode);\n return true;\n }\n\n /* Check whether element has a valid namespace */\n if (currentNode instanceof Element && !_checkValidNamespace(currentNode)) {\n _forceRemove(currentNode);\n return true;\n }\n\n /* Make sure that older browsers don't get fallback-tag mXSS */\n if ((tagName === 'noscript' || tagName === 'noembed' || tagName === 'noframes') && regExpTest(/<\\/no(script|embed|frames)/i, currentNode.innerHTML)) {\n _forceRemove(currentNode);\n return true;\n }\n\n /* Sanitize element content to be template-safe */\n if (SAFE_FOR_TEMPLATES && currentNode.nodeType === 3) {\n /* Get the element's text content */\n content = currentNode.textContent;\n arrayForEach([MUSTACHE_EXPR, ERB_EXPR, TMPLIT_EXPR], expr => {\n content = stringReplace(content, expr, ' ');\n });\n if (currentNode.textContent !== content) {\n arrayPush(DOMPurify.removed, {\n element: currentNode.cloneNode()\n });\n currentNode.textContent = content;\n }\n }\n\n /* Execute a hook if present */\n _executeHook('afterSanitizeElements', currentNode, null);\n return false;\n };\n\n /**\n * _isValidAttribute\n *\n * @param {string} lcTag Lowercase tag name of containing element.\n * @param {string} lcName Lowercase attribute name.\n * @param {string} value Attribute value.\n * @return {Boolean} Returns true if `value` is valid, otherwise false.\n */\n // eslint-disable-next-line complexity\n const _isValidAttribute = function _isValidAttribute(lcTag, lcName, value) {\n /* Make sure attribute cannot clobber */\n if (SANITIZE_DOM && (lcName === 'id' || lcName === 'name') && (value in document || value in formElement)) {\n return false;\n }\n\n /* Allow valid data-* attributes: At least one character after \"-\"\n (https://html.spec.whatwg.org/multipage/dom.html#embedding-custom-non-visible-data-with-the-data-*-attributes)\n XML-compatible (https://html.spec.whatwg.org/multipage/infrastructure.html#xml-compatible and http://www.w3.org/TR/xml/#d0e804)\n We don't need to check the value; it's always URI safe. */\n if (ALLOW_DATA_ATTR && !FORBID_ATTR[lcName] && regExpTest(DATA_ATTR, lcName)) ; else if (ALLOW_ARIA_ATTR && regExpTest(ARIA_ATTR, lcName)) ; else if (!ALLOWED_ATTR[lcName] || FORBID_ATTR[lcName]) {\n if (\n // First condition does a very basic check if a) it's basically a valid custom element tagname AND\n // b) if the tagName passes whatever the user has configured for CUSTOM_ELEMENT_HANDLING.tagNameCheck\n // and c) if the attribute name passes whatever the user has configured for CUSTOM_ELEMENT_HANDLING.attributeNameCheck\n _isBasicCustomElement(lcTag) && (CUSTOM_ELEMENT_HANDLING.tagNameCheck instanceof RegExp && regExpTest(CUSTOM_ELEMENT_HANDLING.tagNameCheck, lcTag) || CUSTOM_ELEMENT_HANDLING.tagNameCheck instanceof Function && CUSTOM_ELEMENT_HANDLING.tagNameCheck(lcTag)) && (CUSTOM_ELEMENT_HANDLING.attributeNameCheck instanceof RegExp && regExpTest(CUSTOM_ELEMENT_HANDLING.attributeNameCheck, lcName) || CUSTOM_ELEMENT_HANDLING.attributeNameCheck instanceof Function && CUSTOM_ELEMENT_HANDLING.attributeNameCheck(lcName)) ||\n // Alternative, second condition checks if it's an `is`-attribute, AND\n // the value passes whatever the user has configured for CUSTOM_ELEMENT_HANDLING.tagNameCheck\n lcName === 'is' && CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements && (CUSTOM_ELEMENT_HANDLING.tagNameCheck instanceof RegExp && regExpTest(CUSTOM_ELEMENT_HANDLING.tagNameCheck, value) || CUSTOM_ELEMENT_HANDLING.tagNameCheck instanceof Function && CUSTOM_ELEMENT_HANDLING.tagNameCheck(value))) ; else {\n return false;\n }\n /* Check value is safe. First, is attr inert? If so, is safe */\n } else if (URI_SAFE_ATTRIBUTES[lcName]) ; else if (regExpTest(IS_ALLOWED_URI$1, stringReplace(value, ATTR_WHITESPACE, ''))) ; else if ((lcName === 'src' || lcName === 'xlink:href' || lcName === 'href') && lcTag !== 'script' && stringIndexOf(value, 'data:') === 0 && DATA_URI_TAGS[lcTag]) ; else if (ALLOW_UNKNOWN_PROTOCOLS && !regExpTest(IS_SCRIPT_OR_DATA, stringReplace(value, ATTR_WHITESPACE, ''))) ; else if (value) {\n return false;\n } else ;\n return true;\n };\n\n /**\n * _isBasicCustomElement\n * checks if at least one dash is included in tagName, and it's not the first char\n * for more sophisticated checking see https://github.com/sindresorhus/validate-element-name\n *\n * @param {string} tagName name of the tag of the node to sanitize\n * @returns {boolean} Returns true if the tag name meets the basic criteria for a custom element, otherwise false.\n */\n const _isBasicCustomElement = function _isBasicCustomElement(tagName) {\n return tagName.indexOf('-') > 0;\n };\n\n /**\n * _sanitizeAttributes\n *\n * @protect attributes\n * @protect nodeName\n * @protect removeAttribute\n * @protect setAttribute\n *\n * @param {Node} currentNode to sanitize\n */\n const _sanitizeAttributes = function _sanitizeAttributes(currentNode) {\n /* Execute a hook if present */\n _executeHook('beforeSanitizeAttributes', currentNode, null);\n const {\n attributes\n } = currentNode;\n\n /* Check if we have attributes; if not we might have a text node */\n if (!attributes) {\n return;\n }\n const hookEvent = {\n attrName: '',\n attrValue: '',\n keepAttr: true,\n allowedAttributes: ALLOWED_ATTR\n };\n let l = attributes.length;\n\n /* Go backwards over all attributes; safely remove bad ones */\n while (l--) {\n const attr = attributes[l];\n const {\n name,\n namespaceURI,\n value: attrValue\n } = attr;\n const lcName = transformCaseFunc(name);\n let value = name === 'value' ? attrValue : stringTrim(attrValue);\n\n /* Execute a hook if present */\n hookEvent.attrName = lcName;\n hookEvent.attrValue = value;\n hookEvent.keepAttr = true;\n hookEvent.forceKeepAttr = undefined; // Allows developers to see this is a property they can set\n _executeHook('uponSanitizeAttribute', currentNode, hookEvent);\n value = hookEvent.attrValue;\n /* Did the hooks approve of the attribute? */\n if (hookEvent.forceKeepAttr) {\n continue;\n }\n\n /* Remove attribute */\n _removeAttribute(name, currentNode);\n\n /* Did the hooks approve of the attribute? */\n if (!hookEvent.keepAttr) {\n continue;\n }\n\n /* Work around a security issue in jQuery 3.0 */\n if (!ALLOW_SELF_CLOSE_IN_ATTR && regExpTest(/\\/>/i, value)) {\n _removeAttribute(name, currentNode);\n continue;\n }\n\n /* Sanitize attribute content to be template-safe */\n if (SAFE_FOR_TEMPLATES) {\n arrayForEach([MUSTACHE_EXPR, ERB_EXPR, TMPLIT_EXPR], expr => {\n value = stringReplace(value, expr, ' ');\n });\n }\n\n /* Is `value` valid for this attribute? */\n const lcTag = transformCaseFunc(currentNode.nodeName);\n if (!_isValidAttribute(lcTag, lcName, value)) {\n continue;\n }\n\n /* Full DOM Clobbering protection via namespace isolation,\n * Prefix id and name attributes with `user-content-`\n */\n if (SANITIZE_NAMED_PROPS && (lcName === 'id' || lcName === 'name')) {\n // Remove the attribute with this value\n _removeAttribute(name, currentNode);\n\n // Prefix the value and later re-create the attribute with the sanitized value\n value = SANITIZE_NAMED_PROPS_PREFIX + value;\n }\n\n /* Handle attributes that require Trusted Types */\n if (trustedTypesPolicy && typeof trustedTypes === 'object' && typeof trustedTypes.getAttributeType === 'function') {\n if (namespaceURI) ; else {\n switch (trustedTypes.getAttributeType(lcTag, lcName)) {\n case 'TrustedHTML':\n {\n value = trustedTypesPolicy.createHTML(value);\n break;\n }\n case 'TrustedScriptURL':\n {\n value = trustedTypesPolicy.createScriptURL(value);\n break;\n }\n }\n }\n }\n\n /* Handle invalid data-* attribute set by try-catching it */\n try {\n if (namespaceURI) {\n currentNode.setAttributeNS(namespaceURI, name, value);\n } else {\n /* Fallback to setAttribute() for browser-unrecognized namespaces e.g. \"x-schema\". */\n currentNode.setAttribute(name, value);\n }\n arrayPop(DOMPurify.removed);\n } catch (_) {}\n }\n\n /* Execute a hook if present */\n _executeHook('afterSanitizeAttributes', currentNode, null);\n };\n\n /**\n * _sanitizeShadowDOM\n *\n * @param {DocumentFragment} fragment to iterate over recursively\n */\n const _sanitizeShadowDOM = function _sanitizeShadowDOM(fragment) {\n let shadowNode = null;\n const shadowIterator = _createNodeIterator(fragment);\n\n /* Execute a hook if present */\n _executeHook('beforeSanitizeShadowDOM', fragment, null);\n while (shadowNode = shadowIterator.nextNode()) {\n /* Execute a hook if present */\n _executeHook('uponSanitizeShadowNode', shadowNode, null);\n\n /* Sanitize tags and elements */\n if (_sanitizeElements(shadowNode)) {\n continue;\n }\n\n /* Deep shadow DOM detected */\n if (shadowNode.content instanceof DocumentFragment) {\n _sanitizeShadowDOM(shadowNode.content);\n }\n\n /* Check attributes, sanitize if necessary */\n _sanitizeAttributes(shadowNode);\n }\n\n /* Execute a hook if present */\n _executeHook('afterSanitizeShadowDOM', fragment, null);\n };\n\n /**\n * Sanitize\n * Public method providing core sanitation functionality\n *\n * @param {String|Node} dirty string or DOM node\n * @param {Object} cfg object\n */\n // eslint-disable-next-line complexity\n DOMPurify.sanitize = function (dirty) {\n let cfg = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n let body = null;\n let importedNode = null;\n let currentNode = null;\n let returnNode = null;\n /* Make sure we have a string to sanitize.\n DO NOT return early, as this will return the wrong type if\n the user has requested a DOM object rather than a string */\n IS_EMPTY_INPUT = !dirty;\n if (IS_EMPTY_INPUT) {\n dirty = '\x3c!--\x3e';\n }\n\n /* Stringify, in case dirty is an object */\n if (typeof dirty !== 'string' && !_isNode(dirty)) {\n if (typeof dirty.toString === 'function') {\n dirty = dirty.toString();\n if (typeof dirty !== 'string') {\n throw typeErrorCreate('dirty is not a string, aborting');\n }\n } else {\n throw typeErrorCreate('toString is not a function');\n }\n }\n\n /* Return dirty HTML if DOMPurify cannot run */\n if (!DOMPurify.isSupported) {\n return dirty;\n }\n\n /* Assign config vars */\n if (!SET_CONFIG) {\n _parseConfig(cfg);\n }\n\n /* Clean up removed elements */\n DOMPurify.removed = [];\n\n /* Check if dirty is correctly typed for IN_PLACE */\n if (typeof dirty === 'string') {\n IN_PLACE = false;\n }\n if (IN_PLACE) {\n /* Do some early pre-sanitization to avoid unsafe root nodes */\n if (dirty.nodeName) {\n const tagName = transformCaseFunc(dirty.nodeName);\n if (!ALLOWED_TAGS[tagName] || FORBID_TAGS[tagName]) {\n throw typeErrorCreate('root node is forbidden and cannot be sanitized in-place');\n }\n }\n } else if (dirty instanceof Node) {\n /* If dirty is a DOM element, append to an empty document to avoid\n elements being stripped by the parser */\n body = _initDocument('\x3c!----\x3e');\n importedNode = body.ownerDocument.importNode(dirty, true);\n if (importedNode.nodeType === 1 && importedNode.nodeName === 'BODY') {\n /* Node is already a body, use as is */\n body = importedNode;\n } else if (importedNode.nodeName === 'HTML') {\n body = importedNode;\n } else {\n // eslint-disable-next-line unicorn/prefer-dom-node-append\n body.appendChild(importedNode);\n }\n } else {\n /* Exit directly if we have nothing to do */\n if (!RETURN_DOM && !SAFE_FOR_TEMPLATES && !WHOLE_DOCUMENT &&\n // eslint-disable-next-line unicorn/prefer-includes\n dirty.indexOf('<') === -1) {\n return trustedTypesPolicy && RETURN_TRUSTED_TYPE ? trustedTypesPolicy.createHTML(dirty) : dirty;\n }\n\n /* Initialize the document to work on */\n body = _initDocument(dirty);\n\n /* Check we have a DOM node from the data */\n if (!body) {\n return RETURN_DOM ? null : RETURN_TRUSTED_TYPE ? emptyHTML : '';\n }\n }\n\n /* Remove first element node (ours) if FORCE_BODY is set */\n if (body && FORCE_BODY) {\n _forceRemove(body.firstChild);\n }\n\n /* Get node iterator */\n const nodeIterator = _createNodeIterator(IN_PLACE ? dirty : body);\n\n /* Now start iterating over the created document */\n while (currentNode = nodeIterator.nextNode()) {\n /* Sanitize tags and elements */\n if (_sanitizeElements(currentNode)) {\n continue;\n }\n\n /* Shadow DOM detected, sanitize it */\n if (currentNode.content instanceof DocumentFragment) {\n _sanitizeShadowDOM(currentNode.content);\n }\n\n /* Check attributes, sanitize if necessary */\n _sanitizeAttributes(currentNode);\n }\n\n /* If we sanitized `dirty` in-place, return it. */\n if (IN_PLACE) {\n return dirty;\n }\n\n /* Return sanitized string or DOM */\n if (RETURN_DOM) {\n if (RETURN_DOM_FRAGMENT) {\n returnNode = createDocumentFragment.call(body.ownerDocument);\n while (body.firstChild) {\n // eslint-disable-next-line unicorn/prefer-dom-node-append\n returnNode.appendChild(body.firstChild);\n }\n } else {\n returnNode = body;\n }\n if (ALLOWED_ATTR.shadowroot || ALLOWED_ATTR.shadowrootmode) {\n /*\n AdoptNode() is not used because internal state is not reset\n (e.g. the past names map of a HTMLFormElement), this is safe\n in theory but we would rather not risk another attack vector.\n The state that is cloned by importNode() is explicitly defined\n by the specs.\n */\n returnNode = importNode.call(originalDocument, returnNode, true);\n }\n return returnNode;\n }\n let serializedHTML = WHOLE_DOCUMENT ? body.outerHTML : body.innerHTML;\n\n /* Serialize doctype if allowed */\n if (WHOLE_DOCUMENT && ALLOWED_TAGS['!doctype'] && body.ownerDocument && body.ownerDocument.doctype && body.ownerDocument.doctype.name && regExpTest(DOCTYPE_NAME, body.ownerDocument.doctype.name)) {\n serializedHTML = '\\n' + serializedHTML;\n }\n\n /* Sanitize final string template-safe */\n if (SAFE_FOR_TEMPLATES) {\n arrayForEach([MUSTACHE_EXPR, ERB_EXPR, TMPLIT_EXPR], expr => {\n serializedHTML = stringReplace(serializedHTML, expr, ' ');\n });\n }\n return trustedTypesPolicy && RETURN_TRUSTED_TYPE ? trustedTypesPolicy.createHTML(serializedHTML) : serializedHTML;\n };\n\n /**\n * Public method to set the configuration once\n * setConfig\n *\n * @param {Object} cfg configuration object\n */\n DOMPurify.setConfig = function () {\n let cfg = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n _parseConfig(cfg);\n SET_CONFIG = true;\n };\n\n /**\n * Public method to remove the configuration\n * clearConfig\n *\n */\n DOMPurify.clearConfig = function () {\n CONFIG = null;\n SET_CONFIG = false;\n };\n\n /**\n * Public method to check if an attribute value is valid.\n * Uses last set config, if any. Otherwise, uses config defaults.\n * isValidAttribute\n *\n * @param {String} tag Tag name of containing element.\n * @param {String} attr Attribute name.\n * @param {String} value Attribute value.\n * @return {Boolean} Returns true if `value` is valid. Otherwise, returns false.\n */\n DOMPurify.isValidAttribute = function (tag, attr, value) {\n /* Initialize shared config vars if necessary. */\n if (!CONFIG) {\n _parseConfig({});\n }\n const lcTag = transformCaseFunc(tag);\n const lcName = transformCaseFunc(attr);\n return _isValidAttribute(lcTag, lcName, value);\n };\n\n /**\n * AddHook\n * Public method to add DOMPurify hooks\n *\n * @param {String} entryPoint entry point for the hook to add\n * @param {Function} hookFunction function to execute\n */\n DOMPurify.addHook = function (entryPoint, hookFunction) {\n if (typeof hookFunction !== 'function') {\n return;\n }\n hooks[entryPoint] = hooks[entryPoint] || [];\n arrayPush(hooks[entryPoint], hookFunction);\n };\n\n /**\n * RemoveHook\n * Public method to remove a DOMPurify hook at a given entryPoint\n * (pops it from the stack of hooks if more are present)\n *\n * @param {String} entryPoint entry point for the hook to remove\n * @return {Function} removed(popped) hook\n */\n DOMPurify.removeHook = function (entryPoint) {\n if (hooks[entryPoint]) {\n return arrayPop(hooks[entryPoint]);\n }\n };\n\n /**\n * RemoveHooks\n * Public method to remove all DOMPurify hooks at a given entryPoint\n *\n * @param {String} entryPoint entry point for the hooks to remove\n */\n DOMPurify.removeHooks = function (entryPoint) {\n if (hooks[entryPoint]) {\n hooks[entryPoint] = [];\n }\n };\n\n /**\n * RemoveAllHooks\n * Public method to remove all DOMPurify hooks\n */\n DOMPurify.removeAllHooks = function () {\n hooks = {};\n };\n return DOMPurify;\n }\n var purify = createDOMPurify();\n\n return purify;\n\n}));\n//# sourceMappingURL=purify.js.map\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiODU2LmpzIiwibWFwcGluZ3MiOiJBQUFBO0FBQ0E7QUFDQTtBQUNB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ByZXR1cm4gdHJ1ZTtcbiAgICAgIH1cblxuICAgICAgLyogU2FuaXRpemUgZWxlbWVudCBjb250ZW50IHRvIGJlIHRlbXBsYXRlLXNhZmUgKi9cbiAgICAgIGlmIChTQUZFX0ZPUl9URU1QTEFURVMgJiYgY3VycmVudE5vZGUubm9kZVR5cGUgPT09IDMpIHtcbiAgICAgICAgLyogR2V0IHRoZSBlbGVtZW50J3MgdGV4dCBjb250ZW50ICovXG4gICAgICAgIGNvbnRlbnQgPSBjdXJyZW50Tm9kZS50ZXh0Q29udGVudDtcbiAgICAgICAgYXJyYXlGb3JFYWNoKFtNVVNUQUNIRV9FWFBSLCBFUkJfRVhQUiwgVE1QTElUX0VYUFJdLCBleHByID0+IHtcbiAgICAgICAgICBjb250ZW50ID0gc3RyaW5nUmVwbGFjZShjb250ZW50LCBleHByLCAnICcpO1xuICAgICAgICB9KTtcbiAgICAgICAgaWYgKGN1cnJlbnROb2RlLnRleHRDb250ZW50ICE9PSBjb250ZW50KSB7XG4gICAgICAgICAgYXJyYXlQdXNoKERPTVB1cmlmeS5yZW1vdmVkLCB7XG4gICAgICAgICAgICBlbGVtZW50OiBjdXJyZW50Tm9kZS5jbG9uZU5vZGUoKVxuICAgICAgICAgIH0pO1xuICAgICAgICAgIGN1cnJlbnROb2RlLnRleHRDb250ZW50ID0gY29udGVudDtcbiAgICAgICAgfVxuICAgICAgfVxuXG4gICAgICAvKiBFeGVjdXRlIGEgaG9vayBpZiBwcmVzZW50ICovXG4gICAgICBfZXhlY3V0ZUhvb2soJ2FmdGVyU2FuaXRpemVFbGVtZW50cycsIGN1cnJlbnROb2RlLCBudWxsKTtcbiAgICAgIHJldHVybiBmYWxzZTtcbiAgICB9O1xuXG4gICAgLyoqXG4gICAgICogX2lzVmFsaWRBdHRyaWJ1dGVcbiAgICAgKlxuICAgICAqIEBwYXJhbSAge3N0cmluZ30gbGNUYWcgTG93ZXJjYXNlIHRhZyBuYW1lIG9mIGNvbnRhaW5pbmcgZWxlb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1cmlmeSBob29rcyBhdCBhIGdpdmVuIGVudHJ5UG9pbnRcbiAgICAgKlxuICAgICAqIEBwYXJhbSAge1N0cmluZ30gZW50cnlQb2ludCBlbnRyeSBwb2ludCBmb3IgdGhlIGhvb2tzIHRvIHJlbW92ZVxuICAgICAqL1xuICAgIERPTVB1cmlmeS5yZW1vdmVIb29rcyA9IGZ1bmN0aW9uIChlbnRyeVBvaW50KSB7XG4gICAgICBpZiAoaG9va3NbZW50cnlQb2ludF0pIHtcbiAgICAgICAgaG9va3NbZW50cnlQb2ludF0gPSBbXTtcbiAgICAgIH1cbiAgICB9O1xuXG4gICAgLyoqXG4gICAgICogUmVtb3ZlQWxsSG9va3NcbiAgICAgKiBQdWJsaWMgbWV0aG9kIHRvIHJlbW92ZSBhbGwgRE9NUHVyaWZ5IGhvb2tzXG4gICAgICovXG4gICAgRE9NUHVyaWZ5LnJlbW92ZUFsbEhvb2tzID0gZnVuY3Rpb24gKCkge1xuICAgICAgaG9va3MgPSB7fTtcbiAgICB9O1xuICAgIHJldHVybiBET01QdXJpZnk7XG4gIH1cbiAgdmFyIHB1cmlmeSA9IGNyZWF0ZURPTVB1cmlmeSgpO1xuXG4gIHJldHVybiBwdXJpZnk7XG5cbn0pKTtcbi8vIyBzb3VyY2VNYXBwaW5nVVJMPXB1cmlmeS5qcy5tYXBcbiJdLCJuYW1lcyI6W10sInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///856\n")},448:(__unused_webpack_module,exports,__webpack_require__)=>{"use strict";eval('/**\n * @license React\n * react-dom.production.min.js\n *\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n/*\n Modernizr 3.0.0pre (Custom Build) | MIT\n*/\nvar aa=__webpack_require__(294),ca=__webpack_require__(840);function p(a){for(var b="https://reactjs.org/docs/error-decoder.html?invariant="+a,c=1;cb}return!1}function v(a,b,c,d,e,f,g){this.acceptsBooleans=2===b||3===b||4===b;this.attributeName=d;this.attributeNamespace=e;this.mustUseProperty=c;this.propertyName=a;this.type=b;this.sanitizeURL=f;this.removeEmptyString=g}var z={};\n"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(a){z[a]=new v(a,0,!1,a,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(a){var b=a[0];z[b]=new v(b,1,!1,a[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(a){z[a]=new v(a,2,!1,a.toLowerCase(),null,!1,!1)});\n["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(a){z[a]=new v(a,2,!1,a,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(a){z[a]=new v(a,3,!1,a.toLowerCase(),null,!1,!1)});\n["checked","multiple","muted","selected"].forEach(function(a){z[a]=new v(a,3,!0,a,null,!1,!1)});["capture","download"].forEach(function(a){z[a]=new v(a,4,!1,a,null,!1,!1)});["cols","rows","size","span"].forEach(function(a){z[a]=new v(a,6,!1,a,null,!1,!1)});["rowSpan","start"].forEach(function(a){z[a]=new v(a,5,!1,a.toLowerCase(),null,!1,!1)});var ra=/[\\-:]([a-z])/g;function sa(a){return a[1].toUpperCase()}\n"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(a){var b=a.replace(ra,\nsa);z[b]=new v(b,1,!1,a,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(a){var b=a.replace(ra,sa);z[b]=new v(b,1,!1,a,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(a){var b=a.replace(ra,sa);z[b]=new v(b,1,!1,a,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(a){z[a]=new v(a,1,!1,a.toLowerCase(),null,!1,!1)});\nz.xlinkHref=new v("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(a){z[a]=new v(a,1,!1,a.toLowerCase(),null,!0,!0)});\nfunction ta(a,b,c,d){var e=z.hasOwnProperty(b)?z[b]:null;if(null!==e?0!==e.type:d||!(2h||e[g]!==f[h]){var k="\\n"+e[g].replace(" at new "," at ");a.displayName&&k.includes("")&&(k=k.replace("",a.displayName));return k}while(1<=g&&0<=h)}break}}}finally{Na=!1,Error.prepareStackTrace=c}return(a=a?a.displayName||a.name:"")?Ma(a):""}\nfunction Pa(a){switch(a.tag){case 5:return Ma(a.type);case 16:return Ma("Lazy");case 13:return Ma("Suspense");case 19:return Ma("SuspenseList");case 0:case 2:case 15:return a=Oa(a.type,!1),a;case 11:return a=Oa(a.type.render,!1),a;case 1:return a=Oa(a.type,!0),a;default:return""}}\nfunction Qa(a){if(null==a)return null;if("function"===typeof a)return a.displayName||a.name||null;if("string"===typeof a)return a;switch(a){case ya:return"Fragment";case wa:return"Portal";case Aa:return"Profiler";case za:return"StrictMode";case Ea:return"Suspense";case Fa:return"SuspenseList"}if("object"===typeof a)switch(a.$$typeof){case Ca:return(a.displayName||"Context")+".Consumer";case Ba:return(a._context.displayName||"Context")+".Provider";case Da:var b=a.render;a=a.displayName;a||(a=b.displayName||\nb.name||"",a=""!==a?"ForwardRef("+a+")":"ForwardRef");return a;case Ga:return b=a.displayName||null,null!==b?b:Qa(a.type)||"Memo";case Ha:b=a._payload;a=a._init;try{return Qa(a(b))}catch(c){}}return null}\nfunction Ra(a){var b=a.type;switch(a.tag){case 24:return"Cache";case 9:return(b.displayName||"Context")+".Consumer";case 10:return(b._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return a=b.render,a=a.displayName||a.name||"",b.displayName||(""!==a?"ForwardRef("+a+")":"ForwardRef");case 7:return"Fragment";case 5:return b;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return Qa(b);case 8:return b===za?"StrictMode":"Mode";case 22:return"Offscreen";\ncase 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if("function"===typeof b)return b.displayName||b.name||null;if("string"===typeof b)return b}return null}function Sa(a){switch(typeof a){case "boolean":case "number":case "string":case "undefined":return a;case "object":return a;default:return""}}\nfunction Ta(a){var b=a.type;return(a=a.nodeName)&&"input"===a.toLowerCase()&&("checkbox"===b||"radio"===b)}\nfunction Ua(a){var b=Ta(a)?"checked":"value",c=Object.getOwnPropertyDescriptor(a.constructor.prototype,b),d=""+a[b];if(!a.hasOwnProperty(b)&&"undefined"!==typeof c&&"function"===typeof c.get&&"function"===typeof c.set){var e=c.get,f=c.set;Object.defineProperty(a,b,{configurable:!0,get:function(){return e.call(this)},set:function(a){d=""+a;f.call(this,a)}});Object.defineProperty(a,b,{enumerable:c.enumerable});return{getValue:function(){return d},setValue:function(a){d=""+a},stopTracking:function(){a._valueTracker=\nnull;delete a[b]}}}}function Va(a){a._valueTracker||(a._valueTracker=Ua(a))}function Wa(a){if(!a)return!1;var b=a._valueTracker;if(!b)return!0;var c=b.getValue();var d="";a&&(d=Ta(a)?a.checked?"true":"false":a.value);a=d;return a!==c?(b.setValue(a),!0):!1}function Xa(a){a=a||("undefined"!==typeof document?document:void 0);if("undefined"===typeof a)return null;try{return a.activeElement||a.body}catch(b){return a.body}}\nfunction Ya(a,b){var c=b.checked;return A({},b,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:null!=c?c:a._wrapperState.initialChecked})}function Za(a,b){var c=null==b.defaultValue?"":b.defaultValue,d=null!=b.checked?b.checked:b.defaultChecked;c=Sa(null!=b.value?b.value:c);a._wrapperState={initialChecked:d,initialValue:c,controlled:"checkbox"===b.type||"radio"===b.type?null!=b.checked:null!=b.value}}function ab(a,b){b=b.checked;null!=b&&ta(a,"checked",b,!1)}\nfunction bb(a,b){ab(a,b);var c=Sa(b.value),d=b.type;if(null!=c)if("number"===d){if(0===c&&""===a.value||a.value!=c)a.value=""+c}else a.value!==""+c&&(a.value=""+c);else if("submit"===d||"reset"===d){a.removeAttribute("value");return}b.hasOwnProperty("value")?cb(a,b.type,c):b.hasOwnProperty("defaultValue")&&cb(a,b.type,Sa(b.defaultValue));null==b.checked&&null!=b.defaultChecked&&(a.defaultChecked=!!b.defaultChecked)}\nfunction db(a,b,c){if(b.hasOwnProperty("value")||b.hasOwnProperty("defaultValue")){var d=b.type;if(!("submit"!==d&&"reset"!==d||void 0!==b.value&&null!==b.value))return;b=""+a._wrapperState.initialValue;c||b===a.value||(a.value=b);a.defaultValue=b}c=a.name;""!==c&&(a.name="");a.defaultChecked=!!a._wrapperState.initialChecked;""!==c&&(a.name=c)}\nfunction cb(a,b,c){if("number"!==b||Xa(a.ownerDocument)!==a)null==c?a.defaultValue=""+a._wrapperState.initialValue:a.defaultValue!==""+c&&(a.defaultValue=""+c)}var eb=Array.isArray;\nfunction fb(a,b,c,d){a=a.options;if(b){b={};for(var e=0;e"+b.valueOf().toString()+"";for(b=mb.firstChild;a.firstChild;)a.removeChild(a.firstChild);for(;b.firstChild;)a.appendChild(b.firstChild)}});\nfunction ob(a,b){if(b){var c=a.firstChild;if(c&&c===a.lastChild&&3===c.nodeType){c.nodeValue=b;return}}a.textContent=b}\nvar pb={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,\nzoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},qb=["Webkit","ms","Moz","O"];Object.keys(pb).forEach(function(a){qb.forEach(function(b){b=b+a.charAt(0).toUpperCase()+a.substring(1);pb[b]=pb[a]})});function rb(a,b,c){return null==b||"boolean"===typeof b||""===b?"":c||"number"!==typeof b||0===b||pb.hasOwnProperty(a)&&pb[a]?(""+b).trim():b+"px"}\nfunction sb(a,b){a=a.style;for(var c in b)if(b.hasOwnProperty(c)){var d=0===c.indexOf("--"),e=rb(c,b[c],d);"float"===c&&(c="cssFloat");d?a.setProperty(c,e):a[c]=e}}var tb=A({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});\nfunction ub(a,b){if(b){if(tb[a]&&(null!=b.children||null!=b.dangerouslySetInnerHTML))throw Error(p(137,a));if(null!=b.dangerouslySetInnerHTML){if(null!=b.children)throw Error(p(60));if("object"!==typeof b.dangerouslySetInnerHTML||!("__html"in b.dangerouslySetInnerHTML))throw Error(p(61));}if(null!=b.style&&"object"!==typeof b.style)throw Error(p(62));}}\nfunction vb(a,b){if(-1===a.indexOf("-"))return"string"===typeof b.is;switch(a){case "annotation-xml":case "color-profile":case "font-face":case "font-face-src":case "font-face-uri":case "font-face-format":case "font-face-name":case "missing-glyph":return!1;default:return!0}}var wb=null;function xb(a){a=a.target||a.srcElement||window;a.correspondingUseElement&&(a=a.correspondingUseElement);return 3===a.nodeType?a.parentNode:a}var yb=null,zb=null,Ab=null;\nfunction Bb(a){if(a=Cb(a)){if("function"!==typeof yb)throw Error(p(280));var b=a.stateNode;b&&(b=Db(b),yb(a.stateNode,a.type,b))}}function Eb(a){zb?Ab?Ab.push(a):Ab=[a]:zb=a}function Fb(){if(zb){var a=zb,b=Ab;Ab=zb=null;Bb(a);if(b)for(a=0;a>>=0;return 0===a?32:31-(pc(a)/qc|0)|0}var rc=64,sc=4194304;\nfunction tc(a){switch(a&-a){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return a&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return a&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;\ndefault:return a}}function uc(a,b){var c=a.pendingLanes;if(0===c)return 0;var d=0,e=a.suspendedLanes,f=a.pingedLanes,g=c&268435455;if(0!==g){var h=g&~e;0!==h?d=tc(h):(f&=g,0!==f&&(d=tc(f)))}else g=c&~e,0!==g?d=tc(g):0!==f&&(d=tc(f));if(0===d)return 0;if(0!==b&&b!==d&&0===(b&e)&&(e=d&-d,f=b&-b,e>=f||16===e&&0!==(f&4194240)))return b;0!==(d&4)&&(d|=c&16);b=a.entangledLanes;if(0!==b)for(a=a.entanglements,b&=d;0c;c++)b.push(a);return b}\nfunction Ac(a,b,c){a.pendingLanes|=b;536870912!==b&&(a.suspendedLanes=0,a.pingedLanes=0);a=a.eventTimes;b=31-oc(b);a[b]=c}function Bc(a,b){var c=a.pendingLanes&~b;a.pendingLanes=b;a.suspendedLanes=0;a.pingedLanes=0;a.expiredLanes&=b;a.mutableReadLanes&=b;a.entangledLanes&=b;b=a.entanglements;var d=a.eventTimes;for(a=a.expirationTimes;0=be),ee=String.fromCharCode(32),fe=!1;\nfunction ge(a,b){switch(a){case "keyup":return-1!==$d.indexOf(b.keyCode);case "keydown":return 229!==b.keyCode;case "keypress":case "mousedown":case "focusout":return!0;default:return!1}}function he(a){a=a.detail;return"object"===typeof a&&"data"in a?a.data:null}var ie=!1;function je(a,b){switch(a){case "compositionend":return he(b);case "keypress":if(32!==b.which)return null;fe=!0;return ee;case "textInput":return a=b.data,a===ee&&fe?null:a;default:return null}}\nfunction ke(a,b){if(ie)return"compositionend"===a||!ae&&ge(a,b)?(a=nd(),md=ld=kd=null,ie=!1,a):null;switch(a){case "paste":return null;case "keypress":if(!(b.ctrlKey||b.altKey||b.metaKey)||b.ctrlKey&&b.altKey){if(b.char&&1=b)return{node:c,offset:b-a};a=d}a:{for(;c;){if(c.nextSibling){c=c.nextSibling;break a}c=c.parentNode}c=void 0}c=Je(c)}}function Le(a,b){return a&&b?a===b?!0:a&&3===a.nodeType?!1:b&&3===b.nodeType?Le(a,b.parentNode):"contains"in a?a.contains(b):a.compareDocumentPosition?!!(a.compareDocumentPosition(b)&16):!1:!1}\nfunction Me(){for(var a=window,b=Xa();b instanceof a.HTMLIFrameElement;){try{var c="string"===typeof b.contentWindow.location.href}catch(d){c=!1}if(c)a=b.contentWindow;else break;b=Xa(a.document)}return b}function Ne(a){var b=a&&a.nodeName&&a.nodeName.toLowerCase();return b&&("input"===b&&("text"===a.type||"search"===a.type||"tel"===a.type||"url"===a.type||"password"===a.type)||"textarea"===b||"true"===a.contentEditable)}\nfunction Oe(a){var b=Me(),c=a.focusedElem,d=a.selectionRange;if(b!==c&&c&&c.ownerDocument&&Le(c.ownerDocument.documentElement,c)){if(null!==d&&Ne(c))if(b=d.start,a=d.end,void 0===a&&(a=b),"selectionStart"in c)c.selectionStart=b,c.selectionEnd=Math.min(a,c.value.length);else if(a=(b=c.ownerDocument||document)&&b.defaultView||window,a.getSelection){a=a.getSelection();var e=c.textContent.length,f=Math.min(d.start,e);d=void 0===d.end?f:Math.min(d.end,e);!a.extend&&f>d&&(e=d,d=f,f=e);e=Ke(c,f);var g=Ke(c,\nd);e&&g&&(1!==a.rangeCount||a.anchorNode!==e.node||a.anchorOffset!==e.offset||a.focusNode!==g.node||a.focusOffset!==g.offset)&&(b=b.createRange(),b.setStart(e.node,e.offset),a.removeAllRanges(),f>d?(a.addRange(b),a.extend(g.node,g.offset)):(b.setEnd(g.node,g.offset),a.addRange(b)))}b=[];for(a=c;a=a.parentNode;)1===a.nodeType&&b.push({element:a,left:a.scrollLeft,top:a.scrollTop});"function"===typeof c.focus&&c.focus();for(c=0;c=document.documentMode,Qe=null,Re=null,Se=null,Te=!1;\nfunction Ue(a,b,c){var d=c.window===c?c.document:9===c.nodeType?c:c.ownerDocument;Te||null==Qe||Qe!==Xa(d)||(d=Qe,"selectionStart"in d&&Ne(d)?d={start:d.selectionStart,end:d.selectionEnd}:(d=(d.ownerDocument&&d.ownerDocument.defaultView||window).getSelection(),d={anchorNode:d.anchorNode,anchorOffset:d.anchorOffset,focusNode:d.focusNode,focusOffset:d.focusOffset}),Se&&Ie(Se,d)||(Se=d,d=oe(Re,"onSelect"),0Tf||(a.current=Sf[Tf],Sf[Tf]=null,Tf--)}function G(a,b){Tf++;Sf[Tf]=a.current;a.current=b}var Vf={},H=Uf(Vf),Wf=Uf(!1),Xf=Vf;function Yf(a,b){var c=a.type.contextTypes;if(!c)return Vf;var d=a.stateNode;if(d&&d.__reactInternalMemoizedUnmaskedChildContext===b)return d.__reactInternalMemoizedMaskedChildContext;var e={},f;for(f in c)e[f]=b[f];d&&(a=a.stateNode,a.__reactInternalMemoizedUnmaskedChildContext=b,a.__reactInternalMemoizedMaskedChildContext=e);return e}\nfunction Zf(a){a=a.childContextTypes;return null!==a&&void 0!==a}function $f(){E(Wf);E(H)}function ag(a,b,c){if(H.current!==Vf)throw Error(p(168));G(H,b);G(Wf,c)}function bg(a,b,c){var d=a.stateNode;b=b.childContextTypes;if("function"!==typeof d.getChildContext)return c;d=d.getChildContext();for(var e in d)if(!(e in b))throw Error(p(108,Ra(a)||"Unknown",e));return A({},c,d)}\nfunction cg(a){a=(a=a.stateNode)&&a.__reactInternalMemoizedMergedChildContext||Vf;Xf=H.current;G(H,a);G(Wf,Wf.current);return!0}function dg(a,b,c){var d=a.stateNode;if(!d)throw Error(p(169));c?(a=bg(a,b,Xf),d.__reactInternalMemoizedMergedChildContext=a,E(Wf),E(H),G(H,a)):E(Wf);G(Wf,c)}var eg=null,fg=!1,gg=!1;function hg(a){null===eg?eg=[a]:eg.push(a)}function ig(a){fg=!0;hg(a)}\nfunction jg(){if(!gg&&null!==eg){gg=!0;var a=0,b=C;try{var c=eg;for(C=1;a>=g;e-=g;rg=1<<32-oc(b)+e|c<w?(x=u,u=null):x=u.sibling;var n=r(e,u,h[w],k);if(null===n){null===u&&(u=x);break}a&&u&&null===n.alternate&&b(e,u);g=f(n,g,w);null===m?l=n:m.sibling=n;m=n;u=x}if(w===h.length)return c(e,u),I&&tg(e,w),l;if(null===u){for(;ww?(x=m,m=null):x=m.sibling;var t=r(e,m,n.value,k);if(null===t){null===m&&(m=x);break}a&&m&&null===t.alternate&&b(e,m);g=f(t,g,w);null===u?l=t:u.sibling=t;u=t;m=x}if(n.done)return c(e,\nm),I&&tg(e,w),l;if(null===m){for(;!n.done;w++,n=h.next())n=q(e,n.value,k),null!==n&&(g=f(n,g,w),null===u?l=n:u.sibling=n,u=n);I&&tg(e,w);return l}for(m=d(e,m);!n.done;w++,n=h.next())n=y(m,e,w,n.value,k),null!==n&&(a&&null!==n.alternate&&m.delete(null===n.key?w:n.key),g=f(n,g,w),null===u?l=n:u.sibling=n,u=n);a&&m.forEach(function(a){return b(e,a)});I&&tg(e,w);return l}function J(a,d,f,h){"object"===typeof f&&null!==f&&f.type===ya&&null===f.key&&(f=f.props.children);if("object"===typeof f&&null!==f){switch(f.$$typeof){case va:a:{for(var k=\nf.key,l=d;null!==l;){if(l.key===k){k=f.type;if(k===ya){if(7===l.tag){c(a,l.sibling);d=e(l,f.props.children);d.return=a;a=d;break a}}else if(l.elementType===k||"object"===typeof k&&null!==k&&k.$$typeof===Ha&&uh(k)===l.type){c(a,l.sibling);d=e(l,f.props);d.ref=sh(a,l,f);d.return=a;a=d;break a}c(a,l);break}else b(a,l);l=l.sibling}f.type===ya?(d=Ah(f.props.children,a.mode,h,f.key),d.return=a,a=d):(h=yh(f.type,f.key,f.props,null,a.mode,h),h.ref=sh(a,d,f),h.return=a,a=h)}return g(a);case wa:a:{for(l=f.key;null!==\nd;){if(d.key===l)if(4===d.tag&&d.stateNode.containerInfo===f.containerInfo&&d.stateNode.implementation===f.implementation){c(a,d.sibling);d=e(d,f.children||[]);d.return=a;a=d;break a}else{c(a,d);break}else b(a,d);d=d.sibling}d=zh(f,a.mode,h);d.return=a;a=d}return g(a);case Ha:return l=f._init,J(a,d,l(f._payload),h)}if(eb(f))return n(a,d,f,h);if(Ka(f))return t(a,d,f,h);th(a,f)}return"string"===typeof f&&""!==f||"number"===typeof f?(f=""+f,null!==d&&6===d.tag?(c(a,d.sibling),d=e(d,f),d.return=a,a=d):\n(c(a,d),d=xh(f,a.mode,h),d.return=a,a=d),g(a)):c(a,d)}return J}var Bh=vh(!0),Ch=vh(!1),Dh={},Eh=Uf(Dh),Fh=Uf(Dh),Gh=Uf(Dh);function Hh(a){if(a===Dh)throw Error(p(174));return a}function Ih(a,b){G(Gh,b);G(Fh,a);G(Eh,Dh);a=b.nodeType;switch(a){case 9:case 11:b=(b=b.documentElement)?b.namespaceURI:lb(null,"");break;default:a=8===a?b.parentNode:b,b=a.namespaceURI||null,a=a.tagName,b=lb(b,a)}E(Eh);G(Eh,b)}function Jh(){E(Eh);E(Fh);E(Gh)}\nfunction Kh(a){Hh(Gh.current);var b=Hh(Eh.current);var c=lb(b,a.type);b!==c&&(G(Fh,a),G(Eh,c))}function Lh(a){Fh.current===a&&(E(Eh),E(Fh))}var M=Uf(0);\nfunction Mh(a){for(var b=a;null!==b;){if(13===b.tag){var c=b.memoizedState;if(null!==c&&(c=c.dehydrated,null===c||"$?"===c.data||"$!"===c.data))return b}else if(19===b.tag&&void 0!==b.memoizedProps.revealOrder){if(0!==(b.flags&128))return b}else if(null!==b.child){b.child.return=b;b=b.child;continue}if(b===a)break;for(;null===b.sibling;){if(null===b.return||b.return===a)return null;b=b.return}b.sibling.return=b.return;b=b.sibling}return null}var Nh=[];\nfunction Oh(){for(var a=0;ac?c:4;a(!0);var d=Qh.transition;Qh.transition={};try{a(!1),b()}finally{C=c,Qh.transition=d}}function Fi(){return di().memoizedState}\nfunction Gi(a,b,c){var d=lh(a);c={lane:d,action:c,hasEagerState:!1,eagerState:null,next:null};if(Hi(a))Ii(b,c);else if(c=Yg(a,b,c,d),null!==c){var e=L();mh(c,a,d,e);Ji(c,b,d)}}\nfunction ri(a,b,c){var d=lh(a),e={lane:d,action:c,hasEagerState:!1,eagerState:null,next:null};if(Hi(a))Ii(b,e);else{var f=a.alternate;if(0===a.lanes&&(null===f||0===f.lanes)&&(f=b.lastRenderedReducer,null!==f))try{var g=b.lastRenderedState,h=f(g,c);e.hasEagerState=!0;e.eagerState=h;if(He(h,g)){var k=b.interleaved;null===k?(e.next=e,Xg(b)):(e.next=k.next,k.next=e);b.interleaved=e;return}}catch(l){}finally{}c=Yg(a,b,e,d);null!==c&&(e=L(),mh(c,a,d,e),Ji(c,b,d))}}\nfunction Hi(a){var b=a.alternate;return a===N||null!==b&&b===N}function Ii(a,b){Th=Sh=!0;var c=a.pending;null===c?b.next=b:(b.next=c.next,c.next=b);a.pending=b}function Ji(a,b,c){if(0!==(c&4194240)){var d=b.lanes;d&=a.pendingLanes;c|=d;b.lanes=c;Cc(a,c)}}\nvar ai={readContext:Vg,useCallback:Q,useContext:Q,useEffect:Q,useImperativeHandle:Q,useInsertionEffect:Q,useLayoutEffect:Q,useMemo:Q,useReducer:Q,useRef:Q,useState:Q,useDebugValue:Q,useDeferredValue:Q,useTransition:Q,useMutableSource:Q,useSyncExternalStore:Q,useId:Q,unstable_isNewReconciler:!1},Yh={readContext:Vg,useCallback:function(a,b){ci().memoizedState=[a,void 0===b?null:b];return a},useContext:Vg,useEffect:vi,useImperativeHandle:function(a,b,c){c=null!==c&&void 0!==c?c.concat([a]):null;return ti(4194308,\n4,yi.bind(null,b,a),c)},useLayoutEffect:function(a,b){return ti(4194308,4,a,b)},useInsertionEffect:function(a,b){return ti(4,2,a,b)},useMemo:function(a,b){var c=ci();b=void 0===b?null:b;a=a();c.memoizedState=[a,b];return a},useReducer:function(a,b,c){var d=ci();b=void 0!==c?c(b):b;d.memoizedState=d.baseState=b;a={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:a,lastRenderedState:b};d.queue=a;a=a.dispatch=Gi.bind(null,N,a);return[d.memoizedState,a]},useRef:function(a){var b=\nci();a={current:a};return b.memoizedState=a},useState:qi,useDebugValue:Ai,useDeferredValue:function(a){return ci().memoizedState=a},useTransition:function(){var a=qi(!1),b=a[0];a=Ei.bind(null,a[1]);ci().memoizedState=a;return[b,a]},useMutableSource:function(){},useSyncExternalStore:function(a,b,c){var d=N,e=ci();if(I){if(void 0===c)throw Error(p(407));c=c()}else{c=b();if(null===R)throw Error(p(349));0!==(Rh&30)||ni(d,b,c)}e.memoizedState=c;var f={value:c,getSnapshot:b};e.queue=f;vi(ki.bind(null,d,\nf,a),[a]);d.flags|=2048;li(9,mi.bind(null,d,f,c,b),void 0,null);return c},useId:function(){var a=ci(),b=R.identifierPrefix;if(I){var c=sg;var d=rg;c=(d&~(1<<32-oc(d)-1)).toString(32)+c;b=":"+b+"R"+c;c=Uh++;0\\x3c/script>",a=a.removeChild(a.firstChild)):\n"string"===typeof d.is?a=g.createElement(c,{is:d.is}):(a=g.createElement(c),"select"===c&&(g=a,d.multiple?g.multiple=!0:d.size&&(g.size=d.size))):a=g.createElementNS(a,c);a[Of]=b;a[Pf]=d;Aj(a,b,!1,!1);b.stateNode=a;a:{g=vb(c,d);switch(c){case "dialog":D("cancel",a);D("close",a);e=d;break;case "iframe":case "object":case "embed":D("load",a);e=d;break;case "video":case "audio":for(e=0;eHj&&(b.flags|=128,d=!0,Ej(f,!1),b.lanes=4194304)}else{if(!d)if(a=Mh(g),null!==a){if(b.flags|=128,d=!0,c=a.updateQueue,null!==c&&(b.updateQueue=c,b.flags|=4),Ej(f,!0),null===f.tail&&"hidden"===f.tailMode&&!g.alternate&&!I)return S(b),null}else 2*B()-f.renderingStartTime>Hj&&1073741824!==c&&(b.flags|=128,d=!0,Ej(f,!1),b.lanes=4194304);f.isBackwards?(g.sibling=b.child,b.child=g):(c=f.last,null!==c?c.sibling=g:b.child=g,f.last=g)}if(null!==f.tail)return b=f.tail,f.rendering=\nb,f.tail=b.sibling,f.renderingStartTime=B(),b.sibling=null,c=M.current,G(M,d?c&1|2:c&1),b;S(b);return null;case 22:case 23:return Ij(),d=null!==b.memoizedState,null!==a&&null!==a.memoizedState!==d&&(b.flags|=8192),d&&0!==(b.mode&1)?0!==(gj&1073741824)&&(S(b),b.subtreeFlags&6&&(b.flags|=8192)):S(b),null;case 24:return null;case 25:return null}throw Error(p(156,b.tag));}\nfunction Jj(a,b){wg(b);switch(b.tag){case 1:return Zf(b.type)&&$f(),a=b.flags,a&65536?(b.flags=a&-65537|128,b):null;case 3:return Jh(),E(Wf),E(H),Oh(),a=b.flags,0!==(a&65536)&&0===(a&128)?(b.flags=a&-65537|128,b):null;case 5:return Lh(b),null;case 13:E(M);a=b.memoizedState;if(null!==a&&null!==a.dehydrated){if(null===b.alternate)throw Error(p(340));Ig()}a=b.flags;return a&65536?(b.flags=a&-65537|128,b):null;case 19:return E(M),null;case 4:return Jh(),null;case 10:return Rg(b.type._context),null;case 22:case 23:return Ij(),\nnull;case 24:return null;default:return null}}var Kj=!1,U=!1,Lj="function"===typeof WeakSet?WeakSet:Set,V=null;function Mj(a,b){var c=a.ref;if(null!==c)if("function"===typeof c)try{c(null)}catch(d){W(a,b,d)}else c.current=null}function Nj(a,b,c){try{c()}catch(d){W(a,b,d)}}var Oj=!1;\nfunction Pj(a,b){Cf=dd;a=Me();if(Ne(a)){if("selectionStart"in a)var c={start:a.selectionStart,end:a.selectionEnd};else a:{c=(c=a.ownerDocument)&&c.defaultView||window;var d=c.getSelection&&c.getSelection();if(d&&0!==d.rangeCount){c=d.anchorNode;var e=d.anchorOffset,f=d.focusNode;d=d.focusOffset;try{c.nodeType,f.nodeType}catch(F){c=null;break a}var g=0,h=-1,k=-1,l=0,m=0,q=a,r=null;b:for(;;){for(var y;;){q!==c||0!==e&&3!==q.nodeType||(h=g+e);q!==f||0!==d&&3!==q.nodeType||(k=g+d);3===q.nodeType&&(g+=\nq.nodeValue.length);if(null===(y=q.firstChild))break;r=q;q=y}for(;;){if(q===a)break b;r===c&&++l===e&&(h=g);r===f&&++m===d&&(k=g);if(null!==(y=q.nextSibling))break;q=r;r=q.parentNode}q=y}c=-1===h||-1===k?null:{start:h,end:k}}else c=null}c=c||{start:0,end:0}}else c=null;Df={focusedElem:a,selectionRange:c};dd=!1;for(V=b;null!==V;)if(b=V,a=b.child,0!==(b.subtreeFlags&1028)&&null!==a)a.return=b,V=a;else for(;null!==V;){b=V;try{var n=b.alternate;if(0!==(b.flags&1024))switch(b.tag){case 0:case 11:case 15:break;\ncase 1:if(null!==n){var t=n.memoizedProps,J=n.memoizedState,x=b.stateNode,w=x.getSnapshotBeforeUpdate(b.elementType===b.type?t:Lg(b.type,t),J);x.__reactInternalSnapshotBeforeUpdate=w}break;case 3:var u=b.stateNode.containerInfo;1===u.nodeType?u.textContent="":9===u.nodeType&&u.documentElement&&u.removeChild(u.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(p(163));}}catch(F){W(b,b.return,F)}a=b.sibling;if(null!==a){a.return=b.return;V=a;break}V=b.return}n=Oj;Oj=!1;return n}\nfunction Qj(a,b,c){var d=b.updateQueue;d=null!==d?d.lastEffect:null;if(null!==d){var e=d=d.next;do{if((e.tag&a)===a){var f=e.destroy;e.destroy=void 0;void 0!==f&&Nj(b,c,f)}e=e.next}while(e!==d)}}function Rj(a,b){b=b.updateQueue;b=null!==b?b.lastEffect:null;if(null!==b){var c=b=b.next;do{if((c.tag&a)===a){var d=c.create;c.destroy=d()}c=c.next}while(c!==b)}}function Sj(a){var b=a.ref;if(null!==b){var c=a.stateNode;switch(a.tag){case 5:a=c;break;default:a=c}"function"===typeof b?b(a):b.current=a}}\nfunction Tj(a){var b=a.alternate;null!==b&&(a.alternate=null,Tj(b));a.child=null;a.deletions=null;a.sibling=null;5===a.tag&&(b=a.stateNode,null!==b&&(delete b[Of],delete b[Pf],delete b[of],delete b[Qf],delete b[Rf]));a.stateNode=null;a.return=null;a.dependencies=null;a.memoizedProps=null;a.memoizedState=null;a.pendingProps=null;a.stateNode=null;a.updateQueue=null}function Uj(a){return 5===a.tag||3===a.tag||4===a.tag}\nfunction Vj(a){a:for(;;){for(;null===a.sibling;){if(null===a.return||Uj(a.return))return null;a=a.return}a.sibling.return=a.return;for(a=a.sibling;5!==a.tag&&6!==a.tag&&18!==a.tag;){if(a.flags&2)continue a;if(null===a.child||4===a.tag)continue a;else a.child.return=a,a=a.child}if(!(a.flags&2))return a.stateNode}}\nfunction Wj(a,b,c){var d=a.tag;if(5===d||6===d)a=a.stateNode,b?8===c.nodeType?c.parentNode.insertBefore(a,b):c.insertBefore(a,b):(8===c.nodeType?(b=c.parentNode,b.insertBefore(a,c)):(b=c,b.appendChild(a)),c=c._reactRootContainer,null!==c&&void 0!==c||null!==b.onclick||(b.onclick=Bf));else if(4!==d&&(a=a.child,null!==a))for(Wj(a,b,c),a=a.sibling;null!==a;)Wj(a,b,c),a=a.sibling}\nfunction Xj(a,b,c){var d=a.tag;if(5===d||6===d)a=a.stateNode,b?c.insertBefore(a,b):c.appendChild(a);else if(4!==d&&(a=a.child,null!==a))for(Xj(a,b,c),a=a.sibling;null!==a;)Xj(a,b,c),a=a.sibling}var X=null,Yj=!1;function Zj(a,b,c){for(c=c.child;null!==c;)ak(a,b,c),c=c.sibling}\nfunction ak(a,b,c){if(lc&&"function"===typeof lc.onCommitFiberUnmount)try{lc.onCommitFiberUnmount(kc,c)}catch(h){}switch(c.tag){case 5:U||Mj(c,b);case 6:var d=X,e=Yj;X=null;Zj(a,b,c);X=d;Yj=e;null!==X&&(Yj?(a=X,c=c.stateNode,8===a.nodeType?a.parentNode.removeChild(c):a.removeChild(c)):X.removeChild(c.stateNode));break;case 18:null!==X&&(Yj?(a=X,c=c.stateNode,8===a.nodeType?Kf(a.parentNode,c):1===a.nodeType&&Kf(a,c),bd(a)):Kf(X,c.stateNode));break;case 4:d=X;e=Yj;X=c.stateNode.containerInfo;Yj=!0;\nZj(a,b,c);X=d;Yj=e;break;case 0:case 11:case 14:case 15:if(!U&&(d=c.updateQueue,null!==d&&(d=d.lastEffect,null!==d))){e=d=d.next;do{var f=e,g=f.destroy;f=f.tag;void 0!==g&&(0!==(f&2)?Nj(c,b,g):0!==(f&4)&&Nj(c,b,g));e=e.next}while(e!==d)}Zj(a,b,c);break;case 1:if(!U&&(Mj(c,b),d=c.stateNode,"function"===typeof d.componentWillUnmount))try{d.props=c.memoizedProps,d.state=c.memoizedState,d.componentWillUnmount()}catch(h){W(c,b,h)}Zj(a,b,c);break;case 21:Zj(a,b,c);break;case 22:c.mode&1?(U=(d=U)||null!==\nc.memoizedState,Zj(a,b,c),U=d):Zj(a,b,c);break;default:Zj(a,b,c)}}function bk(a){var b=a.updateQueue;if(null!==b){a.updateQueue=null;var c=a.stateNode;null===c&&(c=a.stateNode=new Lj);b.forEach(function(b){var d=ck.bind(null,a,b);c.has(b)||(c.add(b),b.then(d,d))})}}\nfunction dk(a,b){var c=b.deletions;if(null!==c)for(var d=0;de&&(e=g);d&=~f}d=e;d=B()-d;d=(120>d?120:480>d?480:1080>d?1080:1920>d?1920:3E3>d?3E3:4320>d?4320:1960*mk(d/1960))-d;if(10a?16:a;if(null===xk)var d=!1;else{a=xk;xk=null;yk=0;if(0!==(K&6))throw Error(p(331));var e=K;K|=4;for(V=a.current;null!==V;){var f=V,g=f.child;if(0!==(V.flags&16)){var h=f.deletions;if(null!==h){for(var k=0;kB()-gk?Lk(a,0):sk|=c);Ek(a,b)}function Zk(a,b){0===b&&(0===(a.mode&1)?b=1:(b=sc,sc<<=1,0===(sc&130023424)&&(sc=4194304)));var c=L();a=Zg(a,b);null!==a&&(Ac(a,b,c),Ek(a,c))}function vj(a){var b=a.memoizedState,c=0;null!==b&&(c=b.retryLane);Zk(a,c)}\nfunction ck(a,b){var c=0;switch(a.tag){case 13:var d=a.stateNode;var e=a.memoizedState;null!==e&&(c=e.retryLane);break;case 19:d=a.stateNode;break;default:throw Error(p(314));}null!==d&&d.delete(b);Zk(a,c)}var Wk;\nWk=function(a,b,c){if(null!==a)if(a.memoizedProps!==b.pendingProps||Wf.current)Ug=!0;else{if(0===(a.lanes&c)&&0===(b.flags&128))return Ug=!1,zj(a,b,c);Ug=0!==(a.flags&131072)?!0:!1}else Ug=!1,I&&0!==(b.flags&1048576)&&ug(b,ng,b.index);b.lanes=0;switch(b.tag){case 2:var d=b.type;jj(a,b);a=b.pendingProps;var e=Yf(b,H.current);Tg(b,c);e=Xh(null,b,d,a,e,c);var f=bi();b.flags|=1;"object"===typeof e&&null!==e&&"function"===typeof e.render&&void 0===e.$$typeof?(b.tag=1,b.memoizedState=null,b.updateQueue=\nnull,Zf(d)?(f=!0,cg(b)):f=!1,b.memoizedState=null!==e.state&&void 0!==e.state?e.state:null,ah(b),e.updater=nh,b.stateNode=e,e._reactInternals=b,rh(b,d,a,c),b=kj(null,b,d,!0,f,c)):(b.tag=0,I&&f&&vg(b),Yi(null,b,e,c),b=b.child);return b;case 16:d=b.elementType;a:{jj(a,b);a=b.pendingProps;e=d._init;d=e(d._payload);b.type=d;e=b.tag=$k(d);a=Lg(d,a);switch(e){case 0:b=dj(null,b,d,a,c);break a;case 1:b=ij(null,b,d,a,c);break a;case 11:b=Zi(null,b,d,a,c);break a;case 14:b=aj(null,b,d,Lg(d.type,a),c);break a}throw Error(p(306,\nd,""));}return b;case 0:return d=b.type,e=b.pendingProps,e=b.elementType===d?e:Lg(d,e),dj(a,b,d,e,c);case 1:return d=b.type,e=b.pendingProps,e=b.elementType===d?e:Lg(d,e),ij(a,b,d,e,c);case 3:a:{lj(b);if(null===a)throw Error(p(387));d=b.pendingProps;f=b.memoizedState;e=f.element;bh(a,b);gh(b,d,null,c);var g=b.memoizedState;d=g.element;if(f.isDehydrated)if(f={element:d,isDehydrated:!1,cache:g.cache,pendingSuspenseBoundaries:g.pendingSuspenseBoundaries,transitions:g.transitions},b.updateQueue.baseState=\nf,b.memoizedState=f,b.flags&256){e=Ki(Error(p(423)),b);b=mj(a,b,d,c,e);break a}else if(d!==e){e=Ki(Error(p(424)),b);b=mj(a,b,d,c,e);break a}else for(yg=Lf(b.stateNode.containerInfo.firstChild),xg=b,I=!0,zg=null,c=Ch(b,null,d,c),b.child=c;c;)c.flags=c.flags&-3|4096,c=c.sibling;else{Ig();if(d===e){b=$i(a,b,c);break a}Yi(a,b,d,c)}b=b.child}return b;case 5:return Kh(b),null===a&&Eg(b),d=b.type,e=b.pendingProps,f=null!==a?a.memoizedProps:null,g=e.children,Ef(d,e)?g=null:null!==f&&Ef(d,f)&&(b.flags|=32),\nhj(a,b),Yi(a,b,g,c),b.child;case 6:return null===a&&Eg(b),null;case 13:return pj(a,b,c);case 4:return Ih(b,b.stateNode.containerInfo),d=b.pendingProps,null===a?b.child=Bh(b,null,d,c):Yi(a,b,d,c),b.child;case 11:return d=b.type,e=b.pendingProps,e=b.elementType===d?e:Lg(d,e),Zi(a,b,d,e,c);case 7:return Yi(a,b,b.pendingProps,c),b.child;case 8:return Yi(a,b,b.pendingProps.children,c),b.child;case 12:return Yi(a,b,b.pendingProps.children,c),b.child;case 10:a:{d=b.type._context;e=b.pendingProps;f=b.memoizedProps;\ng=e.value;G(Mg,d._currentValue);d._currentValue=g;if(null!==f)if(He(f.value,g)){if(f.children===e.children&&!Wf.current){b=$i(a,b,c);break a}}else for(f=b.child,null!==f&&(f.return=b);null!==f;){var h=f.dependencies;if(null!==h){g=f.child;for(var k=h.firstContext;null!==k;){if(k.context===d){if(1===f.tag){k=ch(-1,c&-c);k.tag=2;var l=f.updateQueue;if(null!==l){l=l.shared;var m=l.pending;null===m?k.next=k:(k.next=m.next,m.next=k);l.pending=k}}f.lanes|=c;k=f.alternate;null!==k&&(k.lanes|=c);Sg(f.return,\nc,b);h.lanes|=c;break}k=k.next}}else if(10===f.tag)g=f.type===b.type?null:f.child;else if(18===f.tag){g=f.return;if(null===g)throw Error(p(341));g.lanes|=c;h=g.alternate;null!==h&&(h.lanes|=c);Sg(g,c,b);g=f.sibling}else g=f.child;if(null!==g)g.return=f;else for(g=f;null!==g;){if(g===b){g=null;break}f=g.sibling;if(null!==f){f.return=g.return;g=f;break}g=g.return}f=g}Yi(a,b,e.children,c);b=b.child}return b;case 9:return e=b.type,d=b.pendingProps.children,Tg(b,c),e=Vg(e),d=d(e),b.flags|=1,Yi(a,b,d,c),\nb.child;case 14:return d=b.type,e=Lg(d,b.pendingProps),e=Lg(d.type,e),aj(a,b,d,e,c);case 15:return cj(a,b,b.type,b.pendingProps,c);case 17:return d=b.type,e=b.pendingProps,e=b.elementType===d?e:Lg(d,e),jj(a,b),b.tag=1,Zf(d)?(a=!0,cg(b)):a=!1,Tg(b,c),ph(b,d,e),rh(b,d,e,c),kj(null,b,d,!0,a,c);case 19:return yj(a,b,c);case 22:return ej(a,b,c)}throw Error(p(156,b.tag));};function Gk(a,b){return ac(a,b)}\nfunction al(a,b,c,d){this.tag=a;this.key=c;this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null;this.index=0;this.ref=null;this.pendingProps=b;this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null;this.mode=d;this.subtreeFlags=this.flags=0;this.deletions=null;this.childLanes=this.lanes=0;this.alternate=null}function Bg(a,b,c,d){return new al(a,b,c,d)}function bj(a){a=a.prototype;return!(!a||!a.isReactComponent)}\nfunction $k(a){if("function"===typeof a)return bj(a)?1:0;if(void 0!==a&&null!==a){a=a.$$typeof;if(a===Da)return 11;if(a===Ga)return 14}return 2}\nfunction wh(a,b){var c=a.alternate;null===c?(c=Bg(a.tag,b,a.key,a.mode),c.elementType=a.elementType,c.type=a.type,c.stateNode=a.stateNode,c.alternate=a,a.alternate=c):(c.pendingProps=b,c.type=a.type,c.flags=0,c.subtreeFlags=0,c.deletions=null);c.flags=a.flags&14680064;c.childLanes=a.childLanes;c.lanes=a.lanes;c.child=a.child;c.memoizedProps=a.memoizedProps;c.memoizedState=a.memoizedState;c.updateQueue=a.updateQueue;b=a.dependencies;c.dependencies=null===b?null:{lanes:b.lanes,firstContext:b.firstContext};\nc.sibling=a.sibling;c.index=a.index;c.ref=a.ref;return c}\nfunction yh(a,b,c,d,e,f){var g=2;d=a;if("function"===typeof a)bj(a)&&(g=1);else if("string"===typeof a)g=5;else a:switch(a){case ya:return Ah(c.children,e,f,b);case za:g=8;e|=8;break;case Aa:return a=Bg(12,c,b,e|2),a.elementType=Aa,a.lanes=f,a;case Ea:return a=Bg(13,c,b,e),a.elementType=Ea,a.lanes=f,a;case Fa:return a=Bg(19,c,b,e),a.elementType=Fa,a.lanes=f,a;case Ia:return qj(c,e,f,b);default:if("object"===typeof a&&null!==a)switch(a.$$typeof){case Ba:g=10;break a;case Ca:g=9;break a;case Da:g=11;\nbreak a;case Ga:g=14;break a;case Ha:g=16;d=null;break a}throw Error(p(130,null==a?a:typeof a,""));}b=Bg(g,c,b,e);b.elementType=a;b.type=d;b.lanes=f;return b}function Ah(a,b,c,d){a=Bg(7,a,d,b);a.lanes=c;return a}function qj(a,b,c,d){a=Bg(22,a,d,b);a.elementType=Ia;a.lanes=c;a.stateNode={isHidden:!1};return a}function xh(a,b,c){a=Bg(6,a,null,b);a.lanes=c;return a}\nfunction zh(a,b,c){b=Bg(4,null!==a.children?a.children:[],a.key,b);b.lanes=c;b.stateNode={containerInfo:a.containerInfo,pendingChildren:null,implementation:a.implementation};return b}\nfunction bl(a,b,c,d,e){this.tag=b;this.containerInfo=a;this.finishedWork=this.pingCache=this.current=this.pendingChildren=null;this.timeoutHandle=-1;this.callbackNode=this.pendingContext=this.context=null;this.callbackPriority=0;this.eventTimes=zc(0);this.expirationTimes=zc(-1);this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0;this.entanglements=zc(0);this.identifierPrefix=d;this.onRecoverableError=e;this.mutableSourceEagerHydrationData=\nnull}function cl(a,b,c,d,e,f,g,h,k){a=new bl(a,b,c,h,k);1===b?(b=1,!0===f&&(b|=8)):b=0;f=Bg(3,null,null,b);a.current=f;f.stateNode=a;f.memoizedState={element:d,isDehydrated:c,cache:null,transitions:null,pendingSuspenseBoundaries:null};ah(f);return a}function dl(a,b,c){var d=3{"use strict";eval("var __webpack_unused_export__;\n\n\nvar m = __webpack_require__(935);\nif (true) {\n exports.s = m.createRoot;\n __webpack_unused_export__ = m.hydrateRoot;\n} else { var i; }\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiNzQ1LmpzIiwibWFwcGluZ3MiOiI7QUFBQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQSIsInNvdXJjZXMiOlsid2VicGFjazovL3JlYWN0LXF1aXotY29tcG9uZW50Ly4vbm9kZV9tb2R1bGVzL3JlYWN0LWRvbS9jbGllbnQuanM/MTFiMSJdLCJzb3VyY2VzQ29udGVudCI6WyIndXNlIHN0cmljdCc7XG5cbnZhciBtID0gcmVxdWlyZSgncmVhY3QtZG9tJyk7XG5pZiAocHJvY2Vzcy5lbnYuTk9ERV9FTlYgPT09ICdwcm9kdWN0aW9uJykge1xuICBleHBvcnRzLmNyZWF0ZVJvb3QgPSBtLmNyZWF0ZVJvb3Q7XG4gIGV4cG9ydHMuaHlkcmF0ZVJvb3QgPSBtLmh5ZHJhdGVSb290O1xufSBlbHNlIHtcbiAgdmFyIGkgPSBtLl9fU0VDUkVUX0lOVEVSTkFMU19ET19OT1RfVVNFX09SX1lPVV9XSUxMX0JFX0ZJUkVEO1xuICBleHBvcnRzLmNyZWF0ZVJvb3QgPSBmdW5jdGlvbihjLCBvKSB7XG4gICAgaS51c2luZ0NsaWVudEVudHJ5UG9pbnQgPSB0cnVlO1xuICAgIHRyeSB7XG4gICAgICByZXR1cm4gbS5jcmVhdGVSb290KGMsIG8pO1xuICAgIH0gZmluYWxseSB7XG4gICAgICBpLnVzaW5nQ2xpZW50RW50cnlQb2ludCA9IGZhbHNlO1xuICAgIH1cbiAgfTtcbiAgZXhwb3J0cy5oeWRyYXRlUm9vdCA9IGZ1bmN0aW9uKGMsIGgsIG8pIHtcbiAgICBpLnVzaW5nQ2xpZW50RW50cnlQb2ludCA9IHRydWU7XG4gICAgdHJ5IHtcbiAgICAgIHJldHVybiBtLmh5ZHJhdGVSb290KGMsIGgsIG8pO1xuICAgIH0gZmluYWxseSB7XG4gICAgICBpLnVzaW5nQ2xpZW50RW50cnlQb2ludCA9IGZhbHNlO1xuICAgIH1cbiAgfTtcbn1cbiJdLCJuYW1lcyI6W10sInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///745\n")},935:(module,__unused_webpack_exports,__webpack_require__)=>{"use strict";eval("\n\nfunction checkDCE() {\n /* global __REACT_DEVTOOLS_GLOBAL_HOOK__ */\n if (\n typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ === 'undefined' ||\n typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE !== 'function'\n ) {\n return;\n }\n if (false) {}\n try {\n // Verify that the code above has been dead code eliminated (DCE'd).\n __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(checkDCE);\n } catch (err) {\n // DevTools shouldn't crash React, no matter what.\n // We should still report in case we break this code.\n console.error(err);\n }\n}\n\nif (true) {\n // DCE check should happen before ReactDOM bundle executes so that\n // DevTools can report bad minification during injection.\n checkDCE();\n module.exports = __webpack_require__(448);\n} else {}\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiOTM1LmpzIiwibWFwcGluZ3MiOiJBQUFBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFVQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQSIsInNvdXJjZXMiOlsid2VicGFjazovL3JlYWN0LXF1aXotY29tcG9uZW50Ly4vbm9kZV9tb2R1bGVzL3JlYWN0LWRvbS9pbmRleC5qcz84YmM4Il0sInNvdXJjZXNDb250ZW50IjpbIid1c2Ugc3RyaWN0JztcblxuZnVuY3Rpb24gY2hlY2tEQ0UoKSB7XG4gIC8qIGdsb2JhbCBfX1JFQUNUX0RFVlRPT0xTX0dMT0JBTF9IT09LX18gKi9cbiAgaWYgKFxuICAgIHR5cGVvZiBfX1JFQUNUX0RFVlRPT0xTX0dMT0JBTF9IT09LX18gPT09ICd1bmRlZmluZWQnIHx8XG4gICAgdHlwZW9mIF9fUkVBQ1RfREVWVE9PTFNfR0xPQkFMX0hPT0tfXy5jaGVja0RDRSAhPT0gJ2Z1bmN0aW9uJ1xuICApIHtcbiAgICByZXR1cm47XG4gIH1cbiAgaWYgKHByb2Nlc3MuZW52Lk5PREVfRU5WICE9PSAncHJvZ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k5PREVfRU5WID09PSAncHJvZHVjdGlvbicpIHtcbiAgLy8gRENFIGNoZWNrIHNob3VsZCBoYXBwZW4gYmVmb3JlIFJlYWN0RE9NIGJ1bmRsZSBleGVjdXRlcyBzbyB0aGF0XG4gIC8vIERldlRvb2xzIGNhbiByZXBvcnQgYmFkIG1pbmlmaWNhdGlvbiBkdXJpbmcgaW5qZWN0aW9uLlxuICBjaGVja0RDRSgpO1xuICBtb2R1bGUuZXhwb3J0cyA9IHJlcXVpcmUoJy4vY2pzL3JlYWN0LWRvbS5wcm9kdWN0aW9uLm1pbi5qcycpO1xufSBlbHNlIHtcbiAgbW9kdWxlLmV4cG9ydHMgPSByZXF1aXJlKCcuL2Nqcy9yZWFjdC1kb20uZGV2ZWxvcG1lbnQuanMnKTtcbn1cbiJdLCJuYW1lcyI6W10sInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///935\n")},408:(__unused_webpack_module,exports)=>{"use strict";eval('/**\n * @license React\n * react.production.min.js\n *\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\nvar l=Symbol.for("react.element"),n=Symbol.for("react.portal"),p=Symbol.for("react.fragment"),q=Symbol.for("react.strict_mode"),r=Symbol.for("react.profiler"),t=Symbol.for("react.provider"),u=Symbol.for("react.context"),v=Symbol.for("react.forward_ref"),w=Symbol.for("react.suspense"),x=Symbol.for("react.memo"),y=Symbol.for("react.lazy"),z=Symbol.iterator;function A(a){if(null===a||"object"!==typeof a)return null;a=z&&a[z]||a["@@iterator"];return"function"===typeof a?a:null}\nvar B={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},C=Object.assign,D={};function E(a,b,e){this.props=a;this.context=b;this.refs=D;this.updater=e||B}E.prototype.isReactComponent={};\nE.prototype.setState=function(a,b){if("object"!==typeof a&&"function"!==typeof a&&null!=a)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,a,b,"setState")};E.prototype.forceUpdate=function(a){this.updater.enqueueForceUpdate(this,a,"forceUpdate")};function F(){}F.prototype=E.prototype;function G(a,b,e){this.props=a;this.context=b;this.refs=D;this.updater=e||B}var H=G.prototype=new F;\nH.constructor=G;C(H,E.prototype);H.isPureReactComponent=!0;var I=Array.isArray,J=Object.prototype.hasOwnProperty,K={current:null},L={key:!0,ref:!0,__self:!0,__source:!0};\nfunction M(a,b,e){var d,c={},k=null,h=null;if(null!=b)for(d in void 0!==b.ref&&(h=b.ref),void 0!==b.key&&(k=""+b.key),b)J.call(b,d)&&!L.hasOwnProperty(d)&&(c[d]=b[d]);var g=arguments.length-2;if(1===g)c.children=e;else if(1{"use strict";eval("\n\nif (true) {\n module.exports = __webpack_require__(408);\n} else {}\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMjk0LmpzIiwibWFwcGluZ3MiOiJBQUFBO0FBQ0E7QUFDQTtBQUNBO0FBQ0EiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly9yZWFjdC1xdWl6LWNvbXBvbmVudC8uL25vZGVfbW9kdWxlcy9yZWFjdC9pbmRleC5qcz9hYjViIl0sInNvdXJjZXNDb250ZW50IjpbIid1c2Ugc3RyaWN0JztcblxuaWYgKHByb2Nlc3MuZW52Lk5PREVfRU5WID09PSAncHJvZHVjdGlvbicpIHtcbiAgbW9kdWxlLmV4cG9ydHMgPSByZXF1aXJlKCcuL2Nqcy9yZWFjdC5wcm9kdWN0aW9uLm1pbi5qcycpO1xufSBlbHNlIHtcbiAgbW9kdWxlLmV4cG9ydHMgPSByZXF1aXJlKCcuL2Nqcy9yZWFjdC5kZXZlbG9wbWVudC5qcycpO1xufVxuIl0sIm5hbWVzIjpbXSwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///294\n")},53:(__unused_webpack_module,exports)=>{"use strict";eval('/**\n * @license React\n * scheduler.production.min.js\n *\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\nfunction f(a,b){var c=a.length;a.push(b);a:for(;0>>1,e=a[d];if(0>>1;dg(C,c))ng(x,C)?(a[d]=x,a[n]=c,d=n):(a[d]=C,a[m]=c,d=m);else if(ng(x,c))a[d]=x,a[n]=c,d=n;else break a}}return b}\nfunction g(a,b){var c=a.sortIndex-b.sortIndex;return 0!==c?c:a.id-b.id}if("object"===typeof performance&&"function"===typeof performance.now){var l=performance;exports.unstable_now=function(){return l.now()}}else{var p=Date,q=p.now();exports.unstable_now=function(){return p.now()-q}}var r=[],t=[],u=1,v=null,y=3,z=!1,A=!1,B=!1,D="function"===typeof setTimeout?setTimeout:null,E="function"===typeof clearTimeout?clearTimeout:null,F="undefined"!==typeof setImmediate?setImmediate:null;\n"undefined"!==typeof navigator&&void 0!==navigator.scheduling&&void 0!==navigator.scheduling.isInputPending&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function G(a){for(var b=h(t);null!==b;){if(null===b.callback)k(t);else if(b.startTime<=a)k(t),b.sortIndex=b.expirationTime,f(r,b);else break;b=h(t)}}function H(a){B=!1;G(a);if(!A)if(null!==h(r))A=!0,I(J);else{var b=h(t);null!==b&&K(H,b.startTime-a)}}\nfunction J(a,b){A=!1;B&&(B=!1,E(L),L=-1);z=!0;var c=y;try{G(b);for(v=h(r);null!==v&&(!(v.expirationTime>b)||a&&!M());){var d=v.callback;if("function"===typeof d){v.callback=null;y=v.priorityLevel;var e=d(v.expirationTime<=b);b=exports.unstable_now();"function"===typeof e?v.callback=e:v===h(r)&&k(r);G(b)}else k(r);v=h(r)}if(null!==v)var w=!0;else{var m=h(t);null!==m&&K(H,m.startTime-b);w=!1}return w}finally{v=null,y=c,z=!1}}var N=!1,O=null,L=-1,P=5,Q=-1;\nfunction M(){return exports.unstable_now()-Qa||125d?(a.sortIndex=c,f(t,a),null===h(r)&&a===h(t)&&(B?(E(L),L=-1):B=!0,K(H,c-d))):(a.sortIndex=e,f(r,a),A||z||(A=!0,I(J)));return a};\nexports.unstable_shouldYield=M;exports.unstable_wrapCallback=function(a){var b=y;return function(){var c=y;y=b;try{return a.apply(this,arguments)}finally{y=c}}};\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiNTMuanMiLCJtYXBwaW5ncyI6IkFBQUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0EiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly9yZWFjdC1xdWl6LWNvbXBvbmVudC8uL25vZGVfbW9kdWxlcy9zY2hlZHVsZXIvY2pzL3NjaGVkdWxlci5wcm9kdWN0aW9uLm1pbi5qcz9mYjA3Il0sInNvdXJjZXNDb250ZW50IjpbIi8qKlxuICogQGxpY2Vuc2UgUmVhY3RcbiAqIHNjaGVkdWxlci5wcm9kdWN0aW9uLm1pbi5qc1xuICpcbiAqIENvcHlyaWdodCAoYykgRmFjZWJvb2ssIEluYy4gYW5kIGl0cyBhZmZpbGlhdGVzLlxuICpcbiAqIFRoaXMgc291cmNlIGNvZGUgaXMgbGljZW5zZWQgdW5kZXIgdGhlIE1JVCBsaWNlbnNlIGZvdW5kIGluIHRoZVxuICogTElDRU5TRSBmaWxlIGluIHRoZSByb290IGRpcmVjdG9yeSBvZiB0aGlzIHNvdXJjZSB0cmVlLlxuICovXG4ndXNlIHN0cmljdCc7ZnVuY3Rpb24gZihhLGIpe3ZhciBjPWEubGVuZ3RoO2EucHVzaChiKTthOmZvcig7MDxjOyl7dmFyIGQ9Yy0xPj4+MSxlPWFbZF07aWYoMDxnKGUsYikpYVtkXT1iLGFbY109ZSxjPWQ7ZWxzZSBicmVhayBh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val("\n\nif (true) {\n module.exports = __webpack_require__(53);\n} else {}\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiODQwLmpzIiwibWFwcGluZ3MiOiJBQUFBO0FBQ0E7QUFDQTtBQUNBO0FBQ0EiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly9yZWFjdC1xdWl6LWNvbXBvbmVudC8uL25vZGVfbW9kdWxlcy9zY2hlZHVsZXIvaW5kZXguanM/NDAyOSJdLCJzb3VyY2VzQ29udGVudCI6WyIndXNlIHN0cmljdCc7XG5cbmlmIChwcm9jZXNzLmVudi5OT0RFX0VOViA9PT0gJ3Byb2R1Y3Rpb24nKSB7XG4gIG1vZHVsZS5leHBvcnRzID0gcmVxdWlyZSgnLi9janMvc2NoZWR1bGVyLnByb2R1Y3Rpb24ubWluLmpzJyk7XG59IGVsc2Uge1xuICBtb2R1bGUuZXhwb3J0cyA9IHJlcXVpcmUoJy4vY2pzL3NjaGVkdWxlci5kZXZlbG9wbWVudC5qcycpO1xufVxuIl0sIm5hbWVzIjpbXSwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///840\n")}},__webpack_module_cache__={};function __webpack_require__(e){var n=__webpack_module_cache__[e];if(void 0!==n)return n.exports;var l=__webpack_module_cache__[e]={exports:{}};return __webpack_modules__[e].call(l.exports,l,l.exports,__webpack_require__),l.exports}__webpack_require__.n=e=>{var n=e&&e.__esModule?()=>e.default:()=>e;return __webpack_require__.d(n,{a:n}),n},__webpack_require__.d=(e,n)=>{for(var l in n)__webpack_require__.o(n,l)&&!__webpack_require__.o(e,l)&&Object.defineProperty(e,l,{enumerable:!0,get:n[l]})},__webpack_require__.o=(e,n)=>Object.prototype.hasOwnProperty.call(e,n);var __webpack_exports__=__webpack_require__(412)})(); \ No newline at end of file diff --git a/docs/main.css b/docs/main.css index f2fb88a..ea6a246 100644 --- a/docs/main.css +++ b/docs/main.css @@ -1 +1 @@ -.react-quiz-container{margin:20px;max-width:500px}.react-quiz-container .startQuizWrapper{margin-top:10px}.react-quiz-container .btn{background-image:none;border:1px solid transparent;cursor:pointer;font-weight:600;margin-bottom:0;padding:11px 12px;text-align:center;touch-action:manipulation;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;vertical-align:middle;white-space:nowrap}.react-quiz-container .questionWrapper .btn{border:1px solid #e8e8e8;border-radius:4px;display:block;font-size:15px;margin-bottom:10px;margin-top:10px;text-align:unset;white-space:normal}.react-quiz-container .questionWrapper .btn.correct{background:green;color:#fff}.react-quiz-container .questionModal .alert{border:1px solid transparent;border-radius:2px;color:#fff;margin-bottom:21px;padding:20px}.react-quiz-container .correct{background:green}.react-quiz-container .incorrect{background:red;color:#fff}.react-quiz-container .answerBtn,.react-quiz-container .questionWrapper img{width:100%}.react-quiz-container .selected{background:#007bff;color:#fff}.react-quiz-container .startQuizWrapper .startQuizBtn{background-color:#fff;border:1px solid #d9d9d9;border-radius:2px;color:rgba(0,0,0,.65);font-size:15px;line-height:1.35135}.react-quiz-container .result-answer-wrapper{border:1px solid #e8e8e8;border-bottom-left-radius:5px;border-bottom-right-radius:5px;margin-bottom:20px}.react-quiz-container .result-answer-wrapper h3{background-color:#fafafa;border-top-left-radius:5px;border-top-right-radius:5px;color:rgba(0,0,0,.9);margin:0;opacity:.8;padding:10px}.react-quiz-container .result-answer-wrapper .explanation{border:1px solid #e8e8e8;margin:0 20px 20px;padding:20px}.react-quiz-container .result-answer-wrapper .tag-container{margin:20px}.react-quiz-container .result-answer{padding:0 20px}.react-quiz-container .quiz-synopsis{margin:15px 0}.react-quiz-container .tag-container{display:flex;flex-wrap:wrap;gap:5px;margin-bottom:20px;margin-top:20px}.react-quiz-container .number-of-selection,.react-quiz-container .selection-tag{border-radius:5px;color:#fff;padding:7px}.react-quiz-container .number-of-selection{background:#673ab7;margin-left:5px}.react-quiz-container .selection-tag.single{background:#3f51b5}.react-quiz-container .selection-tag.multiple{background:#ff9800}.react-quiz-container .selection-tag.segment{background:#3db4b9;margin-left:5px}.react-quiz-container .questionBtnContainer{display:flex;justify-content:space-between}.react-quiz-container .quiz-result-filter{bottom:15px;position:relative;width:120px;.filter-dropdown-select{background-color:#fcfcfc;border:2px solid #c2c5c7;border-radius:7px;bottom:10px;color:#333;cursor:pointer;font-size:16px;height:12px;margin-top:2px;padding:8px;position:relative;text-transform:capitalize}.filter-dropdown-select:after{color:#a5a5a5;content:"▼";font-size:11px;position:absolute;right:10px;top:57%;transform:translateY(-50%);transition:all .3s ease}.filter-dropdown-select:hover{border:2px solid #51aae6;box-shadow:0 0 6px rgba(109,179,250,.5)}.dropdown-options{background-color:#fcfcfc;border-radius:10px;box-shadow:0 0 10px hsla(210,2%,56%,.5);left:0;list-style:none;margin:0;padding:0;position:absolute;top:85%;width:100%;z-index:1}.filter-dropdown-select.open{border:2px solid #51aae6;box-shadow:0 0 6px rgba(109,179,250,.5)}.dropdown-options .dropdown-options-item{cursor:pointer;font-size:16px;padding:10px}.dropdown-options .dropdown-options-item:hover{background-color:hsla(0,0%,89%,.852);border-radius:5px}.dropdown-options .dropdown-options-item:focus{background-color:#d7f1f9;font-weight:700}.filter-dropdown-select .selected-option.selected-open{color:#c6c2c2;font-weight:lighter}.filter-dropdown-select .selected-option{bottom:2px;font-size:16px;position:relative}.filter-dropdown-select:focus+.dropdown-options{max-height:200px}.dropdown-options .dropdown-options-item.selected{background-color:#d7f1f9;color:#333;font-weight:700}.dropdown-options.open{max-height:200px}} \ No newline at end of file +.react-quiz-container{margin:20px;max-width:500px}.react-quiz-container .startQuizWrapper{margin-top:10px}.react-quiz-container .btn{background-image:none;border:1px solid transparent;cursor:pointer;font-weight:600;margin-bottom:0;padding:11px 12px;text-align:center;touch-action:manipulation;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;vertical-align:middle;white-space:nowrap}.react-quiz-container .questionWrapper .btn{border:1px solid #e8e8e8;border-radius:4px;display:block;font-size:15px;margin-bottom:10px;margin-top:10px;text-align:unset;white-space:normal}.react-quiz-container .questionWrapper .btn.correct,.timerBtn{background:green;color:#fff}.timerBtn{border:0!important;border-radius:10px;cursor:pointer;float:right;padding:5px;position:relative;top:-35px;width:80px}.timerPauseScreen{font-size:30px}.react-quiz-container .questionModal .alert{border:1px solid transparent;border-radius:2px;color:#fff;margin-bottom:21px;padding:20px}.react-quiz-container .correct{background:green}.react-quiz-container .incorrect{background:red;color:#fff}.react-quiz-container .unanswered{background:grey;color:#fff}.react-quiz-container .answerBtn,.react-quiz-container .questionWrapper img{width:100%}.react-quiz-container .selected{background:#007bff;color:#fff}.react-quiz-container .startQuizWrapper .startQuizBtn{background-color:#fff;border:1px solid #d9d9d9;border-radius:2px;color:rgba(0,0,0,.65);font-size:15px;line-height:1.35135}.react-quiz-container .result-answer-wrapper{border:1px solid #e8e8e8;border-bottom-left-radius:5px;border-bottom-right-radius:5px;margin-bottom:20px}.react-quiz-container .result-answer-wrapper h3{background-color:#fafafa;border-top-left-radius:5px;border-top-right-radius:5px;color:rgba(0,0,0,.9);margin:0;opacity:.8;padding:10px}.react-quiz-container .result-answer-wrapper .explanation{border:1px solid #e8e8e8;margin:0 20px 20px;padding:20px}.react-quiz-container .result-answer-wrapper .tag-container{margin:20px}.react-quiz-container .result-answer{padding:0 20px}.react-quiz-container .quiz-synopsis{margin:15px 0}.react-quiz-container .tag-container{display:flex;flex-wrap:wrap;gap:5px;margin-bottom:20px;margin-top:20px}.react-quiz-container .number-of-selection,.react-quiz-container .selection-tag{border-radius:5px;color:#fff;padding:7px}.react-quiz-container .number-of-selection{background:#673ab7;margin-left:5px}.react-quiz-container .selection-tag.single{background:#3f51b5}.react-quiz-container .selection-tag.multiple{background:#ff9800}.react-quiz-container .selection-tag.segment{background:#3db4b9;margin-left:5px}.react-quiz-container .questionBtnContainer{display:flex;justify-content:space-between}.react-quiz-container .quiz-result-filter{bottom:15px;position:relative;width:120px;.filter-dropdown-select{background-color:#fcfcfc;border:2px solid #c2c5c7;border-radius:7px;bottom:10px;color:#333;cursor:pointer;font-size:16px;height:12px;margin-top:2px;padding:8px;position:relative;text-transform:capitalize}.filter-dropdown-select:after{color:#a5a5a5;content:"▼";font-size:11px;position:absolute;right:10px;top:57%;transform:translateY(-50%);transition:all .3s ease}.filter-dropdown-select:hover{border:2px solid #51aae6;box-shadow:0 0 6px rgba(109,179,250,.5)}.dropdown-options{background-color:#fcfcfc;border-radius:10px;box-shadow:0 0 10px hsla(210,2%,56%,.5);left:0;list-style:none;margin:0;padding:0;position:absolute;top:85%;width:100%;z-index:1}.filter-dropdown-select.open{border:2px solid #51aae6;box-shadow:0 0 6px rgba(109,179,250,.5)}.dropdown-options .dropdown-options-item{cursor:pointer;font-size:16px;padding:10px}.dropdown-options .dropdown-options-item:hover{background-color:hsla(0,0%,89%,.852);border-radius:5px}.dropdown-options .dropdown-options-item:focus{background-color:#d7f1f9;font-weight:700}.filter-dropdown-select .selected-option.selected-open{color:#c6c2c2;font-weight:lighter}.filter-dropdown-select .selected-option{bottom:2px;font-size:16px;position:relative}.filter-dropdown-select:focus+.dropdown-options{max-height:200px}.dropdown-options .dropdown-options-item.selected{background-color:#d7f1f9;color:#333;font-weight:700}.dropdown-options.open{max-height:200px}} \ No newline at end of file diff --git a/package-lock.json b/package-lock.json index 331fb55..8db9903 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "react-quiz-component", - "version": "0.7.1", + "version": "0.8.0", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "react-quiz-component", - "version": "0.7.1", + "version": "0.8.0", "license": "MIT", "dependencies": { "dompurify": "^3.0.0", diff --git a/package.json b/package.json index 5b7061a..5d27935 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "react-quiz-component", - "version": "0.7.1", + "version": "0.8.0", "description": "React Quiz Component", "main": "dist/index.js", "module": "dist/index.es.js",