From 41c711786271b66e7f3ffb114320e5db183752a3 Mon Sep 17 00:00:00 2001 From: hidday Date: Tue, 11 Oct 2022 12:16:26 +0300 Subject: [PATCH] [semver:patch] Solve redirect issues for preview and recording --- dist/development/strigo.sdk.js | 592 +++++++++--------- dist/production/strigo.sdk.min.js | 46 +- .../assessment-recorder.ts | 21 +- src/modules/url/url.ts | 28 +- src/modules/widgets/iframe.ts | 2 +- src/modules/widgets/overlay.ts | 24 +- src/strigo.sdk.ts | 9 +- src/strigo/consts.ts | 4 + src/strigo/index.ts | 48 +- src/strigo/types.ts | 5 +- 10 files changed, 376 insertions(+), 403 deletions(-) diff --git a/dist/development/strigo.sdk.js b/dist/development/strigo.sdk.js index 241116b..85cc5d7 100644 --- a/dist/development/strigo.sdk.js +++ b/dist/development/strigo.sdk.js @@ -10995,8 +10995,203 @@ } }); - // src/modules/assessment-recorder/assessment-recorder.ts - var import_html2canvas = __toESM(require_html2canvas(), 1); + // src/strigo/consts.ts + var INIT_SCRIPT_ID = "strigo-sdk"; + var BASE_STRIGO_URL = "strigo.io"; + var STRIGO_IFRAME_CLASSES = ["strigo-exercises"]; + var ORIGINAL_WEBSITE_IFRAME_CLASSES = ["orig-iframe"]; + var ACADEMY_HAT = ` + +`; + var CDN_BASE_PATH = "https://cdn.statically.io/gh/strigo/strigo-sdk"; + var ASSESSMENT_RECORDER_URL = "https://assessment-recorder.web.app"; + var LOCAL_STRIGO_URL = "http://local.strigo.io:3000"; + var LOCAL_STRIGO_PREVIEW_URL = "http://local-preview.strigo.io:3000"; + var DEFAULT_ASSESSMENT_RECORDER_CSS_VERSION = "v1.1.40"; + + // src/modules/assessment-recorder/assessment-recorder.types.ts + var ASSESSMENT_RECORDER_ID_PARAM = "strigoAssessmentUuid"; + var ASSESSMENT_RECORDER_PARAM = "strigoAssessmentRecorder"; + + // src/modules/url/url.ts + var STRIGO_CHILD_IFRAME_PARAM = "strigoChildIframe"; + function paramsToObject(entries) { + const result = {}; + for (const [key, value] of entries) { + result[key] = value; + } + return result; + } + function extractUrlParams(search) { + const urlParams = new URLSearchParams(search); + const entries = urlParams.entries(); + return paramsToObject(entries); + } + function getUrlData() { + const { host, pathname, href, origin, search } = window.location; + return { + host, + pathName: pathname, + href, + origin, + search, + params: extractUrlParams(search) + }; + } + function generateStrigoIframeURL(config, isPreview) { + const { subDomain, user, webApiKey } = config; + const localStrigoUrl = isPreview ? LOCAL_STRIGO_PREVIEW_URL : LOCAL_STRIGO_URL; + const prodStrigoUrl = isPreview ? `https://academy-preview.${BASE_STRIGO_URL}` : `https://${subDomain}.${BASE_STRIGO_URL}`; + const strigoUrlPrefix = window.Strigo.isDevelopment() ? localStrigoUrl : prodStrigoUrl; + const strigoUrl = new URL(`${strigoUrlPrefix}/academy/courses`); + strigoUrl.searchParams.set("token", user.token.token); + strigoUrl.searchParams.set("webApiKey", webApiKey); + return strigoUrl.toString(); + } + function generateStrigoChildIframeURL(url) { + const currentUrl = new URL(url); + currentUrl.searchParams.set(STRIGO_CHILD_IFRAME_PARAM, "true"); + return currentUrl.toString(); + } + function isStrigoChildIframe() { + return window.location.search.includes(STRIGO_CHILD_IFRAME_PARAM); + } + function removeStrigoChildIframeParam() { + const url = new URL(window.location.href); + const searchParams = new URLSearchParams(url.search); + searchParams.delete(STRIGO_CHILD_IFRAME_PARAM); + url.search = searchParams.toString(); + window.history.replaceState(window.history.state, "", url); + } + function extractInitScriptParams() { + const initScript = document.getElementById(INIT_SCRIPT_ID); + return { + webApiKey: initScript?.getAttribute("data-web-api-key") || "", + subDomain: initScript?.getAttribute("data-subdomain") || "", + selectedWidgetFlavor: initScript?.getAttribute("data-layout-flavor") || "dynamic" /* DYNAMIC */ + }; + } + function generateCssURL(version) { + if (window.Strigo.isDevelopment()) { + return `${SDK_LOCAL_URL}/styles/strigo.css`; + } + if (version) { + return `${CDN_BASE_PATH}@${version}/dist/production/styles/strigo.min.css`; + } + return `${CDN_BASE_PATH}@master/dist/production/styles/strigo.min.css`; + } + function generateWidgetCssURL(version) { + if (window.Strigo.isDevelopment()) { + return `${SDK_LOCAL_URL}/styles/strigo-widget.css`; + } + if (version) { + return `${CDN_BASE_PATH}@${version}/dist/production/styles/strigo-widget.min.css`; + } + return `${CDN_BASE_PATH}@master/dist/production/styles/strigo-widget.min.css`; + } + function generateAcademyHatCssURL(version) { + if (window.Strigo.isDevelopment()) { + return `${SDK_LOCAL_URL}/styles/strigo-academy-hat.css`; + } + if (version) { + return `${CDN_BASE_PATH}@${version}/dist/production/styles/strigo-academy-hat.min.css`; + } + return `${CDN_BASE_PATH}@master/dist/production/styles/strigo-academy-hat.min.css`; + } + function generateRecorderCssURL(version) { + if (window.Strigo.isDevelopment()) { + return `${SDK_LOCAL_URL}/styles/strigo-assessment-recorder.css`; + } + if (version) { + return `${CDN_BASE_PATH}@${version}/dist/production/styles/strigo-assessment-recorder.min.css`; + } + return `${CDN_BASE_PATH}@${DEFAULT_ASSESSMENT_RECORDER_CSS_VERSION}/dist/production/styles/strigo-assessment-recorder.min.css`; + } + function generateAssessmentRecorderURL() { + return window.Strigo.isDevelopment() ? RECORDER_LOCAL_URL : ASSESSMENT_RECORDER_URL; + } + function getURLWithoutStrigoRecorderParams(url) { + const capturedElementUrl = new URL(url); + const searchParams = new URLSearchParams(capturedElementUrl.search); + searchParams.delete(ASSESSMENT_RECORDER_ID_PARAM); + searchParams.delete(ASSESSMENT_RECORDER_PARAM); + capturedElementUrl.search = searchParams.toString(); + return capturedElementUrl.toString(); + } + + // src/services/logger.ts + var Logger = class { + constructor(config) { + this.url = config?.url; + } + setup(config) { + this.url = config.url; + } + logToRemote(level, message, context) { + return fetch(this.url, { + method: "PUT", + headers: { + "Content-Type": "application/json" + }, + body: JSON.stringify({ + level, + message, + context + }) + }).then((result) => { + if (!result.ok) { + console.warn("Logging to Strigo failed", { result }); + } + }).catch((error) => { + console.warn("Logging to Strigo failed", { err: error }); + }); + } + logToConsole(level, message, context) { + const enrichedMessage = `${new Date().toISOString()} - ${message}`; + const parsedContext = context.err instanceof Error ? { ...context, err: { message: context.err.message, name: context.err.name, stack: context.err.stack } } : context; + console[level](enrichedMessage, context ? ` +${JSON.stringify(parsedContext)}` : ""); + } + getDefaultContext() { + const config = getLocalStorageConfig(); + if (!config) { + return {}; + } + const { user, subDomain, initSite, version, selectedWidgetFlavor } = config; + return { + token: user?.token.token, + initSite: initSite?.href, + subDomain, + development: window.Strigo.isDevelopment(), + version, + selectedWidgetFlavor + }; + } + log(level, message, context) { + const enrichedContext = { ...this.getDefaultContext(), ...context }; + try { + if (this.url && window.Strigo.isDevelopment()) { + this.logToRemote(level, message, enrichedContext); + } + this.logToConsole(level, `Academy - ${message}`, enrichedContext); + } catch (err) { + console.log("Logging error:", { err }); + } + } + debug(message, context = {}) { + this.log("debug", message, context); + } + info(message, context = {}) { + this.log("info", message, context); + } + warn(message, context = {}) { + this.log("warn", message, context); + } + error(message, context = {}) { + this.log("error", message, context); + } + }; + var LoggerInstance = new Logger(); // src/modules/storage-utils/storage-utils.ts function getStorageData(storageType, storageName) { @@ -11042,20 +11237,6 @@ } } - // src/strigo/consts.ts - var INIT_SCRIPT_ID = "strigo-sdk"; - var BASE_STRIGO_URL = "strigo.io"; - var STRIGO_IFRAME_CLASSES = ["strigo-exercises"]; - var ORIGINAL_WEBSITE_IFRAME_CLASSES = ["orig-iframe"]; - var ACADEMY_HAT = ` - -`; - var CDN_BASE_PATH = "https://cdn.statically.io/gh/strigo/strigo-sdk"; - var ASSESSMENT_RECORDER_URL = "https://assessment-recorder.web.app"; - var LOCAL_STRIGO_URL = "http://local.strigo.io:3000"; - var DEFAULT_ASSESSMENT_RECORDER_CSS_VERSION = "v1.1.40"; - var STRIGO_PREVIEW_USER_TOKEN_PARAM = "strigoPreviewUserToken"; - // src/modules/config/config.ts function getLocalStorageConfig() { const config = getStorageData("localStorage" /* LOCAL_STORAGE */, "strigoConfig" /* STRIGO_CONFIG */); @@ -11133,80 +11314,6 @@ } } - // src/services/logger.ts - var Logger = class { - constructor(config) { - this.url = config?.url; - } - setup(config) { - this.url = config.url; - } - logToRemote(level, message, context) { - return fetch(this.url, { - method: "PUT", - headers: { - "Content-Type": "application/json" - }, - body: JSON.stringify({ - level, - message, - context - }) - }).then((result) => { - if (!result.ok) { - console.warn("Logging to Strigo failed", { result }); - } - }).catch((error) => { - console.warn("Logging to Strigo failed", { err: error }); - }); - } - logToConsole(level, message, context) { - const enrichedMessage = `${new Date().toISOString()} - ${message}`; - const parsedContext = context.err instanceof Error ? { ...context, err: { message: context.err.message, name: context.err.name, stack: context.err.stack } } : context; - console[level](enrichedMessage, context ? ` -${JSON.stringify(parsedContext)}` : ""); - } - getDefaultContext() { - const config = getLocalStorageConfig(); - if (!config) { - return {}; - } - const { user, subDomain, initSite, version, selectedWidgetFlavor } = config; - return { - token: user?.token.token, - initSite: initSite?.href, - subDomain, - development: window.Strigo.isDevelopment(), - version, - selectedWidgetFlavor - }; - } - log(level, message, context) { - const enrichedContext = { ...this.getDefaultContext(), ...context }; - try { - if (this.url && window.Strigo.isDevelopment()) { - this.logToRemote(level, message, enrichedContext); - } - this.logToConsole(level, `Academy - ${message}`, enrichedContext); - } catch (err) { - console.log("Logging error:", { err }); - } - } - debug(message, context = {}) { - this.log("debug", message, context); - } - info(message, context = {}) { - this.log("info", message, context); - } - warn(message, context = {}) { - this.log("warn", message, context); - } - error(message, context = {}) { - this.log("error", message, context); - } - }; - var LoggerInstance = new Logger(); - // src/modules/session/session.ts function setupSessionStorage(initialSession) { const session = setupStorage("sessionStorage" /* SESSION_STORAGE */, "strigoSession" /* STRIGO_SESSION */, initialSession); @@ -11234,6 +11341,51 @@ ${JSON.stringify(parsedContext)}` : ""); clearStorage("sessionStorage" /* SESSION_STORAGE */, "strigoSession" /* STRIGO_SESSION */); } + // src/modules/assessments-storage/assessments-storage.ts + function getAssessmentsStorageData() { + try { + return JSON.parse(window["localStorage" /* LOCAL_STORAGE */].getItem("strigoAssessments" /* STRIGO_ASSESSMENTS */)); + } catch (error) { + LoggerInstance.error("Get assessments storage error", { error }); + return null; + } + } + function initAssessmentStorage() { + try { + const currentAssessmentsStorage = getAssessmentsStorageData(); + if (currentAssessmentsStorage) { + LoggerInstance.debug("Assessments storage already exists"); + return currentAssessmentsStorage; + } + const strigoAssessments = { assessments: [] }; + window["localStorage" /* LOCAL_STORAGE */].setItem("strigoAssessments" /* STRIGO_ASSESSMENTS */, JSON.stringify(strigoAssessments)); + return strigoAssessments; + } catch (error) { + LoggerInstance.error("Init assessments storage error", { error }); + return null; + } + } + function setupAssessmentStorage(initialStorage) { + try { + const strigoAssessments = initialStorage ? { assessments: [...initialStorage] } : { assessments: [] }; + window["localStorage" /* LOCAL_STORAGE */].setItem("strigoAssessments" /* STRIGO_ASSESSMENTS */, JSON.stringify(strigoAssessments)); + return strigoAssessments; + } catch (error) { + LoggerInstance.error("Assessments storage setup error", { error }); + return null; + } + } + function clearAssessmentStorage() { + try { + window["localStorage" /* LOCAL_STORAGE */].removeItem("strigoAssessments" /* STRIGO_ASSESSMENTS */); + } catch (error) { + LoggerInstance.error("Clear assessments storage error", { error }); + } + } + + // src/modules/assessment-recorder/assessment-recorder.ts + var import_html2canvas = __toESM(require_html2canvas(), 1); + // src/modules/document/document.ts function getHostingAppWindow() { return window.top; @@ -11415,123 +11567,6 @@ ${JSON.stringify(parsedContext)}` : ""); wrapper.style.setProperty("--customizable-hat-text-color", primaryTextAccent === "dark" /* DARK */ ? "#000000" : "#FFFFFF"); } - // src/modules/assessment-recorder/assessment-recorder.types.ts - var ASSESSMENT_RECORDER_ID_PARAM = "strigoAssessmentUuid"; - var ASSESSMENT_RECORDER_PARAM = "strigoAssessmentRecorder"; - - // src/modules/url/url.ts - var STRIGO_CHILD_IFRAME_PARAM = "strigoChildIframe"; - function paramsToObject(entries) { - const result = {}; - for (const [key, value] of entries) { - result[key] = value; - } - return result; - } - function extractUrlParams(search) { - const urlParams = new URLSearchParams(search); - const entries = urlParams.entries(); - return paramsToObject(entries); - } - function getUrlData() { - const { host, pathname, href, origin, search } = window.location; - return { - host, - pathName: pathname, - href, - origin, - search, - params: extractUrlParams(search) - }; - } - function generateStrigoIframeURL(config) { - const { subDomain, user, webApiKey } = config; - const strigoUrl = new URL(`${window.Strigo.isDevelopment() ? LOCAL_STRIGO_URL : `https://${subDomain}.${BASE_STRIGO_URL}`}/academy/courses`); - strigoUrl.searchParams.set("token", user.token.token); - strigoUrl.searchParams.set("webApiKey", webApiKey); - return strigoUrl.toString(); - } - function generateStrigoChildIframeURL(url) { - const currentUrl = new URL(url); - currentUrl.searchParams.set(STRIGO_CHILD_IFRAME_PARAM, "true"); - return currentUrl.toString(); - } - function isStrigoChildIframe() { - return window.location.search.includes(STRIGO_CHILD_IFRAME_PARAM); - } - function removeStrigoChildIframeParam() { - const url = new URL(window.location.href); - const searchParams = new URLSearchParams(url.search); - searchParams.delete(STRIGO_CHILD_IFRAME_PARAM); - url.search = searchParams.toString(); - window.history.replaceState(window.history.state, "", url); - } - function extractInitScriptParams() { - const initScript = document.getElementById(INIT_SCRIPT_ID); - return { - webApiKey: initScript?.getAttribute("data-web-api-key") || "", - subDomain: initScript?.getAttribute("data-subdomain") || "", - selectedWidgetFlavor: initScript?.getAttribute("data-layout-flavor") || "dynamic" /* DYNAMIC */ - }; - } - function generateCssURL(version) { - if (window.Strigo.isDevelopment()) { - return `${"http://local.strigo.io:7005"}/styles/strigo.css`; - } - if (version) { - return `${CDN_BASE_PATH}@${version}/dist/production/styles/strigo.min.css`; - } - return `${CDN_BASE_PATH}@master/dist/production/styles/strigo.min.css`; - } - function generateWidgetCssURL(version) { - if (window.Strigo.isDevelopment()) { - return `${"http://local.strigo.io:7005"}/styles/strigo-widget.css`; - } - if (version) { - return `${CDN_BASE_PATH}@${version}/dist/production/styles/strigo-widget.min.css`; - } - return `${CDN_BASE_PATH}@master/dist/production/styles/strigo-widget.min.css`; - } - function generateAcademyHatCssURL(version) { - if (window.Strigo.isDevelopment()) { - return `${"http://local.strigo.io:7005"}/styles/strigo-academy-hat.css`; - } - if (version) { - return `${CDN_BASE_PATH}@${version}/dist/production/styles/strigo-academy-hat.min.css`; - } - return `${CDN_BASE_PATH}@master/dist/production/styles/strigo-academy-hat.min.css`; - } - function generateRecorderCssURL(version) { - if (window.Strigo.isDevelopment()) { - return `${"http://local.strigo.io:7005"}/styles/strigo-assessment-recorder.css`; - } - if (version) { - return `${CDN_BASE_PATH}@${version}/dist/production/styles/strigo-assessment-recorder.min.css`; - } - return `${CDN_BASE_PATH}@${DEFAULT_ASSESSMENT_RECORDER_CSS_VERSION}/dist/production/styles/strigo-assessment-recorder.min.css`; - } - function generateAssessmentRecorderURL() { - return window.Strigo.isDevelopment() ? "http://local.strigo.io:7015" : ASSESSMENT_RECORDER_URL; - } - function isRecordingUrlParamExists() { - const { search } = window.location; - const urlParams = extractUrlParams(search); - return ASSESSMENT_RECORDER_PARAM in urlParams; - } - function getURLWithoutStrigoRecorderParams(url) { - const capturedElementUrl = new URL(url); - const searchParams = new URLSearchParams(capturedElementUrl.search); - searchParams.delete(ASSESSMENT_RECORDER_ID_PARAM); - searchParams.delete(ASSESSMENT_RECORDER_PARAM); - capturedElementUrl.search = searchParams.toString(); - return capturedElementUrl.toString(); - } - function getStrigoPreviewUserTokenFromURL() { - const { search } = window.location; - const urlParams = extractUrlParams(search); - return urlParams[STRIGO_PREVIEW_USER_TOKEN_PARAM] || null; - } - // src/modules/element-selector/element-profiler.js function getElementProfiler() { var Limit; @@ -12084,15 +12119,9 @@ ${JSON.stringify(parsedContext)}` : ""); } // src/modules/assessment-recorder/assessment-recorder.ts - function isRecordingMode() { - if (isRecordingUrlParamExists() || window.sessionStorage.getItem("isStrigoRecordingMode")) { - return true; - } - return false; - } function onElementProfileCreation(elementProfile, elementType) { - const { nodeTree, recordedElementInfo } = elementProfile; const recorederIframe = document.getElementById("strigo-assessment-recorder-iframe"); + const { nodeTree } = elementProfile; const elementSelector = getElementSelector(nodeTree); (0, import_html2canvas.default)(document.querySelector(elementSelector), { backgroundColor: "#c6c7e7" }).then((canvas) => { const selectedElement = { @@ -12125,9 +12154,6 @@ ${JSON.stringify(parsedContext)}` : ""); }), "*"); } function addAssessmentRecorderIframe() { - window.sessionStorage.setItem("isStrigoRecordingMode", "true"); - const assessmentUuid = new URL(window.location.href).searchParams.get(ASSESSMENT_RECORDER_ID_PARAM); - window.sessionStorage.setItem(ASSESSMENT_RECORDER_ID_PARAM, assessmentUuid); if (document.getElementById("strigo-assessment-recorder-iframe")) { return; } @@ -12168,8 +12194,8 @@ ${JSON.stringify(parsedContext)}` : ""); break; } case "submit-assessment" /* SUBMIT_ASSESSMENT */: { + debugger; const recorderWindowId = window.sessionStorage.getItem(ASSESSMENT_RECORDER_ID_PARAM); - window.sessionStorage.removeItem("isStrigoRecordingMode"); const urlToSave = getURLWithoutStrigoRecorderParams(window.location.href); window.opener.postMessage({ assessment: { @@ -12182,7 +12208,6 @@ ${JSON.stringify(parsedContext)}` : ""); break; } case "cancel-assessment" /* CANCEL_ASSESSMENT */: { - window.sessionStorage.removeItem("isStrigoRecordingMode"); window.close(); break; } @@ -12193,48 +12218,6 @@ ${JSON.stringify(parsedContext)}` : ""); }, false); } - // src/modules/assessments-storage/assessments-storage.ts - function getAssessmentsStorageData() { - try { - return JSON.parse(window["localStorage" /* LOCAL_STORAGE */].getItem("strigoAssessments" /* STRIGO_ASSESSMENTS */)); - } catch (error) { - LoggerInstance.error("Get assessments storage error", { error }); - return null; - } - } - function initAssessmentStorage() { - try { - const currentAssessmentsStorage = getAssessmentsStorageData(); - if (currentAssessmentsStorage) { - LoggerInstance.debug("Assessments storage already exists"); - return currentAssessmentsStorage; - } - const strigoAssessments = { assessments: [] }; - window["localStorage" /* LOCAL_STORAGE */].setItem("strigoAssessments" /* STRIGO_ASSESSMENTS */, JSON.stringify(strigoAssessments)); - return strigoAssessments; - } catch (error) { - LoggerInstance.error("Init assessments storage error", { error }); - return null; - } - } - function setupAssessmentStorage(initialStorage) { - try { - const strigoAssessments = initialStorage ? { assessments: [...initialStorage] } : { assessments: [] }; - window["localStorage" /* LOCAL_STORAGE */].setItem("strigoAssessments" /* STRIGO_ASSESSMENTS */, JSON.stringify(strigoAssessments)); - return strigoAssessments; - } catch (error) { - LoggerInstance.error("Assessments storage setup error", { error }); - return null; - } - } - function clearAssessmentStorage() { - try { - window["localStorage" /* LOCAL_STORAGE */].removeItem("strigoAssessments" /* STRIGO_ASSESSMENTS */); - } catch (error) { - LoggerInstance.error("Clear assessments storage error", { error }); - } - } - // node_modules/split.js/dist/split.es.js var global2 = typeof window !== "undefined" ? window : null; var ssr = global2 === null; @@ -12726,7 +12709,7 @@ ${JSON.stringify(parsedContext)}` : ""); const capturedElementChildNodeNames = Array.from(capturedElement.childNodes).map(({ nodeName }) => nodeName.toLowerCase()); const recordedElementChildNodeNames = recordedElementInfo.internalStructure?.map(({ nodeName }) => nodeName.toLowerCase()); const internalStructureSimilarity = import_string_similarity.default.compareTwoStrings(capturedElementChildNodeNames.join(""), recordedElementChildNodeNames.join("")); - LoggerInstance.info("*** Internal structure similarity ratio:", internalStructureSimilarity); + LoggerInstance.info("*** Internal structure similarity ratio:", { internalStructureSimilarity }); return internalStructureSimilarity; } function getTextSimilarityRating(recordedElementInfo, capturedElement) { @@ -12737,7 +12720,7 @@ ${JSON.stringify(parsedContext)}` : ""); return accTextArray; }, []).join(""); const textSimilarity = import_string_similarity.default.compareTwoStrings(recordedElementInfo.directInnerText, capturedElementDirectInnerText); - LoggerInstance.info("*** Text similarity ratio: ", textSimilarity); + LoggerInstance.info("*** Text similarity ratio: ", { textSimilarity }); return textSimilarity; } function getSimilarityRating(recordedElementInfo, capturedElement) { @@ -12758,7 +12741,7 @@ ${JSON.stringify(parsedContext)}` : ""); return avgSimilarityRating; } function isSimilar(recordedElementInfo, capturedElement) { - LoggerInstance.info("*** elementInfo", recordedElementInfo); + LoggerInstance.info("*** elementInfo", { recordedElementInfo }); const similarityRating = getSimilarityRating(recordedElementInfo, capturedElement); if (similarityRating < getLocalStorageConfig()?.assessmentThresholds?.totalSimilarityThreshold) { return false; @@ -12841,9 +12824,11 @@ ${JSON.stringify(parsedContext)}` : ""); } const { _id } = assessment; const exampleElements = document.querySelectorAll(exampleElementSelector) || []; - LoggerInstance.info("*** Example elements found:", exampleElements); + LoggerInstance.info("*** Example elements found:", { exampleElements }); const exampleElementsInsideTheLocationElement = Array.from(exampleElements).filter((exampleElement) => locationElement.contains(exampleElement)); - LoggerInstance.info("*** Example elements that are inside the location element:", exampleElementsInsideTheLocationElement); + LoggerInstance.info("*** Example elements that are inside the location element:", { + exampleElementsInsideTheLocationElement + }); const currentExampleElementCount = exampleElementsInsideTheLocationElement?.length || 0; const previousAssessmentStorageState = window.sessionStorage.getItem(_id); const parsedPreviousAssessmentStorageState = previousAssessmentStorageState ? JSON.parse(previousAssessmentStorageState) : {}; @@ -12911,7 +12896,7 @@ ${JSON.stringify(parsedContext)}` : ""); const cachedLocationElement = assessmentState[assessmentId]?.locationElement; const isLocationElementStillOnDOM = window.document.contains(cachedLocationElement); if (cachedLocationElement && isLocationElementStillOnDOM) { - LoggerInstance.info("*** Got a cached location element...", cachedLocationElement); + LoggerInstance.info("*** Got a cached location element...", { cachedLocationElement }); locationElement = cachedLocationElement; locationElementSelector = assessmentState[assessmentId]?.locationElementSelector; } else { @@ -12920,7 +12905,7 @@ ${JSON.stringify(parsedContext)}` : ""); if (!locationElementSelector) { throw new Error("*** No location element selector was found fitting."); } - LoggerInstance.info("*** Retrieving location element by selector:", locationElementSelector); + LoggerInstance.info("*** Retrieving location element by selector:", { locationElementSelector }); locationElement = window.document.querySelector(locationElementSelector); LoggerInstance.info("*** Found location element:", { locationElement, @@ -12963,7 +12948,7 @@ ${JSON.stringify(parsedContext)}` : ""); var addAssessmentDebugUI = function(locationElementToDebug, locationElementSelector, assessment) { const previousDebugAssessmentContextElement = window.document.getElementById(`${assessment._id}-context-overlay`); if (previousDebugAssessmentContextElement) { - LoggerInstance.info("*** Already got an existing debug element for this assessment.", assessment); + LoggerInstance.info("*** Already got an existing debug element for this assessment.", { assessment }); return; } locationElementToDebug.style.border = "2px dashed #696CBF"; @@ -13055,9 +13040,9 @@ ${JSON.stringify(parsedContext)}` : ""); boundedAssessAddedItems([]); locationHandlers[_id].observer.observe(locationElement, exampleElementCountObserverOptions); LoggerInstance.info("Same reference - no need to observe again"); - LoggerInstance.info(" *** Same reference - no need to observe again", locationElement); + LoggerInstance.info(" *** Same reference - no need to observe again", { locationElement }); } catch (e) { - LoggerInstance.info("*** Got an error in item count", e); + LoggerInstance.error("*** Got an error in item count", { err: e }); break; } break; @@ -13067,9 +13052,9 @@ ${JSON.stringify(parsedContext)}` : ""); boundedAssessAddedItems([]); locationHandlers[_id].observer.observe(locationElement, exampleElementCountObserverOptions); LoggerInstance.info("DOM Reference have changed - observing again"); - LoggerInstance.info(" *** DOM Reference have changed - observing again", locationElement); + LoggerInstance.info(" *** DOM Reference have changed - observing again", { locationElement }); } catch (e) { - LoggerInstance.info("*** Got an error in item count", e); + LoggerInstance.error("*** Got an error in item count", { err: e }); break; } break; @@ -13302,17 +13287,18 @@ ${JSON.stringify(parsedContext)}` : ""); url: generateAcademyHatCssURL(version) }); const localConfig = getLocalStorageConfig(); - const urlStrigoUserToken = sessionStorage.getItem("strigoPreviewUserToken"); + const strigoPreviewUserToken = sessionStorage.getItem("strigoPreviewUserToken"); + const isPreview = !!strigoPreviewUserToken; const academyPlayerFrame = createWidget(generateStrigoIframeURL({ ...localConfig, user: { token: { - token: urlStrigoUserToken ? urlStrigoUserToken : localConfig.user.token.token, + token: strigoPreviewUserToken ? strigoPreviewUserToken : localConfig.user.token.token, expiration: localConfig.user.token.expiration }, email: localConfig.user.email } - })); + }, isPreview)); const hostingAppWindow = getHostingAppWindow(); this.initEventListeners(hostingAppWindow, academyPlayerFrame); LoggerInstance.info("adding assessment document observer"); @@ -13546,7 +13532,7 @@ ${JSON.stringify(parsedContext)}` : ""); this.config = {}; } isDevelopment() { - return true; + return false; } init() { try { @@ -13555,11 +13541,6 @@ ${JSON.stringify(parsedContext)}` : ""); LoggerInstance.info("SDK was already initialized"); return; } - const strigoPreviewUserToken = getStrigoPreviewUserTokenFromURL(); - if (strigoPreviewUserToken) { - LoggerInstance.info("strigoPreviewUserToken found - SDK will be initialized with token"); - sessionStorage.setItem("strigoPreviewUserToken", strigoPreviewUserToken); - } initAssessmentStorage(); const { webApiKey, subDomain, selectedWidgetFlavor } = extractInitScriptParams(); if (!webApiKey || !subDomain || !selectedWidgetFlavor) { @@ -13572,7 +13553,16 @@ ${JSON.stringify(parsedContext)}` : ""); this.config.initialized = true; LoggerInstance.info("Initialized SDK."); if (this.config.sdkType !== "CHILD" /* CHILD */ && shouldPanelBeOpen()) { - this.setup(); + const persistedToken = getLocalStorageConfig()?.user?.token; + const strigoPreviewUserToken = sessionStorage.getItem("strigoPreviewUserToken"); + const setupData = strigoPreviewUserToken ? { + token: { + token: strigoPreviewUserToken, + expiration: `${Date.now() + 1e3 * 60 * 60 * 24}` + }, + isPreview: true + } : { token: persistedToken }; + this.setup(setupData); } } catch (err) { LoggerInstance.error("Could not initialize SDK", { err }); @@ -13596,7 +13586,8 @@ ${JSON.stringify(parsedContext)}` : ""); token, version, openWidget: openWidget2 = true, - dockingSide = "right" /* RIGHT */ + dockingSide = "right" /* RIGHT */, + isPreview } = { ...config.user, ...config, ...data }; if (!email || !token) { throw new Error("Setup data is missing"); @@ -13621,18 +13612,20 @@ ${JSON.stringify(parsedContext)}` : ""); setupUrlTriggers(configuration.urlTriggers); } } - setupLocalStorageConfig({ - user: { - email, - token - }, - initSite: getUrlData(), - version, - loggingConfig: configuration?.loggingConfig, - assessmentThresholds: configuration?.assessmentThresholds, - isAcademyAssessmentDebug: configuration?.isAcademyAssessmentDebug, - dockingSide - }); + if (!isPreview) { + setupLocalStorageConfig({ + user: { + email, + token + }, + initSite: getUrlData(), + version, + loggingConfig: configuration?.loggingConfig, + assessmentThresholds: configuration?.assessmentThresholds, + isAcademyAssessmentDebug: configuration?.isAcademyAssessmentDebug, + dockingSide + }); + } this.config.configured = true; LoggerInstance.info("Finished SDK setup."); if (openWidget2) { @@ -13742,12 +13735,7 @@ ${JSON.stringify(parsedContext)}` : ""); // src/strigo.sdk.ts window.Strigo = Strigo; - if (isRecordingMode()) { - LoggerInstance.info("Strigo recorder mode"); - window.Strigo.assessmentRecorder(); - } else { - window.Strigo.init(); - } + window.Strigo.init(); })(); /*! * html2canvas 1.4.1 diff --git a/dist/production/strigo.sdk.min.js b/dist/production/strigo.sdk.min.js index cd430d9..467534a 100644 --- a/dist/production/strigo.sdk.min.js +++ b/dist/production/strigo.sdk.min.js @@ -1,18 +1,18 @@ -(()=>{var Kg=Object.create;var Ta=Object.defineProperty;var Mg=Object.getOwnPropertyDescriptor;var Rg=Object.getOwnPropertyNames;var _g=Object.getPrototypeOf,Pg=Object.prototype.hasOwnProperty;var Ng=h=>Ta(h,"__esModule",{value:!0});var Xi=(h,p)=>()=>(p||h((p={exports:{}}).exports,p),p.exports);var Gg=(h,p,U,b)=>{if(p&&typeof p=="object"||typeof p=="function")for(let E of Rg(p))!Pg.call(h,E)&&(U||E!=="default")&&Ta(h,E,{get:()=>p[E],enumerable:!(b=Mg(p,E))||b.enumerable});return h},Eo=(h,p)=>Gg(Ng(Ta(h!=null?Kg(_g(h)):{},"default",!p&&h&&h.__esModule?{get:()=>h.default,enumerable:!0}:{value:h,enumerable:!0})),h);var Al=Xi((La,Oa)=>{(function(h,p){typeof La=="object"&&typeof Oa!="undefined"?Oa.exports=p():typeof define=="function"&&define.amd?define(p):(h=typeof globalThis!="undefined"?globalThis:h||self,h.html2canvas=p())})(La,function(){"use strict";var h=function(r,e){return h=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(o,n){o.__proto__=n}||function(o,n){for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(o[a]=n[a])},h(r,e)};function p(r,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");h(r,e);function o(){this.constructor=r}r.prototype=e===null?Object.create(e):(o.prototype=e.prototype,new o)}var U=function(){return U=Object.assign||function(e){for(var o,n=1,a=arguments.length;n0&&l[l.length-1])&&(F[0]===6||F[0]===2)){o=0;continue}if(F[0]===3&&(!l||F[1]>l[0]&&F[1]=55296&&a<=56319&&o>10)+55296,B%1024+56320)),(a+1===o||n.length>16384)&&(l+=String.fromCharCode.apply(String,n),n.length=0)}return l},_A="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",xA=typeof Uint8Array=="undefined"?[]:new Uint8Array(256),BA=0;BA<_A.length;BA++)xA[_A.charCodeAt(BA)]=BA;for(var ae="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",fA=typeof Uint8Array=="undefined"?[]:new Uint8Array(256),NA=0;NA>4,I[a++]=(B&15)<<4|v>>2,I[a++]=(v&3)<<6|w&63;return F},Ut=function(r){for(var e=r.length,o=[],n=0;n>LA,ye=1<>LA,Yt=WA+yt,AA=Yt,SA=2048>>6,Re=AA+SA,_e=65536>>Ue,K=1<=0){if(e<55296||e>56319&&e<=65535)return o=this.index[e>>LA],o=(o<>LA)],o=(o<>Ue),o=this.index[o],o+=e>>LA&eA,o=this.index[o],o=(o<VA?(a.push(!0),v-=VA):a.push(!1),["normal","auto","loose"].indexOf(e)!==-1&&[8208,8211,12316,12448].indexOf(l)!==-1)return n.push(B),o.push(jt);if(v===oA||v===Pe){if(B===0)return n.push(B),o.push(Ze);var w=o[B-1];return ls.indexOf(w)===-1?(n.push(n[B-1]),o.push(w)):(n.push(B),o.push(Ze))}if(n.push(B),v===as)return o.push(e==="strict"?mr:gt);if(v===Wn||v===kn)return o.push(Ze);if(v===cs)return l>=131072&&l<=196605||l>=196608&&l<=262141?o.push(gt):o.push(Ze);o.push(v)}),[n,o,a]},Yn=function(r,e,o,n){var a=n[o];if(Array.isArray(r)?r.indexOf(a)!==-1:r===a)for(var l=o;l<=n.length;){l++;var B=n[l];if(B===e)return!0;if(B!==YA)break}if(a===YA)for(var l=o;l>0;){l--;var v=n[l];if(Array.isArray(r)?r.indexOf(v)!==-1:r===v)for(var w=o;w<=n.length;){w++;var B=n[w];if(B===e)return!0;if(B!==YA)break}if(v!==YA)break}return!1},jn=function(r,e){for(var o=r;o>=0;){var n=e[o];if(n===YA)o--;else return n}return 0},ko=function(r,e,o,n,a){if(o[n]===0)return pA;var l=n-1;if(Array.isArray(a)&&a[l]===!0)return pA;var B=l-1,v=l+1,w=e[l],F=B>=0?e[B]:0,I=e[v];if(w===D&&I===W)return pA;if(fe.indexOf(w)!==-1)return lA;if(fe.indexOf(I)!==-1||Ur.indexOf(I)!==-1)return pA;if(jn(l,e)===oe)return Bt;if(Jn.get(r[l])===Pe||(w===Ft||w===qr)&&Jn.get(r[v])===Pe||w===cA||I===cA||w===He||[YA,wr,xe].indexOf(w)===-1&&I===He||[je,vr,Zr,ft,ze].indexOf(I)!==-1||jn(l,e)===zt||Yn(Qr,zt,l,e)||Yn([je,vr],mr,l,e)||Yn(_o,_o,l,e))return pA;if(w===YA)return Bt;if(w===Qr||I===Qr)return pA;if(I===jt||w===jt)return Bt;if([wr,xe,mr].indexOf(I)!==-1||w===ss||F===Vn&&qt.indexOf(w)!==-1||w===ze&&I===Vn||I===Gn||$e.indexOf(I)!==-1&&w===he||$e.indexOf(w)!==-1&&I===he||w===Cr&&[gt,Ft,qr].indexOf(I)!==-1||[gt,Ft,qr].indexOf(w)!==-1&&I===Zt||$e.indexOf(w)!==-1&&Po.indexOf(I)!==-1||Po.indexOf(w)!==-1&&$e.indexOf(I)!==-1||[Cr,Zt].indexOf(w)!==-1&&(I===he||[zt,xe].indexOf(I)!==-1&&e[v+1]===he)||[zt,xe].indexOf(w)!==-1&&I===he||w===he&&[he,ze,ft].indexOf(I)!==-1)return pA;if([he,ze,ft,je,vr].indexOf(I)!==-1)for(var S=l;S>=0;){var L=e[S];if(L===he)return pA;if([ze,ft].indexOf(L)!==-1)S--;else break}if([Cr,Zt].indexOf(I)!==-1)for(var S=[je,vr].indexOf(w)!==-1?B:l;S>=0;){var L=e[S];if(L===he)return pA;if([ze,ft].indexOf(L)!==-1)S--;else break}if(Xn===w&&[Xn,we,$r,Te].indexOf(I)!==-1||[we,$r].indexOf(w)!==-1&&[we,Fe].indexOf(I)!==-1||[Fe,Te].indexOf(w)!==-1&&I===Fe||No.indexOf(w)!==-1&&[Gn,Zt].indexOf(I)!==-1||No.indexOf(I)!==-1&&w===Cr||$e.indexOf(w)!==-1&&$e.indexOf(I)!==-1||w===ft&&$e.indexOf(I)!==-1||$e.concat(he).indexOf(w)!==-1&&I===zt&&dt.indexOf(r[v])===-1||$e.concat(he).indexOf(I)!==-1&&w===vr)return pA;if(w===qe&&I===qe){for(var $=o[l],N=1;$>0&&($--,e[$]===qe);)N++;if(N%2!==0)return pA}return w===Ft&&I===qr?pA:Bt},An=function(r,e){e||(e={lineBreak:"normal",wordBreak:"normal"});var o=Go(r,e.lineBreak),n=o[0],a=o[1],l=o[2];(e.wordBreak==="break-all"||e.wordBreak==="break-word")&&(a=a.map(function(v){return[he,Ze,Wn].indexOf(v)!==-1?gt:v}));var B=e.wordBreak==="keep-all"?l.map(function(v,w){return v&&r[w]>=19968&&r[w]<=40959}):void 0;return[n,a,B]},Vo=function(){function r(e,o,n,a){this.codePoints=e,this.required=o===lA,this.start=n,this.end=a}return r.prototype.slice=function(){return X.apply(void 0,this.codePoints.slice(this.start,this.end))},r}(),zn=function(r,e){var o=UA(r),n=An(o,e),a=n[0],l=n[1],B=n[2],v=o.length,w=0,F=0;return{next:function(){if(F>=v)return{done:!0,value:null};for(var I=pA;F=Ar&&r<=57},Ai=function(r){return r>=55296&&r<=57343},pt=function(r){return ie(r)||r>=kA&&r<=$n||r>=qo&&r<=on},Us=function(r){return r>=qo&&r<=Qs},Ao=function(r){return r>=kA&&r<=Ot},ys=function(r){return Us(r)||Ao(r)},Fs=function(r){return r>=vs},At=function(r){return r===en||r===fs||r===gs},sn=function(r){return ys(r)||Fs(r)||r===Sr},$A=function(r){return sn(r)||ie(r)||r===ce},ei=function(r){return r>=OA&&r<=nn||r===PA||r>=zo&&r<=xr||r===Zo},Oe=function(r,e){return r!==Et?!1:e!==en},an=function(r,e,o){return r===ce?sn(e)||Oe(e,o):sn(r)?!0:!!(r===Et&&Oe(r,e))},cn=function(r,e,o){return r===Le||r===ce?ie(e)?!0:e===Hr&&ie(o):ie(r===Hr?e:r)},ti=function(r){var e=0,o=1;(r[e]===Le||r[e]===ce)&&(r[e]===ce&&(o=-1),e++);for(var n=[];ie(r[e]);)n.push(r[e++]);var a=n.length?parseInt(X.apply(void 0,n),10):0;r[e]===Hr&&e++;for(var l=[];ie(r[e]);)l.push(r[e++]);var B=l.length,v=B?parseInt(X.apply(void 0,l),10):0;(r[e]===$o||r[e]===Tr)&&e++;var w=1;(r[e]===Le||r[e]===ce)&&(r[e]===ce&&(w=-1),e++);for(var F=[];ie(r[e]);)F.push(r[e++]);var I=F.length?parseInt(X.apply(void 0,F),10):0;return o*(a+v*Math.pow(10,-B))*Math.pow(10,w*I)},Es={type:2},Lr={type:3},bs={type:4},Or={type:13},ri={type:8},Is={type:21},Dr={type:9},eo={type:10},ln={type:11},Ss={type:12},et={type:14},un={type:23},fn={type:1},Hs={type:25},to={type:24},xs={type:26},gn={type:27},Ts={type:28},ro={type:29},no={type:31},dn={type:32},ni=function(){function r(){this._value=[]}return r.prototype.write=function(e){this._value=this._value.concat(UA(e))},r.prototype.read=function(){for(var e=[],o=this.consumeToken();o!==dn;)e.push(o),o=this.consumeToken();return e},r.prototype.consumeToken=function(){var e=this.consumeCodePoint();switch(e){case bt:return this.consumeStringToken(bt);case $t:var o=this.peekCodePoint(0),n=this.peekCodePoint(1),a=this.peekCodePoint(2);if($A(o)||Oe(n,a)){var l=an(o,n,a)?us:Xo,B=this.consumeName();return{type:5,value:B,flags:l}}break;case ds:if(this.peekCodePoint(0)===br)return this.consumeCodePoint(),Or;break;case Ir:return this.consumeStringToken(Ir);case tn:return Es;case It:return Lr;case Lt:if(this.peekCodePoint(0)===br)return this.consumeCodePoint(),et;break;case Le:if(cn(e,this.peekCodePoint(0),this.peekCodePoint(1)))return this.reconsumeCodePoint(e),this.consumeNumericToken();break;case Zn:return bs;case ce:var v=e,w=this.peekCodePoint(0),F=this.peekCodePoint(1);if(cn(v,w,F))return this.reconsumeCodePoint(e),this.consumeNumericToken();if(an(v,w,F))return this.reconsumeCodePoint(e),this.consumeIdentLikeToken();if(w===ce&&F===Ht)return this.consumeCodePoint(),this.consumeCodePoint(),to;break;case Hr:if(cn(e,this.peekCodePoint(0),this.peekCodePoint(1)))return this.reconsumeCodePoint(e),this.consumeNumericToken();break;case Er:if(this.peekCodePoint(0)===Lt)for(this.consumeCodePoint();;){var I=this.consumeCodePoint();if(I===Lt&&(I=this.consumeCodePoint(),I===Er))return this.consumeToken();if(I===Ne)return this.consumeToken()}break;case ms:return xs;case qn:return gn;case St:if(this.peekCodePoint(0)===ps&&this.peekCodePoint(1)===ce&&this.peekCodePoint(2)===ce)return this.consumeCodePoint(),this.consumeCodePoint(),Hs;break;case Wo:var S=this.peekCodePoint(0),L=this.peekCodePoint(1),$=this.peekCodePoint(2);if(an(S,L,$)){var B=this.consumeName();return{type:7,value:B}}break;case Jo:return Ts;case Et:if(Oe(e,this.peekCodePoint(0)))return this.reconsumeCodePoint(e),this.consumeIdentLikeToken();break;case hs:return ro;case xt:if(this.peekCodePoint(0)===br)return this.consumeCodePoint(),ri;break;case ws:return ln;case Yo:return Ss;case ve:case Cs:var N=this.peekCodePoint(0),z=this.peekCodePoint(1);return N===Le&&(pt(z)||z===Tt)&&(this.consumeCodePoint(),this.consumeUnicodeRangeToken()),this.reconsumeCodePoint(e),this.consumeIdentLikeToken();case te:if(this.peekCodePoint(0)===br)return this.consumeCodePoint(),Dr;if(this.peekCodePoint(0)===te)return this.consumeCodePoint(),Is;break;case rn:if(this.peekCodePoint(0)===br)return this.consumeCodePoint(),eo;break;case Ne:return dn}return At(e)?(this.consumeWhiteSpace(),no):ie(e)?(this.reconsumeCodePoint(e),this.consumeNumericToken()):sn(e)?(this.reconsumeCodePoint(e),this.consumeIdentLikeToken()):{type:6,value:X(e)}},r.prototype.consumeCodePoint=function(){var e=this._value.shift();return typeof e=="undefined"?-1:e},r.prototype.reconsumeCodePoint=function(e){this._value.unshift(e)},r.prototype.peekCodePoint=function(e){return e>=this._value.length?-1:this._value[e]},r.prototype.consumeUnicodeRangeToken=function(){for(var e=[],o=this.consumeCodePoint();pt(o)&&e.length<6;)e.push(o),o=this.consumeCodePoint();for(var n=!1;o===Tt&&e.length<6;)e.push(o),o=this.consumeCodePoint(),n=!0;if(n){var a=parseInt(X.apply(void 0,e.map(function(w){return w===Tt?Ar:w})),16),l=parseInt(X.apply(void 0,e.map(function(w){return w===Tt?$n:w})),16);return{type:30,start:a,end:l}}var B=parseInt(X.apply(void 0,e),16);if(this.peekCodePoint(0)===ce&&pt(this.peekCodePoint(1))){this.consumeCodePoint(),o=this.consumeCodePoint();for(var v=[];pt(o)&&v.length<6;)v.push(o),o=this.consumeCodePoint();var l=parseInt(X.apply(void 0,v),16);return{type:30,start:B,end:l}}else return{type:30,start:B,end:B}},r.prototype.consumeIdentLikeToken=function(){var e=this.consumeName();return e.toLowerCase()==="url"&&this.peekCodePoint(0)===tn?(this.consumeCodePoint(),this.consumeUrlToken()):this.peekCodePoint(0)===tn?(this.consumeCodePoint(),{type:19,value:e}):{type:20,value:e}},r.prototype.consumeUrlToken=function(){var e=[];if(this.consumeWhiteSpace(),this.peekCodePoint(0)===Ne)return{type:22,value:""};var o=this.peekCodePoint(0);if(o===Ir||o===bt){var n=this.consumeStringToken(this.consumeCodePoint());return n.type===0&&(this.consumeWhiteSpace(),this.peekCodePoint(0)===Ne||this.peekCodePoint(0)===It)?(this.consumeCodePoint(),{type:22,value:n.value}):(this.consumeBadUrlRemnants(),un)}for(;;){var a=this.consumeCodePoint();if(a===Ne||a===It)return{type:22,value:X.apply(void 0,e)};if(At(a))return this.consumeWhiteSpace(),this.peekCodePoint(0)===Ne||this.peekCodePoint(0)===It?(this.consumeCodePoint(),{type:22,value:X.apply(void 0,e)}):(this.consumeBadUrlRemnants(),un);if(a===bt||a===Ir||a===tn||ei(a))return this.consumeBadUrlRemnants(),un;if(a===Et)if(Oe(a,this.peekCodePoint(0)))e.push(this.consumeEscapedCodePoint());else return this.consumeBadUrlRemnants(),un;else e.push(a)}},r.prototype.consumeWhiteSpace=function(){for(;At(this.peekCodePoint(0));)this.consumeCodePoint()},r.prototype.consumeBadUrlRemnants=function(){for(;;){var e=this.consumeCodePoint();if(e===It||e===Ne)return;Oe(e,this.peekCodePoint(0))&&this.consumeEscapedCodePoint()}},r.prototype.consumeStringSlice=function(e){for(var o=5e4,n="";e>0;){var a=Math.min(o,e);n+=X.apply(void 0,this._value.splice(0,a)),e-=a}return this._value.shift(),n},r.prototype.consumeStringToken=function(e){var o="",n=0;do{var a=this._value[n];if(a===Ne||a===void 0||a===e)return o+=this.consumeStringSlice(n),{type:0,value:o};if(a===en)return this._value.splice(0,n),fn;if(a===Et){var l=this._value[n+1];l!==Ne&&l!==void 0&&(l===en?(o+=this.consumeStringSlice(n),n=-1,this._value.shift()):Oe(a,l)&&(o+=this.consumeStringSlice(n),o+=X(this.consumeEscapedCodePoint()),n=-1))}n++}while(!0)},r.prototype.consumeNumber=function(){var e=[],o=yr,n=this.peekCodePoint(0);for((n===Le||n===ce)&&e.push(this.consumeCodePoint());ie(this.peekCodePoint(0));)e.push(this.consumeCodePoint());n=this.peekCodePoint(0);var a=this.peekCodePoint(1);if(n===Hr&&ie(a))for(e.push(this.consumeCodePoint(),this.consumeCodePoint()),o=Fr;ie(this.peekCodePoint(0));)e.push(this.consumeCodePoint());n=this.peekCodePoint(0),a=this.peekCodePoint(1);var l=this.peekCodePoint(2);if((n===$o||n===Tr)&&((a===Le||a===ce)&&ie(l)||ie(a)))for(e.push(this.consumeCodePoint(),this.consumeCodePoint()),o=Fr;ie(this.peekCodePoint(0));)e.push(this.consumeCodePoint());return[ti(e),o]},r.prototype.consumeNumericToken=function(){var e=this.consumeNumber(),o=e[0],n=e[1],a=this.peekCodePoint(0),l=this.peekCodePoint(1),B=this.peekCodePoint(2);if(an(a,l,B)){var v=this.consumeName();return{type:15,number:o,flags:n,unit:v}}return a===Bs?(this.consumeCodePoint(),{type:16,number:o,flags:n}):{type:17,number:o,flags:n}},r.prototype.consumeEscapedCodePoint=function(){var e=this.consumeCodePoint();if(pt(e)){for(var o=X(e);pt(this.peekCodePoint(0))&&o.length<6;)o+=X(this.consumeCodePoint());At(this.peekCodePoint(0))&&this.consumeCodePoint();var n=parseInt(o,16);return n===0||Ai(n)||n>1114111?jo:n}return e===Ne?jo:e},r.prototype.consumeName=function(){for(var e="";;){var o=this.consumeCodePoint();if($A(o))e+=X(o);else if(Oe(o,this.peekCodePoint(0)))e+=X(this.consumeEscapedCodePoint());else return this.reconsumeCodePoint(o),e}},r}(),er=function(){function r(e){this._tokens=e}return r.create=function(e){var o=new ni;return o.write(e),new r(o.read())},r.parseValue=function(e){return r.create(e).parseComponentValue()},r.parseValues=function(e){return r.create(e).parseComponentValues()},r.prototype.parseComponentValue=function(){for(var e=this.consumeToken();e.type===31;)e=this.consumeToken();if(e.type===32)throw new SyntaxError("Error parsing CSS component value, unexpected EOF");this.reconsumeToken(e);var o=this.consumeComponentValue();do e=this.consumeToken();while(e.type===31);if(e.type===32)return o;throw new SyntaxError("Error parsing CSS component value, multiple values found when expecting only one")},r.prototype.parseComponentValues=function(){for(var e=[];;){var o=this.consumeComponentValue();if(o.type===32)return e;e.push(o),e.push()}},r.prototype.consumeComponentValue=function(){var e=this.consumeToken();switch(e.type){case 11:case 28:case 2:return this.consumeSimpleBlock(e.type);case 19:return this.consumeFunction(e)}return e},r.prototype.consumeSimpleBlock=function(e){for(var o={type:e,values:[]},n=this.consumeToken();;){if(n.type===32||ii(n,e))return o;this.reconsumeToken(n),o.values.push(this.consumeComponentValue()),n=this.consumeToken()}},r.prototype.consumeFunction=function(e){for(var o={name:e.value,values:[],type:18};;){var n=this.consumeToken();if(n.type===32||n.type===3)return o;this.reconsumeToken(n),o.values.push(this.consumeComponentValue())}},r.prototype.consumeToken=function(){var e=this._tokens.shift();return typeof e=="undefined"?dn:e},r.prototype.reconsumeToken=function(e){this._tokens.unshift(e)},r}(),Kr=function(r){return r.type===15},tt=function(r){return r.type===17},bA=function(r){return r.type===20},oi=function(r){return r.type===0},oo=function(r,e){return bA(r)&&r.value===e},Mr=function(r){return r.type!==31},ht=function(r){return r.type!==31&&r.type!==4},De=function(r){var e=[],o=[];return r.forEach(function(n){if(n.type===4){if(o.length===0)throw new Error("Error parsing function args, zero tokens for arg");e.push(o),o=[];return}n.type!==31&&o.push(n)}),o.length&&e.push(o),e},ii=function(r,e){return e===11&&r.type===12||e===28&&r.type===29?!0:e===2&&r.type===3},wt=function(r){return r.type===17||r.type===15},qA=function(r){return r.type===16||wt(r)},Bn=function(r){return r.length>1?[r[0],r[1]]:[r[0]]},se={type:17,number:0,flags:yr},tr={type:16,number:50,flags:yr},Ge={type:16,number:100,flags:yr},rr=function(r,e,o){var n=r[0],a=r[1];return[DA(n,e),DA(typeof a!="undefined"?a:n,o)]},DA=function(r,e){if(r.type===16)return r.number/100*e;if(Kr(r))switch(r.unit){case"rem":case"em":return 16*r.number;case"px":default:return r.number}return r.number},pn="deg",si="grad",ai="rad",nr="turn",or={name:"angle",parse:function(r,e){if(e.type===15)switch(e.unit){case pn:return Math.PI*e.number/180;case si:return Math.PI/200*e.number;case ai:return e.number;case nr:return Math.PI*2*e.number}throw new Error("Unsupported angle type")}},ir=function(r){return r.type===15&&(r.unit===pn||r.unit===si||r.unit===ai||r.unit===nr)},ci=function(r){var e=r.filter(bA).map(function(o){return o.value}).join(" ");switch(e){case"to bottom right":case"to right bottom":case"left top":case"top left":return[se,se];case"to top":case"bottom":return me(0);case"to bottom left":case"to left bottom":case"right top":case"top right":return[se,Ge];case"to right":case"left":return me(90);case"to top left":case"to left top":case"right bottom":case"bottom right":return[Ge,Ge];case"to bottom":case"top":return me(180);case"to top right":case"to right top":case"left bottom":case"bottom left":return[Ge,se];case"to left":case"right":return me(270)}return 0},me=function(r){return Math.PI*r/180},vt={name:"color",parse:function(r,e){if(e.type===18){var o=li[e.name];if(typeof o=="undefined")throw new Error('Attempting to parse an unsupported color function "'+e.name+'"');return o(r,e.values)}if(e.type===5){if(e.value.length===3){var n=e.value.substring(0,1),a=e.value.substring(1,2),l=e.value.substring(2,3);return rt(parseInt(n+n,16),parseInt(a+a,16),parseInt(l+l,16),1)}if(e.value.length===4){var n=e.value.substring(0,1),a=e.value.substring(1,2),l=e.value.substring(2,3),B=e.value.substring(3,4);return rt(parseInt(n+n,16),parseInt(a+a,16),parseInt(l+l,16),parseInt(B+B,16)/255)}if(e.value.length===6){var n=e.value.substring(0,2),a=e.value.substring(2,4),l=e.value.substring(4,6);return rt(parseInt(n,16),parseInt(a,16),parseInt(l,16),1)}if(e.value.length===8){var n=e.value.substring(0,2),a=e.value.substring(2,4),l=e.value.substring(4,6),B=e.value.substring(6,8);return rt(parseInt(n,16),parseInt(a,16),parseInt(l,16),parseInt(B,16)/255)}}if(e.type===20){var v=KA[e.value.toUpperCase()];if(typeof v!="undefined")return v}return KA.TRANSPARENT}},ge=function(r){return(255&r)===0},Ae=function(r){var e=255&r,o=255&r>>8,n=255&r>>16,a=255&r>>24;return e<255?"rgba("+a+","+n+","+o+","+e/255+")":"rgb("+a+","+n+","+o+")"},rt=function(r,e,o,n){return(r<<24|e<<16|o<<8|Math.round(n*255)<<0)>>>0},io=function(r,e){if(r.type===17)return r.number;if(r.type===16){var o=e===3?1:255;return e===3?r.number/100*o:Math.round(r.number/100*o)}return 0},re=function(r,e){var o=e.filter(ht);if(o.length===3){var n=o.map(io),a=n[0],l=n[1],B=n[2];return rt(a,l,B,1)}if(o.length===4){var v=o.map(io),a=v[0],l=v[1],B=v[2],w=v[3];return rt(a,l,B,w)}return 0};function so(r,e,o){return o<0&&(o+=1),o>=1&&(o-=1),o<1/6?(e-r)*o*6+r:o<1/2?e:o<2/3?(e-r)*6*(2/3-o)+r:r}var ao=function(r,e){var o=e.filter(ht),n=o[0],a=o[1],l=o[2],B=o[3],v=(n.type===17?me(n.number):or.parse(r,n))/(Math.PI*2),w=qA(a)?a.number/100:0,F=qA(l)?l.number/100:0,I=typeof B!="undefined"&&qA(B)?DA(B,1):1;if(w===0)return rt(F*255,F*255,F*255,1);var S=F<=.5?F*(w+1):F+w-F*w,L=F*2-S,$=so(L,S,v+1/3),N=so(L,S,v),z=so(L,S,v-1/3);return rt($*255,N*255,z*255,I)},li={hsl:ao,hsla:ao,rgb:re,rgba:re},Dt=function(r,e){return vt.parse(r,er.create(e).parseComponentValue())},KA={ALICEBLUE:4042850303,ANTIQUEWHITE:4209760255,AQUA:16777215,AQUAMARINE:2147472639,AZURE:4043309055,BEIGE:4126530815,BISQUE:4293182719,BLACK:255,BLANCHEDALMOND:4293643775,BLUE:65535,BLUEVIOLET:2318131967,BROWN:2771004159,BURLYWOOD:3736635391,CADETBLUE:1604231423,CHARTREUSE:2147418367,CHOCOLATE:3530104575,CORAL:4286533887,CORNFLOWERBLUE:1687547391,CORNSILK:4294499583,CRIMSON:3692313855,CYAN:16777215,DARKBLUE:35839,DARKCYAN:9145343,DARKGOLDENROD:3095837695,DARKGRAY:2846468607,DARKGREEN:6553855,DARKGREY:2846468607,DARKKHAKI:3182914559,DARKMAGENTA:2332068863,DARKOLIVEGREEN:1433087999,DARKORANGE:4287365375,DARKORCHID:2570243327,DARKRED:2332033279,DARKSALMON:3918953215,DARKSEAGREEN:2411499519,DARKSLATEBLUE:1211993087,DARKSLATEGRAY:793726975,DARKSLATEGREY:793726975,DARKTURQUOISE:13554175,DARKVIOLET:2483082239,DEEPPINK:4279538687,DEEPSKYBLUE:12582911,DIMGRAY:1768516095,DIMGREY:1768516095,DODGERBLUE:512819199,FIREBRICK:2988581631,FLORALWHITE:4294635775,FORESTGREEN:579543807,FUCHSIA:4278255615,GAINSBORO:3705462015,GHOSTWHITE:4177068031,GOLD:4292280575,GOLDENROD:3668254975,GRAY:2155905279,GREEN:8388863,GREENYELLOW:2919182335,GREY:2155905279,HONEYDEW:4043305215,HOTPINK:4285117695,INDIANRED:3445382399,INDIGO:1258324735,IVORY:4294963455,KHAKI:4041641215,LAVENDER:3873897215,LAVENDERBLUSH:4293981695,LAWNGREEN:2096890111,LEMONCHIFFON:4294626815,LIGHTBLUE:2916673279,LIGHTCORAL:4034953471,LIGHTCYAN:3774873599,LIGHTGOLDENRODYELLOW:4210742015,LIGHTGRAY:3553874943,LIGHTGREEN:2431553791,LIGHTGREY:3553874943,LIGHTPINK:4290167295,LIGHTSALMON:4288707327,LIGHTSEAGREEN:548580095,LIGHTSKYBLUE:2278488831,LIGHTSLATEGRAY:2005441023,LIGHTSLATEGREY:2005441023,LIGHTSTEELBLUE:2965692159,LIGHTYELLOW:4294959359,LIME:16711935,LIMEGREEN:852308735,LINEN:4210091775,MAGENTA:4278255615,MAROON:2147483903,MEDIUMAQUAMARINE:1724754687,MEDIUMBLUE:52735,MEDIUMORCHID:3126187007,MEDIUMPURPLE:2473647103,MEDIUMSEAGREEN:1018393087,MEDIUMSLATEBLUE:2070474495,MEDIUMSPRINGGREEN:16423679,MEDIUMTURQUOISE:1221709055,MEDIUMVIOLETRED:3340076543,MIDNIGHTBLUE:421097727,MINTCREAM:4127193855,MISTYROSE:4293190143,MOCCASIN:4293178879,NAVAJOWHITE:4292783615,NAVY:33023,OLDLACE:4260751103,OLIVE:2155872511,OLIVEDRAB:1804477439,ORANGE:4289003775,ORANGERED:4282712319,ORCHID:3664828159,PALEGOLDENROD:4008225535,PALEGREEN:2566625535,PALETURQUOISE:2951671551,PALEVIOLETRED:3681588223,PAPAYAWHIP:4293907967,PEACHPUFF:4292524543,PERU:3448061951,PINK:4290825215,PLUM:3718307327,POWDERBLUE:2967529215,PURPLE:2147516671,REBECCAPURPLE:1714657791,RED:4278190335,ROSYBROWN:3163525119,ROYALBLUE:1097458175,SADDLEBROWN:2336560127,SALMON:4202722047,SANDYBROWN:4104413439,SEAGREEN:780883967,SEASHELL:4294307583,SIENNA:2689740287,SILVER:3233857791,SKYBLUE:2278484991,SLATEBLUE:1784335871,SLATEGRAY:1887473919,SLATEGREY:1887473919,SNOW:4294638335,SPRINGGREEN:16744447,STEELBLUE:1182971135,TAN:3535047935,TEAL:8421631,THISTLE:3636451583,TOMATO:4284696575,TRANSPARENT:0,TURQUOISE:1088475391,VIOLET:4001558271,WHEAT:4125012991,WHITE:4294967295,WHITESMOKE:4126537215,YELLOW:4294902015,YELLOWGREEN:2597139199},Ls={name:"background-clip",initialValue:"border-box",prefix:!1,type:1,parse:function(r,e){return e.map(function(o){if(bA(o))switch(o.value){case"padding-box":return 1;case"content-box":return 2}return 0})}},ui={name:"background-color",initialValue:"transparent",prefix:!1,type:3,format:"color"},hn=function(r,e){var o=vt.parse(r,e[0]),n=e[1];return n&&qA(n)?{color:o,stop:n}:{color:o,stop:null}},fi=function(r,e){var o=r[0],n=r[r.length-1];o.stop===null&&(o.stop=se),n.stop===null&&(n.stop=Ge);for(var a=[],l=0,B=0;Bl?a.push(w):a.push(l),l=w}else a.push(null)}for(var F=null,B=0;BB.optimumDistance)?{optimumCorner:v,optimumDistance:I}:B},{optimumDistance:a?1/0:-1/0,optimumCorner:null}).optimumCorner},gi=function(r,e,o,n,a){var l=0,B=0;switch(r.size){case 0:r.shape===0?l=B=Math.min(Math.abs(e),Math.abs(e-n),Math.abs(o),Math.abs(o-a)):r.shape===1&&(l=Math.min(Math.abs(e),Math.abs(e-n)),B=Math.min(Math.abs(o),Math.abs(o-a)));break;case 2:if(r.shape===0)l=B=Math.min(Qe(e,o),Qe(e,o-a),Qe(e-n,o),Qe(e-n,o-a));else if(r.shape===1){var v=Math.min(Math.abs(o),Math.abs(o-a))/Math.min(Math.abs(e),Math.abs(e-n)),w=co(n,a,e,o,!0),F=w[0],I=w[1];l=Qe(F-e,(I-o)/v),B=v*l}break;case 1:r.shape===0?l=B=Math.max(Math.abs(e),Math.abs(e-n),Math.abs(o),Math.abs(o-a)):r.shape===1&&(l=Math.max(Math.abs(e),Math.abs(e-n)),B=Math.max(Math.abs(o),Math.abs(o-a)));break;case 3:if(r.shape===0)l=B=Math.max(Qe(e,o),Qe(e,o-a),Qe(e-n,o),Qe(e-n,o-a));else if(r.shape===1){var v=Math.max(Math.abs(o),Math.abs(o-a))/Math.max(Math.abs(e),Math.abs(e-n)),S=co(n,a,e,o,!1),F=S[0],I=S[1];l=Qe(F-e,(I-o)/v),B=v*l}break}return Array.isArray(r.size)&&(l=DA(r.size[0],n),B=r.size.length===2?DA(r.size[1],a):l),[l,B]},Rr=function(r,e){var o=me(180),n=[];return De(e).forEach(function(a,l){if(l===0){var B=a[0];if(B.type===20&&B.value==="to"){o=ci(a);return}else if(ir(B)){o=or.parse(r,B);return}}var v=hn(r,a);n.push(v)}),{angle:o,stops:n,type:1}},Kt=function(r,e){var o=me(180),n=[];return De(e).forEach(function(a,l){if(l===0){var B=a[0];if(B.type===20&&["top","left","right","bottom"].indexOf(B.value)!==-1){o=ci(a);return}else if(ir(B)){o=(or.parse(r,B)+me(270))%me(360);return}}var v=hn(r,a);n.push(v)}),{angle:o,stops:n,type:1}},Os=function(r,e){var o=me(180),n=[],a=1,l=0,B=3,v=[];return De(e).forEach(function(w,F){var I=w[0];if(F===0){if(bA(I)&&I.value==="linear"){a=1;return}else if(bA(I)&&I.value==="radial"){a=2;return}}if(I.type===18){if(I.name==="from"){var S=vt.parse(r,I.values[0]);n.push({stop:se,color:S})}else if(I.name==="to"){var S=vt.parse(r,I.values[0]);n.push({stop:Ge,color:S})}else if(I.name==="color-stop"){var L=I.values.filter(ht);if(L.length===2){var S=vt.parse(r,L[1]),$=L[0];tt($)&&n.push({stop:{type:16,number:$.number*100,flags:$.flags},color:S})}}}}),a===1?{angle:(o+me(180))%me(360),stops:n,type:a}:{size:B,shape:l,stops:n,position:v,type:a}},di="closest-side",Mt="farthest-side",lo="closest-corner",mn="farthest-corner",Bi="circle",uo="ellipse",pi="cover",hi="contain",Ds=function(r,e){var o=0,n=3,a=[],l=[];return De(e).forEach(function(B,v){var w=!0;if(v===0){var F=!1;w=B.reduce(function(S,L){if(F)if(bA(L))switch(L.value){case"center":return l.push(tr),S;case"top":case"left":return l.push(se),S;case"right":case"bottom":return l.push(Ge),S}else(qA(L)||wt(L))&&l.push(L);else if(bA(L))switch(L.value){case Bi:return o=0,!1;case uo:return o=1,!1;case"at":return F=!0,!1;case di:return n=0,!1;case pi:case Mt:return n=1,!1;case hi:case lo:return n=2,!1;case mn:return n=3,!1}else if(wt(L)||qA(L))return Array.isArray(n)||(n=[]),n.push(L),!1;return S},w)}if(w){var I=hn(r,B);a.push(I)}}),{size:n,shape:o,stops:a,position:l,type:2}},ke=function(r,e){var o=0,n=3,a=[],l=[];return De(e).forEach(function(B,v){var w=!0;if(v===0?w=B.reduce(function(I,S){if(bA(S))switch(S.value){case"center":return l.push(tr),!1;case"top":case"left":return l.push(se),!1;case"right":case"bottom":return l.push(Ge),!1}else if(qA(S)||wt(S))return l.push(S),!1;return I},w):v===1&&(w=B.reduce(function(I,S){if(bA(S))switch(S.value){case Bi:return o=0,!1;case uo:return o=1,!1;case hi:case di:return n=0,!1;case Mt:return n=1,!1;case lo:return n=2,!1;case pi:case mn:return n=3,!1}else if(wt(S)||qA(S))return Array.isArray(n)||(n=[]),n.push(S),!1;return I},w)),w){var F=hn(r,B);a.push(F)}}),{size:n,shape:o,stops:a,position:l,type:2}},wi=function(r){return r.type===1},Ks=function(r){return r.type===2},_r={name:"image",parse:function(r,e){if(e.type===22){var o={url:e.value,type:0};return r.cache.addImage(e.value),o}if(e.type===18){var n=Qn[e.name];if(typeof n=="undefined")throw new Error('Attempting to parse an unsupported image function "'+e.name+'"');return n(r,e.values)}throw new Error("Unsupported image type "+e.type)}};function de(r){return!(r.type===20&&r.value==="none")&&(r.type!==18||!!Qn[r.name])}var Qn={"linear-gradient":Rr,"-moz-linear-gradient":Kt,"-ms-linear-gradient":Kt,"-o-linear-gradient":Kt,"-webkit-linear-gradient":Kt,"radial-gradient":Ds,"-moz-radial-gradient":ke,"-ms-radial-gradient":ke,"-o-radial-gradient":ke,"-webkit-radial-gradient":ke,"-webkit-gradient":Os},vi={name:"background-image",initialValue:"none",type:1,prefix:!1,parse:function(r,e){if(e.length===0)return[];var o=e[0];return o.type===20&&o.value==="none"?[]:e.filter(function(n){return ht(n)&&de(n)}).map(function(n){return _r.parse(r,n)})}},Ms={name:"background-origin",initialValue:"border-box",prefix:!1,type:1,parse:function(r,e){return e.map(function(o){if(bA(o))switch(o.value){case"padding-box":return 1;case"content-box":return 2}return 0})}},Ve={name:"background-position",initialValue:"0% 0%",type:1,prefix:!1,parse:function(r,e){return De(e).map(function(o){return o.filter(qA)}).map(Bn)}},mi={name:"background-repeat",initialValue:"repeat",prefix:!1,type:1,parse:function(r,e){return De(e).map(function(o){return o.filter(bA).map(function(n){return n.value}).join(" ")}).map(Qi)}},Qi=function(r){switch(r){case"no-repeat":return 1;case"repeat-x":case"repeat no-repeat":return 2;case"repeat-y":case"no-repeat repeat":return 3;case"repeat":default:return 0}},Rt;(function(r){r.AUTO="auto",r.CONTAIN="contain",r.COVER="cover"})(Rt||(Rt={}));var Ci={name:"background-size",initialValue:"0",prefix:!1,type:1,parse:function(r,e){return De(e).map(function(o){return o.filter(Rs)})}},Rs=function(r){return bA(r)||qA(r)},nt=function(r){return{name:"border-"+r+"-color",initialValue:"transparent",prefix:!1,type:3,format:"color"}},_s=nt("top"),Ui=nt("right"),Ps=nt("bottom"),sr=nt("left"),Cn=function(r){return{name:"border-radius-"+r,initialValue:"0 0",prefix:!1,type:1,parse:function(e,o){return Bn(o.filter(qA))}}},Ns=Cn("top-left"),yi=Cn("top-right"),Gs=Cn("bottom-right"),fo=Cn("bottom-left"),Ke=function(r){return{name:"border-"+r+"-style",initialValue:"solid",prefix:!1,type:2,parse:function(e,o){switch(o){case"none":return 0;case"dashed":return 2;case"dotted":return 3;case"double":return 4}return 1}}},Fi=Ke("top"),ks=Ke("right"),ot=Ke("bottom"),Ei=Ke("left"),Pr=function(r){return{name:"border-"+r+"-width",initialValue:"0",type:0,prefix:!1,parse:function(e,o){return Kr(o)?o.number:0}}},Vs=Pr("top"),ar=Pr("right"),bi=Pr("bottom"),Xs=Pr("left"),go={name:"color",initialValue:"transparent",prefix:!1,type:3,format:"color"},Bo={name:"direction",initialValue:"ltr",prefix:!1,type:2,parse:function(r,e){switch(e){case"rtl":return 1;case"ltr":default:return 0}}},cr={name:"display",initialValue:"inline-block",prefix:!1,type:1,parse:function(r,e){return e.filter(bA).reduce(function(o,n){return o|Ws(n.value)},0)}},Ws=function(r){switch(r){case"block":case"-webkit-box":return 2;case"inline":return 4;case"run-in":return 8;case"flow":return 16;case"flow-root":return 32;case"table":return 64;case"flex":case"-webkit-flex":return 128;case"grid":case"-ms-grid":return 256;case"ruby":return 512;case"subgrid":return 1024;case"list-item":return 2048;case"table-row-group":return 4096;case"table-header-group":return 8192;case"table-footer-group":return 16384;case"table-row":return 32768;case"table-cell":return 65536;case"table-column-group":return 131072;case"table-column":return 262144;case"table-caption":return 524288;case"ruby-base":return 1048576;case"ruby-text":return 2097152;case"ruby-base-container":return 4194304;case"ruby-text-container":return 8388608;case"contents":return 16777216;case"inline-block":return 33554432;case"inline-list-item":return 67108864;case"inline-table":return 134217728;case"inline-flex":return 268435456;case"inline-grid":return 536870912}return 0},Un={name:"float",initialValue:"none",prefix:!1,type:2,parse:function(r,e){switch(e){case"left":return 1;case"right":return 2;case"inline-start":return 3;case"inline-end":return 4}return 0}},Js={name:"letter-spacing",initialValue:"0",prefix:!1,type:0,parse:function(r,e){return e.type===20&&e.value==="normal"?0:e.type===17||e.type===15?e.number:0}},yn;(function(r){r.NORMAL="normal",r.STRICT="strict"})(yn||(yn={}));var _t={name:"line-break",initialValue:"normal",prefix:!1,type:2,parse:function(r,e){switch(e){case"strict":return yn.STRICT;case"normal":default:return yn.NORMAL}}},po={name:"line-height",initialValue:"normal",prefix:!1,type:4},Ii=function(r,e){return bA(r)&&r.value==="normal"?1.2*e:r.type===17?e*r.number:qA(r)?DA(r,e):e},ho={name:"list-style-image",initialValue:"none",type:0,prefix:!1,parse:function(r,e){return e.type===20&&e.value==="none"?null:_r.parse(r,e)}},Ys={name:"list-style-position",initialValue:"outside",prefix:!1,type:2,parse:function(r,e){switch(e){case"inside":return 0;case"outside":default:return 1}}},Nr={name:"list-style-type",initialValue:"none",prefix:!1,type:2,parse:function(r,e){switch(e){case"disc":return 0;case"circle":return 1;case"square":return 2;case"decimal":return 3;case"cjk-decimal":return 4;case"decimal-leading-zero":return 5;case"lower-roman":return 6;case"upper-roman":return 7;case"lower-greek":return 8;case"lower-alpha":return 9;case"upper-alpha":return 10;case"arabic-indic":return 11;case"armenian":return 12;case"bengali":return 13;case"cambodian":return 14;case"cjk-earthly-branch":return 15;case"cjk-heavenly-stem":return 16;case"cjk-ideographic":return 17;case"devanagari":return 18;case"ethiopic-numeric":return 19;case"georgian":return 20;case"gujarati":return 21;case"gurmukhi":return 22;case"hebrew":return 22;case"hiragana":return 23;case"hiragana-iroha":return 24;case"japanese-formal":return 25;case"japanese-informal":return 26;case"kannada":return 27;case"katakana":return 28;case"katakana-iroha":return 29;case"khmer":return 30;case"korean-hangul-formal":return 31;case"korean-hanja-formal":return 32;case"korean-hanja-informal":return 33;case"lao":return 34;case"lower-armenian":return 35;case"malayalam":return 36;case"mongolian":return 37;case"myanmar":return 38;case"oriya":return 39;case"persian":return 40;case"simp-chinese-formal":return 41;case"simp-chinese-informal":return 42;case"tamil":return 43;case"telugu":return 44;case"thai":return 45;case"tibetan":return 46;case"trad-chinese-formal":return 47;case"trad-chinese-informal":return 48;case"upper-armenian":return 49;case"disclosure-open":return 50;case"disclosure-closed":return 51;case"none":default:return-1}}},Pt=function(r){return{name:"margin-"+r,initialValue:"0",prefix:!1,type:4}},js=Pt("top"),Gr=Pt("right"),Fn=Pt("bottom"),mt=Pt("left"),Si={name:"overflow",initialValue:"visible",prefix:!1,type:1,parse:function(r,e){return e.filter(bA).map(function(o){switch(o.value){case"hidden":return 1;case"scroll":return 2;case"clip":return 3;case"auto":return 4;case"visible":default:return 0}})}},wo={name:"overflow-wrap",initialValue:"normal",prefix:!1,type:2,parse:function(r,e){switch(e){case"break-word":return"break-word";case"normal":default:return"normal"}}},En=function(r){return{name:"padding-"+r,initialValue:"0",prefix:!1,type:3,format:"length-percentage"}},bn=En("top"),zs=En("right"),Zs=En("bottom"),qs=En("left"),In={name:"text-align",initialValue:"left",prefix:!1,type:2,parse:function(r,e){switch(e){case"right":return 2;case"center":case"justify":return 1;case"left":default:return 0}}},$s={name:"position",initialValue:"static",prefix:!1,type:2,parse:function(r,e){switch(e){case"relative":return 1;case"absolute":return 2;case"fixed":return 3;case"sticky":return 4}return 0}},Aa={name:"text-shadow",initialValue:"none",type:1,prefix:!1,parse:function(r,e){return e.length===1&&oo(e[0],"none")?[]:De(e).map(function(o){for(var n={color:KA.TRANSPARENT,offsetX:se,offsetY:se,blur:se},a=0,l=0;l1?1:0],this.overflowWrap=M(e,wo,o.overflowWrap),this.paddingTop=M(e,bn,o.paddingTop),this.paddingRight=M(e,zs,o.paddingRight),this.paddingBottom=M(e,Zs,o.paddingBottom),this.paddingLeft=M(e,qs,o.paddingLeft),this.paintOrder=M(e,_,o.paintOrder),this.position=M(e,$s,o.position),this.textAlign=M(e,In,o.textAlign),this.textDecorationColor=M(e,A,(n=o.textDecorationColor)!==null&&n!==void 0?n:o.color),this.textDecorationLine=M(e,t,(a=o.textDecorationLine)!==null&&a!==void 0?a:o.textDecoration),this.textShadow=M(e,Aa,o.textShadow),this.textTransform=M(e,ea,o.textTransform),this.transform=M(e,Sn,o.transform),this.transformOrigin=M(e,oa,o.transformOrigin),this.visibility=M(e,Ee,o.visibility),this.webkitTextStrokeColor=M(e,J,o.webkitTextStrokeColor),this.webkitTextStrokeWidth=M(e,P,o.webkitTextStrokeWidth),this.wordBreak=M(e,ia,o.wordBreak),this.zIndex=M(e,Gt,o.zIndex)}return r.prototype.isVisible=function(){return this.display>0&&this.opacity>0&&this.visibility===0},r.prototype.isTransparent=function(){return ge(this.backgroundColor)},r.prototype.isTransformed=function(){return this.transform!==null},r.prototype.isPositioned=function(){return this.position!==0},r.prototype.isPositionedWithZIndex=function(){return this.isPositioned()&&!this.zIndex.auto},r.prototype.isFloating=function(){return this.float!==0},r.prototype.isInlineLevel=function(){return u(this.display,4)||u(this.display,33554432)||u(this.display,268435456)||u(this.display,536870912)||u(this.display,67108864)||u(this.display,134217728)},r}(),sA=function(){function r(e,o){this.content=M(e,g,o.content),this.quotes=M(e,x,o.quotes)}return r}(),dA=function(){function r(e,o){this.counterIncrement=M(e,m,o.counterIncrement),this.counterReset=M(e,Q,o.counterReset)}return r}(),M=function(r,e,o){var n=new ni,a=o!==null&&typeof o!="undefined"?o.toString():e.initialValue;n.write(a);var l=new er(n.read());switch(e.type){case 2:var B=l.parseComponentValue();return e.parse(r,bA(B)?B.value:e.initialValue);case 0:return e.parse(r,l.parseComponentValue());case 1:return e.parse(r,l.parseComponentValues());case 4:return l.parseComponentValue();case 3:switch(e.format){case"angle":return or.parse(r,l.parseComponentValue());case"color":return vt.parse(r,l.parseComponentValue());case"image":return _r.parse(r,l.parseComponentValue());case"length":var v=l.parseComponentValue();return wt(v)?v:se;case"length-percentage":var w=l.parseComponentValue();return qA(w)?w:se;case"time":return Hn.parse(r,l.parseComponentValue())}break}},MA="data-html2canvas-debug",QA=function(r){var e=r.getAttribute(MA);switch(e){case"all":return 1;case"clone":return 2;case"parse":return 3;case"render":return 4;default:return 0}},HA=function(r,e){var o=QA(r);return o===1||e===o},jA=function(){function r(e,o){if(this.context=e,this.textNodes=[],this.elements=[],this.flags=0,HA(o,3))debugger;this.styles=new rA(e,window.getComputedStyle(o,null)),Qa(o)&&(this.styles.animationDuration.some(function(n){return n>0})&&(o.style.animationDuration="0s"),this.styles.transform!==null&&(o.style.transform="none")),this.bounds=j(this.context,o),HA(o,4)&&(this.flags|=16)}return r}(),it="AAAAAAAAAAAAEA4AGBkAAFAaAAACAAAAAAAIABAAGAAwADgACAAQAAgAEAAIABAACAAQAAgAEAAIABAACAAQAAgAEAAIABAAQABIAEQATAAIABAACAAQAAgAEAAIABAAVABcAAgAEAAIABAACAAQAGAAaABwAHgAgACIAI4AlgAIABAAmwCjAKgAsAC2AL4AvQDFAMoA0gBPAVYBWgEIAAgACACMANoAYgFkAWwBdAF8AX0BhQGNAZUBlgGeAaMBlQGWAasBswF8AbsBwwF0AcsBYwHTAQgA2wG/AOMBdAF8AekB8QF0AfkB+wHiAHQBfAEIAAMC5gQIAAsCEgIIAAgAFgIeAggAIgIpAggAMQI5AkACygEIAAgASAJQAlgCYAIIAAgACAAKBQoFCgUTBRMFGQUrBSsFCAAIAAgACAAIAAgACAAIAAgACABdAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACABoAmgCrwGvAQgAbgJ2AggAHgEIAAgACADnAXsCCAAIAAgAgwIIAAgACAAIAAgACACKAggAkQKZAggAPADJAAgAoQKkAqwCsgK6AsICCADJAggA0AIIAAgACAAIANYC3gIIAAgACAAIAAgACABAAOYCCAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAkASoB+QIEAAgACAA8AEMCCABCBQgACABJBVAFCAAIAAgACAAIAAgACAAIAAgACABTBVoFCAAIAFoFCABfBWUFCAAIAAgACAAIAAgAbQUIAAgACAAIAAgACABzBXsFfQWFBYoFigWKBZEFigWKBYoFmAWfBaYFrgWxBbkFCAAIAAgACAAIAAgACAAIAAgACAAIAMEFCAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAMgFCADQBQgACAAIAAgACAAIAAgACAAIAAgACAAIAO4CCAAIAAgAiQAIAAgACABAAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAD0AggACAD8AggACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIANYFCAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIA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4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFIQUoBSwFCAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACABtAwgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACABMAEwACAAIAAgACAAIABgACAAIAAgACAC/AAgACAAyAQgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACACAAIAAwAAgACAAIAAgACAAIAAgACAAIAAAARABIAAgACAAIABQASAAIAAgAIABwAEAAjgCIABsAqAC2AL0AigDQAtwC+IJI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QGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAfAKAAuZA64AtwCJALoC6ADwAAgAuACgA/oEpgO6AqsD+AAIAAgAswMIAAgACAAIAIkAuwP5AfsBwwPLAwgACAAIAAgACADRA9kDCAAIAOED6QMIAAgACAAIAAgACADuA/YDCAAIAP4DyQAIAAgABgQIAAgAXQAOBAgACAAIAAgACAAIABMECAAIAAgACAAIAAgACAD8AAQBCAAIAAgAGgQiBCoECAExBAgAEAEIAAgACAAIAAgACAAIAAgACAAIAAgACAA4BAgACABABEYECAAIAAgATAQYAQgAVAQIAAgACAAIAAgACAAIAAgACAAIAFoECAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgAOQEIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAB+BAcACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAEABhgSMBAgACAAIAAgAlAQIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAwAEAAQABAADAAMAAwADAAQABAAEAAQABAAEAAQABHATAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgAdQMIAAgACAAIAAgACAAIAMkACAAIAAgAfQMIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACACFA4kDCAAIAAgACAAIAOcBCAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAIcDCAAIAAgACAAIAAgACAAIAAgACAAIAJEDCAAIAAgACADFAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACABgBAgAZgQIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgAbAQCBXIECAAIAHkECAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACABAAJwEQACjBKoEsgQIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAC6BMIECAAIAAgACAAIAAgACABmBAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgAxwQIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAGYECAAIAAgAzgQIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgAigWKBYoFigWKBYoFigWKBd0FXwUIAOIF6gXxBYoF3gT5BQAGCAaKBYoFigWKBYoFigWKBYoFigWKBYoFigXWBIoFigWKBYoFigWKBYoFigWKBYsFEAaKBYoFigWKBYoFigWKBRQGCACKBYoFigWKBQgACAAIANEECAAIABgGigUgBggAJgYIAC4GMwaKBYoF0wQ3Bj4GigWKBYoFigWKBYoFigWKBYoFigWKBYoFigUIAAgACAAIAAgACAAIAAgAigWKBYoFigWKBYoFigWKBYoFigWKBYoFigWKBYoFigWKBYoFigWKBYoFigWKBYoFigWKBYoFigWKBYoFigWL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AAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4AAAAAAAAAAAA=",xn="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",mo=typeof Uint8Array=="undefined"?[]:new Uint8Array(256),Hi=0;Hi>4,I[a++]=(B&15)<<4|v>>2,I[a++]=(v&3)<<6|w&63;return F},Ku=function(r){for(var e=r.length,o=[],n=0;n>Vr,_u=1<>Vr,Nu=nc+Pu,Gu=Nu,ku=2048>>6,Vu=Gu+ku,Xu=65536>>aa,Wu=1<=0){if(e<55296||e>56319&&e<=65535)return o=this.index[e>>Vr],o=(o<>Vr)],o=(o<>aa),o=this.index[o],o+=e>>Vr&Ju,o=this.index[o],o=(o<=55296&&a<=56319&&o>10)+55296,B%1024+56320)),(a+1===o||n.length>16384)&&(l+=String.fromCharCode.apply(String,n),n.length=0)}return l},tf=ju(it),Xe="\xD7",pa="\xF7",rf=function(r){return tf.get(r)},nf=function(r,e,o){var n=o-2,a=e[n],l=e[o-1],B=e[o];if(l===ua&&B===fa)return Xe;if(l===ua||l===fa||l===sc||B===ua||B===fa||B===sc)return pa;if(l===cc&&[cc,ga,lc,uc].indexOf(B)!==-1||(l===lc||l===ga)&&(B===ga||B===da)||(l===uc||l===da)&&B===da||B===fc||B===ac||B===$u||l===qu)return Xe;if(l===fc&&B===gc){for(;a===ac;)a=e[--n];if(a===gc)return Xe}if(l===Ba&&B===Ba){for(var v=0;a===Ba;)v++,a=e[--n];if(v%2===0)return Xe}return pa},of=function(r){var e=Af(r),o=e.length,n=0,a=0,l=e.map(rf);return{next:function(){if(n>=o)return{done:!0,value:null};for(var B=Xe;nB.x||I.y>B.y;return B=I,F===0?!0:S});return r.body.removeChild(e),v},lf=function(){return typeof new Image().crossOrigin!="undefined"},uf=function(){return typeof new XMLHttpRequest().responseType=="string"},ff=function(r){var e=new Image,o=r.createElement("canvas"),n=o.getContext("2d");if(!n)return!1;e.src="data:image/svg+xml,";try{n.drawImage(e,0,0),o.toDataURL()}catch{return!1}return!0},dc=function(r){return r[0]===0&&r[1]===255&&r[2]===0&&r[3]===255},gf=function(r){var e=r.createElement("canvas"),o=100;e.width=o,e.height=o;var n=e.getContext("2d");if(!n)return Promise.reject(!1);n.fillStyle="rgb(0, 255, 0)",n.fillRect(0,0,o,o);var a=new Image,l=e.toDataURL();a.src=l;var B=ha(o,o,0,0,a);return n.fillStyle="red",n.fillRect(0,0,o,o),Bc(B).then(function(v){n.drawImage(v,0,0);var w=n.getImageData(0,0,o,o).data;n.fillStyle="red",n.fillRect(0,0,o,o);var F=r.createElement("div");return F.style.backgroundImage="url("+l+")",F.style.height=o+"px",dc(w)?Bc(ha(o,o,0,0,F)):Promise.reject(!1)}).then(function(v){return n.drawImage(v,0,0),dc(n.getImageData(0,0,o,o).data)}).catch(function(){return!1})},ha=function(r,e,o,n,a){var l="http://www.w3.org/2000/svg",B=document.createElementNS(l,"svg"),v=document.createElementNS(l,"foreignObject");return B.setAttributeNS(null,"width",r.toString()),B.setAttributeNS(null,"height",e.toString()),v.setAttributeNS(null,"width","100%"),v.setAttributeNS(null,"height","100%"),v.setAttributeNS(null,"x",o.toString()),v.setAttributeNS(null,"y",n.toString()),v.setAttributeNS(null,"externalResourcesRequired","true"),B.appendChild(v),v.appendChild(a),B},Bc=function(r){return new Promise(function(e,o){var n=new Image;n.onload=function(){return e(n)},n.onerror=o,n.src="data:image/svg+xml;charset=utf-8,"+encodeURIComponent(new XMLSerializer().serializeToString(r))})},Be={get SUPPORT_RANGE_BOUNDS(){var r=af(document);return Object.defineProperty(Be,"SUPPORT_RANGE_BOUNDS",{value:r}),r},get SUPPORT_WORD_BREAKING(){var r=Be.SUPPORT_RANGE_BOUNDS&&cf(document);return Object.defineProperty(Be,"SUPPORT_WORD_BREAKING",{value:r}),r},get SUPPORT_SVG_DRAWING(){var r=ff(document);return Object.defineProperty(Be,"SUPPORT_SVG_DRAWING",{value:r}),r},get SUPPORT_FOREIGNOBJECT_DRAWING(){var r=typeof Array.from=="function"&&typeof window.fetch=="function"?gf(document):Promise.resolve(!1);return Object.defineProperty(Be,"SUPPORT_FOREIGNOBJECT_DRAWING",{value:r}),r},get SUPPORT_CORS_IMAGES(){var r=lf();return Object.defineProperty(Be,"SUPPORT_CORS_IMAGES",{value:r}),r},get SUPPORT_RESPONSE_TYPE(){var r=uf();return Object.defineProperty(Be,"SUPPORT_RESPONSE_TYPE",{value:r}),r},get SUPPORT_CORS_XHR(){var r="withCredentials"in new XMLHttpRequest;return Object.defineProperty(Be,"SUPPORT_CORS_XHR",{value:r}),r},get SUPPORT_NATIVE_TEXT_SEGMENTATION(){var r=!!(typeof Intl!="undefined"&&Intl.Segmenter);return Object.defineProperty(Be,"SUPPORT_NATIVE_TEXT_SEGMENTATION",{value:r}),r}},Qo=function(){function r(e,o){this.text=e,this.bounds=o}return r}(),df=function(r,e,o,n){var a=hf(e,o),l=[],B=0;return a.forEach(function(v){if(o.textDecorationLine.length||v.trim().length>0)if(Be.SUPPORT_RANGE_BOUNDS){var w=pc(n,B,v.length).getClientRects();if(w.length>1){var F=wa(v),I=0;F.forEach(function(L){l.push(new Qo(L,R.fromDOMRectList(r,pc(n,I+B,L.length).getClientRects()))),I+=L.length})}else l.push(new Qo(v,R.fromDOMRectList(r,w)))}else{var S=n.splitText(v.length);l.push(new Qo(v,Bf(r,n))),n=S}else Be.SUPPORT_RANGE_BOUNDS||(n=n.splitText(v.length));B+=v.length}),l},Bf=function(r,e){var o=e.ownerDocument;if(o){var n=o.createElement("html2canvaswrapper");n.appendChild(e.cloneNode(!0));var a=e.parentNode;if(a){a.replaceChild(n,e);var l=j(r,n);return n.firstChild&&a.replaceChild(n.firstChild,n),l}}return R.EMPTY},pc=function(r,e,o){var n=r.ownerDocument;if(!n)throw new Error("Node has no owner document");var a=n.createRange();return a.setStart(r,e),a.setEnd(r,e+o),a},wa=function(r){if(Be.SUPPORT_NATIVE_TEXT_SEGMENTATION){var e=new Intl.Segmenter(void 0,{granularity:"grapheme"});return Array.from(e.segment(r)).map(function(o){return o.segment})}return sf(r)},pf=function(r,e){if(Be.SUPPORT_NATIVE_TEXT_SEGMENTATION){var o=new Intl.Segmenter(void 0,{granularity:"word"});return Array.from(o.segment(r)).map(function(n){return n.segment})}return vf(r,e)},hf=function(r,e){return e.letterSpacing!==0?wa(r):pf(r,e)},wf=[32,160,4961,65792,65793,4153,4241],vf=function(r,e){for(var o=zn(r,{lineBreak:e.lineBreak,wordBreak:e.overflowWrap==="break-word"?"break-word":e.wordBreak}),n=[],a,l=function(){if(a.value){var B=a.value.slice(),v=UA(B),w="";v.forEach(function(F){wf.indexOf(F)===-1?w+=X(F):(w.length&&n.push(w),n.push(X(F)),w="")}),w.length&&n.push(w)}};!(a=o.next()).done;)l();return n},mf=function(){function r(e,o,n){this.text=Qf(o.data,n.textTransform),this.textBounds=df(e,this.text,n,o)}return r}(),Qf=function(r,e){switch(e){case 1:return r.toLowerCase();case 3:return r.replace(Cf,Uf);case 2:return r.toUpperCase();default:return r}},Cf=/(^|\s|:|-|\(|\))([a-z])/g,Uf=function(r,e,o){return r.length>0?e+o.toUpperCase():r},hc=function(r){p(e,r);function e(o,n){var a=r.call(this,o,n)||this;return a.src=n.currentSrc||n.src,a.intrinsicWidth=n.naturalWidth,a.intrinsicHeight=n.naturalHeight,a.context.cache.addImage(a.src),a}return e}(jA),wc=function(r){p(e,r);function e(o,n){var a=r.call(this,o,n)||this;return a.canvas=n,a.intrinsicWidth=n.width,a.intrinsicHeight=n.height,a}return e}(jA),vc=function(r){p(e,r);function e(o,n){var a=r.call(this,o,n)||this,l=new XMLSerializer,B=j(o,n);return n.setAttribute("width",B.width+"px"),n.setAttribute("height",B.height+"px"),a.svg="data:image/svg+xml,"+encodeURIComponent(l.serializeToString(n)),a.intrinsicWidth=n.width.baseVal.value,a.intrinsicHeight=n.height.baseVal.value,a.context.cache.addImage(a.svg),a}return e}(jA),mc=function(r){p(e,r);function e(o,n){var a=r.call(this,o,n)||this;return a.value=n.value,a}return e}(jA),va=function(r){p(e,r);function e(o,n){var a=r.call(this,o,n)||this;return a.start=n.start,a.reversed=typeof n.reversed=="boolean"&&n.reversed===!0,a}return e}(jA),yf=[{type:15,flags:0,unit:"px",number:3}],Ff=[{type:16,flags:0,number:50}],Ef=function(r){return r.width>r.height?new R(r.left+(r.width-r.height)/2,r.top,r.height,r.height):r.width0)o.textNodes.push(new mf(r,a,o.styles));else if(Tn(a))if(Lc(a)&&a.assignedNodes)a.assignedNodes().forEach(function(v){return Oi(r,v,o,n)});else{var B=Fc(r,a);B.styles.isVisible()&&(Hf(a,B,n)?B.flags|=4:xf(B.styles)&&(B.flags|=2),Sf.indexOf(a.tagName)!==-1&&(B.flags|=8),o.elements.push(B),a.slot,a.shadowRoot?Oi(r,a.shadowRoot,B,n):!Ki(a)&&!Ic(a)&&!Mi(a)&&Oi(r,a,B,n))}},Fc=function(r,e){return Ua(e)?new hc(r,e):Sc(e)?new wc(r,e):Ic(e)?new vc(r,e):Tf(e)?new mc(r,e):Lf(e)?new va(r,e):Of(e)?new ma(r,e):Mi(e)?new Cc(r,e):Ki(e)?new Uc(r,e):xc(e)?new yc(r,e):new jA(r,e)},Ec=function(r,e){var o=Fc(r,e);return o.flags|=4,Oi(r,e,o,o),o},Hf=function(r,e,o){return e.styles.isPositionedWithZIndex()||e.styles.opacity<1||e.styles.isTransformed()||Ca(r)&&o.styles.isTransparent()},xf=function(r){return r.isPositioned()||r.isFloating()},bc=function(r){return r.nodeType===Node.TEXT_NODE},Tn=function(r){return r.nodeType===Node.ELEMENT_NODE},Qa=function(r){return Tn(r)&&typeof r.style!="undefined"&&!Di(r)},Di=function(r){return typeof r.className=="object"},Tf=function(r){return r.tagName==="LI"},Lf=function(r){return r.tagName==="OL"},Of=function(r){return r.tagName==="INPUT"},Df=function(r){return r.tagName==="HTML"},Ic=function(r){return r.tagName==="svg"},Ca=function(r){return r.tagName==="BODY"},Sc=function(r){return r.tagName==="CANVAS"},Hc=function(r){return r.tagName==="VIDEO"},Ua=function(r){return r.tagName==="IMG"},xc=function(r){return r.tagName==="IFRAME"},Tc=function(r){return r.tagName==="STYLE"},Kf=function(r){return r.tagName==="SCRIPT"},Ki=function(r){return r.tagName==="TEXTAREA"},Mi=function(r){return r.tagName==="SELECT"},Lc=function(r){return r.tagName==="SLOT"},Oc=function(r){return r.tagName.indexOf("-")>0},Mf=function(){function r(){this.counters={}}return r.prototype.getCounterValue=function(e){var o=this.counters[e];return o&&o.length?o[o.length-1]:1},r.prototype.getCounterValues=function(e){var o=this.counters[e];return o||[]},r.prototype.pop=function(e){var o=this;e.forEach(function(n){return o.counters[n].pop()})},r.prototype.parse=function(e){var o=this,n=e.counterIncrement,a=e.counterReset,l=!0;n!==null&&n.forEach(function(v){var w=o.counters[v.counter];w&&v.increment!==0&&(l=!1,w.length||w.push(1),w[Math.max(0,w.length-1)]+=v.increment)});var B=[];return l&&a.forEach(function(v){var w=o.counters[v.counter];B.push(v.counter),w||(w=o.counters[v.counter]=[]),w.push(v.reset)}),B},r}(),Dc={integers:[1e3,900,500,400,100,90,50,40,10,9,5,4,1],values:["M","CM","D","CD","C","XC","L","XL","X","IX","V","IV","I"]},Kc={integers:[9e3,8e3,7e3,6e3,5e3,4e3,3e3,2e3,1e3,900,800,700,600,500,400,300,200,100,90,80,70,60,50,40,30,20,10,9,8,7,6,5,4,3,2,1],values:["\u0554","\u0553","\u0552","\u0551","\u0550","\u054F","\u054E","\u054D","\u054C","\u054B","\u054A","\u0549","\u0548","\u0547","\u0546","\u0545","\u0544","\u0543","\u0542","\u0541","\u0540","\u053F","\u053E","\u053D","\u053C","\u053B","\u053A","\u0539","\u0538","\u0537","\u0536","\u0535","\u0534","\u0533","\u0532","\u0531"]},Rf={integers:[1e4,9e3,8e3,7e3,6e3,5e3,4e3,3e3,2e3,1e3,400,300,200,100,90,80,70,60,50,40,30,20,19,18,17,16,15,10,9,8,7,6,5,4,3,2,1],values:["\u05D9\u05F3","\u05D8\u05F3","\u05D7\u05F3","\u05D6\u05F3","\u05D5\u05F3","\u05D4\u05F3","\u05D3\u05F3","\u05D2\u05F3","\u05D1\u05F3","\u05D0\u05F3","\u05EA","\u05E9","\u05E8","\u05E7","\u05E6","\u05E4","\u05E2","\u05E1","\u05E0","\u05DE","\u05DC","\u05DB","\u05D9\u05D8","\u05D9\u05D7","\u05D9\u05D6","\u05D8\u05D6","\u05D8\u05D5","\u05D9","\u05D8","\u05D7","\u05D6","\u05D5","\u05D4","\u05D3","\u05D2","\u05D1","\u05D0"]},_f={integers:[1e4,9e3,8e3,7e3,6e3,5e3,4e3,3e3,2e3,1e3,900,800,700,600,500,400,300,200,100,90,80,70,60,50,40,30,20,10,9,8,7,6,5,4,3,2,1],values:["\u10F5","\u10F0","\u10EF","\u10F4","\u10EE","\u10ED","\u10EC","\u10EB","\u10EA","\u10E9","\u10E8","\u10E7","\u10E6","\u10E5","\u10E4","\u10F3","\u10E2","\u10E1","\u10E0","\u10DF","\u10DE","\u10DD","\u10F2","\u10DC","\u10DB","\u10DA","\u10D9","\u10D8","\u10D7","\u10F1","\u10D6","\u10D5","\u10D4","\u10D3","\u10D2","\u10D1","\u10D0"]},Ln=function(r,e,o,n,a,l){return ro?Uo(r,a,l.length>0):n.integers.reduce(function(B,v,w){for(;r>=v;)r-=v,B+=n.values[w];return B},"")+l},Mc=function(r,e,o,n){var a="";do o||r--,a=n(r)+a,r/=e;while(r*e>=e);return a},ee=function(r,e,o,n,a){var l=o-e+1;return(r<0?"-":"")+(Mc(Math.abs(r),l,n,function(B){return X(Math.floor(B%l)+e)})+a)},Xr=function(r,e,o){o===void 0&&(o=". ");var n=e.length;return Mc(Math.abs(r),n,!1,function(a){return e[Math.floor(a%n)]})+o},On=1<<0,lr=1<<1,ur=1<<2,Co=1<<3,kt=function(r,e,o,n,a,l){if(r<-9999||r>9999)return Uo(r,4,a.length>0);var B=Math.abs(r),v=a;if(B===0)return e[0]+v;for(var w=0;B>0&&w<=4;w++){var F=B%10;F===0&&u(l,On)&&v!==""?v=e[F]+v:F>1||F===1&&w===0||F===1&&w===1&&u(l,lr)||F===1&&w===1&&u(l,ur)&&r>100||F===1&&w>1&&u(l,Co)?v=e[F]+(w>0?o[w-1]:"")+v:F===1&&w>0&&(v=o[w-1]+v),B=Math.floor(B/10)}return(r<0?n:"")+v},Rc="\u5341\u767E\u5343\u842C",_c="\u62FE\u4F70\u4EDF\u842C",Pc="\u30DE\u30A4\u30CA\u30B9",ya="\uB9C8\uC774\uB108\uC2A4",Uo=function(r,e,o){var n=o?". ":"",a=o?"\u3001":"",l=o?", ":"",B=o?" ":"";switch(e){case 0:return"\u2022"+B;case 1:return"\u25E6"+B;case 2:return"\u25FE"+B;case 5:var v=ee(r,48,57,!0,n);return v.length<4?"0"+v:v;case 4:return Xr(r,"\u3007\u4E00\u4E8C\u4E09\u56DB\u4E94\u516D\u4E03\u516B\u4E5D",a);case 6:return Ln(r,1,3999,Dc,3,n).toLowerCase();case 7:return Ln(r,1,3999,Dc,3,n);case 8:return ee(r,945,969,!1,n);case 9:return ee(r,97,122,!1,n);case 10:return ee(r,65,90,!1,n);case 11:return ee(r,1632,1641,!0,n);case 12:case 49:return Ln(r,1,9999,Kc,3,n);case 35:return Ln(r,1,9999,Kc,3,n).toLowerCase();case 13:return ee(r,2534,2543,!0,n);case 14:case 30:return ee(r,6112,6121,!0,n);case 15:return Xr(r,"\u5B50\u4E11\u5BC5\u536F\u8FB0\u5DF3\u5348\u672A\u7533\u9149\u620C\u4EA5",a);case 16:return Xr(r,"\u7532\u4E59\u4E19\u4E01\u620A\u5DF1\u5E9A\u8F9B\u58EC\u7678",a);case 17:case 48:return kt(r,"\u96F6\u4E00\u4E8C\u4E09\u56DB\u4E94\u516D\u4E03\u516B\u4E5D",Rc,"\u8CA0",a,lr|ur|Co);case 47:return kt(r,"\u96F6\u58F9\u8CB3\u53C3\u8086\u4F0D\u9678\u67D2\u634C\u7396",_c,"\u8CA0",a,On|lr|ur|Co);case 42:return kt(r,"\u96F6\u4E00\u4E8C\u4E09\u56DB\u4E94\u516D\u4E03\u516B\u4E5D",Rc,"\u8D1F",a,lr|ur|Co);case 41:return kt(r,"\u96F6\u58F9\u8D30\u53C1\u8086\u4F0D\u9646\u67D2\u634C\u7396",_c,"\u8D1F",a,On|lr|ur|Co);case 26:return kt(r,"\u3007\u4E00\u4E8C\u4E09\u56DB\u4E94\u516D\u4E03\u516B\u4E5D","\u5341\u767E\u5343\u4E07",Pc,a,0);case 25:return kt(r,"\u96F6\u58F1\u5F10\u53C2\u56DB\u4F0D\u516D\u4E03\u516B\u4E5D","\u62FE\u767E\u5343\u4E07",Pc,a,On|lr|ur);case 31:return kt(r,"\uC601\uC77C\uC774\uC0BC\uC0AC\uC624\uC721\uCE60\uD314\uAD6C","\uC2ED\uBC31\uCC9C\uB9CC",ya,l,On|lr|ur);case 33:return kt(r,"\u96F6\u4E00\u4E8C\u4E09\u56DB\u4E94\u516D\u4E03\u516B\u4E5D","\u5341\u767E\u5343\u842C",ya,l,0);case 32:return kt(r,"\u96F6\u58F9\u8CB3\u53C3\u56DB\u4E94\u516D\u4E03\u516B\u4E5D","\u62FE\u767E\u5343",ya,l,On|lr|ur);case 18:return ee(r,2406,2415,!0,n);case 20:return Ln(r,1,19999,_f,3,n);case 21:return ee(r,2790,2799,!0,n);case 22:return ee(r,2662,2671,!0,n);case 22:return Ln(r,1,10999,Rf,3,n);case 23:return Xr(r,"\u3042\u3044\u3046\u3048\u304A\u304B\u304D\u304F\u3051\u3053\u3055\u3057\u3059\u305B\u305D\u305F\u3061\u3064\u3066\u3068\u306A\u306B\u306C\u306D\u306E\u306F\u3072\u3075\u3078\u307B\u307E\u307F\u3080\u3081\u3082\u3084\u3086\u3088\u3089\u308A\u308B\u308C\u308D\u308F\u3090\u3091\u3092\u3093");case 24:return Xr(r,"\u3044\u308D\u306F\u306B\u307B\u3078\u3068\u3061\u308A\u306C\u308B\u3092\u308F\u304B\u3088\u305F\u308C\u305D\u3064\u306D\u306A\u3089\u3080\u3046\u3090\u306E\u304A\u304F\u3084\u307E\u3051\u3075\u3053\u3048\u3066\u3042\u3055\u304D\u3086\u3081\u307F\u3057\u3091\u3072\u3082\u305B\u3059");case 27:return ee(r,3302,3311,!0,n);case 28:return Xr(r,"\u30A2\u30A4\u30A6\u30A8\u30AA\u30AB\u30AD\u30AF\u30B1\u30B3\u30B5\u30B7\u30B9\u30BB\u30BD\u30BF\u30C1\u30C4\u30C6\u30C8\u30CA\u30CB\u30CC\u30CD\u30CE\u30CF\u30D2\u30D5\u30D8\u30DB\u30DE\u30DF\u30E0\u30E1\u30E2\u30E4\u30E6\u30E8\u30E9\u30EA\u30EB\u30EC\u30ED\u30EF\u30F0\u30F1\u30F2\u30F3",a);case 29:return Xr(r,"\u30A4\u30ED\u30CF\u30CB\u30DB\u30D8\u30C8\u30C1\u30EA\u30CC\u30EB\u30F2\u30EF\u30AB\u30E8\u30BF\u30EC\u30BD\u30C4\u30CD\u30CA\u30E9\u30E0\u30A6\u30F0\u30CE\u30AA\u30AF\u30E4\u30DE\u30B1\u30D5\u30B3\u30A8\u30C6\u30A2\u30B5\u30AD\u30E6\u30E1\u30DF\u30B7\u30F1\u30D2\u30E2\u30BB\u30B9",a);case 34:return ee(r,3792,3801,!0,n);case 37:return ee(r,6160,6169,!0,n);case 38:return ee(r,4160,4169,!0,n);case 39:return ee(r,2918,2927,!0,n);case 40:return ee(r,1776,1785,!0,n);case 43:return ee(r,3046,3055,!0,n);case 44:return ee(r,3174,3183,!0,n);case 45:return ee(r,3664,3673,!0,n);case 46:return ee(r,3872,3881,!0,n);case 3:default:return ee(r,48,57,!0,n)}},Nc="data-html2canvas-ignore",Gc=function(){function r(e,o,n){if(this.context=e,this.options=n,this.scrolledElements=[],this.referenceElement=o,this.counters=new Mf,this.quoteDepth=0,!o.ownerDocument)throw new Error("Cloned element does not have an owner document");this.documentElement=this.cloneNode(o.ownerDocument.documentElement,!1)}return r.prototype.toIFrame=function(e,o){var n=this,a=Pf(e,o);if(!a.contentWindow)return Promise.reject("Unable to find iframe window");var l=e.defaultView.pageXOffset,B=e.defaultView.pageYOffset,v=a.contentWindow,w=v.document,F=kf(a).then(function(){return b(n,void 0,void 0,function(){var I,S;return E(this,function(L){switch(L.label){case 0:return this.scrolledElements.forEach(Jf),v&&(v.scrollTo(o.left,o.top),/(iPad|iPhone|iPod)/g.test(navigator.userAgent)&&(v.scrollY!==o.top||v.scrollX!==o.left)&&(this.context.logger.warn("Unable to restore scroll position for cloned document"),this.context.windowBounds=this.context.windowBounds.add(v.scrollX-o.left,v.scrollY-o.top,0,0))),I=this.options.onclone,S=this.clonedReferenceElement,typeof S=="undefined"?[2,Promise.reject("Error finding the "+this.referenceElement.nodeName+" in the cloned document")]:w.fonts&&w.fonts.ready?[4,w.fonts.ready]:[3,2];case 1:L.sent(),L.label=2;case 2:return/(AppleWebKit)/g.test(navigator.userAgent)?[4,Gf(w)]:[3,4];case 3:L.sent(),L.label=4;case 4:return typeof I=="function"?[2,Promise.resolve().then(function(){return I(w,S)}).then(function(){return a})]:[2,a]}})})});return w.open(),w.write(Xf(document.doctype)+""),Wf(this.referenceElement.ownerDocument,l,B),w.replaceChild(w.adoptNode(this.documentElement),w.documentElement),w.close(),F},r.prototype.createElementClone=function(e){if(HA(e,2))debugger;if(Sc(e))return this.createCanvasClone(e);if(Hc(e))return this.createVideoClone(e);if(Tc(e))return this.createStyleClone(e);var o=e.cloneNode(!1);return Ua(o)&&(Ua(e)&&e.currentSrc&&e.currentSrc!==e.src&&(o.src=e.currentSrc,o.srcset=""),o.loading==="lazy"&&(o.loading="eager")),Oc(o)?this.createCustomElementClone(o):o},r.prototype.createCustomElementClone=function(e){var o=document.createElement("html2canvascustomelement");return Fa(e.style,o),o},r.prototype.createStyleClone=function(e){try{var o=e.sheet;if(o&&o.cssRules){var n=[].slice.call(o.cssRules,0).reduce(function(l,B){return B&&typeof B.cssText=="string"?l+B.cssText:l},""),a=e.cloneNode(!1);return a.textContent=n,a}}catch(l){if(this.context.logger.error("Unable to access cssRules property",l),l.name!=="SecurityError")throw l}return e.cloneNode(!1)},r.prototype.createCanvasClone=function(e){var o;if(this.options.inlineImages&&e.ownerDocument){var n=e.ownerDocument.createElement("img");try{return n.src=e.toDataURL(),n}catch{this.context.logger.info("Unable to inline canvas contents, canvas is tainted",e)}}var a=e.cloneNode(!1);try{a.width=e.width,a.height=e.height;var l=e.getContext("2d"),B=a.getContext("2d");if(B)if(!this.options.allowTaint&&l)B.putImageData(l.getImageData(0,0,e.width,e.height),0,0);else{var v=(o=e.getContext("webgl2"))!==null&&o!==void 0?o:e.getContext("webgl");if(v){var w=v.getContextAttributes();(w==null?void 0:w.preserveDrawingBuffer)===!1&&this.context.logger.warn("Unable to clone WebGL context as it has preserveDrawingBuffer=false",e)}B.drawImage(e,0,0)}return a}catch{this.context.logger.info("Unable to clone canvas as it is tainted",e)}return a},r.prototype.createVideoClone=function(e){var o=e.ownerDocument.createElement("canvas");o.width=e.offsetWidth,o.height=e.offsetHeight;var n=o.getContext("2d");try{return n&&(n.drawImage(e,0,0,o.width,o.height),this.options.allowTaint||n.getImageData(0,0,o.width,o.height)),o}catch{this.context.logger.info("Unable to clone video as it is tainted",e)}var a=e.ownerDocument.createElement("canvas");return a.width=e.offsetWidth,a.height=e.offsetHeight,a},r.prototype.appendChildNode=function(e,o,n){(!Tn(o)||!Kf(o)&&!o.hasAttribute(Nc)&&(typeof this.options.ignoreElements!="function"||!this.options.ignoreElements(o)))&&(!this.options.copyStyles||!Tn(o)||!Tc(o))&&e.appendChild(this.cloneNode(o,n))},r.prototype.cloneChildNodes=function(e,o,n){for(var a=this,l=e.shadowRoot?e.shadowRoot.firstChild:e.firstChild;l;l=l.nextSibling)if(Tn(l)&&Lc(l)&&typeof l.assignedNodes=="function"){var B=l.assignedNodes();B.length&&B.forEach(function(v){return a.appendChildNode(o,v,n)})}else this.appendChildNode(o,l,n)},r.prototype.cloneNode=function(e,o){if(bc(e))return document.createTextNode(e.data);if(!e.ownerDocument)return e.cloneNode(!1);var n=e.ownerDocument.defaultView;if(n&&Tn(e)&&(Qa(e)||Di(e))){var a=this.createElementClone(e);a.style.transitionProperty="none";var l=n.getComputedStyle(e),B=n.getComputedStyle(e,":before"),v=n.getComputedStyle(e,":after");this.referenceElement===e&&Qa(a)&&(this.clonedReferenceElement=a),Ca(a)&&zf(a);var w=this.counters.parse(new dA(this.context,l)),F=this.resolvePseudoContent(e,a,B,yo.BEFORE);Oc(e)&&(o=!0),Hc(e)||this.cloneChildNodes(e,a,o),F&&a.insertBefore(F,a.firstChild);var I=this.resolvePseudoContent(e,a,v,yo.AFTER);return I&&a.appendChild(I),this.counters.pop(w),(l&&(this.options.copyStyles||Di(e))&&!xc(e)||o)&&Fa(l,a),(e.scrollTop!==0||e.scrollLeft!==0)&&this.scrolledElements.push([a,e.scrollLeft,e.scrollTop]),(Ki(e)||Mi(e))&&(Ki(a)||Mi(a))&&(a.value=e.value),a}return e.cloneNode(!1)},r.prototype.resolvePseudoContent=function(e,o,n,a){var l=this;if(!!n){var B=n.content,v=o.ownerDocument;if(!(!v||!B||B==="none"||B==="-moz-alt-content"||n.display==="none")){this.counters.parse(new dA(this.context,n));var w=new sA(this.context,n),F=v.createElement("html2canvaspseudoelement");Fa(n,F),w.content.forEach(function(S){if(S.type===0)F.appendChild(v.createTextNode(S.value));else if(S.type===22){var L=v.createElement("img");L.src=S.value,L.style.opacity="1",F.appendChild(L)}else if(S.type===18){if(S.name==="attr"){var $=S.values.filter(bA);$.length&&F.appendChild(v.createTextNode(e.getAttribute($[0].value)||""))}else if(S.name==="counter"){var N=S.values.filter(ht),z=N[0],hA=N[1];if(z&&bA(z)){var nA=l.counters.getCounterValue(z.value),tA=hA&&bA(hA)?Nr.parse(l.context,hA.value):3;F.appendChild(v.createTextNode(Uo(nA,tA,!1)))}}else if(S.name==="counters"){var IA=S.values.filter(ht),z=IA[0],mA=IA[1],hA=IA[2];if(z&&bA(z)){var uA=l.counters.getCounterValues(z.value),q=hA&&bA(hA)?Nr.parse(l.context,hA.value):3,FA=mA&&mA.type===0?mA.value:"",EA=uA.map(function(be){return Uo(be,q,!1)}).join(FA);F.appendChild(v.createTextNode(EA))}}}else if(S.type===20)switch(S.value){case"open-quote":F.appendChild(v.createTextNode(O(w.quotes,l.quoteDepth++,!0)));break;case"close-quote":F.appendChild(v.createTextNode(O(w.quotes,--l.quoteDepth,!1)));break;default:F.appendChild(v.createTextNode(S.value))}}),F.className=Ea+" "+ba;var I=a===yo.BEFORE?" "+Ea:" "+ba;return Di(o)?o.className.baseValue+=I:o.className+=I,F}}},r.destroy=function(e){return e.parentNode?(e.parentNode.removeChild(e),!0):!1},r}(),yo;(function(r){r[r.BEFORE=0]="BEFORE",r[r.AFTER=1]="AFTER"})(yo||(yo={}));var Pf=function(r,e){var o=r.createElement("iframe");return o.className="html2canvas-container",o.style.visibility="hidden",o.style.position="fixed",o.style.left="-10000px",o.style.top="0px",o.style.border="0",o.width=e.width.toString(),o.height=e.height.toString(),o.scrolling="no",o.setAttribute(Nc,"true"),r.body.appendChild(o),o},Nf=function(r){return new Promise(function(e){if(r.complete){e();return}if(!r.src){e();return}r.onload=e,r.onerror=e})},Gf=function(r){return Promise.all([].slice.call(r.images,0).map(Nf))},kf=function(r){return new Promise(function(e,o){var n=r.contentWindow;if(!n)return o("No window assigned for iframe");var a=n.document;n.onload=r.onload=function(){n.onload=r.onload=null;var l=setInterval(function(){a.body.childNodes.length>0&&a.readyState==="complete"&&(clearInterval(l),e(r))},50)}})},Vf=["all","d","content"],Fa=function(r,e){for(var o=r.length-1;o>=0;o--){var n=r.item(o);Vf.indexOf(n)===-1&&e.style.setProperty(n,r.getPropertyValue(n))}return e},Xf=function(r){var e="";return r&&(e+=""),e},Wf=function(r,e,o){r&&r.defaultView&&(e!==r.defaultView.pageXOffset||o!==r.defaultView.pageYOffset)&&r.defaultView.scrollTo(e,o)},Jf=function(r){var e=r[0],o=r[1],n=r[2];e.scrollLeft=o,e.scrollTop=n},Yf=":before",jf=":after",Ea="___html2canvas___pseudoelement_before",ba="___html2canvas___pseudoelement_after",kc=`{ +(()=>{var Tg=Object.create;var Ta=Object.defineProperty;var Lg=Object.getOwnPropertyDescriptor;var Og=Object.getOwnPropertyNames;var Dg=Object.getPrototypeOf,Kg=Object.prototype.hasOwnProperty;var Mg=h=>Ta(h,"__esModule",{value:!0});var Vi=(h,p)=>()=>(p||h((p={exports:{}}).exports,p),p.exports);var Rg=(h,p,C,E)=>{if(p&&typeof p=="object"||typeof p=="function")for(let b of Og(p))!Kg.call(h,b)&&(C||b!=="default")&&Ta(h,b,{get:()=>p[b],enumerable:!(E=Lg(p,b))||E.enumerable});return h},Fo=(h,p)=>Rg(Mg(Ta(h!=null?Tg(Dg(h)):{},"default",!p&&h&&h.__esModule?{get:()=>h.default,enumerable:!0}:{value:h,enumerable:!0})),h);var Sl=Vi((Pa,Na)=>{(function(h,p){typeof Pa=="object"&&typeof Na!="undefined"?Na.exports=p():typeof define=="function"&&define.amd?define(p):(h=typeof globalThis!="undefined"?globalThis:h||self,h.html2canvas=p())})(Pa,function(){"use strict";var h=function(r,e){return h=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(o,n){o.__proto__=n}||function(o,n){for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(o[a]=n[a])},h(r,e)};function p(r,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");h(r,e);function o(){this.constructor=r}r.prototype=e===null?Object.create(e):(o.prototype=e.prototype,new o)}var C=function(){return C=Object.assign||function(e){for(var o,n=1,a=arguments.length;n0&&l[l.length-1])&&(F[0]===6||F[0]===2)){o=0;continue}if(F[0]===3&&(!l||F[1]>l[0]&&F[1]=55296&&a<=56319&&o>10)+55296,B%1024+56320)),(a+1===o||n.length>16384)&&(l+=String.fromCharCode.apply(String,n),n.length=0)}return l},CA="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",TA=typeof Uint8Array=="undefined"?[]:new Uint8Array(256),BA=0;BA>4,I[a++]=(B&15)<<4|v>>2,I[a++]=(v&3)<<6|w&63;return F},Ut=function(r){for(var e=r.length,o=[],n=0;n>OA,ye=1<>OA,Yt=WA+yt,AA=Yt,HA=2048>>6,Re=AA+HA,_e=65536>>Ue,M=1<=0){if(e<55296||e>56319&&e<=65535)return o=this.index[e>>OA],o=(o<>OA)],o=(o<>Ue),o=this.index[o],o+=e>>OA&eA,o=this.index[o],o=(o<VA?(a.push(!0),v-=VA):a.push(!1),["normal","auto","loose"].indexOf(e)!==-1&&[8208,8211,12316,12448].indexOf(l)!==-1)return n.push(B),o.push(jt);if(v===iA||v===Pe){if(B===0)return n.push(B),o.push(Ze);var w=o[B-1];return ls.indexOf(w)===-1?(n.push(n[B-1]),o.push(w)):(n.push(B),o.push(Ze))}if(n.push(B),v===as)return o.push(e==="strict"?mr:gt);if(v===Xn||v===Gn)return o.push(Ze);if(v===cs)return l>=131072&&l<=196605||l>=196608&&l<=262141?o.push(gt):o.push(Ze);o.push(v)}),[n,o,a]},Jn=function(r,e,o,n){var a=n[o];if(Array.isArray(r)?r.indexOf(a)!==-1:r===a)for(var l=o;l<=n.length;){l++;var B=n[l];if(B===e)return!0;if(B!==YA)break}if(a===YA)for(var l=o;l>0;){l--;var v=n[l];if(Array.isArray(r)?r.indexOf(v)!==-1:r===v)for(var w=o;w<=n.length;){w++;var B=n[w];if(B===e)return!0;if(B!==YA)break}if(v!==YA)break}return!1},Yn=function(r,e){for(var o=r;o>=0;){var n=e[o];if(n===YA)o--;else return n}return 0},Go=function(r,e,o,n,a){if(o[n]===0)return pA;var l=n-1;if(Array.isArray(a)&&a[l]===!0)return pA;var B=l-1,v=l+1,w=e[l],F=B>=0?e[B]:0,I=e[v];if(w===D&&I===W)return pA;if(fe.indexOf(w)!==-1)return lA;if(fe.indexOf(I)!==-1||Ur.indexOf(I)!==-1)return pA;if(Yn(l,e)===ie)return Bt;if(Wn.get(r[l])===Pe||(w===Ft||w===qr)&&Wn.get(r[v])===Pe||w===cA||I===cA||w===He||[YA,wr,xe].indexOf(w)===-1&&I===He||[je,vr,Zr,ft,ze].indexOf(I)!==-1||Yn(l,e)===zt||Jn(Qr,zt,l,e)||Jn([je,vr],mr,l,e)||Jn(Ro,Ro,l,e))return pA;if(w===YA)return Bt;if(w===Qr||I===Qr)return pA;if(I===jt||w===jt)return Bt;if([wr,xe,mr].indexOf(I)!==-1||w===ss||F===kn&&qt.indexOf(w)!==-1||w===ze&&I===kn||I===Nn||$e.indexOf(I)!==-1&&w===he||$e.indexOf(w)!==-1&&I===he||w===Cr&&[gt,Ft,qr].indexOf(I)!==-1||[gt,Ft,qr].indexOf(w)!==-1&&I===Zt||$e.indexOf(w)!==-1&&_o.indexOf(I)!==-1||_o.indexOf(w)!==-1&&$e.indexOf(I)!==-1||[Cr,Zt].indexOf(w)!==-1&&(I===he||[zt,xe].indexOf(I)!==-1&&e[v+1]===he)||[zt,xe].indexOf(w)!==-1&&I===he||w===he&&[he,ze,ft].indexOf(I)!==-1)return pA;if([he,ze,ft,je,vr].indexOf(I)!==-1)for(var S=l;S>=0;){var T=e[S];if(T===he)return pA;if([ze,ft].indexOf(T)!==-1)S--;else break}if([Cr,Zt].indexOf(I)!==-1)for(var S=[je,vr].indexOf(w)!==-1?B:l;S>=0;){var T=e[S];if(T===he)return pA;if([ze,ft].indexOf(T)!==-1)S--;else break}if(Vn===w&&[Vn,we,$r,Te].indexOf(I)!==-1||[we,$r].indexOf(w)!==-1&&[we,Fe].indexOf(I)!==-1||[Fe,Te].indexOf(w)!==-1&&I===Fe||Po.indexOf(w)!==-1&&[Nn,Zt].indexOf(I)!==-1||Po.indexOf(I)!==-1&&w===Cr||$e.indexOf(w)!==-1&&$e.indexOf(I)!==-1||w===ft&&$e.indexOf(I)!==-1||$e.concat(he).indexOf(w)!==-1&&I===zt&&dt.indexOf(r[v])===-1||$e.concat(he).indexOf(I)!==-1&&w===vr)return pA;if(w===qe&&I===qe){for(var q=o[l],N=1;q>0&&(q--,e[q]===qe);)N++;if(N%2!==0)return pA}return w===Ft&&I===qr?pA:Bt},An=function(r,e){e||(e={lineBreak:"normal",wordBreak:"normal"});var o=No(r,e.lineBreak),n=o[0],a=o[1],l=o[2];(e.wordBreak==="break-all"||e.wordBreak==="break-word")&&(a=a.map(function(v){return[he,Ze,Xn].indexOf(v)!==-1?gt:v}));var B=e.wordBreak==="keep-all"?l.map(function(v,w){return v&&r[w]>=19968&&r[w]<=40959}):void 0;return[n,a,B]},ko=function(){function r(e,o,n,a){this.codePoints=e,this.required=o===lA,this.start=n,this.end=a}return r.prototype.slice=function(){return $.apply(void 0,this.codePoints.slice(this.start,this.end))},r}(),jn=function(r,e){var o=yA(r),n=An(o,e),a=n[0],l=n[1],B=n[2],v=o.length,w=0,F=0;return{next:function(){if(F>=v)return{done:!0,value:null};for(var I=pA;F=Ar&&r<=57},$o=function(r){return r>=55296&&r<=57343},pt=function(r){return se(r)||r>=kA&&r<=qn||r>=Zo&&r<=on},Us=function(r){return r>=Zo&&r<=Qs},$n=function(r){return r>=kA&&r<=Ot},ys=function(r){return Us(r)||$n(r)},Fs=function(r){return r>=vs},At=function(r){return r===en||r===fs||r===gs},sn=function(r){return ys(r)||Fs(r)||r===Sr},$A=function(r){return sn(r)||se(r)||r===le},Ai=function(r){return r>=DA&&r<=nn||r===PA||r>=jo&&r<=xr||r===zo},Oe=function(r,e){return r!==Et?!1:e!==en},an=function(r,e,o){return r===le?sn(e)||Oe(e,o):sn(r)?!0:!!(r===Et&&Oe(r,e))},cn=function(r,e,o){return r===Le||r===le?se(e)?!0:e===Hr&&se(o):se(r===Hr?e:r)},ei=function(r){var e=0,o=1;(r[e]===Le||r[e]===le)&&(r[e]===le&&(o=-1),e++);for(var n=[];se(r[e]);)n.push(r[e++]);var a=n.length?parseInt($.apply(void 0,n),10):0;r[e]===Hr&&e++;for(var l=[];se(r[e]);)l.push(r[e++]);var B=l.length,v=B?parseInt($.apply(void 0,l),10):0;(r[e]===qo||r[e]===Tr)&&e++;var w=1;(r[e]===Le||r[e]===le)&&(r[e]===le&&(w=-1),e++);for(var F=[];se(r[e]);)F.push(r[e++]);var I=F.length?parseInt($.apply(void 0,F),10):0;return o*(a+v*Math.pow(10,-B))*Math.pow(10,w*I)},Es={type:2},Lr={type:3},bs={type:4},Or={type:13},ti={type:8},Is={type:21},Dr={type:9},Ao={type:10},ln={type:11},Ss={type:12},et={type:14},un={type:23},fn={type:1},Hs={type:25},eo={type:24},xs={type:26},gn={type:27},Ts={type:28},to={type:29},ro={type:31},dn={type:32},ri=function(){function r(){this._value=[]}return r.prototype.write=function(e){this._value=this._value.concat(yA(e))},r.prototype.read=function(){for(var e=[],o=this.consumeToken();o!==dn;)e.push(o),o=this.consumeToken();return e},r.prototype.consumeToken=function(){var e=this.consumeCodePoint();switch(e){case bt:return this.consumeStringToken(bt);case $t:var o=this.peekCodePoint(0),n=this.peekCodePoint(1),a=this.peekCodePoint(2);if($A(o)||Oe(n,a)){var l=an(o,n,a)?us:Vo,B=this.consumeName();return{type:5,value:B,flags:l}}break;case ds:if(this.peekCodePoint(0)===br)return this.consumeCodePoint(),Or;break;case Ir:return this.consumeStringToken(Ir);case tn:return Es;case It:return Lr;case Lt:if(this.peekCodePoint(0)===br)return this.consumeCodePoint(),et;break;case Le:if(cn(e,this.peekCodePoint(0),this.peekCodePoint(1)))return this.reconsumeCodePoint(e),this.consumeNumericToken();break;case zn:return bs;case le:var v=e,w=this.peekCodePoint(0),F=this.peekCodePoint(1);if(cn(v,w,F))return this.reconsumeCodePoint(e),this.consumeNumericToken();if(an(v,w,F))return this.reconsumeCodePoint(e),this.consumeIdentLikeToken();if(w===le&&F===Ht)return this.consumeCodePoint(),this.consumeCodePoint(),eo;break;case Hr:if(cn(e,this.peekCodePoint(0),this.peekCodePoint(1)))return this.reconsumeCodePoint(e),this.consumeNumericToken();break;case Er:if(this.peekCodePoint(0)===Lt)for(this.consumeCodePoint();;){var I=this.consumeCodePoint();if(I===Lt&&(I=this.consumeCodePoint(),I===Er))return this.consumeToken();if(I===Ne)return this.consumeToken()}break;case ms:return xs;case Zn:return gn;case St:if(this.peekCodePoint(0)===ps&&this.peekCodePoint(1)===le&&this.peekCodePoint(2)===le)return this.consumeCodePoint(),this.consumeCodePoint(),Hs;break;case Xo:var S=this.peekCodePoint(0),T=this.peekCodePoint(1),q=this.peekCodePoint(2);if(an(S,T,q)){var B=this.consumeName();return{type:7,value:B}}break;case Wo:return Ts;case Et:if(Oe(e,this.peekCodePoint(0)))return this.reconsumeCodePoint(e),this.consumeIdentLikeToken();break;case hs:return to;case xt:if(this.peekCodePoint(0)===br)return this.consumeCodePoint(),ti;break;case ws:return ln;case Jo:return Ss;case ve:case Cs:var N=this.peekCodePoint(0),j=this.peekCodePoint(1);return N===Le&&(pt(j)||j===Tt)&&(this.consumeCodePoint(),this.consumeUnicodeRangeToken()),this.reconsumeCodePoint(e),this.consumeIdentLikeToken();case te:if(this.peekCodePoint(0)===br)return this.consumeCodePoint(),Dr;if(this.peekCodePoint(0)===te)return this.consumeCodePoint(),Is;break;case rn:if(this.peekCodePoint(0)===br)return this.consumeCodePoint(),Ao;break;case Ne:return dn}return At(e)?(this.consumeWhiteSpace(),ro):se(e)?(this.reconsumeCodePoint(e),this.consumeNumericToken()):sn(e)?(this.reconsumeCodePoint(e),this.consumeIdentLikeToken()):{type:6,value:$(e)}},r.prototype.consumeCodePoint=function(){var e=this._value.shift();return typeof e=="undefined"?-1:e},r.prototype.reconsumeCodePoint=function(e){this._value.unshift(e)},r.prototype.peekCodePoint=function(e){return e>=this._value.length?-1:this._value[e]},r.prototype.consumeUnicodeRangeToken=function(){for(var e=[],o=this.consumeCodePoint();pt(o)&&e.length<6;)e.push(o),o=this.consumeCodePoint();for(var n=!1;o===Tt&&e.length<6;)e.push(o),o=this.consumeCodePoint(),n=!0;if(n){var a=parseInt($.apply(void 0,e.map(function(w){return w===Tt?Ar:w})),16),l=parseInt($.apply(void 0,e.map(function(w){return w===Tt?qn:w})),16);return{type:30,start:a,end:l}}var B=parseInt($.apply(void 0,e),16);if(this.peekCodePoint(0)===le&&pt(this.peekCodePoint(1))){this.consumeCodePoint(),o=this.consumeCodePoint();for(var v=[];pt(o)&&v.length<6;)v.push(o),o=this.consumeCodePoint();var l=parseInt($.apply(void 0,v),16);return{type:30,start:B,end:l}}else return{type:30,start:B,end:B}},r.prototype.consumeIdentLikeToken=function(){var e=this.consumeName();return e.toLowerCase()==="url"&&this.peekCodePoint(0)===tn?(this.consumeCodePoint(),this.consumeUrlToken()):this.peekCodePoint(0)===tn?(this.consumeCodePoint(),{type:19,value:e}):{type:20,value:e}},r.prototype.consumeUrlToken=function(){var e=[];if(this.consumeWhiteSpace(),this.peekCodePoint(0)===Ne)return{type:22,value:""};var o=this.peekCodePoint(0);if(o===Ir||o===bt){var n=this.consumeStringToken(this.consumeCodePoint());return n.type===0&&(this.consumeWhiteSpace(),this.peekCodePoint(0)===Ne||this.peekCodePoint(0)===It)?(this.consumeCodePoint(),{type:22,value:n.value}):(this.consumeBadUrlRemnants(),un)}for(;;){var a=this.consumeCodePoint();if(a===Ne||a===It)return{type:22,value:$.apply(void 0,e)};if(At(a))return this.consumeWhiteSpace(),this.peekCodePoint(0)===Ne||this.peekCodePoint(0)===It?(this.consumeCodePoint(),{type:22,value:$.apply(void 0,e)}):(this.consumeBadUrlRemnants(),un);if(a===bt||a===Ir||a===tn||Ai(a))return this.consumeBadUrlRemnants(),un;if(a===Et)if(Oe(a,this.peekCodePoint(0)))e.push(this.consumeEscapedCodePoint());else return this.consumeBadUrlRemnants(),un;else e.push(a)}},r.prototype.consumeWhiteSpace=function(){for(;At(this.peekCodePoint(0));)this.consumeCodePoint()},r.prototype.consumeBadUrlRemnants=function(){for(;;){var e=this.consumeCodePoint();if(e===It||e===Ne)return;Oe(e,this.peekCodePoint(0))&&this.consumeEscapedCodePoint()}},r.prototype.consumeStringSlice=function(e){for(var o=5e4,n="";e>0;){var a=Math.min(o,e);n+=$.apply(void 0,this._value.splice(0,a)),e-=a}return this._value.shift(),n},r.prototype.consumeStringToken=function(e){var o="",n=0;do{var a=this._value[n];if(a===Ne||a===void 0||a===e)return o+=this.consumeStringSlice(n),{type:0,value:o};if(a===en)return this._value.splice(0,n),fn;if(a===Et){var l=this._value[n+1];l!==Ne&&l!==void 0&&(l===en?(o+=this.consumeStringSlice(n),n=-1,this._value.shift()):Oe(a,l)&&(o+=this.consumeStringSlice(n),o+=$(this.consumeEscapedCodePoint()),n=-1))}n++}while(!0)},r.prototype.consumeNumber=function(){var e=[],o=yr,n=this.peekCodePoint(0);for((n===Le||n===le)&&e.push(this.consumeCodePoint());se(this.peekCodePoint(0));)e.push(this.consumeCodePoint());n=this.peekCodePoint(0);var a=this.peekCodePoint(1);if(n===Hr&&se(a))for(e.push(this.consumeCodePoint(),this.consumeCodePoint()),o=Fr;se(this.peekCodePoint(0));)e.push(this.consumeCodePoint());n=this.peekCodePoint(0),a=this.peekCodePoint(1);var l=this.peekCodePoint(2);if((n===qo||n===Tr)&&((a===Le||a===le)&&se(l)||se(a)))for(e.push(this.consumeCodePoint(),this.consumeCodePoint()),o=Fr;se(this.peekCodePoint(0));)e.push(this.consumeCodePoint());return[ei(e),o]},r.prototype.consumeNumericToken=function(){var e=this.consumeNumber(),o=e[0],n=e[1],a=this.peekCodePoint(0),l=this.peekCodePoint(1),B=this.peekCodePoint(2);if(an(a,l,B)){var v=this.consumeName();return{type:15,number:o,flags:n,unit:v}}return a===Bs?(this.consumeCodePoint(),{type:16,number:o,flags:n}):{type:17,number:o,flags:n}},r.prototype.consumeEscapedCodePoint=function(){var e=this.consumeCodePoint();if(pt(e)){for(var o=$(e);pt(this.peekCodePoint(0))&&o.length<6;)o+=$(this.consumeCodePoint());At(this.peekCodePoint(0))&&this.consumeCodePoint();var n=parseInt(o,16);return n===0||$o(n)||n>1114111?Yo:n}return e===Ne?Yo:e},r.prototype.consumeName=function(){for(var e="";;){var o=this.consumeCodePoint();if($A(o))e+=$(o);else if(Oe(o,this.peekCodePoint(0)))e+=$(this.consumeEscapedCodePoint());else return this.reconsumeCodePoint(o),e}},r}(),er=function(){function r(e){this._tokens=e}return r.create=function(e){var o=new ri;return o.write(e),new r(o.read())},r.parseValue=function(e){return r.create(e).parseComponentValue()},r.parseValues=function(e){return r.create(e).parseComponentValues()},r.prototype.parseComponentValue=function(){for(var e=this.consumeToken();e.type===31;)e=this.consumeToken();if(e.type===32)throw new SyntaxError("Error parsing CSS component value, unexpected EOF");this.reconsumeToken(e);var o=this.consumeComponentValue();do e=this.consumeToken();while(e.type===31);if(e.type===32)return o;throw new SyntaxError("Error parsing CSS component value, multiple values found when expecting only one")},r.prototype.parseComponentValues=function(){for(var e=[];;){var o=this.consumeComponentValue();if(o.type===32)return e;e.push(o),e.push()}},r.prototype.consumeComponentValue=function(){var e=this.consumeToken();switch(e.type){case 11:case 28:case 2:return this.consumeSimpleBlock(e.type);case 19:return this.consumeFunction(e)}return e},r.prototype.consumeSimpleBlock=function(e){for(var o={type:e,values:[]},n=this.consumeToken();;){if(n.type===32||oi(n,e))return o;this.reconsumeToken(n),o.values.push(this.consumeComponentValue()),n=this.consumeToken()}},r.prototype.consumeFunction=function(e){for(var o={name:e.value,values:[],type:18};;){var n=this.consumeToken();if(n.type===32||n.type===3)return o;this.reconsumeToken(n),o.values.push(this.consumeComponentValue())}},r.prototype.consumeToken=function(){var e=this._tokens.shift();return typeof e=="undefined"?dn:e},r.prototype.reconsumeToken=function(e){this._tokens.unshift(e)},r}(),Kr=function(r){return r.type===15},tt=function(r){return r.type===17},IA=function(r){return r.type===20},ni=function(r){return r.type===0},no=function(r,e){return IA(r)&&r.value===e},Mr=function(r){return r.type!==31},ht=function(r){return r.type!==31&&r.type!==4},De=function(r){var e=[],o=[];return r.forEach(function(n){if(n.type===4){if(o.length===0)throw new Error("Error parsing function args, zero tokens for arg");e.push(o),o=[];return}n.type!==31&&o.push(n)}),o.length&&e.push(o),e},oi=function(r,e){return e===11&&r.type===12||e===28&&r.type===29?!0:e===2&&r.type===3},wt=function(r){return r.type===17||r.type===15},qA=function(r){return r.type===16||wt(r)},Bn=function(r){return r.length>1?[r[0],r[1]]:[r[0]]},ae={type:17,number:0,flags:yr},tr={type:16,number:50,flags:yr},Ge={type:16,number:100,flags:yr},rr=function(r,e,o){var n=r[0],a=r[1];return[KA(n,e),KA(typeof a!="undefined"?a:n,o)]},KA=function(r,e){if(r.type===16)return r.number/100*e;if(Kr(r))switch(r.unit){case"rem":case"em":return 16*r.number;case"px":default:return r.number}return r.number},pn="deg",ii="grad",si="rad",nr="turn",or={name:"angle",parse:function(r,e){if(e.type===15)switch(e.unit){case pn:return Math.PI*e.number/180;case ii:return Math.PI/200*e.number;case si:return e.number;case nr:return Math.PI*2*e.number}throw new Error("Unsupported angle type")}},ir=function(r){return r.type===15&&(r.unit===pn||r.unit===ii||r.unit===si||r.unit===nr)},ai=function(r){var e=r.filter(IA).map(function(o){return o.value}).join(" ");switch(e){case"to bottom right":case"to right bottom":case"left top":case"top left":return[ae,ae];case"to top":case"bottom":return me(0);case"to bottom left":case"to left bottom":case"right top":case"top right":return[ae,Ge];case"to right":case"left":return me(90);case"to top left":case"to left top":case"right bottom":case"bottom right":return[Ge,Ge];case"to bottom":case"top":return me(180);case"to top right":case"to right top":case"left bottom":case"bottom left":return[Ge,ae];case"to left":case"right":return me(270)}return 0},me=function(r){return Math.PI*r/180},vt={name:"color",parse:function(r,e){if(e.type===18){var o=ci[e.name];if(typeof o=="undefined")throw new Error('Attempting to parse an unsupported color function "'+e.name+'"');return o(r,e.values)}if(e.type===5){if(e.value.length===3){var n=e.value.substring(0,1),a=e.value.substring(1,2),l=e.value.substring(2,3);return rt(parseInt(n+n,16),parseInt(a+a,16),parseInt(l+l,16),1)}if(e.value.length===4){var n=e.value.substring(0,1),a=e.value.substring(1,2),l=e.value.substring(2,3),B=e.value.substring(3,4);return rt(parseInt(n+n,16),parseInt(a+a,16),parseInt(l+l,16),parseInt(B+B,16)/255)}if(e.value.length===6){var n=e.value.substring(0,2),a=e.value.substring(2,4),l=e.value.substring(4,6);return rt(parseInt(n,16),parseInt(a,16),parseInt(l,16),1)}if(e.value.length===8){var n=e.value.substring(0,2),a=e.value.substring(2,4),l=e.value.substring(4,6),B=e.value.substring(6,8);return rt(parseInt(n,16),parseInt(a,16),parseInt(l,16),parseInt(B,16)/255)}}if(e.type===20){var v=MA[e.value.toUpperCase()];if(typeof v!="undefined")return v}return MA.TRANSPARENT}},ge=function(r){return(255&r)===0},Ae=function(r){var e=255&r,o=255&r>>8,n=255&r>>16,a=255&r>>24;return e<255?"rgba("+a+","+n+","+o+","+e/255+")":"rgb("+a+","+n+","+o+")"},rt=function(r,e,o,n){return(r<<24|e<<16|o<<8|Math.round(n*255)<<0)>>>0},oo=function(r,e){if(r.type===17)return r.number;if(r.type===16){var o=e===3?1:255;return e===3?r.number/100*o:Math.round(r.number/100*o)}return 0},re=function(r,e){var o=e.filter(ht);if(o.length===3){var n=o.map(oo),a=n[0],l=n[1],B=n[2];return rt(a,l,B,1)}if(o.length===4){var v=o.map(oo),a=v[0],l=v[1],B=v[2],w=v[3];return rt(a,l,B,w)}return 0};function io(r,e,o){return o<0&&(o+=1),o>=1&&(o-=1),o<1/6?(e-r)*o*6+r:o<1/2?e:o<2/3?(e-r)*6*(2/3-o)+r:r}var so=function(r,e){var o=e.filter(ht),n=o[0],a=o[1],l=o[2],B=o[3],v=(n.type===17?me(n.number):or.parse(r,n))/(Math.PI*2),w=qA(a)?a.number/100:0,F=qA(l)?l.number/100:0,I=typeof B!="undefined"&&qA(B)?KA(B,1):1;if(w===0)return rt(F*255,F*255,F*255,1);var S=F<=.5?F*(w+1):F+w-F*w,T=F*2-S,q=io(T,S,v+1/3),N=io(T,S,v),j=io(T,S,v-1/3);return rt(q*255,N*255,j*255,I)},ci={hsl:so,hsla:so,rgb:re,rgba:re},Dt=function(r,e){return vt.parse(r,er.create(e).parseComponentValue())},MA={ALICEBLUE:4042850303,ANTIQUEWHITE:4209760255,AQUA:16777215,AQUAMARINE:2147472639,AZURE:4043309055,BEIGE:4126530815,BISQUE:4293182719,BLACK:255,BLANCHEDALMOND:4293643775,BLUE:65535,BLUEVIOLET:2318131967,BROWN:2771004159,BURLYWOOD:3736635391,CADETBLUE:1604231423,CHARTREUSE:2147418367,CHOCOLATE:3530104575,CORAL:4286533887,CORNFLOWERBLUE:1687547391,CORNSILK:4294499583,CRIMSON:3692313855,CYAN:16777215,DARKBLUE:35839,DARKCYAN:9145343,DARKGOLDENROD:3095837695,DARKGRAY:2846468607,DARKGREEN:6553855,DARKGREY:2846468607,DARKKHAKI:3182914559,DARKMAGENTA:2332068863,DARKOLIVEGREEN:1433087999,DARKORANGE:4287365375,DARKORCHID:2570243327,DARKRED:2332033279,DARKSALMON:3918953215,DARKSEAGREEN:2411499519,DARKSLATEBLUE:1211993087,DARKSLATEGRAY:793726975,DARKSLATEGREY:793726975,DARKTURQUOISE:13554175,DARKVIOLET:2483082239,DEEPPINK:4279538687,DEEPSKYBLUE:12582911,DIMGRAY:1768516095,DIMGREY:1768516095,DODGERBLUE:512819199,FIREBRICK:2988581631,FLORALWHITE:4294635775,FORESTGREEN:579543807,FUCHSIA:4278255615,GAINSBORO:3705462015,GHOSTWHITE:4177068031,GOLD:4292280575,GOLDENROD:3668254975,GRAY:2155905279,GREEN:8388863,GREENYELLOW:2919182335,GREY:2155905279,HONEYDEW:4043305215,HOTPINK:4285117695,INDIANRED:3445382399,INDIGO:1258324735,IVORY:4294963455,KHAKI:4041641215,LAVENDER:3873897215,LAVENDERBLUSH:4293981695,LAWNGREEN:2096890111,LEMONCHIFFON:4294626815,LIGHTBLUE:2916673279,LIGHTCORAL:4034953471,LIGHTCYAN:3774873599,LIGHTGOLDENRODYELLOW:4210742015,LIGHTGRAY:3553874943,LIGHTGREEN:2431553791,LIGHTGREY:3553874943,LIGHTPINK:4290167295,LIGHTSALMON:4288707327,LIGHTSEAGREEN:548580095,LIGHTSKYBLUE:2278488831,LIGHTSLATEGRAY:2005441023,LIGHTSLATEGREY:2005441023,LIGHTSTEELBLUE:2965692159,LIGHTYELLOW:4294959359,LIME:16711935,LIMEGREEN:852308735,LINEN:4210091775,MAGENTA:4278255615,MAROON:2147483903,MEDIUMAQUAMARINE:1724754687,MEDIUMBLUE:52735,MEDIUMORCHID:3126187007,MEDIUMPURPLE:2473647103,MEDIUMSEAGREEN:1018393087,MEDIUMSLATEBLUE:2070474495,MEDIUMSPRINGGREEN:16423679,MEDIUMTURQUOISE:1221709055,MEDIUMVIOLETRED:3340076543,MIDNIGHTBLUE:421097727,MINTCREAM:4127193855,MISTYROSE:4293190143,MOCCASIN:4293178879,NAVAJOWHITE:4292783615,NAVY:33023,OLDLACE:4260751103,OLIVE:2155872511,OLIVEDRAB:1804477439,ORANGE:4289003775,ORANGERED:4282712319,ORCHID:3664828159,PALEGOLDENROD:4008225535,PALEGREEN:2566625535,PALETURQUOISE:2951671551,PALEVIOLETRED:3681588223,PAPAYAWHIP:4293907967,PEACHPUFF:4292524543,PERU:3448061951,PINK:4290825215,PLUM:3718307327,POWDERBLUE:2967529215,PURPLE:2147516671,REBECCAPURPLE:1714657791,RED:4278190335,ROSYBROWN:3163525119,ROYALBLUE:1097458175,SADDLEBROWN:2336560127,SALMON:4202722047,SANDYBROWN:4104413439,SEAGREEN:780883967,SEASHELL:4294307583,SIENNA:2689740287,SILVER:3233857791,SKYBLUE:2278484991,SLATEBLUE:1784335871,SLATEGRAY:1887473919,SLATEGREY:1887473919,SNOW:4294638335,SPRINGGREEN:16744447,STEELBLUE:1182971135,TAN:3535047935,TEAL:8421631,THISTLE:3636451583,TOMATO:4284696575,TRANSPARENT:0,TURQUOISE:1088475391,VIOLET:4001558271,WHEAT:4125012991,WHITE:4294967295,WHITESMOKE:4126537215,YELLOW:4294902015,YELLOWGREEN:2597139199},Ls={name:"background-clip",initialValue:"border-box",prefix:!1,type:1,parse:function(r,e){return e.map(function(o){if(IA(o))switch(o.value){case"padding-box":return 1;case"content-box":return 2}return 0})}},li={name:"background-color",initialValue:"transparent",prefix:!1,type:3,format:"color"},hn=function(r,e){var o=vt.parse(r,e[0]),n=e[1];return n&&qA(n)?{color:o,stop:n}:{color:o,stop:null}},ui=function(r,e){var o=r[0],n=r[r.length-1];o.stop===null&&(o.stop=ae),n.stop===null&&(n.stop=Ge);for(var a=[],l=0,B=0;Bl?a.push(w):a.push(l),l=w}else a.push(null)}for(var F=null,B=0;BB.optimumDistance)?{optimumCorner:v,optimumDistance:I}:B},{optimumDistance:a?1/0:-1/0,optimumCorner:null}).optimumCorner},fi=function(r,e,o,n,a){var l=0,B=0;switch(r.size){case 0:r.shape===0?l=B=Math.min(Math.abs(e),Math.abs(e-n),Math.abs(o),Math.abs(o-a)):r.shape===1&&(l=Math.min(Math.abs(e),Math.abs(e-n)),B=Math.min(Math.abs(o),Math.abs(o-a)));break;case 2:if(r.shape===0)l=B=Math.min(Qe(e,o),Qe(e,o-a),Qe(e-n,o),Qe(e-n,o-a));else if(r.shape===1){var v=Math.min(Math.abs(o),Math.abs(o-a))/Math.min(Math.abs(e),Math.abs(e-n)),w=ao(n,a,e,o,!0),F=w[0],I=w[1];l=Qe(F-e,(I-o)/v),B=v*l}break;case 1:r.shape===0?l=B=Math.max(Math.abs(e),Math.abs(e-n),Math.abs(o),Math.abs(o-a)):r.shape===1&&(l=Math.max(Math.abs(e),Math.abs(e-n)),B=Math.max(Math.abs(o),Math.abs(o-a)));break;case 3:if(r.shape===0)l=B=Math.max(Qe(e,o),Qe(e,o-a),Qe(e-n,o),Qe(e-n,o-a));else if(r.shape===1){var v=Math.max(Math.abs(o),Math.abs(o-a))/Math.max(Math.abs(e),Math.abs(e-n)),S=ao(n,a,e,o,!1),F=S[0],I=S[1];l=Qe(F-e,(I-o)/v),B=v*l}break}return Array.isArray(r.size)&&(l=KA(r.size[0],n),B=r.size.length===2?KA(r.size[1],a):l),[l,B]},Rr=function(r,e){var o=me(180),n=[];return De(e).forEach(function(a,l){if(l===0){var B=a[0];if(B.type===20&&B.value==="to"){o=ai(a);return}else if(ir(B)){o=or.parse(r,B);return}}var v=hn(r,a);n.push(v)}),{angle:o,stops:n,type:1}},Kt=function(r,e){var o=me(180),n=[];return De(e).forEach(function(a,l){if(l===0){var B=a[0];if(B.type===20&&["top","left","right","bottom"].indexOf(B.value)!==-1){o=ai(a);return}else if(ir(B)){o=(or.parse(r,B)+me(270))%me(360);return}}var v=hn(r,a);n.push(v)}),{angle:o,stops:n,type:1}},Os=function(r,e){var o=me(180),n=[],a=1,l=0,B=3,v=[];return De(e).forEach(function(w,F){var I=w[0];if(F===0){if(IA(I)&&I.value==="linear"){a=1;return}else if(IA(I)&&I.value==="radial"){a=2;return}}if(I.type===18){if(I.name==="from"){var S=vt.parse(r,I.values[0]);n.push({stop:ae,color:S})}else if(I.name==="to"){var S=vt.parse(r,I.values[0]);n.push({stop:Ge,color:S})}else if(I.name==="color-stop"){var T=I.values.filter(ht);if(T.length===2){var S=vt.parse(r,T[1]),q=T[0];tt(q)&&n.push({stop:{type:16,number:q.number*100,flags:q.flags},color:S})}}}}),a===1?{angle:(o+me(180))%me(360),stops:n,type:a}:{size:B,shape:l,stops:n,position:v,type:a}},gi="closest-side",Mt="farthest-side",co="closest-corner",mn="farthest-corner",di="circle",lo="ellipse",Bi="cover",pi="contain",Ds=function(r,e){var o=0,n=3,a=[],l=[];return De(e).forEach(function(B,v){var w=!0;if(v===0){var F=!1;w=B.reduce(function(S,T){if(F)if(IA(T))switch(T.value){case"center":return l.push(tr),S;case"top":case"left":return l.push(ae),S;case"right":case"bottom":return l.push(Ge),S}else(qA(T)||wt(T))&&l.push(T);else if(IA(T))switch(T.value){case di:return o=0,!1;case lo:return o=1,!1;case"at":return F=!0,!1;case gi:return n=0,!1;case Bi:case Mt:return n=1,!1;case pi:case co:return n=2,!1;case mn:return n=3,!1}else if(wt(T)||qA(T))return Array.isArray(n)||(n=[]),n.push(T),!1;return S},w)}if(w){var I=hn(r,B);a.push(I)}}),{size:n,shape:o,stops:a,position:l,type:2}},ke=function(r,e){var o=0,n=3,a=[],l=[];return De(e).forEach(function(B,v){var w=!0;if(v===0?w=B.reduce(function(I,S){if(IA(S))switch(S.value){case"center":return l.push(tr),!1;case"top":case"left":return l.push(ae),!1;case"right":case"bottom":return l.push(Ge),!1}else if(qA(S)||wt(S))return l.push(S),!1;return I},w):v===1&&(w=B.reduce(function(I,S){if(IA(S))switch(S.value){case di:return o=0,!1;case lo:return o=1,!1;case pi:case gi:return n=0,!1;case Mt:return n=1,!1;case co:return n=2,!1;case Bi:case mn:return n=3,!1}else if(wt(S)||qA(S))return Array.isArray(n)||(n=[]),n.push(S),!1;return I},w)),w){var F=hn(r,B);a.push(F)}}),{size:n,shape:o,stops:a,position:l,type:2}},hi=function(r){return r.type===1},Ks=function(r){return r.type===2},_r={name:"image",parse:function(r,e){if(e.type===22){var o={url:e.value,type:0};return r.cache.addImage(e.value),o}if(e.type===18){var n=Qn[e.name];if(typeof n=="undefined")throw new Error('Attempting to parse an unsupported image function "'+e.name+'"');return n(r,e.values)}throw new Error("Unsupported image type "+e.type)}};function de(r){return!(r.type===20&&r.value==="none")&&(r.type!==18||!!Qn[r.name])}var Qn={"linear-gradient":Rr,"-moz-linear-gradient":Kt,"-ms-linear-gradient":Kt,"-o-linear-gradient":Kt,"-webkit-linear-gradient":Kt,"radial-gradient":Ds,"-moz-radial-gradient":ke,"-ms-radial-gradient":ke,"-o-radial-gradient":ke,"-webkit-radial-gradient":ke,"-webkit-gradient":Os},wi={name:"background-image",initialValue:"none",type:1,prefix:!1,parse:function(r,e){if(e.length===0)return[];var o=e[0];return o.type===20&&o.value==="none"?[]:e.filter(function(n){return ht(n)&&de(n)}).map(function(n){return _r.parse(r,n)})}},Ms={name:"background-origin",initialValue:"border-box",prefix:!1,type:1,parse:function(r,e){return e.map(function(o){if(IA(o))switch(o.value){case"padding-box":return 1;case"content-box":return 2}return 0})}},Ve={name:"background-position",initialValue:"0% 0%",type:1,prefix:!1,parse:function(r,e){return De(e).map(function(o){return o.filter(qA)}).map(Bn)}},vi={name:"background-repeat",initialValue:"repeat",prefix:!1,type:1,parse:function(r,e){return De(e).map(function(o){return o.filter(IA).map(function(n){return n.value}).join(" ")}).map(mi)}},mi=function(r){switch(r){case"no-repeat":return 1;case"repeat-x":case"repeat no-repeat":return 2;case"repeat-y":case"no-repeat repeat":return 3;case"repeat":default:return 0}},Rt;(function(r){r.AUTO="auto",r.CONTAIN="contain",r.COVER="cover"})(Rt||(Rt={}));var Qi={name:"background-size",initialValue:"0",prefix:!1,type:1,parse:function(r,e){return De(e).map(function(o){return o.filter(Rs)})}},Rs=function(r){return IA(r)||qA(r)},nt=function(r){return{name:"border-"+r+"-color",initialValue:"transparent",prefix:!1,type:3,format:"color"}},_s=nt("top"),Ci=nt("right"),Ps=nt("bottom"),sr=nt("left"),Cn=function(r){return{name:"border-radius-"+r,initialValue:"0 0",prefix:!1,type:1,parse:function(e,o){return Bn(o.filter(qA))}}},Ns=Cn("top-left"),Ui=Cn("top-right"),Gs=Cn("bottom-right"),uo=Cn("bottom-left"),Ke=function(r){return{name:"border-"+r+"-style",initialValue:"solid",prefix:!1,type:2,parse:function(e,o){switch(o){case"none":return 0;case"dashed":return 2;case"dotted":return 3;case"double":return 4}return 1}}},yi=Ke("top"),ks=Ke("right"),ot=Ke("bottom"),Fi=Ke("left"),Pr=function(r){return{name:"border-"+r+"-width",initialValue:"0",type:0,prefix:!1,parse:function(e,o){return Kr(o)?o.number:0}}},Vs=Pr("top"),ar=Pr("right"),Ei=Pr("bottom"),Xs=Pr("left"),fo={name:"color",initialValue:"transparent",prefix:!1,type:3,format:"color"},go={name:"direction",initialValue:"ltr",prefix:!1,type:2,parse:function(r,e){switch(e){case"rtl":return 1;case"ltr":default:return 0}}},cr={name:"display",initialValue:"inline-block",prefix:!1,type:1,parse:function(r,e){return e.filter(IA).reduce(function(o,n){return o|Ws(n.value)},0)}},Ws=function(r){switch(r){case"block":case"-webkit-box":return 2;case"inline":return 4;case"run-in":return 8;case"flow":return 16;case"flow-root":return 32;case"table":return 64;case"flex":case"-webkit-flex":return 128;case"grid":case"-ms-grid":return 256;case"ruby":return 512;case"subgrid":return 1024;case"list-item":return 2048;case"table-row-group":return 4096;case"table-header-group":return 8192;case"table-footer-group":return 16384;case"table-row":return 32768;case"table-cell":return 65536;case"table-column-group":return 131072;case"table-column":return 262144;case"table-caption":return 524288;case"ruby-base":return 1048576;case"ruby-text":return 2097152;case"ruby-base-container":return 4194304;case"ruby-text-container":return 8388608;case"contents":return 16777216;case"inline-block":return 33554432;case"inline-list-item":return 67108864;case"inline-table":return 134217728;case"inline-flex":return 268435456;case"inline-grid":return 536870912}return 0},Un={name:"float",initialValue:"none",prefix:!1,type:2,parse:function(r,e){switch(e){case"left":return 1;case"right":return 2;case"inline-start":return 3;case"inline-end":return 4}return 0}},Js={name:"letter-spacing",initialValue:"0",prefix:!1,type:0,parse:function(r,e){return e.type===20&&e.value==="normal"?0:e.type===17||e.type===15?e.number:0}},yn;(function(r){r.NORMAL="normal",r.STRICT="strict"})(yn||(yn={}));var _t={name:"line-break",initialValue:"normal",prefix:!1,type:2,parse:function(r,e){switch(e){case"strict":return yn.STRICT;case"normal":default:return yn.NORMAL}}},Bo={name:"line-height",initialValue:"normal",prefix:!1,type:4},bi=function(r,e){return IA(r)&&r.value==="normal"?1.2*e:r.type===17?e*r.number:qA(r)?KA(r,e):e},po={name:"list-style-image",initialValue:"none",type:0,prefix:!1,parse:function(r,e){return e.type===20&&e.value==="none"?null:_r.parse(r,e)}},Ys={name:"list-style-position",initialValue:"outside",prefix:!1,type:2,parse:function(r,e){switch(e){case"inside":return 0;case"outside":default:return 1}}},Nr={name:"list-style-type",initialValue:"none",prefix:!1,type:2,parse:function(r,e){switch(e){case"disc":return 0;case"circle":return 1;case"square":return 2;case"decimal":return 3;case"cjk-decimal":return 4;case"decimal-leading-zero":return 5;case"lower-roman":return 6;case"upper-roman":return 7;case"lower-greek":return 8;case"lower-alpha":return 9;case"upper-alpha":return 10;case"arabic-indic":return 11;case"armenian":return 12;case"bengali":return 13;case"cambodian":return 14;case"cjk-earthly-branch":return 15;case"cjk-heavenly-stem":return 16;case"cjk-ideographic":return 17;case"devanagari":return 18;case"ethiopic-numeric":return 19;case"georgian":return 20;case"gujarati":return 21;case"gurmukhi":return 22;case"hebrew":return 22;case"hiragana":return 23;case"hiragana-iroha":return 24;case"japanese-formal":return 25;case"japanese-informal":return 26;case"kannada":return 27;case"katakana":return 28;case"katakana-iroha":return 29;case"khmer":return 30;case"korean-hangul-formal":return 31;case"korean-hanja-formal":return 32;case"korean-hanja-informal":return 33;case"lao":return 34;case"lower-armenian":return 35;case"malayalam":return 36;case"mongolian":return 37;case"myanmar":return 38;case"oriya":return 39;case"persian":return 40;case"simp-chinese-formal":return 41;case"simp-chinese-informal":return 42;case"tamil":return 43;case"telugu":return 44;case"thai":return 45;case"tibetan":return 46;case"trad-chinese-formal":return 47;case"trad-chinese-informal":return 48;case"upper-armenian":return 49;case"disclosure-open":return 50;case"disclosure-closed":return 51;case"none":default:return-1}}},Pt=function(r){return{name:"margin-"+r,initialValue:"0",prefix:!1,type:4}},js=Pt("top"),Gr=Pt("right"),Fn=Pt("bottom"),mt=Pt("left"),Ii={name:"overflow",initialValue:"visible",prefix:!1,type:1,parse:function(r,e){return e.filter(IA).map(function(o){switch(o.value){case"hidden":return 1;case"scroll":return 2;case"clip":return 3;case"auto":return 4;case"visible":default:return 0}})}},ho={name:"overflow-wrap",initialValue:"normal",prefix:!1,type:2,parse:function(r,e){switch(e){case"break-word":return"break-word";case"normal":default:return"normal"}}},En=function(r){return{name:"padding-"+r,initialValue:"0",prefix:!1,type:3,format:"length-percentage"}},bn=En("top"),zs=En("right"),Zs=En("bottom"),qs=En("left"),In={name:"text-align",initialValue:"left",prefix:!1,type:2,parse:function(r,e){switch(e){case"right":return 2;case"center":case"justify":return 1;case"left":default:return 0}}},$s={name:"position",initialValue:"static",prefix:!1,type:2,parse:function(r,e){switch(e){case"relative":return 1;case"absolute":return 2;case"fixed":return 3;case"sticky":return 4}return 0}},Aa={name:"text-shadow",initialValue:"none",type:1,prefix:!1,parse:function(r,e){return e.length===1&&no(e[0],"none")?[]:De(e).map(function(o){for(var n={color:MA.TRANSPARENT,offsetX:ae,offsetY:ae,blur:ae},a=0,l=0;l1?1:0],this.overflowWrap=R(e,ho,o.overflowWrap),this.paddingTop=R(e,bn,o.paddingTop),this.paddingRight=R(e,zs,o.paddingRight),this.paddingBottom=R(e,Zs,o.paddingBottom),this.paddingLeft=R(e,qs,o.paddingLeft),this.paintOrder=R(e,_,o.paintOrder),this.position=R(e,$s,o.position),this.textAlign=R(e,In,o.textAlign),this.textDecorationColor=R(e,A,(n=o.textDecorationColor)!==null&&n!==void 0?n:o.color),this.textDecorationLine=R(e,t,(a=o.textDecorationLine)!==null&&a!==void 0?a:o.textDecoration),this.textShadow=R(e,Aa,o.textShadow),this.textTransform=R(e,ea,o.textTransform),this.transform=R(e,Sn,o.transform),this.transformOrigin=R(e,oa,o.transformOrigin),this.visibility=R(e,Ee,o.visibility),this.webkitTextStrokeColor=R(e,J,o.webkitTextStrokeColor),this.webkitTextStrokeWidth=R(e,P,o.webkitTextStrokeWidth),this.wordBreak=R(e,ia,o.wordBreak),this.zIndex=R(e,Gt,o.zIndex)}return r.prototype.isVisible=function(){return this.display>0&&this.opacity>0&&this.visibility===0},r.prototype.isTransparent=function(){return ge(this.backgroundColor)},r.prototype.isTransformed=function(){return this.transform!==null},r.prototype.isPositioned=function(){return this.position!==0},r.prototype.isPositionedWithZIndex=function(){return this.isPositioned()&&!this.zIndex.auto},r.prototype.isFloating=function(){return this.float!==0},r.prototype.isInlineLevel=function(){return u(this.display,4)||u(this.display,33554432)||u(this.display,268435456)||u(this.display,536870912)||u(this.display,67108864)||u(this.display,134217728)},r}(),sA=function(){function r(e,o){this.content=R(e,g,o.content),this.quotes=R(e,x,o.quotes)}return r}(),dA=function(){function r(e,o){this.counterIncrement=R(e,m,o.counterIncrement),this.counterReset=R(e,Q,o.counterReset)}return r}(),R=function(r,e,o){var n=new ri,a=o!==null&&typeof o!="undefined"?o.toString():e.initialValue;n.write(a);var l=new er(n.read());switch(e.type){case 2:var B=l.parseComponentValue();return e.parse(r,IA(B)?B.value:e.initialValue);case 0:return e.parse(r,l.parseComponentValue());case 1:return e.parse(r,l.parseComponentValues());case 4:return l.parseComponentValue();case 3:switch(e.format){case"angle":return or.parse(r,l.parseComponentValue());case"color":return vt.parse(r,l.parseComponentValue());case"image":return _r.parse(r,l.parseComponentValue());case"length":var v=l.parseComponentValue();return wt(v)?v:ae;case"length-percentage":var w=l.parseComponentValue();return qA(w)?w:ae;case"time":return Hn.parse(r,l.parseComponentValue())}break}},RA="data-html2canvas-debug",QA=function(r){var e=r.getAttribute(RA);switch(e){case"all":return 1;case"clone":return 2;case"parse":return 3;case"render":return 4;default:return 0}},xA=function(r,e){var o=QA(r);return o===1||e===o},jA=function(){function r(e,o){if(this.context=e,this.textNodes=[],this.elements=[],this.flags=0,xA(o,3))debugger;this.styles=new rA(e,window.getComputedStyle(o,null)),Qa(o)&&(this.styles.animationDuration.some(function(n){return n>0})&&(o.style.animationDuration="0s"),this.styles.transform!==null&&(o.style.transform="none")),this.bounds=X(this.context,o),xA(o,4)&&(this.flags|=16)}return r}(),it="AAAAAAAAAAAAEA4AGBkAAFAaAAACAAAAAAAIABAAGAAwADgACAAQAAgAEAAIABAACAAQAAgAEAAIABAACAAQAAgAEAAIABAAQABIAEQATAAIABAACAAQAAgAEAAIABAAVABcAAgAEAAIABAACAAQAGAAaABwAHgAgACIAI4AlgAIABAAmwCjAKgAsAC2AL4AvQDFAMoA0gBPAVYBWgEIAAgACACMANoAYgFkAWwBdAF8AX0BhQGNAZUBlgGeAaMBlQGWAasBswF8AbsBwwF0AcsBYwHTAQgA2wG/AOMBdAF8AekB8QF0AfkB+wHiAHQBfAEIAAMC5gQIAAsCEgIIAAgAFgIeAggAIgIpAggAMQI5AkACygEIAAgASAJQAlgCYAIIAAgACAAKBQoFCgUTBRMFGQUrBSsFCAAIAAgACAAIAAgACAAIAAgACABdAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACABoAmgCrwGvAQgAbgJ2AggAHgEIAAgACADnAXsCCAAIAAgAgwIIAAgACAAIAAgACACKAggAkQKZAggAPADJAAgAoQKkAqwCsgK6AsICCADJAggA0AIIAAgACAAIANYC3gIIAAgACAAIAAgACABAAOYCCAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAkASoB+QIEAAgACAA8AEMCCABCBQgACABJBVAFCAAIAAgACAAIAAgACAAIAAgACABTBVoFCAAIAFoFCABfBWUFCAAIAAgACAAIAAgAbQUIAAgACAAIAAgACABzBXsFfQWFBYoFigWKBZEFigWKBYoFmAWfBaYFrgWxBbkFCAAIAAgACAAIAAgACAAIAAgACAAIAMEFCAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAMgFCADQBQgACAAIAAgACAAIAAgACAAIAAgACAAIAO4CCAAIAAgAiQAIAAgACABAAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAD0AggACAD8AggACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIANYFCAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAMDvwAIAAgAJAIIAAgACAAIAAgACAAIAAgACwMTAwgACAB9BOsEGwMjAwgAKwMyAwsFYgE3A/MEPwMIAEUDTQNRAwgAWQOsAGEDCAAIAAgACAAIAAgACABpAzQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTg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AgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgAOQEIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAB+BAcACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAEABhgSMBAgACAAIAAgAlAQIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAwAEAAQABAADAAMAAwADAAQABAAEAAQABAAEAAQABHATAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgAdQMIAAgACAAIAAgACAAIAMkACAAIAAgAfQMIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACACFA4kDCAAIAAgACAAIAOcBCAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAIcDCAAIAAgACAAIAAgACAAIAAgACAAIAJEDCAAIAAgACADFAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACABgBAgAZgQIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgAbAQCBXIECAAIAHkECAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACABAAJwEQACjBKoEsgQIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACA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AAAAAAA4AAAAAAA4ADgAOAA4ADgAOAA4ADgAOAAAADgAOAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4AAAAAAAAAAAAAAAAADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAA4ADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAA4ADgAOAA4ADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAA4ADgAOAA4AAAAAAAAAAAAAAAAAAAAAAA4ADgAOAA4ADgAOAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4AAAAOAA4ADgAOAA4ADgAAAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4AAAAAAAAAAAA=",xn="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",vo=typeof Uint8Array=="undefined"?[]:new Uint8Array(256),Si=0;Si>4,I[a++]=(B&15)<<4|v>>2,I[a++]=(v&3)<<6|w&63;return F},Tu=function(r){for(var e=r.length,o=[],n=0;n>Vr,Du=1<>Vr,Mu=rc+Ku,Ru=Mu,_u=2048>>6,Pu=Ru+_u,Nu=65536>>aa,Gu=1<=0){if(e<55296||e>56319&&e<=65535)return o=this.index[e>>Vr],o=(o<>Vr)],o=(o<>aa),o=this.index[o],o+=e>>Vr&ku,o=this.index[o],o=(o<=55296&&a<=56319&&o>10)+55296,B%1024+56320)),(a+1===o||n.length>16384)&&(l+=String.fromCharCode.apply(String,n),n.length=0)}return l},qu=Xu(it),Xe="\xD7",pa="\xF7",$u=function(r){return qu.get(r)},Af=function(r,e,o){var n=o-2,a=e[n],l=e[o-1],B=e[o];if(l===ua&&B===fa)return Xe;if(l===ua||l===fa||l===ic||B===ua||B===fa||B===ic)return pa;if(l===ac&&[ac,ga,cc,lc].indexOf(B)!==-1||(l===cc||l===ga)&&(B===ga||B===da)||(l===lc||l===da)&&B===da||B===uc||B===sc||B===ju||l===Yu)return Xe;if(l===uc&&B===fc){for(;a===sc;)a=e[--n];if(a===fc)return Xe}if(l===Ba&&B===Ba){for(var v=0;a===Ba;)v++,a=e[--n];if(v%2===0)return Xe}return pa},ef=function(r){var e=zu(r),o=e.length,n=0,a=0,l=e.map($u);return{next:function(){if(n>=o)return{done:!0,value:null};for(var B=Xe;nB.x||I.y>B.y;return B=I,F===0?!0:S});return r.body.removeChild(e),v},of=function(){return typeof new Image().crossOrigin!="undefined"},sf=function(){return typeof new XMLHttpRequest().responseType=="string"},af=function(r){var e=new Image,o=r.createElement("canvas"),n=o.getContext("2d");if(!n)return!1;e.src="data:image/svg+xml,";try{n.drawImage(e,0,0),o.toDataURL()}catch{return!1}return!0},gc=function(r){return r[0]===0&&r[1]===255&&r[2]===0&&r[3]===255},cf=function(r){var e=r.createElement("canvas"),o=100;e.width=o,e.height=o;var n=e.getContext("2d");if(!n)return Promise.reject(!1);n.fillStyle="rgb(0, 255, 0)",n.fillRect(0,0,o,o);var a=new Image,l=e.toDataURL();a.src=l;var B=ha(o,o,0,0,a);return n.fillStyle="red",n.fillRect(0,0,o,o),dc(B).then(function(v){n.drawImage(v,0,0);var w=n.getImageData(0,0,o,o).data;n.fillStyle="red",n.fillRect(0,0,o,o);var F=r.createElement("div");return F.style.backgroundImage="url("+l+")",F.style.height=o+"px",gc(w)?dc(ha(o,o,0,0,F)):Promise.reject(!1)}).then(function(v){return n.drawImage(v,0,0),gc(n.getImageData(0,0,o,o).data)}).catch(function(){return!1})},ha=function(r,e,o,n,a){var l="http://www.w3.org/2000/svg",B=document.createElementNS(l,"svg"),v=document.createElementNS(l,"foreignObject");return B.setAttributeNS(null,"width",r.toString()),B.setAttributeNS(null,"height",e.toString()),v.setAttributeNS(null,"width","100%"),v.setAttributeNS(null,"height","100%"),v.setAttributeNS(null,"x",o.toString()),v.setAttributeNS(null,"y",n.toString()),v.setAttributeNS(null,"externalResourcesRequired","true"),B.appendChild(v),v.appendChild(a),B},dc=function(r){return new Promise(function(e,o){var n=new Image;n.onload=function(){return e(n)},n.onerror=o,n.src="data:image/svg+xml;charset=utf-8,"+encodeURIComponent(new XMLSerializer().serializeToString(r))})},Be={get SUPPORT_RANGE_BOUNDS(){var r=rf(document);return Object.defineProperty(Be,"SUPPORT_RANGE_BOUNDS",{value:r}),r},get SUPPORT_WORD_BREAKING(){var r=Be.SUPPORT_RANGE_BOUNDS&&nf(document);return Object.defineProperty(Be,"SUPPORT_WORD_BREAKING",{value:r}),r},get SUPPORT_SVG_DRAWING(){var r=af(document);return Object.defineProperty(Be,"SUPPORT_SVG_DRAWING",{value:r}),r},get SUPPORT_FOREIGNOBJECT_DRAWING(){var r=typeof Array.from=="function"&&typeof window.fetch=="function"?cf(document):Promise.resolve(!1);return Object.defineProperty(Be,"SUPPORT_FOREIGNOBJECT_DRAWING",{value:r}),r},get SUPPORT_CORS_IMAGES(){var r=of();return Object.defineProperty(Be,"SUPPORT_CORS_IMAGES",{value:r}),r},get SUPPORT_RESPONSE_TYPE(){var r=sf();return Object.defineProperty(Be,"SUPPORT_RESPONSE_TYPE",{value:r}),r},get SUPPORT_CORS_XHR(){var r="withCredentials"in new XMLHttpRequest;return Object.defineProperty(Be,"SUPPORT_CORS_XHR",{value:r}),r},get SUPPORT_NATIVE_TEXT_SEGMENTATION(){var r=!!(typeof Intl!="undefined"&&Intl.Segmenter);return Object.defineProperty(Be,"SUPPORT_NATIVE_TEXT_SEGMENTATION",{value:r}),r}},mo=function(){function r(e,o){this.text=e,this.bounds=o}return r}(),lf=function(r,e,o,n){var a=gf(e,o),l=[],B=0;return a.forEach(function(v){if(o.textDecorationLine.length||v.trim().length>0)if(Be.SUPPORT_RANGE_BOUNDS){var w=Bc(n,B,v.length).getClientRects();if(w.length>1){var F=wa(v),I=0;F.forEach(function(T){l.push(new mo(T,K.fromDOMRectList(r,Bc(n,I+B,T.length).getClientRects()))),I+=T.length})}else l.push(new mo(v,K.fromDOMRectList(r,w)))}else{var S=n.splitText(v.length);l.push(new mo(v,uf(r,n))),n=S}else Be.SUPPORT_RANGE_BOUNDS||(n=n.splitText(v.length));B+=v.length}),l},uf=function(r,e){var o=e.ownerDocument;if(o){var n=o.createElement("html2canvaswrapper");n.appendChild(e.cloneNode(!0));var a=e.parentNode;if(a){a.replaceChild(n,e);var l=X(r,n);return n.firstChild&&a.replaceChild(n.firstChild,n),l}}return K.EMPTY},Bc=function(r,e,o){var n=r.ownerDocument;if(!n)throw new Error("Node has no owner document");var a=n.createRange();return a.setStart(r,e),a.setEnd(r,e+o),a},wa=function(r){if(Be.SUPPORT_NATIVE_TEXT_SEGMENTATION){var e=new Intl.Segmenter(void 0,{granularity:"grapheme"});return Array.from(e.segment(r)).map(function(o){return o.segment})}return tf(r)},ff=function(r,e){if(Be.SUPPORT_NATIVE_TEXT_SEGMENTATION){var o=new Intl.Segmenter(void 0,{granularity:"word"});return Array.from(o.segment(r)).map(function(n){return n.segment})}return Bf(r,e)},gf=function(r,e){return e.letterSpacing!==0?wa(r):ff(r,e)},df=[32,160,4961,65792,65793,4153,4241],Bf=function(r,e){for(var o=jn(r,{lineBreak:e.lineBreak,wordBreak:e.overflowWrap==="break-word"?"break-word":e.wordBreak}),n=[],a,l=function(){if(a.value){var B=a.value.slice(),v=yA(B),w="";v.forEach(function(F){df.indexOf(F)===-1?w+=$(F):(w.length&&n.push(w),n.push($(F)),w="")}),w.length&&n.push(w)}};!(a=o.next()).done;)l();return n},pf=function(){function r(e,o,n){this.text=hf(o.data,n.textTransform),this.textBounds=lf(e,this.text,n,o)}return r}(),hf=function(r,e){switch(e){case 1:return r.toLowerCase();case 3:return r.replace(wf,vf);case 2:return r.toUpperCase();default:return r}},wf=/(^|\s|:|-|\(|\))([a-z])/g,vf=function(r,e,o){return r.length>0?e+o.toUpperCase():r},pc=function(r){p(e,r);function e(o,n){var a=r.call(this,o,n)||this;return a.src=n.currentSrc||n.src,a.intrinsicWidth=n.naturalWidth,a.intrinsicHeight=n.naturalHeight,a.context.cache.addImage(a.src),a}return e}(jA),hc=function(r){p(e,r);function e(o,n){var a=r.call(this,o,n)||this;return a.canvas=n,a.intrinsicWidth=n.width,a.intrinsicHeight=n.height,a}return e}(jA),wc=function(r){p(e,r);function e(o,n){var a=r.call(this,o,n)||this,l=new XMLSerializer,B=X(o,n);return n.setAttribute("width",B.width+"px"),n.setAttribute("height",B.height+"px"),a.svg="data:image/svg+xml,"+encodeURIComponent(l.serializeToString(n)),a.intrinsicWidth=n.width.baseVal.value,a.intrinsicHeight=n.height.baseVal.value,a.context.cache.addImage(a.svg),a}return e}(jA),vc=function(r){p(e,r);function e(o,n){var a=r.call(this,o,n)||this;return a.value=n.value,a}return e}(jA),va=function(r){p(e,r);function e(o,n){var a=r.call(this,o,n)||this;return a.start=n.start,a.reversed=typeof n.reversed=="boolean"&&n.reversed===!0,a}return e}(jA),mf=[{type:15,flags:0,unit:"px",number:3}],Qf=[{type:16,flags:0,number:50}],Cf=function(r){return r.width>r.height?new K(r.left+(r.width-r.height)/2,r.top,r.height,r.height):r.width0)o.textNodes.push(new pf(r,a,o.styles));else if(Tn(a))if(Tc(a)&&a.assignedNodes)a.assignedNodes().forEach(function(v){return Li(r,v,o,n)});else{var B=yc(r,a);B.styles.isVisible()&&(Ef(a,B,n)?B.flags|=4:bf(B.styles)&&(B.flags|=2),Ff.indexOf(a.tagName)!==-1&&(B.flags|=8),o.elements.push(B),a.slot,a.shadowRoot?Li(r,a.shadowRoot,B,n):!Di(a)&&!bc(a)&&!Ki(a)&&Li(r,a,B,n))}},yc=function(r,e){return Ua(e)?new pc(r,e):Ic(e)?new hc(r,e):bc(e)?new wc(r,e):If(e)?new vc(r,e):Sf(e)?new va(r,e):Hf(e)?new ma(r,e):Ki(e)?new Qc(r,e):Di(e)?new Cc(r,e):Hc(e)?new Uc(r,e):new jA(r,e)},Fc=function(r,e){var o=yc(r,e);return o.flags|=4,Li(r,e,o,o),o},Ef=function(r,e,o){return e.styles.isPositionedWithZIndex()||e.styles.opacity<1||e.styles.isTransformed()||Ca(r)&&o.styles.isTransparent()},bf=function(r){return r.isPositioned()||r.isFloating()},Ec=function(r){return r.nodeType===Node.TEXT_NODE},Tn=function(r){return r.nodeType===Node.ELEMENT_NODE},Qa=function(r){return Tn(r)&&typeof r.style!="undefined"&&!Oi(r)},Oi=function(r){return typeof r.className=="object"},If=function(r){return r.tagName==="LI"},Sf=function(r){return r.tagName==="OL"},Hf=function(r){return r.tagName==="INPUT"},xf=function(r){return r.tagName==="HTML"},bc=function(r){return r.tagName==="svg"},Ca=function(r){return r.tagName==="BODY"},Ic=function(r){return r.tagName==="CANVAS"},Sc=function(r){return r.tagName==="VIDEO"},Ua=function(r){return r.tagName==="IMG"},Hc=function(r){return r.tagName==="IFRAME"},xc=function(r){return r.tagName==="STYLE"},Tf=function(r){return r.tagName==="SCRIPT"},Di=function(r){return r.tagName==="TEXTAREA"},Ki=function(r){return r.tagName==="SELECT"},Tc=function(r){return r.tagName==="SLOT"},Lc=function(r){return r.tagName.indexOf("-")>0},Lf=function(){function r(){this.counters={}}return r.prototype.getCounterValue=function(e){var o=this.counters[e];return o&&o.length?o[o.length-1]:1},r.prototype.getCounterValues=function(e){var o=this.counters[e];return o||[]},r.prototype.pop=function(e){var o=this;e.forEach(function(n){return o.counters[n].pop()})},r.prototype.parse=function(e){var o=this,n=e.counterIncrement,a=e.counterReset,l=!0;n!==null&&n.forEach(function(v){var w=o.counters[v.counter];w&&v.increment!==0&&(l=!1,w.length||w.push(1),w[Math.max(0,w.length-1)]+=v.increment)});var B=[];return l&&a.forEach(function(v){var w=o.counters[v.counter];B.push(v.counter),w||(w=o.counters[v.counter]=[]),w.push(v.reset)}),B},r}(),Oc={integers:[1e3,900,500,400,100,90,50,40,10,9,5,4,1],values:["M","CM","D","CD","C","XC","L","XL","X","IX","V","IV","I"]},Dc={integers:[9e3,8e3,7e3,6e3,5e3,4e3,3e3,2e3,1e3,900,800,700,600,500,400,300,200,100,90,80,70,60,50,40,30,20,10,9,8,7,6,5,4,3,2,1],values:["\u0554","\u0553","\u0552","\u0551","\u0550","\u054F","\u054E","\u054D","\u054C","\u054B","\u054A","\u0549","\u0548","\u0547","\u0546","\u0545","\u0544","\u0543","\u0542","\u0541","\u0540","\u053F","\u053E","\u053D","\u053C","\u053B","\u053A","\u0539","\u0538","\u0537","\u0536","\u0535","\u0534","\u0533","\u0532","\u0531"]},Of={integers:[1e4,9e3,8e3,7e3,6e3,5e3,4e3,3e3,2e3,1e3,400,300,200,100,90,80,70,60,50,40,30,20,19,18,17,16,15,10,9,8,7,6,5,4,3,2,1],values:["\u05D9\u05F3","\u05D8\u05F3","\u05D7\u05F3","\u05D6\u05F3","\u05D5\u05F3","\u05D4\u05F3","\u05D3\u05F3","\u05D2\u05F3","\u05D1\u05F3","\u05D0\u05F3","\u05EA","\u05E9","\u05E8","\u05E7","\u05E6","\u05E4","\u05E2","\u05E1","\u05E0","\u05DE","\u05DC","\u05DB","\u05D9\u05D8","\u05D9\u05D7","\u05D9\u05D6","\u05D8\u05D6","\u05D8\u05D5","\u05D9","\u05D8","\u05D7","\u05D6","\u05D5","\u05D4","\u05D3","\u05D2","\u05D1","\u05D0"]},Df={integers:[1e4,9e3,8e3,7e3,6e3,5e3,4e3,3e3,2e3,1e3,900,800,700,600,500,400,300,200,100,90,80,70,60,50,40,30,20,10,9,8,7,6,5,4,3,2,1],values:["\u10F5","\u10F0","\u10EF","\u10F4","\u10EE","\u10ED","\u10EC","\u10EB","\u10EA","\u10E9","\u10E8","\u10E7","\u10E6","\u10E5","\u10E4","\u10F3","\u10E2","\u10E1","\u10E0","\u10DF","\u10DE","\u10DD","\u10F2","\u10DC","\u10DB","\u10DA","\u10D9","\u10D8","\u10D7","\u10F1","\u10D6","\u10D5","\u10D4","\u10D3","\u10D2","\u10D1","\u10D0"]},Ln=function(r,e,o,n,a,l){return ro?Co(r,a,l.length>0):n.integers.reduce(function(B,v,w){for(;r>=v;)r-=v,B+=n.values[w];return B},"")+l},Kc=function(r,e,o,n){var a="";do o||r--,a=n(r)+a,r/=e;while(r*e>=e);return a},ee=function(r,e,o,n,a){var l=o-e+1;return(r<0?"-":"")+(Kc(Math.abs(r),l,n,function(B){return $(Math.floor(B%l)+e)})+a)},Xr=function(r,e,o){o===void 0&&(o=". ");var n=e.length;return Kc(Math.abs(r),n,!1,function(a){return e[Math.floor(a%n)]})+o},On=1<<0,lr=1<<1,ur=1<<2,Qo=1<<3,kt=function(r,e,o,n,a,l){if(r<-9999||r>9999)return Co(r,4,a.length>0);var B=Math.abs(r),v=a;if(B===0)return e[0]+v;for(var w=0;B>0&&w<=4;w++){var F=B%10;F===0&&u(l,On)&&v!==""?v=e[F]+v:F>1||F===1&&w===0||F===1&&w===1&&u(l,lr)||F===1&&w===1&&u(l,ur)&&r>100||F===1&&w>1&&u(l,Qo)?v=e[F]+(w>0?o[w-1]:"")+v:F===1&&w>0&&(v=o[w-1]+v),B=Math.floor(B/10)}return(r<0?n:"")+v},Mc="\u5341\u767E\u5343\u842C",Rc="\u62FE\u4F70\u4EDF\u842C",_c="\u30DE\u30A4\u30CA\u30B9",ya="\uB9C8\uC774\uB108\uC2A4",Co=function(r,e,o){var n=o?". ":"",a=o?"\u3001":"",l=o?", ":"",B=o?" ":"";switch(e){case 0:return"\u2022"+B;case 1:return"\u25E6"+B;case 2:return"\u25FE"+B;case 5:var v=ee(r,48,57,!0,n);return v.length<4?"0"+v:v;case 4:return Xr(r,"\u3007\u4E00\u4E8C\u4E09\u56DB\u4E94\u516D\u4E03\u516B\u4E5D",a);case 6:return Ln(r,1,3999,Oc,3,n).toLowerCase();case 7:return Ln(r,1,3999,Oc,3,n);case 8:return ee(r,945,969,!1,n);case 9:return ee(r,97,122,!1,n);case 10:return ee(r,65,90,!1,n);case 11:return ee(r,1632,1641,!0,n);case 12:case 49:return Ln(r,1,9999,Dc,3,n);case 35:return Ln(r,1,9999,Dc,3,n).toLowerCase();case 13:return ee(r,2534,2543,!0,n);case 14:case 30:return ee(r,6112,6121,!0,n);case 15:return Xr(r,"\u5B50\u4E11\u5BC5\u536F\u8FB0\u5DF3\u5348\u672A\u7533\u9149\u620C\u4EA5",a);case 16:return Xr(r,"\u7532\u4E59\u4E19\u4E01\u620A\u5DF1\u5E9A\u8F9B\u58EC\u7678",a);case 17:case 48:return kt(r,"\u96F6\u4E00\u4E8C\u4E09\u56DB\u4E94\u516D\u4E03\u516B\u4E5D",Mc,"\u8CA0",a,lr|ur|Qo);case 47:return kt(r,"\u96F6\u58F9\u8CB3\u53C3\u8086\u4F0D\u9678\u67D2\u634C\u7396",Rc,"\u8CA0",a,On|lr|ur|Qo);case 42:return kt(r,"\u96F6\u4E00\u4E8C\u4E09\u56DB\u4E94\u516D\u4E03\u516B\u4E5D",Mc,"\u8D1F",a,lr|ur|Qo);case 41:return kt(r,"\u96F6\u58F9\u8D30\u53C1\u8086\u4F0D\u9646\u67D2\u634C\u7396",Rc,"\u8D1F",a,On|lr|ur|Qo);case 26:return kt(r,"\u3007\u4E00\u4E8C\u4E09\u56DB\u4E94\u516D\u4E03\u516B\u4E5D","\u5341\u767E\u5343\u4E07",_c,a,0);case 25:return kt(r,"\u96F6\u58F1\u5F10\u53C2\u56DB\u4F0D\u516D\u4E03\u516B\u4E5D","\u62FE\u767E\u5343\u4E07",_c,a,On|lr|ur);case 31:return kt(r,"\uC601\uC77C\uC774\uC0BC\uC0AC\uC624\uC721\uCE60\uD314\uAD6C","\uC2ED\uBC31\uCC9C\uB9CC",ya,l,On|lr|ur);case 33:return kt(r,"\u96F6\u4E00\u4E8C\u4E09\u56DB\u4E94\u516D\u4E03\u516B\u4E5D","\u5341\u767E\u5343\u842C",ya,l,0);case 32:return kt(r,"\u96F6\u58F9\u8CB3\u53C3\u56DB\u4E94\u516D\u4E03\u516B\u4E5D","\u62FE\u767E\u5343",ya,l,On|lr|ur);case 18:return ee(r,2406,2415,!0,n);case 20:return Ln(r,1,19999,Df,3,n);case 21:return ee(r,2790,2799,!0,n);case 22:return ee(r,2662,2671,!0,n);case 22:return Ln(r,1,10999,Of,3,n);case 23:return Xr(r,"\u3042\u3044\u3046\u3048\u304A\u304B\u304D\u304F\u3051\u3053\u3055\u3057\u3059\u305B\u305D\u305F\u3061\u3064\u3066\u3068\u306A\u306B\u306C\u306D\u306E\u306F\u3072\u3075\u3078\u307B\u307E\u307F\u3080\u3081\u3082\u3084\u3086\u3088\u3089\u308A\u308B\u308C\u308D\u308F\u3090\u3091\u3092\u3093");case 24:return Xr(r,"\u3044\u308D\u306F\u306B\u307B\u3078\u3068\u3061\u308A\u306C\u308B\u3092\u308F\u304B\u3088\u305F\u308C\u305D\u3064\u306D\u306A\u3089\u3080\u3046\u3090\u306E\u304A\u304F\u3084\u307E\u3051\u3075\u3053\u3048\u3066\u3042\u3055\u304D\u3086\u3081\u307F\u3057\u3091\u3072\u3082\u305B\u3059");case 27:return ee(r,3302,3311,!0,n);case 28:return Xr(r,"\u30A2\u30A4\u30A6\u30A8\u30AA\u30AB\u30AD\u30AF\u30B1\u30B3\u30B5\u30B7\u30B9\u30BB\u30BD\u30BF\u30C1\u30C4\u30C6\u30C8\u30CA\u30CB\u30CC\u30CD\u30CE\u30CF\u30D2\u30D5\u30D8\u30DB\u30DE\u30DF\u30E0\u30E1\u30E2\u30E4\u30E6\u30E8\u30E9\u30EA\u30EB\u30EC\u30ED\u30EF\u30F0\u30F1\u30F2\u30F3",a);case 29:return Xr(r,"\u30A4\u30ED\u30CF\u30CB\u30DB\u30D8\u30C8\u30C1\u30EA\u30CC\u30EB\u30F2\u30EF\u30AB\u30E8\u30BF\u30EC\u30BD\u30C4\u30CD\u30CA\u30E9\u30E0\u30A6\u30F0\u30CE\u30AA\u30AF\u30E4\u30DE\u30B1\u30D5\u30B3\u30A8\u30C6\u30A2\u30B5\u30AD\u30E6\u30E1\u30DF\u30B7\u30F1\u30D2\u30E2\u30BB\u30B9",a);case 34:return ee(r,3792,3801,!0,n);case 37:return ee(r,6160,6169,!0,n);case 38:return ee(r,4160,4169,!0,n);case 39:return ee(r,2918,2927,!0,n);case 40:return ee(r,1776,1785,!0,n);case 43:return ee(r,3046,3055,!0,n);case 44:return ee(r,3174,3183,!0,n);case 45:return ee(r,3664,3673,!0,n);case 46:return ee(r,3872,3881,!0,n);case 3:default:return ee(r,48,57,!0,n)}},Pc="data-html2canvas-ignore",Nc=function(){function r(e,o,n){if(this.context=e,this.options=n,this.scrolledElements=[],this.referenceElement=o,this.counters=new Lf,this.quoteDepth=0,!o.ownerDocument)throw new Error("Cloned element does not have an owner document");this.documentElement=this.cloneNode(o.ownerDocument.documentElement,!1)}return r.prototype.toIFrame=function(e,o){var n=this,a=Kf(e,o);if(!a.contentWindow)return Promise.reject("Unable to find iframe window");var l=e.defaultView.pageXOffset,B=e.defaultView.pageYOffset,v=a.contentWindow,w=v.document,F=_f(a).then(function(){return E(n,void 0,void 0,function(){var I,S;return b(this,function(T){switch(T.label){case 0:return this.scrolledElements.forEach(kf),v&&(v.scrollTo(o.left,o.top),/(iPad|iPhone|iPod)/g.test(navigator.userAgent)&&(v.scrollY!==o.top||v.scrollX!==o.left)&&(this.context.logger.warn("Unable to restore scroll position for cloned document"),this.context.windowBounds=this.context.windowBounds.add(v.scrollX-o.left,v.scrollY-o.top,0,0))),I=this.options.onclone,S=this.clonedReferenceElement,typeof S=="undefined"?[2,Promise.reject("Error finding the "+this.referenceElement.nodeName+" in the cloned document")]:w.fonts&&w.fonts.ready?[4,w.fonts.ready]:[3,2];case 1:T.sent(),T.label=2;case 2:return/(AppleWebKit)/g.test(navigator.userAgent)?[4,Rf(w)]:[3,4];case 3:T.sent(),T.label=4;case 4:return typeof I=="function"?[2,Promise.resolve().then(function(){return I(w,S)}).then(function(){return a})]:[2,a]}})})});return w.open(),w.write(Nf(document.doctype)+""),Gf(this.referenceElement.ownerDocument,l,B),w.replaceChild(w.adoptNode(this.documentElement),w.documentElement),w.close(),F},r.prototype.createElementClone=function(e){if(xA(e,2))debugger;if(Ic(e))return this.createCanvasClone(e);if(Sc(e))return this.createVideoClone(e);if(xc(e))return this.createStyleClone(e);var o=e.cloneNode(!1);return Ua(o)&&(Ua(e)&&e.currentSrc&&e.currentSrc!==e.src&&(o.src=e.currentSrc,o.srcset=""),o.loading==="lazy"&&(o.loading="eager")),Lc(o)?this.createCustomElementClone(o):o},r.prototype.createCustomElementClone=function(e){var o=document.createElement("html2canvascustomelement");return Fa(e.style,o),o},r.prototype.createStyleClone=function(e){try{var o=e.sheet;if(o&&o.cssRules){var n=[].slice.call(o.cssRules,0).reduce(function(l,B){return B&&typeof B.cssText=="string"?l+B.cssText:l},""),a=e.cloneNode(!1);return a.textContent=n,a}}catch(l){if(this.context.logger.error("Unable to access cssRules property",l),l.name!=="SecurityError")throw l}return e.cloneNode(!1)},r.prototype.createCanvasClone=function(e){var o;if(this.options.inlineImages&&e.ownerDocument){var n=e.ownerDocument.createElement("img");try{return n.src=e.toDataURL(),n}catch{this.context.logger.info("Unable to inline canvas contents, canvas is tainted",e)}}var a=e.cloneNode(!1);try{a.width=e.width,a.height=e.height;var l=e.getContext("2d"),B=a.getContext("2d");if(B)if(!this.options.allowTaint&&l)B.putImageData(l.getImageData(0,0,e.width,e.height),0,0);else{var v=(o=e.getContext("webgl2"))!==null&&o!==void 0?o:e.getContext("webgl");if(v){var w=v.getContextAttributes();(w==null?void 0:w.preserveDrawingBuffer)===!1&&this.context.logger.warn("Unable to clone WebGL context as it has preserveDrawingBuffer=false",e)}B.drawImage(e,0,0)}return a}catch{this.context.logger.info("Unable to clone canvas as it is tainted",e)}return a},r.prototype.createVideoClone=function(e){var o=e.ownerDocument.createElement("canvas");o.width=e.offsetWidth,o.height=e.offsetHeight;var n=o.getContext("2d");try{return n&&(n.drawImage(e,0,0,o.width,o.height),this.options.allowTaint||n.getImageData(0,0,o.width,o.height)),o}catch{this.context.logger.info("Unable to clone video as it is tainted",e)}var a=e.ownerDocument.createElement("canvas");return a.width=e.offsetWidth,a.height=e.offsetHeight,a},r.prototype.appendChildNode=function(e,o,n){(!Tn(o)||!Tf(o)&&!o.hasAttribute(Pc)&&(typeof this.options.ignoreElements!="function"||!this.options.ignoreElements(o)))&&(!this.options.copyStyles||!Tn(o)||!xc(o))&&e.appendChild(this.cloneNode(o,n))},r.prototype.cloneChildNodes=function(e,o,n){for(var a=this,l=e.shadowRoot?e.shadowRoot.firstChild:e.firstChild;l;l=l.nextSibling)if(Tn(l)&&Tc(l)&&typeof l.assignedNodes=="function"){var B=l.assignedNodes();B.length&&B.forEach(function(v){return a.appendChildNode(o,v,n)})}else this.appendChildNode(o,l,n)},r.prototype.cloneNode=function(e,o){if(Ec(e))return document.createTextNode(e.data);if(!e.ownerDocument)return e.cloneNode(!1);var n=e.ownerDocument.defaultView;if(n&&Tn(e)&&(Qa(e)||Oi(e))){var a=this.createElementClone(e);a.style.transitionProperty="none";var l=n.getComputedStyle(e),B=n.getComputedStyle(e,":before"),v=n.getComputedStyle(e,":after");this.referenceElement===e&&Qa(a)&&(this.clonedReferenceElement=a),Ca(a)&&Wf(a);var w=this.counters.parse(new dA(this.context,l)),F=this.resolvePseudoContent(e,a,B,Uo.BEFORE);Lc(e)&&(o=!0),Sc(e)||this.cloneChildNodes(e,a,o),F&&a.insertBefore(F,a.firstChild);var I=this.resolvePseudoContent(e,a,v,Uo.AFTER);return I&&a.appendChild(I),this.counters.pop(w),(l&&(this.options.copyStyles||Oi(e))&&!Hc(e)||o)&&Fa(l,a),(e.scrollTop!==0||e.scrollLeft!==0)&&this.scrolledElements.push([a,e.scrollLeft,e.scrollTop]),(Di(e)||Ki(e))&&(Di(a)||Ki(a))&&(a.value=e.value),a}return e.cloneNode(!1)},r.prototype.resolvePseudoContent=function(e,o,n,a){var l=this;if(!!n){var B=n.content,v=o.ownerDocument;if(!(!v||!B||B==="none"||B==="-moz-alt-content"||n.display==="none")){this.counters.parse(new dA(this.context,n));var w=new sA(this.context,n),F=v.createElement("html2canvaspseudoelement");Fa(n,F),w.content.forEach(function(S){if(S.type===0)F.appendChild(v.createTextNode(S.value));else if(S.type===22){var T=v.createElement("img");T.src=S.value,T.style.opacity="1",F.appendChild(T)}else if(S.type===18){if(S.name==="attr"){var q=S.values.filter(IA);q.length&&F.appendChild(v.createTextNode(e.getAttribute(q[0].value)||""))}else if(S.name==="counter"){var N=S.values.filter(ht),j=N[0],hA=N[1];if(j&&IA(j)){var nA=l.counters.getCounterValue(j.value),tA=hA&&IA(hA)?Nr.parse(l.context,hA.value):3;F.appendChild(v.createTextNode(Co(nA,tA,!1)))}}else if(S.name==="counters"){var SA=S.values.filter(ht),j=SA[0],mA=SA[1],hA=SA[2];if(j&&IA(j)){var uA=l.counters.getCounterValues(j.value),Z=hA&&IA(hA)?Nr.parse(l.context,hA.value):3,EA=mA&&mA.type===0?mA.value:"",bA=uA.map(function(be){return Co(be,Z,!1)}).join(EA);F.appendChild(v.createTextNode(bA))}}}else if(S.type===20)switch(S.value){case"open-quote":F.appendChild(v.createTextNode(O(w.quotes,l.quoteDepth++,!0)));break;case"close-quote":F.appendChild(v.createTextNode(O(w.quotes,--l.quoteDepth,!1)));break;default:F.appendChild(v.createTextNode(S.value))}}),F.className=Ea+" "+ba;var I=a===Uo.BEFORE?" "+Ea:" "+ba;return Oi(o)?o.className.baseValue+=I:o.className+=I,F}}},r.destroy=function(e){return e.parentNode?(e.parentNode.removeChild(e),!0):!1},r}(),Uo;(function(r){r[r.BEFORE=0]="BEFORE",r[r.AFTER=1]="AFTER"})(Uo||(Uo={}));var Kf=function(r,e){var o=r.createElement("iframe");return o.className="html2canvas-container",o.style.visibility="hidden",o.style.position="fixed",o.style.left="-10000px",o.style.top="0px",o.style.border="0",o.width=e.width.toString(),o.height=e.height.toString(),o.scrolling="no",o.setAttribute(Pc,"true"),r.body.appendChild(o),o},Mf=function(r){return new Promise(function(e){if(r.complete){e();return}if(!r.src){e();return}r.onload=e,r.onerror=e})},Rf=function(r){return Promise.all([].slice.call(r.images,0).map(Mf))},_f=function(r){return new Promise(function(e,o){var n=r.contentWindow;if(!n)return o("No window assigned for iframe");var a=n.document;n.onload=r.onload=function(){n.onload=r.onload=null;var l=setInterval(function(){a.body.childNodes.length>0&&a.readyState==="complete"&&(clearInterval(l),e(r))},50)}})},Pf=["all","d","content"],Fa=function(r,e){for(var o=r.length-1;o>=0;o--){var n=r.item(o);Pf.indexOf(n)===-1&&e.style.setProperty(n,r.getPropertyValue(n))}return e},Nf=function(r){var e="";return r&&(e+=""),e},Gf=function(r,e,o){r&&r.defaultView&&(e!==r.defaultView.pageXOffset||o!==r.defaultView.pageYOffset)&&r.defaultView.scrollTo(e,o)},kf=function(r){var e=r[0],o=r[1],n=r[2];e.scrollLeft=o,e.scrollTop=n},Vf=":before",Xf=":after",Ea="___html2canvas___pseudoelement_before",ba="___html2canvas___pseudoelement_after",Gc=`{ content: "" !important; display: none !important; -}`,zf=function(r){Zf(r,"."+Ea+Yf+kc+` - .`+ba+jf+kc)},Zf=function(r,e){var o=r.ownerDocument;if(o){var n=o.createElement("style");n.textContent=e,r.appendChild(n)}},Vc=function(){function r(){}return r.getOrigin=function(e){var o=r._link;return o?(o.href=e,o.href=o.href,o.protocol+o.hostname+o.port):"about:blank"},r.isSameOrigin=function(e){return r.getOrigin(e)===r._origin},r.setContext=function(e){r._link=e.document.createElement("a"),r._origin=r.getOrigin(e.location.href)},r._origin="about:blank",r}(),qf=function(){function r(e,o){this.context=e,this._options=o,this._cache={}}return r.prototype.addImage=function(e){var o=Promise.resolve();return this.has(e)||(Sa(e)||tg(e))&&(this._cache[e]=this.loadImage(e)).catch(function(){}),o},r.prototype.match=function(e){return this._cache[e]},r.prototype.loadImage=function(e){return b(this,void 0,void 0,function(){var o,n,a,l,B=this;return E(this,function(v){switch(v.label){case 0:return o=Vc.isSameOrigin(e),n=!Ia(e)&&this._options.useCORS===!0&&Be.SUPPORT_CORS_IMAGES&&!o,a=!Ia(e)&&!o&&!Sa(e)&&typeof this._options.proxy=="string"&&Be.SUPPORT_CORS_XHR&&!n,!o&&this._options.allowTaint===!1&&!Ia(e)&&!Sa(e)&&!a&&!n?[2]:(l=e,a?[4,this.proxy(l)]:[3,2]);case 1:l=v.sent(),v.label=2;case 2:return this.context.logger.debug("Added image "+e.substring(0,256)),[4,new Promise(function(w,F){var I=new Image;I.onload=function(){return w(I)},I.onerror=F,(rg(l)||n)&&(I.crossOrigin="anonymous"),I.src=l,I.complete===!0&&setTimeout(function(){return w(I)},500),B._options.imageTimeout>0&&setTimeout(function(){return F("Timed out ("+B._options.imageTimeout+"ms) loading image")},B._options.imageTimeout)})];case 3:return[2,v.sent()]}})})},r.prototype.has=function(e){return typeof this._cache[e]!="undefined"},r.prototype.keys=function(){return Promise.resolve(Object.keys(this._cache))},r.prototype.proxy=function(e){var o=this,n=this._options.proxy;if(!n)throw new Error("No proxy defined");var a=e.substring(0,256);return new Promise(function(l,B){var v=Be.SUPPORT_RESPONSE_TYPE?"blob":"text",w=new XMLHttpRequest;w.onload=function(){if(w.status===200)if(v==="text")l(w.response);else{var S=new FileReader;S.addEventListener("load",function(){return l(S.result)},!1),S.addEventListener("error",function(L){return B(L)},!1),S.readAsDataURL(w.response)}else B("Failed to proxy resource "+a+" with status code "+w.status)},w.onerror=B;var F=n.indexOf("?")>-1?"&":"?";if(w.open("GET",""+n+F+"url="+encodeURIComponent(e)+"&responseType="+v),v!=="text"&&w instanceof XMLHttpRequest&&(w.responseType=v),o._options.imageTimeout){var I=o._options.imageTimeout;w.timeout=I,w.ontimeout=function(){return B("Timed out ("+I+"ms) proxying "+a)}}w.send()})},r}(),$f=/^data:image\/svg\+xml/i,Ag=/^data:image\/.*;base64,/i,eg=/^data:image\/.*/i,tg=function(r){return Be.SUPPORT_SVG_DRAWING||!ng(r)},Ia=function(r){return eg.test(r)},rg=function(r){return Ag.test(r)},Sa=function(r){return r.substr(0,4)==="blob"},ng=function(r){return r.substr(-3).toLowerCase()==="svg"||$f.test(r)},Z=function(){function r(e,o){this.type=0,this.x=e,this.y=o}return r.prototype.add=function(e,o){return new r(this.x+e,this.y+o)},r}(),Dn=function(r,e,o){return new Z(r.x+(e.x-r.x)*o,r.y+(e.y-r.y)*o)},Ri=function(){function r(e,o,n,a){this.type=1,this.start=e,this.startControl=o,this.endControl=n,this.end=a}return r.prototype.subdivide=function(e,o){var n=Dn(this.start,this.startControl,e),a=Dn(this.startControl,this.endControl,e),l=Dn(this.endControl,this.end,e),B=Dn(n,a,e),v=Dn(a,l,e),w=Dn(B,v,e);return o?new r(this.start,n,B,w):new r(w,v,l,this.end)},r.prototype.add=function(e,o){return new r(this.start.add(e,o),this.startControl.add(e,o),this.endControl.add(e,o),this.end.add(e,o))},r.prototype.reverse=function(){return new r(this.end,this.endControl,this.startControl,this.start)},r}(),We=function(r){return r.type===1},og=function(){function r(e){var o=e.styles,n=e.bounds,a=rr(o.borderTopLeftRadius,n.width,n.height),l=a[0],B=a[1],v=rr(o.borderTopRightRadius,n.width,n.height),w=v[0],F=v[1],I=rr(o.borderBottomRightRadius,n.width,n.height),S=I[0],L=I[1],$=rr(o.borderBottomLeftRadius,n.width,n.height),N=$[0],z=$[1],hA=[];hA.push((l+w)/n.width),hA.push((N+S)/n.width),hA.push((B+z)/n.height),hA.push((F+L)/n.height);var nA=Math.max.apply(Math,hA);nA>1&&(l/=nA,B/=nA,w/=nA,F/=nA,S/=nA,L/=nA,N/=nA,z/=nA);var tA=n.width-w,IA=n.height-L,mA=n.width-S,uA=n.height-z,q=o.borderTopWidth,FA=o.borderRightWidth,EA=o.borderBottomWidth,gA=o.borderLeftWidth,ne=DA(o.paddingTop,e.bounds.width),be=DA(o.paddingRight,e.bounds.width),Me=DA(o.paddingBottom,e.bounds.width),RA=DA(o.paddingLeft,e.bounds.width);this.topLeftBorderDoubleOuterBox=l>0||B>0?XA(n.left+gA/3,n.top+q/3,l-gA/3,B-q/3,TA.TOP_LEFT):new Z(n.left+gA/3,n.top+q/3),this.topRightBorderDoubleOuterBox=l>0||B>0?XA(n.left+tA,n.top+q/3,w-FA/3,F-q/3,TA.TOP_RIGHT):new Z(n.left+n.width-FA/3,n.top+q/3),this.bottomRightBorderDoubleOuterBox=S>0||L>0?XA(n.left+mA,n.top+IA,S-FA/3,L-EA/3,TA.BOTTOM_RIGHT):new Z(n.left+n.width-FA/3,n.top+n.height-EA/3),this.bottomLeftBorderDoubleOuterBox=N>0||z>0?XA(n.left+gA/3,n.top+uA,N-gA/3,z-EA/3,TA.BOTTOM_LEFT):new Z(n.left+gA/3,n.top+n.height-EA/3),this.topLeftBorderDoubleInnerBox=l>0||B>0?XA(n.left+gA*2/3,n.top+q*2/3,l-gA*2/3,B-q*2/3,TA.TOP_LEFT):new Z(n.left+gA*2/3,n.top+q*2/3),this.topRightBorderDoubleInnerBox=l>0||B>0?XA(n.left+tA,n.top+q*2/3,w-FA*2/3,F-q*2/3,TA.TOP_RIGHT):new Z(n.left+n.width-FA*2/3,n.top+q*2/3),this.bottomRightBorderDoubleInnerBox=S>0||L>0?XA(n.left+mA,n.top+IA,S-FA*2/3,L-EA*2/3,TA.BOTTOM_RIGHT):new Z(n.left+n.width-FA*2/3,n.top+n.height-EA*2/3),this.bottomLeftBorderDoubleInnerBox=N>0||z>0?XA(n.left+gA*2/3,n.top+uA,N-gA*2/3,z-EA*2/3,TA.BOTTOM_LEFT):new Z(n.left+gA*2/3,n.top+n.height-EA*2/3),this.topLeftBorderStroke=l>0||B>0?XA(n.left+gA/2,n.top+q/2,l-gA/2,B-q/2,TA.TOP_LEFT):new Z(n.left+gA/2,n.top+q/2),this.topRightBorderStroke=l>0||B>0?XA(n.left+tA,n.top+q/2,w-FA/2,F-q/2,TA.TOP_RIGHT):new Z(n.left+n.width-FA/2,n.top+q/2),this.bottomRightBorderStroke=S>0||L>0?XA(n.left+mA,n.top+IA,S-FA/2,L-EA/2,TA.BOTTOM_RIGHT):new Z(n.left+n.width-FA/2,n.top+n.height-EA/2),this.bottomLeftBorderStroke=N>0||z>0?XA(n.left+gA/2,n.top+uA,N-gA/2,z-EA/2,TA.BOTTOM_LEFT):new Z(n.left+gA/2,n.top+n.height-EA/2),this.topLeftBorderBox=l>0||B>0?XA(n.left,n.top,l,B,TA.TOP_LEFT):new Z(n.left,n.top),this.topRightBorderBox=w>0||F>0?XA(n.left+tA,n.top,w,F,TA.TOP_RIGHT):new Z(n.left+n.width,n.top),this.bottomRightBorderBox=S>0||L>0?XA(n.left+mA,n.top+IA,S,L,TA.BOTTOM_RIGHT):new Z(n.left+n.width,n.top+n.height),this.bottomLeftBorderBox=N>0||z>0?XA(n.left,n.top+uA,N,z,TA.BOTTOM_LEFT):new Z(n.left,n.top+n.height),this.topLeftPaddingBox=l>0||B>0?XA(n.left+gA,n.top+q,Math.max(0,l-gA),Math.max(0,B-q),TA.TOP_LEFT):new Z(n.left+gA,n.top+q),this.topRightPaddingBox=w>0||F>0?XA(n.left+Math.min(tA,n.width-FA),n.top+q,tA>n.width+FA?0:Math.max(0,w-FA),Math.max(0,F-q),TA.TOP_RIGHT):new Z(n.left+n.width-FA,n.top+q),this.bottomRightPaddingBox=S>0||L>0?XA(n.left+Math.min(mA,n.width-gA),n.top+Math.min(IA,n.height-EA),Math.max(0,S-FA),Math.max(0,L-EA),TA.BOTTOM_RIGHT):new Z(n.left+n.width-FA,n.top+n.height-EA),this.bottomLeftPaddingBox=N>0||z>0?XA(n.left+gA,n.top+Math.min(uA,n.height-EA),Math.max(0,N-gA),Math.max(0,z-EA),TA.BOTTOM_LEFT):new Z(n.left+gA,n.top+n.height-EA),this.topLeftContentBox=l>0||B>0?XA(n.left+gA+RA,n.top+q+ne,Math.max(0,l-(gA+RA)),Math.max(0,B-(q+ne)),TA.TOP_LEFT):new Z(n.left+gA+RA,n.top+q+ne),this.topRightContentBox=w>0||F>0?XA(n.left+Math.min(tA,n.width+gA+RA),n.top+q+ne,tA>n.width+gA+RA?0:w-gA+RA,F-(q+ne),TA.TOP_RIGHT):new Z(n.left+n.width-(FA+be),n.top+q+ne),this.bottomRightContentBox=S>0||L>0?XA(n.left+Math.min(mA,n.width-(gA+RA)),n.top+Math.min(IA,n.height+q+ne),Math.max(0,S-(FA+be)),L-(EA+Me),TA.BOTTOM_RIGHT):new Z(n.left+n.width-(FA+be),n.top+n.height-(EA+Me)),this.bottomLeftContentBox=N>0||z>0?XA(n.left+gA+RA,n.top+uA,Math.max(0,N-(gA+RA)),z-(EA+Me),TA.BOTTOM_LEFT):new Z(n.left+gA+RA,n.top+n.height-(EA+Me))}return r}(),TA;(function(r){r[r.TOP_LEFT=0]="TOP_LEFT",r[r.TOP_RIGHT=1]="TOP_RIGHT",r[r.BOTTOM_RIGHT=2]="BOTTOM_RIGHT",r[r.BOTTOM_LEFT=3]="BOTTOM_LEFT"})(TA||(TA={}));var XA=function(r,e,o,n,a){var l=4*((Math.sqrt(2)-1)/3),B=o*l,v=n*l,w=r+o,F=e+n;switch(a){case TA.TOP_LEFT:return new Ri(new Z(r,F),new Z(r,F-v),new Z(w-B,e),new Z(w,e));case TA.TOP_RIGHT:return new Ri(new Z(r,e),new Z(r+B,e),new Z(w,F-v),new Z(w,F));case TA.BOTTOM_RIGHT:return new Ri(new Z(w,e),new Z(w,e+v),new Z(r+B,F),new Z(r,F));case TA.BOTTOM_LEFT:default:return new Ri(new Z(w,F),new Z(w-B,F),new Z(r,e+v),new Z(r,e))}},_i=function(r){return[r.topLeftBorderBox,r.topRightBorderBox,r.bottomRightBorderBox,r.bottomLeftBorderBox]},ig=function(r){return[r.topLeftContentBox,r.topRightContentBox,r.bottomRightContentBox,r.bottomLeftContentBox]},Pi=function(r){return[r.topLeftPaddingBox,r.topRightPaddingBox,r.bottomRightPaddingBox,r.bottomLeftPaddingBox]},sg=function(){function r(e,o,n){this.offsetX=e,this.offsetY=o,this.matrix=n,this.type=0,this.target=2|4}return r}(),Ni=function(){function r(e,o){this.path=e,this.target=o,this.type=1}return r}(),ag=function(){function r(e){this.opacity=e,this.type=2,this.target=2|4}return r}(),cg=function(r){return r.type===0},Xc=function(r){return r.type===1},lg=function(r){return r.type===2},Wc=function(r,e){return r.length===e.length?r.some(function(o,n){return o===e[n]}):!1},ug=function(r,e,o,n,a){return r.map(function(l,B){switch(B){case 0:return l.add(e,o);case 1:return l.add(e+n,o);case 2:return l.add(e+n,o+a);case 3:return l.add(e,o+a)}return l})},Jc=function(){function r(e){this.element=e,this.inlineLevel=[],this.nonInlineLevel=[],this.negativeZIndex=[],this.zeroOrAutoZIndexOrTransformedOrOpacity=[],this.positiveZIndex=[],this.nonPositionedFloats=[],this.nonPositionedInlineLevel=[]}return r}(),Yc=function(){function r(e,o){if(this.container=e,this.parent=o,this.effects=[],this.curves=new og(this.container),this.container.styles.opacity<1&&this.effects.push(new ag(this.container.styles.opacity)),this.container.styles.transform!==null){var n=this.container.bounds.left+this.container.styles.transformOrigin[0].number,a=this.container.bounds.top+this.container.styles.transformOrigin[1].number,l=this.container.styles.transform;this.effects.push(new sg(n,a,l))}if(this.container.styles.overflowX!==0){var B=_i(this.curves),v=Pi(this.curves);Wc(B,v)?this.effects.push(new Ni(B,2|4)):(this.effects.push(new Ni(B,2)),this.effects.push(new Ni(v,4)))}}return r.prototype.getEffects=function(e){for(var o=[2,3].indexOf(this.container.styles.position)===-1,n=this.parent,a=this.effects.slice(0);n;){var l=n.effects.filter(function(w){return!Xc(w)});if(o||n.container.styles.position!==0||!n.parent){if(a.unshift.apply(a,l),o=[2,3].indexOf(n.container.styles.position)===-1,n.container.styles.overflowX!==0){var B=_i(n.curves),v=Pi(n.curves);Wc(B,v)||a.unshift(new Ni(v,2|4))}}else a.unshift.apply(a,l);n=n.parent}return a.filter(function(w){return u(w.target,e)})},r}(),Ha=function(r,e,o,n){r.container.elements.forEach(function(a){var l=u(a.flags,4),B=u(a.flags,2),v=new Yc(a,r);u(a.styles.display,2048)&&n.push(v);var w=u(a.flags,8)?[]:n;if(l||B){var F=l||a.styles.isPositioned()?o:e,I=new Jc(v);if(a.styles.isPositioned()||a.styles.opacity<1||a.styles.isTransformed()){var S=a.styles.zIndex.order;if(S<0){var L=0;F.negativeZIndex.some(function(N,z){return S>N.element.container.styles.zIndex.order?(L=z,!1):L>0}),F.negativeZIndex.splice(L,0,I)}else if(S>0){var $=0;F.positiveZIndex.some(function(N,z){return S>=N.element.container.styles.zIndex.order?($=z+1,!1):$>0}),F.positiveZIndex.splice($,0,I)}else F.zeroOrAutoZIndexOrTransformedOrOpacity.push(I)}else a.styles.isFloating()?F.nonPositionedFloats.push(I):F.nonPositionedInlineLevel.push(I);Ha(v,I,l?I:o,w)}else a.styles.isInlineLevel()?e.inlineLevel.push(v):e.nonInlineLevel.push(v),Ha(v,e,o,w);u(a.flags,8)&&jc(a,w)})},jc=function(r,e){for(var o=r instanceof va?r.start:1,n=r instanceof va?r.reversed:!1,a=0;a0&&o.intrinsicHeight>0){var l=ki(o),B=Pi(n);this.path(B),this.ctx.save(),this.ctx.clip(),this.ctx.drawImage(a,0,0,o.intrinsicWidth,o.intrinsicHeight,l.left,l.top,l.width,l.height),this.ctx.restore()}},e.prototype.renderNodeContent=function(o){return b(this,void 0,void 0,function(){var n,a,l,B,v,w,tA,tA,F,I,S,L,mA,$,N,uA,z,hA,nA,tA,IA,mA,uA;return E(this,function(q){switch(q.label){case 0:this.applyEffects(o.getEffects(4)),n=o.container,a=o.curves,l=n.styles,B=0,v=n.textNodes,q.label=1;case 1:return B0&&pe>0&&(EA=l.ctx.createPattern(uA,"repeat"),l.renderRepeat(ne,EA,Ie,Se))):Ks(I)&&(gA=xa(o,n,[null,null,null]),ne=gA[0],be=gA[1],Me=gA[2],RA=gA[3],pe=gA[4],fr=I.position.length===0?[tr]:I.position,Ie=DA(fr[0],RA),Se=DA(fr[fr.length-1],pe),Wr=gi(I,Ie,Se,RA,pe),Qt=Wr[0],gr=Wr[1],Qt>0&&gr>0&&(Jr=l.ctx.createRadialGradient(be+Ie,Me+Se,0,be+Ie,Me+Se,Qt),fi(I.stops,Qt*2).forEach(function(Fo){return Jr.addColorStop(Fo.stop,Ae(Fo.color))}),l.path(ne),l.ctx.fillStyle=Jr,Qt!==gr?(Yr=o.bounds.left+.5*o.bounds.width,Vt=o.bounds.top+.5*o.bounds.height,jr=gr/Qt,Xt=1/jr,l.ctx.save(),l.ctx.translate(Yr,Vt),l.ctx.transform(1,0,0,jr,0,0),l.ctx.translate(-Yr,-Vt),l.ctx.fillRect(be,Xt*(Me-Vt)+Vt,RA,pe*Xt),l.ctx.restore()):l.ctx.fill())),Rn.label=6;case 6:return n--,[2]}})},l=this,B=0,v=o.styles.backgroundImage.slice(0).reverse(),F.label=1;case 1:return B0?I.style!==2?[3,5]:[4,this.renderDashedDottedBorder(I.color,I.width,v,o.curves,2)]:[3,11]):[3,13];case 4:return L.sent(),[3,11];case 5:return I.style!==3?[3,7]:[4,this.renderDashedDottedBorder(I.color,I.width,v,o.curves,3)];case 6:return L.sent(),[3,11];case 7:return I.style!==4?[3,9]:[4,this.renderDoubleBorder(I.color,I.width,v,o.curves)];case 8:return L.sent(),[3,11];case 9:return[4,this.renderSolidBorder(I.color,v,o.curves)];case 10:L.sent(),L.label=11;case 11:v++,L.label=12;case 12:return w++,[3,3];case 13:return[2]}})})},e.prototype.renderDashedDottedBorder=function(o,n,a,l,B){return b(this,void 0,void 0,function(){var v,w,F,I,S,L,$,N,z,hA,nA,tA,IA,mA,uA,q,uA,q;return E(this,function(FA){return this.ctx.save(),v=Bg(l,a),w=zc(l,a),B===2&&(this.path(w),this.ctx.clip()),We(w[0])?(F=w[0].start.x,I=w[0].start.y):(F=w[0].x,I=w[0].y),We(w[1])?(S=w[1].end.x,L=w[1].end.y):(S=w[1].x,L=w[1].y),a===0||a===2?$=Math.abs(F-S):$=Math.abs(I-L),this.ctx.beginPath(),B===3?this.formatPath(v):this.formatPath(w.slice(0,2)),N=n<3?n*3:n*2,z=n<3?n*2:n,B===3&&(N=n,z=n),hA=!0,$<=N*2?hA=!1:$<=N*2+z?(nA=$/(2*N+z),N*=nA,z*=nA):(tA=Math.floor(($+z)/(N+z)),IA=($-tA*N)/(tA-1),mA=($-(tA+1)*N)/tA,z=mA<=0||Math.abs(z-IA){(function(h){typeof Au=="object"&&typeof Ya!="undefined"?Ya.exports=h():typeof define=="function"&&define.amd?define([],h):(typeof window!="undefined"?window:typeof global!="undefined"?global:typeof self!="undefined"?self:this).interact=h()})(function(){var h={};Object.defineProperty(h,"__esModule",{value:!0}),h.default=void 0,h.default=function(A){return!(!A||!A.Window)&&A instanceof A.Window};var p={};Object.defineProperty(p,"__esModule",{value:!0}),p.getWindow=function(A){return(0,h.default)(A)?A:(A.ownerDocument||A).defaultView||b.window},p.init=E,p.window=p.realWindow=void 0;var U=void 0;p.realWindow=U;var b=void 0;function E(A){p.realWindow=U=A;var t=A.document.createTextNode("");t.ownerDocument!==A.document&&typeof A.wrap=="function"&&A.wrap(t)===t&&(A=A.wrap(A)),p.window=b=A}p.window=b,typeof window!="undefined"&&window&&E(window);var C={};function R(A){return R=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},R(A)}Object.defineProperty(C,"__esModule",{value:!0}),C.default=void 0;var j=function(A){return!!A&&R(A)==="object"},iA=function(A){return typeof A=="function"},UA={window:function(A){return A===p.window||(0,h.default)(A)},docFrag:function(A){return j(A)&&A.nodeType===11},object:j,func:iA,number:function(A){return typeof A=="number"},bool:function(A){return typeof A=="boolean"},string:function(A){return typeof A=="string"},element:function(A){if(!A||R(A)!=="object")return!1;var t=p.getWindow(A)||p.window;return/object|function/.test(typeof Element=="undefined"?"undefined":R(Element))?A instanceof Element||A instanceof t.Element:A.nodeType===1&&typeof A.nodeName=="string"},plainObject:function(A){return j(A)&&!!A.constructor&&/function Object\b/.test(A.constructor.toString())},array:function(A){return j(A)&&A.length!==void 0&&iA(A.splice)}};C.default=UA;var X={};function _A(A){var t=A.interaction;if(t.prepared.name==="drag"){var i=t.prepared.axis;i==="x"?(t.coords.cur.page.y=t.coords.start.page.y,t.coords.cur.client.y=t.coords.start.client.y,t.coords.velocity.client.y=0,t.coords.velocity.page.y=0):i==="y"&&(t.coords.cur.page.x=t.coords.start.page.x,t.coords.cur.client.x=t.coords.start.client.x,t.coords.velocity.client.x=0,t.coords.velocity.page.x=0)}}function xA(A){var t=A.iEvent,i=A.interaction;if(i.prepared.name==="drag"){var s=i.prepared.axis;if(s==="x"||s==="y"){var c=s==="x"?"y":"x";t.page[c]=i.coords.start.page[c],t.client[c]=i.coords.start.client[c],t.delta[c]=0}}}Object.defineProperty(X,"__esModule",{value:!0}),X.default=void 0;var BA={id:"actions/drag",install:function(A){var t=A.actions,i=A.Interactable,s=A.defaults;i.prototype.draggable=BA.draggable,t.map.drag=BA,t.methodDict.drag="draggable",s.actions.drag=BA.defaults},listeners:{"interactions:before-action-move":_A,"interactions:action-resume":_A,"interactions:action-move":xA,"auto-start:check":function(A){var t=A.interaction,i=A.interactable,s=A.buttons,c=i.options.drag;if(c&&c.enabled&&(!t.pointerIsDown||!/mouse|pointer/.test(t.pointerType)||(s&i.options.drag.mouseButtons)!=0))return A.action={name:"drag",axis:c.lockAxis==="start"?c.startAxis:c.lockAxis},!1}},draggable:function(A){return C.default.object(A)?(this.options.drag.enabled=A.enabled!==!1,this.setPerAction("drag",A),this.setOnEvents("drag",A),/^(xy|x|y|start)$/.test(A.lockAxis)&&(this.options.drag.lockAxis=A.lockAxis),/^(xy|x|y)$/.test(A.startAxis)&&(this.options.drag.startAxis=A.startAxis),this):C.default.bool(A)?(this.options.drag.enabled=A,this):this.options.drag},beforeMove:_A,move:xA,defaults:{startAxis:"xy",lockAxis:"xy"},getCursor:function(){return"move"}},ae=BA;X.default=ae;var fA={};Object.defineProperty(fA,"__esModule",{value:!0}),fA.default=void 0;var NA={init:function(A){var t=A;NA.document=t.document,NA.DocumentFragment=t.DocumentFragment||ue,NA.SVGElement=t.SVGElement||ue,NA.SVGSVGElement=t.SVGSVGElement||ue,NA.SVGElementInstance=t.SVGElementInstance||ue,NA.Element=t.Element||ue,NA.HTMLElement=t.HTMLElement||NA.Element,NA.Event=t.Event,NA.Touch=t.Touch||ue,NA.PointerEvent=t.PointerEvent||t.MSPointerEvent},document:null,DocumentFragment:null,SVGElement:null,SVGSVGElement:null,SVGElementInstance:null,Element:null,HTMLElement:null,Event:null,Touch:null,PointerEvent:null};function ue(){}var Ut=NA;fA.default=Ut;var GA={};Object.defineProperty(GA,"__esModule",{value:!0}),GA.default=void 0;var LA={init:function(A){var t=fA.default.Element,i=A.navigator||{};LA.supportsTouch="ontouchstart"in A||C.default.func(A.DocumentTouch)&&fA.default.document instanceof A.DocumentTouch,LA.supportsPointerEvent=i.pointerEnabled!==!1&&!!fA.default.PointerEvent,LA.isIOS=/iP(hone|od|ad)/.test(i.platform),LA.isIOS7=/iP(hone|od|ad)/.test(i.platform)&&/OS 7[^\d]/.test(i.appVersion),LA.isIe9=/MSIE 9/.test(i.userAgent),LA.isOperaMobile=i.appName==="Opera"&&LA.supportsTouch&&/Presto/.test(i.userAgent),LA.prefixedMatchesSelector="matches"in t.prototype?"matches":"webkitMatchesSelector"in t.prototype?"webkitMatchesSelector":"mozMatchesSelector"in t.prototype?"mozMatchesSelector":"oMatchesSelector"in t.prototype?"oMatchesSelector":"msMatchesSelector",LA.pEventTypes=LA.supportsPointerEvent?fA.default.PointerEvent===A.MSPointerEvent?{up:"MSPointerUp",down:"MSPointerDown",over:"mouseover",out:"mouseout",move:"MSPointerMove",cancel:"MSPointerCancel"}:{up:"pointerup",down:"pointerdown",over:"pointerover",out:"pointerout",move:"pointermove",cancel:"pointercancel"}:null,LA.wheelEvent=fA.default.document&&"onmousewheel"in fA.default.document?"mousewheel":"wheel"},supportsTouch:null,supportsPointerEvent:null,isIOS7:null,isIOS:null,isIe9:null,isOperaMobile:null,prefixedMatchesSelector:null,pEventTypes:null,wheelEvent:null},Ue=LA;GA.default=Ue;var G={};function zA(A){var t=A.parentNode;if(C.default.docFrag(t)){for(;(t=t.host)&&C.default.docFrag(t););return t}return t}function WA(A,t){return p.window!==p.realWindow&&(t=t.replace(/\/deep\//g," ")),A[GA.default.prefixedMatchesSelector](t)}Object.defineProperty(G,"__esModule",{value:!0}),G.closest=function(A,t){for(;C.default.element(A);){if(WA(A,t))return A;A=zA(A)}return null},G.getActualElement=function(A){return A.correspondingUseElement||A},G.getElementClientRect=Yt,G.getElementRect=function(A){var t=Yt(A);if(!GA.default.isIOS7&&t){var i=yt(p.getWindow(A));t.left+=i.x,t.right+=i.x,t.top+=i.y,t.bottom+=i.y}return t},G.getPath=function(A){for(var t=[];A;)t.push(A),A=zA(A);return t},G.getScrollXY=yt,G.indexOfDeepestElement=function(A){for(var t,i=[],s=0;s=(parseInt(p.getWindow(H).getComputedStyle(H).zIndex,10)||0)&&(t=s);else t=s}else t=s}var O,H;return t},G.matchesSelector=WA,G.matchesUpTo=function(A,t,i){for(;C.default.element(A);){if(WA(A,t))return!0;if((A=zA(A))===i)return WA(A,t)}return!1},G.nodeContains=function(A,t){if(A.contains)return A.contains(t);for(;t;){if(t===A)return!0;t=t.parentNode}return!1},G.parentNode=zA,G.trySelector=function(A){return!!C.default.string(A)&&(fA.default.document.querySelector(A),!0)};var ye=function(A){return A.parentNode||A.host};function ut(A,t){for(var i,s=[],c=A;(i=ye(c))&&c!==t&&i!==c.ownerDocument;)s.unshift(c),c=i;return s}function yt(A){return{x:(A=A||p.window).scrollX||A.document.documentElement.scrollLeft,y:A.scrollY||A.document.documentElement.scrollTop}}function Yt(A){var t=A instanceof fA.default.SVGElement?A.getBoundingClientRect():A.getClientRects()[0];return t&&{left:t.left,right:t.right,top:t.top,bottom:t.bottom,width:t.width||t.right-t.left,height:t.height||t.bottom-t.top}}var AA={};Object.defineProperty(AA,"__esModule",{value:!0}),AA.default=function(A,t){for(var i in t)A[i]=t[i];return A};var SA={};function Re(A,t){(t==null||t>A.length)&&(t=A.length);for(var i=0,s=Array(t);i1?k(t):t[0];JA(s,A.page),vA(s,A.client),A.timeStamp=i},V.setZeroCoords=function(A){A.page.x=0,A.page.y=0,A.client.x=0,A.client.y=0},V.touchAngle=function(A,t){var i=t+"X",s=t+"Y",c=VA(A),f=c[1][i]-c[0][i],d=c[1][s]-c[0][s];return 180*Math.atan2(d,f)/Math.PI},V.touchBBox=function(A){if(!A.length)return null;var t=VA(A),i=Math.min(t[0].pageX,t[1].pageX),s=Math.min(t[0].pageY,t[1].pageY),c=Math.max(t[0].pageX,t[1].pageX),f=Math.max(t[0].pageY,t[1].pageY);return{x:i,y:s,left:i,top:s,right:c,bottom:f,width:c-i,height:f-s}},V.touchDistance=function(A,t){var i=t+"X",s=t+"Y",c=VA(A),f=c[0][i]-c[1][i],d=c[0][s]-c[1][s];return(0,aA.default)(f,d)};var D={};function W(A,t){for(var i=0;iP.left&&M.xP.top&&M.y=P.left&&jA<=P.right&&it>=P.top&&it<=P.bottom}return HA&&C.default.number(sA)&&(rA=Math.max(0,Math.min(P.right,HA.right)-Math.max(P.left,HA.left))*Math.max(0,Math.min(P.bottom,HA.bottom)-Math.max(P.top,HA.top))/(HA.width*HA.height)>=sA),y.options.drop.checker&&(rA=y.options.drop.checker(x,O,rA,y,J,H,_)),rA}(this,f,d,u,g,m,Q)},i.dynamicDrop=function(f){return C.default.bool(f)?(A.dynamicDrop=f,i):A.dynamicDrop},(0,AA.default)(t.phaselessTypes,{dragenter:!0,dragleave:!0,dropactivate:!0,dropdeactivate:!0,dropmove:!0,drop:!0}),t.methodDict.drop="dropzone",A.dynamicDrop=!1,c.actions.drop=Zt.defaults},listeners:{"interactions:before-action-start":function(A){var t=A.interaction;t.prepared.name==="drag"&&(t.dropState={cur:{dropzone:null,element:null},prev:{dropzone:null,element:null},rejected:null,events:null,activeDrops:[]})},"interactions:after-action-start":function(A,t){var i=A.interaction,s=(A.event,A.iEvent);if(i.prepared.name==="drag"){var c=i.dropState;c.activeDrops=null,c.events=null,c.activeDrops=mr(t,i.element),c.events=Qr(i,0,s),c.events.activate&&(Gn(c.activeDrops,c.events.activate),t.fire("actions/drop:start",{interaction:i,dragEvent:s}))}},"interactions:action-move":he,"interactions:after-action-move":function(A,t){var i=A.interaction,s=A.iEvent;i.prepared.name==="drag"&&(ft(i,i.dropState.events),t.fire("actions/drop:move",{interaction:i,dragEvent:s}),i.dropState.events={})},"interactions:action-end":function(A,t){if(A.interaction.prepared.name==="drag"){var i=A.interaction,s=A.iEvent;he(A,t),ft(i,i.dropState.events),t.fire("actions/drop:end",{interaction:i,dragEvent:s})}},"interactions:stop":function(A){var t=A.interaction;if(t.prepared.name==="drag"){var i=t.dropState;i&&(i.activeDrops=null,i.events=null,i.cur.dropzone=null,i.cur.element=null,i.prev.dropzone=null,i.prev.element=null,i.rejected=!1)}}},getActiveDrops:mr,getDrop:zt,getDropEvents:Qr,fireDropEvents:ft,defaults:{enabled:!1,accept:null,overlap:"pointer"}},Cr=Zt;Zr.default=Cr;var ze={};function kn(A){var t=A.interaction,i=A.iEvent,s=A.phase;if(t.prepared.name==="gesture"){var c=t.pointers.map(function(m){return m.pointer}),f=s==="start",d=s==="end",u=t.interactable.options.deltaSource;if(i.touches=[c[0],c[1]],f)i.distance=V.touchDistance(c,u),i.box=V.touchBBox(c),i.scale=1,i.ds=0,i.angle=V.touchAngle(c,u),i.da=0,t.gesture.startDistance=i.distance,t.gesture.startAngle=i.angle;else if(d){var g=t.prevEvent;i.distance=g.distance,i.box=g.box,i.scale=g.scale,i.ds=0,i.angle=g.angle,i.da=0}else i.distance=V.touchDistance(c,u),i.box=V.touchBBox(c),i.scale=i.distance/t.gesture.startDistance,i.angle=V.touchAngle(c,u),i.ds=i.scale-t.gesture.scale,i.da=i.angle-t.gesture.angle;t.gesture.distance=i.distance,t.gesture.angle=i.angle,C.default.number(i.scale)&&i.scale!==1/0&&!isNaN(i.scale)&&(t.gesture.scale=i.scale)}}Object.defineProperty(ze,"__esModule",{value:!0}),ze.default=void 0;var Ze={id:"actions/gesture",before:["actions/drag","actions/resize"],install:function(A){var t=A.actions,i=A.Interactable,s=A.defaults;i.prototype.gesturable=function(c){return C.default.object(c)?(this.options.gesture.enabled=c.enabled!==!1,this.setPerAction("gesture",c),this.setOnEvents("gesture",c),this):C.default.bool(c)?(this.options.gesture.enabled=c,this):this.options.gesture},t.map.gesture=Ze,t.methodDict.gesture="gesturable",s.actions.gesture=Ze.defaults},listeners:{"interactions:action-start":kn,"interactions:action-move":kn,"interactions:action-end":kn,"interactions:new":function(A){A.interaction.gesture={angle:0,distance:0,scale:1,startAngle:0,startDistance:0}},"auto-start:check":function(A){if(!(A.interaction.pointers.length<2)){var t=A.interactable.options.gesture;if(t&&t.enabled)return A.action={name:"gesture"},!1}}},defaults:{},getCursor:function(){return""}},as=Ze;ze.default=as;var Ft={};function qr(A,t,i,s,c,f,d){if(!t)return!1;if(t===!0){var u=C.default.number(f.width)?f.width:f.right-f.left,g=C.default.number(f.height)?f.height:f.bottom-f.top;if(d=Math.min(d,Math.abs((A==="left"||A==="right"?u:g)/2)),u<0&&(A==="left"?A="right":A==="right"&&(A="left")),g<0&&(A==="top"?A="bottom":A==="bottom"&&(A="top")),A==="left"){var m=u>=0?f.left:f.right;return i.x=0?f.top:f.bottom;return i.y(u>=0?f.right:f.left)-d;if(A==="bottom")return i.y>(g>=0?f.bottom:f.top)-d}return!!C.default.element(s)&&(C.default.element(t)?t===s:G.matchesUpTo(s,t,c))}function $r(A){var t=A.iEvent,i=A.interaction;if(i.prepared.name==="resize"&&i.resizeAxes){var s=t;i.interactable.options.resize.square?(i.resizeAxes==="y"?s.delta.x=s.delta.y:s.delta.y=s.delta.x,s.axes="xy"):(s.axes=i.resizeAxes,i.resizeAxes==="x"?s.delta.y=0:i.resizeAxes==="y"&&(s.delta.x=0))}}Object.defineProperty(Ft,"__esModule",{value:!0}),Ft.default=void 0;var Te={id:"actions/resize",before:["actions/drag"],install:function(A){var t=A.actions,i=A.browser,s=A.Interactable,c=A.defaults;Te.cursors=function(f){return f.isIe9?{x:"e-resize",y:"s-resize",xy:"se-resize",top:"n-resize",left:"w-resize",bottom:"s-resize",right:"e-resize",topleft:"se-resize",bottomright:"se-resize",topright:"ne-resize",bottomleft:"ne-resize"}:{x:"ew-resize",y:"ns-resize",xy:"nwse-resize",top:"ns-resize",left:"ew-resize",bottom:"ns-resize",right:"ew-resize",topleft:"nwse-resize",bottomright:"nwse-resize",topright:"nesw-resize",bottomleft:"nesw-resize"}}(i),Te.defaultMargin=i.supportsTouch||i.supportsPointerEvent?20:10,s.prototype.resizable=function(f){return function(d,u,g){return C.default.object(u)?(d.options.resize.enabled=u.enabled!==!1,d.setPerAction("resize",u),d.setOnEvents("resize",u),C.default.string(u.axis)&&/^x$|^y$|^xy$/.test(u.axis)?d.options.resize.axis=u.axis:u.axis===null&&(d.options.resize.axis=g.defaults.actions.resize.axis),C.default.bool(u.preserveAspectRatio)?d.options.resize.preserveAspectRatio=u.preserveAspectRatio:C.default.bool(u.square)&&(d.options.resize.square=u.square),d):C.default.bool(u)?(d.options.resize.enabled=u,d):d.options.resize}(this,f,A)},t.map.resize=Te,t.methodDict.resize="resizable",c.actions.resize=Te.defaults},listeners:{"interactions:new":function(A){A.interaction.resizeAxes="xy"},"interactions:action-start":function(A){(function(t){var i=t.iEvent,s=t.interaction;if(s.prepared.name==="resize"&&s.prepared.edges){var c=i,f=s.rect;s._rects={start:(0,AA.default)({},f),corrected:(0,AA.default)({},f),previous:(0,AA.default)({},f),delta:{left:0,right:0,width:0,top:0,bottom:0,height:0}},c.edges=s.prepared.edges,c.rect=s._rects.corrected,c.deltaRect=s._rects.delta}})(A),$r(A)},"interactions:action-move":function(A){(function(t){var i=t.iEvent,s=t.interaction;if(s.prepared.name==="resize"&&s.prepared.edges){var c=i,f=s.interactable.options.resize.invert,d=f==="reposition"||f==="negate",u=s.rect,g=s._rects,m=g.start,Q=g.corrected,y=g.delta,x=g.previous;if((0,AA.default)(x,Q),d){if((0,AA.default)(Q,u),f==="reposition"){if(Q.top>Q.bottom){var O=Q.top;Q.top=Q.bottom,Q.bottom=O}if(Q.left>Q.right){var H=Q.left;Q.left=Q.right,Q.right=H}}}else Q.top=Math.min(u.top,m.bottom),Q.bottom=Math.max(u.bottom,m.top),Q.left=Math.min(u.left,m.right),Q.right=Math.max(u.right,m.left);for(var _ in Q.width=Q.right-Q.left,Q.height=Q.bottom-Q.top,Q)y[_]=Q[_]-x[_];c.edges=s.prepared.edges,c.rect=Q,c.deltaRect=y}})(A),$r(A)},"interactions:action-end":function(A){var t=A.iEvent,i=A.interaction;if(i.prepared.name==="resize"&&i.prepared.edges){var s=t;s.edges=i.prepared.edges,s.rect=i._rects.corrected,s.deltaRect=i._rects.delta}},"auto-start:check":function(A){var t=A.interaction,i=A.interactable,s=A.element,c=A.rect,f=A.buttons;if(c){var d=(0,AA.default)({},t.coords.cur.page),u=i.options.resize;if(u&&u.enabled&&(!t.pointerIsDown||!/mouse|pointer/.test(t.pointerType)||(f&u.mouseButtons)!=0)){if(C.default.object(u.edges)){var g={left:!1,right:!1,top:!1,bottom:!1};for(var m in g)g[m]=qr(m,u.edges[m],d,t._latestPointer.eventTarget,s,c,u.margin||Te.defaultMargin);g.left=g.left&&!g.right,g.top=g.top&&!g.bottom,(g.left||g.right||g.top||g.bottom)&&(A.action={name:"resize",edges:g})}else{var Q=u.axis!=="y"&&d.x>c.right-Te.defaultMargin,y=u.axis!=="x"&&d.y>c.bottom-Te.defaultMargin;(Q||y)&&(A.action={name:"resize",axes:(Q?"x":"")+(y?"y":"")})}return!A.action&&void 0}}}},defaults:{square:!1,preserveAspectRatio:!1,axis:"xy",margin:NaN,edges:null,invert:"none"},cursors:null,getCursor:function(A){var t=A.edges,i=A.axis,s=A.name,c=Te.cursors,f=null;if(i)f=c[s+i];else if(t){for(var d="",u=["top","bottom","left","right"],g=0;g=1){var m={x:lA.x*g,y:lA.y*g};if(m.x||m.y){var Q=Bt(f);C.default.window(f)?f.scrollBy(m.x,m.y):f&&(f.scrollLeft+=m.x,f.scrollTop+=m.y);var y=Bt(f),x={x:y.x-Q.x,y:y.y-Q.y};(x.x||x.y)&&t.fire({type:"autoscroll",target:i,interactable:t,delta:x,interaction:A,container:f})}lA.prevTime=d}lA.isScrolling&&(we.default.cancel(lA.i),lA.i=we.default.request(lA.scroll))},check:function(A,t){var i;return(i=A.options[t].autoScroll)==null?void 0:i.enabled},onInteractionMove:function(A){var t=A.interaction,i=A.pointer;if(t.interacting()&&lA.check(t.interactable,t.prepared.name))if(t.simulation)lA.x=lA.y=0;else{var s,c,f,d,u=t.interactable,g=t.element,m=t.prepared.name,Q=u.options[m].autoScroll,y=pA(Q.container,u,g);if(C.default.window(y))d=i.clientXy.innerWidth-lA.margin,f=i.clientY>y.innerHeight-lA.margin;else{var x=G.getElementClientRect(y);d=i.clientXx.right-lA.margin,f=i.clientY>x.bottom-lA.margin}lA.x=c?1:d?-1:0,lA.y=f?1:s?-1:0,lA.isScrolling||(lA.margin=Q.margin,lA.speed=Q.speed,lA.start(t))}}};function pA(A,t,i){return(C.default.string(A)?(0,SA.getStringOptionResult)(A,t,i):A)||(0,p.getWindow)(i)}function Bt(A){return C.default.window(A)&&(A=window.document.body),{x:A.scrollLeft,y:A.scrollTop}}var Jn={id:"auto-scroll",install:function(A){var t=A.defaults,i=A.actions;A.autoScroll=lA,lA.now=function(){return A.now()},i.phaselessTypes.autoscroll=!0,t.perAction.autoScroll=lA.defaults},listeners:{"interactions:new":function(A){A.interaction.autoScroll=null},"interactions:destroy":function(A){A.interaction.autoScroll=null,lA.stop(),lA.interaction&&(lA.interaction=null)},"interactions:stop":lA.stop,"interactions:action-move":function(A){return lA.onInteractionMove(A)}}},$e=Jn;dt.default=$e;var fe={};Object.defineProperty(fe,"__esModule",{value:!0}),fe.copyAction=function(A,t){return A.name=t.name,A.axis=t.axis,A.edges=t.edges,A},fe.sign=void 0,fe.warnOnce=function(A,t){var i=!1;return function(){return i||(p.window.console.warn(t),i=!0),A.apply(this,arguments)}},fe.sign=function(A){return A>=0?1:-1};var Ur={};function Po(A){return C.default.bool(A)?(this.options.styleCursor=A,this):A===null?(delete this.options.styleCursor,this):this.options.styleCursor}function ls(A){return C.default.func(A)?(this.options.actionChecker=A,this):A===null?(delete this.options.actionChecker,this):this.options.actionChecker}Object.defineProperty(Ur,"__esModule",{value:!0}),Ur.default=void 0;var No={id:"auto-start/interactableMethods",install:function(A){var t=A.Interactable;t.prototype.getAction=function(i,s,c,f){var d=function(u,g,m,Q,y){var x=u.getRect(Q),O={action:null,interactable:u,interaction:m,element:Q,rect:x,buttons:g.buttons||{0:1,1:4,3:8,4:16}[g.button]};return y.fire("auto-start:check",O),O.action}(this,s,c,f,A);return this.options.actionChecker?this.options.actionChecker(i,s,d,this,f,c):d},t.prototype.ignoreFrom=(0,fe.warnOnce)(function(i){return this._backCompatOption("ignoreFrom",i)},"Interactable.ignoreFrom() has been deprecated. Use Interactble.draggable({ignoreFrom: newValue})."),t.prototype.allowFrom=(0,fe.warnOnce)(function(i){return this._backCompatOption("allowFrom",i)},"Interactable.allowFrom() has been deprecated. Use Interactble.draggable({allowFrom: newValue})."),t.prototype.actionChecker=ls,t.prototype.styleCursor=Po}};Ur.default=No;var qt={};function Go(A,t,i,s,c){return t.testIgnoreAllow(t.options[A.name],i,s)&&t.options[A.name].enabled&&An(t,i,A,c)?A:null}function Yn(A,t,i,s,c,f,d){for(var u=0,g=s.length;u=u||x.interactable===A&&((m+=O===i.name?1:0)>=f||x.element===t&&(Q++,O===i.name&&Q>=d))))return!1}return u>0}function Vo(A,t){return C.default.number(A)?(t.autoStart.maxInteractions=A,this):t.autoStart.maxInteractions}function zn(A,t,i){var s=i.autoStart.cursorElement;s&&s!==A&&(s.style.cursor=""),A.ownerDocument.documentElement.style.cursor=t,A.style.cursor=t,i.autoStart.cursorElement=t?A:null}function Xo(A,t){var i=A.interactable,s=A.element,c=A.prepared;if(A.pointerType==="mouse"&&i&&i.options.styleCursor){var f="";if(c.name){var d=i.options[c.name].cursorChecker;f=C.default.func(d)?d(c,i,s,A._interacting):t.actions.map[c.name].getCursor(c)}zn(A.element,f||"",t)}else t.autoStart.cursorElement&&zn(t.autoStart.cursorElement,"",t)}Object.defineProperty(qt,"__esModule",{value:!0}),qt.default=void 0;var us={id:"auto-start/base",before:["actions"],install:function(A){var t=A.interactStatic,i=A.defaults;A.usePlugin(Ur.default),i.base.actionChecker=null,i.base.styleCursor=!0,(0,AA.default)(i.perAction,{manualStart:!1,max:1/0,maxPerElement:1,allowFrom:null,ignoreFrom:null,mouseButtons:1}),t.maxInteractions=function(s){return Vo(s,A)},A.autoStart={maxInteractions:1/0,withinInteractionLimit:An,cursorElement:null}},listeners:{"interactions:down":function(A,t){var i=A.interaction,s=A.pointer,c=A.event,f=A.eventTarget;i.interacting()||ko(i,jn(i,s,c,f,t),t)},"interactions:move":function(A,t){(function(i,s){var c=i.interaction,f=i.pointer,d=i.event,u=i.eventTarget;c.pointerType!=="mouse"||c.pointerIsDown||c.interacting()||ko(c,jn(c,f,d,u,s),s)})(A,t),function(i,s){var c=i.interaction;if(c.pointerIsDown&&!c.interacting()&&c.pointerWasMoved&&c.prepared.name){s.fire("autoStart:before-start",i);var f=c.interactable,d=c.prepared.name;d&&f&&(f.options[d].manualStart||!An(f,c.element,c.prepared,s)?c.stop():(c.start(c.prepared,f,c.element),Xo(c,s)))}}(A,t)},"interactions:stop":function(A,t){var i=A.interaction,s=i.interactable;s&&s.options.styleCursor&&zn(i.element,"",t)}},maxInteractions:Vo,withinInteractionLimit:An,validateAction:Go},yr=us;qt.default=yr;var Fr={};Object.defineProperty(Fr,"__esModule",{value:!0}),Fr.default=void 0;var en={id:"auto-start/dragAxis",listeners:{"autoStart:before-start":function(A,t){var i=A.interaction,s=A.eventTarget,c=A.dx,f=A.dy;if(i.prepared.name==="drag"){var d=Math.abs(c),u=Math.abs(f),g=i.interactable.options.drag,m=g.startAxis,Q=d>u?"x":d0&&(t.autoStartHoldTimer=setTimeout(function(){t.start(t.prepared,t.interactable,t.element)},i))},"interactions:move":function(A){var t=A.interaction,i=A.duplicate;t.autoStartHoldTimer&&t.pointerWasMoved&&!i&&(clearTimeout(t.autoStartHoldTimer),t.autoStartHoldTimer=null)},"autoStart:before-start":function(A){var t=A.interaction;Et(t)>0&&(t.prepared.name=null)}},getHoldDuration:Et},gs=fs;Er.default=gs;var bt={};Object.defineProperty(bt,"__esModule",{value:!0}),bt.default=void 0;var br={id:"auto-start",install:function(A){A.usePlugin(qt.default),A.usePlugin(Er.default),A.usePlugin(Fr.default)}};bt.default=br;var $t={};function ds(A){return/^(always|never|auto)$/.test(A)?(this.options.preventDefault=A,this):C.default.bool(A)?(this.options.preventDefault=A?"always":"never",this):this.options.preventDefault}function Bs(A){var t=A.interaction,i=A.event;t.interactable&&t.interactable.checkAndPreventDefault(i)}function Ir(A){var t=A.Interactable;t.prototype.preventDefault=ds,t.prototype.checkAndPreventDefault=function(i){return function(s,c,f){var d=s.options.preventDefault;if(d!=="never")if(d!=="always"){if(c.events.supportsPassive&&/^touch(start|move)$/.test(f.type)){var u=(0,p.getWindow)(f.target).document,g=c.getDocOptions(u);if(!g||!g.events||g.events.passive!==!1)return}/^(mouse|pointer|touch)*(down|start)/i.test(f.type)||C.default.element(f.target)&&(0,G.matchesSelector)(f.target,"input,select,textarea,[contenteditable=true],[contenteditable=true] *")||f.preventDefault()}else f.preventDefault()}(this,A,i)},A.interactions.docEvents.push({type:"dragstart",listener:function(i){for(var s=0;sA.length)&&(t=A.length);for(var i=0,s=Array(t);i150)return null;var g=180*Math.atan2(u.prevEvent.velocityY,u.prevEvent.velocityX)/Math.PI;g<0&&(g+=360);var m=112.5<=g&&g<247.5,Q=202.5<=g&&g<337.5;return{up:Q,down:!Q&&22.5<=g&&g<157.5,left:m,right:!m&&(292.5<=g||g<67.5),angle:g,speed:u.prevEvent.speed,velocity:{x:u.prevEvent.velocityX,y:u.prevEvent.velocityY}}}},{key:"preventDefault",value:function(){}},{key:"stopImmediatePropagation",value:function(){this.immediatePropagationStopped=this.propagationStopped=!0}},{key:"stopPropagation",value:function(){this.propagationStopped=!0}}])&&ms(t.prototype,i),Object.defineProperty(t,"prototype",{writable:!1}),d}(D.BaseEvent);Le.InteractEvent=zo,Object.defineProperties(zo.prototype,{pageX:{get:function(){return this.page.x},set:function(A){this.page.x=A}},pageY:{get:function(){return this.page.y},set:function(A){this.page.y=A}},clientX:{get:function(){return this.client.x},set:function(A){this.client.x=A}},clientY:{get:function(){return this.client.y},set:function(A){this.client.y=A}},dx:{get:function(){return this.delta.x},set:function(A){this.delta.x=A}},dy:{get:function(){return this.delta.y},set:function(A){this.delta.y=A}},velocityX:{get:function(){return this.velocity.x},set:function(A){this.velocity.x=A}},velocityY:{get:function(){return this.velocity.y},set:function(A){this.velocity.y=A}}});var xr={};function Zo(A,t){for(var i=0;ithis.pointerMoveTolerance);var m=this.getPointerIndex(s),Q={pointer:s,pointerIndex:m,pointerInfo:this.pointers[m],event:c,type:"move",eventTarget:f,dx:d,dy:u,duplicate:g,interaction:this};g||V.setCoordVelocity(this.coords.velocity,this.coords.delta),this._scopeFire("interactions:move",Q),g||this.simulation||(this.interacting()&&(Q.type=null,this.move(Q)),this.pointerWasMoved&&V.copyCoords(this.coords.prev,this.coords.cur))}},{key:"move",value:function(s){s&&s.event||V.setZeroCoords(this.coords.delta),(s=(0,AA.default)({pointer:this._latestPointer.pointer,event:this._latestPointer.event,eventTarget:this._latestPointer.eventTarget,interaction:this},s||{})).phase="move",this._doPhase(s)}},{key:"pointerUp",value:function(s,c,f,d){var u=this.getPointerIndex(s);u===-1&&(u=this.updatePointer(s,c,f,!1));var g=/cancel$/i.test(c.type)?"cancel":"up";this._scopeFire("interactions:".concat(g),{pointer:s,pointerIndex:u,pointerInfo:this.pointers[u],event:c,eventTarget:f,type:g,curEventTarget:d,interaction:this}),this.simulation||this.end(c),this.removePointer(s,c)}},{key:"documentBlur",value:function(s){this.end(s),this._scopeFire("interactions:blur",{event:s,type:"blur",interaction:this})}},{key:"end",value:function(s){var c;this._ending=!0,s=s||this._latestPointer.event,this.interacting()&&(c=this._doPhase({event:s,interaction:this,phase:"end"})),this._ending=!1,c===!0&&this.stop()}},{key:"currentAction",value:function(){return this._interacting?this.prepared.name:null}},{key:"interacting",value:function(){return this._interacting}},{key:"stop",value:function(){this._scopeFire("interactions:stop",{interaction:this}),this.interactable=this.element=null,this._interacting=!1,this._stopped=!0,this.prepared.name=this.prevEvent=null}},{key:"getPointerIndex",value:function(s){var c=V.getPointerId(s);return this.pointerType==="mouse"||this.pointerType==="pen"?this.pointers.length-1:cA.findIndex(this.pointers,function(f){return f.id===c})}},{key:"getPointerInfo",value:function(s){return this.pointers[this.getPointerIndex(s)]}},{key:"updatePointer",value:function(s,c,f,d){var u=V.getPointerId(s),g=this.getPointerIndex(s),m=this.pointers[g];return d=d!==!1&&(d||/(down|start)$/i.test(c.type)),m?m.pointer=s:(m=new xr.PointerInfo(u,s,c,null,null),g=this.pointers.length,this.pointers.push(m)),V.setCoords(this.coords.cur,this.pointers.map(function(Q){return Q.pointer}),this._now()),V.setCoordDeltas(this.coords.delta,this.coords.prev,this.coords.cur),d&&(this.pointerIsDown=!0,m.downTime=this.coords.cur.timeStamp,m.downTarget=f,V.pointerExtend(this.downPointer,s),this.interacting()||(V.copyCoords(this.coords.start,this.coords.cur),V.copyCoords(this.coords.prev,this.coords.cur),this.downEvent=c,this.pointerWasMoved=!1)),this._updateLatestPointer(s,c,f),this._scopeFire("interactions:update-pointer",{pointer:s,event:c,eventTarget:f,down:d,pointerInfo:m,pointerIndex:g,interaction:this}),g}},{key:"removePointer",value:function(s,c){var f=this.getPointerIndex(s);if(f!==-1){var d=this.pointers[f];this._scopeFire("interactions:remove-pointer",{pointer:s,event:c,eventTarget:null,pointerIndex:f,pointerInfo:d,interaction:this}),this.pointers.splice(f,1),this.pointerIsDown=!1}}},{key:"_updateLatestPointer",value:function(s,c,f){this._latestPointer.pointer=s,this._latestPointer.event=c,this._latestPointer.eventTarget=f}},{key:"destroy",value:function(){this._latestPointer.pointer=null,this._latestPointer.event=null,this._latestPointer.eventTarget=null}},{key:"_createPreparedEvent",value:function(s,c,f,d){return new Le.InteractEvent(this,s,this.prepared.name,c,this.element,f,d)}},{key:"_fireEvent",value:function(s){var c;(c=this.interactable)==null||c.fire(s),(!this.prevEvent||s.timeStamp>=this.prevEvent.timeStamp)&&(this.prevEvent=s)}},{key:"_doPhase",value:function(s){var c=s.event,f=s.phase,d=s.preEnd,u=s.type,g=this.rect;if(g&&f==="move"&&(SA.addEdges(this.edges,g,this.coords.delta[this.interactable.options.deltaSource]),g.width=g.right-g.left,g.height=g.bottom-g.top),this._scopeFire("interactions:before-action-".concat(f),s)===!1)return!1;var m=s.iEvent=this._createPreparedEvent(c,f,d,u);return this._scopeFire("interactions:action-".concat(f),s),f==="start"&&(this.prevEvent=m),this._fireEvent(m),this._scopeFire("interactions:after-action-".concat(f),s),!0}},{key:"_now",value:function(){return Date.now()}}],i&&Qs(t.prototype,i),Object.defineProperty(t,"prototype",{writable:!1}),A}();ve.Interaction=$n;var Cs=$n;ve.default=Cs;var Ot={};function ie(A){A.pointerIsDown&&(Ao(A.coords.cur,A.offset.total),A.offset.pending.x=0,A.offset.pending.y=0)}function Ai(A){pt(A.interaction)}function pt(A){if(!function(i){return!(!i.offset.pending.x&&!i.offset.pending.y)}(A))return!1;var t=A.offset.pending;return Ao(A.coords.cur,t),Ao(A.coords.delta,t),SA.addEdges(A.edges,A.rect,t),t.x=0,t.y=0,!0}function Us(A){var t=A.x,i=A.y;this.offset.pending.x+=t,this.offset.pending.y+=i,this.offset.total.x+=t,this.offset.total.y+=i}function Ao(A,t){var i=A.page,s=A.client,c=t.x,f=t.y;i.x+=c,i.y+=f,s.x+=c,s.y+=f}Object.defineProperty(Ot,"__esModule",{value:!0}),Ot.addTotal=ie,Ot.applyPending=pt,Ot.default=void 0,ve._ProxyMethods.offsetBy="";var ys={id:"offset",before:["modifiers","pointer-events","actions","inertia"],install:function(A){A.Interaction.prototype.offsetBy=Us},listeners:{"interactions:new":function(A){A.interaction.offset={total:{x:0,y:0},pending:{x:0,y:0}}},"interactions:update-pointer":function(A){return ie(A.interaction)},"interactions:before-action-start":Ai,"interactions:before-action-move":Ai,"interactions:before-action-end":function(A){var t=A.interaction;if(pt(t))return t.move({offset:!0}),t.end(),!1},"interactions:stop":function(A){var t=A.interaction;t.offset.total.x=0,t.offset.total.y=0,t.offset.pending.x=0,t.offset.pending.y=0}}},Fs=ys;Ot.default=Fs;var At={};function sn(A,t){for(var i=0;if.minSpeed&&u>f.endSpeed)this.startInertia();else{if(g.result=g.setAll(this.modifierArg),!g.result.changed)return!1;this.startSmoothEnd()}return c.modification.result.rect=null,c.offsetBy(this.targetOffset),c._doPhase({interaction:c,event:s,phase:"inertiastart"}),c.offsetBy({x:-this.targetOffset.x,y:-this.targetOffset.y}),c.modification.result.rect=null,this.active=!0,c.simulation=this,!0}},{key:"startInertia",value:function(){var s=this,c=this.interaction.coords.velocity.client,f=Oe(this.interaction),d=f.resistance,u=-Math.log(f.endSpeed/this.v0)/d;this.targetOffset={x:(c.x-u)/d,y:(c.y-u)/d},this.te=u,this.lambda_v0=d/this.v0,this.one_ve_v0=1-f.endSpeed/this.v0;var g=this.modification,m=this.modifierArg;m.pageCoords={x:this.startCoords.x+this.targetOffset.x,y:this.startCoords.y+this.targetOffset.y},g.result=g.setAll(m),g.result.changed&&(this.isModified=!0,this.modifiedOffset={x:this.targetOffset.x+g.result.delta.x,y:this.targetOffset.y+g.result.delta.y}),this.onNextFrame(function(){return s.inertiaTick()})}},{key:"startSmoothEnd",value:function(){var s=this;this.smoothEnd=!0,this.isModified=!0,this.targetOffset={x:this.modification.result.delta.x,y:this.modification.result.delta.y},this.onNextFrame(function(){return s.smoothEndTick()})}},{key:"onNextFrame",value:function(s){var c=this;this.timeout=we.default.request(function(){c.active&&s()})}},{key:"inertiaTick",value:function(){var s,c,f,d,u,g=this,m=this.interaction,Q=Oe(m).resistance,y=(m._now()-this.t0)/1e3;if(y=0;f--){var d=c[f],u=d.selector,g=d.context,m=d.listeners;u===this.target&&g===this._context&&c.splice(f,1);for(var Q=m.length-1;Q>=0;Q--)this._scopeEvents.removeDelegate(this.target,this._context,s,m[Q][0],m[Q][1])}else this._scopeEvents.remove(this.target,"all")}}])&&Ss(t.prototype,i),Object.defineProperty(t,"prototype",{writable:!1}),A}();ln.Interactable=un;var fn={};function Hs(A,t){for(var i=0;iA.length)&&(t=A.length);for(var i=0,s=Array(t);i=0;_--){var sA=P[_];if(sA.selector===Q&&sA.context===y){for(var dA=sA.listeners,M=dA.length-1;M>=0;M--){var MA=no(dA[M],2),QA=MA[0],HA=MA[1],jA=HA.capture,it=HA.passive;if(QA===O&&jA===J.capture&&it===J.passive){dA.splice(M,1),dA.length||(P.splice(_,1),u(y,x,g),u(y,x,m,!0)),rA=!0;break}}if(rA)break}}},delegateListener:g,delegateUseCapture:m,delegatedEvents:s,documents:c,targets:i,supportsOptions:!1,supportsPassive:!1};function d(Q,y,x,O){var H=er(O),_=cA.find(i,function(J){return J.eventTarget===Q});_||(_={eventTarget:Q,events:{}},i.push(_)),_.events[y]||(_.events[y]=[]),Q.addEventListener&&!cA.contains(_.events[y],x)&&(Q.addEventListener(y,x,f.supportsOptions?H:H.capture),_.events[y].push(x))}function u(Q,y,x,O){var H=er(O),_=cA.findIndex(i,function(M){return M.eventTarget===Q}),J=i[_];if(J&&J.events)if(y!=="all"){var P=!1,rA=J.events[y];if(rA){if(x==="all"){for(var sA=rA.length-1;sA>=0;sA--)u(Q,y,rA[sA],H);return}for(var dA=0;dA=2)continue;if(!c.interacting()&&t===c.pointerType)return c}return null}};function oi(A,t){return A.pointers.some(function(i){return i.id===t})}var oo=bA;tt.default=oo;var Mr={};function ht(A){return ht=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ht(A)}function De(A,t){return function(i){if(Array.isArray(i))return i}(A)||function(i,s){var c=i==null?null:typeof Symbol!="undefined"&&i[Symbol.iterator]||i["@@iterator"];if(c!=null){var f,d,u=[],g=!0,m=!1;try{for(c=c.call(i);!(g=(f=c.next()).done)&&(u.push(f.value),!s||u.length!==s);g=!0);}catch(Q){m=!0,d=Q}finally{try{g||c.return==null||c.return()}finally{if(m)throw d}}return u}}(A,t)||function(i,s){if(i){if(typeof i=="string")return ii(i,s);var c=Object.prototype.toString.call(i).slice(8,-1);return c==="Object"&&i.constructor&&(c=i.constructor.name),c==="Map"||c==="Set"?Array.from(i):c==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(c)?ii(i,s):void 0}}(A,t)||function(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. -In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}function ii(A,t){(t==null||t>A.length)&&(t=A.length);for(var i=0,s=Array(t);i=0;s--){var c=t.interactions.list[s];c.interactable===i&&(c.stop(),t.fire("interactions:destroy",{interaction:c}),c.destroy(),t.interactions.list.length>2&&t.interactions.list.splice(s,1))}}},onDocSignal:pn,doOnInteractions:rr,methodNames:Ge},ai=si;Mr.default=ai;var nr={};function or(A){return or=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},or(A)}function ir(){return ir=typeof Reflect!="undefined"&&Reflect.get?Reflect.get.bind():function(A,t,i){var s=ci(A,t);if(s){var c=Object.getOwnPropertyDescriptor(s,t);return c.get?c.get.call(arguments.length<3?A:i):c.value}},ir.apply(this,arguments)}function ci(A,t){for(;!Object.prototype.hasOwnProperty.call(A,t)&&(A=ge(A))!==null;);return A}function me(A,t){return me=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(i,s){return i.__proto__=s,i},me(A,t)}function vt(A,t){if(t&&(or(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(i){if(i===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return i}(A)}function ge(A){return ge=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},ge(A)}function Ae(A,t){if(!(A instanceof t))throw new TypeError("Cannot call a class as a function")}function rt(A,t){for(var i=0;iA.length)&&(t=A.length);for(var i=0,s=Array(t);iMath.abs(g.y),u.coords,u.rect),(0,AA.default)(s,u.coords)),u.eventProps},defaults:{ratio:"preserve",equalDelta:!1,modifiers:[],enabled:!1}};function pi(A,t,i){var s=A.startCoords,c=A.edgeSign;t?i.y=s.y+(i.x-s.x)*c.y:i.x=s.x+(i.y-s.y)*c.x}function hi(A,t,i,s){var c=A.startRect,f=A.startCoords,d=A.ratio,u=A.edgeSign;if(t){var g=s.width/d;i.y=f.y+(g-c.height)*u.y}else{var m=s.height*d;i.x=f.x+(m-c.width)*u.x}}Mt.aspectRatio=uo;var Ds=(0,te.makeModifier)(uo,"aspectRatio");Mt.default=Ds;var ke={};Object.defineProperty(ke,"__esModule",{value:!0}),ke.default=void 0;var wi=function(){};wi._defaults={};var Ks=wi;ke.default=Ks;var _r={};Object.defineProperty(_r,"__esModule",{value:!0}),Object.defineProperty(_r,"default",{enumerable:!0,get:function(){return ke.default}});var de={};function Qn(A,t,i){return C.default.func(A)?SA.resolveRectLike(A,t.interactable,t.element,[i.x,i.y,t]):SA.resolveRectLike(A,t.interactable,t.element)}Object.defineProperty(de,"__esModule",{value:!0}),de.default=void 0,de.getRestrictionRect=Qn,de.restrict=void 0;var vi={start:function(A){var t=A.rect,i=A.startOffset,s=A.state,c=A.interaction,f=A.pageCoords,d=s.options,u=d.elementRect,g=(0,AA.default)({left:0,top:0,right:0,bottom:0},d.offset||{});if(t&&u){var m=Qn(d.restriction,c,f);if(m){var Q=m.right-m.left-t.width,y=m.bottom-m.top-t.height;Q<0&&(g.left+=Q,g.right+=Q),y<0&&(g.top+=y,g.bottom+=y)}g.left+=i.left-t.width*u.left,g.top+=i.top-t.height*u.top,g.right+=i.right-t.width*(1-u.right),g.bottom+=i.bottom-t.height*(1-u.bottom)}s.offset=g},set:function(A){var t=A.coords,i=A.interaction,s=A.state,c=s.options,f=s.offset,d=Qn(c.restriction,i,t);if(d){var u=SA.xywhToTlbr(d);t.x=Math.max(Math.min(u.right-f.right,t.x),u.left+f.left),t.y=Math.max(Math.min(u.bottom-f.bottom,t.y),u.top+f.top)}},defaults:{restriction:null,elementRect:null,offset:null,endOnly:!1,enabled:!1}};de.restrict=vi;var Ms=(0,te.makeModifier)(vi,"restrict");de.default=Ms;var Ve={};Object.defineProperty(Ve,"__esModule",{value:!0}),Ve.restrictEdges=Ve.default=void 0;var mi={top:1/0,left:1/0,bottom:-1/0,right:-1/0},Qi={top:-1/0,left:-1/0,bottom:1/0,right:1/0};function Rt(A,t){for(var i=["top","left","bottom","right"],s=0;sA.length)&&(t=A.length);for(var i=0,s=Array(t);i{var rd="Expected a function",tu=0/0,nd="[object Symbol]",od=/^\s+|\s+$/g,id=/^[-+]0x[0-9a-f]+$/i,sd=/^0b[01]+$/i,ad=/^0o[0-7]+$/i,cd=parseInt,ld=typeof global=="object"&&global&&global.Object===Object&&global,ud=typeof self=="object"&&self&&self.Object===Object&&self,fd=ld||ud||Function("return this")(),gd=Object.prototype,dd=gd.toString,Bd=Math.max,pd=Math.min,ja=function(){return fd.Date.now()};function hd(h,p,U){var b,E,C,R,j,iA,UA=0,X=!1,_A=!1,xA=!0;if(typeof h!="function")throw new TypeError(rd);p=ru(p)||0,za(U)&&(X=!!U.leading,_A="maxWait"in U,C=_A?Bd(ru(U.maxWait)||0,p):C,xA="trailing"in U?!!U.trailing:xA);function BA(G){var zA=b,WA=E;return b=E=void 0,UA=G,R=h.apply(WA,zA),R}function ae(G){return UA=G,j=setTimeout(ue,p),X?BA(G):R}function fA(G){var zA=G-iA,WA=G-UA,ye=p-zA;return _A?pd(ye,C-WA):ye}function NA(G){var zA=G-iA,WA=G-UA;return iA===void 0||zA>=p||zA<0||_A&&WA>=C}function ue(){var G=ja();if(NA(G))return Ut(G);j=setTimeout(ue,fA(G))}function Ut(G){return j=void 0,xA&&b?BA(G):(b=E=void 0,R)}function GA(){j!==void 0&&clearTimeout(j),UA=0,b=iA=E=j=void 0}function LA(){return j===void 0?R:Ut(ja())}function Ue(){var G=ja(),zA=NA(G);if(b=arguments,E=this,iA=G,zA){if(j===void 0)return ae(iA);if(_A)return j=setTimeout(ue,p),BA(iA)}return j===void 0&&(j=setTimeout(ue,p)),R}return Ue.cancel=GA,Ue.flush=LA,Ue}function za(h){var p=typeof h;return!!h&&(p=="object"||p=="function")}function wd(h){return!!h&&typeof h=="object"}function vd(h){return typeof h=="symbol"||wd(h)&&dd.call(h)==nd}function ru(h){if(typeof h=="number")return h;if(vd(h))return tu;if(za(h)){var p=typeof h.valueOf=="function"?h.valueOf():h;h=za(p)?p+"":p}if(typeof h!="string")return h===0?h:+h;h=h.replace(od,"");var U=sd.test(h);return U||ad.test(h)?cd(h.slice(2),U?2:8):id.test(h)?tu:+h}nu.exports=hd});var su=Xi((IB,iu)=>{iu.exports={compareTwoStrings:ou,findBestMatch:md};function ou(h,p){if(h=h.replace(/\s+/g,""),p=p.replace(/\s+/g,""),h===p)return 1;if(h.length<2||p.length<2)return 0;let U=new Map;for(let E=0;E0&&(U.set(C,R-1),b++)}return 2*b/(h.length+p.length-2)}function md(h,p){if(!Qd(h,p))throw new Error("Bad arguments: First argument should be a string, second should be an array of strings");let U=[],b=0;for(let C=0;CU[b].rating&&(b=C)}let E=U[b];return{ratings:U,bestMatch:E,bestMatchIndex:b}}function Qd(h,p){return!(typeof h!="string"||!Array.isArray(p)||!p.length||p.find(function(U){return typeof U!="string"}))}});var Vl=Eo(Al(),1);function bo(h,p){try{return JSON.parse(window[h].getItem(p))}catch(U){return T.error("get storage data error",{err:U}),null}}function Io(h,p,U){try{return window[h].setItem(p,JSON.stringify(U)),U}catch(b){return T.error("setup storage error",{err:b}),null}}function Wi(h,p,U,b){try{let E=bo(h,p);if(!E)throw new Error("Can't find initial state");let C={...E,[U]:b};return window[h].setItem(p,JSON.stringify(C)),C}catch(E){return T.error("set storage value error",{err:E}),null}}function Ji(h,p){try{window[h].removeItem(p)}catch(U){T.error("clear storage error",{err:U})}}var el="strigo-sdk",tl="strigo.io",rl=["strigo-exercises"],nl=["orig-iframe"],Yi=` +}`,Wf=function(r){Jf(r,"."+Ea+Vf+Gc+` + .`+ba+Xf+Gc)},Jf=function(r,e){var o=r.ownerDocument;if(o){var n=o.createElement("style");n.textContent=e,r.appendChild(n)}},kc=function(){function r(){}return r.getOrigin=function(e){var o=r._link;return o?(o.href=e,o.href=o.href,o.protocol+o.hostname+o.port):"about:blank"},r.isSameOrigin=function(e){return r.getOrigin(e)===r._origin},r.setContext=function(e){r._link=e.document.createElement("a"),r._origin=r.getOrigin(e.location.href)},r._origin="about:blank",r}(),Yf=function(){function r(e,o){this.context=e,this._options=o,this._cache={}}return r.prototype.addImage=function(e){var o=Promise.resolve();return this.has(e)||(Sa(e)||qf(e))&&(this._cache[e]=this.loadImage(e)).catch(function(){}),o},r.prototype.match=function(e){return this._cache[e]},r.prototype.loadImage=function(e){return E(this,void 0,void 0,function(){var o,n,a,l,B=this;return b(this,function(v){switch(v.label){case 0:return o=kc.isSameOrigin(e),n=!Ia(e)&&this._options.useCORS===!0&&Be.SUPPORT_CORS_IMAGES&&!o,a=!Ia(e)&&!o&&!Sa(e)&&typeof this._options.proxy=="string"&&Be.SUPPORT_CORS_XHR&&!n,!o&&this._options.allowTaint===!1&&!Ia(e)&&!Sa(e)&&!a&&!n?[2]:(l=e,a?[4,this.proxy(l)]:[3,2]);case 1:l=v.sent(),v.label=2;case 2:return this.context.logger.debug("Added image "+e.substring(0,256)),[4,new Promise(function(w,F){var I=new Image;I.onload=function(){return w(I)},I.onerror=F,($f(l)||n)&&(I.crossOrigin="anonymous"),I.src=l,I.complete===!0&&setTimeout(function(){return w(I)},500),B._options.imageTimeout>0&&setTimeout(function(){return F("Timed out ("+B._options.imageTimeout+"ms) loading image")},B._options.imageTimeout)})];case 3:return[2,v.sent()]}})})},r.prototype.has=function(e){return typeof this._cache[e]!="undefined"},r.prototype.keys=function(){return Promise.resolve(Object.keys(this._cache))},r.prototype.proxy=function(e){var o=this,n=this._options.proxy;if(!n)throw new Error("No proxy defined");var a=e.substring(0,256);return new Promise(function(l,B){var v=Be.SUPPORT_RESPONSE_TYPE?"blob":"text",w=new XMLHttpRequest;w.onload=function(){if(w.status===200)if(v==="text")l(w.response);else{var S=new FileReader;S.addEventListener("load",function(){return l(S.result)},!1),S.addEventListener("error",function(T){return B(T)},!1),S.readAsDataURL(w.response)}else B("Failed to proxy resource "+a+" with status code "+w.status)},w.onerror=B;var F=n.indexOf("?")>-1?"&":"?";if(w.open("GET",""+n+F+"url="+encodeURIComponent(e)+"&responseType="+v),v!=="text"&&w instanceof XMLHttpRequest&&(w.responseType=v),o._options.imageTimeout){var I=o._options.imageTimeout;w.timeout=I,w.ontimeout=function(){return B("Timed out ("+I+"ms) proxying "+a)}}w.send()})},r}(),jf=/^data:image\/svg\+xml/i,zf=/^data:image\/.*;base64,/i,Zf=/^data:image\/.*/i,qf=function(r){return Be.SUPPORT_SVG_DRAWING||!Ag(r)},Ia=function(r){return Zf.test(r)},$f=function(r){return zf.test(r)},Sa=function(r){return r.substr(0,4)==="blob"},Ag=function(r){return r.substr(-3).toLowerCase()==="svg"||jf.test(r)},z=function(){function r(e,o){this.type=0,this.x=e,this.y=o}return r.prototype.add=function(e,o){return new r(this.x+e,this.y+o)},r}(),Dn=function(r,e,o){return new z(r.x+(e.x-r.x)*o,r.y+(e.y-r.y)*o)},Mi=function(){function r(e,o,n,a){this.type=1,this.start=e,this.startControl=o,this.endControl=n,this.end=a}return r.prototype.subdivide=function(e,o){var n=Dn(this.start,this.startControl,e),a=Dn(this.startControl,this.endControl,e),l=Dn(this.endControl,this.end,e),B=Dn(n,a,e),v=Dn(a,l,e),w=Dn(B,v,e);return o?new r(this.start,n,B,w):new r(w,v,l,this.end)},r.prototype.add=function(e,o){return new r(this.start.add(e,o),this.startControl.add(e,o),this.endControl.add(e,o),this.end.add(e,o))},r.prototype.reverse=function(){return new r(this.end,this.endControl,this.startControl,this.start)},r}(),We=function(r){return r.type===1},eg=function(){function r(e){var o=e.styles,n=e.bounds,a=rr(o.borderTopLeftRadius,n.width,n.height),l=a[0],B=a[1],v=rr(o.borderTopRightRadius,n.width,n.height),w=v[0],F=v[1],I=rr(o.borderBottomRightRadius,n.width,n.height),S=I[0],T=I[1],q=rr(o.borderBottomLeftRadius,n.width,n.height),N=q[0],j=q[1],hA=[];hA.push((l+w)/n.width),hA.push((N+S)/n.width),hA.push((B+j)/n.height),hA.push((F+T)/n.height);var nA=Math.max.apply(Math,hA);nA>1&&(l/=nA,B/=nA,w/=nA,F/=nA,S/=nA,T/=nA,N/=nA,j/=nA);var tA=n.width-w,SA=n.height-T,mA=n.width-S,uA=n.height-j,Z=o.borderTopWidth,EA=o.borderRightWidth,bA=o.borderBottomWidth,gA=o.borderLeftWidth,ne=KA(o.paddingTop,e.bounds.width),be=KA(o.paddingRight,e.bounds.width),Me=KA(o.paddingBottom,e.bounds.width),_A=KA(o.paddingLeft,e.bounds.width);this.topLeftBorderDoubleOuterBox=l>0||B>0?XA(n.left+gA/3,n.top+Z/3,l-gA/3,B-Z/3,LA.TOP_LEFT):new z(n.left+gA/3,n.top+Z/3),this.topRightBorderDoubleOuterBox=l>0||B>0?XA(n.left+tA,n.top+Z/3,w-EA/3,F-Z/3,LA.TOP_RIGHT):new z(n.left+n.width-EA/3,n.top+Z/3),this.bottomRightBorderDoubleOuterBox=S>0||T>0?XA(n.left+mA,n.top+SA,S-EA/3,T-bA/3,LA.BOTTOM_RIGHT):new z(n.left+n.width-EA/3,n.top+n.height-bA/3),this.bottomLeftBorderDoubleOuterBox=N>0||j>0?XA(n.left+gA/3,n.top+uA,N-gA/3,j-bA/3,LA.BOTTOM_LEFT):new z(n.left+gA/3,n.top+n.height-bA/3),this.topLeftBorderDoubleInnerBox=l>0||B>0?XA(n.left+gA*2/3,n.top+Z*2/3,l-gA*2/3,B-Z*2/3,LA.TOP_LEFT):new z(n.left+gA*2/3,n.top+Z*2/3),this.topRightBorderDoubleInnerBox=l>0||B>0?XA(n.left+tA,n.top+Z*2/3,w-EA*2/3,F-Z*2/3,LA.TOP_RIGHT):new z(n.left+n.width-EA*2/3,n.top+Z*2/3),this.bottomRightBorderDoubleInnerBox=S>0||T>0?XA(n.left+mA,n.top+SA,S-EA*2/3,T-bA*2/3,LA.BOTTOM_RIGHT):new z(n.left+n.width-EA*2/3,n.top+n.height-bA*2/3),this.bottomLeftBorderDoubleInnerBox=N>0||j>0?XA(n.left+gA*2/3,n.top+uA,N-gA*2/3,j-bA*2/3,LA.BOTTOM_LEFT):new z(n.left+gA*2/3,n.top+n.height-bA*2/3),this.topLeftBorderStroke=l>0||B>0?XA(n.left+gA/2,n.top+Z/2,l-gA/2,B-Z/2,LA.TOP_LEFT):new z(n.left+gA/2,n.top+Z/2),this.topRightBorderStroke=l>0||B>0?XA(n.left+tA,n.top+Z/2,w-EA/2,F-Z/2,LA.TOP_RIGHT):new z(n.left+n.width-EA/2,n.top+Z/2),this.bottomRightBorderStroke=S>0||T>0?XA(n.left+mA,n.top+SA,S-EA/2,T-bA/2,LA.BOTTOM_RIGHT):new z(n.left+n.width-EA/2,n.top+n.height-bA/2),this.bottomLeftBorderStroke=N>0||j>0?XA(n.left+gA/2,n.top+uA,N-gA/2,j-bA/2,LA.BOTTOM_LEFT):new z(n.left+gA/2,n.top+n.height-bA/2),this.topLeftBorderBox=l>0||B>0?XA(n.left,n.top,l,B,LA.TOP_LEFT):new z(n.left,n.top),this.topRightBorderBox=w>0||F>0?XA(n.left+tA,n.top,w,F,LA.TOP_RIGHT):new z(n.left+n.width,n.top),this.bottomRightBorderBox=S>0||T>0?XA(n.left+mA,n.top+SA,S,T,LA.BOTTOM_RIGHT):new z(n.left+n.width,n.top+n.height),this.bottomLeftBorderBox=N>0||j>0?XA(n.left,n.top+uA,N,j,LA.BOTTOM_LEFT):new z(n.left,n.top+n.height),this.topLeftPaddingBox=l>0||B>0?XA(n.left+gA,n.top+Z,Math.max(0,l-gA),Math.max(0,B-Z),LA.TOP_LEFT):new z(n.left+gA,n.top+Z),this.topRightPaddingBox=w>0||F>0?XA(n.left+Math.min(tA,n.width-EA),n.top+Z,tA>n.width+EA?0:Math.max(0,w-EA),Math.max(0,F-Z),LA.TOP_RIGHT):new z(n.left+n.width-EA,n.top+Z),this.bottomRightPaddingBox=S>0||T>0?XA(n.left+Math.min(mA,n.width-gA),n.top+Math.min(SA,n.height-bA),Math.max(0,S-EA),Math.max(0,T-bA),LA.BOTTOM_RIGHT):new z(n.left+n.width-EA,n.top+n.height-bA),this.bottomLeftPaddingBox=N>0||j>0?XA(n.left+gA,n.top+Math.min(uA,n.height-bA),Math.max(0,N-gA),Math.max(0,j-bA),LA.BOTTOM_LEFT):new z(n.left+gA,n.top+n.height-bA),this.topLeftContentBox=l>0||B>0?XA(n.left+gA+_A,n.top+Z+ne,Math.max(0,l-(gA+_A)),Math.max(0,B-(Z+ne)),LA.TOP_LEFT):new z(n.left+gA+_A,n.top+Z+ne),this.topRightContentBox=w>0||F>0?XA(n.left+Math.min(tA,n.width+gA+_A),n.top+Z+ne,tA>n.width+gA+_A?0:w-gA+_A,F-(Z+ne),LA.TOP_RIGHT):new z(n.left+n.width-(EA+be),n.top+Z+ne),this.bottomRightContentBox=S>0||T>0?XA(n.left+Math.min(mA,n.width-(gA+_A)),n.top+Math.min(SA,n.height+Z+ne),Math.max(0,S-(EA+be)),T-(bA+Me),LA.BOTTOM_RIGHT):new z(n.left+n.width-(EA+be),n.top+n.height-(bA+Me)),this.bottomLeftContentBox=N>0||j>0?XA(n.left+gA+_A,n.top+uA,Math.max(0,N-(gA+_A)),j-(bA+Me),LA.BOTTOM_LEFT):new z(n.left+gA+_A,n.top+n.height-(bA+Me))}return r}(),LA;(function(r){r[r.TOP_LEFT=0]="TOP_LEFT",r[r.TOP_RIGHT=1]="TOP_RIGHT",r[r.BOTTOM_RIGHT=2]="BOTTOM_RIGHT",r[r.BOTTOM_LEFT=3]="BOTTOM_LEFT"})(LA||(LA={}));var XA=function(r,e,o,n,a){var l=4*((Math.sqrt(2)-1)/3),B=o*l,v=n*l,w=r+o,F=e+n;switch(a){case LA.TOP_LEFT:return new Mi(new z(r,F),new z(r,F-v),new z(w-B,e),new z(w,e));case LA.TOP_RIGHT:return new Mi(new z(r,e),new z(r+B,e),new z(w,F-v),new z(w,F));case LA.BOTTOM_RIGHT:return new Mi(new z(w,e),new z(w,e+v),new z(r+B,F),new z(r,F));case LA.BOTTOM_LEFT:default:return new Mi(new z(w,F),new z(w-B,F),new z(r,e+v),new z(r,e))}},Ri=function(r){return[r.topLeftBorderBox,r.topRightBorderBox,r.bottomRightBorderBox,r.bottomLeftBorderBox]},tg=function(r){return[r.topLeftContentBox,r.topRightContentBox,r.bottomRightContentBox,r.bottomLeftContentBox]},_i=function(r){return[r.topLeftPaddingBox,r.topRightPaddingBox,r.bottomRightPaddingBox,r.bottomLeftPaddingBox]},rg=function(){function r(e,o,n){this.offsetX=e,this.offsetY=o,this.matrix=n,this.type=0,this.target=2|4}return r}(),Pi=function(){function r(e,o){this.path=e,this.target=o,this.type=1}return r}(),ng=function(){function r(e){this.opacity=e,this.type=2,this.target=2|4}return r}(),og=function(r){return r.type===0},Vc=function(r){return r.type===1},ig=function(r){return r.type===2},Xc=function(r,e){return r.length===e.length?r.some(function(o,n){return o===e[n]}):!1},sg=function(r,e,o,n,a){return r.map(function(l,B){switch(B){case 0:return l.add(e,o);case 1:return l.add(e+n,o);case 2:return l.add(e+n,o+a);case 3:return l.add(e,o+a)}return l})},Wc=function(){function r(e){this.element=e,this.inlineLevel=[],this.nonInlineLevel=[],this.negativeZIndex=[],this.zeroOrAutoZIndexOrTransformedOrOpacity=[],this.positiveZIndex=[],this.nonPositionedFloats=[],this.nonPositionedInlineLevel=[]}return r}(),Jc=function(){function r(e,o){if(this.container=e,this.parent=o,this.effects=[],this.curves=new eg(this.container),this.container.styles.opacity<1&&this.effects.push(new ng(this.container.styles.opacity)),this.container.styles.transform!==null){var n=this.container.bounds.left+this.container.styles.transformOrigin[0].number,a=this.container.bounds.top+this.container.styles.transformOrigin[1].number,l=this.container.styles.transform;this.effects.push(new rg(n,a,l))}if(this.container.styles.overflowX!==0){var B=Ri(this.curves),v=_i(this.curves);Xc(B,v)?this.effects.push(new Pi(B,2|4)):(this.effects.push(new Pi(B,2)),this.effects.push(new Pi(v,4)))}}return r.prototype.getEffects=function(e){for(var o=[2,3].indexOf(this.container.styles.position)===-1,n=this.parent,a=this.effects.slice(0);n;){var l=n.effects.filter(function(w){return!Vc(w)});if(o||n.container.styles.position!==0||!n.parent){if(a.unshift.apply(a,l),o=[2,3].indexOf(n.container.styles.position)===-1,n.container.styles.overflowX!==0){var B=Ri(n.curves),v=_i(n.curves);Xc(B,v)||a.unshift(new Pi(v,2|4))}}else a.unshift.apply(a,l);n=n.parent}return a.filter(function(w){return u(w.target,e)})},r}(),Ha=function(r,e,o,n){r.container.elements.forEach(function(a){var l=u(a.flags,4),B=u(a.flags,2),v=new Jc(a,r);u(a.styles.display,2048)&&n.push(v);var w=u(a.flags,8)?[]:n;if(l||B){var F=l||a.styles.isPositioned()?o:e,I=new Wc(v);if(a.styles.isPositioned()||a.styles.opacity<1||a.styles.isTransformed()){var S=a.styles.zIndex.order;if(S<0){var T=0;F.negativeZIndex.some(function(N,j){return S>N.element.container.styles.zIndex.order?(T=j,!1):T>0}),F.negativeZIndex.splice(T,0,I)}else if(S>0){var q=0;F.positiveZIndex.some(function(N,j){return S>=N.element.container.styles.zIndex.order?(q=j+1,!1):q>0}),F.positiveZIndex.splice(q,0,I)}else F.zeroOrAutoZIndexOrTransformedOrOpacity.push(I)}else a.styles.isFloating()?F.nonPositionedFloats.push(I):F.nonPositionedInlineLevel.push(I);Ha(v,I,l?I:o,w)}else a.styles.isInlineLevel()?e.inlineLevel.push(v):e.nonInlineLevel.push(v),Ha(v,e,o,w);u(a.flags,8)&&Yc(a,w)})},Yc=function(r,e){for(var o=r instanceof va?r.start:1,n=r instanceof va?r.reversed:!1,a=0;a0&&o.intrinsicHeight>0){var l=Gi(o),B=_i(n);this.path(B),this.ctx.save(),this.ctx.clip(),this.ctx.drawImage(a,0,0,o.intrinsicWidth,o.intrinsicHeight,l.left,l.top,l.width,l.height),this.ctx.restore()}},e.prototype.renderNodeContent=function(o){return E(this,void 0,void 0,function(){var n,a,l,B,v,w,tA,tA,F,I,S,T,mA,q,N,uA,j,hA,nA,tA,SA,mA,uA;return b(this,function(Z){switch(Z.label){case 0:this.applyEffects(o.getEffects(4)),n=o.container,a=o.curves,l=n.styles,B=0,v=n.textNodes,Z.label=1;case 1:return B0&&pe>0&&(bA=l.ctx.createPattern(uA,"repeat"),l.renderRepeat(ne,bA,Ie,Se))):Ks(I)&&(gA=xa(o,n,[null,null,null]),ne=gA[0],be=gA[1],Me=gA[2],_A=gA[3],pe=gA[4],fr=I.position.length===0?[tr]:I.position,Ie=KA(fr[0],_A),Se=KA(fr[fr.length-1],pe),Wr=fi(I,Ie,Se,_A,pe),Qt=Wr[0],gr=Wr[1],Qt>0&&gr>0&&(Jr=l.ctx.createRadialGradient(be+Ie,Me+Se,0,be+Ie,Me+Se,Qt),ui(I.stops,Qt*2).forEach(function(yo){return Jr.addColorStop(yo.stop,Ae(yo.color))}),l.path(ne),l.ctx.fillStyle=Jr,Qt!==gr?(Yr=o.bounds.left+.5*o.bounds.width,Vt=o.bounds.top+.5*o.bounds.height,jr=gr/Qt,Xt=1/jr,l.ctx.save(),l.ctx.translate(Yr,Vt),l.ctx.transform(1,0,0,jr,0,0),l.ctx.translate(-Yr,-Vt),l.ctx.fillRect(be,Xt*(Me-Vt)+Vt,_A,pe*Xt),l.ctx.restore()):l.ctx.fill())),Rn.label=6;case 6:return n--,[2]}})},l=this,B=0,v=o.styles.backgroundImage.slice(0).reverse(),F.label=1;case 1:return B0?I.style!==2?[3,5]:[4,this.renderDashedDottedBorder(I.color,I.width,v,o.curves,2)]:[3,11]):[3,13];case 4:return T.sent(),[3,11];case 5:return I.style!==3?[3,7]:[4,this.renderDashedDottedBorder(I.color,I.width,v,o.curves,3)];case 6:return T.sent(),[3,11];case 7:return I.style!==4?[3,9]:[4,this.renderDoubleBorder(I.color,I.width,v,o.curves)];case 8:return T.sent(),[3,11];case 9:return[4,this.renderSolidBorder(I.color,v,o.curves)];case 10:T.sent(),T.label=11;case 11:v++,T.label=12;case 12:return w++,[3,3];case 13:return[2]}})})},e.prototype.renderDashedDottedBorder=function(o,n,a,l,B){return E(this,void 0,void 0,function(){var v,w,F,I,S,T,q,N,j,hA,nA,tA,SA,mA,uA,Z,uA,Z;return b(this,function(EA){return this.ctx.save(),v=ug(l,a),w=jc(l,a),B===2&&(this.path(w),this.ctx.clip()),We(w[0])?(F=w[0].start.x,I=w[0].start.y):(F=w[0].x,I=w[0].y),We(w[1])?(S=w[1].end.x,T=w[1].end.y):(S=w[1].x,T=w[1].y),a===0||a===2?q=Math.abs(F-S):q=Math.abs(I-T),this.ctx.beginPath(),B===3?this.formatPath(v):this.formatPath(w.slice(0,2)),N=n<3?n*3:n*2,j=n<3?n*2:n,B===3&&(N=n,j=n),hA=!0,q<=N*2?hA=!1:q<=N*2+j?(nA=q/(2*N+j),N*=nA,j*=nA):(tA=Math.floor((q+j)/(N+j)),SA=(q-tA*N)/(tA-1),mA=(q-(tA+1)*N)/tA,j=mA<=0||Math.abs(j-SA){(function(h){typeof zl=="object"&&typeof Ja!="undefined"?Ja.exports=h():typeof define=="function"&&define.amd?define([],h):(typeof window!="undefined"?window:typeof global!="undefined"?global:typeof self!="undefined"?self:this).interact=h()})(function(){var h={};Object.defineProperty(h,"__esModule",{value:!0}),h.default=void 0,h.default=function(A){return!(!A||!A.Window)&&A instanceof A.Window};var p={};Object.defineProperty(p,"__esModule",{value:!0}),p.getWindow=function(A){return(0,h.default)(A)?A:(A.ownerDocument||A).defaultView||E.window},p.init=b,p.window=p.realWindow=void 0;var C=void 0;p.realWindow=C;var E=void 0;function b(A){p.realWindow=C=A;var t=A.document.createTextNode("");t.ownerDocument!==A.document&&typeof A.wrap=="function"&&A.wrap(t)===t&&(A=A.wrap(A)),p.window=E=A}p.window=E,typeof window!="undefined"&&window&&b(window);var U={};function K(A){return K=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},K(A)}Object.defineProperty(U,"__esModule",{value:!0}),U.default=void 0;var X=function(A){return!!A&&K(A)==="object"},oA=function(A){return typeof A=="function"},yA={window:function(A){return A===p.window||(0,h.default)(A)},docFrag:function(A){return X(A)&&A.nodeType===11},object:X,func:oA,number:function(A){return typeof A=="number"},bool:function(A){return typeof A=="boolean"},string:function(A){return typeof A=="string"},element:function(A){if(!A||K(A)!=="object")return!1;var t=p.getWindow(A)||p.window;return/object|function/.test(typeof Element=="undefined"?"undefined":K(Element))?A instanceof Element||A instanceof t.Element:A.nodeType===1&&typeof A.nodeName=="string"},plainObject:function(A){return X(A)&&!!A.constructor&&/function Object\b/.test(A.constructor.toString())},array:function(A){return X(A)&&A.length!==void 0&&oA(A.splice)}};U.default=yA;var $={};function CA(A){var t=A.interaction;if(t.prepared.name==="drag"){var i=t.prepared.axis;i==="x"?(t.coords.cur.page.y=t.coords.start.page.y,t.coords.cur.client.y=t.coords.start.client.y,t.coords.velocity.client.y=0,t.coords.velocity.page.y=0):i==="y"&&(t.coords.cur.page.x=t.coords.start.page.x,t.coords.cur.client.x=t.coords.start.client.x,t.coords.velocity.client.x=0,t.coords.velocity.page.x=0)}}function TA(A){var t=A.iEvent,i=A.interaction;if(i.prepared.name==="drag"){var s=i.prepared.axis;if(s==="x"||s==="y"){var c=s==="x"?"y":"x";t.page[c]=i.coords.start.page[c],t.client[c]=i.coords.start.client[c],t.delta[c]=0}}}Object.defineProperty($,"__esModule",{value:!0}),$.default=void 0;var BA={id:"actions/drag",install:function(A){var t=A.actions,i=A.Interactable,s=A.defaults;i.prototype.draggable=BA.draggable,t.map.drag=BA,t.methodDict.drag="draggable",s.actions.drag=BA.defaults},listeners:{"interactions:before-action-move":CA,"interactions:action-resume":CA,"interactions:action-move":TA,"auto-start:check":function(A){var t=A.interaction,i=A.interactable,s=A.buttons,c=i.options.drag;if(c&&c.enabled&&(!t.pointerIsDown||!/mouse|pointer/.test(t.pointerType)||(s&i.options.drag.mouseButtons)!=0))return A.action={name:"drag",axis:c.lockAxis==="start"?c.startAxis:c.lockAxis},!1}},draggable:function(A){return U.default.object(A)?(this.options.drag.enabled=A.enabled!==!1,this.setPerAction("drag",A),this.setOnEvents("drag",A),/^(xy|x|y|start)$/.test(A.lockAxis)&&(this.options.drag.lockAxis=A.lockAxis),/^(xy|x|y)$/.test(A.startAxis)&&(this.options.drag.startAxis=A.startAxis),this):U.default.bool(A)?(this.options.drag.enabled=A,this):this.options.drag},beforeMove:CA,move:TA,defaults:{startAxis:"xy",lockAxis:"xy"},getCursor:function(){return"move"}},ce=BA;$.default=ce;var fA={};Object.defineProperty(fA,"__esModule",{value:!0}),fA.default=void 0;var NA={init:function(A){var t=A;NA.document=t.document,NA.DocumentFragment=t.DocumentFragment||ue,NA.SVGElement=t.SVGElement||ue,NA.SVGSVGElement=t.SVGSVGElement||ue,NA.SVGElementInstance=t.SVGElementInstance||ue,NA.Element=t.Element||ue,NA.HTMLElement=t.HTMLElement||NA.Element,NA.Event=t.Event,NA.Touch=t.Touch||ue,NA.PointerEvent=t.PointerEvent||t.MSPointerEvent},document:null,DocumentFragment:null,SVGElement:null,SVGSVGElement:null,SVGElementInstance:null,Element:null,HTMLElement:null,Event:null,Touch:null,PointerEvent:null};function ue(){}var Ut=NA;fA.default=Ut;var GA={};Object.defineProperty(GA,"__esModule",{value:!0}),GA.default=void 0;var OA={init:function(A){var t=fA.default.Element,i=A.navigator||{};OA.supportsTouch="ontouchstart"in A||U.default.func(A.DocumentTouch)&&fA.default.document instanceof A.DocumentTouch,OA.supportsPointerEvent=i.pointerEnabled!==!1&&!!fA.default.PointerEvent,OA.isIOS=/iP(hone|od|ad)/.test(i.platform),OA.isIOS7=/iP(hone|od|ad)/.test(i.platform)&&/OS 7[^\d]/.test(i.appVersion),OA.isIe9=/MSIE 9/.test(i.userAgent),OA.isOperaMobile=i.appName==="Opera"&&OA.supportsTouch&&/Presto/.test(i.userAgent),OA.prefixedMatchesSelector="matches"in t.prototype?"matches":"webkitMatchesSelector"in t.prototype?"webkitMatchesSelector":"mozMatchesSelector"in t.prototype?"mozMatchesSelector":"oMatchesSelector"in t.prototype?"oMatchesSelector":"msMatchesSelector",OA.pEventTypes=OA.supportsPointerEvent?fA.default.PointerEvent===A.MSPointerEvent?{up:"MSPointerUp",down:"MSPointerDown",over:"mouseover",out:"mouseout",move:"MSPointerMove",cancel:"MSPointerCancel"}:{up:"pointerup",down:"pointerdown",over:"pointerover",out:"pointerout",move:"pointermove",cancel:"pointercancel"}:null,OA.wheelEvent=fA.default.document&&"onmousewheel"in fA.default.document?"mousewheel":"wheel"},supportsTouch:null,supportsPointerEvent:null,isIOS7:null,isIOS:null,isIe9:null,isOperaMobile:null,prefixedMatchesSelector:null,pEventTypes:null,wheelEvent:null},Ue=OA;GA.default=Ue;var G={};function zA(A){var t=A.parentNode;if(U.default.docFrag(t)){for(;(t=t.host)&&U.default.docFrag(t););return t}return t}function WA(A,t){return p.window!==p.realWindow&&(t=t.replace(/\/deep\//g," ")),A[GA.default.prefixedMatchesSelector](t)}Object.defineProperty(G,"__esModule",{value:!0}),G.closest=function(A,t){for(;U.default.element(A);){if(WA(A,t))return A;A=zA(A)}return null},G.getActualElement=function(A){return A.correspondingUseElement||A},G.getElementClientRect=Yt,G.getElementRect=function(A){var t=Yt(A);if(!GA.default.isIOS7&&t){var i=yt(p.getWindow(A));t.left+=i.x,t.right+=i.x,t.top+=i.y,t.bottom+=i.y}return t},G.getPath=function(A){for(var t=[];A;)t.push(A),A=zA(A);return t},G.getScrollXY=yt,G.indexOfDeepestElement=function(A){for(var t,i=[],s=0;s=(parseInt(p.getWindow(H).getComputedStyle(H).zIndex,10)||0)&&(t=s);else t=s}else t=s}var O,H;return t},G.matchesSelector=WA,G.matchesUpTo=function(A,t,i){for(;U.default.element(A);){if(WA(A,t))return!0;if((A=zA(A))===i)return WA(A,t)}return!1},G.nodeContains=function(A,t){if(A.contains)return A.contains(t);for(;t;){if(t===A)return!0;t=t.parentNode}return!1},G.parentNode=zA,G.trySelector=function(A){return!!U.default.string(A)&&(fA.default.document.querySelector(A),!0)};var ye=function(A){return A.parentNode||A.host};function ut(A,t){for(var i,s=[],c=A;(i=ye(c))&&c!==t&&i!==c.ownerDocument;)s.unshift(c),c=i;return s}function yt(A){return{x:(A=A||p.window).scrollX||A.document.documentElement.scrollLeft,y:A.scrollY||A.document.documentElement.scrollTop}}function Yt(A){var t=A instanceof fA.default.SVGElement?A.getBoundingClientRect():A.getClientRects()[0];return t&&{left:t.left,right:t.right,top:t.top,bottom:t.bottom,width:t.width||t.right-t.left,height:t.height||t.bottom-t.top}}var AA={};Object.defineProperty(AA,"__esModule",{value:!0}),AA.default=function(A,t){for(var i in t)A[i]=t[i];return A};var HA={};function Re(A,t){(t==null||t>A.length)&&(t=A.length);for(var i=0,s=Array(t);i1?k(t):t[0];JA(s,A.page),vA(s,A.client),A.timeStamp=i},V.setZeroCoords=function(A){A.page.x=0,A.page.y=0,A.client.x=0,A.client.y=0},V.touchAngle=function(A,t){var i=t+"X",s=t+"Y",c=VA(A),f=c[1][i]-c[0][i],d=c[1][s]-c[0][s];return 180*Math.atan2(d,f)/Math.PI},V.touchBBox=function(A){if(!A.length)return null;var t=VA(A),i=Math.min(t[0].pageX,t[1].pageX),s=Math.min(t[0].pageY,t[1].pageY),c=Math.max(t[0].pageX,t[1].pageX),f=Math.max(t[0].pageY,t[1].pageY);return{x:i,y:s,left:i,top:s,right:c,bottom:f,width:c-i,height:f-s}},V.touchDistance=function(A,t){var i=t+"X",s=t+"Y",c=VA(A),f=c[0][i]-c[1][i],d=c[0][s]-c[1][s];return(0,aA.default)(f,d)};var D={};function W(A,t){for(var i=0;iP.left&&R.xP.top&&R.y=P.left&&jA<=P.right&&it>=P.top&&it<=P.bottom}return xA&&U.default.number(sA)&&(rA=Math.max(0,Math.min(P.right,xA.right)-Math.max(P.left,xA.left))*Math.max(0,Math.min(P.bottom,xA.bottom)-Math.max(P.top,xA.top))/(xA.width*xA.height)>=sA),y.options.drop.checker&&(rA=y.options.drop.checker(x,O,rA,y,J,H,_)),rA}(this,f,d,u,g,m,Q)},i.dynamicDrop=function(f){return U.default.bool(f)?(A.dynamicDrop=f,i):A.dynamicDrop},(0,AA.default)(t.phaselessTypes,{dragenter:!0,dragleave:!0,dropactivate:!0,dropdeactivate:!0,dropmove:!0,drop:!0}),t.methodDict.drop="dropzone",A.dynamicDrop=!1,c.actions.drop=Zt.defaults},listeners:{"interactions:before-action-start":function(A){var t=A.interaction;t.prepared.name==="drag"&&(t.dropState={cur:{dropzone:null,element:null},prev:{dropzone:null,element:null},rejected:null,events:null,activeDrops:[]})},"interactions:after-action-start":function(A,t){var i=A.interaction,s=(A.event,A.iEvent);if(i.prepared.name==="drag"){var c=i.dropState;c.activeDrops=null,c.events=null,c.activeDrops=mr(t,i.element),c.events=Qr(i,0,s),c.events.activate&&(Nn(c.activeDrops,c.events.activate),t.fire("actions/drop:start",{interaction:i,dragEvent:s}))}},"interactions:action-move":he,"interactions:after-action-move":function(A,t){var i=A.interaction,s=A.iEvent;i.prepared.name==="drag"&&(ft(i,i.dropState.events),t.fire("actions/drop:move",{interaction:i,dragEvent:s}),i.dropState.events={})},"interactions:action-end":function(A,t){if(A.interaction.prepared.name==="drag"){var i=A.interaction,s=A.iEvent;he(A,t),ft(i,i.dropState.events),t.fire("actions/drop:end",{interaction:i,dragEvent:s})}},"interactions:stop":function(A){var t=A.interaction;if(t.prepared.name==="drag"){var i=t.dropState;i&&(i.activeDrops=null,i.events=null,i.cur.dropzone=null,i.cur.element=null,i.prev.dropzone=null,i.prev.element=null,i.rejected=!1)}}},getActiveDrops:mr,getDrop:zt,getDropEvents:Qr,fireDropEvents:ft,defaults:{enabled:!1,accept:null,overlap:"pointer"}},Cr=Zt;Zr.default=Cr;var ze={};function Gn(A){var t=A.interaction,i=A.iEvent,s=A.phase;if(t.prepared.name==="gesture"){var c=t.pointers.map(function(m){return m.pointer}),f=s==="start",d=s==="end",u=t.interactable.options.deltaSource;if(i.touches=[c[0],c[1]],f)i.distance=V.touchDistance(c,u),i.box=V.touchBBox(c),i.scale=1,i.ds=0,i.angle=V.touchAngle(c,u),i.da=0,t.gesture.startDistance=i.distance,t.gesture.startAngle=i.angle;else if(d){var g=t.prevEvent;i.distance=g.distance,i.box=g.box,i.scale=g.scale,i.ds=0,i.angle=g.angle,i.da=0}else i.distance=V.touchDistance(c,u),i.box=V.touchBBox(c),i.scale=i.distance/t.gesture.startDistance,i.angle=V.touchAngle(c,u),i.ds=i.scale-t.gesture.scale,i.da=i.angle-t.gesture.angle;t.gesture.distance=i.distance,t.gesture.angle=i.angle,U.default.number(i.scale)&&i.scale!==1/0&&!isNaN(i.scale)&&(t.gesture.scale=i.scale)}}Object.defineProperty(ze,"__esModule",{value:!0}),ze.default=void 0;var Ze={id:"actions/gesture",before:["actions/drag","actions/resize"],install:function(A){var t=A.actions,i=A.Interactable,s=A.defaults;i.prototype.gesturable=function(c){return U.default.object(c)?(this.options.gesture.enabled=c.enabled!==!1,this.setPerAction("gesture",c),this.setOnEvents("gesture",c),this):U.default.bool(c)?(this.options.gesture.enabled=c,this):this.options.gesture},t.map.gesture=Ze,t.methodDict.gesture="gesturable",s.actions.gesture=Ze.defaults},listeners:{"interactions:action-start":Gn,"interactions:action-move":Gn,"interactions:action-end":Gn,"interactions:new":function(A){A.interaction.gesture={angle:0,distance:0,scale:1,startAngle:0,startDistance:0}},"auto-start:check":function(A){if(!(A.interaction.pointers.length<2)){var t=A.interactable.options.gesture;if(t&&t.enabled)return A.action={name:"gesture"},!1}}},defaults:{},getCursor:function(){return""}},as=Ze;ze.default=as;var Ft={};function qr(A,t,i,s,c,f,d){if(!t)return!1;if(t===!0){var u=U.default.number(f.width)?f.width:f.right-f.left,g=U.default.number(f.height)?f.height:f.bottom-f.top;if(d=Math.min(d,Math.abs((A==="left"||A==="right"?u:g)/2)),u<0&&(A==="left"?A="right":A==="right"&&(A="left")),g<0&&(A==="top"?A="bottom":A==="bottom"&&(A="top")),A==="left"){var m=u>=0?f.left:f.right;return i.x=0?f.top:f.bottom;return i.y(u>=0?f.right:f.left)-d;if(A==="bottom")return i.y>(g>=0?f.bottom:f.top)-d}return!!U.default.element(s)&&(U.default.element(t)?t===s:G.matchesUpTo(s,t,c))}function $r(A){var t=A.iEvent,i=A.interaction;if(i.prepared.name==="resize"&&i.resizeAxes){var s=t;i.interactable.options.resize.square?(i.resizeAxes==="y"?s.delta.x=s.delta.y:s.delta.y=s.delta.x,s.axes="xy"):(s.axes=i.resizeAxes,i.resizeAxes==="x"?s.delta.y=0:i.resizeAxes==="y"&&(s.delta.x=0))}}Object.defineProperty(Ft,"__esModule",{value:!0}),Ft.default=void 0;var Te={id:"actions/resize",before:["actions/drag"],install:function(A){var t=A.actions,i=A.browser,s=A.Interactable,c=A.defaults;Te.cursors=function(f){return f.isIe9?{x:"e-resize",y:"s-resize",xy:"se-resize",top:"n-resize",left:"w-resize",bottom:"s-resize",right:"e-resize",topleft:"se-resize",bottomright:"se-resize",topright:"ne-resize",bottomleft:"ne-resize"}:{x:"ew-resize",y:"ns-resize",xy:"nwse-resize",top:"ns-resize",left:"ew-resize",bottom:"ns-resize",right:"ew-resize",topleft:"nwse-resize",bottomright:"nwse-resize",topright:"nesw-resize",bottomleft:"nesw-resize"}}(i),Te.defaultMargin=i.supportsTouch||i.supportsPointerEvent?20:10,s.prototype.resizable=function(f){return function(d,u,g){return U.default.object(u)?(d.options.resize.enabled=u.enabled!==!1,d.setPerAction("resize",u),d.setOnEvents("resize",u),U.default.string(u.axis)&&/^x$|^y$|^xy$/.test(u.axis)?d.options.resize.axis=u.axis:u.axis===null&&(d.options.resize.axis=g.defaults.actions.resize.axis),U.default.bool(u.preserveAspectRatio)?d.options.resize.preserveAspectRatio=u.preserveAspectRatio:U.default.bool(u.square)&&(d.options.resize.square=u.square),d):U.default.bool(u)?(d.options.resize.enabled=u,d):d.options.resize}(this,f,A)},t.map.resize=Te,t.methodDict.resize="resizable",c.actions.resize=Te.defaults},listeners:{"interactions:new":function(A){A.interaction.resizeAxes="xy"},"interactions:action-start":function(A){(function(t){var i=t.iEvent,s=t.interaction;if(s.prepared.name==="resize"&&s.prepared.edges){var c=i,f=s.rect;s._rects={start:(0,AA.default)({},f),corrected:(0,AA.default)({},f),previous:(0,AA.default)({},f),delta:{left:0,right:0,width:0,top:0,bottom:0,height:0}},c.edges=s.prepared.edges,c.rect=s._rects.corrected,c.deltaRect=s._rects.delta}})(A),$r(A)},"interactions:action-move":function(A){(function(t){var i=t.iEvent,s=t.interaction;if(s.prepared.name==="resize"&&s.prepared.edges){var c=i,f=s.interactable.options.resize.invert,d=f==="reposition"||f==="negate",u=s.rect,g=s._rects,m=g.start,Q=g.corrected,y=g.delta,x=g.previous;if((0,AA.default)(x,Q),d){if((0,AA.default)(Q,u),f==="reposition"){if(Q.top>Q.bottom){var O=Q.top;Q.top=Q.bottom,Q.bottom=O}if(Q.left>Q.right){var H=Q.left;Q.left=Q.right,Q.right=H}}}else Q.top=Math.min(u.top,m.bottom),Q.bottom=Math.max(u.bottom,m.top),Q.left=Math.min(u.left,m.right),Q.right=Math.max(u.right,m.left);for(var _ in Q.width=Q.right-Q.left,Q.height=Q.bottom-Q.top,Q)y[_]=Q[_]-x[_];c.edges=s.prepared.edges,c.rect=Q,c.deltaRect=y}})(A),$r(A)},"interactions:action-end":function(A){var t=A.iEvent,i=A.interaction;if(i.prepared.name==="resize"&&i.prepared.edges){var s=t;s.edges=i.prepared.edges,s.rect=i._rects.corrected,s.deltaRect=i._rects.delta}},"auto-start:check":function(A){var t=A.interaction,i=A.interactable,s=A.element,c=A.rect,f=A.buttons;if(c){var d=(0,AA.default)({},t.coords.cur.page),u=i.options.resize;if(u&&u.enabled&&(!t.pointerIsDown||!/mouse|pointer/.test(t.pointerType)||(f&u.mouseButtons)!=0)){if(U.default.object(u.edges)){var g={left:!1,right:!1,top:!1,bottom:!1};for(var m in g)g[m]=qr(m,u.edges[m],d,t._latestPointer.eventTarget,s,c,u.margin||Te.defaultMargin);g.left=g.left&&!g.right,g.top=g.top&&!g.bottom,(g.left||g.right||g.top||g.bottom)&&(A.action={name:"resize",edges:g})}else{var Q=u.axis!=="y"&&d.x>c.right-Te.defaultMargin,y=u.axis!=="x"&&d.y>c.bottom-Te.defaultMargin;(Q||y)&&(A.action={name:"resize",axes:(Q?"x":"")+(y?"y":"")})}return!A.action&&void 0}}}},defaults:{square:!1,preserveAspectRatio:!1,axis:"xy",margin:NaN,edges:null,invert:"none"},cursors:null,getCursor:function(A){var t=A.edges,i=A.axis,s=A.name,c=Te.cursors,f=null;if(i)f=c[s+i];else if(t){for(var d="",u=["top","bottom","left","right"],g=0;g=1){var m={x:lA.x*g,y:lA.y*g};if(m.x||m.y){var Q=Bt(f);U.default.window(f)?f.scrollBy(m.x,m.y):f&&(f.scrollLeft+=m.x,f.scrollTop+=m.y);var y=Bt(f),x={x:y.x-Q.x,y:y.y-Q.y};(x.x||x.y)&&t.fire({type:"autoscroll",target:i,interactable:t,delta:x,interaction:A,container:f})}lA.prevTime=d}lA.isScrolling&&(we.default.cancel(lA.i),lA.i=we.default.request(lA.scroll))},check:function(A,t){var i;return(i=A.options[t].autoScroll)==null?void 0:i.enabled},onInteractionMove:function(A){var t=A.interaction,i=A.pointer;if(t.interacting()&&lA.check(t.interactable,t.prepared.name))if(t.simulation)lA.x=lA.y=0;else{var s,c,f,d,u=t.interactable,g=t.element,m=t.prepared.name,Q=u.options[m].autoScroll,y=pA(Q.container,u,g);if(U.default.window(y))d=i.clientXy.innerWidth-lA.margin,f=i.clientY>y.innerHeight-lA.margin;else{var x=G.getElementClientRect(y);d=i.clientXx.right-lA.margin,f=i.clientY>x.bottom-lA.margin}lA.x=c?1:d?-1:0,lA.y=f?1:s?-1:0,lA.isScrolling||(lA.margin=Q.margin,lA.speed=Q.speed,lA.start(t))}}};function pA(A,t,i){return(U.default.string(A)?(0,HA.getStringOptionResult)(A,t,i):A)||(0,p.getWindow)(i)}function Bt(A){return U.default.window(A)&&(A=window.document.body),{x:A.scrollLeft,y:A.scrollTop}}var Wn={id:"auto-scroll",install:function(A){var t=A.defaults,i=A.actions;A.autoScroll=lA,lA.now=function(){return A.now()},i.phaselessTypes.autoscroll=!0,t.perAction.autoScroll=lA.defaults},listeners:{"interactions:new":function(A){A.interaction.autoScroll=null},"interactions:destroy":function(A){A.interaction.autoScroll=null,lA.stop(),lA.interaction&&(lA.interaction=null)},"interactions:stop":lA.stop,"interactions:action-move":function(A){return lA.onInteractionMove(A)}}},$e=Wn;dt.default=$e;var fe={};Object.defineProperty(fe,"__esModule",{value:!0}),fe.copyAction=function(A,t){return A.name=t.name,A.axis=t.axis,A.edges=t.edges,A},fe.sign=void 0,fe.warnOnce=function(A,t){var i=!1;return function(){return i||(p.window.console.warn(t),i=!0),A.apply(this,arguments)}},fe.sign=function(A){return A>=0?1:-1};var Ur={};function _o(A){return U.default.bool(A)?(this.options.styleCursor=A,this):A===null?(delete this.options.styleCursor,this):this.options.styleCursor}function ls(A){return U.default.func(A)?(this.options.actionChecker=A,this):A===null?(delete this.options.actionChecker,this):this.options.actionChecker}Object.defineProperty(Ur,"__esModule",{value:!0}),Ur.default=void 0;var Po={id:"auto-start/interactableMethods",install:function(A){var t=A.Interactable;t.prototype.getAction=function(i,s,c,f){var d=function(u,g,m,Q,y){var x=u.getRect(Q),O={action:null,interactable:u,interaction:m,element:Q,rect:x,buttons:g.buttons||{0:1,1:4,3:8,4:16}[g.button]};return y.fire("auto-start:check",O),O.action}(this,s,c,f,A);return this.options.actionChecker?this.options.actionChecker(i,s,d,this,f,c):d},t.prototype.ignoreFrom=(0,fe.warnOnce)(function(i){return this._backCompatOption("ignoreFrom",i)},"Interactable.ignoreFrom() has been deprecated. Use Interactble.draggable({ignoreFrom: newValue})."),t.prototype.allowFrom=(0,fe.warnOnce)(function(i){return this._backCompatOption("allowFrom",i)},"Interactable.allowFrom() has been deprecated. Use Interactble.draggable({allowFrom: newValue})."),t.prototype.actionChecker=ls,t.prototype.styleCursor=_o}};Ur.default=Po;var qt={};function No(A,t,i,s,c){return t.testIgnoreAllow(t.options[A.name],i,s)&&t.options[A.name].enabled&&An(t,i,A,c)?A:null}function Jn(A,t,i,s,c,f,d){for(var u=0,g=s.length;u=u||x.interactable===A&&((m+=O===i.name?1:0)>=f||x.element===t&&(Q++,O===i.name&&Q>=d))))return!1}return u>0}function ko(A,t){return U.default.number(A)?(t.autoStart.maxInteractions=A,this):t.autoStart.maxInteractions}function jn(A,t,i){var s=i.autoStart.cursorElement;s&&s!==A&&(s.style.cursor=""),A.ownerDocument.documentElement.style.cursor=t,A.style.cursor=t,i.autoStart.cursorElement=t?A:null}function Vo(A,t){var i=A.interactable,s=A.element,c=A.prepared;if(A.pointerType==="mouse"&&i&&i.options.styleCursor){var f="";if(c.name){var d=i.options[c.name].cursorChecker;f=U.default.func(d)?d(c,i,s,A._interacting):t.actions.map[c.name].getCursor(c)}jn(A.element,f||"",t)}else t.autoStart.cursorElement&&jn(t.autoStart.cursorElement,"",t)}Object.defineProperty(qt,"__esModule",{value:!0}),qt.default=void 0;var us={id:"auto-start/base",before:["actions"],install:function(A){var t=A.interactStatic,i=A.defaults;A.usePlugin(Ur.default),i.base.actionChecker=null,i.base.styleCursor=!0,(0,AA.default)(i.perAction,{manualStart:!1,max:1/0,maxPerElement:1,allowFrom:null,ignoreFrom:null,mouseButtons:1}),t.maxInteractions=function(s){return ko(s,A)},A.autoStart={maxInteractions:1/0,withinInteractionLimit:An,cursorElement:null}},listeners:{"interactions:down":function(A,t){var i=A.interaction,s=A.pointer,c=A.event,f=A.eventTarget;i.interacting()||Go(i,Yn(i,s,c,f,t),t)},"interactions:move":function(A,t){(function(i,s){var c=i.interaction,f=i.pointer,d=i.event,u=i.eventTarget;c.pointerType!=="mouse"||c.pointerIsDown||c.interacting()||Go(c,Yn(c,f,d,u,s),s)})(A,t),function(i,s){var c=i.interaction;if(c.pointerIsDown&&!c.interacting()&&c.pointerWasMoved&&c.prepared.name){s.fire("autoStart:before-start",i);var f=c.interactable,d=c.prepared.name;d&&f&&(f.options[d].manualStart||!An(f,c.element,c.prepared,s)?c.stop():(c.start(c.prepared,f,c.element),Vo(c,s)))}}(A,t)},"interactions:stop":function(A,t){var i=A.interaction,s=i.interactable;s&&s.options.styleCursor&&jn(i.element,"",t)}},maxInteractions:ko,withinInteractionLimit:An,validateAction:No},yr=us;qt.default=yr;var Fr={};Object.defineProperty(Fr,"__esModule",{value:!0}),Fr.default=void 0;var en={id:"auto-start/dragAxis",listeners:{"autoStart:before-start":function(A,t){var i=A.interaction,s=A.eventTarget,c=A.dx,f=A.dy;if(i.prepared.name==="drag"){var d=Math.abs(c),u=Math.abs(f),g=i.interactable.options.drag,m=g.startAxis,Q=d>u?"x":d0&&(t.autoStartHoldTimer=setTimeout(function(){t.start(t.prepared,t.interactable,t.element)},i))},"interactions:move":function(A){var t=A.interaction,i=A.duplicate;t.autoStartHoldTimer&&t.pointerWasMoved&&!i&&(clearTimeout(t.autoStartHoldTimer),t.autoStartHoldTimer=null)},"autoStart:before-start":function(A){var t=A.interaction;Et(t)>0&&(t.prepared.name=null)}},getHoldDuration:Et},gs=fs;Er.default=gs;var bt={};Object.defineProperty(bt,"__esModule",{value:!0}),bt.default=void 0;var br={id:"auto-start",install:function(A){A.usePlugin(qt.default),A.usePlugin(Er.default),A.usePlugin(Fr.default)}};bt.default=br;var $t={};function ds(A){return/^(always|never|auto)$/.test(A)?(this.options.preventDefault=A,this):U.default.bool(A)?(this.options.preventDefault=A?"always":"never",this):this.options.preventDefault}function Bs(A){var t=A.interaction,i=A.event;t.interactable&&t.interactable.checkAndPreventDefault(i)}function Ir(A){var t=A.Interactable;t.prototype.preventDefault=ds,t.prototype.checkAndPreventDefault=function(i){return function(s,c,f){var d=s.options.preventDefault;if(d!=="never")if(d!=="always"){if(c.events.supportsPassive&&/^touch(start|move)$/.test(f.type)){var u=(0,p.getWindow)(f.target).document,g=c.getDocOptions(u);if(!g||!g.events||g.events.passive!==!1)return}/^(mouse|pointer|touch)*(down|start)/i.test(f.type)||U.default.element(f.target)&&(0,G.matchesSelector)(f.target,"input,select,textarea,[contenteditable=true],[contenteditable=true] *")||f.preventDefault()}else f.preventDefault()}(this,A,i)},A.interactions.docEvents.push({type:"dragstart",listener:function(i){for(var s=0;sA.length)&&(t=A.length);for(var i=0,s=Array(t);i150)return null;var g=180*Math.atan2(u.prevEvent.velocityY,u.prevEvent.velocityX)/Math.PI;g<0&&(g+=360);var m=112.5<=g&&g<247.5,Q=202.5<=g&&g<337.5;return{up:Q,down:!Q&&22.5<=g&&g<157.5,left:m,right:!m&&(292.5<=g||g<67.5),angle:g,speed:u.prevEvent.speed,velocity:{x:u.prevEvent.velocityX,y:u.prevEvent.velocityY}}}},{key:"preventDefault",value:function(){}},{key:"stopImmediatePropagation",value:function(){this.immediatePropagationStopped=this.propagationStopped=!0}},{key:"stopPropagation",value:function(){this.propagationStopped=!0}}])&&ms(t.prototype,i),Object.defineProperty(t,"prototype",{writable:!1}),d}(D.BaseEvent);Le.InteractEvent=jo,Object.defineProperties(jo.prototype,{pageX:{get:function(){return this.page.x},set:function(A){this.page.x=A}},pageY:{get:function(){return this.page.y},set:function(A){this.page.y=A}},clientX:{get:function(){return this.client.x},set:function(A){this.client.x=A}},clientY:{get:function(){return this.client.y},set:function(A){this.client.y=A}},dx:{get:function(){return this.delta.x},set:function(A){this.delta.x=A}},dy:{get:function(){return this.delta.y},set:function(A){this.delta.y=A}},velocityX:{get:function(){return this.velocity.x},set:function(A){this.velocity.x=A}},velocityY:{get:function(){return this.velocity.y},set:function(A){this.velocity.y=A}}});var xr={};function zo(A,t){for(var i=0;ithis.pointerMoveTolerance);var m=this.getPointerIndex(s),Q={pointer:s,pointerIndex:m,pointerInfo:this.pointers[m],event:c,type:"move",eventTarget:f,dx:d,dy:u,duplicate:g,interaction:this};g||V.setCoordVelocity(this.coords.velocity,this.coords.delta),this._scopeFire("interactions:move",Q),g||this.simulation||(this.interacting()&&(Q.type=null,this.move(Q)),this.pointerWasMoved&&V.copyCoords(this.coords.prev,this.coords.cur))}},{key:"move",value:function(s){s&&s.event||V.setZeroCoords(this.coords.delta),(s=(0,AA.default)({pointer:this._latestPointer.pointer,event:this._latestPointer.event,eventTarget:this._latestPointer.eventTarget,interaction:this},s||{})).phase="move",this._doPhase(s)}},{key:"pointerUp",value:function(s,c,f,d){var u=this.getPointerIndex(s);u===-1&&(u=this.updatePointer(s,c,f,!1));var g=/cancel$/i.test(c.type)?"cancel":"up";this._scopeFire("interactions:".concat(g),{pointer:s,pointerIndex:u,pointerInfo:this.pointers[u],event:c,eventTarget:f,type:g,curEventTarget:d,interaction:this}),this.simulation||this.end(c),this.removePointer(s,c)}},{key:"documentBlur",value:function(s){this.end(s),this._scopeFire("interactions:blur",{event:s,type:"blur",interaction:this})}},{key:"end",value:function(s){var c;this._ending=!0,s=s||this._latestPointer.event,this.interacting()&&(c=this._doPhase({event:s,interaction:this,phase:"end"})),this._ending=!1,c===!0&&this.stop()}},{key:"currentAction",value:function(){return this._interacting?this.prepared.name:null}},{key:"interacting",value:function(){return this._interacting}},{key:"stop",value:function(){this._scopeFire("interactions:stop",{interaction:this}),this.interactable=this.element=null,this._interacting=!1,this._stopped=!0,this.prepared.name=this.prevEvent=null}},{key:"getPointerIndex",value:function(s){var c=V.getPointerId(s);return this.pointerType==="mouse"||this.pointerType==="pen"?this.pointers.length-1:cA.findIndex(this.pointers,function(f){return f.id===c})}},{key:"getPointerInfo",value:function(s){return this.pointers[this.getPointerIndex(s)]}},{key:"updatePointer",value:function(s,c,f,d){var u=V.getPointerId(s),g=this.getPointerIndex(s),m=this.pointers[g];return d=d!==!1&&(d||/(down|start)$/i.test(c.type)),m?m.pointer=s:(m=new xr.PointerInfo(u,s,c,null,null),g=this.pointers.length,this.pointers.push(m)),V.setCoords(this.coords.cur,this.pointers.map(function(Q){return Q.pointer}),this._now()),V.setCoordDeltas(this.coords.delta,this.coords.prev,this.coords.cur),d&&(this.pointerIsDown=!0,m.downTime=this.coords.cur.timeStamp,m.downTarget=f,V.pointerExtend(this.downPointer,s),this.interacting()||(V.copyCoords(this.coords.start,this.coords.cur),V.copyCoords(this.coords.prev,this.coords.cur),this.downEvent=c,this.pointerWasMoved=!1)),this._updateLatestPointer(s,c,f),this._scopeFire("interactions:update-pointer",{pointer:s,event:c,eventTarget:f,down:d,pointerInfo:m,pointerIndex:g,interaction:this}),g}},{key:"removePointer",value:function(s,c){var f=this.getPointerIndex(s);if(f!==-1){var d=this.pointers[f];this._scopeFire("interactions:remove-pointer",{pointer:s,event:c,eventTarget:null,pointerIndex:f,pointerInfo:d,interaction:this}),this.pointers.splice(f,1),this.pointerIsDown=!1}}},{key:"_updateLatestPointer",value:function(s,c,f){this._latestPointer.pointer=s,this._latestPointer.event=c,this._latestPointer.eventTarget=f}},{key:"destroy",value:function(){this._latestPointer.pointer=null,this._latestPointer.event=null,this._latestPointer.eventTarget=null}},{key:"_createPreparedEvent",value:function(s,c,f,d){return new Le.InteractEvent(this,s,this.prepared.name,c,this.element,f,d)}},{key:"_fireEvent",value:function(s){var c;(c=this.interactable)==null||c.fire(s),(!this.prevEvent||s.timeStamp>=this.prevEvent.timeStamp)&&(this.prevEvent=s)}},{key:"_doPhase",value:function(s){var c=s.event,f=s.phase,d=s.preEnd,u=s.type,g=this.rect;if(g&&f==="move"&&(HA.addEdges(this.edges,g,this.coords.delta[this.interactable.options.deltaSource]),g.width=g.right-g.left,g.height=g.bottom-g.top),this._scopeFire("interactions:before-action-".concat(f),s)===!1)return!1;var m=s.iEvent=this._createPreparedEvent(c,f,d,u);return this._scopeFire("interactions:action-".concat(f),s),f==="start"&&(this.prevEvent=m),this._fireEvent(m),this._scopeFire("interactions:after-action-".concat(f),s),!0}},{key:"_now",value:function(){return Date.now()}}],i&&Qs(t.prototype,i),Object.defineProperty(t,"prototype",{writable:!1}),A}();ve.Interaction=qn;var Cs=qn;ve.default=Cs;var Ot={};function se(A){A.pointerIsDown&&($n(A.coords.cur,A.offset.total),A.offset.pending.x=0,A.offset.pending.y=0)}function $o(A){pt(A.interaction)}function pt(A){if(!function(i){return!(!i.offset.pending.x&&!i.offset.pending.y)}(A))return!1;var t=A.offset.pending;return $n(A.coords.cur,t),$n(A.coords.delta,t),HA.addEdges(A.edges,A.rect,t),t.x=0,t.y=0,!0}function Us(A){var t=A.x,i=A.y;this.offset.pending.x+=t,this.offset.pending.y+=i,this.offset.total.x+=t,this.offset.total.y+=i}function $n(A,t){var i=A.page,s=A.client,c=t.x,f=t.y;i.x+=c,i.y+=f,s.x+=c,s.y+=f}Object.defineProperty(Ot,"__esModule",{value:!0}),Ot.addTotal=se,Ot.applyPending=pt,Ot.default=void 0,ve._ProxyMethods.offsetBy="";var ys={id:"offset",before:["modifiers","pointer-events","actions","inertia"],install:function(A){A.Interaction.prototype.offsetBy=Us},listeners:{"interactions:new":function(A){A.interaction.offset={total:{x:0,y:0},pending:{x:0,y:0}}},"interactions:update-pointer":function(A){return se(A.interaction)},"interactions:before-action-start":$o,"interactions:before-action-move":$o,"interactions:before-action-end":function(A){var t=A.interaction;if(pt(t))return t.move({offset:!0}),t.end(),!1},"interactions:stop":function(A){var t=A.interaction;t.offset.total.x=0,t.offset.total.y=0,t.offset.pending.x=0,t.offset.pending.y=0}}},Fs=ys;Ot.default=Fs;var At={};function sn(A,t){for(var i=0;if.minSpeed&&u>f.endSpeed)this.startInertia();else{if(g.result=g.setAll(this.modifierArg),!g.result.changed)return!1;this.startSmoothEnd()}return c.modification.result.rect=null,c.offsetBy(this.targetOffset),c._doPhase({interaction:c,event:s,phase:"inertiastart"}),c.offsetBy({x:-this.targetOffset.x,y:-this.targetOffset.y}),c.modification.result.rect=null,this.active=!0,c.simulation=this,!0}},{key:"startInertia",value:function(){var s=this,c=this.interaction.coords.velocity.client,f=Oe(this.interaction),d=f.resistance,u=-Math.log(f.endSpeed/this.v0)/d;this.targetOffset={x:(c.x-u)/d,y:(c.y-u)/d},this.te=u,this.lambda_v0=d/this.v0,this.one_ve_v0=1-f.endSpeed/this.v0;var g=this.modification,m=this.modifierArg;m.pageCoords={x:this.startCoords.x+this.targetOffset.x,y:this.startCoords.y+this.targetOffset.y},g.result=g.setAll(m),g.result.changed&&(this.isModified=!0,this.modifiedOffset={x:this.targetOffset.x+g.result.delta.x,y:this.targetOffset.y+g.result.delta.y}),this.onNextFrame(function(){return s.inertiaTick()})}},{key:"startSmoothEnd",value:function(){var s=this;this.smoothEnd=!0,this.isModified=!0,this.targetOffset={x:this.modification.result.delta.x,y:this.modification.result.delta.y},this.onNextFrame(function(){return s.smoothEndTick()})}},{key:"onNextFrame",value:function(s){var c=this;this.timeout=we.default.request(function(){c.active&&s()})}},{key:"inertiaTick",value:function(){var s,c,f,d,u,g=this,m=this.interaction,Q=Oe(m).resistance,y=(m._now()-this.t0)/1e3;if(y=0;f--){var d=c[f],u=d.selector,g=d.context,m=d.listeners;u===this.target&&g===this._context&&c.splice(f,1);for(var Q=m.length-1;Q>=0;Q--)this._scopeEvents.removeDelegate(this.target,this._context,s,m[Q][0],m[Q][1])}else this._scopeEvents.remove(this.target,"all")}}])&&Ss(t.prototype,i),Object.defineProperty(t,"prototype",{writable:!1}),A}();ln.Interactable=un;var fn={};function Hs(A,t){for(var i=0;iA.length)&&(t=A.length);for(var i=0,s=Array(t);i=0;_--){var sA=P[_];if(sA.selector===Q&&sA.context===y){for(var dA=sA.listeners,R=dA.length-1;R>=0;R--){var RA=ro(dA[R],2),QA=RA[0],xA=RA[1],jA=xA.capture,it=xA.passive;if(QA===O&&jA===J.capture&&it===J.passive){dA.splice(R,1),dA.length||(P.splice(_,1),u(y,x,g),u(y,x,m,!0)),rA=!0;break}}if(rA)break}}},delegateListener:g,delegateUseCapture:m,delegatedEvents:s,documents:c,targets:i,supportsOptions:!1,supportsPassive:!1};function d(Q,y,x,O){var H=er(O),_=cA.find(i,function(J){return J.eventTarget===Q});_||(_={eventTarget:Q,events:{}},i.push(_)),_.events[y]||(_.events[y]=[]),Q.addEventListener&&!cA.contains(_.events[y],x)&&(Q.addEventListener(y,x,f.supportsOptions?H:H.capture),_.events[y].push(x))}function u(Q,y,x,O){var H=er(O),_=cA.findIndex(i,function(R){return R.eventTarget===Q}),J=i[_];if(J&&J.events)if(y!=="all"){var P=!1,rA=J.events[y];if(rA){if(x==="all"){for(var sA=rA.length-1;sA>=0;sA--)u(Q,y,rA[sA],H);return}for(var dA=0;dA=2)continue;if(!c.interacting()&&t===c.pointerType)return c}return null}};function ni(A,t){return A.pointers.some(function(i){return i.id===t})}var no=IA;tt.default=no;var Mr={};function ht(A){return ht=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ht(A)}function De(A,t){return function(i){if(Array.isArray(i))return i}(A)||function(i,s){var c=i==null?null:typeof Symbol!="undefined"&&i[Symbol.iterator]||i["@@iterator"];if(c!=null){var f,d,u=[],g=!0,m=!1;try{for(c=c.call(i);!(g=(f=c.next()).done)&&(u.push(f.value),!s||u.length!==s);g=!0);}catch(Q){m=!0,d=Q}finally{try{g||c.return==null||c.return()}finally{if(m)throw d}}return u}}(A,t)||function(i,s){if(i){if(typeof i=="string")return oi(i,s);var c=Object.prototype.toString.call(i).slice(8,-1);return c==="Object"&&i.constructor&&(c=i.constructor.name),c==="Map"||c==="Set"?Array.from(i):c==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(c)?oi(i,s):void 0}}(A,t)||function(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. +In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}function oi(A,t){(t==null||t>A.length)&&(t=A.length);for(var i=0,s=Array(t);i=0;s--){var c=t.interactions.list[s];c.interactable===i&&(c.stop(),t.fire("interactions:destroy",{interaction:c}),c.destroy(),t.interactions.list.length>2&&t.interactions.list.splice(s,1))}}},onDocSignal:pn,doOnInteractions:rr,methodNames:Ge},si=ii;Mr.default=si;var nr={};function or(A){return or=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},or(A)}function ir(){return ir=typeof Reflect!="undefined"&&Reflect.get?Reflect.get.bind():function(A,t,i){var s=ai(A,t);if(s){var c=Object.getOwnPropertyDescriptor(s,t);return c.get?c.get.call(arguments.length<3?A:i):c.value}},ir.apply(this,arguments)}function ai(A,t){for(;!Object.prototype.hasOwnProperty.call(A,t)&&(A=ge(A))!==null;);return A}function me(A,t){return me=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(i,s){return i.__proto__=s,i},me(A,t)}function vt(A,t){if(t&&(or(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(i){if(i===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return i}(A)}function ge(A){return ge=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},ge(A)}function Ae(A,t){if(!(A instanceof t))throw new TypeError("Cannot call a class as a function")}function rt(A,t){for(var i=0;iA.length)&&(t=A.length);for(var i=0,s=Array(t);iMath.abs(g.y),u.coords,u.rect),(0,AA.default)(s,u.coords)),u.eventProps},defaults:{ratio:"preserve",equalDelta:!1,modifiers:[],enabled:!1}};function Bi(A,t,i){var s=A.startCoords,c=A.edgeSign;t?i.y=s.y+(i.x-s.x)*c.y:i.x=s.x+(i.y-s.y)*c.x}function pi(A,t,i,s){var c=A.startRect,f=A.startCoords,d=A.ratio,u=A.edgeSign;if(t){var g=s.width/d;i.y=f.y+(g-c.height)*u.y}else{var m=s.height*d;i.x=f.x+(m-c.width)*u.x}}Mt.aspectRatio=lo;var Ds=(0,te.makeModifier)(lo,"aspectRatio");Mt.default=Ds;var ke={};Object.defineProperty(ke,"__esModule",{value:!0}),ke.default=void 0;var hi=function(){};hi._defaults={};var Ks=hi;ke.default=Ks;var _r={};Object.defineProperty(_r,"__esModule",{value:!0}),Object.defineProperty(_r,"default",{enumerable:!0,get:function(){return ke.default}});var de={};function Qn(A,t,i){return U.default.func(A)?HA.resolveRectLike(A,t.interactable,t.element,[i.x,i.y,t]):HA.resolveRectLike(A,t.interactable,t.element)}Object.defineProperty(de,"__esModule",{value:!0}),de.default=void 0,de.getRestrictionRect=Qn,de.restrict=void 0;var wi={start:function(A){var t=A.rect,i=A.startOffset,s=A.state,c=A.interaction,f=A.pageCoords,d=s.options,u=d.elementRect,g=(0,AA.default)({left:0,top:0,right:0,bottom:0},d.offset||{});if(t&&u){var m=Qn(d.restriction,c,f);if(m){var Q=m.right-m.left-t.width,y=m.bottom-m.top-t.height;Q<0&&(g.left+=Q,g.right+=Q),y<0&&(g.top+=y,g.bottom+=y)}g.left+=i.left-t.width*u.left,g.top+=i.top-t.height*u.top,g.right+=i.right-t.width*(1-u.right),g.bottom+=i.bottom-t.height*(1-u.bottom)}s.offset=g},set:function(A){var t=A.coords,i=A.interaction,s=A.state,c=s.options,f=s.offset,d=Qn(c.restriction,i,t);if(d){var u=HA.xywhToTlbr(d);t.x=Math.max(Math.min(u.right-f.right,t.x),u.left+f.left),t.y=Math.max(Math.min(u.bottom-f.bottom,t.y),u.top+f.top)}},defaults:{restriction:null,elementRect:null,offset:null,endOnly:!1,enabled:!1}};de.restrict=wi;var Ms=(0,te.makeModifier)(wi,"restrict");de.default=Ms;var Ve={};Object.defineProperty(Ve,"__esModule",{value:!0}),Ve.restrictEdges=Ve.default=void 0;var vi={top:1/0,left:1/0,bottom:-1/0,right:-1/0},mi={top:-1/0,left:-1/0,bottom:1/0,right:1/0};function Rt(A,t){for(var i=["top","left","bottom","right"],s=0;sA.length)&&(t=A.length);for(var i=0,s=Array(t);i{var Ad="Expected a function",ql=0/0,ed="[object Symbol]",td=/^\s+|\s+$/g,rd=/^[-+]0x[0-9a-f]+$/i,nd=/^0b[01]+$/i,od=/^0o[0-7]+$/i,id=parseInt,sd=typeof global=="object"&&global&&global.Object===Object&&global,ad=typeof self=="object"&&self&&self.Object===Object&&self,cd=sd||ad||Function("return this")(),ld=Object.prototype,ud=ld.toString,fd=Math.max,gd=Math.min,Ya=function(){return cd.Date.now()};function dd(h,p,C){var E,b,U,K,X,oA,yA=0,$=!1,CA=!1,TA=!0;if(typeof h!="function")throw new TypeError(Ad);p=$l(p)||0,ja(C)&&($=!!C.leading,CA="maxWait"in C,U=CA?fd($l(C.maxWait)||0,p):U,TA="trailing"in C?!!C.trailing:TA);function BA(G){var zA=E,WA=b;return E=b=void 0,yA=G,K=h.apply(WA,zA),K}function ce(G){return yA=G,X=setTimeout(ue,p),$?BA(G):K}function fA(G){var zA=G-oA,WA=G-yA,ye=p-zA;return CA?gd(ye,U-WA):ye}function NA(G){var zA=G-oA,WA=G-yA;return oA===void 0||zA>=p||zA<0||CA&&WA>=U}function ue(){var G=Ya();if(NA(G))return Ut(G);X=setTimeout(ue,fA(G))}function Ut(G){return X=void 0,TA&&E?BA(G):(E=b=void 0,K)}function GA(){X!==void 0&&clearTimeout(X),yA=0,E=oA=b=X=void 0}function OA(){return X===void 0?K:Ut(Ya())}function Ue(){var G=Ya(),zA=NA(G);if(E=arguments,b=this,oA=G,zA){if(X===void 0)return ce(oA);if(CA)return X=setTimeout(ue,p),BA(oA)}return X===void 0&&(X=setTimeout(ue,p)),K}return Ue.cancel=GA,Ue.flush=OA,Ue}function ja(h){var p=typeof h;return!!h&&(p=="object"||p=="function")}function Bd(h){return!!h&&typeof h=="object"}function pd(h){return typeof h=="symbol"||Bd(h)&&ud.call(h)==ed}function $l(h){if(typeof h=="number")return h;if(pd(h))return ql;if(ja(h)){var p=typeof h.valueOf=="function"?h.valueOf():h;h=ja(p)?p+"":p}if(typeof h!="string")return h===0?h:+h;h=h.replace(td,"");var C=nd.test(h);return C||od.test(h)?id(h.slice(2),C?2:8):rd.test(h)?ql:+h}Au.exports=dd});var ru=Vi((FB,tu)=>{tu.exports={compareTwoStrings:eu,findBestMatch:hd};function eu(h,p){if(h=h.replace(/\s+/g,""),p=p.replace(/\s+/g,""),h===p)return 1;if(h.length<2||p.length<2)return 0;let C=new Map;for(let b=0;b0&&(C.set(U,K-1),E++)}return 2*E/(h.length+p.length-2)}function hd(h,p){if(!wd(h,p))throw new Error("Bad arguments: First argument should be a string, second should be an array of strings");let C=[],E=0;for(let U=0;UC[E].rating&&(E=U)}let b=C[E];return{ratings:C,bestMatch:b,bestMatchIndex:E}}function wd(h,p){return!(typeof h!="string"||!Array.isArray(p)||!p.length||p.find(function(C){return typeof C!="string"}))}});var $c="strigo-sdk",La="strigo.io",Al=["strigo-exercises"],el=["orig-iframe"],Xi=` -`,Wt="https://cdn.statically.io/gh/strigo/strigo-sdk";var ol="https://assessment-recorder.web.app",So="http://local.strigo.io:3000",il="v1.1.40",sl="strigoPreviewUserToken";function le(){return bo("localStorage","strigoConfig")}function al(h){let p=le();return Io("localStorage","strigoConfig",{...p,...h})}function cl(h){let p=le();return Io("localStorage","strigoConfig",{...p,...h})}function ll(h,p){return Wi("localStorage","strigoConfig",h,p)}function dr(h){return le()?.[h]}function ul(){Ji("localStorage","strigoConfig")}async function fl(h){try{let p=window.Strigo.isDevelopment()?So:"https://app.strigo.io",U=await fetch(`${p}/api/internal/academy/v1/config?domain=${window.location.hostname}`,{method:"GET",headers:{"Content-Type":"application/json",Authorization:`Bearer ${h.token}`}});if(!U.ok)throw new Error(`Failed to fetch remote configuration: ${U.statusText}`);return(await U.json()).data}catch(p){return T.warn("Error fetching configuration from Strigo",{err:p}),null}}async function gl(h,p){try{T.info("Sending success event to strigo",{eventName:p});let U=window.Strigo.isDevelopment()?So:"https://app.strigo.io",b=await fetch(`${U}/api/internal/academy/v1/success-event`,{method:"POST",body:JSON.stringify({eventName:p}),headers:{"Content-Type":"application/json",Authorization:`Bearer ${h.token}`}});if(!b.ok)throw new Error(`Failed sending success event to Strigo: ${b.statusText}`);let E=await b.json();T.info("Success event Response",{successEventResponse:E})}catch(U){return T.warn("Error sending success event to Strigo",{err:U}),null}}var dl=class{constructor(p){this.url=p?.url}setup(p){this.url=p.url}logToRemote(p,U,b){return fetch(this.url,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({level:p,message:U,context:b})}).then(E=>{E.ok||console.warn("Logging to Strigo failed",{result:E})}).catch(E=>{console.warn("Logging to Strigo failed",{err:E})})}logToConsole(p,U,b){let E=`${new Date().toISOString()} - ${U}`,C=b.err instanceof Error?{...b,err:{message:b.err.message,name:b.err.name,stack:b.err.stack}}:b;console[p](E,b?` -${JSON.stringify(C)}`:"")}getDefaultContext(){let p=le();if(!p)return{};let{user:U,subDomain:b,initSite:E,version:C,selectedWidgetFlavor:R}=p;return{token:U?.token.token,initSite:E?.href,subDomain:b,development:window.Strigo.isDevelopment(),version:C,selectedWidgetFlavor:R}}log(p,U,b){let E={...this.getDefaultContext(),...b};try{this.url&&window.Strigo.isDevelopment()&&this.logToRemote(p,U,E),this.logToConsole(p,`Academy - ${U}`,E)}catch(C){console.log("Logging error:",{err:C})}}debug(p,U={}){this.log("debug",p,U)}info(p,U={}){this.log("info",p,U)}warn(p,U={}){this.log("warn",p,U)}error(p,U={}){this.log("error",p,U)}},T=new dl;function Bl(h){return Io("sessionStorage","strigoSession",h)}function ji(){return bo("sessionStorage","strigoSession")}function _n(){return ji()?ji().shouldPanelBeOpen:!0}function Ho(){return ji()?.widgetFlavor}function zi(h,p){return Wi("sessionStorage","strigoSession",h,p)}function pl(h){return ji()?.[h]}function hl(){Ji("sessionStorage","strigoSession")}function xo(){return window.top}function pr(){return document.getElementsByTagName("head")[0]}function wl(){document.open(),document.close()}function vl(){let h=document.createElement("div");return h.className="strigo-main",document.body.appendChild(h),h}function hr(h){let{url:p,parentElement:U}=h,b=document.createElement("link");b.rel="stylesheet",b.href=p,U.appendChild(b)}function To(h){let{url:p,parentElement:U,classNames:b,id:E}=h,C=document.createElement("iframe");return C.classList.add(...b),C.id=E,C.src=p,U.appendChild(C),C}function ml(){location.reload()}function Ql(){return/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)}function Zi(){return Ql()?[window.screen.width,window.screen.width]:[window.screen.width/2,window.screen.width]}function Cl(){return Ql()?[0,0]:[window.screen.width*.25,0]}function Ul(){let h=new XMLHttpRequest;h.open("GET",window.document.location.href,!1),h.send(null);let U=h.getAllResponseHeaders().toLowerCase().split(`\r -`);for(let b of U)if(b.includes("x-frame-options")){let E=b.split(":");if(E&&E.length>1)return E[1].trim()!=="deny"}return!0}function yl(){let h=document.getElementById("strigo-widget"),p=document.getElementById("strigo-collapse-div"),U=document.getElementById("strigo-academy-hat");h.classList.toggle("align-left"),p.classList.toggle("align-left"),U.classList.toggle("align-left");let b=h.classList.contains("align-left")?"left":"right",E=document.getElementById("strigo-exercises");ll("dockingSide",b),E.contentWindow.postMessage({dockingSide:b},"*")}function Fl(h){h.document.getElementById("strigo-widget").remove()}function zr(){let h=document.getElementById("strigo-widget");h.classList.add("slide-in"),h.classList.add("loaded"),document.getElementById("strigo-collapse-div").classList.remove("slide-in"),document.getElementById("strigo-academy-hat").classList.remove("slide-in")}function El(){let h=document.getElementById("strigo-widget");h.classList.remove("slide-in"),h.classList.remove("loaded"),document.getElementById("strigo-collapse-div").classList.add("slide-in"),document.getElementById("strigo-academy-hat").classList.add("slide-in")}var Vg=function(h){if(h.filter(U=>["HTML","BODY"].includes(U.target.nodeName)).length>0){if(window.document.getElementById("strigo-widget")){T.info("*** Strigo widget already exist on the DOM.");return}T.info("*** Reloading widget in navigation observer"),setTimeout(window.Strigo.open.bind(window.Strigo),0)}};function Ra(){let p=!_n();zi("shouldPanelBeOpen",p),p?zr():El()}function bl(h){let p=_n(),U=dr("dockingSide"),b=document.createElement("div");b.className="strigo-academy-hat",b.id="strigo-academy-hat",b.onclick=()=>{Ra()};let E=document.createElement("div");E.className="strigo-academy-hat-icon",E.id="strigo-academy-hat-icon",E.innerHTML=Yi,b.appendChild(E);let C=document.createElement("div");C.className="strigo-collapse-div",C.id="strigo-collapse-div";let R=document.createElement("iframe");R.className="strigo-iframe",R.id="strigo-exercises",R.src=h;let j=document.createElement("div");return j.id="strigo-widget",j.appendChild(C),j.appendChild(R),U==="left"&&(j.classList.add("align-left"),C.classList.add("align-left"),b.classList.add("align-left")),document.body.appendChild(j),document.body.appendChild(b),p?zr():El(),R}function Il(h){h.strigoNavigationObserver={observer:new MutationObserver(Vg)};let p={childList:!0,subtree:!0};h?.strigoNavigationObserver?.observer?.observe(h.document,p)}function Sl(h){let{primaryColor:p,primaryHoverColor:U,primaryTextAccent:b}=h,E=document.querySelector(":root");E.style.setProperty("--customizable-hat-bg-color",p),E.style.setProperty("--customizable-hat-bg-hover-color",U),E.style.setProperty("--customizable-hat-text-color",b==="dark"?"#000000":"#FFFFFF")}var Pn="strigoAssessmentUuid",_a="strigoAssessmentRecorder";var Pa="strigoChildIframe";function Xg(h){let p={};for(let[U,b]of h)p[U]=b;return p}function Na(h){let U=new URLSearchParams(h).entries();return Xg(U)}function Tl(){let{host:h,pathname:p,href:U,origin:b,search:E}=window.location;return{host:h,pathName:p,href:U,origin:b,search:E,params:Na(E)}}function qi(h){let{subDomain:p,user:U,webApiKey:b}=h,E=new URL(`${window.Strigo.isDevelopment()?So:`https://${p}.${tl}`}/academy/courses`);return E.searchParams.set("token",U.token.token),E.searchParams.set("webApiKey",b),E.toString()}function Ll(h){let p=new URL(h);return p.searchParams.set(Pa,"true"),p.toString()}function Ol(){return window.location.search.includes(Pa)}function Dl(){let h=new URL(window.location.href),p=new URLSearchParams(h.search);p.delete(Pa),h.search=p.toString(),window.history.replaceState(window.history.state,"",h)}function Kl(){let h=document.getElementById(el);return{webApiKey:h?.getAttribute("data-web-api-key")||"",subDomain:h?.getAttribute("data-subdomain")||"",selectedWidgetFlavor:h?.getAttribute("data-layout-flavor")||"dynamic"}}function Ml(h){return window.Strigo.isDevelopment()?`${SDK_LOCAL_URL}/styles/strigo.css`:h?`${Wt}@${h}/dist/production/styles/strigo.min.css`:`${Wt}@master/dist/production/styles/strigo.min.css`}function Rl(h){return window.Strigo.isDevelopment()?`${SDK_LOCAL_URL}/styles/strigo-widget.css`:h?`${Wt}@${h}/dist/production/styles/strigo-widget.min.css`:`${Wt}@master/dist/production/styles/strigo-widget.min.css`}function $i(h){return window.Strigo.isDevelopment()?`${SDK_LOCAL_URL}/styles/strigo-academy-hat.css`:h?`${Wt}@${h}/dist/production/styles/strigo-academy-hat.min.css`:`${Wt}@master/dist/production/styles/strigo-academy-hat.min.css`}function _l(h){return window.Strigo.isDevelopment()?`${SDK_LOCAL_URL}/styles/strigo-assessment-recorder.css`:h?`${Wt}@${h}/dist/production/styles/strigo-assessment-recorder.min.css`:`${Wt}@${il}/dist/production/styles/strigo-assessment-recorder.min.css`}function Pl(){return window.Strigo.isDevelopment()?RECORDER_LOCAL_URL:ol}function Nl(){let{search:h}=window.location,p=Na(h);return _a in p}function As(h){let p=new URL(h),U=new URLSearchParams(p.search);return U.delete(Pn),U.delete(_a),p.search=U.toString(),p.toString()}function Gl(){let{search:h}=window.location;return Na(h)[sl]||null}function ka(){var h;(function(K){K[K.All=0]="All",K[K.Two=1]="Two",K[K.One=2]="One"})(h||(h={}));let p,U;function b(K,eA){if(K.nodeType!==Node.ELEMENT_NODE)throw new Error("Can't generate CSS selector for non-element node type.");if(K.tagName.toLowerCase()==="html")return"html";let Y={root:document.body,idName:V=>!0,className:V=>!0,tagName:V=>!0,attr:(V,yA)=>!1,seedMinLength:1,buildNodeTreeUpToRoot:!1,maxNumberOfTries:2e3};p=Object.assign(Object.assign({},Y),eA),U=UA(p.root,Y);let aA=_A(K),CA=X(K);return{nodeTree:aA,recordedElementInfo:CA}}function E(K){let eA=K[0],Y=eA.name;for(let aA=1;aA ${Y}`:Y=`${K[aA].name} ${Y}`,eA=K[aA];return Y}function C(K,eA){let Y=K.parent,aA=[];for(aA.push(eA),K.path&&aA.push(K.path);Y?.path;)aA.push(Y.path),Y=Y.parent;return E(aA)}function R(K,eA){let Y=K.sort((JA,vA)=>vA.level-JA.level),aA={path:null,children:[],parent:null,level:-1},CA=[],V=new Set,yA=null,wA=0;for(CA.push(aA),V.add(aA);CA.length>0&&Y[wA];){let JA=CA.pop(),{nodeIdentifiers:vA}=Y[wA],VA=iA(vA,wA),k=[];for(let D of VA){let W=C(JA,D),oA=document.querySelectorAll(W).length;if(oA!==0){if(oA===1){k.splice(0,k.length),k.push({path:D,children:[],parent:JA,level:wA}),yA=W;break}k.push({path:D,children:[],parent:JA,level:wA})}}if(k.length===0)return;JA.children.push(...k),JA.children.filter(D=>!V.has(D)).forEach(D=>{V.add(D),CA.push(D)}),wA=wA+1}return yA}function j(K,eA){let Y={root:document.body,idName:aA=>!0,className:aA=>!0,tagName:aA=>!0,attr:(aA,CA)=>!1,optimizedMinLength:6,maxNumberOfTries:2e3,fallbackNodeTree:K};return p=Object.assign(Object.assign({},Y),eA),U=UA(p.root,Y),R(K,U)}function iA(K,eA){let Y=G(K.find(vA=>vA.identifier==="id")),aA=G(...K.filter(vA=>vA.identifier==="attribute")),CA=G(...K.filter(vA=>vA.identifier==="className")),V=G(...K.filter(vA=>vA.identifier==="tagName")),yA=K.filter(vA=>vA.identifier==="index"&&vA.identifier.outOf!=="1")?.[0]?.index,wA=[...Y||[],...aA||[],...CA||[],...V||[]];return yA&&(wA=wA.concat(wA.filter(Ue).map(vA=>LA(vA,yA)))),(wA?ye(WA([wA])):null).map(([vA])=>({...vA,level:eA}))}function UA(K,eA){return K.nodeType===Node.DOCUMENT_NODE?K:K===eA.root?K.ownerDocument:K}function X(K){let eA=Array.from(K.childNodes).reduce((yA,wA)=>(wA.nodeType===3&&yA.push(wA.nodeValue),yA),[]).join(""),Y=Array.from(K.childNodes).map(yA=>{let wA=yA.nodeName.toLowerCase();return{classes:yA.classList?Array.from(yA.classList):[],nodeName:wA}}),aA=K.classList?Array.from(K.classList):[],CA=K.tagName.toLowerCase(),V=As(window.location.href);return{tagName:CA,classes:aA,internalStructure:Y,directInnerText:eA,url:V}}function _A(K){let eA=[],Y=K,aA=0;for(;Y&&Y!==p.root.parentElement;){let CA=[G(ae(Y)),G(ue(Y)),G(...fA(Y)),G(...NA(Y)),G(GA(Y))].filter(zA).flat().sort((V,yA)=>V.penalty-yA.penalty);eA.push({nodeIdentifiers:CA,level:aA}),Y=Y.parentElement,aA++}return eA}function xA(K){return K.map(eA=>eA.penalty).reduce((eA,Y)=>eA+Y,0)}function BA(K){switch(U.querySelectorAll(E(K)).length){case 0:throw new Error(`Can't select any node with this selector: ${E(K)}`);case 1:return!0;default:return!1}}function ae(K){K?.getAttribute||alert(JSON.stringify(K));let eA=K.getAttribute("id");return eA&&p.idName(eA)?{name:"#"+_e(eA,{isIdentifier:!0}),penalty:0,identifier:"id"}:null}function fA(K){return Array.from(K.attributes).filter(Y=>p.attr(Y.name,Y.value)).map(Y=>({name:"["+_e(Y.name,{isIdentifier:!0})+'="'+_e(Y.value)+'"]',penalty:.5,identifier:"attribute"}))}function NA(K){return Array.from(K.classList).filter(p.className).map(Y=>({name:"."+_e(Y,{isIdentifier:!0}),penalty:1,identifier:"className"}))}function ue(K){let eA=K.tagName.toLowerCase();return p.tagName(eA)?{name:eA,penalty:2,identifier:"tagName"}:null}function Ut(){return{name:"*",penalty:3,identifier:"any"}}function GA(K){let eA=K.parentNode;if(!eA)return null;let Y=eA.firstChild;if(!Y)return null;let aA=0;for(;Y&&(Y.nodeType===Node.ELEMENT_NODE&&aA++,Y!==K);)Y=Y.nextSibling;return{index:aA,outOf:eA.childElementCount,penalty:4,identifier:"index"}}function LA(K,eA){return{name:K.name+`:nth-child(${eA})`,penalty:K.penalty+1}}function Ue(K){return K.name!=="html"&&!K.name.startsWith("#")&&!p.allowDuplicates}function G(...K){let eA=K.filter(zA);return eA.length>0?eA:null}function zA(K){return K!=null}function*WA(K,eA=[]){if(K.length>0)for(let Y of K[0])yield*WA(K.slice(1,K.length),eA.concat(Y));else yield eA}function ye(K){return Array.from(K).sort((eA,Y)=>xA(eA)-xA(Y))}function*ut(K,eA,Y={counter:0,visited:new Map}){if(K.length>2&&K.length>p.optimizedMinLength)for(let aA=1;aAp.maxNumberOfTries){console.log(`*** Selector optimization exhausted. Exceeded max number of tries - ${p.maxNumberOfTries}`);return}Y.counter+=1;let CA=[...K];CA.splice(aA,1);let V=E(CA);if(Y.visited.has(V))return;BA(CA)&&yt(CA,eA)&&(yield CA,Y.visited.set(V,!0),yield*ut(CA,eA,Y))}}function yt(K,eA){return U.querySelector(E(K))===eA}let Yt=/[ -,\.\/:-@\[-\^`\{-~]/,AA=/[ -,\.\/:-@\[\]\^`\{-~]/,SA=/(^|\\+)?(\\[A-F0-9]{1,6})\x20(?![a-fA-F0-9\x20])/g,Re={escapeEverything:!1,isIdentifier:!1,quotes:"single",wrap:!1};function _e(K,eA={}){let Y=Object.assign(Object.assign({},Re),eA);Y.quotes!="single"&&Y.quotes!="double"&&(Y.quotes="single");let aA=Y.quotes=="double"?'"':"'",CA=Y.isIdentifier,V=K.charAt(0),yA="",wA=0,JA=K.length;for(;wA126){if(VA>=55296&&VA<=56319&&wAR===p},{nodeTree:E,recordedElementInfo:C}=U.getElementProfileNodeTree(h.target,b);return console.log("*** Just FYI - this is how it can generate css selector:",U.generateSelectorFromNodeTree(E,b)),{nodeTree:E,recordedElementInfo:C}}function Lo(h,p){let U=ka(),E={...{allowDuplicates:!1,optimizedMinLength:10,threshold:1e3,attr:R=>R===dataAttribute,fallbackNodeTree:h},...p};return U.generateSelectorFromNodeTree(h,E)}function kl(h,p){this.removeOverlayElement=()=>{console.log("Removing mouse over event listener from the selected element."),h.removeEventListener("mouseover",this.mouseOverEvent);let E=h.getElementById("element-selector-overlay");E&&h?.body?.removeChild(E)},this.saveSelectedSelector=E=>{E.preventDefault(),E.stopPropagation(),this.removeOverlayElement();let C=Wg(E,{dataAttribute:"some-custom-strigo-attribute"});C=C||{},console.log("Selected element with elementProfile:",C),p.onElementProfileCreated(C)};function U(E,C){for(let R in C)E.style[R]=C[R]}let b=(E,C,R=[])=>{if(C===E.target)return;let j=E.target;if(R.includes(j.id))return;let iA=j.offsetWidth+2,UA=j.offsetHeight+2;function X(BA){let ae=0,fA=0;for(;BA&&!isNaN(BA.offsetLeft)&&!isNaN(BA.offsetTop);)ae+=BA.offsetLeft-BA.scrollLeft,fA+=BA.offsetTop-BA.scrollTop,BA=BA.offsetParent;return{top:fA-window.scrollY,left:ae-window.scrollX}}let _A=X(j),xA={top:_A.top-2+"px",left:_A.left-2+"px",width:iA+"px",height:UA+"px"};U(C,xA)};return this.mouseOverEvent=E=>{let C=window.document.getElementById("element-selector-overlay");b(E,C,["element-selector-overlay","strigo-assessment-recorder-iframe"]),E.target.addEventListener("click",this.saveSelectedSelector)},this.removeClickListenerFromHoveredElement=E=>{E.target.removeEventListener("click",this.saveSelectedSelector)},this.startElementSelector=()=>{let E=h.createElement("div");E.setAttribute("id","element-selector-overlay"),E.setAttribute("id","element-selector-overlay"),E.setAttribute("style",` +`,Wt="https://cdn.statically.io/gh/strigo/strigo-sdk";var tl="https://assessment-recorder.web.app",Eo="http://local.strigo.io:3000",rl="http://local-preview.strigo.io:3000";var nl="v1.1.40";var Wi="strigoAssessmentUuid",ol="strigoAssessmentRecorder";var Oa="strigoChildIframe";function _g(h){let p={};for(let[C,E]of h)p[C]=E;return p}function Pg(h){let C=new URLSearchParams(h).entries();return _g(C)}function sl(){let{host:h,pathname:p,href:C,origin:E,search:b}=window.location;return{host:h,pathName:p,href:C,origin:E,search:b,params:Pg(b)}}function Ji(h,p){let{subDomain:C,user:E,webApiKey:b}=h,U=p?rl:Eo,K=p?`https://academy-preview.${La}`:`https://${C}.${La}`,X=window.Strigo.isDevelopment()?U:K,oA=new URL(`${X}/academy/courses`);return oA.searchParams.set("token",E.token.token),oA.searchParams.set("webApiKey",b),oA.toString()}function al(h){let p=new URL(h);return p.searchParams.set(Oa,"true"),p.toString()}function cl(){return window.location.search.includes(Oa)}function ll(){let h=new URL(window.location.href),p=new URLSearchParams(h.search);p.delete(Oa),h.search=p.toString(),window.history.replaceState(window.history.state,"",h)}function ul(){let h=document.getElementById($c);return{webApiKey:h?.getAttribute("data-web-api-key")||"",subDomain:h?.getAttribute("data-subdomain")||"",selectedWidgetFlavor:h?.getAttribute("data-layout-flavor")||"dynamic"}}function fl(h){return window.Strigo.isDevelopment()?`${SDK_LOCAL_URL}/styles/strigo.css`:h?`${Wt}@${h}/dist/production/styles/strigo.min.css`:`${Wt}@master/dist/production/styles/strigo.min.css`}function gl(h){return window.Strigo.isDevelopment()?`${SDK_LOCAL_URL}/styles/strigo-widget.css`:h?`${Wt}@${h}/dist/production/styles/strigo-widget.min.css`:`${Wt}@master/dist/production/styles/strigo-widget.min.css`}function Yi(h){return window.Strigo.isDevelopment()?`${SDK_LOCAL_URL}/styles/strigo-academy-hat.css`:h?`${Wt}@${h}/dist/production/styles/strigo-academy-hat.min.css`:`${Wt}@master/dist/production/styles/strigo-academy-hat.min.css`}function dl(h){return window.Strigo.isDevelopment()?`${SDK_LOCAL_URL}/styles/strigo-assessment-recorder.css`:h?`${Wt}@${h}/dist/production/styles/strigo-assessment-recorder.min.css`:`${Wt}@${nl}/dist/production/styles/strigo-assessment-recorder.min.css`}function Bl(){return window.Strigo.isDevelopment()?RECORDER_LOCAL_URL:tl}function ji(h){let p=new URL(h),C=new URLSearchParams(p.search);return C.delete(Wi),C.delete(ol),p.search=C.toString(),p.toString()}var pl=class{constructor(p){this.url=p?.url}setup(p){this.url=p.url}logToRemote(p,C,E){return fetch(this.url,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({level:p,message:C,context:E})}).then(b=>{b.ok||console.warn("Logging to Strigo failed",{result:b})}).catch(b=>{console.warn("Logging to Strigo failed",{err:b})})}logToConsole(p,C,E){let b=`${new Date().toISOString()} - ${C}`,U=E.err instanceof Error?{...E,err:{message:E.err.message,name:E.err.name,stack:E.err.stack}}:E;console[p](b,E?` +${JSON.stringify(U)}`:"")}getDefaultContext(){let p=oe();if(!p)return{};let{user:C,subDomain:E,initSite:b,version:U,selectedWidgetFlavor:K}=p;return{token:C?.token.token,initSite:b?.href,subDomain:E,development:window.Strigo.isDevelopment(),version:U,selectedWidgetFlavor:K}}log(p,C,E){let b={...this.getDefaultContext(),...E};try{this.url&&window.Strigo.isDevelopment()&&this.logToRemote(p,C,b),this.logToConsole(p,`Academy - ${C}`,b)}catch(U){console.log("Logging error:",{err:U})}}debug(p,C={}){this.log("debug",p,C)}info(p,C={}){this.log("info",p,C)}warn(p,C={}){this.log("warn",p,C)}error(p,C={}){this.log("error",p,C)}},L=new pl;function bo(h,p){try{return JSON.parse(window[h].getItem(p))}catch(C){return L.error("get storage data error",{err:C}),null}}function Io(h,p,C){try{return window[h].setItem(p,JSON.stringify(C)),C}catch(E){return L.error("setup storage error",{err:E}),null}}function zi(h,p,C,E){try{let b=bo(h,p);if(!b)throw new Error("Can't find initial state");let U={...b,[C]:E};return window[h].setItem(p,JSON.stringify(U)),U}catch(b){return L.error("set storage value error",{err:b}),null}}function Zi(h,p){try{window[h].removeItem(p)}catch(C){L.error("clear storage error",{err:C})}}function oe(){return bo("localStorage","strigoConfig")}function hl(h){let p=oe();return Io("localStorage","strigoConfig",{...p,...h})}function wl(h){let p=oe();return Io("localStorage","strigoConfig",{...p,...h})}function vl(h,p){return zi("localStorage","strigoConfig",h,p)}function Br(h){return oe()?.[h]}function ml(){Zi("localStorage","strigoConfig")}async function Ql(h){try{let p=window.Strigo.isDevelopment()?Eo:"https://app.strigo.io",C=await fetch(`${p}/api/internal/academy/v1/config?domain=${window.location.hostname}`,{method:"GET",headers:{"Content-Type":"application/json",Authorization:`Bearer ${h.token}`}});if(!C.ok)throw new Error(`Failed to fetch remote configuration: ${C.statusText}`);return(await C.json()).data}catch(p){return L.warn("Error fetching configuration from Strigo",{err:p}),null}}async function Cl(h,p){try{L.info("Sending success event to strigo",{eventName:p});let C=window.Strigo.isDevelopment()?Eo:"https://app.strigo.io",E=await fetch(`${C}/api/internal/academy/v1/success-event`,{method:"POST",body:JSON.stringify({eventName:p}),headers:{"Content-Type":"application/json",Authorization:`Bearer ${h.token}`}});if(!E.ok)throw new Error(`Failed sending success event to Strigo: ${E.statusText}`);let b=await E.json();L.info("Success event Response",{successEventResponse:b})}catch(C){return L.warn("Error sending success event to Strigo",{err:C}),null}}function Ul(h){return Io("sessionStorage","strigoSession",h)}function qi(){return bo("sessionStorage","strigoSession")}function _n(){return qi()?qi().shouldPanelBeOpen:!0}function So(){return qi()?.widgetFlavor}function $i(h,p){return zi("sessionStorage","strigoSession",h,p)}function yl(h){return qi()?.[h]}function Fl(){Zi("sessionStorage","strigoSession")}function _a(){try{return JSON.parse(window["localStorage"].getItem("strigoAssessments"))}catch(h){return L.error("Get assessments storage error",{error:h}),null}}function El(){try{let h=_a();if(h)return L.debug("Assessments storage already exists"),h;let p={assessments:[]};return window["localStorage"].setItem("strigoAssessments",JSON.stringify(p)),p}catch(h){return L.error("Init assessments storage error",{error:h}),null}}function bl(h){try{let p=h?{assessments:[...h]}:{assessments:[]};return window["localStorage"].setItem("strigoAssessments",JSON.stringify(p)),p}catch(p){return L.error("Assessments storage setup error",{error:p}),null}}function Il(){try{window["localStorage"].removeItem("strigoAssessments")}catch(h){L.error("Clear assessments storage error",{error:h})}}var Vl=Fo(Sl(),1);function Ho(){return window.top}function pr(){return document.getElementsByTagName("head")[0]}function Hl(){document.open(),document.close()}function xl(){let h=document.createElement("div");return h.className="strigo-main",document.body.appendChild(h),h}function hr(h){let{url:p,parentElement:C}=h,E=document.createElement("link");E.rel="stylesheet",E.href=p,C.appendChild(E)}function xo(h){let{url:p,parentElement:C,classNames:E,id:b}=h,U=document.createElement("iframe");return U.classList.add(...E),U.id=b,U.src=p,C.appendChild(U),U}function Tl(){location.reload()}function Ll(){return/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)}function As(){return Ll()?[window.screen.width,window.screen.width]:[window.screen.width/2,window.screen.width]}function Ol(){return Ll()?[0,0]:[window.screen.width*.25,0]}function Dl(){let h=new XMLHttpRequest;h.open("GET",window.document.location.href,!1),h.send(null);let C=h.getAllResponseHeaders().toLowerCase().split(`\r +`);for(let E of C)if(E.includes("x-frame-options")){let b=E.split(":");if(b&&b.length>1)return b[1].trim()!=="deny"}return!0}function Kl(){let h=document.getElementById("strigo-widget"),p=document.getElementById("strigo-collapse-div"),C=document.getElementById("strigo-academy-hat");h.classList.toggle("align-left"),p.classList.toggle("align-left"),C.classList.toggle("align-left");let E=h.classList.contains("align-left")?"left":"right",b=document.getElementById("strigo-exercises");vl("dockingSide",E),b.contentWindow.postMessage({dockingSide:E},"*")}function Ml(h){h.document.getElementById("strigo-widget").remove()}function zr(){let h=document.getElementById("strigo-widget");h.classList.add("slide-in"),h.classList.add("loaded"),document.getElementById("strigo-collapse-div").classList.remove("slide-in"),document.getElementById("strigo-academy-hat").classList.remove("slide-in")}function Rl(){let h=document.getElementById("strigo-widget");h.classList.remove("slide-in"),h.classList.remove("loaded"),document.getElementById("strigo-collapse-div").classList.add("slide-in"),document.getElementById("strigo-academy-hat").classList.add("slide-in")}var kg=function(h){if(h.filter(C=>["HTML","BODY"].includes(C.target.nodeName)).length>0){if(window.document.getElementById("strigo-widget")){L.info("*** Strigo widget already exist on the DOM.");return}L.info("*** Reloading widget in navigation observer"),setTimeout(window.Strigo.open.bind(window.Strigo),0)}};function Ga(){let p=!_n();$i("shouldPanelBeOpen",p),p?zr():Rl()}function _l(h){let p=_n(),C=Br("dockingSide"),E=document.createElement("div");E.className="strigo-academy-hat",E.id="strigo-academy-hat",E.onclick=()=>{Ga()};let b=document.createElement("div");b.className="strigo-academy-hat-icon",b.id="strigo-academy-hat-icon",b.innerHTML=Xi,E.appendChild(b);let U=document.createElement("div");U.className="strigo-collapse-div",U.id="strigo-collapse-div";let K=document.createElement("iframe");K.className="strigo-iframe",K.id="strigo-exercises",K.src=h;let X=document.createElement("div");return X.id="strigo-widget",X.appendChild(U),X.appendChild(K),C==="left"&&(X.classList.add("align-left"),U.classList.add("align-left"),E.classList.add("align-left")),document.body.appendChild(X),document.body.appendChild(E),p?zr():Rl(),K}function Pl(h){h.strigoNavigationObserver={observer:new MutationObserver(kg)};let p={childList:!0,subtree:!0};h?.strigoNavigationObserver?.observer?.observe(h.document,p)}function Nl(h){let{primaryColor:p,primaryHoverColor:C,primaryTextAccent:E}=h,b=document.querySelector(":root");b.style.setProperty("--customizable-hat-bg-color",p),b.style.setProperty("--customizable-hat-bg-hover-color",C),b.style.setProperty("--customizable-hat-text-color",E==="dark"?"#000000":"#FFFFFF")}function ka(){var h;(function(M){M[M.All=0]="All",M[M.Two=1]="Two",M[M.One=2]="One"})(h||(h={}));let p,C;function E(M,eA){if(M.nodeType!==Node.ELEMENT_NODE)throw new Error("Can't generate CSS selector for non-element node type.");if(M.tagName.toLowerCase()==="html")return"html";let Y={root:document.body,idName:V=>!0,className:V=>!0,tagName:V=>!0,attr:(V,FA)=>!1,seedMinLength:1,buildNodeTreeUpToRoot:!1,maxNumberOfTries:2e3};p=Object.assign(Object.assign({},Y),eA),C=yA(p.root,Y);let aA=CA(M),UA=$(M);return{nodeTree:aA,recordedElementInfo:UA}}function b(M){let eA=M[0],Y=eA.name;for(let aA=1;aA ${Y}`:Y=`${M[aA].name} ${Y}`,eA=M[aA];return Y}function U(M,eA){let Y=M.parent,aA=[];for(aA.push(eA),M.path&&aA.push(M.path);Y?.path;)aA.push(Y.path),Y=Y.parent;return b(aA)}function K(M,eA){let Y=M.sort((JA,vA)=>vA.level-JA.level),aA={path:null,children:[],parent:null,level:-1},UA=[],V=new Set,FA=null,wA=0;for(UA.push(aA),V.add(aA);UA.length>0&&Y[wA];){let JA=UA.pop(),{nodeIdentifiers:vA}=Y[wA],VA=oA(vA,wA),k=[];for(let D of VA){let W=U(JA,D),iA=document.querySelectorAll(W).length;if(iA!==0){if(iA===1){k.splice(0,k.length),k.push({path:D,children:[],parent:JA,level:wA}),FA=W;break}k.push({path:D,children:[],parent:JA,level:wA})}}if(k.length===0)return;JA.children.push(...k),JA.children.filter(D=>!V.has(D)).forEach(D=>{V.add(D),UA.push(D)}),wA=wA+1}return FA}function X(M,eA){let Y={root:document.body,idName:aA=>!0,className:aA=>!0,tagName:aA=>!0,attr:(aA,UA)=>!1,optimizedMinLength:6,maxNumberOfTries:2e3,fallbackNodeTree:M};return p=Object.assign(Object.assign({},Y),eA),C=yA(p.root,Y),K(M,C)}function oA(M,eA){let Y=G(M.find(vA=>vA.identifier==="id")),aA=G(...M.filter(vA=>vA.identifier==="attribute")),UA=G(...M.filter(vA=>vA.identifier==="className")),V=G(...M.filter(vA=>vA.identifier==="tagName")),FA=M.filter(vA=>vA.identifier==="index"&&vA.identifier.outOf!=="1")?.[0]?.index,wA=[...Y||[],...aA||[],...UA||[],...V||[]];return FA&&(wA=wA.concat(wA.filter(Ue).map(vA=>OA(vA,FA)))),(wA?ye(WA([wA])):null).map(([vA])=>({...vA,level:eA}))}function yA(M,eA){return M.nodeType===Node.DOCUMENT_NODE?M:M===eA.root?M.ownerDocument:M}function $(M){let eA=Array.from(M.childNodes).reduce((FA,wA)=>(wA.nodeType===3&&FA.push(wA.nodeValue),FA),[]).join(""),Y=Array.from(M.childNodes).map(FA=>{let wA=FA.nodeName.toLowerCase();return{classes:FA.classList?Array.from(FA.classList):[],nodeName:wA}}),aA=M.classList?Array.from(M.classList):[],UA=M.tagName.toLowerCase(),V=ji(window.location.href);return{tagName:UA,classes:aA,internalStructure:Y,directInnerText:eA,url:V}}function CA(M){let eA=[],Y=M,aA=0;for(;Y&&Y!==p.root.parentElement;){let UA=[G(ce(Y)),G(ue(Y)),G(...fA(Y)),G(...NA(Y)),G(GA(Y))].filter(zA).flat().sort((V,FA)=>V.penalty-FA.penalty);eA.push({nodeIdentifiers:UA,level:aA}),Y=Y.parentElement,aA++}return eA}function TA(M){return M.map(eA=>eA.penalty).reduce((eA,Y)=>eA+Y,0)}function BA(M){switch(C.querySelectorAll(b(M)).length){case 0:throw new Error(`Can't select any node with this selector: ${b(M)}`);case 1:return!0;default:return!1}}function ce(M){M?.getAttribute||alert(JSON.stringify(M));let eA=M.getAttribute("id");return eA&&p.idName(eA)?{name:"#"+_e(eA,{isIdentifier:!0}),penalty:0,identifier:"id"}:null}function fA(M){return Array.from(M.attributes).filter(Y=>p.attr(Y.name,Y.value)).map(Y=>({name:"["+_e(Y.name,{isIdentifier:!0})+'="'+_e(Y.value)+'"]',penalty:.5,identifier:"attribute"}))}function NA(M){return Array.from(M.classList).filter(p.className).map(Y=>({name:"."+_e(Y,{isIdentifier:!0}),penalty:1,identifier:"className"}))}function ue(M){let eA=M.tagName.toLowerCase();return p.tagName(eA)?{name:eA,penalty:2,identifier:"tagName"}:null}function Ut(){return{name:"*",penalty:3,identifier:"any"}}function GA(M){let eA=M.parentNode;if(!eA)return null;let Y=eA.firstChild;if(!Y)return null;let aA=0;for(;Y&&(Y.nodeType===Node.ELEMENT_NODE&&aA++,Y!==M);)Y=Y.nextSibling;return{index:aA,outOf:eA.childElementCount,penalty:4,identifier:"index"}}function OA(M,eA){return{name:M.name+`:nth-child(${eA})`,penalty:M.penalty+1}}function Ue(M){return M.name!=="html"&&!M.name.startsWith("#")&&!p.allowDuplicates}function G(...M){let eA=M.filter(zA);return eA.length>0?eA:null}function zA(M){return M!=null}function*WA(M,eA=[]){if(M.length>0)for(let Y of M[0])yield*WA(M.slice(1,M.length),eA.concat(Y));else yield eA}function ye(M){return Array.from(M).sort((eA,Y)=>TA(eA)-TA(Y))}function*ut(M,eA,Y={counter:0,visited:new Map}){if(M.length>2&&M.length>p.optimizedMinLength)for(let aA=1;aAp.maxNumberOfTries){console.log(`*** Selector optimization exhausted. Exceeded max number of tries - ${p.maxNumberOfTries}`);return}Y.counter+=1;let UA=[...M];UA.splice(aA,1);let V=b(UA);if(Y.visited.has(V))return;BA(UA)&&yt(UA,eA)&&(yield UA,Y.visited.set(V,!0),yield*ut(UA,eA,Y))}}function yt(M,eA){return C.querySelector(b(M))===eA}let Yt=/[ -,\.\/:-@\[-\^`\{-~]/,AA=/[ -,\.\/:-@\[\]\^`\{-~]/,HA=/(^|\\+)?(\\[A-F0-9]{1,6})\x20(?![a-fA-F0-9\x20])/g,Re={escapeEverything:!1,isIdentifier:!1,quotes:"single",wrap:!1};function _e(M,eA={}){let Y=Object.assign(Object.assign({},Re),eA);Y.quotes!="single"&&Y.quotes!="double"&&(Y.quotes="single");let aA=Y.quotes=="double"?'"':"'",UA=Y.isIdentifier,V=M.charAt(0),FA="",wA=0,JA=M.length;for(;wA126){if(VA>=55296&&VA<=56319&&wAK===p},{nodeTree:b,recordedElementInfo:U}=C.getElementProfileNodeTree(h.target,E);return console.log("*** Just FYI - this is how it can generate css selector:",C.generateSelectorFromNodeTree(b,E)),{nodeTree:b,recordedElementInfo:U}}function To(h,p){let C=ka(),b={...{allowDuplicates:!1,optimizedMinLength:10,threshold:1e3,attr:K=>K===dataAttribute,fallbackNodeTree:h},...p};return C.generateSelectorFromNodeTree(h,b)}function kl(h,p){this.removeOverlayElement=()=>{console.log("Removing mouse over event listener from the selected element."),h.removeEventListener("mouseover",this.mouseOverEvent);let b=h.getElementById("element-selector-overlay");b&&h?.body?.removeChild(b)},this.saveSelectedSelector=b=>{b.preventDefault(),b.stopPropagation(),this.removeOverlayElement();let U=Vg(b,{dataAttribute:"some-custom-strigo-attribute"});U=U||{},console.log("Selected element with elementProfile:",U),p.onElementProfileCreated(U)};function C(b,U){for(let K in U)b.style[K]=U[K]}let E=(b,U,K=[])=>{if(U===b.target)return;let X=b.target;if(K.includes(X.id))return;let oA=X.offsetWidth+2,yA=X.offsetHeight+2;function $(BA){let ce=0,fA=0;for(;BA&&!isNaN(BA.offsetLeft)&&!isNaN(BA.offsetTop);)ce+=BA.offsetLeft-BA.scrollLeft,fA+=BA.offsetTop-BA.scrollTop,BA=BA.offsetParent;return{top:fA-window.scrollY,left:ce-window.scrollX}}let CA=$(X),TA={top:CA.top-2+"px",left:CA.left-2+"px",width:oA+"px",height:yA+"px"};C(U,TA)};return this.mouseOverEvent=b=>{let U=window.document.getElementById("element-selector-overlay");E(b,U,["element-selector-overlay","strigo-assessment-recorder-iframe"]),b.target.addEventListener("click",this.saveSelectedSelector)},this.removeClickListenerFromHoveredElement=b=>{b.target.removeEventListener("click",this.saveSelectedSelector)},this.startElementSelector=()=>{let b=h.createElement("div");b.setAttribute("id","element-selector-overlay"),b.setAttribute("id","element-selector-overlay"),b.setAttribute("style",` position: fixed; top: 0; left: 0; @@ -26,7 +26,7 @@ ${JSON.stringify(C)}`:"")}getDefaultContext(){let p=le();if(!p)return{};let{user border: 2px dashed #696CBF; box-sizing: border-box; border-radius: 4px; - `),console.log("Appending overlay selector element."),h.body.appendChild(E),h.addEventListener("mouseover",this.mouseOverEvent),h.addEventListener("mouseout",this.removeClickListenerFromHoveredElement),window.focus(),h.body.focus(),window.addEventListener("keydown",this.onEscSelection,!0)},this.onEscSelection=E=>{E.key==="Escape"&&(console.log("Aborting element selection...",E.key),this.stopElementSelection())},this.stopElementSelection=()=>{this.removeOverlayElement(),window.removeEventListener("keydown",this.onEscSelection,!0),p.onElementSelectionCancel()},{startElementSelector:this.startElementSelector,stopElementSelection:this.stopElementSelection}}function Xl(){return!!(Nl()||window.sessionStorage.getItem("isStrigoRecordingMode"))}function Jg(h,p){let{nodeTree:U,recordedElementInfo:b}=h,E=document.getElementById("strigo-assessment-recorder-iframe"),C=Lo(U);(0,Vl.default)(document.querySelector(C),{backgroundColor:"#c6c7e7"}).then(R=>{let j={imageData:R.toDataURL(),profile:h,querySelector:C};E.contentWindow.postMessage(JSON.stringify({messageType:"end-capture",payload:{elementType:p,selectedElement:j},windowName:window.name}),"*"),E.classList.replace("slide-from-opened-to-minimized","slide-from-minimized-to-opened")})}function Yg(h){T.info("Aborting element selection...");let p=document.getElementById("strigo-assessment-recorder-iframe");p.classList.replace("slide-from-opened-to-minimized","slide-from-minimized-to-opened"),p.contentWindow.postMessage(JSON.stringify({messageType:"end-capture",payload:{elementType:h,selectedElement:null},windowName:window.name}),"*")}function Wl(){window.sessionStorage.setItem("isStrigoRecordingMode","true");let h=new URL(window.location.href).searchParams.get(Pn);if(window.sessionStorage.setItem(Pn,h),document.getElementById("strigo-assessment-recorder-iframe"))return;let p=Pl();hr({parentElement:pr(),url:_l()});let U=To({classNames:["strigo-assessment-recorder-iframe","opened"],id:"strigo-assessment-recorder-iframe",parentElement:window.document.body,url:p});window.addEventListener("message",b=>{if(!b||!b.data||b.origin!==p)return;let E;try{E=JSON.parse(b.data)}catch{return}let{messageType:C,payload:R}=E;switch(C){case"start-capture":{T.info("Start capturing message received"),U.classList.replace("opened","slide-from-opened-to-minimized")||U.classList.replace("slide-from-minimized-to-opened","slide-from-opened-to-minimized");let{elementType:iA,rootElementSelector:UA}=R?.captureParams;window.Strigo.startElementSelector(X=>Jg(X,iA),()=>Yg(iA),UA);break}case"stop-capture":{T.info("Stop capturing message received"),U.classList.replace("slide-from-opened-to-minimized","slide-from-minimized-to-opened"),window.Strigo.stopElementSelector();break}case"submit-assessment":{let j=window.sessionStorage.getItem(Pn);window.sessionStorage.removeItem("isStrigoRecordingMode");let iA=As(window.location.href);window.opener.postMessage({assessment:{...R.assessment,url:iA},recorderWindowId:j},"*"),window.close();break}case"cancel-assessment":{window.sessionStorage.removeItem("isStrigoRecordingMode"),window.close();break}default:break}},!1)}function Va(){try{return JSON.parse(window["localStorage"].getItem("strigoAssessments"))}catch(h){return T.error("Get assessments storage error",{error:h}),null}}function Jl(){try{let h=Va();if(h)return T.debug("Assessments storage already exists"),h;let p={assessments:[]};return window["localStorage"].setItem("strigoAssessments",JSON.stringify(p)),p}catch(h){return T.error("Init assessments storage error",{error:h}),null}}function Yl(h){try{let p=h?{assessments:[...h]}:{assessments:[]};return window["localStorage"].setItem("strigoAssessments",JSON.stringify(p)),p}catch(p){return T.error("Assessments storage setup error",{error:p}),null}}function jl(){try{window["localStorage"].removeItem("strigoAssessments")}catch(h){T.error("Clear assessments storage error",{error:h})}}var Ye=typeof window!="undefined"?window:null,Wa=Ye===null,Do=Wa?void 0:Ye.document,st="addEventListener",at="removeEventListener",Xa="getBoundingClientRect",Oo="_a",ct="_b",Jt="_c",es="horizontal",lt=function(){return!1},Zg=Wa?"calc":["","-webkit-","-moz-","-o-"].filter(function(h){var p=Do.createElement("div");return p.style.cssText="width:"+h+"calc(9px)",!!p.style.length}).shift()+"calc",Zl=function(h){return typeof h=="string"||h instanceof String},zl=function(h){if(Zl(h)){var p=Do.querySelector(h);if(!p)throw new Error("Selector "+h+" did not match a DOM element");return p}return h},Ce=function(h,p,U){var b=h[p];return b!==void 0?b:U},ts=function(h,p,U,b){if(p){if(b==="end")return 0;if(b==="center")return h/2}else if(U){if(b==="start")return 0;if(b==="center")return h/2}return h},qg=function(h,p){var U=Do.createElement("div");return U.className="gutter gutter-"+p,U},$g=function(h,p,U){var b={};return Zl(p)?b[h]=p:b[h]=Zg+"("+p+"% - "+U+"px)",b},Ad=function(h,p){var U;return U={},U[h]=p+"px",U},ed=function(h,p){if(p===void 0&&(p={}),Wa)return{};var U=h,b,E,C,R,j,iA;Array.from&&(U=Array.from(U));var UA=zl(U[0]),X=UA.parentNode,_A=getComputedStyle?getComputedStyle(X):null,xA=_A?_A.flexDirection:null,BA=Ce(p,"sizes")||U.map(function(){return 100/U.length}),ae=Ce(p,"minSize",100),fA=Array.isArray(ae)?ae:U.map(function(){return ae}),NA=Ce(p,"maxSize",1/0),ue=Array.isArray(NA)?NA:U.map(function(){return NA}),Ut=Ce(p,"expandToMin",!1),GA=Ce(p,"gutterSize",10),LA=Ce(p,"gutterAlign","center"),Ue=Ce(p,"snapOffset",30),G=Array.isArray(Ue)?Ue:U.map(function(){return Ue}),zA=Ce(p,"dragInterval",1),WA=Ce(p,"direction",es),ye=Ce(p,"cursor",WA===es?"col-resize":"row-resize"),ut=Ce(p,"gutter",qg),yt=Ce(p,"elementStyle",$g),Yt=Ce(p,"gutterStyle",Ad);WA===es?(b="width",E="clientX",C="left",R="right",j="clientWidth"):WA==="vertical"&&(b="height",E="clientY",C="top",R="bottom",j="clientHeight");function AA(k,D,W,oA){var ZA=yt(b,D,W,oA);Object.keys(ZA).forEach(function(cA){k.style[cA]=ZA[cA]})}function SA(k,D,W){var oA=Yt(b,D,W);Object.keys(oA).forEach(function(ZA){k.style[ZA]=oA[ZA]})}function Re(){return iA.map(function(k){return k.size})}function _e(k){return"touches"in k?k.touches[0][E]:k[E]}function K(k){var D=iA[this.a],W=iA[this.b],oA=D.size+W.size;D.size=k/this.size*oA,W.size=oA-k/this.size*oA,AA(D.element,D.size,this[ct],D.i),AA(W.element,W.size,this[Jt],W.i)}function eA(k){var D,W=iA[this.a],oA=iA[this.b];!this.dragging||(D=_e(k)-this.start+(this[ct]-this.dragOffset),zA>1&&(D=Math.round(D/zA)*zA),D<=W.minSize+W.snapOffset+this[ct]?D=W.minSize+this[ct]:D>=this.size-(oA.minSize+oA.snapOffset+this[Jt])&&(D=this.size-(oA.minSize+this[Jt])),D>=W.maxSize-W.snapOffset+this[ct]?D=W.maxSize+this[ct]:D<=this.size-(oA.maxSize-oA.snapOffset+this[Jt])&&(D=this.size-(oA.maxSize+this[Jt])),K.call(this,D),Ce(p,"onDrag",lt)(Re()))}function Y(){var k=iA[this.a].element,D=iA[this.b].element,W=k[Xa](),oA=D[Xa]();this.size=W[b]+oA[b]+this[ct]+this[Jt],this.start=W[C],this.end=W[R]}function aA(k){if(!getComputedStyle)return null;var D=getComputedStyle(k);if(!D)return null;var W=k[j];return W===0?null:(WA===es?W-=parseFloat(D.paddingLeft)+parseFloat(D.paddingRight):W-=parseFloat(D.paddingTop)+parseFloat(D.paddingBottom),W)}function CA(k){var D=aA(X);if(D===null||fA.reduce(function(cA,oe){return cA+oe},0)>D)return k;var W=0,oA=[],ZA=k.map(function(cA,oe){var He=D*cA/100,YA=ts(GA,oe===0,oe===k.length-1,LA),Pe=fA[oe]+YA;return He0&&oA[oe]-W>0){var YA=Math.min(W,oA[oe]-W);W-=YA,He=cA-YA}return He/D*100})}function V(){var k=this,D=iA[k.a].element,W=iA[k.b].element;k.dragging&&Ce(p,"onDragEnd",lt)(Re()),k.dragging=!1,Ye[at]("mouseup",k.stop),Ye[at]("touchend",k.stop),Ye[at]("touchcancel",k.stop),Ye[at]("mousemove",k.move),Ye[at]("touchmove",k.move),k.stop=null,k.move=null,D[at]("selectstart",lt),D[at]("dragstart",lt),W[at]("selectstart",lt),W[at]("dragstart",lt),D.style.userSelect="",D.style.webkitUserSelect="",D.style.MozUserSelect="",D.style.pointerEvents="",W.style.userSelect="",W.style.webkitUserSelect="",W.style.MozUserSelect="",W.style.pointerEvents="",k.gutter.style.cursor="",k.parent.style.cursor="",Do.body.style.cursor=""}function yA(k){if(!("button"in k&&k.button!==0)){var D=this,W=iA[D.a].element,oA=iA[D.b].element;D.dragging||Ce(p,"onDragStart",lt)(Re()),k.preventDefault(),D.dragging=!0,D.move=eA.bind(D),D.stop=V.bind(D),Ye[st]("mouseup",D.stop),Ye[st]("touchend",D.stop),Ye[st]("touchcancel",D.stop),Ye[st]("mousemove",D.move),Ye[st]("touchmove",D.move),W[st]("selectstart",lt),W[st]("dragstart",lt),oA[st]("selectstart",lt),oA[st]("dragstart",lt),W.style.userSelect="none",W.style.webkitUserSelect="none",W.style.MozUserSelect="none",W.style.pointerEvents="none",oA.style.userSelect="none",oA.style.webkitUserSelect="none",oA.style.MozUserSelect="none",oA.style.pointerEvents="none",D.gutter.style.cursor=ye,D.parent.style.cursor=ye,Do.body.style.cursor=ye,Y.call(D),D.dragOffset=_e(k)-D.end}}BA=CA(BA);var wA=[];iA=U.map(function(k,D){var W={element:zl(k),size:BA[D],minSize:fA[D],maxSize:ue[D],snapOffset:G[D],i:D},oA;if(D>0&&(oA={a:D-1,b:D,dragging:!1,direction:WA,parent:X},oA[ct]=ts(GA,D-1===0,!1,LA),oA[Jt]=ts(GA,!1,D===U.length-1,LA),xA==="row-reverse"||xA==="column-reverse")){var ZA=oA.a;oA.a=oA.b,oA.b=ZA}if(D>0){var cA=ut(D,WA,W.element);SA(cA,GA,D),oA[Oo]=yA.bind(oA),cA[st]("mousedown",oA[Oo]),cA[st]("touchstart",oA[Oo]),X.insertBefore(cA,W.element),oA.gutter=cA}return AA(W.element,W.size,ts(GA,D===0,D===U.length-1,LA),D),D>0&&wA.push(oA),W});function JA(k){var D=k.i===wA.length,W=D?wA[k.i-1]:wA[k.i];Y.call(W);var oA=D?W.size-k.minSize-W[Jt]:k.minSize+W[ct];K.call(W,oA)}iA.forEach(function(k){var D=k.element[Xa]()[b];D0){var ZA=wA[oA-1],cA=iA[ZA.a],oe=iA[ZA.b];cA.size=D[oA-1],oe.size=W,AA(cA.element,cA.size,ZA[ct],cA.i),AA(oe.element,oe.size,ZA[Jt],oe.i)}})}function VA(k,D){wA.forEach(function(W){if(D!==!0?W.parent.removeChild(W.gutter):(W.gutter[at]("mousedown",W[Oo]),W.gutter[at]("touchstart",W[Oo])),k!==!0){var oA=yt(b,W.a.size,W[ct]);Object.keys(oA).forEach(function(ZA){iA[W.a].element.style[ZA]="",iA[W.b].element.style[ZA]=""})}})}return{setSizes:vA,getSizes:Re,collapse:function(D){JA(iA[D])},destroy:VA,parent:X,pairs:wA}},Ja=ed;var td=` + `),console.log("Appending overlay selector element."),h.body.appendChild(b),h.addEventListener("mouseover",this.mouseOverEvent),h.addEventListener("mouseout",this.removeClickListenerFromHoveredElement),window.focus(),h.body.focus(),window.addEventListener("keydown",this.onEscSelection,!0)},this.onEscSelection=b=>{b.key==="Escape"&&(console.log("Aborting element selection...",b.key),this.stopElementSelection())},this.stopElementSelection=()=>{this.removeOverlayElement(),window.removeEventListener("keydown",this.onEscSelection,!0),p.onElementSelectionCancel()},{startElementSelector:this.startElementSelector,stopElementSelection:this.stopElementSelection}}function Xg(h,p){let C=document.getElementById("strigo-assessment-recorder-iframe"),{nodeTree:E}=h,b=To(E);(0,Vl.default)(document.querySelector(b),{backgroundColor:"#c6c7e7"}).then(U=>{let K={imageData:U.toDataURL(),profile:h,querySelector:b};C.contentWindow.postMessage(JSON.stringify({messageType:"end-capture",payload:{elementType:p,selectedElement:K},windowName:window.name}),"*"),C.classList.replace("slide-from-opened-to-minimized","slide-from-minimized-to-opened")})}function Wg(h){L.info("Aborting element selection...");let p=document.getElementById("strigo-assessment-recorder-iframe");p.classList.replace("slide-from-opened-to-minimized","slide-from-minimized-to-opened"),p.contentWindow.postMessage(JSON.stringify({messageType:"end-capture",payload:{elementType:h,selectedElement:null},windowName:window.name}),"*")}function Xl(){if(document.getElementById("strigo-assessment-recorder-iframe"))return;let h=Bl();hr({parentElement:pr(),url:dl()});let p=xo({classNames:["strigo-assessment-recorder-iframe","opened"],id:"strigo-assessment-recorder-iframe",parentElement:window.document.body,url:h});window.addEventListener("message",C=>{if(!C||!C.data||C.origin!==h)return;let E;try{E=JSON.parse(C.data)}catch{return}let{messageType:b,payload:U}=E;switch(b){case"start-capture":{L.info("Start capturing message received"),p.classList.replace("opened","slide-from-opened-to-minimized")||p.classList.replace("slide-from-minimized-to-opened","slide-from-opened-to-minimized");let{elementType:X,rootElementSelector:oA}=U?.captureParams;window.Strigo.startElementSelector(yA=>Xg(yA,X),()=>Wg(X),oA);break}case"stop-capture":{L.info("Stop capturing message received"),p.classList.replace("slide-from-opened-to-minimized","slide-from-minimized-to-opened"),window.Strigo.stopElementSelector();break}case"submit-assessment":{debugger;let K=window.sessionStorage.getItem(Wi),X=ji(window.location.href);window.opener.postMessage({assessment:{...U.assessment,url:X},recorderWindowId:K},"*"),window.close();break}case"cancel-assessment":{window.close();break}default:break}},!1)}var Ye=typeof window!="undefined"?window:null,Xa=Ye===null,Oo=Xa?void 0:Ye.document,st="addEventListener",at="removeEventListener",Va="getBoundingClientRect",Lo="_a",ct="_b",Jt="_c",es="horizontal",lt=function(){return!1},Yg=Xa?"calc":["","-webkit-","-moz-","-o-"].filter(function(h){var p=Oo.createElement("div");return p.style.cssText="width:"+h+"calc(9px)",!!p.style.length}).shift()+"calc",Jl=function(h){return typeof h=="string"||h instanceof String},Wl=function(h){if(Jl(h)){var p=Oo.querySelector(h);if(!p)throw new Error("Selector "+h+" did not match a DOM element");return p}return h},Ce=function(h,p,C){var E=h[p];return E!==void 0?E:C},ts=function(h,p,C,E){if(p){if(E==="end")return 0;if(E==="center")return h/2}else if(C){if(E==="start")return 0;if(E==="center")return h/2}return h},jg=function(h,p){var C=Oo.createElement("div");return C.className="gutter gutter-"+p,C},zg=function(h,p,C){var E={};return Jl(p)?E[h]=p:E[h]=Yg+"("+p+"% - "+C+"px)",E},Zg=function(h,p){var C;return C={},C[h]=p+"px",C},qg=function(h,p){if(p===void 0&&(p={}),Xa)return{};var C=h,E,b,U,K,X,oA;Array.from&&(C=Array.from(C));var yA=Wl(C[0]),$=yA.parentNode,CA=getComputedStyle?getComputedStyle($):null,TA=CA?CA.flexDirection:null,BA=Ce(p,"sizes")||C.map(function(){return 100/C.length}),ce=Ce(p,"minSize",100),fA=Array.isArray(ce)?ce:C.map(function(){return ce}),NA=Ce(p,"maxSize",1/0),ue=Array.isArray(NA)?NA:C.map(function(){return NA}),Ut=Ce(p,"expandToMin",!1),GA=Ce(p,"gutterSize",10),OA=Ce(p,"gutterAlign","center"),Ue=Ce(p,"snapOffset",30),G=Array.isArray(Ue)?Ue:C.map(function(){return Ue}),zA=Ce(p,"dragInterval",1),WA=Ce(p,"direction",es),ye=Ce(p,"cursor",WA===es?"col-resize":"row-resize"),ut=Ce(p,"gutter",jg),yt=Ce(p,"elementStyle",zg),Yt=Ce(p,"gutterStyle",Zg);WA===es?(E="width",b="clientX",U="left",K="right",X="clientWidth"):WA==="vertical"&&(E="height",b="clientY",U="top",K="bottom",X="clientHeight");function AA(k,D,W,iA){var ZA=yt(E,D,W,iA);Object.keys(ZA).forEach(function(cA){k.style[cA]=ZA[cA]})}function HA(k,D,W){var iA=Yt(E,D,W);Object.keys(iA).forEach(function(ZA){k.style[ZA]=iA[ZA]})}function Re(){return oA.map(function(k){return k.size})}function _e(k){return"touches"in k?k.touches[0][b]:k[b]}function M(k){var D=oA[this.a],W=oA[this.b],iA=D.size+W.size;D.size=k/this.size*iA,W.size=iA-k/this.size*iA,AA(D.element,D.size,this[ct],D.i),AA(W.element,W.size,this[Jt],W.i)}function eA(k){var D,W=oA[this.a],iA=oA[this.b];!this.dragging||(D=_e(k)-this.start+(this[ct]-this.dragOffset),zA>1&&(D=Math.round(D/zA)*zA),D<=W.minSize+W.snapOffset+this[ct]?D=W.minSize+this[ct]:D>=this.size-(iA.minSize+iA.snapOffset+this[Jt])&&(D=this.size-(iA.minSize+this[Jt])),D>=W.maxSize-W.snapOffset+this[ct]?D=W.maxSize+this[ct]:D<=this.size-(iA.maxSize-iA.snapOffset+this[Jt])&&(D=this.size-(iA.maxSize+this[Jt])),M.call(this,D),Ce(p,"onDrag",lt)(Re()))}function Y(){var k=oA[this.a].element,D=oA[this.b].element,W=k[Va](),iA=D[Va]();this.size=W[E]+iA[E]+this[ct]+this[Jt],this.start=W[U],this.end=W[K]}function aA(k){if(!getComputedStyle)return null;var D=getComputedStyle(k);if(!D)return null;var W=k[X];return W===0?null:(WA===es?W-=parseFloat(D.paddingLeft)+parseFloat(D.paddingRight):W-=parseFloat(D.paddingTop)+parseFloat(D.paddingBottom),W)}function UA(k){var D=aA($);if(D===null||fA.reduce(function(cA,ie){return cA+ie},0)>D)return k;var W=0,iA=[],ZA=k.map(function(cA,ie){var He=D*cA/100,YA=ts(GA,ie===0,ie===k.length-1,OA),Pe=fA[ie]+YA;return He0&&iA[ie]-W>0){var YA=Math.min(W,iA[ie]-W);W-=YA,He=cA-YA}return He/D*100})}function V(){var k=this,D=oA[k.a].element,W=oA[k.b].element;k.dragging&&Ce(p,"onDragEnd",lt)(Re()),k.dragging=!1,Ye[at]("mouseup",k.stop),Ye[at]("touchend",k.stop),Ye[at]("touchcancel",k.stop),Ye[at]("mousemove",k.move),Ye[at]("touchmove",k.move),k.stop=null,k.move=null,D[at]("selectstart",lt),D[at]("dragstart",lt),W[at]("selectstart",lt),W[at]("dragstart",lt),D.style.userSelect="",D.style.webkitUserSelect="",D.style.MozUserSelect="",D.style.pointerEvents="",W.style.userSelect="",W.style.webkitUserSelect="",W.style.MozUserSelect="",W.style.pointerEvents="",k.gutter.style.cursor="",k.parent.style.cursor="",Oo.body.style.cursor=""}function FA(k){if(!("button"in k&&k.button!==0)){var D=this,W=oA[D.a].element,iA=oA[D.b].element;D.dragging||Ce(p,"onDragStart",lt)(Re()),k.preventDefault(),D.dragging=!0,D.move=eA.bind(D),D.stop=V.bind(D),Ye[st]("mouseup",D.stop),Ye[st]("touchend",D.stop),Ye[st]("touchcancel",D.stop),Ye[st]("mousemove",D.move),Ye[st]("touchmove",D.move),W[st]("selectstart",lt),W[st]("dragstart",lt),iA[st]("selectstart",lt),iA[st]("dragstart",lt),W.style.userSelect="none",W.style.webkitUserSelect="none",W.style.MozUserSelect="none",W.style.pointerEvents="none",iA.style.userSelect="none",iA.style.webkitUserSelect="none",iA.style.MozUserSelect="none",iA.style.pointerEvents="none",D.gutter.style.cursor=ye,D.parent.style.cursor=ye,Oo.body.style.cursor=ye,Y.call(D),D.dragOffset=_e(k)-D.end}}BA=UA(BA);var wA=[];oA=C.map(function(k,D){var W={element:Wl(k),size:BA[D],minSize:fA[D],maxSize:ue[D],snapOffset:G[D],i:D},iA;if(D>0&&(iA={a:D-1,b:D,dragging:!1,direction:WA,parent:$},iA[ct]=ts(GA,D-1===0,!1,OA),iA[Jt]=ts(GA,!1,D===C.length-1,OA),TA==="row-reverse"||TA==="column-reverse")){var ZA=iA.a;iA.a=iA.b,iA.b=ZA}if(D>0){var cA=ut(D,WA,W.element);HA(cA,GA,D),iA[Lo]=FA.bind(iA),cA[st]("mousedown",iA[Lo]),cA[st]("touchstart",iA[Lo]),$.insertBefore(cA,W.element),iA.gutter=cA}return AA(W.element,W.size,ts(GA,D===0,D===C.length-1,OA),D),D>0&&wA.push(iA),W});function JA(k){var D=k.i===wA.length,W=D?wA[k.i-1]:wA[k.i];Y.call(W);var iA=D?W.size-k.minSize-W[Jt]:k.minSize+W[ct];M.call(W,iA)}oA.forEach(function(k){var D=k.element[Va]()[E];D0){var ZA=wA[iA-1],cA=oA[ZA.a],ie=oA[ZA.b];cA.size=D[iA-1],ie.size=W,AA(cA.element,cA.size,ZA[ct],cA.i),AA(ie.element,ie.size,ZA[Jt],ie.i)}})}function VA(k,D){wA.forEach(function(W){if(D!==!0?W.parent.removeChild(W.gutter):(W.gutter[at]("mousedown",W[Lo]),W.gutter[at]("touchstart",W[Lo])),k!==!0){var iA=yt(E,W.a.size,W[ct]);Object.keys(iA).forEach(function(ZA){oA[W.a].element.style[ZA]="",oA[W.b].element.style[ZA]=""})}})}return{setSizes:vA,getSizes:Re,collapse:function(D){JA(oA[D])},destroy:VA,parent:$,pairs:wA}},Wa=qg;var $g=`
-`;function ql(){let h=document.createElement("div");h.className="strigo-loader",h.innerHTML=td,document.body.appendChild(h)}function $l(){let h=document.querySelector(".strigo-loader");return new Promise(p=>{let U=setInterval(()=>{h.style.opacity||(h.style.opacity="1");let b=parseFloat(h.style.opacity);b>0?h.style.opacity=(b-.1).toString():(h.style.pointerEvents="none",clearInterval(U),p())},200)})}var rc=Eo(eu(),1);var du=Eo(Za(),1);var rs=Eo(su(),1);function Cd(h,p){if(h.length===0&&p.length===0)return 1;let U=h.filter(C=>p.includes(C)),b=h.length+p.length-U.length;if(b===0)return 0;let E=U.length/b;return T.info("*** Style similarity ratio:",E),E}function Ud(h,p){let U=Array.from(p.childNodes).map(({nodeName:C})=>C.toLowerCase()),b=h.internalStructure?.map(({nodeName:C})=>C.toLowerCase()),E=rs.default.compareTwoStrings(U.join(""),b.join(""));return T.info("*** Internal structure similarity ratio:",E),E}function yd(h,p){let U=Array.from(p.childNodes).reduce((E,C)=>(C.nodeType===3&&E.push(C.nodeValue),E),[]).join(""),b=rs.default.compareTwoStrings(h.directInnerText,U);return T.info("*** Text similarity ratio: ",b),b}function Fd(h,p){if(h.tagName!==p.tagName.toLocaleLowerCase())return T.info("*** Mismatching element type. Similarity rating is 0.",{recordedElementTagName:h.tagName,capturedElementTagName:p.tagName.toLocaleLowerCase()}),0;let U=h.classes,b=Array.from(p.classList),E=Cd(U,b),C=Ud(h,p),R=yd(h,p),j=(E+C+R)/3;return T.info("*** Avg. similarity rating: ",j),j}function cu(h,p){return T.info("*** elementInfo",h),!(Fd(h,p)fA!==""),j=C.pathname.split("/").filter(fA=>fA!=="");if(R.length!==j.length)return!1;let iA=R.filter(fA=>j.includes(fA)),UA=R.filter(fA=>!j.includes(fA)),X=j.filter(fA=>!R.includes(fA)),_A=R.length,xA=iA.length/_A,BA=rs.default.compareTwoStrings(UA.join(""),X.join(""));if(iA.length===0)return BA>.1;let ae=xA+(1-xA)*BA;return T.info("*** Url path similarity rating:",ae),ae>=le()?.assessmentThresholds?.urlPathSimilarityThreshold}var Ed="strigoLocationId",uu="strigo-location-id",qa={subtree:!0,childList:!0},fu={subtree:!0,characterData:!0,childList:!0},Ct={},Nn={},Ko,Bu;function Ac(h,p){Nn[h]={...Nn[h],...p}}function pu(h,p){let U=window.sessionStorage.getItem(h),E={...U?JSON.parse(U):{},...p};window.sessionStorage.setItem(h,JSON.stringify(E))}function bd(h,p){let U=h.recordedAssessment?.exampleElement?.profile;if(U){T.info("*** No example element profile. Aborting count...");return}let{nodeTree:b,recordedElementInfo:E}=U,C;try{C=Lo(b,{allowDuplicates:!0})}catch{T.info("*** Failed to retrieve a selector for the example element");return}let{_id:R}=h,j=document.querySelectorAll(C)||[];T.info("*** Example elements found:",j);let iA=Array.from(j).filter(BA=>p.contains(BA));T.info("*** Example elements that are inside the location element:",iA);let UA=iA?.length||0,X=window.sessionStorage.getItem(R),xA=(X?JSON.parse(X):{})?.[document.location.href];return T.info("*** evaluating example element count",{currentExampleElementCount:UA,previousExampleElementCount:xA,exampleElementSelector:C,documentText:document.body.innerText.slice(0,10)}),xA||(T.info("*** Persisting example element count to local storage",{currentExampleElementCount:UA}),pu(R,{[document.location.href]:UA})),UA}var $a=async(h,p={})=>{let{_id:U,challengeSuccessEvent:b}=h;T.info("*** Successfully detected assessment criteria!",{assessmentId:U,challengeSuccessEvent:b,...h,window,...p}),Ac(U,{status:"SUCCESS"}),T.info(`sent event ${b}`),await window.Strigo.sendEvent(b)};function Id(h){if(T.info("*** Got an item count mutation in the location element!"),Ko!==document.location.href){T.info("*** Aborting element count due to race condition");return}let{challengeSuccessEvent:p,_id:U}=this.assessment;if(Nn[U]?.status==="SUCCESS"){T.info("*** Assessment already completed successfully.");return}let b;try{b=bd(this.assessment,this.locationElement)}catch{return}let E=window.sessionStorage.getItem(U),R=(E?JSON.parse(E):{})?.[document.location.href];R&&b>parseInt(R)&&(T.info("*** Yo! we got a successfully added item!",{currentExampleElementCount:b,previousExampleElementCount:R}),pu(U,{[document.location.href]:b}),$a(this.assessment),Ct[U].observer.disconnect(),delete Ct[U])}var Sd=(h,p)=>{let U,b,E=Nn[h]?.locationElement,C=window.document.contains(E);if(E&&C)T.info("*** Got a cached location element...",E),U=E,b=Nn[h]?.locationElementSelector;else{let{nodeTree:R,recordedElementInfo:j}=p;if(b=Lo(R,{threshold:5e3}),!b)throw new Error("*** No location element selector was found fitting.");if(T.info("*** Retrieving location element by selector:",b),U=window.document.querySelector(b),T.info("*** Found location element:",{locationElement:U,locationElementSelector:b}),U&&!cu(j,U))throw new Error("*** Not similar to the recorded element.");Ac(h,{locationElement:U,locationElementSelector:b})}return{locationElement:U,locationElementSelector:b}},Hd=function(h,p){let U=window.document.createElement("div");U.dataset[Ed]=p;let b={top:-window.scrollY,left:-window.scrollX},E=h;for(;E&&E!==window.document.body;)b.top+=E.offsetTop,b.left+=E.offsetLeft,E=E.offsetParent;let C=` +`;function Yl(){let h=document.createElement("div");h.className="strigo-loader",h.innerHTML=$g,document.body.appendChild(h)}function jl(){let h=document.querySelector(".strigo-loader");return new Promise(p=>{let C=setInterval(()=>{h.style.opacity||(h.style.opacity="1");let E=parseFloat(h.style.opacity);E>0?h.style.opacity=(E-.1).toString():(h.style.pointerEvents="none",clearInterval(C),p())},200)})}var tc=Fo(Zl(),1);var lu=Fo(za(),1);var rs=Fo(ru(),1);function vd(h,p){if(h.length===0&&p.length===0)return 1;let C=h.filter(U=>p.includes(U)),E=h.length+p.length-C.length;if(E===0)return 0;let b=C.length/E;return L.info("*** Style similarity ratio:",{similarityRatio:b}),b}function md(h,p){let C=Array.from(p.childNodes).map(({nodeName:U})=>U.toLowerCase()),E=h.internalStructure?.map(({nodeName:U})=>U.toLowerCase()),b=rs.default.compareTwoStrings(C.join(""),E.join(""));return L.info("*** Internal structure similarity ratio:",{internalStructureSimilarity:b}),b}function Qd(h,p){let C=Array.from(p.childNodes).reduce((b,U)=>(U.nodeType===3&&b.push(U.nodeValue),b),[]).join(""),E=rs.default.compareTwoStrings(h.directInnerText,C);return L.info("*** Text similarity ratio: ",{textSimilarity:E}),E}function Cd(h,p){if(h.tagName!==p.tagName.toLocaleLowerCase())return L.info("*** Mismatching element type. Similarity rating is 0.",{recordedElementTagName:h.tagName,capturedElementTagName:p.tagName.toLocaleLowerCase()}),0;let C=h.classes,E=Array.from(p.classList),b=vd(C,E),U=md(h,p),K=Qd(h,p),X=(b+U+K)/3;return L.info("*** Avg. similarity rating: ",{avgSimilarityRating:X}),X}function ou(h,p){return L.info("*** elementInfo",{recordedElementInfo:h}),!(Cd(h,p)fA!==""),X=U.pathname.split("/").filter(fA=>fA!=="");if(K.length!==X.length)return!1;let oA=K.filter(fA=>X.includes(fA)),yA=K.filter(fA=>!X.includes(fA)),$=X.filter(fA=>!K.includes(fA)),CA=K.length,TA=oA.length/CA,BA=rs.default.compareTwoStrings(yA.join(""),$.join(""));if(oA.length===0)return BA>.1;let ce=TA+(1-TA)*BA;return L.info("*** Url path similarity rating:",{pathSimilarityRating:ce}),ce>=oe()?.assessmentThresholds?.urlPathSimilarityThreshold}var Ud="strigoLocationId",su="strigo-location-id",Za={subtree:!0,childList:!0},au={subtree:!0,characterData:!0,childList:!0},Ct={},Pn={},Do,uu;function $a(h,p){Pn[h]={...Pn[h],...p}}function fu(h,p){let C=window.sessionStorage.getItem(h),b={...C?JSON.parse(C):{},...p};window.sessionStorage.setItem(h,JSON.stringify(b))}function yd(h,p){let C=h.recordedAssessment?.exampleElement?.profile;if(C){L.info("*** No example element profile. Aborting count...");return}let{nodeTree:E,recordedElementInfo:b}=C,U;try{U=To(E,{allowDuplicates:!0})}catch{L.info("*** Failed to retrieve a selector for the example element");return}let{_id:K}=h,X=document.querySelectorAll(U)||[];L.info("*** Example elements found:",{exampleElements:X});let oA=Array.from(X).filter(BA=>p.contains(BA));L.info("*** Example elements that are inside the location element:",{exampleElementsInsideTheLocationElement:oA});let yA=oA?.length||0,$=window.sessionStorage.getItem(K),TA=($?JSON.parse($):{})?.[document.location.href];return L.info("*** evaluating example element count",{currentExampleElementCount:yA,previousExampleElementCount:TA,exampleElementSelector:U,documentText:document.body.innerText.slice(0,10)}),TA||(L.info("*** Persisting example element count to local storage",{currentExampleElementCount:yA}),fu(K,{[document.location.href]:yA})),yA}var qa=async(h,p={})=>{let{_id:C,challengeSuccessEvent:E}=h;L.info("*** Successfully detected assessment criteria!",{assessmentId:C,challengeSuccessEvent:E,...h,window,...p}),$a(C,{status:"SUCCESS"}),L.info(`sent event ${E}`),await window.Strigo.sendEvent(E)};function Fd(h){if(L.info("*** Got an item count mutation in the location element!"),Do!==document.location.href){L.info("*** Aborting element count due to race condition");return}let{challengeSuccessEvent:p,_id:C}=this.assessment;if(Pn[C]?.status==="SUCCESS"){L.info("*** Assessment already completed successfully.");return}let E;try{E=yd(this.assessment,this.locationElement)}catch{return}let b=window.sessionStorage.getItem(C),K=(b?JSON.parse(b):{})?.[document.location.href];K&&E>parseInt(K)&&(L.info("*** Yo! we got a successfully added item!",{currentExampleElementCount:E,previousExampleElementCount:K}),fu(C,{[document.location.href]:E}),qa(this.assessment),Ct[C].observer.disconnect(),delete Ct[C])}var Ed=(h,p)=>{let C,E,b=Pn[h]?.locationElement,U=window.document.contains(b);if(b&&U)L.info("*** Got a cached location element...",{cachedLocationElement:b}),C=b,E=Pn[h]?.locationElementSelector;else{let{nodeTree:K,recordedElementInfo:X}=p;if(E=To(K,{threshold:5e3}),!E)throw new Error("*** No location element selector was found fitting.");if(L.info("*** Retrieving location element by selector:",{locationElementSelector:E}),C=window.document.querySelector(E),L.info("*** Found location element:",{locationElement:C,locationElementSelector:E}),C&&!ou(X,C))throw new Error("*** Not similar to the recorded element.");$a(h,{locationElement:C,locationElementSelector:E})}return{locationElement:C,locationElementSelector:E}},bd=function(h,p){let C=window.document.createElement("div");C.dataset[Ud]=p;let E={top:-window.scrollY,left:-window.scrollX},b=h;for(;b&&b!==window.document.body;)E.top+=b.offsetTop,E.left+=b.offsetLeft,b=b.offsetParent;let U=` position: fixed; - top: ${b.top-40}px; - left: ${b.left}px; + top: ${E.top-40}px; + left: ${E.left}px; z-index: 2147483646; position: fixed; - `;return U.setAttribute("style",C),window.document.body.appendChild(U),U},xd=function(h,p,U){if(window.document.getElementById(`${U._id}-context-overlay`)){T.info("*** Already got an existing debug element for this assessment.",U);return}h.style.border="2px dashed #696CBF",h.style["border-radius"]="4px";let E=window.document.createElement("div");E.setAttribute("id",`${U._id}-context-overlay`);let C=` + `;return C.setAttribute("style",U),window.document.body.appendChild(C),C},Id=function(h,p,C){if(window.document.getElementById(`${C._id}-context-overlay`)){L.info("*** Already got an existing debug element for this assessment.",{assessment:C});return}h.style.border="2px dashed #696CBF",h.style["border-radius"]="4px";let b=window.document.createElement("div");b.setAttribute("id",`${C._id}-context-overlay`);let U=` width: 400px; padding: 1px; background: rgba(226, 226, 252, 0.90); @@ -54,18 +54,18 @@ ${JSON.stringify(C)}`:"")}getDefaultContext(){let p=le();if(!p)return{};let{user box-sizing: border-box; border-radius: 4px; color: #696CBF; - `;E.setAttribute("style",C);let R=document.createElement("button");R.innerHTML="X";let j=` + `;b.setAttribute("style",U);let K=document.createElement("button");K.innerHTML="X";let X=` display: flex; flex-direction: row; justify-content: space-around; - `;R.onclick=()=>{(window.document.querySelectorAll(`[data-${uu}="${p}"]`)?.[0]).remove()},E.innerHTML=` -
- assessmentId: ${U?._id} + `;K.onclick=()=>{(window.document.querySelectorAll(`[data-${su}="${p}"]`)?.[0]).remove()},b.innerHTML=` +
+ assessmentId: ${C?._id}
-
Expected text: ${U?.recordedAssessment?.expectedText}
+
Expected text: ${C?.recordedAssessment?.expectedText}
Selector used: ${p}
- `,E.children[0].children[1].appendChild(R),T.info("*** Appending assessment debug context element.");let iA=window.document.querySelectorAll(`[data-${uu}="${p}"]`)?.[0];iA?iA.appendChild(E):Hd(h,p).appendChild(E)},gu=function(){T.info("*** Evaluating Assessments...",{bodyTextDuringAssessment:window.document.body.innerText.slice(0,50)}),Bu.filter(({recordedAssessment:p})=>{let U=p?.locationElement?.profile?.recordedElementInfo?.url;if(!U)return!1;let b=window.location.href;return lu(U,b)}).forEach(p=>{let{recordedAssessment:U,challengeSuccessEvent:b,_id:E}=p,{actionType:C,expectedText:R}=U,j=U?.locationElement?.profile;if(!j){T.info("*** missing location element profile. Aborting...");return}if(Nn?.[E]?.status==="SUCCESS"){T.info('*** Assessment already in "success" status. Aborting...');return}Ac(E,{status:"pending"});let iA;try{iA=Sd(E,j)}catch{T.info("*** Failed to find location element. Aborting assessment evaluation...");return}let UA=le()?.isAcademyAssessmentDebug,{locationElement:X,locationElementSelector:_A}=iA;switch(UA&&xd(X,_A,p),C){case"added-item":{let xA=Id.bind({assessment:p,locationElement:X,window});if(Ct[E]?.observer&&X===Ct[E].element){Ct[E].element=X;try{xA([]),Ct[E].observer.observe(X,qa),T.info("Same reference - no need to observe again"),T.info(" *** Same reference - no need to observe again",X)}catch(BA){T.info("*** Got an error in item count",BA);break}break}if(Ct[E]?.observer){try{xA([]),Ct[E].observer.observe(X,qa),T.info("DOM Reference have changed - observing again"),T.info(" *** DOM Reference have changed - observing again",X)}catch(BA){T.info("*** Got an error in item count",BA);break}break}Ct[E]={element:X,observer:new MutationObserver(xA)};try{xA([]),Ct[E].observer.observe(X,qa)}catch(BA){T.info("*** Got an error in item count",BA);break}break}case"text-change":{if(T.info("*** Assessing text changes in location element...",{locationElement:X,locationElementType:X instanceof HTMLInputElement?"input":"non-input",innerTextValue:X instanceof HTMLInputElement?X?.value:X?.innerText,expectedText:R}),X instanceof HTMLInputElement&&X?.value?.includes(R)){$a(p,{locationElement:X});break}if(X?.innerText?.includes(R)){$a(p,{locationElement:X});break}break}default:break}})},Td=function(h){let p=h.some(b=>b.addedNodes?.length>0),U=h.some(b=>b.type=="characterData");if(T.info("#####",{isAddedNodes:p,isCharacterDataChanged:U}),!p&&!U){T.info("*** No added nodes and no character data change were detected after url change.",{previousLocation:Ko||"",newLocation:document.location.href});return}Ko===document.location.href?T.info("*** No URL change and no nodes were added."):(T.info("*** Detected URL change!",{previousLocation:Ko||"",newLocation:document.location.href}),Ko=document.location.href),ec(window)},ec=(0,du.default)(h=>{if(T.info("*** Initializing document observer"),Bu=Va().assessments.filter(({assessmentType:p})=>p==="recorded-flow"),!window?.strigoObserver?.observer){T.info("*** Adding Strigo observer to document body"),window.strigoObserver={observer:new MutationObserver(Td),observedBodyElement:window.document.body},gu(),T.info("*** Starting to observe document body"),window?.strigoObserver?.observer?.observe(window.document,fu);return}gu(),window.document.contains(window.strigoObserver.observedBodyElement)||(T.info('*** Detected a "body" element change. Re-initializing the document observer...'),window.strigoObserver.observedBodyElement=window.document.body,window.strigoObserver.observer.observe(window.document,fu))},500);var vu=Eo(Za(),1);var hu={subtree:!0,childList:!0},ns;function mu(h){try{window["localStorage"].setItem("strigoUrlTriggers",JSON.stringify(h))}catch(p){return T.error("Url triggers setup error",{error:p}),null}}function Od(){try{let h=window["localStorage"].getItem("strigoUrlTriggers");if(h)return JSON.parse(h)}catch(h){return T.error("Get url triggers error",{error:h}),null}}function wu(h){let p=document.getElementById("strigo-exercises"),U=h.document.location.href,b=Od();if(!!b)for(let E of b){let{publishmentId:C,urlTriggerMatchType:R,urlTriggerUrl:j}=E;switch(R){case"exact":{j.trim()===U.trim()&&(p.contentWindow.postMessage({selectedCourseId:C},"*"),zr());break}case"starts_with":{U.trim().startsWith(j.trim())&&(p.contentWindow.postMessage({selectedCourseId:C},"*"),zr());break}default:break}}}var Dd=function(h){let p=h.some(U=>U.addedNodes?.length>0);if(T.info("#####",{isAddedNodes:p}),!p){T.info("*** No added nodes and no character data change were detected after url change.",{previousLocation:ns||"",newLocation:document.location.href});return}ns===document.location.href?T.info("*** No URL change and no nodes were added."):(T.info("*** Detected URL change!",{previousLocation:ns||"",newLocation:document.location.href}),ns=document.location.href),tc(window)},tc=(0,vu.default)(h=>{if(T.info("*** Initializing url trigger observer"),!h?.strigoUrlTriggerObserver?.observer){T.info("*** Adding Strigo url trigger observer to document body"),h.strigoUrlTriggerObserver={observer:new MutationObserver(Dd),observedBodyElement:h.document.body},wu(h),T.info("*** Starting to observe document body - url trigger observer"),h?.strigoUrlTriggerObserver?.observer?.observe(h.document,hu);return}wu(h),h.document.contains(h.strigoUrlTriggerObserver.observedBodyElement)||(T.info('*** Detected a "body" element change. Re-initializing the document observer - url trigger observer...'),h.strigoUrlTriggerObserver.observedBodyElement=h.document.body,h.strigoUrlTriggerObserver.observer.observe(h.document,hu))},500);var Qu=342;function Cu(){T.info("Posting dockable state to Strigo...");let h=dr("dockingSide");document.getElementById("strigo-exercises").contentWindow.postMessage({dockable:!0,dockingSide:h},"*")}function Md(){let[h]=Zi();(0,rc.default)("#strigo-widget").resizable({edges:{left:"#strigo-collapse-div",right:"#strigo-collapse-div.align-left",bottom:!1,top:!1},listeners:{move(p){let U=p.target;U.style.width=`${p.rect.widthh?h:p.rect.width}px`},start(){let p=document.getElementById("strigo-exercises");p.style.pointerEvents="none"},end(){let p=document.getElementById("strigo-exercises");p.style.pointerEvents="auto"}},modifiers:[rc.default.modifiers.restrictEdges({outer:"parent"})]})}var yu=class{init(){return T.info("overlay init called"),"OVERLAY"}setup({version:p}){T.info("overlay setup called"),hr({parentElement:pr(),url:Rl(p)}),hr({parentElement:pr(),url:$i(p)});let U=le(),b=sessionStorage.getItem("strigoPreviewUserToken"),E=bl(qi({...U,user:{token:{token:b||U.user.token.token,expiration:U.user.token.expiration},email:U.user.email}})),C=xo();this.initEventListeners(C,E),T.info("adding assessment document observer"),ec(C),tc(C),Il(C),T.info("assessment document observer added"),Md()}shutdown(){T.info("overlay shutdown called");let p=xo();this.removeEventListeners(p),p?.strigoObserver?.observer?.disconnect(),Fl(p)}collapse(){T.info("overlay collapse called"),Ra()}open(){zr(),Cu()}move(){yl()}initEventListeners(p,U){is(U,Cu),os(p)}removeEventListeners(p){Fu()}},Mo=new yu;function bu(h){if(!(!h||!h.data))switch(h.data){case"move":{T.info("Panel move message received"),Ho()==="overlay"&&Mo.move();break}case"close":{T.info("Shutdown message received - will collapse panel"),window.Strigo?.collapse();break}case"destroy":{T.info("Destroy message received"),window.Strigo?.destroy();break}case"challenge-success":{T.info("Challenge event success received"),Ho()==="overlay"&&Mo.open();break}default:break}}function os(h){h.addEventListener("message",bu,!1)}function Fu(){window.removeEventListener("message",bu)}function is(h,p){h.addEventListener("load",async()=>{pl("isLoading")&&(p&&await p(),zi("isLoading",!1))})}function Iu(h){let p=dr("initSite")?.host;h.addEventListener("load",function(){try{this.contentWindow.location.host!==p&&window.Strigo.shutdown()}catch(U){T.error(U),window.Strigo.shutdown()}})}function Su(){return Ja(["#strigo-exercises","#original-site"],{sizes:[25,75],maxSize:Zi(),minSize:Cl(),gutterSize:2})}async function _d(){await $l(),document.getElementById("strigo-exercises").contentWindow.postMessage({dockable:!1},"*")}var Hu=class{init(){let p;return Ol()?(T.info("Child SDK window"),p="CHILD",window.dispatchEvent(new Event("strigo-opened")),Dl()):(T.info("Parent SDK window"),p="PARENT"),p}setup({version:p}){T.info("iframe setup started"),wl(),hr({parentElement:pr(),url:Ml(p)}),hr({parentElement:pr(),url:$i(p)}),ql();let U=le(),b=vl(),E=To({parentElement:b,url:qi(U),classNames:rl,id:"strigo-exercises"}),C=To({parentElement:b,url:Ll(U.initSite.href),classNames:nl,id:"original-site"}),R=document.createElement("div");R.className="strigo-academy-hat align-left",R.id="strigo-academy-hat",R.onclick=()=>{document.getElementById("strigo-academy-hat").classList.toggle("slide-in"),this.splitInstance=Su()};let j=document.createElement("div");j.className="strigo-academy-hat-icon",j.id="strigo-academy-hat-icon",j.innerHTML=Yi,R.appendChild(j),b.appendChild(R),this.splitInstance=Su();let iA=xo();this.initEventListeners(iA,E,C)}collapse(){this.splitInstance&&(this.splitInstance.destroy(),this.splitInstance=Ja(["#strigo-exercises","#original-site"],{sizes:[25,75],minSize:0,gutterSize:0}),this.splitInstance.collapse(0),document.getElementById("strigo-academy-hat").classList.toggle("slide-in"))}open(){}shutdown(){T.info("iframe shutdown called"),ml()}initEventListeners(p,U,b){is(U,_d),Iu(b),os(b.contentWindow)}},xu=new Hu;function Tu(h){return h&&h==="dynamic"?Ul()?"iframe":"overlay":h}function Ro(h){let p=null;switch(h){case"iframe":{p=xu;break}case"overlay":{p=Mo;break}default:throw T.error("Widget flavor is not supported",{widgetFlavor:h}),new Error(`Widget flavor ${h} is not supported`)}return p}var Lu=class{constructor(){this.config={}}isDevelopment(){return!1}init(){try{if(T.info("Initializing SDK..."),this.config.initialized){T.info("SDK was already initialized");return}let p=Gl();p&&(T.info("strigoPreviewUserToken found - SDK will be initialized with token"),sessionStorage.setItem("strigoPreviewUserToken",p)),Jl();let{webApiKey:U,subDomain:b,selectedWidgetFlavor:E}=Kl();if(!U||!b||!E)throw new Error("Init data is missing");let C=Tu(E);al({webApiKey:U,subDomain:b,selectedWidgetFlavor:C});let R=Ro(C);this.config.sdkType=R.init(),this.config.initialized=!0,T.info("Initialized SDK."),this.config.sdkType!=="CHILD"&&_n()&&this.setup()}catch(p){T.error("Could not initialize SDK",{err:p})}}async setup(p){try{T.info("Starting to setup SDK...");let U=document.getElementById("strigo-widget");if(this.config.isOpen&&U||this.config.sdkType==="CHILD"){T.info('panel is already opened. Aborting "setup" action...');return}if(!this.config.initialized)throw new Error("SDK was not initialized");let E=le(),{email:C,token:R,version:j,openWidget:iA=!0,dockingSide:UA="right"}={...E.user,...E,...p};if(!C||!R)throw new Error("Setup data is missing");let X=await fl(R);if(!X?.allowedAcademyDomains?.includes(window.location.host.replace(/^www\./i,""))){T.warn("Running on an unrelated domain. Aborting...",{allowedDomains:X?.allowedAcademyDomains,currentHost:window.location.host});return}if(X){let{loggingConfig:_A,userAssessments:xA}=X;T.debug("Configuration fetched from Strigo"),T.setup(_A),Yl(xA),X.academyColors&&Sl(X.academyColors),X.urlTriggers&&mu(X.urlTriggers)}cl({user:{email:C,token:R},initSite:Tl(),version:j,loggingConfig:X?.loggingConfig,assessmentThresholds:X?.assessmentThresholds,isAcademyAssessmentDebug:X?.isAcademyAssessmentDebug,dockingSide:UA}),this.config.configured=!0,T.info("Finished SDK setup."),iA&&this.open()}catch(U){T.error("Could not setup SDK",{err:U})}}open(){try{if(T.info("Opening academy panel..."),!this.config.configured)throw new Error("SDK was not set up");let p=document.getElementById("strigo-widget");if(this.config.isOpen&&p||this.config.sdkType==="CHILD"){T.info('Panel is already opened. Aborting "open" action...');return}let b=le();Bl({currentUrl:b.initSite.href,shouldPanelBeOpen:_n(),isLoading:!0,widgetFlavor:b.selectedWidgetFlavor}),Ro(b.selectedWidgetFlavor).setup({version:b.version}),this.config.isOpen=!0,T.info("Opened academy panel.")}catch(p){T.error("Could not open academy panel",{err:p})}}collapse(){T.info("Collapsing academy panel");let{selectedWidgetFlavor:p}=le();Ro(p).collapse()}shutdown(){try{if(T.info("Closing academy panel..."),this.config.sdkType==="CHILD"){window.parent.postMessage(JSON.stringify({messageType:"close"}),"*"),T.info("Notified parent frame to close academy panel.");return}if(!this.config.isOpen){T.info("Tried to close unopened academy panel");return}let p=Ro(Ho());hl(),p.collapse(),p.shutdown(),this.config.isOpen=!1,T.info("Closed academy panel.")}catch(p){T.error("Could not close academy panel",{err:p})}}destroy(){try{if(T.info("Destroying SDK..."),this.config.sdkType==="CHILD"){window.parent.postMessage(JSON.stringify({messageType:"destroy"}),"*"),T.info("Notified parent frame to destroy SDK.");return}ul(),jl(),this.shutdown(),this.config={},T.info("Destroyed SDK.")}catch(p){T.error("Could not destroy SDK",{err:p})}}async sendEvent(p){let U=dr("user"),{token:b}=U;await gl(b,p),T.debug("sendEvent called",{eventName:p})}startElementSelector(p,U,b){T.debug("startElementSelector called");let E=b?window.document.querySelector(b):window.document.body,{startElementSelector:C,stopElementSelection:R}=kl(window.document,{onElementProfileCreated:p,onElementSelectionCancel:U,zIndex:2147483645,rootElement:E});this.stopElementSelector=R,C()}stopElementSelector(){}assessmentRecorder(){Wl()}},Ou=new Lu;window.Strigo=Ou;Xl()?(Logger.info("Strigo recorder mode"),window.Strigo.assessmentRecorder()):window.Strigo.init();})(); + `,b.children[0].children[1].appendChild(K),L.info("*** Appending assessment debug context element.");let oA=window.document.querySelectorAll(`[data-${su}="${p}"]`)?.[0];oA?oA.appendChild(b):bd(h,p).appendChild(b)},cu=function(){L.info("*** Evaluating Assessments...",{bodyTextDuringAssessment:window.document.body.innerText.slice(0,50)}),uu.filter(({recordedAssessment:p})=>{let C=p?.locationElement?.profile?.recordedElementInfo?.url;if(!C)return!1;let E=window.location.href;return iu(C,E)}).forEach(p=>{let{recordedAssessment:C,challengeSuccessEvent:E,_id:b}=p,{actionType:U,expectedText:K}=C,X=C?.locationElement?.profile;if(!X){L.info("*** missing location element profile. Aborting...");return}if(Pn?.[b]?.status==="SUCCESS"){L.info('*** Assessment already in "success" status. Aborting...');return}$a(b,{status:"pending"});let oA;try{oA=Ed(b,X)}catch{L.info("*** Failed to find location element. Aborting assessment evaluation...");return}let yA=oe()?.isAcademyAssessmentDebug,{locationElement:$,locationElementSelector:CA}=oA;switch(yA&&Id($,CA,p),U){case"added-item":{let TA=Fd.bind({assessment:p,locationElement:$,window});if(Ct[b]?.observer&&$===Ct[b].element){Ct[b].element=$;try{TA([]),Ct[b].observer.observe($,Za),L.info("Same reference - no need to observe again"),L.info(" *** Same reference - no need to observe again",{locationElement:$})}catch(BA){L.error("*** Got an error in item count",{err:BA});break}break}if(Ct[b]?.observer){try{TA([]),Ct[b].observer.observe($,Za),L.info("DOM Reference have changed - observing again"),L.info(" *** DOM Reference have changed - observing again",{locationElement:$})}catch(BA){L.error("*** Got an error in item count",{err:BA});break}break}Ct[b]={element:$,observer:new MutationObserver(TA)};try{TA([]),Ct[b].observer.observe($,Za)}catch(BA){L.info("*** Got an error in item count",BA);break}break}case"text-change":{if(L.info("*** Assessing text changes in location element...",{locationElement:$,locationElementType:$ instanceof HTMLInputElement?"input":"non-input",innerTextValue:$ instanceof HTMLInputElement?$?.value:$?.innerText,expectedText:K}),$ instanceof HTMLInputElement&&$?.value?.includes(K)){qa(p,{locationElement:$});break}if($?.innerText?.includes(K)){qa(p,{locationElement:$});break}break}default:break}})},Sd=function(h){let p=h.some(E=>E.addedNodes?.length>0),C=h.some(E=>E.type=="characterData");if(L.info("#####",{isAddedNodes:p,isCharacterDataChanged:C}),!p&&!C){L.info("*** No added nodes and no character data change were detected after url change.",{previousLocation:Do||"",newLocation:document.location.href});return}Do===document.location.href?L.info("*** No URL change and no nodes were added."):(L.info("*** Detected URL change!",{previousLocation:Do||"",newLocation:document.location.href}),Do=document.location.href),Ac(window)},Ac=(0,lu.default)(h=>{if(L.info("*** Initializing document observer"),uu=_a().assessments.filter(({assessmentType:p})=>p==="recorded-flow"),!window?.strigoObserver?.observer){L.info("*** Adding Strigo observer to document body"),window.strigoObserver={observer:new MutationObserver(Sd),observedBodyElement:window.document.body},cu(),L.info("*** Starting to observe document body"),window?.strigoObserver?.observer?.observe(window.document,au);return}cu(),window.document.contains(window.strigoObserver.observedBodyElement)||(L.info('*** Detected a "body" element change. Re-initializing the document observer...'),window.strigoObserver.observedBodyElement=window.document.body,window.strigoObserver.observer.observe(window.document,au))},500);var Bu=Fo(za(),1);var gu={subtree:!0,childList:!0},ns;function pu(h){try{window["localStorage"].setItem("strigoUrlTriggers",JSON.stringify(h))}catch(p){return L.error("Url triggers setup error",{error:p}),null}}function xd(){try{let h=window["localStorage"].getItem("strigoUrlTriggers");if(h)return JSON.parse(h)}catch(h){return L.error("Get url triggers error",{error:h}),null}}function du(h){let p=document.getElementById("strigo-exercises"),C=h.document.location.href,E=xd();if(!!E)for(let b of E){let{publishmentId:U,urlTriggerMatchType:K,urlTriggerUrl:X}=b;switch(K){case"exact":{X.trim()===C.trim()&&(p.contentWindow.postMessage({selectedCourseId:U},"*"),zr());break}case"starts_with":{C.trim().startsWith(X.trim())&&(p.contentWindow.postMessage({selectedCourseId:U},"*"),zr());break}default:break}}}var Td=function(h){let p=h.some(C=>C.addedNodes?.length>0);if(L.info("#####",{isAddedNodes:p}),!p){L.info("*** No added nodes and no character data change were detected after url change.",{previousLocation:ns||"",newLocation:document.location.href});return}ns===document.location.href?L.info("*** No URL change and no nodes were added."):(L.info("*** Detected URL change!",{previousLocation:ns||"",newLocation:document.location.href}),ns=document.location.href),ec(window)},ec=(0,Bu.default)(h=>{if(L.info("*** Initializing url trigger observer"),!h?.strigoUrlTriggerObserver?.observer){L.info("*** Adding Strigo url trigger observer to document body"),h.strigoUrlTriggerObserver={observer:new MutationObserver(Td),observedBodyElement:h.document.body},du(h),L.info("*** Starting to observe document body - url trigger observer"),h?.strigoUrlTriggerObserver?.observer?.observe(h.document,gu);return}du(h),h.document.contains(h.strigoUrlTriggerObserver.observedBodyElement)||(L.info('*** Detected a "body" element change. Re-initializing the document observer - url trigger observer...'),h.strigoUrlTriggerObserver.observedBodyElement=h.document.body,h.strigoUrlTriggerObserver.observer.observe(h.document,gu))},500);var hu=342;function wu(){L.info("Posting dockable state to Strigo...");let h=Br("dockingSide");document.getElementById("strigo-exercises").contentWindow.postMessage({dockable:!0,dockingSide:h},"*")}function Od(){let[h]=As();(0,tc.default)("#strigo-widget").resizable({edges:{left:"#strigo-collapse-div",right:"#strigo-collapse-div.align-left",bottom:!1,top:!1},listeners:{move(p){let C=p.target;C.style.width=`${p.rect.widthh?h:p.rect.width}px`},start(){let p=document.getElementById("strigo-exercises");p.style.pointerEvents="none"},end(){let p=document.getElementById("strigo-exercises");p.style.pointerEvents="auto"}},modifiers:[tc.default.modifiers.restrictEdges({outer:"parent"})]})}var mu=class{init(){return L.info("overlay init called"),"OVERLAY"}setup({version:p}){L.info("overlay setup called"),hr({parentElement:pr(),url:gl(p)}),hr({parentElement:pr(),url:Yi(p)});let C=oe(),E=sessionStorage.getItem("strigoPreviewUserToken"),b=!!E,U=_l(Ji({...C,user:{token:{token:E||C.user.token.token,expiration:C.user.token.expiration},email:C.user.email}},b)),K=Ho();this.initEventListeners(K,U),L.info("adding assessment document observer"),Ac(K),ec(K),Pl(K),L.info("assessment document observer added"),Od()}shutdown(){L.info("overlay shutdown called");let p=Ho();this.removeEventListeners(p),p?.strigoObserver?.observer?.disconnect(),Ml(p)}collapse(){L.info("overlay collapse called"),Ga()}open(){zr(),wu()}move(){Kl()}initEventListeners(p,C){is(C,wu),os(p)}removeEventListeners(p){Qu()}},Ko=new mu;function Uu(h){if(!(!h||!h.data))switch(h.data){case"move":{L.info("Panel move message received"),So()==="overlay"&&Ko.move();break}case"close":{L.info("Shutdown message received - will collapse panel"),window.Strigo?.collapse();break}case"destroy":{L.info("Destroy message received"),window.Strigo?.destroy();break}case"challenge-success":{L.info("Challenge event success received"),So()==="overlay"&&Ko.open();break}default:break}}function os(h){h.addEventListener("message",Uu,!1)}function Qu(){window.removeEventListener("message",Uu)}function is(h,p){h.addEventListener("load",async()=>{yl("isLoading")&&(p&&await p(),$i("isLoading",!1))})}function yu(h){let p=Br("initSite")?.host;h.addEventListener("load",function(){try{this.contentWindow.location.host!==p&&window.Strigo.shutdown()}catch(C){L.error(C),window.Strigo.shutdown()}})}function Fu(){return Wa(["#strigo-exercises","#original-site"],{sizes:[25,75],maxSize:As(),minSize:Ol(),gutterSize:2})}async function Kd(){await jl(),document.getElementById("strigo-exercises").contentWindow.postMessage({dockable:!1},"*")}var Eu=class{init(){let p;return cl()?(L.info("Child SDK window"),p="CHILD",window.dispatchEvent(new Event("strigo-opened")),ll()):(L.info("Parent SDK window"),p="PARENT"),p}setup({version:p}){L.info("iframe setup started"),Hl(),hr({parentElement:pr(),url:fl(p)}),hr({parentElement:pr(),url:Yi(p)}),Yl();let C=oe(),E=xl(),b=xo({parentElement:E,url:Ji(C),classNames:Al,id:"strigo-exercises"}),U=xo({parentElement:E,url:al(C.initSite.href),classNames:el,id:"original-site"}),K=document.createElement("div");K.className="strigo-academy-hat align-left",K.id="strigo-academy-hat",K.onclick=()=>{document.getElementById("strigo-academy-hat").classList.toggle("slide-in"),this.splitInstance=Fu()};let X=document.createElement("div");X.className="strigo-academy-hat-icon",X.id="strigo-academy-hat-icon",X.innerHTML=Xi,K.appendChild(X),E.appendChild(K),this.splitInstance=Fu();let oA=Ho();this.initEventListeners(oA,b,U)}collapse(){this.splitInstance&&(this.splitInstance.destroy(),this.splitInstance=Wa(["#strigo-exercises","#original-site"],{sizes:[25,75],minSize:0,gutterSize:0}),this.splitInstance.collapse(0),document.getElementById("strigo-academy-hat").classList.toggle("slide-in"))}open(){}shutdown(){L.info("iframe shutdown called"),Tl()}initEventListeners(p,C,E){is(C,Kd),yu(E),os(E.contentWindow)}},bu=new Eu;function Iu(h){return h&&h==="dynamic"?Dl()?"iframe":"overlay":h}function Mo(h){let p=null;switch(h){case"iframe":{p=bu;break}case"overlay":{p=Ko;break}default:throw L.error("Widget flavor is not supported",{widgetFlavor:h}),new Error(`Widget flavor ${h} is not supported`)}return p}var Su=class{constructor(){this.config={}}isDevelopment(){return!1}init(){try{if(L.info("Initializing SDK..."),this.config.initialized){L.info("SDK was already initialized");return}El();let{webApiKey:p,subDomain:C,selectedWidgetFlavor:E}=ul();if(!p||!C||!E)throw new Error("Init data is missing");let b=Iu(E);hl({webApiKey:p,subDomain:C,selectedWidgetFlavor:b});let U=Mo(b);if(this.config.sdkType=U.init(),this.config.initialized=!0,L.info("Initialized SDK."),this.config.sdkType!=="CHILD"&&_n()){let K=oe()?.user?.token,X=sessionStorage.getItem("strigoPreviewUserToken"),oA=X?{token:{token:X,expiration:`${Date.now()+1e3*60*60*24}`},isPreview:!0}:{token:K};this.setup(oA)}}catch(p){L.error("Could not initialize SDK",{err:p})}}async setup(p){try{L.info("Starting to setup SDK...");let C=document.getElementById("strigo-widget");if(this.config.isOpen&&C||this.config.sdkType==="CHILD"){L.info('panel is already opened. Aborting "setup" action...');return}if(!this.config.initialized)throw new Error("SDK was not initialized");let b=oe(),{email:U,token:K,version:X,openWidget:oA=!0,dockingSide:yA="right",isPreview:$}={...b.user,...b,...p};if(!U||!K)throw new Error("Setup data is missing");let CA=await Ql(K);if(!CA?.allowedAcademyDomains?.includes(window.location.host.replace(/^www\./i,""))){L.warn("Running on an unrelated domain. Aborting...",{allowedDomains:CA?.allowedAcademyDomains,currentHost:window.location.host});return}if(CA){let{loggingConfig:TA,userAssessments:BA}=CA;L.debug("Configuration fetched from Strigo"),L.setup(TA),bl(BA),CA.academyColors&&Nl(CA.academyColors),CA.urlTriggers&&pu(CA.urlTriggers)}$||wl({user:{email:U,token:K},initSite:sl(),version:X,loggingConfig:CA?.loggingConfig,assessmentThresholds:CA?.assessmentThresholds,isAcademyAssessmentDebug:CA?.isAcademyAssessmentDebug,dockingSide:yA}),this.config.configured=!0,L.info("Finished SDK setup."),oA&&this.open()}catch(C){L.error("Could not setup SDK",{err:C})}}open(){try{if(L.info("Opening academy panel..."),!this.config.configured)throw new Error("SDK was not set up");let p=document.getElementById("strigo-widget");if(this.config.isOpen&&p||this.config.sdkType==="CHILD"){L.info('Panel is already opened. Aborting "open" action...');return}let E=oe();Ul({currentUrl:E.initSite.href,shouldPanelBeOpen:_n(),isLoading:!0,widgetFlavor:E.selectedWidgetFlavor}),Mo(E.selectedWidgetFlavor).setup({version:E.version}),this.config.isOpen=!0,L.info("Opened academy panel.")}catch(p){L.error("Could not open academy panel",{err:p})}}collapse(){L.info("Collapsing academy panel");let{selectedWidgetFlavor:p}=oe();Mo(p).collapse()}shutdown(){try{if(L.info("Closing academy panel..."),this.config.sdkType==="CHILD"){window.parent.postMessage(JSON.stringify({messageType:"close"}),"*"),L.info("Notified parent frame to close academy panel.");return}if(!this.config.isOpen){L.info("Tried to close unopened academy panel");return}let p=Mo(So());Fl(),p.collapse(),p.shutdown(),this.config.isOpen=!1,L.info("Closed academy panel.")}catch(p){L.error("Could not close academy panel",{err:p})}}destroy(){try{if(L.info("Destroying SDK..."),this.config.sdkType==="CHILD"){window.parent.postMessage(JSON.stringify({messageType:"destroy"}),"*"),L.info("Notified parent frame to destroy SDK.");return}ml(),Il(),this.shutdown(),this.config={},L.info("Destroyed SDK.")}catch(p){L.error("Could not destroy SDK",{err:p})}}async sendEvent(p){let C=Br("user"),{token:E}=C;await Cl(E,p),L.debug("sendEvent called",{eventName:p})}startElementSelector(p,C,E){L.debug("startElementSelector called");let b=E?window.document.querySelector(E):window.document.body,{startElementSelector:U,stopElementSelection:K}=kl(window.document,{onElementProfileCreated:p,onElementSelectionCancel:C,zIndex:2147483645,rootElement:b});this.stopElementSelector=K,U()}stopElementSelector(){}assessmentRecorder(){Xl()}},Hu=new Su;window.Strigo=Hu;window.Strigo.init();})(); /*! * html2canvas 1.4.1 * Copyright (c) 2022 Niklas von Hertzen diff --git a/src/modules/assessment-recorder/assessment-recorder.ts b/src/modules/assessment-recorder/assessment-recorder.ts index f0da8e6..d2bfc70 100644 --- a/src/modules/assessment-recorder/assessment-recorder.ts +++ b/src/modules/assessment-recorder/assessment-recorder.ts @@ -3,12 +3,7 @@ import html2canvas from 'html2canvas'; import { Logger } from '../../services/logger'; import { appendCssFile, appendIFrame, getHeadElement } from '../document/document'; import { getElementSelector } from '../element-selector/element-selector'; -import { - generateAssessmentRecorderURL, - generateRecorderCssURL, - getURLWithoutStrigoRecorderParams, - isRecordingUrlParamExists, -} from '../url/url'; +import { generateAssessmentRecorderURL, generateRecorderCssURL, getURLWithoutStrigoRecorderParams } from '../url/url'; import { RecordedElementProfile } from '../no-code-assessment/no-code-assessment.types'; import { @@ -20,16 +15,12 @@ import { } from './assessment-recorder.types'; export function isRecordingMode(): boolean { - if (isRecordingUrlParamExists() || window.sessionStorage.getItem('isStrigoRecordingMode')) { - return true; - } - - return false; + return !!window.sessionStorage.getItem(ASSESSMENT_RECORDER_ID_PARAM); } function onElementProfileCreation(elementProfile: RecordedElementProfile, elementType): void { - const { nodeTree, recordedElementInfo } = elementProfile; const recorederIframe = document.getElementById('strigo-assessment-recorder-iframe') as HTMLIFrameElement; + const { nodeTree } = elementProfile; const elementSelector = getElementSelector(nodeTree); html2canvas(document.querySelector(elementSelector), { backgroundColor: '#c6c7e7' }).then((canvas) => { @@ -74,10 +65,6 @@ function onElementSelectionCancel(elementType?: string): void { } export function addAssessmentRecorderIframe(): void { - window.sessionStorage.setItem('isStrigoRecordingMode', 'true'); - const assessmentUuid = new URL(window.location.href).searchParams.get(ASSESSMENT_RECORDER_ID_PARAM); - window.sessionStorage.setItem(ASSESSMENT_RECORDER_ID_PARAM, assessmentUuid); - if (document.getElementById('strigo-assessment-recorder-iframe')) { return; } @@ -145,7 +132,6 @@ export function addAssessmentRecorderIframe(): void { case AssessmentRecorderMessageTypes.SUBMIT_ASSESSMENT: { const recorderWindowId = window.sessionStorage.getItem(ASSESSMENT_RECORDER_ID_PARAM); - window.sessionStorage.removeItem('isStrigoRecordingMode'); const urlToSave = getURLWithoutStrigoRecorderParams(window.location.href); window.opener.postMessage( @@ -164,7 +150,6 @@ export function addAssessmentRecorderIframe(): void { } case AssessmentRecorderMessageTypes.CANCEL_ASSESSMENT: { - window.sessionStorage.removeItem('isStrigoRecordingMode'); window.close(); break; diff --git a/src/modules/url/url.ts b/src/modules/url/url.ts index c6c7d69..b7615df 100644 --- a/src/modules/url/url.ts +++ b/src/modules/url/url.ts @@ -5,7 +5,7 @@ import { INIT_SCRIPT_ID, LOCAL_STRIGO_URL, DEFAULT_ASSESSMENT_RECORDER_CSS_VERSION, - STRIGO_PREVIEW_USER_TOKEN_PARAM, + LOCAL_STRIGO_PREVIEW_URL, } from '../../strigo/consts'; import { StrigoConfig, SiteConfig } from '../config/config.types'; import { WidgetFlavors } from '../widgets/widget.types'; @@ -50,11 +50,15 @@ export function getUrlData(): SiteConfig { }; } -export function generateStrigoIframeURL(config: StrigoConfig): string { +export function generateStrigoIframeURL(config: StrigoConfig, isPreview: boolean): string { const { subDomain, user, webApiKey } = config; - const strigoUrl = new URL( - `${window.Strigo.isDevelopment() ? LOCAL_STRIGO_URL : `https://${subDomain}.${BASE_STRIGO_URL}`}/academy/courses` - ); + const localStrigoUrl = isPreview ? LOCAL_STRIGO_PREVIEW_URL : LOCAL_STRIGO_URL; + const prodStrigoUrl = isPreview + ? `https://academy-preview.${BASE_STRIGO_URL}` + : `https://${subDomain}.${BASE_STRIGO_URL}`; + + const strigoUrlPrefix = window.Strigo.isDevelopment() ? localStrigoUrl : prodStrigoUrl; + const strigoUrl = new URL(`${strigoUrlPrefix}/academy/courses`); strigoUrl.searchParams.set('token', user.token.token); strigoUrl.searchParams.set('webApiKey', webApiKey); @@ -147,13 +151,6 @@ export function generateAssessmentRecorderURL(): string { return window.Strigo.isDevelopment() ? RECORDER_LOCAL_URL : ASSESSMENT_RECORDER_URL; } -export function isRecordingUrlParamExists(): boolean { - const { search } = window.location; - const urlParams = extractUrlParams(search); - - return ASSESSMENT_RECORDER_PARAM in urlParams; -} - export function getURLWithoutStrigoRecorderParams(url): string { const capturedElementUrl = new URL(url); const searchParams = new URLSearchParams(capturedElementUrl.search); @@ -163,10 +160,3 @@ export function getURLWithoutStrigoRecorderParams(url): string { return capturedElementUrl.toString(); } - -export function getStrigoPreviewUserTokenFromURL(): string | null { - const { search } = window.location; - const urlParams = extractUrlParams(search); - - return urlParams[STRIGO_PREVIEW_USER_TOKEN_PARAM] || null; -} diff --git a/src/modules/widgets/iframe.ts b/src/modules/widgets/iframe.ts index 8cb73fd..1f79736 100644 --- a/src/modules/widgets/iframe.ts +++ b/src/modules/widgets/iframe.ts @@ -77,7 +77,7 @@ class IframeWidget implements IStrigoWidget { // Append academy player Iframe const academyPanelFrame = documentTools.appendIFrame({ parentElement: mainDiv, - url: urlTools.generateStrigoIframeURL(config), + url: urlTools.generateStrigoIframeURL(config, false), classNames: STRIGO_IFRAME_CLASSES, id: 'strigo-exercises', }); diff --git a/src/modules/widgets/overlay.ts b/src/modules/widgets/overlay.ts index 3c2bb56..0c812d6 100644 --- a/src/modules/widgets/overlay.ts +++ b/src/modules/widgets/overlay.ts @@ -73,19 +73,23 @@ class OverlayWidget implements IOverlayWidget { }); const localConfig = configManager.getLocalStorageConfig(); - const urlStrigoUserToken = sessionStorage.getItem('strigoPreviewUserToken'); + const strigoPreviewUserToken = sessionStorage.getItem('strigoPreviewUserToken'); + const isPreview = !!strigoPreviewUserToken; const academyPlayerFrame = documentTools.createWidget( - urlTools.generateStrigoIframeURL({ - ...localConfig, - user: { - token: { - token: urlStrigoUserToken ? urlStrigoUserToken : localConfig.user.token.token, - expiration: localConfig.user.token.expiration, + urlTools.generateStrigoIframeURL( + { + ...localConfig, + user: { + token: { + token: strigoPreviewUserToken ? strigoPreviewUserToken : localConfig.user.token.token, + expiration: localConfig.user.token.expiration, + }, + + email: localConfig.user.email, }, - - email: localConfig.user.email, }, - }) + isPreview + ) ); const hostingAppWindow = documentTools.getHostingAppWindow(); diff --git a/src/strigo.sdk.ts b/src/strigo.sdk.ts index f854d02..f53fe8f 100644 --- a/src/strigo.sdk.ts +++ b/src/strigo.sdk.ts @@ -1,12 +1,5 @@ -import { isRecordingMode } from './modules/assessment-recorder/assessment-recorder'; -import { Logger } from './services/logger'; import { Strigo } from './strigo'; window.Strigo = Strigo; -if (isRecordingMode()) { - Logger.info('Strigo recorder mode'); - window.Strigo.assessmentRecorder(); -} else { - window.Strigo.init(); -} +window.Strigo.init(); \ No newline at end of file diff --git a/src/strigo/consts.ts b/src/strigo/consts.ts index c921760..4bebc6a 100644 --- a/src/strigo/consts.ts +++ b/src/strigo/consts.ts @@ -17,6 +17,10 @@ export const ASSESSMENT_RECORDER_URL = 'https://assessment-recorder.web.app'; export const LOCAL_STRIGO_URL = 'http://local.strigo.io:3000'; +export const LOCAL_STRIGO_PREVIEW_URL = 'http://local-preview.strigo.io:3000'; + +export const LOCAL_LOUNGE_URL = 'http://local.strigo.io:9977'; + export const DEFAULT_ASSESSMENT_RECORDER_CSS_VERSION = 'v1.1.40'; export const STRIGO_PREVIEW_USER_TOKEN_PARAM = 'strigoPreviewUserToken'; diff --git a/src/strigo/index.ts b/src/strigo/index.ts index 4e1eb21..55f10dd 100644 --- a/src/strigo/index.ts +++ b/src/strigo/index.ts @@ -10,6 +10,7 @@ import { DockingSide, User } from '../modules/config/config.types'; import { getElementSelection } from '../modules/element-selector/element-selector'; import { customizeHatColors } from '../modules/document/document'; import { setupUrlTriggers } from '../modules/url-trigger/url-trigger'; +import { getLocalStorageConfig } from '../modules/config/config'; import { IStrigoSDK, SdkConfig, SDKSetupData, SdkTypes } from './types'; @@ -30,13 +31,6 @@ class StrigoSDK implements IStrigoSDK { return; } - const strigoPreviewUserToken = urlTools.getStrigoPreviewUserTokenFromURL(); - - if (strigoPreviewUserToken) { - Logger.info('strigoPreviewUserToken found - SDK will be initialized with token'); - sessionStorage.setItem('strigoPreviewUserToken', strigoPreviewUserToken); - } - assessmentsStorage.initAssessmentStorage(); // Get init script parameters @@ -58,7 +52,18 @@ class StrigoSDK implements IStrigoSDK { // Auto open academy if it was opened in this session before. if (this.config.sdkType !== SdkTypes.CHILD && sessionManager.shouldPanelBeOpen()) { - this.setup(); + const persistedToken = getLocalStorageConfig()?.user?.token; + const strigoPreviewUserToken = sessionStorage.getItem('strigoPreviewUserToken'); + const setupData = strigoPreviewUserToken + ? { + token: { + token: strigoPreviewUserToken, + expiration: `${Date.now() + 1000 * 60 * 60 * 24}`, + }, + isPreview: true, + } + : { token: persistedToken }; + this.setup(setupData); } } catch (err) { Logger.error('Could not initialize SDK', { err }); @@ -91,6 +96,7 @@ class StrigoSDK implements IStrigoSDK { version, openWidget = true, dockingSide = DockingSide.RIGHT, + isPreview, } = { ...config.user, ...config, ...data }; if (!email || !token) { @@ -124,18 +130,20 @@ class StrigoSDK implements IStrigoSDK { } } - configManager.setupLocalStorageConfig({ - user: { - email, - token, - }, - initSite: urlTools.getUrlData(), - version, - loggingConfig: configuration?.loggingConfig, - assessmentThresholds: configuration?.assessmentThresholds, - isAcademyAssessmentDebug: configuration?.isAcademyAssessmentDebug, - dockingSide, - }); + if (!isPreview) { + configManager.setupLocalStorageConfig({ + user: { + email, + token, + }, + initSite: urlTools.getUrlData(), + version, + loggingConfig: configuration?.loggingConfig, + assessmentThresholds: configuration?.assessmentThresholds, + isAcademyAssessmentDebug: configuration?.isAcademyAssessmentDebug, + dockingSide, + }); + } this.config.configured = true; Logger.info('Finished SDK setup.'); diff --git a/src/strigo/types.ts b/src/strigo/types.ts index 69a0882..7309f1f 100644 --- a/src/strigo/types.ts +++ b/src/strigo/types.ts @@ -1,10 +1,11 @@ import { StrigoToken } from '../modules/config/config.types'; export interface SDKSetupData { - email: string; - token: StrigoToken; + email?: string; + token?: StrigoToken; version?: string; openWidget?: boolean; + isPreview?: boolean; } export enum SdkTypes {