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B,QAAS,IACT,OAAQ,IACR,OAAQ,IACR,SAAU,IACV,QAAS,GACX,EDDS,SAASppB,CAAG,EACjB,OAAOopB,MAAAA,EAAiBxqB,KAAAA,EAAYwqB,CAAM,CAACppB,EAAI,GEL/CkqB,EAAgB,4BAChBC,EAAmBC,OAAOF,EAAcpO,MAAM,EA4BlDuO,EAPA,SAAkBC,CAAM,MHHN/qB,EGKhB,MAAO+qB,CADPA,EHHO/qB,OADSA,EGIE+qB,GHHK,GAAKT,EAAatqB,EGGvB+qB,GACAH,EAAiBvb,IAAI,CAAC0b,GACpCA,EAAO1f,OAAO,CAACsf,EDTND,GCUTK,CACN","sources":["webpack://_N_E/./node_modules/@sm/question-definitions/esm/index.js","webpack://_N_E/./node_modules/@sm/question-ui/vendor-1535a03e.js","webpack://_N_E/./node_modules/@sm/question-ui/helpers.js","webpack://_N_E/./node_modules/@sm/question-ui/theme-22bba55b.js","webpack://_N_E/./node_modules/@sm/question-ui/theme-respondent.js","webpack://_N_E/./node_modules/@sm/question-widgets/vendor-8000eab9.js","webpack://_N_E/./node_modules/lodash-es/_arrayMap.js","webpack://_N_E/./node_modules/lodash-es/isSymbol.js","webpack://_N_E/./node_modules/lodash-es/_baseToString.js","webpack://_N_E/./node_modules/lodash-es/toString.js","webpack://_N_E/./node_modules/lodash-es/_basePropertyOf.js","webpack://_N_E/./node_modules/lodash-es/_unescapeHtmlChar.js","webpack://_N_E/./node_modules/lodash-es/unescape.js","webpack://_N_E/"],"sourcesContent":["/*\n * Tools for creating TypeGuards.\n */\n// primitive type guards\nconst notNull = (u) => u !== null;\nconst isNull = (u) => u === null;\nconst isString = (u) => typeof u === 'string';\nconst isNumber = (u) => typeof u === 'number';\nconst isOptional = (guard) => (u) => u === undefined || guard(u);\nconst isArrayOf = (guard) => (u) => Array.isArray(u) && u.every(guard);\n/** TypeGuard for discriminated unions of strings */\nconst isOneOf = (list) => (u) => !!list.find((i) => i === u);\n/** TypeGuard for fixed values */\nconst isFixed = (value) => (u) => u === value;\n// type guard operators\n/** TypeGuard for discriminated unions of objects\n *\n * Does not currently infer the array types, so `T` needs to be provided\n */\nconst isEither = (list) => (u) => !!list.find((g) => g(u));\nconst isNullable = (guard) => (u) => {\n if (u === null) {\n return true;\n }\n const res = guard(u);\n return typeof res === 'boolean' && res;\n};\n/** TypeGuard for an object. Needs to have one Guard for every attribute */\nconst typeGuard = (guards) => (u) => {\n return Object.entries(guards).every(([key, guard]) => {\n if (!u) {\n return false;\n }\n const value = u[key];\n if (!guard(value)) {\n return false;\n }\n return true;\n });\n};\n/**\n * TypeAssertion for an object. Needs to have one Guard or TypeAssertion for every attribute.\n * Will throw an error if the property is of the wrong type.\n */\n// TODO: refactor the typeGuard function to work as a typeAssertion when called by a typeAssertion\nfunction typeAssertion(guards) {\n return function assertGuard(u) {\n // for function Guards like `isEither`\n if (typeof guards === 'function') {\n const res = guards(u);\n if (typeof res === 'boolean' && !res) {\n throw new Error('failed-typeguard');\n }\n return;\n }\n // default with a Guard object\n Object.entries(guards).forEach(([key, guard]) => {\n if (!u) {\n throw new Error(`Can't read property '${key}' of '${u}'`);\n }\n const value = u[key];\n try {\n const res = guard(value);\n if (typeof res === 'boolean' && !res) {\n throw new Error('failed-typeguard');\n }\n }\n catch (e) {\n // TODO: write or install a nested error object\n throw new Error(`Value '${value}' has the wrong type for property '${key}':${'\\n'}${e && e.message}`);\n }\n });\n };\n}\n\nconst questionTypeFamilies = [\n 'PRESENTATION',\n 'MULTIPLE_CHOICE',\n 'OPEN_ENDED',\n 'RATING_SCALE',\n 'MATRIX',\n 'RANKING',\n 'SLIDER',\n 'DATETIME',\n 'CONTACT_INFO',\n 'CLICK_MAP',\n 'FILE_UPLOAD',\n];\nconst questionTypeRequiredPredicateTypes = [\n 'ALL',\n 'AT_LEAST',\n 'AT_MOST',\n 'EXACTLY',\n 'RANGE',\n // 'REQUIRED_ANSWERS_LIST',\n];\nconst questionTypeVariants = [\n 'TEXT',\n 'IMAGE',\n 'SINGLE_LINE',\n 'ESSAY',\n 'MANY_FIELDS',\n 'SINGLE_ANSWER_RADIO',\n 'SINGLE_ANSWER_SYMBOL',\n 'SINGLE_ANSWER_MENU',\n 'MANY_ANSWERS_CHECKBOX',\n 'MENU',\n 'SINGLE_SLIDER',\n 'DATE',\n 'TIME',\n 'DATETIME',\n 'MANY_FIELDS',\n 'SINGLE_CLICK',\n 'RATING',\n 'FILE_UPLOAD',\n];\nconst questionTypeLayoutPlacements = [\n 'NEW_ROW',\n 'RIGHT_ALIGNED',\n];\nconst questionTypeValidationTypes = [\n 'SUM',\n 'TEXT_LENGTH',\n 'EMAIL',\n 'INTEGER',\n 'DECIMAL',\n 'DATE_US',\n 'DATE_INTL',\n 'FILE_FORMAT',\n];\nconst questionTypeIds = [\n 'single_textbox',\n 'comment_box',\n];\nconst questionTypeSortingKinds = [\n 'FLIP',\n 'RANDOM',\n 'TEXT_ASC',\n 'TEXT_DESC',\n];\nconst questionTypeSkipLogicTypes = [\n 'QUESTION_CONDITIONAL_COL',\n 'QUESTION_CONDITIONAL_ROW',\n];\nconst questionTypeSkipLogicDestinationTypes = [\n 'DISQUALIFY_RESPONDENT',\n 'END_SURVEY',\n 'SKIP_TO_PAGE',\n];\nconst questionTypeMultipleChoiceLayouts = [\n 'VERTICAL',\n 'THREE_COLUMNS',\n 'TWO_COLUMNS',\n 'HORIZONTAL',\n];\nconst SENTIMENTS = [\n 'positive',\n 'negative',\n 'neutral',\n 'unknown',\n];\n/** Possible icons for Star-Rating */\nconst ratingScaleSymbols = [\n 'THUMB',\n 'STAR',\n 'HEART',\n 'SMILEY',\n];\n/** Possible values for relative width (in percentage) */\nconst relativeWidthOptions = [\n 10,\n 20,\n 30,\n 40,\n 50,\n 60,\n 70,\n 80,\n 90,\n 100,\n];\n/** Possible values for fixed width (in pixel) */\nconst fixedWidthOptions = [\n 100,\n 200,\n 300,\n 400,\n 500,\n 600,\n 700,\n 800,\n];\n\n// Base Types\n// Question Guard Helpers\nconst isQuestionError = typeGuard({\n questionId: isNullable(isString),\n detail: isString,\n type: isOneOf([\n ...questionTypeValidationTypes,\n 'REQUIRED',\n ]),\n});\n/** Guard for minimal information needed to determine the type of a Question */\nconst baseQuestionGuards = (typeId, family, variant) => ({\n typeId: isFixed(typeId),\n variant: isFixed(variant),\n family: isFixed(family),\n id: isString,\n});\n/**\n * a very basic typeguard for the common fields for a Question Type.\n * should receive parameters for the actual ID, FAMILY and SUBTYPE of the\n * Question Type to avoid Typescript errors. Question types can use this function\n * to help build their own typeGuards\n */\nconst isQuestionType = (typeId, family, variant) => typeGuard(baseQuestionGuards(typeId, family, variant));\n\n// Mappings shared by multiple QuestionTypes in the RespondentSurvey Capability\n// to convert part of their external to their internal QuestionType representation\n/**\n * Mapping external to internal QuestionType properties shared by all QuestionTypes\n * in the RespondentSurvey Capability\n */\nfunction respondentSurveyMapping(externalQuestion) {\n const { position: { label: questionNumber }, heading: { default: { text: title }, }, } = externalQuestion;\n return {\n questionNumber,\n title,\n };\n}\n\n// Mappings/Types for ImageChoice shared by all Capabilities\n/**\n * Returns fields for ImageChoice's internal QuestionType type\n * that are shared across all Capabilities\n */\nconst imageChoiceCrossCapabilityMapping = ({ id, variant, }) => ({\n typeId: 'image_choice',\n family: 'MULTIPLE_CHOICE',\n variant: variant,\n id,\n});\n\n// Mappings to convert ImageChoice's external to it's internal QuestionType representation\n/**\n * Maps the external QuestionType (GQL based) to the internal QuestionType\n *\n * _Types are mostly the same but the internal type is optimized to be easier to work with_\n */\nconst imageChoiceRespondentSurveyMapping = (externalQuestion) => {\n const q = externalQuestion;\n const { required, answersImage, answerNA } = q;\n return {\n ...respondentSurveyMapping(q),\n ...imageChoiceCrossCapabilityMapping(q),\n required: required ?? undefined,\n answersImage,\n answerNoneOfTheAbove: answerNA ?? undefined,\n };\n};\n\n// Mappings shared by multiple QuestionTypes in the RespondentQuizResults Capability\n// to convert part of their external to their internal QuestionType representation\n/**\n * Mapping external to internal QuestionType properties shared by all QuestionTypes\n * in the RespondentQuizResults Capability\n */\nfunction respondentQuizResultsMapping(externalQuestion) {\n const { quizResults, position: { label: questionNumber }, heading: { default: { text: title }, }, } = externalQuestion;\n return {\n quizResults: quizResults || undefined,\n questionNumber,\n title,\n };\n}\n\n// Mappings to convert ImageChoice's external to it's internal QuestionType representation\n/**\n * Maps the external QuestionType (GQL based) to the internal QuestionType\n *\n * _Types are mostly the same but the internal type is optimized to be easier to work with_\n */\nconst imageChoiceRespondentQuizResultsMapping = (externalQuestion) => {\n const q = externalQuestion;\n const { answerNA, answersImage } = q;\n return {\n ...respondentQuizResultsMapping(q),\n ...imageChoiceCrossCapabilityMapping(q),\n answersImage,\n answerNoneOfTheAbove: answerNA ?? null, // remove `null` as possible type\n };\n};\n\n// Mappings shared by multiple QuestionTypes in the AggregateResponseDashboard Capability\n// to convert part of their external to their internal QuestionType representation\n/**\n * Mapping external to internal QuestionType properties shared by all QuestionTypes\n * in the AggregateResponseDashboard Capability\n */\nfunction aggregateResponseDashboardMapping(externalQuestion) {\n const { dashboardType, filterCount, selectedCount, skippedCount, answeredCount, responseData, aggregateResponse, heading: { default: { text: title }, }, } = externalQuestion;\n return {\n dashboardType,\n filterCount,\n answeredCount,\n selectedCount,\n skippedCount,\n responseData,\n aggregateResponse,\n title,\n };\n}\n\n// Mappings to convert ImageChoice's external to it's internal QuestionType representation\n/**\n * Maps the external QuestionType (GQL based) to the internal QuestionType\n *\n * _Types are mostly the same but the internal type is optimized to be easier to work with_\n */\nconst imageChoiceAggregateResponseDashboardMapping = (externalQuestion) => {\n const q = externalQuestion;\n return {\n ...imageChoiceCrossCapabilityMapping(q),\n ...aggregateResponseDashboardMapping(q),\n };\n};\n\n// Mappings shared by multiple QuestionTypes in the AggregateResponseCustomizableSolutions Capability\n// to convert part of their external to their internal QuestionType representation\n/**\n * Mapping external to internal QuestionType properties shared by all QuestionTypes\n * in the AggregateResponseCustomizableSolutions Capability\n */\nfunction aggregateResponseCustomizableSolutionsMapping(externalQuestion) {\n const { displayNumber: questionNumber, responseData, aggregateResponse, heading: { default: { text: title }, }, } = externalQuestion;\n return {\n questionNumber,\n responseData,\n aggregateResponse,\n title,\n };\n}\n\n// Mappings to convert ImageChoice's external to it's internal QuestionType representation\n/**\n * Maps the external QuestionType (GQL based) to the internal QuestionType\n *\n * _Types are mostly the same but the internal type is optimized to be easier to work with_\n */\nconst imageChoiceAggregateResponseCustomizableSolutionsMapping = (externalQuestion) => {\n const q = externalQuestion;\n return {\n ...imageChoiceCrossCapabilityMapping(q),\n ...aggregateResponseCustomizableSolutionsMapping(q),\n };\n};\n\n/** Maps `answerOther` field for QuizResults capability */\nconst mapRespondentQuizResultsAnswerOther = (answerOther) => {\n if (!answerOther) {\n return null;\n }\n let base;\n if (answerOther.type === 'ANSWER') {\n const addRequiredErrorText = answerOther.requiredErrorText !== null &&\n answerOther.requiredErrorText !== undefined;\n base = {\n type: 'ANSWER',\n ...(addRequiredErrorText\n ? { requiredErrorText: answerOther.requiredErrorText }\n : {}),\n };\n }\n else {\n base = { type: answerOther.type };\n }\n return {\n ...base,\n id: answerOther.id,\n label: answerOther.label,\n visible: answerOther.visible,\n linesCount: answerOther.layout.linesCount,\n charsCount: answerOther.layout.charsCount,\n };\n};\n/** Splits/Maps external `answerOther` to the internal `answerOther` and `answerComment` */\nconst mapRespondentSurveyAnswerOther = (answerOther) => {\n if (!answerOther) {\n return {};\n }\n const shared = {\n id: answerOther.id,\n label: answerOther.label,\n visible: answerOther.visible,\n linesCount: answerOther.layout.linesCount,\n charsCount: answerOther.layout.charsCount,\n // custom attributes for `other` validation\n touched: false,\n value: '',\n selected: false,\n };\n if (answerOther.type === 'ANSWER') {\n const requiredErrorText = answerOther.requiredErrorText ?? undefined;\n return {\n answerOther: {\n type: 'ANSWER',\n ...(requiredErrorText !== undefined ? { requiredErrorText } : {}),\n ...shared,\n },\n };\n }\n return {\n answerComment: {\n type: answerOther.type,\n ...shared,\n },\n };\n};\n/**\n * Maps `QuestionAnswerRequired` to more concrete `QuestionAnswerRequiredAll` type\n * and removes `min` and `max` properties */\nconst mapRespondentSurveyRequiredAll = (answerOther) => {\n if (!answerOther || answerOther.type !== 'ALL') {\n return undefined;\n }\n return {\n type: 'ALL',\n errorMessage: answerOther.errorMessage,\n };\n};\nconst fillSpacing = (spacing) => spacing\n ? {\n top: spacing.top ?? 0,\n bottom: spacing.bottom ?? 0,\n left: spacing.left ?? 0,\n right: spacing.right ?? 0,\n }\n : undefined;\n\n// Mappings/Types for CheckBox shared by all Capabilities\n/**\n * Returns fields for CheckBox's internal QuestionType type\n * that are shared across all Capabilities\n */\nconst checkBoxCrossCapabilityMapping = ({ id, }) => ({\n typeId: 'check_box',\n family: 'MULTIPLE_CHOICE',\n variant: 'MANY_ANSWERS_CHECKBOX',\n id,\n});\n\n// Mappings to convert CheckBox's external to it's internal QuestionType representation\n/**\n * Maps the external QuestionType (GQL based) to the internal QuestionType\n *\n * _Types are mostly the same but the internal type is optimized to be easier to work with_\n */\nconst checkBoxRespondentSurveyMapping = (externalQuestion) => {\n const q = externalQuestion;\n const { layout, validation, required, answers, answerOther, answerNA } = q;\n return {\n ...respondentSurveyMapping(q),\n ...checkBoxCrossCapabilityMapping(q),\n layout: { ...layout, spacing: fillSpacing(layout.spacing) },\n required: required ?? undefined,\n validation: validation ?? undefined,\n answers,\n answerNoneOfTheAbove: answerNA ?? undefined,\n ...mapRespondentSurveyAnswerOther(answerOther),\n };\n};\n\n// Mappings to convert CheckBox's external to it's internal QuestionType representation\n/**\n * Maps the external QuestionType (GQL based) to the internal QuestionType\n *\n * _Types are mostly the same but the internal type is optimized to be easier to work with_\n */\nconst checkBoxRespondentQuizResultsMapping = (externalQuestion) => {\n const q = externalQuestion;\n const { layout, answerOther, answerNA } = q;\n return {\n ...respondentQuizResultsMapping(q),\n ...checkBoxCrossCapabilityMapping(q),\n layout: { ...layout, spacing: fillSpacing(layout.spacing) },\n answerOther: mapRespondentQuizResultsAnswerOther(answerOther),\n answerNoneOfTheAbove: answerNA ?? null, // remove `null` as possible type\n };\n};\n\n// Mappings to convert CheckBox's external to it's internal QuestionType representation\n/**\n * Maps the external QuestionType (GQL based) to the internal QuestionType\n *\n * _Types are mostly the same but the internal type is optimized to be easier to work with_\n */\nconst checkBoxAggregateResponseDashboardMapping = (externalQuestion) => {\n const q = externalQuestion;\n return {\n ...checkBoxCrossCapabilityMapping(q),\n ...aggregateResponseDashboardMapping(q),\n };\n};\n\n// Mappings to convert CheckBox's external to it's internal QuestionType representation\n/**\n * Maps the external QuestionType (GQL based) to the internal QuestionType\n *\n * _Types are mostly the same but the internal type is optimized to be easier to work with_\n */\nconst checkBoxAggregateResponseCustomizableSolutionsMapping = (externalQuestion) => {\n const q = externalQuestion;\n return {\n ...checkBoxCrossCapabilityMapping(q),\n ...aggregateResponseCustomizableSolutionsMapping(q),\n };\n};\n\n// Mappings/Types for Dropdown shared by all Capabilities\n/**\n * Returns fields for Dropdown's internal QuestionType type\n * that are shared across all Capabilities\n */\nconst dropdownCrossCapabilityMapping = ({ id, }) => ({\n typeId: 'dropdown',\n family: 'MULTIPLE_CHOICE',\n variant: 'SINGLE_ANSWER_MENU',\n id,\n});\n\n// Mappings to convert Dropdown's external to it's internal QuestionType representation\n/**\n * Maps the external QuestionType (GQL based) to the internal QuestionType\n *\n * _Types are mostly the same but the internal type is optimized to be easier to work with_\n */\nconst dropdownRespondentSurveyMapping = (externalQuestion) => {\n const q = externalQuestion;\n const { layout, validation, required, answers, answerOther } = q;\n return {\n ...respondentSurveyMapping(q),\n ...dropdownCrossCapabilityMapping(q),\n layout: { ...layout, spacing: fillSpacing(layout.spacing) },\n required: mapRespondentSurveyRequiredAll(required),\n validation: validation ?? undefined,\n answers,\n ...mapRespondentSurveyAnswerOther(answerOther),\n };\n};\n\n// Mappings to convert Dropdown's external to it's internal QuestionType representation\n/**\n * Maps the external QuestionType (GQL based) to the internal QuestionType\n *\n * _Types are mostly the same but the internal type is optimized to be easier to work with_\n */\nconst dropdownRespondentQuizResultsMapping = (externalQuestion) => {\n const q = externalQuestion;\n const { layout, answerOther } = q;\n return {\n ...respondentQuizResultsMapping(q),\n ...dropdownCrossCapabilityMapping(q),\n layout: { ...layout, spacing: fillSpacing(layout.spacing) },\n answerOther: mapRespondentQuizResultsAnswerOther(answerOther),\n };\n};\n\n// Mappings to convert Dropdown's external to it's internal QuestionType representation\n/**\n * Maps the external QuestionType (GQL based) to the internal QuestionType\n *\n * _Types are mostly the same but the internal type is optimized to be easier to work with_\n */\nconst dropdownAggregateResponseDashboardMapping = (externalQuestion) => {\n const q = externalQuestion;\n return {\n ...dropdownCrossCapabilityMapping(q),\n ...aggregateResponseDashboardMapping(q),\n };\n};\n\n// Mappings to convert Dropdown's external to it's internal QuestionType representation\n/**\n * Maps the external QuestionType (GQL based) to the internal QuestionType\n *\n * _Types are mostly the same but the internal type is optimized to be easier to work with_\n */\nconst dropdownAggregateResponseCustomizableSolutionsMapping = (externalQuestion) => {\n const q = externalQuestion;\n return {\n ...dropdownCrossCapabilityMapping(q),\n ...aggregateResponseCustomizableSolutionsMapping(q),\n };\n};\n\n// Mappings/Types for CommentBox shared by all Capabilities\n/**\n * Returns fields for CommentBox's internal QuestionType type\n * that are shared across all Capabilities\n */\nconst commentBoxCrossCapabilityMapping = ({ id, }) => ({\n typeId: 'comment_box',\n family: 'OPEN_ENDED',\n variant: 'ESSAY',\n id,\n});\n\n// Mappings to convert CommentBox's external to it's internal QuestionType representation\n/**\n * Maps the external QuestionType (GQL based) to the internal QuestionType\n *\n * _Types are mostly the same but the internal type is optimized to be easier to work with_\n */\nconst commentBoxRespondentSurveyMapping = (externalQuestion) => {\n const q = externalQuestion;\n const { layout, validation, required, fieldSet } = q;\n return {\n ...respondentSurveyMapping(q),\n ...commentBoxCrossCapabilityMapping(q),\n layout: { ...layout, spacing: fillSpacing(layout.spacing) },\n fieldSet,\n // can only be required `all` of OpenEnded questions\n required: mapRespondentSurveyRequiredAll(required),\n validation: validation ?? undefined,\n };\n};\n\n// Mappings to convert CommentBox's external to it's internal QuestionType representation\n/**\n * Maps the external QuestionType (GQL based) to the internal QuestionType\n *\n * _Types are mostly the same but the internal type is optimized to be easier to work with_\n */\nconst commentBoxAggregateResponseDashboardMapping = (externalQuestion) => {\n const q = externalQuestion;\n return {\n ...commentBoxCrossCapabilityMapping(q),\n ...aggregateResponseDashboardMapping(q),\n };\n};\n\n// Mappings to convert CommentBox's external to it's internal QuestionType representation\n/**\n * Maps the external QuestionType (GQL based) to the internal QuestionType\n *\n * _Types are mostly the same but the internal type is optimized to be easier to work with_\n */\nconst commentBoxAggregateResponseCustomizableSolutionsMapping = (externalQuestion) => {\n const q = externalQuestion;\n return {\n ...commentBoxCrossCapabilityMapping(q),\n ...aggregateResponseCustomizableSolutionsMapping(q),\n };\n};\n\n// Mappings/Types for SingleTextbox shared by all Capabilities\n/**\n * Returns fields for SingleTextbox's internal QuestionType type\n * that are shared across all Capabilities\n */\nconst singleTextboxCrossCapabilityMapping = ({ id, }) => ({\n typeId: 'single_textbox',\n family: 'OPEN_ENDED',\n variant: 'SINGLE_LINE',\n id,\n});\n\n// Mappings to convert SingleTextbox's external to it's internal QuestionType representation\n/**\n * Maps the external QuestionType (GQL based) to the internal QuestionType\n *\n * _Types are mostly the same but the internal type is optimized to be easier to work with_\n */\nconst singleTextboxRespondentSurveyMapping = (externalQuestion) => {\n const q = externalQuestion;\n const { layout, validation, required, fieldSet } = q;\n return {\n ...respondentSurveyMapping(q),\n ...singleTextboxCrossCapabilityMapping(q),\n layout: { ...layout, spacing: fillSpacing(layout.spacing) },\n fieldSet,\n // can only be required `all` of OpenEnded questions\n required: mapRespondentSurveyRequiredAll(required),\n validation: validation ?? undefined,\n };\n};\n\n// Mappings to convert SingleTextbox's external to it's internal QuestionType representation\n/**\n * Maps the external QuestionType (GQL based) to the internal QuestionType\n *\n * _Types are mostly the same but the internal type is optimized to be easier to work with_\n */\nconst singleTextboxAggregateResponseDashboardMapping = (externalQuestion) => {\n const q = externalQuestion;\n return {\n ...singleTextboxCrossCapabilityMapping(q),\n ...aggregateResponseDashboardMapping(q),\n };\n};\n\n// Mappings to convert SingleTextbox's external to it's internal QuestionType representation\n/**\n * Maps the external QuestionType (GQL based) to the internal QuestionType\n *\n * _Types are mostly the same but the internal type is optimized to be easier to work with_\n */\nconst singleTextboxAggregateResponseCustomizableSolutionsMapping = (externalQuestion) => {\n const q = externalQuestion;\n return {\n ...singleTextboxCrossCapabilityMapping(q),\n ...aggregateResponseCustomizableSolutionsMapping(q),\n };\n};\n\n// Mappings/Types for Matrix shared by all Capabilities\n/**\n * Returns fields for Matrix's internal QuestionType type\n * that are shared across all Capabilities\n */\nconst matrixCrossCapabilityMapping = ({ id, family, variant, }) => ({\n typeId: 'matrix',\n family: family,\n variant: variant,\n id,\n});\n\n// Mappings to convert Matrix's external to it's internal QuestionType representation\nconst isExternalMatrixWithRadio = (q) => q.variant === 'SINGLE_ANSWER_RADIO' && 'fieldSets' in q;\nconst isExternalMatrixWithCheckboxes = (q) => q.variant === 'MANY_ANSWERS_CHECKBOX';\n/**\n * Maps the external QuestionType (GQL based) to the internal QuestionType\n *\n * _Types are mostly the same but the internal type is optimized to be easier to work with_\n */\nconst matrixRespondentSurveyMapping = (externalQuestion) => {\n const q = externalQuestion;\n const { layout, required, answerOther } = q;\n const base = {\n ...respondentSurveyMapping(q),\n ...matrixCrossCapabilityMapping(q),\n layout: { ...layout, spacing: fillSpacing(layout.spacing) },\n required: required ?? undefined,\n ...mapRespondentSurveyAnswerOther(answerOther),\n };\n if (isExternalMatrixWithRadio(q)) {\n const { fieldSets, answersWeighted, answerNA, isForcedRanking, isWeighted, } = q;\n return {\n ...base,\n fieldSets,\n answersWeighted,\n answerNotApplicable: answerNA ?? undefined,\n isForcedRanking,\n isWeighted,\n };\n }\n if (isExternalMatrixWithCheckboxes(q)) {\n const { fieldSets, answers } = q;\n return {\n ...base,\n fieldSets,\n answers,\n };\n }\n const { fieldSet, answersWeighted, answerNA } = q;\n return {\n ...base,\n fieldSet,\n answersWeighted,\n answerNotApplicable: answerNA ?? undefined,\n };\n};\n\n// Mappings to convert Matrix's external to it's internal QuestionType representation\n/**\n * Maps the external QuestionType (GQL based) to the internal QuestionType\n *\n * _Types are mostly the same but the internal type is optimized to be easier to work with_\n */\nconst matrixAggregateResponseDashboardMapping = (externalQuestion) => {\n const q = externalQuestion;\n return {\n ...matrixCrossCapabilityMapping(q),\n ...aggregateResponseDashboardMapping(q),\n };\n};\n\n// Mappings to convert Matrix's external to it's internal QuestionType representation\n/**\n * Maps the external QuestionType (GQL based) to the internal QuestionType\n *\n * _Types are mostly the same but the internal type is optimized to be easier to work with_\n */\nconst matrixAggregateResponseCustomizableSolutionsMapping = (externalQuestion) => {\n const q = externalQuestion;\n return {\n ...matrixCrossCapabilityMapping(q),\n ...aggregateResponseCustomizableSolutionsMapping(q),\n };\n};\n\n// Mappings/Types for MultipleChoice shared by all Capabilities\n/**\n * Returns fields for MultipleChoice's internal QuestionType type\n * that are shared across all Capabilities\n */\nconst multipleChoiceCrossCapabilityMapping = ({ id, }) => ({\n typeId: 'multiple_choice',\n family: 'MULTIPLE_CHOICE',\n variant: 'SINGLE_ANSWER_RADIO',\n id,\n});\n\n// Mappings to convert MultipleChoice's external to it's internal QuestionType representation\n/**\n * Maps the external QuestionType (GQL based) to the internal QuestionType\n *\n * _Types are mostly the same but the internal type is optimized to be easier to work with_\n */\nconst multipleChoiceRespondentSurveyMapping = (externalQuestion) => {\n const q = externalQuestion;\n const { layout, validation, required, answers, answerOther, answerNA } = q;\n return {\n ...respondentSurveyMapping(q),\n ...multipleChoiceCrossCapabilityMapping(q),\n layout: { ...layout, spacing: fillSpacing(layout.spacing) },\n required: mapRespondentSurveyRequiredAll(required),\n validation: validation ?? undefined,\n answers,\n answerNoneOfTheAbove: answerNA ?? undefined,\n ...mapRespondentSurveyAnswerOther(answerOther),\n };\n};\n\n// Mappings to convert MultipleChoice's external to it's internal QuestionType representation\n/**\n * Maps the external QuestionType (GQL based) to the internal QuestionType\n *\n * _Types are mostly the same but the internal type is optimized to be easier to work with_\n */\nconst multipleChoiceRespondentQuizResultsMapping = (externalQuestion) => {\n const q = externalQuestion;\n const { layout, answerOther, answerNA } = q;\n return {\n ...respondentQuizResultsMapping(q),\n ...multipleChoiceCrossCapabilityMapping(q),\n layout: { ...layout, spacing: fillSpacing(layout.spacing) },\n answerOther: mapRespondentQuizResultsAnswerOther(answerOther),\n answerNoneOfTheAbove: answerNA ?? null, // remove `null` as possible type\n };\n};\n\n// Mappings to convert MultipleChoice's external to it's internal QuestionType representation\n/**\n * Maps the external QuestionType (GQL based) to the internal QuestionType\n *\n * _Types are mostly the same but the internal type is optimized to be easier to work with_\n */\nconst multipleChoiceAggregateResponseDashboardMapping = (externalQuestion) => {\n const q = externalQuestion;\n return {\n ...multipleChoiceCrossCapabilityMapping(q),\n ...aggregateResponseDashboardMapping(q),\n };\n};\n\n// Mappings to convert MultipleChoice's external to it's internal QuestionType representation\n/**\n * Maps the external QuestionType (GQL based) to the internal QuestionType\n *\n * _Types are mostly the same but the internal type is optimized to be easier to work with_\n */\nconst multipleChoiceAggregateResponseCustomizableSolutionsMapping = (externalQuestion) => {\n const q = externalQuestion;\n return {\n ...multipleChoiceCrossCapabilityMapping(q),\n ...aggregateResponseCustomizableSolutionsMapping(q),\n };\n};\n\n// Mappings/Types for MultipleTextbox shared by all Capabilities\n/**\n * Returns fields for MultipleTextbox's internal QuestionType type\n * that are shared across all Capabilities\n */\nconst multipleTextboxCrossCapabilityMapping = ({ id, }) => ({\n typeId: 'multiple_textbox',\n family: 'OPEN_ENDED',\n variant: 'MANY_FIELDS',\n id,\n});\n\n// Mappings to convert MultipleTextbox's external to it's internal QuestionType representation\n/**\n * Maps the external QuestionType (GQL based) to the internal QuestionType\n *\n * _Types are mostly the same but the internal type is optimized to be easier to work with_\n */\nconst multipleTextboxRespondentSurveyMapping = (externalQuestion) => {\n const q = externalQuestion;\n const { layout, answers, validation, sumValidation, required, fieldSets } = q;\n return {\n ...respondentSurveyMapping(q),\n ...multipleTextboxCrossCapabilityMapping(q),\n layout: { ...layout, spacing: fillSpacing(layout.spacing) },\n fieldSets,\n answers,\n required: required ?? undefined,\n validation: validation ?? undefined,\n sumValidation: sumValidation ?? undefined,\n };\n};\n\n// Mappings to convert MultipleTextbox's external to it's internal QuestionType representation\n/**\n * Maps the external QuestionType (GQL based) to the internal QuestionType\n *\n * _Types are mostly the same but the internal type is optimized to be easier to work with_\n */\nconst multipleTextboxAggregateResponseDashboardMapping = (externalQuestion) => {\n const q = externalQuestion;\n return {\n ...multipleTextboxCrossCapabilityMapping(q),\n ...aggregateResponseDashboardMapping(q),\n };\n};\n\n// Mappings/Types for Ranking shared by all Capabilities\n/**\n * Returns fields for Ranking's internal QuestionType type\n * that are shared across all Capabilities\n */\nconst rankingCrossCapabilityMapping = ({ id, }) => ({\n typeId: 'ranking',\n family: 'RANKING',\n variant: 'SINGLE_ANSWER_RADIO',\n id,\n});\n\n// Mappings to convert Ranking's external to it's internal QuestionType representation\n/**\n * Maps the external QuestionType (GQL based) to the internal QuestionType\n *\n * _Types are mostly the same but the internal type is optimized to be easier to work with_\n */\nconst rankingRespondentSurveyMapping = (externalQuestion) => {\n const q = externalQuestion;\n const { layout, fieldSets, answers, required, answerNA } = q;\n return {\n ...respondentSurveyMapping(q),\n ...rankingCrossCapabilityMapping(q),\n layout: { ...layout, spacing: fillSpacing(layout.spacing) },\n fieldSets,\n answers,\n required: mapRespondentSurveyRequiredAll(required),\n answerNoneOfTheAbove: answerNA ?? undefined,\n };\n};\n\n// Mappings to convert Ranking's external to it's internal QuestionType representation\n/**\n * Maps the external QuestionType (GQL based) to the internal QuestionType\n *\n * _Types are mostly the same but the internal type is optimized to be easier to work with_\n */\nconst rankingAggregateResponseDashboardMapping = (externalQuestion) => {\n const q = externalQuestion;\n return {\n ...rankingCrossCapabilityMapping(q),\n ...aggregateResponseDashboardMapping(q),\n };\n};\n\n// Mappings to convert Ranking's external to it's internal QuestionType representation\n/**\n * Maps the external QuestionType (GQL based) to the internal QuestionType\n *\n * _Types are mostly the same but the internal type is optimized to be easier to work with_\n */\nconst rankingAggregateResponseCustomizableSolutionsMapping = (externalQuestion) => {\n const q = externalQuestion;\n return {\n ...rankingCrossCapabilityMapping(q),\n ...aggregateResponseCustomizableSolutionsMapping(q),\n };\n};\n\n// Mappings/Types for Slider shared by all Capabilities\n/**\n * Returns fields for Slider's internal QuestionType type\n * that are shared across all Capabilities\n */\nconst sliderCrossCapabilityMapping = ({ id, }) => ({\n typeId: 'slider',\n family: 'SLIDER',\n variant: 'SINGLE_SLIDER',\n id,\n});\n\n// Mappings to convert Slider's external to it's internal QuestionType representation\n/**\n * Maps the external QuestionType (GQL based) to the internal QuestionType\n *\n * _Types are mostly the same but the internal type is optimized to be easier to work with_\n */\nconst sliderRespondentSurveyMapping = (externalQuestion) => {\n const q = externalQuestion;\n const { scaleOptions, required, hideNumericalInput } = q;\n return {\n ...respondentSurveyMapping(q),\n ...sliderCrossCapabilityMapping(q),\n required: required ?? undefined,\n scaleOptions,\n hideNumericalInput,\n };\n};\n\n// Mappings to convert Slider's external to it's internal QuestionType representation\n/**\n * Maps the external QuestionType (GQL based) to the internal QuestionType\n *\n * _Types are mostly the same but the internal type is optimized to be easier to work with_\n */\nconst sliderAggregateResponseDashboardMapping = (externalQuestion) => {\n const q = externalQuestion;\n return {\n ...sliderCrossCapabilityMapping(q),\n ...aggregateResponseDashboardMapping(q),\n };\n};\n\n// Mappings/Types for StarRating shared by all Capabilities\n/**\n * Returns fields for StarRating's internal QuestionType type\n * that are shared across all Capabilities\n */\nconst starRatingCrossCapabilityMapping = ({ id, family, variant, }) => ({\n typeId: 'star_rating',\n family,\n variant,\n id,\n});\n\n// Mappings to convert StarRating's external to it's internal QuestionType representation\n/**\n * Maps the external QuestionType (GQL based) to the internal QuestionType\n *\n * _Types are mostly the same but the internal type is optimized to be easier to work with_\n */\nconst starRatingRespondentSurveyMapping = (externalQuestion) => {\n const q = externalQuestion;\n const { layout, required, fieldSet, answersWeighted, answerNA, answerOther, symbolOptions, } = q;\n return {\n ...respondentSurveyMapping(q),\n ...starRatingCrossCapabilityMapping(q),\n family: 'RATING_SCALE',\n variant: 'SINGLE_ANSWER_SYMBOL',\n layout: { ...layout, spacing: fillSpacing(layout.spacing) },\n required: mapRespondentSurveyRequiredAll(required),\n fieldSet,\n answersWeighted,\n answerNoneOfTheAbove: answerNA ?? undefined,\n symbolOptions: symbolOptions ?? undefined,\n ...mapRespondentSurveyAnswerOther(answerOther),\n };\n};\n\n// Mappings to convert StarRating's external to it's internal QuestionType representation\n/**\n * Maps the external QuestionType (GQL based) to the internal QuestionType\n *\n * _Types are mostly the same but the internal type is optimized to be easier to work with_\n */\nconst starRatingAggregateResponseDashboardMapping = (externalQuestion) => {\n const q = externalQuestion;\n return {\n ...starRatingCrossCapabilityMapping(q),\n ...aggregateResponseDashboardMapping(q),\n };\n};\n\n// Mappings/Types for ImagePresentation shared by all Capabilities\n/**\n * Returns fields for ImagePresentation's internal QuestionType type\n * that are shared across all Capabilities\n */\nconst imagePresentationCrossCapabilityMapping = ({ id, }) => ({\n typeId: 'image_presentation',\n family: 'PRESENTATION',\n variant: 'IMAGE',\n id,\n});\n\n// Mappings to convert ImagePresentation's external to it's internal QuestionType representation\n/**\n * Maps the external QuestionType (GQL based) to the internal QuestionType\n *\n * _Types are mostly the same but the internal type is optimized to be easier to work with_\n */\nconst imagePresentationRespondentSurveyMapping = (externalQuestion) => {\n const q = externalQuestion;\n const { heading, layout } = q;\n return {\n ...respondentSurveyMapping(q),\n ...imagePresentationCrossCapabilityMapping(q),\n heading: {\n ...heading,\n assignments: heading.assignments ?? undefined,\n },\n layout: { ...layout, spacing: fillSpacing(layout.spacing) },\n };\n};\n\n// Mappings/Types for TextPresentation shared by all Capabilities\n/**\n * Returns fields for TextPresentation's internal QuestionType type\n * that are shared across all Capabilities\n */\nconst textPresentationCrossCapabilityMapping = ({ id, }) => ({\n typeId: 'text_presentation',\n family: 'PRESENTATION',\n variant: 'TEXT',\n id,\n});\n\n// Mappings to convert TextPresentation's external to it's internal QuestionType representation\n/**\n * Maps the external QuestionType (GQL based) to the internal QuestionType\n *\n * _Types are mostly the same but the internal type is optimized to be easier to work with_\n */\nconst textPresentationRespondentSurveyMapping = (externalQuestion) => {\n const q = externalQuestion;\n const { heading, layout } = q;\n return {\n ...respondentSurveyMapping(q),\n ...textPresentationCrossCapabilityMapping(q),\n heading,\n layout: { ...layout, spacing: fillSpacing(layout.spacing) },\n };\n};\n\n// Mappings/Types for NPS shared by all Capabilities\n/**\n * Returns fields for Nps's internal QuestionType type\n * that are shared across all Capabilities\n */\nconst npsCrossCapabilityMapping = ({ id, }) => ({\n typeId: 'nps',\n family: 'RATING_SCALE',\n variant: 'NPS',\n id,\n});\n\n// Mappings to convert NPS's external to it's internal QuestionType representation\n/**\n * Maps the external QuestionType (GQL based) to the internal QuestionType\n *\n * _Types are mostly the same but the internal type is optimized to be easier to work with_\n */\nconst npsRespondentSurveyMapping = (externalQuestion) => {\n const q = externalQuestion;\n const { layout, required, answersWeighted, fieldSet } = q;\n return {\n ...respondentSurveyMapping(q),\n ...npsCrossCapabilityMapping(q),\n layout: { ...layout, spacing: fillSpacing(layout.spacing) },\n required: mapRespondentSurveyRequiredAll(required),\n answersWeighted,\n fieldSet,\n };\n};\n\nconst isTextLengthValidation = typeGuard({\n errorMessage: isString,\n type: isFixed('TEXT_LENGTH'),\n minLength: isNumber,\n maxLength: isNumber,\n});\nconst isNumericalValidation = typeGuard({\n errorMessage: isString,\n type: isEither([isFixed('INTEGER'), isFixed('DECIMAL')]),\n minValue: isNumber,\n maxValue: isNumber,\n});\nconst isDateValidation = typeGuard({\n errorMessage: isString,\n type: isOneOf(['DATE_US', 'DATE_INTL']),\n minDate: isString,\n maxDate: isString,\n});\nconst isDateFormatValidation = typeGuard({\n errorMessage: isString,\n type: isOneOf(['DATE_US', 'DATE_INTL']),\n});\nconst isEmailValidation = typeGuard({\n errorMessage: isString,\n type: isFixed('EMAIL'),\n});\nconst isFieldValidation = isEither([\n isTextLengthValidation,\n isNumericalValidation,\n isDateValidation,\n isEmailValidation,\n]);\n\n// Mappings/Types for DateTime shared by all Capabilities\n/**\n * Returns fields for DateTime's internal QuestionType type\n * that are shared across all Capabilities\n */\nconst dateTimeCrossCapabilityMapping = ({ id, variant, }) => ({\n typeId: 'date_time',\n family: 'DATETIME',\n variant: variant,\n id,\n});\n\n// Mappings to convert DateTime's external to it's internal QuestionType representation\n/**\n * Maps the external QuestionType (GQL based) to the internal QuestionType\n *\n * _Types are mostly the same but the internal type is optimized to be easier to work with_\n */\nconst dateTimeRespondentSurveyMapping = (externalQuestion) => {\n const q = externalQuestion;\n const { layout, required, validation, fieldSets } = q;\n return {\n ...respondentSurveyMapping(q),\n ...dateTimeCrossCapabilityMapping(q),\n layout: { ...layout, spacing: fillSpacing(layout.spacing) },\n required: required ?? undefined,\n validation: isDateFormatValidation(validation)\n ? { type: validation.type, errorMessage: validation.errorMessage }\n : { type: 'DATE_INTL', errorMessage: '' },\n fieldSets,\n };\n};\n\n// Mappings/Types for Matrix shared by all Capabilities\n/**\n * Returns fields for Matrix's internal QuestionType type\n * that are shared across all Capabilities\n */\nconst matrixDropdownCrossCapabilityMapping = ({ id, family, variant, }) => ({\n typeId: 'matrix_dropdown',\n family: family,\n variant: variant,\n id,\n});\n\n// Mappings to convert Matrix's external to it's internal QuestionType representation\n/**\n * Maps the external QuestionType (GQL based) to the internal QuestionType\n *\n * _Types are mostly the same but the internal type is optimized to be easier to work with_\n */\nconst matrixDropdownRespondentSurveyMapping = (externalQuestion) => {\n const q = externalQuestion;\n const { layout, required, answerOther, answersNested, fieldSets } = q;\n const base = {\n ...respondentSurveyMapping(q),\n ...matrixDropdownCrossCapabilityMapping(q),\n layout: { ...layout, spacing: fillSpacing(layout.spacing) },\n required: required ?? undefined,\n ...mapRespondentSurveyAnswerOther(answerOther),\n };\n return {\n ...base,\n answersNested,\n fieldSets,\n };\n};\n\n// Mappings/Types for fileUpload shared by all Capabilities\n/**\n * Returns fields for fileUpload's internal QuestionType type\n * that are shared across all Capabilities\n */\nconst fileUploadCrossCapabilityMapping = ({ id, variant, }) => ({\n typeId: 'file_upload',\n family: 'FILE_UPLOAD',\n variant: variant,\n id,\n});\n\n// Mappings to convert FileUpload's external to it's internal QuestionType representation\n/**\n * Maps the external QuestionType (GQL based) to the internal QuestionType\n *\n * _Types are mostly the same but the internal type is optimized to be easier to work with_\n */\nconst fileUploadRespondentSurveyMapping = (externalQuestion) => {\n const q = externalQuestion;\n const { required, layout, validation, instructions } = q;\n return {\n ...respondentSurveyMapping(q),\n ...fileUploadCrossCapabilityMapping(q),\n layout: { ...layout, spacing: fillSpacing(layout.spacing) },\n required: mapRespondentSurveyRequiredAll(required),\n instructions: instructions ?? undefined,\n validation: {\n errorMessage: validation?.errorMessage ?? '',\n formats: validation?.formats ?? [],\n type: validation?.type ?? 'FILE_FORMAT',\n },\n };\n};\n\n/** List of all SMQuestions supported capabilities (others might get defined via custom providers/views) */\nconst CAPABILITIES = [\n 'respondent-survey',\n 'respondent-quiz-results',\n 'aggregate-response-dashboard',\n 'aggregate-response-customizable-solutions',\n];\n\nconst invalidCombination = () => {\n throw new Error('Invalid question and capability combination or not yet implemented');\n};\n/**\n * Main mapping to resolve QuestionType and Capability to\n * a mapping (and in it the assertion)\n */\nconst questionTypeAndCapabilityMapping = {\n single_textbox: {\n 'respondent-survey': singleTextboxRespondentSurveyMapping,\n 'respondent-quiz-results': invalidCombination,\n 'aggregate-response-dashboard': singleTextboxAggregateResponseDashboardMapping,\n 'aggregate-response-customizable-solutions': singleTextboxAggregateResponseCustomizableSolutionsMapping,\n },\n comment_box: {\n 'respondent-survey': commentBoxRespondentSurveyMapping,\n 'respondent-quiz-results': invalidCombination,\n 'aggregate-response-dashboard': commentBoxAggregateResponseDashboardMapping,\n 'aggregate-response-customizable-solutions': commentBoxAggregateResponseCustomizableSolutionsMapping,\n },\n multiple_textbox: {\n 'respondent-survey': multipleTextboxRespondentSurveyMapping,\n 'respondent-quiz-results': invalidCombination,\n 'aggregate-response-dashboard': multipleTextboxAggregateResponseDashboardMapping,\n 'aggregate-response-customizable-solutions': invalidCombination,\n },\n check_box: {\n 'respondent-survey': checkBoxRespondentSurveyMapping,\n 'respondent-quiz-results': checkBoxRespondentQuizResultsMapping,\n 'aggregate-response-dashboard': checkBoxAggregateResponseDashboardMapping,\n 'aggregate-response-customizable-solutions': checkBoxAggregateResponseCustomizableSolutionsMapping,\n },\n image_choice: {\n 'respondent-survey': imageChoiceRespondentSurveyMapping,\n 'respondent-quiz-results': imageChoiceRespondentQuizResultsMapping,\n 'aggregate-response-dashboard': imageChoiceAggregateResponseDashboardMapping,\n 'aggregate-response-customizable-solutions': imageChoiceAggregateResponseCustomizableSolutionsMapping,\n },\n multiple_choice: {\n 'respondent-survey': multipleChoiceRespondentSurveyMapping,\n 'respondent-quiz-results': multipleChoiceRespondentQuizResultsMapping,\n 'aggregate-response-dashboard': multipleChoiceAggregateResponseDashboardMapping,\n 'aggregate-response-customizable-solutions': multipleChoiceAggregateResponseCustomizableSolutionsMapping,\n },\n dropdown: {\n 'respondent-survey': dropdownRespondentSurveyMapping,\n 'respondent-quiz-results': dropdownRespondentQuizResultsMapping,\n 'aggregate-response-dashboard': dropdownAggregateResponseDashboardMapping,\n 'aggregate-response-customizable-solutions': dropdownAggregateResponseCustomizableSolutionsMapping,\n },\n slider: {\n 'respondent-survey': sliderRespondentSurveyMapping,\n 'respondent-quiz-results': invalidCombination,\n 'aggregate-response-dashboard': sliderAggregateResponseDashboardMapping,\n 'aggregate-response-customizable-solutions': invalidCombination,\n },\n star_rating: {\n 'respondent-survey': starRatingRespondentSurveyMapping,\n 'respondent-quiz-results': invalidCombination,\n 'aggregate-response-dashboard': starRatingAggregateResponseDashboardMapping,\n 'aggregate-response-customizable-solutions': invalidCombination,\n },\n ranking: {\n 'respondent-survey': rankingRespondentSurveyMapping,\n 'respondent-quiz-results': invalidCombination,\n 'aggregate-response-dashboard': rankingAggregateResponseDashboardMapping,\n 'aggregate-response-customizable-solutions': rankingAggregateResponseCustomizableSolutionsMapping,\n },\n matrix: {\n 'respondent-survey': matrixRespondentSurveyMapping,\n 'respondent-quiz-results': invalidCombination,\n 'aggregate-response-dashboard': matrixAggregateResponseDashboardMapping,\n 'aggregate-response-customizable-solutions': matrixAggregateResponseCustomizableSolutionsMapping,\n },\n matrix_dropdown: {\n 'respondent-survey': matrixDropdownRespondentSurveyMapping,\n 'respondent-quiz-results': invalidCombination,\n 'aggregate-response-dashboard': invalidCombination,\n 'aggregate-response-customizable-solutions': invalidCombination,\n },\n nps: {\n 'respondent-survey': npsRespondentSurveyMapping,\n 'respondent-quiz-results': invalidCombination,\n 'aggregate-response-dashboard': invalidCombination,\n 'aggregate-response-customizable-solutions': invalidCombination,\n },\n file_upload: {\n 'respondent-survey': fileUploadRespondentSurveyMapping,\n 'respondent-quiz-results': invalidCombination,\n 'aggregate-response-dashboard': invalidCombination,\n 'aggregate-response-customizable-solutions': invalidCombination,\n },\n date_time: {\n 'respondent-survey': dateTimeRespondentSurveyMapping,\n 'respondent-quiz-results': invalidCombination,\n 'aggregate-response-dashboard': invalidCombination,\n 'aggregate-response-customizable-solutions': invalidCombination,\n },\n image_presentation: {\n 'respondent-survey': imagePresentationRespondentSurveyMapping,\n 'respondent-quiz-results': invalidCombination,\n 'aggregate-response-dashboard': invalidCombination,\n 'aggregate-response-customizable-solutions': invalidCombination,\n },\n text_presentation: {\n 'respondent-survey': textPresentationRespondentSurveyMapping,\n 'respondent-quiz-results': invalidCombination,\n 'aggregate-response-dashboard': invalidCombination,\n 'aggregate-response-customizable-solutions': invalidCombination,\n },\n};\n/** type guard to check if string is a capability */\nconst isCapability = (u) => CAPABILITIES.includes(u);\n/** Used to dynamically map the fields base on\n * * typeId\n * * question type\n * * capability\n * * combination of question type and capability\n */\nconst mapDynamic = ({ typeId, capability, externalQuestion, }) => {\n if (!isCapability(capability)) {\n // if this is a custom (unknown) capability just return the `externalQuestion` for now\n return externalQuestion;\n }\n return questionTypeAndCapabilityMapping[typeId][capability](externalQuestion);\n};\nconst mapInternalDynamicToExternal = (externalQuestion, \n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nq, \n// eslint-disable-next-line @typescript-eslint/no-unused-vars\ncapability // keep for future use\n) => {\n // possibly mirror `mapDynamic`s setup if needed later\n // remove internal `typeId` and other possible attributes from exported type\n const { \n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n typeId, ...cleanExternalQuestion } = externalQuestion;\n return {\n ...cleanExternalQuestion,\n };\n};\n\n/**\n * Detects if a question belongs to this question type -\n * minimalistically as this function is supposed to be as optimized as possible as it will run multiple times\n */\nconst isCompatible$h = (q, typeId) => 'typeId' in q && q.typeId === typeId;\n\nconst baseGuards$d = baseQuestionGuards('single_textbox', 'OPEN_ENDED', 'SINGLE_LINE');\nconst isQuestionTypeSingleTextbox = typeGuard(baseGuards$d);\n/**\n * Basic guard to determine question type\n *\n * throws an error when the question does not meet all the type requirements.\n */\nfunction assertQuestionTypeSingleTextbox(q) {\n return typeAssertion(baseGuards$d)(q);\n}\n\nconst mapFromExternalQuestion$g = (externalQuestion, capability) => {\n const questionType = mapDynamic({\n typeId: 'single_textbox',\n externalQuestion,\n capability,\n });\n return questionType;\n};\n\nconst typeId$g = 'single_textbox';\nconst fromExternalQuestion$g = (source, capability) => mapFromExternalQuestion$g(source, capability);\nconst toExternalQuestion$g = (eq, q, capability) => mapInternalDynamicToExternal(eq);\nconst isCompatible$g = (q) => isCompatible$h(q, typeId$g);\nconst isOfQuestionType$g = isQuestionTypeSingleTextbox;\n\n/**\n * Helper to run validators and prepare their result\n *\n * @returns {QuestionError[] | null} `null` means there is no error - `QuestionError[]` will never be an empty array\n */\nconst runValidators = (\n/** Map of validators */\nvalidators, question, value, touched, validateEmptyValue = false) => {\n const validationErrors = validators.reduce((errors, validator) => {\n const newError = validator(question, value, touched, validateEmptyValue);\n return newError !== null ? [...errors, newError] : errors;\n }, []);\n if (validationErrors.length === 0) {\n return null;\n }\n return validationErrors;\n};\n\nfunction createValidationError(type, detail = '', questionId = null, fieldId = undefined) {\n return {\n type,\n detail,\n questionId,\n fieldId,\n };\n}\n\n/** returns `null` if valid and error object if not */\nconst validateTextLength = (\n/** GraphQL `TextLengthValidation` entity */\nvalidation, \n/** Id to identify the question */\nquestionId, value, touched = false, \n/** Validate empty values (default `false`) */\nvalidateEmptyValue = false) => {\n if ((!value && !validateEmptyValue) ||\n !validation ||\n !touched ||\n validation.type !== 'TEXT_LENGTH') {\n return null;\n }\n const { minLength, maxLength, errorMessage } = validation;\n if (value.length > maxLength || value.length < minLength) {\n return createValidationError(validation.type, errorMessage, questionId);\n }\n return null;\n};\n/** Validates `valueToValidate` for text-length and returns an `QuestionError` or `null` (valid) */\nconst checkValueTextLength = (question, valueToValidate, touched, validateEmptyValue = false) => {\n if (question.validation === undefined ||\n (!valueToValidate && !validateEmptyValue) ||\n question.validation?.type !== 'TEXT_LENGTH') {\n return null; // questionType does not support validation\n }\n const valueAsArray = Array.isArray(valueToValidate)\n ? valueToValidate\n : [valueToValidate];\n const errors = valueAsArray\n .map((value) => {\n return validateTextLength(question.validation, question.id, value || '', touched, validateEmptyValue);\n })\n .filter(notNull);\n return errors.length > 0 ? errors[0] : null;\n};\n\nconst DATE_PATTERNS = {\n DATE_INTL: /^(?
0?[1-9]|[12][0-9]|3[0-1])([-/.]{1})(?0?[1-9]|1[0-2])\\2(?\\d{4})$/,\n DATE_US: /^(?0?[1-9]|1[0-2])\\/(?
0?[1-9]|[12][0-9]|3[0-1])\\/(?\\d{4})$/,\n};\n\nconst isDateValidationType = (validationType) => validationType === 'DATE_INTL' || validationType === 'DATE_US';\nconst stringToDate = (format) => (s) => {\n try {\n const { groups: { dd, mm, yyyy }, } = DATE_PATTERNS[format].exec(s);\n return new Date(Number(yyyy), Number(mm) - 1, Number(dd));\n }\n catch (e) {\n return null;\n }\n};\n/**\n * Converts minDate and maxDate format: ISO Date-Time => Date\n * only when `validation` is `DateValidation`\n */\nconst getMinAndMaxDate = (validation) => {\n if (!('minDate' in validation && 'maxDate' in validation)) {\n return [undefined, undefined]; // no min/max for DateFormatValidation\n }\n return [validation.minDate, validation.maxDate].map((s) => new Date(s.substring(0, s.indexOf('T')).replace('-', '/')));\n};\n/** returns `null` if valid and error object if not */\nconst validateDate = (\n/** GraphQL `DateValidation` entity */\nvalidation, \n/** Id to identify the question */\nquestionId, value, touched = false, \n/** Validate empty values (default `false`) */\nvalidateEmptyValue = false) => {\n if ((!value && !validateEmptyValue) ||\n !validation ||\n !touched ||\n !isDateValidationType(validation.type)) {\n return null;\n }\n const { errorMessage } = validation;\n const dateType = validation?.type;\n const stringToDateType = stringToDate(dateType);\n // value format: Short Date => Date\n const date = stringToDateType(value);\n // minDate and maxDate format: ISO Date-Time => Date\n const [dmin, dmax] = getMinAndMaxDate(validation);\n if (!date ||\n (dmax && date.getTime() > dmax.getTime()) ||\n (dmin && date.getTime() < dmin.getTime())) {\n return createValidationError(validation.type, errorMessage, questionId);\n }\n return null;\n};\n/** Validates `valueToValidate` as date and returns an `QuestionError` or `null` (valid) */\nconst checkValueDateFormat = (question, valueToValidate, touched, validateEmptyValue = false) => {\n if ((!valueToValidate && !validateEmptyValue) ||\n !isDateValidationType(question?.validation?.type)) {\n return null; // questionType does not support validation\n }\n const valueAsArray = Array.isArray(valueToValidate)\n ? valueToValidate\n : [valueToValidate];\n const errors = valueAsArray\n .map((value) => {\n return validateDate(question.validation, question.id, value || '', touched, validateEmptyValue);\n })\n .filter(notNull);\n return errors.length > 0 ? errors[0] : null;\n};\n\nconst isNumericalValidationType = (validationType) => validationType === 'INTEGER' || validationType === 'DECIMAL';\nconst isSumValidationType = (validationType) => validationType === 'SUM';\n/** Integers can only contain numbers (`0-9`) */\nconst isValidInteger = (maybeInteger = '') => maybeInteger.match(/^[0-9]+$/) !== null;\nconst isValidDecimal = (value = '') => value.match(/^[+-]?([0-9]+\\.?[0-9]*|\\.[0-9]+)$/) !== null;\n/** returns `null` if valid and error object if not */\nconst validateNumber = (\n/** GraphQL `DateValidation` entity */\nvalidation, \n/** Id to identify the question */\nquestionId, value, touched = false, \n/** Validate empty values (default `false`) */\nvalidateEmptyValue = false) => {\n if ((!value && !validateEmptyValue) ||\n !validation ||\n !touched ||\n !isNumericalValidationType(validation.type)) {\n return null;\n }\n const { minValue, maxValue, errorMessage } = validation;\n const parsedNumber = parseFloat(value);\n if (Number.isNaN(parsedNumber) ||\n (validation.type === 'INTEGER' && !isValidInteger(value)) ||\n (validation.type === 'DECIMAL' && !isValidDecimal(value)) ||\n Boolean(maxValue && parsedNumber > maxValue) ||\n Boolean(minValue && parsedNumber < minValue)) {\n return createValidationError(validation.type, errorMessage, questionId);\n }\n return null;\n};\n/** returns `null` if valid and error object if not */\nconst validateFixedSum = (\n/** GraphQL `SumValidation` entity */\nvalidation, \n/** Id to identify the question */\nquestionId, values, touched = false, \n/** Validate empty values (default `false`) */\nvalidateEmptyValue = false) => {\n if ((!values && !validateEmptyValue) ||\n !validation ||\n !touched ||\n !isSumValidationType(validation.type)) {\n return null;\n }\n const { sum, errorMessage } = validation;\n const valueSum = values.reduce((reduceSum, value) => {\n const parsedNumber = parseFloat(value);\n return reduceSum + parsedNumber;\n }, 0);\n if ((valueSum && valueSum !== sum) ||\n Number.isNaN(valueSum) ||\n !isValidInteger(String(valueSum))) {\n return createValidationError(validation.type, errorMessage, questionId);\n }\n return null;\n};\n/** Validates `valueToValidate` as number and returns an `QuestionError` or `null` (valid) */\nconst checkValueNumericalFormat = (question, valueToValidate = '', touched = false, validateEmptyValue = false) => {\n if ((!valueToValidate && !validateEmptyValue) ||\n !isNumericalValidationType(question?.validation?.type)) {\n return null; // questionType does not support validation\n }\n const valueAsArray = Array.isArray(valueToValidate)\n ? valueToValidate\n : [valueToValidate];\n const errors = valueAsArray\n .map((value) => {\n return validateNumber(question.validation, question.id, value || '', touched, validateEmptyValue);\n })\n .filter(notNull);\n return errors.length > 0 ? errors[0] : null;\n};\nconst checkMultipleValueNumericalSum = (question, valueToValidate = [], touched = false, validateEmptyValue = false) => {\n if ((!valueToValidate && !validateEmptyValue) ||\n !question.sumValidation ||\n !isSumValidationType(question?.sumValidation?.type)) {\n return null; // questionType does not support validation\n }\n return validateFixedSum(question.sumValidation, question.id, valueToValidate, touched, validateEmptyValue);\n};\n\nfunction getDefaultExportFromCjs (x) {\n\treturn x && x.__esModule && Object.prototype.hasOwnProperty.call(x, 'default') ? x['default'] : x;\n}\n\nvar isEmailExports = {};\nvar isEmail$1 = {\n get exports(){ return isEmailExports; },\n set exports(v){ isEmailExports = v; },\n};\n\nvar assertStringExports = {};\nvar assertString = {\n get exports(){ return assertStringExports; },\n set exports(v){ assertStringExports = v; },\n};\n\n(function (module, exports) {\n\n\tObject.defineProperty(exports, \"__esModule\", {\n\t value: true\n\t});\n\texports.default = assertString;\n\n\tfunction _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\n\tfunction assertString(input) {\n\t var isString = typeof input === 'string' || input instanceof String;\n\n\t if (!isString) {\n\t var invalidType = _typeof(input);\n\n\t if (input === null) invalidType = 'null';else if (invalidType === 'object') invalidType = input.constructor.name;\n\t throw new TypeError(\"Expected a string but received a \".concat(invalidType));\n\t }\n\t}\n\n\tmodule.exports = exports.default;\n\tmodule.exports.default = exports.default;\n} (assertString, assertStringExports));\n\nvar mergeExports = {};\nvar merge = {\n get exports(){ return mergeExports; },\n set exports(v){ mergeExports = v; },\n};\n\n(function (module, exports) {\n\n\tObject.defineProperty(exports, \"__esModule\", {\n\t value: true\n\t});\n\texports.default = merge;\n\n\tfunction merge() {\n\t var obj = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n\t var defaults = arguments.length > 1 ? arguments[1] : undefined;\n\n\t for (var key in defaults) {\n\t if (typeof obj[key] === 'undefined') {\n\t obj[key] = defaults[key];\n\t }\n\t }\n\n\t return obj;\n\t}\n\n\tmodule.exports = exports.default;\n\tmodule.exports.default = exports.default;\n} (merge, mergeExports));\n\nvar isByteLengthExports = {};\nvar isByteLength = {\n get exports(){ return isByteLengthExports; },\n set exports(v){ isByteLengthExports = v; },\n};\n\n(function (module, exports) {\n\n\tObject.defineProperty(exports, \"__esModule\", {\n\t value: true\n\t});\n\texports.default = isByteLength;\n\n\tvar _assertString = _interopRequireDefault(assertStringExports);\n\n\tfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\n\tfunction _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\n\t/* eslint-disable prefer-rest-params */\n\tfunction isByteLength(str, options) {\n\t (0, _assertString.default)(str);\n\t var min;\n\t var max;\n\n\t if (_typeof(options) === 'object') {\n\t min = options.min || 0;\n\t max = options.max;\n\t } else {\n\t // backwards compatibility: isByteLength(str, min [, max])\n\t min = arguments[1];\n\t max = arguments[2];\n\t }\n\n\t var len = encodeURI(str).split(/%..|./).length - 1;\n\t return len >= min && (typeof max === 'undefined' || len <= max);\n\t}\n\n\tmodule.exports = exports.default;\n\tmodule.exports.default = exports.default;\n} (isByteLength, isByteLengthExports));\n\nvar isFQDNExports = {};\nvar isFQDN = {\n get exports(){ return isFQDNExports; },\n set exports(v){ isFQDNExports = v; },\n};\n\n(function (module, exports) {\n\n\tObject.defineProperty(exports, \"__esModule\", {\n\t value: true\n\t});\n\texports.default = isFQDN;\n\n\tvar _assertString = _interopRequireDefault(assertStringExports);\n\n\tvar _merge = _interopRequireDefault(mergeExports);\n\n\tfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\n\tvar default_fqdn_options = {\n\t require_tld: true,\n\t allow_underscores: false,\n\t allow_trailing_dot: false,\n\t allow_numeric_tld: false\n\t};\n\n\tfunction isFQDN(str, options) {\n\t (0, _assertString.default)(str);\n\t options = (0, _merge.default)(options, default_fqdn_options);\n\t /* Remove the optional trailing dot before checking validity */\n\n\t if (options.allow_trailing_dot && str[str.length - 1] === '.') {\n\t str = str.substring(0, str.length - 1);\n\t }\n\n\t var parts = str.split('.');\n\t var tld = parts[parts.length - 1];\n\n\t if (options.require_tld) {\n\t // disallow fqdns without tld\n\t if (parts.length < 2) {\n\t return false;\n\t }\n\n\t if (!/^([a-z\\u00a1-\\uffff]{2,}|xn[a-z0-9-]{2,})$/i.test(tld)) {\n\t return false;\n\t } // disallow spaces && special characers\n\n\n\t if (/[\\s\\u2002-\\u200B\\u202F\\u205F\\u3000\\uFEFF\\uDB40\\uDC20\\u00A9\\uFFFD]/.test(tld)) {\n\t return false;\n\t }\n\t } // reject numeric TLDs\n\n\n\t if (!options.allow_numeric_tld && /^\\d+$/.test(tld)) {\n\t return false;\n\t }\n\n\t return parts.every(function (part) {\n\t if (part.length > 63) {\n\t return false;\n\t }\n\n\t if (!/^[a-z_\\u00a1-\\uffff0-9-]+$/i.test(part)) {\n\t return false;\n\t } // disallow full-width chars\n\n\n\t if (/[\\uff01-\\uff5e]/.test(part)) {\n\t return false;\n\t } // disallow parts starting or ending with hyphen\n\n\n\t if (/^-|-$/.test(part)) {\n\t return false;\n\t }\n\n\t if (!options.allow_underscores && /_/.test(part)) {\n\t return false;\n\t }\n\n\t return true;\n\t });\n\t}\n\n\tmodule.exports = exports.default;\n\tmodule.exports.default = exports.default;\n} (isFQDN, isFQDNExports));\n\nvar isIPExports = {};\nvar isIP = {\n get exports(){ return isIPExports; },\n set exports(v){ isIPExports = v; },\n};\n\n(function (module, exports) {\n\n\tObject.defineProperty(exports, \"__esModule\", {\n\t value: true\n\t});\n\texports.default = isIP;\n\n\tvar _assertString = _interopRequireDefault(assertStringExports);\n\n\tfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\n\t/**\n\t11.3. Examples\n\n\t The following addresses\n\n\t fe80::1234 (on the 1st link of the node)\n\t ff02::5678 (on the 5th link of the node)\n\t ff08::9abc (on the 10th organization of the node)\n\n\t would be represented as follows:\n\n\t fe80::1234%1\n\t ff02::5678%5\n\t ff08::9abc%10\n\n\t (Here we assume a natural translation from a zone index to the\n\t part, where the Nth zone of any scope is translated into\n\t \"N\".)\n\n\t If we use interface names as , those addresses could also be\n\t represented as follows:\n\n\t fe80::1234%ne0\n\t ff02::5678%pvc1.3\n\t ff08::9abc%interface10\n\n\t where the interface \"ne0\" belongs to the 1st link, \"pvc1.3\" belongs\n\t to the 5th link, and \"interface10\" belongs to the 10th organization.\n\t * * */\n\tvar ipv4Maybe = /^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$/;\n\tvar ipv6Block = /^[0-9A-F]{1,4}$/i;\n\n\tfunction isIP(str) {\n\t var version = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '';\n\t (0, _assertString.default)(str);\n\t version = String(version);\n\n\t if (!version) {\n\t return isIP(str, 4) || isIP(str, 6);\n\t } else if (version === '4') {\n\t if (!ipv4Maybe.test(str)) {\n\t return false;\n\t }\n\n\t var parts = str.split('.').sort(function (a, b) {\n\t return a - b;\n\t });\n\t return parts[3] <= 255;\n\t } else if (version === '6') {\n\t var addressAndZone = [str]; // ipv6 addresses could have scoped architecture\n\t // according to https://tools.ietf.org/html/rfc4007#section-11\n\n\t if (str.includes('%')) {\n\t addressAndZone = str.split('%');\n\n\t if (addressAndZone.length !== 2) {\n\t // it must be just two parts\n\t return false;\n\t }\n\n\t if (!addressAndZone[0].includes(':')) {\n\t // the first part must be the address\n\t return false;\n\t }\n\n\t if (addressAndZone[1] === '') {\n\t // the second part must not be empty\n\t return false;\n\t }\n\t }\n\n\t var blocks = addressAndZone[0].split(':');\n\t var foundOmissionBlock = false; // marker to indicate ::\n\t // At least some OS accept the last 32 bits of an IPv6 address\n\t // (i.e. 2 of the blocks) in IPv4 notation, and RFC 3493 says\n\t // that '::ffff:a.b.c.d' is valid for IPv4-mapped IPv6 addresses,\n\t // and '::a.b.c.d' is deprecated, but also valid.\n\n\t var foundIPv4TransitionBlock = isIP(blocks[blocks.length - 1], 4);\n\t var expectedNumberOfBlocks = foundIPv4TransitionBlock ? 7 : 8;\n\n\t if (blocks.length > expectedNumberOfBlocks) {\n\t return false;\n\t } // initial or final ::\n\n\n\t if (str === '::') {\n\t return true;\n\t } else if (str.substr(0, 2) === '::') {\n\t blocks.shift();\n\t blocks.shift();\n\t foundOmissionBlock = true;\n\t } else if (str.substr(str.length - 2) === '::') {\n\t blocks.pop();\n\t blocks.pop();\n\t foundOmissionBlock = true;\n\t }\n\n\t for (var i = 0; i < blocks.length; ++i) {\n\t // test for a :: which can not be at the string start/end\n\t // since those cases have been handled above\n\t if (blocks[i] === '' && i > 0 && i < blocks.length - 1) {\n\t if (foundOmissionBlock) {\n\t return false; // multiple :: in address\n\t }\n\n\t foundOmissionBlock = true;\n\t } else if (foundIPv4TransitionBlock && i === blocks.length - 1) ; else if (!ipv6Block.test(blocks[i])) {\n\t return false;\n\t }\n\t }\n\n\t if (foundOmissionBlock) {\n\t return blocks.length >= 1;\n\t }\n\n\t return blocks.length === expectedNumberOfBlocks;\n\t }\n\n\t return false;\n\t}\n\n\tmodule.exports = exports.default;\n\tmodule.exports.default = exports.default;\n} (isIP, isIPExports));\n\n(function (module, exports) {\n\n\tObject.defineProperty(exports, \"__esModule\", {\n\t value: true\n\t});\n\texports.default = isEmail;\n\n\tvar _assertString = _interopRequireDefault(assertStringExports);\n\n\tvar _merge = _interopRequireDefault(mergeExports);\n\n\tvar _isByteLength = _interopRequireDefault(isByteLengthExports);\n\n\tvar _isFQDN = _interopRequireDefault(isFQDNExports);\n\n\tvar _isIP = _interopRequireDefault(isIPExports);\n\n\tfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\n\tfunction _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }\n\n\tfunction _nonIterableRest() { throw new TypeError(\"Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"); }\n\n\tfunction _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === \"string\") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === \"Object\" && o.constructor) n = o.constructor.name; if (n === \"Map\" || n === \"Set\") return Array.from(o); if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }\n\n\tfunction _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }\n\n\tfunction _iterableToArrayLimit(arr, i) { if (typeof Symbol === \"undefined\" || !(Symbol.iterator in Object(arr))) return; var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i[\"return\"] != null) _i[\"return\"](); } finally { if (_d) throw _e; } } return _arr; }\n\n\tfunction _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }\n\n\tvar default_email_options = {\n\t allow_display_name: false,\n\t require_display_name: false,\n\t allow_utf8_local_part: true,\n\t require_tld: true,\n\t blacklisted_chars: '',\n\t ignore_max_length: false\n\t};\n\t/* eslint-disable max-len */\n\n\t/* eslint-disable no-control-regex */\n\n\tvar splitNameAddress = /^([^\\x00-\\x1F\\x7F-\\x9F\\cX]+)<(.+)>$/i;\n\tvar emailUserPart = /^[a-z\\d!#\\$%&'\\*\\+\\-\\/=\\?\\^_`{\\|}~]+$/i;\n\tvar gmailUserPart = /^[a-z\\d]+$/;\n\tvar quotedEmailUser = /^([\\s\\x01-\\x08\\x0b\\x0c\\x0e-\\x1f\\x7f\\x21\\x23-\\x5b\\x5d-\\x7e]|(\\\\[\\x01-\\x09\\x0b\\x0c\\x0d-\\x7f]))*$/i;\n\tvar emailUserUtf8Part = /^[a-z\\d!#\\$%&'\\*\\+\\-\\/=\\?\\^_`{\\|}~\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF]+$/i;\n\tvar quotedEmailUserUtf8 = /^([\\s\\x01-\\x08\\x0b\\x0c\\x0e-\\x1f\\x7f\\x21\\x23-\\x5b\\x5d-\\x7e\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF]|(\\\\[\\x01-\\x09\\x0b\\x0c\\x0d-\\x7f\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF]))*$/i;\n\tvar defaultMaxEmailLength = 254;\n\t/* eslint-enable max-len */\n\n\t/* eslint-enable no-control-regex */\n\n\t/**\n\t * Validate display name according to the RFC2822: https://tools.ietf.org/html/rfc2822#appendix-A.1.2\n\t * @param {String} display_name\n\t */\n\n\tfunction validateDisplayName(display_name) {\n\t var trim_quotes = display_name.match(/^\"(.+)\"$/i);\n\t var display_name_without_quotes = trim_quotes ? trim_quotes[1] : display_name; // display name with only spaces is not valid\n\n\t if (!display_name_without_quotes.trim()) {\n\t return false;\n\t } // check whether display name contains illegal character\n\n\n\t var contains_illegal = /[\\.\";<>]/.test(display_name_without_quotes);\n\n\t if (contains_illegal) {\n\t // if contains illegal characters,\n\t // must to be enclosed in double-quotes, otherwise it's not a valid display name\n\t if (!trim_quotes) {\n\t return false;\n\t } // the quotes in display name must start with character symbol \\\n\n\n\t var all_start_with_back_slash = display_name_without_quotes.split('\"').length === display_name_without_quotes.split('\\\\\"').length;\n\n\t if (!all_start_with_back_slash) {\n\t return false;\n\t }\n\t }\n\n\t return true;\n\t}\n\n\tfunction isEmail(str, options) {\n\t (0, _assertString.default)(str);\n\t options = (0, _merge.default)(options, default_email_options);\n\n\t if (options.require_display_name || options.allow_display_name) {\n\t var display_email = str.match(splitNameAddress);\n\n\t if (display_email) {\n\t var display_name;\n\n\t var _display_email = _slicedToArray(display_email, 3);\n\n\t display_name = _display_email[1];\n\t str = _display_email[2];\n\n\t // sometimes need to trim the last space to get the display name\n\t // because there may be a space between display name and email address\n\t // eg. myname \n\t // the display name is `myname` instead of `myname `, so need to trim the last space\n\t if (display_name.endsWith(' ')) {\n\t display_name = display_name.substr(0, display_name.length - 1);\n\t }\n\n\t if (!validateDisplayName(display_name)) {\n\t return false;\n\t }\n\t } else if (options.require_display_name) {\n\t return false;\n\t }\n\t }\n\n\t if (!options.ignore_max_length && str.length > defaultMaxEmailLength) {\n\t return false;\n\t }\n\n\t var parts = str.split('@');\n\t var domain = parts.pop();\n\t var user = parts.join('@');\n\t var lower_domain = domain.toLowerCase();\n\n\t if (options.domain_specific_validation && (lower_domain === 'gmail.com' || lower_domain === 'googlemail.com')) {\n\t /*\n\t Previously we removed dots for gmail addresses before validating.\n\t This was removed because it allows `multiple..dots@gmail.com`\n\t to be reported as valid, but it is not.\n\t Gmail only normalizes single dots, removing them from here is pointless,\n\t should be done in normalizeEmail\n\t */\n\t user = user.toLowerCase(); // Removing sub-address from username before gmail validation\n\n\t var username = user.split('+')[0]; // Dots are not included in gmail length restriction\n\n\t if (!(0, _isByteLength.default)(username.replace('.', ''), {\n\t min: 6,\n\t max: 30\n\t })) {\n\t return false;\n\t }\n\n\t var _user_parts = username.split('.');\n\n\t for (var i = 0; i < _user_parts.length; i++) {\n\t if (!gmailUserPart.test(_user_parts[i])) {\n\t return false;\n\t }\n\t }\n\t }\n\n\t if (options.ignore_max_length === false && (!(0, _isByteLength.default)(user, {\n\t max: 64\n\t }) || !(0, _isByteLength.default)(domain, {\n\t max: 254\n\t }))) {\n\t return false;\n\t }\n\n\t if (!(0, _isFQDN.default)(domain, {\n\t require_tld: options.require_tld\n\t })) {\n\t if (!options.allow_ip_domain) {\n\t return false;\n\t }\n\n\t if (!(0, _isIP.default)(domain)) {\n\t if (!domain.startsWith('[') || !domain.endsWith(']')) {\n\t return false;\n\t }\n\n\t var noBracketdomain = domain.substr(1, domain.length - 2);\n\n\t if (noBracketdomain.length === 0 || !(0, _isIP.default)(noBracketdomain)) {\n\t return false;\n\t }\n\t }\n\t }\n\n\t if (user[0] === '\"') {\n\t user = user.slice(1, user.length - 1);\n\t return options.allow_utf8_local_part ? quotedEmailUserUtf8.test(user) : quotedEmailUser.test(user);\n\t }\n\n\t var pattern = options.allow_utf8_local_part ? emailUserUtf8Part : emailUserPart;\n\t var user_parts = user.split('.');\n\n\t for (var _i2 = 0; _i2 < user_parts.length; _i2++) {\n\t if (!pattern.test(user_parts[_i2])) {\n\t return false;\n\t }\n\t }\n\n\t if (options.blacklisted_chars) {\n\t if (user.search(new RegExp(\"[\".concat(options.blacklisted_chars, \"]+\"), 'g')) !== -1) return false;\n\t }\n\n\t return true;\n\t}\n\n\tmodule.exports = exports.default;\n\tmodule.exports.default = exports.default;\n} (isEmail$1, isEmailExports));\n\nvar isEmail = /*@__PURE__*/getDefaultExportFromCjs(isEmailExports);\n\n/** returns `null` if valid and error object if not */\nconst validateEmail = (validation, \n/** Id to identify the question */\nquestionId, value, touched = false, \n/** Validate empty values (default `false`) */\nvalidateEmptyValue = false) => {\n if ((!value && !validateEmptyValue) ||\n !validation ||\n !touched ||\n validation?.type !== 'EMAIL') {\n return null;\n }\n const { errorMessage } = validation;\n if (!isEmail(value)) {\n return createValidationError(validation.type, errorMessage, questionId);\n }\n return null;\n};\n/** Validates `valueToValidate` as email and returns an `QuestionError` or `null` (valid) */\nconst checkValueEmailFormat = (question, valueToValidate = '', touched = false, validateEmptyValue = false) => {\n if (question.validation === undefined ||\n (!valueToValidate && !validateEmptyValue) ||\n question.validation?.type !== 'EMAIL') {\n return null; // questionType does not support validation\n }\n const valueAsArray = Array.isArray(valueToValidate)\n ? valueToValidate\n : [valueToValidate];\n const errors = valueAsArray\n .map((value) => {\n return validateEmail(question.validation, question.id, value || '', touched, validateEmptyValue);\n })\n .filter(notNull);\n return errors.length > 0 ? errors[0] : null;\n};\n\nconst isResponseValueArray = (value) => {\n return (Array.isArray(value) &&\n !value.some((v) => typeof v !== 'object' || !('id' in v) || !('value' in v)) // no invalid element in array\n );\n};\n/** If there is a selected other type `ANSWER` input make sure it is not empty. */\nconst hasEmptyOtherAnswer = (value) => {\n return value.some((v) => v.type === 'ANSWER' && v.value === '') ?? false;\n};\n/** Check for type `ALL` */\nconst hasTypeAllValidationError = (value, choiceCount) => {\n // handle `ALL` for choice answers with more than 1 choice\n return typeof choiceCount !== 'number' || value.length !== choiceCount;\n};\n/** Special case for ImageChoice that does not require all options to be selected for `ALL`, but only at least 1 */\nconst hasTypeAllValidationErrorWithoutRangeSelection = (value) => {\n return value.length < 1;\n};\n/** Check for type `AT_LEAST` */\nconst hasTypeAtLeastValidationError = (value, { min }) => {\n if (typeof min !== 'number') {\n return true; // invalid value or min value\n }\n return value.length < min;\n};\n/** Check for type `AT_MOST` */\nconst hasTypeAtMostValidationError = (value, { max }) => {\n if (typeof max !== 'number') {\n return true; // invalid value or max value\n }\n return value.length < 1 || value.length > max;\n};\n/** Check for type `EXACTLY` */\nconst hasTypeExactlyValidationError = (value, { min, max }) => {\n if (typeof min !== 'number' || typeof max !== 'number' || min !== max) {\n return true; // invalid value or or min/max value\n }\n return value.length !== min;\n};\n/** Check for type `RANGE` */\nconst hasTypeRangeValidationError = (value, { min, max }) => {\n if (typeof min !== 'number' || typeof max !== 'number') {\n return true; // invalid value or min/max value\n }\n return value.length < min || value.length > max;\n};\n/** returns `null` if valid and error object if not */\nconst validateRequired = (required, \n/** Id to identify the question */\nquestionId, value, touched, \n/** Number of answers - only needed for type `ALL` validation of choice answers */\nchoiceCount = 1, \n/** Error message to return when the answer checked but left blank */\notherRequiredErrorText = '', \n/** for ImageChoice or other questions where `ALL` does not require all choices to be selected */\nnoRangeValidation = false) => {\n if (!touched || !required) {\n return null;\n }\n if (!isResponseValueArray(value)) {\n // invalid value format\n return createValidationError('REQUIRED', required.errorMessage, questionId);\n }\n let hasError = false;\n switch (required.type) {\n case 'ALL':\n if (noRangeValidation) {\n hasError = hasTypeAllValidationErrorWithoutRangeSelection(value);\n }\n else {\n hasError = hasTypeAllValidationError(value, choiceCount);\n }\n break;\n case 'AT_LEAST':\n hasError = hasTypeAtLeastValidationError(value, required);\n break;\n case 'AT_MOST':\n hasError = hasTypeAtMostValidationError(value, required);\n break;\n case 'EXACTLY':\n hasError = hasTypeExactlyValidationError(value, required);\n break;\n case 'RANGE':\n hasError = hasTypeRangeValidationError(value, required);\n break;\n }\n if (hasError) {\n return createValidationError('REQUIRED', required.errorMessage, questionId);\n }\n if (hasEmptyOtherAnswer(value)) {\n // empty other text field\n return createValidationError('REQUIRED', otherRequiredErrorText, questionId);\n }\n return null;\n};\n/** Predicate to filter visible answers */\nconst isVisible = (someKindOfAnswer) => someKindOfAnswer.visible !== false;\nconst requiredCount = ({ answers, answersImage, answersWeighted, fieldSets, isForcedRanking, }) => {\n // if matrix forced ranking is required all the amount of columns and rows needs to be determined and the lowest value is used for validation\n if (isForcedRanking === true) {\n const fieldSetsCount = fieldSets?.filter(isVisible)?.length || 0;\n const answersWeightedCount = answersWeighted?.filter(isVisible)?.length || 0;\n return Math.min(fieldSetsCount, answersWeightedCount);\n }\n return (answers?.filter(isVisible)?.length ??\n answersImage?.filter(isVisible)?.length ??\n fieldSets?.filter(isVisible)?.length ??\n answersWeighted?.filter(isVisible)?.length);\n};\n/** Validates `valueToValidate` for text-length and returns an `QuestionError` or `null` (valid) */\nconst checkValueRequired = (question, valueToValidate, touched) => {\n if (!question.required) {\n return null; // questionType does not support validation or question is not touched\n }\n /** Number of answers - only needed for type `ALL` validation of choice answers */\n let total;\n const answerCount = requiredCount(question);\n if (question.required.type === 'ALL' && answerCount) {\n total = answerCount;\n if (total && question.answerOther?.type === 'ANSWER') {\n // answer other choice counts too (comment does not)\n total += 1;\n }\n // `ALL` is not available when NOTA is selected except in Matrix Forced ranking/ this functionality is to match production\n if (total &&\n question.isForcedRanking &&\n question.answerNoneOfTheAbove?.visible !== false) {\n total += 1;\n }\n }\n /** questions where `required.type === ALL` requires all choices to be selected */\n const allChoicesRequired = ['check_box', 'date_time', 'matrix'].includes(question.typeId) ||\n question.variant === 'MANY_ANSWERS_IMAGE';\n return validateRequired(question.required, question.id, valueToValidate, touched, total, question.answerOther?.requiredErrorText, !allChoicesRequired);\n};\n/** Helper for question-types that only validate require */\nconst standAloneRequiredValidator = (question, valueToValidate, touched) => {\n const valueError = checkValueRequired(question, valueToValidate, touched);\n return valueError === null ? null : [valueError];\n};\n\n/** Array of all validators needed to validate the content of openEnded\n * text inputs (SingleTextbox, `other`, `answerOther`) */\nconst openEndedValidators = [\n checkValueTextLength,\n checkValueNumericalFormat,\n checkValueDateFormat,\n checkValueEmailFormat,\n];\n/** Array of all validators needed to validate the\n * contents of multiple text inputs (MultipleTextbox) */\nconst openEndedMultipleValueValidators = [\n checkValueNumericalFormat,\n checkMultipleValueNumericalSum,\n checkValueTextLength,\n checkValueDateFormat,\n checkValueEmailFormat,\n];\n\nconst checkSelectedAnswerOtherRequired = (question, valueToValidate, _touched) => {\n return !valueToValidate.length\n ? createValidationError('REQUIRED', question.answerOther?.requiredErrorText, question.id)\n : null;\n};\n/**\n *\n * Generic validation for components with an single string value (OpenEnded Questions types).\n *\n * E.g. SingleTextbox or CommentBox\n *\n * @returns {QuestionError[] | null} `null` means there is no error - `QuestionError[]` will never be an empty array\n */\nconst validateRespondentSurveyOpenEndedQuestion = (q, answer, touched) => {\n const valueErrors = [\n checkValueRequired(q, answer, touched),\n ];\n const otherErrors = runValidators(openEndedValidators, q, answer[0]?.value, touched) ?? [];\n return [...valueErrors, ...otherErrors].filter(notNull) ?? null;\n};\n/**\n *\n * Generic validation for components with multiple response values\n *\n * E.g. MultipleTextbox\n *\n * @returns {QuestionError[] | null} `null` means there is no error - `QuestionError[]` will never be an empty array\n */\nconst validateRespondentSurveyMultipleOpenEndedQuestion = (q, answers, touched) => {\n const valueErrors = [\n checkValueRequired(q, answers, touched),\n ];\n const answerValues = answers.map((answer) => answer.value);\n const otherErrors = runValidators(openEndedMultipleValueValidators, q, answerValues, touched) ??\n [];\n return [...valueErrors, ...otherErrors].filter(notNull) ?? null;\n};\n/**\n * Generic validation for components with an single or multiples selections and an (optional) _other_ (`COMMENT` or `ANSWER`) or _None of the Above_ (`NOTA`) option.\n *\n * E.g. Checkboxes, Dropdown or MultipleChoice\n *\n * @returns {QuestionError[] | null} `null` means there is no error - `QuestionError[]` will never be an empty array\n */\nconst validateRespondentSurveySelectionAndOtherValue = (q, answer, touched) => {\n /** Regular answers, other type 'ANSWER' and 'None of the above' */\n const selectedChoices = answer.filter((a) => !a.type || ['NOTA', 'ANSWER'].includes(a.type));\n /** Any type of 'other' answer */\n const otherValue = answer.find((a) => a.type && a.type !== 'NOTA');\n const valueErrors = [checkValueRequired(q, selectedChoices, touched)].filter(notNull); // required check for question, if there is no answer\n const hasRequiredAnswerError = valueErrors.length > 0;\n if (!q.answerOther && !q.answerComment) {\n // no other option so we can return here\n return !hasRequiredAnswerError ? null : valueErrors;\n }\n /**\n * Selected Other-Answer requires a non-empty value (regardless of validation or require)\n */\n const selectedAnswerOtherRequiredError = [\n otherValue?.type === 'ANSWER'\n ? checkSelectedAnswerOtherRequired(q, otherValue?.value)\n : null,\n ];\n const returnValueErrors = [\n ...valueErrors,\n ...selectedAnswerOtherRequiredError,\n ...(runValidators(openEndedValidators, q, otherValue?.value, touched, otherValue?.type === 'ANSWER') || []),\n ].filter(notNull);\n return returnValueErrors.length > 0 ? returnValueErrors : null;\n};\n\nconst singleTextboxQuestionDefinition = {\n typeId: typeId$g,\n fromExternalQuestion: fromExternalQuestion$g,\n toExternalQuestion: toExternalQuestion$g,\n isOfQuestionType: isOfQuestionType$g,\n isCompatible: isCompatible$g,\n};\n\nconst baseGuards$c = baseQuestionGuards('multiple_textbox', 'OPEN_ENDED', 'MANY_FIELDS');\nconst isQuestionTypeMultipleTextbox = typeGuard(baseGuards$c);\n/**\n * Basic guard to determine question type\n *\n * throws an error when the question does not meet all the type requirements.\n */\nfunction assertQuestionTypeMultipleTextbox(q) {\n return typeAssertion(baseGuards$c)(q);\n}\n\nconst mapFromExternalQuestion$f = (externalQuestion, capability) => {\n const questionType = mapDynamic({\n typeId: 'multiple_textbox',\n externalQuestion,\n capability,\n });\n assertQuestionTypeMultipleTextbox(questionType);\n return questionType;\n};\n\nconst typeId$f = 'multiple_textbox';\nconst fromExternalQuestion$f = (source, capability) => mapFromExternalQuestion$f(source, capability);\nconst toExternalQuestion$f = (eq, q, capability) => mapInternalDynamicToExternal(eq);\nconst isCompatible$f = (q) => isCompatible$h(q, typeId$f);\nconst isOfQuestionType$f = isQuestionTypeMultipleTextbox;\n\nconst multipleTextboxQuestionDefinition = {\n typeId: typeId$f,\n fromExternalQuestion: fromExternalQuestion$f,\n toExternalQuestion: toExternalQuestion$f,\n isOfQuestionType: isOfQuestionType$f,\n isCompatible: isCompatible$f,\n};\n\n/// Type Guards\nconst baseGuards$b = baseQuestionGuards('comment_box', 'OPEN_ENDED', 'ESSAY');\nconst isQuestionTypeCommentBox = typeGuard(baseGuards$b);\n/**\n * Basic guard to determine question type\n *\n * throws an error when the question does not meet all the type requirements.\n */\nfunction assertQuestionTypeCommentBox(q) {\n return typeAssertion(baseGuards$b)(q);\n}\n\nconst mapFromExternalQuestion$e = (externalQuestion, capability) => {\n const questionType = mapDynamic({\n typeId: 'comment_box',\n externalQuestion,\n capability,\n });\n assertQuestionTypeCommentBox(questionType);\n return questionType;\n};\n\nconst typeId$e = 'comment_box';\nconst fromExternalQuestion$e = (source, capability) => mapFromExternalQuestion$e(source, capability);\nconst toExternalQuestion$e = (eq, q, capability) => mapInternalDynamicToExternal(eq);\nconst isCompatible$e = (q) => isCompatible$h(q, typeId$e);\nconst isOfQuestionType$e = isQuestionTypeCommentBox;\n\nconst commentBoxQuestionDefinition = {\n typeId: typeId$e,\n fromExternalQuestion: fromExternalQuestion$e,\n toExternalQuestion: toExternalQuestion$e,\n isCompatible: isCompatible$e,\n isOfQuestionType: isOfQuestionType$e,\n};\n\n/// Type Guards\nconst baseGuards$a = baseQuestionGuards('multiple_choice', 'MULTIPLE_CHOICE', 'SINGLE_ANSWER_RADIO');\nconst isQuestionValidationMultipleChoice = isFieldValidation;\nconst isQuestionTypeMultipleChoice = typeGuard(baseGuards$a);\n\nconst mapFromExternalQuestion$d = (externalQuestion, capability) => {\n const questionType = mapDynamic({\n typeId: 'multiple_choice',\n externalQuestion,\n capability,\n });\n return questionType;\n};\n\nconst typeId$d = 'multiple_choice';\nconst fromExternalQuestion$d = (source, capability) => mapFromExternalQuestion$d(source, capability);\nconst toExternalQuestion$d = (eq, q, capability) => mapInternalDynamicToExternal(eq);\nconst isCompatible$d = (q) => isCompatible$h(q, typeId$d);\nconst isOfQuestionType$d = isQuestionTypeMultipleChoice;\n\nconst multipleChoiceQuestionDefinition = {\n typeId: typeId$d,\n fromExternalQuestion: fromExternalQuestion$d,\n toExternalQuestion: toExternalQuestion$d,\n isCompatible: isCompatible$d,\n isOfQuestionType: isOfQuestionType$d,\n};\n\n// TypeGuards and Assertions\nconst baseGuards$9 = baseQuestionGuards('check_box', 'MULTIPLE_CHOICE', 'MANY_ANSWERS_CHECKBOX');\nconst isQuestionTypeCheckBox = typeGuard(baseGuards$9);\n/**\n * Basic guard to determine question type\n *\n * throws an error when the question does not meet all the type requirements.\n */\nfunction assertQuestionTypeCheckBox(externalQuestion) {\n return typeAssertion(baseGuards$9)(externalQuestion);\n}\n\nconst mapFromExternalQuestion$c = (externalQuestion, capability) => {\n const questionType = mapDynamic({\n typeId: 'check_box',\n externalQuestion,\n capability,\n });\n assertQuestionTypeCheckBox(questionType);\n return questionType;\n};\n\nconst typeId$c = 'check_box';\nconst fromExternalQuestion$c = (source, capability) => mapFromExternalQuestion$c(source, capability);\nconst toExternalQuestion$c = (eq, q, capability) => mapInternalDynamicToExternal(eq);\nconst isCompatible$c = (q) => isCompatible$h(q, typeId$c);\nconst isOfQuestionType$c = isQuestionTypeCheckBox;\n\nconst checkBoxQuestionDefinition = {\n typeId: typeId$c,\n fromExternalQuestion: fromExternalQuestion$c,\n toExternalQuestion: toExternalQuestion$c,\n isCompatible: isCompatible$c,\n isOfQuestionType: isOfQuestionType$c,\n};\n\nconst baseGuards$8 = baseQuestionGuards('dropdown', 'MULTIPLE_CHOICE', 'SINGLE_ANSWER_MENU');\nconst isQuestionTypeDropdown = typeGuard(baseGuards$8);\n/**\n * Basic guard to determine question type\n *\n * throws an error when the question does not meet all the type requirements.\n */\nfunction assertQuestionTypeDropdown(externalQuestion) {\n return typeAssertion(baseGuards$8)(externalQuestion);\n}\n\nconst mapFromExternalQuestion$b = (externalQuestion, capability) => {\n const questionType = mapDynamic({\n typeId: 'dropdown',\n externalQuestion,\n capability,\n });\n assertQuestionTypeDropdown(questionType);\n return questionType;\n};\n\nconst typeId$b = 'dropdown';\nconst fromExternalQuestion$b = (source, capability) => mapFromExternalQuestion$b(source, capability);\nconst toExternalQuestion$b = (eq, q, capability) => mapInternalDynamicToExternal(eq);\nconst isCompatible$b = (q) => isCompatible$h(q, typeId$b);\nconst isOfQuestionType$b = isQuestionTypeDropdown;\n\nconst dropdownQuestionDefinition = {\n typeId: typeId$b,\n fromExternalQuestion: fromExternalQuestion$b,\n toExternalQuestion: toExternalQuestion$b,\n isCompatible: isCompatible$b,\n isOfQuestionType: isOfQuestionType$b,\n};\n\nconst baseGuards$7 = baseQuestionGuards('image_choice', 'MULTIPLE_CHOICE', 'SINGLE_ANSWER_IMAGE');\nconst isQuestionTypeImageChoice = typeGuard({\n ...baseGuards$7,\n /* To reduce code duplication, we assume the discrepancies between\n * \"single answer\" and \"many answers\" question types are limited to \"typeId\" and \"variant\".\n */\n typeId: isFixed('image_choice'),\n variant: isEither([\n isFixed('SINGLE_ANSWER_IMAGE'),\n isFixed('MANY_ANSWERS_IMAGE'),\n ]),\n});\n/**\n * Basic guard to determine question type\n *\n * throws an error when the question does not meet all the type requirements.\n */\nfunction assertQuestionTypeImageChoice(q) {\n return typeAssertion(isQuestionTypeImageChoice)(q);\n}\n\nconst mapFromExternalQuestion$a = (externalQuestion, capability) => {\n const questionType = mapDynamic({\n typeId: 'image_choice',\n externalQuestion,\n capability,\n });\n assertQuestionTypeImageChoice(questionType);\n return questionType;\n};\n\nconst typeId$a = 'image_choice';\nconst fromExternalQuestion$a = (source, capability) => mapFromExternalQuestion$a(source, capability);\nconst toExternalQuestion$a = (eq, q, capability) => mapInternalDynamicToExternal(eq);\nconst isCompatible$a = (q) => isCompatible$h(q, typeId$a);\nconst isOfQuestionType$a = isQuestionTypeImageChoice;\n\nconst imageChoiceQuestionDefinition = {\n typeId: typeId$a,\n fromExternalQuestion: fromExternalQuestion$a,\n toExternalQuestion: toExternalQuestion$a,\n isCompatible: isCompatible$a,\n isOfQuestionType: isOfQuestionType$a,\n};\n\nconst baseGuards$6 = baseQuestionGuards('slider', 'SLIDER', 'SINGLE_SLIDER');\nconst isQuestionTypeSlider = typeGuard(baseGuards$6);\n/**\n * Basic guard to determine question type\n *\n * throws an error when the question does not meet all the type requirements.\n */\nfunction assertQuestionTypeSlider(externalQuestion) {\n return typeAssertion(baseGuards$6)(externalQuestion);\n}\n\nconst mapFromExternalQuestion$9 = (externalQuestion, capability) => {\n const questionType = mapDynamic({\n typeId: 'slider',\n externalQuestion,\n capability,\n });\n assertQuestionTypeSlider(questionType);\n return questionType;\n};\n\nconst typeId$9 = 'slider';\nconst isCompatible$9 = (q) => isCompatible$h(q, typeId$9);\nconst isOfQuestionType$9 = isQuestionTypeSlider;\nconst fromExternalQuestion$9 = (source, capability) => mapFromExternalQuestion$9(source, capability);\nconst toExternalQuestion$9 = (eq, q, capability) => mapInternalDynamicToExternal(eq);\n\nconst sliderQuestionDefinition = {\n typeId: typeId$9,\n fromExternalQuestion: fromExternalQuestion$9,\n toExternalQuestion: toExternalQuestion$9,\n isCompatible: isCompatible$9,\n isOfQuestionType: isOfQuestionType$9,\n};\n\nconst baseStarRatingMatrixGuards = baseQuestionGuards('star_rating', 'MATRIX', 'RATING');\nconst baseStarRatingScaleGuards = baseQuestionGuards('star_rating', 'RATING_SCALE', 'SINGLE_ANSWER_SYMBOL');\nconst isQuestionTypeStarRatingMatrix = typeGuard(baseStarRatingMatrixGuards);\nconst isQuestionTypeStarRatingScale = typeGuard(baseStarRatingScaleGuards);\nconst isQuestionTypeStarRating = isEither([isQuestionTypeStarRatingMatrix, isQuestionTypeStarRatingScale]);\n/**\n * Basic guard to determine question type\n *\n * throws an error when the question does not meet all the type requirements.\n */\nfunction assertQuestionTypeStarRating(externalQuestion) {\n return typeAssertion(isQuestionTypeStarRating)(externalQuestion);\n}\n\nconst mapFromExternalQuestion$8 = (externalQuestion, capability) => {\n const questionType = mapDynamic({\n typeId: 'star_rating',\n externalQuestion,\n capability,\n });\n assertQuestionTypeStarRating(questionType);\n return questionType;\n};\n\nconst typeId$8 = 'star_rating';\nconst isCompatible$8 = (q) => isCompatible$h(q, typeId$8);\nconst isOfQuestionType$8 = isQuestionTypeStarRating;\nconst fromExternalQuestion$8 = (source, capability) => mapFromExternalQuestion$8(source, capability);\nconst toExternalQuestion$8 = (eq, q, capability) => mapInternalDynamicToExternal(eq);\n\nconst starRatingQuestionDefinition = {\n typeId: typeId$8,\n fromExternalQuestion: fromExternalQuestion$8,\n toExternalQuestion: toExternalQuestion$8,\n isCompatible: isCompatible$8,\n isOfQuestionType: isOfQuestionType$8,\n};\n\nconst baseSingleAnswerGuards = baseQuestionGuards('matrix', 'MATRIX', 'SINGLE_ANSWER_RADIO');\nconst baseManyAnswersGuards = baseQuestionGuards('matrix', 'MATRIX', 'MANY_ANSWERS_CHECKBOX');\nconst baseRatingScaleGuards = baseQuestionGuards('matrix', 'RATING_SCALE', 'SINGLE_ANSWER_RADIO');\nconst isQuestionTypeMatrixSingleAnswer = typeGuard(baseSingleAnswerGuards);\nconst isQuestionTypeMatrixManyAnswers = typeGuard(baseManyAnswersGuards);\nconst isQuestionTypeMatrixRatingScale = typeGuard(baseRatingScaleGuards);\nconst isQuestionTypeMatrix = isEither([\n isQuestionTypeMatrixSingleAnswer,\n isQuestionTypeMatrixManyAnswers,\n isQuestionTypeMatrixRatingScale,\n]);\n/**\n * Basic guard to determine question type\n *\n * throws an error when the question does not meet all the type requirements.\n */\nfunction assertQuestionTypeMatrix(externalQuestion) {\n // TODO: Refactor for better error messages\n if (!isQuestionTypeMatrix(externalQuestion)) {\n throw new Error('Question data does not match any supported question type.');\n }\n}\n\nconst mapFromExternalQuestion$7 = (externalQuestion, capability) => {\n const questionType = mapDynamic({\n typeId: 'matrix',\n externalQuestion,\n capability,\n });\n assertQuestionTypeMatrix(questionType);\n return questionType;\n};\n\nconst typeId$7 = 'matrix';\nconst isCompatible$7 = (q) => isCompatible$h(q, typeId$7);\nconst isOfQuestionType$7 = isQuestionTypeMatrix;\nconst fromExternalQuestion$7 = (source, capability) => mapFromExternalQuestion$7(source, capability);\nconst toExternalQuestion$7 = (eq, q, capability) => mapInternalDynamicToExternal(eq);\n\n// Refine this implementation once we implement this question-type\nconst matrixRespondentSurveyValidation = (q, answer, touched) => {\n // Required validation for Matrix only work per-row,\n // there is no difference wether there is one or more columns selected,\n // so we can extract the first value (i.e. the columnId) and\n // use`validateRespondentSurveySelectionAndOtherValue` as other validations\n const flattenedValues = answer\n .map(({ value, ...rest }) => ({\n ...rest,\n value: typeof value === 'string' ? value : value.find((v) => !!v.value)?.value,\n }))\n .filter((a) => !!a.value);\n return validateRespondentSurveySelectionAndOtherValue(q, flattenedValues, touched);\n};\n\nconst matrixQuestionDefinition = {\n typeId: typeId$7,\n fromExternalQuestion: fromExternalQuestion$7,\n toExternalQuestion: toExternalQuestion$7,\n isOfQuestionType: isOfQuestionType$7,\n isCompatible: isCompatible$7,\n};\n\nconst baseGuards$5 = baseQuestionGuards('matrix_dropdown', 'MATRIX', 'MENU');\nconst isQuestionTypeMatrixDropdown = typeGuard(baseGuards$5);\n/**\n * Basic guard to determine question type\n *\n * throws an error when the question does not meet all the type requirements.\n */\nfunction assertQuestionTypeMatrixDropdown(externalQuestion) {\n return typeAssertion(baseGuards$5)(externalQuestion);\n}\n\nconst mapFromExternalQuestion$6 = (externalQuestion, capability) => {\n const questionType = mapDynamic({\n typeId: 'matrix_dropdown',\n externalQuestion,\n capability,\n });\n assertQuestionTypeMatrixDropdown(questionType);\n return questionType;\n};\n\nconst typeId$6 = 'matrix_dropdown';\nconst fromExternalQuestion$6 = (source, capability) => mapFromExternalQuestion$6(source, capability);\nconst toExternalQuestion$6 = (eq, q, capability) => mapInternalDynamicToExternal(eq);\nconst isCompatible$6 = (q) => isCompatible$h(q, typeId$6);\nconst isOfQuestionType$6 = isQuestionTypeMatrixDropdown;\n\n// Refine this implementation once we implement this question-type\nconst matrixDropdownRespondentSurveyValidation = (q, answer, touched) => {\n // Required validation for MatrixDropdown only work per-row,\n // there is no difference wether there is one or more columns selected,\n // so we can extract the first value (i.e. the columnId) and\n // use`validateRespondentSurveySelectionAndOtherValue` as other validations\n const flattenedValues = answer\n .map(({ value, ...rest }) => ({\n ...rest,\n value: typeof value === 'string' ? value : value.find((v) => !!v.value)?.value,\n }))\n .filter((a) => !!a.value);\n return validateRespondentSurveySelectionAndOtherValue(q, flattenedValues, touched);\n};\n\nconst matrixDropdownQuestionDefinition = {\n typeId: typeId$6,\n fromExternalQuestion: fromExternalQuestion$6,\n toExternalQuestion: toExternalQuestion$6,\n isOfQuestionType: isOfQuestionType$6,\n isCompatible: isCompatible$6,\n};\n\nconst baseGuards$4 = baseQuestionGuards('ranking', 'RANKING', 'SINGLE_ANSWER_RADIO');\nconst isQuestionTypeRanking = typeGuard(baseGuards$4);\n/**\n * Basic guard to determine question type\n *\n * throws an error when the question does not meet all the type requirements.\n */\nfunction assertQuestionTypeRanking(externalQuestion) {\n return typeAssertion(baseGuards$4)(externalQuestion);\n}\n\nconst mapFromExternalQuestion$5 = (externalQuestion, capability) => {\n const questionType = mapDynamic({\n typeId: 'ranking',\n externalQuestion,\n capability,\n });\n assertQuestionTypeRanking(questionType);\n return questionType;\n};\n\nconst typeId$5 = 'ranking';\nconst isCompatible$5 = (q) => isCompatible$h(q, typeId$5);\nconst isOfQuestionType$5 = isQuestionTypeRanking;\nconst fromExternalQuestion$5 = (source, capability) => mapFromExternalQuestion$5(source, capability);\nconst toExternalQuestion$5 = (eq, q, capability) => mapInternalDynamicToExternal(eq);\n\nconst rankingQuestionDefinition = {\n typeId: typeId$5,\n fromExternalQuestion: fromExternalQuestion$5,\n toExternalQuestion: toExternalQuestion$5,\n isCompatible: isCompatible$5,\n isOfQuestionType: isOfQuestionType$5,\n};\n\n/// Type Guards\nconst baseGuards$3 = baseQuestionGuards('nps', 'RATING_SCALE', 'NPS');\nconst isQuestionValidationNps = isFieldValidation;\nconst isQuestionTypeNps = typeGuard(baseGuards$3);\n\nconst mapFromExternalQuestion$4 = (externalQuestion, capability) => {\n const questionType = mapDynamic({\n typeId: 'nps',\n externalQuestion,\n capability,\n });\n return questionType;\n};\n\nconst typeId$4 = 'nps';\nconst fromExternalQuestion$4 = (source, capability) => mapFromExternalQuestion$4(source, capability);\nconst toExternalQuestion$4 = (eq, q, capability) => mapInternalDynamicToExternal(eq);\nconst isCompatible$4 = (q) => isCompatible$h(q, typeId$4);\nconst isOfQuestionType$4 = isQuestionTypeNps;\n\nconst npsQuestionDefinition = {\n typeId: typeId$4,\n fromExternalQuestion: fromExternalQuestion$4,\n toExternalQuestion: toExternalQuestion$4,\n isCompatible: isCompatible$4,\n isOfQuestionType: isOfQuestionType$4,\n};\n\n/// Type Guards\nconst baseDateTimeGuards = baseQuestionGuards('date_time', 'DATETIME', 'DATETIME');\nconst baseDateGuards = baseQuestionGuards('date_time', 'DATETIME', 'DATE');\nconst baseTimeGuards = baseQuestionGuards('date_time', 'DATETIME', 'TIME');\nconst isQuestionTypeDateTimeDateAndTime = typeGuard(baseDateTimeGuards);\nconst isQuestionTypeDateTimeDate = typeGuard(baseDateGuards);\nconst isQuestionTypeDateTimeTime = typeGuard(baseTimeGuards);\nconst isQuestionTypeDateTime = isEither([\n isQuestionTypeDateTimeDateAndTime,\n isQuestionTypeDateTimeDate,\n isQuestionTypeDateTimeTime,\n]);\n\nconst mapFromExternalQuestion$3 = (externalQuestion, capability) => {\n const questionType = mapDynamic({\n typeId: 'date_time',\n externalQuestion,\n capability,\n });\n return questionType;\n};\n\nconst typeId$3 = 'date_time';\nconst fromExternalQuestion$3 = (source, capability) => mapFromExternalQuestion$3(source, capability);\nconst toExternalQuestion$3 = (eq, q, capability) => mapInternalDynamicToExternal(eq);\nconst isCompatible$3 = (q) => isCompatible$h(q, typeId$3);\nconst isOfQuestionType$3 = isQuestionTypeDateTime;\n\n/**\n * Default error message token that need to be overwritten from consumers in\n * questions-ui to allow l10n.\n *\n * This is because other QuestionTypes' error messages are coming from the GraphAPI,\n * but the ones below are client-side only.\n */\nconst errorMessageTokens = {\n /** Incorrect or missing `date` input for `DATE_INTL`. To be replaced with localized: _Please provide date in dd/mm/yyyy format._ */\n dateIntl: 'ERROR_PROVIDE_DATE_INTL_FORMAT',\n /** Incorrect or missing `date` input for `DATE_US`. To be replaced with localized: _Please provide date in mm/dd/yyyy format._ */\n dateUs: 'ERROR_PROVIDE_DATE_US_FORMAT',\n /** Incorrect or missing `minute` input. To be replaced with localized: _Please enter hrs from 0 to 23._ */\n hour: 'ERROR_ENTER_HOURS',\n /** Incorrect or missing `minute` input. To be replaced with localized: _Please enter mins from 0 to 59.._ */\n minute: 'ERROR_ENTER_MINUTES',\n /** Incorrect or missing `period` selection. To be replaced with localized: _Please select AM/PM._ */\n period: 'ERROR_SELECT_PERIOD',\n};\nconst hasValidTime = ({ hour = '', minute = '', period, }) => hour.length > 0 && minute.length > 0 && ['AM', 'PM'].includes(period ?? '');\n/** Convert DateTime Answers to simple string representation for require check */\nconst dateTimeAnswerPayloadToString = ({ date, hour, minute, period }, variant) => {\n if (variant === 'DATE') {\n return date ?? '';\n }\n if (!hasValidTime({ hour, minute, period })) {\n // short-circuit to show error if time is not valid\n return '';\n }\n if (variant === 'TIME') {\n return `${hour}:${minute}${period}`;\n }\n if (!date) {\n return ''; // time without date is invalid\n }\n return `${date} ${hour}:${minute}${period}`;\n};\n/**\n * Flattens the answer values to string,\n * i.e. converts `ResponseValue[]` to `ResponseValue[]`\n */\nconst stringifyAnswerValues = (answers, variant) => answers\n .map((a) => ({\n ...a,\n value: dateTimeAnswerPayloadToString(a.value, variant),\n}))\n .filter((a) => a.value !== ''); // remove empty or invalid answers\n/** Validation logic for the time only */\nconst validateTimeFormat = (id, fieldId, type, hour, minute, period) => {\n const errors = [];\n const hourParsed = parseInt(hour || '', 10);\n const minParsed = parseInt(minute || '', 10);\n if (Number.isNaN(hourParsed) || hourParsed < 0 || hourParsed > 23) {\n errors.push(createValidationError(type, errorMessageTokens.hour, id, fieldId));\n }\n if (Number.isNaN(minParsed) || minParsed < 0 || minParsed > 59) {\n errors.push(createValidationError(type, errorMessageTokens.minute, id, fieldId));\n }\n if (period !== 'AM' && period !== 'PM') {\n errors.push(createValidationError(type, errorMessageTokens.period, id, fieldId));\n }\n return errors;\n};\n/**\n * Validates a single DateTime answer\n *\n * @returns `null` if valid and error object if not\n */\nconst checkValueFormat = (q, { date, hour, minute, period }, touched, fieldId) => {\n let errors = [];\n const { id, validation: { type }, variant, } = q;\n if ((variant === 'DATE' || variant === 'DATETIME') &&\n checkValueDateFormat(q, date, touched, true)) {\n errors.push(createValidationError(type, type === 'DATE_INTL'\n ? errorMessageTokens.dateIntl\n : errorMessageTokens.dateUs, id, fieldId));\n }\n if (variant === 'TIME' || variant === 'DATETIME') {\n errors = [\n ...errors,\n ...validateTimeFormat(id, fieldId, type, hour, minute, period),\n ];\n }\n return errors.length > 0 ? errors : null;\n};\n/**\n * Creates the validation function for DateTime component.\n *\n * This validation is unique as it needs additional error messages that are\n * not returned in the GraphAPI response, and therefore are provided as tokens\n * (see `errorMessageTokens`) here to get replaced in questions-ui as this it\n * the only package in SMQuestions with l18n support and it is not worth the\n * setup and maintenance overhead to enable it here just for that.\n *\n * @returns {QuestionError[] | null} `null` means there is no error - `QuestionError[]` will never be an empty array\n */\nconst dateTimeRespondentSurveyValidation = (q, answers, touched) => {\n const simplifiedAnswers = stringifyAnswerValues(answers, q.variant);\n const valueErrors = [\n checkValueRequired(q, simplifiedAnswers, touched),\n ];\n const dateFormatErrors = answers.reduce((acc, curr) => {\n const errors = checkValueFormat(q, curr.value, touched, curr.id);\n if (errors === null) {\n return acc;\n }\n return [...acc, ...errors];\n }, []);\n const errors = [...valueErrors, ...dateFormatErrors].filter(notNull);\n return errors.length > 0 ? errors : null;\n};\n\nconst dateTimeQuestionDefinition = {\n typeId: typeId$3,\n fromExternalQuestion: fromExternalQuestion$3,\n toExternalQuestion: toExternalQuestion$3,\n isCompatible: isCompatible$3,\n isOfQuestionType: isOfQuestionType$3,\n};\n\nconst baseGuards$2 = baseQuestionGuards('image_presentation', 'PRESENTATION', 'IMAGE');\nconst isQuestionTypeImagePresentation = typeGuard(baseGuards$2);\n/**\n * Basic guard to determine question type\n *\n * throws an error when the question does not meet all the type requirements.\n */\nfunction assertQuestionTypeImagePresentation(externalQuestion) {\n return typeAssertion(baseGuards$2)(externalQuestion);\n}\n\nconst mapFromExternalQuestion$2 = (externalQuestion, capability) => {\n const questionType = mapDynamic({\n typeId: 'image_presentation',\n externalQuestion,\n capability,\n });\n assertQuestionTypeImagePresentation(questionType);\n return questionType;\n};\n\nconst typeId$2 = 'image_presentation';\nconst fromExternalQuestion$2 = (source, capability) => mapFromExternalQuestion$2(source, capability);\nconst toExternalQuestion$2 = (eq, q, capability) => mapInternalDynamicToExternal(eq);\nconst isCompatible$2 = (q) => isCompatible$h(q, typeId$2);\nconst isOfQuestionType$2 = isQuestionTypeImagePresentation;\n\nconst imagePresentationQuestionDefinition = {\n typeId: typeId$2,\n fromExternalQuestion: fromExternalQuestion$2,\n toExternalQuestion: toExternalQuestion$2,\n isCompatible: isCompatible$2,\n isOfQuestionType: isOfQuestionType$2,\n};\n\nconst baseGuards$1 = baseQuestionGuards('text_presentation', 'PRESENTATION', 'TEXT');\nconst isQuestionTypeTextPresentation = typeGuard(baseGuards$1);\n/**\n * Basic guard to determine question type\n *\n * throws an error when the question does not meet all the type requirements.\n */\nfunction assertQuestionTypeTextPresentation(externalQuestion) {\n return typeAssertion(baseGuards$1)(externalQuestion);\n}\n\nconst mapFromExternalQuestion$1 = (externalQuestion, capability) => {\n const questionType = mapDynamic({\n typeId: 'text_presentation',\n externalQuestion,\n capability,\n });\n assertQuestionTypeTextPresentation(questionType);\n return questionType;\n};\n\nconst typeId$1 = 'text_presentation';\nconst fromExternalQuestion$1 = (source, capability) => mapFromExternalQuestion$1(source, capability);\nconst toExternalQuestion$1 = (eq, q, capability) => mapInternalDynamicToExternal(eq);\nconst isCompatible$1 = (q) => isCompatible$h(q, typeId$1);\nconst isOfQuestionType$1 = isQuestionTypeTextPresentation;\n\nconst textPresentationQuestionDefinition = {\n typeId: typeId$1,\n fromExternalQuestion: fromExternalQuestion$1,\n toExternalQuestion: toExternalQuestion$1,\n isCompatible: isCompatible$1,\n isOfQuestionType: isOfQuestionType$1,\n};\n\nconst baseGuards = baseQuestionGuards('file_upload', 'FILE_UPLOAD', 'FILE_UPLOAD');\nconst isQuestionTypeFileUpload = typeGuard({\n ...baseGuards,\n typeId: isFixed('file_upload'),\n variant: isEither([isFixed('FILE_UPLOAD')]),\n});\n/**\n * Basic guard to determine question type\n *\n * throws an error when the question does not meet all the type requirements.\n */\nfunction assertQuestionTypeFileUploads(q) {\n return typeAssertion(isQuestionTypeFileUpload)(q);\n}\n\nconst mapFromExternalQuestion = (externalQuestion, capability) => {\n const questionType = mapDynamic({\n typeId: 'file_upload',\n externalQuestion,\n capability,\n });\n assertQuestionTypeFileUploads(questionType);\n return questionType;\n};\n\nconst typeId = 'file_upload';\nconst fromExternalQuestion = (source, capability) => mapFromExternalQuestion(source, capability);\nconst toExternalQuestion = (eq, q, capability) => mapInternalDynamicToExternal(eq);\nconst isCompatible = (q) => isCompatible$h(q, typeId);\nconst isOfQuestionType = isQuestionTypeFileUpload;\n\nconst fileUploadQuestionDefinition = {\n typeId,\n fromExternalQuestion,\n toExternalQuestion,\n isCompatible,\n isOfQuestionType,\n};\n\nconst questionTypeDefinitionModules = [\n singleTextboxQuestionDefinition,\n multipleTextboxQuestionDefinition,\n commentBoxQuestionDefinition,\n multipleChoiceQuestionDefinition,\n checkBoxQuestionDefinition,\n imageChoiceQuestionDefinition,\n dropdownQuestionDefinition,\n sliderQuestionDefinition,\n starRatingQuestionDefinition,\n matrixQuestionDefinition,\n matrixDropdownQuestionDefinition,\n npsQuestionDefinition,\n fileUploadQuestionDefinition,\n dateTimeQuestionDefinition,\n rankingQuestionDefinition,\n imagePresentationQuestionDefinition,\n textPresentationQuestionDefinition,\n];\nconst findByType = (typeId) => (qd) => qd.typeId === typeId;\n/** Find the QuestionTypeDefinitionModule for `typeId` */\nconst pickQuestionTypeDefinition = (typeId) => {\n const res = questionTypeDefinitionModules.find(findByType(typeId));\n if (res === undefined) {\n throw new Error(`Unable to find module definition for type ${typeId}`);\n }\n return res;\n};\n/** Find a compatible QuestionTypeDefinitionModule for an external question */\nconst selectQuestionTypeDefinition = (q) => questionTypeDefinitionModules.find(({ isCompatible }) => isCompatible(q)) ??\n null;\n\n/// Aggregate Response Guard Helpers\n/// GQL Types that will be generated soon.\nconst isAggregateResponseHeaderItem = typeGuard({\n id: isString,\n label: isString,\n weight: isNullable(isNumber),\n});\nconst isAggregateResponseHeader = typeGuard({\n id: isString,\n items: isArrayOf(isAggregateResponseHeaderItem),\n});\nconst isAggregateResponseCell = typeGuard({\n rowItem: isNullable(isAggregateResponseHeaderItem),\n columnItem: isNullable(isAggregateResponseHeaderItem),\n groupItem: isNullable(isAggregateResponseHeaderItem),\n percentage: isOptional(isNumber),\n total: isNumber,\n});\nconst aggregateResponseBasicStatDimension = [\n 'ROWS',\n 'COLUMNS',\n 'GROUPS',\n];\nconst isAggregateResponseBasicStats = typeGuard({\n across: isNullable(isOneOf(aggregateResponseBasicStatDimension)),\n row: isNullable(isAggregateResponseHeaderItem),\n column: isNullable(isAggregateResponseHeaderItem),\n group: isNullable(isAggregateResponseHeaderItem),\n});\nconst isAggregateResponseOtherAnswerItem = typeGuard({\n text: isString,\n});\nconst isAggregateResponseOtherAnswer = typeGuard({\n title: isString,\n totalCount: isNumber,\n items: isArrayOf(isAggregateResponseOtherAnswerItem),\n});\n// One dimensional aggregate response\nconst isOneDimensionalAggregateResponseCell = typeGuard({\n rowItem: isAggregateResponseHeaderItem,\n columnItem: isNull,\n groupItem: isNull,\n percentage: isOptional(isNumber),\n total: isNumber,\n});\nconst isOneDimensionalAggregateResponse = typeGuard({\n id: isString,\n type: isFixed('ONE_D'),\n rowHeader: isAggregateResponseHeader,\n columnHeader: isNull,\n groupHeader: isNull,\n data: isArrayOf(isOneDimensionalAggregateResponseCell),\n otherAnswers: isOptional(isAggregateResponseOtherAnswer),\n stats: isArrayOf(isAggregateResponseBasicStats),\n});\n// Two dimensional aggregate response\nconst isTwoDimensionalAggregateResponseCell = typeGuard({\n rowItem: isAggregateResponseHeaderItem,\n columnItem: isAggregateResponseHeaderItem,\n groupItem: isNull,\n percentage: isOptional(isNumber),\n total: isNumber,\n});\nconst isTwoDimensionalAggregateResponse = typeGuard({\n id: isString,\n type: isFixed('TWO_D'),\n rowHeader: isAggregateResponseHeader,\n columnHeader: isAggregateResponseHeader,\n groupHeader: isNull,\n data: isArrayOf(isTwoDimensionalAggregateResponseCell),\n otherAnswers: isOptional(isAggregateResponseOtherAnswer),\n stats: isArrayOf(isAggregateResponseBasicStats),\n});\n// Three dimensional aggregate response\nconst isThreeDimensionalAggregateResponseCell = typeGuard({\n rowItem: isAggregateResponseHeaderItem,\n columnItem: isAggregateResponseHeaderItem,\n groupItem: isAggregateResponseHeaderItem,\n percentage: isOptional(isNumber),\n total: isNumber,\n});\nconst isThreeDimensionalAggregateResponse = typeGuard({\n id: isString,\n type: isFixed('THREE_D'),\n rowHeader: isAggregateResponseHeader,\n columnHeader: isAggregateResponseHeader,\n groupHeader: isAggregateResponseHeader,\n data: isArrayOf(isThreeDimensionalAggregateResponseCell),\n otherAnswers: isOptional(isAggregateResponseOtherAnswer),\n stats: isArrayOf(isAggregateResponseBasicStats),\n});\n// Transformed type guards\nconst isOneDimensionalChartData = typeGuard({\n id: isString,\n rowID: isString,\n rowLabel: isString,\n total: isNumber,\n percentage: isOptional(isNumber),\n});\nconst isTwoDimensionalData = typeGuard({\n columnID: isString,\n columnLabel: isString,\n data: isArrayOf(isOneDimensionalChartData),\n});\nconst isThreeDimensionalData = typeGuard({\n groupID: isString,\n groupLabel: isString,\n data: isArrayOf(isTwoDimensionalData),\n});\n\n/** Converts the external `family` and `variant` to the internally used `TypeId` */\nconst getTypeId = ({ family, variant, }) => {\n switch (family) {\n case 'OPEN_ENDED':\n switch (variant) {\n case 'SINGLE_LINE':\n return 'single_textbox';\n case 'ESSAY':\n return 'comment_box';\n case 'MANY_FIELDS':\n return 'multiple_textbox';\n default:\n return null;\n }\n case 'MULTIPLE_CHOICE':\n switch (variant) {\n case 'SINGLE_ANSWER_RADIO':\n return 'multiple_choice';\n case 'MANY_ANSWERS_CHECKBOX':\n return 'check_box';\n case 'SINGLE_ANSWER_IMAGE':\n case 'MANY_ANSWERS_IMAGE':\n return 'image_choice';\n case 'SINGLE_ANSWER_MENU':\n return 'dropdown';\n default:\n return null;\n }\n case 'SLIDER':\n switch (variant) {\n case 'SINGLE_SLIDER':\n return 'slider';\n default:\n return null;\n }\n case 'RATING_SCALE':\n switch (variant) {\n case 'SINGLE_ANSWER_SYMBOL':\n return 'star_rating';\n case 'SINGLE_ANSWER_RADIO':\n return 'matrix';\n case 'NPS':\n return 'nps';\n default:\n return null;\n }\n case 'MATRIX':\n switch (variant) {\n case 'SINGLE_ANSWER_RADIO':\n case 'MANY_ANSWERS_CHECKBOX':\n return 'matrix';\n case 'MENU':\n return 'matrix_dropdown';\n case 'RATING':\n return 'star_rating';\n default:\n return null;\n }\n case 'RANKING':\n switch (variant) {\n case 'SINGLE_ANSWER_RADIO':\n return 'ranking';\n default:\n return null;\n }\n case 'DATETIME':\n switch (variant) {\n case 'DATETIME':\n case 'DATE':\n case 'TIME':\n return 'date_time';\n default:\n return null;\n }\n case 'PRESENTATION':\n switch (variant) {\n case 'IMAGE':\n return 'image_presentation';\n case 'TEXT':\n return 'text_presentation';\n default:\n return null;\n }\n case 'FILE_UPLOAD': {\n switch (variant) {\n case 'FILE_UPLOAD':\n return 'file_upload';\n default:\n return null;\n }\n }\n default:\n return null;\n }\n};\n\nconst isExternalQuestionWithTypeId = typeGuard({\n typeId: isString,\n});\nfunction assertExternalQuestionWithIds(u) {\n return typeAssertion({ typeId: isString, id: isString })(u);\n}\n\nexport { SENTIMENTS, aggregateResponseBasicStatDimension, assertExternalQuestionWithIds, assertQuestionTypeCheckBox, assertQuestionTypeCommentBox, assertQuestionTypeDropdown, assertQuestionTypeFileUploads, assertQuestionTypeImageChoice, assertQuestionTypeImagePresentation, assertQuestionTypeMatrix, assertQuestionTypeMatrixDropdown, assertQuestionTypeMultipleTextbox, assertQuestionTypeRanking, assertQuestionTypeSingleTextbox, assertQuestionTypeSlider, assertQuestionTypeStarRating, assertQuestionTypeTextPresentation, baseQuestionGuards, checkBoxQuestionDefinition, validateRespondentSurveySelectionAndOtherValue as checkBoxRespondentSurveyValidation, commentBoxQuestionDefinition, validateRespondentSurveyOpenEndedQuestion as commentBoxRespondentSurveyValidation, dateTimeQuestionDefinition, dateTimeRespondentSurveyValidation, dropdownQuestionDefinition, validateRespondentSurveySelectionAndOtherValue as dropdownRespondentSurveyValidation, fileUploadQuestionDefinition, standAloneRequiredValidator as fileUploadRespondentSurveyValidation, fixedWidthOptions, getTypeId, imageChoiceQuestionDefinition, standAloneRequiredValidator as imageChoiceRespondentSurveyValidation, imagePresentationQuestionDefinition, isAggregateResponseCell, isAggregateResponseHeader, isAggregateResponseHeaderItem, isExternalQuestionWithTypeId, isOneDimensionalAggregateResponse, isOneDimensionalChartData, isQuestionError, isQuestionType, isQuestionTypeCheckBox, isQuestionTypeCommentBox, isQuestionTypeDateTime, isQuestionTypeDropdown, isQuestionTypeFileUpload, isQuestionTypeImageChoice, isQuestionTypeImagePresentation, isQuestionTypeMatrix, isQuestionTypeMatrixDropdown, isQuestionTypeMultipleChoice, isQuestionTypeMultipleTextbox, isQuestionTypeNps, isQuestionTypeRanking, isQuestionTypeSingleTextbox, isQuestionTypeSlider, isQuestionTypeStarRating, isQuestionTypeTextPresentation, isQuestionValidationMultipleChoice, isQuestionValidationNps, isThreeDimensionalAggregateResponse, isThreeDimensionalData, isTwoDimensionalAggregateResponse, isTwoDimensionalData, matrixDropdownQuestionDefinition, matrixDropdownRespondentSurveyValidation, matrixQuestionDefinition, matrixRespondentSurveyValidation, multipleChoiceQuestionDefinition, validateRespondentSurveySelectionAndOtherValue as multipleChoiceRespondentSurveyValidation, multipleTextboxQuestionDefinition, validateRespondentSurveyMultipleOpenEndedQuestion as multipleTextboxRespondentSurveyValidation, npsQuestionDefinition, standAloneRequiredValidator as npsRespondentSurveyValidation, pickQuestionTypeDefinition, questionTypeFamilies, questionTypeIds, questionTypeLayoutPlacements, questionTypeMultipleChoiceLayouts, questionTypeRequiredPredicateTypes, questionTypeSkipLogicDestinationTypes, questionTypeSkipLogicTypes, questionTypeSortingKinds, questionTypeValidationTypes, questionTypeVariants, rankingQuestionDefinition, standAloneRequiredValidator as rankingRespondentSurveyValidation, ratingScaleSymbols, relativeWidthOptions, selectQuestionTypeDefinition, singleTextboxQuestionDefinition, validateRespondentSurveyOpenEndedQuestion as singleTextboxRespondentSurveyValidation, sliderQuestionDefinition, validateRespondentSurveySelectionAndOtherValue as sliderRespondentSurveyValidation, starRatingQuestionDefinition, validateRespondentSurveySelectionAndOtherValue as starRatingRespondentSurveyValidation, textPresentationQuestionDefinition };\n//# sourceMappingURL=index.js.map\n","import * as React from 'react';\n\nfunction _setPrototypeOf(o, p) {\n _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) {\n o.__proto__ = p;\n return o;\n };\n return _setPrototypeOf(o, p);\n}\n\nfunction _inheritsLoose(subClass, superClass) {\n subClass.prototype = Object.create(superClass.prototype);\n subClass.prototype.constructor = subClass;\n _setPrototypeOf(subClass, superClass);\n}\n\nvar changedArray = function changedArray(a, b) {\n if (a === void 0) {\n a = [];\n }\n\n if (b === void 0) {\n b = [];\n }\n\n return a.length !== b.length || a.some(function (item, index) {\n return !Object.is(item, b[index]);\n });\n};\n\nvar initialState = {\n error: null\n};\n\nvar ErrorBoundary = /*#__PURE__*/function (_React$Component) {\n _inheritsLoose(ErrorBoundary, _React$Component);\n\n function ErrorBoundary() {\n var _this;\n\n for (var _len = arguments.length, _args = new Array(_len), _key = 0; _key < _len; _key++) {\n _args[_key] = arguments[_key];\n }\n\n _this = _React$Component.call.apply(_React$Component, [this].concat(_args)) || this;\n _this.state = initialState;\n _this.updatedWithError = false;\n\n _this.resetErrorBoundary = function () {\n var _this$props;\n\n for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {\n args[_key2] = arguments[_key2];\n }\n\n _this.props.onReset == null ? void 0 : (_this$props = _this.props).onReset.apply(_this$props, args);\n\n _this.reset();\n };\n\n return _this;\n }\n\n ErrorBoundary.getDerivedStateFromError = function getDerivedStateFromError(error) {\n return {\n error: error\n };\n };\n\n var _proto = ErrorBoundary.prototype;\n\n _proto.reset = function reset() {\n this.updatedWithError = false;\n this.setState(initialState);\n };\n\n _proto.componentDidCatch = function componentDidCatch(error, info) {\n var _this$props$onError, _this$props2;\n\n (_this$props$onError = (_this$props2 = this.props).onError) == null ? void 0 : _this$props$onError.call(_this$props2, error, info);\n };\n\n _proto.componentDidMount = function componentDidMount() {\n var error = this.state.error;\n\n if (error !== null) {\n this.updatedWithError = true;\n }\n };\n\n _proto.componentDidUpdate = function componentDidUpdate(prevProps) {\n var error = this.state.error;\n var resetKeys = this.props.resetKeys; // There's an edge case where if the thing that triggered the error\n // happens to *also* be in the resetKeys array, we'd end up resetting\n // the error boundary immediately. This would likely trigger a second\n // error to be thrown.\n // So we make sure that we don't check the resetKeys on the first call\n // of cDU after the error is set\n\n if (error !== null && !this.updatedWithError) {\n this.updatedWithError = true;\n return;\n }\n\n if (error !== null && changedArray(prevProps.resetKeys, resetKeys)) {\n var _this$props$onResetKe, _this$props3;\n\n (_this$props$onResetKe = (_this$props3 = this.props).onResetKeysChange) == null ? void 0 : _this$props$onResetKe.call(_this$props3, prevProps.resetKeys, resetKeys);\n this.reset();\n }\n };\n\n _proto.render = function render() {\n var error = this.state.error;\n var _this$props4 = this.props,\n fallbackRender = _this$props4.fallbackRender,\n FallbackComponent = _this$props4.FallbackComponent,\n fallback = _this$props4.fallback;\n\n if (error !== null) {\n var _props = {\n error: error,\n resetErrorBoundary: this.resetErrorBoundary\n };\n\n if ( /*#__PURE__*/React.isValidElement(fallback)) {\n return fallback;\n } else if (typeof fallbackRender === 'function') {\n return fallbackRender(_props);\n } else if (FallbackComponent) {\n return /*#__PURE__*/React.createElement(FallbackComponent, _props);\n } else {\n throw new Error('react-error-boundary requires either a fallback, fallbackRender, or FallbackComponent prop');\n }\n }\n\n return this.props.children;\n };\n\n return ErrorBoundary;\n}(React.Component);\n\nvar classnamesExports = {};\nvar classnames = {\n get exports(){ return classnamesExports; },\n set exports(v){ classnamesExports = v; },\n};\n\n/*!\n Copyright (c) 2018 Jed Watson.\n Licensed under the MIT License (MIT), see\n http://jedwatson.github.io/classnames\n*/\n\n(function (module) {\n\t/* global define */\n\n\t(function () {\n\n\t\tvar hasOwn = {}.hasOwnProperty;\n\n\t\tfunction classNames() {\n\t\t\tvar classes = [];\n\n\t\t\tfor (var i = 0; i < arguments.length; i++) {\n\t\t\t\tvar arg = arguments[i];\n\t\t\t\tif (!arg) continue;\n\n\t\t\t\tvar argType = typeof arg;\n\n\t\t\t\tif (argType === 'string' || argType === 'number') {\n\t\t\t\t\tclasses.push(arg);\n\t\t\t\t} else if (Array.isArray(arg)) {\n\t\t\t\t\tif (arg.length) {\n\t\t\t\t\t\tvar inner = classNames.apply(null, arg);\n\t\t\t\t\t\tif (inner) {\n\t\t\t\t\t\t\tclasses.push(inner);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t} else if (argType === 'object') {\n\t\t\t\t\tif (arg.toString === Object.prototype.toString) {\n\t\t\t\t\t\tfor (var key in arg) {\n\t\t\t\t\t\t\tif (hasOwn.call(arg, key) && arg[key]) {\n\t\t\t\t\t\t\t\tclasses.push(key);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\tclasses.push(arg.toString());\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn classes.join(' ');\n\t\t}\n\n\t\tif (module.exports) {\n\t\t\tclassNames.default = classNames;\n\t\t\tmodule.exports = classNames;\n\t\t} else {\n\t\t\twindow.classNames = classNames;\n\t\t}\n\t}());\n} (classnames));\n\nexport { ErrorBoundary as E };\n//# sourceMappingURL=vendor-1535a03e.js.map\n","import React__default from 'react';\nimport { E as ErrorBoundary } from './vendor-1535a03e.js';\nimport { createUseStyles } from 'react-jss';\nimport { defineMessages, t } from '@sm/intl';\n\nconst useStyles$1 = createUseStyles((theme) => ({\n wdsIcons: ({ color, size }) => {\n const fontSize = size\n ? { fontSize: theme.iconSize[size] }\n : { fontSize: 'inherit' };\n const chosenColor = \n // @ts-expect-error Fallback styles are acceptable\n theme.palette?.text[color] ||\n theme.palette?.[color]?.main ||\n 'currentColor';\n return {\n ...fontSize,\n width: '1em',\n height: '1em',\n display: 'inline-block',\n verticalAlign: 'middle',\n textAlign: 'center',\n fill: chosenColor,\n };\n },\n}));\n\n// https://reactjs.org/docs/higher-order-components.html#convention-wrap-the-display-name-for-easy-debugging\nconst getDisplayName = (Component) => Component.displayName || Component.name || 'Component';\nfunction withIcon(Component) {\n function WithIcon({ color, title, size, ...rest }) {\n const classes = useStyles$1({ color, size });\n return (React__default.createElement(\"svg\", { className: classes.wdsIcons, viewBox: \"0 0 16 16\", preserveAspectRatio: \"xMidYMid\", \"aria-label\": title, role: title ? 'img' : 'presentation', ...rest },\n React__default.createElement(Component, null)));\n }\n WithIcon.displayName = `WithIcon(${getDisplayName(Component)})`;\n WithIcon.getOriginalComponent = () => Component;\n return WithIcon;\n}\n\ncreateUseStyles({\n svgContainer: {\n display: 'inline-block',\n width: '1em',\n height: '1em',\n },\n});\n\nfunction DocumentXIconPath() {\n return (React__default.createElement(\"path\", { d: \"m5.94.005 8.012.012C14.53.018 15 .487 15 1.067V14.95c0 .58-.47 1.05-1.05 1.05H2.05C1.47 16 1 15.53 1 14.95V4.94L5.94.004zM7 1.505V4.95c0 .541-.41.987-.936 1.044L5.95 6H2.5v8.5h11V1.514L7 1.505zM6.557 7.53 8 8.973 9.443 7.53a.765.765 0 0 1 1.083 1.082l-1.444 1.443 1.444 1.444a.765.765 0 0 1-1.083 1.082L8 11.138 6.557 12.58A.765.765 0 1 1 5.474 11.5l1.444-1.444-1.444-1.443A.765.765 0 1 1 6.557 7.53zM5.5 2.563 3.561 4.5H5.5V2.562z\" }));\n}\nvar IconDocumentX = withIcon(DocumentXIconPath);\n\nconst useStyles = createUseStyles((theme) => {\n return {\n fallbackComponent: {\n fontFamily: theme.questionBody?.fontFamily ?? {},\n color: theme.questionColor,\n border: `1px solid ${theme.questionColor}`,\n borderRadius: '5px',\n width: '100%',\n height: '100%',\n minHeight: '220px',\n display: 'flex',\n justifyContent: 'center',\n alignItems: 'center',\n '& svg': {\n fill: theme.questionColor,\n },\n },\n errorMessage: {\n marginLeft: `8px`, // equivalent to wrench theme.spacing[2]\n },\n };\n});\n\nconst COPY = defineMessages({\n ERROR: {\n id: 'FallbackComponent.ERROR',\n defaultMessage: 'Error loading question',\n description: '[Type: label][Vis: high] - error message indicating a question could not be loaded',\n },\n});\nfunction FallbackComponent() {\n const { fallbackComponent, errorMessage } = useStyles();\n return (React__default.createElement(\"div\", { className: fallbackComponent },\n React__default.createElement(IconDocumentX, null),\n React__default.createElement(\"p\", { className: errorMessage }, t(COPY.ERROR))));\n}\n\nconst withErrorBoundary = (Component) => {\n const displayName = Component.displayName || Component.name || 'Component';\n function ComponentWithErrorBoundary(props) {\n return (React__default.createElement(ErrorBoundary, { FallbackComponent: FallbackComponent },\n React__default.createElement(Component, { ...props })));\n }\n ComponentWithErrorBoundary.displayName = `withErrorBoundary(${displayName})`;\n return ComponentWithErrorBoundary;\n};\n\nexport { FallbackComponent, withErrorBoundary };\n//# sourceMappingURL=helpers.js.map\n","/** Function that returns either white or black depending on which has higher contrast with the specified color */\nfunction contrastColor(color) {\n if (!color) {\n return '#000';\n }\n const rgb = color.match(/\\d+/g);\n if (!rgb) {\n return '#000';\n }\n const r = parseInt(rgb[0], 10);\n const g = parseInt(rgb[1], 10);\n const b = parseInt(rgb[2], 10);\n const yiq = (r * 299 + g * 587 + b * 114) / 1000;\n return yiq >= 128 ? '#000' : '#fff';\n}\n\nexport { contrastColor as c };\n//# sourceMappingURL=theme-22bba55b.js.map\n","import React from 'react';\nimport { createUseStyles, useTheme, createGenerateId, JssProvider, ThemeProvider } from 'react-jss';\nimport { useSurveyTheme } from '@sm/webassets/SurveyTheme/context';\n\nconst smFont = \"'National 2', 'Helvetica Neue', Helvetica, Arial, 'Hiragino Sans', 'Hiragino Kaku Gothic Pro', '游ゴシック', '游ゴシック体', YuGothic, 'Yu Gothic', 'MS ゴシック', 'MS Gothic', sans-serif\";\nconst grey = 'rgba(0,0,0,0.05)';\n/** SmQuestion specific augmentation to the SurveyTheme */\nconst themeAugmentation = {\n // Tokens - shared across all surveys\n fontFamily: smFont,\n fontSize: {\n body: 16,\n },\n fontWeight: {\n ultralight: 200,\n light: 300,\n regular: 400,\n medium: 500,\n bold: 700,\n },\n nextButton: {\n backgroundColor: '#00BF6F',\n color: '#FFFFFF',\n },\n input: {\n activeColor: '#00BF6F',\n // Light | Dark BG are shared across all surveys\n bgColor: grey,\n },\n border: {\n defaultColor: '#999',\n correctColor: '#00BF6F',\n wrongColor: '#F05B24',\n },\n correctAnswerHighlightColor: grey,\n};\n/**\n * Calculates highlight/selected color based on theme-properties\n * @see https://code.corp.surveymonkey.com/devmonkeys/smlib.surveytemplates/blob/6a4520867c756527c4ae4c0861b64e41ae3dd196/smlib/surveytemplates/themes_v3/base_css.jinja2#L249-L274\n * @param {SurveyThemeType} theme survey-theme object\n * @param {boolean} [isNps=true] use `nps` value (default true).\n * In the original, the current CSS always uses the nps value\n * @returns {string} the RGBA color value\n *\n * @todo move logic to @sm/webassets:SurveyTheme or direct theme-values\n */\nconst getQuestionHighlightColor = (theme, isNps = true) => {\n const titleColor = theme.titleColor?.replace(/\\s/g, '');\n // theme with dark background\n if (theme.isDark) {\n return isNps ? 'rgba(0,0,0,0.40)' : 'rgba(0,0,0,0.15)';\n }\n /**\n * Iceberg and Arctic Specs\n * @see https://momentiveai.atlassian.net/browse/ENT-3452\n *\n * @todo change to use `theme.name` when added to @sm/webassets\n */\n if (titleColor === 'rgba(5,70,126,1)') {\n // Arctic theme rgba of #c9f2f4\n return 'rgba(201,242,244,1)';\n }\n if (titleColor === 'rgba(0,0,96,1)') {\n // Iceberg theme rgba of #1fd8ea\n return 'rgba(31,216,234,1)';\n }\n return 'rgba(0,0,0,0.05)'; // Pastel theme\n};\n/** Augments `theme` with SmQuestion specific theme attributes */\nconst applySurveyThemeAugmentation = (theme) => {\n const questionHighlightColor = getQuestionHighlightColor(theme);\n return {\n ...themeAugmentation,\n nextButton: {\n backgroundColor: theme.primaryAccentColor ||\n themeAugmentation.nextButton.backgroundColor,\n color: theme.secondaryAccentColor || themeAugmentation.nextButton.color,\n },\n input: {\n activeColor: theme.primaryAccentColor || themeAugmentation.input.activeColor,\n bgColor: questionHighlightColor,\n },\n border: {\n defaultColor: theme.isAccessible ? theme.answerColor ?? '#999' : '#999',\n correctColor: theme.isAccessible\n ? theme.answerColor ?? '#999'\n : '#00BF6F',\n wrongColor: theme.isAccessible ? theme.answerColor ?? '#999' : '#F05B24',\n },\n correctAnswerHighlightColor: questionHighlightColor,\n ...theme, // keep theme last to allow user to overwrite augmentation\n };\n};\n/**\n * Dummy SurveyTheme\n *\n * _Not a real theme - only use for testing_\n */\nconst DUMMY_SURVEY_THEME = {\n name: 'Dummy Survey Theme',\n // Survey-specific styles\n layout: 'BACKGROUND_FULL_TEXT_CENTER',\n titleColor: 'rgba(255,51,0,1)',\n questionColor: 'rgba(79,122,39,1)',\n answerColor: 'rgba(56,136,254,1)',\n primaryAccentColor: '#00BF6F',\n secondaryAccentColor: '#FFFFFF',\n primaryBackgroundColor: '#F7F8FA',\n secondaryBackgroundColor: '#ccf2e2',\n isAccessible: false,\n isDark: false,\n isCustomTheme: false,\n fontFamily: smFont,\n fontSize: { body: 16 },\n fontWeight: {\n ultralight: 200,\n light: 300,\n regular: 400,\n medium: 500,\n bold: 700,\n },\n // Survey-specific component Styles\n surveyPage: {\n overlayColor: 'rgba(217,238,236,0.68)',\n backgroundImage: 'url(https://images.pexels.com/photos/2760856/pexels-photo-2760856.jpeg?auto=compress&cs=tinysrgb&dpr=2&h=650&w=940)',\n },\n surveyTitle: {\n fontSize: 25,\n fontFamily: 'Montserrat,Arial,Helvetica',\n fontWeight: 700,\n fontStyle: 'normal',\n textDecoration: 'none',\n },\n pageTitle: {\n fontSize: 25,\n fontFamily: 'Montserrat,Arial,Helvetica',\n fontWeight: 700,\n fontStyle: 'normal',\n textDecoration: 'none',\n },\n button: {\n fontSize: 15,\n fontFamily: 'National2',\n fontWeight: 400,\n },\n error: {\n fontSize: 16,\n fontFamily: 'arial,sans-serif',\n fontWeight: 500,\n fontStyle: 'normal',\n textDecoration: 'none',\n },\n exitLink: {\n fontSize: 12,\n fontWeight: 300,\n backgroundColor: 'rgba(0,0,0,0)',\n },\n logo: {\n enabled: true,\n image: {\n url: 'https://sm-assets-mt1.s3.amazonaws.com/survey/518810755/6816175a-dfd7-4cc3-8b5c-64fd07d6f491.jpeg',\n },\n },\n progressBar: {\n enabled: true,\n position: 'DISABLED',\n showPercent: true,\n showPageNumber: true,\n },\n questionBody: {\n color: '#333e48',\n highlightColor: 'rgba(208,210,211,1)',\n fontSize: 18,\n fontFamily: smFont,\n fontWeight: 300,\n fontStyle: 'normal',\n textDecoration: 'none',\n },\n questionTitle: {\n fontSize: 20,\n fontFamily: smFont,\n fontWeight: 300,\n fontStyle: 'normal',\n textDecoration: 'none',\n color: '#333e48',\n },\n breakpoints: {\n xxs: {\n max: '480px',\n },\n xs: {\n min: '481px',\n max: '640px',\n },\n sm: {\n min: '641px',\n max: '768px',\n },\n md: {\n min: '769px',\n max: '1024px',\n },\n lg: {\n min: '1025px',\n max: '1200px',\n },\n xl: {\n min: '1201px',\n },\n },\n};\n/**\n * Dummy AugmentedSurveyTheme (pre-augmented SurveyTheme)\n *\n * _Not a real theme - only use for testing_\n */\nconst DUMMY_AUGMENTED_SURVEY_THEME = {\n ...DUMMY_SURVEY_THEME,\n ...themeAugmentation,\n};\n\nconst prefix = 'smqr-';\nconst selectors = [\n `[class*='${prefix}']`,\n `[class*='${prefix}']::before`,\n `[class*='${prefix}']::after`,\n];\nconst resetStyles = {\n '-webkit-font-smoothing': 'antialiased',\n boxSizing: 'border-box',\n listStyle: 'none',\n margin: 0,\n padding: 0,\n};\nconst useStyles = createUseStyles({\n '@global': {\n [selectors.join(',')]: resetStyles,\n },\n}, {\n // Ensure this gets added to as the first stylesheet\n // ref: https://github.com/cssinjs/jss/blob/master/packages/react-jss/src/utils/getSheetIndex.js#L3-L16\n index: (Number.MIN_SAFE_INTEGER || -1e9) - 1,\n name: 'smquestions-respondent-global-styles',\n});\n/* Must by rendered inside a ThemeProvider with the RespondentTheme */\nfunction SurveyGlobalStyles() {\n const theme = useTheme();\n useStyles({ theme });\n return null;\n}\n/* Wraps all components and ThemeProvider of the Respondent experience */\nfunction SurveyStylesProvider({ children, ...props }) {\n // https://cssinjs.org/jss-api?v=v10.4.0#generate-your-class-names\n const generateJssId = React.useMemo(() => createGenerateId(), []);\n const generateId = (rule, srcSheet) => {\n const sheet = srcSheet;\n if (sheet) {\n sheet.options.classNamePrefix = prefix;\n sheet.options.index = sheet.options.index ?? 10;\n }\n return generateJssId(rule, sheet);\n };\n return (React.createElement(JssProvider, { ...props, generateId: generateId }, children));\n}\n\nfunction SurveyThemeWrapper({ children, theme }) {\n const fallbackTheme = useSurveyTheme();\n return (React.createElement(SurveyStylesProvider, null,\n React.createElement(ThemeProvider, { theme: applySurveyThemeAugmentation(theme ?? fallbackTheme) },\n React.createElement(SurveyGlobalStyles, null),\n children)));\n}\n\n/**\n * Copy of Heritage (accessible) SurveyTheme - Basic User\n * The theme has been copied here for use as the default theme when using SurveyTaking components in smweb\n * The heritage theme looks most like the Elevate themes used in smweb\n */\nconst fontFamily = \"'National 2', 'Helvetica Neue', Helvetica, Arial, 'Hiragino Sans', 'Hiragino Kaku Gothic Pro', '游ゴシック', '游ゴシック体', YuGothic, 'Yu Gothic', 'MS ゴシック', 'MS Gothic', sans-serif\";\nconst colorWhite = 'rgba(255,255,255,1)';\nconst colorDarkGrey = 'rgba(64,64,64,1)';\nconst colorForestGreen = 'rgba(0,131,35,1)';\nconst SURVEY_THEME_HERITAGE = {\n name: 'Heritage',\n fontFamily,\n fontSize: {\n body: 16,\n },\n fontWeight: {\n ultralight: 200,\n light: 300,\n regular: 400,\n medium: 500,\n bold: 700,\n },\n layout: 'BACKGROUND_FULL_TEXT_CENTER',\n isAccessible: true,\n isCustomTheme: false,\n isDark: false,\n surveyPage: {\n overlayColor: colorWhite,\n },\n surveyTitle: {\n fontSize: 26,\n fontFamily,\n fontWeight: 700,\n fontStyle: 'normal',\n textDecoration: 'none',\n },\n pageTitle: {\n fontSize: 24,\n fontFamily,\n fontWeight: 400,\n fontStyle: 'normal',\n textDecoration: 'none',\n },\n questionTitle: {\n fontSize: 20,\n fontFamily,\n fontWeight: 300,\n fontStyle: 'normal',\n textDecoration: 'none',\n },\n questionBody: {\n color: colorDarkGrey,\n highlightColor: 'rgba(208,210,211,1)',\n fontSize: 18,\n fontFamily,\n fontWeight: 300,\n fontStyle: 'normal',\n textDecoration: 'none',\n },\n button: {\n fontSize: 15,\n fontFamily,\n fontWeight: 400,\n },\n error: {\n fontSize: 16,\n fontWeight: 300,\n fontStyle: 'normal',\n textDecoration: 'none',\n },\n exitLink: {\n fontSize: 12,\n fontWeight: 300,\n backgroundColor: 'rgba(0,0,0,0)',\n },\n logo: {\n enabled: false,\n },\n progressBar: {\n enabled: true,\n position: 'BOTTOM',\n showPercent: false,\n showPageNumber: false,\n },\n titleColor: colorForestGreen,\n questionColor: colorDarkGrey,\n answerColor: colorDarkGrey,\n primaryAccentColor: colorForestGreen,\n secondaryAccentColor: colorWhite,\n primaryBackgroundColor: colorWhite,\n secondaryBackgroundColor: colorWhite,\n};\n\n/*\n The following wrapper is necessary for rendering surveyTaking components in\n a context that utilizes a Wrench or Elevated theme. The wrapper defaults to\n using Heritage Theme\n*/\nfunction WrenchThemeWrapper({ children }) {\n return (React.createElement(SurveyThemeWrapper, { theme: SURVEY_THEME_HERITAGE }, children));\n}\n\nexport { DUMMY_AUGMENTED_SURVEY_THEME, DUMMY_SURVEY_THEME, SurveyGlobalStyles, SurveyStylesProvider, SurveyThemeWrapper, WrenchThemeWrapper, applySurveyThemeAugmentation };\n//# sourceMappingURL=theme-respondent.js.map\n","import * as React from 'react';\n\nfunction _setPrototypeOf(o, p) {\n _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) {\n o.__proto__ = p;\n return o;\n };\n return _setPrototypeOf(o, p);\n}\n\nfunction _inheritsLoose(subClass, superClass) {\n subClass.prototype = Object.create(superClass.prototype);\n subClass.prototype.constructor = subClass;\n _setPrototypeOf(subClass, superClass);\n}\n\nvar changedArray = function changedArray(a, b) {\n if (a === void 0) {\n a = [];\n }\n\n if (b === void 0) {\n b = [];\n }\n\n return a.length !== b.length || a.some(function (item, index) {\n return !Object.is(item, b[index]);\n });\n};\n\nvar initialState = {\n error: null\n};\n\nvar ErrorBoundary = /*#__PURE__*/function (_React$Component) {\n _inheritsLoose(ErrorBoundary, _React$Component);\n\n function ErrorBoundary() {\n var _this;\n\n for (var _len = arguments.length, _args = new Array(_len), _key = 0; _key < _len; _key++) {\n _args[_key] = arguments[_key];\n }\n\n _this = _React$Component.call.apply(_React$Component, [this].concat(_args)) || this;\n _this.state = initialState;\n _this.updatedWithError = false;\n\n _this.resetErrorBoundary = function () {\n var _this$props;\n\n for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {\n args[_key2] = arguments[_key2];\n }\n\n _this.props.onReset == null ? void 0 : (_this$props = _this.props).onReset.apply(_this$props, args);\n\n _this.reset();\n };\n\n return _this;\n }\n\n ErrorBoundary.getDerivedStateFromError = function getDerivedStateFromError(error) {\n return {\n error: error\n };\n };\n\n var _proto = ErrorBoundary.prototype;\n\n _proto.reset = function reset() {\n this.updatedWithError = false;\n this.setState(initialState);\n };\n\n _proto.componentDidCatch = function componentDidCatch(error, info) {\n var _this$props$onError, _this$props2;\n\n (_this$props$onError = (_this$props2 = this.props).onError) == null ? void 0 : _this$props$onError.call(_this$props2, error, info);\n };\n\n _proto.componentDidMount = function componentDidMount() {\n var error = this.state.error;\n\n if (error !== null) {\n this.updatedWithError = true;\n }\n };\n\n _proto.componentDidUpdate = function componentDidUpdate(prevProps) {\n var error = this.state.error;\n var resetKeys = this.props.resetKeys; // There's an edge case where if the thing that triggered the error\n // happens to *also* be in the resetKeys array, we'd end up resetting\n // the error boundary immediately. This would likely trigger a second\n // error to be thrown.\n // So we make sure that we don't check the resetKeys on the first call\n // of cDU after the error is set\n\n if (error !== null && !this.updatedWithError) {\n this.updatedWithError = true;\n return;\n }\n\n if (error !== null && changedArray(prevProps.resetKeys, resetKeys)) {\n var _this$props$onResetKe, _this$props3;\n\n (_this$props$onResetKe = (_this$props3 = this.props).onResetKeysChange) == null ? void 0 : _this$props$onResetKe.call(_this$props3, prevProps.resetKeys, resetKeys);\n this.reset();\n }\n };\n\n _proto.render = function render() {\n var error = this.state.error;\n var _this$props4 = this.props,\n fallbackRender = _this$props4.fallbackRender,\n FallbackComponent = _this$props4.FallbackComponent,\n fallback = _this$props4.fallback;\n\n if (error !== null) {\n var _props = {\n error: error,\n resetErrorBoundary: this.resetErrorBoundary\n };\n\n if ( /*#__PURE__*/React.isValidElement(fallback)) {\n return fallback;\n } else if (typeof fallbackRender === 'function') {\n return fallbackRender(_props);\n } else if (FallbackComponent) {\n return /*#__PURE__*/React.createElement(FallbackComponent, _props);\n } else {\n throw new Error('react-error-boundary requires either a fallback, fallbackRender, or FallbackComponent prop');\n }\n }\n\n return this.props.children;\n };\n\n return ErrorBoundary;\n}(React.Component);\n\nexport { ErrorBoundary as E };\n//# sourceMappingURL=vendor-8000eab9.js.map\n","/**\n * A specialized version of `_.map` for arrays without support for iteratee\n * shorthands.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Array} Returns the new mapped array.\n */\nfunction arrayMap(array, iteratee) {\n var index = -1,\n length = array == null ? 0 : array.length,\n result = Array(length);\n\n while (++index < length) {\n result[index] = iteratee(array[index], index, array);\n }\n return result;\n}\n\nexport default arrayMap;\n","import baseGetTag from './_baseGetTag.js';\nimport isObjectLike from './isObjectLike.js';\n\n/** `Object#toString` result references. */\nvar symbolTag = '[object Symbol]';\n\n/**\n * Checks if `value` is classified as a `Symbol` primitive or object.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a symbol, else `false`.\n * @example\n *\n * _.isSymbol(Symbol.iterator);\n * // => true\n *\n * _.isSymbol('abc');\n * // => false\n */\nfunction isSymbol(value) {\n return typeof value == 'symbol' ||\n (isObjectLike(value) && baseGetTag(value) == symbolTag);\n}\n\nexport default isSymbol;\n","import Symbol from './_Symbol.js';\nimport arrayMap from './_arrayMap.js';\nimport isArray from './isArray.js';\nimport isSymbol from './isSymbol.js';\n\n/** Used as references for various `Number` constants. */\nvar INFINITY = 1 / 0;\n\n/** Used to convert symbols to primitives and strings. */\nvar symbolProto = Symbol ? Symbol.prototype : undefined,\n symbolToString = symbolProto ? symbolProto.toString : undefined;\n\n/**\n * The base implementation of `_.toString` which doesn't convert nullish\n * values to empty strings.\n *\n * @private\n * @param {*} value The value to process.\n * @returns {string} Returns the string.\n */\nfunction baseToString(value) {\n // Exit early for strings to avoid a performance hit in some environments.\n if (typeof value == 'string') {\n return value;\n }\n if (isArray(value)) {\n // Recursively convert values (susceptible to call stack limits).\n return arrayMap(value, baseToString) + '';\n }\n if (isSymbol(value)) {\n return symbolToString ? symbolToString.call(value) : '';\n }\n var result = (value + '');\n return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result;\n}\n\nexport default baseToString;\n","import baseToString from './_baseToString.js';\n\n/**\n * Converts `value` to a string. An empty string is returned for `null`\n * and `undefined` values. The sign of `-0` is preserved.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to convert.\n * @returns {string} Returns the converted string.\n * @example\n *\n * _.toString(null);\n * // => ''\n *\n * _.toString(-0);\n * // => '-0'\n *\n * _.toString([1, 2, 3]);\n * // => '1,2,3'\n */\nfunction toString(value) {\n return value == null ? '' : baseToString(value);\n}\n\nexport default toString;\n","/**\n * The base implementation of `_.propertyOf` without support for deep paths.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Function} Returns the new accessor function.\n */\nfunction basePropertyOf(object) {\n return function(key) {\n return object == null ? undefined : object[key];\n };\n}\n\nexport default basePropertyOf;\n","import basePropertyOf from './_basePropertyOf.js';\n\n/** Used to map HTML entities to characters. */\nvar htmlUnescapes = {\n '&': '&',\n '<': '<',\n '>': '>',\n '"': '\"',\n ''': \"'\"\n};\n\n/**\n * Used by `_.unescape` to convert HTML entities to characters.\n *\n * @private\n * @param {string} chr The matched character to unescape.\n * @returns {string} Returns the unescaped character.\n */\nvar unescapeHtmlChar = basePropertyOf(htmlUnescapes);\n\nexport default unescapeHtmlChar;\n","import toString from './toString.js';\nimport unescapeHtmlChar from './_unescapeHtmlChar.js';\n\n/** Used to match HTML entities and HTML characters. */\nvar reEscapedHtml = /&(?:amp|lt|gt|quot|#39);/g,\n reHasEscapedHtml = RegExp(reEscapedHtml.source);\n\n/**\n * The inverse of `_.escape`; this method converts the HTML entities\n * `&`, `<`, `>`, `"`, and `'` in `string` to\n * their corresponding characters.\n *\n * **Note:** No other HTML entities are unescaped. To unescape additional\n * HTML entities use a third-party library like [_he_](https://mths.be/he).\n *\n * @static\n * @memberOf _\n * @since 0.6.0\n * @category String\n * @param {string} [string=''] The string to unescape.\n * @returns {string} Returns the unescaped string.\n * @example\n *\n * _.unescape('fred, barney, & pebbles');\n * // => 'fred, barney, & pebbles'\n */\nfunction unescape(string) {\n string = toString(string);\n return (string && reHasEscapedHtml.test(string))\n ? string.replace(reEscapedHtml, unescapeHtmlChar)\n : string;\n}\n\nexport default unescape;\n"],"names":["notNull","u","isNull","isString","isNumber","isOptional","undefined","guard","isArrayOf","Array","isArray","every","isOneOf","list","find","i","isFixed","value","isEither","g","isNullable","res","typeGuard","Object","entries","guards","key","typeAssertion","forEach","e","message","questionId","detail","type","baseQuestionGuards","typeId","family","variant","id","respondentSurveyMapping","externalQuestion","position","label","questionNumber","heading","default","text","title","imageChoiceCrossCapabilityMapping","respondentQuizResultsMapping","quizResults","aggregateResponseDashboardMapping","dashboardType","filterCount","selectedCount","skippedCount","answeredCount","responseData","aggregateResponse","aggregateResponseCustomizableSolutionsMapping","displayNumber","mapRespondentQuizResultsAnswerOther","answerOther","addRequiredErrorText","requiredErrorText","visible","linesCount","layout","charsCount","mapRespondentSurveyAnswerOther","shared","touched","selected","answerComment","mapRespondentSurveyRequiredAll","errorMessage","fillSpacing","spacing","top","bottom","left","right","checkBoxCrossCapabilityMapping","dropdownCrossCapabilityMapping","commentBoxCrossCapabilityMapping","singleTextboxCrossCapabilityMapping","matrixCrossCapabilityMapping","isExternalMatrixWithRadio","q","isExternalMatrixWithCheckboxes","multipleChoiceCrossCapabilityMapping","multipleTextboxCrossCapabilityMapping","rankingCrossCapabilityMapping","sliderCrossCapabilityMapping","starRatingCrossCapabilityMapping","imagePresentationCrossCapabilityMapping","textPresentationCrossCapabilityMapping","npsCrossCapabilityMapping","isTextLengthValidation","minLength","maxLength","isNumericalValidation","minValue","maxValue","isDateValidation","minDate","maxDate","isDateFormatValidation","dateTimeCrossCapabilityMapping","matrixDropdownCrossCapabilityMapping","fileUploadCrossCapabilityMapping","CAPABILITIES","invalidCombination","questionTypeAndCapabilityMapping","single_textbox","validation","required","fieldSet","comment_box","multiple_textbox","answers","sumValidation","fieldSets","check_box","answerNA","answerNoneOfTheAbove","image_choice","answersImage","multiple_choice","dropdown","slider","scaleOptions","hideNumericalInput","star_rating","answersWeighted","symbolOptions","ranking","matrix","base","isForcedRanking","isWeighted","answerNotApplicable","matrix_dropdown","answersNested","nps","file_upload","instructions","formats","date_time","image_presentation","assignments","text_presentation","isCapability","includes","mapDynamic","capability","mapInternalDynamicToExternal","cleanExternalQuestion","isCompatible$h","isQuestionTypeSingleTextbox","mapFromExternalQuestion$g","typeId$g","runValidators","validators","question","validateEmptyValue","validationErrors","reduce","errors","validator","newError","length","createValidationError","fieldId","validateTextLength","checkValueTextLength","valueToValidate","valueAsArray","map","filter","DATE_PATTERNS","DATE_INTL","DATE_US","isDateValidationType","validationType","stringToDate","groups","dd","mm","yyyy","format","exec","s","Date","Number","getMinAndMaxDate","substring","indexOf","replace","validateDate","date","stringToDateType","dmin","dmax","getTime","checkValueDateFormat","isNumericalValidationType","isSumValidationType","isValidInteger","maybeInteger","match","isValidDecimal","validateNumber","parsedNumber","parseFloat","isNaN","validateFixedSum","values","sum","valueSum","reduceSum","String","checkValueNumericalFormat","obj","module","exports","_assertString","ipv4Maybe","ipv6Block","x","isEmailExports","assertStringExports","_typeof","Symbol","iterator","constructor","prototype","defineProperty","input","invalidType","name","concat","v","mergeExports","arguments","defaults","isByteLengthExports","str","options","min","max","len","encodeURI","split","__esModule","isFQDNExports","_merge","default_fqdn_options","allow_trailing_dot","parts","tld","require_tld","test","allow_numeric_tld","part","allow_underscores","_interopRequireDefault","isIPExports","isIP","version","sort","a","b","addressAndZone","blocks","foundOmissionBlock","foundIPv4TransitionBlock","expectedNumberOfBlocks","substr","shift","pop","default_email_options","require_display_name","allow_display_name","display_email","splitNameAddress","display_name","trim_quotes","display_name_without_quotes","_display_email","_arrayWithHoles","arr","_iterableToArrayLimit","_arr","_n","_d","_e","_s","_i","next","done","push","err","_unsupportedIterableToArray","o","minLen","_arrayLikeToArray","n","toString","call","slice","from","_nonIterableRest","endsWith","trim","contains_illegal","ignore_max_length","domain","user","join","lower_domain","toLowerCase","domain_specific_validation","username","_isByteLength","_user_parts","gmailUserPart","_isFQDN","allow_ip_domain","_isIP","startsWith","noBracketdomain","allow_utf8_local_part","quotedEmailUserUtf8","quotedEmailUser","pattern","emailUserUtf8Part","emailUserPart","user_parts","_i2","blacklisted_chars","search","arr2","isEmail","hasOwnProperty","validateEmail","checkValueEmailFormat","isResponseValueArray","some","hasEmptyOtherAnswer","hasTypeAllValidationError","choiceCount","hasTypeAllValidationErrorWithoutRangeSelection","hasTypeAtLeastValidationError","hasTypeAtMostValidationError","hasTypeExactlyValidationError","hasTypeRangeValidationError","validateRequired","otherRequiredErrorText","noRangeValidation","hasError","isVisible","someKindOfAnswer","requiredCount","Math","checkValueRequired","total","answerCount","allChoicesRequired","standAloneRequiredValidator","valueError","openEndedValidators","openEndedMultipleValueValidators","checkSelectedAnswerOtherRequired","_touched","validateRespondentSurveyOpenEndedQuestion","answer","validateRespondentSurveyMultipleOpenEndedQuestion","validateRespondentSurveySelectionAndOtherValue","selectedChoices","otherValue","valueErrors","hasRequiredAnswerError","returnValueErrors","baseGuards$c","isQuestionTypeMultipleTextbox","mapFromExternalQuestion$f","questionType","typeId$f","baseGuards$b","isQuestionTypeCommentBox","mapFromExternalQuestion$e","typeId$e","isQuestionTypeMultipleChoice","mapFromExternalQuestion$d","typeId$d","baseGuards$9","isQuestionTypeCheckBox","mapFromExternalQuestion$c","typeId$c","baseGuards$8","isQuestionTypeDropdown","mapFromExternalQuestion$b","typeId$b","isQuestionTypeImageChoice","mapFromExternalQuestion$a","typeId$a","baseGuards$6","isQuestionTypeSlider","mapFromExternalQuestion$9","typeId$9","baseStarRatingMatrixGuards","baseStarRatingScaleGuards","isQuestionTypeStarRating","mapFromExternalQuestion$8","typeId$8","baseSingleAnswerGuards","baseManyAnswersGuards","baseRatingScaleGuards","isQuestionTypeMatrix","mapFromExternalQuestion$7","assertQuestionTypeMatrix","typeId$7","matrixRespondentSurveyValidation","rest","baseGuards$5","isQuestionTypeMatrixDropdown","mapFromExternalQuestion$6","typeId$6","matrixDropdownRespondentSurveyValidation","baseGuards$4","isQuestionTypeRanking","mapFromExternalQuestion$5","typeId$5","isQuestionTypeNps","mapFromExternalQuestion$4","baseDateTimeGuards","baseDateGuards","baseTimeGuards","isQuestionTypeDateTime","mapFromExternalQuestion$3","typeId$3","errorMessageTokens","dateIntl","dateUs","hour","minute","period","hasValidTime","dateTimeAnswerPayloadToString","stringifyAnswerValues","validateTimeFormat","hourParsed","parseInt","minParsed","checkValueFormat","dateTimeRespondentSurveyValidation","simplifiedAnswers","acc","curr","baseGuards$2","isQuestionTypeImagePresentation","mapFromExternalQuestion$2","typeId$2","baseGuards$1","isQuestionTypeTextPresentation","mapFromExternalQuestion$1","typeId$1","isQuestionTypeFileUpload","mapFromExternalQuestion","questionTypeDefinitionModules","fromExternalQuestion","source","toExternalQuestion","eq","isOfQuestionType","isCompatible","selectQuestionTypeDefinition","isAggregateResponseHeaderItem","weight","isAggregateResponseHeader","items","rowItem","columnItem","groupItem","percentage","isAggregateResponseBasicStats","across","row","column","group","isAggregateResponseOtherAnswerItem","isAggregateResponseOtherAnswer","totalCount","isOneDimensionalAggregateResponseCell","rowHeader","columnHeader","groupHeader","data","otherAnswers","stats","isTwoDimensionalAggregateResponseCell","isThreeDimensionalAggregateResponseCell","isOneDimensionalChartData","rowID","rowLabel","isTwoDimensionalData","columnID","columnLabel","groupID","groupLabel","getTypeId","isExternalQuestionWithTypeId","_setPrototypeOf","p","setPrototypeOf","bind","__proto__","initialState","error","ErrorBoundary","_React$Component","_this","_len","_args","_key","apply","state","updatedWithError","resetErrorBoundary","_this$props","_len2","args","_key2","props","onReset","reset","subClass","create","superClass","getDerivedStateFromError","_proto","setState","componentDidCatch","info","_this$props$onError","_this$props2","onError","componentDidMount","componentDidUpdate","prevProps","_this$props$onResetKe","_this$props3","resetKeys","item","index","is","onResetKeysChange","render","_this$props4","fallbackRender","FallbackComponent","fallback","_props","react","isValidElement","createElement","children","Component","classnamesExports","hasOwn","classNames","classes","arg","argType","inner","window","useStyles$1","react_jss_esm","QM","wdsIcons","color","size","fontSize","theme","iconSize","chosenColor","palette","main","width","height","display","verticalAlign","textAlign","fill","getDisplayName","displayName","svgContainer","IconDocumentX","withIcon","WithIcon","className","viewBox","preserveAspectRatio","role","getOriginalComponent","d","useStyles","fallbackComponent","fontFamily","questionBody","questionColor","border","borderRadius","minHeight","justifyContent","alignItems","marginLeft","COPY","dist","vU","ERROR","defaultMessage","description","t","withErrorBoundary","ComponentWithErrorBoundary","contrastColor","rgb","r","yiq","grey","themeAugmentation","body","fontWeight","ultralight","light","regular","medium","bold","nextButton","backgroundColor","activeColor","bgColor","defaultColor","correctColor","wrongColor","correctAnswerHighlightColor","getQuestionHighlightColor","isNps","titleColor","isDark","applySurveyThemeAugmentation","questionHighlightColor","primaryAccentColor","secondaryAccentColor","isAccessible","answerColor","prefix","selectors","react_jss__WEBPACK_IMPORTED_MODULE_2__","boxSizing","listStyle","margin","padding","MIN_SAFE_INTEGER","SurveyGlobalStyles","react_jss__WEBPACK_IMPORTED_MODULE_3__","Fg","SurveyStylesProvider","generateJssId","react__WEBPACK_IMPORTED_MODULE_0__","useMemo","react_jss__WEBPACK_IMPORTED_MODULE_4__","S1","kU","generateId","rule","srcSheet","sheet","classNamePrefix","SurveyThemeWrapper","fallbackTheme","_sm_webassets_SurveyTheme_context__WEBPACK_IMPORTED_MODULE_1__","u7","f6","object","_arrayMap","array","iteratee","result","INFINITY","symbolProto","symbolToString","_baseToString","baseToString","arrayMap","isObjectLike","baseGetTag","unescapeHtmlChar","reEscapedHtml","reHasEscapedHtml","RegExp","lodash_es_unescape","string"],"sourceRoot":""}