@oaknational/oak-components 0.8.1 → 0.9.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":["../../node_modules/tslib/tslib.es6.js","../../src/styles/theme/color.ts","../../src/styles/helpers/parseColor.ts","../../src/styles/helpers/truthy.ts","../../src/styles/utils/responsiveStyle.ts","../../src/styles/utils/colorStyle.ts","../../src/styles/helpers/pxToRem.ts","../../src/styles/theme/spacing.ts","../../src/styles/helpers/parseSpacing.ts","../../src/styles/utils/positionStyle.ts","../../src/styles/utils/sizeStyle.ts","../../src/styles/utils/spacingStyle.ts","../../src/styles/theme/borders.ts","../../src/styles/helpers/parseBorder.ts","../../src/styles/helpers/parseBorderRadius.ts","../../src/styles/utils/borderStyle.ts","../../src/styles/utils/displayStyle.ts","../../src/styles/theme/dropShadow.ts","../../src/styles/helpers/parseDropShadow.ts","../../src/styles/utils/dropShadowStyle.ts","../../src/styles/theme/opacity.ts","../../src/styles/helpers/parseOpacity.ts","../../src/styles/utils/opacityStyle.ts","../../src/styles/utils/transformStyle.ts","../../src/styles/theme/transitions.ts","../../src/styles/utils/transitionStyle.ts","../../src/styles/helpers/parseTransitions.ts","../../src/styles/theme/typography.ts","../../src/styles/utils/typographyStyle.ts","../../src/styles/helpers/parseTypography.ts","../../src/styles/theme/zIndex.ts","../../src/styles/utils/zIndexStyle.ts","../../src/styles/helpers/parseZIndex.ts","../../src/components/atoms/OakBox/OakBox.tsx","../../src/styles/utils/flexStyle.ts","../../src/components/atoms/OakFlex/OakFlex.tsx","../../src/components/atoms/OakSpan/OakSpan.tsx","../../src/components/atoms/OakForm/OakForm.tsx","../../src/styles/helpers/parseColorFilter.ts","../../src/styles/utils/colorFilterStyle.tsx","../../src/components/atoms/OakImage/OakImage.tsx","../../src/components/atoms/OakImage/useShowPlaceholder.ts","../../src/components/atoms/OakTypography/OakTypography.tsx","../../src/components/atoms/OakHeading/OakHeading.tsx","../../src/components/atoms/OakP/OakP.tsx","../../src/components/atoms/OakUL/OakUL.tsx","../../src/components/atoms/OakOL/OakOL.tsx","../../src/styles/utils/listStyle.ts","../../src/components/atoms/OakLI/OakLI.tsx","../../src/components/atoms/OakLabel/OakLabel.tsx","../../src/image-map.ts","../../src/components/atoms/OakIcon/OakIcon.tsx","../../src/components/atoms/OakGrid/OakGrid.tsx","../../src/components/atoms/OakGridArea/OakGridArea.tsx","../../src/components/atoms/OakMaxWidth/OakMaxWidth.tsx","../../src/components/atoms/OakCloudinaryImage/cloudinary.ts","../../src/components/atoms/OakCloudinaryImage/OakCloudinaryImage.tsx","../../src/components/atoms/OakKbd/OakKbd.tsx","../../src/styles/global/reset.styles.ts","../../src/styles/global/oak.styles.ts","../../src/components/atoms/OakGlobalStyle/OakGlobalStyle.tsx","../../src/components/atoms/OakScreenReader/OakScreenReader.tsx","../../src/components/molecules/OakLoadingSpinner/OakLoadingSpinner.tsx","../../src/components/atoms/InternalButton/InternalButton.tsx","../../src/components/molecules/InternalShadowRectButton/InternalShadowRectButton.tsx","../../src/components/molecules/OakPrimaryButton/OakPrimaryButton.tsx","../../src/components/molecules/OakPrimaryInvertedButton/OakPrimaryInvertedButton.tsx","../../src/components/molecules/InternalShadowRoundButton/InternalShadowRoundButton.tsx","../../src/components/molecules/OakTertiaryButton/OakTertiaryButton.tsx","../../src/components/molecules/OakRadioGroup/OakRadioGroup.tsx","../../src/components/molecules/OakRadioButton/OakRadioButton.tsx","../../src/components/atoms/InternalCheckBox/InternalCheckBox.tsx","../../src/components/atoms/InternalCheckBoxLabel/InternalCheckBoxLabel.tsx","../../src/components/atoms/InternalCheckBoxWrapper/InternalCheckBoxWrapper.tsx","../../src/components/atoms/InternalTextInput/InternalTextInput.tsx","../../src/components/molecules/OakTextInput/OakTextInput.tsx","../../src/components/molecules/OakRoundIcon/OakRoundIcon.tsx","../../src/components/atoms/InternalTooltip/InternalTooltip.tsx","../../src/components/molecules/OakTooltip/OakTooltip.tsx","../../src/components/molecules/OakBackLink/OakBackLink.tsx","../../src/components/atoms/InternalCard/InternalCard.tsx","../../src/components/atoms/InternalCardWithBackgroundElement/InternalCardWithBackgroundElement.tsx","../../src/styles/helpers/parseBorderWidth.ts","../../src/components/atoms/InternalStyledSvg/InternalStyledSvg.tsx","../../src/components/molecules/OakHandDrawnCard/OakHandDrawnCard.tsx","../../src/components/molecules/OakHandDrawnCardWithIcon/OakHandDrawnCardWithIcon.tsx","../../src/components/molecules/OakPromoTag/OakPromoTag.tsx","../../src/components/molecules/OakCollapsibleContent/OakCollapsibleContent.tsx","../../src/components/molecules/OakLink/OakLink.tsx","../../src/components/molecules/OakDragAndDropInstructions/OakDragAndDropInstructions.tsx","../../src/components/molecules/OakDraggable/OakDraggable.tsx","../../src/components/molecules/OakDroppable/OakDroppable.tsx","../../src/components/molecules/OakAccordion/OakAccordion.tsx","../../node_modules/react-remove-scroll-bar/dist/es2015/constants.js","../../node_modules/use-callback-ref/dist/es2015/assignRef.js","../../node_modules/use-callback-ref/dist/es2015/useMergeRef.js","../../node_modules/use-callback-ref/dist/es2015/useRef.js","../../node_modules/use-sidecar/dist/es2015/medium.js","../../node_modules/use-sidecar/dist/es2015/exports.js","../../node_modules/react-focus-on/node_modules/react-remove-scroll/dist/es2015/medium.js","../../node_modules/react-focus-on/node_modules/react-remove-scroll/dist/es2015/UI.js","../../node_modules/@babel/runtime/helpers/esm/extends.js","../../node_modules/prop-types/lib/ReactPropTypesSecret.js","../../node_modules/react-is/index.js","../../node_modules/react-is/cjs/react-is.production.min.js","../../node_modules/react-is/cjs/react-is.development.js","../../node_modules/object-assign/index.js","../../node_modules/prop-types/lib/has.js","../../node_modules/prop-types/index.js","../../node_modules/prop-types/factoryWithTypeCheckers.js","../../node_modules/prop-types/checkPropTypes.js","../../node_modules/prop-types/factoryWithThrowingShims.js","../../node_modules/focus-lock/dist/es2015/constants.js","../../node_modules/react-focus-lock/dist/es2015/FocusGuard.js","../../node_modules/react-focus-lock/dist/es2015/medium.js","../../node_modules/react-focus-lock/dist/es2015/scope.js","../../node_modules/react-focus-lock/dist/es2015/Lock.js","../../node_modules/react-focus-lock/dist/es2015/util.js","../../node_modules/react-focus-on/dist/es2015/medium.js","../../node_modules/react-focus-on/dist/es2015/UI.js","../../node_modules/@babel/runtime/helpers/esm/setPrototypeOf.js","../../node_modules/@babel/runtime/helpers/esm/inheritsLoose.js","../../node_modules/@babel/runtime/helpers/esm/typeof.js","../../node_modules/@babel/runtime/helpers/esm/toPropertyKey.js","../../node_modules/@babel/runtime/helpers/esm/toPrimitive.js","../../node_modules/focus-lock/dist/es2015/utils/array.js","../../node_modules/focus-lock/dist/es2015/utils/is.js","../../node_modules/focus-lock/dist/es2015/utils/tabOrder.js","../../node_modules/focus-lock/dist/es2015/utils/tabUtils.js","../../node_modules/focus-lock/dist/es2015/utils/tabbables.js","../../node_modules/focus-lock/dist/es2015/utils/DOMutils.js","../../node_modules/focus-lock/dist/es2015/utils/all-affected.js","../../node_modules/focus-lock/dist/es2015/utils/getActiveElement.js","../../node_modules/focus-lock/dist/es2015/utils/safe.js","../../node_modules/focus-lock/dist/es2015/focusInside.js","../../node_modules/focus-lock/dist/es2015/utils/correctFocus.js","../../node_modules/focus-lock/dist/es2015/utils/firstFocus.js","../../node_modules/focus-lock/dist/es2015/solver.js","../../node_modules/focus-lock/dist/es2015/utils/auto-focus.js","../../node_modules/focus-lock/dist/es2015/utils/parenting.js","../../node_modules/focus-lock/dist/es2015/focusSolver.js","../../node_modules/focus-lock/dist/es2015/commands.js","../../node_modules/focus-lock/dist/es2015/moveFocusInside.js","../../node_modules/focus-lock/dist/es2015/return-focus.js","../../node_modules/focus-lock/dist/es2015/sibling.js","../../node_modules/react-focus-lock/dist/es2015/Trap.js","../../node_modules/focus-lock/dist/es2015/focusIsHidden.js","../../node_modules/focus-lock/dist/es2015/focusables.js","../../node_modules/react-clientside-effect/lib/index.es.js","../../node_modules/@babel/runtime/helpers/esm/defineProperty.js","../../node_modules/react-focus-lock/dist/es2015/sidecar.js","../../node_modules/react-style-singleton/dist/es2015/singleton.js","../../node_modules/get-nonce/dist/es2015/index.js","../../node_modules/react-style-singleton/dist/es2015/component.js","../../node_modules/react-style-singleton/dist/es2015/hook.js","../../node_modules/react-remove-scroll-bar/dist/es2015/utils.js","../../node_modules/react-remove-scroll-bar/dist/es2015/component.js","../../node_modules/react-focus-on/node_modules/react-remove-scroll/dist/es2015/aggresiveCapture.js","../../node_modules/react-focus-on/node_modules/react-remove-scroll/dist/es2015/handleScroll.js","../../node_modules/react-focus-on/node_modules/react-remove-scroll/dist/es2015/SideEffect.js","../../node_modules/react-focus-on/node_modules/react-remove-scroll/dist/es2015/sidecar.js","../../node_modules/aria-hidden/dist/es2015/index.js","../../node_modules/react-focus-on/dist/es2015/InteractivityDisabler.js","../../node_modules/react-focus-on/dist/es2015/Effect.js","../../node_modules/react-focus-on/dist/es2015/sidecar.js","../../node_modules/react-focus-on/dist/es2015/Combination.js","../../node_modules/react-transition-group/esm/config.js","../../node_modules/react-transition-group/esm/utils/PropTypes.js","../../node_modules/react-transition-group/esm/TransitionGroupContext.js","../../node_modules/react-transition-group/esm/Transition.js","../../node_modules/react-transition-group/esm/utils/reflow.js","../../node_modules/@babel/runtime/helpers/esm/objectWithoutPropertiesLoose.js","../../src/components/molecules/OakModal/OakModal.tsx","../../src/components/organisms/pupil/OakQuizCheckBox/OakQuizCheckBox.tsx","../../src/components/organisms/pupil/OakQuizRadioButton/OakQuizRadioButton.tsx","../../src/components/organisms/pupil/OakHintButton/OakHintButton.tsx","../../src/components/organisms/pupil/OakQuizHint/OakQuizHint.tsx","../../src/components/organisms/pupil/OakQuizFeedback/OakQuizFeedback.tsx","../../src/components/organisms/pupil/OakLessonBottomNav/OakLessonBottomNav.tsx","../../src/components/organisms/pupil/OakLessonTopNav/OakLessonTopNav.tsx","../../src/components/organisms/pupil/OakQuizCounter/OakQuizCounter.tsx","../../src/components/organisms/pupil/OakLessonLayout/OakLessonLayout.tsx","../../src/components/organisms/pupil/OakLessonNavItem/OakLessonNavItem.tsx","../../src/components/organisms/pupil/OakLessonReviewItem/OakPupilLessonReviewItem.tsx","../../node_modules/@dnd-kit/utilities/dist/utilities.esm.js","../../node_modules/@dnd-kit/accessibility/dist/accessibility.esm.js","../../node_modules/@dnd-kit/core/dist/core.esm.js","../../node_modules/@dnd-kit/sortable/dist/sortable.esm.js","../../src/components/atoms/InternalDndContext/InternalDndContext.tsx","../../src/animation/usePrefersReducedMotion.ts","../../src/components/organisms/pupil/OakQuizOrder/OakQuizOrder.tsx","../../src/components/organisms/pupil/InternalDroppableHoldingPen/InternalDroppableHoldingPen.tsx","../../src/components/organisms/pupil/OakQuizMatch/OakQuizMatch.tsx","../../src/components/organisms/OakPrimaryNavItem/OakPrimaryNavItem.tsx","../../src/components/molecules/OakBulletList/OakBulletList.tsx","../../src/components/molecules/OakLessonInfoCard/OakLessonInfoCard.tsx","../../src/components/molecules/OakCheckBox/OakCheckBox.tsx","../../src/components/molecules/OakDraggableFeedback/OakDraggableFeedback.tsx","../../src/components/molecules/OakFieldError/OakFieldError.tsx","../../src/components/organisms/pupil/OakLessonVideoTranscript/OakLessonVideoTranscript.tsx","../../src/components/molecules/OakModal/OakModalBody.tsx","../../src/components/molecules/OakModal/OakModalFooter.tsx","../../src/components/organisms/OakPrimaryNav/OakPrimaryNav.tsx","../../src/components/organisms/pupil/OakQuizTextInput/OakQuizTextInput.tsx","../../src/components/molecules/OakSecondaryButton/OakSecondaryButton.tsx","../../src/components/organisms/OakSubjectIcon/OakSubjectIcon.tsx","../../src/components/atoms/OakThemeProvider/OakThemeProvider.tsx","../../src/styles/theme/default.theme.ts"],"sourcesContent":["/******************************************************************************\r\nCopyright (c) Microsoft Corporation.\r\n\r\nPermission to use, copy, modify, and/or distribute this software for any\r\npurpose with or without fee is hereby granted.\r\n\r\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\r\nREGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\r\nAND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\r\nINDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\r\nLOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\r\nOTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\r\nPERFORMANCE OF THIS SOFTWARE.\r\n***************************************************************************** */\r\n/* global Reflect, Promise, SuppressedError, Symbol */\r\n\r\nvar extendStatics = function(d, b) {\r\n extendStatics = Object.setPrototypeOf ||\r\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\r\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\r\n return extendStatics(d, b);\r\n};\r\n\r\nexport function __extends(d, b) {\r\n if (typeof b !== \"function\" && b !== null)\r\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\r\n extendStatics(d, b);\r\n function __() { this.constructor = d; }\r\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n}\r\n\r\nexport var __assign = function() {\r\n __assign = Object.assign || function __assign(t) {\r\n for (var s, i = 1, n = arguments.length; i < n; i++) {\r\n s = arguments[i];\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\r\n }\r\n return t;\r\n }\r\n return __assign.apply(this, arguments);\r\n}\r\n\r\nexport function __rest(s, e) {\r\n var t = {};\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\r\n t[p] = s[p];\r\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\r\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\r\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\r\n t[p[i]] = s[p[i]];\r\n }\r\n return t;\r\n}\r\n\r\nexport function __decorate(decorators, target, key, desc) {\r\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\r\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\r\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\r\n return c > 3 && r && Object.defineProperty(target, key, r), r;\r\n}\r\n\r\nexport function __param(paramIndex, decorator) {\r\n return function (target, key) { decorator(target, key, paramIndex); }\r\n}\r\n\r\nexport function __esDecorate(ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) {\r\n function accept(f) { if (f !== void 0 && typeof f !== \"function\") throw new TypeError(\"Function expected\"); return f; }\r\n var kind = contextIn.kind, key = kind === \"getter\" ? \"get\" : kind === \"setter\" ? \"set\" : \"value\";\r\n var target = !descriptorIn && ctor ? contextIn[\"static\"] ? ctor : ctor.prototype : null;\r\n var descriptor = descriptorIn || (target ? Object.getOwnPropertyDescriptor(target, contextIn.name) : {});\r\n var _, done = false;\r\n for (var i = decorators.length - 1; i >= 0; i--) {\r\n var context = {};\r\n for (var p in contextIn) context[p] = p === \"access\" ? {} : contextIn[p];\r\n for (var p in contextIn.access) context.access[p] = contextIn.access[p];\r\n context.addInitializer = function (f) { if (done) throw new TypeError(\"Cannot add initializers after decoration has completed\"); extraInitializers.push(accept(f || null)); };\r\n var result = (0, decorators[i])(kind === \"accessor\" ? { get: descriptor.get, set: descriptor.set } : descriptor[key], context);\r\n if (kind === \"accessor\") {\r\n if (result === void 0) continue;\r\n if (result === null || typeof result !== \"object\") throw new TypeError(\"Object expected\");\r\n if (_ = accept(result.get)) descriptor.get = _;\r\n if (_ = accept(result.set)) descriptor.set = _;\r\n if (_ = accept(result.init)) initializers.unshift(_);\r\n }\r\n else if (_ = accept(result)) {\r\n if (kind === \"field\") initializers.unshift(_);\r\n else descriptor[key] = _;\r\n }\r\n }\r\n if (target) Object.defineProperty(target, contextIn.name, descriptor);\r\n done = true;\r\n};\r\n\r\nexport function __runInitializers(thisArg, initializers, value) {\r\n var useValue = arguments.length > 2;\r\n for (var i = 0; i < initializers.length; i++) {\r\n value = useValue ? initializers[i].call(thisArg, value) : initializers[i].call(thisArg);\r\n }\r\n return useValue ? value : void 0;\r\n};\r\n\r\nexport function __propKey(x) {\r\n return typeof x === \"symbol\" ? x : \"\".concat(x);\r\n};\r\n\r\nexport function __setFunctionName(f, name, prefix) {\r\n if (typeof name === \"symbol\") name = name.description ? \"[\".concat(name.description, \"]\") : \"\";\r\n return Object.defineProperty(f, \"name\", { configurable: true, value: prefix ? \"\".concat(prefix, \" \", name) : name });\r\n};\r\n\r\nexport function __metadata(metadataKey, metadataValue) {\r\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(metadataKey, metadataValue);\r\n}\r\n\r\nexport function __awaiter(thisArg, _arguments, P, generator) {\r\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\r\n return new (P || (P = Promise))(function (resolve, reject) {\r\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\r\n step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n });\r\n}\r\n\r\nexport function __generator(thisArg, body) {\r\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\r\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\r\n function verb(n) { return function (v) { return step([n, v]); }; }\r\n function step(op) {\r\n if (f) throw new TypeError(\"Generator is already executing.\");\r\n while (g && (g = 0, op[0] && (_ = 0)), _) try {\r\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\r\n if (y = 0, t) op = [op[0] & 2, t.value];\r\n switch (op[0]) {\r\n case 0: case 1: t = op; break;\r\n case 4: _.label++; return { value: op[1], done: false };\r\n case 5: _.label++; y = op[1]; op = [0]; continue;\r\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\r\n default:\r\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\r\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\r\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\r\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\r\n if (t[2]) _.ops.pop();\r\n _.trys.pop(); continue;\r\n }\r\n op = body.call(thisArg, _);\r\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\r\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\r\n }\r\n}\r\n\r\nexport var __createBinding = Object.create ? (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n var desc = Object.getOwnPropertyDescriptor(m, k);\r\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\r\n desc = { enumerable: true, get: function() { return m[k]; } };\r\n }\r\n Object.defineProperty(o, k2, desc);\r\n}) : (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n o[k2] = m[k];\r\n});\r\n\r\nexport function __exportStar(m, o) {\r\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p);\r\n}\r\n\r\nexport function __values(o) {\r\n var s = typeof Symbol === \"function\" && Symbol.iterator, m = s && o[s], i = 0;\r\n if (m) return m.call(o);\r\n if (o && typeof o.length === \"number\") return {\r\n next: function () {\r\n if (o && i >= o.length) o = void 0;\r\n return { value: o && o[i++], done: !o };\r\n }\r\n };\r\n throw new TypeError(s ? \"Object is not iterable.\" : \"Symbol.iterator is not defined.\");\r\n}\r\n\r\nexport function __read(o, n) {\r\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\r\n if (!m) return o;\r\n var i = m.call(o), r, ar = [], e;\r\n try {\r\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\r\n }\r\n catch (error) { e = { error: error }; }\r\n finally {\r\n try {\r\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\r\n }\r\n finally { if (e) throw e.error; }\r\n }\r\n return ar;\r\n}\r\n\r\n/** @deprecated */\r\nexport function __spread() {\r\n for (var ar = [], i = 0; i < arguments.length; i++)\r\n ar = ar.concat(__read(arguments[i]));\r\n return ar;\r\n}\r\n\r\n/** @deprecated */\r\nexport function __spreadArrays() {\r\n for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;\r\n for (var r = Array(s), k = 0, i = 0; i < il; i++)\r\n for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)\r\n r[k] = a[j];\r\n return r;\r\n}\r\n\r\nexport function __spreadArray(to, from, pack) {\r\n if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {\r\n if (ar || !(i in from)) {\r\n if (!ar) ar = Array.prototype.slice.call(from, 0, i);\r\n ar[i] = from[i];\r\n }\r\n }\r\n return to.concat(ar || Array.prototype.slice.call(from));\r\n}\r\n\r\nexport function __await(v) {\r\n return this instanceof __await ? (this.v = v, this) : new __await(v);\r\n}\r\n\r\nexport function __asyncGenerator(thisArg, _arguments, generator) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var g = generator.apply(thisArg, _arguments || []), i, q = [];\r\n return i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i;\r\n function verb(n) { if (g[n]) i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }\r\n function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }\r\n function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }\r\n function fulfill(value) { resume(\"next\", value); }\r\n function reject(value) { resume(\"throw\", value); }\r\n function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }\r\n}\r\n\r\nexport function __asyncDelegator(o) {\r\n var i, p;\r\n return i = {}, verb(\"next\"), verb(\"throw\", function (e) { throw e; }), verb(\"return\"), i[Symbol.iterator] = function () { return this; }, i;\r\n function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: false } : f ? f(v) : v; } : f; }\r\n}\r\n\r\nexport function __asyncValues(o) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var m = o[Symbol.asyncIterator], i;\r\n return m ? m.call(o) : (o = typeof __values === \"function\" ? __values(o) : o[Symbol.iterator](), i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i);\r\n function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }\r\n function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }\r\n}\r\n\r\nexport function __makeTemplateObject(cooked, raw) {\r\n if (Object.defineProperty) { Object.defineProperty(cooked, \"raw\", { value: raw }); } else { cooked.raw = raw; }\r\n return cooked;\r\n};\r\n\r\nvar __setModuleDefault = Object.create ? (function(o, v) {\r\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\r\n}) : function(o, v) {\r\n o[\"default\"] = v;\r\n};\r\n\r\nexport function __importStar(mod) {\r\n if (mod && mod.__esModule) return mod;\r\n var result = {};\r\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\r\n __setModuleDefault(result, mod);\r\n return result;\r\n}\r\n\r\nexport function __importDefault(mod) {\r\n return (mod && mod.__esModule) ? mod : { default: mod };\r\n}\r\n\r\nexport function __classPrivateFieldGet(receiver, state, kind, f) {\r\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a getter\");\r\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot read private member from an object whose class did not declare it\");\r\n return kind === \"m\" ? f : kind === \"a\" ? f.call(receiver) : f ? f.value : state.get(receiver);\r\n}\r\n\r\nexport function __classPrivateFieldSet(receiver, state, value, kind, f) {\r\n if (kind === \"m\") throw new TypeError(\"Private method is not writable\");\r\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a setter\");\r\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot write private member to an object whose class did not declare it\");\r\n return (kind === \"a\" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;\r\n}\r\n\r\nexport function __classPrivateFieldIn(state, receiver) {\r\n if (receiver === null || (typeof receiver !== \"object\" && typeof receiver !== \"function\")) throw new TypeError(\"Cannot use 'in' operator on non-object\");\r\n return typeof state === \"function\" ? receiver === state : state.has(receiver);\r\n}\r\n\r\nexport function __addDisposableResource(env, value, async) {\r\n if (value !== null && value !== void 0) {\r\n if (typeof value !== \"object\" && typeof value !== \"function\") throw new TypeError(\"Object expected.\");\r\n var dispose;\r\n if (async) {\r\n if (!Symbol.asyncDispose) throw new TypeError(\"Symbol.asyncDispose is not defined.\");\r\n dispose = value[Symbol.asyncDispose];\r\n }\r\n if (dispose === void 0) {\r\n if (!Symbol.dispose) throw new TypeError(\"Symbol.dispose is not defined.\");\r\n dispose = value[Symbol.dispose];\r\n }\r\n if (typeof dispose !== \"function\") throw new TypeError(\"Object not disposable.\");\r\n env.stack.push({ value: value, dispose: dispose, async: async });\r\n }\r\n else if (async) {\r\n env.stack.push({ async: true });\r\n }\r\n return value;\r\n}\r\n\r\nvar _SuppressedError = typeof SuppressedError === \"function\" ? SuppressedError : function (error, suppressed, message) {\r\n var e = new Error(message);\r\n return e.name = \"SuppressedError\", e.error = error, e.suppressed = suppressed, e;\r\n};\r\n\r\nexport function __disposeResources(env) {\r\n function fail(e) {\r\n env.error = env.hasError ? new _SuppressedError(e, env.error, \"An error was suppressed during disposal.\") : e;\r\n env.hasError = true;\r\n }\r\n function next() {\r\n while (env.stack.length) {\r\n var rec = env.stack.pop();\r\n try {\r\n var result = rec.dispose && rec.dispose.call(rec.value);\r\n if (rec.async) return Promise.resolve(result).then(next, function(e) { fail(e); return next(); });\r\n }\r\n catch (e) {\r\n fail(e);\r\n }\r\n }\r\n if (env.hasError) throw env.error;\r\n }\r\n return next();\r\n}\r\n\r\nexport default {\r\n __extends: __extends,\r\n __assign: __assign,\r\n __rest: __rest,\r\n __decorate: __decorate,\r\n __param: __param,\r\n __metadata: __metadata,\r\n __awaiter: __awaiter,\r\n __generator: __generator,\r\n __createBinding: __createBinding,\r\n __exportStar: __exportStar,\r\n __values: __values,\r\n __read: __read,\r\n __spread: __spread,\r\n __spreadArrays: __spreadArrays,\r\n __spreadArray: __spreadArray,\r\n __await: __await,\r\n __asyncGenerator: __asyncGenerator,\r\n __asyncDelegator: __asyncDelegator,\r\n __asyncValues: __asyncValues,\r\n __makeTemplateObject: __makeTemplateObject,\r\n __importStar: __importStar,\r\n __importDefault: __importDefault,\r\n __classPrivateFieldGet: __classPrivateFieldGet,\r\n __classPrivateFieldSet: __classPrivateFieldSet,\r\n __classPrivateFieldIn: __classPrivateFieldIn,\r\n __addDisposableResource: __addDisposableResource,\r\n __disposeResources: __disposeResources,\r\n};\r\n","export const oakColorTokens = {\n white: \"#ffffff\",\n grey10: \"#f9f9f9\",\n grey20: \"#f2f2f2\",\n grey30: \"#e4e4e4\",\n grey40: \"#cacaca\",\n grey50: \"#808080\",\n grey60: \"#575757\",\n grey70: \"#2d2d2d\",\n black: \"#222222\",\n oakGreen: \"#287c34\",\n mint: \"#bef2bd\",\n mint30: \"#ebfbeb\",\n mint50: \"#dff9de\",\n mint110: \"#93e892\",\n aqua: \"#b0e2de\",\n aqua30: \"#e7f6f5\",\n aqua50: \"#cee7e5\",\n aqua110: \"#7cd8d0\",\n lavender: \"#a0b6f2\",\n lavender30: \"#e3e9fb\",\n lavender50: \"#c6d1ef\",\n lavender110: \"#7c9aec\",\n pink: \"#deb7d5\",\n pink30: \"#f5e9f2\",\n pink50: \"#e5d1e0\",\n pink110: \"#cf9cc3\",\n lemon: \"#ffe555\",\n lemon30: \"#fff7cc\",\n lemon50: \"#f6e8a0\",\n lemon110: \"#fbd60e\",\n amber: \"#ff934e\",\n amber30: \"#ffece0\",\n amber50: \"#ffc8a6\",\n red: \"#dd0035\",\n red30: \"#f8d8e0\",\n red50: \"#ee809a\",\n navy: \"#0d24c4\",\n navy110: \"#0a1d9d\",\n navy120: \"#081676\",\n blue: \"#374cf1\",\n magenta: \"#d02aa7\",\n purple: \"#845ad9\",\n teal: \"#037b7d\",\n transparent: \"transparent\",\n};\n\nexport type OakColorToken = keyof typeof oakColorTokens;\n\n/**\n *\n * Use this tool to convert Hex to color filter values https://codepen.io/sosuke/pen/Pjoqqp\n *\n */\n\nexport const oakColorFilterTokens = {\n black:\n \"invert(10%) sepia(1%) saturate(236%) hue-rotate(314deg) brightness(95%) contrast(91%)\",\n red: \"invert(13%) sepia(78%) saturate(5255%) hue-rotate(337deg) brightness(88%) contrast(111%)\",\n oakGreen:\n \"invert(37%) sepia(16%) saturate(1947%) hue-rotate(77deg) brightness(100%) contrast(88%)\",\n white:\n \"invert(98%) sepia(98%) saturate(0%) hue-rotate(328deg) brightness(102%) contrast(102%)\",\n grey40:\n \"invert(92%) sepia(0%) saturate(581%) hue-rotate(147deg) brightness(94%) contrast(80%)\",\n grey50:\n \"invert(54%) sepia(0%) saturate(38%) hue-rotate(176deg) brightness(92%) contrast(91%)\",\n navy: \"invert(21%) sepia(90%) saturate(3220%) hue-rotate(232deg) brightness(71%) contrast(127%)\",\n navy110:\n \"invert(16%) sepia(72%) saturate(7176%) hue-rotate(239deg) brightness(61%) contrast(109%)\",\n navy120:\n \"invert(12%) sepia(79%) saturate(3172%) hue-rotate(231deg) brightness(82%) contrast(114%)\",\n};\n\nexport type OakColorFilterToken = keyof typeof oakColorFilterTokens;\n\nexport const oakUiRoleTokens = [\n \"text-primary\",\n \"text-subdued\",\n \"text-error\",\n \"text-disabled\",\n \"text-link-active\",\n \"text-link-hover\",\n \"text-link-visited\",\n \"text-link-pressed\",\n \"text-inverted\",\n \"text-success\",\n \"text-warning\",\n \"bg-primary\",\n \"bg-neutral\",\n \"bg-neutral-stronger\",\n \"bg-btn-primary\",\n \"bg-btn-primary-hover\",\n \"bg-btn-primary-disabled\",\n \"bg-btn-secondary\",\n \"bg-btn-secondary-hover\",\n \"bg-btn-secondary-disabled\",\n \"bg-icon\",\n \"bg-icon-hover\",\n \"bg-decorative1-main\",\n \"bg-decorative1-subdued\",\n \"bg-decorative1-very-subdued\",\n \"bg-decorative2-main\",\n \"bg-decorative2-subdued\",\n \"bg-decorative2-very-subdued\",\n \"bg-decorative3-main\",\n \"bg-decorative3-subdued\",\n \"bg-decorative3-very-subdued\",\n \"bg-decorative4-main\",\n \"bg-decorative4-subdued\",\n \"bg-decorative4-very-subdued\",\n \"bg-decorative5-main\",\n \"bg-decorative5-subdued\",\n \"bg-decorative5-very-subdued\",\n \"bg-correct\",\n \"bg-incorrect\",\n \"icon-main\",\n \"icon-inverted\",\n \"icon-disabled\",\n \"icon-brand\",\n \"icon-success\",\n \"icon-error\",\n \"icon-warning\",\n \"border-primary\",\n \"border-inverted\",\n \"border-neutral\",\n \"border-neutral-lighter\",\n \"border-brand\",\n \"border-success\",\n \"border-error\",\n \"border-warning\",\n \"border-decorative1\",\n \"border-decorative1-stronger\",\n \"border-decorative2\",\n \"border-decorative2-stronger\",\n \"border-decorative3\",\n \"border-decorative3-stronger\",\n \"border-decorative4\",\n \"border-decorative4-stronger\",\n \"border-decorative5\",\n \"border-decorative5-stronger\",\n \"border-decorative6\",\n \"border-decorative6-stronger\",\n \"transparent\",\n] as const;\n\nexport type OakUiRoleToken = (typeof oakUiRoleTokens)[number];\n\nexport type UiRoleMap = Record<\n OakUiRoleToken,\n OakColorToken | null | undefined\n>;\n\nexport type OakCombinedColorToken = OakColorToken | OakUiRoleToken;\n","import {\n OakColorToken,\n OakCombinedColorToken,\n OakUiRoleToken,\n oakColorTokens,\n oakUiRoleTokens,\n} from \"@/styles/theme/color\";\nimport { PropsWithTheme } from \"@/styles/theme/theme\";\n\n/**\n * - takes any of color token\n * - if an OakColor derives and returns the corresponding css value\n * - if an OakUiRole derives returns a function that takes the current theme and returns the corresponding css value\n */\nfunction parseColor(): undefined;\nfunction parseColor(\n value?: OakCombinedColorToken | null,\n): (props: PropsWithTheme) => string;\nfunction parseColor(\n value?: OakCombinedColorToken | null,\n): ((props: PropsWithTheme) => string) | undefined;\nfunction parseColor(value?: OakCombinedColorToken | null) {\n if (value === undefined || value === null) {\n return undefined;\n }\n if (value in oakColorTokens) {\n return oakColorTokens[value as OakColorToken];\n }\n\n if (oakUiRoleTokens.includes(value as OakUiRoleToken)) {\n return ({ theme }: PropsWithTheme) => {\n const c = theme.uiColors[value as OakUiRoleToken];\n return oakColorTokens[c as OakColorToken];\n };\n }\n}\n\nexport { parseColor };\n","// @see https://stackoverflow.com/questions/47632622/typescript-and-filter-boolean\n\nexport type Truthy<T> = T extends false | \"\" | 0 | null | undefined ? never : T; // from lodash\n\n/**\n *\n * @description truthy takes a value and returns true|false with the correct type\n * It's useful, for example, when filtering out null values from an array.\n * Typescript compiler needs a hint to realise there aren't any more null values.\n * [{ foo: \"bar\" }, null]<Record | null>[].filter(truthy) // [{ foo: \"bar\"}]<Record>[]\n */\nexport function truthy<T>(value: T): value is Truthy<T> {\n return !!value;\n}\n","import {\n css,\n DefaultTheme,\n Interpolation,\n ThemedStyledProps,\n} from \"styled-components\";\n\nimport { truthy } from \"@/styles/helpers/truthy\";\nimport { PropsWithTheme } from \"@/styles/theme/theme\";\n\nconst breakpointsByName = {\n small: 750,\n large: 1280,\n};\n\nexport const breakpoints = Object.values(breakpointsByName).sort((a, b) =>\n a > b ? 1 : -1,\n);\n\nexport type BreakpointName = keyof typeof breakpointsByName;\n\nexport const getBreakpoint = (\n breakpointName: keyof typeof breakpointsByName,\n) => {\n return breakpointsByName[breakpointName];\n};\n\nexport type Device = \"mobile\" | \"tablet\" | \"desktop\";\n\nconst mediaQueries: Record<Device, string> = {\n mobile: `(max-width: ${getBreakpoint(\"small\") - 1}px)`,\n tablet: `(min-width: ${getBreakpoint(\"small\")}px and max-width: ${\n getBreakpoint(\"large\") - 1\n }px)`,\n desktop: `(min-width: ${getBreakpoint(\"large\")}px)`,\n};\n\nexport const getMediaQuery = (device: Device) => {\n return mediaQueries[device];\n};\n\nexport type ResponsiveValues<Value> = (Value | null) | (Value | null)[];\n\ntype Generic = string | number | undefined | null;\n\nexport const responsiveStyle =\n <Props, T extends Generic>(\n attr: string,\n getValues: (props: Props) => ResponsiveValues<T | undefined | null>,\n parse:\n | ((unparsed: T | undefined | null) => Generic)\n | ((\n unparsed: T | undefined | null,\n ) => (props: PropsWithTheme) => Generic) = (x) => x,\n ) =>\n (props: Props): Interpolation<ThemedStyledProps<Props, DefaultTheme>> => {\n const attrCss = (value: T | undefined | null) =>\n typeof value === \"undefined\"\n ? undefined\n : css`\n ${attr}: ${parse(value)};\n `;\n const values = getValues(props);\n if (typeof values === \"undefined\") {\n return undefined;\n }\n if (!Array.isArray(values)) {\n return css`\n ${attrCss(values)}\n `;\n }\n if (values.length === 0) {\n return [];\n }\n\n return [\n css`\n ${attrCss(values[0])}\n `,\n ...breakpoints\n .slice(0, values.length)\n .map((breakpoint, i) => {\n const value = values[i + 1]; // Values are shifted relative to breakpoints\n\n if (value === undefined) {\n return undefined;\n }\n\n return css`\n @media (min-width: ${breakpoint}px) {\n ${css`\n ${attrCss(value)}\n `}\n }\n `;\n })\n .filter(truthy),\n ];\n };\n","import { css } from \"styled-components\";\n\nimport { parseColor } from \"@/styles/helpers/parseColor\";\nimport {\n responsiveStyle,\n ResponsiveValues,\n} from \"@/styles/utils/responsiveStyle\";\nimport { OakCombinedColorToken } from \"@/styles/theme/color\";\n\n/**\n * Color token!\n */\ntype ColorToken = ResponsiveValues<OakCombinedColorToken | null>;\n\nexport type ColorStyleProps = {\n /**\n * Sets the `color` of the element.\n *\n * Accepts a color token or a responsive array of color tokens.\n */\n $color?: ColorToken;\n /**\n * Sets the `background-color` of the element.\n *\n * Accepts a color token or a responsive array of color tokens.\n */\n $background?: ColorToken;\n};\nexport const colorStyle = css<ColorStyleProps>`\n ${responsiveStyle<ColorStyleProps, OakCombinedColorToken>(\n \"color\",\n (props) => props.$color,\n parseColor,\n )}\n ${responsiveStyle<ColorStyleProps, OakCombinedColorToken>(\n \"background\",\n (props) => props.$background,\n parseColor,\n )}\n`;\n","const BASE_FONT_SIZE_PX = 16;\nexport const REM_DP = 3;\n\nexport default function pxToRem(px: number): number {\n return Number((px / BASE_FONT_SIZE_PX).toFixed(REM_DP));\n}\n","export const oakAllSpacingTokens = {\n \"all-spacing-0\": 0,\n \"all-spacing-1\": 4,\n \"all-spacing-2\": 8,\n \"all-spacing-3\": 12,\n \"all-spacing-4\": 16,\n \"all-spacing-5\": 20,\n \"all-spacing-6\": 24,\n \"all-spacing-7\": 32,\n \"all-spacing-8\": 40,\n \"all-spacing-9\": 48,\n \"all-spacing-10\": 56,\n \"all-spacing-11\": 64,\n \"all-spacing-12\": 72,\n \"all-spacing-13\": 80,\n \"all-spacing-14\": 92,\n \"all-spacing-15\": 100,\n \"all-spacing-16\": 120,\n \"all-spacing-17\": 160,\n \"all-spacing-18\": 180,\n \"all-spacing-19\": 240,\n \"all-spacing-20\": 360,\n \"all-spacing-21\": 480,\n \"all-spacing-22\": 640,\n \"all-spacing-23\": 960,\n \"all-spacing-24\": 1280,\n};\n\nexport type OakAllSpacingToken = keyof typeof oakAllSpacingTokens;\n\nexport const oakInnerPaddingTokens = {\n \"inner-padding-none\": \"all-spacing-0\",\n \"inner-padding-ssx\": \"all-spacing-1\",\n \"inner-padding-xs\": \"all-spacing-2\",\n \"inner-padding-s\": \"all-spacing-3\",\n \"inner-padding-m\": \"all-spacing-4\",\n \"inner-padding-l\": \"all-spacing-5\",\n \"inner-padding-xl\": \"all-spacing-6\",\n};\n\nexport type OakInnerPaddingToken = keyof typeof oakInnerPaddingTokens;\n\nexport const oakSpaceBetweenTokens = {\n \"space-between-none\": \"all-spacing-0\",\n \"space-between-sssx\": \"all-spacing-1\",\n \"space-between-ssx\": \"all-spacing-2\",\n \"space-between-xs\": \"all-spacing-3\",\n \"space-between-s\": \"all-spacing-4\",\n \"space-between-m\": \"all-spacing-6\",\n \"space-between-m2\": \"all-spacing-7\",\n \"space-between-l\": \"all-spacing-9\",\n \"space-between-xl\": \"all-spacing-10\",\n \"space-between-xxl\": \"all-spacing-12\",\n \"space-between-xxxl\": \"all-spacing-13\",\n};\n\nexport type OakSpaceBetweenToken = keyof typeof oakSpaceBetweenTokens;\n\ntype AdditionalSpacingTypes =\n | \"100%\"\n | 0\n | \"100vh\"\n | \"100vw\"\n | \"auto\"\n | \"fit-content\"\n | \"max-content\"\n | \"min-content\"\n | \"inherit\"\n | \"initial\"\n | \"unset\";\n\nexport type OakCombinedSpacingToken =\n | OakAllSpacingToken\n | OakInnerPaddingToken\n | OakSpaceBetweenToken\n | AdditionalSpacingTypes;\n","import pxToRem from \"@/styles/helpers/pxToRem\";\nimport {\n OakAllSpacingToken,\n OakInnerPaddingToken,\n OakSpaceBetweenToken,\n OakCombinedSpacingToken,\n oakAllSpacingTokens,\n oakInnerPaddingTokens,\n oakSpaceBetweenTokens,\n} from \"@/styles/theme/spacing\";\n\n/**\n * - takes any of OakInnerPadding, OakSpaceBetween, OakAllSpacing, and other accepted values,\n * - derives and returns the corresponding css value\n * - converting to rem where necessary\n */\nexport function parseSpacing(value?: OakCombinedSpacingToken | null) {\n // if value is null or undefined, return undefined\n if (value === undefined || value === null) {\n return undefined;\n }\n\n // mapped values\n if (value in oakAllSpacingTokens) {\n return `${pxToRem(oakAllSpacingTokens[value as OakAllSpacingToken])}rem`; // NB. type assertion is necessary because the OakAllSpacing type is dervied from oakAllSpacingPx\n }\n\n if (value in oakInnerPaddingTokens) {\n const v = oakInnerPaddingTokens[value as OakInnerPaddingToken];\n return `${pxToRem(oakAllSpacingTokens[v as OakAllSpacingToken])}rem`;\n }\n\n if (value in oakSpaceBetweenTokens) {\n const v = oakSpaceBetweenTokens[value as OakSpaceBetweenToken];\n return `${pxToRem(oakAllSpacingTokens[v as OakAllSpacingToken])}rem`;\n }\n\n // value is a number, percentage or css value\n return value;\n}\n","import { CSSProperties } from \"react\";\nimport { css } from \"styled-components\";\n\nimport {\n responsiveStyle,\n ResponsiveValues,\n} from \"@/styles/utils/responsiveStyle\";\nimport {\n OakAllSpacingToken,\n OakSpaceBetweenToken,\n} from \"@/styles/theme/spacing\";\nimport { parseSpacing } from \"@/styles/helpers/parseSpacing\";\n\ntype PositionSpacing =\n | OakAllSpacingToken\n | OakSpaceBetweenToken\n | null\n | undefined;\n\nexport type PositionStyleProps = {\n /**\n * Sets the `position` CSS property of the element.\n *\n * Accepts a `position` value or a responsive array of `position` values. Can be nulled.\n */\n $position?: ResponsiveValues<CSSProperties[\"position\"]>;\n /**\n * Sets the `top` CSS property of the element.\n *\n * Accepts a spacing token or a responsive array of spacing tokens. Can be nulled.\n */\n $top?: ResponsiveValues<PositionSpacing>;\n /**\n * Sets the `right` CSS property of the element.\n *\n * Accepts a spacing token or a responsive array of spacing tokens. Can be nulled.\n */\n $right?: ResponsiveValues<PositionSpacing>;\n /**\n * Sets the `bottom` CSS property of the element.\n *\n * Accepts a spacing token or a responsive array of spacing tokens. Can be nulled.\n */\n $bottom?: ResponsiveValues<PositionSpacing>;\n /**\n * Sets the `left` CSS property of the element.\n *\n * Accepts a spacing token or a responsive array of spacing tokens. Can be nulled.\n */\n $left?: ResponsiveValues<PositionSpacing>;\n /**\n * Sets the `inset` CSS property of the element.\n *\n * Accepts a spacing token or a responsive array of spacing tokens. Can be nulled.\n */\n $inset?: ResponsiveValues<PositionSpacing>;\n /**\n * Sets the `overflow` CSS property of the element.\n *\n * Accepts an `overflow` value or a responsive array of `overflow` values.\n */\n $overflow?: ResponsiveValues<CSSProperties[\"overflow\"]>;\n /**\n * Sets the `overflow-x` CSS property of the element.\n *\n * Accepts an `overflow-x` value or a responsive array of `overflow-x` values.\n */\n $overflowX?: ResponsiveValues<CSSProperties[\"overflowX\"]>;\n /**\n * Sets the `overflow-y` CSS property of the element.\n *\n * Accepts an `overflow-y` value or a responsive array of `overflow-y` values.\n */\n $overflowY?: ResponsiveValues<CSSProperties[\"overflowY\"]>;\n /**\n * Sets the `object-fit` CSS property of the element.\n *\n * Accepts an `object-fit` value or a responsive array of `object-fit` values.\n */\n $objectFit?: ResponsiveValues<CSSProperties[\"objectFit\"]>;\n /**\n * Sets the `pointer-events` CSS property of the element.\n *\n * Accepts a `pointer-events` value or a responsive array of `pointer-events` values.\n */\n $pointerEvents?: ResponsiveValues<CSSProperties[\"pointerEvents\"]>;\n /**\n * Sets the `visibility` CSS property of the element.\n *\n * Accepts a `visibility` value or a responsive array of `visibility` values.\n */\n $visibility?: ResponsiveValues<CSSProperties[\"visibility\"]>;\n};\n\nexport const positionStyle = css<PositionStyleProps>`\n ${responsiveStyle(\"position\", (props) => props.$position)}\n ${responsiveStyle(\"top\", (props) => props.$top, parseSpacing)} \n ${responsiveStyle(\"right\", (props) => props.$right, parseSpacing)} \n ${responsiveStyle(\"bottom\", (props) => props.$bottom, parseSpacing)} \n ${responsiveStyle(\"left\", (props) => props.$left, parseSpacing)} \n ${responsiveStyle(\"inset\", (props) => props.$inset, parseSpacing)} \n ${responsiveStyle(\"overflow\", (props) => props.$overflow)}\n ${responsiveStyle(\"overflow-x\", (props) => props.$overflowX)}\n ${responsiveStyle(\"overflow-y\", (props) => props.$overflowY)}\n ${responsiveStyle(\"object-fit\", (props) => props.$objectFit)}\n ${responsiveStyle(\"pointer-events\", (props) => props.$pointerEvents)}\n ${responsiveStyle(\"visibility\", (props) => props.$visibility)}\n`;\n","import { css, CSSProperties } from \"styled-components\";\n\nimport {\n responsiveStyle,\n ResponsiveValues,\n} from \"@/styles/utils/responsiveStyle\";\nimport { OakCombinedSpacingToken } from \"@/styles/theme/spacing\";\nimport { parseSpacing } from \"@/styles/helpers/parseSpacing\";\n\ntype SizeValues = ResponsiveValues<OakCombinedSpacingToken | null | undefined>;\n\nexport type SizeStyleProps = {\n /**\n * Sets the `width` CSS property of the element.\n *\n * Accepts a spacing token or a responsive array of spacing tokens. Can be nulled.\n */\n $width?: SizeValues;\n /**\n * Sets the `min-width` CSS property of the element.\n *\n * Accepts a spacing token or a responsive array of spacing tokens. Can be nulled.\n */\n $minWidth?: SizeValues;\n /**\n * Sets the `max-width` CSS property of the element.\n *\n * Accepts a spacing token or a responsive array of spacing tokens. Can be nulled.\n */\n $maxWidth?: SizeValues;\n /**\n * Sets the `height` CSS property of the element.\n *\n * Accepts a spacing token or a responsive array of spacing tokens. Can be nulled.\n */\n $height?: SizeValues;\n /**\n * Sets the `min-height` CSS property of the element.\n *\n * Accepts a spacing token or a responsive array of spacing tokens. Can be nulled.\n */\n $minHeight?: SizeValues;\n /**\n * Sets the `max-height` CSS property of the element.\n *\n * Accepts a spacing token or a responsive array of spacing tokens. Can be nulled.\n */\n $maxHeight?: SizeValues;\n /**\n * Sets the `aspect-ratio` CSS property of the element.\n *\n * Accepts an `aspect-ratio` value or a responsive array of `aspect-ratio` values.\n */\n $aspectRatio?: ResponsiveValues<CSSProperties[\"aspectRatio\"]>;\n /**\n * Sets the `box-sizing` CSS property of the element.\n *\n * Accepts a `box-sizing` value or a responsive array of `box-sizing` values.\n */\n $boxSizing?: ResponsiveValues<CSSProperties[\"boxSizing\"]>;\n};\n\nexport const sizeStyle = css<SizeStyleProps>`\n ${responsiveStyle(\"width\", (props) => props.$width, parseSpacing)}\n ${responsiveStyle(\"min-width\", (props) => props.$minWidth, parseSpacing)}\n ${responsiveStyle(\"max-width\", (props) => props.$maxWidth, parseSpacing)}\n ${responsiveStyle(\"height\", (props) => props.$height, parseSpacing)}\n ${responsiveStyle(\"min-height\", (props) => props.$minHeight, parseSpacing)}\n ${responsiveStyle(\"max-height\", (props) => props.$maxHeight, parseSpacing)}\n ${responsiveStyle(\"aspect-ratio\", (props) => props.$aspectRatio)}\n ${responsiveStyle(\"box-sizing\", (props) => props.$boxSizing)}\n`;\n","import { css } from \"styled-components\";\n\nimport {\n responsiveStyle,\n ResponsiveValues,\n} from \"@/styles/utils/responsiveStyle\";\nimport { parseSpacing } from \"@/styles/helpers/parseSpacing\";\nimport {\n OakInnerPaddingToken,\n OakSpaceBetweenToken,\n} from \"@/styles/theme/spacing\";\n\ntype PaddingValues = ResponsiveValues<OakInnerPaddingToken | null | undefined>;\n\nexport type PaddingStyleProps = {\n /**\n * Applies `padding` to all sides of the element\n *\n * Accepts an inner padding token or a responsive array of inner padding tokens. Can be nulled.\n */\n $pa?: PaddingValues;\n /**\n * Applies `padding` to the left and right of the element\n *\n * Accepts an inner padding token or a responsive array of inner padding tokens. Can be nulled.\n */\n $ph?: PaddingValues;\n /**\n * Applies `padding` to the top and bottom of the element\n *\n * Accepts an inner padding token or a responsive array of inner padding tokens. Can be nulled.\n */\n $pv?: PaddingValues;\n /**\n * Applies `padding` to the left of the element\n *\n * Accepts an inner padding token or a responsive array of inner padding tokens. Can be nulled.\n */\n $pl?: PaddingValues;\n /**\n * Applies `padding` to the right of the element\n *\n * Accepts an inner padding token or a responsive array of inner padding tokens. Can be nulled.\n */\n $pr?: PaddingValues;\n /**\n * Applies `padding` to the top of the element\n *\n * Accepts an inner padding token or a responsive array of inner padding tokens. Can be nulled.\n */\n $pt?: PaddingValues;\n /**\n * Applies `padding` to the bottom of the element\n *\n * Accepts an inner padding token or a responsive array of inner padding tokens. Can be nulled.\n */\n $pb?: PaddingValues;\n};\n\ntype MarginValue = \"auto\" | OakSpaceBetweenToken | null | undefined;\ntype MarginValues = ResponsiveValues<MarginValue>;\n\nexport type MarginStyleProps = {\n /**\n * Applies `margin` to all sides of the element\n *\n * Accepts a space between token or a responsive array of space between tokens. Can be nulled.\n */\n $ma?: MarginValues;\n /**\n * Applies `margin` to the left and right of the element\n *\n * Accepts a space between token or a responsive array of space between tokens. Can be nulled.\n */\n $mh?: MarginValues;\n /**\n * Applies `margin` to the top and bottom of the element\n *\n * Accepts a space between token or a responsive array of space between tokens. Can be nulled.\n */\n $mv?: MarginValues;\n /**\n * Applies `margin` to the left of the element\n *\n * Accepts a space between token or a responsive array of space between tokens. Can be nulled.\n */\n $ml?: MarginValues;\n /**\n * Applies `margin` to the right of the element\n *\n * Accepts a space between token or a responsive array of space between tokens. Can be nulled.\n */\n $mr?: MarginValues;\n /**\n * Applies `margin` to the top of the element\n *\n * Accepts a space between token or a responsive array of space between tokens. Can be nulled.\n */\n $mt?: MarginValues;\n /**\n * Applies `margin` to the bottom of the element\n *\n * Accepts a space between token or a responsive array of space between tokens. Can be nulled.\n */\n $mb?: MarginValues;\n};\n\nconst paddingAll = css<{ $pa?: PaddingValues }>`\n ${responsiveStyle(\"padding\", (props) => props.$pa, parseSpacing)}\n`;\nconst paddingHorizontal = css<{ $ph?: PaddingValues }>`\n ${responsiveStyle(\"padding-left\", (props) => props.$ph, parseSpacing)}\n ${responsiveStyle(\"padding-right\", (props) => props.$ph, parseSpacing)}\n`;\nconst paddingVertical = css<{ $pv?: PaddingValues }>`\n ${responsiveStyle(\"padding-top\", (props) => props.$pv, parseSpacing)}\n ${responsiveStyle(\"padding-bottom\", (props) => props.$pv, parseSpacing)}\n`;\nconst paddingLeft = css<{ $pl?: PaddingValues }>`\n ${responsiveStyle(\"padding-left\", (props) => props.$pl, parseSpacing)}\n`;\nconst paddingRight = css<{ $pr?: PaddingValues }>`\n ${responsiveStyle(\"padding-right\", (props) => props.$pr, parseSpacing)}\n`;\nconst paddingTop = css<{ $pt?: PaddingValues }>`\n ${responsiveStyle(\"padding-top\", (props) => props.$pt, parseSpacing)}\n`;\nconst paddingBottom = css<{ $pb?: PaddingValues }>`\n ${responsiveStyle(\"padding-bottom\", (props) => props.$pb, parseSpacing)}\n`;\nconst marginAll = css<{ $ma?: MarginValues }>`\n ${responsiveStyle(\"margin\", (props) => props.$ma, parseSpacing)}\n`;\nconst marginHorizontal = css<{ $mh?: MarginValues }>`\n ${responsiveStyle(\"margin-left\", (props) => props.$mh, parseSpacing)}\n ${responsiveStyle(\"margin-right\", (props) => props.$mh, parseSpacing)}\n`;\nconst marginVertical = css<{ $mv?: MarginValues }>`\n ${responsiveStyle(\"margin-top\", (props) => props.$mv, parseSpacing)}\n ${responsiveStyle(\"margin-bottom\", (props) => props.$mv, parseSpacing)}\n`;\nconst marginLeft = css<{ $ml?: MarginValues }>`\n ${responsiveStyle(\"margin-left\", (props) => props.$ml, parseSpacing)}\n`;\nconst marginRight = css<{ $mr?: MarginValues }>`\n ${responsiveStyle(\"margin-right\", (props) => props.$mr, parseSpacing)}\n`;\nconst marginTop = css<{ $mt?: MarginValues }>`\n ${responsiveStyle(\"margin-top\", (props) => props.$mt, parseSpacing)}\n`;\nconst marginBottom = css<{ $mb?: MarginValues }>`\n ${responsiveStyle(\"margin-bottom\", (props) => props.$mb, parseSpacing)}\n`;\n\nexport const marginStyle = css<MarginStyleProps>`\n ${marginAll}\n ${marginHorizontal}\n ${marginVertical}\n ${marginLeft}\n ${marginRight}\n ${marginTop}\n ${marginBottom}\n`;\n\nexport const paddingStyle = css<PaddingStyleProps>`\n ${paddingAll}\n ${paddingHorizontal}\n ${paddingVertical}\n ${paddingLeft}\n ${paddingRight}\n ${paddingTop}\n ${paddingBottom}\n`;\n\nexport type SpacingStyleProps = PaddingStyleProps & MarginStyleProps;\nexport const spacingStyle = css<SpacingStyleProps>`\n ${paddingStyle}\n ${marginStyle}\n`;\n","export const oakBorderWidthTokens = {\n \"border-solid-none\": 0,\n \"border-solid-s\": 1,\n \"border-solid-m\": 2,\n \"border-solid-l\": 3,\n \"border-solid-xl\": 4,\n};\n\nexport const oakBorderRadiusTokens = {\n \"border-radius-square\": 0,\n \"border-radius-xs\": 2,\n \"border-radius-s\": 4,\n \"border-radius-m\": 6,\n \"border-radius-m2\": 8,\n \"border-radius-l\": 16,\n \"border-radius-xl\": 24,\n \"border-radius-circle\": 100,\n};\n\nexport type OakBorderRadiusToken = keyof typeof oakBorderRadiusTokens;\nexport type OakBorderWidthToken = keyof typeof oakBorderWidthTokens;\n","import {\n OakBorderWidthToken,\n oakBorderWidthTokens,\n} from \"@/styles/theme/borders\";\nimport pxToRem from \"@/styles/helpers/pxToRem\";\n\nexport const parseBorder = (value?: OakBorderWidthToken | null) => {\n if (value === undefined || value === null) {\n return undefined;\n }\n if (value in oakBorderWidthTokens) {\n return `${pxToRem(\n oakBorderWidthTokens[value as OakBorderWidthToken],\n )}rem solid`;\n }\n};\n","import pxToRem from \"./pxToRem\";\n\nimport {\n OakBorderRadiusToken,\n oakBorderRadiusTokens,\n} from \"@/styles/theme/borders\";\n\nexport const parseBorderRadius = (value?: OakBorderRadiusToken | null) => {\n if (value === undefined || value === null) {\n return undefined;\n }\n if (value in oakBorderRadiusTokens) {\n return `${pxToRem(\n oakBorderRadiusTokens[value as OakBorderRadiusToken],\n )}rem`;\n }\n};\n","import { CSSProperties, css } from \"styled-components\";\n\nimport {\n OakBorderRadiusToken,\n OakBorderWidthToken,\n} from \"@/styles/theme/borders\";\nimport { OakCombinedColorToken } from \"@/styles/theme/color\";\nimport { parseColor } from \"@/styles/helpers/parseColor\";\nimport { parseBorder } from \"@/styles/helpers/parseBorder\";\nimport { parseBorderRadius } from \"@/styles/helpers/parseBorderRadius\";\nimport {\n ResponsiveValues,\n responsiveStyle,\n} from \"@/styles/utils/responsiveStyle\";\n\ntype BorderWidth = ResponsiveValues<OakBorderWidthToken>;\ntype _BorderStyleProps = ResponsiveValues<CSSProperties[\"borderStyle\"]>;\ntype BorderColorProps = ResponsiveValues<OakCombinedColorToken>;\ntype BorderRadiusProps = ResponsiveValues<OakBorderRadiusToken>;\n\nexport type BorderStyleProps = {\n /**\n * Apply border on all sides\n *\n * Accepts a border-width token or a responsive array of border-width tokens\n */\n $ba?: BorderWidth;\n /**\n * Apply border to the top\n *\n * Accepts a border-width token or a responsive array of border-width tokens\n */\n $bt?: BorderWidth;\n /**\n * Apply border to the right\n *\n * Accepts a border-width token or a responsive array of border-width tokens\n */\n $br?: BorderWidth;\n /**\n * Apply border to the bottom\n *\n * Accepts a border-width token or a responsive array of border-width tokens\n */\n $bb?: BorderWidth;\n /**\n * Apply border to the left\n *\n * Accepts a border-width token or a responsive array of border-width tokens\n */\n $bl?: BorderWidth;\n /**\n * Apply border to the left and right\n *\n * Accepts a border-width token or a responsive array of border-width tokens\n */\n $bh?: BorderWidth;\n /**\n * Apply border to the top and bottom\n *\n * Accepts a border-width token or a responsive array of border-width tokens\n */\n $bv?: BorderWidth;\n /**\n * Apply `border-style` to the element\n *\n * Accepts a single value or a responsive array of values.\n */\n $borderStyle?: _BorderStyleProps;\n /**\n * Apply a border color to all sides of the element\n *\n * Accepts a color token or a responsive array of color tokens.\n */\n $borderColor?: BorderColorProps;\n $borderRadius?: BorderRadiusProps;\n /**\n * Apply border radius to the top left\n *\n * Accepts an `OakBorderRadiusToken` or a responsive array of `OakBorderRadiusToken`s.\n */\n $btlr?: BorderRadiusProps;\n /**\n * Apply border radius to the top right\n *\n * Accepts a border-radius token or a responsive array of border-radius tokens.\n */\n $btrr?: BorderRadiusProps;\n /**\n * Apply border radius to the bottom left\n *\n * Accepts a border-radius token or a responsive array of border-radius tokens.\n */\n $bblr?: BorderRadiusProps;\n /**\n * Apply border radius to the bottom right\n *\n * Accepts a border-radius token or a responsive array of border-radius tokens.\n */\n $bbrr?: BorderRadiusProps;\n /**\n * Apply border radius to the top right and top left\n *\n * Accepts a border-radius token or a responsive array of border-radius tokens.\n */\n $btr?: BorderRadiusProps;\n /**\n * Apply border radius to the bottom right and bottom left\n *\n * Accepts a border-radius token or a responsive array of border-radius tokens\n */\n $bbr?: BorderRadiusProps;\n};\n\nconst borderAll = css<{ $ba?: BorderWidth }>`\n ${responsiveStyle(\"border\", (props) => props.$ba, parseBorder)}\n`;\nconst borderTop = css<{ $bt?: BorderWidth }>`\n ${responsiveStyle(\"border-top\", (props) => props.$bt, parseBorder)}\n`;\nconst borderRight = css<{ $br?: BorderWidth }>`\n ${responsiveStyle(\"border-right\", (props) => props.$br, parseBorder)}\n`;\nconst borderBottom = css<{ $bb?: BorderWidth }>`\n ${responsiveStyle(\"border-bottom\", (props) => props.$bb, parseBorder)}\n`;\nconst borderLeft = css<{ $bl?: BorderWidth }>`\n ${responsiveStyle(\"border-left\", (props) => props.$bl, parseBorder)}\n`;\nconst borderHorizontal = css<{ $bh?: BorderWidth }>`\n ${responsiveStyle(\"border-left\", (props) => props.$bh, parseBorder)}\n ${responsiveStyle(\"border-right\", (props) => props.$bh, parseBorder)}\n`;\nconst borderVertical = css<{ $bv?: BorderWidth }>`\n ${responsiveStyle(\"border-top\", (props) => props.$bv, parseBorder)}\n ${responsiveStyle(\"border-bottom\", (props) => props.$bv, parseBorder)}\n`;\nconst borderColor = css<{ $borderColor?: BorderColorProps }>`\n ${responsiveStyle(\"border-color\", (props) => props.$borderColor, parseColor)}\n`;\nconst borderRadius = css<{ $borderRadius?: BorderRadiusProps }>`\n ${responsiveStyle(\n \"border-radius\",\n (props) => props.$borderRadius,\n parseBorderRadius,\n )}\n`;\nconst borderRadiusTopLeft = css<BorderStyleProps>`\n ${responsiveStyle(\n \"border-top-left-radius\",\n (props) => props.$btlr,\n parseBorderRadius,\n )}\n`;\nconst borderRadiusTopRight = css<BorderStyleProps>`\n ${responsiveStyle(\n \"border-top-right-radius\",\n (props) => props.$btrr,\n parseBorderRadius,\n )}\n`;\nconst borderRadiusBottomLeft = css<BorderStyleProps>`\n ${responsiveStyle(\n \"border-bottom-left-radius\",\n (props) => props.$bblr,\n parseBorderRadius,\n )}\n`;\nconst borderRadiusBottomRight = css<BorderStyleProps>`\n ${responsiveStyle(\n \"border-bottom-right-radius\",\n (props) => props.$bbrr,\n parseBorderRadius,\n )}\n`;\nconst borderRadiusTop = css<BorderStyleProps>`\n ${responsiveStyle(\n \"border-top-left-radius\",\n (props) => props.$btr,\n parseBorderRadius,\n )}\n ${responsiveStyle(\n \"border-top-right-radius\",\n (props) => props.$btr,\n parseBorderRadius,\n )}\n`;\nconst borderRadiusBottom = css<BorderStyleProps>`\n ${responsiveStyle(\n \"border-bottom-left-radius\",\n (props) => props.$bbr,\n parseBorderRadius,\n )}\n ${responsiveStyle(\n \"border-bottom-right-radius\",\n (props) => props.$bbr,\n parseBorderRadius,\n )}\n`;\nconst borderStrokeStyle = css<BorderStyleProps>`\n ${responsiveStyle(\"border-style\", (props) => props.$borderStyle)};\n`;\nexport const borderStyle = css<BorderStyleProps>`\n ${borderAll}\n ${borderTop}\n ${borderRight}\n ${borderBottom}\n ${borderLeft}\n ${borderHorizontal}\n ${borderVertical}\n ${borderColor}\n ${borderRadius}\n ${borderRadiusTopLeft}\n ${borderRadiusTopRight}\n ${borderRadiusBottomLeft}\n ${borderRadiusBottomRight}\n ${borderRadiusTop}\n ${borderRadiusBottom}\n ${borderStrokeStyle}\n`;\n","import { CSSProperties } from \"react\";\nimport { css } from \"styled-components\";\n\nimport {\n ResponsiveValues,\n responsiveStyle,\n} from \"@/styles/utils/responsiveStyle\";\n\nexport type DisplayStyleProps = {\n /**\n * Sets the `display` CSS property of the element.\n *\n * Accepts a `display` value or a responsive array of `display` values.\n */\n $display?: ResponsiveValues<CSSProperties[\"display\"]>;\n};\n\nexport const displayStyle = css<DisplayStyleProps>`\n ${responsiveStyle(\"display\", (props) => props.$display)}\n`;\n","export const oakDropShadowTokens = {\n \"drop-shadow-standard\": \"0 0.5rem 0.5rem rgba(92, 92, 92, 20%)\",\n \"drop-shadow-lemon\": `0.125rem 0.125rem 0 rgba(255, 229, 85, 100%)`,\n \"drop-shadow-wide-lemon\": `0.25rem 0.25rem 0 rgba(255, 229, 85, 100%)`,\n \"drop-shadow-centered-lemon\": `0 0 0 0.125rem rgba(255, 229, 85, 100%)`,\n \"drop-shadow-grey\": \"0.25rem 0.25rem 0 rgba(87, 87, 87, 100%)\",\n \"drop-shadow-centered-grey\": \"0 0 0 0.3rem rgba(87, 87, 87, 100%)\",\n};\n\nexport type OakDropShadowToken = keyof typeof oakDropShadowTokens;\n","import {\n OakDropShadowToken,\n oakDropShadowTokens,\n} from \"@/styles/theme/dropShadow\";\n\nexport const parseDropShadow = (variant?: OakDropShadowToken | null) => {\n if (variant === null) {\n return \"none\";\n }\n\n if (!variant) {\n return;\n }\n\n if (variant in oakDropShadowTokens) {\n return oakDropShadowTokens[variant as OakDropShadowToken];\n }\n};\n","import { css } from \"styled-components\";\n\nimport { OakDropShadowToken } from \"@/styles/theme/dropShadow\";\nimport { parseDropShadow } from \"@/styles/helpers/parseDropShadow\";\nimport {\n ResponsiveValues,\n responsiveStyle,\n} from \"@/styles/utils/responsiveStyle\";\n\nexport type DropShadowStyleProps = {\n /**\n * Applies a drop-shadow to the element.\n *\n * Accepts a drop-shadow token or a responsive array of drop-shadow tokens.\n */\n $dropShadow?: ResponsiveValues<OakDropShadowToken>;\n};\n\nexport const dropShadowStyle = css<DropShadowStyleProps>`\n ${responsiveStyle(\n \"box-shadow\",\n (props) => props.$dropShadow,\n parseDropShadow,\n )}\n`;\n","export const oakOpacityTokens = {\n transparent: 0,\n \"semi-transparent\": 0.25,\n \"semi-opaque\": 0.5,\n opaque: 1,\n};\n\nexport type OakOpacityToken = keyof typeof oakOpacityTokens;\n","import { OakOpacityToken, oakOpacityTokens } from \"@/styles/theme/opacity\";\n\nexport const parseOpacity = (variant?: OakOpacityToken | null) => {\n if (!variant) {\n return;\n }\n\n if (variant in oakOpacityTokens) {\n return oakOpacityTokens[variant as OakOpacityToken];\n }\n};\n","import { css } from \"styled-components\";\n\nimport { OakOpacityToken } from \"@/styles/theme/opacity\";\nimport { parseOpacity } from \"@/styles/helpers/parseOpacity\";\nimport {\n ResponsiveValues,\n responsiveStyle,\n} from \"@/styles/utils/responsiveStyle\";\n\nexport type OpacityStyleProps = {\n /**\n * Sets the `opacity` CSS property of the element.\n *\n * Accepts an opacity token or a responsive array of opacity tokens.\n */\n $opacity?: ResponsiveValues<OakOpacityToken>;\n};\n\nexport const opacityStyle = css<OpacityStyleProps>`\n ${responsiveStyle(\"opacity\", (props) => props.$opacity, parseOpacity)}\n`;\n","import { CSSProperties, css } from \"styled-components\";\n\nimport {\n ResponsiveValues,\n responsiveStyle,\n} from \"@/styles/utils/responsiveStyle\";\n\nexport type TransformStyleProps = {\n /**\n * Sets the `transform` CSS property of the element.\n *\n * Accepts a `transform` value or a responsive array of `transform` values. Can be nulled.\n */\n $transform?: ResponsiveValues<CSSProperties[\"transform\"] | null>;\n /**\n * Sets the `transform-origin` CSS property of the element.\n *\n * Accepts a `transform-origin` value or a responsive array of `transform-origin` values. Can be nulled.\n */\n $transformOrigin?: ResponsiveValues<CSSProperties[\"transformOrigin\"] | null>;\n};\n\nexport const transformStyle = css<TransformStyleProps>`\n ${responsiveStyle(\"transform\", (props) => props.$transform)}\n ${responsiveStyle(\"transform-origin\", (props) => props.$transformOrigin)}\n`;\n","export const oakTransitionTokens = {\n \"standard-ease\": \"all 0.3s ease\",\n \"standard-transform\": \"rotate(-2deg) translateY(-16px) translateX(8px)\",\n};\n\nexport type OakTransitionToken = keyof typeof oakTransitionTokens;\n","import { css } from \"styled-components\";\n\nimport { OakTransitionToken } from \"@/styles/theme/transitions\";\nimport { parseTransitions } from \"@/styles/helpers/parseTransitions\";\nimport {\n ResponsiveValues,\n responsiveStyle,\n} from \"@/styles/utils/responsiveStyle\";\n\ntype Transition = OakTransitionToken;\n\nexport type TransitionStyleProps = {\n /**\n * Sets the `transition` CSS property of the element.\n *\n * Accepts a transition token or a responsive array of transition tokens.\n */\n $transition?: ResponsiveValues<Transition>;\n};\n\nexport const transitionStyle = css<TransitionStyleProps>`\n ${responsiveStyle(\n \"transition\",\n (props) => props.$transition,\n parseTransitions,\n )}\n`;\n","import {\n OakTransitionToken,\n oakTransitionTokens,\n} from \"@/styles/theme/transitions\";\n\nexport const parseTransitions = (variant?: OakTransitionToken | null) => {\n if (!variant) {\n return;\n }\n\n if (variant in oakTransitionTokens) {\n return oakTransitionTokens[variant as OakTransitionToken];\n }\n};\n","export const oakFontSizeTokens = {\n \"font-size-1\": 12,\n \"font-size-2\": 14,\n \"font-size-3\": 16,\n \"font-size-4\": 18,\n \"font-size-5\": 20,\n \"font-size-6\": 24,\n \"font-size-7\": 32,\n \"font-size-8\": 40,\n \"font-size-9\": 48,\n \"font-size-10\": 56,\n};\nexport type OakFontSizeToken = keyof typeof oakFontSizeTokens;\n\nconst fontWeights = [300, 400, 600, 700] as const;\ntype FontWeight = (typeof fontWeights)[number];\nconst lineHeights = [16, 20, 24, 28, 32, 40, 48, 56, 64] as const;\ntype LineHeight = (typeof lineHeights)[number];\nconst letterSpacings = [\"0.0115rem\", \"-0.005rem\"] as const;\ntype LetterSpacing = (typeof letterSpacings)[number];\n\ntype FontParameters = readonly [\n OakFontSizeToken,\n LineHeight,\n FontWeight,\n LetterSpacing,\n];\n\nexport const oakFontTokens = {\n \"heading-1\": [\"font-size-10\", 64, 600, \"0.0115rem\"],\n \"heading-2\": [\"font-size-9\", 56, 600, \"0.0115rem\"],\n \"heading-3\": [\"font-size-8\", 48, 600, \"0.0115rem\"],\n \"heading-4\": [\"font-size-7\", 40, 600, \"0.0115rem\"],\n \"heading-5\": [\"font-size-6\", 32, 600, \"0.0115rem\"],\n \"heading-6\": [\"font-size-5\", 24, 600, \"0.0115rem\"],\n \"heading-7\": [\"font-size-3\", 20, 600, \"0.0115rem\"],\n \"heading-light-1\": [\"font-size-10\", 64, 400, \"0.0115rem\"],\n \"heading-light-2\": [\"font-size-9\", 56, 400, \"0.0115rem\"],\n \"heading-light-3\": [\"font-size-8\", 48, 400, \"0.0115rem\"],\n \"heading-light-4\": [\"font-size-7\", 40, 400, \"0.0115rem\"],\n \"heading-light-5\": [\"font-size-6\", 32, 400, \"0.0115rem\"],\n \"heading-light-6\": [\"font-size-5\", 24, 400, \"0.0115rem\"],\n \"heading-light-7\": [\"font-size-3\", 20, 400, \"0.0115rem\"],\n \"body-1\": [\"font-size-4\", 28, 300, \"-0.005rem\"],\n \"body-2\": [\"font-size-3\", 24, 300, \"-0.005rem\"],\n \"body-3\": [\"font-size-2\", 20, 300, \"-0.005rem\"],\n \"body-4\": [\"font-size-1\", 16, 300, \"-0.005rem\"],\n \"body-1-bold\": [\"font-size-4\", 28, 700, \"-0.005rem\"],\n \"body-2-bold\": [\"font-size-3\", 24, 700, \"-0.005rem\"],\n \"body-3-bold\": [\"font-size-2\", 20, 700, \"-0.005rem\"],\n \"list-item-1\": [\"font-size-4\", 32, 300, \"-0.005rem\"],\n \"list-item-2\": [\"font-size-3\", 24, 300, \"-0.005rem\"],\n} satisfies Record<string, FontParameters>;\n\nexport type OakFontToken = keyof typeof oakFontTokens;\n\nexport const oakTextDecorations = [\n \"underline\",\n \"overline\",\n \"line-through\",\n \"none\",\n] as const;\n\nexport const oakWhiteSpaces = [\n \"normal\",\n \"nowrap\",\n \"pre\",\n \"pre-wrap\",\n \"pre-line\",\n \"break-spaces\",\n] as const;\n\nexport const oakWordWraps = [\n \"normal\",\n \"break-word\",\n \"initial\",\n \"inherit\",\n] as const;\n\nexport const oakTextOverflows = [\"clip\", \"ellipsis\"] as const;\n\nexport type OakTextDecoration = (typeof oakTextDecorations)[number];\nexport type OakWhiteSpace = (typeof oakWhiteSpaces)[number];\nexport type OakWordWrap = (typeof oakWordWraps)[number];\nexport type OakTextOverflow = (typeof oakTextOverflows)[number];\n","import { CSSProperties, css } from \"styled-components\";\n\nimport {\n OakFontToken,\n OakTextDecoration,\n OakTextOverflow,\n OakWhiteSpace,\n OakWordWrap,\n} from \"@/styles/theme/typography\";\nimport {\n parseFontSize,\n parseFontWeight,\n parseLetterSpacing,\n parseLineHeight,\n} from \"@/styles/helpers/parseTypography\";\nimport {\n ResponsiveValues,\n responsiveStyle,\n} from \"@/styles/utils/responsiveStyle\";\n\nexport type TypographyStyleProps = {\n /**\n * Sets the `font-size`, `line-height`, `font-weight` and `letter-spacing` of the element.\n *\n * Accepts a font token or a responsive array of font tokens.\n */\n $font?: ResponsiveValues<OakFontToken>;\n /**\n * Sets the `text-decoration` CSS property of the element.\n *\n * Accepts a text-decoration token or a responsive array of text-decoration tokens.\n */\n $textDecoration?: ResponsiveValues<OakTextDecoration>;\n /**\n * Sets the `text-align` CSS property of the element.\n *\n * Accepts a `text-align` value or a responsive array of `text-align` values.\n */\n $textAlign?: ResponsiveValues<CSSProperties[\"textAlign\"]>;\n /**\n * Sets the `white-space` CSS property of the element.\n *\n * Accepts a white-space token or a responsive array of white-space tokens.\n */\n $whiteSpace?: ResponsiveValues<OakWhiteSpace>;\n /**\n * Sets the `word-wrap` CSS property of the element.\n *\n * Accepts a word-wrap token or a responsive array of word-wrap tokens.\n */\n $wordWrap?: ResponsiveValues<OakWordWrap>;\n /**\n * Sets the `text-overflow` CSS property of the element.\n *\n * Accepts a text-overflow token or a responsive array of text-overflow tokens.\n */\n $textOverflow?: ResponsiveValues<OakTextOverflow>;\n};\n\nexport const typographyStyle = css<TypographyStyleProps>`\n font-family: Lexend, sans-serif;\n ${responsiveStyle(\"font-weight\", (props) => props.$font, parseFontWeight)}\n ${responsiveStyle(\"font-size\", (props) => props.$font, parseFontSize)}\n ${responsiveStyle(\"line-height\", (props) => props.$font, parseLineHeight)}\n ${responsiveStyle(\n \"letter-spacing\",\n (props) => props.$font,\n parseLetterSpacing,\n )}\n ${responsiveStyle(\"text-align\", (props) => props.$textAlign)}\n ${responsiveStyle(\"text-decoration\", (props) => props.$textDecoration)}\n ${responsiveStyle(\"white-space\", (props) => props.$whiteSpace)}\n ${responsiveStyle(\"word-wrap\", (props) => props.$wordWrap)}\n ${responsiveStyle(\"text-overflow\", (props) => props.$textOverflow)}\n`;\n","import {\n OakFontToken,\n oakFontSizeTokens,\n oakFontTokens,\n} from \"@/styles/theme/typography\";\nimport pxToRem from \"@/styles/helpers/pxToRem\";\n\nexport const parseFontWeight = (font?: OakFontToken | null) => {\n if (!font) return;\n return oakFontTokens[font]?.[2];\n};\n\nexport const parseFontSize = (\n font?: OakFontToken | null,\n): string | null | undefined => {\n if (!font) return;\n const fontSize = oakFontTokens[font]?.[0];\n if (!fontSize) return;\n const fontSizePx = oakFontSizeTokens[fontSize];\n return `${pxToRem(fontSizePx)}rem`;\n};\nexport const parseLineHeight = (\n font?: OakFontToken | null,\n): string | null | undefined => {\n if (!font) return;\n const lineHeight = oakFontTokens[font]?.[1];\n if (!lineHeight) return;\n return `${pxToRem(lineHeight)}rem`;\n};\nexport const parseLetterSpacing = (font?: OakFontToken | null) => {\n if (!font) return;\n return oakFontTokens[font]?.[3];\n};\n","export const oakZIndexTokens = {\n behind: -1,\n neutral: 0,\n \"in-front\": 1,\n \"mobile-filters\": 2,\n \"fixed-header\": 100,\n \"modal-close-button\": 150,\n \"modal-dialog\": 300,\n} as const;\n\nexport type OakZIndexToken = keyof typeof oakZIndexTokens | null;\n","import { css } from \"styled-components\";\n\nimport {\n ResponsiveValues,\n responsiveStyle,\n} from \"@/styles/utils/responsiveStyle\";\nimport { OakZIndexToken } from \"@/styles/theme/zIndex\";\nimport { parseZIndex } from \"@/styles/helpers/parseZIndex\";\n\nexport type ZIndexStyleProps = {\n /**\n * Sets the `z-index` CSS property of the element.\n *\n * Accepts a z-index token or a responsive array of z-index tokens.\n */\n $zIndex?: ResponsiveValues<OakZIndexToken>;\n};\n\nexport const zIndexStyle = css<ZIndexStyleProps>`\n ${responsiveStyle(\"z-index\", (props) => props.$zIndex, parseZIndex)}\n`;\n","import { OakZIndexToken, oakZIndexTokens } from \"@/styles/theme/zIndex\";\n\nexport const parseZIndex = (value?: OakZIndexToken) => {\n if (value === undefined || value === null) {\n return undefined;\n }\n return oakZIndexTokens[value];\n};\n","import { MouseEventHandler } from \"react\";\nimport styled, { css } from \"styled-components\";\n\n/**\n * OakBox exposes all the styles that are available styles on a div element.\n */\n\nimport { colorStyle, ColorStyleProps } from \"@/styles/utils/colorStyle\";\nimport {\n positionStyle,\n PositionStyleProps,\n} from \"@/styles/utils/positionStyle\";\nimport { sizeStyle, SizeStyleProps } from \"@/styles/utils/sizeStyle\";\nimport { spacingStyle, SpacingStyleProps } from \"@/styles/utils/spacingStyle\";\nimport { borderStyle, BorderStyleProps } from \"@/styles/utils/borderStyle\";\nimport { displayStyle, DisplayStyleProps } from \"@/styles/utils/displayStyle\";\nimport {\n dropShadowStyle,\n DropShadowStyleProps,\n} from \"@/styles/utils/dropShadowStyle\";\nimport { opacityStyle, OpacityStyleProps } from \"@/styles/utils/opacityStyle\";\nimport {\n transformStyle,\n TransformStyleProps,\n} from \"@/styles/utils/transformStyle\";\nimport {\n transitionStyle,\n TransitionStyleProps,\n} from \"@/styles/utils/transitionStyle\";\nimport {\n typographyStyle,\n TypographyStyleProps,\n} from \"@/styles/utils/typographyStyle\";\nimport { zIndexStyle, ZIndexStyleProps } from \"@/styles/utils/zIndexStyle\";\n\n// TODO: these are not yet implemented\n// import cover, { CoverProps } from \"@/styles/utils/coverStyle\";\n// import customScrollbar from \"@/styles/utils/customScrollbarStyle\";\n\ntype HTMLProps = {\n onClick?: MouseEventHandler;\n};\n\nexport type OakBoxProps = {\n children?: React.ReactNode;\n} & PositionStyleProps &\n SizeStyleProps &\n SpacingStyleProps &\n ColorStyleProps &\n BorderStyleProps &\n DisplayStyleProps &\n DropShadowStyleProps &\n OpacityStyleProps &\n TransformStyleProps &\n TransitionStyleProps &\n TypographyStyleProps &\n ZIndexStyleProps &\n HTMLProps;\n\nexport const oakBoxCss = css<OakBoxProps>`\n ${positionStyle}\n ${sizeStyle}\n ${spacingStyle}\n ${colorStyle}\n ${borderStyle}\n ${displayStyle}\n ${dropShadowStyle}\n ${opacityStyle}\n ${transformStyle}\n ${transitionStyle}\n ${typographyStyle}\n ${zIndexStyle}\n ${(props) =>\n /* onClick might be passed in the useClickableCard pattern */\n props.onClick &&\n css`\n :hover {\n cursor: pointer;\n }\n `}\n`;\n\n/**\n * OakBox exposes all the styles that are available styles on a div tag. These include:\n * - color\n * - size\n * - display\n * - spacing\n * - position\n * - border\n * - opacity\n * - z-index\n * - typography\n * - transition\n * - transform\n * - drop-shadow\n *\n */\nexport const OakBox = styled.div<OakBoxProps>`\n ${oakBoxCss}\n`;\n","import { CSSProperties } from \"react\";\nimport { css } from \"styled-components\";\n\nimport type { DisplayStyleProps } from \"./displayStyle\";\n\nimport {\n responsiveStyle,\n ResponsiveValues,\n} from \"@/styles/utils/responsiveStyle\";\nimport {\n OakAllSpacingToken,\n OakCombinedSpacingToken,\n OakSpaceBetweenToken,\n} from \"@/styles/theme/spacing\";\nimport { parseSpacing } from \"@/styles/helpers/parseSpacing\";\n\nexport type FlexStyleProps = DisplayStyleProps & {\n /**\n * Sets the `flex-direction` CSS property of the element.\n *\n * Accepts a `flex-direction` value or a responsive array of flex-direction values.\n */\n $flexDirection?: ResponsiveValues<CSSProperties[\"flexDirection\"]>;\n /**\n * Sets the `flex-wrap` CSS property of the element.\n *\n * Accepts a `flex-wrap` value or a responsive array of flex-wrap values.\n */\n $flexWrap?: ResponsiveValues<CSSProperties[\"flexWrap\"]>;\n /**\n * Sets the `align-items` CSS property of the element.\n *\n * Accepts an `align-items` value or a responsive array of `align-items` values.\n */\n $alignItems?: ResponsiveValues<CSSProperties[\"alignItems\"]>;\n /**\n * Sets the `align-content` CSS property of the element.\n *\n * Accepts an `align-content` value or a responsive array of `align-content` values.\n */\n $alignContent?: ResponsiveValues<CSSProperties[\"alignContent\"]>;\n /**\n * Sets the `justify-content` CSS property of the element.\n *\n * Accepts a `justify-content` value or a responsive array of `justify-content` values.\n */\n $justifyContent?: ResponsiveValues<CSSProperties[\"justifyContent\"]>;\n /**\n * Sets the `align-self` CSS property of the element.\n *\n * Accepts an `align-self` value or a responsive array of `align-self` values.\n */\n $alignSelf?: ResponsiveValues<CSSProperties[\"alignSelf\"]>;\n /**\n * Sets the `flex-grow` CSS property of the element.\n *\n * Accepts a `flex-grow` value or a responsive array of `flex-grow` values.\n */\n $flexGrow?: ResponsiveValues<CSSProperties[\"flexGrow\"]>;\n /**\n * Sets the `flex-shrink` CSS property of the element.\n *\n * Accepts a `flex-shrink` value or a responsive array of `flex-shrink` values.\n */\n $flexShrink?: ResponsiveValues<CSSProperties[\"flexShrink\"]>;\n /**\n * Sets the `order` CSS property of the element.\n *\n * Accepts an `order` value or a responsive array of `order` values.\n */\n $order?: ResponsiveValues<CSSProperties[\"order\"]>;\n /**\n * Sets the `flex-basis` CSS property of the element.\n *\n * Accepts a spacing token or a responsive array of spacing tokens. Can be nulled.\n */\n $flexBasis?: ResponsiveValues<OakCombinedSpacingToken | null | undefined>;\n /**\n * Sets the `gap` CSS property of the element.\n *\n * Accepts a spacing token or a responsive array of spacing tokens. Can be nulled.\n */\n $gap?: ResponsiveValues<\n OakAllSpacingToken | OakSpaceBetweenToken | null | undefined\n >;\n /**\n * Sets the `column-gap` CSS property of the element.\n *\n * Accepts a spacing token or a responsive array of spacing tokens. Can be nulled.\n */\n $columnGap?: ResponsiveValues<\n OakAllSpacingToken | OakSpaceBetweenToken | null | undefined\n >;\n /**\n * Sets the `row-gap` CSS property of the element.\n *\n * Accepts a spacing token or a responsive array of spacing tokens. Can be nulled.\n */\n $rowGap?: ResponsiveValues<\n OakAllSpacingToken | OakSpaceBetweenToken | null | undefined\n >;\n};\n\nexport const flexStyle = css<FlexStyleProps>`\n ${responsiveStyle(\"display\", (props) => props.$display ?? \"flex\")}\n ${responsiveStyle(\"flex-direction\", (props) => props.$flexDirection)}\n ${responsiveStyle(\"flex-wrap\", (props) => props.$flexWrap)}\n ${responsiveStyle(\"align-items\", (props) => props.$alignItems)}\n ${responsiveStyle(\"align-content\", (props) => props.$alignContent)}\n ${responsiveStyle(\"justify-content\", (props) => props.$justifyContent)}\n ${responsiveStyle(\"align-self\", (props) => props.$alignSelf)}\n ${responsiveStyle(\"order\", (props) => props.$order)}\n ${responsiveStyle(\"flex-grow\", (props) => props.$flexGrow)}\n ${responsiveStyle(\"flex-shrink\", (props) => props.$flexShrink)}\n ${responsiveStyle(\"flex-basis\", (props) => props.$flexBasis, parseSpacing)}\n ${responsiveStyle(\"gap\", (props) => props.$gap, parseSpacing)}\n ${responsiveStyle(\"column-gap\", (props) => props.$columnGap, parseSpacing)}\n ${responsiveStyle(\"row-gap\", (props) => props.$rowGap, parseSpacing)}\n`;\n","import styled from \"styled-components\";\n\nimport { OakBox, OakBoxProps } from \"@/components/atoms/OakBox\";\nimport { flexStyle, FlexStyleProps } from \"@/styles/utils/flexStyle\";\n\nexport type OakFlexProps = FlexStyleProps & OakBoxProps;\n\n/**\n * Flex sets `display: flex;` and exposes various flex props, along with Box\n * props.\n *\n * ## Usage\n * Before adding props to this component, think about whether it makes sense\n * to add it to Box instead, as this component extends that.\n */\nconst OakFlex = styled(OakBox)<OakFlexProps>`\n ${flexStyle}\n`;\n\nexport { OakFlex };\n","import styled from \"styled-components\";\n\nimport { colorStyle, ColorStyleProps } from \"@/styles/utils/colorStyle\";\nimport { opacityStyle, OpacityStyleProps } from \"@/styles/utils/opacityStyle\";\nimport {\n marginStyle,\n MarginStyleProps,\n paddingStyle,\n PaddingStyleProps,\n} from \"@/styles/utils/spacingStyle\";\nimport {\n typographyStyle,\n TypographyStyleProps,\n} from \"@/styles/utils/typographyStyle\";\nimport { borderStyle, BorderStyleProps } from \"@/styles/utils/borderStyle\";\n\nexport type OakSpanProps = ColorStyleProps &\n OpacityStyleProps &\n MarginStyleProps &\n PaddingStyleProps &\n BorderStyleProps &\n TypographyStyleProps;\n\n/**\n * Span renders a `span` (inline text) component, exposing all the typography props.\n * ## Usage\n * Use this component when you want to apply styles to a piece of inline text.\n */\nexport const OakSpan = styled.span<OakSpanProps>`\n ${colorStyle}\n ${opacityStyle}\n ${marginStyle}\n ${paddingStyle}\n ${borderStyle}\n ${typographyStyle}\n`;\n","import styled from \"styled-components\";\n\nimport { OakBoxProps, oakBoxCss } from \"../OakBox\";\n\n/**\n *\n * Inherit everything from OakBox, but change the element to a form.\n *\n * @deprecated Use `<OakBox as=\"form\">` instead\n */\nexport const OakForm = styled.form<OakBoxProps>`\n ${oakBoxCss}\n`;\n\nexport type OakFormProps = OakBoxProps;\n","import {\n OakColorFilterToken,\n OakUiRoleToken,\n oakColorFilterTokens,\n oakUiRoleTokens,\n} from \"@/styles/theme/color\";\nimport { OakCombinedColorToken } from \"@/styles/theme\";\nimport { PropsWithTheme } from \"@/styles/theme/theme\";\n\nfunction parseColorFilter(\n value?: OakCombinedColorToken | null,\n): (props: PropsWithTheme) => string;\nfunction parseColorFilter(\n value?: OakCombinedColorToken | null,\n): ((props: PropsWithTheme) => string) | undefined;\nfunction parseColorFilter(value?: OakCombinedColorToken | null) {\n if (value === undefined || value === null) {\n return undefined;\n }\n if (value in oakColorFilterTokens) {\n return oakColorFilterTokens[value as OakColorFilterToken];\n }\n\n if (oakUiRoleTokens.includes(value as OakUiRoleToken)) {\n return ({ theme }: PropsWithTheme) => {\n const c = theme.uiColors[value as OakUiRoleToken];\n if (c && c in oakColorFilterTokens) {\n return oakColorFilterTokens[c as OakColorFilterToken];\n }\n return undefined;\n };\n }\n}\n\nexport { parseColorFilter };\n","import { css } from \"styled-components\";\n\nimport { parseColorFilter } from \"@/styles/helpers/parseColorFilter\";\nimport {\n responsiveStyle,\n ResponsiveValues,\n} from \"@/styles/utils/responsiveStyle\";\nimport { OakCombinedColorToken } from \"@/styles/theme/color\";\n\ntype ColorFilterToken = ResponsiveValues<OakCombinedColorToken | null>;\n\nexport type ColorFilterStyleProps = {\n /**\n * Applies a color-filter to the element.\n *\n * Accepts a color filter token or a responsive array of color tokens.\n */\n $colorFilter?: ColorFilterToken;\n};\nexport const colorFilterStyle = css<ColorFilterStyleProps>`\n ${responsiveStyle<ColorFilterStyleProps, OakCombinedColorToken>(\n \"filter\",\n (props) => props.$colorFilter,\n parseColorFilter,\n )}\n`;\n","import React, {\n ComponentPropsWithoutRef,\n ElementType,\n MouseEventHandler,\n} from \"react\";\nimport Image, { ImageProps } from \"next/image\";\nimport styled, { css } from \"styled-components\";\n\nimport { useShowPlaceholder } from \"./useShowPlaceholder\";\n\nimport {\n ColorFilterStyleProps,\n colorFilterStyle,\n} from \"@/styles/utils/colorFilterStyle\";\nimport { OakBox, OakBoxProps } from \"@/components/atoms/OakBox\";\nimport { parseColor } from \"@/styles/helpers/parseColor\";\nimport { parseSpacing } from \"@/styles/helpers/parseSpacing\";\n\ntype HTMLProps = {\n onClick?: MouseEventHandler;\n};\n\nexport type OakImageProps<C extends ElementType = typeof Image> = Omit<\n ImageProps,\n \"placeholder\"\n> &\n OakBoxProps &\n ColorFilterStyleProps &\n HTMLProps & {\n as?: C;\n /**\n * The placeholder to use while the image is loading\n *\n * Defaults to `oak` which is a placeholder containing the Oak logo\n * also accepts the same options as next/image */\n placeholder?: ImageProps[\"placeholder\"] | \"oak\";\n /**\n * Additional props forwarded to the underlying `Image` component `as`\n */\n imageProps?: Partial<ComponentPropsWithoutRef<C>>;\n };\n\ntype StyledImageProps = Omit<OakImageProps, \"as\"> & {\n $showOakPlaceholder: boolean;\n};\n\nconst oakPlaceholder =\n \"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGZpbGw9Im5vbmUiIHZpZXdCb3g9IjAgMCA2NCA2NCI+PHBhdGggZmlsbD0iIzIyMiIgZD0iTTI4Ljc3OSAxOS4xNzZhMjcuMTkxIDI3LjE5MSAwIDAgMC0zLjggMS42IDE2LjcgMTYuNyAwIDAgMC03LjEgOC40YzAgLjEtLjEuMi0uMS4zLS43IDIuNC0uNiAyIDEuMyAyLjMgMS45LjMgMSAuNSAxIDEuMy0uMSA4LjggNC4xIDE1LjEgMTEuNCAxOS42YTEuNSAxLjUgMCAwIDAgMS43LjJjNS43LTIuNiA5LjMtNyAxMC4zLTEzLjJhMSAxIDAgMCAxIDEtMWwzLS4yYy44IDAgMS4zLjIgMS4yIDEuMmExNy45IDE3LjkgMCAwIDEtMy4yIDkuMiAyMy43IDIzLjcgMCAwIDEtMTAuOSA5LjEgNS40MDEgNS40MDEgMCAwIDEtNC41LS4yIDI2LjI5OCAyNi4yOTggMCAwIDEtOC41LTYuNiAyNS45IDI1LjkgMCAwIDEtNi40LTE0LjRjMC0uNi0uMi0uNy0uOC0uOC0yLjUtLjQtMi41LS4xLTIuMy0yLjlhMTkuMyAxOS4zIDAgMCAxIDEwLjgtMTYuNiAzOC45OTkgMzguOTk5IDAgMCAxIDUuNy0yLjEgMi4xIDIuMSAwIDAgMCAuOS0xLjMgMTQuMSAxNC4xIDAgMCAxIDMuNS02LjNsLjMtLjNjMS45LTIgMi42LTIgNC4zLjJsLjQuNWMxLjEgMS4xIDEgMS41LS4xIDIuNmExMS45IDExLjkgMCAwIDAtMy4yIDQuNCAxNi45IDE2LjkgMCAwIDEgNy41IDIuM2M1LjcgMy41IDkuMiA4LjMgOS45IDE1IC4wMTYuOTAxLS4wMTcgMS44MDItLjEgMi43IDAgLjgtLjYgMS0xLjIgMS4yYTE2LjEgMTYuMSAwIDAgMS0xMS0uNyAxNy45MDEgMTcuOTAxIDAgMCAxLTEwLjktMTMuNiA5Ljc5NiA5Ljc5NiAwIDAgMS0uMS0xLjlabTE4LjEgMTIuMmMuNC01LjUtNi45LTEyLjYtMTMtMTIuMS41IDYuNSA3LjYgMTIuOCAxMyAxMi4xWiIgb3BhY2l0eT0iLjEiLz48L3N2Zz4=\";\n\nconst clickStyles = css<{ onClick?: MouseEventHandler }>`\n ${(props) =>\n /* onClick might be passed in the useClickableCard pattern */\n props.onClick &&\n css`\n :hover {\n cursor: pointer;\n }\n `}\n`;\n\nconst placeholderStyles = css<StyledImageProps>`\n ${(props) =>\n props.$showOakPlaceholder &&\n css`\n background-image: url(${oakPlaceholder});\n background-color: ${parseColor(\"bg-decorative2-very-subdued\")};\n background-size: ${parseSpacing(\"all-spacing-11\")};\n background-position: center;\n background-repeat: no-repeat;\n `}\n`;\n\nconst StyledFillImage = styled(Image)<StyledImageProps>`\n ${colorFilterStyle}\n ${clickStyles}\n ${placeholderStyles}\n object-fit: contain;\n`;\n\nconst StyledResponsiveImage = styled(Image)<StyledImageProps>`\n ${colorFilterStyle}\n ${clickStyles}\n ${placeholderStyles}\n width: 100%;\n height: auto;\n`;\n\n/**\n * A wrapper for NextJs's Image component.\n *\n * Use this for all image types as well as icons.\n * Can accept remote urls provided they are whitelisted in next.config.js and relative urls for local images provided they begin with a \"/\".\n * Set the width and height of the image through the `$width` and `$height` props when the aspect ratio is not known. This will letterbox the image to avoid stretching.\n * Alternatively pass `width` and `height` props when the aspect ratio is known and use $minWidth to set the rendered width, avoiding letter-boxing.\n * NB. for letterboxed images, $background controls the color of the letterbox not the image.\n * `positionStyle` and `spacingStyle` props are also exposed for container.\n * sizes is exposed for further optimisation read Next docs for more info.\n *\n */\nexport const OakImage = <C extends ElementType = typeof Image>({\n ...props\n}: OakImageProps<C>) => {\n const {\n as,\n src,\n alt,\n width,\n height,\n sizes,\n $width = \"100%\",\n $position = \"relative\",\n $colorFilter,\n placeholder = \"oak\",\n unoptimized,\n imageProps,\n onLoad,\n onError,\n ...rest\n } = props;\n const finalPlaceholder = placeholder === \"oak\" ? undefined : placeholder;\n const { showPlaceholder, handleComplete, setImg } = useShowPlaceholder();\n\n // We don't know the aspect ratio of the image, so we must use fill and letterbox it to avoid stretching\n // Use $width and $height to set the width and height of the image container\n if (!width || !height) {\n return (\n <OakBox $position={$position} $width={$width} {...rest}>\n <StyledFillImage\n ref={setImg}\n as={as ?? Image}\n src={src}\n alt={alt}\n sizes={sizes}\n fill\n $colorFilter={$colorFilter}\n placeholder={finalPlaceholder}\n $showOakPlaceholder={placeholder === \"oak\" && showPlaceholder}\n unoptimized={unoptimized}\n onLoad={handleComplete(onLoad)}\n onError={handleComplete(onError)}\n {...imageProps}\n />\n </OakBox>\n );\n }\n\n // When we know the aspect ratio, we can use Image's repsonsive layout\n // Use $minWidth to set the width with auto height\n\n return (\n <OakBox $maxWidth={\"all-spacing-0\"} $position={$position} {...rest}>\n <StyledResponsiveImage\n ref={setImg}\n as={as ?? Image}\n src={src}\n alt={alt}\n width={width}\n height={height}\n sizes={sizes}\n unoptimized={unoptimized}\n $colorFilter={$colorFilter}\n placeholder={finalPlaceholder}\n $showOakPlaceholder={placeholder === \"oak\" && showPlaceholder}\n onLoad={handleComplete(onLoad)}\n onError={handleComplete(onError)}\n {...imageProps}\n />\n </OakBox>\n );\n};\n","import { ReactEventHandler, useCallback, useState } from \"react\";\n\nexport function useShowPlaceholder() {\n // Default to false so that we don't show the placeholder if the image is already complete\n const [showPlaceholder, setShowPlaceholder] = useState(false);\n const setImg = useCallback((img: HTMLImageElement | null) => {\n // the `load` or `error` event may never be called if the image is coming from the cache\n // so we need to check the `complete` property as well as listen to the `onLoad` and `onError` events\n img && setShowPlaceholder(!img.complete);\n }, []);\n\n return {\n showPlaceholder,\n setImg,\n /**\n * Wraps the `onLoad` and `onError` events to set the placeholder state\n */\n handleComplete(\n originalHandler?: ReactEventHandler<HTMLImageElement>,\n ): ReactEventHandler<HTMLImageElement> {\n return (event) => {\n if (originalHandler) {\n originalHandler(event);\n }\n setShowPlaceholder(false);\n };\n },\n };\n}\n","import styled from \"styled-components\";\n\nimport {\n typographyStyle,\n TypographyStyleProps,\n} from \"@/styles/utils/typographyStyle\";\nimport { OakBox, OakBoxProps } from \"@/components/atoms/OakBox\";\n\nexport type OakTypographyProps = OakBoxProps & TypographyStyleProps;\n\n/**\n * The Typography component sets a typography style context from which children\n * inherit style properties through the cascade.\n * ## Usage\n * This should be the primary component to set a typography context.\n * Use this component whenever you want to style blocks of 'body' text.\n */\nexport const OakTypography = styled(OakBox)<OakTypographyProps>`\n ${typographyStyle}\n`;\n","import React, { FC } from \"react\";\nimport styled from \"styled-components\";\n\nimport { ColorStyleProps, colorStyle } from \"@/styles/utils/colorStyle\";\nimport { MarginStyleProps, marginStyle } from \"@/styles/utils/spacingStyle\";\nimport { OpacityStyleProps, opacityStyle } from \"@/styles/utils/opacityStyle\";\nimport {\n TypographyStyleProps,\n typographyStyle,\n} from \"@/styles/utils/typographyStyle\";\n\nexport const oakHeadingTags = [\n \"div\",\n \"h1\",\n \"h2\",\n \"h3\",\n \"h4\",\n \"h5\",\n \"h6\",\n] as const;\n\nexport type OakHeadingTag = (typeof oakHeadingTags)[number];\n\ntype OakHeadingTagProps = {\n children?: React.ReactNode;\n id?: string;\n /**\n * HTML tag to be used for the heading\n *\n * Accepts a heading tag token\n */\n tag: OakHeadingTag;\n ariaLabel?: string;\n ariaHidden?: boolean;\n};\n\nexport const HeadingTagComponent: FC<OakHeadingTagProps> = (props) => {\n const { tag, ariaLabel, ariaHidden, ...otherProps } = props;\n const Tag = tag;\n return (\n <Tag {...otherProps} aria-label={ariaLabel} aria-hidden={ariaHidden} />\n );\n};\n\nexport type OakHeadingProps = TypographyStyleProps &\n OakHeadingTagProps &\n ColorStyleProps &\n OpacityStyleProps &\n MarginStyleProps;\n\n/**\n *\n * OakHeading can be one of the following style tags dependant on its role: \"div\" | \"h1\" | \"h2\" | \"h3\" | \"h4\" | \"h5\" | \"h6\".\n * Use the controls to view different font styles.\n *\n */\nexport const OakHeading = styled(HeadingTagComponent)<OakHeadingProps>`\n ${typographyStyle}\n ${marginStyle}\n ${colorStyle}\n ${opacityStyle}\n`;\n","import styled from \"styled-components\";\n\nimport { colorStyle, ColorStyleProps } from \"@/styles/utils/colorStyle\";\nimport { marginStyle, MarginStyleProps } from \"@/styles/utils/spacingStyle\";\nimport {\n typographyStyle,\n TypographyStyleProps,\n} from \"@/styles/utils/typographyStyle\";\n\nexport type OakPProps = MarginStyleProps &\n TypographyStyleProps &\n ColorStyleProps;\n\n/**\n * Styled `p` (paragraph) component.\n * ## Usage\n * In general, using a `p` as a descendant of `<Body>` should suffice.\n * However, if you want different styles for a particular paragraph,\n * you can use this component to apply additional styles.\n */\nexport const OakP = styled.p<OakPProps>`\n ${typographyStyle}\n ${colorStyle}\n ${marginStyle}\n\n a {\n color: ${(props) =>\n props.theme &&\n props.theme.uiColors &&\n props.theme.uiColors[\"text-link-active\"]};\n }\n`;\n","import styled, { css } from \"styled-components\";\n\nimport { OakBoxProps, oakBoxCss } from \"../OakBox\";\n\nexport type OakULProps = OakBoxProps & {\n $reset?: boolean;\n};\n\n/**\n * Styled `ul` (unordered list) component.\n *\n * ## Usage\n *\n * Resets browser spacing and other styles, accepts BoxProps' style props.\n *\n * */\n\nexport const OakUL = styled.ul<OakULProps>`\n ${(props) =>\n props.$reset &&\n css`\n list-style: none;\n padding: 0;\n `}\n margin: 0;\n ${oakBoxCss}\n`;\n","import styled from \"styled-components\";\n\nimport { colorStyle, ColorStyleProps } from \"@/styles/utils/colorStyle\";\nimport { marginStyle, MarginStyleProps } from \"@/styles/utils/spacingStyle\";\nimport {\n typographyStyle,\n TypographyStyleProps,\n} from \"@/styles/utils/typographyStyle\";\n\nexport type OakOLProps = MarginStyleProps &\n ColorStyleProps &\n TypographyStyleProps;\n\n/**\n * Styled `ol` (ordered list) component.\n *\n * ## Usage\n *\n * Use where we have an ordered list to ensure numbers are styled\n *\n * */\nexport const OakOL = styled.ol<OakOLProps>`\n counter-reset: item;\n padding: 0;\n\n li {\n display: block;\n counter-increment: item;\n margin: 0;\n padding: 0 0 0 16px;\n text-indent: -16px;\n list-style-type: none;\n line-height: 32px;\n\n // Portable text generates linebreaks within list items\n\n br {\n content: \"\";\n display: block;\n margin-top: 8px;\n }\n }\n\n & li::before {\n padding-right: 4px;\n content: counter(item) \".\";\n }\n a {\n color: ${(props) =>\n props.theme &&\n props.theme.uiColors &&\n props.theme.uiColors[\"text-link-active\"]};\n }\n ${marginStyle}\n ${colorStyle}\n ${typographyStyle}\n`;\n","import { CSSProperties, css } from \"styled-components\";\n\nimport {\n ResponsiveValues,\n responsiveStyle,\n} from \"@/styles/utils/responsiveStyle\";\n\nexport type ListStyleProps = {\n /**\n * Sets the `list-style` CSS property of the element.\n *\n * Accepts a `list-style` value or a responsive array of `list-style` values.\n */\n $listStyle?: ResponsiveValues<CSSProperties[\"listStyle\"]>;\n};\n\nexport const listStyle = css<ListStyleProps>`\n ${responsiveStyle(\"list-style\", (props) => props.$listStyle)}\n`;\n","import styled from \"styled-components\";\n\nimport { oakBoxCss } from \"../OakBox\";\nimport { OakFlexProps } from \"../OakFlex\";\n\nimport { DisplayStyleProps, displayStyle } from \"@/styles/utils/displayStyle\";\nimport { ListStyleProps, listStyle } from \"@/styles/utils/listStyle\";\nimport {\n TypographyStyleProps,\n typographyStyle,\n} from \"@/styles/utils/typographyStyle\";\n\nexport type OakLIProps = OakFlexProps &\n TypographyStyleProps &\n ListStyleProps &\n DisplayStyleProps;\n\n/**\n * Styled `li` (list item) component.\n *\n * ## Usage\n *\n * Places where we directly want to style a list item\n *\n **/\nexport const OakLI = styled.li<OakLIProps>`\n ${oakBoxCss}\n ${typographyStyle}\n ${listStyle}\n ${displayStyle}\n`;\n\nOakLI.defaultProps = {\n $display: \"revert\",\n};\n","import styled from \"styled-components\";\n\nimport {\n TypographyStyleProps,\n typographyStyle,\n} from \"@/styles/utils/typographyStyle\";\nimport { ColorStyleProps, colorStyle } from \"@/styles/utils/colorStyle\";\n\nexport type OakLabelProps = TypographyStyleProps & ColorStyleProps;\n\n/**\n * Label renders a `label` element, exposing all the typography props.\n * ## Usage\n * Use this component when you want to apply styles to a label, likely within\n * a form.\n */\nexport const OakLabel = styled.label<OakLabelProps>`\n ${typographyStyle}\n ${colorStyle}\n`;\n","export const icons = {\n \"question-mark\": \"v1706872277/icons/question-mark.svg\",\n home: \"v1699887218/icons/gvqxjxcw07ei2kkmwnes.svg\",\n send: \"v1699893673/icons/rmvytilpjgvh3pgwc8ph.svg\",\n rocket: \"v1699894015/icons/u26xm5hteot875ozfnk9.svg\",\n edit: \"v1699894149/icons/qxlunbg5tfrdherzsvlt.svg\",\n hamburger: \"v1699895123/icons/jaqdnomtbhqvjcap962u.svg\",\n cross: \"v1699895179/icons/xigimrbivcaxt4omxamp.svg\",\n bell: \"v1699895207/icons/ecejtvqerx81prxyxh9b.svg\",\n twitter: \"v1699895251/icons/bq6a50xtkvnzhltfggzz.svg\",\n worksheet: \"v1699895300/icons/ez1s6mtpe5jkunnxzvlw.svg\",\n facebook: \"v1699895330/icons/iojlvh3o5lshy2jupyph.svg\",\n share: \"v1699895363/icons/agcmduftef3wcla6gzec.svg\",\n \"arrow-right\": \"v1707149070/icons/fv0z57zerrioft52dd9n.svg\",\n \"worksheet-3\": \"v1699895429/icons/bzhojpjxp9rukdvh7daz.svg\",\n \"chevron-right\": \"v1707752509/icons/vk9xxxhnsltsickom6q9.svg\",\n save: \"v1699895505/icons/rh1ahwwtbemvz0ihluew.svg\",\n \"quiz-3\": \"v1699895534/icons/zoayhgtrotv32fad7d3k.svg\",\n \"chevron-down\": \"v1699953557/icons/botfld6brychmttwtv6u.svg\",\n linkedin: \"v1699953592/icons/leqneklorqqzb1zo6rf1.svg\",\n \"magic-carpet\": \"v1699953622/icons/jifivg9xxm7sb0fjdilm.svg\",\n books: \"v1699953657/icons/hz4l3iq6i68kazvkvorq.svg\",\n \"supervision-level\": \"v1699953696/icons/cwqhknapp3maa4g0t3lj.svg\",\n \"quiz-white\": \"v1699953730/icons/gpcehpgr9mqoumsa25xe.svg\",\n \"arrow-left\": \"v1707149179/icons/ejrm9dpgpzb7ddbo8z2i.svg\",\n \"additional-material\": \"v1699953798/icons/ntoq4tqvcm2uj1pajubt.svg\",\n \"slide-deck-3\": \"v1699953830/icons/sm92moja9d5utu3cj16c.svg\",\n \"sign-language\": \"v1699953861/icons/ns94ozvozzi22enxkx0x.svg\",\n external: \"v1699953892/icons/hlxmejse3mcr4tqo6t8u.svg\",\n \"equipment-required\": \"v1699953925/icons/pw22bdhj2vrzfv2ogi4e.svg\",\n \"chevron-left\": \"v1707752509/icons/rbvzan0ozubmr4j0uqdn.svg\",\n download: \"v1699953991/icons/dk0f6a6hdpzxftjosngn.svg\",\n search: \"v1704901279/icons/canbi3fuz5fanzom2hvi.svg\",\n \"chevron-up\": \"v1699954058/icons/pay71thmhhylj7z28sj1.svg\",\n go: \"v1699954090/icons/vdzptyvmitylra8x4usy.svg\",\n copyright: \"v1699954118/icons/boiod3rflocgsnfokyo8.svg\",\n \"arrow-down\": \"v1699954152/icons/wpfmbmwpyfinipg0d61y.svg\",\n project: \"v1699954186/icons/zofq5pheud6spnwjpewk.svg\",\n \"slide-deck\": \"v1699954241/icons/sjjy5f3g4eciwcuxxr33.svg\",\n \"content-guidance\": \"v1699954277/icons/tm3uhcqenaznq4fxys7j.svg\",\n tick: \"v1699954310/icons/efd3esaor6zqk7seh6kt.svg\",\n instagram: \"v1699954343/icons/ayfeljric0kkimdymvva.svg\",\n dot: \"v1699954371/icons/knykdclphkm8lgff4u2g.svg\",\n \"dot-png\": \"v1699954394/icons/qecbh291nzwmhcvqayqd.png\",\n warning: \"v1704901279/icons/zzszodmk7fvxm9xzzg9s.svg\",\n \"lightbulb-yellow\": \"v1705078631/icons/q2v4sqxouy1ngcajoavv.svg\",\n lightbulb: \"v1705078631/icons/zldisxmbff36z68rwcef.svg\",\n quiz: \"v1705416077/icons/kaaizjcudy0jfgfrrdel.svg\",\n video: \"v1705416078/icons/wzey1zfxrvv3apeebbf5.svg\",\n intro: \"v1705662092/icons/pl7bnmb13txese9yxkjv.svg\",\n \"move-arrows\": \"v1709052869/icons/hoddjsgpzkszgvnmn91q.svg\",\n \"subject-art\": \"subject-icons/art.svg\",\n \"subject-biology\": \"subject-icons/biology.svg\",\n \"subject-chemistry\": \"subject-icons/chemistry.svg\",\n \"subject-citizenship\": \"subject-icons/citizenship.svg\",\n \"subject-combined-science\": \"subject-icons/science.svg\",\n \"subject-communication-and-language\":\n \"subject-icons/communication-and-language.svg\",\n \"subject-computing\": \"subject-icons/computing.svg\",\n \"subject-computing-non-gcse\": \"subject-icons/computing.svg\",\n \"subject-creative-arts\": \"subject-icons/creative-arts.svg\",\n \"subject-design-technology\": \"subject-icons/design-technology.svg\",\n \"subject-drama\": \"subject-icons/drama.svg\",\n \"subject-english\": \"subject-icons/english.svg\",\n \"subject-english-grammar\": \"subject-icons/english-grammar.svg\",\n \"subject-english-reading-for-pleasure\": \"subject-icons/literature.svg\",\n \"subject-english-spelling\": \"subject-icons/english-spelling.svg\",\n \"subject-french\": \"subject-icons/french.svg\",\n \"subject-geography\": \"subject-icons/geography.svg\",\n \"subject-german\": \"subject-icons/german.svg\",\n \"subject-history\": \"subject-icons/history.svg\",\n \"subject-independent-living\": \"subject-icons/independent-living.svg\",\n \"subject-latin\": \"subject-icons/latin.svg\",\n \"subject-maths\": \"subject-icons/maths.svg\",\n \"subject-music\": \"subject-icons/music-hollow.svg\",\n \"subject-numeracy\": \"subject-icons/numeracy.svg\",\n \"occupational-therapy\": \"subject-icons/therapy.svg\",\n \"subject-physical-development\": \"subject-icons/physical-development.svg\",\n \"subject-physical-education\": \"subject-icons/physical-education.svg\",\n \"subject-physical-therapy\": \"subject-icons/physical-therapy.svg\",\n \"subject-physics\": \"subject-icons/physics.svg\",\n \"subject-religious-education\": \"subject-icons/religious-education.svg\",\n \"subject-rshe-pshe\": \"subject-icons/rshe-pshe.svg\",\n \"subject-science\": \"subject-icons/science.svg\",\n \"subject-sensory-integration\": \"subject-icons/sensory-integration.svg\",\n \"subject-spanish\": \"subject-icons/spanish.svg\",\n \"subject-speech-and-language-therapy\":\n \"subject-icons/speech-and-language.svg\",\n \"subject-therapy\": \"subject-icons/therapy.svg\",\n \"subject-understanding-the-world\":\n \"subject-icons/understanding-the-world.svg\",\n} as const;\n\nexport type IconName = keyof typeof icons;\n","import React from \"react\";\n\nimport { IconName, icons } from \"../../../image-map\";\n\nimport { OakImage, OakImageProps } from \"@/components/atoms/OakImage\";\n\nexport const oakIconNames = Object.keys(icons) as IconName[];\n\nexport type OakIconName = IconName;\n\nexport type OakIconProps = Omit<OakImageProps, \"alt\" | \"src\"> & {\n /**\n * The name of the icon to display\n *\n * Accepts an icon name token\n */\n iconName: OakIconName;\n alt?: string;\n};\n\n/**\n * returns true if the given string is a valid `OakIconName`\n */\nexport function isValidIconName(iconName: string): iconName is OakIconName {\n return oakIconNames.includes(iconName as OakIconName);\n}\n\n/**\n * A wrapper around OakImage which uses the image-map.json file to map icon names to image paths.\n */\nexport const OakIcon = (props: OakIconProps) => {\n const {\n iconName,\n alt,\n $width = \"all-spacing-7\",\n $height = \"all-spacing-7\",\n $minHeight = $height,\n $minWidth = $width,\n imageProps,\n ...rest\n } = props;\n\n return (\n <OakImage\n src={`https://${process.env.NEXT_PUBLIC_OAK_ASSETS_HOST}/${process.env.NEXT_PUBLIC_OAK_ASSETS_PATH}/${icons[iconName]}`}\n alt={alt ?? iconName}\n $width={$width}\n $height={$height}\n $minHeight={$minHeight}\n $minWidth={$minWidth}\n placeholder=\"empty\"\n // Icons should not be optimised since the SVG is already as small as it can be and should be served directly\n unoptimized\n {...rest}\n />\n );\n};\n","import styled, { css, CSSProperties } from \"styled-components\";\n\nimport {\n responsiveStyle,\n ResponsiveValues,\n} from \"@/styles/utils/responsiveStyle\";\nimport { OakBox, OakBoxProps } from \"@/components/atoms/OakBox\";\nimport { parseSpacing } from \"@/styles/helpers/parseSpacing\";\nimport { OakCombinedSpacingToken } from \"@/styles\";\n\nconst gridStyle = css<OakGridProps>`\n ${responsiveStyle(\"row-gap\", (props) => props.$rg, parseSpacing)}\n ${responsiveStyle(\"column-gap\", (props) => props.$cg, parseSpacing)}\n ${responsiveStyle(\"grid-auto-rows\", (props) => props.$gridAutoRows)}\n ${responsiveStyle(\"grid-template-areas\", (props) => props.$gridTemplateAreas)}\n ${responsiveStyle(\n \"grid-template-columns\",\n (props) => props.$gridTemplateColumns,\n )}\n ${responsiveStyle(\"grid-template-rows\", (props) => props.$gridTemplateRows)}\n`;\n\nexport type OakGridProps = OakBoxProps & {\n /**\n * Applies `row-gap` to the grid\n *\n * Accepts a spacing token or a responsive array of spacing tokens.\n */\n $rg?: ResponsiveValues<OakCombinedSpacingToken>;\n /**\n * Applies `column-gap` to the grid\n *\n * Accepts a spacing token or a responsive array of spacing tokens.\n */\n $cg?: ResponsiveValues<OakCombinedSpacingToken>;\n /**\n * Applies `grid-auto-rows` to the grid\n *\n * Accepts a `grid-auto-rows` value or a responsive array of `grid-auto-rows` values.\n */\n $gridAutoRows?: ResponsiveValues<CSSProperties[\"gridAutoRows\"]>;\n /**\n * Applies `grid-template-areas` to the grid\n *\n * Accepts a `grid-template-areas` value or a responsive array of `grid-template-areas` values.\n */\n $gridTemplateAreas?: ResponsiveValues<CSSProperties[\"gridTemplateAreas\"]>;\n /**\n * Applies `grid-template-columns` to the grid\n *\n * Accepts a `grid-template-columns` value or a responsive array of `grid-template-columns` values.\n */\n $gridTemplateColumns?: ResponsiveValues<CSSProperties[\"gridTemplateColumns\"]>;\n /**\n * Applies `grid-template-rows` to the grid\n *\n * Accepts a `grid-template-rows` value or a responsive array of `grid-template-rows` values.\n */\n $gridTemplateRows?: ResponsiveValues<CSSProperties[\"gridTemplateRows\"]>;\n};\n\n/**\n * Creates a grid layout\n *\n * Defaults to a 12 column grid\n */\nexport const OakGrid = styled(OakBox)<OakGridProps>`\n display: grid;\n grid-template-columns: repeat(12, 1fr);\n width: 100%;\n ${gridStyle}\n`;\n","import styled, { css, CSSProperties } from \"styled-components\";\n\nimport {\n responsiveStyle,\n ResponsiveValues,\n} from \"@/styles/utils/responsiveStyle\";\nimport { SpacingStyleProps } from \"@/styles/utils/spacingStyle\";\nimport { OakFlex, OakFlexProps } from \"@/components/atoms/OakFlex\";\n\ntype ColRowSpan = 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12;\n\nexport type OakGridAreaProps = {\n /**\n * Determines the number of columns the element should span.\n *\n * Accepts a value from 0-12 or a responsive value of 0-12.\n */\n $colSpan: ResponsiveValues<ColRowSpan>;\n /**\n * Determines the number of rows the element should span.\n *\n * Accepts a value from 0-12 or a responsive value of 0-12.\n */\n $rowSpan?: ResponsiveValues<ColRowSpan>;\n /**\n * Sets the order of the element.\n *\n * Accepts a number or a responsive array of numbers.\n */\n $order?: ResponsiveValues<CSSProperties[\"order\"]>;\n /**\n * The start column of the element.\n *\n * Accepts a value from 0-12 or a responsive value of 0-12.\n */\n $colStart?: ResponsiveValues<ColRowSpan>;\n /**\n * The end column of the element.\n *\n * Accepts a value from 0-12 or a responsive value of 0-12.\n */\n $colEnd?: ResponsiveValues<ColRowSpan>;\n /**\n * The start row of the element.\n *\n * Accepts a value from 0-12 or a responsive value of 0-12.\n */\n $rowStart?: ResponsiveValues<ColRowSpan>;\n} & SpacingStyleProps;\n\nconst combineSpanStart = (\n start?: ColRowSpan | null,\n span?: ColRowSpan | null,\n) => {\n return start ? `${start}/${span}` : `${span}`;\n};\n\nconst parseSpanStart = (value?: string | null) => {\n if (value?.includes(\"/\")) {\n const [start, span] = value.split(\"/\");\n return `${start} / span ${span}`;\n }\n const span = value;\n return `span ${span}`;\n};\n\nconst gridArea = css<OakGridAreaProps>`\n flex-direction: column;\n ${responsiveStyle(\n \"grid-column\",\n (props) => {\n return Array.isArray(props.$colSpan)\n ? props.$colSpan.map((span, index) =>\n combineSpanStart(\n Array.isArray(props.$colStart)\n ? props.$colStart[index]\n : props.$colStart,\n span,\n ),\n )\n : combineSpanStart(\n Array.isArray(props.$colStart)\n ? props.$colStart[0]\n : props.$colStart,\n props.$colSpan,\n );\n },\n (value) => parseSpanStart(value),\n )};\n ${responsiveStyle(\n \"grid-row\",\n (props) => {\n return Array.isArray(props.$rowSpan)\n ? props.$rowSpan.map((span, index) =>\n combineSpanStart(\n Array.isArray(props.$rowStart)\n ? props.$rowStart[index]\n : props.$rowStart,\n span,\n ),\n )\n : combineSpanStart(\n Array.isArray(props.$rowStart)\n ? props.$rowStart[0]\n : props.$rowStart,\n props.$rowSpan,\n );\n },\n (value) => parseSpanStart(value),\n )};\n ${responsiveStyle(\n \"order\",\n (props) => props.$order,\n (value) => value && `${value}`,\n )};\n ${responsiveStyle(\"grid-row\", (props) =>\n props.$rowSpan ? `span ${props.$rowSpan}` : \"span 1\",\n )};\n ${responsiveStyle(\"grid-column-start\", (props) => props.$colStart)}\n ${responsiveStyle(\"grid-column-end\", (props) => props.$colEnd)}\n ${responsiveStyle(\"grid-row-start\", (props) => props.$rowStart)}\n`;\n\n/**\n *\n * OakGridArea is a flex container that should be used inside OakGrid.\n *\n * - There is no nesting of OakGridAreas\n * - Column and row arrangements are achieved through $colSpan, $rowSpan, $colStart, $colEnd, $rowStart, $rowEnd\n *\n */\n\nexport const OakGridArea = styled(OakFlex)<OakGridAreaProps & OakFlexProps>`\n ${gridArea}\n`;\n","import styled from \"styled-components\";\n\nimport { OakFlex, OakFlexProps } from \"../OakFlex\";\n\nexport type OakMaxWidthProps = OakFlexProps;\n\n/**\n * This component will provide a default maxWidth and ph value, it take Flex props.\n * ## Usage\n * Use this component on pages to limit the max-width to a specific container.\n * This will make it easier to create full browser width or custom width containers on the same page\n * with different background colors / image url.\n */\nexport const OakMaxWidth = styled(OakFlex)``;\n\nOakMaxWidth.defaultProps = {\n $maxWidth: [\"all-spacing-21\", \"all-spacing-24\"],\n $ph: [\"inner-padding-none\", \"inner-padding-s\"],\n $flexDirection: \"column\",\n $flexGrow: 1,\n $width: \"100%\",\n $mh: \"auto\",\n};\n","import { getCldImageUrl, type CldImageProps } from \"next-cloudinary\";\n\nexport function getCloudinaryIdFromUrl(\n src: string | URL,\n config?: CldImageProps[\"config\"],\n) {\n // When a private CDN is used, CldImage will only accept the image ID as the src\n // this appears to be a limitation of the library which appears to have been designed\n // with basic public CDN usage in mind.\n return src.toString().replace(getCloudinaryRootUrl(config), \"\");\n}\n\n// Attempts to build the stem of a cloudinary URL, this is used to extract the image id\nfunction getCloudinaryRootUrl(config?: CldImageProps[\"config\"]) {\n // `getCldImageUrl` handles all the logic to construct a cloudinary URL from the given config\n // (supporting private CDNs, custom CNAMES etc. so we don't have to)\n const canaryUrl = new URL(getCldImageUrl({ src: \"canary.jpg\" }, config));\n return canaryUrl.origin + \"/image/upload/\";\n}\n","import React, { createContext, useContext } from \"react\";\nimport { CldImage, CldImageProps } from \"next-cloudinary\";\n\nimport { OakImage, OakImageProps } from \"../OakImage\";\n\nimport { getCloudinaryIdFromUrl } from \"./cloudinary\";\n\nexport type OakCloudinaryImageProps = Omit<\n OakImageProps<typeof CldImage>,\n \"src\" | \"imageProps\"\n> & {\n /**\n * The cloudinary image id or the full cloudinary URL\n *\n * Usually in the format `v1234567890/image.jpg`\n */\n cloudinaryId: string;\n};\n\nconst cloudinaryConfigContext = createContext<\n CldImageProps[\"config\"] | undefined\n>(undefined);\n\n/**\n * Provides a Cloudinary config to all descendent `OakCloudinaryImage` elements.\n *\n * See https://cloudinary.com/documentation/cloudinary_sdks#configuration_parameters\n * for documentation of the config object.\n */\nexport const OakCloudinaryConfigProvider = cloudinaryConfigContext.Provider;\n\n/**\n * OakCloudinaryImage wraps OakImage providing responsive images from Cloudinary\n * based on the `sizes` prop.\n *\n * Cloudinary cloud name can be set globally with `NEXT_PUBLIC_CLOUDINARY_CLOUD_NAME` or a config\n * can be passed with `OakCloudinaryConfigProvider`.\n */\nexport const OakCloudinaryImage = ({\n cloudinaryId,\n unoptimized = false || cloudinaryId.endsWith(\".svg\"),\n ...props\n}: OakCloudinaryImageProps) => {\n const config = useContext(cloudinaryConfigContext);\n const src = getCloudinaryIdFromUrl(cloudinaryId, config);\n\n return (\n <OakImage\n as={CldImage}\n src={src}\n imageProps={{\n config,\n flags: unoptimized ? undefined : [\"keep_attribution\"],\n }}\n unoptimized={unoptimized}\n {...props}\n />\n );\n};\n","import React, { ReactNode } from \"react\";\n\nimport { OakSpan } from \"@/components/atoms/OakSpan\";\n\nexport type OakKbdProps = {\n children: ReactNode;\n};\n\n/**\n * Represents textual user input from a keyboard, voice input, or any other text entry device.\n * */\nexport const OakKbd = ({ children }: OakKbdProps) => {\n return (\n <OakSpan\n $font=\"body-3-bold\"\n as=\"kbd\"\n $borderColor=\"border-decorative3-stronger\"\n $background=\"bg-primary\"\n $borderRadius=\"border-radius-m\"\n $ba=\"border-solid-m\"\n $ph=\"inner-padding-xs\"\n $pv=\"inner-padding-ssx\"\n $whiteSpace=\"nowrap\"\n >\n {children}\n </OakSpan>\n );\n};\n","/**\n * From https://piccalil.li/blog/a-modern-css-reset/\n * Do not edit this file. If you want to add global styles, use oak.styles.ts\n */\n\nimport { css } from \"styled-components\";\n\nexport const resetGlobalCss = css`\n /* Box sizing rules */\n *,\n *::before,\n *::after {\n box-sizing: border-box;\n }\n\n /* Remove default margin */\n body,\n h1,\n h2,\n h3,\n h4,\n h5,\n p,\n figure,\n blockquote,\n dl,\n dd {\n margin: 0;\n }\n\n /* Remove list styles on ul, ol elements with a list role, which suggests default styling will be removed */\n ul[role=\"list\"],\n ol[role=\"list\"] {\n list-style: none;\n padding-left: 0;\n margin-top: 0;\n margin-bottom: 0;\n }\n\n /* Set core root defaults */\n html,\n html:focus-within {\n scroll-behavior: smooth;\n }\n\n /* Set core body defaults */\n body {\n min-height: 100vh;\n text-rendering: optimizespeed;\n line-height: 1.5;\n }\n\n /* A elements that don't have a class get default styles */\n a:not([class]) {\n text-decoration-skip-ink: auto;\n }\n\n /* Make images easier to work with */\n img,\n picture {\n max-width: 100%;\n display: block;\n }\n\n /* Inherit fonts for inputs and buttons */\n input,\n button,\n textarea,\n select {\n font: inherit;\n }\n\n cite {\n font-style: inherit;\n }\n\n /* Remove all animations, transitions and smooth scroll for people that prefer not to see them */\n @media (prefers-reduced-motion: reduce) {\n html:focus-within {\n scroll-behavior: auto;\n }\n\n *,\n *::before,\n *::after {\n animation-duration: 0.01ms !important;\n animation-iteration-count: 1 !important;\n transition-duration: 0.01ms !important;\n scroll-behavior: auto !important;\n }\n }\n`;\n\nexport default resetGlobalCss;\n","/**\n * This is our global stylesheet. It's for resets in addition to reset.styles.ts\n * which is taken from a publically available reset. We want to minimise global\n * styles where possible so if you add any styles here please comment with what\n * they are doing and why they belong here (rather than in component specific\n * styles)\n */\n\nimport { css } from \"styled-components\";\n\nexport const oakGlobalCss = css`\n html,\n body {\n padding: 0;\n margin: 0;\n font-family: Lexend, sans-serif;\n font-weight: 300;\n line-height: 1.4;\n }\n\n /* stylelint-disable */\n body,\n #__next {\n /* stylelint-enable */\n display: flex;\n flex-direction: column;\n flex-grow: 1;\n }\n\n a {\n color: inherit;\n text-decoration: none;\n font-family: inherit;\n\n /*\n * Remove grey background on tap on ios\n */\n -webkit-tap-highlight-color: transparent;\n }\n\n button {\n /*\n * some browsers have a small margin by default\n * @see https://github.com/oaknational/Oak-Web-Application/issues/709\n */\n margin: 0;\n\n /*\n * Remove grey background on tap on ios\n */\n -webkit-tap-highlight-color: transparent;\n }\n\n /*\n * Inline styling for mathjax equations\n */\n mjx-container {\n display: inline-grid !important;\n margin: 0 !important;\n }\n`;\n","import { createGlobalStyle } from \"styled-components\";\n\nimport { resetGlobalCss } from \"@/styles/global/reset.styles\";\nimport { oakGlobalCss } from \"@/styles/global/oak.styles\";\n\n/**\n *\n * Currently this is just for storybook as it is already applied in OWA\n *\n */\n\nexport const OakGlobalStyle = createGlobalStyle`\n ${resetGlobalCss}\n ${oakGlobalCss}\n`;\n","import styled, { css } from \"styled-components\";\n\nconst screenReaderStyle = css`\n position: absolute;\n width: 1px;\n height: 1px;\n padding: 0;\n margin: -1px;\n overflow: hidden;\n clip: rect(0, 0, 0, 0);\n white-space: nowrap;\n border: 0;\n`;\n\n/**\n * This component will visually hide its contents but will still be available\n * to screen readers, assitive technology, and scrapers.\n * ## Usage\n * Use this component in places where content shouldn't be visible, but should\n * be accessible to assistive technology.\n */\nexport const OakScreenReader = styled.span`\n ${screenReaderStyle}\n`;\n","import React from \"react\";\nimport styled, { css, keyframes } from \"styled-components\";\n\nimport { OakScreenReader } from \"@/components/atoms/OakScreenReader\";\nimport { SizeStyleProps } from \"@/styles/utils/sizeStyle\";\nimport { parseSpacing } from \"@/styles/helpers/parseSpacing\";\nimport { responsiveStyle } from \"@/styles/utils/responsiveStyle\";\nimport { ColorStyleProps, colorStyle } from \"@/styles/utils/colorStyle\";\nimport { OakCombinedColorToken } from \"@/styles\";\n\nconst SpinnerKeyframe = keyframes`\n 0% {\n transform: rotate(0deg);\n }\n\n 100% {\n transform: rotate(360deg);\n }\n`;\n\nexport type OakLoadingSpinnerProps = Pick<SizeStyleProps, \"$width\"> &\n ColorStyleProps & { loaderColor?: OakCombinedColorToken };\n\nconst StyledLoadingSpinner = styled.span<OakLoadingSpinnerProps>`\n ${(props) =>\n props.$width\n ? responsiveStyle(\"--width\", (props) => props.$width, parseSpacing)\n : css`\n --width: 1.25rem;\n `}\n --inner-width: calc(var(--width) / 10 * 8);\n --thickness: calc(var(--width) / 12);\n\n display: inline-flex;\n width: var(--width);\n height: var(--width);\n\n ::after {\n content: \" \";\n display: block;\n width: var(--inner-width);\n height: var(--inner-width);\n margin: var(--thickness);\n border-radius: 50%;\n border: var(--thickness) solid currentcolor;\n ${(props) =>\n props.loaderColor\n ? css`\n border-color: ${props.loaderColor} ${props.loaderColor}\n ${props.loaderColor} transparent;\n `\n : css`\n border-color: currentcolor currentcolor currentcolor transparent;\n `}\n animation: ${SpinnerKeyframe} 1.2s linear infinite;\n }\n ${colorStyle}\n`;\n\n/**\n *\n * A loading spinner of variable size.\n *\n */\nexport const OakLoadingSpinner = (props: OakLoadingSpinnerProps) => (\n <StyledLoadingSpinner {...props}>\n <OakScreenReader>Loading</OakScreenReader>\n </StyledLoadingSpinner>\n);\n","import React, { ElementType, useRef } from \"react\";\nimport styled, { css } from \"styled-components\";\n\nimport { colorStyle, ColorStyleProps } from \"@/styles/utils/colorStyle\";\nimport { displayStyle, DisplayStyleProps } from \"@/styles/utils/displayStyle\";\nimport { spacingStyle, SpacingStyleProps } from \"@/styles/utils/spacingStyle\";\nimport {\n typographyStyle,\n TypographyStyleProps,\n} from \"@/styles/utils/typographyStyle\";\nimport {\n dropShadowStyle,\n DropShadowStyleProps,\n} from \"@/styles/utils/dropShadowStyle\";\nimport { borderStyle, BorderStyleProps } from \"@/styles/utils/borderStyle\";\nimport { PolymorphicPropsWithoutRef } from \"@/components/polymorphic\";\n\ntype StyledButtonProps = TypographyStyleProps &\n SpacingStyleProps &\n ColorStyleProps &\n DisplayStyleProps &\n BorderStyleProps &\n DropShadowStyleProps & {\n isLoading?: boolean;\n };\n\nconst internalButtonCss = css<StyledButtonProps>`\n background: none;\n color: inherit;\n border: none;\n padding: 0;\n font: inherit;\n cursor: pointer;\n text-align: left;\n font-family: unset;\n outline: none;\n ${typographyStyle}\n ${colorStyle}\n ${spacingStyle}\n ${displayStyle}\n ${borderStyle}\n ${dropShadowStyle}\n &:disabled {\n pointer-events: none;\n cursor: default;\n }\n`;\n\nexport type InternalButtonProps = StyledButtonProps & {\n onHovered?: (\n event: React.MouseEvent<HTMLButtonElement, MouseEvent>,\n duration: number,\n ) => void;\n};\n\nconst UnstyledInternalButton = <C extends ElementType = \"button\">(\n props: InternalButtonProps & PolymorphicPropsWithoutRef<C>,\n) => {\n const { onClick, onHovered, element: Component = \"button\", ...rest } = props;\n\n const hoverStart = useRef(Date.now());\n\n const handleClick = (event: React.MouseEvent<HTMLButtonElement>) => {\n if (onClick) {\n onClick(event);\n }\n };\n\n const handleMouseEnter = () => {\n hoverStart.current = Date.now();\n };\n\n const handleMouseLeave = (event: React.MouseEvent<HTMLButtonElement>) => {\n const delta = Date.now() - hoverStart.current;\n if (onHovered) {\n onHovered(event, delta);\n }\n };\n\n return (\n <Component\n {...rest}\n onClick={handleClick}\n onMouseEnter={handleMouseEnter}\n onMouseLeave={handleMouseLeave}\n />\n );\n};\n\n/**\n *\n * An unstyled button to be used as a basis for all UI button components.\n * The following callbacks are available for tracking focus events:\n *\n * ### onClick\n * `onClick?: (event: React.MouseEvent<HTMLButtonElement, MouseEvent>) => void;`\n\n * ### onHovered\n * `onHovered?: (event: React.MouseEvent<HTMLButtonElement, MouseEvent>, duration: number) => void;`<br>\n * called after a mouseEnter and mouseLeave event has happened\n * \n * NB. We must export a styled component for it to be inheritable\n */\nexport const InternalButton = styled(UnstyledInternalButton)`\n ${internalButtonCss}\n`;\n","import React, { ElementType } from \"react\";\nimport styled, { css } from \"styled-components\";\n\nimport { OakBox, OakBoxProps, OakFlex, OakSpan } from \"@/components/atoms\";\nimport {\n InternalButton,\n InternalButtonProps,\n} from \"@/components/atoms/InternalButton\";\nimport { OakIcon, OakIconName } from \"@/components/atoms/OakIcon\";\nimport { OakLoadingSpinner } from \"@/components/molecules/OakLoadingSpinner\";\nimport { parseDropShadow } from \"@/styles/helpers/parseDropShadow\";\nimport {\n PositionStyleProps,\n positionStyle,\n} from \"@/styles/utils/positionStyle\";\nimport { parseColor } from \"@/styles/helpers/parseColor\";\nimport { OakCombinedColorToken, OakDropShadowToken } from \"@/styles\";\nimport { SizeStyleProps, sizeStyle } from \"@/styles/utils/sizeStyle\";\nimport { PolymorphicPropsWithoutRef } from \"@/components/polymorphic\";\n\nexport type InternalShadowRectButtonProps = Omit<\n InternalButtonProps,\n | \"$pa\"\n | \"$ph\"\n | \"$pv\"\n | \"$ba\"\n | \"$borderRadius\"\n | \"$borderColor\"\n | \"$background\"\n | \"$color\"\n> & {\n iconName?: OakIconName;\n isTrailingIcon?: boolean;\n defaultTextColor: OakCombinedColorToken;\n defaultBackground: OakCombinedColorToken;\n defaultBorderColor: OakCombinedColorToken;\n hoverTextColor: OakCombinedColorToken;\n hoverBackground: OakCombinedColorToken;\n hoverBorderColor: OakCombinedColorToken;\n disabledBackground: OakCombinedColorToken;\n disabledBorderColor: OakCombinedColorToken;\n disabledTextColor: OakCombinedColorToken;\n width?: SizeStyleProps[\"$width\"];\n maxWidth?: SizeStyleProps[\"$maxWidth\"];\n hoverShadow?: OakDropShadowToken | null;\n} & PositionStyleProps;\n\nconst StyledInternalButton = styled(InternalButton)<\n SizeStyleProps & {\n $defaultTextColor: OakCombinedColorToken;\n $defaultBackground: OakCombinedColorToken;\n $defaultBorderColor: OakCombinedColorToken;\n $hoverTextColor: OakCombinedColorToken;\n $hoverBackground: OakCombinedColorToken;\n $hoverBorderColor: OakCombinedColorToken;\n $disabledBackground: OakCombinedColorToken;\n $disabledBorderColor: OakCombinedColorToken;\n $disabledTextColor: OakCombinedColorToken;\n }\n>`\n ${positionStyle}\n ${sizeStyle}\n display: inline-block;\n ${(props) => css`\n &:hover {\n text-decoration: underline;\n color: ${parseColor(props.$hoverTextColor)};\n background: ${parseColor(props.$hoverBackground)};\n border-color: ${parseColor(props.$hoverBorderColor)};\n }\n &:active {\n background: ${parseColor(props.$defaultBackground)};\n border-color: ${parseColor(props.$defaultBorderColor)};\n color: ${parseColor(props.$defaultTextColor)};\n }\n &:disabled {\n background: ${parseColor(props.$disabledBackground)};\n border-color: ${parseColor(props.$disabledBorderColor)};\n color: ${parseColor(props.$disabledTextColor)};\n }\n `}\n`;\n\nconst StyledButtonWrapper = styled(OakBox)<\n OakBoxProps & {\n $hoverShadow?: OakDropShadowToken | null;\n }\n>`\n .grey-shadow:has(+ * + .internal-button:focus-visible) {\n box-shadow: ${parseDropShadow(\"drop-shadow-centered-grey\")};\n }\n .yellow-shadow:has(+ .internal-button:focus-visible) {\n box-shadow: ${parseDropShadow(\"drop-shadow-centered-lemon\")};\n }\n .yellow-shadow:has(+ .internal-button:hover),\n .yellow-shadow:has(+ .internal-button:hover:not(:focus-visible, :active)) {\n box-shadow: ${(props) => parseDropShadow(props.$hoverShadow)};\n }\n .grey-shadow:has(+ * + .internal-button:hover) {\n box-shadow: none;\n }\n .grey-shadow:has(+ * + .internal-button:active) {\n box-shadow: ${parseDropShadow(\"drop-shadow-grey\")};\n }\n .yellow-shadow:has(+ .internal-button:active) {\n box-shadow: ${parseDropShadow(\"drop-shadow-lemon\")};\n }\n`;\n\n/**\n *\n * A styled rectangular button, not intended to be used directly. \n * Instead used by OakPrimaryButton and OakSecondaryButton.\n * \n * The following callbacks are available for tracking focus events:\n *\n * ### onClick\n * `onClick?: (event: React.MouseEvent<HTMLButtonElement, MouseEvent>) => void;`\n\n * ### onHovered\n * `onHovered?: (event: React.MouseEvent<HTMLButtonElement, MouseEvent>, duration: number) => void;`<br>\n * called after a mouseEnter and mouseLeave event has happened\n */\nexport const InternalShadowRectButton = <C extends ElementType = \"button\">(\n props: InternalShadowRectButtonProps & PolymorphicPropsWithoutRef<C>,\n) => {\n const {\n element = \"button\",\n children,\n iconName,\n isTrailingIcon,\n isLoading,\n disabled,\n width = \"max-content\",\n maxWidth,\n defaultBackground,\n defaultBorderColor,\n defaultTextColor,\n disabledTextColor,\n hoverTextColor,\n hoverBackground,\n hoverBorderColor,\n disabledBackground,\n disabledBorderColor,\n className,\n hoverShadow = \"drop-shadow-lemon\",\n ...rest\n } = props;\n\n const icon = (\n <>\n {iconName && (\n <OakIcon\n iconName={iconName}\n $width={\"all-spacing-6\"}\n $height={\"all-spacing-6\"}\n $colorFilter={props.disabled ? disabledTextColor : defaultTextColor}\n />\n )}\n </>\n );\n\n const loader = (\n <OakBox $width={\"all-spacing-6\"} $height={\"all-spacing-6\"}>\n <OakLoadingSpinner $width={\"all-spacing-6\"} />\n </OakBox>\n );\n\n const iconLogic = <>{isLoading && !disabled ? loader : icon}</>;\n\n return (\n <StyledButtonWrapper\n className={className}\n $position={\"relative\"}\n $width={width}\n $maxWidth={maxWidth}\n $hoverShadow={hoverShadow}\n >\n <OakBox\n className=\"grey-shadow\"\n $position={\"absolute\"}\n $borderRadius={\"border-radius-s\"}\n $width={\"100%\"}\n $height={\"100%\"}\n $top=\"all-spacing-0\"\n />\n\n <OakBox\n className=\"yellow-shadow\"\n $position={\"absolute\"}\n $borderRadius={\"border-radius-s\"}\n $width={\"100%\"}\n $height={\"100%\"}\n $top=\"all-spacing-0\"\n />\n\n <StyledInternalButton\n element={element}\n className=\"internal-button\"\n $ba={\"border-solid-m\"}\n $background={defaultBackground}\n $borderColor={defaultBorderColor}\n $color={defaultTextColor}\n $pv={\"inner-padding-s\"}\n $ph={\"inner-padding-m\"}\n $borderRadius={\"border-radius-s\"}\n $position={\"relative\"}\n disabled={disabled || isLoading}\n $width={\"100%\"}\n $height={\"100%\"}\n $hoverTextColor={hoverTextColor}\n $hoverBackground={hoverBackground}\n $hoverBorderColor={hoverBorderColor}\n $defaultTextColor={defaultTextColor}\n $defaultBackground={defaultBackground}\n $defaultBorderColor={defaultBorderColor}\n $disabledTextColor={disabledTextColor}\n $disabledBackground={disabledBackground}\n $disabledBorderColor={disabledBorderColor}\n {...rest}\n >\n <OakFlex\n $flexDirection={\"row\"}\n $alignItems={\"center\"}\n $gap=\"space-between-ssx\"\n $justifyContent=\"center\"\n >\n {!isTrailingIcon && iconLogic}\n <OakSpan $font={\"heading-7\"}>{children}</OakSpan>\n {isTrailingIcon && iconLogic}\n </OakFlex>\n </StyledInternalButton>\n </StyledButtonWrapper>\n );\n};\n","import React, { ElementType } from \"react\";\n\nimport {\n InternalShadowRectButton,\n InternalShadowRectButtonProps,\n} from \"@/components/molecules/InternalShadowRectButton\";\nimport { PolymorphicPropsWithoutRef } from \"@/components/polymorphic\";\n\nexport type OakPrimaryButtonProps = Omit<\n InternalShadowRectButtonProps,\n | \"defaultBorderColor\"\n | \"defaultBackground\"\n | \"defaultTextColor\"\n | \"hoverBackground\"\n | \"hoverBorderColor\"\n | \"hoverTextColor\"\n | \"disabledBackground\"\n | \"disabledBorderColor\"\n | \"disabledTextColor\"\n>;\n\n/**\n *\n * A specific implementation of InternalRectButton\n *\n * The following callbacks are available for tracking focus events:\n *\n * ### onClick\n * `onClick?: (event: React.MouseEvent<HTMLButtonElement, MouseEvent>) => void;`\n *\n * ### onHovered\n * `onHovered?: (event: React.MouseEvent<HTMLButtonElement, MouseEvent>, duration: number) => void;`<br>\n * called after a mouseEnter and mouseLeave event has happened\n */\nexport const OakPrimaryButton = <C extends ElementType = \"button\">({\n element,\n ...rest\n}: OakPrimaryButtonProps & PolymorphicPropsWithoutRef<C>) => {\n return (\n <InternalShadowRectButton\n element={element ?? \"button\"}\n defaultBorderColor=\"bg-btn-primary\"\n defaultBackground=\"bg-btn-primary\"\n defaultTextColor=\"text-inverted\"\n hoverBackground=\"bg-btn-primary-hover\"\n hoverBorderColor=\"bg-btn-primary-hover\"\n hoverTextColor=\"text-inverted\"\n disabledBackground=\"bg-btn-primary-disabled\"\n disabledBorderColor=\"text-disabled\"\n disabledTextColor=\"text-inverted\"\n {...rest}\n />\n );\n};\n","import React, { ElementType } from \"react\";\n\nimport {\n InternalShadowRectButton,\n InternalShadowRectButtonProps,\n} from \"@/components/molecules/InternalShadowRectButton\";\nimport { PolymorphicPropsWithoutRef } from \"@/components/polymorphic\";\n\nexport type OakPrimaryInvertedButtonProps = Omit<\n InternalShadowRectButtonProps,\n | \"defaultBorderColor\"\n | \"defaultBackground\"\n | \"defaultTextColor\"\n | \"hoverBackground\"\n | \"hoverBorderColor\"\n | \"hoverTextColor\"\n | \"disabledBackground\"\n | \"disabledBorderColor\"\n | \"disabledTextColor\"\n>;\n\n/**\n *\n * A specific implementation of InternalRectButton\n *\n * The following callbacks are available for tracking focus events:\n *\n * ### onClick\n * `onClick?: (event: React.MouseEvent<HTMLButtonElement, MouseEvent>) => void;`\n *\n * ### onHovered\n * `onHovered?: (event: React.MouseEvent<HTMLButtonElement, MouseEvent>, duration: number) => void;`<br>\n * called after a mouseEnter and mouseLeave event has happened\n */\nexport const OakPrimaryInvertedButton = <C extends ElementType = \"button\">({\n element,\n ...rest\n}: OakPrimaryInvertedButtonProps & PolymorphicPropsWithoutRef<C>) => {\n return (\n <InternalShadowRectButton\n element={element ?? \"button\"}\n defaultBorderColor=\"bg-btn-secondary\"\n defaultBackground=\"bg-btn-secondary\"\n defaultTextColor=\"text-primary\"\n hoverBackground=\"bg-btn-secondary\"\n hoverBorderColor=\"bg-btn-secondary\"\n hoverTextColor=\"text-primary\"\n disabledBackground=\"bg-btn-secondary\"\n disabledBorderColor=\"bg-btn-secondary\"\n disabledTextColor=\"text-disabled\"\n hoverShadow={null}\n {...rest}\n />\n );\n};\n","import React, { ElementType } from \"react\";\nimport styled, { css } from \"styled-components\";\n\nimport { OakRoundIconProps } from \"../OakRoundIcon\";\n\nimport { parseColorFilter } from \"@/styles/helpers/parseColorFilter\";\nimport { PolymorphicPropsWithoutRef } from \"@/components/polymorphic\";\nimport { OakBox, OakFlex, OakSpan } from \"@/components/atoms\";\nimport {\n InternalButton,\n InternalButtonProps,\n} from \"@/components/atoms/InternalButton\";\nimport { OakIcon, OakIconName } from \"@/components/atoms/OakIcon\";\nimport { OakLoadingSpinner } from \"@/components/molecules/OakLoadingSpinner\";\nimport { parseDropShadow } from \"@/styles/helpers/parseDropShadow\";\nimport {\n PositionStyleProps,\n positionStyle,\n} from \"@/styles/utils/positionStyle\";\nimport { parseColor } from \"@/styles/helpers/parseColor\";\nimport { OakCombinedColorToken } from \"@/styles\";\nimport { SizeStyleProps, sizeStyle } from \"@/styles/utils/sizeStyle\";\n\nexport type InternalShadowRoundButtonProps = Omit<\n InternalButtonProps,\n | \"$pa\"\n | \"$ph\"\n | \"$pv\"\n | \"$ba\"\n | \"$borderRadius\"\n | \"$borderColor\"\n | \"$background\"\n | \"$color\"\n> & {\n iconName?: OakIconName;\n isTrailingIcon?: boolean;\n defaultTextColor: OakCombinedColorToken;\n hoverTextColor: OakCombinedColorToken;\n disabledTextColor: OakCombinedColorToken;\n defaultIconBackground: OakCombinedColorToken;\n hoverIconBackground: OakCombinedColorToken;\n hoverIconColor?: OakCombinedColorToken;\n disabledIconBackground: OakCombinedColorToken;\n defaultIconColor?: OakRoundIconProps[\"$colorFilter\"];\n disabledIconColor?: OakRoundIconProps[\"$colorFilter\"];\n width?: SizeStyleProps[\"$width\"];\n maxWidth?: SizeStyleProps[\"$maxWidth\"];\n iconBackgroundSize: SizeStyleProps[\"$width\"];\n iconSize: SizeStyleProps[\"$width\"];\n} & PositionStyleProps;\n\nconst StyledInternalButton = styled(InternalButton)<\n InternalShadowRoundButtonProps & SizeStyleProps\n>`\n display: inline-block;\n ${positionStyle}\n ${sizeStyle}\n ${(props) => css`\n &:hover {\n text-decoration: underline;\n color: ${parseColor(props.$hoverTextColor)};\n\n &:not(:active) [data-icon-for=\"button\"] img {\n filter: ${props.$hoverIconColor\n ? parseColorFilter(props.$hoverIconColor)\n : undefined};\n }\n }\n &:active {\n color: ${parseColor(props.$defaultTextColor)};\n }\n &:disabled {\n color: ${parseColor(props.$disabledTextColor)};\n }\n `}\n`;\n\nconst StyledButtonWrapper = styled(OakFlex)<{\n $disabledIconBackground: OakCombinedColorToken;\n $hoverIconBackground: OakCombinedColorToken;\n $defaultIconBackground: OakCombinedColorToken;\n}>`\n > :first-child:focus-visible .shadow {\n box-shadow: ${parseDropShadow(\"drop-shadow-centered-lemon\")},\n ${parseDropShadow(\"drop-shadow-centered-grey\")};\n }\n > :first-child:hover .shadow {\n box-shadow: ${parseDropShadow(\"drop-shadow-lemon\")};\n }\n > :first-child:active .shadow {\n box-shadow: ${parseDropShadow(\"drop-shadow-lemon\")},\n ${parseDropShadow(\"drop-shadow-grey\")};\n }\n ${(props) => css`\n > :first-child:disabled .icon-container {\n background: ${parseColor(props.$disabledIconBackground)};\n }\n > :first-child:hover .icon-container {\n background: ${parseColor(props.$hoverIconBackground)};\n }\n > :first-child:active .icon-container {\n background: ${parseColor(props.$defaultIconBackground)};\n }\n `}\n`;\n\n/**\n *\n * A styled button with round icons, not intended to be used directly. \n * Instead used by OakTertiaryButton and OakHintButton.\n * \n * The following callbacks are available for tracking focus events:\n *\n * ### onClick\n * `onClick?: (event: React.MouseEvent<HTMLButtonElement, MouseEvent>) => void;`\n\n * ### onHovered\n * `onHovered?: (event: React.MouseEvent<HTMLButtonElement, MouseEvent>, duration: number) => void;`<br>\n * called after a mouseEnter and mouseLeave event has happened\n */\nexport const InternalShadowRoundButton = <C extends ElementType = \"button\">(\n props: InternalShadowRoundButtonProps & PolymorphicPropsWithoutRef<C>,\n) => {\n const {\n element = \"button\",\n children,\n iconName,\n isTrailingIcon,\n isLoading,\n disabled,\n width = \"max-content\",\n maxWidth,\n iconBackgroundSize,\n iconSize,\n disabledIconBackground,\n hoverIconColor,\n disabledTextColor,\n defaultIconColor,\n hoverIconBackground,\n defaultIconBackground,\n disabledIconColor,\n defaultTextColor,\n hoverTextColor,\n className,\n ...rest\n } = props;\n\n const icon = iconName && (\n <OakIcon\n iconName={iconName}\n $width={iconSize}\n $height={iconSize}\n $colorFilter={\n props.disabled\n ? disabledIconColor\n : defaultIconColor\n ? defaultIconColor\n : null\n }\n data-icon-for=\"button\"\n />\n );\n const loader = (\n <OakBox $width={iconSize} $height={iconSize}>\n <OakLoadingSpinner $width={iconSize} loaderColor=\"white\" />\n </OakBox>\n );\n const iconLogic = (isLoading || icon) && (\n <OakFlex\n className={\"icon-container\"}\n $background={props.defaultIconBackground}\n $color={props.defaultTextColor}\n $borderRadius={\"border-radius-circle\"}\n $position={\"relative\"}\n $width={iconBackgroundSize}\n $height={iconBackgroundSize}\n $alignItems={\"center\"}\n $justifyContent={\"center\"}\n $minWidth={iconBackgroundSize}\n >\n <OakBox\n className=\"shadow\"\n $position={\"absolute\"}\n $borderRadius={\"border-radius-circle\"}\n $width={\"100%\"}\n $height={\"100%\"}\n $top=\"all-spacing-0\"\n />\n\n {isLoading && !disabled ? loader : icon}\n </OakFlex>\n );\n\n return (\n <StyledButtonWrapper\n className={className}\n $position={\"relative\"}\n $width={width}\n $maxWidth={maxWidth}\n $disabledIconBackground={disabledIconBackground}\n $hoverIconBackground={hoverIconBackground}\n $defaultIconBackground={defaultIconBackground}\n >\n <StyledInternalButton\n element={element ?? \"button\"}\n {...rest}\n $hoverTextColor={hoverTextColor}\n $hoverIconColor={hoverIconColor}\n $defaultTextColor={defaultTextColor}\n $disabledTextColor={disabledTextColor}\n $color={defaultTextColor}\n $position={\"relative\"}\n disabled={disabled || isLoading}\n >\n <OakFlex\n $flexDirection={\"row\"}\n $alignItems={\"center\"}\n $gap={children ? \"space-between-xs\" : \"space-between-none\"}\n $justifyContent=\"center\"\n >\n {!isTrailingIcon && iconLogic}\n <OakSpan $font={\"heading-7\"}>{children}</OakSpan>\n {isTrailingIcon && iconLogic}\n </OakFlex>\n </StyledInternalButton>\n </StyledButtonWrapper>\n );\n};\n","import React, { ElementType } from \"react\";\n\nimport { OakRoundIconProps } from \"../OakRoundIcon\";\nimport { InternalShadowRoundButton } from \"../InternalShadowRoundButton\";\n\nimport { OakIconName } from \"@/components/atoms\";\nimport { InternalButtonProps } from \"@/components/atoms/InternalButton\";\nimport { PolymorphicPropsWithoutRef } from \"@/components/polymorphic\";\n\ntype OakTertiaryButtonProps = InternalButtonProps & {\n iconBackground?: OakRoundIconProps[\"$background\"];\n iconColorFilter?: OakRoundIconProps[\"$colorFilter\"];\n isTrailingIcon?: boolean;\n iconName?: OakIconName;\n};\n\n/**\n * An implementation of InternalShadowRoundButton, its a subtle button with no border and a round icon.\n */\nexport const OakTertiaryButton = <C extends ElementType = \"button\">({\n element,\n isTrailingIcon,\n iconName,\n children,\n ...props\n}: OakTertiaryButtonProps & PolymorphicPropsWithoutRef<C>) => {\n return (\n <InternalShadowRoundButton\n element={element ?? \"button\"}\n {...props}\n isTrailingIcon={isTrailingIcon}\n iconName={iconName}\n defaultIconColor={\"white\"}\n disabledIconColor=\"white\"\n disabledIconBackground=\"bg-btn-primary-disabled\"\n defaultIconBackground=\"black\"\n hoverIconBackground=\"bg-btn-primary-hover\"\n defaultTextColor=\"text-primary\"\n hoverTextColor=\"bg-btn-primary-hover\"\n disabledTextColor=\"text-disabled\"\n iconBackgroundSize={\"all-spacing-7\"}\n iconSize={\"all-spacing-6\"}\n >\n {children}\n </InternalShadowRoundButton>\n );\n};\n","import React, { createContext, useState } from \"react\";\n\nimport { TypographyStyleProps } from \"@/styles/utils/typographyStyle\";\nimport { ColorStyleProps } from \"@/styles/utils/colorStyle\";\nimport { OakFlex, OakLabel } from \"@/components/atoms\";\nimport { FlexStyleProps } from \"@/styles/utils/flexStyle\";\n\ntype RadioContextType = {\n currentValue: string;\n name: string;\n disabled?: boolean;\n onValueUpdated?: (event: React.ChangeEvent<HTMLInputElement>) => void;\n};\n\nexport const RadioContext = createContext<RadioContextType>({\n currentValue: \"default\",\n name: \"default\",\n});\n\nexport type OakRadioGroupProps = {\n label?: string;\n name: string;\n disabled?: boolean;\n children: React.ReactNode;\n onChange?: (event: React.ChangeEvent<HTMLInputElement>) => void;\n /**\n * Sets the value of the radio group\n * for use as a controlled component\n */\n value?: string;\n /**\n * Sets the initial value of the radio group\n * for use as an uncontrolled component\n */\n defaultValue?: string;\n} & Pick<TypographyStyleProps, \"$font\"> &\n ColorStyleProps &\n Pick<FlexStyleProps, \"$flexDirection\" | \"$alignItems\" | \"$gap\">;\n\n/**\n *\n * OakRadioGroup allow users to select a single item from a list of mutually exclusive options .\n * OakRadioGroup consists of a set of OakRadioButtons, and a label. Each radio includes a label and a visual selection indicator. A single radio button within the group can be selected at a time. Users may click or touch a radio button to select it, or use the Tab key to navigate to the group, the arrow keys to navigate within the group, and the Space key to select an option.\n * ## Usage\n *\n * use the callback onChange to get the value of the selected radio button.\n *\n */\nexport const OakRadioGroup = (props: OakRadioGroupProps) => {\n const {\n name,\n children,\n label,\n onChange,\n $font = \"body-1-bold\",\n $gap = \"space-between-s\",\n disabled,\n value,\n defaultValue = \"\",\n ...rest\n } = props;\n\n const [currentValue, setValue] = useState(defaultValue);\n\n const handleValueUpdated = (event: React.ChangeEvent<HTMLInputElement>) => {\n if (value === undefined) {\n setValue(event.target.value);\n }\n if (onChange) {\n onChange(event);\n }\n };\n\n return (\n <OakFlex role=\"radiogroup\" $gap={$gap} {...rest}>\n {label && <OakLabel $font={$font}>{label}</OakLabel>}\n <RadioContext.Provider\n value={{\n currentValue: value ?? currentValue,\n name,\n disabled: disabled,\n onValueUpdated: handleValueUpdated,\n }}\n >\n {children}\n </RadioContext.Provider>\n </OakFlex>\n );\n};\n","import React, { ReactNode, forwardRef, useContext } from \"react\";\nimport styled, { css } from \"styled-components\";\n\nimport { RadioContext } from \"@/components/molecules/OakRadioGroup/OakRadioGroup\";\nimport { parseColor } from \"@/styles/helpers/parseColor\";\nimport { parseSpacing } from \"@/styles/helpers/parseSpacing\";\nimport { parseBorder } from \"@/styles/helpers/parseBorder\";\nimport { FlexStyleProps } from \"@/styles/utils/flexStyle\";\nimport { responsiveStyle } from \"@/styles/utils/responsiveStyle\";\nimport {\n OakBox,\n OakBoxProps,\n OakFlex,\n OakFlexProps,\n OakLabel,\n OakLabelProps,\n} from \"@/components/atoms\";\nimport {\n OakAllSpacingToken,\n OakBorderWidthToken,\n OakCombinedColorToken,\n} from \"@/styles\";\n\ntype RadioButtonLabelProps = {\n $labelAlignItems?: FlexStyleProps[\"$alignItems\"];\n $labelGap?: FlexStyleProps[\"$gap\"];\n disabled?: boolean;\n} & OakLabelProps;\n\nconst RadioButtonLabel = styled(OakLabel)<RadioButtonLabelProps>`\n ${(props) =>\n !props.disabled &&\n css`\n cursor: pointer;\n `}\n\n display: flex;\n ${responsiveStyle(\"gap\", (props) => props.$labelGap, parseSpacing)}\n ${responsiveStyle(\"align-items\", (props) => props.$labelAlignItems)}\n`;\n\nconst HiddenRadioButtonInput = styled.input.attrs({\n type: \"radio\",\n})`\n position: absolute;\n opacity: 0;\n ${(props) =>\n !props.disabled &&\n css`\n cursor: pointer;\n `}\n`;\n\ntype VisibleRadioButtonInputProps = OakFlexProps & {\n $disableFocusRing: boolean;\n $radioInnerSize: OakAllSpacingToken;\n disabled?: boolean;\n};\n\nconst VisibleRadioButtonInput = styled(OakFlex)<VisibleRadioButtonInputProps>`\n border-radius: 50%;\n\n ${(props) =>\n !props.$disableFocusRing &&\n css`\n ${HiddenRadioButtonInput}:focus-visible ~ &::before {\n content: \"\";\n height: ${parseSpacing(\"all-spacing-7\")};\n width: ${parseSpacing(\"all-spacing-7\")};\n background: \"transparent\"\n display: block;\n position: absolute;\n border-radius: 50%;\n border: ${parseBorder(\"border-solid-m\")} ${parseColor(\"grey60\")};\n box-shadow: ${`inset 0 0 0 0.13rem ${parseColor(\"lemon\")}`};\n }`}\n\n ${HiddenRadioButtonInput}:checked ~ &::after {\n content: \"\";\n height: ${(props) => parseSpacing(props.$radioInnerSize)};\n width: ${(props) => parseSpacing(props.$radioInnerSize)};\n background: ${parseColor(\"black\")};\n position: absolute;\n border-radius: 50%;\n border: ${parseBorder(\"border-solid-m\")} ${parseColor(\"white\")};\n }\n`;\n\n// This is a hack to force React to rerender when the disabled prop is changed. Otherwise the pseudo element is not updated.\nconst DisabledVisibleRadioButtonInput = styled(VisibleRadioButtonInput)`\n ${HiddenRadioButtonInput}:checked ~ &::after {\n content: \"\";\n height: ${(props) => parseSpacing(props.$radioInnerSize)};\n width: ${(props) => parseSpacing(props.$radioInnerSize)};\n background: ${parseColor(\"bg-btn-primary-disabled\")};\n position: absolute;\n border-radius: 50%;\n border: ${parseBorder(\"border-solid-m\")} ${parseColor(\"white\")};\n }\n`;\n\nexport type OakRadioButtonProps = {\n id: string;\n label: ReactNode;\n value: string;\n tabIndex?: number;\n \"data-testid\"?: string;\n disabled?: boolean;\n /**\n * Allows the focus ring to be disabled. This is useful when focus is indicated\n * by other means, such as a border or background color change.\n */\n disableFocusRing?: boolean;\n /**\n * Allows the size of the radio button to be customized.\n */\n radioOuterSize?: OakAllSpacingToken;\n /**\n * Allows the size of the inner \"checked\" circle of the radio button to be customized.\n */\n radioInnerSize?: OakAllSpacingToken;\n /**\n * Allows the width of the radio button border to be customized.\n */\n radioBorderWidth?: OakBorderWidthToken;\n /**\n * Allows the background color of the radio button to be customized.\n */\n radioBackground?: OakCombinedColorToken;\n /**\n * Allows the width of the radio button border to be customized when the radio button is checked.\n */\n checkedRadioBorderWidth?: OakBorderWidthToken;\n} & OakBoxProps &\n RadioButtonLabelProps;\n\n/**\n * A radio button component.\n *\n * Use within `OakRadioGroup` component.\n */\nexport const OakRadioButton = forwardRef<HTMLInputElement, OakRadioButtonProps>(\n (props, ref) => {\n const radioContext = useContext(RadioContext);\n const { currentValue, name, onValueUpdated } = radioContext;\n const {\n id,\n label,\n value,\n tabIndex,\n disabled,\n $labelGap = \"space-between-ssx\",\n $labelAlignItems = \"center\",\n $font = \"body-1\",\n \"data-testid\": dataTestId,\n disableFocusRing = false,\n radioInnerSize = \"all-spacing-4\",\n radioOuterSize = \"all-spacing-6\",\n radioBorderWidth = \"border-solid-m\",\n radioBackground = \"bg-primary\",\n checkedRadioBorderWidth = \"border-solid-m\",\n ...rest\n } = props;\n const checked = value === currentValue;\n const anyDisabled = disabled || radioContext.disabled;\n const finalRadioBorderWidth = checked\n ? checkedRadioBorderWidth\n : radioBorderWidth;\n\n return (\n <OakBox {...rest}>\n <RadioButtonLabel\n htmlFor={id}\n $labelAlignItems={$labelAlignItems}\n $labelGap={$labelGap}\n $font={$font}\n data-testid={dataTestId}\n disabled={anyDisabled}\n >\n <HiddenRadioButtonInput\n name={name}\n id={id}\n value={value}\n onChange={onValueUpdated}\n checked={value === currentValue}\n tabIndex={tabIndex}\n disabled={anyDisabled}\n ref={ref}\n />\n {!anyDisabled ? (\n <VisibleRadioButtonInput\n $height={radioOuterSize}\n $width={radioOuterSize}\n $ba={finalRadioBorderWidth}\n $borderColor={\"black\"}\n $flexGrow={0}\n $flexShrink={0}\n $alignItems={\"center\"}\n $justifyContent={\"center\"}\n $background={radioBackground}\n $disableFocusRing={!!disableFocusRing}\n $radioInnerSize={radioInnerSize}\n />\n ) : (\n <DisabledVisibleRadioButtonInput\n $height={radioOuterSize}\n $width={radioOuterSize}\n $ba={finalRadioBorderWidth}\n $borderColor={\"bg-btn-primary-disabled\"}\n $flexGrow={0}\n $flexShrink={0}\n $alignItems={\"center\"}\n $justifyContent={\"center\"}\n $background={radioBackground}\n $disableFocusRing={!!disableFocusRing}\n $radioInnerSize={radioInnerSize}\n />\n )}\n {label}\n </RadioButtonLabel>\n </OakBox>\n );\n },\n);\n\nexport type OakRadioButtonType = typeof OakRadioButton;\n","import React, { forwardRef, useRef } from \"react\";\nimport styled, { css } from \"styled-components\";\n\nimport { OakBorderRadiusToken, OakCombinedColorToken } from \"@/styles\";\nimport { parseBorderRadius } from \"@/styles/helpers/parseBorderRadius\";\nimport { parseColor } from \"@/styles/helpers/parseColor\";\nimport { parseDropShadow } from \"@/styles/helpers/parseDropShadow\";\nimport { BorderStyleProps, borderStyle } from \"@/styles/utils/borderStyle\";\nimport { ColorStyleProps, colorStyle } from \"@/styles/utils/colorStyle\";\nimport { SizeStyleProps, sizeStyle } from \"@/styles/utils/sizeStyle\";\nimport { SpacingStyleProps, spacingStyle } from \"@/styles/utils/spacingStyle\";\n\n/**\n *\n * These components can be used with InternalCheckBoxWrapper which allows for customisable icons\n *\n * Several flavours of checkbox are created here:\n * - Default\n * - Hover decorations\n * - Focus decorations\n * - Hover + Focus decorations\n *\n * As they are styled components they can be further customised in implementation. Alternatively additional\n * components can be created here.\n *\n */\n\nexport type BaseCheckBoxProps = {\n id: string;\n disabled?: boolean;\n value: string;\n /**\n * Uncontrolled checked state\n */\n defaultChecked?: boolean;\n /**\n * Controlled checked state\n */\n checked?: boolean;\n onHovered?: (value: string, id: string, duration: number) => void;\n onChange?: (event: React.ChangeEvent<HTMLInputElement>) => void;\n onFocus?: (event: React.FocusEvent<HTMLInputElement>) => void;\n onBlur?: (event: React.FocusEvent<HTMLInputElement>) => void;\n \"data-testid\"?: string;\n};\n\nconst BaseCheckBox = forwardRef(\n (props: BaseCheckBoxProps, ref?: React.Ref<HTMLInputElement>) => {\n const { onHovered, ...rest } = props;\n\n const hoverStart = useRef(Date.now());\n\n const handleMouseEnter = () => {\n hoverStart.current = Date.now();\n };\n\n const handleMouseLeave = () => {\n const delta = Date.now() - hoverStart.current;\n if (onHovered) {\n onHovered(props.value, props.id, delta);\n }\n };\n\n return (\n <input\n ref={ref}\n type=\"checkbox\"\n onMouseEnter={handleMouseEnter}\n onMouseLeave={handleMouseLeave}\n {...rest}\n name={props.id}\n />\n );\n },\n);\n\ntype StyledBaseCheckBoxProps = BaseCheckBoxProps &\n ColorStyleProps &\n SpacingStyleProps &\n BorderStyleProps &\n SizeStyleProps & {\n $checkedBackground?: OakCombinedColorToken | null;\n };\n\ntype HoverBaseCheckBoxProps = {\n $hoverBorderRadius: OakBorderRadiusToken;\n};\n\n/**\n *\n * These components can be used with InternalCheckBoxWrapper which allows for customisable icons\n *\n * Several flavours of checkbox are created here:\n * - Default\n * - Hover decorations\n * - Focus decorations\n * - Hover + Focus decorations\n *\n * NB. Hover decorations must be wrapped in a box with position relative to allow for the hover effect to work\n *\n * As they are styled components they can be further customised in implementation. Alternatively additional\n * components can be created here.\n *\n *\n * ## Events\n * The following callbacks are available for tracking focus events:\n *\n * ### onChange\n * onChange?: (event: React.ChangeEvent<HTMLInputElement>) => void;\n *\n * ### onFocus\n * onFocus?: (event: React.FocusEvent<HTMLInputElement>) => void;\n *\n * ### onBlur\n * onBlur?: (event: React.FocusEvent<HTMLInputElement>) => void;\n *\n * ### onHovered\n * `onHovered?: (id, value, duration: number) => void;`<br>\n * called after a mouseEnter and mouseLeave event has happened\n *\n *\n */\nexport const InternalCheckBox = styled(BaseCheckBox)<StyledBaseCheckBoxProps>`\n /* removing default appearance */\n -webkit-appearance: none;\n appearance: none;\n cursor: pointer;\n margin: 0;\n outline: none;\n ${borderStyle}\n ${colorStyle}\n ${spacingStyle}\n ${sizeStyle}\n\n &:checked {\n ${(props) => css`\n background: ${parseColor(props.$checkedBackground)};\n `};\n }\n\n &:disabled {\n pointer-events: none;\n }\n`;\n\nInternalCheckBox.defaultProps = {\n $borderRadius: \"border-radius-xs\",\n $ba: \"border-solid-m\",\n $borderColor: \"text-primary\",\n $checkedBackground: \"text-primary\",\n};\n\nexport const InternalCheckBoxHover = styled(InternalCheckBox)<\n StyledBaseCheckBoxProps & HoverBaseCheckBoxProps\n>`\n /* @media wrapper is required to prevent hover effect on iOS Safari */\n\n @media (hover: hover) {\n &:hover:not(&:checked):not(&:disabled)::after {\n content: \"\";\n position: absolute;\n top: 50%;\n left: 50%;\n width: 60%;\n height: 60%;\n transform: translate(-50%, -50%);\n border-radius: ${(props) => css`\n ${parseBorderRadius(props.$hoverBorderRadius)}\n `};\n background: ${(props) => css`\n ${parseColor(props.$checkedBackground)}\n `};\n }\n }\n`;\n\nInternalCheckBoxHover.defaultProps = {\n $hoverBorderRadius: \"border-radius-xs\",\n};\n\nconst focusStyle = css`\n &:focus-visible {\n box-shadow: ${parseDropShadow(\"drop-shadow-centered-lemon\")};\n }\n`;\n\nexport const InternalCheckBoxFocus = styled(\n InternalCheckBox,\n)<StyledBaseCheckBoxProps>`\n ${focusStyle}\n`;\n\nexport const InternalCheckBoxHoverFocus = styled(InternalCheckBoxHover)<\n StyledBaseCheckBoxProps & HoverBaseCheckBoxProps\n>`\n ${focusStyle}\n`;\n","import styled, { css } from \"styled-components\";\n\nimport { OakLabel, OakLabelProps } from \"@/components/atoms\";\nimport { responsiveStyle } from \"@/styles/utils/responsiveStyle\";\nimport { parseSpacing } from \"@/styles/helpers/parseSpacing\";\nimport { FlexStyleProps } from \"@/styles/utils/flexStyle\";\n\nexport type InternalCheckBoxLabelProps = {\n labelAlignItems?: FlexStyleProps[\"$alignItems\"];\n labelGap?: FlexStyleProps[\"$gap\"];\n disabled?: boolean;\n \"data-testid\"?: string;\n} & OakLabelProps;\n\n/**\n *\n * Specialised Label Component can be used and extended to create various different versions of CheckboxLabels\n *\n */\nexport const InternalCheckBoxLabel = styled(\n OakLabel,\n)<InternalCheckBoxLabelProps>`\n display: flex;\n align-items: center;\n ${responsiveStyle(\"gap\", (props) => props.labelGap, parseSpacing)}\n ${responsiveStyle(\"align-items\", (props) => props.labelAlignItems)}\n`;\n\nexport const InternalCheckBoxLabelHoverDecor = styled(InternalCheckBoxLabel)`\n ${(props) =>\n props.disabled\n ? css`\n pointer-events: none;\n `\n : css`\n cursor: pointer;\n `}\n @media (hover: hover) {\n &:hover {\n text-decoration: ${(props) => (props.disabled ? \"none\" : \"underline\")};\n }\n }\n`;\n","import React from \"react\";\nimport styled from \"styled-components\";\n\nimport { OakBox, OakBoxProps, OakIcon } from \"@/components/atoms\";\nimport { OakAllSpacingToken, OakInnerPaddingToken } from \"@/styles\";\nimport { ResponsiveValues } from \"@/styles/utils/responsiveStyle\";\n\nconst StyledIconContainer = styled(OakBox)<\n OakBoxProps & { disabled?: boolean }\n>`\n pointer-events: none;\n opacity: 0;\n\n input:checked + & {\n opacity: 1;\n }\n`;\n\nexport type InternalCheckBoxWrapperProps = {\n size?: ResponsiveValues<OakAllSpacingToken>;\n internalCheckbox: React.JSX.Element;\n iconPadding?: OakInnerPaddingToken;\n checkedIcon?: React.JSX.Element;\n};\n\n/**\n *\n * This component is a wrapper for the InternalCheckBox component. It allows for customisable icons.\n *\n * NB. size must have the same value as the InternalCheckBox width and height\n *\n *\n */\nexport const InternalCheckBoxWrapper = (\n props: InternalCheckBoxWrapperProps,\n) => {\n const {\n size = \"all-spacing-6\",\n iconPadding = \"inner-padding-none\",\n internalCheckbox,\n checkedIcon = (\n <OakIcon\n iconName=\"tick\"\n $width={\"100%\"}\n $height={\"100%\"}\n $colorFilter={\"white\"}\n />\n ),\n } = props;\n\n return (\n <OakBox $position=\"relative\" $width={size} $height={size}>\n {internalCheckbox}\n <StyledIconContainer\n $position={\"absolute\"}\n $top={\"all-spacing-0\"}\n $left={\"all-spacing-0\"}\n $pa={iconPadding}\n $width={size}\n $height={size}\n >\n {checkedIcon}\n </StyledIconContainer>\n </OakBox>\n );\n};\n","import React, {\n DetailedHTMLProps,\n InputHTMLAttributes,\n FocusEvent,\n useRef,\n} from \"react\";\nimport styled from \"styled-components\";\n\nimport { parseColor } from \"@/styles/helpers/parseColor\";\nimport { getBreakpoint } from \"@/styles/utils/responsiveStyle\";\nimport { SpacingStyleProps, spacingStyle } from \"@/styles/utils/spacingStyle\";\nimport { SizeStyleProps, sizeStyle } from \"@/styles/utils/sizeStyle\";\n\ntype StyledInputProps = Omit<\n DetailedHTMLProps<InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>,\n \"ref\"\n> &\n SpacingStyleProps &\n SizeStyleProps;\n\n/**\n * Using `appearance none !important;` here because many style resets will set this\n * value to textfield, causing some browsers to implement undesirable styles.\n * E.g. ios and rounded borders (which border-radius doesn't fix without\n * appearance: none)\n */\nconst StyledInput = styled.input`\n appearance: none !important;\n border: 0;\n border-radius: 0;\n border-color: transparent;\n box-shadow: none;\n font-family: inherit;\n background: transparent;\n outline: none;\n color: inherit;\n\n @media (max-width: ${getBreakpoint(\"small\")}px) {\n /* iOS zooms in on inputs with font sizes <16px on mobile */\n font-size: 16px;\n }\n\n ::placeholder {\n color: ${({ theme }) =>\n theme && theme.uiColors && parseColor(theme.uiColors[\"text-subdued\"])};\n }\n\n ::-webkit-search-decoration,\n ::-webkit-search-cancel-button,\n ::-webkit-search-results-button,\n ::-webkit-search-results-decoration {\n appearance: none;\n }\n\n :disabled {\n cursor: not-allowed;\n }\n\n ${spacingStyle}\n ${sizeStyle}\n`;\n\nexport type InternalTextInputProps = Omit<StyledInputProps, \"placeholder\"> & {\n /**\n * A textual hint or example to display before a value has been entered\n */\n placeholder?: string;\n /**\n * Fired only when the input is focused for the first time\n */\n onInitialFocus?: (e: FocusEvent<HTMLInputElement>) => void;\n};\n\n/**\n *\n * An unstyled input to be used as a basis for UI input components.\n * Supports all the props of a regular `HTMLInputElement`\n *\n * 🚨 The CSS `outline` is disabled so a focus ring must be applied by the consuming component.\n *\n * The following callbacks are available for tracking focus events:\n *\n * ### onFocus\n * `(e: FocusEvent<HTMLInputElement>) => void;`\n * ### onBlur\n * `(e: FocusEvent<HTMLInputElement>) => void;`\n * ### onInitialFocus\n * `(e: FocusEvent<HTMLInputElement>) => void;`<br>\n * occurs only when the input is focused for the first time\n *\n */\nexport const InternalTextInput = (props: InternalTextInputProps) => {\n const { onInitialFocus, onFocus, ...rest } = props;\n\n const hadInitialFocused = useRef(false);\n\n const handleOnFocus = (e: FocusEvent<HTMLInputElement>) => {\n if (!hadInitialFocused.current && props.onInitialFocus) {\n props.onInitialFocus(e);\n hadInitialFocused.current = true;\n }\n\n if (props.onFocus) {\n props.onFocus(e);\n }\n };\n\n return <StyledInput {...rest} onFocus={handleOnFocus} />;\n};\n","import React, { ChangeEventHandler } from \"react\";\nimport styled, { css } from \"styled-components\";\n\nimport { parseColor } from \"@/styles/helpers/parseColor\";\nimport {\n InternalTextInput,\n InternalTextInputProps,\n} from \"@/components/atoms/InternalTextInput\";\nimport { OakFlex, OakIcon, OakIconName } from \"@/components/atoms\";\nimport { OakCombinedColorToken, OakDropShadowToken } from \"@/styles\";\nimport { parseDropShadow } from \"@/styles/helpers/parseDropShadow\";\nimport { SizeStyleProps } from \"@/styles/utils/sizeStyle\";\n\ntype StyledTextInputWrapperProps = {\n $color: OakCombinedColorToken;\n $hoverBackground: OakCombinedColorToken;\n $background: OakCombinedColorToken;\n $borderColor: OakCombinedColorToken;\n $focusRingDropShadows: OakDropShadowToken[];\n $disabledBackgroundColor: OakCombinedColorToken;\n $readOnlyBorderColor: OakCombinedColorToken;\n $disabledColor: OakCombinedColorToken;\n $readOnlyColor: OakCombinedColorToken;\n $disabled: boolean;\n $readOnly: boolean;\n};\n\nexport type OakTextInputProps = {\n /**\n * Disables user input and updates the appearance accordingly.\n */\n disabled?: boolean;\n /**\n * Makes the input read-only. Preventing the user from changing the value.\n */\n readOnly?: boolean;\n /**\n * Sets the value. Use this in controlled components;\n */\n value?: string;\n /**\n * Sets the initial value. Use this for an uncontrolled component;\n */\n defaultValue?: string;\n /**\n * Used to target the input element in tests.\n */\n \"data-testid\"?: string;\n onChange?: ChangeEventHandler<HTMLInputElement>;\n /**\n * Alters the appearance of the input field to indicate whether the input is valid or invalid.\n */\n validity?: \"valid\" | \"invalid\";\n /**\n * Adds an icon to the input\n *\n * Defaults to the start of the input\n */\n iconName?: OakIconName;\n /**\n * Position the icon at the end of the input\n */\n isTrailingIcon?: boolean;\n /**\n * Give the field a highlight to draw attention to it\n */\n isHighlighted?: boolean;\n iconColor?: OakCombinedColorToken;\n validBorderColor?: OakCombinedColorToken;\n invalidBorderColor?: OakCombinedColorToken;\n validIconColor?: OakCombinedColorToken;\n invalidIconColor?: OakCombinedColorToken;\n color?: OakCombinedColorToken;\n hoverBackground?: OakCombinedColorToken;\n background?: OakCombinedColorToken;\n borderColor?: OakCombinedColorToken;\n focusRingDropShadows?: OakDropShadowToken[];\n disabledBackgroundColor?: OakCombinedColorToken;\n readOnlyBorderColor?: OakCombinedColorToken;\n disabledColor?: OakCombinedColorToken;\n readOnlyColor?: OakCombinedColorToken;\n highlightBackgroundColor?: OakCombinedColorToken;\n /**\n * The width of the surrounding div - the input and icon will fill this\n */\n wrapperWidth?: SizeStyleProps[\"$width\"];\n wrapperMaxWidth?: SizeStyleProps[\"$maxWidth\"];\n iconAlt?: string;\n} & InternalTextInputProps;\n\nconst StyledTextInputWrapper = styled(OakFlex)<StyledTextInputWrapperProps>`\n &:hover {\n cursor: text;\n }\n\n &:focus-within {\n box-shadow: ${(props) =>\n props.$focusRingDropShadows\n .map((dropShadow) => parseDropShadow(dropShadow))\n .join(\",\")};\n }\n\n background: ${(props) => parseColor(props.$background)};\n\n ${(props) =>\n !props.$readOnly &&\n css`\n @media (hover: hover) {\n &:hover:not(:focus-within) {\n background: ${parseColor(props.$hoverBackground)};\n }\n }\n `}\n\n ${(props) =>\n props.$readOnly &&\n css`\n border-color: ${parseColor(props.$readOnlyBorderColor)};\n color: ${parseColor(props.$readOnlyColor)};\n `}\n\n ${(props) =>\n props.$disabled &&\n css`\n background: ${parseColor(props.$disabledBackgroundColor)};\n color: ${parseColor(props.$disabledColor)};\n &:hover {\n cursor: not-allowed;\n }\n `}\n`;\n\n/**\n * Default input which can be extended to create specialised inputs.\n */\nexport const OakTextInput = ({\n type = \"text\",\n borderColor = \"border-primary\",\n readOnlyBorderColor = \"border-neutral\",\n focusRingDropShadows = [\n \"drop-shadow-centered-lemon\",\n \"drop-shadow-centered-grey\",\n ],\n background = \"bg-primary\",\n hoverBackground = \"bg-neutral\",\n disabledBackgroundColor = \"bg-neutral\",\n highlightBackgroundColor = \"bg-decorative5-main\",\n color = \"text-primary\",\n disabledColor = \"text-disabled\",\n readOnlyColor = \"text-subdued\",\n validity,\n iconColor = \"icon-inverted\",\n validBorderColor = \"border-success\",\n invalidBorderColor = \"border-error\",\n validIconColor = \"icon-success\",\n invalidIconColor = \"border-error\",\n iconName,\n iconAlt,\n isTrailingIcon = false,\n isHighlighted = false,\n wrapperWidth,\n wrapperMaxWidth,\n ...props\n}: OakTextInputProps) => {\n let finalBackgroundColor = background;\n let finalBorderColor = borderColor;\n let finalIconColor = iconColor;\n let finalReadOnlyBorderColor = readOnlyBorderColor;\n\n switch (true) {\n case validity === \"valid\":\n finalBorderColor = validBorderColor;\n finalIconColor = validIconColor;\n finalReadOnlyBorderColor = validBorderColor;\n break;\n case validity === \"invalid\":\n finalBorderColor = invalidBorderColor;\n finalIconColor = invalidIconColor;\n finalReadOnlyBorderColor = invalidBorderColor;\n break;\n case isHighlighted:\n finalBackgroundColor = highlightBackgroundColor;\n break;\n }\n\n return (\n <StyledTextInputWrapper\n $height=\"fit-content\"\n $width={wrapperWidth}\n $maxWidth={wrapperMaxWidth}\n $borderRadius=\"border-radius-s\"\n $ba=\"border-solid-m\"\n $borderColor={finalBorderColor}\n $focusRingDropShadows={focusRingDropShadows}\n $background={finalBackgroundColor}\n $hoverBackground={hoverBackground}\n $disabledBackgroundColor={disabledBackgroundColor}\n $readOnlyBorderColor={finalReadOnlyBorderColor}\n $disabledColor={disabledColor}\n $readOnlyColor={readOnlyColor}\n $color={color}\n $alignItems=\"center\"\n $position=\"relative\"\n $gap=\"space-between-s\"\n $ph=\"inner-padding-l\"\n $disabled={!!props.disabled}\n $readOnly={!!props.readOnly}\n onClick={(event) => {\n event.currentTarget.querySelector(\"input\")?.focus();\n }}\n >\n {!isTrailingIcon && iconName && (\n <OakIcon\n iconName={iconName}\n $colorFilter={finalIconColor}\n $pointerEvents=\"none\"\n $width={\"all-spacing-7\"}\n alt={iconAlt}\n />\n )}\n\n <OakFlex $flexGrow={1}>\n <InternalTextInput\n type={type}\n {...props}\n $width={\"100%\"}\n $pv=\"inner-padding-l\"\n $height=\"all-spacing-12\"\n />\n </OakFlex>\n {isTrailingIcon && iconName && (\n <OakIcon\n iconName={iconName}\n $colorFilter={finalIconColor}\n $pointerEvents=\"none\"\n $width={\"all-spacing-7\"}\n alt={iconAlt}\n />\n )}\n </StyledTextInputWrapper>\n );\n};\n","import React from \"react\";\n\nimport {\n OakBox,\n OakIcon,\n OakIconProps,\n OakImage,\n OakImageProps,\n} from \"@/components/atoms\";\n\ntype ImageProps = OakImageProps & {\n iconName?: undefined;\n};\n\ntype IconProps = OakIconProps & {\n src?: undefined;\n};\n\nexport type OakRoundIconProps = IconProps | ImageProps;\n\n/**\n * A wrapper around `OakIcon` which applies a rounded background.\n * Supports either an icon name or an image src\n */\nexport const OakRoundIcon = ({\n $background = \"bg-decorative5-main\",\n $borderRadius = \"border-radius-circle\",\n $width = \"all-spacing-9\",\n $height = \"all-spacing-9\",\n $pa = \"inner-padding-ssx\",\n className,\n ...rest\n}: OakRoundIconProps) => {\n const icon = rest.iconName ? (\n <OakIcon {...rest} $height=\"100%\" $width=\"100%\" />\n ) : (\n <OakImage {...rest} $height=\"100%\" $width=\"100%\" />\n );\n\n return (\n <OakBox\n className={className}\n $background={$background}\n $borderRadius={$borderRadius}\n $width={$width}\n $height={$height}\n $pa={$pa}\n >\n {icon}\n </OakBox>\n );\n};\n","import React, { ReactNode } from \"react\";\nimport styled, { css } from \"styled-components\";\n\nimport { OakFlex, OakFlexProps } from \"../OakFlex\";\n\nimport { OakCombinedColorToken } from \"@/styles\";\nimport { parseColor } from \"@/styles/helpers/parseColor\";\nimport { ColorStyleProps } from \"@/styles/utils/colorStyle\";\nimport { responsiveStyle } from \"@/styles/utils/responsiveStyle\";\nimport { parseSpacing } from \"@/styles/helpers/parseSpacing\";\n\nexport type InternalTooltipProps = OakFlexProps & {\n children?: ReactNode;\n tooltipPosition?: \"bottom-left\" | \"bottom-right\" | \"top-left\" | \"top-right\";\n};\n\nconst StyledFlex = styled(OakFlex)`\n width: max-content;\n pointer-events: none;\n`;\n\ntype StyledSvgProps = {\n $fill: ColorStyleProps[\"$background\"];\n $tooltipPosition?: InternalTooltipProps[\"tooltipPosition\"];\n};\n\nconst ARROW_SIZE = parseSpacing(\"all-spacing-4\");\n\nconst StyledSvg = styled.svg<StyledSvgProps>`\n position: absolute;\n ${({ $tooltipPosition }) => {\n switch ($tooltipPosition) {\n case \"bottom-right\":\n return css`\n top: -${ARROW_SIZE};\n right: ${parseSpacing(\"all-spacing-0\")};\n transform: scale(-1, -1);\n `;\n case \"top-right\":\n return css`\n bottom: -${ARROW_SIZE};\n right: ${parseSpacing(\"all-spacing-0\")};\n transform: scaleX(-1);\n `;\n case \"top-left\":\n return css`\n bottom: -${ARROW_SIZE};\n left: ${parseSpacing(\"all-spacing-0\")};\n `;\n default:\n return css`\n top: -${ARROW_SIZE};\n left: ${parseSpacing(\"all-spacing-0\")};\n transform: scaleY(-1);\n `;\n }\n }}\n ${responsiveStyle<StyledSvgProps, OakCombinedColorToken>(\n \"fill\",\n (props) => props.$fill,\n parseColor,\n )}\n`;\n\n/**\n * A primitive tooltip to be used as a basis for more opinionated UI components.\n */\nexport const InternalTooltip = ({\n children,\n $background = \"black\",\n $color = \"text-inverted\",\n tooltipPosition = \"bottom-left\",\n ...props\n}: InternalTooltipProps) => {\n return (\n <StyledFlex\n role=\"tooltip\"\n {...props}\n $position=\"relative\"\n $background={$background}\n $color={$color}\n $maxWidth={[\"all-spacing-20\", \"all-spacing-22\"]}\n >\n {children}\n <StyledSvg\n width={ARROW_SIZE}\n height={ARROW_SIZE}\n $fill={$background}\n $tooltipPosition={tooltipPosition}\n data-testid=\"tooltip-arrow\"\n >\n <path d=\"M0 0H16L8 8L0 16V0Z\" />\n </StyledSvg>\n </StyledFlex>\n );\n};\n","import React, {\n ReactElement,\n ReactNode,\n useLayoutEffect,\n useState,\n} from \"react\";\nimport { createPortal } from \"react-dom\";\n\nimport {\n InternalTooltip,\n InternalTooltipProps,\n} from \"@/components/atoms/InternalTooltip/InternalTooltip\";\nimport { OakBox, OakBoxProps } from \"@/components/atoms\";\nimport { parseSpacing } from \"@/styles/helpers/parseSpacing\";\n\nexport type OakTooltipProps = Pick<InternalTooltipProps, \"tooltipPosition\"> & {\n /**\n * The target element that triggers the tooltip\n */\n children: ReactElement;\n /**\n * The content of the tooltip\n */\n tooltip: ReactNode;\n /**\n * Whether the tooltip is open or not\n */\n isOpen?: boolean;\n /**\n * The DOM container to render the tooltip portal into\n *\n * @default document.body\n */\n domContainer?: Element;\n};\n\n/**\n * A tooltip with oven-ready styling and positioning.\n */\nexport const OakTooltip = ({\n tooltipPosition,\n children,\n tooltip,\n isOpen,\n domContainer = document.body,\n ...props\n}: OakTooltipProps) => {\n const [targetElement, setTargetElement] = useState<Element | null>(null);\n const [isIntersecting, setIsIntersecting] = useState(true);\n const isVisible = isOpen && isIntersecting;\n\n /**\n * The overlay is positioned on top of the target element in a portal.\n * It tracks the target's size and position.\n *\n * we use it to position the tooltip relative to the target element without interfering\n * with the page layout\n */\n const [overlayStyle, setOverlayStyle] = useState<{\n top: number;\n left: number;\n width: number;\n height: number;\n }>();\n const squaredCornerRadiusProp: keyof InternalTooltipProps = (() => {\n switch (tooltipPosition) {\n case \"bottom-right\":\n return \"$btrr\";\n case \"top-right\":\n return \"$bbrr\";\n case \"top-left\":\n return \"$bblr\";\n default:\n return \"$btlr\";\n }\n })();\n const borderRadiusProps: Partial<InternalTooltipProps> = {\n $borderRadius: \"border-radius-m\",\n [squaredCornerRadiusProp]: \"border-radius-square\",\n };\n\n useLayoutEffect(() => {\n if (!targetElement) {\n return;\n }\n let ticking = false;\n const updateOverlayStyle = () => {\n if (!ticking) {\n requestAnimationFrame(() => {\n ticking = false;\n const rect = targetElement.getBoundingClientRect();\n\n setOverlayStyle({\n top: rect.top,\n left: rect.left,\n width: rect.width,\n height: rect.height,\n });\n });\n ticking = true;\n }\n };\n\n // We use an intersection observer to detect when the target element is no longer visible\n const intersection = new IntersectionObserver((entries) => {\n setIsIntersecting(entries.every((entry) => entry.isIntersecting));\n });\n intersection.observe(targetElement);\n\n // We use a resize observer to detect when the target element's size changes\n const resize = new ResizeObserver(updateOverlayStyle);\n resize.observe(targetElement);\n\n // Update the overlay position on scroll and resize\n window.addEventListener(\"scroll\", updateOverlayStyle, true);\n window.addEventListener(\"resize\", updateOverlayStyle);\n\n return () => {\n resize.disconnect();\n intersection.disconnect();\n window.removeEventListener(\"scroll\", updateOverlayStyle, true);\n window.removeEventListener(\"resize\", updateOverlayStyle);\n };\n }, [targetElement]);\n\n return (\n <>\n {createPortal(\n isVisible && (\n <OakBox\n $position=\"fixed\"\n style={overlayStyle}\n $pointerEvents=\"none\"\n $zIndex=\"modal-dialog\"\n >\n <OakBox\n $width=\"fit-content\"\n $height=\"fit-content\"\n $position=\"absolute\"\n {...getTooltipPositionProps(tooltipPosition)}\n >\n <InternalTooltip\n $background=\"bg-decorative5-main\"\n $color=\"text-primary\"\n $pv=\"inner-padding-m\"\n $ph=\"inner-padding-xl\"\n $font=\"heading-light-7\"\n tooltipPosition={tooltipPosition}\n {...props}\n {...borderRadiusProps}\n >\n {tooltip}\n </InternalTooltip>\n </OakBox>\n </OakBox>\n ),\n domContainer,\n )}\n <div\n ref={(domElement) => {\n setTargetElement(domElement?.firstElementChild ?? null);\n }}\n style={{ display: \"contents\" }}\n >\n {children}\n </div>\n </>\n );\n};\n\nfunction getTooltipPositionProps(\n tooltipPosition: OakTooltipProps[\"tooltipPosition\"],\n) {\n const props: Partial<OakBoxProps> = {};\n\n switch (tooltipPosition) {\n case \"top-left\":\n case \"top-right\":\n props.$top = \"space-between-none\";\n props.$transform = `translateY(calc(-100% - ${parseSpacing(\n \"space-between-s\",\n )}))`;\n break;\n default:\n props.$bottom = \"space-between-none\";\n props.$transform = `translateY(calc(100% + ${parseSpacing(\n \"space-between-s\",\n )}))`;\n break;\n }\n\n switch (tooltipPosition) {\n case \"top-left\":\n case \"bottom-left\":\n props.$left = \"space-between-none\";\n break;\n default:\n props.$right = \"space-between-none\";\n break;\n }\n\n return props;\n}\n","import React, { ElementType, ComponentPropsWithoutRef } from \"react\";\nimport styled from \"styled-components\";\n\nimport { parseColor } from \"@/styles/helpers/parseColor\";\nimport { parseColorFilter } from \"@/styles/helpers/parseColorFilter\";\nimport { parseDropShadow } from \"@/styles/helpers/parseDropShadow\";\nimport { OakIcon } from \"@/components/atoms\";\n\nexport type OakBackLinkProps<C extends ElementType> = {\n as?: C;\n label?: string;\n} & ComponentPropsWithoutRef<C>;\n\nconst StyledBackLink = styled.a`\n border-radius: 50%;\n display: flex;\n width: fit-content;\n height: fit-content;\n border: none;\n padding: 0;\n outline: none;\n\n img {\n pointer-events: none;\n }\n\n &:not(:disabled) {\n cursor: pointer;\n }\n\n &:active {\n box-shadow: ${parseDropShadow(\"drop-shadow-lemon\")},\n ${parseDropShadow(\"drop-shadow-grey\")};\n }\n\n &:hover,\n &:focus-visible {\n background: ${parseColor(\"bg-btn-primary\")};\n\n img {\n filter: ${parseColorFilter(\"text-inverted\")};\n }\n }\n\n &:focus-visible {\n box-shadow: ${parseDropShadow(\"drop-shadow-centered-lemon\")},\n ${parseDropShadow(\"drop-shadow-centered-grey\")};\n }\n\n &:disabled {\n background: ${parseColor(\"bg-btn-primary-disabled\")};\n\n img {\n filter: ${parseColorFilter(\"text-inverted\")};\n }\n }\n`;\n\n/**\n * Used to navigate the user back to the previous page in the app.\n *\n * Polymorphic rendering as any HTML element or component using `as` — defaults to `a`.\n *\n * E.g.\n *\n * * Default (Anchor) `<OakBackLink href=\"https://www.thenational.academy/\" />`\n * * Button `<OakBackLink as=\"button\" onClick={() => goBack(-1)} />`\n */\nexport const OakBackLink = <C extends ElementType = \"a\">({\n as,\n label = \"Back\",\n ...props\n}: OakBackLinkProps<C>) => {\n return (\n <StyledBackLink as={as ?? \"a\"} aria-label={label} {...props}>\n <OakIcon\n alt=\"\"\n iconName=\"chevron-left\"\n $width=\"all-spacing-8\"\n $height=\"all-spacing-8\"\n />\n </StyledBackLink>\n );\n};\n","import styled from \"styled-components\";\n\nimport { OakFlex, OakFlexProps } from \"@/components/atoms/OakFlex\";\n\nexport type InternalCardProps = OakFlexProps;\n\n/**\n *\n * InternalCard extends OakFlex. It has all the props of OakFlex, but applies default styles for consistency.\n *\n */\nconst InternalCard = styled(OakFlex)``;\n\nInternalCard.defaultProps = {\n $pa: \"inner-padding-xl\",\n $flexDirection: \"column\",\n $flexGrow: 1,\n $position: \"relative\",\n};\n\nexport { InternalCard };\n","import React, { ReactElement } from \"react\";\nimport styled from \"styled-components\";\n\nimport { InternalCard, InternalCardProps } from \"../InternalCard/InternalCard\";\nimport { OakBox } from \"../OakBox\";\n\nexport type InternalCardWithBackgroundElementProps = InternalCardProps & {\n backgroundElement: ReactElement;\n};\n\n/**\n * The `backgroundElement` should be sized to fit the entire card\n */\nconst StyledBackgroundBox = styled(OakBox)`\n & > * {\n width: 100%;\n height: 100%;\n }\n`;\n\n/**\n * A flexed card with a presentational background element positioned behind the card contents.\n */\nexport const InternalCardWithBackgroundElement = ({\n backgroundElement,\n children,\n ...props\n}: InternalCardWithBackgroundElementProps) => {\n return (\n <InternalCard {...props}>\n <StyledBackgroundBox\n $position=\"absolute\"\n $inset=\"space-between-none\"\n aria-hidden\n >\n {backgroundElement}\n </StyledBackgroundBox>\n <OakBox $position=\"relative\">{children}</OakBox>\n </InternalCard>\n );\n};\n","import { OakBorderWidthToken, oakBorderWidthTokens } from \"../theme\";\n\nimport pxToRem from \"./pxToRem\";\n\nexport function parseBorderWidth(\n value: OakBorderWidthToken | null | undefined,\n) {\n if (!value) {\n return undefined;\n }\n\n if (value in oakBorderWidthTokens) {\n return `${pxToRem(oakBorderWidthTokens[value])}rem`;\n }\n}\n","import styled from \"styled-components\";\n\nimport { OakBorderWidthToken, OakCombinedColorToken } from \"@/styles\";\nimport {\n ResponsiveValues,\n responsiveStyle,\n} from \"@/styles/utils/responsiveStyle\";\nimport { parseColor } from \"@/styles/helpers/parseColor\";\nimport { parseBorderWidth } from \"@/styles/helpers/parseBorderWidth\";\n\nexport type InternalStyledSvgProps = {\n $fill?: ResponsiveValues<OakCombinedColorToken>;\n $stroke?: ResponsiveValues<OakCombinedColorToken>;\n $strokeWidth?: ResponsiveValues<OakBorderWidthToken>;\n};\n\n/**\n * A styled SVG element with props to apply design tokens to the fill and stroke.\n */\nexport const InternalStyledSvg = styled.svg<InternalStyledSvgProps>`\n ${responsiveStyle<InternalStyledSvgProps, OakCombinedColorToken>(\n \"fill\",\n (props) => props.$fill,\n parseColor,\n )}\n ${responsiveStyle<InternalStyledSvgProps, OakCombinedColorToken>(\n \"stroke\",\n (props) => props.$stroke,\n parseColor,\n )}\n ${responsiveStyle<InternalStyledSvgProps, OakBorderWidthToken>(\n \"stroke-width\",\n (props) => props.$strokeWidth,\n parseBorderWidth,\n )}\n`;\n","import React from \"react\";\n\nimport {\n InternalCardWithBackgroundElement,\n InternalCardWithBackgroundElementProps,\n} from \"@/components/atoms/InternalCardWithBackgroundElement/InternalCardWithBackgroundElement\";\nimport {\n InternalStyledSvg,\n InternalStyledSvgProps,\n} from \"@/components/atoms/InternalStyledSvg\";\n\nexport type OakHandDrawnCardProps = Omit<\n InternalCardWithBackgroundElementProps,\n \"backgroundElement\"\n> & {\n fill?: InternalStyledSvgProps[\"$fill\"];\n stroke?: InternalStyledSvgProps[\"$stroke\"];\n strokeWidth?: InternalStyledSvgProps[\"$strokeWidth\"];\n};\n\n/**\n * A flexed card with a hand-drawn filled background\n *\n * An optional `stroke` and `strokeWidth` can be applied to give the background a border\n */\nexport const OakHandDrawnCard = ({\n $pa = \"inner-padding-xl\",\n fill = \"bg-decorative1-main\",\n stroke,\n strokeWidth,\n $width = \"fit-content\",\n ...props\n}: OakHandDrawnCardProps) => {\n return (\n <InternalCardWithBackgroundElement\n $pa={$pa}\n $width={$width}\n backgroundElement={\n <InternalStyledSvg\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 457 120\"\n preserveAspectRatio=\"none\"\n $fill={fill}\n $stroke={stroke}\n $strokeWidth={strokeWidth}\n >\n <path\n d=\"M27.442 2.59c5.262-.362 11.96-.656 18.624-.932 4.374-.19 8.748-.371 12.712-.578 1.367-.07 3.042-.087 4.716-.095C65.032.976 66.57.959 67.903.907 91.858-.017 115.164.268 139.325.57l6.22.078c20.333.12 40.768.086 61.033-.13 6.664-.025 13.294-.043 19.957-.06C243.656.415 260.777.363 277.83.234c8.85-.07 17.667-.052 26.518-.035 12.132.026 24.366.052 36.771-.147 8.475-.138 17.633.087 26.757.302 3.725.087 7.45.182 11.107.25 3.69.061 7.347.139 10.969.217 4.511.095 8.988.19 13.499.259 13.464.207 30.619 1.519 30.619 1.519 3.588.449 7.074 1.32 10.286 2.59 2.973 1.304 4.682 4.135 6.391 6.967.717 1.165 1.435 2.33 2.221 3.384.273.363.342.812.376 1.26.034.406.102.82.307 1.175 3.52 6.388 2.427 12.604 1.299 19.044a27.243 27.243 0 0 0-.273 1.658 70.082 70.082 0 0 0 .478 16.273l.205 5.31c.171 4.575.342 9.133.854 13.683.274 2.357.205 4.705.137 7.07-.102 3.238-.205 6.492.547 9.808.547 2.261-.308 4.705-1.162 7.13-.342.993-.684 1.986-.923 2.962-.239.984-.546 1.951-.82 2.926-.342 1.2-.718 2.392-.991 3.6-1.196 5.379-4.511 8.435-11.756 9.134-2.392.233-4.75.518-7.142.855h-6.937c-5.263.371-11.961.656-18.624.932-4.375.19-8.749.371-12.713.579-1.367.069-3.041.086-4.716.095-1.538.008-3.075.025-4.408.086-23.956.924-47.262.639-71.422.337l-6.186-.078a3693.945 3693.945 0 0 0-61.033.129c-6.664.026-13.294.044-19.958.061-17.121.043-34.241.095-51.294.224-8.851.069-17.667.052-26.518.035-12.132-.026-24.366-.052-36.771.147-8.475.138-17.633-.087-26.758-.303-3.725-.086-7.45-.181-11.106-.25-3.69-.06-7.313-.138-10.97-.216-4.51-.095-8.987-.19-13.498-.259-18.932-.293-30.175-1.079-33.66-2.754-1.47-.38-2.871-.837-4.238-1.355-3.076-1.304-4.887-4.135-6.664-6.967-.752-1.165-1.47-2.331-2.29-3.384-.273-.363-.341-.812-.376-1.261-.034-.405-.102-.82-.307-1.174C0 95.664 1.128 89.448 2.324 83.008l.308-1.658c.478-5.421.341-10.869-.513-16.273-.102-1.77-.17-3.548-.24-5.318-.17-4.567-.375-9.125-.888-13.675-.273-2.357-.205-4.705-.136-7.07.102-3.238.205-6.493-.581-9.808-.547-2.262.341-4.705 1.196-7.13.342-.994.717-1.986.99-2.962.24-.984.548-1.96.855-2.927.376-1.2.752-2.39 1.025-3.6C5.605 7.21 9.022 4.154 16.574 3.455c2.495-.233 10.936-.855 10.936-.855l-.069-.009Z\"\n vectorEffect=\"non-scaling-stroke\"\n />\n </InternalStyledSvg>\n }\n {...props}\n />\n );\n};\n","import React from \"react\";\n\nimport { OakHandDrawnCardProps, OakHandDrawnCard } from \"../OakHandDrawnCard\";\n\nimport { OakIcon, OakIconProps } from \"@/components/atoms\";\n\nexport type OakHandDrawnBoxWithIconProps = Omit<\n OakHandDrawnCardProps,\n \"children\"\n> & {\n iconName: OakIconProps[\"iconName\"];\n alt?: OakIconProps[\"alt\"];\n iconColor?: OakIconProps[\"$colorFilter\"];\n iconWidth?: OakIconProps[\"$width\"];\n iconHeight?: OakIconProps[\"$height\"];\n};\n\n/**\n * A hand-drawn card with an icon in the center\n */\nexport const OakHandDrawnCardWithIcon = ({\n iconName,\n iconColor = \"text-primary\",\n iconWidth = [\"all-spacing-11\", \"all-spacing-16\"],\n iconHeight = [\"all-spacing-11\", \"all-spacing-16\"],\n alt,\n $width = [\"all-spacing-13\", \"all-spacing-17\"],\n $height = [\"all-spacing-13\", \"all-spacing-17\"],\n $alignItems = \"center\",\n $justifyContent = \"center\",\n ...props\n}: OakHandDrawnBoxWithIconProps) => {\n return (\n <OakHandDrawnCard\n $width={$width}\n $height={$height}\n $alignItems={$alignItems}\n $justifyContent={$justifyContent}\n {...props}\n >\n <OakIcon\n iconName={iconName}\n alt={alt}\n $height={iconHeight}\n $width={iconWidth}\n $colorFilter={iconColor}\n />\n </OakHandDrawnCard>\n );\n};\n","import React from \"react\";\nimport styled from \"styled-components\";\n\nimport { OakFlex, OakSpan } from \"@/components/atoms\";\nimport { InternalStyledSvg } from \"@/components/atoms/InternalStyledSvg\";\n\nconst StyledPromoTag = styled(OakFlex)`\n aspect-ratio: 2 / 1;\n`;\n\n/**\n * Renders a tag with the text \"New\"\n */\nexport const OakPromoTag = () => {\n return (\n <StyledPromoTag\n $alignItems=\"center\"\n $justifyContent=\"center\"\n $position=\"relative\"\n $width={[\"all-spacing-8\", \"all-spacing-9\", \"all-spacing-10\"]}\n >\n <InternalStyledSvg\n height=\"100%\"\n width=\"100%\"\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 56 27\"\n $fill=\"bg-icon\"\n >\n <path d=\"M6.421 0c8.661.839 17.303.834 26.16.714a89.843 89.843 0 0 1 4.834-.013c6.333.32 12.39.317 18.506-.275 0 1.26.178 2.352 0 3.44-.276 1.38-.829 2.759-1.342 4.15-.138.354-.532.706-.808 1.06-.445.248-.63.5-.553.753 1.598 1.093-.256 2.185 0 3.277.276 1.529 1.322 3.058 1.204 4.572-.138 1.771-1.046 3.543-1.973 5.312-.288.4-1.065.792-2.309 1.169-2.288.755-4.103 1.67-11.206 1.965-9.936.417-20.953.385-30.678-.09-2.447-.12-4.38-.532-5.209-.853-1.035-.458-1.52-.929-1.44-1.4C.937 18.988-.109 14.194.01 9.4c0-2.645 1.973-5.29 3.413-7.933.237-.424 1.697-.839 3-1.468Z\" />\n </InternalStyledSvg>\n <OakFlex\n $position=\"absolute\"\n $inset=\"all-spacing-0\"\n $alignItems=\"center\"\n $justifyContent=\"center\"\n >\n <OakSpan\n $color=\"lemon\"\n $font={[\"body-3-bold\", \"body-3-bold\", \"heading-7\"]}\n >\n New\n </OakSpan>\n </OakFlex>\n </StyledPromoTag>\n );\n};\n","import React, { ComponentProps } from \"react\";\nimport styled from \"styled-components\";\n\nimport { OakBox, OakFlex } from \"@/components/atoms\";\nimport { parseColor } from \"@/styles/helpers/parseColor\";\nimport { parseSpacing } from \"@/styles/helpers/parseSpacing\";\nimport { parseBorderRadius } from \"@/styles/helpers/parseBorderRadius\";\n\nexport type OakCollapsibleContentProps = ComponentProps<typeof OakFlex> & {\n /**\n * Whether the content is displayed or not\n */\n isOpen: boolean;\n};\n\nconst StyledScrollBox = styled(OakBox)`\n &::-webkit-scrollbar-thumb {\n border-radius: ${parseBorderRadius(\"border-radius-m\")};\n background-color: ${parseColor(\"grey50\")};\n }\n &::-webkit-scrollbar-track {\n border-radius: ${parseBorderRadius(\"border-radius-m\")};\n background-color: ${parseColor(\"white\")};\n }\n &::-webkit-scrollbar {\n width: ${parseSpacing(\"all-spacing-3\")};\n height: ${parseSpacing(\"all-spacing-3\")};\n border-radius: ${parseBorderRadius(\"border-radius-m\")};\n }\n`;\n\n/**\n * A filled scrollable box that can be hidden with the `isOpen` prop.\n * Useful for hiding content that is not immediately relevant\n */\nexport const OakCollapsibleContent = ({\n isOpen,\n children,\n id,\n ...rest\n}: OakCollapsibleContentProps) => {\n return (\n <OakBox $display={isOpen ? \"block\" : \"none\"} id={id}>\n <OakFlex\n $background=\"bg-neutral-stronger\"\n $ph=\"inner-padding-m\"\n $pv=\"inner-padding-xl\"\n $borderRadius=\"border-radius-m\"\n {...rest}\n >\n <StyledScrollBox\n $overflow=\"auto\"\n $maxHeight=\"100%\"\n $width=\"100%\"\n $pr=\"inner-padding-m\"\n >\n {children}\n </StyledScrollBox>\n </OakFlex>\n </OakBox>\n );\n};\n","import React, { ElementType, forwardRef } from \"react\";\nimport styled from \"styled-components\";\n\nimport { OakLoadingSpinner } from \"../OakLoadingSpinner\";\n\nimport {\n PolymorphicPropsWithRef,\n PolymorphicRef,\n} from \"@/components/polymorphic\";\nimport { parseColor } from \"@/styles/helpers/parseColor\";\nimport { parseDropShadow } from \"@/styles/helpers/parseDropShadow\";\nimport { parseBorderRadius } from \"@/styles/helpers/parseBorderRadius\";\nimport { parseSpacing } from \"@/styles/helpers/parseSpacing\";\nimport { OakFlex, OakIcon, OakIconProps, OakSpan } from \"@/components/atoms\";\nimport { parseColorFilter } from \"@/styles/helpers/parseColorFilter\";\n\nconst StyledOakIcon = styled(OakIcon)`\n width: ${parseSpacing(\"all-spacing-6\")};\n height: ${parseSpacing(\"all-spacing-6\")};\n`;\n\nconst StyledLink = styled.a`\n display: inline-flex;\n align-items: center;\n gap: ${parseSpacing(\"space-between-sssx\")};\n outline: none;\n border-radius: ${parseBorderRadius(\"border-radius-m\")};\n padding: ${parseSpacing(\"inner-padding-ssx\")};\n margin: -${parseSpacing(\"inner-padding-ssx\")};\n appearance: none;\n font: inherit;\n background: none;\n border: none;\n text-decoration: underline;\n cursor: pointer;\n\n color: ${parseColor(\"text-link-active\")};\n ${StyledOakIcon} {\n filter: ${parseColorFilter(\"text-link-active\")};\n }\n\n &:focus-visible {\n box-shadow: ${parseDropShadow(\"drop-shadow-centered-lemon\")},\n ${parseDropShadow(\"drop-shadow-centered-grey\")};\n }\n\n &:visited {\n color: ${parseColor(\"text-link-visited\")};\n\n ${StyledOakIcon} {\n filter: ${parseColorFilter(\"text-link-visited\")};\n }\n }\n\n @media (hover: hover) {\n &:hover,\n &:visited:hover {\n color: ${parseColor(\"text-link-hover\")};\n ${StyledOakIcon} {\n filter: ${parseColorFilter(\"text-link-hover\")};\n }\n }\n }\n\n &:active {\n color: ${parseColor(\"text-link-pressed\")};\n\n ${StyledOakIcon} {\n filter: ${parseColorFilter(\"text-link-pressed\")};\n }\n }\n\n &[disabled] {\n cursor: not-allowed;\n color: ${parseColor(\"text-disabled\")};\n\n ${StyledOakIcon} {\n filter: ${parseColorFilter(\"icon-disabled\")};\n }\n }\n`;\n\nexport type OakLinkProps = {\n iconName?: OakIconProps[\"iconName\"];\n isTrailingIcon?: boolean;\n isLoading?: boolean;\n};\n\ntype OakLinkComponent = <C extends React.ElementType = \"a\">(\n props: PolymorphicPropsWithRef<C> & OakLinkProps,\n) => React.ReactNode;\n\n/**\n * A blue link with an optional icon and loading state.\n *\n * Defaulting to a `HTMLAnchorElement` this component is polymorphic and can be rendered as a button or any other element.\n */\nexport const OakLink: OakLinkComponent = forwardRef(\n <C extends ElementType = \"a\">(\n props: PolymorphicPropsWithRef<C> & OakLinkProps,\n ref: PolymorphicRef<C>,\n ) => {\n const {\n element = \"a\",\n iconName,\n isTrailingIcon,\n children,\n isLoading,\n ...rest\n } = props;\n const icon = (() => {\n switch (true) {\n case isLoading:\n return (\n <OakFlex\n $width=\"all-spacing-6\"\n $height=\"all-spacing-6\"\n $alignItems=\"center\"\n $justifyContent=\"center\"\n >\n <OakLoadingSpinner\n $width=\"all-spacing-4\"\n $color=\"icon-inverted\"\n />\n </OakFlex>\n );\n case !!iconName:\n return <StyledOakIcon iconName={iconName} />;\n default:\n return null;\n }\n })();\n const disabled = (() => {\n switch (true) {\n case \"disabled\" in rest:\n return rest.disabled;\n case isLoading:\n return true;\n default:\n return undefined;\n }\n })();\n\n return (\n <StyledLink as={element} ref={ref} disabled={disabled} {...rest}>\n {!isTrailingIcon && icon}\n <OakSpan>{children}</OakSpan>\n {isTrailingIcon && icon}\n </StyledLink>\n );\n },\n);\n","import React, { ComponentPropsWithoutRef } from \"react\";\nimport styled from \"styled-components\";\n\nimport { OakBox, OakFlex, OakIcon, OakKbd } from \"@/components/atoms\";\nimport { parseSpacing } from \"@/styles/helpers/parseSpacing\";\n\n/**\n * Adds additional leading between each line of text to make room for the\n * keyboard instructions wrapped in `<OakKbd>`\n *\n * This might be a useful atom to extract\n */\nconst StyledLeadingTrim = styled(OakBox)`\n margin-block: calc(-${parseSpacing(\"space-between-ssx\")} / 2);\n line-height: calc(1.5rem + ${parseSpacing(\"space-between-ssx\")});\n`;\n\n/**\n * Displays instructions for drag and drop functionality\n */\nexport const OakDragAndDropInstructions = (\n props: ComponentPropsWithoutRef<typeof OakFlex>,\n) => {\n return (\n <OakFlex $gap=\"space-between-ssx\" {...props}>\n <OakFlex $flexGrow={0}>\n <OakIcon iconName=\"move-arrows\" />\n </OakFlex>\n <StyledLeadingTrim $font=\"body-2\">\n Click and drag answers to change the order, or select using{\" \"}\n <OakKbd>\n <span aria-hidden=\"true\">↹</span> Tab\n </OakKbd>{\" \"}\n then move by pressing <OakKbd>Space</OakKbd> and the <OakKbd>↑</OakKbd>{\" \"}\n <OakKbd>↓</OakKbd> arrows on your keyboard.\n </StyledLeadingTrim>\n </OakFlex>\n );\n};\n","import React, {\n ComponentPropsWithRef,\n ComponentPropsWithoutRef,\n FC,\n forwardRef,\n} from \"react\";\nimport styled from \"styled-components\";\n\nimport { OakBox, OakFlex, OakIcon } from \"@/components/atoms\";\nimport { parseColor } from \"@/styles/helpers/parseColor\";\nimport { parseBorder } from \"@/styles/helpers/parseBorder\";\nimport { parseDropShadow } from \"@/styles/helpers/parseDropShadow\";\nimport { parseSpacing } from \"@/styles/helpers/parseSpacing\";\nimport { IconName } from \"@/image-map\";\nimport { OakCombinedColorToken } from \"@/styles/theme/color\";\nimport { parseBorderWidth } from \"@/styles/helpers/parseBorderWidth\";\nimport { parseColorFilter } from \"@/styles/helpers/parseColorFilter\";\n\ntype OakDraggableProps = {\n /**\n * Whether the item is currently being dragged\n */\n isDragging?: boolean;\n /**\n * Present the element in a subdued state with hover effects disabled\n */\n isDisabled?: boolean;\n /**\n * Read only\n *\n * Disables hover effects\n */\n isReadOnly?: boolean;\n /**\n * Icon to display\n */\n iconName?: IconName;\n /**\n * Icon color when not being dragged or hovered\n */\n iconColor?: OakCombinedColorToken;\n /**\n * The alt text for the icon\n */\n iconAlt?: string;\n /**\n * The background color of the draggable when not being dragged or hovered\n */\n background?: OakCombinedColorToken;\n /**\n * The color of the draggable when not being dragged or hovered\n */\n color?: OakCombinedColorToken;\n};\n\nconst StyledOakIcon = styled(OakIcon)``;\n\nconst StyledDraggable = styled(OakBox)<{ $iconColor: OakCombinedColorToken }>`\n cursor: grab;\n outline: none;\n user-select: none;\n\n ${StyledOakIcon} {\n filter: ${(props) => parseColorFilter(props.$iconColor)};\n }\n\n @media (hover: hover) {\n &:hover:not([data-dragging=\"true\"]):not([data-disabled=\"true\"]):not(\n [data-readonly=\"true\"]\n ) {\n background-color: ${parseColor(\"bg-decorative1-subdued\")};\n color: ${parseColor(\"text-primary\")};\n box-shadow: ${parseDropShadow(\"drop-shadow-standard\")};\n border-bottom: ${parseBorder(\"border-solid-xl\")}\n ${parseColor(\"border-primary\")};\n padding-bottom: ${parseSpacing(\"inner-padding-m\")};\n text-decoration: underline;\n\n ${StyledOakIcon} {\n filter: ${parseColorFilter(\"icon-inverted\")};\n }\n }\n }\n\n &:focus-visible:not([data-dragging=\"true\"]):not([data-disabled=\"true\"]) {\n box-shadow: ${parseDropShadow(\"drop-shadow-centered-lemon\")},\n ${parseDropShadow(\"drop-shadow-centered-grey\")};\n }\n\n &[data-dragging=\"true\"] {\n cursor: move;\n background-color: ${parseColor(\"bg-decorative1-main\")};\n color: ${parseColor(\"text-primary\")};\n outline: ${parseBorder(\"border-solid-xl\")} ${parseColor(\"border-primary\")};\n outline-offset: -${parseBorderWidth(\"border-solid-xl\")};\n box-shadow: ${parseDropShadow(\"drop-shadow-lemon\")},\n ${parseDropShadow(\"drop-shadow-grey\")};\n text-decoration: underline;\n\n ${StyledOakIcon} {\n filter: ${parseColorFilter(\"icon-inverted\")};\n }\n }\n\n &[data-disabled=\"true\"] {\n cursor: default;\n background-color: ${parseColor(\"bg-neutral\")};\n color: ${parseColor(\"text-disabled\")};\n\n ${StyledOakIcon} {\n filter: ${parseColorFilter(\"icon-disabled\")};\n }\n }\n\n &[data-readonly=\"true\"] {\n cursor: default;\n }\n`;\n\nconst StyledFlex = styled(OakFlex)`\n margin-block: -${parseSpacing(\"space-between-ssx\")};\n`;\n\n/**\n * The component has no intrinsic draggable functionality.\n * It is intended to be used with `useDraggable` from `@dnd-kit/core`\n */\nexport const OakDraggable: FC<\n ComponentPropsWithRef<OakDraggableProps & typeof OakBox>\n> = forwardRef<\n HTMLDivElement,\n OakDraggableProps & ComponentPropsWithoutRef<typeof OakBox>\n>(\n (\n {\n children,\n iconName = \"move-arrows\",\n iconColor = \"icon-inverted\",\n iconAlt = \"\",\n color = \"text-primary\",\n background = \"bg-primary\",\n isDragging,\n isDisabled,\n isReadOnly,\n ...props\n },\n ref,\n ) => {\n return (\n <StyledDraggable\n ref={ref}\n $pv=\"inner-padding-l\"\n $pl=\"inner-padding-s\"\n $pr=\"inner-padding-m\"\n $background={background}\n $color={color}\n $borderRadius=\"border-radius-m2\"\n $minHeight=\"all-spacing-10\"\n data-dragging={isDragging}\n data-disabled={isDisabled}\n data-readonly={isReadOnly}\n $iconColor={iconColor}\n {...props}\n >\n <StyledFlex $gap=\"space-between-s\" $alignItems=\"center\">\n <StyledOakIcon\n iconName={iconName}\n $width=\"all-spacing-7\"\n $height=\"all-spacing-7\"\n alt={iconAlt}\n />\n <OakFlex $font=\"body-1-bold\">{children}</OakFlex>\n </StyledFlex>\n </StyledDraggable>\n );\n },\n);\n","import React, {\n ComponentPropsWithRef,\n ComponentPropsWithoutRef,\n FC,\n ReactNode,\n forwardRef,\n} from \"react\";\nimport styled from \"styled-components\";\n\nimport { OakBox, OakFlex } from \"@/components/atoms\";\nimport { parseBorder } from \"@/styles/helpers/parseBorder\";\nimport { parseColor } from \"@/styles/helpers/parseColor\";\n\nexport type OakDroppableProps = {\n /**\n * Indicates whether a draggable is currently being dragged over the droppable\n */\n isOver?: boolean;\n /**\n * Present the element in a state making it clear that it can be dropped into\n */\n isDisabled?: boolean;\n /**\n * Give the droppable a highlight to draw attention to it\n */\n isHighlighted?: boolean;\n /**\n * A slot for a label to be displayed to the RHS of the droppable\n *\n * useful for giving the user a hint about what to drop\n */\n labelSlot?: ReactNode;\n /**\n * A slot for the draggable that is currently occupying the droppable\n */\n children?: ReactNode;\n};\n\nconst StyledFlex = styled(OakFlex)`\n outline: ${parseBorder(\"border-solid-l\")} ${parseColor(\"border-primary\")};\n outline-style: dashed;\n\n &[data-disabled=\"true\"] {\n outline-color: ${parseColor(\"border-neutral\")};\n }\n`;\n\n/**\n * A drop zone for a draggable\n *\n * Has no intrinsic drop functionality.\n * It is intended to be used with `useDraggable` from `@dnd-kit/core`\n */\nexport const OakDroppable: FC<\n OakDroppableProps & ComponentPropsWithRef<typeof OakFlex>\n> = forwardRef<\n HTMLDivElement,\n OakDroppableProps & ComponentPropsWithoutRef<typeof OakFlex>\n>(\n (\n { children, labelSlot, isOver, isHighlighted, isDisabled, ...props },\n ref,\n ) => {\n const slotBackground = (() => {\n switch (true) {\n case isOver:\n return \"bg-primary\";\n case isDisabled:\n return \"bg-decorative2-subdued\";\n default:\n return \"bg-neutral\";\n }\n })();\n const background = (() => {\n switch (true) {\n case isOver:\n return \"bg-decorative2-main\";\n case isHighlighted:\n return \"bg-decorative5-main\";\n default:\n return \"bg-decorative2-subdued\";\n }\n })();\n\n return (\n <OakFlex\n ref={ref}\n $background={background}\n $pa=\"inner-padding-m\"\n $borderRadius=\"border-radius-l\"\n $gap=\"space-between-s\"\n $flexDirection={[\"column\", \"row\", \"row\"]}\n {...props}\n >\n <StyledFlex\n $background={slotBackground}\n $pa=\"inner-padding-ssx\"\n $borderRadius=\"border-radius-m2\"\n $minHeight=\"all-spacing-11\"\n $flexBasis=\"100%\"\n data-disabled={isDisabled}\n >\n <OakBox $width=\"100%\">{children}</OakBox>\n </StyledFlex>\n {labelSlot && (\n <OakFlex\n $background={isOver ? \"bg-primary\" : \"bg-decorative2-very-subdued\"}\n $borderRadius=\"border-radius-m2\"\n $alignItems=\"center\"\n $font=\"body-1\"\n $ph=\"inner-padding-l\"\n $minHeight=\"all-spacing-10\"\n $pv=\"inner-padding-ssx\"\n $flexBasis=\"100%\"\n $width=\"100%\"\n $alignSelf=\"center\"\n data-testid=\"label\"\n >\n {labelSlot}\n </OakFlex>\n )}\n </OakFlex>\n );\n },\n);\n","import React, { ReactNode, useState } from \"react\";\nimport styled from \"styled-components\";\n\nimport { OakBox, OakFlex, OakIcon } from \"@/components/atoms\";\nimport { parseSpacing } from \"@/styles/helpers/parseSpacing\";\nimport { parseDropShadow } from \"@/styles/helpers/parseDropShadow\";\n\nexport type OakAccordionProps = {\n /**\n * The header of the accordion\n */\n header: ReactNode;\n /**\n * Slot to place content after the header and outside the button\n */\n headerAfterSlot?: ReactNode;\n /**\n * Whether the accordion should be open initially\n */\n initialOpen?: boolean;\n /**\n * The content of the accordion\n */\n children: ReactNode;\n /**\n * The id of the accordion\n */\n id: string;\n};\n\nconst StyledOakFlex = styled(OakFlex)`\n font: inherit;\n border: none;\n background: none;\n appearance: none;\n margin: -${parseSpacing(\"inner-padding-m\")};\n\n outline: none;\n\n &:focus-visible {\n box-shadow: ${parseDropShadow(\"drop-shadow-centered-lemon\")},\n ${parseDropShadow(\"drop-shadow-centered-grey\")};\n }\n`;\n\n/**\n * An accordion component that can be used to show/hide content\n */\nexport const OakAccordion = ({\n header,\n headerAfterSlot,\n children,\n initialOpen = false,\n id,\n}: OakAccordionProps) => {\n const [isOpen, setOpen] = useState(initialOpen);\n\n return (\n <OakBox\n $borderColor=\"border-neutral-lighter\"\n $ba=\"border-solid-s\"\n $pa=\"inner-padding-m\"\n $background={isOpen ? \"bg-neutral\" : \"bg-primary\"}\n >\n <OakFlex\n as=\"h3\"\n $font=\"heading-light-7\"\n $textDecoration={isOpen ? \"underline\" : \"none\"}\n >\n <StyledOakFlex\n as=\"button\"\n onClick={() => setOpen(!isOpen)}\n $alignItems=\"center\"\n $pa=\"inner-padding-m\"\n $flexGrow={1}\n aria-expanded={isOpen}\n id={id}\n >\n <OakIcon\n iconName=\"chevron-down\"\n $mr=\"space-between-s\"\n $width=\"all-spacing-6\"\n $height=\"all-spacing-6\"\n alt=\"\"\n style={{ transform: isOpen ? \"rotate(180deg)\" : \"none\" }}\n />\n {header}\n </StyledOakFlex>\n {headerAfterSlot && (\n <OakFlex $ml=\"space-between-m\">{headerAfterSlot}</OakFlex>\n )}\n </OakFlex>\n <OakBox\n $ml=\"space-between-m\"\n $pl=\"inner-padding-m\"\n $mt=\"space-between-sssx\"\n $font=\"body-3\"\n hidden={!isOpen}\n aria-labelledby={id}\n role=\"region\"\n >\n {children}\n </OakBox>\n </OakBox>\n );\n};\n","export var zeroRightClassName = 'right-scroll-bar-position';\nexport var fullWidthClassName = 'width-before-scroll-bar';\nexport var noScrollbarsClassName = 'with-scroll-bars-hidden';\n/**\n * Name of a CSS variable containing the amount of \"hidden\" scrollbar\n * ! might be undefined ! use will fallback!\n */\nexport var removedBarSizeVariable = '--removed-body-scroll-bar-size';\n","/**\n * Assigns a value for a given ref, no matter of the ref format\n * @param {RefObject} ref - a callback function or ref object\n * @param value - a new value\n *\n * @see https://github.com/theKashey/use-callback-ref#assignref\n * @example\n * const refObject = useRef();\n * const refFn = (ref) => {....}\n *\n * assignRef(refObject, \"refValue\");\n * assignRef(refFn, \"refValue\");\n */\nexport function assignRef(ref, value) {\n if (typeof ref === 'function') {\n ref(value);\n }\n else if (ref) {\n ref.current = value;\n }\n return ref;\n}\n","import * as React from 'react';\nimport { assignRef } from './assignRef';\nimport { useCallbackRef } from './useRef';\nvar currentValues = new WeakMap();\n/**\n * Merges two or more refs together providing a single interface to set their value\n * @param {RefObject|Ref} refs\n * @returns {MutableRefObject} - a new ref, which translates all changes to {refs}\n *\n * @see {@link mergeRefs} a version without buit-in memoization\n * @see https://github.com/theKashey/use-callback-ref#usemergerefs\n * @example\n * const Component = React.forwardRef((props, ref) => {\n * const ownRef = useRef();\n * const domRef = useMergeRefs([ref, ownRef]); // 👈 merge together\n * return <div ref={domRef}>...</div>\n * }\n */\nexport function useMergeRefs(refs, defaultValue) {\n var callbackRef = useCallbackRef(defaultValue || null, function (newValue) {\n return refs.forEach(function (ref) { return assignRef(ref, newValue); });\n });\n // handle refs changes - added or removed\n React.useLayoutEffect(function () {\n var oldValue = currentValues.get(callbackRef);\n if (oldValue) {\n var prevRefs_1 = new Set(oldValue);\n var nextRefs_1 = new Set(refs);\n var current_1 = callbackRef.current;\n prevRefs_1.forEach(function (ref) {\n if (!nextRefs_1.has(ref)) {\n assignRef(ref, null);\n }\n });\n nextRefs_1.forEach(function (ref) {\n if (!prevRefs_1.has(ref)) {\n assignRef(ref, current_1);\n }\n });\n }\n currentValues.set(callbackRef, refs);\n }, [refs]);\n return callbackRef;\n}\n","import { useState } from 'react';\n/**\n * creates a MutableRef with ref change callback\n * @param initialValue - initial ref value\n * @param {Function} callback - a callback to run when value changes\n *\n * @example\n * const ref = useCallbackRef(0, (newValue, oldValue) => console.log(oldValue, '->', newValue);\n * ref.current = 1;\n * // prints 0 -> 1\n *\n * @see https://reactjs.org/docs/hooks-reference.html#useref\n * @see https://github.com/theKashey/use-callback-ref#usecallbackref---to-replace-reactuseref\n * @returns {MutableRefObject}\n */\nexport function useCallbackRef(initialValue, callback) {\n var ref = useState(function () { return ({\n // value\n value: initialValue,\n // last callback\n callback: callback,\n // \"memoized\" public interface\n facade: {\n get current() {\n return ref.value;\n },\n set current(value) {\n var last = ref.value;\n if (last !== value) {\n ref.value = value;\n ref.callback(value, last);\n }\n },\n },\n }); })[0];\n // update callback\n ref.callback = callback;\n return ref.facade;\n}\n","import { __assign } from \"tslib\";\nfunction ItoI(a) {\n return a;\n}\nfunction innerCreateMedium(defaults, middleware) {\n if (middleware === void 0) { middleware = ItoI; }\n var buffer = [];\n var assigned = false;\n var medium = {\n read: function () {\n if (assigned) {\n throw new Error('Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.');\n }\n if (buffer.length) {\n return buffer[buffer.length - 1];\n }\n return defaults;\n },\n useMedium: function (data) {\n var item = middleware(data, assigned);\n buffer.push(item);\n return function () {\n buffer = buffer.filter(function (x) { return x !== item; });\n };\n },\n assignSyncMedium: function (cb) {\n assigned = true;\n while (buffer.length) {\n var cbs = buffer;\n buffer = [];\n cbs.forEach(cb);\n }\n buffer = {\n push: function (x) { return cb(x); },\n filter: function () { return buffer; },\n };\n },\n assignMedium: function (cb) {\n assigned = true;\n var pendingQueue = [];\n if (buffer.length) {\n var cbs = buffer;\n buffer = [];\n cbs.forEach(cb);\n pendingQueue = buffer;\n }\n var executeQueue = function () {\n var cbs = pendingQueue;\n pendingQueue = [];\n cbs.forEach(cb);\n };\n var cycle = function () { return Promise.resolve().then(executeQueue); };\n cycle();\n buffer = {\n push: function (x) {\n pendingQueue.push(x);\n cycle();\n },\n filter: function (filter) {\n pendingQueue = pendingQueue.filter(filter);\n return buffer;\n },\n };\n },\n };\n return medium;\n}\nexport function createMedium(defaults, middleware) {\n if (middleware === void 0) { middleware = ItoI; }\n return innerCreateMedium(defaults, middleware);\n}\n// eslint-disable-next-line @typescript-eslint/ban-types\nexport function createSidecarMedium(options) {\n if (options === void 0) { options = {}; }\n var medium = innerCreateMedium(null);\n medium.options = __assign({ async: true, ssr: false }, options);\n return medium;\n}\n","import { __assign, __rest } from \"tslib\";\nimport * as React from 'react';\nvar SideCar = function (_a) {\n var sideCar = _a.sideCar, rest = __rest(_a, [\"sideCar\"]);\n if (!sideCar) {\n throw new Error('Sidecar: please provide `sideCar` property to import the right car');\n }\n var Target = sideCar.read();\n if (!Target) {\n throw new Error('Sidecar medium not found');\n }\n return React.createElement(Target, __assign({}, rest));\n};\nSideCar.isSideCarExport = true;\nexport function exportSidecar(medium, exported) {\n medium.useMedium(exported);\n return SideCar;\n}\n","import { createSidecarMedium } from 'use-sidecar';\nexport var effectCar = createSidecarMedium();\n","import { __assign, __rest } from \"tslib\";\nimport * as React from 'react';\nimport { fullWidthClassName, zeroRightClassName } from 'react-remove-scroll-bar/constants';\nimport { useMergeRefs } from 'use-callback-ref';\nimport { effectCar } from './medium';\nvar nothing = function () {\n return;\n};\n/**\n * Removes scrollbar from the page and contain the scroll within the Lock\n */\nvar RemoveScroll = React.forwardRef(function (props, parentRef) {\n var ref = React.useRef(null);\n var _a = React.useState({\n onScrollCapture: nothing,\n onWheelCapture: nothing,\n onTouchMoveCapture: nothing,\n }), callbacks = _a[0], setCallbacks = _a[1];\n var forwardProps = props.forwardProps, children = props.children, className = props.className, removeScrollBar = props.removeScrollBar, enabled = props.enabled, shards = props.shards, sideCar = props.sideCar, noIsolation = props.noIsolation, inert = props.inert, allowPinchZoom = props.allowPinchZoom, _b = props.as, Container = _b === void 0 ? 'div' : _b, gapMode = props.gapMode, rest = __rest(props, [\"forwardProps\", \"children\", \"className\", \"removeScrollBar\", \"enabled\", \"shards\", \"sideCar\", \"noIsolation\", \"inert\", \"allowPinchZoom\", \"as\", \"gapMode\"]);\n var SideCar = sideCar;\n var containerRef = useMergeRefs([ref, parentRef]);\n var containerProps = __assign(__assign({}, rest), callbacks);\n return (React.createElement(React.Fragment, null,\n enabled && (React.createElement(SideCar, { sideCar: effectCar, removeScrollBar: removeScrollBar, shards: shards, noIsolation: noIsolation, inert: inert, setCallbacks: setCallbacks, allowPinchZoom: !!allowPinchZoom, lockRef: ref, gapMode: gapMode })),\n forwardProps ? (React.cloneElement(React.Children.only(children), __assign(__assign({}, containerProps), { ref: containerRef }))) : (React.createElement(Container, __assign({}, containerProps, { className: className, ref: containerRef }), children))));\n});\nRemoveScroll.defaultProps = {\n enabled: true,\n removeScrollBar: true,\n inert: false,\n};\nRemoveScroll.classNames = {\n fullWidth: fullWidthClassName,\n zeroRight: zeroRightClassName,\n};\nexport { RemoveScroll };\n","export default function _extends() {\n _extends = Object.assign ? Object.assign.bind() : function (target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i];\n for (var key in source) {\n if (Object.prototype.hasOwnProperty.call(source, key)) {\n target[key] = source[key];\n }\n }\n }\n return target;\n };\n return _extends.apply(this, arguments);\n}","/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n'use strict';\n\nvar ReactPropTypesSecret = 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED';\n\nmodule.exports = ReactPropTypesSecret;\n","'use strict';\n\nif (process.env.NODE_ENV === 'production') {\n module.exports = require('./cjs/react-is.production.min.js');\n} else {\n module.exports = require('./cjs/react-is.development.js');\n}\n","/** @license React v16.13.1\n * react-is.production.min.js\n *\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n'use strict';var b=\"function\"===typeof Symbol&&Symbol.for,c=b?Symbol.for(\"react.element\"):60103,d=b?Symbol.for(\"react.portal\"):60106,e=b?Symbol.for(\"react.fragment\"):60107,f=b?Symbol.for(\"react.strict_mode\"):60108,g=b?Symbol.for(\"react.profiler\"):60114,h=b?Symbol.for(\"react.provider\"):60109,k=b?Symbol.for(\"react.context\"):60110,l=b?Symbol.for(\"react.async_mode\"):60111,m=b?Symbol.for(\"react.concurrent_mode\"):60111,n=b?Symbol.for(\"react.forward_ref\"):60112,p=b?Symbol.for(\"react.suspense\"):60113,q=b?\nSymbol.for(\"react.suspense_list\"):60120,r=b?Symbol.for(\"react.memo\"):60115,t=b?Symbol.for(\"react.lazy\"):60116,v=b?Symbol.for(\"react.block\"):60121,w=b?Symbol.for(\"react.fundamental\"):60117,x=b?Symbol.for(\"react.responder\"):60118,y=b?Symbol.for(\"react.scope\"):60119;\nfunction z(a){if(\"object\"===typeof a&&null!==a){var u=a.$$typeof;switch(u){case c:switch(a=a.type,a){case l:case m:case e:case g:case f:case p:return a;default:switch(a=a&&a.$$typeof,a){case k:case n:case t:case r:case h:return a;default:return u}}case d:return u}}}function A(a){return z(a)===m}exports.AsyncMode=l;exports.ConcurrentMode=m;exports.ContextConsumer=k;exports.ContextProvider=h;exports.Element=c;exports.ForwardRef=n;exports.Fragment=e;exports.Lazy=t;exports.Memo=r;exports.Portal=d;\nexports.Profiler=g;exports.StrictMode=f;exports.Suspense=p;exports.isAsyncMode=function(a){return A(a)||z(a)===l};exports.isConcurrentMode=A;exports.isContextConsumer=function(a){return z(a)===k};exports.isContextProvider=function(a){return z(a)===h};exports.isElement=function(a){return\"object\"===typeof a&&null!==a&&a.$$typeof===c};exports.isForwardRef=function(a){return z(a)===n};exports.isFragment=function(a){return z(a)===e};exports.isLazy=function(a){return z(a)===t};\nexports.isMemo=function(a){return z(a)===r};exports.isPortal=function(a){return z(a)===d};exports.isProfiler=function(a){return z(a)===g};exports.isStrictMode=function(a){return z(a)===f};exports.isSuspense=function(a){return z(a)===p};\nexports.isValidElementType=function(a){return\"string\"===typeof a||\"function\"===typeof a||a===e||a===m||a===g||a===f||a===p||a===q||\"object\"===typeof a&&null!==a&&(a.$$typeof===t||a.$$typeof===r||a.$$typeof===h||a.$$typeof===k||a.$$typeof===n||a.$$typeof===w||a.$$typeof===x||a.$$typeof===y||a.$$typeof===v)};exports.typeOf=z;\n","/** @license React v16.13.1\n * react-is.development.js\n *\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n'use strict';\n\n\n\nif (process.env.NODE_ENV !== \"production\") {\n (function() {\n'use strict';\n\n// The Symbol used to tag the ReactElement-like types. If there is no native Symbol\n// nor polyfill, then a plain number is used for performance.\nvar hasSymbol = typeof Symbol === 'function' && Symbol.for;\nvar REACT_ELEMENT_TYPE = hasSymbol ? Symbol.for('react.element') : 0xeac7;\nvar REACT_PORTAL_TYPE = hasSymbol ? Symbol.for('react.portal') : 0xeaca;\nvar REACT_FRAGMENT_TYPE = hasSymbol ? Symbol.for('react.fragment') : 0xeacb;\nvar REACT_STRICT_MODE_TYPE = hasSymbol ? Symbol.for('react.strict_mode') : 0xeacc;\nvar REACT_PROFILER_TYPE = hasSymbol ? Symbol.for('react.profiler') : 0xead2;\nvar REACT_PROVIDER_TYPE = hasSymbol ? Symbol.for('react.provider') : 0xeacd;\nvar REACT_CONTEXT_TYPE = hasSymbol ? Symbol.for('react.context') : 0xeace; // TODO: We don't use AsyncMode or ConcurrentMode anymore. They were temporary\n// (unstable) APIs that have been removed. Can we remove the symbols?\n\nvar REACT_ASYNC_MODE_TYPE = hasSymbol ? Symbol.for('react.async_mode') : 0xeacf;\nvar REACT_CONCURRENT_MODE_TYPE = hasSymbol ? Symbol.for('react.concurrent_mode') : 0xeacf;\nvar REACT_FORWARD_REF_TYPE = hasSymbol ? Symbol.for('react.forward_ref') : 0xead0;\nvar REACT_SUSPENSE_TYPE = hasSymbol ? Symbol.for('react.suspense') : 0xead1;\nvar REACT_SUSPENSE_LIST_TYPE = hasSymbol ? Symbol.for('react.suspense_list') : 0xead8;\nvar REACT_MEMO_TYPE = hasSymbol ? Symbol.for('react.memo') : 0xead3;\nvar REACT_LAZY_TYPE = hasSymbol ? Symbol.for('react.lazy') : 0xead4;\nvar REACT_BLOCK_TYPE = hasSymbol ? Symbol.for('react.block') : 0xead9;\nvar REACT_FUNDAMENTAL_TYPE = hasSymbol ? Symbol.for('react.fundamental') : 0xead5;\nvar REACT_RESPONDER_TYPE = hasSymbol ? Symbol.for('react.responder') : 0xead6;\nvar REACT_SCOPE_TYPE = hasSymbol ? Symbol.for('react.scope') : 0xead7;\n\nfunction isValidElementType(type) {\n return typeof type === 'string' || typeof type === 'function' || // Note: its typeof might be other than 'symbol' or 'number' if it's a polyfill.\n type === REACT_FRAGMENT_TYPE || type === REACT_CONCURRENT_MODE_TYPE || type === REACT_PROFILER_TYPE || type === REACT_STRICT_MODE_TYPE || type === REACT_SUSPENSE_TYPE || type === REACT_SUSPENSE_LIST_TYPE || typeof type === 'object' && type !== null && (type.$$typeof === REACT_LAZY_TYPE || type.$$typeof === REACT_MEMO_TYPE || type.$$typeof === REACT_PROVIDER_TYPE || type.$$typeof === REACT_CONTEXT_TYPE || type.$$typeof === REACT_FORWARD_REF_TYPE || type.$$typeof === REACT_FUNDAMENTAL_TYPE || type.$$typeof === REACT_RESPONDER_TYPE || type.$$typeof === REACT_SCOPE_TYPE || type.$$typeof === REACT_BLOCK_TYPE);\n}\n\nfunction typeOf(object) {\n if (typeof object === 'object' && object !== null) {\n var $$typeof = object.$$typeof;\n\n switch ($$typeof) {\n case REACT_ELEMENT_TYPE:\n var type = object.type;\n\n switch (type) {\n case REACT_ASYNC_MODE_TYPE:\n case REACT_CONCURRENT_MODE_TYPE:\n case REACT_FRAGMENT_TYPE:\n case REACT_PROFILER_TYPE:\n case REACT_STRICT_MODE_TYPE:\n case REACT_SUSPENSE_TYPE:\n return type;\n\n default:\n var $$typeofType = type && type.$$typeof;\n\n switch ($$typeofType) {\n case REACT_CONTEXT_TYPE:\n case REACT_FORWARD_REF_TYPE:\n case REACT_LAZY_TYPE:\n case REACT_MEMO_TYPE:\n case REACT_PROVIDER_TYPE:\n return $$typeofType;\n\n default:\n return $$typeof;\n }\n\n }\n\n case REACT_PORTAL_TYPE:\n return $$typeof;\n }\n }\n\n return undefined;\n} // AsyncMode is deprecated along with isAsyncMode\n\nvar AsyncMode = REACT_ASYNC_MODE_TYPE;\nvar ConcurrentMode = REACT_CONCURRENT_MODE_TYPE;\nvar ContextConsumer = REACT_CONTEXT_TYPE;\nvar ContextProvider = REACT_PROVIDER_TYPE;\nvar Element = REACT_ELEMENT_TYPE;\nvar ForwardRef = REACT_FORWARD_REF_TYPE;\nvar Fragment = REACT_FRAGMENT_TYPE;\nvar Lazy = REACT_LAZY_TYPE;\nvar Memo = REACT_MEMO_TYPE;\nvar Portal = REACT_PORTAL_TYPE;\nvar Profiler = REACT_PROFILER_TYPE;\nvar StrictMode = REACT_STRICT_MODE_TYPE;\nvar Suspense = REACT_SUSPENSE_TYPE;\nvar hasWarnedAboutDeprecatedIsAsyncMode = false; // AsyncMode should be deprecated\n\nfunction isAsyncMode(object) {\n {\n if (!hasWarnedAboutDeprecatedIsAsyncMode) {\n hasWarnedAboutDeprecatedIsAsyncMode = true; // Using console['warn'] to evade Babel and ESLint\n\n console['warn']('The ReactIs.isAsyncMode() alias has been deprecated, ' + 'and will be removed in React 17+. Update your code to use ' + 'ReactIs.isConcurrentMode() instead. It has the exact same API.');\n }\n }\n\n return isConcurrentMode(object) || typeOf(object) === REACT_ASYNC_MODE_TYPE;\n}\nfunction isConcurrentMode(object) {\n return typeOf(object) === REACT_CONCURRENT_MODE_TYPE;\n}\nfunction isContextConsumer(object) {\n return typeOf(object) === REACT_CONTEXT_TYPE;\n}\nfunction isContextProvider(object) {\n return typeOf(object) === REACT_PROVIDER_TYPE;\n}\nfunction isElement(object) {\n return typeof object === 'object' && object !== null && object.$$typeof === REACT_ELEMENT_TYPE;\n}\nfunction isForwardRef(object) {\n return typeOf(object) === REACT_FORWARD_REF_TYPE;\n}\nfunction isFragment(object) {\n return typeOf(object) === REACT_FRAGMENT_TYPE;\n}\nfunction isLazy(object) {\n return typeOf(object) === REACT_LAZY_TYPE;\n}\nfunction isMemo(object) {\n return typeOf(object) === REACT_MEMO_TYPE;\n}\nfunction isPortal(object) {\n return typeOf(object) === REACT_PORTAL_TYPE;\n}\nfunction isProfiler(object) {\n return typeOf(object) === REACT_PROFILER_TYPE;\n}\nfunction isStrictMode(object) {\n return typeOf(object) === REACT_STRICT_MODE_TYPE;\n}\nfunction isSuspense(object) {\n return typeOf(object) === REACT_SUSPENSE_TYPE;\n}\n\nexports.AsyncMode = AsyncMode;\nexports.ConcurrentMode = ConcurrentMode;\nexports.ContextConsumer = ContextConsumer;\nexports.ContextProvider = ContextProvider;\nexports.Element = Element;\nexports.ForwardRef = ForwardRef;\nexports.Fragment = Fragment;\nexports.Lazy = Lazy;\nexports.Memo = Memo;\nexports.Portal = Portal;\nexports.Profiler = Profiler;\nexports.StrictMode = StrictMode;\nexports.Suspense = Suspense;\nexports.isAsyncMode = isAsyncMode;\nexports.isConcurrentMode = isConcurrentMode;\nexports.isContextConsumer = isContextConsumer;\nexports.isContextProvider = isContextProvider;\nexports.isElement = isElement;\nexports.isForwardRef = isForwardRef;\nexports.isFragment = isFragment;\nexports.isLazy = isLazy;\nexports.isMemo = isMemo;\nexports.isPortal = isPortal;\nexports.isProfiler = isProfiler;\nexports.isStrictMode = isStrictMode;\nexports.isSuspense = isSuspense;\nexports.isValidElementType = isValidElementType;\nexports.typeOf = typeOf;\n })();\n}\n","/*\nobject-assign\n(c) Sindre Sorhus\n@license MIT\n*/\n\n'use strict';\n/* eslint-disable no-unused-vars */\nvar getOwnPropertySymbols = Object.getOwnPropertySymbols;\nvar hasOwnProperty = Object.prototype.hasOwnProperty;\nvar propIsEnumerable = Object.prototype.propertyIsEnumerable;\n\nfunction toObject(val) {\n\tif (val === null || val === undefined) {\n\t\tthrow new TypeError('Object.assign cannot be called with null or undefined');\n\t}\n\n\treturn Object(val);\n}\n\nfunction shouldUseNative() {\n\ttry {\n\t\tif (!Object.assign) {\n\t\t\treturn false;\n\t\t}\n\n\t\t// Detect buggy property enumeration order in older V8 versions.\n\n\t\t// https://bugs.chromium.org/p/v8/issues/detail?id=4118\n\t\tvar test1 = new String('abc'); // eslint-disable-line no-new-wrappers\n\t\ttest1[5] = 'de';\n\t\tif (Object.getOwnPropertyNames(test1)[0] === '5') {\n\t\t\treturn false;\n\t\t}\n\n\t\t// https://bugs.chromium.org/p/v8/issues/detail?id=3056\n\t\tvar test2 = {};\n\t\tfor (var i = 0; i < 10; i++) {\n\t\t\ttest2['_' + String.fromCharCode(i)] = i;\n\t\t}\n\t\tvar order2 = Object.getOwnPropertyNames(test2).map(function (n) {\n\t\t\treturn test2[n];\n\t\t});\n\t\tif (order2.join('') !== '0123456789') {\n\t\t\treturn false;\n\t\t}\n\n\t\t// https://bugs.chromium.org/p/v8/issues/detail?id=3056\n\t\tvar test3 = {};\n\t\t'abcdefghijklmnopqrst'.split('').forEach(function (letter) {\n\t\t\ttest3[letter] = letter;\n\t\t});\n\t\tif (Object.keys(Object.assign({}, test3)).join('') !==\n\t\t\t\t'abcdefghijklmnopqrst') {\n\t\t\treturn false;\n\t\t}\n\n\t\treturn true;\n\t} catch (err) {\n\t\t// We don't expect any of the above to throw, but better to be safe.\n\t\treturn false;\n\t}\n}\n\nmodule.exports = shouldUseNative() ? Object.assign : function (target, source) {\n\tvar from;\n\tvar to = toObject(target);\n\tvar symbols;\n\n\tfor (var s = 1; s < arguments.length; s++) {\n\t\tfrom = Object(arguments[s]);\n\n\t\tfor (var key in from) {\n\t\t\tif (hasOwnProperty.call(from, key)) {\n\t\t\t\tto[key] = from[key];\n\t\t\t}\n\t\t}\n\n\t\tif (getOwnPropertySymbols) {\n\t\t\tsymbols = getOwnPropertySymbols(from);\n\t\t\tfor (var i = 0; i < symbols.length; i++) {\n\t\t\t\tif (propIsEnumerable.call(from, symbols[i])) {\n\t\t\t\t\tto[symbols[i]] = from[symbols[i]];\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\treturn to;\n};\n","module.exports = Function.call.bind(Object.prototype.hasOwnProperty);\n","/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nif (process.env.NODE_ENV !== 'production') {\n var ReactIs = require('react-is');\n\n // By explicitly using `prop-types` you are opting into new development behavior.\n // http://fb.me/prop-types-in-prod\n var throwOnDirectAccess = true;\n module.exports = require('./factoryWithTypeCheckers')(ReactIs.isElement, throwOnDirectAccess);\n} else {\n // By explicitly using `prop-types` you are opting into new production behavior.\n // http://fb.me/prop-types-in-prod\n module.exports = require('./factoryWithThrowingShims')();\n}\n","/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n'use strict';\n\nvar ReactIs = require('react-is');\nvar assign = require('object-assign');\n\nvar ReactPropTypesSecret = require('./lib/ReactPropTypesSecret');\nvar has = require('./lib/has');\nvar checkPropTypes = require('./checkPropTypes');\n\nvar printWarning = function() {};\n\nif (process.env.NODE_ENV !== 'production') {\n printWarning = function(text) {\n var message = 'Warning: ' + text;\n if (typeof console !== 'undefined') {\n console.error(message);\n }\n try {\n // --- Welcome to debugging React ---\n // This error was thrown as a convenience so that you can use this stack\n // to find the callsite that caused this warning to fire.\n throw new Error(message);\n } catch (x) {}\n };\n}\n\nfunction emptyFunctionThatReturnsNull() {\n return null;\n}\n\nmodule.exports = function(isValidElement, throwOnDirectAccess) {\n /* global Symbol */\n var ITERATOR_SYMBOL = typeof Symbol === 'function' && Symbol.iterator;\n var FAUX_ITERATOR_SYMBOL = '@@iterator'; // Before Symbol spec.\n\n /**\n * Returns the iterator method function contained on the iterable object.\n *\n * Be sure to invoke the function with the iterable as context:\n *\n * var iteratorFn = getIteratorFn(myIterable);\n * if (iteratorFn) {\n * var iterator = iteratorFn.call(myIterable);\n * ...\n * }\n *\n * @param {?object} maybeIterable\n * @return {?function}\n */\n function getIteratorFn(maybeIterable) {\n var iteratorFn = maybeIterable && (ITERATOR_SYMBOL && maybeIterable[ITERATOR_SYMBOL] || maybeIterable[FAUX_ITERATOR_SYMBOL]);\n if (typeof iteratorFn === 'function') {\n return iteratorFn;\n }\n }\n\n /**\n * Collection of methods that allow declaration and validation of props that are\n * supplied to React components. Example usage:\n *\n * var Props = require('ReactPropTypes');\n * var MyArticle = React.createClass({\n * propTypes: {\n * // An optional string prop named \"description\".\n * description: Props.string,\n *\n * // A required enum prop named \"category\".\n * category: Props.oneOf(['News','Photos']).isRequired,\n *\n * // A prop named \"dialog\" that requires an instance of Dialog.\n * dialog: Props.instanceOf(Dialog).isRequired\n * },\n * render: function() { ... }\n * });\n *\n * A more formal specification of how these methods are used:\n *\n * type := array|bool|func|object|number|string|oneOf([...])|instanceOf(...)\n * decl := ReactPropTypes.{type}(.isRequired)?\n *\n * Each and every declaration produces a function with the same signature. This\n * allows the creation of custom validation functions. For example:\n *\n * var MyLink = React.createClass({\n * propTypes: {\n * // An optional string or URI prop named \"href\".\n * href: function(props, propName, componentName) {\n * var propValue = props[propName];\n * if (propValue != null && typeof propValue !== 'string' &&\n * !(propValue instanceof URI)) {\n * return new Error(\n * 'Expected a string or an URI for ' + propName + ' in ' +\n * componentName\n * );\n * }\n * }\n * },\n * render: function() {...}\n * });\n *\n * @internal\n */\n\n var ANONYMOUS = '<<anonymous>>';\n\n // Important!\n // Keep this list in sync with production version in `./factoryWithThrowingShims.js`.\n var ReactPropTypes = {\n array: createPrimitiveTypeChecker('array'),\n bigint: createPrimitiveTypeChecker('bigint'),\n bool: createPrimitiveTypeChecker('boolean'),\n func: createPrimitiveTypeChecker('function'),\n number: createPrimitiveTypeChecker('number'),\n object: createPrimitiveTypeChecker('object'),\n string: createPrimitiveTypeChecker('string'),\n symbol: createPrimitiveTypeChecker('symbol'),\n\n any: createAnyTypeChecker(),\n arrayOf: createArrayOfTypeChecker,\n element: createElementTypeChecker(),\n elementType: createElementTypeTypeChecker(),\n instanceOf: createInstanceTypeChecker,\n node: createNodeChecker(),\n objectOf: createObjectOfTypeChecker,\n oneOf: createEnumTypeChecker,\n oneOfType: createUnionTypeChecker,\n shape: createShapeTypeChecker,\n exact: createStrictShapeTypeChecker,\n };\n\n /**\n * inlined Object.is polyfill to avoid requiring consumers ship their own\n * https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is\n */\n /*eslint-disable no-self-compare*/\n function is(x, y) {\n // SameValue algorithm\n if (x === y) {\n // Steps 1-5, 7-10\n // Steps 6.b-6.e: +0 != -0\n return x !== 0 || 1 / x === 1 / y;\n } else {\n // Step 6.a: NaN == NaN\n return x !== x && y !== y;\n }\n }\n /*eslint-enable no-self-compare*/\n\n /**\n * We use an Error-like object for backward compatibility as people may call\n * PropTypes directly and inspect their output. However, we don't use real\n * Errors anymore. We don't inspect their stack anyway, and creating them\n * is prohibitively expensive if they are created too often, such as what\n * happens in oneOfType() for any type before the one that matched.\n */\n function PropTypeError(message, data) {\n this.message = message;\n this.data = data && typeof data === 'object' ? data: {};\n this.stack = '';\n }\n // Make `instanceof Error` still work for returned errors.\n PropTypeError.prototype = Error.prototype;\n\n function createChainableTypeChecker(validate) {\n if (process.env.NODE_ENV !== 'production') {\n var manualPropTypeCallCache = {};\n var manualPropTypeWarningCount = 0;\n }\n function checkType(isRequired, props, propName, componentName, location, propFullName, secret) {\n componentName = componentName || ANONYMOUS;\n propFullName = propFullName || propName;\n\n if (secret !== ReactPropTypesSecret) {\n if (throwOnDirectAccess) {\n // New behavior only for users of `prop-types` package\n var err = new Error(\n 'Calling PropTypes validators directly is not supported by the `prop-types` package. ' +\n 'Use `PropTypes.checkPropTypes()` to call them. ' +\n 'Read more at http://fb.me/use-check-prop-types'\n );\n err.name = 'Invariant Violation';\n throw err;\n } else if (process.env.NODE_ENV !== 'production' && typeof console !== 'undefined') {\n // Old behavior for people using React.PropTypes\n var cacheKey = componentName + ':' + propName;\n if (\n !manualPropTypeCallCache[cacheKey] &&\n // Avoid spamming the console because they are often not actionable except for lib authors\n manualPropTypeWarningCount < 3\n ) {\n printWarning(\n 'You are manually calling a React.PropTypes validation ' +\n 'function for the `' + propFullName + '` prop on `' + componentName + '`. This is deprecated ' +\n 'and will throw in the standalone `prop-types` package. ' +\n 'You may be seeing this warning due to a third-party PropTypes ' +\n 'library. See https://fb.me/react-warning-dont-call-proptypes ' + 'for details.'\n );\n manualPropTypeCallCache[cacheKey] = true;\n manualPropTypeWarningCount++;\n }\n }\n }\n if (props[propName] == null) {\n if (isRequired) {\n if (props[propName] === null) {\n return new PropTypeError('The ' + location + ' `' + propFullName + '` is marked as required ' + ('in `' + componentName + '`, but its value is `null`.'));\n }\n return new PropTypeError('The ' + location + ' `' + propFullName + '` is marked as required in ' + ('`' + componentName + '`, but its value is `undefined`.'));\n }\n return null;\n } else {\n return validate(props, propName, componentName, location, propFullName);\n }\n }\n\n var chainedCheckType = checkType.bind(null, false);\n chainedCheckType.isRequired = checkType.bind(null, true);\n\n return chainedCheckType;\n }\n\n function createPrimitiveTypeChecker(expectedType) {\n function validate(props, propName, componentName, location, propFullName, secret) {\n var propValue = props[propName];\n var propType = getPropType(propValue);\n if (propType !== expectedType) {\n // `propValue` being instance of, say, date/regexp, pass the 'object'\n // check, but we can offer a more precise error message here rather than\n // 'of type `object`'.\n var preciseType = getPreciseType(propValue);\n\n return new PropTypeError(\n 'Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + preciseType + '` supplied to `' + componentName + '`, expected ') + ('`' + expectedType + '`.'),\n {expectedType: expectedType}\n );\n }\n return null;\n }\n return createChainableTypeChecker(validate);\n }\n\n function createAnyTypeChecker() {\n return createChainableTypeChecker(emptyFunctionThatReturnsNull);\n }\n\n function createArrayOfTypeChecker(typeChecker) {\n function validate(props, propName, componentName, location, propFullName) {\n if (typeof typeChecker !== 'function') {\n return new PropTypeError('Property `' + propFullName + '` of component `' + componentName + '` has invalid PropType notation inside arrayOf.');\n }\n var propValue = props[propName];\n if (!Array.isArray(propValue)) {\n var propType = getPropType(propValue);\n return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected an array.'));\n }\n for (var i = 0; i < propValue.length; i++) {\n var error = typeChecker(propValue, i, componentName, location, propFullName + '[' + i + ']', ReactPropTypesSecret);\n if (error instanceof Error) {\n return error;\n }\n }\n return null;\n }\n return createChainableTypeChecker(validate);\n }\n\n function createElementTypeChecker() {\n function validate(props, propName, componentName, location, propFullName) {\n var propValue = props[propName];\n if (!isValidElement(propValue)) {\n var propType = getPropType(propValue);\n return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected a single ReactElement.'));\n }\n return null;\n }\n return createChainableTypeChecker(validate);\n }\n\n function createElementTypeTypeChecker() {\n function validate(props, propName, componentName, location, propFullName) {\n var propValue = props[propName];\n if (!ReactIs.isValidElementType(propValue)) {\n var propType = getPropType(propValue);\n return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected a single ReactElement type.'));\n }\n return null;\n }\n return createChainableTypeChecker(validate);\n }\n\n function createInstanceTypeChecker(expectedClass) {\n function validate(props, propName, componentName, location, propFullName) {\n if (!(props[propName] instanceof expectedClass)) {\n var expectedClassName = expectedClass.name || ANONYMOUS;\n var actualClassName = getClassName(props[propName]);\n return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + actualClassName + '` supplied to `' + componentName + '`, expected ') + ('instance of `' + expectedClassName + '`.'));\n }\n return null;\n }\n return createChainableTypeChecker(validate);\n }\n\n function createEnumTypeChecker(expectedValues) {\n if (!Array.isArray(expectedValues)) {\n if (process.env.NODE_ENV !== 'production') {\n if (arguments.length > 1) {\n printWarning(\n 'Invalid arguments supplied to oneOf, expected an array, got ' + arguments.length + ' arguments. ' +\n 'A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z]).'\n );\n } else {\n printWarning('Invalid argument supplied to oneOf, expected an array.');\n }\n }\n return emptyFunctionThatReturnsNull;\n }\n\n function validate(props, propName, componentName, location, propFullName) {\n var propValue = props[propName];\n for (var i = 0; i < expectedValues.length; i++) {\n if (is(propValue, expectedValues[i])) {\n return null;\n }\n }\n\n var valuesString = JSON.stringify(expectedValues, function replacer(key, value) {\n var type = getPreciseType(value);\n if (type === 'symbol') {\n return String(value);\n }\n return value;\n });\n return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of value `' + String(propValue) + '` ' + ('supplied to `' + componentName + '`, expected one of ' + valuesString + '.'));\n }\n return createChainableTypeChecker(validate);\n }\n\n function createObjectOfTypeChecker(typeChecker) {\n function validate(props, propName, componentName, location, propFullName) {\n if (typeof typeChecker !== 'function') {\n return new PropTypeError('Property `' + propFullName + '` of component `' + componentName + '` has invalid PropType notation inside objectOf.');\n }\n var propValue = props[propName];\n var propType = getPropType(propValue);\n if (propType !== 'object') {\n return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected an object.'));\n }\n for (var key in propValue) {\n if (has(propValue, key)) {\n var error = typeChecker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret);\n if (error instanceof Error) {\n return error;\n }\n }\n }\n return null;\n }\n return createChainableTypeChecker(validate);\n }\n\n function createUnionTypeChecker(arrayOfTypeCheckers) {\n if (!Array.isArray(arrayOfTypeCheckers)) {\n process.env.NODE_ENV !== 'production' ? printWarning('Invalid argument supplied to oneOfType, expected an instance of array.') : void 0;\n return emptyFunctionThatReturnsNull;\n }\n\n for (var i = 0; i < arrayOfTypeCheckers.length; i++) {\n var checker = arrayOfTypeCheckers[i];\n if (typeof checker !== 'function') {\n printWarning(\n 'Invalid argument supplied to oneOfType. Expected an array of check functions, but ' +\n 'received ' + getPostfixForTypeWarning(checker) + ' at index ' + i + '.'\n );\n return emptyFunctionThatReturnsNull;\n }\n }\n\n function validate(props, propName, componentName, location, propFullName) {\n var expectedTypes = [];\n for (var i = 0; i < arrayOfTypeCheckers.length; i++) {\n var checker = arrayOfTypeCheckers[i];\n var checkerResult = checker(props, propName, componentName, location, propFullName, ReactPropTypesSecret);\n if (checkerResult == null) {\n return null;\n }\n if (checkerResult.data && has(checkerResult.data, 'expectedType')) {\n expectedTypes.push(checkerResult.data.expectedType);\n }\n }\n var expectedTypesMessage = (expectedTypes.length > 0) ? ', expected one of type [' + expectedTypes.join(', ') + ']': '';\n return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` supplied to ' + ('`' + componentName + '`' + expectedTypesMessage + '.'));\n }\n return createChainableTypeChecker(validate);\n }\n\n function createNodeChecker() {\n function validate(props, propName, componentName, location, propFullName) {\n if (!isNode(props[propName])) {\n return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` supplied to ' + ('`' + componentName + '`, expected a ReactNode.'));\n }\n return null;\n }\n return createChainableTypeChecker(validate);\n }\n\n function invalidValidatorError(componentName, location, propFullName, key, type) {\n return new PropTypeError(\n (componentName || 'React class') + ': ' + location + ' type `' + propFullName + '.' + key + '` is invalid; ' +\n 'it must be a function, usually from the `prop-types` package, but received `' + type + '`.'\n );\n }\n\n function createShapeTypeChecker(shapeTypes) {\n function validate(props, propName, componentName, location, propFullName) {\n var propValue = props[propName];\n var propType = getPropType(propValue);\n if (propType !== 'object') {\n return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type `' + propType + '` ' + ('supplied to `' + componentName + '`, expected `object`.'));\n }\n for (var key in shapeTypes) {\n var checker = shapeTypes[key];\n if (typeof checker !== 'function') {\n return invalidValidatorError(componentName, location, propFullName, key, getPreciseType(checker));\n }\n var error = checker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret);\n if (error) {\n return error;\n }\n }\n return null;\n }\n return createChainableTypeChecker(validate);\n }\n\n function createStrictShapeTypeChecker(shapeTypes) {\n function validate(props, propName, componentName, location, propFullName) {\n var propValue = props[propName];\n var propType = getPropType(propValue);\n if (propType !== 'object') {\n return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type `' + propType + '` ' + ('supplied to `' + componentName + '`, expected `object`.'));\n }\n // We need to check all keys in case some are required but missing from props.\n var allKeys = assign({}, props[propName], shapeTypes);\n for (var key in allKeys) {\n var checker = shapeTypes[key];\n if (has(shapeTypes, key) && typeof checker !== 'function') {\n return invalidValidatorError(componentName, location, propFullName, key, getPreciseType(checker));\n }\n if (!checker) {\n return new PropTypeError(\n 'Invalid ' + location + ' `' + propFullName + '` key `' + key + '` supplied to `' + componentName + '`.' +\n '\\nBad object: ' + JSON.stringify(props[propName], null, ' ') +\n '\\nValid keys: ' + JSON.stringify(Object.keys(shapeTypes), null, ' ')\n );\n }\n var error = checker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret);\n if (error) {\n return error;\n }\n }\n return null;\n }\n\n return createChainableTypeChecker(validate);\n }\n\n function isNode(propValue) {\n switch (typeof propValue) {\n case 'number':\n case 'string':\n case 'undefined':\n return true;\n case 'boolean':\n return !propValue;\n case 'object':\n if (Array.isArray(propValue)) {\n return propValue.every(isNode);\n }\n if (propValue === null || isValidElement(propValue)) {\n return true;\n }\n\n var iteratorFn = getIteratorFn(propValue);\n if (iteratorFn) {\n var iterator = iteratorFn.call(propValue);\n var step;\n if (iteratorFn !== propValue.entries) {\n while (!(step = iterator.next()).done) {\n if (!isNode(step.value)) {\n return false;\n }\n }\n } else {\n // Iterator will provide entry [k,v] tuples rather than values.\n while (!(step = iterator.next()).done) {\n var entry = step.value;\n if (entry) {\n if (!isNode(entry[1])) {\n return false;\n }\n }\n }\n }\n } else {\n return false;\n }\n\n return true;\n default:\n return false;\n }\n }\n\n function isSymbol(propType, propValue) {\n // Native Symbol.\n if (propType === 'symbol') {\n return true;\n }\n\n // falsy value can't be a Symbol\n if (!propValue) {\n return false;\n }\n\n // 19.4.3.5 Symbol.prototype[@@toStringTag] === 'Symbol'\n if (propValue['@@toStringTag'] === 'Symbol') {\n return true;\n }\n\n // Fallback for non-spec compliant Symbols which are polyfilled.\n if (typeof Symbol === 'function' && propValue instanceof Symbol) {\n return true;\n }\n\n return false;\n }\n\n // Equivalent of `typeof` but with special handling for array and regexp.\n function getPropType(propValue) {\n var propType = typeof propValue;\n if (Array.isArray(propValue)) {\n return 'array';\n }\n if (propValue instanceof RegExp) {\n // Old webkits (at least until Android 4.0) return 'function' rather than\n // 'object' for typeof a RegExp. We'll normalize this here so that /bla/\n // passes PropTypes.object.\n return 'object';\n }\n if (isSymbol(propType, propValue)) {\n return 'symbol';\n }\n return propType;\n }\n\n // This handles more types than `getPropType`. Only used for error messages.\n // See `createPrimitiveTypeChecker`.\n function getPreciseType(propValue) {\n if (typeof propValue === 'undefined' || propValue === null) {\n return '' + propValue;\n }\n var propType = getPropType(propValue);\n if (propType === 'object') {\n if (propValue instanceof Date) {\n return 'date';\n } else if (propValue instanceof RegExp) {\n return 'regexp';\n }\n }\n return propType;\n }\n\n // Returns a string that is postfixed to a warning about an invalid type.\n // For example, \"undefined\" or \"of type array\"\n function getPostfixForTypeWarning(value) {\n var type = getPreciseType(value);\n switch (type) {\n case 'array':\n case 'object':\n return 'an ' + type;\n case 'boolean':\n case 'date':\n case 'regexp':\n return 'a ' + type;\n default:\n return type;\n }\n }\n\n // Returns class name of the object, if any.\n function getClassName(propValue) {\n if (!propValue.constructor || !propValue.constructor.name) {\n return ANONYMOUS;\n }\n return propValue.constructor.name;\n }\n\n ReactPropTypes.checkPropTypes = checkPropTypes;\n ReactPropTypes.resetWarningCache = checkPropTypes.resetWarningCache;\n ReactPropTypes.PropTypes = ReactPropTypes;\n\n return ReactPropTypes;\n};\n","/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n'use strict';\n\nvar printWarning = function() {};\n\nif (process.env.NODE_ENV !== 'production') {\n var ReactPropTypesSecret = require('./lib/ReactPropTypesSecret');\n var loggedTypeFailures = {};\n var has = require('./lib/has');\n\n printWarning = function(text) {\n var message = 'Warning: ' + text;\n if (typeof console !== 'undefined') {\n console.error(message);\n }\n try {\n // --- Welcome to debugging React ---\n // This error was thrown as a convenience so that you can use this stack\n // to find the callsite that caused this warning to fire.\n throw new Error(message);\n } catch (x) { /**/ }\n };\n}\n\n/**\n * Assert that the values match with the type specs.\n * Error messages are memorized and will only be shown once.\n *\n * @param {object} typeSpecs Map of name to a ReactPropType\n * @param {object} values Runtime values that need to be type-checked\n * @param {string} location e.g. \"prop\", \"context\", \"child context\"\n * @param {string} componentName Name of the component for error messages.\n * @param {?Function} getStack Returns the component stack.\n * @private\n */\nfunction checkPropTypes(typeSpecs, values, location, componentName, getStack) {\n if (process.env.NODE_ENV !== 'production') {\n for (var typeSpecName in typeSpecs) {\n if (has(typeSpecs, typeSpecName)) {\n var error;\n // Prop type validation may throw. In case they do, we don't want to\n // fail the render phase where it didn't fail before. So we log it.\n // After these have been cleaned up, we'll let them throw.\n try {\n // This is intentionally an invariant that gets caught. It's the same\n // behavior as without this statement except with a better message.\n if (typeof typeSpecs[typeSpecName] !== 'function') {\n var err = Error(\n (componentName || 'React class') + ': ' + location + ' type `' + typeSpecName + '` is invalid; ' +\n 'it must be a function, usually from the `prop-types` package, but received `' + typeof typeSpecs[typeSpecName] + '`.' +\n 'This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.'\n );\n err.name = 'Invariant Violation';\n throw err;\n }\n error = typeSpecs[typeSpecName](values, typeSpecName, componentName, location, null, ReactPropTypesSecret);\n } catch (ex) {\n error = ex;\n }\n if (error && !(error instanceof Error)) {\n printWarning(\n (componentName || 'React class') + ': type specification of ' +\n location + ' `' + typeSpecName + '` is invalid; the type checker ' +\n 'function must return `null` or an `Error` but returned a ' + typeof error + '. ' +\n 'You may have forgotten to pass an argument to the type checker ' +\n 'creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and ' +\n 'shape all require an argument).'\n );\n }\n if (error instanceof Error && !(error.message in loggedTypeFailures)) {\n // Only monitor this failure once because there tends to be a lot of the\n // same error.\n loggedTypeFailures[error.message] = true;\n\n var stack = getStack ? getStack() : '';\n\n printWarning(\n 'Failed ' + location + ' type: ' + error.message + (stack != null ? stack : '')\n );\n }\n }\n }\n }\n}\n\n/**\n * Resets warning cache when testing.\n *\n * @private\n */\ncheckPropTypes.resetWarningCache = function() {\n if (process.env.NODE_ENV !== 'production') {\n loggedTypeFailures = {};\n }\n}\n\nmodule.exports = checkPropTypes;\n","/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n'use strict';\n\nvar ReactPropTypesSecret = require('./lib/ReactPropTypesSecret');\n\nfunction emptyFunction() {}\nfunction emptyFunctionWithReset() {}\nemptyFunctionWithReset.resetWarningCache = emptyFunction;\n\nmodule.exports = function() {\n function shim(props, propName, componentName, location, propFullName, secret) {\n if (secret === ReactPropTypesSecret) {\n // It is still safe when called from React.\n return;\n }\n var err = new Error(\n 'Calling PropTypes validators directly is not supported by the `prop-types` package. ' +\n 'Use PropTypes.checkPropTypes() to call them. ' +\n 'Read more at http://fb.me/use-check-prop-types'\n );\n err.name = 'Invariant Violation';\n throw err;\n };\n shim.isRequired = shim;\n function getShim() {\n return shim;\n };\n // Important!\n // Keep this list in sync with production version in `./factoryWithTypeCheckers.js`.\n var ReactPropTypes = {\n array: shim,\n bigint: shim,\n bool: shim,\n func: shim,\n number: shim,\n object: shim,\n string: shim,\n symbol: shim,\n\n any: shim,\n arrayOf: getShim,\n element: shim,\n elementType: shim,\n instanceOf: getShim,\n node: shim,\n objectOf: getShim,\n oneOf: getShim,\n oneOfType: getShim,\n shape: getShim,\n exact: getShim,\n\n checkPropTypes: emptyFunctionWithReset,\n resetWarningCache: emptyFunction\n };\n\n ReactPropTypes.PropTypes = ReactPropTypes;\n\n return ReactPropTypes;\n};\n","/**\n * defines a focus group\n */\nexport var FOCUS_GROUP = 'data-focus-lock';\n/**\n * disables element discovery inside a group marked by key\n */\nexport var FOCUS_DISABLED = 'data-focus-lock-disabled';\n/**\n * allows uncontrolled focus within the marked area, effectively disabling focus lock for it's content\n */\nexport var FOCUS_ALLOW = 'data-no-focus-lock';\n/**\n * instructs autofocus engine to pick default autofocus inside a given node\n * can be set on the element or container\n */\nexport var FOCUS_AUTO = 'data-autofocus-inside';\n/**\n * instructs autofocus to ignore elements within a given node\n * can be set on the element or container\n */\nexport var FOCUS_NO_AUTOFOCUS = 'data-no-autofocus';\n","import * as React from 'react';\nimport PropTypes from 'prop-types';\nexport var hiddenGuard = {\n width: '1px',\n height: '0px',\n padding: 0,\n overflow: 'hidden',\n position: 'fixed',\n top: '1px',\n left: '1px'\n};\nvar InFocusGuard = function InFocusGuard(_ref) {\n var _ref$children = _ref.children,\n children = _ref$children === void 0 ? null : _ref$children;\n return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(\"div\", {\n key: \"guard-first\",\n \"data-focus-guard\": true,\n \"data-focus-auto-guard\": true,\n style: hiddenGuard\n }), children, children && /*#__PURE__*/React.createElement(\"div\", {\n key: \"guard-last\",\n \"data-focus-guard\": true,\n \"data-focus-auto-guard\": true,\n style: hiddenGuard\n }));\n};\nInFocusGuard.propTypes = process.env.NODE_ENV !== \"production\" ? {\n children: PropTypes.node\n} : {};\nexport default InFocusGuard;","import { createMedium, createSidecarMedium } from 'use-sidecar';\nexport var mediumFocus = createMedium({}, function (_ref) {\n var target = _ref.target,\n currentTarget = _ref.currentTarget;\n return {\n target: target,\n currentTarget: currentTarget\n };\n});\nexport var mediumBlur = createMedium();\nexport var mediumEffect = createMedium();\nexport var mediumSidecar = createSidecarMedium({\n async: true,\n ssr: typeof document !== 'undefined'\n});","import { createContext } from 'react';\nexport var focusScope = /*#__PURE__*/createContext(undefined);","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport * as React from 'react';\nimport { node, bool, string, any, arrayOf, oneOfType, object, func } from 'prop-types';\nimport * as constants from 'focus-lock/constants';\nimport { useMergeRefs } from 'use-callback-ref';\nimport { hiddenGuard } from './FocusGuard';\nimport { mediumFocus, mediumBlur, mediumSidecar } from './medium';\nimport { focusScope } from './scope';\nvar emptyArray = [];\nvar FocusLock = /*#__PURE__*/React.forwardRef(function FocusLockUI(props, parentRef) {\n var _extends2;\n var _React$useState = React.useState(),\n realObserved = _React$useState[0],\n setObserved = _React$useState[1];\n var observed = React.useRef();\n var isActive = React.useRef(false);\n var originalFocusedElement = React.useRef(null);\n var _React$useState2 = React.useState({}),\n update = _React$useState2[1];\n var children = props.children,\n _props$disabled = props.disabled,\n disabled = _props$disabled === void 0 ? false : _props$disabled,\n _props$noFocusGuards = props.noFocusGuards,\n noFocusGuards = _props$noFocusGuards === void 0 ? false : _props$noFocusGuards,\n _props$persistentFocu = props.persistentFocus,\n persistentFocus = _props$persistentFocu === void 0 ? false : _props$persistentFocu,\n _props$crossFrame = props.crossFrame,\n crossFrame = _props$crossFrame === void 0 ? true : _props$crossFrame,\n _props$autoFocus = props.autoFocus,\n autoFocus = _props$autoFocus === void 0 ? true : _props$autoFocus,\n allowTextSelection = props.allowTextSelection,\n group = props.group,\n className = props.className,\n whiteList = props.whiteList,\n hasPositiveIndices = props.hasPositiveIndices,\n _props$shards = props.shards,\n shards = _props$shards === void 0 ? emptyArray : _props$shards,\n _props$as = props.as,\n Container = _props$as === void 0 ? 'div' : _props$as,\n _props$lockProps = props.lockProps,\n containerProps = _props$lockProps === void 0 ? {} : _props$lockProps,\n SideCar = props.sideCar,\n _props$returnFocus = props.returnFocus,\n shouldReturnFocus = _props$returnFocus === void 0 ? false : _props$returnFocus,\n focusOptions = props.focusOptions,\n onActivationCallback = props.onActivation,\n onDeactivationCallback = props.onDeactivation;\n var _React$useState3 = React.useState({}),\n id = _React$useState3[0];\n var onActivation = React.useCallback(function (_ref) {\n var captureFocusRestore = _ref.captureFocusRestore;\n if (!originalFocusedElement.current) {\n var _document;\n var activeElement = (_document = document) == null ? void 0 : _document.activeElement;\n originalFocusedElement.current = activeElement;\n if (activeElement !== document.body) {\n originalFocusedElement.current = captureFocusRestore(activeElement);\n }\n }\n if (observed.current && onActivationCallback) {\n onActivationCallback(observed.current);\n }\n isActive.current = true;\n update();\n }, [onActivationCallback]);\n var onDeactivation = React.useCallback(function () {\n isActive.current = false;\n if (onDeactivationCallback) {\n onDeactivationCallback(observed.current);\n }\n update();\n }, [onDeactivationCallback]);\n var returnFocus = React.useCallback(function (allowDefer) {\n var focusRestore = originalFocusedElement.current;\n if (focusRestore) {\n var returnFocusTo = (typeof focusRestore === 'function' ? focusRestore() : focusRestore) || document.body;\n var howToReturnFocus = typeof shouldReturnFocus === 'function' ? shouldReturnFocus(returnFocusTo) : shouldReturnFocus;\n if (howToReturnFocus) {\n var returnFocusOptions = typeof howToReturnFocus === 'object' ? howToReturnFocus : undefined;\n originalFocusedElement.current = null;\n if (allowDefer) {\n Promise.resolve().then(function () {\n return returnFocusTo.focus(returnFocusOptions);\n });\n } else {\n returnFocusTo.focus(returnFocusOptions);\n }\n }\n }\n }, [shouldReturnFocus]);\n var onFocus = React.useCallback(function (event) {\n if (isActive.current) {\n mediumFocus.useMedium(event);\n }\n }, []);\n var onBlur = mediumBlur.useMedium;\n var setObserveNode = React.useCallback(function (newObserved) {\n if (observed.current !== newObserved) {\n observed.current = newObserved;\n setObserved(newObserved);\n }\n }, []);\n if (process.env.NODE_ENV !== 'production') {\n if (typeof allowTextSelection !== 'undefined') {\n console.warn('React-Focus-Lock: allowTextSelection is deprecated and enabled by default');\n }\n React.useEffect(function () {\n if (!observed.current && typeof Container !== 'string') {\n console.error('FocusLock: could not obtain ref to internal node');\n }\n }, []);\n }\n var lockProps = _extends((_extends2 = {}, _extends2[constants.FOCUS_DISABLED] = disabled && 'disabled', _extends2[constants.FOCUS_GROUP] = group, _extends2), containerProps);\n var hasLeadingGuards = noFocusGuards !== true;\n var hasTailingGuards = hasLeadingGuards && noFocusGuards !== 'tail';\n var mergedRef = useMergeRefs([parentRef, setObserveNode]);\n var focusScopeValue = React.useMemo(function () {\n return {\n observed: observed,\n shards: shards,\n enabled: !disabled,\n active: isActive.current\n };\n }, [disabled, isActive.current, shards, realObserved]);\n return /*#__PURE__*/React.createElement(React.Fragment, null, hasLeadingGuards && [\n /*#__PURE__*/\n React.createElement(\"div\", {\n key: \"guard-first\",\n \"data-focus-guard\": true,\n tabIndex: disabled ? -1 : 0,\n style: hiddenGuard\n }), hasPositiveIndices ? /*#__PURE__*/React.createElement(\"div\", {\n key: \"guard-nearest\",\n \"data-focus-guard\": true,\n tabIndex: disabled ? -1 : 1,\n style: hiddenGuard\n }) : null], !disabled && /*#__PURE__*/React.createElement(SideCar, {\n id: id,\n sideCar: mediumSidecar,\n observed: realObserved,\n disabled: disabled,\n persistentFocus: persistentFocus,\n crossFrame: crossFrame,\n autoFocus: autoFocus,\n whiteList: whiteList,\n shards: shards,\n onActivation: onActivation,\n onDeactivation: onDeactivation,\n returnFocus: returnFocus,\n focusOptions: focusOptions\n }), /*#__PURE__*/React.createElement(Container, _extends({\n ref: mergedRef\n }, lockProps, {\n className: className,\n onBlur: onBlur,\n onFocus: onFocus\n }), /*#__PURE__*/React.createElement(focusScope.Provider, {\n value: focusScopeValue\n }, children)), hasTailingGuards && /*#__PURE__*/React.createElement(\"div\", {\n \"data-focus-guard\": true,\n tabIndex: disabled ? -1 : 0,\n style: hiddenGuard\n }));\n});\nFocusLock.propTypes = process.env.NODE_ENV !== \"production\" ? {\n children: node,\n disabled: bool,\n returnFocus: oneOfType([bool, object, func]),\n focusOptions: object,\n noFocusGuards: bool,\n hasPositiveIndices: bool,\n allowTextSelection: bool,\n autoFocus: bool,\n persistentFocus: bool,\n crossFrame: bool,\n group: string,\n className: string,\n whiteList: func,\n shards: arrayOf(any),\n as: oneOfType([string, func, object]),\n lockProps: object,\n onActivation: func,\n onDeactivation: func,\n sideCar: any.isRequired\n} : {};\nexport default FocusLock;","export function deferAction(action) {\n setTimeout(action, 1);\n}\nexport var inlineProp = function inlineProp(name, value) {\n var obj = {};\n obj[name] = value;\n return obj;\n};\nexport var extractRef = function extractRef(ref) {\n return ref && 'current' in ref ? ref.current : ref;\n};","import { createSidecarMedium } from 'use-sidecar';\nexport var effectCar = createSidecarMedium();\nexport var focusHiddenMarker = 'data-focus-on-hidden';\n","import { __assign, __rest } from \"tslib\";\nimport * as React from 'react';\nimport { RemoveScroll } from 'react-remove-scroll/UI';\nimport ReactFocusLock from 'react-focus-lock/UI';\nimport { effectCar } from './medium';\nvar PREVENT_SCROLL = { preventScroll: true };\nexport var FocusOn = React.forwardRef(function (props, parentRef) {\n var _a = React.useState(false), lockProps = _a[0], setLockProps = _a[1];\n var children = props.children, autoFocus = props.autoFocus, shards = props.shards, crossFrame = props.crossFrame, _b = props.enabled, enabled = _b === void 0 ? true : _b, _c = props.scrollLock, scrollLock = _c === void 0 ? true : _c, _d = props.focusLock, focusLock = _d === void 0 ? true : _d, _e = props.returnFocus, returnFocus = _e === void 0 ? true : _e, inert = props.inert, allowPinchZoom = props.allowPinchZoom, sideCar = props.sideCar, className = props.className, shouldIgnore = props.shouldIgnore, preventScrollOnFocus = props.preventScrollOnFocus, style = props.style, as = props.as, gapMode = props.gapMode, rest = __rest(props, [\"children\", \"autoFocus\", \"shards\", \"crossFrame\", \"enabled\", \"scrollLock\", \"focusLock\", \"returnFocus\", \"inert\", \"allowPinchZoom\", \"sideCar\", \"className\", \"shouldIgnore\", \"preventScrollOnFocus\", \"style\", \"as\", \"gapMode\"]);\n var SideCar = sideCar;\n var onActivation = lockProps.onActivation, onDeactivation = lockProps.onDeactivation, restProps = __rest(lockProps, [\"onActivation\", \"onDeactivation\"]);\n var appliedLockProps = __assign(__assign({}, restProps), { as: as,\n style: style,\n sideCar: sideCar,\n shards: shards,\n allowPinchZoom: allowPinchZoom,\n gapMode: gapMode,\n inert: inert, enabled: enabled && scrollLock });\n return (React.createElement(React.Fragment, null,\n React.createElement(ReactFocusLock, { ref: parentRef, sideCar: sideCar, disabled: !(lockProps && enabled && focusLock), returnFocus: returnFocus, autoFocus: autoFocus, shards: shards, crossFrame: crossFrame, onActivation: onActivation, onDeactivation: onDeactivation, className: className, whiteList: shouldIgnore, lockProps: appliedLockProps, focusOptions: preventScrollOnFocus ? PREVENT_SCROLL : undefined, as: RemoveScroll }, children),\n enabled && (React.createElement(SideCar, __assign({}, rest, { sideCar: effectCar, setLockProps: setLockProps, shards: shards })))));\n});\nexport * from './reExports';\n","export default function _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}","import setPrototypeOf from \"./setPrototypeOf.js\";\nexport default function _inheritsLoose(subClass, superClass) {\n subClass.prototype = Object.create(superClass.prototype);\n subClass.prototype.constructor = subClass;\n setPrototypeOf(subClass, superClass);\n}","export default function _typeof(o) {\n \"@babel/helpers - typeof\";\n\n return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (o) {\n return typeof o;\n } : function (o) {\n return o && \"function\" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? \"symbol\" : typeof o;\n }, _typeof(o);\n}","import _typeof from \"./typeof.js\";\nimport toPrimitive from \"./toPrimitive.js\";\nexport default function _toPropertyKey(arg) {\n var key = toPrimitive(arg, \"string\");\n return _typeof(key) === \"symbol\" ? key : String(key);\n}","import _typeof from \"./typeof.js\";\nexport default function _toPrimitive(input, hint) {\n if (_typeof(input) !== \"object\" || input === null) return input;\n var prim = input[Symbol.toPrimitive];\n if (prim !== undefined) {\n var res = prim.call(input, hint || \"default\");\n if (_typeof(res) !== \"object\") return res;\n throw new TypeError(\"@@toPrimitive must return a primitive value.\");\n }\n return (hint === \"string\" ? String : Number)(input);\n}","/*\nIE11 support\n */\nexport var toArray = function (a) {\n var ret = Array(a.length);\n for (var i = 0; i < a.length; ++i) {\n ret[i] = a[i];\n }\n return ret;\n};\nexport var asArray = function (a) { return (Array.isArray(a) ? a : [a]); };\nexport var getFirst = function (a) { return (Array.isArray(a) ? a[0] : a); };\n","import { FOCUS_NO_AUTOFOCUS } from '../constants';\nvar isElementHidden = function (node) {\n // we can measure only \"elements\"\n // consider others as \"visible\"\n if (node.nodeType !== Node.ELEMENT_NODE) {\n return false;\n }\n var computedStyle = window.getComputedStyle(node, null);\n if (!computedStyle || !computedStyle.getPropertyValue) {\n return false;\n }\n return (computedStyle.getPropertyValue('display') === 'none' || computedStyle.getPropertyValue('visibility') === 'hidden');\n};\nvar getParentNode = function (node) {\n // DOCUMENT_FRAGMENT_NODE can also point on ShadowRoot. In this case .host will point on the next node\n return node.parentNode && node.parentNode.nodeType === Node.DOCUMENT_FRAGMENT_NODE\n ? // eslint-disable-next-line @typescript-eslint/no-explicit-any\n node.parentNode.host\n : node.parentNode;\n};\nvar isTopNode = function (node) {\n // @ts-ignore\n return node === document || (node && node.nodeType === Node.DOCUMENT_NODE);\n};\nvar isInert = function (node) { return node.hasAttribute('inert'); };\n/**\n * @see https://github.com/testing-library/jest-dom/blob/main/src/to-be-visible.js\n */\nvar isVisibleUncached = function (node, checkParent) {\n return !node || isTopNode(node) || (!isElementHidden(node) && !isInert(node) && checkParent(getParentNode(node)));\n};\nexport var isVisibleCached = function (visibilityCache, node) {\n var cached = visibilityCache.get(node);\n if (cached !== undefined) {\n return cached;\n }\n var result = isVisibleUncached(node, isVisibleCached.bind(undefined, visibilityCache));\n visibilityCache.set(node, result);\n return result;\n};\nvar isAutoFocusAllowedUncached = function (node, checkParent) {\n return node && !isTopNode(node) ? (isAutoFocusAllowed(node) ? checkParent(getParentNode(node)) : false) : true;\n};\nexport var isAutoFocusAllowedCached = function (cache, node) {\n var cached = cache.get(node);\n if (cached !== undefined) {\n return cached;\n }\n var result = isAutoFocusAllowedUncached(node, isAutoFocusAllowedCached.bind(undefined, cache));\n cache.set(node, result);\n return result;\n};\nexport var getDataset = function (node) {\n // @ts-ignore\n return node.dataset;\n};\nexport var isHTMLButtonElement = function (node) { return node.tagName === 'BUTTON'; };\nexport var isHTMLInputElement = function (node) { return node.tagName === 'INPUT'; };\nexport var isRadioElement = function (node) {\n return isHTMLInputElement(node) && node.type === 'radio';\n};\nexport var notHiddenInput = function (node) {\n return !((isHTMLInputElement(node) || isHTMLButtonElement(node)) && (node.type === 'hidden' || node.disabled));\n};\nexport var isAutoFocusAllowed = function (node) {\n var attribute = node.getAttribute(FOCUS_NO_AUTOFOCUS);\n return ![true, 'true', ''].includes(attribute);\n};\nexport var isGuard = function (node) { var _a; return Boolean(node && ((_a = getDataset(node)) === null || _a === void 0 ? void 0 : _a.focusGuard)); };\nexport var isNotAGuard = function (node) { return !isGuard(node); };\nexport var isDefined = function (x) { return Boolean(x); };\n","import { toArray } from './array';\nexport var tabSort = function (a, b) {\n var aTab = Math.max(0, a.tabIndex);\n var bTab = Math.max(0, b.tabIndex);\n var tabDiff = aTab - bTab;\n var indexDiff = a.index - b.index;\n if (tabDiff) {\n if (!aTab) {\n return 1;\n }\n if (!bTab) {\n return -1;\n }\n }\n return tabDiff || indexDiff;\n};\nvar getTabIndex = function (node) {\n if (node.tabIndex < 0) {\n // all \"focusable\" elements are already preselected\n // but some might have implicit negative tabIndex\n // return 0 for <audio without tabIndex attribute - it is \"tabbable\"\n if (!node.hasAttribute('tabindex')) {\n return 0;\n }\n }\n return node.tabIndex;\n};\nexport var orderByTabIndex = function (nodes, filterNegative, keepGuards) {\n return toArray(nodes)\n .map(function (node, index) {\n var tabIndex = getTabIndex(node);\n return {\n node: node,\n index: index,\n tabIndex: keepGuards && tabIndex === -1 ? ((node.dataset || {}).focusGuard ? 0 : -1) : tabIndex,\n };\n })\n .filter(function (data) { return !filterNegative || data.tabIndex >= 0; })\n .sort(tabSort);\n};\n","import { FOCUS_AUTO } from '../constants';\nimport { toArray } from './array';\nimport { tabbables } from './tabbables';\nvar queryTabbables = tabbables.join(',');\nvar queryGuardTabbables = \"\".concat(queryTabbables, \", [data-focus-guard]\");\nvar getFocusablesWithShadowDom = function (parent, withGuards) {\n return toArray((parent.shadowRoot || parent).children).reduce(function (acc, child) {\n return acc.concat(child.matches(withGuards ? queryGuardTabbables : queryTabbables) ? [child] : [], getFocusablesWithShadowDom(child));\n }, []);\n};\nvar getFocusablesWithIFrame = function (parent, withGuards) {\n var _a;\n // contentDocument of iframe will be null if current origin cannot access it\n if (parent instanceof HTMLIFrameElement && ((_a = parent.contentDocument) === null || _a === void 0 ? void 0 : _a.body)) {\n return getFocusables([parent.contentDocument.body], withGuards);\n }\n return [parent];\n};\nexport var getFocusables = function (parents, withGuards) {\n return parents.reduce(function (acc, parent) {\n var _a;\n var focusableWithShadowDom = getFocusablesWithShadowDom(parent, withGuards);\n var focusableWithIframes = (_a = []).concat.apply(_a, focusableWithShadowDom.map(function (node) { return getFocusablesWithIFrame(node, withGuards); }));\n return acc.concat(\n // add all tabbables inside and within shadow DOMs in DOM order\n focusableWithIframes, \n // add if node is tabbable itself\n parent.parentNode\n ? toArray(parent.parentNode.querySelectorAll(queryTabbables)).filter(function (node) { return node === parent; })\n : []);\n }, []);\n};\n/**\n * return a list of focusable nodes within an area marked as \"auto-focusable\"\n * @param parent\n */\nexport var getParentAutofocusables = function (parent) {\n var parentFocus = parent.querySelectorAll(\"[\".concat(FOCUS_AUTO, \"]\"));\n return toArray(parentFocus)\n .map(function (node) { return getFocusables([node]); })\n .reduce(function (acc, nodes) { return acc.concat(nodes); }, []);\n};\n","/**\n * list of the object to be considered as focusable\n */\nexport var tabbables = [\n 'button:enabled',\n 'select:enabled',\n 'textarea:enabled',\n 'input:enabled',\n // elements with explicit roles will also use explicit tabindex\n // '[role=\"button\"]',\n 'a[href]',\n 'area[href]',\n 'summary',\n 'iframe',\n 'object',\n 'embed',\n 'audio[controls]',\n 'video[controls]',\n '[tabindex]',\n '[contenteditable]',\n '[autofocus]',\n];\n","import { toArray } from './array';\nimport { isAutoFocusAllowedCached, isVisibleCached, notHiddenInput } from './is';\nimport { orderByTabIndex } from './tabOrder';\nimport { getFocusables, getParentAutofocusables } from './tabUtils';\n/**\n * given list of focusable elements keeps the ones user can interact with\n * @param nodes\n * @param visibilityCache\n */\nexport var filterFocusable = function (nodes, visibilityCache) {\n return toArray(nodes)\n .filter(function (node) { return isVisibleCached(visibilityCache, node); })\n .filter(function (node) { return notHiddenInput(node); });\n};\nexport var filterAutoFocusable = function (nodes, cache) {\n if (cache === void 0) { cache = new Map(); }\n return toArray(nodes).filter(function (node) { return isAutoFocusAllowedCached(cache, node); });\n};\n/**\n * !__WARNING__! Low level API.\n * @returns all tabbable nodes\n *\n * @see {@link getFocusableNodes} to get any focusable element\n *\n * @param topNodes - array of top level HTMLElements to search inside\n * @param visibilityCache - an cache to store intermediate measurements. Expected to be a fresh `new Map` on every call\n */\nexport var getTabbableNodes = function (topNodes, visibilityCache, withGuards) {\n return orderByTabIndex(filterFocusable(getFocusables(topNodes, withGuards), visibilityCache), true, withGuards);\n};\n/**\n * !__WARNING__! Low level API.\n *\n * @returns anything \"focusable\", not only tabbable. The difference is in `tabIndex=-1`\n * (without guards, as long as they are not expected to be ever focused)\n *\n * @see {@link getTabbableNodes} to get only tabble nodes element\n *\n * @param topNodes - array of top level HTMLElements to search inside\n * @param visibilityCache - an cache to store intermediate measurements. Expected to be a fresh `new Map` on every call\n */\nexport var getFocusableNodes = function (topNodes, visibilityCache) {\n return orderByTabIndex(filterFocusable(getFocusables(topNodes), visibilityCache), false);\n};\n/**\n * return list of nodes which are expected to be auto-focused\n * @param topNode\n * @param visibilityCache\n */\nexport var parentAutofocusables = function (topNode, visibilityCache) {\n return filterFocusable(getParentAutofocusables(topNode), visibilityCache);\n};\n/*\n * Determines if element is contained in scope, including nested shadow DOMs\n */\nexport var contains = function (scope, element) {\n if (scope.shadowRoot) {\n return contains(scope.shadowRoot, element);\n }\n else {\n if (Object.getPrototypeOf(scope).contains !== undefined &&\n Object.getPrototypeOf(scope).contains.call(scope, element)) {\n return true;\n }\n return toArray(scope.children).some(function (child) {\n var _a;\n if (child instanceof HTMLIFrameElement) {\n var iframeBody = (_a = child.contentDocument) === null || _a === void 0 ? void 0 : _a.body;\n if (iframeBody) {\n return contains(iframeBody, element);\n }\n return false;\n }\n return contains(child, element);\n });\n }\n};\n","import { FOCUS_DISABLED, FOCUS_GROUP } from '../constants';\nimport { asArray, toArray } from './array';\n/**\n * in case of multiple nodes nested inside each other\n * keeps only top ones\n * this is O(nlogn)\n * @param nodes\n * @returns {*}\n */\nvar filterNested = function (nodes) {\n var contained = new Set();\n var l = nodes.length;\n for (var i = 0; i < l; i += 1) {\n for (var j = i + 1; j < l; j += 1) {\n var position = nodes[i].compareDocumentPosition(nodes[j]);\n /* eslint-disable no-bitwise */\n if ((position & Node.DOCUMENT_POSITION_CONTAINED_BY) > 0) {\n contained.add(j);\n }\n if ((position & Node.DOCUMENT_POSITION_CONTAINS) > 0) {\n contained.add(i);\n }\n /* eslint-enable */\n }\n }\n return nodes.filter(function (_, index) { return !contained.has(index); });\n};\n/**\n * finds top most parent for a node\n * @param node\n * @returns {*}\n */\nvar getTopParent = function (node) {\n return node.parentNode ? getTopParent(node.parentNode) : node;\n};\n/**\n * returns all \"focus containers\" inside a given node\n * @param node - node or nodes to look inside\n * @returns Element[]\n */\nexport var getAllAffectedNodes = function (node) {\n var nodes = asArray(node);\n return nodes.filter(Boolean).reduce(function (acc, currentNode) {\n var group = currentNode.getAttribute(FOCUS_GROUP);\n acc.push.apply(acc, (group\n ? filterNested(toArray(getTopParent(currentNode).querySelectorAll(\"[\".concat(FOCUS_GROUP, \"=\\\"\").concat(group, \"\\\"]:not([\").concat(FOCUS_DISABLED, \"=\\\"disabled\\\"])\"))))\n : [currentNode]));\n return acc;\n }, []);\n};\n","/**\n * returns active element from document or from nested shadowdoms\n */\nimport { safeProbe } from './safe';\n/**\n * returns current active element. If the active element is a \"container\" itself(shadowRoot or iframe) returns active element inside it\n * @param [inDocument]\n */\nexport var getActiveElement = function (inDocument) {\n if (inDocument === void 0) { inDocument = document; }\n if (!inDocument || !inDocument.activeElement) {\n return undefined;\n }\n var activeElement = inDocument.activeElement;\n return (activeElement.shadowRoot\n ? getActiveElement(activeElement.shadowRoot)\n : activeElement instanceof HTMLIFrameElement && safeProbe(function () { return activeElement.contentWindow.document; })\n ? getActiveElement(activeElement.contentWindow.document)\n : activeElement);\n};\n","export var safeProbe = function (cb) {\n try {\n return cb();\n }\n catch (e) {\n return undefined;\n }\n};\n","import { contains } from './utils/DOMutils';\nimport { getAllAffectedNodes } from './utils/all-affected';\nimport { getFirst, toArray } from './utils/array';\nimport { getActiveElement } from './utils/getActiveElement';\nvar focusInFrame = function (frame, activeElement) { return frame === activeElement; };\nvar focusInsideIframe = function (topNode, activeElement) {\n return Boolean(toArray(topNode.querySelectorAll('iframe')).some(function (node) { return focusInFrame(node, activeElement); }));\n};\n/**\n * @returns {Boolean} true, if the current focus is inside given node or nodes.\n * Supports nodes hidden inside shadowDom\n */\nexport var focusInside = function (topNode, activeElement) {\n // const activeElement = document && getActiveElement();\n if (activeElement === void 0) { activeElement = getActiveElement(getFirst(topNode).ownerDocument); }\n if (!activeElement || (activeElement.dataset && activeElement.dataset.focusGuard)) {\n return false;\n }\n return getAllAffectedNodes(topNode).some(function (node) {\n return contains(node, activeElement) || focusInsideIframe(node, activeElement);\n });\n};\n","import { isRadioElement } from './is';\nvar findSelectedRadio = function (node, nodes) {\n return nodes\n .filter(isRadioElement)\n .filter(function (el) { return el.name === node.name; })\n .filter(function (el) { return el.checked; })[0] || node;\n};\nexport var correctNode = function (node, nodes) {\n if (isRadioElement(node) && node.name) {\n return findSelectedRadio(node, nodes);\n }\n return node;\n};\n/**\n * giving a set of radio inputs keeps only selected (tabbable) ones\n * @param nodes\n */\nexport var correctNodes = function (nodes) {\n // IE11 has no Set(array) constructor\n var resultSet = new Set();\n nodes.forEach(function (node) { return resultSet.add(correctNode(node, nodes)); });\n // using filter to support IE11\n return nodes.filter(function (node) { return resultSet.has(node); });\n};\n","import { correctNode } from './correctFocus';\nexport var pickFirstFocus = function (nodes) {\n if (nodes[0] && nodes.length > 1) {\n return correctNode(nodes[0], nodes);\n }\n return nodes[0];\n};\nexport var pickFocusable = function (nodes, node) {\n return nodes.indexOf(correctNode(node, nodes));\n};\n","import { correctNodes } from './utils/correctFocus';\nimport { pickFocusable } from './utils/firstFocus';\nimport { isGuard } from './utils/is';\nexport var NEW_FOCUS = 'NEW_FOCUS';\n/**\n * Main solver for the \"find next focus\" question\n * @param innerNodes - used to control \"return focus\"\n * @param innerTabbables - used to control \"autofocus\"\n * @param outerNodes\n * @param activeElement\n * @param lastNode\n * @returns {number|string|undefined|*}\n */\nexport var newFocus = function (innerNodes, innerTabbables, outerNodes, activeElement, lastNode) {\n var cnt = innerNodes.length;\n var firstFocus = innerNodes[0];\n var lastFocus = innerNodes[cnt - 1];\n var isOnGuard = isGuard(activeElement);\n // focus is inside\n if (activeElement && innerNodes.indexOf(activeElement) >= 0) {\n return undefined;\n }\n var activeIndex = activeElement !== undefined ? outerNodes.indexOf(activeElement) : -1;\n var lastIndex = lastNode ? outerNodes.indexOf(lastNode) : activeIndex;\n var lastNodeInside = lastNode ? innerNodes.indexOf(lastNode) : -1;\n // no active focus (or focus is on the body)\n if (activeIndex === -1) {\n // known fallback\n if (lastNodeInside !== -1) {\n return lastNodeInside;\n }\n return NEW_FOCUS;\n }\n // new focus, nothing to calculate\n if (lastNodeInside === -1) {\n return NEW_FOCUS;\n }\n var indexDiff = activeIndex - lastIndex;\n var firstNodeIndex = outerNodes.indexOf(firstFocus);\n var lastNodeIndex = outerNodes.indexOf(lastFocus);\n var correctedNodes = correctNodes(outerNodes);\n var correctedIndex = activeElement !== undefined ? correctedNodes.indexOf(activeElement) : -1;\n var correctedIndexDiff = correctedIndex - (lastNode ? correctedNodes.indexOf(lastNode) : activeIndex);\n // old focus\n if (!indexDiff && lastNodeInside >= 0) {\n return lastNodeInside;\n }\n // no tabbable elements, autofocus is not possible\n if (innerTabbables.length === 0) {\n // an edge case with no tabbable elements\n // return the last focusable one\n // with some probability this will prevent focus from cycling across the lock, but there is no tabbale elements to cycle to\n return lastNodeInside;\n }\n var returnFirstNode = pickFocusable(innerNodes, innerTabbables[0]);\n var returnLastNode = pickFocusable(innerNodes, innerTabbables[innerTabbables.length - 1]);\n // first element\n if (activeIndex <= firstNodeIndex && isOnGuard && Math.abs(indexDiff) > 1) {\n return returnLastNode;\n }\n // last element\n if (activeIndex >= lastNodeIndex && isOnGuard && Math.abs(indexDiff) > 1) {\n return returnFirstNode;\n }\n // jump out, but not on the guard\n if (indexDiff && Math.abs(correctedIndexDiff) > 1) {\n return lastNodeInside;\n }\n // focus above lock\n if (activeIndex <= firstNodeIndex) {\n return returnLastNode;\n }\n // focus below lock\n if (activeIndex > lastNodeIndex) {\n return returnFirstNode;\n }\n // index is inside tab order, but outside Lock\n if (indexDiff) {\n if (Math.abs(indexDiff) > 1) {\n return lastNodeInside;\n }\n return (cnt + lastNodeInside + indexDiff) % cnt;\n }\n // do nothing\n return undefined;\n};\n","import { filterAutoFocusable } from './DOMutils';\nimport { pickFirstFocus } from './firstFocus';\nimport { getDataset } from './is';\nvar findAutoFocused = function (autoFocusables) {\n return function (node) {\n var _a;\n var autofocus = (_a = getDataset(node)) === null || _a === void 0 ? void 0 : _a.autofocus;\n return (\n // @ts-expect-error\n node.autofocus ||\n //\n (autofocus !== undefined && autofocus !== 'false') ||\n //\n autoFocusables.indexOf(node) >= 0);\n };\n};\nexport var pickAutofocus = function (nodesIndexes, orderedNodes, groups) {\n var nodes = nodesIndexes.map(function (_a) {\n var node = _a.node;\n return node;\n });\n var autoFocusable = filterAutoFocusable(nodes.filter(findAutoFocused(groups)));\n if (autoFocusable && autoFocusable.length) {\n return pickFirstFocus(autoFocusable);\n }\n return pickFirstFocus(filterAutoFocusable(orderedNodes));\n};\n","import { parentAutofocusables } from './DOMutils';\nimport { contains } from './DOMutils';\nimport { asArray } from './array';\nvar getParents = function (node, parents) {\n if (parents === void 0) { parents = []; }\n parents.push(node);\n if (node.parentNode) {\n getParents(node.parentNode.host || node.parentNode, parents);\n }\n return parents;\n};\n/**\n * finds a parent for both nodeA and nodeB\n * @param nodeA\n * @param nodeB\n * @returns {boolean|*}\n */\nexport var getCommonParent = function (nodeA, nodeB) {\n var parentsA = getParents(nodeA);\n var parentsB = getParents(nodeB);\n // tslint:disable-next-line:prefer-for-of\n for (var i = 0; i < parentsA.length; i += 1) {\n var currentParent = parentsA[i];\n if (parentsB.indexOf(currentParent) >= 0) {\n return currentParent;\n }\n }\n return false;\n};\nexport var getTopCommonParent = function (baseActiveElement, leftEntry, rightEntries) {\n var activeElements = asArray(baseActiveElement);\n var leftEntries = asArray(leftEntry);\n var activeElement = activeElements[0];\n var topCommon = false;\n leftEntries.filter(Boolean).forEach(function (entry) {\n topCommon = getCommonParent(topCommon || entry, entry) || topCommon;\n rightEntries.filter(Boolean).forEach(function (subEntry) {\n var common = getCommonParent(activeElement, subEntry);\n if (common) {\n if (!topCommon || contains(common, topCommon)) {\n topCommon = common;\n }\n else {\n topCommon = getCommonParent(common, topCommon);\n }\n }\n });\n });\n // TODO: add assert here?\n return topCommon;\n};\n/**\n * return list of nodes which are expected to be autofocused inside a given top nodes\n * @param entries\n * @param visibilityCache\n */\nexport var allParentAutofocusables = function (entries, visibilityCache) {\n return entries.reduce(function (acc, node) { return acc.concat(parentAutofocusables(node, visibilityCache)); }, []);\n};\n","import { NEW_FOCUS, newFocus } from './solver';\nimport { getFocusableNodes } from './utils/DOMutils';\nimport { getAllAffectedNodes } from './utils/all-affected';\nimport { asArray, getFirst } from './utils/array';\nimport { pickAutofocus } from './utils/auto-focus';\nimport { getActiveElement } from './utils/getActiveElement';\nimport { isDefined, isNotAGuard } from './utils/is';\nimport { allParentAutofocusables, getTopCommonParent } from './utils/parenting';\nvar reorderNodes = function (srcNodes, dstNodes) {\n var remap = new Map();\n // no Set(dstNodes) for IE11 :(\n dstNodes.forEach(function (entity) { return remap.set(entity.node, entity); });\n // remap to dstNodes\n return srcNodes.map(function (node) { return remap.get(node); }).filter(isDefined);\n};\n/**\n * contains the main logic of the `focus-lock` package.\n *\n * ! you probably dont need this function !\n *\n * given top node(s) and the last active element returns the element to be focused next\n * @returns element which should be focused to move focus inside\n * @param topNode\n * @param lastNode\n */\nexport var focusSolver = function (topNode, lastNode) {\n var activeElement = getActiveElement(asArray(topNode).length > 0 ? document : getFirst(topNode).ownerDocument);\n var entries = getAllAffectedNodes(topNode).filter(isNotAGuard);\n var commonParent = getTopCommonParent(activeElement || topNode, topNode, entries);\n var visibilityCache = new Map();\n var anyFocusable = getFocusableNodes(entries, visibilityCache);\n var innerElements = anyFocusable.filter(function (_a) {\n var node = _a.node;\n return isNotAGuard(node);\n });\n if (!innerElements[0]) {\n return undefined;\n }\n var outerNodes = getFocusableNodes([commonParent], visibilityCache).map(function (_a) {\n var node = _a.node;\n return node;\n });\n var orderedInnerElements = reorderNodes(outerNodes, innerElements);\n // collect inner focusable and separately tabbables\n var innerFocusables = orderedInnerElements.map(function (_a) {\n var node = _a.node;\n return node;\n });\n var innerTabbable = orderedInnerElements.filter(function (_a) {\n var tabIndex = _a.tabIndex;\n return tabIndex >= 0;\n }).map(function (_a) {\n var node = _a.node;\n return node;\n });\n var newId = newFocus(innerFocusables, innerTabbable, outerNodes, activeElement, lastNode);\n if (newId === NEW_FOCUS) {\n var focusNode = \n // first try only tabbable, and the fallback to all focusable, as long as at least one element should be picked for focus\n pickAutofocus(anyFocusable, innerTabbable, allParentAutofocusables(entries, visibilityCache)) ||\n pickAutofocus(anyFocusable, innerFocusables, allParentAutofocusables(entries, visibilityCache));\n if (focusNode) {\n return { node: focusNode };\n }\n else {\n console.warn('focus-lock: cannot find any node to move focus into');\n return undefined;\n }\n }\n if (newId === undefined) {\n return newId;\n }\n return orderedInnerElements[newId];\n};\n","export var focusOn = function (target, focusOptions) {\n if (!target) {\n // not clear how, but is possible https://github.com/theKashey/focus-lock/issues/53\n return;\n }\n if ('focus' in target) {\n target.focus(focusOptions);\n }\n if ('contentWindow' in target && target.contentWindow) {\n target.contentWindow.focus();\n }\n};\n","import { focusOn } from './commands';\nimport { focusSolver } from './focusSolver';\nvar guardCount = 0;\nvar lockDisabled = false;\n/**\n * The main functionality of the focus-lock package\n *\n * Contains focus at a given node.\n * The last focused element will help to determine which element(first or last) should be focused.\n * The found element will be focused.\n *\n * This is one time action (move), not a persistent focus-lock\n *\n * HTML markers (see {@link import('./constants').FOCUS_AUTO} constants) can control autofocus\n * @see {@link focusSolver} for the same functionality without autofocus\n */\nexport var moveFocusInside = function (topNode, lastNode, options) {\n if (options === void 0) { options = {}; }\n var focusable = focusSolver(topNode, lastNode);\n // global local side effect to countain recursive lock activation and resolve focus-fighting\n if (lockDisabled) {\n return;\n }\n if (focusable) {\n /** +FOCUS-FIGHTING prevention **/\n if (guardCount > 2) {\n // we have recursive entered back the lock activation\n console.error('FocusLock: focus-fighting detected. Only one focus management system could be active. ' +\n 'See https://github.com/theKashey/focus-lock/#focus-fighting');\n lockDisabled = true;\n setTimeout(function () {\n lockDisabled = false;\n }, 1);\n return;\n }\n guardCount++;\n focusOn(focusable.node, options.focusOptions);\n guardCount--;\n }\n};\n","import { getTabbableNodes } from './utils/DOMutils';\nfunction weakRef(value) {\n if (!value)\n return null;\n var w = value ? new WeakRef(value) : null;\n return function () { return (w === null || w === void 0 ? void 0 : w.deref()) || null; };\n}\nexport var recordElementLocation = function (element) {\n if (!element) {\n return null;\n }\n var stack = [];\n var currentElement = element;\n while (currentElement && currentElement !== document.body) {\n stack.push({\n current: weakRef(currentElement),\n parent: weakRef(currentElement.parentElement),\n left: weakRef(currentElement.previousElementSibling),\n right: weakRef(currentElement.nextElementSibling),\n });\n currentElement = currentElement.parentElement;\n }\n return {\n element: weakRef(element),\n stack: stack,\n ownerDocument: element.ownerDocument,\n };\n};\nvar restoreFocusTo = function (location) {\n var _a, _b, _c, _d, _e;\n if (!location) {\n return undefined;\n }\n var stack = location.stack, ownerDocument = location.ownerDocument;\n var visibilityCache = new Map();\n for (var _i = 0, stack_1 = stack; _i < stack_1.length; _i++) {\n var line = stack_1[_i];\n var parent_1 = (_a = line.parent) === null || _a === void 0 ? void 0 : _a.call(line);\n // is it still here?\n if (parent_1 && ownerDocument.contains(parent_1)) {\n var left = (_b = line.left) === null || _b === void 0 ? void 0 : _b.call(line);\n var savedCurrent = line.current();\n var current = parent_1.contains(savedCurrent) ? savedCurrent : undefined;\n var right = (_c = line.right) === null || _c === void 0 ? void 0 : _c.call(line);\n var focusables = getTabbableNodes([parent_1], visibilityCache);\n var aim = \n // that is element itself\n (_e = (_d = current !== null && current !== void 0 ? current : \n // or something in it's place\n left === null || left === void 0 ? void 0 : left.nextElementSibling) !== null && _d !== void 0 ? _d : \n // or somebody to the right, still close enough\n right) !== null && _e !== void 0 ? _e : \n // or somebody to the left, something?\n left;\n while (aim) {\n for (var _f = 0, focusables_1 = focusables; _f < focusables_1.length; _f++) {\n var focusable = focusables_1[_f];\n if (aim === null || aim === void 0 ? void 0 : aim.contains(focusable.node)) {\n return focusable.node;\n }\n }\n aim = aim.nextElementSibling;\n }\n if (focusables.length) {\n // if parent contains a focusable - move there\n return focusables[0].node;\n }\n }\n }\n // nothing matched\n return undefined;\n};\n/**\n * Captures the current focused element to restore focus as close as possible in the future\n * Handles situations where the focused element is removed from the DOM or no longer focusable\n * moving focus to the closest focusable element\n * @param targetElement - element where focus should be restored\n * @returns a function returning a new element to focus\n */\nexport var captureFocusRestore = function (targetElement) {\n var location = recordElementLocation(targetElement);\n return function () {\n return restoreFocusTo(location);\n };\n};\n","import { focusOn } from './commands';\nimport { getTabbableNodes, contains, getFocusableNodes } from './utils/DOMutils';\nimport { asArray } from './utils/array';\n/**\n * for a given `element` in a given `scope` returns focusable siblings\n * @param element - base element\n * @param scope - common parent. Can be document, but better to narrow it down for performance reasons\n * @returns {prev,next} - references to a focusable element before and after\n * @returns undefined - if operation is not applicable\n */\nexport var getRelativeFocusable = function (element, scope, useTabbables) {\n if (!element || !scope) {\n console.error('no element or scope given');\n return {};\n }\n var shards = asArray(scope);\n if (shards.every(function (shard) { return !contains(shard, element); })) {\n console.error('Active element is not contained in the scope');\n return {};\n }\n var focusables = useTabbables\n ? getTabbableNodes(shards, new Map())\n : getFocusableNodes(shards, new Map());\n var current = focusables.findIndex(function (_a) {\n var node = _a.node;\n return node === element;\n });\n if (current === -1) {\n // an edge case, when anchor element is not found\n return undefined;\n }\n return {\n prev: focusables[current - 1],\n next: focusables[current + 1],\n first: focusables[0],\n last: focusables[focusables.length - 1],\n };\n};\nvar getBoundary = function (shards, useTabbables) {\n var set = useTabbables\n ? getTabbableNodes(asArray(shards), new Map())\n : getFocusableNodes(asArray(shards), new Map());\n return {\n first: set[0],\n last: set[set.length - 1],\n };\n};\nvar defaultOptions = function (options) {\n return Object.assign({\n scope: document.body,\n cycle: true,\n onlyTabbable: true,\n }, options);\n};\nvar moveFocus = function (fromElement, options, cb) {\n if (options === void 0) { options = {}; }\n var newOptions = defaultOptions(options);\n var solution = getRelativeFocusable(fromElement, newOptions.scope, newOptions.onlyTabbable);\n if (!solution) {\n return;\n }\n var target = cb(solution, newOptions.cycle);\n if (target) {\n focusOn(target.node, newOptions.focusOptions);\n }\n};\n/**\n * focuses next element in the tab-order\n * @param fromElement - common parent to scope active element search or tab cycle order\n * @param {FocusNextOptions} [options] - focus options\n */\nexport var focusNextElement = function (fromElement, options) {\n if (options === void 0) { options = {}; }\n moveFocus(fromElement, options, function (_a, cycle) {\n var next = _a.next, first = _a.first;\n return next || (cycle && first);\n });\n};\n/**\n * focuses prev element in the tab order\n * @param fromElement - common parent to scope active element search or tab cycle order\n * @param {FocusNextOptions} [options] - focus options\n */\nexport var focusPrevElement = function (fromElement, options) {\n if (options === void 0) { options = {}; }\n moveFocus(fromElement, options, function (_a, cycle) {\n var prev = _a.prev, last = _a.last;\n return prev || (cycle && last);\n });\n};\nvar pickBoundary = function (scope, options, what) {\n var _a;\n var boundary = getBoundary(scope, (_a = options.onlyTabbable) !== null && _a !== void 0 ? _a : true);\n var node = boundary[what];\n if (node) {\n focusOn(node.node, options.focusOptions);\n }\n};\n/**\n * focuses first element in the tab-order\n * @param {FocusNextOptions} options - focus options\n */\nexport var focusFirstElement = function (scope, options) {\n if (options === void 0) { options = {}; }\n pickBoundary(scope, options, 'first');\n};\n/**\n * focuses last element in the tab order\n * @param {FocusNextOptions} options - focus options\n */\nexport var focusLastElement = function (scope, options) {\n if (options === void 0) { options = {}; }\n pickBoundary(scope, options, 'last');\n};\n","import * as React from 'react';\nimport PropTypes from 'prop-types';\nimport withSideEffect from 'react-clientside-effect';\nimport { moveFocusInside, focusInside, focusIsHidden, expandFocusableNodes, focusNextElement, focusPrevElement, focusFirstElement, focusLastElement, captureFocusRestore } from 'focus-lock';\nimport { deferAction, extractRef } from './util';\nimport { mediumFocus, mediumBlur, mediumEffect } from './medium';\nvar focusOnBody = function focusOnBody() {\n return document && document.activeElement === document.body;\n};\nvar isFreeFocus = function isFreeFocus() {\n return focusOnBody() || focusIsHidden();\n};\nvar lastActiveTrap = null;\nvar lastActiveFocus = null;\nvar lastPortaledElement = null;\nvar focusWasOutsideWindow = false;\nvar defaultWhitelist = function defaultWhitelist() {\n return true;\n};\nvar focusWhitelisted = function focusWhitelisted(activeElement) {\n return (lastActiveTrap.whiteList || defaultWhitelist)(activeElement);\n};\nvar recordPortal = function recordPortal(observerNode, portaledElement) {\n lastPortaledElement = {\n observerNode: observerNode,\n portaledElement: portaledElement\n };\n};\nvar focusIsPortaledPair = function focusIsPortaledPair(element) {\n return lastPortaledElement && lastPortaledElement.portaledElement === element;\n};\nfunction autoGuard(startIndex, end, step, allNodes) {\n var lastGuard = null;\n var i = startIndex;\n do {\n var item = allNodes[i];\n if (item.guard) {\n if (item.node.dataset.focusAutoGuard) {\n lastGuard = item;\n }\n } else if (item.lockItem) {\n if (i !== startIndex) {\n return;\n }\n lastGuard = null;\n } else {\n break;\n }\n } while ((i += step) !== end);\n if (lastGuard) {\n lastGuard.node.tabIndex = 0;\n }\n}\nvar focusWasOutside = function focusWasOutside(crossFrameOption) {\n if (crossFrameOption) {\n return Boolean(focusWasOutsideWindow);\n }\n return focusWasOutsideWindow === 'meanwhile';\n};\nvar checkInHost = function checkInHost(check, el, boundary) {\n return el && (el.host === check && (!el.activeElement || boundary.contains(el.activeElement)) || el.parentNode && checkInHost(check, el.parentNode, boundary));\n};\nvar withinHost = function withinHost(activeElement, workingArea) {\n return workingArea.some(function (area) {\n return checkInHost(activeElement, area, area);\n });\n};\nvar activateTrap = function activateTrap() {\n var result = false;\n if (lastActiveTrap) {\n var _lastActiveTrap = lastActiveTrap,\n observed = _lastActiveTrap.observed,\n persistentFocus = _lastActiveTrap.persistentFocus,\n autoFocus = _lastActiveTrap.autoFocus,\n shards = _lastActiveTrap.shards,\n crossFrame = _lastActiveTrap.crossFrame,\n focusOptions = _lastActiveTrap.focusOptions;\n var workingNode = observed || lastPortaledElement && lastPortaledElement.portaledElement;\n var activeElement = document && document.activeElement;\n if (workingNode) {\n var workingArea = [workingNode].concat(shards.map(extractRef).filter(Boolean));\n if (!activeElement || focusWhitelisted(activeElement)) {\n if (persistentFocus || focusWasOutside(crossFrame) || !isFreeFocus() || !lastActiveFocus && autoFocus) {\n if (workingNode && !(focusInside(workingArea) || activeElement && withinHost(activeElement, workingArea) || focusIsPortaledPair(activeElement, workingNode))) {\n if (document && !lastActiveFocus && activeElement && !autoFocus) {\n if (activeElement.blur) {\n activeElement.blur();\n }\n document.body.focus();\n } else {\n result = moveFocusInside(workingArea, lastActiveFocus, {\n focusOptions: focusOptions\n });\n lastPortaledElement = {};\n }\n }\n focusWasOutsideWindow = false;\n lastActiveFocus = document && document.activeElement;\n }\n }\n if (document && activeElement !== document.activeElement && document.querySelector('[data-focus-auto-guard]')) {\n var newActiveElement = document && document.activeElement;\n var allNodes = expandFocusableNodes(workingArea);\n var focusedIndex = allNodes.map(function (_ref) {\n var node = _ref.node;\n return node;\n }).indexOf(newActiveElement);\n if (focusedIndex > -1) {\n allNodes.filter(function (_ref2) {\n var guard = _ref2.guard,\n node = _ref2.node;\n return guard && node.dataset.focusAutoGuard;\n }).forEach(function (_ref3) {\n var node = _ref3.node;\n return node.removeAttribute('tabIndex');\n });\n autoGuard(focusedIndex, allNodes.length, +1, allNodes);\n autoGuard(focusedIndex, -1, -1, allNodes);\n }\n }\n }\n }\n return result;\n};\nvar onTrap = function onTrap(event) {\n if (activateTrap() && event) {\n event.stopPropagation();\n event.preventDefault();\n }\n};\nvar onBlur = function onBlur() {\n return deferAction(activateTrap);\n};\nvar onFocus = function onFocus(event) {\n var source = event.target;\n var currentNode = event.currentTarget;\n if (!currentNode.contains(source)) {\n recordPortal(currentNode, source);\n }\n};\nvar FocusWatcher = function FocusWatcher() {\n return null;\n};\nvar FocusTrap = function FocusTrap(_ref4) {\n var children = _ref4.children;\n return /*#__PURE__*/React.createElement(\"div\", {\n onBlur: onBlur,\n onFocus: onFocus\n }, children);\n};\nFocusTrap.propTypes = process.env.NODE_ENV !== \"production\" ? {\n children: PropTypes.node.isRequired\n} : {};\nvar onWindowBlur = function onWindowBlur() {\n focusWasOutsideWindow = 'just';\n deferAction(function () {\n focusWasOutsideWindow = 'meanwhile';\n });\n};\nvar attachHandler = function attachHandler() {\n document.addEventListener('focusin', onTrap);\n document.addEventListener('focusout', onBlur);\n window.addEventListener('blur', onWindowBlur);\n};\nvar detachHandler = function detachHandler() {\n document.removeEventListener('focusin', onTrap);\n document.removeEventListener('focusout', onBlur);\n window.removeEventListener('blur', onWindowBlur);\n};\nfunction reducePropsToState(propsList) {\n return propsList.filter(function (_ref5) {\n var disabled = _ref5.disabled;\n return !disabled;\n });\n}\nvar focusLockAPI = {\n moveFocusInside: moveFocusInside,\n focusInside: focusInside,\n focusNextElement: focusNextElement,\n focusPrevElement: focusPrevElement,\n focusFirstElement: focusFirstElement,\n focusLastElement: focusLastElement,\n captureFocusRestore: captureFocusRestore\n};\nfunction handleStateChangeOnClient(traps) {\n var trap = traps.slice(-1)[0];\n if (trap && !lastActiveTrap) {\n attachHandler();\n }\n var lastTrap = lastActiveTrap;\n var sameTrap = lastTrap && trap && trap.id === lastTrap.id;\n lastActiveTrap = trap;\n if (lastTrap && !sameTrap) {\n lastTrap.onDeactivation();\n if (!traps.filter(function (_ref6) {\n var id = _ref6.id;\n return id === lastTrap.id;\n }).length) {\n lastTrap.returnFocus(!trap);\n }\n }\n if (trap) {\n lastActiveFocus = null;\n if (!sameTrap || lastTrap.observed !== trap.observed) {\n trap.onActivation(focusLockAPI);\n }\n activateTrap(true);\n deferAction(activateTrap);\n } else {\n detachHandler();\n lastActiveFocus = null;\n }\n}\nmediumFocus.assignSyncMedium(onFocus);\nmediumBlur.assignMedium(onBlur);\nmediumEffect.assignMedium(function (cb) {\n return cb(focusLockAPI);\n});\nexport default withSideEffect(reducePropsToState, handleStateChangeOnClient)(FocusWatcher);","import { FOCUS_ALLOW } from './constants';\nimport { contains } from './utils/DOMutils';\nimport { toArray } from './utils/array';\nimport { getActiveElement } from './utils/getActiveElement';\n/**\n * checks if focus is hidden FROM the focus-lock\n * ie contained inside a node focus-lock shall ignore\n *\n * This is a utility function coupled with {@link FOCUS_ALLOW} constant\n *\n * @returns {boolean} focus is currently is in \"allow\" area\n */\nexport var focusIsHidden = function (inDocument) {\n if (inDocument === void 0) { inDocument = document; }\n var activeElement = getActiveElement(inDocument);\n if (!activeElement) {\n return false;\n }\n // this does not support setting FOCUS_ALLOW within shadow dom\n return toArray(inDocument.querySelectorAll(\"[\".concat(FOCUS_ALLOW, \"]\"))).some(function (node) { return contains(node, activeElement); });\n};\n","import { getAllAffectedNodes } from './utils/all-affected';\nimport { isGuard, isNotAGuard } from './utils/is';\nimport { getTopCommonParent } from './utils/parenting';\nimport { orderByTabIndex } from './utils/tabOrder';\nimport { getFocusables } from './utils/tabUtils';\n/**\n * traverses all related nodes (including groups) returning a list of all nodes(outer and internal) with meta information\n * This is low-level API!\n * @returns list of focusable elements inside a given top(!) node.\n * @see {@link getFocusableNodes} providing a simpler API\n */\nexport var expandFocusableNodes = function (topNode) {\n var entries = getAllAffectedNodes(topNode).filter(isNotAGuard);\n var commonParent = getTopCommonParent(topNode, topNode, entries);\n var outerNodes = orderByTabIndex(getFocusables([commonParent], true), true, true);\n var innerElements = getFocusables(entries, false);\n return outerNodes.map(function (_a) {\n var node = _a.node, index = _a.index;\n return ({\n node: node,\n index: index,\n lockItem: innerElements.indexOf(node) >= 0,\n guard: isGuard(node),\n });\n });\n};\n","import _inheritsLoose from '@babel/runtime/helpers/esm/inheritsLoose';\nimport _defineProperty from '@babel/runtime/helpers/esm/defineProperty';\nimport React, { PureComponent } from 'react';\n\nfunction withSideEffect(reducePropsToState, handleStateChangeOnClient) {\n if (process.env.NODE_ENV !== \"production\") {\n if (typeof reducePropsToState !== 'function') {\n throw new Error('Expected reducePropsToState to be a function.');\n }\n\n if (typeof handleStateChangeOnClient !== 'function') {\n throw new Error('Expected handleStateChangeOnClient to be a function.');\n }\n }\n\n function getDisplayName(WrappedComponent) {\n return WrappedComponent.displayName || WrappedComponent.name || 'Component';\n }\n\n return function wrap(WrappedComponent) {\n if (process.env.NODE_ENV !== \"production\") {\n if (typeof WrappedComponent !== 'function') {\n throw new Error('Expected WrappedComponent to be a React component.');\n }\n }\n\n var mountedInstances = [];\n var state;\n\n function emitChange() {\n state = reducePropsToState(mountedInstances.map(function (instance) {\n return instance.props;\n }));\n handleStateChangeOnClient(state);\n }\n\n var SideEffect = /*#__PURE__*/function (_PureComponent) {\n _inheritsLoose(SideEffect, _PureComponent);\n\n function SideEffect() {\n return _PureComponent.apply(this, arguments) || this;\n }\n\n // Try to use displayName of wrapped component\n SideEffect.peek = function peek() {\n return state;\n };\n\n var _proto = SideEffect.prototype;\n\n _proto.componentDidMount = function componentDidMount() {\n mountedInstances.push(this);\n emitChange();\n };\n\n _proto.componentDidUpdate = function componentDidUpdate() {\n emitChange();\n };\n\n _proto.componentWillUnmount = function componentWillUnmount() {\n var index = mountedInstances.indexOf(this);\n mountedInstances.splice(index, 1);\n emitChange();\n };\n\n _proto.render = function render() {\n return /*#__PURE__*/React.createElement(WrappedComponent, this.props);\n };\n\n return SideEffect;\n }(PureComponent);\n\n _defineProperty(SideEffect, \"displayName\", \"SideEffect(\" + getDisplayName(WrappedComponent) + \")\");\n\n return SideEffect;\n };\n}\n\nexport default withSideEffect;\n","import toPropertyKey from \"./toPropertyKey.js\";\nexport default function _defineProperty(obj, key, value) {\n key = toPropertyKey(key);\n if (key in obj) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n } else {\n obj[key] = value;\n }\n return obj;\n}","import { exportSidecar } from 'use-sidecar';\nimport FocusTrap from './Trap';\nimport { mediumSidecar } from './medium';\nexport default exportSidecar(mediumSidecar, FocusTrap);","import { getNonce } from 'get-nonce';\nfunction makeStyleTag() {\n if (!document)\n return null;\n var tag = document.createElement('style');\n tag.type = 'text/css';\n var nonce = getNonce();\n if (nonce) {\n tag.setAttribute('nonce', nonce);\n }\n return tag;\n}\nfunction injectStyles(tag, css) {\n // @ts-ignore\n if (tag.styleSheet) {\n // @ts-ignore\n tag.styleSheet.cssText = css;\n }\n else {\n tag.appendChild(document.createTextNode(css));\n }\n}\nfunction insertStyleTag(tag) {\n var head = document.head || document.getElementsByTagName('head')[0];\n head.appendChild(tag);\n}\nexport var stylesheetSingleton = function () {\n var counter = 0;\n var stylesheet = null;\n return {\n add: function (style) {\n if (counter == 0) {\n if ((stylesheet = makeStyleTag())) {\n injectStyles(stylesheet, style);\n insertStyleTag(stylesheet);\n }\n }\n counter++;\n },\n remove: function () {\n counter--;\n if (!counter && stylesheet) {\n stylesheet.parentNode && stylesheet.parentNode.removeChild(stylesheet);\n stylesheet = null;\n }\n },\n };\n};\n","var currentNonce;\nexport var setNonce = function (nonce) {\n currentNonce = nonce;\n};\nexport var getNonce = function () {\n if (currentNonce) {\n return currentNonce;\n }\n if (typeof __webpack_nonce__ !== 'undefined') {\n return __webpack_nonce__;\n }\n return undefined;\n};\n","import { styleHookSingleton } from './hook';\n/**\n * create a Component to add styles on demand\n * - styles are added when first instance is mounted\n * - styles are removed when the last instance is unmounted\n * - changing styles in runtime does nothing unless dynamic is set. But with multiple components that can lead to the undefined behavior\n */\nexport var styleSingleton = function () {\n var useStyle = styleHookSingleton();\n var Sheet = function (_a) {\n var styles = _a.styles, dynamic = _a.dynamic;\n useStyle(styles, dynamic);\n return null;\n };\n return Sheet;\n};\n","import * as React from 'react';\nimport { stylesheetSingleton } from './singleton';\n/**\n * creates a hook to control style singleton\n * @see {@link styleSingleton} for a safer component version\n * @example\n * ```tsx\n * const useStyle = styleHookSingleton();\n * ///\n * useStyle('body { overflow: hidden}');\n */\nexport var styleHookSingleton = function () {\n var sheet = stylesheetSingleton();\n return function (styles, isDynamic) {\n React.useEffect(function () {\n sheet.add(styles);\n return function () {\n sheet.remove();\n };\n }, [styles && isDynamic]);\n };\n};\n","export var zeroGap = {\n left: 0,\n top: 0,\n right: 0,\n gap: 0,\n};\nvar parse = function (x) { return parseInt(x || '', 10) || 0; };\nvar getOffset = function (gapMode) {\n var cs = window.getComputedStyle(document.body);\n var left = cs[gapMode === 'padding' ? 'paddingLeft' : 'marginLeft'];\n var top = cs[gapMode === 'padding' ? 'paddingTop' : 'marginTop'];\n var right = cs[gapMode === 'padding' ? 'paddingRight' : 'marginRight'];\n return [parse(left), parse(top), parse(right)];\n};\nexport var getGapWidth = function (gapMode) {\n if (gapMode === void 0) { gapMode = 'margin'; }\n if (typeof window === 'undefined') {\n return zeroGap;\n }\n var offsets = getOffset(gapMode);\n var documentWidth = document.documentElement.clientWidth;\n var windowWidth = window.innerWidth;\n return {\n left: offsets[0],\n top: offsets[1],\n right: offsets[2],\n gap: Math.max(0, windowWidth - documentWidth + offsets[2] - offsets[0]),\n };\n};\n","import * as React from 'react';\nimport { styleSingleton } from 'react-style-singleton';\nimport { fullWidthClassName, zeroRightClassName, noScrollbarsClassName, removedBarSizeVariable } from './constants';\nimport { getGapWidth } from './utils';\nvar Style = styleSingleton();\nexport var lockAttribute = 'data-scroll-locked';\n// important tip - once we measure scrollBar width and remove them\n// we could not repeat this operation\n// thus we are using style-singleton - only the first \"yet correct\" style will be applied.\nvar getStyles = function (_a, allowRelative, gapMode, important) {\n var left = _a.left, top = _a.top, right = _a.right, gap = _a.gap;\n if (gapMode === void 0) { gapMode = 'margin'; }\n return \"\\n .\".concat(noScrollbarsClassName, \" {\\n overflow: hidden \").concat(important, \";\\n padding-right: \").concat(gap, \"px \").concat(important, \";\\n }\\n body[\").concat(lockAttribute, \"] {\\n overflow: hidden \").concat(important, \";\\n overscroll-behavior: contain;\\n \").concat([\n allowRelative && \"position: relative \".concat(important, \";\"),\n gapMode === 'margin' &&\n \"\\n padding-left: \".concat(left, \"px;\\n padding-top: \").concat(top, \"px;\\n padding-right: \").concat(right, \"px;\\n margin-left:0;\\n margin-top:0;\\n margin-right: \").concat(gap, \"px \").concat(important, \";\\n \"),\n gapMode === 'padding' && \"padding-right: \".concat(gap, \"px \").concat(important, \";\"),\n ]\n .filter(Boolean)\n .join(''), \"\\n }\\n \\n .\").concat(zeroRightClassName, \" {\\n right: \").concat(gap, \"px \").concat(important, \";\\n }\\n \\n .\").concat(fullWidthClassName, \" {\\n margin-right: \").concat(gap, \"px \").concat(important, \";\\n }\\n \\n .\").concat(zeroRightClassName, \" .\").concat(zeroRightClassName, \" {\\n right: 0 \").concat(important, \";\\n }\\n \\n .\").concat(fullWidthClassName, \" .\").concat(fullWidthClassName, \" {\\n margin-right: 0 \").concat(important, \";\\n }\\n \\n body[\").concat(lockAttribute, \"] {\\n \").concat(removedBarSizeVariable, \": \").concat(gap, \"px;\\n }\\n\");\n};\nvar getCurrentUseCounter = function () {\n var counter = parseInt(document.body.getAttribute(lockAttribute) || '0', 10);\n return isFinite(counter) ? counter : 0;\n};\nexport var useLockAttribute = function () {\n React.useEffect(function () {\n document.body.setAttribute(lockAttribute, (getCurrentUseCounter() + 1).toString());\n return function () {\n var newCounter = getCurrentUseCounter() - 1;\n if (newCounter <= 0) {\n document.body.removeAttribute(lockAttribute);\n }\n else {\n document.body.setAttribute(lockAttribute, newCounter.toString());\n }\n };\n }, []);\n};\n/**\n * Removes page scrollbar and blocks page scroll when mounted\n */\nexport var RemoveScrollBar = function (_a) {\n var noRelative = _a.noRelative, noImportant = _a.noImportant, _b = _a.gapMode, gapMode = _b === void 0 ? 'margin' : _b;\n useLockAttribute();\n /*\n gap will be measured on every component mount\n however it will be used only by the \"first\" invocation\n due to singleton nature of <Style\n */\n var gap = React.useMemo(function () { return getGapWidth(gapMode); }, [gapMode]);\n return React.createElement(Style, { styles: getStyles(gap, !noRelative, gapMode, !noImportant ? '!important' : '') });\n};\n","var passiveSupported = false;\nif (typeof window !== 'undefined') {\n try {\n var options = Object.defineProperty({}, 'passive', {\n get: function () {\n passiveSupported = true;\n return true;\n },\n });\n // @ts-ignore\n window.addEventListener('test', options, options);\n // @ts-ignore\n window.removeEventListener('test', options, options);\n }\n catch (err) {\n passiveSupported = false;\n }\n}\nexport var nonPassive = passiveSupported ? { passive: false } : false;\n","var alwaysContainsScroll = function (node) {\n // textarea will always _contain_ scroll inside self. It only can be hidden\n return node.tagName === 'TEXTAREA';\n};\nvar elementCanBeScrolled = function (node, overflow) {\n var styles = window.getComputedStyle(node);\n return (\n // not-not-scrollable\n styles[overflow] !== 'hidden' &&\n // contains scroll inside self\n !(styles.overflowY === styles.overflowX && !alwaysContainsScroll(node) && styles[overflow] === 'visible'));\n};\nvar elementCouldBeVScrolled = function (node) { return elementCanBeScrolled(node, 'overflowY'); };\nvar elementCouldBeHScrolled = function (node) { return elementCanBeScrolled(node, 'overflowX'); };\nexport var locationCouldBeScrolled = function (axis, node) {\n var ownerDocument = node.ownerDocument;\n var current = node;\n do {\n // Skip over shadow root\n if (typeof ShadowRoot !== 'undefined' && current instanceof ShadowRoot) {\n current = current.host;\n }\n var isScrollable = elementCouldBeScrolled(axis, current);\n if (isScrollable) {\n var _a = getScrollVariables(axis, current), s = _a[1], d = _a[2];\n if (s > d) {\n return true;\n }\n }\n current = current.parentNode;\n } while (current && current !== ownerDocument.body);\n return false;\n};\nvar getVScrollVariables = function (_a) {\n var scrollTop = _a.scrollTop, scrollHeight = _a.scrollHeight, clientHeight = _a.clientHeight;\n return [\n scrollTop,\n scrollHeight,\n clientHeight,\n ];\n};\nvar getHScrollVariables = function (_a) {\n var scrollLeft = _a.scrollLeft, scrollWidth = _a.scrollWidth, clientWidth = _a.clientWidth;\n return [\n scrollLeft,\n scrollWidth,\n clientWidth,\n ];\n};\nvar elementCouldBeScrolled = function (axis, node) {\n return axis === 'v' ? elementCouldBeVScrolled(node) : elementCouldBeHScrolled(node);\n};\nvar getScrollVariables = function (axis, node) {\n return axis === 'v' ? getVScrollVariables(node) : getHScrollVariables(node);\n};\nvar getDirectionFactor = function (axis, direction) {\n /**\n * If the element's direction is rtl (right-to-left), then scrollLeft is 0 when the scrollbar is at its rightmost position,\n * and then increasingly negative as you scroll towards the end of the content.\n * @see https://developer.mozilla.org/en-US/docs/Web/API/Element/scrollLeft\n */\n return axis === 'h' && direction === 'rtl' ? -1 : 1;\n};\nexport var handleScroll = function (axis, endTarget, event, sourceDelta, noOverscroll) {\n var directionFactor = getDirectionFactor(axis, window.getComputedStyle(endTarget).direction);\n var delta = directionFactor * sourceDelta;\n // find scrollable target\n var target = event.target;\n var targetInLock = endTarget.contains(target);\n var shouldCancelScroll = false;\n var isDeltaPositive = delta > 0;\n var availableScroll = 0;\n var availableScrollTop = 0;\n do {\n var _a = getScrollVariables(axis, target), position = _a[0], scroll_1 = _a[1], capacity = _a[2];\n var elementScroll = scroll_1 - capacity - directionFactor * position;\n if (position || elementScroll) {\n if (elementCouldBeScrolled(axis, target)) {\n availableScroll += elementScroll;\n availableScrollTop += position;\n }\n }\n if (target instanceof ShadowRoot) {\n target = target.host;\n }\n else {\n target = target.parentNode;\n }\n } while (\n // portaled content\n (!targetInLock && target !== document.body) ||\n // self content\n (targetInLock && (endTarget.contains(target) || endTarget === target)));\n // handle epsilon around 0 (non standard zoom levels)\n if (isDeltaPositive &&\n ((noOverscroll && Math.abs(availableScroll) < 1) || (!noOverscroll && delta > availableScroll))) {\n shouldCancelScroll = true;\n }\n else if (!isDeltaPositive &&\n ((noOverscroll && Math.abs(availableScrollTop) < 1) || (!noOverscroll && -delta > availableScrollTop))) {\n shouldCancelScroll = true;\n }\n return shouldCancelScroll;\n};\n","import { __spreadArray } from \"tslib\";\nimport * as React from 'react';\nimport { RemoveScrollBar } from 'react-remove-scroll-bar';\nimport { styleSingleton } from 'react-style-singleton';\nimport { nonPassive } from './aggresiveCapture';\nimport { handleScroll, locationCouldBeScrolled } from './handleScroll';\nexport var getTouchXY = function (event) {\n return 'changedTouches' in event ? [event.changedTouches[0].clientX, event.changedTouches[0].clientY] : [0, 0];\n};\nexport var getDeltaXY = function (event) { return [event.deltaX, event.deltaY]; };\nvar extractRef = function (ref) {\n return ref && 'current' in ref ? ref.current : ref;\n};\nvar deltaCompare = function (x, y) { return x[0] === y[0] && x[1] === y[1]; };\nvar generateStyle = function (id) { return \"\\n .block-interactivity-\".concat(id, \" {pointer-events: none;}\\n .allow-interactivity-\").concat(id, \" {pointer-events: all;}\\n\"); };\nvar idCounter = 0;\nvar lockStack = [];\nexport function RemoveScrollSideCar(props) {\n var shouldPreventQueue = React.useRef([]);\n var touchStartRef = React.useRef([0, 0]);\n var activeAxis = React.useRef();\n var id = React.useState(idCounter++)[0];\n var Style = React.useState(styleSingleton)[0];\n var lastProps = React.useRef(props);\n React.useEffect(function () {\n lastProps.current = props;\n }, [props]);\n React.useEffect(function () {\n if (props.inert) {\n document.body.classList.add(\"block-interactivity-\".concat(id));\n var allow_1 = __spreadArray([props.lockRef.current], (props.shards || []).map(extractRef), true).filter(Boolean);\n allow_1.forEach(function (el) { return el.classList.add(\"allow-interactivity-\".concat(id)); });\n return function () {\n document.body.classList.remove(\"block-interactivity-\".concat(id));\n allow_1.forEach(function (el) { return el.classList.remove(\"allow-interactivity-\".concat(id)); });\n };\n }\n return;\n }, [props.inert, props.lockRef.current, props.shards]);\n var shouldCancelEvent = React.useCallback(function (event, parent) {\n if ('touches' in event && event.touches.length === 2) {\n return !lastProps.current.allowPinchZoom;\n }\n var touch = getTouchXY(event);\n var touchStart = touchStartRef.current;\n var deltaX = 'deltaX' in event ? event.deltaX : touchStart[0] - touch[0];\n var deltaY = 'deltaY' in event ? event.deltaY : touchStart[1] - touch[1];\n var currentAxis;\n var target = event.target;\n var moveDirection = Math.abs(deltaX) > Math.abs(deltaY) ? 'h' : 'v';\n // allow horizontal touch move on Range inputs. They will not cause any scroll\n if ('touches' in event && moveDirection === 'h' && target.type === 'range') {\n return false;\n }\n var canBeScrolledInMainDirection = locationCouldBeScrolled(moveDirection, target);\n if (!canBeScrolledInMainDirection) {\n return true;\n }\n if (canBeScrolledInMainDirection) {\n currentAxis = moveDirection;\n }\n else {\n currentAxis = moveDirection === 'v' ? 'h' : 'v';\n canBeScrolledInMainDirection = locationCouldBeScrolled(moveDirection, target);\n // other axis might be not scrollable\n }\n if (!canBeScrolledInMainDirection) {\n return false;\n }\n if (!activeAxis.current && 'changedTouches' in event && (deltaX || deltaY)) {\n activeAxis.current = currentAxis;\n }\n if (!currentAxis) {\n return true;\n }\n var cancelingAxis = activeAxis.current || currentAxis;\n return handleScroll(cancelingAxis, parent, event, cancelingAxis === 'h' ? deltaX : deltaY, true);\n }, []);\n var shouldPrevent = React.useCallback(function (_event) {\n var event = _event;\n if (!lockStack.length || lockStack[lockStack.length - 1] !== Style) {\n // not the last active\n return;\n }\n var delta = 'deltaY' in event ? getDeltaXY(event) : getTouchXY(event);\n var sourceEvent = shouldPreventQueue.current.filter(function (e) { return e.name === event.type && (e.target === event.target || event.target === e.shadowParent) && deltaCompare(e.delta, delta); })[0];\n // self event, and should be canceled\n if (sourceEvent && sourceEvent.should) {\n if (event.cancelable) {\n event.preventDefault();\n }\n return;\n }\n // outside or shard event\n if (!sourceEvent) {\n var shardNodes = (lastProps.current.shards || [])\n .map(extractRef)\n .filter(Boolean)\n .filter(function (node) { return node.contains(event.target); });\n var shouldStop = shardNodes.length > 0 ? shouldCancelEvent(event, shardNodes[0]) : !lastProps.current.noIsolation;\n if (shouldStop) {\n if (event.cancelable) {\n event.preventDefault();\n }\n }\n }\n }, []);\n var shouldCancel = React.useCallback(function (name, delta, target, should) {\n var event = { name: name, delta: delta, target: target, should: should, shadowParent: getOutermostShadowParent(target) };\n shouldPreventQueue.current.push(event);\n setTimeout(function () {\n shouldPreventQueue.current = shouldPreventQueue.current.filter(function (e) { return e !== event; });\n }, 1);\n }, []);\n var scrollTouchStart = React.useCallback(function (event) {\n touchStartRef.current = getTouchXY(event);\n activeAxis.current = undefined;\n }, []);\n var scrollWheel = React.useCallback(function (event) {\n shouldCancel(event.type, getDeltaXY(event), event.target, shouldCancelEvent(event, props.lockRef.current));\n }, []);\n var scrollTouchMove = React.useCallback(function (event) {\n shouldCancel(event.type, getTouchXY(event), event.target, shouldCancelEvent(event, props.lockRef.current));\n }, []);\n React.useEffect(function () {\n lockStack.push(Style);\n props.setCallbacks({\n onScrollCapture: scrollWheel,\n onWheelCapture: scrollWheel,\n onTouchMoveCapture: scrollTouchMove,\n });\n document.addEventListener('wheel', shouldPrevent, nonPassive);\n document.addEventListener('touchmove', shouldPrevent, nonPassive);\n document.addEventListener('touchstart', scrollTouchStart, nonPassive);\n return function () {\n lockStack = lockStack.filter(function (inst) { return inst !== Style; });\n document.removeEventListener('wheel', shouldPrevent, nonPassive);\n document.removeEventListener('touchmove', shouldPrevent, nonPassive);\n document.removeEventListener('touchstart', scrollTouchStart, nonPassive);\n };\n }, []);\n var removeScrollBar = props.removeScrollBar, inert = props.inert;\n return (React.createElement(React.Fragment, null,\n inert ? React.createElement(Style, { styles: generateStyle(id) }) : null,\n removeScrollBar ? React.createElement(RemoveScrollBar, { gapMode: props.gapMode }) : null));\n}\nfunction getOutermostShadowParent(node) {\n var shadowParent = null;\n while (node !== null) {\n if (node instanceof ShadowRoot) {\n shadowParent = node.host;\n node = node.host;\n }\n node = node.parentNode;\n }\n return shadowParent;\n}\n","import { exportSidecar } from 'use-sidecar';\nimport { RemoveScrollSideCar } from './SideEffect';\nimport { effectCar } from './medium';\nexport default exportSidecar(effectCar, RemoveScrollSideCar);\n","var getDefaultParent = function (originalTarget) {\n if (typeof document === 'undefined') {\n return null;\n }\n var sampleTarget = Array.isArray(originalTarget) ? originalTarget[0] : originalTarget;\n return sampleTarget.ownerDocument.body;\n};\nvar counterMap = new WeakMap();\nvar uncontrolledNodes = new WeakMap();\nvar markerMap = {};\nvar lockCount = 0;\nvar unwrapHost = function (node) {\n return node && (node.host || unwrapHost(node.parentNode));\n};\nvar correctTargets = function (parent, targets) {\n return targets\n .map(function (target) {\n if (parent.contains(target)) {\n return target;\n }\n var correctedTarget = unwrapHost(target);\n if (correctedTarget && parent.contains(correctedTarget)) {\n return correctedTarget;\n }\n console.error('aria-hidden', target, 'in not contained inside', parent, '. Doing nothing');\n return null;\n })\n .filter(function (x) { return Boolean(x); });\n};\n/**\n * Marks everything except given node(or nodes) as aria-hidden\n * @param {Element | Element[]} originalTarget - elements to keep on the page\n * @param [parentNode] - top element, defaults to document.body\n * @param {String} [markerName] - a special attribute to mark every node\n * @param {String} [controlAttribute] - html Attribute to control\n * @return {Undo} undo command\n */\nvar applyAttributeToOthers = function (originalTarget, parentNode, markerName, controlAttribute) {\n var targets = correctTargets(parentNode, Array.isArray(originalTarget) ? originalTarget : [originalTarget]);\n if (!markerMap[markerName]) {\n markerMap[markerName] = new WeakMap();\n }\n var markerCounter = markerMap[markerName];\n var hiddenNodes = [];\n var elementsToKeep = new Set();\n var elementsToStop = new Set(targets);\n var keep = function (el) {\n if (!el || elementsToKeep.has(el)) {\n return;\n }\n elementsToKeep.add(el);\n keep(el.parentNode);\n };\n targets.forEach(keep);\n var deep = function (parent) {\n if (!parent || elementsToStop.has(parent)) {\n return;\n }\n Array.prototype.forEach.call(parent.children, function (node) {\n if (elementsToKeep.has(node)) {\n deep(node);\n }\n else {\n var attr = node.getAttribute(controlAttribute);\n var alreadyHidden = attr !== null && attr !== 'false';\n var counterValue = (counterMap.get(node) || 0) + 1;\n var markerValue = (markerCounter.get(node) || 0) + 1;\n counterMap.set(node, counterValue);\n markerCounter.set(node, markerValue);\n hiddenNodes.push(node);\n if (counterValue === 1 && alreadyHidden) {\n uncontrolledNodes.set(node, true);\n }\n if (markerValue === 1) {\n node.setAttribute(markerName, 'true');\n }\n if (!alreadyHidden) {\n node.setAttribute(controlAttribute, 'true');\n }\n }\n });\n };\n deep(parentNode);\n elementsToKeep.clear();\n lockCount++;\n return function () {\n hiddenNodes.forEach(function (node) {\n var counterValue = counterMap.get(node) - 1;\n var markerValue = markerCounter.get(node) - 1;\n counterMap.set(node, counterValue);\n markerCounter.set(node, markerValue);\n if (!counterValue) {\n if (!uncontrolledNodes.has(node)) {\n node.removeAttribute(controlAttribute);\n }\n uncontrolledNodes.delete(node);\n }\n if (!markerValue) {\n node.removeAttribute(markerName);\n }\n });\n lockCount--;\n if (!lockCount) {\n // clear\n counterMap = new WeakMap();\n counterMap = new WeakMap();\n uncontrolledNodes = new WeakMap();\n markerMap = {};\n }\n };\n};\n/**\n * Marks everything except given node(or nodes) as aria-hidden\n * @param {Element | Element[]} originalTarget - elements to keep on the page\n * @param [parentNode] - top element, defaults to document.body\n * @param {String} [markerName] - a special attribute to mark every node\n * @return {Undo} undo command\n */\nexport var hideOthers = function (originalTarget, parentNode, markerName) {\n if (markerName === void 0) { markerName = 'data-aria-hidden'; }\n var targets = Array.from(Array.isArray(originalTarget) ? originalTarget : [originalTarget]);\n var activeParentNode = parentNode || getDefaultParent(originalTarget);\n if (!activeParentNode) {\n return function () { return null; };\n }\n // we should not hide ariaLive elements - https://github.com/theKashey/aria-hidden/issues/10\n targets.push.apply(targets, Array.from(activeParentNode.querySelectorAll('[aria-live]')));\n return applyAttributeToOthers(targets, activeParentNode, markerName, 'aria-hidden');\n};\n/**\n * Marks everything except given node(or nodes) as inert\n * @param {Element | Element[]} originalTarget - elements to keep on the page\n * @param [parentNode] - top element, defaults to document.body\n * @param {String} [markerName] - a special attribute to mark every node\n * @return {Undo} undo command\n */\nexport var inertOthers = function (originalTarget, parentNode, markerName) {\n if (markerName === void 0) { markerName = 'data-inert-ed'; }\n var activeParentNode = parentNode || getDefaultParent(originalTarget);\n if (!activeParentNode) {\n return function () { return null; };\n }\n return applyAttributeToOthers(originalTarget, activeParentNode, markerName, 'inert');\n};\n/**\n * @returns if current browser supports inert\n */\nexport var supportsInert = function () {\n return typeof HTMLElement !== 'undefined' && HTMLElement.prototype.hasOwnProperty('inert');\n};\n/**\n * Automatic function to \"suppress\" DOM elements - _hide_ or _inert_ in the best possible way\n * @param {Element | Element[]} originalTarget - elements to keep on the page\n * @param [parentNode] - top element, defaults to document.body\n * @param {String} [markerName] - a special attribute to mark every node\n * @return {Undo} undo command\n */\nexport var suppressOthers = function (originalTarget, parentNode, markerName) {\n if (markerName === void 0) { markerName = 'data-suppressed'; }\n return (supportsInert() ? inertOthers : hideOthers)(originalTarget, parentNode, markerName);\n};\n","import * as React from 'react';\nimport { styleSingleton } from 'react-style-singleton';\nimport { focusHiddenMarker } from './medium';\nvar Style = styleSingleton();\nvar styles = \"\\n [\" + focusHiddenMarker + \"] {\\n pointer-events: none !important;\\n }\\n\";\nexport var InteractivityDisabler = function () { return React.createElement(Style, { styles: styles }); };\n","import { __spreadArrays } from \"tslib\";\nimport * as React from 'react';\nimport { hideOthers } from 'aria-hidden';\nimport { InteractivityDisabler } from './InteractivityDisabler';\nimport { focusHiddenMarker } from './medium';\nimport { useEffect, useRef, useState } from 'react';\nvar extractRef = function (ref) {\n return 'current' in ref ? ref.current : ref;\n};\nexport function Effect(_a) {\n var setLockProps = _a.setLockProps, onEscapeKey = _a.onEscapeKey, onClickOutside = _a.onClickOutside, shards = _a.shards, onActivation = _a.onActivation, onDeactivation = _a.onDeactivation, noIsolation = _a.noIsolation;\n var _b = useState(undefined), activeNode = _b[0], setActiveNode = _b[1];\n var lastEventTarget = useRef(null);\n var mouseTouches = useRef(0);\n React.useEffect(function () {\n var onKeyDown = function (event) {\n if (!event.defaultPrevented) {\n if ((event.code === 'Escape' ||\n event.key === 'Escape' ||\n event.keyCode === 27) &&\n onEscapeKey) {\n onEscapeKey(event);\n }\n }\n };\n var onMouseDown = function (event) {\n if (event.defaultPrevented ||\n event.target === lastEventTarget.current ||\n (event instanceof MouseEvent && event.button !== 0)) {\n return;\n }\n if (shards &&\n shards\n .map(extractRef)\n .some(function (node) {\n return (node && node.contains(event.target)) ||\n node === event.target;\n })) {\n return;\n }\n if (onClickOutside) {\n onClickOutside(event);\n }\n };\n var onTouchStart = function (event) {\n onMouseDown(event);\n mouseTouches.current = event.touches.length;\n };\n var onTouchEnd = function (event) {\n mouseTouches.current = event.touches.length;\n };\n if (activeNode) {\n document.addEventListener('keydown', onKeyDown);\n document.addEventListener('mousedown', onMouseDown);\n document.addEventListener('touchstart', onTouchStart);\n document.addEventListener('touchend', onTouchEnd);\n return function () {\n document.removeEventListener('keydown', onKeyDown);\n document.removeEventListener('mousedown', onMouseDown);\n document.removeEventListener('touchstart', onTouchStart);\n document.removeEventListener('touchend', onTouchEnd);\n };\n }\n }, [activeNode, onClickOutside, onEscapeKey]);\n useEffect(function () {\n if (activeNode) {\n if (onActivation) {\n onActivation(activeNode);\n }\n return function () {\n if (onDeactivation) {\n onDeactivation();\n }\n };\n }\n }, [!!activeNode]);\n useEffect(function () {\n var _undo = function () { return null; };\n var unmounted = false;\n var onNodeActivation = function (node) {\n if (!noIsolation) {\n _undo = hideOthers(__spreadArrays([node], (shards || []).map(extractRef)), document.body, focusHiddenMarker);\n }\n setActiveNode(function () { return node; });\n };\n var onNodeDeactivation = function () {\n _undo();\n if (!unmounted) {\n setActiveNode(null);\n }\n };\n setLockProps({\n onMouseDown: function (e) {\n lastEventTarget.current = e.target;\n },\n onTouchStart: function (e) {\n lastEventTarget.current = e.target;\n },\n onActivation: onNodeActivation,\n onDeactivation: onNodeDeactivation\n });\n return function () {\n unmounted = true;\n setLockProps(false);\n };\n }, []);\n return React.createElement(InteractivityDisabler, null);\n}\n","import { exportSidecar } from 'use-sidecar';\nimport 'react-focus-lock/sidecar';\nimport 'react-remove-scroll/sidecar';\nimport { Effect } from './Effect';\nimport { effectCar } from './medium';\nexport default exportSidecar(effectCar, Effect);\n","import { __assign } from \"tslib\";\nimport * as React from 'react';\nimport { FocusOn as ReactFocusOn } from './UI';\nimport SideCar from './sidecar';\nvar RequireSideCar = function (props) {\n return React.createElement(SideCar, __assign({}, props));\n};\nexport var FocusOn = React.forwardRef(function (props, ref) { return React.createElement(ReactFocusOn, __assign({}, props, { ref: ref, sideCar: RequireSideCar })); });\n","export default {\n disabled: false\n};","import PropTypes from 'prop-types';\nexport var timeoutsShape = process.env.NODE_ENV !== 'production' ? PropTypes.oneOfType([PropTypes.number, PropTypes.shape({\n enter: PropTypes.number,\n exit: PropTypes.number,\n appear: PropTypes.number\n}).isRequired]) : null;\nexport var classNamesShape = process.env.NODE_ENV !== 'production' ? PropTypes.oneOfType([PropTypes.string, PropTypes.shape({\n enter: PropTypes.string,\n exit: PropTypes.string,\n active: PropTypes.string\n}), PropTypes.shape({\n enter: PropTypes.string,\n enterDone: PropTypes.string,\n enterActive: PropTypes.string,\n exit: PropTypes.string,\n exitDone: PropTypes.string,\n exitActive: PropTypes.string\n})]) : null;","import React from 'react';\nexport default React.createContext(null);","import _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nimport _inheritsLoose from \"@babel/runtime/helpers/esm/inheritsLoose\";\nimport PropTypes from 'prop-types';\nimport React from 'react';\nimport ReactDOM from 'react-dom';\nimport config from './config';\nimport { timeoutsShape } from './utils/PropTypes';\nimport TransitionGroupContext from './TransitionGroupContext';\nimport { forceReflow } from './utils/reflow';\nexport var UNMOUNTED = 'unmounted';\nexport var EXITED = 'exited';\nexport var ENTERING = 'entering';\nexport var ENTERED = 'entered';\nexport var EXITING = 'exiting';\n/**\n * The Transition component lets you describe a transition from one component\n * state to another _over time_ with a simple declarative API. Most commonly\n * it's used to animate the mounting and unmounting of a component, but can also\n * be used to describe in-place transition states as well.\n *\n * ---\n *\n * **Note**: `Transition` is a platform-agnostic base component. If you're using\n * transitions in CSS, you'll probably want to use\n * [`CSSTransition`](https://reactcommunity.org/react-transition-group/css-transition)\n * instead. It inherits all the features of `Transition`, but contains\n * additional features necessary to play nice with CSS transitions (hence the\n * name of the component).\n *\n * ---\n *\n * By default the `Transition` component does not alter the behavior of the\n * component it renders, it only tracks \"enter\" and \"exit\" states for the\n * components. It's up to you to give meaning and effect to those states. For\n * example we can add styles to a component when it enters or exits:\n *\n * ```jsx\n * import { Transition } from 'react-transition-group';\n *\n * const duration = 300;\n *\n * const defaultStyle = {\n * transition: `opacity ${duration}ms ease-in-out`,\n * opacity: 0,\n * }\n *\n * const transitionStyles = {\n * entering: { opacity: 1 },\n * entered: { opacity: 1 },\n * exiting: { opacity: 0 },\n * exited: { opacity: 0 },\n * };\n *\n * const Fade = ({ in: inProp }) => (\n * <Transition in={inProp} timeout={duration}>\n * {state => (\n * <div style={{\n * ...defaultStyle,\n * ...transitionStyles[state]\n * }}>\n * I'm a fade Transition!\n * </div>\n * )}\n * </Transition>\n * );\n * ```\n *\n * There are 4 main states a Transition can be in:\n * - `'entering'`\n * - `'entered'`\n * - `'exiting'`\n * - `'exited'`\n *\n * Transition state is toggled via the `in` prop. When `true` the component\n * begins the \"Enter\" stage. During this stage, the component will shift from\n * its current transition state, to `'entering'` for the duration of the\n * transition and then to the `'entered'` stage once it's complete. Let's take\n * the following example (we'll use the\n * [useState](https://reactjs.org/docs/hooks-reference.html#usestate) hook):\n *\n * ```jsx\n * function App() {\n * const [inProp, setInProp] = useState(false);\n * return (\n * <div>\n * <Transition in={inProp} timeout={500}>\n * {state => (\n * // ...\n * )}\n * </Transition>\n * <button onClick={() => setInProp(true)}>\n * Click to Enter\n * </button>\n * </div>\n * );\n * }\n * ```\n *\n * When the button is clicked the component will shift to the `'entering'` state\n * and stay there for 500ms (the value of `timeout`) before it finally switches\n * to `'entered'`.\n *\n * When `in` is `false` the same thing happens except the state moves from\n * `'exiting'` to `'exited'`.\n */\n\nvar Transition = /*#__PURE__*/function (_React$Component) {\n _inheritsLoose(Transition, _React$Component);\n\n function Transition(props, context) {\n var _this;\n\n _this = _React$Component.call(this, props, context) || this;\n var parentGroup = context; // In the context of a TransitionGroup all enters are really appears\n\n var appear = parentGroup && !parentGroup.isMounting ? props.enter : props.appear;\n var initialStatus;\n _this.appearStatus = null;\n\n if (props.in) {\n if (appear) {\n initialStatus = EXITED;\n _this.appearStatus = ENTERING;\n } else {\n initialStatus = ENTERED;\n }\n } else {\n if (props.unmountOnExit || props.mountOnEnter) {\n initialStatus = UNMOUNTED;\n } else {\n initialStatus = EXITED;\n }\n }\n\n _this.state = {\n status: initialStatus\n };\n _this.nextCallback = null;\n return _this;\n }\n\n Transition.getDerivedStateFromProps = function getDerivedStateFromProps(_ref, prevState) {\n var nextIn = _ref.in;\n\n if (nextIn && prevState.status === UNMOUNTED) {\n return {\n status: EXITED\n };\n }\n\n return null;\n } // getSnapshotBeforeUpdate(prevProps) {\n // let nextStatus = null\n // if (prevProps !== this.props) {\n // const { status } = this.state\n // if (this.props.in) {\n // if (status !== ENTERING && status !== ENTERED) {\n // nextStatus = ENTERING\n // }\n // } else {\n // if (status === ENTERING || status === ENTERED) {\n // nextStatus = EXITING\n // }\n // }\n // }\n // return { nextStatus }\n // }\n ;\n\n var _proto = Transition.prototype;\n\n _proto.componentDidMount = function componentDidMount() {\n this.updateStatus(true, this.appearStatus);\n };\n\n _proto.componentDidUpdate = function componentDidUpdate(prevProps) {\n var nextStatus = null;\n\n if (prevProps !== this.props) {\n var status = this.state.status;\n\n if (this.props.in) {\n if (status !== ENTERING && status !== ENTERED) {\n nextStatus = ENTERING;\n }\n } else {\n if (status === ENTERING || status === ENTERED) {\n nextStatus = EXITING;\n }\n }\n }\n\n this.updateStatus(false, nextStatus);\n };\n\n _proto.componentWillUnmount = function componentWillUnmount() {\n this.cancelNextCallback();\n };\n\n _proto.getTimeouts = function getTimeouts() {\n var timeout = this.props.timeout;\n var exit, enter, appear;\n exit = enter = appear = timeout;\n\n if (timeout != null && typeof timeout !== 'number') {\n exit = timeout.exit;\n enter = timeout.enter; // TODO: remove fallback for next major\n\n appear = timeout.appear !== undefined ? timeout.appear : enter;\n }\n\n return {\n exit: exit,\n enter: enter,\n appear: appear\n };\n };\n\n _proto.updateStatus = function updateStatus(mounting, nextStatus) {\n if (mounting === void 0) {\n mounting = false;\n }\n\n if (nextStatus !== null) {\n // nextStatus will always be ENTERING or EXITING.\n this.cancelNextCallback();\n\n if (nextStatus === ENTERING) {\n if (this.props.unmountOnExit || this.props.mountOnEnter) {\n var node = this.props.nodeRef ? this.props.nodeRef.current : ReactDOM.findDOMNode(this); // https://github.com/reactjs/react-transition-group/pull/749\n // With unmountOnExit or mountOnEnter, the enter animation should happen at the transition between `exited` and `entering`.\n // To make the animation happen, we have to separate each rendering and avoid being processed as batched.\n\n if (node) forceReflow(node);\n }\n\n this.performEnter(mounting);\n } else {\n this.performExit();\n }\n } else if (this.props.unmountOnExit && this.state.status === EXITED) {\n this.setState({\n status: UNMOUNTED\n });\n }\n };\n\n _proto.performEnter = function performEnter(mounting) {\n var _this2 = this;\n\n var enter = this.props.enter;\n var appearing = this.context ? this.context.isMounting : mounting;\n\n var _ref2 = this.props.nodeRef ? [appearing] : [ReactDOM.findDOMNode(this), appearing],\n maybeNode = _ref2[0],\n maybeAppearing = _ref2[1];\n\n var timeouts = this.getTimeouts();\n var enterTimeout = appearing ? timeouts.appear : timeouts.enter; // no enter animation skip right to ENTERED\n // if we are mounting and running this it means appear _must_ be set\n\n if (!mounting && !enter || config.disabled) {\n this.safeSetState({\n status: ENTERED\n }, function () {\n _this2.props.onEntered(maybeNode);\n });\n return;\n }\n\n this.props.onEnter(maybeNode, maybeAppearing);\n this.safeSetState({\n status: ENTERING\n }, function () {\n _this2.props.onEntering(maybeNode, maybeAppearing);\n\n _this2.onTransitionEnd(enterTimeout, function () {\n _this2.safeSetState({\n status: ENTERED\n }, function () {\n _this2.props.onEntered(maybeNode, maybeAppearing);\n });\n });\n });\n };\n\n _proto.performExit = function performExit() {\n var _this3 = this;\n\n var exit = this.props.exit;\n var timeouts = this.getTimeouts();\n var maybeNode = this.props.nodeRef ? undefined : ReactDOM.findDOMNode(this); // no exit animation skip right to EXITED\n\n if (!exit || config.disabled) {\n this.safeSetState({\n status: EXITED\n }, function () {\n _this3.props.onExited(maybeNode);\n });\n return;\n }\n\n this.props.onExit(maybeNode);\n this.safeSetState({\n status: EXITING\n }, function () {\n _this3.props.onExiting(maybeNode);\n\n _this3.onTransitionEnd(timeouts.exit, function () {\n _this3.safeSetState({\n status: EXITED\n }, function () {\n _this3.props.onExited(maybeNode);\n });\n });\n });\n };\n\n _proto.cancelNextCallback = function cancelNextCallback() {\n if (this.nextCallback !== null) {\n this.nextCallback.cancel();\n this.nextCallback = null;\n }\n };\n\n _proto.safeSetState = function safeSetState(nextState, callback) {\n // This shouldn't be necessary, but there are weird race conditions with\n // setState callbacks and unmounting in testing, so always make sure that\n // we can cancel any pending setState callbacks after we unmount.\n callback = this.setNextCallback(callback);\n this.setState(nextState, callback);\n };\n\n _proto.setNextCallback = function setNextCallback(callback) {\n var _this4 = this;\n\n var active = true;\n\n this.nextCallback = function (event) {\n if (active) {\n active = false;\n _this4.nextCallback = null;\n callback(event);\n }\n };\n\n this.nextCallback.cancel = function () {\n active = false;\n };\n\n return this.nextCallback;\n };\n\n _proto.onTransitionEnd = function onTransitionEnd(timeout, handler) {\n this.setNextCallback(handler);\n var node = this.props.nodeRef ? this.props.nodeRef.current : ReactDOM.findDOMNode(this);\n var doesNotHaveTimeoutOrListener = timeout == null && !this.props.addEndListener;\n\n if (!node || doesNotHaveTimeoutOrListener) {\n setTimeout(this.nextCallback, 0);\n return;\n }\n\n if (this.props.addEndListener) {\n var _ref3 = this.props.nodeRef ? [this.nextCallback] : [node, this.nextCallback],\n maybeNode = _ref3[0],\n maybeNextCallback = _ref3[1];\n\n this.props.addEndListener(maybeNode, maybeNextCallback);\n }\n\n if (timeout != null) {\n setTimeout(this.nextCallback, timeout);\n }\n };\n\n _proto.render = function render() {\n var status = this.state.status;\n\n if (status === UNMOUNTED) {\n return null;\n }\n\n var _this$props = this.props,\n children = _this$props.children,\n _in = _this$props.in,\n _mountOnEnter = _this$props.mountOnEnter,\n _unmountOnExit = _this$props.unmountOnExit,\n _appear = _this$props.appear,\n _enter = _this$props.enter,\n _exit = _this$props.exit,\n _timeout = _this$props.timeout,\n _addEndListener = _this$props.addEndListener,\n _onEnter = _this$props.onEnter,\n _onEntering = _this$props.onEntering,\n _onEntered = _this$props.onEntered,\n _onExit = _this$props.onExit,\n _onExiting = _this$props.onExiting,\n _onExited = _this$props.onExited,\n _nodeRef = _this$props.nodeRef,\n childProps = _objectWithoutPropertiesLoose(_this$props, [\"children\", \"in\", \"mountOnEnter\", \"unmountOnExit\", \"appear\", \"enter\", \"exit\", \"timeout\", \"addEndListener\", \"onEnter\", \"onEntering\", \"onEntered\", \"onExit\", \"onExiting\", \"onExited\", \"nodeRef\"]);\n\n return (\n /*#__PURE__*/\n // allows for nested Transitions\n React.createElement(TransitionGroupContext.Provider, {\n value: null\n }, typeof children === 'function' ? children(status, childProps) : React.cloneElement(React.Children.only(children), childProps))\n );\n };\n\n return Transition;\n}(React.Component);\n\nTransition.contextType = TransitionGroupContext;\nTransition.propTypes = process.env.NODE_ENV !== \"production\" ? {\n /**\n * A React reference to DOM element that need to transition:\n * https://stackoverflow.com/a/51127130/4671932\n *\n * - When `nodeRef` prop is used, `node` is not passed to callback functions\n * (e.g. `onEnter`) because user already has direct access to the node.\n * - When changing `key` prop of `Transition` in a `TransitionGroup` a new\n * `nodeRef` need to be provided to `Transition` with changed `key` prop\n * (see\n * [test/CSSTransition-test.js](https://github.com/reactjs/react-transition-group/blob/13435f897b3ab71f6e19d724f145596f5910581c/test/CSSTransition-test.js#L362-L437)).\n */\n nodeRef: PropTypes.shape({\n current: typeof Element === 'undefined' ? PropTypes.any : function (propValue, key, componentName, location, propFullName, secret) {\n var value = propValue[key];\n return PropTypes.instanceOf(value && 'ownerDocument' in value ? value.ownerDocument.defaultView.Element : Element)(propValue, key, componentName, location, propFullName, secret);\n }\n }),\n\n /**\n * A `function` child can be used instead of a React element. This function is\n * called with the current transition status (`'entering'`, `'entered'`,\n * `'exiting'`, `'exited'`), which can be used to apply context\n * specific props to a component.\n *\n * ```jsx\n * <Transition in={this.state.in} timeout={150}>\n * {state => (\n * <MyComponent className={`fade fade-${state}`} />\n * )}\n * </Transition>\n * ```\n */\n children: PropTypes.oneOfType([PropTypes.func.isRequired, PropTypes.element.isRequired]).isRequired,\n\n /**\n * Show the component; triggers the enter or exit states\n */\n in: PropTypes.bool,\n\n /**\n * By default the child component is mounted immediately along with\n * the parent `Transition` component. If you want to \"lazy mount\" the component on the\n * first `in={true}` you can set `mountOnEnter`. After the first enter transition the component will stay\n * mounted, even on \"exited\", unless you also specify `unmountOnExit`.\n */\n mountOnEnter: PropTypes.bool,\n\n /**\n * By default the child component stays mounted after it reaches the `'exited'` state.\n * Set `unmountOnExit` if you'd prefer to unmount the component after it finishes exiting.\n */\n unmountOnExit: PropTypes.bool,\n\n /**\n * By default the child component does not perform the enter transition when\n * it first mounts, regardless of the value of `in`. If you want this\n * behavior, set both `appear` and `in` to `true`.\n *\n * > **Note**: there are no special appear states like `appearing`/`appeared`, this prop\n * > only adds an additional enter transition. However, in the\n * > `<CSSTransition>` component that first enter transition does result in\n * > additional `.appear-*` classes, that way you can choose to style it\n * > differently.\n */\n appear: PropTypes.bool,\n\n /**\n * Enable or disable enter transitions.\n */\n enter: PropTypes.bool,\n\n /**\n * Enable or disable exit transitions.\n */\n exit: PropTypes.bool,\n\n /**\n * The duration of the transition, in milliseconds.\n * Required unless `addEndListener` is provided.\n *\n * You may specify a single timeout for all transitions:\n *\n * ```jsx\n * timeout={500}\n * ```\n *\n * or individually:\n *\n * ```jsx\n * timeout={{\n * appear: 500,\n * enter: 300,\n * exit: 500,\n * }}\n * ```\n *\n * - `appear` defaults to the value of `enter`\n * - `enter` defaults to `0`\n * - `exit` defaults to `0`\n *\n * @type {number | { enter?: number, exit?: number, appear?: number }}\n */\n timeout: function timeout(props) {\n var pt = timeoutsShape;\n if (!props.addEndListener) pt = pt.isRequired;\n\n for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n args[_key - 1] = arguments[_key];\n }\n\n return pt.apply(void 0, [props].concat(args));\n },\n\n /**\n * Add a custom transition end trigger. Called with the transitioning\n * DOM node and a `done` callback. Allows for more fine grained transition end\n * logic. Timeouts are still used as a fallback if provided.\n *\n * **Note**: when `nodeRef` prop is passed, `node` is not passed.\n *\n * ```jsx\n * addEndListener={(node, done) => {\n * // use the css transitionend event to mark the finish of a transition\n * node.addEventListener('transitionend', done, false);\n * }}\n * ```\n */\n addEndListener: PropTypes.func,\n\n /**\n * Callback fired before the \"entering\" status is applied. An extra parameter\n * `isAppearing` is supplied to indicate if the enter stage is occurring on the initial mount\n *\n * **Note**: when `nodeRef` prop is passed, `node` is not passed.\n *\n * @type Function(node: HtmlElement, isAppearing: bool) -> void\n */\n onEnter: PropTypes.func,\n\n /**\n * Callback fired after the \"entering\" status is applied. An extra parameter\n * `isAppearing` is supplied to indicate if the enter stage is occurring on the initial mount\n *\n * **Note**: when `nodeRef` prop is passed, `node` is not passed.\n *\n * @type Function(node: HtmlElement, isAppearing: bool)\n */\n onEntering: PropTypes.func,\n\n /**\n * Callback fired after the \"entered\" status is applied. An extra parameter\n * `isAppearing` is supplied to indicate if the enter stage is occurring on the initial mount\n *\n * **Note**: when `nodeRef` prop is passed, `node` is not passed.\n *\n * @type Function(node: HtmlElement, isAppearing: bool) -> void\n */\n onEntered: PropTypes.func,\n\n /**\n * Callback fired before the \"exiting\" status is applied.\n *\n * **Note**: when `nodeRef` prop is passed, `node` is not passed.\n *\n * @type Function(node: HtmlElement) -> void\n */\n onExit: PropTypes.func,\n\n /**\n * Callback fired after the \"exiting\" status is applied.\n *\n * **Note**: when `nodeRef` prop is passed, `node` is not passed.\n *\n * @type Function(node: HtmlElement) -> void\n */\n onExiting: PropTypes.func,\n\n /**\n * Callback fired after the \"exited\" status is applied.\n *\n * **Note**: when `nodeRef` prop is passed, `node` is not passed\n *\n * @type Function(node: HtmlElement) -> void\n */\n onExited: PropTypes.func\n} : {}; // Name the function so it is clearer in the documentation\n\nfunction noop() {}\n\nTransition.defaultProps = {\n in: false,\n mountOnEnter: false,\n unmountOnExit: false,\n appear: false,\n enter: true,\n exit: true,\n onEnter: noop,\n onEntering: noop,\n onEntered: noop,\n onExit: noop,\n onExiting: noop,\n onExited: noop\n};\nTransition.UNMOUNTED = UNMOUNTED;\nTransition.EXITED = EXITED;\nTransition.ENTERING = ENTERING;\nTransition.ENTERED = ENTERED;\nTransition.EXITING = EXITING;\nexport default Transition;","export var forceReflow = function forceReflow(node) {\n return node.scrollTop;\n};","export default function _objectWithoutPropertiesLoose(source, excluded) {\n if (source == null) return {};\n var target = {};\n var sourceKeys = Object.keys(source);\n var key, i;\n for (i = 0; i < sourceKeys.length; i++) {\n key = sourceKeys[i];\n if (excluded.indexOf(key) >= 0) continue;\n target[key] = source[key];\n }\n return target;\n}","import React, {\n HTMLAttributes,\n ReactNode,\n useLayoutEffect,\n useRef,\n useState,\n} from \"react\";\nimport { createPortal } from \"react-dom\";\nimport { FocusOn } from \"react-focus-on\";\nimport { Transition, TransitionStatus } from \"react-transition-group\";\nimport styled from \"styled-components\";\n\nimport { InternalShadowRoundButton } from \"../InternalShadowRoundButton\";\n\nimport { OakBox, OakFlex, OakImage } from \"@/components/atoms\";\nimport { parseOpacity } from \"@/styles/helpers/parseOpacity\";\n\nexport type OakModalProps = {\n /**\n * The content of the modal.\n * Use with `<OakModalBody>` for best results.\n */\n children: ReactNode;\n /**\n * Slot for the footer of the modal.\n * Use with `<OakModalFooter>` for best results.\n */\n footerSlot?: ReactNode;\n /**\n * Indicates whether the modal is open or closed\n */\n isOpen: boolean;\n /**\n * Called when the modal is closed\n */\n onClose: () => void;\n /**\n * The DOM container to render the modal portal into.\n *\n * @default document.body\n */\n domContainer?: Element;\n} & Pick<\n HTMLAttributes<Element>,\n \"aria-label\" | \"aria-description\" | \"aria-labelledby\" | \"aria-describedby\"\n>;\n\nconst FadeOutBox = styled(OakBox)<{ $state: TransitionStatus }>`\n opacity: ${({ $state }) => {\n switch ($state) {\n case \"entered\":\n case \"entering\":\n return parseOpacity(\"semi-transparent\");\n default:\n return parseOpacity(\"transparent\");\n }\n }};\n`;\n\nconst SlideInFlex = styled(OakFlex)<{ $state: TransitionStatus }>`\n transform: ${({ $state }) => {\n switch ($state) {\n case \"entered\":\n case \"entering\":\n return \"translateX(0)\";\n default:\n return \"translateX(-100%)\";\n }\n }};\n`;\n\nconst logoSrc = `https://${process.env.NEXT_PUBLIC_OAK_ASSETS_HOST}/${process.env.NEXT_PUBLIC_OAK_ASSETS_PATH}/logo-mark.svg`;\n\n/**\n * Modal dialog with trapped focus and a close button.\n */\nexport const OakModal = ({\n children,\n footerSlot,\n domContainer = document.body,\n isOpen,\n onClose,\n ...rest\n}: OakModalProps) => {\n const [canaryElement, setCanaryElement] = useState<HTMLDivElement | null>(\n null,\n );\n const [isScrolled, setIsScrolled] = useState(false);\n const transitionRef = useRef<HTMLDivElement>(null);\n\n useLayoutEffect(() => {\n if (!canaryElement) {\n return;\n }\n const observer = new IntersectionObserver(\n (mutations) => {\n setIsScrolled(!mutations.some((mutation) => mutation.isIntersecting));\n },\n {\n root: canaryElement.parentElement,\n },\n );\n observer.observe(canaryElement);\n\n return () => {\n observer.disconnect();\n };\n }, [canaryElement]);\n\n return createPortal(\n <Transition\n in={isOpen}\n nodeRef={transitionRef}\n addEndListener={(done) => {\n transitionRef.current?.addEventListener(\"transitionend\", done);\n }}\n timeout={500}\n mountOnEnter\n unmountOnExit\n >\n {(state) => (\n <FocusOn onEscapeKey={onClose} returnFocus autoFocus>\n <FadeOutBox\n $position=\"fixed\"\n $inset=\"all-spacing-0\"\n $zIndex=\"modal-dialog\"\n $background=\"black\"\n $opacity=\"semi-transparent\"\n $state={state}\n $transition=\"standard-ease\"\n />\n <SlideInFlex\n ref={transitionRef}\n $background=\"bg-primary\"\n $position=\"fixed\"\n $left=\"all-spacing-0\"\n $top=\"all-spacing-0\"\n $bottom=\"all-spacing-0\"\n $width=\"all-spacing-22\"\n $maxWidth=\"100vw\"\n $zIndex=\"modal-dialog\"\n $flexDirection=\"column\"\n $transition=\"standard-ease\"\n role=\"dialog\"\n $state={state}\n {...rest}\n >\n <OakFlex\n $ma=\"space-between-s\"\n $justifyContent=\"space-between\"\n $alignItems=\"center\"\n >\n <OakImage\n src={logoSrc}\n $height=\"all-spacing-8\"\n $width=\"all-spacing-7\"\n alt=\"\"\n />\n <InternalShadowRoundButton\n onClick={onClose}\n aria-label=\"Close\"\n defaultIconBackground=\"transparent\"\n defaultIconColor=\"black\"\n defaultTextColor=\"transparent\"\n hoverTextColor=\"transparent\"\n disabledTextColor=\"transparent\"\n hoverIconBackground=\"black\"\n hoverIconColor=\"white\"\n disabledIconBackground=\"transparent\"\n iconBackgroundSize=\"all-spacing-6\"\n iconSize=\"all-spacing-6\"\n iconName=\"cross\"\n />\n </OakFlex>\n <div style={{ display: \"contents\" }} data-autofocus-inside>\n <OakFlex\n $flexGrow={1}\n $flexDirection=\"column\"\n $overflow=\"auto\"\n $bt=\"border-solid-s\"\n $borderColor={\n isScrolled ? \"border-neutral-lighter\" : \"transparent\"\n }\n >\n <div ref={setCanaryElement} />\n {children}\n </OakFlex>\n {footerSlot}\n </div>\n </SlideInFlex>\n </FocusOn>\n )}\n </Transition>,\n domContainer,\n );\n};\n","import React, { useRef } from \"react\";\nimport styled, { css } from \"styled-components\";\n\nimport { OakBox, OakFlex, OakFlexProps, OakIcon } from \"@/components/atoms\";\nimport { InternalCheckBoxWrapper } from \"@/components/atoms/InternalCheckBoxWrapper\";\nimport { InternalCheckBoxLabelHoverDecor } from \"@/components/atoms/InternalCheckBoxLabel\";\nimport {\n BaseCheckBoxProps,\n InternalCheckBox,\n} from \"@/components/atoms/InternalCheckBox/InternalCheckBox\";\nimport { parseColor } from \"@/styles/helpers/parseColor\";\nimport { parseBorder } from \"@/styles/helpers/parseBorder\";\nimport { parseBorderRadius } from \"@/styles/helpers/parseBorderRadius\";\nimport { parseDropShadow } from \"@/styles/helpers/parseDropShadow\";\nimport { OakCombinedColorToken } from \"@/styles\";\n\nconst StyledInternalCheckBox = styled(InternalCheckBox)`\n &:checked:not(:disabled) {\n border: ${parseBorder(\"border-solid-l\")};\n border-color: ${parseColor(\"border-primary\")};\n }\n\n &:checked:disabled {\n border: ${parseBorder(\"border-solid-l\")};\n border-color: ${parseColor(\"text-disabled\")};\n }\n\n @media (hover: hover) {\n &:hover:not(:disabled) {\n background: ${parseColor(\"bg-primary\")};\n }\n }\n`;\n\nconst StyledInternalCheckBoxLabelHoverDecor = styled(\n InternalCheckBoxLabelHoverDecor,\n)`\n pointer-events: none; // To prevent the label from stealing the click event from the input\n`;\n\ntype StyledFlexBoxProps = OakFlexProps & {\n $overlayBorderColor: OakCombinedColorToken;\n $feedbackBgColor?: OakCombinedColorToken;\n $outlineColor: OakCombinedColorToken;\n};\n\nconst StyledFlexBox = styled(OakFlex)<StyledFlexBoxProps>`\n &:not(:focus-within) {\n ${(props) =>\n !!props.$outlineColor &&\n css`\n outline: ${parseBorder(\"border-solid-xl\")}\n ${parseColor(props.$outlineColor)};\n `}\n }\n\n &:has(input:not(:disabled)) {\n cursor: pointer;\n }\n\n &:has(input:disabled) {\n pointer-events: none;\n cursor: none;\n }\n\n &:focus-within {\n box-shadow: ${parseDropShadow(\"drop-shadow-centered-lemon\")},\n ${parseDropShadow(\"drop-shadow-centered-grey\")};\n }\n\n @media (hover: hover) {\n &:hover:has(input:not(:disabled)){\n background-color: ${parseColor(\"bg-decorative1-subdued\")};\n }\n\n &:hover input:not(:disabled) {\n background: ${parseColor(\"bg-primary\")};\n }\n\n &:hover:has(input:not(:disabled)) ${InternalCheckBoxLabelHoverDecor} {\n text-decoration: underline;\n }\n\n &:hover:has(\n ${InternalCheckBoxLabelHoverDecor} input:not(:focus-visible):not(:checked):not(:disabled)\n )::after {\n content: \"\";\n inset: 0;\n pointer-events: none;\n position: absolute;\n border-bottom: ${parseBorder(\"border-solid-xl\")};\n border-radius: ${parseBorderRadius(\"border-radius-m2\")};\n }\n\n &:focus-within {\n box-shadow: ${parseDropShadow(\"drop-shadow-centered-lemon\")},\n ${parseDropShadow(\"drop-shadow-centered-grey\")};\n }\n \n &:has(input:checked:not(:disabled)) {\n outline: ${parseBorder(\"border-solid-xl\")};\n }\n\n &:has(input:checked:disabled) {\n outline-color: ${(props) => css`\n ${parseColor(props.$overlayBorderColor)}\n `};\n }\n\n &:has(input:disabled:not(:checked)) {\n ${(props) =>\n props.$feedbackBgColor\n ? css`\n background-color: ${props.$feedbackBgColor};\n `\n : undefined}\n }\n\n &:has(input:disabled:checked) {\n ${(props) => css`\n background-color: ${parseColor(props.$feedbackBgColor)};\n `};\n }\n`;\n\nexport type OakQuizCheckBoxProps = Omit<BaseCheckBoxProps, \"defaultChecked\"> & {\n feedback?: \"correct\" | \"incorrect\" | null;\n image?: React.JSX.Element;\n innerRef?: React.RefObject<HTMLInputElement>;\n displayValue?: string;\n /**\n * Give the field a highlight to draw attention to it\n */\n isHighlighted?: boolean;\n};\n\n/**\n * A checkbox representing the options in a multiple choice question.\n */\nexport const OakQuizCheckBox = (props: OakQuizCheckBoxProps) => {\n const {\n id,\n value,\n feedback,\n image,\n disabled,\n innerRef,\n displayValue,\n isHighlighted,\n ...rest\n } = props;\n\n const isFeedback = !!feedback;\n\n const defaultRef = useRef<HTMLInputElement>(null);\n const inputRef = innerRef ?? defaultRef;\n const showTick =\n (feedback === \"correct\" && inputRef.current?.checked) ||\n (feedback === \"incorrect\" && !inputRef.current?.checked);\n const showCross = feedback === \"incorrect\" && inputRef.current?.checked;\n\n const handleContainerClick = (\n e:\n | React.MouseEvent<HTMLDivElement>\n | React.MouseEvent<HTMLInputElement>\n | React.MouseEvent<HTMLLabelElement>,\n ) => {\n const inputId = (e.target as HTMLInputElement).id;\n\n if (inputId !== id) {\n inputRef.current?.click();\n }\n };\n\n const imageContainer = (\n <OakFlex\n $flexDirection=\"column\"\n $minWidth={\"all-spacing-20\"}\n $gap={\"space-between-s\"}\n >\n <OakBox>{image}</OakBox>\n {displayValue}\n </OakFlex>\n );\n\n const feedbackBgColor = showTick ? \"bg-correct\" : \"bg-incorrect\";\n const feedbackBorderColor = showTick ? \"border-success\" : \"border-error\";\n\n const inputCheckbox = (\n <StyledFlexBox\n $pa=\"inner-padding-l\"\n $borderRadius={\"border-radius-m2\"}\n $borderColor={\n isHighlighted ? \"border-decorative5-stronger\" : \"border-primary\"\n }\n $background={\n disabled && !isFeedback ? \"bg-neutral-stronger\" : \"bg-primary\"\n }\n $flexGrow={1}\n onClick={handleContainerClick}\n $overlayBorderColor={isFeedback ? feedbackBorderColor : \"text-disabled\"}\n $feedbackBgColor={isFeedback ? feedbackBgColor : undefined}\n $outlineColor={\n isHighlighted ? \"border-decorative5-stronger\" : \"transparent\"\n }\n >\n <StyledInternalCheckBoxLabelHoverDecor\n htmlFor={id}\n labelGap={\"space-between-s\"}\n labelAlignItems={\"center\"}\n $color={disabled && !isFeedback ? \"text-disabled\" : \"text-primary\"}\n $font={\"body-1\"}\n disabled={disabled}\n >\n <InternalCheckBoxWrapper\n size={\"all-spacing-7\"}\n iconPadding=\"inner-padding-ssx\"\n checkedIcon={\n <OakBox\n $width=\"100%\"\n $height=\"100%\"\n $background={\n disabled || isFeedback ? \"text-disabled\" : \"text-primary\"\n }\n >\n <OakBox\n $ba={\"border-solid-m\"}\n $borderColor={\"white\"}\n $width={\"100%\"}\n $height={\"100%\"}\n />\n </OakBox>\n }\n internalCheckbox={\n <StyledInternalCheckBox\n id={id}\n value={value}\n disabled={disabled || isFeedback}\n {...rest}\n $width={\"all-spacing-7\"}\n $height={\"all-spacing-7\"}\n $ba={\"border-solid-m\"}\n $borderColor=\"border-neutral\"\n $borderRadius={\"border-radius-s\"}\n $background={isHighlighted ? \"bg-decorative5-main\" : \"bg-primary\"}\n $checkedBackground={null}\n ref={inputRef}\n />\n }\n />\n {image ? imageContainer : displayValue}\n </StyledInternalCheckBoxLabelHoverDecor>\n {isFeedback && (showTick || showCross) && (\n <OakFlex\n className=\"feedbackIconWrapper\"\n $flexGrow={1}\n $justifyContent={\"flex-end\"}\n $alignItems={\"flex-end\"}\n $height={\"100%\"}\n >\n {showTick && (\n <OakIcon\n iconName={\"tick\"}\n $colorFilter={\"icon-success\"}\n alt={\n feedback === \"correct\" ? \"Correct\" : \"Unselected correct choice\"\n }\n />\n )}\n {showCross && (\n <OakIcon\n iconName={\"cross\"}\n $colorFilter={\"icon-error\"}\n alt={\"Incorrect\"}\n />\n )}\n </OakFlex>\n )}\n </StyledFlexBox>\n );\n\n return (\n <OakFlex $width={\"100%\"} $position={\"relative\"}>\n {inputCheckbox}\n </OakFlex>\n );\n};\n","import React, { MouseEventHandler, useContext } from \"react\";\nimport styled, { css } from \"styled-components\";\n\nimport { OakBox, OakFlex, OakIcon } from \"@/components/atoms\";\nimport {\n OakRadioButton,\n OakRadioButtonProps,\n} from \"@/components/molecules/OakRadioButton/OakRadioButton\";\nimport { parseDropShadow } from \"@/styles/helpers/parseDropShadow\";\nimport { parseBorder } from \"@/styles/helpers/parseBorder\";\nimport { parseColor } from \"@/styles/helpers/parseColor\";\nimport { parseBorderRadius } from \"@/styles/helpers/parseBorderRadius\";\nimport { RadioContext } from \"@/components/molecules/OakRadioGroup/OakRadioGroup\";\nimport { OakUiRoleToken } from \"@/styles\";\n\nexport type OakQuizRadioButtonProps = OakRadioButtonProps & {\n /**\n * Present the element with answer feedback\n */\n feedback?: \"correct\" | \"incorrect\" | null;\n /**\n * An image to display above the label\n */\n image?: JSX.Element;\n /**\n * Give the field a highlight to draw attention to it\n */\n isHighlighted?: boolean;\n};\n\ntype StyledOakFlexProps = {\n $disabled: boolean;\n $checked: boolean;\n $outlineColor?: OakUiRoleToken;\n};\n\nconst StyledOakFlex = styled(OakFlex)<StyledOakFlexProps>`\n &:not(:focus-within) {\n ${(props) =>\n !!props.$outlineColor &&\n css`\n outline: ${parseBorder(\"border-solid-xl\")}\n ${parseColor(props.$outlineColor)};\n `}\n }\n\n &:hover {\n cursor: ${(props) => (props.$disabled ? \"default\" : \"pointer\")};\n }\n\n &:focus-within {\n box-shadow: ${parseDropShadow(\"drop-shadow-centered-lemon\")},\n ${parseDropShadow(\"drop-shadow-centered-grey\")};\n }\n\n ${(props) =>\n !props.$disabled &&\n css`\n &:hover {\n background-color: ${parseColor(\"bg-decorative1-subdued\")};\n text-decoration: underline;\n }\n `}\n\n ${(props) =>\n !props.$disabled &&\n !props.$checked &&\n css`\n &:hover:not(:focus-within)::after {\n pointer-events: none;\n content: \"\";\n position: absolute;\n inset: 0;\n border-radius: ${parseBorderRadius(\"border-radius-m2\")};\n border-bottom: ${parseBorder(\"border-solid-l\")} ${parseColor(\"grey60\")};\n }\n `}\n`;\n\n/**\n * A radio button representing the options in a multiple choice question.\n *\n * Use with `OakRadioGroup` to create a group of radio buttons.\n */\nexport const OakQuizRadioButton = (props: OakQuizRadioButtonProps) => {\n const { value, feedback, image, disabled, isHighlighted, label, ...rest } =\n props;\n const showFeedback = !!feedback;\n // Give the input focus when the entire component is clicked\n const handleOnClick: MouseEventHandler<HTMLElement> = (event) => {\n event.currentTarget.querySelector(\"input\")?.click();\n };\n const checked = useContext(RadioContext).currentValue === value;\n let outlineColor: OakUiRoleToken | undefined;\n let backgroundColor: OakUiRoleToken = \"bg-primary\";\n let feedbackIcon: \"tick\" | \"cross\" | null = null;\n let feedbackAltText: string | undefined;\n let radioBackground: OakUiRoleToken = \"bg-primary\";\n\n switch (true) {\n case disabled && !showFeedback:\n backgroundColor = \"bg-neutral-stronger\";\n break;\n case feedback === \"correct\" && checked:\n outlineColor = \"border-success\";\n backgroundColor = \"bg-correct\";\n feedbackIcon = \"tick\";\n feedbackAltText = \"Correct\";\n break;\n case feedback === \"incorrect\" && checked:\n outlineColor = \"border-error\";\n backgroundColor = \"bg-incorrect\";\n feedbackIcon = \"cross\";\n feedbackAltText = \"Incorrect\";\n break;\n case feedback === \"incorrect\" && !checked:\n feedbackIcon = \"tick\";\n feedbackAltText = \"Unselected correct choice\";\n break;\n case isHighlighted:\n radioBackground = \"bg-decorative5-main\";\n outlineColor = \"border-decorative5-stronger\";\n break;\n case checked && !disabled:\n outlineColor = \"border-primary\";\n break;\n }\n\n return (\n <StyledOakFlex\n $pa=\"inner-padding-l\"\n $borderRadius=\"border-radius-m2\"\n $justifyContent=\"space-between\"\n $position=\"relative\"\n $alignContent=\"center\"\n onClick={handleOnClick}\n $disabled={disabled || showFeedback}\n $checked={checked}\n $outlineColor={outlineColor}\n $background={backgroundColor}\n >\n <OakRadioButton\n value={value}\n disabled={disabled || showFeedback}\n $labelGap=\"space-between-s\"\n disableFocusRing\n radioInnerSize=\"all-spacing-6\"\n radioOuterSize=\"all-spacing-7\"\n radioBackground={radioBackground}\n checkedRadioBorderWidth=\"border-solid-l\"\n label={\n image ? (\n <OakFlex\n $flexDirection=\"column\"\n $minWidth=\"all-spacing-20\"\n $gap=\"space-between-s\"\n >\n <OakBox>{image}</OakBox>\n {label}\n </OakFlex>\n ) : (\n label\n )\n }\n {...rest}\n />\n {showFeedback && feedbackIcon && (\n <OakFlex $alignSelf=\"flex-end\">\n <OakIcon\n iconName={feedbackIcon}\n $colorFilter={\n feedbackIcon === \"tick\" ? \"icon-success\" : \"icon-error\"\n }\n alt={feedbackAltText}\n />\n </OakFlex>\n )}\n </StyledOakFlex>\n );\n};\n","import React, { MouseEventHandler } from \"react\";\nimport styled from \"styled-components\";\n\nimport { InternalShadowRoundButton } from \"@/components/molecules/InternalShadowRoundButton\";\nimport { parseDropShadow } from \"@/styles/helpers/parseDropShadow\";\n\nexport type OakHintButtonProps = {\n isOpen: boolean;\n onClick?: MouseEventHandler;\n isLoading?: boolean;\n disabled?: boolean;\n};\n\nconst StyledInternalShadowRoundButton = styled(InternalShadowRoundButton)`\n &:hover .shadow {\n box-shadow: none !important;\n }\n &:active .shadow {\n box-shadow: ${parseDropShadow(\"drop-shadow-lemon\")},\n ${parseDropShadow(\"drop-shadow-grey\")} !important;\n }\n`;\n\n/**\n *\n * A specific implementation of InternalShadowRoundButton\n *\n * The following callbacks are available for tracking focus events:\n *\n * ### onClick\n * `onClick?: (event: React.MouseEvent<HTMLButtonElement, MouseEvent>) => void;`\n *\n * ### onHovered\n * `onHovered?: (event: React.MouseEvent<HTMLButtonElement, MouseEvent>, duration: number) => void;`<br>\n * called after a mouseEnter and mouseLeave event has happened\n */\nexport const OakHintButton = (props: OakHintButtonProps) => {\n const { isOpen, disabled } = props;\n return (\n <StyledInternalShadowRoundButton\n iconName={isOpen && !disabled ? \"lightbulb-yellow\" : \"lightbulb\"}\n defaultIconBackground={isOpen ? \"black\" : \"bg-decorative5-main\"}\n hoverIconBackground={isOpen ? \"black\" : \"bg-decorative5-main\"}\n defaultTextColor={\"text-primary\"}\n hoverTextColor={\"text-primary\"}\n disabledIconBackground={\"bg-btn-primary-disabled\"}\n disabledTextColor={\"text-disabled\"}\n disabledIconColor={\"white\"}\n onClick={props.onClick}\n isLoading={props.isLoading}\n disabled={props.disabled}\n iconBackgroundSize={\"all-spacing-8\"}\n iconSize={\"all-spacing-6\"}\n >\n {!isOpen ? \"Need a hint?\" : \"Close hint\"}\n </StyledInternalShadowRoundButton>\n );\n};\n","import React, { MouseEventHandler, ReactNode, useState } from \"react\";\n\nimport { OakTooltip } from \"@/components/molecules\";\nimport { OakHintButton } from \"@/components/organisms/pupil/OakHintButton\";\n\nexport type OakQuizHintProps = {\n /**\n * Some content to give as a hint to answer a question\n */\n hint: ReactNode;\n};\n\n/**\n * Presents a button which will show a hint when clicked\n */\nexport const OakQuizHint = ({ hint }: OakQuizHintProps) => {\n const [isOpen, setIsOpen] = useState(false);\n const handleClick: MouseEventHandler = () => {\n setIsOpen(!isOpen);\n };\n\n return (\n <OakTooltip tooltip={hint} isOpen={isOpen}>\n <OakHintButton isOpen={isOpen} onClick={handleClick} />\n </OakTooltip>\n );\n};\n","import React, { ReactNode } from \"react\";\n\nimport { OakBox, OakFlex, OakSpan } from \"@/components/atoms\";\nimport { OakRoundIcon } from \"@/components/molecules\";\n\nexport type OakQuizFeedbackProps = {\n /**\n * Feedback for an answer\n * `partially-correct` can be used to feedback on a multi-answer MCQ where some\n * correct options were not selected and/or some incorrect answers were selected\n */\n feedback: \"correct\" | \"incorrect\" | \"partially-correct\";\n /**\n * Some additional content to present with the feedback.\n * This is likely the correct answer(s) to the question or some praise.\n *\n * Only displayed when `feedback` has been applied.\n */\n answerFeedback?: ReactNode;\n};\n\n/**\n * Gives feedback after a question has been answered\n */\nexport const OakQuizFeedback = ({\n feedback,\n answerFeedback,\n}: OakQuizFeedbackProps) => {\n let feedbackLabel: string;\n\n switch (feedback) {\n case \"correct\":\n feedbackLabel = \"Correct\";\n break;\n case \"incorrect\":\n feedbackLabel = \"Incorrect\";\n break;\n case \"partially-correct\":\n feedbackLabel = \"Almost correct\";\n break;\n }\n\n return (\n <OakBox aria-live=\"polite\">\n <OakFlex $gap=\"space-between-xs\">\n <OakRoundIcon\n iconName={feedback === \"correct\" ? \"tick\" : \"cross\"}\n alt=\"\"\n $pa=\"inner-padding-none\"\n $background={feedback === \"correct\" ? \"icon-success\" : \"icon-error\"}\n $colorFilter=\"text-inverted\"\n $width=\"all-spacing-6\"\n $height=\"all-spacing-6\"\n />\n <OakSpan\n $font=\"heading-6\"\n $color={feedback === \"correct\" ? \"text-success\" : \"text-error\"}\n >\n {feedbackLabel}\n </OakSpan>\n </OakFlex>\n {answerFeedback && (\n <OakSpan\n as=\"p\"\n $mt=\"space-between-xs\"\n $font={feedback === \"correct\" ? \"body-2-bold\" : \"body-2\"}\n >\n {answerFeedback}\n </OakSpan>\n )}\n </OakBox>\n );\n};\n","import React, { ReactNode } from \"react\";\nimport styled from \"styled-components\";\n\nimport { OakQuizHint, OakQuizHintProps } from \"../OakQuizHint\";\nimport {\n OakQuizFeedback,\n OakQuizFeedbackProps,\n} from \"../OakQuizFeedback/OakQuizFeedback\";\n\nimport { OakFlex } from \"@/components/atoms\";\n\n/**\n * `content-box` ensures that the border is not subtracted from the height of the element\n */\nconst StyledOakFlex = styled(OakFlex)`\n box-sizing: content-box;\n`;\n\nexport type OakLessonBottomNavProps = {\n children?: ReactNode;\n feedback?: OakQuizFeedbackProps[\"feedback\"] | null;\n answerFeedback?: OakQuizFeedbackProps[\"answerFeedback\"];\n hint?: OakQuizHintProps[\"hint\"];\n};\n\n/**\n * Renders feedback for an answer and onward navigation buttons to continue the lesson\n */\nexport const OakLessonBottomNav = ({\n hint,\n feedback,\n answerFeedback,\n children,\n}: OakLessonBottomNavProps) => {\n let content: ReactNode;\n\n switch (true) {\n case !!feedback:\n content = (\n <OakQuizFeedback feedback={feedback} answerFeedback={answerFeedback} />\n );\n break;\n case !!hint:\n content = <OakQuizHint hint={hint} />;\n break;\n default:\n content = null;\n }\n\n return (\n <StyledOakFlex\n $flexDirection={[\"column\", \"row\"]}\n $pa=\"inner-padding-m\"\n $minHeight=\"all-spacing-9\"\n $gap=\"space-between-m\"\n >\n <OakFlex $alignItems=\"center\">{content}</OakFlex>\n <OakFlex\n $flexGrow=\"1\"\n $height=\"fit-content\"\n $alignSelf=\"flex-end\"\n $justifyContent={[\"initial\", \"flex-end\"]}\n $width={[\"100%\", \"auto\"]}\n >\n {children}\n </OakFlex>\n </StyledOakFlex>\n );\n};\n","import React, { ReactNode } from \"react\";\nimport styled from \"styled-components\";\n\nimport {\n OakBox,\n OakFlex,\n OakHeading,\n OakIconProps,\n OakSpan,\n} from \"@/components/atoms\";\nimport { OakRoundIcon } from \"@/components/molecules\";\nimport { getBreakpoint } from \"@/styles/utils/responsiveStyle\";\n\ntype LessonSectionName = \"intro\" | \"starter-quiz\" | \"video\" | \"exit-quiz\";\n\nconst StyledMobileSummary = styled(OakSpan)`\n @media (min-width: ${getBreakpoint(\"small\")}px) {\n display: none;\n }\n`;\n\nexport type OakLessonTopNavProps = {\n lessonSectionName: LessonSectionName;\n /**\n * Slot to render `OakBackLink` or similar\n */\n backLinkSlot: ReactNode;\n heading: ReactNode;\n /**\n * Displayed at the mobile breakpoint where the counter is not rendered.\n * Provides alternative content for the counter/progress in the lesson.\n */\n mobileSummary: ReactNode;\n /**\n * Slot to render `OakQuizCounter` or similar\n */\n counterSlot?: ReactNode;\n};\n\n/**\n * Controls for navigating back and displaying progress in a lesson\n */\nexport const OakLessonTopNav = ({\n lessonSectionName,\n backLinkSlot,\n counterSlot,\n heading,\n mobileSummary,\n}: OakLessonTopNavProps) => {\n return (\n <OakFlex $gap=\"space-between-m\" $alignItems=\"center\">\n <OakBox $pl={[\"inner-padding-none\", \"inner-padding-s\"]}>\n {backLinkSlot}\n </OakBox>\n <OakFlex $flexGrow=\"none\">\n <OakRoundIcon\n {...pickSectionIcon(lessonSectionName)}\n $width=\"all-spacing-8\"\n $height=\"all-spacing-8\"\n />\n </OakFlex>\n <OakBox>\n <OakHeading tag=\"h1\" $font={[\"heading-7\", \"heading-5\"]}>\n {heading}\n </OakHeading>\n <StyledMobileSummary $font=\"body-3\">\n {mobileSummary}\n </StyledMobileSummary>\n </OakBox>\n <OakFlex $flexGrow={1} $justifyContent=\"flex-end\">\n <OakBox $display={[\"none\", \"block\"]}>{counterSlot}</OakBox>\n </OakFlex>\n </OakFlex>\n );\n};\n\nfunction pickSectionIcon(\n sectionName: LessonSectionName,\n): Pick<OakIconProps, \"iconName\" | \"$background\"> {\n switch (sectionName) {\n case \"intro\":\n return {\n iconName: \"intro\",\n $background: \"aqua110\",\n };\n case \"starter-quiz\":\n return {\n iconName: \"quiz\",\n $background: \"mint110\",\n };\n case \"video\":\n return {\n iconName: \"video\",\n $background: \"pink110\",\n };\n case \"exit-quiz\":\n return {\n iconName: \"quiz\",\n $background: \"lemon110\",\n };\n }\n}\n","import React from \"react\";\n\nimport { OakSpan } from \"@/components/atoms\";\n\nexport type OakQuizCounterProps = {\n counter: number;\n total: number;\n};\n\n/**\n * A counter representing progress through the questions in a quiz\n */\nexport const OakQuizCounter = (props: OakQuizCounterProps) => {\n const { counter, total } = props;\n return (\n <OakSpan $font={\"heading-light-4\"} $color={\"text-disabled\"}>\n <OakSpan $font={\"heading-4\"} $color={\"text-primary\"}>\n {counter}{\" \"}\n </OakSpan>\n of {total}\n </OakSpan>\n );\n};\n","import React, { ReactNode } from \"react\";\nimport styled from \"styled-components\";\n\nimport { OakBox, OakFlex } from \"@/components/atoms\";\nimport { parseSpacing } from \"@/styles/helpers/parseSpacing\";\nimport { getBreakpoint } from \"@/styles/utils/responsiveStyle\";\nimport { OakCombinedColorToken } from \"@/styles\";\n\ntype LessonSectionName =\n | \"overview\"\n | \"intro\"\n | \"starter-quiz\"\n | \"video\"\n | \"exit-quiz\"\n | \"review\";\n\nexport type OakLessonLayoutProps = {\n lessonSectionName: LessonSectionName;\n topNavSlot: ReactNode;\n bottomNavSlot: ReactNode;\n children: ReactNode;\n};\n\n/**\n * `OakBox` does not support space-between tokens on `padding` only `margin`, so we need to\n * set it here to apply appropriate padding to the top of the content.\n */\nconst StyledLayoutBox = styled(OakBox)`\n @media (min-width: ${getBreakpoint(\"small\")}px) {\n padding-top: ${parseSpacing(\"space-between-xl\")};\n }\n`;\n\nconst StickyFooter = styled(OakBox)`\n position: sticky;\n bottom: 0;\n z-index: 10;\n`;\n\n/**\n * Provides overall page layout and colours for the sections of a lesson.\n */\nexport const OakLessonLayout = ({\n lessonSectionName,\n topNavSlot,\n bottomNavSlot,\n children,\n}: OakLessonLayoutProps) => {\n const [\n pageBackgroundColor,\n contentBackgroundColor,\n contentBorderColor,\n mobileContentBackgroundColor,\n ] = pickSectionColours(lessonSectionName);\n\n return (\n <StyledLayoutBox\n $display={\"flex\"}\n $width=\"100%\"\n $minHeight={\"100%\"}\n $ph={[\"inner-padding-none\", \"inner-padding-xl\"]}\n $background={pageBackgroundColor}\n >\n <OakFlex\n $flexDirection=\"column\"\n $flexGrow={1}\n $background={[mobileContentBackgroundColor, contentBackgroundColor]}\n $btr={[null, \"border-radius-xl\"]}\n $bt={[null, \"border-solid-xl\"]}\n $bh={[null, \"border-solid-xl\"]}\n $borderColor={[null, contentBorderColor]}\n $maxWidth=\"all-spacing-24\"\n $minHeight=\"100%\"\n $mh=\"auto\"\n $pt={[\"inner-padding-none\", \"inner-padding-m\"]}\n $gap={[\"space-between-l\", \"space-between-xl\"]}\n >\n {topNavSlot && (\n <OakBox\n $pv=\"inner-padding-l\"\n $pl={[\"inner-padding-m\", \"inner-padding-xs\"]}\n $pr={[\"inner-padding-m\", \"inner-padding-none\"]}\n $mr={[\"space-between-none\", \"space-between-l\"]}\n $background={[\"bg-primary\", \"transparent\"]}\n >\n {topNavSlot}\n </OakBox>\n )}\n <OakFlex $flexGrow={1} $flexDirection=\"column\">\n {children}\n </OakFlex>\n {bottomNavSlot && (\n <StickyFooter\n $mh={[\n \"space-between-none\",\n \"space-between-none\",\n \"space-between-sssx\",\n ]}\n $borderColor={contentBorderColor}\n $bt={\"border-solid-xl\"}\n $background={[\"bg-primary\", contentBackgroundColor]}\n >\n {bottomNavSlot}\n </StickyFooter>\n )}\n </OakFlex>\n </StyledLayoutBox>\n );\n};\n\nfunction pickSectionColours(\n sectionName: LessonSectionName,\n): [\n pageBackgroundColor: OakCombinedColorToken,\n contentBackgroundColor: OakCombinedColorToken,\n contentBorderColor: OakCombinedColorToken,\n mobileContentBackgroundColor: OakCombinedColorToken,\n] {\n switch (sectionName) {\n case \"overview\":\n return [\n \"bg-decorative1-main\",\n \"bg-primary\",\n \"border-decorative1-stronger\",\n \"bg-primary\",\n ];\n case \"intro\":\n return [\n \"bg-decorative2-subdued\",\n \"bg-decorative2-very-subdued\",\n \"border-inverted\",\n \"bg-decorative2-subdued\",\n ];\n case \"starter-quiz\":\n return [\n \"bg-decorative1-main\",\n \"bg-decorative1-very-subdued\",\n \"border-inverted\",\n \"bg-decorative1-subdued\",\n ];\n case \"video\":\n return [\n \"bg-decorative4-subdued\",\n \"bg-primary\",\n \"border-decorative4\",\n \"bg-primary\",\n ];\n case \"exit-quiz\":\n return [\n \"bg-decorative5-main\",\n \"bg-decorative5-very-subdued\",\n \"border-inverted\",\n \"bg-decorative5-subdued\",\n ];\n case \"review\":\n return [\n \"bg-decorative1-main\",\n \"bg-primary\",\n \"border-decorative1-stronger\",\n \"bg-primary\",\n ];\n }\n}\n","import React, { ComponentPropsWithoutRef, ElementType } from \"react\";\nimport styled, { css } from \"styled-components\";\n\nimport {\n OakBox,\n OakFlex,\n OakIcon,\n OakIconName,\n OakSpan,\n} from \"@/components/atoms\";\nimport { parseColor } from \"@/styles/helpers/parseColor\";\nimport { OakRoundIcon } from \"@/components/molecules\";\nimport { parseColorFilter } from \"@/styles/helpers/parseColorFilter\";\nimport { parseSpacing } from \"@/styles/helpers/parseSpacing\";\nimport { parseDropShadow } from \"@/styles/helpers/parseDropShadow\";\nimport { OakCombinedColorToken } from \"@/styles\";\n\ntype LessonSectionName = \"intro\" | \"starter-quiz\" | \"video\" | \"exit-quiz\";\n\ntype BaseOakLessonNavItemProps<C extends ElementType> = {\n as?: C;\n /**\n * Disable the section preventing navigation to it.\n */\n disabled?: boolean;\n} & ComponentPropsWithoutRef<C>;\n\ntype QuizSectionProps = {\n lessonSectionName: \"starter-quiz\" | \"exit-quiz\";\n /**\n * The number of questions in the quiz\n */\n numQuestions: number;\n /**\n * The number of questions answered correctly\n */\n grade: number;\n};\n\ntype VideoSectionProps = {\n lessonSectionName: \"video\";\n};\n\ntype IntroSectionProps = {\n lessonSectionName: \"intro\";\n};\n\ntype SectionProps = {\n /**\n * Denotes the progress in the lesson section\n */\n progress: \"not-started\" | \"in-progress\" | \"complete\";\n} & (IntroSectionProps | QuizSectionProps | VideoSectionProps);\n\nexport type OakLessonNavItemProps<C extends ElementType> =\n BaseOakLessonNavItemProps<C> & SectionProps;\n\nconst StyledLabel = styled(OakBox)``;\n\nconst StyledRoundIcon = styled(OakRoundIcon)<{\n $disabled?: boolean;\n}>`\n width: ${parseSpacing(\"all-spacing-8\")};\n height: ${parseSpacing(\"all-spacing-8\")};\n padding: 0;\n\n background: transparent;\n\n img {\n filter: ${(props) =>\n parseColorFilter(props.$disabled ? \"icon-disabled\" : \"icon-inverted\")};\n }\n`;\n\nconst activeIconStyles = css`\n ${StyledRoundIcon} {\n background: ${parseColor(\"bg-btn-primary\")};\n\n img {\n filter: ${parseColorFilter(\"icon-main\")};\n }\n }\n`;\n\nconst StyledLessonNavItem = styled(OakFlex)<{ $disabled?: boolean }>`\n outline: none;\n text-align: initial;\n\n &:focus-visible {\n box-shadow: ${parseDropShadow(\"drop-shadow-centered-lemon\")},\n ${parseDropShadow(\"drop-shadow-centered-grey\")};\n }\n\n ${(props) => props.$disabled && \"cursor: default\"}\n\n ${(props) =>\n !props.$disabled &&\n css`\n cursor: pointer;\n\n /* Don't apply hover styles on touch devices */\n @media (hover: hover) {\n &:hover {\n ${StyledLabel} {\n text-decoration: underline;\n }\n\n ${activeIconStyles}\n }\n }\n\n &:active {\n box-shadow: ${parseDropShadow(\"drop-shadow-lemon\")},\n ${parseDropShadow(\"drop-shadow-grey\")};\n ${activeIconStyles}\n }\n `}\n`;\n\nconst FlexedOakBox = styled(OakBox)`\n flex: 1;\n`;\n\n/**\n * Enables navigation to the given section of a lesson as well as displaying current progress\n */\nexport const OakLessonNavItem = <C extends ElementType = \"a\">(\n props: OakLessonNavItemProps<C>,\n) => {\n const { as, lessonSectionName, progress, disabled, href, onClick, ...rest } =\n props;\n const [notStartedBackgroundColor, backgroundColor, borderColor] =\n pickColorsForSection(lessonSectionName);\n\n return (\n <StyledLessonNavItem\n as={disabled ? \"div\" : as ?? \"a\"}\n $gap=\"space-between-m\"\n $alignItems=\"center\"\n $background={\n progress === \"not-started\" ? notStartedBackgroundColor : backgroundColor\n }\n $ph={[\"inner-padding-m\", \"inner-padding-xl\"]}\n $pv=\"inner-padding-l\"\n $borderRadius=\"border-radius-l\"\n $borderColor={borderColor}\n $ba=\"border-solid-l\"\n $disabled={disabled}\n $color=\"text-primary\"\n href={disabled ? undefined : href}\n onClick={disabled ? undefined : onClick}\n {...rest}\n >\n <OakFlex $width=\"all-spacing-13\" $justifyContent=\"center\">\n <OakIcon\n iconName={pickIconForSection(lessonSectionName)}\n $width=\"all-spacing-10\"\n $height=\"all-spacing-10\"\n />\n </OakFlex>\n <FlexedOakBox>\n <StyledLabel\n as=\"strong\"\n $font={[\"heading-6\", \"heading-5\"]}\n $color={disabled ? \"text-disabled\" : \"text-primary\"}\n >\n {pickLabelForSection(lessonSectionName)}\n </StyledLabel>\n <OakBox $font={[\"body-2\", \"body-1\"]}>\n {pickSummaryForProgress(props)}\n </OakBox>\n </FlexedOakBox>\n {renderQuestionCounter(props)}\n <StyledRoundIcon iconName=\"chevron-right\" $disabled={disabled} />\n </StyledLessonNavItem>\n );\n};\n\nfunction renderQuestionCounter(props: SectionProps) {\n if (props.progress !== \"complete\") {\n return null;\n }\n\n /**\n * The large answer counter is only rendered when on a non-mobile screen\n */\n switch (props.lessonSectionName) {\n case \"exit-quiz\":\n case \"starter-quiz\":\n return (\n <OakBox $display={[\"none\", \"block\"]} $mr=\"space-between-m\">\n <OakSpan $font=\"heading-4\">{props.grade}</OakSpan>\n <OakSpan $font=\"heading-6\">&nbsp;/&nbsp;{props.numQuestions}</OakSpan>\n </OakBox>\n );\n default:\n return null;\n }\n}\n\nfunction pickIconForSection(sectionName: LessonSectionName): OakIconName {\n switch (sectionName) {\n case \"intro\":\n return \"intro\";\n case \"starter-quiz\":\n case \"exit-quiz\":\n return \"quiz\";\n case \"video\":\n return \"video\";\n }\n}\n\nfunction pickColorsForSection(\n sectionName: LessonSectionName,\n): [\n notStartedBackgroundColor: OakCombinedColorToken,\n backgroundColor: OakCombinedColorToken,\n borderColor: OakCombinedColorToken,\n] {\n switch (sectionName) {\n case \"intro\":\n return [\n \"bg-decorative2-very-subdued\",\n \"bg-decorative2-main\",\n \"border-decorative2-stronger\",\n ];\n case \"starter-quiz\":\n return [\n \"bg-decorative1-very-subdued\",\n \"bg-decorative1-main\",\n \"border-decorative1-stronger\",\n ];\n case \"video\":\n return [\n \"bg-decorative4-very-subdued\",\n \"bg-decorative4-main\",\n \"border-decorative4-stronger\",\n ];\n case \"exit-quiz\":\n return [\n \"bg-decorative5-very-subdued\",\n \"bg-decorative5-main\",\n \"border-decorative5-stronger\",\n ];\n }\n}\n\nfunction pickLabelForSection(sectionName: LessonSectionName): string {\n switch (sectionName) {\n case \"intro\":\n return \"Introduction\";\n case \"starter-quiz\":\n return \"Starter quiz\";\n case \"video\":\n return \"Lesson video\";\n case \"exit-quiz\":\n return \"Exit quiz\";\n }\n}\n\nfunction pickSummaryForProgress(props: SectionProps) {\n switch (props.progress) {\n case \"not-started\":\n return pickSummaryForNotStarted(props);\n case \"in-progress\":\n return \"In progress...\";\n case \"complete\":\n return (\n <OakFlex $gap=\"space-between-sssx\" $alignItems=\"center\">\n <OakIcon\n iconName=\"tick\"\n $width=\"all-spacing-6\"\n $height=\"all-spacing-6\"\n />\n {pickSummaryForComplete(props)}\n </OakFlex>\n );\n }\n}\n\nfunction pickSummaryForNotStarted(props: SectionProps) {\n switch (props.lessonSectionName) {\n case \"intro\":\n return \"Prepare\";\n case \"starter-quiz\":\n return `Activate - ${props.numQuestions} Questions`;\n case \"exit-quiz\":\n return `Check - ${props.numQuestions} questions`;\n case \"video\":\n return \"Learn\";\n }\n}\n\nfunction pickSummaryForComplete(props: SectionProps) {\n switch (props.lessonSectionName) {\n case \"intro\":\n case \"video\":\n return \"Completed\";\n case \"starter-quiz\":\n case \"exit-quiz\":\n // The counter is rendered as the summary next\n // when on a mobile device, so it is hidden on larger screens\n return (\n <>\n <OakBox $display={[\"none\", \"block\"]}>Completed</OakBox>\n <OakBox $display={[\"block\", \"none\"]}>\n {props.grade}/{props.numQuestions} correct\n </OakBox>\n </>\n );\n }\n}\n","import React from \"react\";\nimport styled from \"styled-components\";\n\nimport { OakBox, OakFlex, OakIcon, OakSpan } from \"@/components/atoms\";\nimport { OakRoundIcon } from \"@/components/molecules\";\nimport { OakCombinedColorToken } from \"@/styles\";\n\ntype LessonSectionName = \"intro\" | \"starter-quiz\" | \"video\" | \"exit-quiz\";\ntype BaseOakLessonReviewItemProps = {\n completed: boolean;\n};\ntype QuizSectionProps = {\n lessonSectionName: \"starter-quiz\" | \"exit-quiz\";\n /**\n * The number of questions in the quiz\n */\n numQuestions: number;\n /**\n * The number of questions answered correctly\n */\n grade: number;\n};\n\ntype VideoSectionProps = {\n lessonSectionName: \"video\";\n};\ntype IntroSectionProps = {\n lessonSectionName: \"intro\";\n};\n\nexport type OakLessonReviewItemProps = BaseOakLessonReviewItemProps &\n (IntroSectionProps | QuizSectionProps | VideoSectionProps);\n\nconst StyledLessonReviewItem = styled(OakFlex)<{ completed: boolean }>`\n outline: none;\n text-align: initial;\n`;\n\nexport const OakLessonReviewItem = (props: OakLessonReviewItemProps) => {\n const { completed, lessonSectionName, ...rest } = props;\n const [completedBackgroundColor, borderColor, iconBackgroundColor] =\n pickColorsForSection(lessonSectionName);\n const lessonSectionNameToIconMap = new Map();\n\n lessonSectionNameToIconMap.set(\"intro\", \"intro\");\n lessonSectionNameToIconMap.set(\"starter-quiz\", \"quiz\");\n lessonSectionNameToIconMap.set(\"exit-quiz\", \"quiz\");\n lessonSectionNameToIconMap.set(\"video\", \"video\");\n\n return (\n <StyledLessonReviewItem\n completed={completed}\n $gap=\"space-between-m\"\n $alignItems=\"center\"\n $background={completed ? completedBackgroundColor : \"white\"}\n $ph={[\"inner-padding-m\", \"inner-padding-xl\"]}\n $pv=\"inner-padding-l\"\n $borderRadius=\"border-radius-l\"\n $borderColor={completed ? completedBackgroundColor : borderColor}\n $ba=\"border-solid-l\"\n {...rest}\n >\n <OakRoundIcon\n iconName={lessonSectionNameToIconMap.get(lessonSectionName)}\n $width=\"all-spacing-10\"\n $height=\"all-spacing-10\"\n $background={iconBackgroundColor}\n />\n <OakFlex $flexGrow={1} $flexShrink={1} $flexDirection={\"column\"}>\n <OakBox $font={[\"heading-6\", \"heading-5\"]} $color={\"text-primary\"}>\n {pickLabelForSection(lessonSectionName)}\n </OakBox>\n <OakBox $font={[\"body-2\", \"body-1\"]}>\n {pickSummaryForProgress(props)}\n </OakBox>\n </OakFlex>\n {renderQuestionCounter(props)}\n </StyledLessonReviewItem>\n );\n};\n\nconst pickSummaryForProgress = (props: OakLessonReviewItemProps) => {\n if (props.completed === false) {\n return pickSummaryForIncomplete(props);\n } else {\n return (\n <OakFlex $gap=\"space-between-sssx\" $alignItems=\"center\">\n <OakIcon\n iconName=\"tick\"\n $width=\"all-spacing-6\"\n $height=\"all-spacing-6\"\n />\n Completed\n </OakFlex>\n );\n }\n};\n\nconst pickSummaryForIncomplete = (props: OakLessonReviewItemProps) => {\n switch (props.lessonSectionName) {\n case \"intro\":\n return \"Prepare\";\n case \"starter-quiz\":\n return `Activate - ${props.numQuestions} questions`;\n case \"exit-quiz\":\n return `Check - ${props.numQuestions} questions`;\n case \"video\":\n return \"Learn\";\n }\n};\n\nconst pickLabelForSection = (sectionName: LessonSectionName): string => {\n switch (sectionName) {\n case \"intro\":\n return \"Introduction\";\n case \"starter-quiz\":\n return \"Starter quiz\";\n case \"video\":\n return \"Lesson video\";\n case \"exit-quiz\":\n return \"Exit quiz\";\n }\n};\n\nconst pickColorsForSection = (\n sectionName: LessonSectionName,\n): [\n completedBackgroundColor: OakCombinedColorToken,\n borderColor: OakCombinedColorToken,\n iconBackgroundColor: OakCombinedColorToken,\n] => {\n switch (sectionName) {\n case \"intro\":\n return [\"bg-decorative2-very-subdued\", \"border-decorative2\", \"aqua\"];\n case \"starter-quiz\":\n return [\"bg-decorative1-very-subdued\", \"border-decorative1\", \"mint\"];\n case \"video\":\n return [\"bg-decorative4-very-subdued\", \"border-decorative4\", \"pink\"];\n case \"exit-quiz\":\n return [\"bg-decorative5-very-subdued\", \"border-decorative5\", \"lemon\"];\n }\n};\n\nconst renderQuestionCounter = (props: OakLessonReviewItemProps) => {\n if (props.completed === false) {\n return null;\n }\n\n switch (props.lessonSectionName) {\n case \"exit-quiz\":\n case \"starter-quiz\":\n return (\n <OakBox>\n <OakSpan $font=\"heading-4\">{props.grade}</OakSpan>\n <OakSpan $font=\"heading-6\">&nbsp;/&nbsp;{props.numQuestions}</OakSpan>\n </OakBox>\n );\n default:\n return null;\n }\n};\n","import { useMemo, useLayoutEffect, useEffect, useRef, useCallback } from 'react';\n\nfunction useCombinedRefs() {\n for (var _len = arguments.length, refs = new Array(_len), _key = 0; _key < _len; _key++) {\n refs[_key] = arguments[_key];\n }\n\n return useMemo(() => node => {\n refs.forEach(ref => ref(node));\n }, // eslint-disable-next-line react-hooks/exhaustive-deps\n refs);\n}\n\n// https://github.com/facebook/react/blob/master/packages/shared/ExecutionEnvironment.js\nconst canUseDOM = typeof window !== 'undefined' && typeof window.document !== 'undefined' && typeof window.document.createElement !== 'undefined';\n\nfunction isWindow(element) {\n const elementString = Object.prototype.toString.call(element);\n return elementString === '[object Window]' || // In Electron context the Window object serializes to [object global]\n elementString === '[object global]';\n}\n\nfunction isNode(node) {\n return 'nodeType' in node;\n}\n\nfunction getWindow(target) {\n var _target$ownerDocument, _target$ownerDocument2;\n\n if (!target) {\n return window;\n }\n\n if (isWindow(target)) {\n return target;\n }\n\n if (!isNode(target)) {\n return window;\n }\n\n return (_target$ownerDocument = (_target$ownerDocument2 = target.ownerDocument) == null ? void 0 : _target$ownerDocument2.defaultView) != null ? _target$ownerDocument : window;\n}\n\nfunction isDocument(node) {\n const {\n Document\n } = getWindow(node);\n return node instanceof Document;\n}\n\nfunction isHTMLElement(node) {\n if (isWindow(node)) {\n return false;\n }\n\n return node instanceof getWindow(node).HTMLElement;\n}\n\nfunction isSVGElement(node) {\n return node instanceof getWindow(node).SVGElement;\n}\n\nfunction getOwnerDocument(target) {\n if (!target) {\n return document;\n }\n\n if (isWindow(target)) {\n return target.document;\n }\n\n if (!isNode(target)) {\n return document;\n }\n\n if (isDocument(target)) {\n return target;\n }\n\n if (isHTMLElement(target) || isSVGElement(target)) {\n return target.ownerDocument;\n }\n\n return document;\n}\n\n/**\r\n * A hook that resolves to useEffect on the server and useLayoutEffect on the client\r\n * @param callback {function} Callback function that is invoked when the dependencies of the hook change\r\n */\n\nconst useIsomorphicLayoutEffect = canUseDOM ? useLayoutEffect : useEffect;\n\nfunction useEvent(handler) {\n const handlerRef = useRef(handler);\n useIsomorphicLayoutEffect(() => {\n handlerRef.current = handler;\n });\n return useCallback(function () {\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n return handlerRef.current == null ? void 0 : handlerRef.current(...args);\n }, []);\n}\n\nfunction useInterval() {\n const intervalRef = useRef(null);\n const set = useCallback((listener, duration) => {\n intervalRef.current = setInterval(listener, duration);\n }, []);\n const clear = useCallback(() => {\n if (intervalRef.current !== null) {\n clearInterval(intervalRef.current);\n intervalRef.current = null;\n }\n }, []);\n return [set, clear];\n}\n\nfunction useLatestValue(value, dependencies) {\n if (dependencies === void 0) {\n dependencies = [value];\n }\n\n const valueRef = useRef(value);\n useIsomorphicLayoutEffect(() => {\n if (valueRef.current !== value) {\n valueRef.current = value;\n }\n }, dependencies);\n return valueRef;\n}\n\nfunction useLazyMemo(callback, dependencies) {\n const valueRef = useRef();\n return useMemo(() => {\n const newValue = callback(valueRef.current);\n valueRef.current = newValue;\n return newValue;\n }, // eslint-disable-next-line react-hooks/exhaustive-deps\n [...dependencies]);\n}\n\nfunction useNodeRef(onChange) {\n const onChangeHandler = useEvent(onChange);\n const node = useRef(null);\n const setNodeRef = useCallback(element => {\n if (element !== node.current) {\n onChangeHandler == null ? void 0 : onChangeHandler(element, node.current);\n }\n\n node.current = element;\n }, //eslint-disable-next-line\n []);\n return [node, setNodeRef];\n}\n\nfunction usePrevious(value) {\n const ref = useRef();\n useEffect(() => {\n ref.current = value;\n }, [value]);\n return ref.current;\n}\n\nlet ids = {};\nfunction useUniqueId(prefix, value) {\n return useMemo(() => {\n if (value) {\n return value;\n }\n\n const id = ids[prefix] == null ? 0 : ids[prefix] + 1;\n ids[prefix] = id;\n return prefix + \"-\" + id;\n }, [prefix, value]);\n}\n\nfunction createAdjustmentFn(modifier) {\n return function (object) {\n for (var _len = arguments.length, adjustments = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n adjustments[_key - 1] = arguments[_key];\n }\n\n return adjustments.reduce((accumulator, adjustment) => {\n const entries = Object.entries(adjustment);\n\n for (const [key, valueAdjustment] of entries) {\n const value = accumulator[key];\n\n if (value != null) {\n accumulator[key] = value + modifier * valueAdjustment;\n }\n }\n\n return accumulator;\n }, { ...object\n });\n };\n}\n\nconst add = /*#__PURE__*/createAdjustmentFn(1);\nconst subtract = /*#__PURE__*/createAdjustmentFn(-1);\n\nfunction hasViewportRelativeCoordinates(event) {\n return 'clientX' in event && 'clientY' in event;\n}\n\nfunction isKeyboardEvent(event) {\n if (!event) {\n return false;\n }\n\n const {\n KeyboardEvent\n } = getWindow(event.target);\n return KeyboardEvent && event instanceof KeyboardEvent;\n}\n\nfunction isTouchEvent(event) {\n if (!event) {\n return false;\n }\n\n const {\n TouchEvent\n } = getWindow(event.target);\n return TouchEvent && event instanceof TouchEvent;\n}\n\n/**\r\n * Returns the normalized x and y coordinates for mouse and touch events.\r\n */\n\nfunction getEventCoordinates(event) {\n if (isTouchEvent(event)) {\n if (event.touches && event.touches.length) {\n const {\n clientX: x,\n clientY: y\n } = event.touches[0];\n return {\n x,\n y\n };\n } else if (event.changedTouches && event.changedTouches.length) {\n const {\n clientX: x,\n clientY: y\n } = event.changedTouches[0];\n return {\n x,\n y\n };\n }\n }\n\n if (hasViewportRelativeCoordinates(event)) {\n return {\n x: event.clientX,\n y: event.clientY\n };\n }\n\n return null;\n}\n\nconst CSS = /*#__PURE__*/Object.freeze({\n Translate: {\n toString(transform) {\n if (!transform) {\n return;\n }\n\n const {\n x,\n y\n } = transform;\n return \"translate3d(\" + (x ? Math.round(x) : 0) + \"px, \" + (y ? Math.round(y) : 0) + \"px, 0)\";\n }\n\n },\n Scale: {\n toString(transform) {\n if (!transform) {\n return;\n }\n\n const {\n scaleX,\n scaleY\n } = transform;\n return \"scaleX(\" + scaleX + \") scaleY(\" + scaleY + \")\";\n }\n\n },\n Transform: {\n toString(transform) {\n if (!transform) {\n return;\n }\n\n return [CSS.Translate.toString(transform), CSS.Scale.toString(transform)].join(' ');\n }\n\n },\n Transition: {\n toString(_ref) {\n let {\n property,\n duration,\n easing\n } = _ref;\n return property + \" \" + duration + \"ms \" + easing;\n }\n\n }\n});\n\nconst SELECTOR = 'a,frame,iframe,input:not([type=hidden]):not(:disabled),select:not(:disabled),textarea:not(:disabled),button:not(:disabled),*[tabindex]';\nfunction findFirstFocusableNode(element) {\n if (element.matches(SELECTOR)) {\n return element;\n }\n\n return element.querySelector(SELECTOR);\n}\n\nexport { CSS, add, canUseDOM, findFirstFocusableNode, getEventCoordinates, getOwnerDocument, getWindow, hasViewportRelativeCoordinates, isDocument, isHTMLElement, isKeyboardEvent, isNode, isSVGElement, isTouchEvent, isWindow, subtract, useCombinedRefs, useEvent, useInterval, useIsomorphicLayoutEffect, useLatestValue, useLazyMemo, useNodeRef, usePrevious, useUniqueId };\n//# sourceMappingURL=utilities.esm.js.map\n","import React, { useState, useCallback } from 'react';\n\nconst hiddenStyles = {\n display: 'none'\n};\nfunction HiddenText(_ref) {\n let {\n id,\n value\n } = _ref;\n return React.createElement(\"div\", {\n id: id,\n style: hiddenStyles\n }, value);\n}\n\nfunction LiveRegion(_ref) {\n let {\n id,\n announcement,\n ariaLiveType = \"assertive\"\n } = _ref;\n // Hide element visually but keep it readable by screen readers\n const visuallyHidden = {\n position: 'fixed',\n width: 1,\n height: 1,\n margin: -1,\n border: 0,\n padding: 0,\n overflow: 'hidden',\n clip: 'rect(0 0 0 0)',\n clipPath: 'inset(100%)',\n whiteSpace: 'nowrap'\n };\n return React.createElement(\"div\", {\n id: id,\n style: visuallyHidden,\n role: \"status\",\n \"aria-live\": ariaLiveType,\n \"aria-atomic\": true\n }, announcement);\n}\n\nfunction useAnnouncement() {\n const [announcement, setAnnouncement] = useState('');\n const announce = useCallback(value => {\n if (value != null) {\n setAnnouncement(value);\n }\n }, []);\n return {\n announce,\n announcement\n };\n}\n\nexport { HiddenText, LiveRegion, useAnnouncement };\n//# sourceMappingURL=accessibility.esm.js.map\n","import React, { createContext, useContext, useEffect, useState, useCallback, useMemo, useRef, useReducer, memo, cloneElement, forwardRef } from 'react';\nimport { createPortal, unstable_batchedUpdates } from 'react-dom';\nimport { useUniqueId, getEventCoordinates, getWindow, isDocument, isHTMLElement, isSVGElement, canUseDOM, isWindow, isNode, getOwnerDocument, add, isKeyboardEvent, subtract, useLazyMemo, useInterval, usePrevious, useLatestValue, useEvent, useIsomorphicLayoutEffect, useNodeRef, findFirstFocusableNode, CSS } from '@dnd-kit/utilities';\nimport { useAnnouncement, HiddenText, LiveRegion } from '@dnd-kit/accessibility';\n\nconst DndMonitorContext = /*#__PURE__*/createContext(null);\n\nfunction useDndMonitor(listener) {\n const registerListener = useContext(DndMonitorContext);\n useEffect(() => {\n if (!registerListener) {\n throw new Error('useDndMonitor must be used within a children of <DndContext>');\n }\n\n const unsubscribe = registerListener(listener);\n return unsubscribe;\n }, [listener, registerListener]);\n}\n\nfunction useDndMonitorProvider() {\n const [listeners] = useState(() => new Set());\n const registerListener = useCallback(listener => {\n listeners.add(listener);\n return () => listeners.delete(listener);\n }, [listeners]);\n const dispatch = useCallback(_ref => {\n let {\n type,\n event\n } = _ref;\n listeners.forEach(listener => {\n var _listener$type;\n\n return (_listener$type = listener[type]) == null ? void 0 : _listener$type.call(listener, event);\n });\n }, [listeners]);\n return [dispatch, registerListener];\n}\n\nconst defaultScreenReaderInstructions = {\n draggable: \"\\n To pick up a draggable item, press the space bar.\\n While dragging, use the arrow keys to move the item.\\n Press space again to drop the item in its new position, or press escape to cancel.\\n \"\n};\nconst defaultAnnouncements = {\n onDragStart(_ref) {\n let {\n active\n } = _ref;\n return \"Picked up draggable item \" + active.id + \".\";\n },\n\n onDragOver(_ref2) {\n let {\n active,\n over\n } = _ref2;\n\n if (over) {\n return \"Draggable item \" + active.id + \" was moved over droppable area \" + over.id + \".\";\n }\n\n return \"Draggable item \" + active.id + \" is no longer over a droppable area.\";\n },\n\n onDragEnd(_ref3) {\n let {\n active,\n over\n } = _ref3;\n\n if (over) {\n return \"Draggable item \" + active.id + \" was dropped over droppable area \" + over.id;\n }\n\n return \"Draggable item \" + active.id + \" was dropped.\";\n },\n\n onDragCancel(_ref4) {\n let {\n active\n } = _ref4;\n return \"Dragging was cancelled. Draggable item \" + active.id + \" was dropped.\";\n }\n\n};\n\nfunction Accessibility(_ref) {\n let {\n announcements = defaultAnnouncements,\n container,\n hiddenTextDescribedById,\n screenReaderInstructions = defaultScreenReaderInstructions\n } = _ref;\n const {\n announce,\n announcement\n } = useAnnouncement();\n const liveRegionId = useUniqueId(\"DndLiveRegion\");\n const [mounted, setMounted] = useState(false);\n useEffect(() => {\n setMounted(true);\n }, []);\n useDndMonitor(useMemo(() => ({\n onDragStart(_ref2) {\n let {\n active\n } = _ref2;\n announce(announcements.onDragStart({\n active\n }));\n },\n\n onDragMove(_ref3) {\n let {\n active,\n over\n } = _ref3;\n\n if (announcements.onDragMove) {\n announce(announcements.onDragMove({\n active,\n over\n }));\n }\n },\n\n onDragOver(_ref4) {\n let {\n active,\n over\n } = _ref4;\n announce(announcements.onDragOver({\n active,\n over\n }));\n },\n\n onDragEnd(_ref5) {\n let {\n active,\n over\n } = _ref5;\n announce(announcements.onDragEnd({\n active,\n over\n }));\n },\n\n onDragCancel(_ref6) {\n let {\n active,\n over\n } = _ref6;\n announce(announcements.onDragCancel({\n active,\n over\n }));\n }\n\n }), [announce, announcements]));\n\n if (!mounted) {\n return null;\n }\n\n const markup = React.createElement(React.Fragment, null, React.createElement(HiddenText, {\n id: hiddenTextDescribedById,\n value: screenReaderInstructions.draggable\n }), React.createElement(LiveRegion, {\n id: liveRegionId,\n announcement: announcement\n }));\n return container ? createPortal(markup, container) : markup;\n}\n\nvar Action;\n\n(function (Action) {\n Action[\"DragStart\"] = \"dragStart\";\n Action[\"DragMove\"] = \"dragMove\";\n Action[\"DragEnd\"] = \"dragEnd\";\n Action[\"DragCancel\"] = \"dragCancel\";\n Action[\"DragOver\"] = \"dragOver\";\n Action[\"RegisterDroppable\"] = \"registerDroppable\";\n Action[\"SetDroppableDisabled\"] = \"setDroppableDisabled\";\n Action[\"UnregisterDroppable\"] = \"unregisterDroppable\";\n})(Action || (Action = {}));\n\nfunction noop() {}\n\nfunction useSensor(sensor, options) {\n return useMemo(() => ({\n sensor,\n options: options != null ? options : {}\n }), // eslint-disable-next-line react-hooks/exhaustive-deps\n [sensor, options]);\n}\n\nfunction useSensors() {\n for (var _len = arguments.length, sensors = new Array(_len), _key = 0; _key < _len; _key++) {\n sensors[_key] = arguments[_key];\n }\n\n return useMemo(() => [...sensors].filter(sensor => sensor != null), // eslint-disable-next-line react-hooks/exhaustive-deps\n [...sensors]);\n}\n\nconst defaultCoordinates = /*#__PURE__*/Object.freeze({\n x: 0,\n y: 0\n});\n\n/**\r\n * Returns the distance between two points\r\n */\nfunction distanceBetween(p1, p2) {\n return Math.sqrt(Math.pow(p1.x - p2.x, 2) + Math.pow(p1.y - p2.y, 2));\n}\n\nfunction getRelativeTransformOrigin(event, rect) {\n const eventCoordinates = getEventCoordinates(event);\n\n if (!eventCoordinates) {\n return '0 0';\n }\n\n const transformOrigin = {\n x: (eventCoordinates.x - rect.left) / rect.width * 100,\n y: (eventCoordinates.y - rect.top) / rect.height * 100\n };\n return transformOrigin.x + \"% \" + transformOrigin.y + \"%\";\n}\n\n/**\r\n * Sort collisions from smallest to greatest value\r\n */\nfunction sortCollisionsAsc(_ref, _ref2) {\n let {\n data: {\n value: a\n }\n } = _ref;\n let {\n data: {\n value: b\n }\n } = _ref2;\n return a - b;\n}\n/**\r\n * Sort collisions from greatest to smallest value\r\n */\n\nfunction sortCollisionsDesc(_ref3, _ref4) {\n let {\n data: {\n value: a\n }\n } = _ref3;\n let {\n data: {\n value: b\n }\n } = _ref4;\n return b - a;\n}\n/**\r\n * Returns the coordinates of the corners of a given rectangle:\r\n * [TopLeft {x, y}, TopRight {x, y}, BottomLeft {x, y}, BottomRight {x, y}]\r\n */\n\nfunction cornersOfRectangle(_ref5) {\n let {\n left,\n top,\n height,\n width\n } = _ref5;\n return [{\n x: left,\n y: top\n }, {\n x: left + width,\n y: top\n }, {\n x: left,\n y: top + height\n }, {\n x: left + width,\n y: top + height\n }];\n}\nfunction getFirstCollision(collisions, property) {\n if (!collisions || collisions.length === 0) {\n return null;\n }\n\n const [firstCollision] = collisions;\n return property ? firstCollision[property] : firstCollision;\n}\n\n/**\r\n * Returns the coordinates of the center of a given ClientRect\r\n */\n\nfunction centerOfRectangle(rect, left, top) {\n if (left === void 0) {\n left = rect.left;\n }\n\n if (top === void 0) {\n top = rect.top;\n }\n\n return {\n x: left + rect.width * 0.5,\n y: top + rect.height * 0.5\n };\n}\n/**\r\n * Returns the closest rectangles from an array of rectangles to the center of a given\r\n * rectangle.\r\n */\n\n\nconst closestCenter = _ref => {\n let {\n collisionRect,\n droppableRects,\n droppableContainers\n } = _ref;\n const centerRect = centerOfRectangle(collisionRect, collisionRect.left, collisionRect.top);\n const collisions = [];\n\n for (const droppableContainer of droppableContainers) {\n const {\n id\n } = droppableContainer;\n const rect = droppableRects.get(id);\n\n if (rect) {\n const distBetween = distanceBetween(centerOfRectangle(rect), centerRect);\n collisions.push({\n id,\n data: {\n droppableContainer,\n value: distBetween\n }\n });\n }\n }\n\n return collisions.sort(sortCollisionsAsc);\n};\n\n/**\r\n * Returns the closest rectangles from an array of rectangles to the corners of\r\n * another rectangle.\r\n */\n\nconst closestCorners = _ref => {\n let {\n collisionRect,\n droppableRects,\n droppableContainers\n } = _ref;\n const corners = cornersOfRectangle(collisionRect);\n const collisions = [];\n\n for (const droppableContainer of droppableContainers) {\n const {\n id\n } = droppableContainer;\n const rect = droppableRects.get(id);\n\n if (rect) {\n const rectCorners = cornersOfRectangle(rect);\n const distances = corners.reduce((accumulator, corner, index) => {\n return accumulator + distanceBetween(rectCorners[index], corner);\n }, 0);\n const effectiveDistance = Number((distances / 4).toFixed(4));\n collisions.push({\n id,\n data: {\n droppableContainer,\n value: effectiveDistance\n }\n });\n }\n }\n\n return collisions.sort(sortCollisionsAsc);\n};\n\n/**\r\n * Returns the intersecting rectangle area between two rectangles\r\n */\n\nfunction getIntersectionRatio(entry, target) {\n const top = Math.max(target.top, entry.top);\n const left = Math.max(target.left, entry.left);\n const right = Math.min(target.left + target.width, entry.left + entry.width);\n const bottom = Math.min(target.top + target.height, entry.top + entry.height);\n const width = right - left;\n const height = bottom - top;\n\n if (left < right && top < bottom) {\n const targetArea = target.width * target.height;\n const entryArea = entry.width * entry.height;\n const intersectionArea = width * height;\n const intersectionRatio = intersectionArea / (targetArea + entryArea - intersectionArea);\n return Number(intersectionRatio.toFixed(4));\n } // Rectangles do not overlap, or overlap has an area of zero (edge/corner overlap)\n\n\n return 0;\n}\n/**\r\n * Returns the rectangles that has the greatest intersection area with a given\r\n * rectangle in an array of rectangles.\r\n */\n\nconst rectIntersection = _ref => {\n let {\n collisionRect,\n droppableRects,\n droppableContainers\n } = _ref;\n const collisions = [];\n\n for (const droppableContainer of droppableContainers) {\n const {\n id\n } = droppableContainer;\n const rect = droppableRects.get(id);\n\n if (rect) {\n const intersectionRatio = getIntersectionRatio(rect, collisionRect);\n\n if (intersectionRatio > 0) {\n collisions.push({\n id,\n data: {\n droppableContainer,\n value: intersectionRatio\n }\n });\n }\n }\n }\n\n return collisions.sort(sortCollisionsDesc);\n};\n\n/**\r\n * Check if a given point is contained within a bounding rectangle\r\n */\n\nfunction isPointWithinRect(point, rect) {\n const {\n top,\n left,\n bottom,\n right\n } = rect;\n return top <= point.y && point.y <= bottom && left <= point.x && point.x <= right;\n}\n/**\r\n * Returns the rectangles that the pointer is hovering over\r\n */\n\n\nconst pointerWithin = _ref => {\n let {\n droppableContainers,\n droppableRects,\n pointerCoordinates\n } = _ref;\n\n if (!pointerCoordinates) {\n return [];\n }\n\n const collisions = [];\n\n for (const droppableContainer of droppableContainers) {\n const {\n id\n } = droppableContainer;\n const rect = droppableRects.get(id);\n\n if (rect && isPointWithinRect(pointerCoordinates, rect)) {\n /* There may be more than a single rectangle intersecting\r\n * with the pointer coordinates. In order to sort the\r\n * colliding rectangles, we measure the distance between\r\n * the pointer and the corners of the intersecting rectangle\r\n */\n const corners = cornersOfRectangle(rect);\n const distances = corners.reduce((accumulator, corner) => {\n return accumulator + distanceBetween(pointerCoordinates, corner);\n }, 0);\n const effectiveDistance = Number((distances / 4).toFixed(4));\n collisions.push({\n id,\n data: {\n droppableContainer,\n value: effectiveDistance\n }\n });\n }\n }\n\n return collisions.sort(sortCollisionsAsc);\n};\n\nfunction adjustScale(transform, rect1, rect2) {\n return { ...transform,\n scaleX: rect1 && rect2 ? rect1.width / rect2.width : 1,\n scaleY: rect1 && rect2 ? rect1.height / rect2.height : 1\n };\n}\n\nfunction getRectDelta(rect1, rect2) {\n return rect1 && rect2 ? {\n x: rect1.left - rect2.left,\n y: rect1.top - rect2.top\n } : defaultCoordinates;\n}\n\nfunction createRectAdjustmentFn(modifier) {\n return function adjustClientRect(rect) {\n for (var _len = arguments.length, adjustments = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n adjustments[_key - 1] = arguments[_key];\n }\n\n return adjustments.reduce((acc, adjustment) => ({ ...acc,\n top: acc.top + modifier * adjustment.y,\n bottom: acc.bottom + modifier * adjustment.y,\n left: acc.left + modifier * adjustment.x,\n right: acc.right + modifier * adjustment.x\n }), { ...rect\n });\n };\n}\nconst getAdjustedRect = /*#__PURE__*/createRectAdjustmentFn(1);\n\nfunction parseTransform(transform) {\n if (transform.startsWith('matrix3d(')) {\n const transformArray = transform.slice(9, -1).split(/, /);\n return {\n x: +transformArray[12],\n y: +transformArray[13],\n scaleX: +transformArray[0],\n scaleY: +transformArray[5]\n };\n } else if (transform.startsWith('matrix(')) {\n const transformArray = transform.slice(7, -1).split(/, /);\n return {\n x: +transformArray[4],\n y: +transformArray[5],\n scaleX: +transformArray[0],\n scaleY: +transformArray[3]\n };\n }\n\n return null;\n}\n\nfunction inverseTransform(rect, transform, transformOrigin) {\n const parsedTransform = parseTransform(transform);\n\n if (!parsedTransform) {\n return rect;\n }\n\n const {\n scaleX,\n scaleY,\n x: translateX,\n y: translateY\n } = parsedTransform;\n const x = rect.left - translateX - (1 - scaleX) * parseFloat(transformOrigin);\n const y = rect.top - translateY - (1 - scaleY) * parseFloat(transformOrigin.slice(transformOrigin.indexOf(' ') + 1));\n const w = scaleX ? rect.width / scaleX : rect.width;\n const h = scaleY ? rect.height / scaleY : rect.height;\n return {\n width: w,\n height: h,\n top: y,\n right: x + w,\n bottom: y + h,\n left: x\n };\n}\n\nconst defaultOptions = {\n ignoreTransform: false\n};\n/**\r\n * Returns the bounding client rect of an element relative to the viewport.\r\n */\n\nfunction getClientRect(element, options) {\n if (options === void 0) {\n options = defaultOptions;\n }\n\n let rect = element.getBoundingClientRect();\n\n if (options.ignoreTransform) {\n const {\n transform,\n transformOrigin\n } = getWindow(element).getComputedStyle(element);\n\n if (transform) {\n rect = inverseTransform(rect, transform, transformOrigin);\n }\n }\n\n const {\n top,\n left,\n width,\n height,\n bottom,\n right\n } = rect;\n return {\n top,\n left,\n width,\n height,\n bottom,\n right\n };\n}\n/**\r\n * Returns the bounding client rect of an element relative to the viewport.\r\n *\r\n * @remarks\r\n * The ClientRect returned by this method does not take into account transforms\r\n * applied to the element it measures.\r\n *\r\n */\n\nfunction getTransformAgnosticClientRect(element) {\n return getClientRect(element, {\n ignoreTransform: true\n });\n}\n\nfunction getWindowClientRect(element) {\n const width = element.innerWidth;\n const height = element.innerHeight;\n return {\n top: 0,\n left: 0,\n right: width,\n bottom: height,\n width,\n height\n };\n}\n\nfunction isFixed(node, computedStyle) {\n if (computedStyle === void 0) {\n computedStyle = getWindow(node).getComputedStyle(node);\n }\n\n return computedStyle.position === 'fixed';\n}\n\nfunction isScrollable(element, computedStyle) {\n if (computedStyle === void 0) {\n computedStyle = getWindow(element).getComputedStyle(element);\n }\n\n const overflowRegex = /(auto|scroll|overlay)/;\n const properties = ['overflow', 'overflowX', 'overflowY'];\n return properties.some(property => {\n const value = computedStyle[property];\n return typeof value === 'string' ? overflowRegex.test(value) : false;\n });\n}\n\nfunction getScrollableAncestors(element, limit) {\n const scrollParents = [];\n\n function findScrollableAncestors(node) {\n if (limit != null && scrollParents.length >= limit) {\n return scrollParents;\n }\n\n if (!node) {\n return scrollParents;\n }\n\n if (isDocument(node) && node.scrollingElement != null && !scrollParents.includes(node.scrollingElement)) {\n scrollParents.push(node.scrollingElement);\n return scrollParents;\n }\n\n if (!isHTMLElement(node) || isSVGElement(node)) {\n return scrollParents;\n }\n\n if (scrollParents.includes(node)) {\n return scrollParents;\n }\n\n const computedStyle = getWindow(element).getComputedStyle(node);\n\n if (node !== element) {\n if (isScrollable(node, computedStyle)) {\n scrollParents.push(node);\n }\n }\n\n if (isFixed(node, computedStyle)) {\n return scrollParents;\n }\n\n return findScrollableAncestors(node.parentNode);\n }\n\n if (!element) {\n return scrollParents;\n }\n\n return findScrollableAncestors(element);\n}\nfunction getFirstScrollableAncestor(node) {\n const [firstScrollableAncestor] = getScrollableAncestors(node, 1);\n return firstScrollableAncestor != null ? firstScrollableAncestor : null;\n}\n\nfunction getScrollableElement(element) {\n if (!canUseDOM || !element) {\n return null;\n }\n\n if (isWindow(element)) {\n return element;\n }\n\n if (!isNode(element)) {\n return null;\n }\n\n if (isDocument(element) || element === getOwnerDocument(element).scrollingElement) {\n return window;\n }\n\n if (isHTMLElement(element)) {\n return element;\n }\n\n return null;\n}\n\nfunction getScrollXCoordinate(element) {\n if (isWindow(element)) {\n return element.scrollX;\n }\n\n return element.scrollLeft;\n}\nfunction getScrollYCoordinate(element) {\n if (isWindow(element)) {\n return element.scrollY;\n }\n\n return element.scrollTop;\n}\nfunction getScrollCoordinates(element) {\n return {\n x: getScrollXCoordinate(element),\n y: getScrollYCoordinate(element)\n };\n}\n\nvar Direction;\n\n(function (Direction) {\n Direction[Direction[\"Forward\"] = 1] = \"Forward\";\n Direction[Direction[\"Backward\"] = -1] = \"Backward\";\n})(Direction || (Direction = {}));\n\nfunction isDocumentScrollingElement(element) {\n if (!canUseDOM || !element) {\n return false;\n }\n\n return element === document.scrollingElement;\n}\n\nfunction getScrollPosition(scrollingContainer) {\n const minScroll = {\n x: 0,\n y: 0\n };\n const dimensions = isDocumentScrollingElement(scrollingContainer) ? {\n height: window.innerHeight,\n width: window.innerWidth\n } : {\n height: scrollingContainer.clientHeight,\n width: scrollingContainer.clientWidth\n };\n const maxScroll = {\n x: scrollingContainer.scrollWidth - dimensions.width,\n y: scrollingContainer.scrollHeight - dimensions.height\n };\n const isTop = scrollingContainer.scrollTop <= minScroll.y;\n const isLeft = scrollingContainer.scrollLeft <= minScroll.x;\n const isBottom = scrollingContainer.scrollTop >= maxScroll.y;\n const isRight = scrollingContainer.scrollLeft >= maxScroll.x;\n return {\n isTop,\n isLeft,\n isBottom,\n isRight,\n maxScroll,\n minScroll\n };\n}\n\nconst defaultThreshold = {\n x: 0.2,\n y: 0.2\n};\nfunction getScrollDirectionAndSpeed(scrollContainer, scrollContainerRect, _ref, acceleration, thresholdPercentage) {\n let {\n top,\n left,\n right,\n bottom\n } = _ref;\n\n if (acceleration === void 0) {\n acceleration = 10;\n }\n\n if (thresholdPercentage === void 0) {\n thresholdPercentage = defaultThreshold;\n }\n\n const {\n isTop,\n isBottom,\n isLeft,\n isRight\n } = getScrollPosition(scrollContainer);\n const direction = {\n x: 0,\n y: 0\n };\n const speed = {\n x: 0,\n y: 0\n };\n const threshold = {\n height: scrollContainerRect.height * thresholdPercentage.y,\n width: scrollContainerRect.width * thresholdPercentage.x\n };\n\n if (!isTop && top <= scrollContainerRect.top + threshold.height) {\n // Scroll Up\n direction.y = Direction.Backward;\n speed.y = acceleration * Math.abs((scrollContainerRect.top + threshold.height - top) / threshold.height);\n } else if (!isBottom && bottom >= scrollContainerRect.bottom - threshold.height) {\n // Scroll Down\n direction.y = Direction.Forward;\n speed.y = acceleration * Math.abs((scrollContainerRect.bottom - threshold.height - bottom) / threshold.height);\n }\n\n if (!isRight && right >= scrollContainerRect.right - threshold.width) {\n // Scroll Right\n direction.x = Direction.Forward;\n speed.x = acceleration * Math.abs((scrollContainerRect.right - threshold.width - right) / threshold.width);\n } else if (!isLeft && left <= scrollContainerRect.left + threshold.width) {\n // Scroll Left\n direction.x = Direction.Backward;\n speed.x = acceleration * Math.abs((scrollContainerRect.left + threshold.width - left) / threshold.width);\n }\n\n return {\n direction,\n speed\n };\n}\n\nfunction getScrollElementRect(element) {\n if (element === document.scrollingElement) {\n const {\n innerWidth,\n innerHeight\n } = window;\n return {\n top: 0,\n left: 0,\n right: innerWidth,\n bottom: innerHeight,\n width: innerWidth,\n height: innerHeight\n };\n }\n\n const {\n top,\n left,\n right,\n bottom\n } = element.getBoundingClientRect();\n return {\n top,\n left,\n right,\n bottom,\n width: element.clientWidth,\n height: element.clientHeight\n };\n}\n\nfunction getScrollOffsets(scrollableAncestors) {\n return scrollableAncestors.reduce((acc, node) => {\n return add(acc, getScrollCoordinates(node));\n }, defaultCoordinates);\n}\nfunction getScrollXOffset(scrollableAncestors) {\n return scrollableAncestors.reduce((acc, node) => {\n return acc + getScrollXCoordinate(node);\n }, 0);\n}\nfunction getScrollYOffset(scrollableAncestors) {\n return scrollableAncestors.reduce((acc, node) => {\n return acc + getScrollYCoordinate(node);\n }, 0);\n}\n\nfunction scrollIntoViewIfNeeded(element, measure) {\n if (measure === void 0) {\n measure = getClientRect;\n }\n\n if (!element) {\n return;\n }\n\n const {\n top,\n left,\n bottom,\n right\n } = measure(element);\n const firstScrollableAncestor = getFirstScrollableAncestor(element);\n\n if (!firstScrollableAncestor) {\n return;\n }\n\n if (bottom <= 0 || right <= 0 || top >= window.innerHeight || left >= window.innerWidth) {\n element.scrollIntoView({\n block: 'center',\n inline: 'center'\n });\n }\n}\n\nconst properties = [['x', ['left', 'right'], getScrollXOffset], ['y', ['top', 'bottom'], getScrollYOffset]];\nclass Rect {\n constructor(rect, element) {\n this.rect = void 0;\n this.width = void 0;\n this.height = void 0;\n this.top = void 0;\n this.bottom = void 0;\n this.right = void 0;\n this.left = void 0;\n const scrollableAncestors = getScrollableAncestors(element);\n const scrollOffsets = getScrollOffsets(scrollableAncestors);\n this.rect = { ...rect\n };\n this.width = rect.width;\n this.height = rect.height;\n\n for (const [axis, keys, getScrollOffset] of properties) {\n for (const key of keys) {\n Object.defineProperty(this, key, {\n get: () => {\n const currentOffsets = getScrollOffset(scrollableAncestors);\n const scrollOffsetsDeltla = scrollOffsets[axis] - currentOffsets;\n return this.rect[key] + scrollOffsetsDeltla;\n },\n enumerable: true\n });\n }\n }\n\n Object.defineProperty(this, 'rect', {\n enumerable: false\n });\n }\n\n}\n\nclass Listeners {\n constructor(target) {\n this.target = void 0;\n this.listeners = [];\n\n this.removeAll = () => {\n this.listeners.forEach(listener => {\n var _this$target;\n\n return (_this$target = this.target) == null ? void 0 : _this$target.removeEventListener(...listener);\n });\n };\n\n this.target = target;\n }\n\n add(eventName, handler, options) {\n var _this$target2;\n\n (_this$target2 = this.target) == null ? void 0 : _this$target2.addEventListener(eventName, handler, options);\n this.listeners.push([eventName, handler, options]);\n }\n\n}\n\nfunction getEventListenerTarget(target) {\n // If the `event.target` element is removed from the document events will still be targeted\n // at it, and hence won't always bubble up to the window or document anymore.\n // If there is any risk of an element being removed while it is being dragged,\n // the best practice is to attach the event listeners directly to the target.\n // https://developer.mozilla.org/en-US/docs/Web/API/EventTarget\n const {\n EventTarget\n } = getWindow(target);\n return target instanceof EventTarget ? target : getOwnerDocument(target);\n}\n\nfunction hasExceededDistance(delta, measurement) {\n const dx = Math.abs(delta.x);\n const dy = Math.abs(delta.y);\n\n if (typeof measurement === 'number') {\n return Math.sqrt(dx ** 2 + dy ** 2) > measurement;\n }\n\n if ('x' in measurement && 'y' in measurement) {\n return dx > measurement.x && dy > measurement.y;\n }\n\n if ('x' in measurement) {\n return dx > measurement.x;\n }\n\n if ('y' in measurement) {\n return dy > measurement.y;\n }\n\n return false;\n}\n\nvar EventName;\n\n(function (EventName) {\n EventName[\"Click\"] = \"click\";\n EventName[\"DragStart\"] = \"dragstart\";\n EventName[\"Keydown\"] = \"keydown\";\n EventName[\"ContextMenu\"] = \"contextmenu\";\n EventName[\"Resize\"] = \"resize\";\n EventName[\"SelectionChange\"] = \"selectionchange\";\n EventName[\"VisibilityChange\"] = \"visibilitychange\";\n})(EventName || (EventName = {}));\n\nfunction preventDefault(event) {\n event.preventDefault();\n}\nfunction stopPropagation(event) {\n event.stopPropagation();\n}\n\nvar KeyboardCode;\n\n(function (KeyboardCode) {\n KeyboardCode[\"Space\"] = \"Space\";\n KeyboardCode[\"Down\"] = \"ArrowDown\";\n KeyboardCode[\"Right\"] = \"ArrowRight\";\n KeyboardCode[\"Left\"] = \"ArrowLeft\";\n KeyboardCode[\"Up\"] = \"ArrowUp\";\n KeyboardCode[\"Esc\"] = \"Escape\";\n KeyboardCode[\"Enter\"] = \"Enter\";\n})(KeyboardCode || (KeyboardCode = {}));\n\nconst defaultKeyboardCodes = {\n start: [KeyboardCode.Space, KeyboardCode.Enter],\n cancel: [KeyboardCode.Esc],\n end: [KeyboardCode.Space, KeyboardCode.Enter]\n};\nconst defaultKeyboardCoordinateGetter = (event, _ref) => {\n let {\n currentCoordinates\n } = _ref;\n\n switch (event.code) {\n case KeyboardCode.Right:\n return { ...currentCoordinates,\n x: currentCoordinates.x + 25\n };\n\n case KeyboardCode.Left:\n return { ...currentCoordinates,\n x: currentCoordinates.x - 25\n };\n\n case KeyboardCode.Down:\n return { ...currentCoordinates,\n y: currentCoordinates.y + 25\n };\n\n case KeyboardCode.Up:\n return { ...currentCoordinates,\n y: currentCoordinates.y - 25\n };\n }\n\n return undefined;\n};\n\nclass KeyboardSensor {\n constructor(props) {\n this.props = void 0;\n this.autoScrollEnabled = false;\n this.referenceCoordinates = void 0;\n this.listeners = void 0;\n this.windowListeners = void 0;\n this.props = props;\n const {\n event: {\n target\n }\n } = props;\n this.props = props;\n this.listeners = new Listeners(getOwnerDocument(target));\n this.windowListeners = new Listeners(getWindow(target));\n this.handleKeyDown = this.handleKeyDown.bind(this);\n this.handleCancel = this.handleCancel.bind(this);\n this.attach();\n }\n\n attach() {\n this.handleStart();\n this.windowListeners.add(EventName.Resize, this.handleCancel);\n this.windowListeners.add(EventName.VisibilityChange, this.handleCancel);\n setTimeout(() => this.listeners.add(EventName.Keydown, this.handleKeyDown));\n }\n\n handleStart() {\n const {\n activeNode,\n onStart\n } = this.props;\n const node = activeNode.node.current;\n\n if (node) {\n scrollIntoViewIfNeeded(node);\n }\n\n onStart(defaultCoordinates);\n }\n\n handleKeyDown(event) {\n if (isKeyboardEvent(event)) {\n const {\n active,\n context,\n options\n } = this.props;\n const {\n keyboardCodes = defaultKeyboardCodes,\n coordinateGetter = defaultKeyboardCoordinateGetter,\n scrollBehavior = 'smooth'\n } = options;\n const {\n code\n } = event;\n\n if (keyboardCodes.end.includes(code)) {\n this.handleEnd(event);\n return;\n }\n\n if (keyboardCodes.cancel.includes(code)) {\n this.handleCancel(event);\n return;\n }\n\n const {\n collisionRect\n } = context.current;\n const currentCoordinates = collisionRect ? {\n x: collisionRect.left,\n y: collisionRect.top\n } : defaultCoordinates;\n\n if (!this.referenceCoordinates) {\n this.referenceCoordinates = currentCoordinates;\n }\n\n const newCoordinates = coordinateGetter(event, {\n active,\n context: context.current,\n currentCoordinates\n });\n\n if (newCoordinates) {\n const coordinatesDelta = subtract(newCoordinates, currentCoordinates);\n const scrollDelta = {\n x: 0,\n y: 0\n };\n const {\n scrollableAncestors\n } = context.current;\n\n for (const scrollContainer of scrollableAncestors) {\n const direction = event.code;\n const {\n isTop,\n isRight,\n isLeft,\n isBottom,\n maxScroll,\n minScroll\n } = getScrollPosition(scrollContainer);\n const scrollElementRect = getScrollElementRect(scrollContainer);\n const clampedCoordinates = {\n x: Math.min(direction === KeyboardCode.Right ? scrollElementRect.right - scrollElementRect.width / 2 : scrollElementRect.right, Math.max(direction === KeyboardCode.Right ? scrollElementRect.left : scrollElementRect.left + scrollElementRect.width / 2, newCoordinates.x)),\n y: Math.min(direction === KeyboardCode.Down ? scrollElementRect.bottom - scrollElementRect.height / 2 : scrollElementRect.bottom, Math.max(direction === KeyboardCode.Down ? scrollElementRect.top : scrollElementRect.top + scrollElementRect.height / 2, newCoordinates.y))\n };\n const canScrollX = direction === KeyboardCode.Right && !isRight || direction === KeyboardCode.Left && !isLeft;\n const canScrollY = direction === KeyboardCode.Down && !isBottom || direction === KeyboardCode.Up && !isTop;\n\n if (canScrollX && clampedCoordinates.x !== newCoordinates.x) {\n const newScrollCoordinates = scrollContainer.scrollLeft + coordinatesDelta.x;\n const canScrollToNewCoordinates = direction === KeyboardCode.Right && newScrollCoordinates <= maxScroll.x || direction === KeyboardCode.Left && newScrollCoordinates >= minScroll.x;\n\n if (canScrollToNewCoordinates && !coordinatesDelta.y) {\n // We don't need to update coordinates, the scroll adjustment alone will trigger\n // logic to auto-detect the new container we are over\n scrollContainer.scrollTo({\n left: newScrollCoordinates,\n behavior: scrollBehavior\n });\n return;\n }\n\n if (canScrollToNewCoordinates) {\n scrollDelta.x = scrollContainer.scrollLeft - newScrollCoordinates;\n } else {\n scrollDelta.x = direction === KeyboardCode.Right ? scrollContainer.scrollLeft - maxScroll.x : scrollContainer.scrollLeft - minScroll.x;\n }\n\n if (scrollDelta.x) {\n scrollContainer.scrollBy({\n left: -scrollDelta.x,\n behavior: scrollBehavior\n });\n }\n\n break;\n } else if (canScrollY && clampedCoordinates.y !== newCoordinates.y) {\n const newScrollCoordinates = scrollContainer.scrollTop + coordinatesDelta.y;\n const canScrollToNewCoordinates = direction === KeyboardCode.Down && newScrollCoordinates <= maxScroll.y || direction === KeyboardCode.Up && newScrollCoordinates >= minScroll.y;\n\n if (canScrollToNewCoordinates && !coordinatesDelta.x) {\n // We don't need to update coordinates, the scroll adjustment alone will trigger\n // logic to auto-detect the new container we are over\n scrollContainer.scrollTo({\n top: newScrollCoordinates,\n behavior: scrollBehavior\n });\n return;\n }\n\n if (canScrollToNewCoordinates) {\n scrollDelta.y = scrollContainer.scrollTop - newScrollCoordinates;\n } else {\n scrollDelta.y = direction === KeyboardCode.Down ? scrollContainer.scrollTop - maxScroll.y : scrollContainer.scrollTop - minScroll.y;\n }\n\n if (scrollDelta.y) {\n scrollContainer.scrollBy({\n top: -scrollDelta.y,\n behavior: scrollBehavior\n });\n }\n\n break;\n }\n }\n\n this.handleMove(event, add(subtract(newCoordinates, this.referenceCoordinates), scrollDelta));\n }\n }\n }\n\n handleMove(event, coordinates) {\n const {\n onMove\n } = this.props;\n event.preventDefault();\n onMove(coordinates);\n }\n\n handleEnd(event) {\n const {\n onEnd\n } = this.props;\n event.preventDefault();\n this.detach();\n onEnd();\n }\n\n handleCancel(event) {\n const {\n onCancel\n } = this.props;\n event.preventDefault();\n this.detach();\n onCancel();\n }\n\n detach() {\n this.listeners.removeAll();\n this.windowListeners.removeAll();\n }\n\n}\nKeyboardSensor.activators = [{\n eventName: 'onKeyDown',\n handler: (event, _ref, _ref2) => {\n let {\n keyboardCodes = defaultKeyboardCodes,\n onActivation\n } = _ref;\n let {\n active\n } = _ref2;\n const {\n code\n } = event.nativeEvent;\n\n if (keyboardCodes.start.includes(code)) {\n const activator = active.activatorNode.current;\n\n if (activator && event.target !== activator) {\n return false;\n }\n\n event.preventDefault();\n onActivation == null ? void 0 : onActivation({\n event: event.nativeEvent\n });\n return true;\n }\n\n return false;\n }\n}];\n\nfunction isDistanceConstraint(constraint) {\n return Boolean(constraint && 'distance' in constraint);\n}\n\nfunction isDelayConstraint(constraint) {\n return Boolean(constraint && 'delay' in constraint);\n}\n\nclass AbstractPointerSensor {\n constructor(props, events, listenerTarget) {\n var _getEventCoordinates;\n\n if (listenerTarget === void 0) {\n listenerTarget = getEventListenerTarget(props.event.target);\n }\n\n this.props = void 0;\n this.events = void 0;\n this.autoScrollEnabled = true;\n this.document = void 0;\n this.activated = false;\n this.initialCoordinates = void 0;\n this.timeoutId = null;\n this.listeners = void 0;\n this.documentListeners = void 0;\n this.windowListeners = void 0;\n this.props = props;\n this.events = events;\n const {\n event\n } = props;\n const {\n target\n } = event;\n this.props = props;\n this.events = events;\n this.document = getOwnerDocument(target);\n this.documentListeners = new Listeners(this.document);\n this.listeners = new Listeners(listenerTarget);\n this.windowListeners = new Listeners(getWindow(target));\n this.initialCoordinates = (_getEventCoordinates = getEventCoordinates(event)) != null ? _getEventCoordinates : defaultCoordinates;\n this.handleStart = this.handleStart.bind(this);\n this.handleMove = this.handleMove.bind(this);\n this.handleEnd = this.handleEnd.bind(this);\n this.handleCancel = this.handleCancel.bind(this);\n this.handleKeydown = this.handleKeydown.bind(this);\n this.removeTextSelection = this.removeTextSelection.bind(this);\n this.attach();\n }\n\n attach() {\n const {\n events,\n props: {\n options: {\n activationConstraint,\n bypassActivationConstraint\n }\n }\n } = this;\n this.listeners.add(events.move.name, this.handleMove, {\n passive: false\n });\n this.listeners.add(events.end.name, this.handleEnd);\n this.windowListeners.add(EventName.Resize, this.handleCancel);\n this.windowListeners.add(EventName.DragStart, preventDefault);\n this.windowListeners.add(EventName.VisibilityChange, this.handleCancel);\n this.windowListeners.add(EventName.ContextMenu, preventDefault);\n this.documentListeners.add(EventName.Keydown, this.handleKeydown);\n\n if (activationConstraint) {\n if (bypassActivationConstraint != null && bypassActivationConstraint({\n event: this.props.event,\n activeNode: this.props.activeNode,\n options: this.props.options\n })) {\n return this.handleStart();\n }\n\n if (isDelayConstraint(activationConstraint)) {\n this.timeoutId = setTimeout(this.handleStart, activationConstraint.delay);\n return;\n }\n\n if (isDistanceConstraint(activationConstraint)) {\n return;\n }\n }\n\n this.handleStart();\n }\n\n detach() {\n this.listeners.removeAll();\n this.windowListeners.removeAll(); // Wait until the next event loop before removing document listeners\n // This is necessary because we listen for `click` and `selection` events on the document\n\n setTimeout(this.documentListeners.removeAll, 50);\n\n if (this.timeoutId !== null) {\n clearTimeout(this.timeoutId);\n this.timeoutId = null;\n }\n }\n\n handleStart() {\n const {\n initialCoordinates\n } = this;\n const {\n onStart\n } = this.props;\n\n if (initialCoordinates) {\n this.activated = true; // Stop propagation of click events once activation constraints are met\n\n this.documentListeners.add(EventName.Click, stopPropagation, {\n capture: true\n }); // Remove any text selection from the document\n\n this.removeTextSelection(); // Prevent further text selection while dragging\n\n this.documentListeners.add(EventName.SelectionChange, this.removeTextSelection);\n onStart(initialCoordinates);\n }\n }\n\n handleMove(event) {\n var _getEventCoordinates2;\n\n const {\n activated,\n initialCoordinates,\n props\n } = this;\n const {\n onMove,\n options: {\n activationConstraint\n }\n } = props;\n\n if (!initialCoordinates) {\n return;\n }\n\n const coordinates = (_getEventCoordinates2 = getEventCoordinates(event)) != null ? _getEventCoordinates2 : defaultCoordinates;\n const delta = subtract(initialCoordinates, coordinates); // Constraint validation\n\n if (!activated && activationConstraint) {\n if (isDistanceConstraint(activationConstraint)) {\n if (activationConstraint.tolerance != null && hasExceededDistance(delta, activationConstraint.tolerance)) {\n return this.handleCancel();\n }\n\n if (hasExceededDistance(delta, activationConstraint.distance)) {\n return this.handleStart();\n }\n }\n\n if (isDelayConstraint(activationConstraint)) {\n if (hasExceededDistance(delta, activationConstraint.tolerance)) {\n return this.handleCancel();\n }\n }\n\n return;\n }\n\n if (event.cancelable) {\n event.preventDefault();\n }\n\n onMove(coordinates);\n }\n\n handleEnd() {\n const {\n onEnd\n } = this.props;\n this.detach();\n onEnd();\n }\n\n handleCancel() {\n const {\n onCancel\n } = this.props;\n this.detach();\n onCancel();\n }\n\n handleKeydown(event) {\n if (event.code === KeyboardCode.Esc) {\n this.handleCancel();\n }\n }\n\n removeTextSelection() {\n var _this$document$getSel;\n\n (_this$document$getSel = this.document.getSelection()) == null ? void 0 : _this$document$getSel.removeAllRanges();\n }\n\n}\n\nconst events = {\n move: {\n name: 'pointermove'\n },\n end: {\n name: 'pointerup'\n }\n};\nclass PointerSensor extends AbstractPointerSensor {\n constructor(props) {\n const {\n event\n } = props; // Pointer events stop firing if the target is unmounted while dragging\n // Therefore we attach listeners to the owner document instead\n\n const listenerTarget = getOwnerDocument(event.target);\n super(props, events, listenerTarget);\n }\n\n}\nPointerSensor.activators = [{\n eventName: 'onPointerDown',\n handler: (_ref, _ref2) => {\n let {\n nativeEvent: event\n } = _ref;\n let {\n onActivation\n } = _ref2;\n\n if (!event.isPrimary || event.button !== 0) {\n return false;\n }\n\n onActivation == null ? void 0 : onActivation({\n event\n });\n return true;\n }\n}];\n\nconst events$1 = {\n move: {\n name: 'mousemove'\n },\n end: {\n name: 'mouseup'\n }\n};\nvar MouseButton;\n\n(function (MouseButton) {\n MouseButton[MouseButton[\"RightClick\"] = 2] = \"RightClick\";\n})(MouseButton || (MouseButton = {}));\n\nclass MouseSensor extends AbstractPointerSensor {\n constructor(props) {\n super(props, events$1, getOwnerDocument(props.event.target));\n }\n\n}\nMouseSensor.activators = [{\n eventName: 'onMouseDown',\n handler: (_ref, _ref2) => {\n let {\n nativeEvent: event\n } = _ref;\n let {\n onActivation\n } = _ref2;\n\n if (event.button === MouseButton.RightClick) {\n return false;\n }\n\n onActivation == null ? void 0 : onActivation({\n event\n });\n return true;\n }\n}];\n\nconst events$2 = {\n move: {\n name: 'touchmove'\n },\n end: {\n name: 'touchend'\n }\n};\nclass TouchSensor extends AbstractPointerSensor {\n constructor(props) {\n super(props, events$2);\n }\n\n static setup() {\n // Adding a non-capture and non-passive `touchmove` listener in order\n // to force `event.preventDefault()` calls to work in dynamically added\n // touchmove event handlers. This is required for iOS Safari.\n window.addEventListener(events$2.move.name, noop, {\n capture: false,\n passive: false\n });\n return function teardown() {\n window.removeEventListener(events$2.move.name, noop);\n }; // We create a new handler because the teardown function of another sensor\n // could remove our event listener if we use a referentially equal listener.\n\n function noop() {}\n }\n\n}\nTouchSensor.activators = [{\n eventName: 'onTouchStart',\n handler: (_ref, _ref2) => {\n let {\n nativeEvent: event\n } = _ref;\n let {\n onActivation\n } = _ref2;\n const {\n touches\n } = event;\n\n if (touches.length > 1) {\n return false;\n }\n\n onActivation == null ? void 0 : onActivation({\n event\n });\n return true;\n }\n}];\n\nvar AutoScrollActivator;\n\n(function (AutoScrollActivator) {\n AutoScrollActivator[AutoScrollActivator[\"Pointer\"] = 0] = \"Pointer\";\n AutoScrollActivator[AutoScrollActivator[\"DraggableRect\"] = 1] = \"DraggableRect\";\n})(AutoScrollActivator || (AutoScrollActivator = {}));\n\nvar TraversalOrder;\n\n(function (TraversalOrder) {\n TraversalOrder[TraversalOrder[\"TreeOrder\"] = 0] = \"TreeOrder\";\n TraversalOrder[TraversalOrder[\"ReversedTreeOrder\"] = 1] = \"ReversedTreeOrder\";\n})(TraversalOrder || (TraversalOrder = {}));\n\nfunction useAutoScroller(_ref) {\n let {\n acceleration,\n activator = AutoScrollActivator.Pointer,\n canScroll,\n draggingRect,\n enabled,\n interval = 5,\n order = TraversalOrder.TreeOrder,\n pointerCoordinates,\n scrollableAncestors,\n scrollableAncestorRects,\n delta,\n threshold\n } = _ref;\n const scrollIntent = useScrollIntent({\n delta,\n disabled: !enabled\n });\n const [setAutoScrollInterval, clearAutoScrollInterval] = useInterval();\n const scrollSpeed = useRef({\n x: 0,\n y: 0\n });\n const scrollDirection = useRef({\n x: 0,\n y: 0\n });\n const rect = useMemo(() => {\n switch (activator) {\n case AutoScrollActivator.Pointer:\n return pointerCoordinates ? {\n top: pointerCoordinates.y,\n bottom: pointerCoordinates.y,\n left: pointerCoordinates.x,\n right: pointerCoordinates.x\n } : null;\n\n case AutoScrollActivator.DraggableRect:\n return draggingRect;\n }\n }, [activator, draggingRect, pointerCoordinates]);\n const scrollContainerRef = useRef(null);\n const autoScroll = useCallback(() => {\n const scrollContainer = scrollContainerRef.current;\n\n if (!scrollContainer) {\n return;\n }\n\n const scrollLeft = scrollSpeed.current.x * scrollDirection.current.x;\n const scrollTop = scrollSpeed.current.y * scrollDirection.current.y;\n scrollContainer.scrollBy(scrollLeft, scrollTop);\n }, []);\n const sortedScrollableAncestors = useMemo(() => order === TraversalOrder.TreeOrder ? [...scrollableAncestors].reverse() : scrollableAncestors, [order, scrollableAncestors]);\n useEffect(() => {\n if (!enabled || !scrollableAncestors.length || !rect) {\n clearAutoScrollInterval();\n return;\n }\n\n for (const scrollContainer of sortedScrollableAncestors) {\n if ((canScroll == null ? void 0 : canScroll(scrollContainer)) === false) {\n continue;\n }\n\n const index = scrollableAncestors.indexOf(scrollContainer);\n const scrollContainerRect = scrollableAncestorRects[index];\n\n if (!scrollContainerRect) {\n continue;\n }\n\n const {\n direction,\n speed\n } = getScrollDirectionAndSpeed(scrollContainer, scrollContainerRect, rect, acceleration, threshold);\n\n for (const axis of ['x', 'y']) {\n if (!scrollIntent[axis][direction[axis]]) {\n speed[axis] = 0;\n direction[axis] = 0;\n }\n }\n\n if (speed.x > 0 || speed.y > 0) {\n clearAutoScrollInterval();\n scrollContainerRef.current = scrollContainer;\n setAutoScrollInterval(autoScroll, interval);\n scrollSpeed.current = speed;\n scrollDirection.current = direction;\n return;\n }\n }\n\n scrollSpeed.current = {\n x: 0,\n y: 0\n };\n scrollDirection.current = {\n x: 0,\n y: 0\n };\n clearAutoScrollInterval();\n }, // eslint-disable-next-line react-hooks/exhaustive-deps\n [acceleration, autoScroll, canScroll, clearAutoScrollInterval, enabled, interval, // eslint-disable-next-line react-hooks/exhaustive-deps\n JSON.stringify(rect), // eslint-disable-next-line react-hooks/exhaustive-deps\n JSON.stringify(scrollIntent), setAutoScrollInterval, scrollableAncestors, sortedScrollableAncestors, scrollableAncestorRects, // eslint-disable-next-line react-hooks/exhaustive-deps\n JSON.stringify(threshold)]);\n}\nconst defaultScrollIntent = {\n x: {\n [Direction.Backward]: false,\n [Direction.Forward]: false\n },\n y: {\n [Direction.Backward]: false,\n [Direction.Forward]: false\n }\n};\n\nfunction useScrollIntent(_ref2) {\n let {\n delta,\n disabled\n } = _ref2;\n const previousDelta = usePrevious(delta);\n return useLazyMemo(previousIntent => {\n if (disabled || !previousDelta || !previousIntent) {\n // Reset scroll intent tracking when auto-scrolling is disabled\n return defaultScrollIntent;\n }\n\n const direction = {\n x: Math.sign(delta.x - previousDelta.x),\n y: Math.sign(delta.y - previousDelta.y)\n }; // Keep track of the user intent to scroll in each direction for both axis\n\n return {\n x: {\n [Direction.Backward]: previousIntent.x[Direction.Backward] || direction.x === -1,\n [Direction.Forward]: previousIntent.x[Direction.Forward] || direction.x === 1\n },\n y: {\n [Direction.Backward]: previousIntent.y[Direction.Backward] || direction.y === -1,\n [Direction.Forward]: previousIntent.y[Direction.Forward] || direction.y === 1\n }\n };\n }, [disabled, delta, previousDelta]);\n}\n\nfunction useCachedNode(draggableNodes, id) {\n const draggableNode = id !== null ? draggableNodes.get(id) : undefined;\n const node = draggableNode ? draggableNode.node.current : null;\n return useLazyMemo(cachedNode => {\n var _ref;\n\n if (id === null) {\n return null;\n } // In some cases, the draggable node can unmount while dragging\n // This is the case for virtualized lists. In those situations,\n // we fall back to the last known value for that node.\n\n\n return (_ref = node != null ? node : cachedNode) != null ? _ref : null;\n }, [node, id]);\n}\n\nfunction useCombineActivators(sensors, getSyntheticHandler) {\n return useMemo(() => sensors.reduce((accumulator, sensor) => {\n const {\n sensor: Sensor\n } = sensor;\n const sensorActivators = Sensor.activators.map(activator => ({\n eventName: activator.eventName,\n handler: getSyntheticHandler(activator.handler, sensor)\n }));\n return [...accumulator, ...sensorActivators];\n }, []), [sensors, getSyntheticHandler]);\n}\n\nvar MeasuringStrategy;\n\n(function (MeasuringStrategy) {\n MeasuringStrategy[MeasuringStrategy[\"Always\"] = 0] = \"Always\";\n MeasuringStrategy[MeasuringStrategy[\"BeforeDragging\"] = 1] = \"BeforeDragging\";\n MeasuringStrategy[MeasuringStrategy[\"WhileDragging\"] = 2] = \"WhileDragging\";\n})(MeasuringStrategy || (MeasuringStrategy = {}));\n\nvar MeasuringFrequency;\n\n(function (MeasuringFrequency) {\n MeasuringFrequency[\"Optimized\"] = \"optimized\";\n})(MeasuringFrequency || (MeasuringFrequency = {}));\n\nconst defaultValue = /*#__PURE__*/new Map();\nfunction useDroppableMeasuring(containers, _ref) {\n let {\n dragging,\n dependencies,\n config\n } = _ref;\n const [queue, setQueue] = useState(null);\n const {\n frequency,\n measure,\n strategy\n } = config;\n const containersRef = useRef(containers);\n const disabled = isDisabled();\n const disabledRef = useLatestValue(disabled);\n const measureDroppableContainers = useCallback(function (ids) {\n if (ids === void 0) {\n ids = [];\n }\n\n if (disabledRef.current) {\n return;\n }\n\n setQueue(value => {\n if (value === null) {\n return ids;\n }\n\n return value.concat(ids.filter(id => !value.includes(id)));\n });\n }, [disabledRef]);\n const timeoutId = useRef(null);\n const droppableRects = useLazyMemo(previousValue => {\n if (disabled && !dragging) {\n return defaultValue;\n }\n\n if (!previousValue || previousValue === defaultValue || containersRef.current !== containers || queue != null) {\n const map = new Map();\n\n for (let container of containers) {\n if (!container) {\n continue;\n }\n\n if (queue && queue.length > 0 && !queue.includes(container.id) && container.rect.current) {\n // This container does not need to be re-measured\n map.set(container.id, container.rect.current);\n continue;\n }\n\n const node = container.node.current;\n const rect = node ? new Rect(measure(node), node) : null;\n container.rect.current = rect;\n\n if (rect) {\n map.set(container.id, rect);\n }\n }\n\n return map;\n }\n\n return previousValue;\n }, [containers, queue, dragging, disabled, measure]);\n useEffect(() => {\n containersRef.current = containers;\n }, [containers]);\n useEffect(() => {\n if (disabled) {\n return;\n }\n\n measureDroppableContainers();\n }, // eslint-disable-next-line react-hooks/exhaustive-deps\n [dragging, disabled]);\n useEffect(() => {\n if (queue && queue.length > 0) {\n setQueue(null);\n }\n }, //eslint-disable-next-line react-hooks/exhaustive-deps\n [JSON.stringify(queue)]);\n useEffect(() => {\n if (disabled || typeof frequency !== 'number' || timeoutId.current !== null) {\n return;\n }\n\n timeoutId.current = setTimeout(() => {\n measureDroppableContainers();\n timeoutId.current = null;\n }, frequency);\n }, // eslint-disable-next-line react-hooks/exhaustive-deps\n [frequency, disabled, measureDroppableContainers, ...dependencies]);\n return {\n droppableRects,\n measureDroppableContainers,\n measuringScheduled: queue != null\n };\n\n function isDisabled() {\n switch (strategy) {\n case MeasuringStrategy.Always:\n return false;\n\n case MeasuringStrategy.BeforeDragging:\n return dragging;\n\n default:\n return !dragging;\n }\n }\n}\n\nfunction useInitialValue(value, computeFn) {\n return useLazyMemo(previousValue => {\n if (!value) {\n return null;\n }\n\n if (previousValue) {\n return previousValue;\n }\n\n return typeof computeFn === 'function' ? computeFn(value) : value;\n }, [computeFn, value]);\n}\n\nfunction useInitialRect(node, measure) {\n return useInitialValue(node, measure);\n}\n\n/**\r\n * Returns a new MutationObserver instance.\r\n * If `MutationObserver` is undefined in the execution environment, returns `undefined`.\r\n */\n\nfunction useMutationObserver(_ref) {\n let {\n callback,\n disabled\n } = _ref;\n const handleMutations = useEvent(callback);\n const mutationObserver = useMemo(() => {\n if (disabled || typeof window === 'undefined' || typeof window.MutationObserver === 'undefined') {\n return undefined;\n }\n\n const {\n MutationObserver\n } = window;\n return new MutationObserver(handleMutations);\n }, [handleMutations, disabled]);\n useEffect(() => {\n return () => mutationObserver == null ? void 0 : mutationObserver.disconnect();\n }, [mutationObserver]);\n return mutationObserver;\n}\n\n/**\r\n * Returns a new ResizeObserver instance bound to the `onResize` callback.\r\n * If `ResizeObserver` is undefined in the execution environment, returns `undefined`.\r\n */\n\nfunction useResizeObserver(_ref) {\n let {\n callback,\n disabled\n } = _ref;\n const handleResize = useEvent(callback);\n const resizeObserver = useMemo(() => {\n if (disabled || typeof window === 'undefined' || typeof window.ResizeObserver === 'undefined') {\n return undefined;\n }\n\n const {\n ResizeObserver\n } = window;\n return new ResizeObserver(handleResize);\n }, // eslint-disable-next-line react-hooks/exhaustive-deps\n [disabled]);\n useEffect(() => {\n return () => resizeObserver == null ? void 0 : resizeObserver.disconnect();\n }, [resizeObserver]);\n return resizeObserver;\n}\n\nfunction defaultMeasure(element) {\n return new Rect(getClientRect(element), element);\n}\n\nfunction useRect(element, measure, fallbackRect) {\n if (measure === void 0) {\n measure = defaultMeasure;\n }\n\n const [rect, measureRect] = useReducer(reducer, null);\n const mutationObserver = useMutationObserver({\n callback(records) {\n if (!element) {\n return;\n }\n\n for (const record of records) {\n const {\n type,\n target\n } = record;\n\n if (type === 'childList' && target instanceof HTMLElement && target.contains(element)) {\n measureRect();\n break;\n }\n }\n }\n\n });\n const resizeObserver = useResizeObserver({\n callback: measureRect\n });\n useIsomorphicLayoutEffect(() => {\n measureRect();\n\n if (element) {\n resizeObserver == null ? void 0 : resizeObserver.observe(element);\n mutationObserver == null ? void 0 : mutationObserver.observe(document.body, {\n childList: true,\n subtree: true\n });\n } else {\n resizeObserver == null ? void 0 : resizeObserver.disconnect();\n mutationObserver == null ? void 0 : mutationObserver.disconnect();\n }\n }, [element]);\n return rect;\n\n function reducer(currentRect) {\n if (!element) {\n return null;\n }\n\n if (element.isConnected === false) {\n var _ref;\n\n // Fall back to last rect we measured if the element is\n // no longer connected to the DOM.\n return (_ref = currentRect != null ? currentRect : fallbackRect) != null ? _ref : null;\n }\n\n const newRect = measure(element);\n\n if (JSON.stringify(currentRect) === JSON.stringify(newRect)) {\n return currentRect;\n }\n\n return newRect;\n }\n}\n\nfunction useRectDelta(rect) {\n const initialRect = useInitialValue(rect);\n return getRectDelta(rect, initialRect);\n}\n\nconst defaultValue$1 = [];\nfunction useScrollableAncestors(node) {\n const previousNode = useRef(node);\n const ancestors = useLazyMemo(previousValue => {\n if (!node) {\n return defaultValue$1;\n }\n\n if (previousValue && previousValue !== defaultValue$1 && node && previousNode.current && node.parentNode === previousNode.current.parentNode) {\n return previousValue;\n }\n\n return getScrollableAncestors(node);\n }, [node]);\n useEffect(() => {\n previousNode.current = node;\n }, [node]);\n return ancestors;\n}\n\nfunction useScrollOffsets(elements) {\n const [scrollCoordinates, setScrollCoordinates] = useState(null);\n const prevElements = useRef(elements); // To-do: Throttle the handleScroll callback\n\n const handleScroll = useCallback(event => {\n const scrollingElement = getScrollableElement(event.target);\n\n if (!scrollingElement) {\n return;\n }\n\n setScrollCoordinates(scrollCoordinates => {\n if (!scrollCoordinates) {\n return null;\n }\n\n scrollCoordinates.set(scrollingElement, getScrollCoordinates(scrollingElement));\n return new Map(scrollCoordinates);\n });\n }, []);\n useEffect(() => {\n const previousElements = prevElements.current;\n\n if (elements !== previousElements) {\n cleanup(previousElements);\n const entries = elements.map(element => {\n const scrollableElement = getScrollableElement(element);\n\n if (scrollableElement) {\n scrollableElement.addEventListener('scroll', handleScroll, {\n passive: true\n });\n return [scrollableElement, getScrollCoordinates(scrollableElement)];\n }\n\n return null;\n }).filter(entry => entry != null);\n setScrollCoordinates(entries.length ? new Map(entries) : null);\n prevElements.current = elements;\n }\n\n return () => {\n cleanup(elements);\n cleanup(previousElements);\n };\n\n function cleanup(elements) {\n elements.forEach(element => {\n const scrollableElement = getScrollableElement(element);\n scrollableElement == null ? void 0 : scrollableElement.removeEventListener('scroll', handleScroll);\n });\n }\n }, [handleScroll, elements]);\n return useMemo(() => {\n if (elements.length) {\n return scrollCoordinates ? Array.from(scrollCoordinates.values()).reduce((acc, coordinates) => add(acc, coordinates), defaultCoordinates) : getScrollOffsets(elements);\n }\n\n return defaultCoordinates;\n }, [elements, scrollCoordinates]);\n}\n\nfunction useScrollOffsetsDelta(scrollOffsets, dependencies) {\n if (dependencies === void 0) {\n dependencies = [];\n }\n\n const initialScrollOffsets = useRef(null);\n useEffect(() => {\n initialScrollOffsets.current = null;\n }, // eslint-disable-next-line react-hooks/exhaustive-deps\n dependencies);\n useEffect(() => {\n const hasScrollOffsets = scrollOffsets !== defaultCoordinates;\n\n if (hasScrollOffsets && !initialScrollOffsets.current) {\n initialScrollOffsets.current = scrollOffsets;\n }\n\n if (!hasScrollOffsets && initialScrollOffsets.current) {\n initialScrollOffsets.current = null;\n }\n }, [scrollOffsets]);\n return initialScrollOffsets.current ? subtract(scrollOffsets, initialScrollOffsets.current) : defaultCoordinates;\n}\n\nfunction useSensorSetup(sensors) {\n useEffect(() => {\n if (!canUseDOM) {\n return;\n }\n\n const teardownFns = sensors.map(_ref => {\n let {\n sensor\n } = _ref;\n return sensor.setup == null ? void 0 : sensor.setup();\n });\n return () => {\n for (const teardown of teardownFns) {\n teardown == null ? void 0 : teardown();\n }\n };\n }, // TO-DO: Sensors length could theoretically change which would not be a valid dependency\n // eslint-disable-next-line react-hooks/exhaustive-deps\n sensors.map(_ref2 => {\n let {\n sensor\n } = _ref2;\n return sensor;\n }));\n}\n\nfunction useSyntheticListeners(listeners, id) {\n return useMemo(() => {\n return listeners.reduce((acc, _ref) => {\n let {\n eventName,\n handler\n } = _ref;\n\n acc[eventName] = event => {\n handler(event, id);\n };\n\n return acc;\n }, {});\n }, [listeners, id]);\n}\n\nfunction useWindowRect(element) {\n return useMemo(() => element ? getWindowClientRect(element) : null, [element]);\n}\n\nconst defaultValue$2 = [];\nfunction useRects(elements, measure) {\n if (measure === void 0) {\n measure = getClientRect;\n }\n\n const [firstElement] = elements;\n const windowRect = useWindowRect(firstElement ? getWindow(firstElement) : null);\n const [rects, measureRects] = useReducer(reducer, defaultValue$2);\n const resizeObserver = useResizeObserver({\n callback: measureRects\n });\n\n if (elements.length > 0 && rects === defaultValue$2) {\n measureRects();\n }\n\n useIsomorphicLayoutEffect(() => {\n if (elements.length) {\n elements.forEach(element => resizeObserver == null ? void 0 : resizeObserver.observe(element));\n } else {\n resizeObserver == null ? void 0 : resizeObserver.disconnect();\n measureRects();\n }\n }, [elements]);\n return rects;\n\n function reducer() {\n if (!elements.length) {\n return defaultValue$2;\n }\n\n return elements.map(element => isDocumentScrollingElement(element) ? windowRect : new Rect(measure(element), element));\n }\n}\n\nfunction getMeasurableNode(node) {\n if (!node) {\n return null;\n }\n\n if (node.children.length > 1) {\n return node;\n }\n\n const firstChild = node.children[0];\n return isHTMLElement(firstChild) ? firstChild : node;\n}\n\nfunction useDragOverlayMeasuring(_ref) {\n let {\n measure\n } = _ref;\n const [rect, setRect] = useState(null);\n const handleResize = useCallback(entries => {\n for (const {\n target\n } of entries) {\n if (isHTMLElement(target)) {\n setRect(rect => {\n const newRect = measure(target);\n return rect ? { ...rect,\n width: newRect.width,\n height: newRect.height\n } : newRect;\n });\n break;\n }\n }\n }, [measure]);\n const resizeObserver = useResizeObserver({\n callback: handleResize\n });\n const handleNodeChange = useCallback(element => {\n const node = getMeasurableNode(element);\n resizeObserver == null ? void 0 : resizeObserver.disconnect();\n\n if (node) {\n resizeObserver == null ? void 0 : resizeObserver.observe(node);\n }\n\n setRect(node ? measure(node) : null);\n }, [measure, resizeObserver]);\n const [nodeRef, setRef] = useNodeRef(handleNodeChange);\n return useMemo(() => ({\n nodeRef,\n rect,\n setRef\n }), [rect, nodeRef, setRef]);\n}\n\nconst defaultSensors = [{\n sensor: PointerSensor,\n options: {}\n}, {\n sensor: KeyboardSensor,\n options: {}\n}];\nconst defaultData = {\n current: {}\n};\nconst defaultMeasuringConfiguration = {\n draggable: {\n measure: getTransformAgnosticClientRect\n },\n droppable: {\n measure: getTransformAgnosticClientRect,\n strategy: MeasuringStrategy.WhileDragging,\n frequency: MeasuringFrequency.Optimized\n },\n dragOverlay: {\n measure: getClientRect\n }\n};\n\nclass DroppableContainersMap extends Map {\n get(id) {\n var _super$get;\n\n return id != null ? (_super$get = super.get(id)) != null ? _super$get : undefined : undefined;\n }\n\n toArray() {\n return Array.from(this.values());\n }\n\n getEnabled() {\n return this.toArray().filter(_ref => {\n let {\n disabled\n } = _ref;\n return !disabled;\n });\n }\n\n getNodeFor(id) {\n var _this$get$node$curren, _this$get;\n\n return (_this$get$node$curren = (_this$get = this.get(id)) == null ? void 0 : _this$get.node.current) != null ? _this$get$node$curren : undefined;\n }\n\n}\n\nconst defaultPublicContext = {\n activatorEvent: null,\n active: null,\n activeNode: null,\n activeNodeRect: null,\n collisions: null,\n containerNodeRect: null,\n draggableNodes: /*#__PURE__*/new Map(),\n droppableRects: /*#__PURE__*/new Map(),\n droppableContainers: /*#__PURE__*/new DroppableContainersMap(),\n over: null,\n dragOverlay: {\n nodeRef: {\n current: null\n },\n rect: null,\n setRef: noop\n },\n scrollableAncestors: [],\n scrollableAncestorRects: [],\n measuringConfiguration: defaultMeasuringConfiguration,\n measureDroppableContainers: noop,\n windowRect: null,\n measuringScheduled: false\n};\nconst defaultInternalContext = {\n activatorEvent: null,\n activators: [],\n active: null,\n activeNodeRect: null,\n ariaDescribedById: {\n draggable: ''\n },\n dispatch: noop,\n draggableNodes: /*#__PURE__*/new Map(),\n over: null,\n measureDroppableContainers: noop\n};\nconst InternalContext = /*#__PURE__*/createContext(defaultInternalContext);\nconst PublicContext = /*#__PURE__*/createContext(defaultPublicContext);\n\nfunction getInitialState() {\n return {\n draggable: {\n active: null,\n initialCoordinates: {\n x: 0,\n y: 0\n },\n nodes: new Map(),\n translate: {\n x: 0,\n y: 0\n }\n },\n droppable: {\n containers: new DroppableContainersMap()\n }\n };\n}\nfunction reducer(state, action) {\n switch (action.type) {\n case Action.DragStart:\n return { ...state,\n draggable: { ...state.draggable,\n initialCoordinates: action.initialCoordinates,\n active: action.active\n }\n };\n\n case Action.DragMove:\n if (!state.draggable.active) {\n return state;\n }\n\n return { ...state,\n draggable: { ...state.draggable,\n translate: {\n x: action.coordinates.x - state.draggable.initialCoordinates.x,\n y: action.coordinates.y - state.draggable.initialCoordinates.y\n }\n }\n };\n\n case Action.DragEnd:\n case Action.DragCancel:\n return { ...state,\n draggable: { ...state.draggable,\n active: null,\n initialCoordinates: {\n x: 0,\n y: 0\n },\n translate: {\n x: 0,\n y: 0\n }\n }\n };\n\n case Action.RegisterDroppable:\n {\n const {\n element\n } = action;\n const {\n id\n } = element;\n const containers = new DroppableContainersMap(state.droppable.containers);\n containers.set(id, element);\n return { ...state,\n droppable: { ...state.droppable,\n containers\n }\n };\n }\n\n case Action.SetDroppableDisabled:\n {\n const {\n id,\n key,\n disabled\n } = action;\n const element = state.droppable.containers.get(id);\n\n if (!element || key !== element.key) {\n return state;\n }\n\n const containers = new DroppableContainersMap(state.droppable.containers);\n containers.set(id, { ...element,\n disabled\n });\n return { ...state,\n droppable: { ...state.droppable,\n containers\n }\n };\n }\n\n case Action.UnregisterDroppable:\n {\n const {\n id,\n key\n } = action;\n const element = state.droppable.containers.get(id);\n\n if (!element || key !== element.key) {\n return state;\n }\n\n const containers = new DroppableContainersMap(state.droppable.containers);\n containers.delete(id);\n return { ...state,\n droppable: { ...state.droppable,\n containers\n }\n };\n }\n\n default:\n {\n return state;\n }\n }\n}\n\nfunction RestoreFocus(_ref) {\n let {\n disabled\n } = _ref;\n const {\n active,\n activatorEvent,\n draggableNodes\n } = useContext(InternalContext);\n const previousActivatorEvent = usePrevious(activatorEvent);\n const previousActiveId = usePrevious(active == null ? void 0 : active.id); // Restore keyboard focus on the activator node\n\n useEffect(() => {\n if (disabled) {\n return;\n }\n\n if (!activatorEvent && previousActivatorEvent && previousActiveId != null) {\n if (!isKeyboardEvent(previousActivatorEvent)) {\n return;\n }\n\n if (document.activeElement === previousActivatorEvent.target) {\n // No need to restore focus\n return;\n }\n\n const draggableNode = draggableNodes.get(previousActiveId);\n\n if (!draggableNode) {\n return;\n }\n\n const {\n activatorNode,\n node\n } = draggableNode;\n\n if (!activatorNode.current && !node.current) {\n return;\n }\n\n requestAnimationFrame(() => {\n for (const element of [activatorNode.current, node.current]) {\n if (!element) {\n continue;\n }\n\n const focusableNode = findFirstFocusableNode(element);\n\n if (focusableNode) {\n focusableNode.focus();\n break;\n }\n }\n });\n }\n }, [activatorEvent, disabled, draggableNodes, previousActiveId, previousActivatorEvent]);\n return null;\n}\n\nfunction applyModifiers(modifiers, _ref) {\n let {\n transform,\n ...args\n } = _ref;\n return modifiers != null && modifiers.length ? modifiers.reduce((accumulator, modifier) => {\n return modifier({\n transform: accumulator,\n ...args\n });\n }, transform) : transform;\n}\n\nfunction useMeasuringConfiguration(config) {\n return useMemo(() => ({\n draggable: { ...defaultMeasuringConfiguration.draggable,\n ...(config == null ? void 0 : config.draggable)\n },\n droppable: { ...defaultMeasuringConfiguration.droppable,\n ...(config == null ? void 0 : config.droppable)\n },\n dragOverlay: { ...defaultMeasuringConfiguration.dragOverlay,\n ...(config == null ? void 0 : config.dragOverlay)\n }\n }), // eslint-disable-next-line react-hooks/exhaustive-deps\n [config == null ? void 0 : config.draggable, config == null ? void 0 : config.droppable, config == null ? void 0 : config.dragOverlay]);\n}\n\nfunction useLayoutShiftScrollCompensation(_ref) {\n let {\n activeNode,\n measure,\n initialRect,\n config = true\n } = _ref;\n const initialized = useRef(false);\n const {\n x,\n y\n } = typeof config === 'boolean' ? {\n x: config,\n y: config\n } : config;\n useIsomorphicLayoutEffect(() => {\n const disabled = !x && !y;\n\n if (disabled || !activeNode) {\n initialized.current = false;\n return;\n }\n\n if (initialized.current || !initialRect) {\n // Return early if layout shift scroll compensation was already attempted\n // or if there is no initialRect to compare to.\n return;\n } // Get the most up to date node ref for the active draggable\n\n\n const node = activeNode == null ? void 0 : activeNode.node.current;\n\n if (!node || node.isConnected === false) {\n // Return early if there is no attached node ref or if the node is\n // disconnected from the document.\n return;\n }\n\n const rect = measure(node);\n const rectDelta = getRectDelta(rect, initialRect);\n\n if (!x) {\n rectDelta.x = 0;\n }\n\n if (!y) {\n rectDelta.y = 0;\n } // Only perform layout shift scroll compensation once\n\n\n initialized.current = true;\n\n if (Math.abs(rectDelta.x) > 0 || Math.abs(rectDelta.y) > 0) {\n const firstScrollableAncestor = getFirstScrollableAncestor(node);\n\n if (firstScrollableAncestor) {\n firstScrollableAncestor.scrollBy({\n top: rectDelta.y,\n left: rectDelta.x\n });\n }\n }\n }, [activeNode, x, y, initialRect, measure]);\n}\n\nconst ActiveDraggableContext = /*#__PURE__*/createContext({ ...defaultCoordinates,\n scaleX: 1,\n scaleY: 1\n});\nvar Status;\n\n(function (Status) {\n Status[Status[\"Uninitialized\"] = 0] = \"Uninitialized\";\n Status[Status[\"Initializing\"] = 1] = \"Initializing\";\n Status[Status[\"Initialized\"] = 2] = \"Initialized\";\n})(Status || (Status = {}));\n\nconst DndContext = /*#__PURE__*/memo(function DndContext(_ref) {\n var _sensorContext$curren, _dragOverlay$nodeRef$, _dragOverlay$rect, _over$rect;\n\n let {\n id,\n accessibility,\n autoScroll = true,\n children,\n sensors = defaultSensors,\n collisionDetection = rectIntersection,\n measuring,\n modifiers,\n ...props\n } = _ref;\n const store = useReducer(reducer, undefined, getInitialState);\n const [state, dispatch] = store;\n const [dispatchMonitorEvent, registerMonitorListener] = useDndMonitorProvider();\n const [status, setStatus] = useState(Status.Uninitialized);\n const isInitialized = status === Status.Initialized;\n const {\n draggable: {\n active: activeId,\n nodes: draggableNodes,\n translate\n },\n droppable: {\n containers: droppableContainers\n }\n } = state;\n const node = activeId ? draggableNodes.get(activeId) : null;\n const activeRects = useRef({\n initial: null,\n translated: null\n });\n const active = useMemo(() => {\n var _node$data;\n\n return activeId != null ? {\n id: activeId,\n // It's possible for the active node to unmount while dragging\n data: (_node$data = node == null ? void 0 : node.data) != null ? _node$data : defaultData,\n rect: activeRects\n } : null;\n }, [activeId, node]);\n const activeRef = useRef(null);\n const [activeSensor, setActiveSensor] = useState(null);\n const [activatorEvent, setActivatorEvent] = useState(null);\n const latestProps = useLatestValue(props, Object.values(props));\n const draggableDescribedById = useUniqueId(\"DndDescribedBy\", id);\n const enabledDroppableContainers = useMemo(() => droppableContainers.getEnabled(), [droppableContainers]);\n const measuringConfiguration = useMeasuringConfiguration(measuring);\n const {\n droppableRects,\n measureDroppableContainers,\n measuringScheduled\n } = useDroppableMeasuring(enabledDroppableContainers, {\n dragging: isInitialized,\n dependencies: [translate.x, translate.y],\n config: measuringConfiguration.droppable\n });\n const activeNode = useCachedNode(draggableNodes, activeId);\n const activationCoordinates = useMemo(() => activatorEvent ? getEventCoordinates(activatorEvent) : null, [activatorEvent]);\n const autoScrollOptions = getAutoScrollerOptions();\n const initialActiveNodeRect = useInitialRect(activeNode, measuringConfiguration.draggable.measure);\n useLayoutShiftScrollCompensation({\n activeNode: activeId ? draggableNodes.get(activeId) : null,\n config: autoScrollOptions.layoutShiftCompensation,\n initialRect: initialActiveNodeRect,\n measure: measuringConfiguration.draggable.measure\n });\n const activeNodeRect = useRect(activeNode, measuringConfiguration.draggable.measure, initialActiveNodeRect);\n const containerNodeRect = useRect(activeNode ? activeNode.parentElement : null);\n const sensorContext = useRef({\n activatorEvent: null,\n active: null,\n activeNode,\n collisionRect: null,\n collisions: null,\n droppableRects,\n draggableNodes,\n draggingNode: null,\n draggingNodeRect: null,\n droppableContainers,\n over: null,\n scrollableAncestors: [],\n scrollAdjustedTranslate: null\n });\n const overNode = droppableContainers.getNodeFor((_sensorContext$curren = sensorContext.current.over) == null ? void 0 : _sensorContext$curren.id);\n const dragOverlay = useDragOverlayMeasuring({\n measure: measuringConfiguration.dragOverlay.measure\n }); // Use the rect of the drag overlay if it is mounted\n\n const draggingNode = (_dragOverlay$nodeRef$ = dragOverlay.nodeRef.current) != null ? _dragOverlay$nodeRef$ : activeNode;\n const draggingNodeRect = isInitialized ? (_dragOverlay$rect = dragOverlay.rect) != null ? _dragOverlay$rect : activeNodeRect : null;\n const usesDragOverlay = Boolean(dragOverlay.nodeRef.current && dragOverlay.rect); // The delta between the previous and new position of the draggable node\n // is only relevant when there is no drag overlay\n\n const nodeRectDelta = useRectDelta(usesDragOverlay ? null : activeNodeRect); // Get the window rect of the dragging node\n\n const windowRect = useWindowRect(draggingNode ? getWindow(draggingNode) : null); // Get scrollable ancestors of the dragging node\n\n const scrollableAncestors = useScrollableAncestors(isInitialized ? overNode != null ? overNode : activeNode : null);\n const scrollableAncestorRects = useRects(scrollableAncestors); // Apply modifiers\n\n const modifiedTranslate = applyModifiers(modifiers, {\n transform: {\n x: translate.x - nodeRectDelta.x,\n y: translate.y - nodeRectDelta.y,\n scaleX: 1,\n scaleY: 1\n },\n activatorEvent,\n active,\n activeNodeRect,\n containerNodeRect,\n draggingNodeRect,\n over: sensorContext.current.over,\n overlayNodeRect: dragOverlay.rect,\n scrollableAncestors,\n scrollableAncestorRects,\n windowRect\n });\n const pointerCoordinates = activationCoordinates ? add(activationCoordinates, translate) : null;\n const scrollOffsets = useScrollOffsets(scrollableAncestors); // Represents the scroll delta since dragging was initiated\n\n const scrollAdjustment = useScrollOffsetsDelta(scrollOffsets); // Represents the scroll delta since the last time the active node rect was measured\n\n const activeNodeScrollDelta = useScrollOffsetsDelta(scrollOffsets, [activeNodeRect]);\n const scrollAdjustedTranslate = add(modifiedTranslate, scrollAdjustment);\n const collisionRect = draggingNodeRect ? getAdjustedRect(draggingNodeRect, modifiedTranslate) : null;\n const collisions = active && collisionRect ? collisionDetection({\n active,\n collisionRect,\n droppableRects,\n droppableContainers: enabledDroppableContainers,\n pointerCoordinates\n }) : null;\n const overId = getFirstCollision(collisions, 'id');\n const [over, setOver] = useState(null); // When there is no drag overlay used, we need to account for the\n // window scroll delta\n\n const appliedTranslate = usesDragOverlay ? modifiedTranslate : add(modifiedTranslate, activeNodeScrollDelta);\n const transform = adjustScale(appliedTranslate, (_over$rect = over == null ? void 0 : over.rect) != null ? _over$rect : null, activeNodeRect);\n const instantiateSensor = useCallback((event, _ref2) => {\n let {\n sensor: Sensor,\n options\n } = _ref2;\n\n if (activeRef.current == null) {\n return;\n }\n\n const activeNode = draggableNodes.get(activeRef.current);\n\n if (!activeNode) {\n return;\n }\n\n const activatorEvent = event.nativeEvent;\n const sensorInstance = new Sensor({\n active: activeRef.current,\n activeNode,\n event: activatorEvent,\n options,\n // Sensors need to be instantiated with refs for arguments that change over time\n // otherwise they are frozen in time with the stale arguments\n context: sensorContext,\n\n onStart(initialCoordinates) {\n const id = activeRef.current;\n\n if (id == null) {\n return;\n }\n\n const draggableNode = draggableNodes.get(id);\n\n if (!draggableNode) {\n return;\n }\n\n const {\n onDragStart\n } = latestProps.current;\n const event = {\n active: {\n id,\n data: draggableNode.data,\n rect: activeRects\n }\n };\n unstable_batchedUpdates(() => {\n onDragStart == null ? void 0 : onDragStart(event);\n setStatus(Status.Initializing);\n dispatch({\n type: Action.DragStart,\n initialCoordinates,\n active: id\n });\n dispatchMonitorEvent({\n type: 'onDragStart',\n event\n });\n });\n },\n\n onMove(coordinates) {\n dispatch({\n type: Action.DragMove,\n coordinates\n });\n },\n\n onEnd: createHandler(Action.DragEnd),\n onCancel: createHandler(Action.DragCancel)\n });\n unstable_batchedUpdates(() => {\n setActiveSensor(sensorInstance);\n setActivatorEvent(event.nativeEvent);\n });\n\n function createHandler(type) {\n return async function handler() {\n const {\n active,\n collisions,\n over,\n scrollAdjustedTranslate\n } = sensorContext.current;\n let event = null;\n\n if (active && scrollAdjustedTranslate) {\n const {\n cancelDrop\n } = latestProps.current;\n event = {\n activatorEvent,\n active: active,\n collisions,\n delta: scrollAdjustedTranslate,\n over\n };\n\n if (type === Action.DragEnd && typeof cancelDrop === 'function') {\n const shouldCancel = await Promise.resolve(cancelDrop(event));\n\n if (shouldCancel) {\n type = Action.DragCancel;\n }\n }\n }\n\n activeRef.current = null;\n unstable_batchedUpdates(() => {\n dispatch({\n type\n });\n setStatus(Status.Uninitialized);\n setOver(null);\n setActiveSensor(null);\n setActivatorEvent(null);\n const eventName = type === Action.DragEnd ? 'onDragEnd' : 'onDragCancel';\n\n if (event) {\n const handler = latestProps.current[eventName];\n handler == null ? void 0 : handler(event);\n dispatchMonitorEvent({\n type: eventName,\n event\n });\n }\n });\n };\n }\n }, // eslint-disable-next-line react-hooks/exhaustive-deps\n [draggableNodes]);\n const bindActivatorToSensorInstantiator = useCallback((handler, sensor) => {\n return (event, active) => {\n const nativeEvent = event.nativeEvent;\n const activeDraggableNode = draggableNodes.get(active);\n\n if ( // Another sensor is already instantiating\n activeRef.current !== null || // No active draggable\n !activeDraggableNode || // Event has already been captured\n nativeEvent.dndKit || nativeEvent.defaultPrevented) {\n return;\n }\n\n const activationContext = {\n active: activeDraggableNode\n };\n const shouldActivate = handler(event, sensor.options, activationContext);\n\n if (shouldActivate === true) {\n nativeEvent.dndKit = {\n capturedBy: sensor.sensor\n };\n activeRef.current = active;\n instantiateSensor(event, sensor);\n }\n };\n }, [draggableNodes, instantiateSensor]);\n const activators = useCombineActivators(sensors, bindActivatorToSensorInstantiator);\n useSensorSetup(sensors);\n useIsomorphicLayoutEffect(() => {\n if (activeNodeRect && status === Status.Initializing) {\n setStatus(Status.Initialized);\n }\n }, [activeNodeRect, status]);\n useEffect(() => {\n const {\n onDragMove\n } = latestProps.current;\n const {\n active,\n activatorEvent,\n collisions,\n over\n } = sensorContext.current;\n\n if (!active || !activatorEvent) {\n return;\n }\n\n const event = {\n active,\n activatorEvent,\n collisions,\n delta: {\n x: scrollAdjustedTranslate.x,\n y: scrollAdjustedTranslate.y\n },\n over\n };\n unstable_batchedUpdates(() => {\n onDragMove == null ? void 0 : onDragMove(event);\n dispatchMonitorEvent({\n type: 'onDragMove',\n event\n });\n });\n }, // eslint-disable-next-line react-hooks/exhaustive-deps\n [scrollAdjustedTranslate.x, scrollAdjustedTranslate.y]);\n useEffect(() => {\n const {\n active,\n activatorEvent,\n collisions,\n droppableContainers,\n scrollAdjustedTranslate\n } = sensorContext.current;\n\n if (!active || activeRef.current == null || !activatorEvent || !scrollAdjustedTranslate) {\n return;\n }\n\n const {\n onDragOver\n } = latestProps.current;\n const overContainer = droppableContainers.get(overId);\n const over = overContainer && overContainer.rect.current ? {\n id: overContainer.id,\n rect: overContainer.rect.current,\n data: overContainer.data,\n disabled: overContainer.disabled\n } : null;\n const event = {\n active,\n activatorEvent,\n collisions,\n delta: {\n x: scrollAdjustedTranslate.x,\n y: scrollAdjustedTranslate.y\n },\n over\n };\n unstable_batchedUpdates(() => {\n setOver(over);\n onDragOver == null ? void 0 : onDragOver(event);\n dispatchMonitorEvent({\n type: 'onDragOver',\n event\n });\n });\n }, // eslint-disable-next-line react-hooks/exhaustive-deps\n [overId]);\n useIsomorphicLayoutEffect(() => {\n sensorContext.current = {\n activatorEvent,\n active,\n activeNode,\n collisionRect,\n collisions,\n droppableRects,\n draggableNodes,\n draggingNode,\n draggingNodeRect,\n droppableContainers,\n over,\n scrollableAncestors,\n scrollAdjustedTranslate\n };\n activeRects.current = {\n initial: draggingNodeRect,\n translated: collisionRect\n };\n }, [active, activeNode, collisions, collisionRect, draggableNodes, draggingNode, draggingNodeRect, droppableRects, droppableContainers, over, scrollableAncestors, scrollAdjustedTranslate]);\n useAutoScroller({ ...autoScrollOptions,\n delta: translate,\n draggingRect: collisionRect,\n pointerCoordinates,\n scrollableAncestors,\n scrollableAncestorRects\n });\n const publicContext = useMemo(() => {\n const context = {\n active,\n activeNode,\n activeNodeRect,\n activatorEvent,\n collisions,\n containerNodeRect,\n dragOverlay,\n draggableNodes,\n droppableContainers,\n droppableRects,\n over,\n measureDroppableContainers,\n scrollableAncestors,\n scrollableAncestorRects,\n measuringConfiguration,\n measuringScheduled,\n windowRect\n };\n return context;\n }, [active, activeNode, activeNodeRect, activatorEvent, collisions, containerNodeRect, dragOverlay, draggableNodes, droppableContainers, droppableRects, over, measureDroppableContainers, scrollableAncestors, scrollableAncestorRects, measuringConfiguration, measuringScheduled, windowRect]);\n const internalContext = useMemo(() => {\n const context = {\n activatorEvent,\n activators,\n active,\n activeNodeRect,\n ariaDescribedById: {\n draggable: draggableDescribedById\n },\n dispatch,\n draggableNodes,\n over,\n measureDroppableContainers\n };\n return context;\n }, [activatorEvent, activators, active, activeNodeRect, dispatch, draggableDescribedById, draggableNodes, over, measureDroppableContainers]);\n return React.createElement(DndMonitorContext.Provider, {\n value: registerMonitorListener\n }, React.createElement(InternalContext.Provider, {\n value: internalContext\n }, React.createElement(PublicContext.Provider, {\n value: publicContext\n }, React.createElement(ActiveDraggableContext.Provider, {\n value: transform\n }, children)), React.createElement(RestoreFocus, {\n disabled: (accessibility == null ? void 0 : accessibility.restoreFocus) === false\n })), React.createElement(Accessibility, { ...accessibility,\n hiddenTextDescribedById: draggableDescribedById\n }));\n\n function getAutoScrollerOptions() {\n const activeSensorDisablesAutoscroll = (activeSensor == null ? void 0 : activeSensor.autoScrollEnabled) === false;\n const autoScrollGloballyDisabled = typeof autoScroll === 'object' ? autoScroll.enabled === false : autoScroll === false;\n const enabled = isInitialized && !activeSensorDisablesAutoscroll && !autoScrollGloballyDisabled;\n\n if (typeof autoScroll === 'object') {\n return { ...autoScroll,\n enabled\n };\n }\n\n return {\n enabled\n };\n }\n});\n\nconst NullContext = /*#__PURE__*/createContext(null);\nconst defaultRole = 'button';\nconst ID_PREFIX = 'Droppable';\nfunction useDraggable(_ref) {\n let {\n id,\n data,\n disabled = false,\n attributes\n } = _ref;\n const key = useUniqueId(ID_PREFIX);\n const {\n activators,\n activatorEvent,\n active,\n activeNodeRect,\n ariaDescribedById,\n draggableNodes,\n over\n } = useContext(InternalContext);\n const {\n role = defaultRole,\n roleDescription = 'draggable',\n tabIndex = 0\n } = attributes != null ? attributes : {};\n const isDragging = (active == null ? void 0 : active.id) === id;\n const transform = useContext(isDragging ? ActiveDraggableContext : NullContext);\n const [node, setNodeRef] = useNodeRef();\n const [activatorNode, setActivatorNodeRef] = useNodeRef();\n const listeners = useSyntheticListeners(activators, id);\n const dataRef = useLatestValue(data);\n useIsomorphicLayoutEffect(() => {\n draggableNodes.set(id, {\n id,\n key,\n node,\n activatorNode,\n data: dataRef\n });\n return () => {\n const node = draggableNodes.get(id);\n\n if (node && node.key === key) {\n draggableNodes.delete(id);\n }\n };\n }, // eslint-disable-next-line react-hooks/exhaustive-deps\n [draggableNodes, id]);\n const memoizedAttributes = useMemo(() => ({\n role,\n tabIndex,\n 'aria-disabled': disabled,\n 'aria-pressed': isDragging && role === defaultRole ? true : undefined,\n 'aria-roledescription': roleDescription,\n 'aria-describedby': ariaDescribedById.draggable\n }), [disabled, role, tabIndex, isDragging, roleDescription, ariaDescribedById.draggable]);\n return {\n active,\n activatorEvent,\n activeNodeRect,\n attributes: memoizedAttributes,\n isDragging,\n listeners: disabled ? undefined : listeners,\n node,\n over,\n setNodeRef,\n setActivatorNodeRef,\n transform\n };\n}\n\nfunction useDndContext() {\n return useContext(PublicContext);\n}\n\nconst ID_PREFIX$1 = 'Droppable';\nconst defaultResizeObserverConfig = {\n timeout: 25\n};\nfunction useDroppable(_ref) {\n let {\n data,\n disabled = false,\n id,\n resizeObserverConfig\n } = _ref;\n const key = useUniqueId(ID_PREFIX$1);\n const {\n active,\n dispatch,\n over,\n measureDroppableContainers\n } = useContext(InternalContext);\n const previous = useRef({\n disabled\n });\n const resizeObserverConnected = useRef(false);\n const rect = useRef(null);\n const callbackId = useRef(null);\n const {\n disabled: resizeObserverDisabled,\n updateMeasurementsFor,\n timeout: resizeObserverTimeout\n } = { ...defaultResizeObserverConfig,\n ...resizeObserverConfig\n };\n const ids = useLatestValue(updateMeasurementsFor != null ? updateMeasurementsFor : id);\n const handleResize = useCallback(() => {\n if (!resizeObserverConnected.current) {\n // ResizeObserver invokes the `handleResize` callback as soon as `observe` is called,\n // assuming the element is rendered and displayed.\n resizeObserverConnected.current = true;\n return;\n }\n\n if (callbackId.current != null) {\n clearTimeout(callbackId.current);\n }\n\n callbackId.current = setTimeout(() => {\n measureDroppableContainers(Array.isArray(ids.current) ? ids.current : [ids.current]);\n callbackId.current = null;\n }, resizeObserverTimeout);\n }, //eslint-disable-next-line react-hooks/exhaustive-deps\n [resizeObserverTimeout]);\n const resizeObserver = useResizeObserver({\n callback: handleResize,\n disabled: resizeObserverDisabled || !active\n });\n const handleNodeChange = useCallback((newElement, previousElement) => {\n if (!resizeObserver) {\n return;\n }\n\n if (previousElement) {\n resizeObserver.unobserve(previousElement);\n resizeObserverConnected.current = false;\n }\n\n if (newElement) {\n resizeObserver.observe(newElement);\n }\n }, [resizeObserver]);\n const [nodeRef, setNodeRef] = useNodeRef(handleNodeChange);\n const dataRef = useLatestValue(data);\n useEffect(() => {\n if (!resizeObserver || !nodeRef.current) {\n return;\n }\n\n resizeObserver.disconnect();\n resizeObserverConnected.current = false;\n resizeObserver.observe(nodeRef.current);\n }, [nodeRef, resizeObserver]);\n useIsomorphicLayoutEffect(() => {\n dispatch({\n type: Action.RegisterDroppable,\n element: {\n id,\n key,\n disabled,\n node: nodeRef,\n rect,\n data: dataRef\n }\n });\n return () => dispatch({\n type: Action.UnregisterDroppable,\n key,\n id\n });\n }, // eslint-disable-next-line react-hooks/exhaustive-deps\n [id]);\n useEffect(() => {\n if (disabled !== previous.current.disabled) {\n dispatch({\n type: Action.SetDroppableDisabled,\n id,\n key,\n disabled\n });\n previous.current.disabled = disabled;\n }\n }, [id, key, disabled, dispatch]);\n return {\n active,\n rect,\n isOver: (over == null ? void 0 : over.id) === id,\n node: nodeRef,\n over,\n setNodeRef\n };\n}\n\nfunction AnimationManager(_ref) {\n let {\n animation,\n children\n } = _ref;\n const [clonedChildren, setClonedChildren] = useState(null);\n const [element, setElement] = useState(null);\n const previousChildren = usePrevious(children);\n\n if (!children && !clonedChildren && previousChildren) {\n setClonedChildren(previousChildren);\n }\n\n useIsomorphicLayoutEffect(() => {\n if (!element) {\n return;\n }\n\n const key = clonedChildren == null ? void 0 : clonedChildren.key;\n const id = clonedChildren == null ? void 0 : clonedChildren.props.id;\n\n if (key == null || id == null) {\n setClonedChildren(null);\n return;\n }\n\n Promise.resolve(animation(id, element)).then(() => {\n setClonedChildren(null);\n });\n }, [animation, clonedChildren, element]);\n return React.createElement(React.Fragment, null, children, clonedChildren ? cloneElement(clonedChildren, {\n ref: setElement\n }) : null);\n}\n\nconst defaultTransform = {\n x: 0,\n y: 0,\n scaleX: 1,\n scaleY: 1\n};\nfunction NullifiedContextProvider(_ref) {\n let {\n children\n } = _ref;\n return React.createElement(InternalContext.Provider, {\n value: defaultInternalContext\n }, React.createElement(ActiveDraggableContext.Provider, {\n value: defaultTransform\n }, children));\n}\n\nconst baseStyles = {\n position: 'fixed',\n touchAction: 'none'\n};\n\nconst defaultTransition = activatorEvent => {\n const isKeyboardActivator = isKeyboardEvent(activatorEvent);\n return isKeyboardActivator ? 'transform 250ms ease' : undefined;\n};\n\nconst PositionedOverlay = /*#__PURE__*/forwardRef((_ref, ref) => {\n let {\n as,\n activatorEvent,\n adjustScale,\n children,\n className,\n rect,\n style,\n transform,\n transition = defaultTransition\n } = _ref;\n\n if (!rect) {\n return null;\n }\n\n const scaleAdjustedTransform = adjustScale ? transform : { ...transform,\n scaleX: 1,\n scaleY: 1\n };\n const styles = { ...baseStyles,\n width: rect.width,\n height: rect.height,\n top: rect.top,\n left: rect.left,\n transform: CSS.Transform.toString(scaleAdjustedTransform),\n transformOrigin: adjustScale && activatorEvent ? getRelativeTransformOrigin(activatorEvent, rect) : undefined,\n transition: typeof transition === 'function' ? transition(activatorEvent) : transition,\n ...style\n };\n return React.createElement(as, {\n className,\n style: styles,\n ref\n }, children);\n});\n\nconst defaultDropAnimationSideEffects = options => _ref => {\n let {\n active,\n dragOverlay\n } = _ref;\n const originalStyles = {};\n const {\n styles,\n className\n } = options;\n\n if (styles != null && styles.active) {\n for (const [key, value] of Object.entries(styles.active)) {\n if (value === undefined) {\n continue;\n }\n\n originalStyles[key] = active.node.style.getPropertyValue(key);\n active.node.style.setProperty(key, value);\n }\n }\n\n if (styles != null && styles.dragOverlay) {\n for (const [key, value] of Object.entries(styles.dragOverlay)) {\n if (value === undefined) {\n continue;\n }\n\n dragOverlay.node.style.setProperty(key, value);\n }\n }\n\n if (className != null && className.active) {\n active.node.classList.add(className.active);\n }\n\n if (className != null && className.dragOverlay) {\n dragOverlay.node.classList.add(className.dragOverlay);\n }\n\n return function cleanup() {\n for (const [key, value] of Object.entries(originalStyles)) {\n active.node.style.setProperty(key, value);\n }\n\n if (className != null && className.active) {\n active.node.classList.remove(className.active);\n }\n };\n};\n\nconst defaultKeyframeResolver = _ref2 => {\n let {\n transform: {\n initial,\n final\n }\n } = _ref2;\n return [{\n transform: CSS.Transform.toString(initial)\n }, {\n transform: CSS.Transform.toString(final)\n }];\n};\n\nconst defaultDropAnimationConfiguration = {\n duration: 250,\n easing: 'ease',\n keyframes: defaultKeyframeResolver,\n sideEffects: /*#__PURE__*/defaultDropAnimationSideEffects({\n styles: {\n active: {\n opacity: '0'\n }\n }\n })\n};\nfunction useDropAnimation(_ref3) {\n let {\n config,\n draggableNodes,\n droppableContainers,\n measuringConfiguration\n } = _ref3;\n return useEvent((id, node) => {\n if (config === null) {\n return;\n }\n\n const activeDraggable = draggableNodes.get(id);\n\n if (!activeDraggable) {\n return;\n }\n\n const activeNode = activeDraggable.node.current;\n\n if (!activeNode) {\n return;\n }\n\n const measurableNode = getMeasurableNode(node);\n\n if (!measurableNode) {\n return;\n }\n\n const {\n transform\n } = getWindow(node).getComputedStyle(node);\n const parsedTransform = parseTransform(transform);\n\n if (!parsedTransform) {\n return;\n }\n\n const animation = typeof config === 'function' ? config : createDefaultDropAnimation(config);\n scrollIntoViewIfNeeded(activeNode, measuringConfiguration.draggable.measure);\n return animation({\n active: {\n id,\n data: activeDraggable.data,\n node: activeNode,\n rect: measuringConfiguration.draggable.measure(activeNode)\n },\n draggableNodes,\n dragOverlay: {\n node,\n rect: measuringConfiguration.dragOverlay.measure(measurableNode)\n },\n droppableContainers,\n measuringConfiguration,\n transform: parsedTransform\n });\n });\n}\n\nfunction createDefaultDropAnimation(options) {\n const {\n duration,\n easing,\n sideEffects,\n keyframes\n } = { ...defaultDropAnimationConfiguration,\n ...options\n };\n return _ref4 => {\n let {\n active,\n dragOverlay,\n transform,\n ...rest\n } = _ref4;\n\n if (!duration) {\n // Do not animate if animation duration is zero.\n return;\n }\n\n const delta = {\n x: dragOverlay.rect.left - active.rect.left,\n y: dragOverlay.rect.top - active.rect.top\n };\n const scale = {\n scaleX: transform.scaleX !== 1 ? active.rect.width * transform.scaleX / dragOverlay.rect.width : 1,\n scaleY: transform.scaleY !== 1 ? active.rect.height * transform.scaleY / dragOverlay.rect.height : 1\n };\n const finalTransform = {\n x: transform.x - delta.x,\n y: transform.y - delta.y,\n ...scale\n };\n const animationKeyframes = keyframes({ ...rest,\n active,\n dragOverlay,\n transform: {\n initial: transform,\n final: finalTransform\n }\n });\n const [firstKeyframe] = animationKeyframes;\n const lastKeyframe = animationKeyframes[animationKeyframes.length - 1];\n\n if (JSON.stringify(firstKeyframe) === JSON.stringify(lastKeyframe)) {\n // The start and end keyframes are the same, infer that there is no animation needed.\n return;\n }\n\n const cleanup = sideEffects == null ? void 0 : sideEffects({\n active,\n dragOverlay,\n ...rest\n });\n const animation = dragOverlay.node.animate(animationKeyframes, {\n duration,\n easing,\n fill: 'forwards'\n });\n return new Promise(resolve => {\n animation.onfinish = () => {\n cleanup == null ? void 0 : cleanup();\n resolve();\n };\n });\n };\n}\n\nlet key = 0;\nfunction useKey(id) {\n return useMemo(() => {\n if (id == null) {\n return;\n }\n\n key++;\n return key;\n }, [id]);\n}\n\nconst DragOverlay = /*#__PURE__*/React.memo(_ref => {\n let {\n adjustScale = false,\n children,\n dropAnimation: dropAnimationConfig,\n style,\n transition,\n modifiers,\n wrapperElement = 'div',\n className,\n zIndex = 999\n } = _ref;\n const {\n activatorEvent,\n active,\n activeNodeRect,\n containerNodeRect,\n draggableNodes,\n droppableContainers,\n dragOverlay,\n over,\n measuringConfiguration,\n scrollableAncestors,\n scrollableAncestorRects,\n windowRect\n } = useDndContext();\n const transform = useContext(ActiveDraggableContext);\n const key = useKey(active == null ? void 0 : active.id);\n const modifiedTransform = applyModifiers(modifiers, {\n activatorEvent,\n active,\n activeNodeRect,\n containerNodeRect,\n draggingNodeRect: dragOverlay.rect,\n over,\n overlayNodeRect: dragOverlay.rect,\n scrollableAncestors,\n scrollableAncestorRects,\n transform,\n windowRect\n });\n const initialRect = useInitialValue(activeNodeRect);\n const dropAnimation = useDropAnimation({\n config: dropAnimationConfig,\n draggableNodes,\n droppableContainers,\n measuringConfiguration\n }); // We need to wait for the active node to be measured before connecting the drag overlay ref\n // otherwise collisions can be computed against a mispositioned drag overlay\n\n const ref = initialRect ? dragOverlay.setRef : undefined;\n return React.createElement(NullifiedContextProvider, null, React.createElement(AnimationManager, {\n animation: dropAnimation\n }, active && key ? React.createElement(PositionedOverlay, {\n key: key,\n id: active.id,\n ref: ref,\n as: wrapperElement,\n activatorEvent: activatorEvent,\n adjustScale: adjustScale,\n className: className,\n transition: transition,\n rect: initialRect,\n style: {\n zIndex,\n ...style\n },\n transform: modifiedTransform\n }, children) : null));\n});\n\nexport { AutoScrollActivator, DndContext, DragOverlay, KeyboardCode, KeyboardSensor, MeasuringFrequency, MeasuringStrategy, MouseSensor, PointerSensor, TouchSensor, TraversalOrder, applyModifiers, closestCenter, closestCorners, defaultAnnouncements, defaultCoordinates, defaultDropAnimationConfiguration as defaultDropAnimation, defaultDropAnimationSideEffects, defaultScreenReaderInstructions, getClientRect, getFirstCollision, getScrollableAncestors, pointerWithin, rectIntersection, useDndContext, useDndMonitor, useDraggable, useDroppable, useSensor, useSensors };\n//# sourceMappingURL=core.esm.js.map\n","import React, { useMemo, useRef, useEffect, useState, useContext } from 'react';\nimport { useDndContext, getClientRect, useDroppable, useDraggable, closestCorners, getFirstCollision, getScrollableAncestors, KeyboardCode } from '@dnd-kit/core';\nimport { useUniqueId, useIsomorphicLayoutEffect, CSS, useCombinedRefs, isKeyboardEvent, subtract } from '@dnd-kit/utilities';\n\n/**\r\n * Move an array item to a different position. Returns a new array with the item moved to the new position.\r\n */\nfunction arrayMove(array, from, to) {\n const newArray = array.slice();\n newArray.splice(to < 0 ? newArray.length + to : to, 0, newArray.splice(from, 1)[0]);\n return newArray;\n}\n\n/**\r\n * Swap an array item to a different position. Returns a new array with the item swapped to the new position.\r\n */\nfunction arraySwap(array, from, to) {\n const newArray = array.slice();\n newArray[from] = array[to];\n newArray[to] = array[from];\n return newArray;\n}\n\nfunction getSortedRects(items, rects) {\n return items.reduce((accumulator, id, index) => {\n const rect = rects.get(id);\n\n if (rect) {\n accumulator[index] = rect;\n }\n\n return accumulator;\n }, Array(items.length));\n}\n\nfunction isValidIndex(index) {\n return index !== null && index >= 0;\n}\n\nfunction itemsEqual(a, b) {\n if (a === b) {\n return true;\n }\n\n if (a.length !== b.length) {\n return false;\n }\n\n for (let i = 0; i < a.length; i++) {\n if (a[i] !== b[i]) {\n return false;\n }\n }\n\n return true;\n}\n\nfunction normalizeDisabled(disabled) {\n if (typeof disabled === 'boolean') {\n return {\n draggable: disabled,\n droppable: disabled\n };\n }\n\n return disabled;\n}\n\n// To-do: We should be calculating scale transformation\nconst defaultScale = {\n scaleX: 1,\n scaleY: 1\n};\nconst horizontalListSortingStrategy = _ref => {\n var _rects$activeIndex;\n\n let {\n rects,\n activeNodeRect: fallbackActiveRect,\n activeIndex,\n overIndex,\n index\n } = _ref;\n const activeNodeRect = (_rects$activeIndex = rects[activeIndex]) != null ? _rects$activeIndex : fallbackActiveRect;\n\n if (!activeNodeRect) {\n return null;\n }\n\n const itemGap = getItemGap(rects, index, activeIndex);\n\n if (index === activeIndex) {\n const newIndexRect = rects[overIndex];\n\n if (!newIndexRect) {\n return null;\n }\n\n return {\n x: activeIndex < overIndex ? newIndexRect.left + newIndexRect.width - (activeNodeRect.left + activeNodeRect.width) : newIndexRect.left - activeNodeRect.left,\n y: 0,\n ...defaultScale\n };\n }\n\n if (index > activeIndex && index <= overIndex) {\n return {\n x: -activeNodeRect.width - itemGap,\n y: 0,\n ...defaultScale\n };\n }\n\n if (index < activeIndex && index >= overIndex) {\n return {\n x: activeNodeRect.width + itemGap,\n y: 0,\n ...defaultScale\n };\n }\n\n return {\n x: 0,\n y: 0,\n ...defaultScale\n };\n};\n\nfunction getItemGap(rects, index, activeIndex) {\n const currentRect = rects[index];\n const previousRect = rects[index - 1];\n const nextRect = rects[index + 1];\n\n if (!currentRect || !previousRect && !nextRect) {\n return 0;\n }\n\n if (activeIndex < index) {\n return previousRect ? currentRect.left - (previousRect.left + previousRect.width) : nextRect.left - (currentRect.left + currentRect.width);\n }\n\n return nextRect ? nextRect.left - (currentRect.left + currentRect.width) : currentRect.left - (previousRect.left + previousRect.width);\n}\n\nconst rectSortingStrategy = _ref => {\n let {\n rects,\n activeIndex,\n overIndex,\n index\n } = _ref;\n const newRects = arrayMove(rects, overIndex, activeIndex);\n const oldRect = rects[index];\n const newRect = newRects[index];\n\n if (!newRect || !oldRect) {\n return null;\n }\n\n return {\n x: newRect.left - oldRect.left,\n y: newRect.top - oldRect.top,\n scaleX: newRect.width / oldRect.width,\n scaleY: newRect.height / oldRect.height\n };\n};\n\nconst rectSwappingStrategy = _ref => {\n let {\n activeIndex,\n index,\n rects,\n overIndex\n } = _ref;\n let oldRect;\n let newRect;\n\n if (index === activeIndex) {\n oldRect = rects[index];\n newRect = rects[overIndex];\n }\n\n if (index === overIndex) {\n oldRect = rects[index];\n newRect = rects[activeIndex];\n }\n\n if (!newRect || !oldRect) {\n return null;\n }\n\n return {\n x: newRect.left - oldRect.left,\n y: newRect.top - oldRect.top,\n scaleX: newRect.width / oldRect.width,\n scaleY: newRect.height / oldRect.height\n };\n};\n\n// To-do: We should be calculating scale transformation\nconst defaultScale$1 = {\n scaleX: 1,\n scaleY: 1\n};\nconst verticalListSortingStrategy = _ref => {\n var _rects$activeIndex;\n\n let {\n activeIndex,\n activeNodeRect: fallbackActiveRect,\n index,\n rects,\n overIndex\n } = _ref;\n const activeNodeRect = (_rects$activeIndex = rects[activeIndex]) != null ? _rects$activeIndex : fallbackActiveRect;\n\n if (!activeNodeRect) {\n return null;\n }\n\n if (index === activeIndex) {\n const overIndexRect = rects[overIndex];\n\n if (!overIndexRect) {\n return null;\n }\n\n return {\n x: 0,\n y: activeIndex < overIndex ? overIndexRect.top + overIndexRect.height - (activeNodeRect.top + activeNodeRect.height) : overIndexRect.top - activeNodeRect.top,\n ...defaultScale$1\n };\n }\n\n const itemGap = getItemGap$1(rects, index, activeIndex);\n\n if (index > activeIndex && index <= overIndex) {\n return {\n x: 0,\n y: -activeNodeRect.height - itemGap,\n ...defaultScale$1\n };\n }\n\n if (index < activeIndex && index >= overIndex) {\n return {\n x: 0,\n y: activeNodeRect.height + itemGap,\n ...defaultScale$1\n };\n }\n\n return {\n x: 0,\n y: 0,\n ...defaultScale$1\n };\n};\n\nfunction getItemGap$1(clientRects, index, activeIndex) {\n const currentRect = clientRects[index];\n const previousRect = clientRects[index - 1];\n const nextRect = clientRects[index + 1];\n\n if (!currentRect) {\n return 0;\n }\n\n if (activeIndex < index) {\n return previousRect ? currentRect.top - (previousRect.top + previousRect.height) : nextRect ? nextRect.top - (currentRect.top + currentRect.height) : 0;\n }\n\n return nextRect ? nextRect.top - (currentRect.top + currentRect.height) : previousRect ? currentRect.top - (previousRect.top + previousRect.height) : 0;\n}\n\nconst ID_PREFIX = 'Sortable';\nconst Context = /*#__PURE__*/React.createContext({\n activeIndex: -1,\n containerId: ID_PREFIX,\n disableTransforms: false,\n items: [],\n overIndex: -1,\n useDragOverlay: false,\n sortedRects: [],\n strategy: rectSortingStrategy,\n disabled: {\n draggable: false,\n droppable: false\n }\n});\nfunction SortableContext(_ref) {\n let {\n children,\n id,\n items: userDefinedItems,\n strategy = rectSortingStrategy,\n disabled: disabledProp = false\n } = _ref;\n const {\n active,\n dragOverlay,\n droppableRects,\n over,\n measureDroppableContainers\n } = useDndContext();\n const containerId = useUniqueId(ID_PREFIX, id);\n const useDragOverlay = Boolean(dragOverlay.rect !== null);\n const items = useMemo(() => userDefinedItems.map(item => typeof item === 'object' && 'id' in item ? item.id : item), [userDefinedItems]);\n const isDragging = active != null;\n const activeIndex = active ? items.indexOf(active.id) : -1;\n const overIndex = over ? items.indexOf(over.id) : -1;\n const previousItemsRef = useRef(items);\n const itemsHaveChanged = !itemsEqual(items, previousItemsRef.current);\n const disableTransforms = overIndex !== -1 && activeIndex === -1 || itemsHaveChanged;\n const disabled = normalizeDisabled(disabledProp);\n useIsomorphicLayoutEffect(() => {\n if (itemsHaveChanged && isDragging) {\n measureDroppableContainers(items);\n }\n }, [itemsHaveChanged, items, isDragging, measureDroppableContainers]);\n useEffect(() => {\n previousItemsRef.current = items;\n }, [items]);\n const contextValue = useMemo(() => ({\n activeIndex,\n containerId,\n disabled,\n disableTransforms,\n items,\n overIndex,\n useDragOverlay,\n sortedRects: getSortedRects(items, droppableRects),\n strategy\n }), // eslint-disable-next-line react-hooks/exhaustive-deps\n [activeIndex, containerId, disabled.draggable, disabled.droppable, disableTransforms, items, overIndex, droppableRects, useDragOverlay, strategy]);\n return React.createElement(Context.Provider, {\n value: contextValue\n }, children);\n}\n\nconst defaultNewIndexGetter = _ref => {\n let {\n id,\n items,\n activeIndex,\n overIndex\n } = _ref;\n return arrayMove(items, activeIndex, overIndex).indexOf(id);\n};\nconst defaultAnimateLayoutChanges = _ref2 => {\n let {\n containerId,\n isSorting,\n wasDragging,\n index,\n items,\n newIndex,\n previousItems,\n previousContainerId,\n transition\n } = _ref2;\n\n if (!transition || !wasDragging) {\n return false;\n }\n\n if (previousItems !== items && index === newIndex) {\n return false;\n }\n\n if (isSorting) {\n return true;\n }\n\n return newIndex !== index && containerId === previousContainerId;\n};\nconst defaultTransition = {\n duration: 200,\n easing: 'ease'\n};\nconst transitionProperty = 'transform';\nconst disabledTransition = /*#__PURE__*/CSS.Transition.toString({\n property: transitionProperty,\n duration: 0,\n easing: 'linear'\n});\nconst defaultAttributes = {\n roleDescription: 'sortable'\n};\n\n/*\r\n * When the index of an item changes while sorting,\r\n * we need to temporarily disable the transforms\r\n */\n\nfunction useDerivedTransform(_ref) {\n let {\n disabled,\n index,\n node,\n rect\n } = _ref;\n const [derivedTransform, setDerivedtransform] = useState(null);\n const previousIndex = useRef(index);\n useIsomorphicLayoutEffect(() => {\n if (!disabled && index !== previousIndex.current && node.current) {\n const initial = rect.current;\n\n if (initial) {\n const current = getClientRect(node.current, {\n ignoreTransform: true\n });\n const delta = {\n x: initial.left - current.left,\n y: initial.top - current.top,\n scaleX: initial.width / current.width,\n scaleY: initial.height / current.height\n };\n\n if (delta.x || delta.y) {\n setDerivedtransform(delta);\n }\n }\n }\n\n if (index !== previousIndex.current) {\n previousIndex.current = index;\n }\n }, [disabled, index, node, rect]);\n useEffect(() => {\n if (derivedTransform) {\n setDerivedtransform(null);\n }\n }, [derivedTransform]);\n return derivedTransform;\n}\n\nfunction useSortable(_ref) {\n let {\n animateLayoutChanges = defaultAnimateLayoutChanges,\n attributes: userDefinedAttributes,\n disabled: localDisabled,\n data: customData,\n getNewIndex = defaultNewIndexGetter,\n id,\n strategy: localStrategy,\n resizeObserverConfig,\n transition = defaultTransition\n } = _ref;\n const {\n items,\n containerId,\n activeIndex,\n disabled: globalDisabled,\n disableTransforms,\n sortedRects,\n overIndex,\n useDragOverlay,\n strategy: globalStrategy\n } = useContext(Context);\n const disabled = normalizeLocalDisabled(localDisabled, globalDisabled);\n const index = items.indexOf(id);\n const data = useMemo(() => ({\n sortable: {\n containerId,\n index,\n items\n },\n ...customData\n }), [containerId, customData, index, items]);\n const itemsAfterCurrentSortable = useMemo(() => items.slice(items.indexOf(id)), [items, id]);\n const {\n rect,\n node,\n isOver,\n setNodeRef: setDroppableNodeRef\n } = useDroppable({\n id,\n data,\n disabled: disabled.droppable,\n resizeObserverConfig: {\n updateMeasurementsFor: itemsAfterCurrentSortable,\n ...resizeObserverConfig\n }\n });\n const {\n active,\n activatorEvent,\n activeNodeRect,\n attributes,\n setNodeRef: setDraggableNodeRef,\n listeners,\n isDragging,\n over,\n setActivatorNodeRef,\n transform\n } = useDraggable({\n id,\n data,\n attributes: { ...defaultAttributes,\n ...userDefinedAttributes\n },\n disabled: disabled.draggable\n });\n const setNodeRef = useCombinedRefs(setDroppableNodeRef, setDraggableNodeRef);\n const isSorting = Boolean(active);\n const displaceItem = isSorting && !disableTransforms && isValidIndex(activeIndex) && isValidIndex(overIndex);\n const shouldDisplaceDragSource = !useDragOverlay && isDragging;\n const dragSourceDisplacement = shouldDisplaceDragSource && displaceItem ? transform : null;\n const strategy = localStrategy != null ? localStrategy : globalStrategy;\n const finalTransform = displaceItem ? dragSourceDisplacement != null ? dragSourceDisplacement : strategy({\n rects: sortedRects,\n activeNodeRect,\n activeIndex,\n overIndex,\n index\n }) : null;\n const newIndex = isValidIndex(activeIndex) && isValidIndex(overIndex) ? getNewIndex({\n id,\n items,\n activeIndex,\n overIndex\n }) : index;\n const activeId = active == null ? void 0 : active.id;\n const previous = useRef({\n activeId,\n items,\n newIndex,\n containerId\n });\n const itemsHaveChanged = items !== previous.current.items;\n const shouldAnimateLayoutChanges = animateLayoutChanges({\n active,\n containerId,\n isDragging,\n isSorting,\n id,\n index,\n items,\n newIndex: previous.current.newIndex,\n previousItems: previous.current.items,\n previousContainerId: previous.current.containerId,\n transition,\n wasDragging: previous.current.activeId != null\n });\n const derivedTransform = useDerivedTransform({\n disabled: !shouldAnimateLayoutChanges,\n index,\n node,\n rect\n });\n useEffect(() => {\n if (isSorting && previous.current.newIndex !== newIndex) {\n previous.current.newIndex = newIndex;\n }\n\n if (containerId !== previous.current.containerId) {\n previous.current.containerId = containerId;\n }\n\n if (items !== previous.current.items) {\n previous.current.items = items;\n }\n }, [isSorting, newIndex, containerId, items]);\n useEffect(() => {\n if (activeId === previous.current.activeId) {\n return;\n }\n\n if (activeId && !previous.current.activeId) {\n previous.current.activeId = activeId;\n return;\n }\n\n const timeoutId = setTimeout(() => {\n previous.current.activeId = activeId;\n }, 50);\n return () => clearTimeout(timeoutId);\n }, [activeId]);\n return {\n active,\n activeIndex,\n attributes,\n data,\n rect,\n index,\n newIndex,\n items,\n isOver,\n isSorting,\n isDragging,\n listeners,\n node,\n overIndex,\n over,\n setNodeRef,\n setActivatorNodeRef,\n setDroppableNodeRef,\n setDraggableNodeRef,\n transform: derivedTransform != null ? derivedTransform : finalTransform,\n transition: getTransition()\n };\n\n function getTransition() {\n if ( // Temporarily disable transitions for a single frame to set up derived transforms\n derivedTransform || // Or to prevent items jumping to back to their \"new\" position when items change\n itemsHaveChanged && previous.current.newIndex === index) {\n return disabledTransition;\n }\n\n if (shouldDisplaceDragSource && !isKeyboardEvent(activatorEvent) || !transition) {\n return undefined;\n }\n\n if (isSorting || shouldAnimateLayoutChanges) {\n return CSS.Transition.toString({ ...transition,\n property: transitionProperty\n });\n }\n\n return undefined;\n }\n}\n\nfunction normalizeLocalDisabled(localDisabled, globalDisabled) {\n var _localDisabled$dragga, _localDisabled$droppa;\n\n if (typeof localDisabled === 'boolean') {\n return {\n draggable: localDisabled,\n // Backwards compatibility\n droppable: false\n };\n }\n\n return {\n draggable: (_localDisabled$dragga = localDisabled == null ? void 0 : localDisabled.draggable) != null ? _localDisabled$dragga : globalDisabled.draggable,\n droppable: (_localDisabled$droppa = localDisabled == null ? void 0 : localDisabled.droppable) != null ? _localDisabled$droppa : globalDisabled.droppable\n };\n}\n\nfunction hasSortableData(entry) {\n if (!entry) {\n return false;\n }\n\n const data = entry.data.current;\n\n if (data && 'sortable' in data && typeof data.sortable === 'object' && 'containerId' in data.sortable && 'items' in data.sortable && 'index' in data.sortable) {\n return true;\n }\n\n return false;\n}\n\nconst directions = [KeyboardCode.Down, KeyboardCode.Right, KeyboardCode.Up, KeyboardCode.Left];\nconst sortableKeyboardCoordinates = (event, _ref) => {\n let {\n context: {\n active,\n collisionRect,\n droppableRects,\n droppableContainers,\n over,\n scrollableAncestors\n }\n } = _ref;\n\n if (directions.includes(event.code)) {\n event.preventDefault();\n\n if (!active || !collisionRect) {\n return;\n }\n\n const filteredContainers = [];\n droppableContainers.getEnabled().forEach(entry => {\n if (!entry || entry != null && entry.disabled) {\n return;\n }\n\n const rect = droppableRects.get(entry.id);\n\n if (!rect) {\n return;\n }\n\n switch (event.code) {\n case KeyboardCode.Down:\n if (collisionRect.top < rect.top) {\n filteredContainers.push(entry);\n }\n\n break;\n\n case KeyboardCode.Up:\n if (collisionRect.top > rect.top) {\n filteredContainers.push(entry);\n }\n\n break;\n\n case KeyboardCode.Left:\n if (collisionRect.left > rect.left) {\n filteredContainers.push(entry);\n }\n\n break;\n\n case KeyboardCode.Right:\n if (collisionRect.left < rect.left) {\n filteredContainers.push(entry);\n }\n\n break;\n }\n });\n const collisions = closestCorners({\n active,\n collisionRect: collisionRect,\n droppableRects,\n droppableContainers: filteredContainers,\n pointerCoordinates: null\n });\n let closestId = getFirstCollision(collisions, 'id');\n\n if (closestId === (over == null ? void 0 : over.id) && collisions.length > 1) {\n closestId = collisions[1].id;\n }\n\n if (closestId != null) {\n const activeDroppable = droppableContainers.get(active.id);\n const newDroppable = droppableContainers.get(closestId);\n const newRect = newDroppable ? droppableRects.get(newDroppable.id) : null;\n const newNode = newDroppable == null ? void 0 : newDroppable.node.current;\n\n if (newNode && newRect && activeDroppable && newDroppable) {\n const newScrollAncestors = getScrollableAncestors(newNode);\n const hasDifferentScrollAncestors = newScrollAncestors.some((element, index) => scrollableAncestors[index] !== element);\n const hasSameContainer = isSameContainer(activeDroppable, newDroppable);\n const isAfterActive = isAfter(activeDroppable, newDroppable);\n const offset = hasDifferentScrollAncestors || !hasSameContainer ? {\n x: 0,\n y: 0\n } : {\n x: isAfterActive ? collisionRect.width - newRect.width : 0,\n y: isAfterActive ? collisionRect.height - newRect.height : 0\n };\n const rectCoordinates = {\n x: newRect.left,\n y: newRect.top\n };\n const newCoordinates = offset.x && offset.y ? rectCoordinates : subtract(rectCoordinates, offset);\n return newCoordinates;\n }\n }\n }\n\n return undefined;\n};\n\nfunction isSameContainer(a, b) {\n if (!hasSortableData(a) || !hasSortableData(b)) {\n return false;\n }\n\n return a.data.current.sortable.containerId === b.data.current.sortable.containerId;\n}\n\nfunction isAfter(a, b) {\n if (!hasSortableData(a) || !hasSortableData(b)) {\n return false;\n }\n\n if (!isSameContainer(a, b)) {\n return false;\n }\n\n return a.data.current.sortable.index < b.data.current.sortable.index;\n}\n\nexport { SortableContext, arrayMove, arraySwap, defaultAnimateLayoutChanges, defaultNewIndexGetter, hasSortableData, horizontalListSortingStrategy, rectSortingStrategy, rectSwappingStrategy, sortableKeyboardCoordinates, useSortable, verticalListSortingStrategy };\n//# sourceMappingURL=sortable.esm.js.map\n","import { DndContext, DndContextProps } from \"@dnd-kit/core\";\nimport React, { FC, createContext, useContext, useEffect } from \"react\";\n\n/**\n * Facilitates DI for the DndContext\n */\nexport const injectDndContext = createContext<FC<DndContextProps>>(DndContext);\n\n/**\n * Wraps dnd-kit's `DndContext` to normalise scroll behaviour and enable dependency injection\n */\nexport const InternalDndContext = (props: DndContextProps) => {\n const DndContext = useContext(injectDndContext);\n\n /**\n * Disable smooth scrolling during drag to ensure that the dragged item is always visible\n */\n useEffect(() => {\n const originalScrollingBehaviour =\n document.documentElement.style.scrollBehavior;\n document.documentElement.style.scrollBehavior = \"auto\";\n\n return () => {\n document.documentElement.style.scrollBehavior =\n originalScrollingBehaviour;\n };\n });\n\n return <DndContext {...props} />;\n};\n","import { useEffect, useState } from \"react\";\n\n/**\n * Returns true if the user has requested that the system minimize the amount of non-essential motion it uses.\n */\nexport function usePrefersReducedMotion() {\n const [prefersReducedMotion, setPrefersReducedMotion] = useState(false);\n\n useEffect(() => {\n const mediaQuery = window.matchMedia(\"(prefers-reduced-motion: reduce)\");\n\n setPrefersReducedMotion(mediaQuery.matches);\n }, []);\n\n return prefersReducedMotion;\n}\n","import React, { useState } from \"react\";\nimport {\n closestCenter,\n KeyboardSensor,\n useSensor,\n useSensors,\n DragEndEvent,\n DragOverlay,\n DragStartEvent,\n UniqueIdentifier,\n Announcements,\n MouseSensor,\n TouchSensor,\n} from \"@dnd-kit/core\";\nimport {\n arrayMove,\n SortableContext,\n sortableKeyboardCoordinates,\n useSortable,\n verticalListSortingStrategy,\n} from \"@dnd-kit/sortable\";\nimport { CSS } from \"@dnd-kit/utilities\";\nimport { createPortal } from \"react-dom\";\n\nimport { OakFlex } from \"@/components/atoms\";\nimport {\n OakDragAndDropInstructions,\n OakDraggable,\n OakDroppable,\n} from \"@/components/molecules\";\nimport { InternalDndContext } from \"@/components/atoms/InternalDndContext/InternalDndContext\";\nimport { usePrefersReducedMotion } from \"@/animation/usePrefersReducedMotion\";\n\ntype OakQuizOrderItem = {\n id: string;\n label: string;\n};\n\nexport type OakQuizOrderProps = {\n /**\n * The initial order of items\n *\n * this cannot be updated on subsequent renders\n */\n initialItems: OakQuizOrderItem[];\n /**\n * Notified the consumer when the order of items has changed\n */\n onChange?: (items: OakQuizOrderItem[]) => void;\n /**\n * Highlight all items to indicate that they can be interacted with\n */\n isHighlighted?: boolean;\n};\n\nconst ConnectedDraggable = ({\n id,\n label,\n isHighlighted,\n}: OakQuizOrderItem & { isHighlighted?: boolean }) => {\n const {\n attributes,\n listeners,\n setNodeRef,\n transform,\n transition,\n isOver,\n isDragging,\n } = useSortable({ id });\n const style = {\n transform: CSS.Transform.toString(transform),\n transition,\n };\n\n return (\n <OakDroppable isOver={isOver} isHighlighted={isHighlighted}>\n <OakDraggable\n ref={setNodeRef}\n style={style}\n isDisabled={isDragging}\n {...attributes}\n {...listeners}\n aria-describedby={undefined}\n aria-roledescription=\"sortable item\"\n aria-pressed={undefined}\n aria-selected={!!attributes[\"aria-pressed\"]}\n role=\"option\"\n >\n {label}\n </OakDraggable>\n </OakDroppable>\n );\n};\n\n/**\n * A sortable list of items with drag and drop functionality. Items can be dragged over named slots to re-arrange them\n *\n * Keyboard navigation is supported with the `tab`, `space` and `arrow` keys\n */\nexport const OakQuizOrder = ({\n initialItems,\n onChange,\n isHighlighted,\n}: OakQuizOrderProps) => {\n const [items, setItems] = useState<OakQuizOrderItem[]>(initialItems);\n const [activeId, setActiveId] = useState<string | null>(null);\n const activeItem = items.find((item) => item.id === activeId);\n const sensors = useSensors(\n useSensor(MouseSensor),\n useSensor(TouchSensor),\n useSensor(KeyboardSensor, {\n coordinateGetter: sortableKeyboardCoordinates,\n scrollBehavior: usePrefersReducedMotion() ? \"instant\" : \"smooth\",\n }),\n );\n\n return (\n <>\n <OakDragAndDropInstructions $mb=\"space-between-m2\" />\n <InternalDndContext\n sensors={sensors}\n collisionDetection={closestCenter}\n onDragEnd={handleDragEnd}\n onDragStart={handleDragStart}\n accessibility={{\n announcements: createAccouncements(items),\n }}\n >\n <SortableContext items={items} strategy={verticalListSortingStrategy}>\n <OakFlex\n $gap=\"space-between-s\"\n $flexDirection=\"column\"\n role=\"listbox\"\n aria-label=\"Sortable items\"\n >\n {items.map((item) => (\n <ConnectedDraggable\n key={item.id}\n {...item}\n isHighlighted={isHighlighted}\n />\n ))}\n </OakFlex>\n {createPortal(\n <DragOverlay>\n {activeItem && (\n <OakDraggable isDragging>{activeItem.label}</OakDraggable>\n )}\n </DragOverlay>,\n document.body,\n )}\n </SortableContext>\n </InternalDndContext>\n </>\n );\n\n function handleDragStart(event: DragStartEvent) {\n const { active } = event;\n setActiveId(active.id.toString());\n }\n\n function handleDragEnd(event: DragEndEvent) {\n const { active, over } = event;\n\n if (active.id !== over?.id) {\n setItems((items) => {\n const oldIndex = items.findIndex((item) => item.id === active.id);\n const newIndex = items.findIndex((item) => item.id === over?.id);\n const newItems = arrayMove(items, oldIndex, newIndex);\n\n onChange?.(newItems);\n\n return newItems;\n });\n }\n\n setActiveId(null);\n }\n};\n\nfunction createAccouncements(items: OakQuizOrderItem[]): Announcements {\n const getPosition = (id: UniqueIdentifier) =>\n items.findIndex((item) => item.id === id) + 1;\n const getItemLabel = (id: UniqueIdentifier) =>\n items.find((item) => item.id === id)?.label;\n\n return {\n onDragStart() {\n return undefined;\n },\n onDragOver({ active, over }) {\n if (over) {\n return `Sortable item ${getItemLabel(\n active.id,\n )} is in position ${getPosition(over.id)} of ${items.length}`;\n }\n },\n onDragEnd({ active, over }) {\n if (over) {\n return `Sortable item ${getItemLabel(\n active.id,\n )} was dropped into position ${getPosition(over.id)} of ${\n items.length\n }`;\n }\n },\n onDragCancel({ active }) {\n return `Dragging was cancelled. Sortable item ${getItemLabel(\n active.id,\n )} was dropped.`;\n },\n };\n}\n","import React, {\n ComponentPropsWithRef,\n ComponentPropsWithoutRef,\n FC,\n forwardRef,\n useLayoutEffect,\n useState,\n} from \"react\";\nimport styled from \"styled-components\";\n\nimport { OakBox, OakFlex } from \"@/components/atoms\";\nimport { parseColor } from \"@/styles/helpers/parseColor\";\n\nconst StyledOakBox = styled(OakBox)`\n background-color: ${parseColor(\"grey20\")};\n background-color: color-mix(in lch, ${parseColor(\"black\")} 5%, transparent);\n\n &[data-over=\"true\"] {\n background-color: ${parseColor(\"white\")};\n background-color: color-mix(\n in lch,\n ${parseColor(\"white\")} 60%,\n transparent\n );\n }\n`;\n\ntype InternalDroppableHoldingPenProps = {\n /**\n * Indicates whether a draggable is currently being dragged over the droppable\n */\n isOver?: boolean;\n};\n\n/**\n * An internal holding pen for multiple draggable items\n *\n * Has no intrinsic drop functionally.\n * It is intended to be used with `useDroppable` from `@dnd-kit/core`\n */\nexport const InternalDroppableHoldingPen: FC<\n ComponentPropsWithRef<typeof OakFlex>\n> = forwardRef<\n HTMLDivElement,\n InternalDroppableHoldingPenProps & ComponentPropsWithoutRef<typeof OakFlex>\n>(({ isOver, children, ...props }, ref) => {\n const [domContent, setContentBox] = useState<HTMLDivElement | null>(null);\n const [minHeight, setMinHeight] = useState<number>(0);\n\n useLayoutEffect(() => {\n if (!domContent) {\n return;\n }\n\n // Prevents the holding area from shrinking when an item is removed\n // avoiding layout shift\n const observer = new ResizeObserver((entries) => {\n for (const entry of entries) {\n setMinHeight((currentHeight) =>\n Math.max(entry.borderBoxSize[0]?.blockSize ?? 0, currentHeight),\n );\n }\n });\n\n observer.observe(domContent);\n\n // Reset min height when the window is resized so that the holding pen can shrink\n function resetMinHeight() {\n setMinHeight(0);\n }\n window.addEventListener(\"resize\", resetMinHeight);\n\n return () => {\n observer.disconnect();\n window.removeEventListener(\"resize\", resetMinHeight);\n };\n }, [domContent]);\n\n return (\n <StyledOakBox\n ref={ref}\n $mb=\"space-between-m2\"\n $borderRadius=\"border-radius-l\"\n data-over={isOver}\n style={{ minHeight: minHeight === 0 ? \"auto\" : minHeight }}\n {...props}\n >\n <OakFlex\n $alignItems=\"flex-start\"\n $minHeight=\"all-spacing-13\"\n $pa=\"inner-padding-s\"\n $gap=\"space-between-xs\"\n $flexWrap=\"wrap\"\n ref={setContentBox}\n >\n {children}\n </OakFlex>\n </StyledOakBox>\n );\n});\n","import React, { ReactNode, useRef, useState } from \"react\";\nimport {\n closestCenter,\n KeyboardSensor,\n useSensor,\n useSensors,\n DragEndEvent,\n DragOverlay,\n DragStartEvent,\n Announcements,\n MouseSensor,\n TouchSensor,\n useDraggable,\n useDroppable,\n} from \"@dnd-kit/core\";\nimport { createPortal } from \"react-dom\";\nimport { sortableKeyboardCoordinates } from \"@dnd-kit/sortable\";\n\nimport { InternalDroppableHoldingPen } from \"../InternalDroppableHoldingPen\";\n\nimport { OakFlex } from \"@/components/atoms\";\nimport {\n OakDragAndDropInstructions,\n OakDraggable,\n OakDroppable,\n} from \"@/components/molecules\";\nimport { usePrefersReducedMotion } from \"@/animation/usePrefersReducedMotion\";\nimport { InternalDndContext } from \"@/components/atoms/InternalDndContext/InternalDndContext\";\n\ntype DraggableId = string;\ntype DroppableId = string;\ntype DraggableItem = {\n id: DraggableId;\n label: string;\n};\ntype DroppableItem = {\n id: DroppableId;\n label: string;\n};\ntype Matches = Record<DroppableId, DraggableItem>;\n\nexport type OakQuizMatchProps = {\n /**\n * The initial options\n *\n * these are the items that can be dragged into a slot to form a match\n *\n * this cannot be updated on subsequent renders\n */\n initialOptions: DraggableItem[];\n /**\n * The initial slots\n *\n * these are the slots into which an option can be dropped to form a match\n *\n * this cannot be updated on subsequent renders\n */\n initialSlots: DroppableItem[];\n /**\n * Notify the consumer when matches have changed\n */\n onChange?: (matches: Matches) => void;\n /**\n * Highlight the droppable slots\n */\n isHighlighted?: boolean;\n};\n\nconst ConnectedDraggable = ({\n id,\n label,\n isOver,\n}: DraggableItem & { isOver?: boolean }) => {\n const { attributes, listeners, setNodeRef, isDragging } = useDraggable({\n id,\n data: { id, label },\n });\n\n return (\n <OakDraggable\n ref={setNodeRef}\n isDisabled={isOver}\n color=\"text-inverted\"\n background=\"bg-btn-primary\"\n iconColor=\"icon-main\"\n {...attributes}\n {...listeners}\n role=\"option\"\n aria-describedby={undefined}\n aria-roledescription=\"draggable item\"\n aria-pressed={undefined}\n aria-selected={!!attributes[\"aria-pressed\"]}\n style={{ opacity: isDragging ? 0 : 1 }}\n >\n {label}\n </OakDraggable>\n );\n};\n\nconst ConnectedDroppableHoldingPen = ({\n children,\n}: {\n children?: ReactNode;\n}) => {\n const { setNodeRef, isOver } = useDroppable({\n id: \"holding-pen\",\n data: { label: \"holding pen\" },\n });\n\n return (\n <InternalDroppableHoldingPen\n ref={setNodeRef}\n isOver={isOver}\n aria-label=\"Available items\"\n data-testid=\"holding-pen\"\n role=\"listbox\"\n >\n {children}\n </InternalDroppableHoldingPen>\n );\n};\n\nconst ConnectedDroppable = ({\n id,\n label,\n match,\n isHighlighted,\n}: DroppableItem & { match?: DraggableItem; isHighlighted?: boolean }) => {\n const { setNodeRef, isOver, active } = useDroppable({\n id,\n data: { id, label },\n });\n\n return (\n <OakDroppable\n isOver={isOver}\n isDisabled={!active}\n ref={setNodeRef}\n id={id}\n labelSlot={label}\n data-testid=\"slot\"\n isHighlighted={isHighlighted}\n >\n {match && <ConnectedDraggable {...match} isOver={isOver} />}\n </OakDroppable>\n );\n};\n\n/**\n * A list of draggable items with matching slots to drop them into.\n *\n * Keyboard navigation is supported with the `tab`, `space` and `arrow` keys\n */\nexport const OakQuizMatch = ({\n initialOptions,\n initialSlots,\n isHighlighted,\n onChange,\n}: OakQuizMatchProps) => {\n const [matches, setMatches] = useState<Matches>({});\n const draggables = useRef(\n initialOptions.slice().sort(() => Math.random() - 0.5),\n ).current;\n const droppables = useRef(initialSlots).current;\n const [activeId, setActiveId] = useState<DraggableId | null>(null);\n const activeDraggable = draggables.find((item) => item.id === activeId);\n const prefersReducedMotion = usePrefersReducedMotion();\n const sensors = useSensors(\n useSensor(MouseSensor),\n useSensor(TouchSensor),\n useSensor(KeyboardSensor, {\n coordinateGetter: sortableKeyboardCoordinates,\n scrollBehavior: prefersReducedMotion ? \"instant\" : \"smooth\",\n }),\n );\n const matchedDraggableIds = Object.values(matches).map((item) => item.id);\n const unmatchedDraggables = draggables.filter(\n (draggable) => !matchedDraggableIds.includes(draggable.id),\n );\n return (\n <>\n <OakDragAndDropInstructions $mb=\"space-between-m2\" />\n <InternalDndContext\n sensors={sensors}\n collisionDetection={closestCenter}\n onDragEnd={handleDragEnd}\n onDragStart={handleDragStart}\n accessibility={{ announcements }}\n >\n <ConnectedDroppableHoldingPen>\n {unmatchedDraggables.map((item) => (\n <ConnectedDraggable key={item.id} {...item} />\n ))}\n </ConnectedDroppableHoldingPen>\n <OakFlex\n $gap=\"space-between-s\"\n $flexDirection=\"column\"\n aria-label=\"Matched items\"\n role=\"listbox\"\n >\n {droppables.map((droppable) => (\n <ConnectedDroppable\n key={droppable.id}\n {...droppable}\n isHighlighted={isHighlighted}\n match={matches[droppable.id]}\n />\n ))}\n </OakFlex>\n {createPortal(\n <DragOverlay dropAnimation={prefersReducedMotion ? null : undefined}>\n {activeDraggable && (\n <OakDraggable isDragging>{activeDraggable.label}</OakDraggable>\n )}\n </DragOverlay>,\n document.body,\n )}\n </InternalDndContext>\n </>\n );\n\n function handleDragStart(event: DragStartEvent) {\n const { active } = event;\n setActiveId(active.id.toString());\n }\n\n function handleDragEnd(event: DragEndEvent) {\n const { active, over } = event;\n\n if (over) {\n setMatches((matches) => {\n // Remove the draggable from its current slot\n const entries = Object.entries(matches).filter(\n ([, draggable]) => draggable?.id !== active.id,\n );\n const newMatches = Object.fromEntries(entries);\n\n if (over.id !== \"holding-pen\") {\n // We've dropped the draggable into a slot so add it to the new slot\n newMatches[over.id] = active.data.current as DraggableItem;\n }\n\n onChange?.(newMatches);\n\n return newMatches;\n });\n }\n\n setActiveId(null);\n }\n};\n\nconst announcements: Announcements = {\n onDragStart() {\n return undefined;\n },\n onDragOver({ active, over }) {\n if (over?.data.current && active.data?.current) {\n return `Item ${active.data.current.label} is over ${over.data.current.label}`;\n }\n },\n onDragEnd({ active, over }) {\n if (over?.data.current && active.data?.current) {\n return `Item ${active.data.current.label} was dropped onto ${over.data.current.label}`;\n }\n },\n onDragCancel({ active }) {\n if (active.data?.current) {\n return `Dragging was cancelled. Item ${active.data.current.label} was dropped.`;\n }\n },\n};\n","import type { UrlObject } from \"url\";\n\nimport React, { ReactNode } from \"react\";\nimport Link from \"next/link\";\nimport styled from \"styled-components\";\n\nimport {\n OakPrimaryButton,\n OakPrimaryButtonProps,\n} from \"@/components/molecules/OakPrimaryButton\";\nimport {\n OakPrimaryInvertedButton,\n OakPrimaryInvertedButtonProps,\n} from \"@/components/molecules/OakPrimaryInvertedButton\";\n\ntype Url = string | UrlObject;\n\nexport type OakPrimaryNavItemProps = {\n href: Url;\n isCurrent?: boolean;\n shallow?: boolean;\n children: ReactNode;\n} & OakPrimaryButtonProps &\n OakPrimaryInvertedButtonProps;\n\nconst OakPrimaryButtonWithoutPointerEvents = styled(OakPrimaryButton)`\n pointer-events: none;\n`;\n\n/**\n *\n * A specific implementation of OakPrimaryButton and OakPrimaryInvertedButton rendering\n * relevant view depending on isCurrent prop\n *\n */\nexport const OakPrimaryNavItem = ({\n href,\n isCurrent = false,\n shallow = true,\n children,\n}: OakPrimaryNavItemProps) => {\n return isCurrent ? (\n <OakPrimaryButtonWithoutPointerEvents\n element={\"span\"}\n aria-current={\"page\"}\n >\n {children}\n </OakPrimaryButtonWithoutPointerEvents>\n ) : (\n <OakPrimaryInvertedButton\n element={Link}\n href={href}\n shallow={shallow}\n isTrailingIcon={true}\n >\n {children}\n </OakPrimaryInvertedButton>\n );\n};\n","import React from \"react\";\n\nimport { OakSpan, OakSpanProps } from \"@/components/atoms\";\n\nexport type OakBulletListProps = {\n listItems: string[];\n} & OakSpanProps;\n\n/**\n * An inline bulleted list\n */\nexport const OakBulletList = (props: OakBulletListProps) => {\n const { listItems, ...rest } = props;\n return (\n <OakSpan {...rest}>\n {listItems.map((item, i) => {\n return (\n <OakSpan key={i}>\n {i !== 0 && <OakSpan> • </OakSpan>}\n <OakSpan>{item}</OakSpan>\n </OakSpan>\n );\n })}\n </OakSpan>\n );\n};\n","import React from \"react\";\n\nimport {\n OakFlex,\n OakHeading,\n OakHeadingTag,\n OakIcon,\n OakIconName,\n} from \"@/components/atoms\";\nimport { OakHandDrawnCard } from \"@/components/molecules/OakHandDrawnCard\";\n\nexport type OakInfoCardProps = {\n children: React.ReactNode;\n};\n\nexport type OakCardHeaderprops = {\n iconName: OakIconName;\n tag: OakHeadingTag;\n children: string;\n};\n\nexport const OakCardHeader = (props: OakCardHeaderprops) => {\n const { iconName, tag, children } = props;\n\n return (\n <OakFlex $alignItems={\"center\"} $gap={\"space-between-ssx\"}>\n <OakIcon iconName={iconName} />\n <OakHeading $font={\"heading-6\"} tag={tag}>\n {children}\n </OakHeading>\n </OakFlex>\n );\n};\n\n/**\n *\n * OakLessonInfoCards are created using the custom card either oakLessoninfoCard or oakStaticMessageCard and the content is added as children. And use the oakCardHeader to create the header of the card.\n *\n */\nexport const OakLessonInfoCard = (props: OakInfoCardProps) => {\n const { children, ...rest } = props;\n\n return (\n <OakFlex\n $borderRadius={\"border-radius-l\"}\n $pa={\"inner-padding-xl\"}\n $flexDirection={\"column\"}\n $gap={\"space-between-s\"}\n $background={\"white\"}\n {...rest}\n >\n {children}\n </OakFlex>\n );\n};\n\nexport const OakStaticMessageCard = (props: OakInfoCardProps) => {\n const { children, ...rest } = props;\n\n return (\n <OakHandDrawnCard\n {...rest}\n fill={[\n \"bg-decorative2-very-subdued\",\n \"bg-decorative2-subdued\",\n \"bg-decorative2-subdued\",\n ]}\n >\n <OakFlex\n $pa={\"inner-padding-none\"}\n $flexDirection={\"column\"}\n $gap={\"space-between-s\"}\n >\n {children}\n </OakFlex>\n </OakHandDrawnCard>\n );\n};\n","import React, { useRef } from \"react\";\n\nimport {\n BaseCheckBoxProps,\n InternalCheckBoxHoverFocus,\n} from \"@/components/atoms/InternalCheckBox/InternalCheckBox\";\nimport {\n InternalCheckBoxLabel,\n InternalCheckBoxLabelProps,\n} from \"@/components/atoms/InternalCheckBoxLabel\";\nimport { InternalCheckBoxWrapper } from \"@/components/atoms/InternalCheckBoxWrapper\";\nimport {\n OakAllSpacingToken,\n OakBorderRadiusToken,\n OakBorderWidthToken,\n OakCombinedColorToken,\n OakInnerPaddingToken,\n} from \"@/styles\";\n\nexport type OakCheckBoxProps = BaseCheckBoxProps & {\n checkboxSize?: OakAllSpacingToken;\n checkboxBorder?: OakBorderWidthToken;\n checkboxBorderRadius?: OakBorderRadiusToken;\n checkedIcon?: React.JSX.Element;\n checkedBackgroundFill?: boolean;\n hoverBorderRadius?: OakBorderRadiusToken;\n iconPadding?: OakInnerPaddingToken;\n defaultColor?: OakCombinedColorToken;\n disabledColor?: OakCombinedColorToken;\n displayValue?: string;\n} & InternalCheckBoxLabelProps;\n\n/**\n *\n * Default checkbox which can be extended to create specialised checkboxes.\n * - if provided, displayValue is used to display a different value to the value prop.\n *\n *\n * ## Events\n * The following callbacks are available for tracking focus events:\n *\n * ### onChange\n * onChange?: (event: React.ChangeEvent<HTMLInputElement>) => void;\n *\n * ### onFocus\n * onFocus?: (event: React.FocusEvent<HTMLInputElement>) => void;\n *\n * ### onBlur\n * onBlur?: (event: React.FocusEvent<HTMLInputElement>) => void;\n *\n * ### onHovered\n * `onHovered?: (id, value, duration: number) => void;`<br>\n * called after a mouseEnter and mouseLeave event has happened\n *\n *\n */\nexport const OakCheckBox = (props: OakCheckBoxProps) => {\n const {\n id,\n value,\n displayValue = value,\n disabled = false,\n defaultChecked,\n checked,\n onChange,\n onFocus,\n onBlur,\n onHovered,\n iconPadding = \"inner-padding-none\",\n hoverBorderRadius = \"border-radius-xs\",\n checkboxSize = \"all-spacing-6\",\n checkboxBorder = \"border-solid-m\",\n checkboxBorderRadius = \"border-radius-xs\",\n defaultColor = \"text-primary\",\n disabledColor = \"text-disabled\",\n labelGap = \"space-between-s\",\n labelAlignItems = \"center\",\n checkedBackgroundFill = true,\n checkedIcon,\n } = props;\n\n const hoverStart = useRef(Date.now());\n\n const handleMouseEnter = () => {\n hoverStart.current = Date.now();\n };\n\n const handleMouseLeave = () => {\n const delta = Date.now() - hoverStart.current;\n if (onHovered) {\n onHovered(value, id, delta);\n }\n };\n\n const currentColor = disabled ? disabledColor : defaultColor;\n\n return (\n <InternalCheckBoxLabel\n htmlFor={id}\n labelGap={labelGap}\n labelAlignItems={labelAlignItems}\n $color={currentColor}\n disabled={disabled}\n onMouseEnter={handleMouseEnter}\n onMouseLeave={handleMouseLeave}\n data-testid={props[\"data-testid\"]}\n >\n <InternalCheckBoxWrapper\n size={checkboxSize}\n internalCheckbox={\n <InternalCheckBoxHoverFocus\n id={id}\n value={value}\n $width={checkboxSize}\n $height={checkboxSize}\n $ba={checkboxBorder}\n $borderRadius={checkboxBorderRadius}\n $borderColor={currentColor}\n $checkedBackground={checkedBackgroundFill ? currentColor : null}\n $hoverBorderRadius={hoverBorderRadius}\n onChange={onChange}\n onFocus={onFocus}\n onBlur={onBlur}\n defaultChecked={defaultChecked}\n checked={checked}\n disabled={disabled}\n />\n }\n checkedIcon={checkedIcon}\n iconPadding={iconPadding}\n />\n {displayValue}\n </InternalCheckBoxLabel>\n );\n};\n","import React, { ComponentPropsWithoutRef } from \"react\";\n\nimport { OakDraggable } from \"@/components/molecules/OakDraggable\";\n\ntype OakDraggableFeedbackProps = ComponentPropsWithoutRef<\n typeof OakDraggable\n> & {\n /**\n * Alters the appearance of the element to indicate whether or not it is in a correct state\n */\n feedback: \"correct\" | \"incorrect\";\n};\n\n/**\n * A draggable element that visually indicates whether or not its state is correct or not\n */\nexport const OakDraggableFeedback = ({\n feedback,\n ...props\n}: OakDraggableFeedbackProps) => {\n return (\n <OakDraggable\n {...props}\n iconName={feedback === \"correct\" ? \"tick\" : \"cross\"}\n iconColor={feedback === \"correct\" ? \"icon-success\" : \"icon-error\"}\n iconAlt={feedback === \"correct\" ? \"correct\" : \"incorrect\"}\n $ba=\"border-solid-xl\"\n $borderColor={feedback === \"correct\" ? \"border-success\" : \"border-error\"}\n $background={feedback === \"correct\" ? \"bg-correct\" : \"bg-incorrect\"}\n isReadOnly\n />\n );\n};\n","import React from \"react\";\n\nimport { OakFlex } from \"@/components/atoms/OakFlex\";\nimport { OakSpan } from \"@/components/atoms/OakSpan\";\nimport { OakIcon } from \"@/components/atoms/OakIcon\";\n\nexport type OakFieldErrorProps = {\n children?: React.ReactNode;\n};\n\n/**\n *\n * OakFieldError renders a error message when passed children.\n *\n */\nexport const OakFieldError = (props: OakFieldErrorProps) => {\n const { children } = props;\n if (!children) {\n /**\n * Return early to avoid unwanted whitespace when there's no error\n */\n return null;\n }\n return (\n <OakFlex $alignItems={\"center\"} $flexDirection={\"row\"}>\n <OakFlex $alignSelf={\"flex-start\"} $mr={\"space-between-s\"}>\n <OakIcon iconName=\"content-guidance\" $colorFilter={\"red\"} />\n </OakFlex>\n <OakSpan $color=\"red\">{children}</OakSpan>\n </OakFlex>\n );\n};\n","import React, { ReactNode, useState } from \"react\";\n\nimport { OakBox, OakFlex } from \"@/components/atoms\";\nimport {\n OakCollapsibleContent,\n OakTertiaryButton,\n} from \"@/components/molecules\";\n\ntype OakLessonVideoTranscriptProps = {\n /**\n * The transcript content\n */\n children: ReactNode;\n /**\n * The id of the collapsible content element. This is used to link the button to the content\n */\n id: string;\n /**\n * A control to toggle the video to display sign language\n */\n signLanguageControl?: ReactNode;\n};\n\n/**\n * Display a togglable video transcript with a slot to display a sign language control\n */\nexport const OakLessonVideoTranscript = ({\n children,\n id,\n signLanguageControl = null,\n}: OakLessonVideoTranscriptProps) => {\n const [showTranscript, setShowTranscript] = useState(false);\n\n return (\n <>\n <OakFlex\n $flexDirection={[\"column-reverse\", \"row\"]}\n $justifyContent=\"space-between\"\n >\n <OakBox>\n {children && (\n <OakTertiaryButton\n onClick={() => setShowTranscript(!showTranscript)}\n iconName={showTranscript ? \"chevron-up\" : \"chevron-down\"}\n isTrailingIcon\n aria-controls={id}\n aria-expanded={showTranscript}\n $mb=\"space-between-m\"\n >\n {showTranscript ? \"Hide transcript\" : \"Show transcript\"}\n </OakTertiaryButton>\n )}\n </OakBox>\n {signLanguageControl && (\n <OakBox $mb=\"space-between-m\">{signLanguageControl}</OakBox>\n )}\n </OakFlex>\n {children && (\n <OakCollapsibleContent\n id={id}\n $maxHeight=\"all-spacing-23\"\n isOpen={showTranscript}\n $font=\"body-1\"\n $color=\"text-primary\"\n >\n {children}\n </OakCollapsibleContent>\n )}\n </>\n );\n};\n","import React, { ReactNode } from \"react\";\n\nimport { OakBox } from \"@/components/atoms\";\n\nexport type OakModalBodyProps = {\n children: ReactNode;\n};\n\n/**\n * Intended to be used in the `children` slot of `OakModal`\n * it applies some padding and margin to ensure that the contents\n * line up with the modal's header and footer\n */\nexport const OakModalBody = (props: OakModalBodyProps) => {\n return (\n <OakBox $mv=\"space-between-m\" $ph=\"inner-padding-m\">\n {props.children}\n </OakBox>\n );\n};\n","import React, { ReactNode } from \"react\";\n\nimport { OakFlex } from \"@/components/atoms\";\n\nexport type OakModalFooterProps = {\n children: ReactNode;\n};\n\n/**\n * Intended to be used in the `footer` slot of `OakModal`\n * it is ideal as a container for one or more buttons.\n * It switches from a horizontal to vertical layout on smaller screens\n */\nexport const OakModalFooter = (props: OakModalFooterProps) => {\n return (\n <OakFlex\n {...props}\n $flexDirection={[\"column\", \"row\"]}\n $bt=\"border-solid-s\"\n $borderColor=\"border-neutral-lighter\"\n $pa=\"inner-padding-xl\"\n $gap={[\"space-between-s\", \"space-between-m\"]}\n $width=\"100%\"\n />\n );\n};\n","import React from \"react\";\n\nimport { OakFlex } from \"@/components/atoms/OakFlex\";\nimport { OakLI } from \"@/components/atoms\";\nimport {\n OakPrimaryNavItem,\n OakPrimaryNavItemProps,\n} from \"@/components/organisms/OakPrimaryNavItem\";\n\nexport type OakPrimaryNavProps = {\n ariaLabel?: string;\n navItems: OakPrimaryNavItemProps[];\n};\n\n/**\n * A row of buttons for navigating between different sections\n */\nexport const OakPrimaryNav = ({ ariaLabel, navItems }: OakPrimaryNavProps) => {\n return (\n <nav aria-label={ariaLabel}>\n <OakFlex\n as={\"ul\"}\n $flexDirection={[\"row\"]}\n $gap={\"space-between-m\"}\n $mh={\"space-between-none\"}\n $mv={\"space-between-none\"}\n $ph={\"inner-padding-none\"}\n >\n {navItems.map(\n (\n { href, isCurrent, children }: OakPrimaryNavItemProps,\n index: number,\n ) => (\n <OakLI $listStyle={\"none\"} key={index}>\n <OakPrimaryNavItem href={href} isCurrent={isCurrent}>\n {children}\n </OakPrimaryNavItem>\n </OakLI>\n ),\n )}\n </OakFlex>\n </nav>\n );\n};\n","import React from \"react\";\n\nimport { OakTextInput, OakTextInputProps } from \"@/components/molecules\";\n\ntype OakQuizTextInputProps = Omit<\n OakTextInputProps,\n \"validity\" | \"iconName\" | \"iconAlt\" | \"isTrailingIcon\"\n> & {\n /**\n * Alters the appearance of the input to indicate whether or not a correct answer was given.\n * Also sets the input to read-only.\n */\n feedback?: \"correct\" | \"incorrect\" | null;\n};\n\n/**\n * A text input for a free-text question in a quiz\n */\nexport const OakQuizTextInput = ({\n feedback,\n readOnly,\n ...props\n}: OakQuizTextInputProps) => {\n let validity: OakTextInputProps[\"validity\"];\n let iconName: OakTextInputProps[\"iconName\"];\n let iconAlt: OakTextInputProps[\"iconAlt\"] = undefined;\n\n switch (feedback) {\n case \"correct\":\n validity = \"valid\";\n iconName = \"tick\";\n iconAlt = \"Correct\";\n break;\n case \"incorrect\":\n validity = \"invalid\";\n iconName = \"cross\";\n iconAlt = \"Incorrect\";\n break;\n }\n\n return (\n <OakTextInput\n {...props}\n validity={validity}\n iconName={iconName}\n iconAlt={iconAlt}\n readOnly={readOnly || !!feedback}\n isTrailingIcon\n />\n );\n};\n","import React, { ElementType } from \"react\";\n\nimport {\n InternalShadowRectButton,\n InternalShadowRectButtonProps,\n} from \"@/components/molecules/InternalShadowRectButton\";\nimport { PolymorphicPropsWithoutRef } from \"@/components/polymorphic\";\n\nexport type OakSecondaryButtonProps = Omit<\n InternalShadowRectButtonProps,\n | \"defaultBorderColor\"\n | \"defaultBackground\"\n | \"defaultTextColor\"\n | \"hoverBackground\"\n | \"hoverBorderColor\"\n | \"hoverTextColor\"\n | \"disabledBackground\"\n | \"disabledBorderColor\"\n | \"disabledTextColor\"\n>;\n\n/**\n *\n * A specific implementation of InternalRectButton\n *\n * The following callbacks are available for tracking focus events:\n *\n * ### onClick\n * `onClick?: (event: React.MouseEvent<HTMLButtonElement, MouseEvent>) => void;`\n *\n * ### onHovered\n * `onHovered?: (event: React.MouseEvent<HTMLButtonElement, MouseEvent>, duration: number) => void;`<br>\n * called after a mouseEnter and mouseLeave event has happened\n */\nexport const OakSecondaryButton = <C extends ElementType = \"button\">({\n element,\n ...rest\n}: OakSecondaryButtonProps & PolymorphicPropsWithoutRef<C>) => {\n return (\n <InternalShadowRectButton\n element={element ?? \"button\"}\n defaultBorderColor=\"text-primary\"\n defaultBackground=\"bg-btn-secondary\"\n defaultTextColor=\"text-primary\"\n hoverBackground=\"bg-btn-secondary-hover\"\n hoverBorderColor=\"text-primary\"\n hoverTextColor=\"text-primary\"\n disabledBackground=\"bg-btn-secondary-disabled\"\n disabledBorderColor=\"text-disabled\"\n disabledTextColor=\"text-disabled\"\n {...rest}\n />\n );\n};\n","import React from \"react\";\n\nimport {\n OakHandDrawnBoxWithIconProps,\n OakHandDrawnCardWithIcon,\n OakPromoTag,\n} from \"@/components/molecules\";\nimport { OakBox } from \"@/components/atoms\";\n\nexport type OakSubjectIconProps = Pick<\n OakHandDrawnBoxWithIconProps,\n \"iconName\" | \"fill\" | \"iconColor\" | \"alt\"\n> & {\n iconName: `subject-${string}`;\n showPromoTag?: boolean;\n};\n\n/**\n * A large illuminated hand-drawn box with a subject icon in the center\n *\n * Accepts an optional `showPromoTag` prop to display a \"New\" tag in the top left corner\n */\nexport const OakSubjectIcon = ({\n showPromoTag,\n ...rest\n}: OakSubjectIconProps) => {\n return (\n <OakBox $width=\"fit-content\" $height=\"fit-content\" $position=\"relative\">\n <OakHandDrawnCardWithIcon {...rest} />\n {showPromoTag && (\n <OakBox\n $position=\"absolute\"\n $top={[\"all-spacing-0\", \"all-spacing-2\"]}\n $left={[\"all-spacing-0\", \"all-spacing-2\"]}\n >\n <OakPromoTag />\n </OakBox>\n )}\n </OakBox>\n );\n};\n","import React from \"react\";\nimport { ThemeProvider } from \"styled-components\";\n\nimport { OakTheme } from \"@/styles\";\n\nexport type OakThemeProviderProps = {\n theme: OakTheme;\n children: React.ReactNode;\n};\n\n/**\n *\n * OakThemeProvider wraps Styled Components ThemeProvider allowing the use of the custom type OakTheme.\n *\n */\nexport const OakThemeProvider = ({\n theme,\n children,\n}: OakThemeProviderProps) => {\n return <ThemeProvider theme={theme}>{children}</ThemeProvider>;\n};\n","import { OakTheme } from \"./theme\";\n\nexport const oakDefaultTheme: OakTheme = {\n name: \"default\",\n uiColors: {\n \"text-primary\": \"black\",\n \"text-subdued\": \"grey60\",\n \"text-error\": \"red\",\n \"text-disabled\": \"grey50\",\n \"text-link-active\": \"navy\",\n \"text-link-hover\": \"navy110\",\n \"text-link-pressed\": \"navy120\",\n \"text-link-visited\": \"navy120\",\n \"text-inverted\": \"white\",\n \"text-success\": \"oakGreen\",\n \"text-warning\": \"amber\",\n \"bg-primary\": \"white\",\n \"bg-neutral\": \"grey20\",\n \"bg-neutral-stronger\": \"grey30\",\n \"bg-btn-primary\": \"black\",\n \"bg-btn-primary-hover\": \"grey60\",\n \"bg-btn-primary-disabled\": \"grey50\",\n \"bg-btn-secondary\": \"white\",\n \"bg-btn-secondary-hover\": \"grey20\",\n \"bg-btn-secondary-disabled\": \"grey30\",\n \"bg-icon\": \"black\",\n \"bg-icon-hover\": \"grey60\",\n \"bg-decorative1-main\": \"mint\",\n \"bg-decorative1-subdued\": \"mint50\",\n \"bg-decorative1-very-subdued\": \"mint30\",\n \"bg-decorative2-main\": \"aqua\",\n \"bg-decorative2-subdued\": \"aqua50\",\n \"bg-decorative2-very-subdued\": \"aqua30\",\n \"bg-decorative3-main\": \"lavender\",\n \"bg-decorative3-subdued\": \"lavender50\",\n \"bg-decorative3-very-subdued\": \"lavender30\",\n \"bg-decorative4-main\": \"pink\",\n \"bg-decorative4-subdued\": \"pink50\",\n \"bg-decorative4-very-subdued\": \"pink30\",\n \"bg-decorative5-main\": \"lemon\",\n \"bg-decorative5-subdued\": \"lemon50\",\n \"bg-decorative5-very-subdued\": \"lemon30\",\n \"bg-correct\": \"mint50\",\n \"bg-incorrect\": \"red30\",\n \"icon-main\": \"white\",\n \"icon-inverted\": \"black\",\n \"icon-disabled\": \"grey50\",\n \"icon-brand\": \"oakGreen\",\n \"icon-success\": \"oakGreen\",\n \"icon-error\": \"red\",\n \"icon-warning\": \"amber\",\n \"border-primary\": \"black\",\n \"border-inverted\": \"white\",\n \"border-neutral\": \"grey50\",\n \"border-neutral-lighter\": \"grey40\",\n \"border-brand\": \"oakGreen\",\n \"border-success\": \"oakGreen\",\n \"border-error\": \"red\",\n \"border-warning\": \"amber\",\n \"border-decorative1\": \"mint\",\n \"border-decorative1-stronger\": \"mint110\",\n \"border-decorative2\": \"aqua\",\n \"border-decorative2-stronger\": \"aqua110\",\n \"border-decorative3\": \"lavender\",\n \"border-decorative3-stronger\": \"lavender110\",\n \"border-decorative4\": \"pink\",\n \"border-decorative4-stronger\": \"pink110\",\n \"border-decorative5\": \"lemon\",\n \"border-decorative5-stronger\": \"lemon110\",\n \"border-decorative6\": \"amber50\",\n \"border-decorative6-stronger\": \"amber\",\n transparent: \"transparent\",\n },\n};\n"],"names":["__assign","Object","assign","t","s","i","n","arguments","length","p","prototype","hasOwnProperty","call","apply","this","__rest","e","indexOf","getOwnPropertySymbols","propertyIsEnumerable","__read","o","m","Symbol","iterator","r","ar","next","done","push","value","error","__spreadArray","to","from","pack","l","Array","slice","concat","__makeTemplateObject","cooked","raw","defineProperty","SuppressedError","oakColorTokens","white","grey10","grey20","grey30","grey40","grey50","grey60","grey70","black","oakGreen","mint","mint30","mint50","mint110","aqua","aqua30","aqua50","aqua110","lavender","lavender30","lavender50","lavender110","pink","pink30","pink50","pink110","lemon","lemon30","lemon50","lemon110","amber","amber30","amber50","red","red30","red50","navy","navy110","navy120","blue","magenta","purple","teal","transparent","oakColorFilterTokens","oakUiRoleTokens","parseColor","includes","_a","c","theme","uiColors","truthy","breakpointsByName","small","large","breakpoints","values","sort","a","b","getBreakpoint","breakpointName","responsiveStyle","attr","getValues","parse","x","props","attrCss","undefined","css","templateObject_1","isArray","templateObject_3","map","breakpoint","templateObject_4","filter","templateObject_2","colorStyle","$color","$background","BASE_FONT_SIZE_PX","REM_DP","pxToRem","px","Number","toFixed","oakAllSpacingTokens","oakInnerPaddingTokens","oakSpaceBetweenTokens","parseSpacing","v","positionStyle","$position","$top","$right","$bottom","$left","$inset","$overflow","$overflowX","$overflowY","$objectFit","$pointerEvents","$visibility","sizeStyle","$width","$minWidth","$maxWidth","$height","$minHeight","$maxHeight","$aspectRatio","$boxSizing","paddingAll","$pa","paddingHorizontal","$ph","paddingVertical","$pv","paddingLeft","$pl","paddingRight","templateObject_5","$pr","paddingTop","templateObject_6","$pt","paddingBottom","templateObject_7","$pb","marginAll","templateObject_8","$ma","marginHorizontal","templateObject_9","$mh","marginVertical","templateObject_10","$mv","marginLeft","templateObject_11","$ml","marginRight","templateObject_12","$mr","marginTop","templateObject_13","$mt","marginBottom","templateObject_14","$mb","marginStyle","paddingStyle","spacingStyle","oakBorderWidthTokens","oakBorderRadiusTokens","parseBorder","parseBorderRadius","borderAll","$ba","borderTop","$bt","borderRight","$br","borderBottom","$bb","borderLeft","$bl","borderHorizontal","$bh","borderVertical","$bv","borderColor","$borderColor","borderRadius","$borderRadius","borderRadiusTopLeft","$btlr","borderRadiusTopRight","$btrr","borderRadiusBottomLeft","$bblr","borderRadiusBottomRight","$bbrr","borderRadiusTop","$btr","borderRadiusBottom","templateObject_15","$bbr","borderStrokeStyle","templateObject_16","$borderStyle","borderStyle","templateObject_17","displayStyle","$display","oakDropShadowTokens","parseDropShadow","variant","dropShadowStyle","$dropShadow","oakOpacityTokens","opaque","parseOpacity","opacityStyle","$opacity","transformStyle","$transform","$transformOrigin","oakTransitionTokens","transitionStyle","$transition","oakFontSizeTokens","oakFontTokens","typographyStyle","$font","font","fontSize","lineHeight","$textAlign","$textDecoration","$whiteSpace","$wordWrap","$textOverflow","oakZIndexTokens","behind","neutral","zIndexStyle","$zIndex","oakBoxCss","onClick","OakBox","styled","div","flexStyle","$flexDirection","$flexWrap","$alignItems","$alignContent","$justifyContent","$alignSelf","$order","$flexGrow","$flexShrink","$flexBasis","$gap","$columnGap","$rowGap","OakFlex","default","OakSpan","span","OakForm","form","parseColorFilter","colorFilterStyle","$colorFilter","clickStyles","placeholderStyles","$showOakPlaceholder","StyledFillImage","Image","StyledResponsiveImage","OakImage","as","src","alt","width","height","sizes","_b","_c","_d","placeholder","unoptimized","imageProps","onLoad","onError","rest","finalPlaceholder","_e","useState","showPlaceholder","setShowPlaceholder","setImg","useCallback","img","complete","handleComplete","originalHandler","event","useShowPlaceholder","React","createElement","ref","fill","OakTypography","HeadingTagComponent","tag","ariaLabel","ariaHidden","otherProps","Tag","OakHeading","OakP","OakUL","ul","$reset","OakOL","ol","listStyle","$listStyle","OakLI","li","defaultProps","OakLabel","label","icons","home","send","rocket","edit","hamburger","cross","bell","twitter","worksheet","facebook","share","save","linkedin","books","external","download","search","go","copyright","project","tick","instagram","dot","warning","lightbulb","quiz","video","intro","oakIconNames","keys","OakIcon","iconName","process","env","NEXT_PUBLIC_OAK_ASSETS_HOST","NEXT_PUBLIC_OAK_ASSETS_PATH","gridStyle","$rg","$cg","$gridAutoRows","$gridTemplateAreas","$gridTemplateColumns","$gridTemplateRows","OakGrid","combineSpanStart","start","parseSpanStart","split","span_1","gridArea","$colSpan","index","$colStart","$rowSpan","$rowStart","$colEnd","OakGridArea","OakMaxWidth","getCloudinaryIdFromUrl","config","toString","replace","canaryUrl","URL","getCldImageUrl","origin","getCloudinaryRootUrl","cloudinaryConfigContext","createContext","OakCloudinaryConfigProvider","Provider","OakKbd","children","resetGlobalCss","oakGlobalCss","OakGlobalStyle","createGlobalStyle","screenReaderStyle","OakScreenReader","SpinnerKeyframe","keyframes","StyledLoadingSpinner","loaderColor","OakLoadingSpinner","internalButtonCss","InternalButton","onHovered","Component","hoverStart","useRef","Date","now","onMouseEnter","current","onMouseLeave","delta","StyledInternalButton","$hoverTextColor","$hoverBackground","$hoverBorderColor","$defaultBackground","$defaultBorderColor","$defaultTextColor","$disabledBackground","$disabledBorderColor","$disabledTextColor","StyledButtonWrapper","$hoverShadow","InternalShadowRectButton","element","isTrailingIcon","isLoading","disabled","maxWidth","defaultBackground","defaultBorderColor","defaultTextColor","disabledTextColor","hoverTextColor","hoverBackground","hoverBorderColor","disabledBackground","disabledBorderColor","className","hoverShadow","icon","Fragment","loader","iconLogic","OakPrimaryButton","OakPrimaryInvertedButton","$hoverIconColor","$disabledIconBackground","$hoverIconBackground","$defaultIconBackground","InternalShadowRoundButton","iconBackgroundSize","iconSize","disabledIconBackground","hoverIconColor","defaultIconColor","hoverIconBackground","defaultIconBackground","disabledIconColor","OakTertiaryButton","RadioContext","currentValue","name","RadioButtonLabel","$labelGap","$labelAlignItems","HiddenRadioButtonInput","input","attrs","type","VisibleRadioButtonInput","$disableFocusRing","$radioInnerSize","DisabledVisibleRadioButtonInput","OakRadioButton","forwardRef","radioContext","useContext","onValueUpdated","id","tabIndex","dataTestId","disableFocusRing","radioInnerSize","_f","radioOuterSize","_g","radioBorderWidth","_h","radioBackground","_j","checkedRadioBorderWidth","checked","anyDisabled","finalRadioBorderWidth","htmlFor","onChange","BaseCheckBox","InternalCheckBox","$checkedBackground","InternalCheckBoxHover","$hoverBorderRadius","focusStyle","InternalCheckBoxHoverFocus","InternalCheckBoxLabel","labelGap","labelAlignItems","InternalCheckBoxLabelHoverDecor","StyledIconContainer","InternalCheckBoxWrapper","size","iconPadding","internalCheckbox","checkedIcon","StyledInput","InternalTextInput","onInitialFocus","onFocus","hadInitialFocused","StyledTextInputWrapper","$focusRingDropShadows","dropShadow","join","$readOnly","$readOnlyBorderColor","$readOnlyColor","$disabled","$disabledBackgroundColor","$disabledColor","OakTextInput","readOnlyBorderColor","focusRingDropShadows","background","disabledBackgroundColor","highlightBackgroundColor","_k","color","_l","disabledColor","_m","readOnlyColor","validity","_o","iconColor","_p","validBorderColor","_q","invalidBorderColor","_r","validIconColor","_s","invalidIconColor","iconAlt","_t","_u","isHighlighted","wrapperWidth","wrapperMaxWidth","finalBackgroundColor","finalBorderColor","finalIconColor","finalReadOnlyBorderColor","readOnly","currentTarget","querySelector","focus","OakRoundIcon","StyledFlex","ARROW_SIZE","StyledSvg","svg","$tooltipPosition","$fill","InternalTooltip","tooltipPosition","role","d","OakTooltip","tooltip","isOpen","domContainer","document","body","targetElement","setTargetElement","isIntersecting","setIsIntersecting","isVisible","overlayStyle","setOverlayStyle","borderRadiusProps","useLayoutEffect","ticking","updateOverlayStyle","requestAnimationFrame","rect","getBoundingClientRect","top","left","intersection","IntersectionObserver","entries","every","entry","observe","resize","ResizeObserver","window","addEventListener","disconnect","removeEventListener","createPortal","style","getTooltipPositionProps","domElement","firstElementChild","display","StyledBackLink","InternalCard","StyledBackgroundBox","InternalCardWithBackgroundElement","backgroundElement","parseBorderWidth","InternalStyledSvg","$stroke","$strokeWidth","OakHandDrawnCard","stroke","strokeWidth","xmlns","viewBox","preserveAspectRatio","vectorEffect","OakHandDrawnCardWithIcon","iconWidth","iconHeight","StyledPromoTag","OakPromoTag","StyledScrollBox","OakCollapsibleContent","StyledOakIcon","StyledLink","OakLink","StyledLeadingTrim","OakDragAndDropInstructions","StyledDraggable","$iconColor","OakDraggable","isDragging","isDisabled","isReadOnly","OakDroppable","labelSlot","isOver","slotBackground","StyledOakFlex","zeroRightClassName","fullWidthClassName","assignRef","currentValues","WeakMap","useMergeRefs","refs","defaultValue","initialValue","callback","callbackRef","newValue","forEach","facade","last","oldValue","get","prevRefs_1","Set","nextRefs_1","current_1","has","set","ItoI","innerCreateMedium","defaults","middleware","buffer","assigned","read","Error","useMedium","data","item","assignSyncMedium","cb","cbs","assignMedium","pendingQueue","executeQueue","cycle","Promise","resolve","then","createMedium","createSidecarMedium","options","medium","async","ssr","SideCar","sideCar","Target","exportSidecar","exported","isSideCarExport","effectCar","nothing","RemoveScroll","parentRef","onScrollCapture","onWheelCapture","onTouchMoveCapture","callbacks","setCallbacks","forwardProps","removeScrollBar","enabled","shards","noIsolation","inert","allowPinchZoom","Container","gapMode","containerRef","containerProps","lockRef","cloneElement","Children","only","_extends","bind","target","source","key","classNames","fullWidth","zeroRight","ReactPropTypesSecret_1","NODE_ENV","reactIsModule","exports","for","f","g","h","k","q","w","y","z","u","$$typeof","A","reactIs_production_min","AsyncMode","ConcurrentMode","ContextProvider","Element","ForwardRef","Memo","Portal","Profiler","StrictMode","Suspense","isAsyncMode","isConcurrentMode","isContextConsumer","isContextProvider","isElement","isForwardRef","isFragment","isLazy","isMemo","isProfiler","isStrictMode","isSuspense","isValidElementType","typeOf","require$$1","hasSymbol","REACT_ELEMENT_TYPE","REACT_PORTAL_TYPE","REACT_FRAGMENT_TYPE","REACT_STRICT_MODE_TYPE","REACT_PROFILER_TYPE","REACT_PROVIDER_TYPE","REACT_CONTEXT_TYPE","REACT_ASYNC_MODE_TYPE","REACT_CONCURRENT_MODE_TYPE","REACT_FORWARD_REF_TYPE","REACT_SUSPENSE_TYPE","REACT_SUSPENSE_LIST_TYPE","REACT_MEMO_TYPE","REACT_LAZY_TYPE","REACT_BLOCK_TYPE","REACT_FUNDAMENTAL_TYPE","REACT_RESPONDER_TYPE","REACT_SCOPE_TYPE","object","$$typeofType","ContextConsumer","Lazy","hasWarnedAboutDeprecatedIsAsyncMode","reactIs_development","console","isPortal","propIsEnumerable","objectAssign","test1","String","getOwnPropertyNames","test2","fromCharCode","test3","letter","err","shouldUseNative","symbols","val","TypeError","toObject","Function","ReactIs","propTypesModule","require$$0","ReactPropTypesSecret","require$$2","require$$3","checkPropTypes","printWarning","loggedTypeFailures","text","message","typeSpecs","location","componentName","getStack","typeSpecName","ex","stack","resetWarningCache","checkPropTypes_1","require$$4","emptyFunctionThatReturnsNull","factoryWithTypeCheckers","isValidElement","throwOnDirectAccess","ITERATOR_SYMBOL","FAUX_ITERATOR_SYMBOL","ANONYMOUS","ReactPropTypes","array","createPrimitiveTypeChecker","bigint","bool","func","number","string","symbol","any","createChainableTypeChecker","arrayOf","typeChecker","propName","propFullName","PropTypeError","propValue","getPropType","elementType","instanceOf","expectedClass","expectedClassName","constructor","node","isNode","objectOf","propType","oneOf","expectedValues","is","valuesString","JSON","stringify","getPreciseType","oneOfType","arrayOfTypeCheckers","checker","getPostfixForTypeWarning","expectedTypes","checkerResult","expectedType","shape","shapeTypes","invalidValidatorError","exact","allKeys","validate","manualPropTypeCallCache","manualPropTypeWarningCount","checkType","isRequired","secret","cacheKey","chainedCheckType","iteratorFn","maybeIterable","getIteratorFn","step","RegExp","isSymbol","PropTypes","emptyFunction","emptyFunctionWithReset","factoryWithThrowingShims","shim","getShim","FOCUS_GROUP","FOCUS_DISABLED","hiddenGuard","padding","overflow","position","mediumFocus","_ref","mediumBlur","mediumEffect","mediumSidecar","focusScope","emptyArray","FocusLock","_extends2","_React$useState","realObserved","setObserved","observed","isActive","originalFocusedElement","update","_props$disabled","_props$noFocusGuards","noFocusGuards","_props$persistentFocu","persistentFocus","_props$crossFrame","crossFrame","_props$autoFocus","autoFocus","allowTextSelection","group","whiteList","hasPositiveIndices","_props$shards","_props$as","_props$lockProps","lockProps","_props$returnFocus","returnFocus","shouldReturnFocus","focusOptions","onActivationCallback","onActivation","onDeactivationCallback","onDeactivation","captureFocusRestore","_document","activeElement","allowDefer","focusRestore","returnFocusTo","howToReturnFocus","returnFocusOptions","onBlur","setObserveNode","newObserved","warn","useEffect","constants.FOCUS_DISABLED","constants.FOCUS_GROUP","hasLeadingGuards","hasTailingGuards","mergedRef","focusScopeValue","useMemo","active","propTypes","FocusLockUI","deferAction","action","setTimeout","extractRef","focusHiddenMarker","PREVENT_SCROLL","preventScroll","FocusOn","setLockProps","scrollLock","focusLock","shouldIgnore","preventScrollOnFocus","restProps","appliedLockProps","ReactFocusLock","_setPrototypeOf","setPrototypeOf","__proto__","_inheritsLoose","subClass","superClass","create","_typeof","_toPropertyKey","arg","hint","prim","toPrimitive","res","toArray","ret","asArray","getFirst","getParentNode","parentNode","nodeType","Node","DOCUMENT_FRAGMENT_NODE","host","isTopNode","DOCUMENT_NODE","isVisibleUncached","checkParent","ELEMENT_NODE","computedStyle","getComputedStyle","getPropertyValue","isElementHidden","hasAttribute","isInert","isVisibleCached","visibilityCache","cached","result","isAutoFocusAllowedCached","cache","isAutoFocusAllowed","isAutoFocusAllowedUncached","getDataset","dataset","isHTMLInputElement","tagName","isRadioElement","attribute","getAttribute","isGuard","Boolean","focusGuard","isNotAGuard","isDefined","tabSort","aTab","Math","max","bTab","tabDiff","indexDiff","orderByTabIndex","nodes","filterNegative","keepGuards","getTabIndex","queryTabbables","queryGuardTabbables","getFocusablesWithShadowDom","parent","withGuards","shadowRoot","reduce","acc","child","matches","getFocusables","parents","focusableWithShadowDom","focusableWithIframes","HTMLIFrameElement","contentDocument","getFocusablesWithIFrame","querySelectorAll","filterFocusable","isHTMLButtonElement","notHiddenInput","filterAutoFocusable","Map","getTabbableNodes","topNodes","getFocusableNodes","parentAutofocusables","topNode","parentFocus","contains","scope","getPrototypeOf","some","iframeBody","getTopParent","getAllAffectedNodes","currentNode","contained","j","compareDocumentPosition","DOCUMENT_POSITION_CONTAINED_BY","add","DOCUMENT_POSITION_CONTAINS","_","filterNested","getActiveElement","inDocument","safeProbe","contentWindow","focusInside","ownerDocument","frame","focusInFrame","focusInsideIframe","correctNode","el","findSelectedRadio","pickFirstFocus","pickFocusable","NEW_FOCUS","newFocus","innerNodes","innerTabbables","outerNodes","lastNode","cnt","firstFocus","lastFocus","isOnGuard","activeIndex","lastIndex","lastNodeInside","resultSet","firstNodeIndex","lastNodeIndex","correctedNodes","correctedIndexDiff","returnFirstNode","returnLastNode","abs","pickAutofocus","nodesIndexes","orderedNodes","groups","autoFocusables","autoFocusable","autofocus","getParents","getCommonParent","nodeA","nodeB","parentsA","parentsB","currentParent","getTopCommonParent","baseActiveElement","leftEntry","rightEntries","activeElements","leftEntries","topCommon","subEntry","common","allParentAutofocusables","focusSolver","commonParent","anyFocusable","innerElements","srcNodes","dstNodes","remap","orderedInnerElements","entity","innerFocusables","innerTabbable","newId","focusNode","focusOn","guardCount","lockDisabled","moveFocusInside","focusable","weakRef","WeakRef","deref","moveFocus","fromElement","newOptions","onlyTabbable","defaultOptions","solution","useTabbables","shard","focusables","findIndex","prev","first","getRelativeFocusable","pickBoundary","what","isFreeFocus","focusIsHidden","lastActiveTrap","lastActiveFocus","lastPortaledElement","focusWasOutsideWindow","defaultWhitelist","autoGuard","startIndex","end","allNodes","lastGuard","guard","focusAutoGuard","lockItem","checkInHost","check","boundary","activateTrap","_lastActiveTrap","workingNode","portaledElement","workingArea","focusWhitelisted","area","withinHost","blur","newActiveElement","focusedIndex","_ref2","_ref3","removeAttribute","onTrap","stopPropagation","preventDefault","onWindowBlur","focusLockAPI","focusNextElement","focusPrevElement","focusFirstElement","focusLastElement","currentElement","parentElement","previousElementSibling","right","nextElementSibling","recordElementLocation","_i","stack_1","line","parent_1","savedCurrent","aim","focusables_1","restoreFocusTo","observerNode","FocusTrap","reducePropsToState","handleStateChangeOnClient","WrappedComponent","state","mountedInstances","emitChange","instance","SideEffect","_PureComponent","peek","_proto","componentDidMount","componentDidUpdate","componentWillUnmount","splice","render","PureComponent","obj","toPropertyKey","enumerable","configurable","writable","_defineProperty","displayName","getDisplayName","withSideEffect","propsList","_ref5","traps","trap","lastTrap","sameTrap","_ref6","makeStyleTag","nonce","__webpack_nonce__","getNonce","setAttribute","stylesheetSingleton","counter","stylesheet","styleSheet","cssText","appendChild","createTextNode","head","getElementsByTagName","insertStyleTag","remove","removeChild","styleSingleton","sheet","useStyle","styles","isDynamic","dynamic","zeroGap","gap","parseInt","getGapWidth","offsets","cs","getOffset","documentWidth","documentElement","clientWidth","windowWidth","innerWidth","Style","lockAttribute","getStyles","allowRelative","important","getCurrentUseCounter","isFinite","RemoveScrollBar","noRelative","noImportant","newCounter","passiveSupported","nonPassive","passive","elementCanBeScrolled","overflowY","overflowX","alwaysContainsScroll","locationCouldBeScrolled","axis","ShadowRoot","elementCouldBeScrolled","getScrollVariables","elementCouldBeVScrolled","elementCouldBeHScrolled","scrollTop","scrollHeight","clientHeight","scrollLeft","scrollWidth","getHScrollVariables","getTouchXY","changedTouches","clientX","clientY","getDeltaXY","deltaX","deltaY","generateStyle","idCounter","lockStack","getOutermostShadowParent","shadowParent","shouldPreventQueue","touchStartRef","activeAxis","lastProps","classList","allow_1","shouldCancelEvent","touches","currentAxis","touch","touchStart","moveDirection","canBeScrolledInMainDirection","cancelingAxis","endTarget","sourceDelta","noOverscroll","directionFactor","direction","getDirectionFactor","targetInLock","shouldCancelScroll","isDeltaPositive","availableScroll","availableScrollTop","elementScroll","handleScroll","shouldPrevent","_event","sourceEvent","should","cancelable","shardNodes","shouldCancel","scrollTouchStart","scrollWheel","scrollTouchMove","inst","counterMap","uncontrolledNodes","markerMap","lockCount","unwrapHost","applyAttributeToOthers","originalTarget","markerName","controlAttribute","targets","correctedTarget","correctTargets","markerCounter","hiddenNodes","elementsToKeep","elementsToStop","keep","deep","alreadyHidden","counterValue","markerValue","clear","delete","hideOthers","activeParentNode","getDefaultParent","InteractivityDisabler","onEscapeKey","onClickOutside","activeNode","setActiveNode","lastEventTarget","mouseTouches","onKeyDown","defaultPrevented","code","keyCode","onMouseDown","MouseEvent","button","onTouchStart","onTouchEnd","_undo","unmounted","il","jl","__spreadArrays","RequireSideCar","ReactFocusOn","timeoutsShape","enter","exit","appear","enterDone","enterActive","exitDone","exitActive","TransitionGroupContext","UNMOUNTED","EXITED","ENTERING","ENTERED","EXITING","Transition","_React$Component","context","_this","initialStatus","isMounting","appearStatus","in","unmountOnExit","mountOnEnter","status","nextCallback","getDerivedStateFromProps","prevState","updateStatus","prevProps","nextStatus","cancelNextCallback","getTimeouts","timeout","mounting","nodeRef","ReactDOM","findDOMNode","forceReflow","performEnter","performExit","setState","_this2","appearing","maybeNode","maybeAppearing","timeouts","enterTimeout","safeSetState","onEntered","onEnter","onEntering","onTransitionEnd","_this3","onExit","onExiting","onExited","cancel","nextState","setNextCallback","_this4","handler","doesNotHaveTimeoutOrListener","addEndListener","maybeNextCallback","_this$props","childProps","excluded","sourceKeys","_objectWithoutPropertiesLoose","noop","contextType","defaultView","pt","_len","args","_key","Transition$1","FadeOutBox","$state","SlideInFlex","logoSrc","StyledInternalCheckBox","StyledInternalCheckBoxLabelHoverDecor","StyledFlexBox","$outlineColor","$overlayBorderColor","$feedbackBgColor","$checked","StyledInternalShadowRoundButton","OakHintButton","OakQuizHint","setIsOpen","OakQuizFeedback","feedbackLabel","feedback","answerFeedback","StyledMobileSummary","StyledLayoutBox","StickyFooter","StyledLabel","StyledRoundIcon","activeIconStyles","StyledLessonNavItem","FlexedOakBox","pickIconForSection","sectionName","StyledLessonReviewItem","pickSummaryForProgress","completed","pickSummaryForIncomplete","lessonSectionName","numQuestions","pickLabelForSection","pickColorsForSection","renderQuestionCounter","grade","canUseDOM","isWindow","elementString","getWindow","_target$ownerDocument","_target$ownerDocument2","isDocument","Document","isHTMLElement","HTMLElement","isSVGElement","SVGElement","getOwnerDocument","useIsomorphicLayoutEffect","useEvent","handlerRef","useLatestValue","dependencies","valueRef","useLazyMemo","useNodeRef","onChangeHandler","setNodeRef","usePrevious","ids","useUniqueId","prefix","createAdjustmentFn","modifier","adjustments","accumulator","adjustment","valueAdjustment","subtract","isKeyboardEvent","KeyboardEvent","getEventCoordinates","TouchEvent","isTouchEvent","hasViewportRelativeCoordinates","CSS","freeze","Translate","transform","round","Scale","scaleX","scaleY","Transform","property","duration","easing","SELECTOR","findFirstFocusableNode","hiddenStyles","HiddenText","LiveRegion","announcement","ariaLiveType","margin","border","clip","clipPath","whiteSpace","DndMonitorContext","defaultScreenReaderInstructions","draggable","defaultAnnouncements","onDragStart","onDragOver","over","onDragEnd","onDragCancel","_ref4","Accessibility","announcements","container","hiddenTextDescribedById","screenReaderInstructions","announce","setAnnouncement","useAnnouncement","liveRegionId","mounted","setMounted","listener","registerListener","useDndMonitor","onDragMove","markup","Action","useSensor","sensor","useSensors","sensors","defaultCoordinates","distanceBetween","p1","p2","sqrt","pow","getRelativeTransformOrigin","eventCoordinates","sortCollisionsAsc","sortCollisionsDesc","cornersOfRectangle","getFirstCollision","collisions","firstCollision","centerOfRectangle","closestCenter","collisionRect","droppableRects","droppableContainers","centerRect","droppableContainer","distBetween","getIntersectionRatio","min","bottom","targetArea","entryArea","intersectionArea","rectIntersection","intersectionRatio","getRectDelta","rect1","rect2","createRectAdjustmentFn","getAdjustedRect","parseTransform","startsWith","transformArray","ignoreTransform","getClientRect","transformOrigin","parsedTransform","translateX","translateY","parseFloat","inverseTransform","getTransformAgnosticClientRect","getScrollableAncestors","limit","scrollParents","findScrollableAncestors","scrollingElement","overflowRegex","test","isScrollable","isFixed","getFirstScrollableAncestor","firstScrollableAncestor","getScrollableElement","getScrollXCoordinate","scrollX","getScrollYCoordinate","scrollY","getScrollCoordinates","Direction","isDocumentScrollingElement","getScrollPosition","scrollingContainer","minScroll","dimensions","innerHeight","maxScroll","isTop","isLeft","isBottom","isRight","defaultThreshold","getScrollDirectionAndSpeed","scrollContainer","scrollContainerRect","acceleration","thresholdPercentage","speed","threshold","Backward","Forward","getScrollElementRect","getScrollOffsets","scrollableAncestors","scrollIntoViewIfNeeded","measure","scrollIntoView","block","inline","properties","Rect","scrollOffsets","getScrollOffset","currentOffsets","scrollOffsetsDeltla","Listeners","listeners","removeAll","_this$target","eventName","_this$target2","hasExceededDistance","measurement","dx","dy","EventName","KeyboardCode","defaultKeyboardCodes","Space","Enter","Esc","defaultKeyboardCoordinateGetter","currentCoordinates","Right","Left","Down","Up","KeyboardSensor","autoScrollEnabled","referenceCoordinates","windowListeners","handleKeyDown","handleCancel","attach","handleStart","Resize","VisibilityChange","Keydown","onStart","keyboardCodes","coordinateGetter","scrollBehavior","handleEnd","newCoordinates","coordinatesDelta","scrollDelta","scrollElementRect","clampedCoordinates","canScrollX","canScrollY","newScrollCoordinates","canScrollToNewCoordinates","scrollTo","behavior","scrollBy","handleMove","coordinates","onMove","onEnd","detach","onCancel","isDistanceConstraint","constraint","isDelayConstraint","activators","nativeEvent","activator","activatorNode","AbstractPointerSensor","events","listenerTarget","_getEventCoordinates","EventTarget","getEventListenerTarget","activated","initialCoordinates","timeoutId","documentListeners","handleKeydown","removeTextSelection","activationConstraint","bypassActivationConstraint","move","DragStart","ContextMenu","delay","clearTimeout","Click","capture","SelectionChange","_getEventCoordinates2","tolerance","distance","_this$document$getSel","getSelection","removeAllRanges","PointerSensor","super","isPrimary","events$1","MouseButton","MouseSensor","RightClick","events$2","TouchSensor","setup","AutoScrollActivator","TraversalOrder","useAutoScroller","Pointer","canScroll","draggingRect","interval","order","TreeOrder","pointerCoordinates","scrollableAncestorRects","scrollIntent","previousDelta","previousIntent","defaultScrollIntent","sign","useScrollIntent","setAutoScrollInterval","clearAutoScrollInterval","intervalRef","setInterval","clearInterval","useInterval","scrollSpeed","scrollDirection","DraggableRect","scrollContainerRef","autoScroll","sortedScrollableAncestors","reverse","MeasuringStrategy","MeasuringFrequency","useInitialValue","computeFn","previousValue","useResizeObserver","handleResize","resizeObserver","defaultMeasure","useRect","fallbackRect","measureRect","useReducer","currentRect","isConnected","newRect","mutationObserver","handleMutations","MutationObserver","useMutationObserver","records","record","childList","subtree","defaultValue$1","useScrollOffsetsDelta","initialScrollOffsets","hasScrollOffsets","useWindowRect","getWindowClientRect","defaultValue$2","getMeasurableNode","firstChild","defaultSensors","defaultData","defaultMeasuringConfiguration","droppable","strategy","WhileDragging","frequency","Optimized","dragOverlay","DroppableContainersMap","_super$get","getEnabled","getNodeFor","_this$get$node$curren","_this$get","defaultPublicContext","activatorEvent","activeNodeRect","containerNodeRect","draggableNodes","setRef","measuringConfiguration","measureDroppableContainers","windowRect","measuringScheduled","defaultInternalContext","ariaDescribedById","dispatch","InternalContext","PublicContext","getInitialState","translate","containers","reducer","DragMove","DragEnd","DragCancel","RegisterDroppable","SetDroppableDisabled","UnregisterDroppable","RestoreFocus","previousActivatorEvent","previousActiveId","draggableNode","focusableNode","applyModifiers","modifiers","ActiveDraggableContext","Status","DndContext","memo","_sensorContext$curren","_dragOverlay$nodeRef$","_dragOverlay$rect","_over$rect","accessibility","collisionDetection","measuring","store","dispatchMonitorEvent","registerMonitorListener","_listener$type","useDndMonitorProvider","setStatus","Uninitialized","isInitialized","Initialized","activeId","activeRects","initial","translated","_node$data","activeRef","activeSensor","setActiveSensor","setActivatorEvent","latestProps","draggableDescribedById","enabledDroppableContainers","useMeasuringConfiguration","dragging","queue","setQueue","containersRef","Always","BeforeDragging","disabledRef","useDroppableMeasuring","cachedNode","useCachedNode","activationCoordinates","autoScrollOptions","activeSensorDisablesAutoscroll","autoScrollGloballyDisabled","getAutoScrollerOptions","initialActiveNodeRect","useInitialRect","initialRect","initialized","rectDelta","useLayoutShiftScrollCompensation","layoutShiftCompensation","sensorContext","draggingNode","draggingNodeRect","scrollAdjustedTranslate","overNode","setRect","handleNodeChange","useDragOverlayMeasuring","usesDragOverlay","nodeRectDelta","previousNode","ancestors","useScrollableAncestors","elements","firstElement","rects","measureRects","useRects","modifiedTranslate","overlayNodeRect","scrollCoordinates","setScrollCoordinates","prevElements","previousElements","cleanup","scrollableElement","useScrollOffsets","scrollAdjustment","activeNodeScrollDelta","overId","setOver","adjustScale","instantiateSensor","Sensor","sensorInstance","unstable_batchedUpdates","Initializing","createHandler","cancelDrop","bindActivatorToSensorInstantiator","activeDraggableNode","dndKit","activationContext","capturedBy","getSyntheticHandler","useCombineActivators","teardownFns","teardown","useSensorSetup","overContainer","publicContext","internalContext","restoreFocus","NullContext","defaultRole","ID_PREFIX","useDraggable","attributes","roleDescription","setActivatorNodeRef","useSyntheticListeners","dataRef","useDndContext","ID_PREFIX$1","defaultResizeObserverConfig","useDroppable","resizeObserverConfig","previous","resizeObserverConnected","callbackId","resizeObserverDisabled","updateMeasurementsFor","resizeObserverTimeout","newElement","previousElement","unobserve","AnimationManager","animation","clonedChildren","setClonedChildren","setElement","previousChildren","defaultTransform","NullifiedContextProvider","baseStyles","touchAction","defaultTransition","PositionedOverlay","transition","scaleAdjustedTransform","defaultDropAnimationSideEffects","originalStyles","setProperty","defaultDropAnimationConfiguration","final","sideEffects","opacity","useDropAnimation","activeDraggable","measurableNode","scale","finalTransform","animationKeyframes","firstKeyframe","lastKeyframe","animate","onfinish","createDefaultDropAnimation","useKey","DragOverlay","dropAnimation","dropAnimationConfig","wrapperElement","zIndex","modifiedTransform","arrayMove","newArray","getSortedRects","items","isValidIndex","rectSortingStrategy","overIndex","newRects","oldRect","defaultScale$1","verticalListSortingStrategy","_rects$activeIndex","fallbackActiveRect","overIndexRect","itemGap","clientRects","previousRect","nextRect","getItemGap$1","Context","containerId","disableTransforms","useDragOverlay","sortedRects","SortableContext","userDefinedItems","disabledProp","previousItemsRef","itemsHaveChanged","itemsEqual","normalizeDisabled","contextValue","defaultNewIndexGetter","defaultAnimateLayoutChanges","isSorting","wasDragging","newIndex","previousItems","previousContainerId","transitionProperty","disabledTransition","defaultAttributes","useSortable","animateLayoutChanges","userDefinedAttributes","localDisabled","customData","getNewIndex","localStrategy","globalDisabled","globalStrategy","_localDisabled$dragga","_localDisabled$droppa","normalizeLocalDisabled","sortable","itemsAfterCurrentSortable","setDroppableNodeRef","setDraggableNodeRef","useCombinedRefs","displaceItem","shouldDisplaceDragSource","dragSourceDisplacement","shouldAnimateLayoutChanges","derivedTransform","setDerivedtransform","previousIndex","useDerivedTransform","getTransition","hasSortableData","directions","sortableKeyboardCoordinates","filteredContainers","corners","rectCorners","distances","corner","effectiveDistance","closestCorners","closestId","activeDroppable","newDroppable","newNode","hasDifferentScrollAncestors","hasSameContainer","isSameContainer","isAfterActive","isAfter","offset","rectCoordinates","injectDndContext","InternalDndContext","originalScrollingBehaviour","usePrefersReducedMotion","prefersReducedMotion","setPrefersReducedMotion","mediaQuery","matchMedia","ConnectedDraggable","createAccouncements","getPosition","getItemLabel","find","StyledOakBox","InternalDroppableHoldingPen","domContent","setContentBox","minHeight","setMinHeight","observer","currentHeight","borderBoxSize","blockSize","entries_1","__values","entries_1_1","resetMinHeight","ConnectedDroppableHoldingPen","ConnectedDroppable","match","OakPrimaryButtonWithoutPointerEvents","OakPrimaryNavItem","href","isCurrent","shallow","Link","header","headerAfterSlot","initialOpen","setOpen","hidden","listItems","displayValue","defaultChecked","hoverBorderRadius","checkboxSize","checkboxBorder","checkboxBorderRadius","defaultColor","checkedBackgroundFill","currentColor","cloudinaryId","endsWith","CldImage","flags","content","topNavSlot","bottomNavSlot","pickSectionColours","pageBackgroundColor","contentBackgroundColor","contentBorderColor","mobileContentBackgroundColor","progress","notStartedBackgroundColor","backgroundColor","pickSummaryForNotStarted","pickSummaryForComplete","completedBackgroundColor","iconBackgroundColor","lessonSectionNameToIconMap","backLinkSlot","counterSlot","heading","mobileSummary","pickSectionIcon","signLanguageControl","showTranscript","setShowTranscript","footerSlot","onClose","canaryElement","setCanaryElement","isScrolled","setIsScrolled","transitionRef","mutations","mutation","root","navItems","image","innerRef","isFeedback","defaultRef","inputRef","showTick","showCross","imageContainer","feedbackBgColor","feedbackBorderColor","inputCheckbox","click","total","initialOptions","initialSlots","setMatches","draggables","random","droppables","setActiveId","matchedDraggableIds","unmatchedDraggables","newMatches","fromEntries","initialItems","setItems","activeItem","oldIndex","newItems","outlineColor","feedbackAltText","showFeedback","feedbackIcon","setValue","showPromoTag","ThemeProvider"],"mappings":"ykBA+BWA,EAAW,WAQlB,OAPAA,EAAWC,OAAOC,QAAU,SAAkBC,GAC1C,IAAK,IAAIC,EAAGC,EAAI,EAAGC,EAAIC,UAAUC,OAAQH,EAAIC,EAAGD,IAE5C,IAAK,IAAII,KADTL,EAAIG,UAAUF,GACOJ,OAAOS,UAAUC,eAAeC,KAAKR,EAAGK,KAAIN,EAAEM,GAAKL,EAAEK,IAE9E,OAAON,CACV,EACMH,EAASa,MAAMC,KAAMP,UAChC,EAEO,SAASQ,EAAOX,EAAGY,GACtB,IAAIb,EAAI,CAAA,EACR,IAAK,IAAIM,KAAKL,EAAOH,OAAOS,UAAUC,eAAeC,KAAKR,EAAGK,IAAMO,EAAEC,QAAQR,GAAK,IAC9EN,EAAEM,GAAKL,EAAEK,IACb,GAAS,MAALL,GAAqD,mBAAjCH,OAAOiB,sBACtB,KAAIb,EAAI,EAAb,IAAgBI,EAAIR,OAAOiB,sBAAsBd,GAAIC,EAAII,EAAED,OAAQH,IAC3DW,EAAEC,QAAQR,EAAEJ,IAAM,GAAKJ,OAAOS,UAAUS,qBAAqBP,KAAKR,EAAGK,EAAEJ,MACvEF,EAAEM,EAAEJ,IAAMD,EAAEK,EAAEJ,IAF4B,CAItD,OAAOF,CACX,CAgIO,SAASiB,EAAOC,EAAGf,GACtB,IAAIgB,EAAsB,mBAAXC,QAAyBF,EAAEE,OAAOC,UACjD,IAAKF,EAAG,OAAOD,EACf,IAAmBI,EAAYT,EAA3BX,EAAIiB,EAAEV,KAAKS,GAAOK,EAAK,GAC3B,IACI,WAAc,IAANpB,GAAgBA,KAAM,MAAQmB,EA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UACLC,MAAO,UACPC,MAAO,UACPC,KAAM,UACNC,QAAS,UACTC,QAAS,UACTC,KAAM,UACNC,QAAS,UACTC,OAAQ,UACRC,KAAM,UACNC,YAAa,eAWFC,EAAuB,CAClCpC,MACE,wFACFyB,IAAK,2FACLxB,SACE,0FACFT,MACE,yFACFI,OACE,wFACFC,OACE,uFACF+B,KAAM,2FACNC,QACE,2FACFC,QACE,4FAKSO,EAAkB,CAC7B,eACA,eACA,aACA,gBACA,mBACA,kBACA,oBACA,oBACA,gBACA,eACA,eACA,aACA,aACA,sBACA,iBACA,uBACA,0BACA,mBACA,yBACA,4BACA,UACA,gBACA,sBACA,yBACA,8BACA,sBACA,yBACA,8BACA,sBACA,yBACA,8BACA,sBACA,yBACA,8BACA,sBACA,yBACA,8BACA,aACA,eACA,YACA,gBACA,gBACA,aACA,eACA,aACA,eACA,iBACA,kBACA,iBACA,yBACA,eACA,iBACA,eACA,iBACA,qBACA,8BACA,qBACA,8BACA,qBACA,8BACA,qBACA,8BACA,qBACA,8BACA,qBACA,8BACA,eC1HF,SAASC,EAAW9D,GAClB,GAAIA,QAGJ,OAAIA,KAASe,EACJA,EAAef,GAGpB6D,EAAgBE,SAAS/D,GACpB,SAACgE,GAAE,IACFC,EADOD,EAAAE,MACGC,SAASnE,GACzB,OAAOe,EAAekD,EACxB,OAJF,CAMF,CCxBM,SAAUG,EAAUpE,GACxB,QAASA,CACX,CCHA,gBAAMqE,EAAoB,CACxBC,MAAO,IACPC,MAAO,MAGIC,EAAcrG,OAAOsG,OAAOJ,GAAmBK,MAAK,SAACC,EAAGC,GACnE,OAAAD,EAAIC,EAAI,GAAK,CAAb,IAKWC,EAAgB,SAC3BC,GAEA,OAAOT,EAAkBS,EAC3B,EAoBaC,EACX,SACEC,EACAC,EACAC,GAMF,YANE,IAAAA,IAAAA,EAIgD,SAAAC,GAAM,OAAAA,IAExD,SAACC,GACC,IAAMC,EAAU,SAACrF,GACf,YAAiB,IAAVA,OACHsF,EACAC,EAAG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UAC/B,aAAc,SACd,eAAgB,QAChB,YAAa,QACb,gBAAiB,QACjB,gBAAiB,SACjB,aAAc,WACd,eAAgB,WAChB,aAAc,MACd,eAAgB,QAChB,iBAAkB,QAClB,kBAAmB,QACnB,iBAAkB,SAClB,yBAA0B,SAC1B,eAAgB,WAChB,iBAAkB,WAClB,eAAgB,MAChB,iBAAkB,QAClB,qBAAsB,OACtB,8BAA+B,UAC/B,qBAAsB,OACtB,8BAA+B,UAC/B,qBAAsB,WACtB,8BAA+B,cAC/B,qBAAsB,OACtB,8BAA+B,UAC/B,qBAAsB,QACtB,8BAA+B,WAC/B,qBAAsB,UACtB,8BAA+B,QAC/BR,YAAa,4HpK5Da,CAC5B,MACA,KACA,KACA,KACA,KACA,KACA","x_google_ignoreList":[0,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127,128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,161,162,163,164,165,166,167,168,169,170,171,184,185,186,187]}
1
+ {"version":3,"file":"index.js","sources":["../../node_modules/tslib/tslib.es6.js","../../src/styles/theme/color.ts","../../src/styles/helpers/parseColor.ts","../../src/styles/helpers/truthy.ts","../../src/styles/utils/responsiveStyle.ts","../../src/styles/utils/colorStyle.ts","../../src/styles/helpers/pxToRem.ts","../../src/styles/theme/spacing.ts","../../src/styles/helpers/parseSpacing.ts","../../src/styles/utils/positionStyle.ts","../../src/styles/utils/sizeStyle.ts","../../src/styles/utils/spacingStyle.ts","../../src/styles/theme/borders.ts","../../src/styles/helpers/parseBorder.ts","../../src/styles/helpers/parseBorderRadius.ts","../../src/styles/utils/borderStyle.ts","../../src/styles/utils/displayStyle.ts","../../src/styles/theme/dropShadow.ts","../../src/styles/helpers/parseDropShadow.ts","../../src/styles/utils/dropShadowStyle.ts","../../src/styles/theme/opacity.ts","../../src/styles/helpers/parseOpacity.ts","../../src/styles/utils/opacityStyle.ts","../../src/styles/utils/transformStyle.ts","../../src/styles/theme/transitions.ts","../../src/styles/utils/transitionStyle.ts","../../src/styles/helpers/parseTransitions.ts","../../src/styles/theme/typography.ts","../../src/styles/utils/typographyStyle.ts","../../src/styles/helpers/parseTypography.ts","../../src/styles/theme/zIndex.ts","../../src/styles/utils/zIndexStyle.ts","../../src/styles/helpers/parseZIndex.ts","../../src/components/atoms/OakBox/OakBox.tsx","../../src/styles/utils/flexStyle.ts","../../src/components/atoms/OakFlex/OakFlex.tsx","../../src/components/atoms/OakSpan/OakSpan.tsx","../../src/components/atoms/OakForm/OakForm.tsx","../../src/styles/helpers/parseColorFilter.ts","../../src/styles/utils/colorFilterStyle.tsx","../../src/components/atoms/OakImage/OakImage.tsx","../../src/components/atoms/OakImage/useShowPlaceholder.ts","../../src/components/atoms/OakTypography/OakTypography.tsx","../../src/components/atoms/OakHeading/OakHeading.tsx","../../src/components/atoms/OakP/OakP.tsx","../../src/components/atoms/OakUL/OakUL.tsx","../../src/components/atoms/OakOL/OakOL.tsx","../../src/styles/utils/listStyle.ts","../../src/components/atoms/OakLI/OakLI.tsx","../../src/components/atoms/OakLabel/OakLabel.tsx","../../src/image-map.ts","../../src/components/atoms/OakIcon/OakIcon.tsx","../../src/components/atoms/OakGrid/OakGrid.tsx","../../src/components/atoms/OakGridArea/OakGridArea.tsx","../../src/components/atoms/OakMaxWidth/OakMaxWidth.tsx","../../src/components/atoms/OakCloudinaryImage/cloudinary.ts","../../src/components/atoms/OakCloudinaryImage/OakCloudinaryImage.tsx","../../src/components/atoms/OakKbd/OakKbd.tsx","../../src/styles/global/reset.styles.ts","../../src/styles/global/oak.styles.ts","../../src/components/atoms/OakGlobalStyle/OakGlobalStyle.tsx","../../src/components/atoms/OakScreenReader/OakScreenReader.tsx","../../src/components/molecules/OakLoadingSpinner/OakLoadingSpinner.tsx","../../src/components/atoms/InternalButton/InternalButton.tsx","../../src/components/molecules/InternalShadowRectButton/InternalShadowRectButton.tsx","../../src/components/molecules/OakPrimaryButton/OakPrimaryButton.tsx","../../src/components/molecules/OakPrimaryInvertedButton/OakPrimaryInvertedButton.tsx","../../src/components/molecules/OakSecondaryButton/OakSecondaryButton.tsx","../../src/components/molecules/InternalShadowRoundButton/InternalShadowRoundButton.tsx","../../src/components/molecules/OakTertiaryButton/OakTertiaryButton.tsx","../../src/components/molecules/OakRadioGroup/OakRadioGroup.tsx","../../src/components/molecules/OakRadioButton/OakRadioButton.tsx","../../src/components/atoms/InternalCheckBox/InternalCheckBox.tsx","../../src/components/atoms/InternalCheckBoxLabel/InternalCheckBoxLabel.tsx","../../src/components/atoms/InternalCheckBoxWrapper/InternalCheckBoxWrapper.tsx","../../src/components/atoms/InternalTextInput/InternalTextInput.tsx","../../src/components/molecules/OakTextInput/OakTextInput.tsx","../../src/components/molecules/OakRoundIcon/OakRoundIcon.tsx","../../src/components/atoms/InternalTooltip/InternalTooltip.tsx","../../src/components/molecules/OakTooltip/OakTooltip.tsx","../../src/components/molecules/OakBackLink/OakBackLink.tsx","../../src/components/atoms/InternalCard/InternalCard.tsx","../../src/components/atoms/InternalCardWithBackgroundElement/InternalCardWithBackgroundElement.tsx","../../src/styles/helpers/parseBorderWidth.ts","../../src/components/atoms/InternalStyledSvg/InternalStyledSvg.tsx","../../src/components/molecules/OakHandDrawnCard/OakHandDrawnCard.tsx","../../src/components/molecules/OakHandDrawnCardWithIcon/OakHandDrawnCardWithIcon.tsx","../../src/components/molecules/OakPromoTag/OakPromoTag.tsx","../../src/components/molecules/OakCollapsibleContent/OakCollapsibleContent.tsx","../../src/components/molecules/InternalLink/InternalLink.tsx","../../src/components/molecules/OakLink/OakLink.tsx","../../src/components/molecules/OakSecondaryLink/OakSecondaryLink.tsx","../../src/components/molecules/OakDragAndDropInstructions/OakDragAndDropInstructions.tsx","../../src/components/molecules/OakDraggable/OakDraggable.tsx","../../src/components/molecules/OakDroppable/OakDroppable.tsx","../../src/components/molecules/OakAccordion/OakAccordion.tsx","../../node_modules/react-remove-scroll-bar/dist/es2015/constants.js","../../node_modules/use-callback-ref/dist/es2015/assignRef.js","../../node_modules/use-callback-ref/dist/es2015/useMergeRef.js","../../node_modules/use-callback-ref/dist/es2015/useRef.js","../../node_modules/use-sidecar/dist/es2015/medium.js","../../node_modules/use-sidecar/dist/es2015/exports.js","../../node_modules/react-focus-on/node_modules/react-remove-scroll/dist/es2015/medium.js","../../node_modules/react-focus-on/node_modules/react-remove-scroll/dist/es2015/UI.js","../../node_modules/@babel/runtime/helpers/esm/extends.js","../../node_modules/prop-types/lib/ReactPropTypesSecret.js","../../node_modules/react-is/index.js","../../node_modules/react-is/cjs/react-is.production.min.js","../../node_modules/react-is/cjs/react-is.development.js","../../node_modules/object-assign/index.js","../../node_modules/prop-types/lib/has.js","../../node_modules/prop-types/index.js","../../node_modules/prop-types/factoryWithTypeCheckers.js","../../node_modules/prop-types/checkPropTypes.js","../../node_modules/prop-types/factoryWithThrowingShims.js","../../node_modules/focus-lock/dist/es2015/constants.js","../../node_modules/react-focus-lock/dist/es2015/FocusGuard.js","../../node_modules/react-focus-lock/dist/es2015/medium.js","../../node_modules/react-focus-lock/dist/es2015/scope.js","../../node_modules/react-focus-lock/dist/es2015/Lock.js","../../node_modules/react-focus-lock/dist/es2015/util.js","../../node_modules/react-focus-on/dist/es2015/medium.js","../../node_modules/react-focus-on/dist/es2015/UI.js","../../node_modules/@babel/runtime/helpers/esm/setPrototypeOf.js","../../node_modules/@babel/runtime/helpers/esm/inheritsLoose.js","../../node_modules/@babel/runtime/helpers/esm/typeof.js","../../node_modules/@babel/runtime/helpers/esm/toPropertyKey.js","../../node_modules/@babel/runtime/helpers/esm/toPrimitive.js","../../node_modules/focus-lock/dist/es2015/utils/array.js","../../node_modules/focus-lock/dist/es2015/utils/is.js","../../node_modules/focus-lock/dist/es2015/utils/tabOrder.js","../../node_modules/focus-lock/dist/es2015/utils/tabUtils.js","../../node_modules/focus-lock/dist/es2015/utils/tabbables.js","../../node_modules/focus-lock/dist/es2015/utils/DOMutils.js","../../node_modules/focus-lock/dist/es2015/utils/all-affected.js","../../node_modules/focus-lock/dist/es2015/utils/getActiveElement.js","../../node_modules/focus-lock/dist/es2015/utils/safe.js","../../node_modules/focus-lock/dist/es2015/focusInside.js","../../node_modules/focus-lock/dist/es2015/utils/correctFocus.js","../../node_modules/focus-lock/dist/es2015/utils/firstFocus.js","../../node_modules/focus-lock/dist/es2015/solver.js","../../node_modules/focus-lock/dist/es2015/utils/auto-focus.js","../../node_modules/focus-lock/dist/es2015/utils/parenting.js","../../node_modules/focus-lock/dist/es2015/focusSolver.js","../../node_modules/focus-lock/dist/es2015/commands.js","../../node_modules/focus-lock/dist/es2015/moveFocusInside.js","../../node_modules/focus-lock/dist/es2015/return-focus.js","../../node_modules/focus-lock/dist/es2015/sibling.js","../../node_modules/react-focus-lock/dist/es2015/Trap.js","../../node_modules/focus-lock/dist/es2015/focusIsHidden.js","../../node_modules/focus-lock/dist/es2015/focusables.js","../../node_modules/react-clientside-effect/lib/index.es.js","../../node_modules/@babel/runtime/helpers/esm/defineProperty.js","../../node_modules/react-focus-lock/dist/es2015/sidecar.js","../../node_modules/react-style-singleton/dist/es2015/singleton.js","../../node_modules/get-nonce/dist/es2015/index.js","../../node_modules/react-style-singleton/dist/es2015/component.js","../../node_modules/react-style-singleton/dist/es2015/hook.js","../../node_modules/react-remove-scroll-bar/dist/es2015/utils.js","../../node_modules/react-remove-scroll-bar/dist/es2015/component.js","../../node_modules/react-focus-on/node_modules/react-remove-scroll/dist/es2015/aggresiveCapture.js","../../node_modules/react-focus-on/node_modules/react-remove-scroll/dist/es2015/handleScroll.js","../../node_modules/react-focus-on/node_modules/react-remove-scroll/dist/es2015/SideEffect.js","../../node_modules/react-focus-on/node_modules/react-remove-scroll/dist/es2015/sidecar.js","../../node_modules/aria-hidden/dist/es2015/index.js","../../node_modules/react-focus-on/dist/es2015/InteractivityDisabler.js","../../node_modules/react-focus-on/dist/es2015/Effect.js","../../node_modules/react-focus-on/dist/es2015/sidecar.js","../../node_modules/react-focus-on/dist/es2015/Combination.js","../../node_modules/react-transition-group/esm/config.js","../../node_modules/react-transition-group/esm/utils/PropTypes.js","../../node_modules/react-transition-group/esm/TransitionGroupContext.js","../../node_modules/react-transition-group/esm/Transition.js","../../node_modules/react-transition-group/esm/utils/reflow.js","../../node_modules/@babel/runtime/helpers/esm/objectWithoutPropertiesLoose.js","../../src/components/molecules/OakModal/OakModal.tsx","../../src/components/organisms/pupil/OakQuizCheckBox/OakQuizCheckBox.tsx","../../src/components/organisms/pupil/OakQuizRadioButton/OakQuizRadioButton.tsx","../../src/components/organisms/pupil/OakHintButton/OakHintButton.tsx","../../src/components/organisms/pupil/OakQuizHint/OakQuizHint.tsx","../../src/components/organisms/pupil/OakQuizFeedback/OakQuizFeedback.tsx","../../src/components/organisms/pupil/OakLessonBottomNav/OakLessonBottomNav.tsx","../../src/components/organisms/pupil/OakLessonTopNav/OakLessonTopNav.tsx","../../src/components/organisms/pupil/OakQuizCounter/OakQuizCounter.tsx","../../src/components/organisms/pupil/OakLessonLayout/OakLessonLayout.tsx","../../src/components/organisms/pupil/OakLessonNavItem/OakLessonNavItem.tsx","../../src/components/organisms/pupil/OakLessonReviewItem/OakPupilLessonReviewItem.tsx","../../node_modules/@dnd-kit/utilities/dist/utilities.esm.js","../../node_modules/@dnd-kit/accessibility/dist/accessibility.esm.js","../../node_modules/@dnd-kit/core/dist/core.esm.js","../../node_modules/@dnd-kit/sortable/dist/sortable.esm.js","../../src/components/atoms/InternalDndContext/InternalDndContext.tsx","../../src/animation/usePrefersReducedMotion.ts","../../src/components/organisms/pupil/OakQuizOrder/OakQuizOrder.tsx","../../src/components/organisms/pupil/InternalDroppableHoldingPen/InternalDroppableHoldingPen.tsx","../../src/components/organisms/pupil/OakQuizMatch/OakQuizMatch.tsx","../../src/components/organisms/OakPrimaryNavItem/OakPrimaryNavItem.tsx","../../src/components/molecules/OakBulletList/OakBulletList.tsx","../../src/components/molecules/OakLessonInfoCard/OakLessonInfoCard.tsx","../../src/components/molecules/OakCheckBox/OakCheckBox.tsx","../../src/components/organisms/OakCookieBanner/OakCookieBanner.tsx","../../src/components/molecules/OakDraggableFeedback/OakDraggableFeedback.tsx","../../src/components/molecules/OakFieldError/OakFieldError.tsx","../../src/components/organisms/pupil/OakLessonVideoTranscript/OakLessonVideoTranscript.tsx","../../src/components/molecules/OakModal/OakModalBody.tsx","../../src/components/molecules/OakModal/OakModalFooter.tsx","../../src/components/organisms/OakPrimaryNav/OakPrimaryNav.tsx","../../src/components/organisms/pupil/OakQuizTextInput/OakQuizTextInput.tsx","../../src/components/organisms/OakSubjectIcon/OakSubjectIcon.tsx","../../src/components/atoms/OakThemeProvider/OakThemeProvider.tsx","../../src/styles/theme/default.theme.ts"],"sourcesContent":["/******************************************************************************\r\nCopyright (c) Microsoft Corporation.\r\n\r\nPermission to use, copy, modify, and/or distribute this software for any\r\npurpose with or without fee is hereby granted.\r\n\r\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\r\nREGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\r\nAND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\r\nINDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\r\nLOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\r\nOTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\r\nPERFORMANCE OF THIS SOFTWARE.\r\n***************************************************************************** */\r\n/* global Reflect, Promise, SuppressedError, Symbol */\r\n\r\nvar extendStatics = function(d, b) {\r\n extendStatics = Object.setPrototypeOf ||\r\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\r\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\r\n return extendStatics(d, b);\r\n};\r\n\r\nexport function __extends(d, b) {\r\n if (typeof b !== \"function\" && b !== null)\r\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\r\n extendStatics(d, b);\r\n function __() { this.constructor = d; }\r\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n}\r\n\r\nexport var __assign = function() {\r\n __assign = Object.assign || function __assign(t) {\r\n for (var s, i = 1, n = arguments.length; i < n; i++) {\r\n s = arguments[i];\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\r\n }\r\n return t;\r\n }\r\n return __assign.apply(this, arguments);\r\n}\r\n\r\nexport function __rest(s, e) {\r\n var t = {};\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\r\n t[p] = s[p];\r\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\r\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\r\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\r\n t[p[i]] = s[p[i]];\r\n }\r\n return t;\r\n}\r\n\r\nexport function __decorate(decorators, target, key, desc) {\r\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\r\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\r\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\r\n return c > 3 && r && Object.defineProperty(target, key, r), r;\r\n}\r\n\r\nexport function __param(paramIndex, decorator) {\r\n return function (target, key) { decorator(target, key, paramIndex); }\r\n}\r\n\r\nexport function __esDecorate(ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) {\r\n function accept(f) { if (f !== void 0 && typeof f !== \"function\") throw new TypeError(\"Function expected\"); return f; }\r\n var kind = contextIn.kind, key = kind === \"getter\" ? \"get\" : kind === \"setter\" ? \"set\" : \"value\";\r\n var target = !descriptorIn && ctor ? contextIn[\"static\"] ? ctor : ctor.prototype : null;\r\n var descriptor = descriptorIn || (target ? Object.getOwnPropertyDescriptor(target, contextIn.name) : {});\r\n var _, done = false;\r\n for (var i = decorators.length - 1; i >= 0; i--) {\r\n var context = {};\r\n for (var p in contextIn) context[p] = p === \"access\" ? {} : contextIn[p];\r\n for (var p in contextIn.access) context.access[p] = contextIn.access[p];\r\n context.addInitializer = function (f) { if (done) throw new TypeError(\"Cannot add initializers after decoration has completed\"); extraInitializers.push(accept(f || null)); };\r\n var result = (0, decorators[i])(kind === \"accessor\" ? { get: descriptor.get, set: descriptor.set } : descriptor[key], context);\r\n if (kind === \"accessor\") {\r\n if (result === void 0) continue;\r\n if (result === null || typeof result !== \"object\") throw new TypeError(\"Object expected\");\r\n if (_ = accept(result.get)) descriptor.get = _;\r\n if (_ = accept(result.set)) descriptor.set = _;\r\n if (_ = accept(result.init)) initializers.unshift(_);\r\n }\r\n else if (_ = accept(result)) {\r\n if (kind === \"field\") initializers.unshift(_);\r\n else descriptor[key] = _;\r\n }\r\n }\r\n if (target) Object.defineProperty(target, contextIn.name, descriptor);\r\n done = true;\r\n};\r\n\r\nexport function __runInitializers(thisArg, initializers, value) {\r\n var useValue = arguments.length > 2;\r\n for (var i = 0; i < initializers.length; i++) {\r\n value = useValue ? initializers[i].call(thisArg, value) : initializers[i].call(thisArg);\r\n }\r\n return useValue ? value : void 0;\r\n};\r\n\r\nexport function __propKey(x) {\r\n return typeof x === \"symbol\" ? x : \"\".concat(x);\r\n};\r\n\r\nexport function __setFunctionName(f, name, prefix) {\r\n if (typeof name === \"symbol\") name = name.description ? \"[\".concat(name.description, \"]\") : \"\";\r\n return Object.defineProperty(f, \"name\", { configurable: true, value: prefix ? \"\".concat(prefix, \" \", name) : name });\r\n};\r\n\r\nexport function __metadata(metadataKey, metadataValue) {\r\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(metadataKey, metadataValue);\r\n}\r\n\r\nexport function __awaiter(thisArg, _arguments, P, generator) {\r\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\r\n return new (P || (P = Promise))(function (resolve, reject) {\r\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\r\n step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n });\r\n}\r\n\r\nexport function __generator(thisArg, body) {\r\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\r\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\r\n function verb(n) { return function (v) { return step([n, v]); }; }\r\n function step(op) {\r\n if (f) throw new TypeError(\"Generator is already executing.\");\r\n while (g && (g = 0, op[0] && (_ = 0)), _) try {\r\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\r\n if (y = 0, t) op = [op[0] & 2, t.value];\r\n switch (op[0]) {\r\n case 0: case 1: t = op; break;\r\n case 4: _.label++; return { value: op[1], done: false };\r\n case 5: _.label++; y = op[1]; op = [0]; continue;\r\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\r\n default:\r\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\r\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\r\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\r\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\r\n if (t[2]) _.ops.pop();\r\n _.trys.pop(); continue;\r\n }\r\n op = body.call(thisArg, _);\r\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\r\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\r\n }\r\n}\r\n\r\nexport var __createBinding = Object.create ? (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n var desc = Object.getOwnPropertyDescriptor(m, k);\r\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\r\n desc = { enumerable: true, get: function() { return m[k]; } };\r\n }\r\n Object.defineProperty(o, k2, desc);\r\n}) : (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n o[k2] = m[k];\r\n});\r\n\r\nexport function __exportStar(m, o) {\r\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p);\r\n}\r\n\r\nexport function __values(o) {\r\n var s = typeof Symbol === \"function\" && Symbol.iterator, m = s && o[s], i = 0;\r\n if (m) return m.call(o);\r\n if (o && typeof o.length === \"number\") return {\r\n next: function () {\r\n if (o && i >= o.length) o = void 0;\r\n return { value: o && o[i++], done: !o };\r\n }\r\n };\r\n throw new TypeError(s ? \"Object is not iterable.\" : \"Symbol.iterator is not defined.\");\r\n}\r\n\r\nexport function __read(o, n) {\r\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\r\n if (!m) return o;\r\n var i = m.call(o), r, ar = [], e;\r\n try {\r\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\r\n }\r\n catch (error) { e = { error: error }; }\r\n finally {\r\n try {\r\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\r\n }\r\n finally { if (e) throw e.error; }\r\n }\r\n return ar;\r\n}\r\n\r\n/** @deprecated */\r\nexport function __spread() {\r\n for (var ar = [], i = 0; i < arguments.length; i++)\r\n ar = ar.concat(__read(arguments[i]));\r\n return ar;\r\n}\r\n\r\n/** @deprecated */\r\nexport function __spreadArrays() {\r\n for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;\r\n for (var r = Array(s), k = 0, i = 0; i < il; i++)\r\n for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)\r\n r[k] = a[j];\r\n return r;\r\n}\r\n\r\nexport function __spreadArray(to, from, pack) {\r\n if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {\r\n if (ar || !(i in from)) {\r\n if (!ar) ar = Array.prototype.slice.call(from, 0, i);\r\n ar[i] = from[i];\r\n }\r\n }\r\n return to.concat(ar || Array.prototype.slice.call(from));\r\n}\r\n\r\nexport function __await(v) {\r\n return this instanceof __await ? (this.v = v, this) : new __await(v);\r\n}\r\n\r\nexport function __asyncGenerator(thisArg, _arguments, generator) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var g = generator.apply(thisArg, _arguments || []), i, q = [];\r\n return i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i;\r\n function verb(n) { if (g[n]) i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }\r\n function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }\r\n function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }\r\n function fulfill(value) { resume(\"next\", value); }\r\n function reject(value) { resume(\"throw\", value); }\r\n function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }\r\n}\r\n\r\nexport function __asyncDelegator(o) {\r\n var i, p;\r\n return i = {}, verb(\"next\"), verb(\"throw\", function (e) { throw e; }), verb(\"return\"), i[Symbol.iterator] = function () { return this; }, i;\r\n function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: false } : f ? f(v) : v; } : f; }\r\n}\r\n\r\nexport function __asyncValues(o) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var m = o[Symbol.asyncIterator], i;\r\n return m ? m.call(o) : (o = typeof __values === \"function\" ? __values(o) : o[Symbol.iterator](), i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i);\r\n function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }\r\n function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }\r\n}\r\n\r\nexport function __makeTemplateObject(cooked, raw) {\r\n if (Object.defineProperty) { Object.defineProperty(cooked, \"raw\", { value: raw }); } else { cooked.raw = raw; }\r\n return cooked;\r\n};\r\n\r\nvar __setModuleDefault = Object.create ? (function(o, v) {\r\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\r\n}) : function(o, v) {\r\n o[\"default\"] = v;\r\n};\r\n\r\nexport function __importStar(mod) {\r\n if (mod && mod.__esModule) return mod;\r\n var result = {};\r\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\r\n __setModuleDefault(result, mod);\r\n return result;\r\n}\r\n\r\nexport function __importDefault(mod) {\r\n return (mod && mod.__esModule) ? mod : { default: mod };\r\n}\r\n\r\nexport function __classPrivateFieldGet(receiver, state, kind, f) {\r\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a getter\");\r\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot read private member from an object whose class did not declare it\");\r\n return kind === \"m\" ? f : kind === \"a\" ? f.call(receiver) : f ? f.value : state.get(receiver);\r\n}\r\n\r\nexport function __classPrivateFieldSet(receiver, state, value, kind, f) {\r\n if (kind === \"m\") throw new TypeError(\"Private method is not writable\");\r\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a setter\");\r\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot write private member to an object whose class did not declare it\");\r\n return (kind === \"a\" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;\r\n}\r\n\r\nexport function __classPrivateFieldIn(state, receiver) {\r\n if (receiver === null || (typeof receiver !== \"object\" && typeof receiver !== \"function\")) throw new TypeError(\"Cannot use 'in' operator on non-object\");\r\n return typeof state === \"function\" ? receiver === state : state.has(receiver);\r\n}\r\n\r\nexport function __addDisposableResource(env, value, async) {\r\n if (value !== null && value !== void 0) {\r\n if (typeof value !== \"object\" && typeof value !== \"function\") throw new TypeError(\"Object expected.\");\r\n var dispose;\r\n if (async) {\r\n if (!Symbol.asyncDispose) throw new TypeError(\"Symbol.asyncDispose is not defined.\");\r\n dispose = value[Symbol.asyncDispose];\r\n }\r\n if (dispose === void 0) {\r\n if (!Symbol.dispose) throw new TypeError(\"Symbol.dispose is not defined.\");\r\n dispose = value[Symbol.dispose];\r\n }\r\n if (typeof dispose !== \"function\") throw new TypeError(\"Object not disposable.\");\r\n env.stack.push({ value: value, dispose: dispose, async: async });\r\n }\r\n else if (async) {\r\n env.stack.push({ async: true });\r\n }\r\n return value;\r\n}\r\n\r\nvar _SuppressedError = typeof SuppressedError === \"function\" ? SuppressedError : function (error, suppressed, message) {\r\n var e = new Error(message);\r\n return e.name = \"SuppressedError\", e.error = error, e.suppressed = suppressed, e;\r\n};\r\n\r\nexport function __disposeResources(env) {\r\n function fail(e) {\r\n env.error = env.hasError ? new _SuppressedError(e, env.error, \"An error was suppressed during disposal.\") : e;\r\n env.hasError = true;\r\n }\r\n function next() {\r\n while (env.stack.length) {\r\n var rec = env.stack.pop();\r\n try {\r\n var result = rec.dispose && rec.dispose.call(rec.value);\r\n if (rec.async) return Promise.resolve(result).then(next, function(e) { fail(e); return next(); });\r\n }\r\n catch (e) {\r\n fail(e);\r\n }\r\n }\r\n if (env.hasError) throw env.error;\r\n }\r\n return next();\r\n}\r\n\r\nexport default {\r\n __extends: __extends,\r\n __assign: __assign,\r\n __rest: __rest,\r\n __decorate: __decorate,\r\n __param: __param,\r\n __metadata: __metadata,\r\n __awaiter: __awaiter,\r\n __generator: __generator,\r\n __createBinding: __createBinding,\r\n __exportStar: __exportStar,\r\n __values: __values,\r\n __read: __read,\r\n __spread: __spread,\r\n __spreadArrays: __spreadArrays,\r\n __spreadArray: __spreadArray,\r\n __await: __await,\r\n __asyncGenerator: __asyncGenerator,\r\n __asyncDelegator: __asyncDelegator,\r\n __asyncValues: __asyncValues,\r\n __makeTemplateObject: __makeTemplateObject,\r\n __importStar: __importStar,\r\n __importDefault: __importDefault,\r\n __classPrivateFieldGet: __classPrivateFieldGet,\r\n __classPrivateFieldSet: __classPrivateFieldSet,\r\n __classPrivateFieldIn: __classPrivateFieldIn,\r\n __addDisposableResource: __addDisposableResource,\r\n __disposeResources: __disposeResources,\r\n};\r\n","export const oakColorTokens = {\n white: \"#ffffff\",\n grey10: \"#f9f9f9\",\n grey20: \"#f2f2f2\",\n grey30: \"#e4e4e4\",\n grey40: \"#cacaca\",\n grey50: \"#808080\",\n grey60: \"#575757\",\n grey70: \"#2d2d2d\",\n black: \"#222222\",\n oakGreen: \"#287c34\",\n mint: \"#bef2bd\",\n mint30: \"#ebfbeb\",\n mint50: \"#dff9de\",\n mint110: \"#93e892\",\n aqua: \"#b0e2de\",\n aqua30: \"#e7f6f5\",\n aqua50: \"#cee7e5\",\n aqua110: \"#7cd8d0\",\n lavender: \"#a0b6f2\",\n lavender30: \"#e3e9fb\",\n lavender50: \"#c6d1ef\",\n lavender110: \"#7c9aec\",\n pink: \"#deb7d5\",\n pink30: \"#f5e9f2\",\n pink50: \"#e5d1e0\",\n pink110: \"#cf9cc3\",\n lemon: \"#ffe555\",\n lemon30: \"#fff7cc\",\n lemon50: \"#f6e8a0\",\n lemon110: \"#fbd60e\",\n amber: \"#ff934e\",\n amber30: \"#ffece0\",\n amber50: \"#ffc8a6\",\n red: \"#dd0035\",\n red30: \"#f8d8e0\",\n red50: \"#ee809a\",\n navy: \"#0d24c4\",\n navy110: \"#0a1d9d\",\n navy120: \"#081676\",\n blue: \"#374cf1\",\n magenta: \"#d02aa7\",\n purple: \"#845ad9\",\n teal: \"#037b7d\",\n transparent: \"transparent\",\n};\n\nexport type OakColorToken = keyof typeof oakColorTokens;\n\n/**\n *\n * Use this tool to convert Hex to color filter values https://codepen.io/sosuke/pen/Pjoqqp\n *\n */\n\nexport const oakColorFilterTokens = {\n black:\n \"invert(10%) sepia(1%) saturate(236%) hue-rotate(314deg) brightness(95%) contrast(91%)\",\n red: \"invert(13%) sepia(78%) saturate(5255%) hue-rotate(337deg) brightness(88%) contrast(111%)\",\n oakGreen:\n \"invert(37%) sepia(16%) saturate(1947%) hue-rotate(77deg) brightness(100%) contrast(88%)\",\n white:\n \"invert(98%) sepia(98%) saturate(0%) hue-rotate(328deg) brightness(102%) contrast(102%)\",\n grey40:\n \"invert(92%) sepia(0%) saturate(581%) hue-rotate(147deg) brightness(94%) contrast(80%)\",\n grey50:\n \"invert(54%) sepia(0%) saturate(38%) hue-rotate(176deg) brightness(92%) contrast(91%)\",\n navy: \"invert(21%) sepia(90%) saturate(3220%) hue-rotate(232deg) brightness(71%) contrast(127%)\",\n navy110:\n \"invert(16%) sepia(72%) saturate(7176%) hue-rotate(239deg) brightness(61%) contrast(109%)\",\n navy120:\n \"invert(12%) sepia(79%) saturate(3172%) hue-rotate(231deg) brightness(82%) contrast(114%)\",\n};\n\nexport type OakColorFilterToken = keyof typeof oakColorFilterTokens;\n\nexport const oakUiRoleTokens = [\n \"text-primary\",\n \"text-subdued\",\n \"text-error\",\n \"text-disabled\",\n \"text-link-active\",\n \"text-link-hover\",\n \"text-link-visited\",\n \"text-link-pressed\",\n \"text-inverted\",\n \"text-success\",\n \"text-warning\",\n \"bg-primary\",\n \"bg-neutral\",\n \"bg-neutral-stronger\",\n \"bg-btn-primary\",\n \"bg-btn-primary-hover\",\n \"bg-btn-primary-disabled\",\n \"bg-btn-secondary\",\n \"bg-btn-secondary-hover\",\n \"bg-btn-secondary-disabled\",\n \"bg-icon\",\n \"bg-icon-hover\",\n \"bg-decorative1-main\",\n \"bg-decorative1-subdued\",\n \"bg-decorative1-very-subdued\",\n \"bg-decorative2-main\",\n \"bg-decorative2-subdued\",\n \"bg-decorative2-very-subdued\",\n \"bg-decorative3-main\",\n \"bg-decorative3-subdued\",\n \"bg-decorative3-very-subdued\",\n \"bg-decorative4-main\",\n \"bg-decorative4-subdued\",\n \"bg-decorative4-very-subdued\",\n \"bg-decorative5-main\",\n \"bg-decorative5-subdued\",\n \"bg-decorative5-very-subdued\",\n \"bg-correct\",\n \"bg-incorrect\",\n \"icon-main\",\n \"icon-inverted\",\n \"icon-disabled\",\n \"icon-brand\",\n \"icon-success\",\n \"icon-error\",\n \"icon-warning\",\n \"border-primary\",\n \"border-inverted\",\n \"border-neutral\",\n \"border-neutral-lighter\",\n \"border-brand\",\n \"border-success\",\n \"border-error\",\n \"border-warning\",\n \"border-decorative1\",\n \"border-decorative1-stronger\",\n \"border-decorative2\",\n \"border-decorative2-stronger\",\n \"border-decorative3\",\n \"border-decorative3-stronger\",\n \"border-decorative4\",\n \"border-decorative4-stronger\",\n \"border-decorative5\",\n \"border-decorative5-stronger\",\n \"border-decorative6\",\n \"border-decorative6-stronger\",\n \"transparent\",\n] as const;\n\nexport type OakUiRoleToken = (typeof oakUiRoleTokens)[number];\n\nexport type UiRoleMap = Record<\n OakUiRoleToken,\n OakColorToken | null | undefined\n>;\n\nexport type OakCombinedColorToken = OakColorToken | OakUiRoleToken;\n","import {\n OakColorToken,\n OakCombinedColorToken,\n OakUiRoleToken,\n oakColorTokens,\n oakUiRoleTokens,\n} from \"@/styles/theme/color\";\nimport { PropsWithTheme } from \"@/styles/theme/theme\";\n\n/**\n * - takes any of color token\n * - if an OakColor derives and returns the corresponding css value\n * - if an OakUiRole derives returns a function that takes the current theme and returns the corresponding css value\n */\nfunction parseColor(): undefined;\nfunction parseColor(\n value?: OakCombinedColorToken | null,\n): (props: PropsWithTheme) => string;\nfunction parseColor(\n value?: OakCombinedColorToken | null,\n): ((props: PropsWithTheme) => string) | undefined;\nfunction parseColor(value?: OakCombinedColorToken | null) {\n if (value === undefined || value === null) {\n return undefined;\n }\n if (value in oakColorTokens) {\n return oakColorTokens[value as OakColorToken];\n }\n\n if (oakUiRoleTokens.includes(value as OakUiRoleToken)) {\n return ({ theme }: PropsWithTheme) => {\n const c = theme.uiColors[value as OakUiRoleToken];\n return oakColorTokens[c as OakColorToken];\n };\n }\n}\n\nexport { parseColor };\n","// @see https://stackoverflow.com/questions/47632622/typescript-and-filter-boolean\n\nexport type Truthy<T> = T extends false | \"\" | 0 | null | undefined ? never : T; // from lodash\n\n/**\n *\n * @description truthy takes a value and returns true|false with the correct type\n * It's useful, for example, when filtering out null values from an array.\n * Typescript compiler needs a hint to realise there aren't any more null values.\n * [{ foo: \"bar\" }, null]<Record | null>[].filter(truthy) // [{ foo: \"bar\"}]<Record>[]\n */\nexport function truthy<T>(value: T): value is Truthy<T> {\n return !!value;\n}\n","import {\n css,\n DefaultTheme,\n Interpolation,\n ThemedStyledProps,\n} from \"styled-components\";\n\nimport { truthy } from \"@/styles/helpers/truthy\";\nimport { PropsWithTheme } from \"@/styles/theme/theme\";\n\nconst breakpointsByName = {\n small: 750,\n large: 1280,\n};\n\nexport const breakpoints = Object.values(breakpointsByName).sort((a, b) =>\n a > b ? 1 : -1,\n);\n\nexport type BreakpointName = keyof typeof breakpointsByName;\n\nexport const getBreakpoint = (\n breakpointName: keyof typeof breakpointsByName,\n) => {\n return breakpointsByName[breakpointName];\n};\n\nexport type Device = \"mobile\" | \"tablet\" | \"desktop\";\n\nconst mediaQueries: Record<Device, string> = {\n mobile: `(max-width: ${getBreakpoint(\"small\") - 1}px)`,\n tablet: `(min-width: ${getBreakpoint(\"small\")}px and max-width: ${\n getBreakpoint(\"large\") - 1\n }px)`,\n desktop: `(min-width: ${getBreakpoint(\"large\")}px)`,\n};\n\nexport const getMediaQuery = (device: Device) => {\n return mediaQueries[device];\n};\n\nexport type ResponsiveValues<Value> = (Value | null) | (Value | null)[];\n\ntype Generic = string | number | undefined | null;\n\nexport const responsiveStyle =\n <Props, T extends Generic>(\n attr: string,\n getValues: (props: Props) => ResponsiveValues<T | undefined | null>,\n parse:\n | ((unparsed: T | undefined | null) => Generic)\n | ((\n unparsed: T | undefined | null,\n ) => (props: PropsWithTheme) => Generic) = (x) => x,\n ) =>\n (props: Props): Interpolation<ThemedStyledProps<Props, DefaultTheme>> => {\n const attrCss = (value: T | undefined | null) =>\n typeof value === \"undefined\"\n ? undefined\n : css`\n ${attr}: ${parse(value)};\n `;\n const values = getValues(props);\n if (typeof values === \"undefined\") {\n return undefined;\n }\n if (!Array.isArray(values)) {\n return css`\n ${attrCss(values)}\n `;\n }\n if (values.length === 0) {\n return [];\n }\n\n return [\n css`\n ${attrCss(values[0])}\n `,\n ...breakpoints\n .slice(0, values.length)\n .map((breakpoint, i) => {\n const value = values[i + 1]; // Values are shifted relative to breakpoints\n\n if (value === undefined) {\n return undefined;\n }\n\n return css`\n @media (min-width: ${breakpoint}px) {\n ${css`\n ${attrCss(value)}\n `}\n }\n `;\n })\n .filter(truthy),\n ];\n };\n","import { css } from \"styled-components\";\n\nimport { parseColor } from \"@/styles/helpers/parseColor\";\nimport {\n responsiveStyle,\n ResponsiveValues,\n} from \"@/styles/utils/responsiveStyle\";\nimport { OakCombinedColorToken } from \"@/styles/theme/color\";\n\n/**\n * Color token!\n */\ntype ColorToken = ResponsiveValues<OakCombinedColorToken | null>;\n\nexport type ColorStyleProps = {\n /**\n * Sets the `color` of the element.\n *\n * Accepts a color token or a responsive array of color tokens.\n */\n $color?: ColorToken;\n /**\n * Sets the `background-color` of the element.\n *\n * Accepts a color token or a responsive array of color tokens.\n */\n $background?: ColorToken;\n};\nexport const colorStyle = css<ColorStyleProps>`\n ${responsiveStyle<ColorStyleProps, OakCombinedColorToken>(\n \"color\",\n (props) => props.$color,\n parseColor,\n )}\n ${responsiveStyle<ColorStyleProps, OakCombinedColorToken>(\n \"background\",\n (props) => props.$background,\n parseColor,\n )}\n`;\n","const BASE_FONT_SIZE_PX = 16;\nexport const REM_DP = 3;\n\nexport default function pxToRem(px: number): number {\n return Number((px / BASE_FONT_SIZE_PX).toFixed(REM_DP));\n}\n","export const oakAllSpacingTokens = {\n \"all-spacing-0\": 0,\n \"all-spacing-1\": 4,\n \"all-spacing-2\": 8,\n \"all-spacing-3\": 12,\n \"all-spacing-4\": 16,\n \"all-spacing-5\": 20,\n \"all-spacing-6\": 24,\n \"all-spacing-7\": 32,\n \"all-spacing-8\": 40,\n \"all-spacing-9\": 48,\n \"all-spacing-10\": 56,\n \"all-spacing-11\": 64,\n \"all-spacing-12\": 72,\n \"all-spacing-13\": 80,\n \"all-spacing-14\": 92,\n \"all-spacing-15\": 100,\n \"all-spacing-16\": 120,\n \"all-spacing-17\": 160,\n \"all-spacing-18\": 180,\n \"all-spacing-19\": 240,\n \"all-spacing-20\": 360,\n \"all-spacing-21\": 480,\n \"all-spacing-22\": 640,\n \"all-spacing-23\": 960,\n \"all-spacing-24\": 1280,\n};\n\nexport type OakAllSpacingToken = keyof typeof oakAllSpacingTokens;\n\nexport const oakInnerPaddingTokens = {\n \"inner-padding-none\": \"all-spacing-0\",\n \"inner-padding-ssx\": \"all-spacing-1\",\n \"inner-padding-xs\": \"all-spacing-2\",\n \"inner-padding-s\": \"all-spacing-3\",\n \"inner-padding-m\": \"all-spacing-4\",\n \"inner-padding-l\": \"all-spacing-5\",\n \"inner-padding-xl\": \"all-spacing-6\",\n};\n\nexport type OakInnerPaddingToken = keyof typeof oakInnerPaddingTokens;\n\nexport const oakSpaceBetweenTokens = {\n \"space-between-none\": \"all-spacing-0\",\n \"space-between-sssx\": \"all-spacing-1\",\n \"space-between-ssx\": \"all-spacing-2\",\n \"space-between-xs\": \"all-spacing-3\",\n \"space-between-s\": \"all-spacing-4\",\n \"space-between-m\": \"all-spacing-6\",\n \"space-between-m2\": \"all-spacing-7\",\n \"space-between-l\": \"all-spacing-9\",\n \"space-between-xl\": \"all-spacing-10\",\n \"space-between-xxl\": \"all-spacing-12\",\n \"space-between-xxxl\": \"all-spacing-13\",\n};\n\nexport type OakSpaceBetweenToken = keyof typeof oakSpaceBetweenTokens;\n\ntype AdditionalSpacingTypes =\n | \"100%\"\n | 0\n | \"100vh\"\n | \"100vw\"\n | \"auto\"\n | \"fit-content\"\n | \"max-content\"\n | \"min-content\"\n | \"inherit\"\n | \"initial\"\n | \"unset\";\n\nexport type OakCombinedSpacingToken =\n | OakAllSpacingToken\n | OakInnerPaddingToken\n | OakSpaceBetweenToken\n | AdditionalSpacingTypes;\n","import pxToRem from \"@/styles/helpers/pxToRem\";\nimport {\n OakAllSpacingToken,\n OakInnerPaddingToken,\n OakSpaceBetweenToken,\n OakCombinedSpacingToken,\n oakAllSpacingTokens,\n oakInnerPaddingTokens,\n oakSpaceBetweenTokens,\n} from \"@/styles/theme/spacing\";\n\n/**\n * - takes any of OakInnerPadding, OakSpaceBetween, OakAllSpacing, and other accepted values,\n * - derives and returns the corresponding css value\n * - converting to rem where necessary\n */\nexport function parseSpacing(value?: OakCombinedSpacingToken | null) {\n // if value is null or undefined, return undefined\n if (value === undefined || value === null) {\n return undefined;\n }\n\n // mapped values\n if (value in oakAllSpacingTokens) {\n return `${pxToRem(oakAllSpacingTokens[value as OakAllSpacingToken])}rem`; // NB. type assertion is necessary because the OakAllSpacing type is dervied from oakAllSpacingPx\n }\n\n if (value in oakInnerPaddingTokens) {\n const v = oakInnerPaddingTokens[value as OakInnerPaddingToken];\n return `${pxToRem(oakAllSpacingTokens[v as OakAllSpacingToken])}rem`;\n }\n\n if (value in oakSpaceBetweenTokens) {\n const v = oakSpaceBetweenTokens[value as OakSpaceBetweenToken];\n return `${pxToRem(oakAllSpacingTokens[v as OakAllSpacingToken])}rem`;\n }\n\n // value is a number, percentage or css value\n return value;\n}\n","import { CSSProperties } from \"react\";\nimport { css } from \"styled-components\";\n\nimport {\n responsiveStyle,\n ResponsiveValues,\n} from \"@/styles/utils/responsiveStyle\";\nimport {\n OakAllSpacingToken,\n OakSpaceBetweenToken,\n} from \"@/styles/theme/spacing\";\nimport { parseSpacing } from \"@/styles/helpers/parseSpacing\";\n\ntype PositionSpacing =\n | OakAllSpacingToken\n | OakSpaceBetweenToken\n | null\n | undefined;\n\nexport type PositionStyleProps = {\n /**\n * Sets the `position` CSS property of the element.\n *\n * Accepts a `position` value or a responsive array of `position` values. Can be nulled.\n */\n $position?: ResponsiveValues<CSSProperties[\"position\"]>;\n /**\n * Sets the `top` CSS property of the element.\n *\n * Accepts a spacing token or a responsive array of spacing tokens. Can be nulled.\n */\n $top?: ResponsiveValues<PositionSpacing>;\n /**\n * Sets the `right` CSS property of the element.\n *\n * Accepts a spacing token or a responsive array of spacing tokens. Can be nulled.\n */\n $right?: ResponsiveValues<PositionSpacing>;\n /**\n * Sets the `bottom` CSS property of the element.\n *\n * Accepts a spacing token or a responsive array of spacing tokens. Can be nulled.\n */\n $bottom?: ResponsiveValues<PositionSpacing>;\n /**\n * Sets the `left` CSS property of the element.\n *\n * Accepts a spacing token or a responsive array of spacing tokens. Can be nulled.\n */\n $left?: ResponsiveValues<PositionSpacing>;\n /**\n * Sets the `inset` CSS property of the element.\n *\n * Accepts a spacing token or a responsive array of spacing tokens. Can be nulled.\n */\n $inset?: ResponsiveValues<PositionSpacing>;\n /**\n * Sets the `overflow` CSS property of the element.\n *\n * Accepts an `overflow` value or a responsive array of `overflow` values.\n */\n $overflow?: ResponsiveValues<CSSProperties[\"overflow\"]>;\n /**\n * Sets the `overflow-x` CSS property of the element.\n *\n * Accepts an `overflow-x` value or a responsive array of `overflow-x` values.\n */\n $overflowX?: ResponsiveValues<CSSProperties[\"overflowX\"]>;\n /**\n * Sets the `overflow-y` CSS property of the element.\n *\n * Accepts an `overflow-y` value or a responsive array of `overflow-y` values.\n */\n $overflowY?: ResponsiveValues<CSSProperties[\"overflowY\"]>;\n /**\n * Sets the `object-fit` CSS property of the element.\n *\n * Accepts an `object-fit` value or a responsive array of `object-fit` values.\n */\n $objectFit?: ResponsiveValues<CSSProperties[\"objectFit\"]>;\n /**\n * Sets the `pointer-events` CSS property of the element.\n *\n * Accepts a `pointer-events` value or a responsive array of `pointer-events` values.\n */\n $pointerEvents?: ResponsiveValues<CSSProperties[\"pointerEvents\"]>;\n /**\n * Sets the `visibility` CSS property of the element.\n *\n * Accepts a `visibility` value or a responsive array of `visibility` values.\n */\n $visibility?: ResponsiveValues<CSSProperties[\"visibility\"]>;\n};\n\nexport const positionStyle = css<PositionStyleProps>`\n ${responsiveStyle(\"position\", (props) => props.$position)}\n ${responsiveStyle(\"top\", (props) => props.$top, parseSpacing)} \n ${responsiveStyle(\"right\", (props) => props.$right, parseSpacing)} \n ${responsiveStyle(\"bottom\", (props) => props.$bottom, parseSpacing)} \n ${responsiveStyle(\"left\", (props) => props.$left, parseSpacing)} \n ${responsiveStyle(\"inset\", (props) => props.$inset, parseSpacing)} \n ${responsiveStyle(\"overflow\", (props) => props.$overflow)}\n ${responsiveStyle(\"overflow-x\", (props) => props.$overflowX)}\n ${responsiveStyle(\"overflow-y\", (props) => props.$overflowY)}\n ${responsiveStyle(\"object-fit\", (props) => props.$objectFit)}\n ${responsiveStyle(\"pointer-events\", (props) => props.$pointerEvents)}\n ${responsiveStyle(\"visibility\", (props) => props.$visibility)}\n`;\n","import { css, CSSProperties } from \"styled-components\";\n\nimport {\n responsiveStyle,\n ResponsiveValues,\n} from \"@/styles/utils/responsiveStyle\";\nimport { OakCombinedSpacingToken } from \"@/styles/theme/spacing\";\nimport { parseSpacing } from \"@/styles/helpers/parseSpacing\";\n\ntype SizeValues = ResponsiveValues<OakCombinedSpacingToken | null | undefined>;\n\nexport type SizeStyleProps = {\n /**\n * Sets the `width` CSS property of the element.\n *\n * Accepts a spacing token or a responsive array of spacing tokens. Can be nulled.\n */\n $width?: SizeValues;\n /**\n * Sets the `min-width` CSS property of the element.\n *\n * Accepts a spacing token or a responsive array of spacing tokens. Can be nulled.\n */\n $minWidth?: SizeValues;\n /**\n * Sets the `max-width` CSS property of the element.\n *\n * Accepts a spacing token or a responsive array of spacing tokens. Can be nulled.\n */\n $maxWidth?: SizeValues;\n /**\n * Sets the `height` CSS property of the element.\n *\n * Accepts a spacing token or a responsive array of spacing tokens. Can be nulled.\n */\n $height?: SizeValues;\n /**\n * Sets the `min-height` CSS property of the element.\n *\n * Accepts a spacing token or a responsive array of spacing tokens. Can be nulled.\n */\n $minHeight?: SizeValues;\n /**\n * Sets the `max-height` CSS property of the element.\n *\n * Accepts a spacing token or a responsive array of spacing tokens. Can be nulled.\n */\n $maxHeight?: SizeValues;\n /**\n * Sets the `aspect-ratio` CSS property of the element.\n *\n * Accepts an `aspect-ratio` value or a responsive array of `aspect-ratio` values.\n */\n $aspectRatio?: ResponsiveValues<CSSProperties[\"aspectRatio\"]>;\n /**\n * Sets the `box-sizing` CSS property of the element.\n *\n * Accepts a `box-sizing` value or a responsive array of `box-sizing` values.\n */\n $boxSizing?: ResponsiveValues<CSSProperties[\"boxSizing\"]>;\n};\n\nexport const sizeStyle = css<SizeStyleProps>`\n ${responsiveStyle(\"width\", (props) => props.$width, parseSpacing)}\n ${responsiveStyle(\"min-width\", (props) => props.$minWidth, parseSpacing)}\n ${responsiveStyle(\"max-width\", (props) => props.$maxWidth, parseSpacing)}\n ${responsiveStyle(\"height\", (props) => props.$height, parseSpacing)}\n ${responsiveStyle(\"min-height\", (props) => props.$minHeight, parseSpacing)}\n ${responsiveStyle(\"max-height\", (props) => props.$maxHeight, parseSpacing)}\n ${responsiveStyle(\"aspect-ratio\", (props) => props.$aspectRatio)}\n ${responsiveStyle(\"box-sizing\", (props) => props.$boxSizing)}\n`;\n","import { css } from \"styled-components\";\n\nimport {\n responsiveStyle,\n ResponsiveValues,\n} from \"@/styles/utils/responsiveStyle\";\nimport { parseSpacing } from \"@/styles/helpers/parseSpacing\";\nimport {\n OakInnerPaddingToken,\n OakSpaceBetweenToken,\n} from \"@/styles/theme/spacing\";\n\ntype PaddingValues = ResponsiveValues<OakInnerPaddingToken | null | undefined>;\n\nexport type PaddingStyleProps = {\n /**\n * Applies `padding` to all sides of the element\n *\n * Accepts an inner padding token or a responsive array of inner padding tokens. Can be nulled.\n */\n $pa?: PaddingValues;\n /**\n * Applies `padding` to the left and right of the element\n *\n * Accepts an inner padding token or a responsive array of inner padding tokens. Can be nulled.\n */\n $ph?: PaddingValues;\n /**\n * Applies `padding` to the top and bottom of the element\n *\n * Accepts an inner padding token or a responsive array of inner padding tokens. Can be nulled.\n */\n $pv?: PaddingValues;\n /**\n * Applies `padding` to the left of the element\n *\n * Accepts an inner padding token or a responsive array of inner padding tokens. Can be nulled.\n */\n $pl?: PaddingValues;\n /**\n * Applies `padding` to the right of the element\n *\n * Accepts an inner padding token or a responsive array of inner padding tokens. Can be nulled.\n */\n $pr?: PaddingValues;\n /**\n * Applies `padding` to the top of the element\n *\n * Accepts an inner padding token or a responsive array of inner padding tokens. Can be nulled.\n */\n $pt?: PaddingValues;\n /**\n * Applies `padding` to the bottom of the element\n *\n * Accepts an inner padding token or a responsive array of inner padding tokens. Can be nulled.\n */\n $pb?: PaddingValues;\n};\n\ntype MarginValue = \"auto\" | OakSpaceBetweenToken | null | undefined;\ntype MarginValues = ResponsiveValues<MarginValue>;\n\nexport type MarginStyleProps = {\n /**\n * Applies `margin` to all sides of the element\n *\n * Accepts a space between token or a responsive array of space between tokens. Can be nulled.\n */\n $ma?: MarginValues;\n /**\n * Applies `margin` to the left and right of the element\n *\n * Accepts a space between token or a responsive array of space between tokens. Can be nulled.\n */\n $mh?: MarginValues;\n /**\n * Applies `margin` to the top and bottom of the element\n *\n * Accepts a space between token or a responsive array of space between tokens. Can be nulled.\n */\n $mv?: MarginValues;\n /**\n * Applies `margin` to the left of the element\n *\n * Accepts a space between token or a responsive array of space between tokens. Can be nulled.\n */\n $ml?: MarginValues;\n /**\n * Applies `margin` to the right of the element\n *\n * Accepts a space between token or a responsive array of space between tokens. Can be nulled.\n */\n $mr?: MarginValues;\n /**\n * Applies `margin` to the top of the element\n *\n * Accepts a space between token or a responsive array of space between tokens. Can be nulled.\n */\n $mt?: MarginValues;\n /**\n * Applies `margin` to the bottom of the element\n *\n * Accepts a space between token or a responsive array of space between tokens. Can be nulled.\n */\n $mb?: MarginValues;\n};\n\nconst paddingAll = css<{ $pa?: PaddingValues }>`\n ${responsiveStyle(\"padding\", (props) => props.$pa, parseSpacing)}\n`;\nconst paddingHorizontal = css<{ $ph?: PaddingValues }>`\n ${responsiveStyle(\"padding-left\", (props) => props.$ph, parseSpacing)}\n ${responsiveStyle(\"padding-right\", (props) => props.$ph, parseSpacing)}\n`;\nconst paddingVertical = css<{ $pv?: PaddingValues }>`\n ${responsiveStyle(\"padding-top\", (props) => props.$pv, parseSpacing)}\n ${responsiveStyle(\"padding-bottom\", (props) => props.$pv, parseSpacing)}\n`;\nconst paddingLeft = css<{ $pl?: PaddingValues }>`\n ${responsiveStyle(\"padding-left\", (props) => props.$pl, parseSpacing)}\n`;\nconst paddingRight = css<{ $pr?: PaddingValues }>`\n ${responsiveStyle(\"padding-right\", (props) => props.$pr, parseSpacing)}\n`;\nconst paddingTop = css<{ $pt?: PaddingValues }>`\n ${responsiveStyle(\"padding-top\", (props) => props.$pt, parseSpacing)}\n`;\nconst paddingBottom = css<{ $pb?: PaddingValues }>`\n ${responsiveStyle(\"padding-bottom\", (props) => props.$pb, parseSpacing)}\n`;\nconst marginAll = css<{ $ma?: MarginValues }>`\n ${responsiveStyle(\"margin\", (props) => props.$ma, parseSpacing)}\n`;\nconst marginHorizontal = css<{ $mh?: MarginValues }>`\n ${responsiveStyle(\"margin-left\", (props) => props.$mh, parseSpacing)}\n ${responsiveStyle(\"margin-right\", (props) => props.$mh, parseSpacing)}\n`;\nconst marginVertical = css<{ $mv?: MarginValues }>`\n ${responsiveStyle(\"margin-top\", (props) => props.$mv, parseSpacing)}\n ${responsiveStyle(\"margin-bottom\", (props) => props.$mv, parseSpacing)}\n`;\nconst marginLeft = css<{ $ml?: MarginValues }>`\n ${responsiveStyle(\"margin-left\", (props) => props.$ml, parseSpacing)}\n`;\nconst marginRight = css<{ $mr?: MarginValues }>`\n ${responsiveStyle(\"margin-right\", (props) => props.$mr, parseSpacing)}\n`;\nconst marginTop = css<{ $mt?: MarginValues }>`\n ${responsiveStyle(\"margin-top\", (props) => props.$mt, parseSpacing)}\n`;\nconst marginBottom = css<{ $mb?: MarginValues }>`\n ${responsiveStyle(\"margin-bottom\", (props) => props.$mb, parseSpacing)}\n`;\n\nexport const marginStyle = css<MarginStyleProps>`\n ${marginAll}\n ${marginHorizontal}\n ${marginVertical}\n ${marginLeft}\n ${marginRight}\n ${marginTop}\n ${marginBottom}\n`;\n\nexport const paddingStyle = css<PaddingStyleProps>`\n ${paddingAll}\n ${paddingHorizontal}\n ${paddingVertical}\n ${paddingLeft}\n ${paddingRight}\n ${paddingTop}\n ${paddingBottom}\n`;\n\nexport type SpacingStyleProps = PaddingStyleProps & MarginStyleProps;\nexport const spacingStyle = css<SpacingStyleProps>`\n ${paddingStyle}\n ${marginStyle}\n`;\n","export const oakBorderWidthTokens = {\n \"border-solid-none\": 0,\n \"border-solid-s\": 1,\n \"border-solid-m\": 2,\n \"border-solid-l\": 3,\n \"border-solid-xl\": 4,\n};\n\nexport const oakBorderRadiusTokens = {\n \"border-radius-square\": 0,\n \"border-radius-xs\": 2,\n \"border-radius-s\": 4,\n \"border-radius-m\": 6,\n \"border-radius-m2\": 8,\n \"border-radius-l\": 16,\n \"border-radius-xl\": 24,\n \"border-radius-circle\": 100,\n};\n\nexport type OakBorderRadiusToken = keyof typeof oakBorderRadiusTokens;\nexport type OakBorderWidthToken = keyof typeof oakBorderWidthTokens;\n","import {\n OakBorderWidthToken,\n oakBorderWidthTokens,\n} from \"@/styles/theme/borders\";\nimport pxToRem from \"@/styles/helpers/pxToRem\";\n\nexport const parseBorder = (value?: OakBorderWidthToken | null) => {\n if (value === undefined || value === null) {\n return undefined;\n }\n if (value in oakBorderWidthTokens) {\n return `${pxToRem(\n oakBorderWidthTokens[value as OakBorderWidthToken],\n )}rem solid`;\n }\n};\n","import pxToRem from \"./pxToRem\";\n\nimport {\n OakBorderRadiusToken,\n oakBorderRadiusTokens,\n} from \"@/styles/theme/borders\";\n\nexport const parseBorderRadius = (value?: OakBorderRadiusToken | null) => {\n if (value === undefined || value === null) {\n return undefined;\n }\n if (value in oakBorderRadiusTokens) {\n return `${pxToRem(\n oakBorderRadiusTokens[value as OakBorderRadiusToken],\n )}rem`;\n }\n};\n","import { CSSProperties, css } from \"styled-components\";\n\nimport {\n OakBorderRadiusToken,\n OakBorderWidthToken,\n} from \"@/styles/theme/borders\";\nimport { OakCombinedColorToken } from \"@/styles/theme/color\";\nimport { parseColor } from \"@/styles/helpers/parseColor\";\nimport { parseBorder } from \"@/styles/helpers/parseBorder\";\nimport { parseBorderRadius } from \"@/styles/helpers/parseBorderRadius\";\nimport {\n ResponsiveValues,\n responsiveStyle,\n} from \"@/styles/utils/responsiveStyle\";\n\ntype BorderWidth = ResponsiveValues<OakBorderWidthToken>;\ntype _BorderStyleProps = ResponsiveValues<CSSProperties[\"borderStyle\"]>;\ntype BorderColorProps = ResponsiveValues<OakCombinedColorToken>;\ntype BorderRadiusProps = ResponsiveValues<OakBorderRadiusToken>;\n\nexport type BorderStyleProps = {\n /**\n * Apply border on all sides\n *\n * Accepts a border-width token or a responsive array of border-width tokens\n */\n $ba?: BorderWidth;\n /**\n * Apply border to the top\n *\n * Accepts a border-width token or a responsive array of border-width tokens\n */\n $bt?: BorderWidth;\n /**\n * Apply border to the right\n *\n * Accepts a border-width token or a responsive array of border-width tokens\n */\n $br?: BorderWidth;\n /**\n * Apply border to the bottom\n *\n * Accepts a border-width token or a responsive array of border-width tokens\n */\n $bb?: BorderWidth;\n /**\n * Apply border to the left\n *\n * Accepts a border-width token or a responsive array of border-width tokens\n */\n $bl?: BorderWidth;\n /**\n * Apply border to the left and right\n *\n * Accepts a border-width token or a responsive array of border-width tokens\n */\n $bh?: BorderWidth;\n /**\n * Apply border to the top and bottom\n *\n * Accepts a border-width token or a responsive array of border-width tokens\n */\n $bv?: BorderWidth;\n /**\n * Apply `border-style` to the element\n *\n * Accepts a single value or a responsive array of values.\n */\n $borderStyle?: _BorderStyleProps;\n /**\n * Apply a border color to all sides of the element\n *\n * Accepts a color token or a responsive array of color tokens.\n */\n $borderColor?: BorderColorProps;\n $borderRadius?: BorderRadiusProps;\n /**\n * Apply border radius to the top left\n *\n * Accepts an `OakBorderRadiusToken` or a responsive array of `OakBorderRadiusToken`s.\n */\n $btlr?: BorderRadiusProps;\n /**\n * Apply border radius to the top right\n *\n * Accepts a border-radius token or a responsive array of border-radius tokens.\n */\n $btrr?: BorderRadiusProps;\n /**\n * Apply border radius to the bottom left\n *\n * Accepts a border-radius token or a responsive array of border-radius tokens.\n */\n $bblr?: BorderRadiusProps;\n /**\n * Apply border radius to the bottom right\n *\n * Accepts a border-radius token or a responsive array of border-radius tokens.\n */\n $bbrr?: BorderRadiusProps;\n /**\n * Apply border radius to the top right and top left\n *\n * Accepts a border-radius token or a responsive array of border-radius tokens.\n */\n $btr?: BorderRadiusProps;\n /**\n * Apply border radius to the bottom right and bottom left\n *\n * Accepts a border-radius token or a responsive array of border-radius tokens\n */\n $bbr?: BorderRadiusProps;\n};\n\nconst borderAll = css<{ $ba?: BorderWidth }>`\n ${responsiveStyle(\"border\", (props) => props.$ba, parseBorder)}\n`;\nconst borderTop = css<{ $bt?: BorderWidth }>`\n ${responsiveStyle(\"border-top\", (props) => props.$bt, parseBorder)}\n`;\nconst borderRight = css<{ $br?: BorderWidth }>`\n ${responsiveStyle(\"border-right\", (props) => props.$br, parseBorder)}\n`;\nconst borderBottom = css<{ $bb?: BorderWidth }>`\n ${responsiveStyle(\"border-bottom\", (props) => props.$bb, parseBorder)}\n`;\nconst borderLeft = css<{ $bl?: BorderWidth }>`\n ${responsiveStyle(\"border-left\", (props) => props.$bl, parseBorder)}\n`;\nconst borderHorizontal = css<{ $bh?: BorderWidth }>`\n ${responsiveStyle(\"border-left\", (props) => props.$bh, parseBorder)}\n ${responsiveStyle(\"border-right\", (props) => props.$bh, parseBorder)}\n`;\nconst borderVertical = css<{ $bv?: BorderWidth }>`\n ${responsiveStyle(\"border-top\", (props) => props.$bv, parseBorder)}\n ${responsiveStyle(\"border-bottom\", (props) => props.$bv, parseBorder)}\n`;\nconst borderColor = css<{ $borderColor?: BorderColorProps }>`\n ${responsiveStyle(\"border-color\", (props) => props.$borderColor, parseColor)}\n`;\nconst borderRadius = css<{ $borderRadius?: BorderRadiusProps }>`\n ${responsiveStyle(\n \"border-radius\",\n (props) => props.$borderRadius,\n parseBorderRadius,\n )}\n`;\nconst borderRadiusTopLeft = css<BorderStyleProps>`\n ${responsiveStyle(\n \"border-top-left-radius\",\n (props) => props.$btlr,\n parseBorderRadius,\n )}\n`;\nconst borderRadiusTopRight = css<BorderStyleProps>`\n ${responsiveStyle(\n \"border-top-right-radius\",\n (props) => props.$btrr,\n parseBorderRadius,\n )}\n`;\nconst borderRadiusBottomLeft = css<BorderStyleProps>`\n ${responsiveStyle(\n \"border-bottom-left-radius\",\n (props) => props.$bblr,\n parseBorderRadius,\n )}\n`;\nconst borderRadiusBottomRight = css<BorderStyleProps>`\n ${responsiveStyle(\n \"border-bottom-right-radius\",\n (props) => props.$bbrr,\n parseBorderRadius,\n )}\n`;\nconst borderRadiusTop = css<BorderStyleProps>`\n ${responsiveStyle(\n \"border-top-left-radius\",\n (props) => props.$btr,\n parseBorderRadius,\n )}\n ${responsiveStyle(\n \"border-top-right-radius\",\n (props) => props.$btr,\n parseBorderRadius,\n )}\n`;\nconst borderRadiusBottom = css<BorderStyleProps>`\n ${responsiveStyle(\n \"border-bottom-left-radius\",\n (props) => props.$bbr,\n parseBorderRadius,\n )}\n ${responsiveStyle(\n \"border-bottom-right-radius\",\n (props) => props.$bbr,\n parseBorderRadius,\n )}\n`;\nconst borderStrokeStyle = css<BorderStyleProps>`\n ${responsiveStyle(\"border-style\", (props) => props.$borderStyle)};\n`;\nexport const borderStyle = css<BorderStyleProps>`\n ${borderAll}\n ${borderTop}\n ${borderRight}\n ${borderBottom}\n ${borderLeft}\n ${borderHorizontal}\n ${borderVertical}\n ${borderColor}\n ${borderRadius}\n ${borderRadiusTopLeft}\n ${borderRadiusTopRight}\n ${borderRadiusBottomLeft}\n ${borderRadiusBottomRight}\n ${borderRadiusTop}\n ${borderRadiusBottom}\n ${borderStrokeStyle}\n`;\n","import { CSSProperties } from \"react\";\nimport { css } from \"styled-components\";\n\nimport {\n ResponsiveValues,\n responsiveStyle,\n} from \"@/styles/utils/responsiveStyle\";\n\nexport type DisplayStyleProps = {\n /**\n * Sets the `display` CSS property of the element.\n *\n * Accepts a `display` value or a responsive array of `display` values.\n */\n $display?: ResponsiveValues<CSSProperties[\"display\"]>;\n};\n\nexport const displayStyle = css<DisplayStyleProps>`\n ${responsiveStyle(\"display\", (props) => props.$display)}\n`;\n","export const oakDropShadowTokens = {\n \"drop-shadow-standard\": \"0 0.5rem 0.5rem rgba(92, 92, 92, 20%)\",\n \"drop-shadow-lemon\": `0.125rem 0.125rem 0 rgba(255, 229, 85, 100%)`,\n \"drop-shadow-wide-lemon\": `0.25rem 0.25rem 0 rgba(255, 229, 85, 100%)`,\n \"drop-shadow-centered-lemon\": `0 0 0 0.125rem rgba(255, 229, 85, 100%)`,\n \"drop-shadow-grey\": \"0.25rem 0.25rem 0 rgba(87, 87, 87, 100%)\",\n \"drop-shadow-centered-grey\": \"0 0 0 0.3rem rgba(87, 87, 87, 100%)\",\n};\n\nexport type OakDropShadowToken = keyof typeof oakDropShadowTokens;\n","import {\n OakDropShadowToken,\n oakDropShadowTokens,\n} from \"@/styles/theme/dropShadow\";\n\nexport const parseDropShadow = (variant?: OakDropShadowToken | null) => {\n if (variant === null) {\n return \"none\";\n }\n\n if (!variant) {\n return;\n }\n\n if (variant in oakDropShadowTokens) {\n return oakDropShadowTokens[variant as OakDropShadowToken];\n }\n};\n","import { css } from \"styled-components\";\n\nimport { OakDropShadowToken } from \"@/styles/theme/dropShadow\";\nimport { parseDropShadow } from \"@/styles/helpers/parseDropShadow\";\nimport {\n ResponsiveValues,\n responsiveStyle,\n} from \"@/styles/utils/responsiveStyle\";\n\nexport type DropShadowStyleProps = {\n /**\n * Applies a drop-shadow to the element.\n *\n * Accepts a drop-shadow token or a responsive array of drop-shadow tokens.\n */\n $dropShadow?: ResponsiveValues<OakDropShadowToken>;\n};\n\nexport const dropShadowStyle = css<DropShadowStyleProps>`\n ${responsiveStyle(\n \"box-shadow\",\n (props) => props.$dropShadow,\n parseDropShadow,\n )}\n`;\n","export const oakOpacityTokens = {\n transparent: 0,\n \"semi-transparent\": 0.25,\n \"semi-opaque\": 0.5,\n opaque: 1,\n};\n\nexport type OakOpacityToken = keyof typeof oakOpacityTokens;\n","import { OakOpacityToken, oakOpacityTokens } from \"@/styles/theme/opacity\";\n\nexport const parseOpacity = (variant?: OakOpacityToken | null) => {\n if (!variant) {\n return;\n }\n\n if (variant in oakOpacityTokens) {\n return oakOpacityTokens[variant as OakOpacityToken];\n }\n};\n","import { css } from \"styled-components\";\n\nimport { OakOpacityToken } from \"@/styles/theme/opacity\";\nimport { parseOpacity } from \"@/styles/helpers/parseOpacity\";\nimport {\n ResponsiveValues,\n responsiveStyle,\n} from \"@/styles/utils/responsiveStyle\";\n\nexport type OpacityStyleProps = {\n /**\n * Sets the `opacity` CSS property of the element.\n *\n * Accepts an opacity token or a responsive array of opacity tokens.\n */\n $opacity?: ResponsiveValues<OakOpacityToken>;\n};\n\nexport const opacityStyle = css<OpacityStyleProps>`\n ${responsiveStyle(\"opacity\", (props) => props.$opacity, parseOpacity)}\n`;\n","import { CSSProperties, css } from \"styled-components\";\n\nimport {\n ResponsiveValues,\n responsiveStyle,\n} from \"@/styles/utils/responsiveStyle\";\n\nexport type TransformStyleProps = {\n /**\n * Sets the `transform` CSS property of the element.\n *\n * Accepts a `transform` value or a responsive array of `transform` values. Can be nulled.\n */\n $transform?: ResponsiveValues<CSSProperties[\"transform\"] | null>;\n /**\n * Sets the `transform-origin` CSS property of the element.\n *\n * Accepts a `transform-origin` value or a responsive array of `transform-origin` values. Can be nulled.\n */\n $transformOrigin?: ResponsiveValues<CSSProperties[\"transformOrigin\"] | null>;\n};\n\nexport const transformStyle = css<TransformStyleProps>`\n ${responsiveStyle(\"transform\", (props) => props.$transform)}\n ${responsiveStyle(\"transform-origin\", (props) => props.$transformOrigin)}\n`;\n","export const oakTransitionTokens = {\n \"standard-ease\": \"all 0.3s ease\",\n \"standard-transform\": \"rotate(-2deg) translateY(-16px) translateX(8px)\",\n};\n\nexport type OakTransitionToken = keyof typeof oakTransitionTokens;\n","import { css } from \"styled-components\";\n\nimport { OakTransitionToken } from \"@/styles/theme/transitions\";\nimport { parseTransitions } from \"@/styles/helpers/parseTransitions\";\nimport {\n ResponsiveValues,\n responsiveStyle,\n} from \"@/styles/utils/responsiveStyle\";\n\ntype Transition = OakTransitionToken;\n\nexport type TransitionStyleProps = {\n /**\n * Sets the `transition` CSS property of the element.\n *\n * Accepts a transition token or a responsive array of transition tokens.\n */\n $transition?: ResponsiveValues<Transition>;\n};\n\nexport const transitionStyle = css<TransitionStyleProps>`\n ${responsiveStyle(\n \"transition\",\n (props) => props.$transition,\n parseTransitions,\n )}\n`;\n","import {\n OakTransitionToken,\n oakTransitionTokens,\n} from \"@/styles/theme/transitions\";\n\nexport const parseTransitions = (variant?: OakTransitionToken | null) => {\n if (!variant) {\n return;\n }\n\n if (variant in oakTransitionTokens) {\n return oakTransitionTokens[variant as OakTransitionToken];\n }\n};\n","export const oakFontSizeTokens = {\n \"font-size-1\": 12,\n \"font-size-2\": 14,\n \"font-size-3\": 16,\n \"font-size-4\": 18,\n \"font-size-5\": 20,\n \"font-size-6\": 24,\n \"font-size-7\": 32,\n \"font-size-8\": 40,\n \"font-size-9\": 48,\n \"font-size-10\": 56,\n};\nexport type OakFontSizeToken = keyof typeof oakFontSizeTokens;\n\nconst fontWeights = [300, 400, 600, 700] as const;\ntype FontWeight = (typeof fontWeights)[number];\nconst lineHeights = [16, 20, 24, 28, 32, 40, 48, 56, 64] as const;\ntype LineHeight = (typeof lineHeights)[number];\nconst letterSpacings = [\"0.0115rem\", \"-0.005rem\"] as const;\ntype LetterSpacing = (typeof letterSpacings)[number];\n\ntype FontParameters = readonly [\n OakFontSizeToken,\n LineHeight,\n FontWeight,\n LetterSpacing,\n];\n\nexport const oakFontTokens = {\n \"heading-1\": [\"font-size-10\", 64, 600, \"0.0115rem\"],\n \"heading-2\": [\"font-size-9\", 56, 600, \"0.0115rem\"],\n \"heading-3\": [\"font-size-8\", 48, 600, \"0.0115rem\"],\n \"heading-4\": [\"font-size-7\", 40, 600, \"0.0115rem\"],\n \"heading-5\": [\"font-size-6\", 32, 600, \"0.0115rem\"],\n \"heading-6\": [\"font-size-5\", 24, 600, \"0.0115rem\"],\n \"heading-7\": [\"font-size-3\", 20, 600, \"0.0115rem\"],\n \"heading-light-1\": [\"font-size-10\", 64, 400, \"0.0115rem\"],\n \"heading-light-2\": [\"font-size-9\", 56, 400, \"0.0115rem\"],\n \"heading-light-3\": [\"font-size-8\", 48, 400, \"0.0115rem\"],\n \"heading-light-4\": [\"font-size-7\", 40, 400, \"0.0115rem\"],\n \"heading-light-5\": [\"font-size-6\", 32, 400, \"0.0115rem\"],\n \"heading-light-6\": [\"font-size-5\", 24, 400, \"0.0115rem\"],\n \"heading-light-7\": [\"font-size-3\", 20, 400, \"0.0115rem\"],\n \"body-1\": [\"font-size-4\", 28, 300, \"-0.005rem\"],\n \"body-2\": [\"font-size-3\", 24, 300, \"-0.005rem\"],\n \"body-3\": [\"font-size-2\", 20, 300, \"-0.005rem\"],\n \"body-4\": [\"font-size-1\", 16, 300, \"-0.005rem\"],\n \"body-1-bold\": [\"font-size-4\", 28, 700, \"-0.005rem\"],\n \"body-2-bold\": [\"font-size-3\", 24, 700, \"-0.005rem\"],\n \"body-3-bold\": [\"font-size-2\", 20, 700, \"-0.005rem\"],\n \"list-item-1\": [\"font-size-4\", 32, 300, \"-0.005rem\"],\n \"list-item-2\": [\"font-size-3\", 24, 300, \"-0.005rem\"],\n} satisfies Record<string, FontParameters>;\n\nexport type OakFontToken = keyof typeof oakFontTokens;\n\nexport const oakTextDecorations = [\n \"underline\",\n \"overline\",\n \"line-through\",\n \"none\",\n] as const;\n\nexport const oakWhiteSpaces = [\n \"normal\",\n \"nowrap\",\n \"pre\",\n \"pre-wrap\",\n \"pre-line\",\n \"break-spaces\",\n] as const;\n\nexport const oakWordWraps = [\n \"normal\",\n \"break-word\",\n \"initial\",\n \"inherit\",\n] as const;\n\nexport const oakTextOverflows = [\"clip\", \"ellipsis\"] as const;\n\nexport type OakTextDecoration = (typeof oakTextDecorations)[number];\nexport type OakWhiteSpace = (typeof oakWhiteSpaces)[number];\nexport type OakWordWrap = (typeof oakWordWraps)[number];\nexport type OakTextOverflow = (typeof oakTextOverflows)[number];\n","import { CSSProperties, css } from \"styled-components\";\n\nimport {\n OakFontToken,\n OakTextDecoration,\n OakTextOverflow,\n OakWhiteSpace,\n OakWordWrap,\n} from \"@/styles/theme/typography\";\nimport {\n parseFontSize,\n parseFontWeight,\n parseLetterSpacing,\n parseLineHeight,\n} from \"@/styles/helpers/parseTypography\";\nimport {\n ResponsiveValues,\n responsiveStyle,\n} from \"@/styles/utils/responsiveStyle\";\n\nexport type TypographyStyleProps = {\n /**\n * Sets the `font-size`, `line-height`, `font-weight` and `letter-spacing` of the element.\n *\n * Accepts a font token or a responsive array of font tokens.\n */\n $font?: ResponsiveValues<OakFontToken>;\n /**\n * Sets the `text-decoration` CSS property of the element.\n *\n * Accepts a text-decoration token or a responsive array of text-decoration tokens.\n */\n $textDecoration?: ResponsiveValues<OakTextDecoration>;\n /**\n * Sets the `text-align` CSS property of the element.\n *\n * Accepts a `text-align` value or a responsive array of `text-align` values.\n */\n $textAlign?: ResponsiveValues<CSSProperties[\"textAlign\"]>;\n /**\n * Sets the `white-space` CSS property of the element.\n *\n * Accepts a white-space token or a responsive array of white-space tokens.\n */\n $whiteSpace?: ResponsiveValues<OakWhiteSpace>;\n /**\n * Sets the `word-wrap` CSS property of the element.\n *\n * Accepts a word-wrap token or a responsive array of word-wrap tokens.\n */\n $wordWrap?: ResponsiveValues<OakWordWrap>;\n /**\n * Sets the `text-overflow` CSS property of the element.\n *\n * Accepts a text-overflow token or a responsive array of text-overflow tokens.\n */\n $textOverflow?: ResponsiveValues<OakTextOverflow>;\n};\n\nexport const typographyStyle = css<TypographyStyleProps>`\n font-family: Lexend, sans-serif;\n ${responsiveStyle(\"font-weight\", (props) => props.$font, parseFontWeight)}\n ${responsiveStyle(\"font-size\", (props) => props.$font, parseFontSize)}\n ${responsiveStyle(\"line-height\", (props) => props.$font, parseLineHeight)}\n ${responsiveStyle(\n \"letter-spacing\",\n (props) => props.$font,\n parseLetterSpacing,\n )}\n ${responsiveStyle(\"text-align\", (props) => props.$textAlign)}\n ${responsiveStyle(\"text-decoration\", (props) => props.$textDecoration)}\n ${responsiveStyle(\"white-space\", (props) => props.$whiteSpace)}\n ${responsiveStyle(\"word-wrap\", (props) => props.$wordWrap)}\n ${responsiveStyle(\"text-overflow\", (props) => props.$textOverflow)}\n`;\n","import {\n OakFontToken,\n oakFontSizeTokens,\n oakFontTokens,\n} from \"@/styles/theme/typography\";\nimport pxToRem from \"@/styles/helpers/pxToRem\";\n\nexport const parseFontWeight = (font?: OakFontToken | null) => {\n if (!font) return;\n return oakFontTokens[font]?.[2];\n};\n\nexport const parseFontSize = (\n font?: OakFontToken | null,\n): string | null | undefined => {\n if (!font) return;\n const fontSize = oakFontTokens[font]?.[0];\n if (!fontSize) return;\n const fontSizePx = oakFontSizeTokens[fontSize];\n return `${pxToRem(fontSizePx)}rem`;\n};\nexport const parseLineHeight = (\n font?: OakFontToken | null,\n): string | null | undefined => {\n if (!font) return;\n const lineHeight = oakFontTokens[font]?.[1];\n if (!lineHeight) return;\n return `${pxToRem(lineHeight)}rem`;\n};\nexport const parseLetterSpacing = (font?: OakFontToken | null) => {\n if (!font) return;\n return oakFontTokens[font]?.[3];\n};\n","export const oakZIndexTokens = {\n behind: -1,\n neutral: 0,\n \"in-front\": 1,\n \"mobile-filters\": 2,\n \"fixed-header\": 100,\n \"modal-close-button\": 150,\n \"modal-dialog\": 300,\n} as const;\n\nexport type OakZIndexToken = keyof typeof oakZIndexTokens | null;\n","import { css } from \"styled-components\";\n\nimport {\n ResponsiveValues,\n responsiveStyle,\n} from \"@/styles/utils/responsiveStyle\";\nimport { OakZIndexToken } from \"@/styles/theme/zIndex\";\nimport { parseZIndex } from \"@/styles/helpers/parseZIndex\";\n\nexport type ZIndexStyleProps = {\n /**\n * Sets the `z-index` CSS property of the element.\n *\n * Accepts a z-index token or a responsive array of z-index tokens.\n */\n $zIndex?: ResponsiveValues<OakZIndexToken>;\n};\n\nexport const zIndexStyle = css<ZIndexStyleProps>`\n ${responsiveStyle(\"z-index\", (props) => props.$zIndex, parseZIndex)}\n`;\n","import { OakZIndexToken, oakZIndexTokens } from \"@/styles/theme/zIndex\";\n\nexport const parseZIndex = (value?: OakZIndexToken) => {\n if (value === undefined || value === null) {\n return undefined;\n }\n return oakZIndexTokens[value];\n};\n","import { MouseEventHandler } from \"react\";\nimport styled, { css } from \"styled-components\";\n\n/**\n * OakBox exposes all the styles that are available styles on a div element.\n */\n\nimport { colorStyle, ColorStyleProps } from \"@/styles/utils/colorStyle\";\nimport {\n positionStyle,\n PositionStyleProps,\n} from \"@/styles/utils/positionStyle\";\nimport { sizeStyle, SizeStyleProps } from \"@/styles/utils/sizeStyle\";\nimport { spacingStyle, SpacingStyleProps } from \"@/styles/utils/spacingStyle\";\nimport { borderStyle, BorderStyleProps } from \"@/styles/utils/borderStyle\";\nimport { displayStyle, DisplayStyleProps } from \"@/styles/utils/displayStyle\";\nimport {\n dropShadowStyle,\n DropShadowStyleProps,\n} from \"@/styles/utils/dropShadowStyle\";\nimport { opacityStyle, OpacityStyleProps } from \"@/styles/utils/opacityStyle\";\nimport {\n transformStyle,\n TransformStyleProps,\n} from \"@/styles/utils/transformStyle\";\nimport {\n transitionStyle,\n TransitionStyleProps,\n} from \"@/styles/utils/transitionStyle\";\nimport {\n typographyStyle,\n TypographyStyleProps,\n} from \"@/styles/utils/typographyStyle\";\nimport { zIndexStyle, ZIndexStyleProps } from \"@/styles/utils/zIndexStyle\";\n\n// TODO: these are not yet implemented\n// import cover, { CoverProps } from \"@/styles/utils/coverStyle\";\n// import customScrollbar from \"@/styles/utils/customScrollbarStyle\";\n\ntype HTMLProps = {\n onClick?: MouseEventHandler;\n};\n\nexport type OakBoxProps = {\n children?: React.ReactNode;\n} & PositionStyleProps &\n SizeStyleProps &\n SpacingStyleProps &\n ColorStyleProps &\n BorderStyleProps &\n DisplayStyleProps &\n DropShadowStyleProps &\n OpacityStyleProps &\n TransformStyleProps &\n TransitionStyleProps &\n TypographyStyleProps &\n ZIndexStyleProps &\n HTMLProps;\n\nexport const oakBoxCss = css<OakBoxProps>`\n ${positionStyle}\n ${sizeStyle}\n ${spacingStyle}\n ${colorStyle}\n ${borderStyle}\n ${displayStyle}\n ${dropShadowStyle}\n ${opacityStyle}\n ${transformStyle}\n ${transitionStyle}\n ${typographyStyle}\n ${zIndexStyle}\n ${(props) =>\n /* onClick might be passed in the useClickableCard pattern */\n props.onClick &&\n css`\n :hover {\n cursor: pointer;\n }\n `}\n`;\n\n/**\n * OakBox exposes all the styles that are available styles on a div tag. These include:\n * - color\n * - size\n * - display\n * - spacing\n * - position\n * - border\n * - opacity\n * - z-index\n * - typography\n * - transition\n * - transform\n * - drop-shadow\n *\n */\nexport const OakBox = styled.div<OakBoxProps>`\n ${oakBoxCss}\n`;\n","import { CSSProperties } from \"react\";\nimport { css } from \"styled-components\";\n\nimport type { DisplayStyleProps } from \"./displayStyle\";\n\nimport {\n responsiveStyle,\n ResponsiveValues,\n} from \"@/styles/utils/responsiveStyle\";\nimport {\n OakAllSpacingToken,\n OakCombinedSpacingToken,\n OakSpaceBetweenToken,\n} from \"@/styles/theme/spacing\";\nimport { parseSpacing } from \"@/styles/helpers/parseSpacing\";\n\nexport type FlexStyleProps = DisplayStyleProps & {\n /**\n * Sets the `flex-direction` CSS property of the element.\n *\n * Accepts a `flex-direction` value or a responsive array of flex-direction values.\n */\n $flexDirection?: ResponsiveValues<CSSProperties[\"flexDirection\"]>;\n /**\n * Sets the `flex-wrap` CSS property of the element.\n *\n * Accepts a `flex-wrap` value or a responsive array of flex-wrap values.\n */\n $flexWrap?: ResponsiveValues<CSSProperties[\"flexWrap\"]>;\n /**\n * Sets the `align-items` CSS property of the element.\n *\n * Accepts an `align-items` value or a responsive array of `align-items` values.\n */\n $alignItems?: ResponsiveValues<CSSProperties[\"alignItems\"]>;\n /**\n * Sets the `align-content` CSS property of the element.\n *\n * Accepts an `align-content` value or a responsive array of `align-content` values.\n */\n $alignContent?: ResponsiveValues<CSSProperties[\"alignContent\"]>;\n /**\n * Sets the `justify-content` CSS property of the element.\n *\n * Accepts a `justify-content` value or a responsive array of `justify-content` values.\n */\n $justifyContent?: ResponsiveValues<CSSProperties[\"justifyContent\"]>;\n /**\n * Sets the `align-self` CSS property of the element.\n *\n * Accepts an `align-self` value or a responsive array of `align-self` values.\n */\n $alignSelf?: ResponsiveValues<CSSProperties[\"alignSelf\"]>;\n /**\n * Sets the `flex-grow` CSS property of the element.\n *\n * Accepts a `flex-grow` value or a responsive array of `flex-grow` values.\n */\n $flexGrow?: ResponsiveValues<CSSProperties[\"flexGrow\"]>;\n /**\n * Sets the `flex-shrink` CSS property of the element.\n *\n * Accepts a `flex-shrink` value or a responsive array of `flex-shrink` values.\n */\n $flexShrink?: ResponsiveValues<CSSProperties[\"flexShrink\"]>;\n /**\n * Sets the `order` CSS property of the element.\n *\n * Accepts an `order` value or a responsive array of `order` values.\n */\n $order?: ResponsiveValues<CSSProperties[\"order\"]>;\n /**\n * Sets the `flex-basis` CSS property of the element.\n *\n * Accepts a spacing token or a responsive array of spacing tokens. Can be nulled.\n */\n $flexBasis?: ResponsiveValues<OakCombinedSpacingToken | null | undefined>;\n /**\n * Sets the `gap` CSS property of the element.\n *\n * Accepts a spacing token or a responsive array of spacing tokens. Can be nulled.\n */\n $gap?: ResponsiveValues<\n OakAllSpacingToken | OakSpaceBetweenToken | null | undefined\n >;\n /**\n * Sets the `column-gap` CSS property of the element.\n *\n * Accepts a spacing token or a responsive array of spacing tokens. Can be nulled.\n */\n $columnGap?: ResponsiveValues<\n OakAllSpacingToken | OakSpaceBetweenToken | null | undefined\n >;\n /**\n * Sets the `row-gap` CSS property of the element.\n *\n * Accepts a spacing token or a responsive array of spacing tokens. Can be nulled.\n */\n $rowGap?: ResponsiveValues<\n OakAllSpacingToken | OakSpaceBetweenToken | null | undefined\n >;\n};\n\nexport const flexStyle = css<FlexStyleProps>`\n ${responsiveStyle(\"display\", (props) => props.$display ?? \"flex\")}\n ${responsiveStyle(\"flex-direction\", (props) => props.$flexDirection)}\n ${responsiveStyle(\"flex-wrap\", (props) => props.$flexWrap)}\n ${responsiveStyle(\"align-items\", (props) => props.$alignItems)}\n ${responsiveStyle(\"align-content\", (props) => props.$alignContent)}\n ${responsiveStyle(\"justify-content\", (props) => props.$justifyContent)}\n ${responsiveStyle(\"align-self\", (props) => props.$alignSelf)}\n ${responsiveStyle(\"order\", (props) => props.$order)}\n ${responsiveStyle(\"flex-grow\", (props) => props.$flexGrow)}\n ${responsiveStyle(\"flex-shrink\", (props) => props.$flexShrink)}\n ${responsiveStyle(\"flex-basis\", (props) => props.$flexBasis, parseSpacing)}\n ${responsiveStyle(\"gap\", (props) => props.$gap, parseSpacing)}\n ${responsiveStyle(\"column-gap\", (props) => props.$columnGap, parseSpacing)}\n ${responsiveStyle(\"row-gap\", (props) => props.$rowGap, parseSpacing)}\n`;\n","import styled from \"styled-components\";\n\nimport { OakBox, OakBoxProps } from \"@/components/atoms/OakBox\";\nimport { flexStyle, FlexStyleProps } from \"@/styles/utils/flexStyle\";\n\nexport type OakFlexProps = FlexStyleProps & OakBoxProps;\n\n/**\n * Flex sets `display: flex;` and exposes various flex props, along with Box\n * props.\n *\n * ## Usage\n * Before adding props to this component, think about whether it makes sense\n * to add it to Box instead, as this component extends that.\n */\nconst OakFlex = styled(OakBox)<OakFlexProps>`\n ${flexStyle}\n`;\n\nexport { OakFlex };\n","import styled from \"styled-components\";\n\nimport { colorStyle, ColorStyleProps } from \"@/styles/utils/colorStyle\";\nimport { opacityStyle, OpacityStyleProps } from \"@/styles/utils/opacityStyle\";\nimport {\n marginStyle,\n MarginStyleProps,\n paddingStyle,\n PaddingStyleProps,\n} from \"@/styles/utils/spacingStyle\";\nimport {\n typographyStyle,\n TypographyStyleProps,\n} from \"@/styles/utils/typographyStyle\";\nimport { borderStyle, BorderStyleProps } from \"@/styles/utils/borderStyle\";\n\nexport type OakSpanProps = ColorStyleProps &\n OpacityStyleProps &\n MarginStyleProps &\n PaddingStyleProps &\n BorderStyleProps &\n TypographyStyleProps;\n\n/**\n * Span renders a `span` (inline text) component, exposing all the typography props.\n * ## Usage\n * Use this component when you want to apply styles to a piece of inline text.\n */\nexport const OakSpan = styled.span<OakSpanProps>`\n ${colorStyle}\n ${opacityStyle}\n ${marginStyle}\n ${paddingStyle}\n ${borderStyle}\n ${typographyStyle}\n`;\n","import styled from \"styled-components\";\n\nimport { OakBoxProps, oakBoxCss } from \"../OakBox\";\n\n/**\n *\n * Inherit everything from OakBox, but change the element to a form.\n *\n * @deprecated Use `<OakBox as=\"form\">` instead\n */\nexport const OakForm = styled.form<OakBoxProps>`\n ${oakBoxCss}\n`;\n\nexport type OakFormProps = OakBoxProps;\n","import {\n OakColorFilterToken,\n OakUiRoleToken,\n oakColorFilterTokens,\n oakUiRoleTokens,\n} from \"@/styles/theme/color\";\nimport { OakCombinedColorToken } from \"@/styles/theme\";\nimport { PropsWithTheme } from \"@/styles/theme/theme\";\n\nfunction parseColorFilter(\n value?: OakCombinedColorToken | null,\n): (props: PropsWithTheme) => string;\nfunction parseColorFilter(\n value?: OakCombinedColorToken | null,\n): ((props: PropsWithTheme) => string) | undefined;\nfunction parseColorFilter(value?: OakCombinedColorToken | null) {\n if (value === undefined || value === null) {\n return undefined;\n }\n if (value in oakColorFilterTokens) {\n return oakColorFilterTokens[value as OakColorFilterToken];\n }\n\n if (oakUiRoleTokens.includes(value as OakUiRoleToken)) {\n return ({ theme }: PropsWithTheme) => {\n const c = theme.uiColors[value as OakUiRoleToken];\n if (c && c in oakColorFilterTokens) {\n return oakColorFilterTokens[c as OakColorFilterToken];\n }\n return undefined;\n };\n }\n}\n\nexport { parseColorFilter };\n","import { css } from \"styled-components\";\n\nimport { parseColorFilter } from \"@/styles/helpers/parseColorFilter\";\nimport {\n responsiveStyle,\n ResponsiveValues,\n} from \"@/styles/utils/responsiveStyle\";\nimport { OakCombinedColorToken } from \"@/styles/theme/color\";\n\ntype ColorFilterToken = ResponsiveValues<OakCombinedColorToken | null>;\n\nexport type ColorFilterStyleProps = {\n /**\n * Applies a color-filter to the element.\n *\n * Accepts a color filter token or a responsive array of color tokens.\n */\n $colorFilter?: ColorFilterToken;\n};\nexport const colorFilterStyle = css<ColorFilterStyleProps>`\n ${responsiveStyle<ColorFilterStyleProps, OakCombinedColorToken>(\n \"filter\",\n (props) => props.$colorFilter,\n parseColorFilter,\n )}\n`;\n","import React, {\n ComponentPropsWithoutRef,\n ElementType,\n MouseEventHandler,\n} from \"react\";\nimport Image, { ImageProps } from \"next/image\";\nimport styled, { css } from \"styled-components\";\n\nimport { useShowPlaceholder } from \"./useShowPlaceholder\";\n\nimport {\n ColorFilterStyleProps,\n colorFilterStyle,\n} from \"@/styles/utils/colorFilterStyle\";\nimport { OakBox, OakBoxProps } from \"@/components/atoms/OakBox\";\nimport { parseColor } from \"@/styles/helpers/parseColor\";\nimport { parseSpacing } from \"@/styles/helpers/parseSpacing\";\n\ntype HTMLProps = {\n onClick?: MouseEventHandler;\n};\n\nexport type OakImageProps<C extends ElementType = typeof Image> = Omit<\n ImageProps,\n \"placeholder\"\n> &\n OakBoxProps &\n ColorFilterStyleProps &\n HTMLProps & {\n as?: C;\n /**\n * The placeholder to use while the image is loading\n *\n * Defaults to `oak` which is a placeholder containing the Oak logo\n * also accepts the same options as next/image */\n placeholder?: ImageProps[\"placeholder\"] | \"oak\";\n /**\n * Additional props forwarded to the underlying `Image` component `as`\n */\n imageProps?: Partial<ComponentPropsWithoutRef<C>>;\n };\n\ntype StyledImageProps = Omit<OakImageProps, \"as\"> & {\n $showOakPlaceholder: boolean;\n};\n\nconst oakPlaceholder =\n \"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGZpbGw9Im5vbmUiIHZpZXdCb3g9IjAgMCA2NCA2NCI+PHBhdGggZmlsbD0iIzIyMiIgZD0iTTI4Ljc3OSAxOS4xNzZhMjcuMTkxIDI3LjE5MSAwIDAgMC0zLjggMS42IDE2LjcgMTYuNyAwIDAgMC03LjEgOC40YzAgLjEtLjEuMi0uMS4zLS43IDIuNC0uNiAyIDEuMyAyLjMgMS45LjMgMSAuNSAxIDEuMy0uMSA4LjggNC4xIDE1LjEgMTEuNCAxOS42YTEuNSAxLjUgMCAwIDAgMS43LjJjNS43LTIuNiA5LjMtNyAxMC4zLTEzLjJhMSAxIDAgMCAxIDEtMWwzLS4yYy44IDAgMS4zLjIgMS4yIDEuMmExNy45IDE3LjkgMCAwIDEtMy4yIDkuMiAyMy43IDIzLjcgMCAwIDEtMTAuOSA5LjEgNS40MDEgNS40MDEgMCAwIDEtNC41LS4yIDI2LjI5OCAyNi4yOTggMCAwIDEtOC41LTYuNiAyNS45IDI1LjkgMCAwIDEtNi40LTE0LjRjMC0uNi0uMi0uNy0uOC0uOC0yLjUtLjQtMi41LS4xLTIuMy0yLjlhMTkuMyAxOS4zIDAgMCAxIDEwLjgtMTYuNiAzOC45OTkgMzguOTk5IDAgMCAxIDUuNy0yLjEgMi4xIDIuMSAwIDAgMCAuOS0xLjMgMTQuMSAxNC4xIDAgMCAxIDMuNS02LjNsLjMtLjNjMS45LTIgMi42LTIgNC4zLjJsLjQuNWMxLjEgMS4xIDEgMS41LS4xIDIuNmExMS45IDExLjkgMCAwIDAtMy4yIDQuNCAxNi45IDE2LjkgMCAwIDEgNy41IDIuM2M1LjcgMy41IDkuMiA4LjMgOS45IDE1IC4wMTYuOTAxLS4wMTcgMS44MDItLjEgMi43IDAgLjgtLjYgMS0xLjIgMS4yYTE2LjEgMTYuMSAwIDAgMS0xMS0uNyAxNy45MDEgMTcuOTAxIDAgMCAxLTEwLjktMTMuNiA5Ljc5NiA5Ljc5NiAwIDAgMS0uMS0xLjlabTE4LjEgMTIuMmMuNC01LjUtNi45LTEyLjYtMTMtMTIuMS41IDYuNSA3LjYgMTIuOCAxMyAxMi4xWiIgb3BhY2l0eT0iLjEiLz48L3N2Zz4=\";\n\nconst clickStyles = css<{ onClick?: MouseEventHandler }>`\n ${(props) =>\n /* onClick might be passed in the useClickableCard pattern */\n props.onClick &&\n css`\n :hover {\n cursor: pointer;\n }\n `}\n`;\n\nconst placeholderStyles = css<StyledImageProps>`\n ${(props) =>\n props.$showOakPlaceholder &&\n css`\n background-image: url(${oakPlaceholder});\n background-color: ${parseColor(\"bg-decorative2-very-subdued\")};\n background-size: ${parseSpacing(\"all-spacing-11\")};\n background-position: center;\n background-repeat: no-repeat;\n `}\n`;\n\nconst StyledFillImage = styled(Image)<StyledImageProps>`\n ${colorFilterStyle}\n ${clickStyles}\n ${placeholderStyles}\n object-fit: contain;\n`;\n\nconst StyledResponsiveImage = styled(Image)<StyledImageProps>`\n ${colorFilterStyle}\n ${clickStyles}\n ${placeholderStyles}\n width: 100%;\n height: auto;\n`;\n\n/**\n * A wrapper for NextJs's Image component.\n *\n * Use this for all image types as well as icons.\n * Can accept remote urls provided they are whitelisted in next.config.js and relative urls for local images provided they begin with a \"/\".\n * Set the width and height of the image through the `$width` and `$height` props when the aspect ratio is not known. This will letterbox the image to avoid stretching.\n * Alternatively pass `width` and `height` props when the aspect ratio is known and use $minWidth to set the rendered width, avoiding letter-boxing.\n * NB. for letterboxed images, $background controls the color of the letterbox not the image.\n * `positionStyle` and `spacingStyle` props are also exposed for container.\n * sizes is exposed for further optimisation read Next docs for more info.\n *\n */\nexport const OakImage = <C extends ElementType = typeof Image>({\n ...props\n}: OakImageProps<C>) => {\n const {\n as,\n src,\n alt,\n width,\n height,\n sizes,\n $width = \"100%\",\n $position = \"relative\",\n $colorFilter,\n placeholder = \"oak\",\n unoptimized,\n imageProps,\n onLoad,\n onError,\n ...rest\n } = props;\n const finalPlaceholder = placeholder === \"oak\" ? undefined : placeholder;\n const { showPlaceholder, handleComplete, setImg } = useShowPlaceholder();\n\n // We don't know the aspect ratio of the image, so we must use fill and letterbox it to avoid stretching\n // Use $width and $height to set the width and height of the image container\n if (!width || !height) {\n return (\n <OakBox $position={$position} $width={$width} {...rest}>\n <StyledFillImage\n ref={setImg}\n as={as ?? Image}\n src={src}\n alt={alt}\n sizes={sizes}\n fill\n $colorFilter={$colorFilter}\n placeholder={finalPlaceholder}\n $showOakPlaceholder={placeholder === \"oak\" && showPlaceholder}\n unoptimized={unoptimized}\n onLoad={handleComplete(onLoad)}\n onError={handleComplete(onError)}\n {...imageProps}\n />\n </OakBox>\n );\n }\n\n // When we know the aspect ratio, we can use Image's repsonsive layout\n // Use $minWidth to set the width with auto height\n\n return (\n <OakBox $maxWidth={\"all-spacing-0\"} $position={$position} {...rest}>\n <StyledResponsiveImage\n ref={setImg}\n as={as ?? Image}\n src={src}\n alt={alt}\n width={width}\n height={height}\n sizes={sizes}\n unoptimized={unoptimized}\n $colorFilter={$colorFilter}\n placeholder={finalPlaceholder}\n $showOakPlaceholder={placeholder === \"oak\" && showPlaceholder}\n onLoad={handleComplete(onLoad)}\n onError={handleComplete(onError)}\n {...imageProps}\n />\n </OakBox>\n );\n};\n","import { ReactEventHandler, useCallback, useState } from \"react\";\n\nexport function useShowPlaceholder() {\n // Default to false so that we don't show the placeholder if the image is already complete\n const [showPlaceholder, setShowPlaceholder] = useState(false);\n const setImg = useCallback((img: HTMLImageElement | null) => {\n // the `load` or `error` event may never be called if the image is coming from the cache\n // so we need to check the `complete` property as well as listen to the `onLoad` and `onError` events\n img && setShowPlaceholder(!img.complete);\n }, []);\n\n return {\n showPlaceholder,\n setImg,\n /**\n * Wraps the `onLoad` and `onError` events to set the placeholder state\n */\n handleComplete(\n originalHandler?: ReactEventHandler<HTMLImageElement>,\n ): ReactEventHandler<HTMLImageElement> {\n return (event) => {\n if (originalHandler) {\n originalHandler(event);\n }\n setShowPlaceholder(false);\n };\n },\n };\n}\n","import styled from \"styled-components\";\n\nimport {\n typographyStyle,\n TypographyStyleProps,\n} from \"@/styles/utils/typographyStyle\";\nimport { OakBox, OakBoxProps } from \"@/components/atoms/OakBox\";\n\nexport type OakTypographyProps = OakBoxProps & TypographyStyleProps;\n\n/**\n * The Typography component sets a typography style context from which children\n * inherit style properties through the cascade.\n * ## Usage\n * This should be the primary component to set a typography context.\n * Use this component whenever you want to style blocks of 'body' text.\n */\nexport const OakTypography = styled(OakBox)<OakTypographyProps>`\n ${typographyStyle}\n`;\n","import React, { FC } from \"react\";\nimport styled from \"styled-components\";\n\nimport { ColorStyleProps, colorStyle } from \"@/styles/utils/colorStyle\";\nimport { MarginStyleProps, marginStyle } from \"@/styles/utils/spacingStyle\";\nimport { OpacityStyleProps, opacityStyle } from \"@/styles/utils/opacityStyle\";\nimport {\n TypographyStyleProps,\n typographyStyle,\n} from \"@/styles/utils/typographyStyle\";\n\nexport const oakHeadingTags = [\n \"div\",\n \"h1\",\n \"h2\",\n \"h3\",\n \"h4\",\n \"h5\",\n \"h6\",\n] as const;\n\nexport type OakHeadingTag = (typeof oakHeadingTags)[number];\n\ntype OakHeadingTagProps = {\n children?: React.ReactNode;\n id?: string;\n /**\n * HTML tag to be used for the heading\n *\n * Accepts a heading tag token\n */\n tag: OakHeadingTag;\n ariaLabel?: string;\n ariaHidden?: boolean;\n};\n\nexport const HeadingTagComponent: FC<OakHeadingTagProps> = (props) => {\n const { tag, ariaLabel, ariaHidden, ...otherProps } = props;\n const Tag = tag;\n return (\n <Tag {...otherProps} aria-label={ariaLabel} aria-hidden={ariaHidden} />\n );\n};\n\nexport type OakHeadingProps = TypographyStyleProps &\n OakHeadingTagProps &\n ColorStyleProps &\n OpacityStyleProps &\n MarginStyleProps;\n\n/**\n *\n * OakHeading can be one of the following style tags dependant on its role: \"div\" | \"h1\" | \"h2\" | \"h3\" | \"h4\" | \"h5\" | \"h6\".\n * Use the controls to view different font styles.\n *\n */\nexport const OakHeading = styled(HeadingTagComponent)<OakHeadingProps>`\n ${typographyStyle}\n ${marginStyle}\n ${colorStyle}\n ${opacityStyle}\n`;\n","import styled from \"styled-components\";\n\nimport { colorStyle, ColorStyleProps } from \"@/styles/utils/colorStyle\";\nimport { marginStyle, MarginStyleProps } from \"@/styles/utils/spacingStyle\";\nimport {\n typographyStyle,\n TypographyStyleProps,\n} from \"@/styles/utils/typographyStyle\";\n\nexport type OakPProps = MarginStyleProps &\n TypographyStyleProps &\n ColorStyleProps;\n\n/**\n * Styled `p` (paragraph) component.\n * ## Usage\n * In general, using a `p` as a descendant of `<Body>` should suffice.\n * However, if you want different styles for a particular paragraph,\n * you can use this component to apply additional styles.\n */\nexport const OakP = styled.p<OakPProps>`\n ${typographyStyle}\n ${colorStyle}\n ${marginStyle}\n\n a {\n color: ${(props) =>\n props.theme &&\n props.theme.uiColors &&\n props.theme.uiColors[\"text-link-active\"]};\n }\n`;\n","import styled, { css } from \"styled-components\";\n\nimport { OakBoxProps, oakBoxCss } from \"../OakBox\";\n\nexport type OakULProps = OakBoxProps & {\n $reset?: boolean;\n};\n\n/**\n * Styled `ul` (unordered list) component.\n *\n * ## Usage\n *\n * Resets browser spacing and other styles, accepts BoxProps' style props.\n *\n * */\n\nexport const OakUL = styled.ul<OakULProps>`\n ${(props) =>\n props.$reset &&\n css`\n list-style: none;\n padding: 0;\n `}\n margin: 0;\n ${oakBoxCss}\n`;\n","import styled from \"styled-components\";\n\nimport { colorStyle, ColorStyleProps } from \"@/styles/utils/colorStyle\";\nimport { marginStyle, MarginStyleProps } from \"@/styles/utils/spacingStyle\";\nimport {\n typographyStyle,\n TypographyStyleProps,\n} from \"@/styles/utils/typographyStyle\";\n\nexport type OakOLProps = MarginStyleProps &\n ColorStyleProps &\n TypographyStyleProps;\n\n/**\n * Styled `ol` (ordered list) component.\n *\n * ## Usage\n *\n * Use where we have an ordered list to ensure numbers are styled\n *\n * */\nexport const OakOL = styled.ol<OakOLProps>`\n counter-reset: item;\n padding: 0;\n\n li {\n display: block;\n counter-increment: item;\n margin: 0;\n padding: 0 0 0 16px;\n text-indent: -16px;\n list-style-type: none;\n line-height: 32px;\n\n // Portable text generates linebreaks within list items\n\n br {\n content: \"\";\n display: block;\n margin-top: 8px;\n }\n }\n\n & li::before {\n padding-right: 4px;\n content: counter(item) \".\";\n }\n a {\n color: ${(props) =>\n props.theme &&\n props.theme.uiColors &&\n props.theme.uiColors[\"text-link-active\"]};\n }\n ${marginStyle}\n ${colorStyle}\n ${typographyStyle}\n`;\n","import { CSSProperties, css } from \"styled-components\";\n\nimport {\n ResponsiveValues,\n responsiveStyle,\n} from \"@/styles/utils/responsiveStyle\";\n\nexport type ListStyleProps = {\n /**\n * Sets the `list-style` CSS property of the element.\n *\n * Accepts a `list-style` value or a responsive array of `list-style` values.\n */\n $listStyle?: ResponsiveValues<CSSProperties[\"listStyle\"]>;\n};\n\nexport const listStyle = css<ListStyleProps>`\n ${responsiveStyle(\"list-style\", (props) => props.$listStyle)}\n`;\n","import styled from \"styled-components\";\n\nimport { oakBoxCss } from \"../OakBox\";\nimport { OakFlexProps } from \"../OakFlex\";\n\nimport { DisplayStyleProps, displayStyle } from \"@/styles/utils/displayStyle\";\nimport { ListStyleProps, listStyle } from \"@/styles/utils/listStyle\";\nimport {\n TypographyStyleProps,\n typographyStyle,\n} from \"@/styles/utils/typographyStyle\";\n\nexport type OakLIProps = OakFlexProps &\n TypographyStyleProps &\n ListStyleProps &\n DisplayStyleProps;\n\n/**\n * Styled `li` (list item) component.\n *\n * ## Usage\n *\n * Places where we directly want to style a list item\n *\n **/\nexport const OakLI = styled.li<OakLIProps>`\n ${oakBoxCss}\n ${typographyStyle}\n ${listStyle}\n ${displayStyle}\n`;\n\nOakLI.defaultProps = {\n $display: \"revert\",\n};\n","import styled from \"styled-components\";\n\nimport {\n TypographyStyleProps,\n typographyStyle,\n} from \"@/styles/utils/typographyStyle\";\nimport { ColorStyleProps, colorStyle } from \"@/styles/utils/colorStyle\";\n\nexport type OakLabelProps = TypographyStyleProps & ColorStyleProps;\n\n/**\n * Label renders a `label` element, exposing all the typography props.\n * ## Usage\n * Use this component when you want to apply styles to a label, likely within\n * a form.\n */\nexport const OakLabel = styled.label<OakLabelProps>`\n ${typographyStyle}\n ${colorStyle}\n`;\n","export const icons = {\n \"question-mark\": \"v1706872277/icons/question-mark.svg\",\n home: \"v1699887218/icons/gvqxjxcw07ei2kkmwnes.svg\",\n send: \"v1699893673/icons/rmvytilpjgvh3pgwc8ph.svg\",\n rocket: \"v1699894015/icons/u26xm5hteot875ozfnk9.svg\",\n edit: \"v1699894149/icons/qxlunbg5tfrdherzsvlt.svg\",\n hamburger: \"v1699895123/icons/jaqdnomtbhqvjcap962u.svg\",\n cross: \"v1699895179/icons/xigimrbivcaxt4omxamp.svg\",\n bell: \"v1699895207/icons/ecejtvqerx81prxyxh9b.svg\",\n twitter: \"v1699895251/icons/bq6a50xtkvnzhltfggzz.svg\",\n worksheet: \"v1699895300/icons/ez1s6mtpe5jkunnxzvlw.svg\",\n facebook: \"v1699895330/icons/iojlvh3o5lshy2jupyph.svg\",\n share: \"v1699895363/icons/agcmduftef3wcla6gzec.svg\",\n \"arrow-right\": \"v1707149070/icons/fv0z57zerrioft52dd9n.svg\",\n \"worksheet-3\": \"v1699895429/icons/bzhojpjxp9rukdvh7daz.svg\",\n \"chevron-right\": \"v1707752509/icons/vk9xxxhnsltsickom6q9.svg\",\n save: \"v1699895505/icons/rh1ahwwtbemvz0ihluew.svg\",\n \"quiz-3\": \"v1699895534/icons/zoayhgtrotv32fad7d3k.svg\",\n \"chevron-down\": \"v1699953557/icons/botfld6brychmttwtv6u.svg\",\n linkedin: \"v1699953592/icons/leqneklorqqzb1zo6rf1.svg\",\n \"magic-carpet\": \"v1699953622/icons/jifivg9xxm7sb0fjdilm.svg\",\n books: \"v1699953657/icons/hz4l3iq6i68kazvkvorq.svg\",\n \"supervision-level\": \"v1699953696/icons/cwqhknapp3maa4g0t3lj.svg\",\n \"quiz-white\": \"v1699953730/icons/gpcehpgr9mqoumsa25xe.svg\",\n \"arrow-left\": \"v1707149179/icons/ejrm9dpgpzb7ddbo8z2i.svg\",\n \"additional-material\": \"v1699953798/icons/ntoq4tqvcm2uj1pajubt.svg\",\n \"slide-deck-3\": \"v1699953830/icons/sm92moja9d5utu3cj16c.svg\",\n \"sign-language\": \"v1699953861/icons/ns94ozvozzi22enxkx0x.svg\",\n external: \"v1699953892/icons/hlxmejse3mcr4tqo6t8u.svg\",\n \"equipment-required\": \"v1699953925/icons/pw22bdhj2vrzfv2ogi4e.svg\",\n \"chevron-left\": \"v1707752509/icons/rbvzan0ozubmr4j0uqdn.svg\",\n download: \"v1699953991/icons/dk0f6a6hdpzxftjosngn.svg\",\n search: \"v1704901279/icons/canbi3fuz5fanzom2hvi.svg\",\n \"chevron-up\": \"v1699954058/icons/pay71thmhhylj7z28sj1.svg\",\n go: \"v1699954090/icons/vdzptyvmitylra8x4usy.svg\",\n copyright: \"v1699954118/icons/boiod3rflocgsnfokyo8.svg\",\n \"arrow-down\": \"v1699954152/icons/wpfmbmwpyfinipg0d61y.svg\",\n project: \"v1699954186/icons/zofq5pheud6spnwjpewk.svg\",\n \"slide-deck\": \"v1699954241/icons/sjjy5f3g4eciwcuxxr33.svg\",\n \"content-guidance\": \"v1699954277/icons/tm3uhcqenaznq4fxys7j.svg\",\n tick: \"v1699954310/icons/efd3esaor6zqk7seh6kt.svg\",\n instagram: \"v1699954343/icons/ayfeljric0kkimdymvva.svg\",\n dot: \"v1699954371/icons/knykdclphkm8lgff4u2g.svg\",\n \"dot-png\": \"v1699954394/icons/qecbh291nzwmhcvqayqd.png\",\n warning: \"v1704901279/icons/zzszodmk7fvxm9xzzg9s.svg\",\n \"lightbulb-yellow\": \"v1705078631/icons/q2v4sqxouy1ngcajoavv.svg\",\n lightbulb: \"v1705078631/icons/zldisxmbff36z68rwcef.svg\",\n quiz: \"v1705416077/icons/kaaizjcudy0jfgfrrdel.svg\",\n video: \"v1705416078/icons/wzey1zfxrvv3apeebbf5.svg\",\n intro: \"v1705662092/icons/pl7bnmb13txese9yxkjv.svg\",\n \"move-arrows\": \"v1709052869/icons/hoddjsgpzkszgvnmn91q.svg\",\n \"subject-art\": \"subject-icons/art.svg\",\n \"subject-biology\": \"subject-icons/biology.svg\",\n \"subject-chemistry\": \"subject-icons/chemistry.svg\",\n \"subject-citizenship\": \"subject-icons/citizenship.svg\",\n \"subject-combined-science\": \"subject-icons/science.svg\",\n \"subject-communication-and-language\":\n \"subject-icons/communication-and-language.svg\",\n \"subject-computing\": \"subject-icons/computing.svg\",\n \"subject-computing-non-gcse\": \"subject-icons/computing.svg\",\n \"subject-creative-arts\": \"subject-icons/creative-arts.svg\",\n \"subject-design-technology\": \"subject-icons/design-technology.svg\",\n \"subject-drama\": \"subject-icons/drama.svg\",\n \"subject-english\": \"subject-icons/english.svg\",\n \"subject-english-grammar\": \"subject-icons/english-grammar.svg\",\n \"subject-english-reading-for-pleasure\": \"subject-icons/literature.svg\",\n \"subject-english-spelling\": \"subject-icons/english-spelling.svg\",\n \"subject-french\": \"subject-icons/french.svg\",\n \"subject-geography\": \"subject-icons/geography.svg\",\n \"subject-german\": \"subject-icons/german.svg\",\n \"subject-history\": \"subject-icons/history.svg\",\n \"subject-independent-living\": \"subject-icons/independent-living.svg\",\n \"subject-latin\": \"subject-icons/latin.svg\",\n \"subject-maths\": \"subject-icons/maths.svg\",\n \"subject-music\": \"subject-icons/music-hollow.svg\",\n \"subject-numeracy\": \"subject-icons/numeracy.svg\",\n \"occupational-therapy\": \"subject-icons/therapy.svg\",\n \"subject-physical-development\": \"subject-icons/physical-development.svg\",\n \"subject-physical-education\": \"subject-icons/physical-education.svg\",\n \"subject-physical-therapy\": \"subject-icons/physical-therapy.svg\",\n \"subject-physics\": \"subject-icons/physics.svg\",\n \"subject-religious-education\": \"subject-icons/religious-education.svg\",\n \"subject-rshe-pshe\": \"subject-icons/rshe-pshe.svg\",\n \"subject-science\": \"subject-icons/science.svg\",\n \"subject-sensory-integration\": \"subject-icons/sensory-integration.svg\",\n \"subject-spanish\": \"subject-icons/spanish.svg\",\n \"subject-speech-and-language-therapy\":\n \"subject-icons/speech-and-language.svg\",\n \"subject-therapy\": \"subject-icons/therapy.svg\",\n \"subject-understanding-the-world\":\n \"subject-icons/understanding-the-world.svg\",\n} as const;\n\nexport type IconName = keyof typeof icons;\n","import React from \"react\";\n\nimport { IconName, icons } from \"../../../image-map\";\n\nimport { OakImage, OakImageProps } from \"@/components/atoms/OakImage\";\n\nexport const oakIconNames = Object.keys(icons) as IconName[];\n\nexport type OakIconName = IconName;\n\nexport type OakIconProps = Omit<OakImageProps, \"alt\" | \"src\"> & {\n /**\n * The name of the icon to display\n *\n * Accepts an icon name token\n */\n iconName: OakIconName;\n alt?: string;\n};\n\n/**\n * returns true if the given string is a valid `OakIconName`\n */\nexport function isValidIconName(iconName: string): iconName is OakIconName {\n return oakIconNames.includes(iconName as OakIconName);\n}\n\n/**\n * A wrapper around OakImage which uses the image-map.json file to map icon names to image paths.\n */\nexport const OakIcon = (props: OakIconProps) => {\n const {\n iconName,\n alt,\n $width = \"all-spacing-7\",\n $height = \"all-spacing-7\",\n $minHeight = $height,\n $minWidth = $width,\n imageProps,\n ...rest\n } = props;\n\n return (\n <OakImage\n src={`https://${process.env.NEXT_PUBLIC_OAK_ASSETS_HOST}/${process.env.NEXT_PUBLIC_OAK_ASSETS_PATH}/${icons[iconName]}`}\n alt={alt ?? iconName}\n $width={$width}\n $height={$height}\n $minHeight={$minHeight}\n $minWidth={$minWidth}\n placeholder=\"empty\"\n // Icons should not be optimised since the SVG is already as small as it can be and should be served directly\n unoptimized\n {...rest}\n />\n );\n};\n","import styled, { css, CSSProperties } from \"styled-components\";\n\nimport {\n responsiveStyle,\n ResponsiveValues,\n} from \"@/styles/utils/responsiveStyle\";\nimport { OakBox, OakBoxProps } from \"@/components/atoms/OakBox\";\nimport { parseSpacing } from \"@/styles/helpers/parseSpacing\";\nimport { OakCombinedSpacingToken } from \"@/styles\";\n\nconst gridStyle = css<OakGridProps>`\n ${responsiveStyle(\"row-gap\", (props) => props.$rg, parseSpacing)}\n ${responsiveStyle(\"column-gap\", (props) => props.$cg, parseSpacing)}\n ${responsiveStyle(\"grid-auto-rows\", (props) => props.$gridAutoRows)}\n ${responsiveStyle(\"grid-template-areas\", (props) => props.$gridTemplateAreas)}\n ${responsiveStyle(\n \"grid-template-columns\",\n (props) => props.$gridTemplateColumns,\n )}\n ${responsiveStyle(\"grid-template-rows\", (props) => props.$gridTemplateRows)}\n`;\n\nexport type OakGridProps = OakBoxProps & {\n /**\n * Applies `row-gap` to the grid\n *\n * Accepts a spacing token or a responsive array of spacing tokens.\n */\n $rg?: ResponsiveValues<OakCombinedSpacingToken>;\n /**\n * Applies `column-gap` to the grid\n *\n * Accepts a spacing token or a responsive array of spacing tokens.\n */\n $cg?: ResponsiveValues<OakCombinedSpacingToken>;\n /**\n * Applies `grid-auto-rows` to the grid\n *\n * Accepts a `grid-auto-rows` value or a responsive array of `grid-auto-rows` values.\n */\n $gridAutoRows?: ResponsiveValues<CSSProperties[\"gridAutoRows\"]>;\n /**\n * Applies `grid-template-areas` to the grid\n *\n * Accepts a `grid-template-areas` value or a responsive array of `grid-template-areas` values.\n */\n $gridTemplateAreas?: ResponsiveValues<CSSProperties[\"gridTemplateAreas\"]>;\n /**\n * Applies `grid-template-columns` to the grid\n *\n * Accepts a `grid-template-columns` value or a responsive array of `grid-template-columns` values.\n */\n $gridTemplateColumns?: ResponsiveValues<CSSProperties[\"gridTemplateColumns\"]>;\n /**\n * Applies `grid-template-rows` to the grid\n *\n * Accepts a `grid-template-rows` value or a responsive array of `grid-template-rows` values.\n */\n $gridTemplateRows?: ResponsiveValues<CSSProperties[\"gridTemplateRows\"]>;\n};\n\n/**\n * Creates a grid layout\n *\n * Defaults to a 12 column grid\n */\nexport const OakGrid = styled(OakBox)<OakGridProps>`\n display: grid;\n grid-template-columns: repeat(12, 1fr);\n width: 100%;\n ${gridStyle}\n`;\n","import styled, { css, CSSProperties } from \"styled-components\";\n\nimport {\n responsiveStyle,\n ResponsiveValues,\n} from \"@/styles/utils/responsiveStyle\";\nimport { SpacingStyleProps } from \"@/styles/utils/spacingStyle\";\nimport { OakFlex, OakFlexProps } from \"@/components/atoms/OakFlex\";\n\ntype ColRowSpan = 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12;\n\nexport type OakGridAreaProps = {\n /**\n * Determines the number of columns the element should span.\n *\n * Accepts a value from 0-12 or a responsive value of 0-12.\n */\n $colSpan: ResponsiveValues<ColRowSpan>;\n /**\n * Determines the number of rows the element should span.\n *\n * Accepts a value from 0-12 or a responsive value of 0-12.\n */\n $rowSpan?: ResponsiveValues<ColRowSpan>;\n /**\n * Sets the order of the element.\n *\n * Accepts a number or a responsive array of numbers.\n */\n $order?: ResponsiveValues<CSSProperties[\"order\"]>;\n /**\n * The start column of the element.\n *\n * Accepts a value from 0-12 or a responsive value of 0-12.\n */\n $colStart?: ResponsiveValues<ColRowSpan>;\n /**\n * The end column of the element.\n *\n * Accepts a value from 0-12 or a responsive value of 0-12.\n */\n $colEnd?: ResponsiveValues<ColRowSpan>;\n /**\n * The start row of the element.\n *\n * Accepts a value from 0-12 or a responsive value of 0-12.\n */\n $rowStart?: ResponsiveValues<ColRowSpan>;\n} & SpacingStyleProps;\n\nconst combineSpanStart = (\n start?: ColRowSpan | null,\n span?: ColRowSpan | null,\n) => {\n return start ? `${start}/${span}` : `${span}`;\n};\n\nconst parseSpanStart = (value?: string | null) => {\n if (value?.includes(\"/\")) {\n const [start, span] = value.split(\"/\");\n return `${start} / span ${span}`;\n }\n const span = value;\n return `span ${span}`;\n};\n\nconst gridArea = css<OakGridAreaProps>`\n flex-direction: column;\n ${responsiveStyle(\n \"grid-column\",\n (props) => {\n return Array.isArray(props.$colSpan)\n ? props.$colSpan.map((span, index) =>\n combineSpanStart(\n Array.isArray(props.$colStart)\n ? props.$colStart[index]\n : props.$colStart,\n span,\n ),\n )\n : combineSpanStart(\n Array.isArray(props.$colStart)\n ? props.$colStart[0]\n : props.$colStart,\n props.$colSpan,\n );\n },\n (value) => parseSpanStart(value),\n )};\n ${responsiveStyle(\n \"grid-row\",\n (props) => {\n return Array.isArray(props.$rowSpan)\n ? props.$rowSpan.map((span, index) =>\n combineSpanStart(\n Array.isArray(props.$rowStart)\n ? props.$rowStart[index]\n : props.$rowStart,\n span,\n ),\n )\n : combineSpanStart(\n Array.isArray(props.$rowStart)\n ? props.$rowStart[0]\n : props.$rowStart,\n props.$rowSpan,\n );\n },\n (value) => parseSpanStart(value),\n )};\n ${responsiveStyle(\n \"order\",\n (props) => props.$order,\n (value) => value && `${value}`,\n )};\n ${responsiveStyle(\"grid-row\", (props) =>\n props.$rowSpan ? `span ${props.$rowSpan}` : \"span 1\",\n )};\n ${responsiveStyle(\"grid-column-start\", (props) => props.$colStart)}\n ${responsiveStyle(\"grid-column-end\", (props) => props.$colEnd)}\n ${responsiveStyle(\"grid-row-start\", (props) => props.$rowStart)}\n`;\n\n/**\n *\n * OakGridArea is a flex container that should be used inside OakGrid.\n *\n * - There is no nesting of OakGridAreas\n * - Column and row arrangements are achieved through $colSpan, $rowSpan, $colStart, $colEnd, $rowStart, $rowEnd\n *\n */\n\nexport const OakGridArea = styled(OakFlex)<OakGridAreaProps & OakFlexProps>`\n ${gridArea}\n`;\n","import styled from \"styled-components\";\n\nimport { OakFlex, OakFlexProps } from \"../OakFlex\";\n\nexport type OakMaxWidthProps = OakFlexProps;\n\n/**\n * This component will provide a default maxWidth and ph value, it take Flex props.\n * ## Usage\n * Use this component on pages to limit the max-width to a specific container.\n * This will make it easier to create full browser width or custom width containers on the same page\n * with different background colors / image url.\n */\nexport const OakMaxWidth = styled(OakFlex)``;\n\nOakMaxWidth.defaultProps = {\n $maxWidth: [\"all-spacing-21\", \"all-spacing-24\"],\n $ph: [\"inner-padding-none\", \"inner-padding-s\"],\n $flexDirection: \"column\",\n $flexGrow: 1,\n $width: \"100%\",\n $mh: \"auto\",\n};\n","import { getCldImageUrl, type CldImageProps } from \"next-cloudinary\";\n\nexport function getCloudinaryIdFromUrl(\n src: string | URL,\n config?: CldImageProps[\"config\"],\n) {\n // When a private CDN is used, CldImage will only accept the image ID as the src\n // this appears to be a limitation of the library which appears to have been designed\n // with basic public CDN usage in mind.\n return src.toString().replace(getCloudinaryRootUrl(config), \"\");\n}\n\n// Attempts to build the stem of a cloudinary URL, this is used to extract the image id\nfunction getCloudinaryRootUrl(config?: CldImageProps[\"config\"]) {\n // `getCldImageUrl` handles all the logic to construct a cloudinary URL from the given config\n // (supporting private CDNs, custom CNAMES etc. so we don't have to)\n const canaryUrl = new URL(getCldImageUrl({ src: \"canary.jpg\" }, config));\n return canaryUrl.origin + \"/image/upload/\";\n}\n","import React, { createContext, useContext } from \"react\";\nimport { CldImage, CldImageProps } from \"next-cloudinary\";\n\nimport { OakImage, OakImageProps } from \"../OakImage\";\n\nimport { getCloudinaryIdFromUrl } from \"./cloudinary\";\n\nexport type OakCloudinaryImageProps = Omit<\n OakImageProps<typeof CldImage>,\n \"src\" | \"imageProps\"\n> & {\n /**\n * The cloudinary image id or the full cloudinary URL\n *\n * Usually in the format `v1234567890/image.jpg`\n */\n cloudinaryId: string;\n};\n\nconst cloudinaryConfigContext = createContext<\n CldImageProps[\"config\"] | undefined\n>(undefined);\n\n/**\n * Provides a Cloudinary config to all descendent `OakCloudinaryImage` elements.\n *\n * See https://cloudinary.com/documentation/cloudinary_sdks#configuration_parameters\n * for documentation of the config object.\n */\nexport const OakCloudinaryConfigProvider = cloudinaryConfigContext.Provider;\n\n/**\n * OakCloudinaryImage wraps OakImage providing responsive images from Cloudinary\n * based on the `sizes` prop.\n *\n * Cloudinary cloud name can be set globally with `NEXT_PUBLIC_CLOUDINARY_CLOUD_NAME` or a config\n * can be passed with `OakCloudinaryConfigProvider`.\n */\nexport const OakCloudinaryImage = ({\n cloudinaryId,\n unoptimized = false || cloudinaryId.endsWith(\".svg\"),\n ...props\n}: OakCloudinaryImageProps) => {\n const config = useContext(cloudinaryConfigContext);\n const src = getCloudinaryIdFromUrl(cloudinaryId, config);\n\n return (\n <OakImage\n as={CldImage}\n src={src}\n imageProps={{\n config,\n flags: unoptimized ? undefined : [\"keep_attribution\"],\n }}\n unoptimized={unoptimized}\n {...props}\n />\n );\n};\n","import React, { ReactNode } from \"react\";\n\nimport { OakSpan } from \"@/components/atoms/OakSpan\";\n\nexport type OakKbdProps = {\n children: ReactNode;\n};\n\n/**\n * Represents textual user input from a keyboard, voice input, or any other text entry device.\n * */\nexport const OakKbd = ({ children }: OakKbdProps) => {\n return (\n <OakSpan\n $font=\"body-3-bold\"\n as=\"kbd\"\n $borderColor=\"border-decorative3-stronger\"\n $background=\"bg-primary\"\n $borderRadius=\"border-radius-m\"\n $ba=\"border-solid-m\"\n $ph=\"inner-padding-xs\"\n $pv=\"inner-padding-ssx\"\n $whiteSpace=\"nowrap\"\n >\n {children}\n </OakSpan>\n );\n};\n","/**\n * From https://piccalil.li/blog/a-modern-css-reset/\n * Do not edit this file. If you want to add global styles, use oak.styles.ts\n */\n\nimport { css } from \"styled-components\";\n\nexport const resetGlobalCss = css`\n /* Box sizing rules */\n *,\n *::before,\n *::after {\n box-sizing: border-box;\n }\n\n /* Remove default margin */\n body,\n h1,\n h2,\n h3,\n h4,\n h5,\n p,\n figure,\n blockquote,\n dl,\n dd {\n margin: 0;\n }\n\n /* Remove list styles on ul, ol elements with a list role, which suggests default styling will be removed */\n ul[role=\"list\"],\n ol[role=\"list\"] {\n list-style: none;\n padding-left: 0;\n margin-top: 0;\n margin-bottom: 0;\n }\n\n /* Set core root defaults */\n html,\n html:focus-within {\n scroll-behavior: smooth;\n }\n\n /* Set core body defaults */\n body {\n min-height: 100vh;\n text-rendering: optimizespeed;\n line-height: 1.5;\n }\n\n /* A elements that don't have a class get default styles */\n a:not([class]) {\n text-decoration-skip-ink: auto;\n }\n\n /* Make images easier to work with */\n img,\n picture {\n max-width: 100%;\n display: block;\n }\n\n /* Inherit fonts for inputs and buttons */\n input,\n button,\n textarea,\n select {\n font: inherit;\n }\n\n cite {\n font-style: inherit;\n }\n\n /* Remove all animations, transitions and smooth scroll for people that prefer not to see them */\n @media (prefers-reduced-motion: reduce) {\n html:focus-within {\n scroll-behavior: auto;\n }\n\n *,\n *::before,\n *::after {\n animation-duration: 0.01ms !important;\n animation-iteration-count: 1 !important;\n transition-duration: 0.01ms !important;\n scroll-behavior: auto !important;\n }\n }\n`;\n\nexport default resetGlobalCss;\n","/**\n * This is our global stylesheet. It's for resets in addition to reset.styles.ts\n * which is taken from a publically available reset. We want to minimise global\n * styles where possible so if you add any styles here please comment with what\n * they are doing and why they belong here (rather than in component specific\n * styles)\n */\n\nimport { css } from \"styled-components\";\n\nexport const oakGlobalCss = css`\n html,\n body {\n padding: 0;\n margin: 0;\n font-family: Lexend, sans-serif;\n font-weight: 300;\n line-height: 1.4;\n }\n\n /* stylelint-disable */\n body,\n #__next {\n /* stylelint-enable */\n display: flex;\n flex-direction: column;\n flex-grow: 1;\n }\n\n a {\n color: inherit;\n text-decoration: none;\n font-family: inherit;\n\n /*\n * Remove grey background on tap on ios\n */\n -webkit-tap-highlight-color: transparent;\n }\n\n button {\n /*\n * some browsers have a small margin by default\n * @see https://github.com/oaknational/Oak-Web-Application/issues/709\n */\n margin: 0;\n\n /*\n * Remove grey background on tap on ios\n */\n -webkit-tap-highlight-color: transparent;\n }\n\n /*\n * Inline styling for mathjax equations\n */\n mjx-container {\n display: inline-grid !important;\n margin: 0 !important;\n }\n`;\n","import { createGlobalStyle } from \"styled-components\";\n\nimport { resetGlobalCss } from \"@/styles/global/reset.styles\";\nimport { oakGlobalCss } from \"@/styles/global/oak.styles\";\n\n/**\n *\n * Currently this is just for storybook as it is already applied in OWA\n *\n */\n\nexport const OakGlobalStyle = createGlobalStyle`\n ${resetGlobalCss}\n ${oakGlobalCss}\n`;\n","import styled, { css } from \"styled-components\";\n\nconst screenReaderStyle = css`\n position: absolute;\n width: 1px;\n height: 1px;\n padding: 0;\n margin: -1px;\n overflow: hidden;\n clip: rect(0, 0, 0, 0);\n white-space: nowrap;\n border: 0;\n`;\n\n/**\n * This component will visually hide its contents but will still be available\n * to screen readers, assitive technology, and scrapers.\n * ## Usage\n * Use this component in places where content shouldn't be visible, but should\n * be accessible to assistive technology.\n */\nexport const OakScreenReader = styled.span`\n ${screenReaderStyle}\n`;\n","import React from \"react\";\nimport styled, { css, keyframes } from \"styled-components\";\n\nimport { OakScreenReader } from \"@/components/atoms/OakScreenReader\";\nimport { SizeStyleProps } from \"@/styles/utils/sizeStyle\";\nimport { parseSpacing } from \"@/styles/helpers/parseSpacing\";\nimport { responsiveStyle } from \"@/styles/utils/responsiveStyle\";\nimport { ColorStyleProps, colorStyle } from \"@/styles/utils/colorStyle\";\nimport { OakCombinedColorToken } from \"@/styles\";\n\nconst SpinnerKeyframe = keyframes`\n 0% {\n transform: rotate(0deg);\n }\n\n 100% {\n transform: rotate(360deg);\n }\n`;\n\nexport type OakLoadingSpinnerProps = Pick<SizeStyleProps, \"$width\"> &\n ColorStyleProps & { loaderColor?: OakCombinedColorToken };\n\nconst StyledLoadingSpinner = styled.span<OakLoadingSpinnerProps>`\n ${(props) =>\n props.$width\n ? responsiveStyle(\"--width\", (props) => props.$width, parseSpacing)\n : css`\n --width: 1.25rem;\n `}\n --inner-width: calc(var(--width) / 10 * 8);\n --thickness: calc(var(--width) / 12);\n\n display: inline-flex;\n width: var(--width);\n height: var(--width);\n\n ::after {\n content: \" \";\n display: block;\n width: var(--inner-width);\n height: var(--inner-width);\n margin: var(--thickness);\n border-radius: 50%;\n border: var(--thickness) solid currentcolor;\n ${(props) =>\n props.loaderColor\n ? css`\n border-color: ${props.loaderColor} ${props.loaderColor}\n ${props.loaderColor} transparent;\n `\n : css`\n border-color: currentcolor currentcolor currentcolor transparent;\n `}\n animation: ${SpinnerKeyframe} 1.2s linear infinite;\n }\n ${colorStyle}\n`;\n\n/**\n *\n * A loading spinner of variable size.\n *\n */\nexport const OakLoadingSpinner = (props: OakLoadingSpinnerProps) => (\n <StyledLoadingSpinner {...props}>\n <OakScreenReader>Loading</OakScreenReader>\n </StyledLoadingSpinner>\n);\n","import React, { ElementType, useRef } from \"react\";\nimport styled, { css } from \"styled-components\";\n\nimport { colorStyle, ColorStyleProps } from \"@/styles/utils/colorStyle\";\nimport { displayStyle, DisplayStyleProps } from \"@/styles/utils/displayStyle\";\nimport { spacingStyle, SpacingStyleProps } from \"@/styles/utils/spacingStyle\";\nimport {\n typographyStyle,\n TypographyStyleProps,\n} from \"@/styles/utils/typographyStyle\";\nimport {\n dropShadowStyle,\n DropShadowStyleProps,\n} from \"@/styles/utils/dropShadowStyle\";\nimport { borderStyle, BorderStyleProps } from \"@/styles/utils/borderStyle\";\nimport { PolymorphicPropsWithoutRef } from \"@/components/polymorphic\";\n\ntype StyledButtonProps = TypographyStyleProps &\n SpacingStyleProps &\n ColorStyleProps &\n DisplayStyleProps &\n BorderStyleProps &\n DropShadowStyleProps & {\n isLoading?: boolean;\n };\n\nconst internalButtonCss = css<StyledButtonProps>`\n background: none;\n color: inherit;\n border: none;\n padding: 0;\n font: inherit;\n cursor: pointer;\n text-align: left;\n font-family: unset;\n outline: none;\n ${typographyStyle}\n ${colorStyle}\n ${spacingStyle}\n ${displayStyle}\n ${borderStyle}\n ${dropShadowStyle}\n &:disabled {\n pointer-events: none;\n cursor: default;\n }\n`;\n\nexport type InternalButtonProps = StyledButtonProps & {\n onHovered?: (\n event: React.MouseEvent<HTMLButtonElement, MouseEvent>,\n duration: number,\n ) => void;\n};\n\nconst UnstyledInternalButton = <C extends ElementType = \"button\">(\n props: InternalButtonProps & PolymorphicPropsWithoutRef<C>,\n) => {\n const { onClick, onHovered, element: Component = \"button\", ...rest } = props;\n\n const hoverStart = useRef(Date.now());\n\n const handleClick = (event: React.MouseEvent<HTMLButtonElement>) => {\n if (onClick) {\n onClick(event);\n }\n };\n\n const handleMouseEnter = () => {\n hoverStart.current = Date.now();\n };\n\n const handleMouseLeave = (event: React.MouseEvent<HTMLButtonElement>) => {\n const delta = Date.now() - hoverStart.current;\n if (onHovered) {\n onHovered(event, delta);\n }\n };\n\n return (\n <Component\n {...rest}\n onClick={handleClick}\n onMouseEnter={handleMouseEnter}\n onMouseLeave={handleMouseLeave}\n />\n );\n};\n\n/**\n *\n * An unstyled button to be used as a basis for all UI button components.\n * The following callbacks are available for tracking focus events:\n *\n * ### onClick\n * `onClick?: (event: React.MouseEvent<HTMLButtonElement, MouseEvent>) => void;`\n\n * ### onHovered\n * `onHovered?: (event: React.MouseEvent<HTMLButtonElement, MouseEvent>, duration: number) => void;`<br>\n * called after a mouseEnter and mouseLeave event has happened\n * \n * NB. We must export a styled component for it to be inheritable\n */\nexport const InternalButton = styled(UnstyledInternalButton)`\n ${internalButtonCss}\n`;\n","import React, { ElementType } from \"react\";\nimport styled, { css } from \"styled-components\";\n\nimport { OakBox, OakBoxProps, OakFlex, OakSpan } from \"@/components/atoms\";\nimport {\n InternalButton,\n InternalButtonProps,\n} from \"@/components/atoms/InternalButton\";\nimport { OakIcon, OakIconName } from \"@/components/atoms/OakIcon\";\nimport { OakLoadingSpinner } from \"@/components/molecules/OakLoadingSpinner\";\nimport { parseDropShadow } from \"@/styles/helpers/parseDropShadow\";\nimport {\n PositionStyleProps,\n positionStyle,\n} from \"@/styles/utils/positionStyle\";\nimport { parseColor } from \"@/styles/helpers/parseColor\";\nimport { OakCombinedColorToken, OakDropShadowToken } from \"@/styles\";\nimport { SizeStyleProps, sizeStyle } from \"@/styles/utils/sizeStyle\";\nimport { PolymorphicPropsWithoutRef } from \"@/components/polymorphic\";\n\nexport type InternalShadowRectButtonProps = Omit<\n InternalButtonProps,\n | \"$pa\"\n | \"$ph\"\n | \"$pv\"\n | \"$ba\"\n | \"$borderRadius\"\n | \"$borderColor\"\n | \"$background\"\n | \"$color\"\n> & {\n iconName?: OakIconName;\n isTrailingIcon?: boolean;\n defaultTextColor: OakCombinedColorToken;\n defaultBackground: OakCombinedColorToken;\n defaultBorderColor: OakCombinedColorToken;\n hoverTextColor: OakCombinedColorToken;\n hoverBackground: OakCombinedColorToken;\n hoverBorderColor: OakCombinedColorToken;\n disabledBackground: OakCombinedColorToken;\n disabledBorderColor: OakCombinedColorToken;\n disabledTextColor: OakCombinedColorToken;\n width?: SizeStyleProps[\"$width\"];\n maxWidth?: SizeStyleProps[\"$maxWidth\"];\n hoverShadow?: OakDropShadowToken | null;\n} & PositionStyleProps;\n\nconst StyledInternalButton = styled(InternalButton)<\n SizeStyleProps & {\n $defaultTextColor: OakCombinedColorToken;\n $defaultBackground: OakCombinedColorToken;\n $defaultBorderColor: OakCombinedColorToken;\n $hoverTextColor: OakCombinedColorToken;\n $hoverBackground: OakCombinedColorToken;\n $hoverBorderColor: OakCombinedColorToken;\n $disabledBackground: OakCombinedColorToken;\n $disabledBorderColor: OakCombinedColorToken;\n $disabledTextColor: OakCombinedColorToken;\n }\n>`\n ${positionStyle}\n ${sizeStyle}\n display: inline-block;\n ${(props) => css`\n &:hover {\n text-decoration: underline;\n color: ${parseColor(props.$hoverTextColor)};\n background: ${parseColor(props.$hoverBackground)};\n border-color: ${parseColor(props.$hoverBorderColor)};\n }\n &:active {\n background: ${parseColor(props.$defaultBackground)};\n border-color: ${parseColor(props.$defaultBorderColor)};\n color: ${parseColor(props.$defaultTextColor)};\n }\n &:disabled {\n background: ${parseColor(props.$disabledBackground)};\n border-color: ${parseColor(props.$disabledBorderColor)};\n color: ${parseColor(props.$disabledTextColor)};\n }\n `}\n`;\n\nconst StyledButtonWrapper = styled(OakBox)<\n OakBoxProps & {\n $hoverShadow?: OakDropShadowToken | null;\n }\n>`\n .grey-shadow:has(+ * + .internal-button:focus-visible) {\n box-shadow: ${parseDropShadow(\"drop-shadow-centered-grey\")};\n }\n .yellow-shadow:has(+ .internal-button:focus-visible) {\n box-shadow: ${parseDropShadow(\"drop-shadow-centered-lemon\")};\n }\n .yellow-shadow:has(+ .internal-button:hover),\n .yellow-shadow:has(+ .internal-button:hover:not(:focus-visible, :active)) {\n box-shadow: ${(props) => parseDropShadow(props.$hoverShadow)};\n }\n .grey-shadow:has(+ * + .internal-button:hover) {\n box-shadow: none;\n }\n .grey-shadow:has(+ * + .internal-button:active) {\n box-shadow: ${parseDropShadow(\"drop-shadow-grey\")};\n }\n .yellow-shadow:has(+ .internal-button:active) {\n box-shadow: ${parseDropShadow(\"drop-shadow-lemon\")};\n }\n`;\n\n/**\n *\n * A styled rectangular button, not intended to be used directly. \n * Instead used by OakPrimaryButton and OakSecondaryButton.\n * \n * The following callbacks are available for tracking focus events:\n *\n * ### onClick\n * `onClick?: (event: React.MouseEvent<HTMLButtonElement, MouseEvent>) => void;`\n\n * ### onHovered\n * `onHovered?: (event: React.MouseEvent<HTMLButtonElement, MouseEvent>, duration: number) => void;`<br>\n * called after a mouseEnter and mouseLeave event has happened\n */\nexport const InternalShadowRectButton = <C extends ElementType = \"button\">(\n props: InternalShadowRectButtonProps & PolymorphicPropsWithoutRef<C>,\n) => {\n const {\n element = \"button\",\n children,\n iconName,\n isTrailingIcon,\n isLoading,\n disabled,\n width = \"max-content\",\n maxWidth,\n defaultBackground,\n defaultBorderColor,\n defaultTextColor,\n disabledTextColor,\n hoverTextColor,\n hoverBackground,\n hoverBorderColor,\n disabledBackground,\n disabledBorderColor,\n className,\n hoverShadow = \"drop-shadow-lemon\",\n ...rest\n } = props;\n\n const icon = (\n <>\n {iconName && (\n <OakIcon\n iconName={iconName}\n $width={\"all-spacing-6\"}\n $height={\"all-spacing-6\"}\n $colorFilter={props.disabled ? disabledTextColor : defaultTextColor}\n />\n )}\n </>\n );\n\n const loader = (\n <OakBox $width={\"all-spacing-6\"} $height={\"all-spacing-6\"}>\n <OakLoadingSpinner $width={\"all-spacing-6\"} />\n </OakBox>\n );\n\n const iconLogic = <>{isLoading && !disabled ? loader : icon}</>;\n\n return (\n <StyledButtonWrapper\n className={className}\n $position={\"relative\"}\n $width={width}\n $maxWidth={maxWidth}\n $hoverShadow={hoverShadow}\n >\n <OakBox\n className=\"grey-shadow\"\n $position={\"absolute\"}\n $borderRadius={\"border-radius-s\"}\n $width={\"100%\"}\n $height={\"100%\"}\n $top=\"all-spacing-0\"\n />\n\n <OakBox\n className=\"yellow-shadow\"\n $position={\"absolute\"}\n $borderRadius={\"border-radius-s\"}\n $width={\"100%\"}\n $height={\"100%\"}\n $top=\"all-spacing-0\"\n />\n\n <StyledInternalButton\n element={element}\n className=\"internal-button\"\n $ba={\"border-solid-m\"}\n $background={defaultBackground}\n $borderColor={defaultBorderColor}\n $color={defaultTextColor}\n $pv={\"inner-padding-s\"}\n $ph={\"inner-padding-m\"}\n $borderRadius={\"border-radius-s\"}\n $position={\"relative\"}\n disabled={disabled || isLoading}\n $width={\"100%\"}\n $height={\"100%\"}\n $hoverTextColor={hoverTextColor}\n $hoverBackground={hoverBackground}\n $hoverBorderColor={hoverBorderColor}\n $defaultTextColor={defaultTextColor}\n $defaultBackground={defaultBackground}\n $defaultBorderColor={defaultBorderColor}\n $disabledTextColor={disabledTextColor}\n $disabledBackground={disabledBackground}\n $disabledBorderColor={disabledBorderColor}\n {...rest}\n >\n <OakFlex\n $flexDirection={\"row\"}\n $alignItems={\"center\"}\n $gap=\"space-between-ssx\"\n $justifyContent=\"center\"\n >\n {!isTrailingIcon && iconLogic}\n <OakSpan $font={\"heading-7\"}>{children}</OakSpan>\n {isTrailingIcon && iconLogic}\n </OakFlex>\n </StyledInternalButton>\n </StyledButtonWrapper>\n );\n};\n","import React, { ElementType } from \"react\";\n\nimport {\n InternalShadowRectButton,\n InternalShadowRectButtonProps,\n} from \"@/components/molecules/InternalShadowRectButton\";\nimport { PolymorphicPropsWithoutRef } from \"@/components/polymorphic\";\n\nexport type OakPrimaryButtonProps = Omit<\n InternalShadowRectButtonProps,\n | \"defaultBorderColor\"\n | \"defaultBackground\"\n | \"defaultTextColor\"\n | \"hoverBackground\"\n | \"hoverBorderColor\"\n | \"hoverTextColor\"\n | \"disabledBackground\"\n | \"disabledBorderColor\"\n | \"disabledTextColor\"\n>;\n\n/**\n *\n * A specific implementation of InternalRectButton\n *\n * The following callbacks are available for tracking focus events:\n *\n * ### onClick\n * `onClick?: (event: React.MouseEvent<HTMLButtonElement, MouseEvent>) => void;`\n *\n * ### onHovered\n * `onHovered?: (event: React.MouseEvent<HTMLButtonElement, MouseEvent>, duration: number) => void;`<br>\n * called after a mouseEnter and mouseLeave event has happened\n */\nexport const OakPrimaryButton = <C extends ElementType = \"button\">({\n element,\n ...rest\n}: OakPrimaryButtonProps & PolymorphicPropsWithoutRef<C>) => {\n return (\n <InternalShadowRectButton\n element={element ?? \"button\"}\n defaultBorderColor=\"bg-btn-primary\"\n defaultBackground=\"bg-btn-primary\"\n defaultTextColor=\"text-inverted\"\n hoverBackground=\"bg-btn-primary-hover\"\n hoverBorderColor=\"bg-btn-primary-hover\"\n hoverTextColor=\"text-inverted\"\n disabledBackground=\"bg-btn-primary-disabled\"\n disabledBorderColor=\"text-disabled\"\n disabledTextColor=\"text-inverted\"\n {...rest}\n />\n );\n};\n","import React, { ElementType } from \"react\";\n\nimport {\n InternalShadowRectButton,\n InternalShadowRectButtonProps,\n} from \"@/components/molecules/InternalShadowRectButton\";\nimport { PolymorphicPropsWithoutRef } from \"@/components/polymorphic\";\n\nexport type OakPrimaryInvertedButtonProps = Omit<\n InternalShadowRectButtonProps,\n | \"defaultBorderColor\"\n | \"defaultBackground\"\n | \"defaultTextColor\"\n | \"hoverBackground\"\n | \"hoverBorderColor\"\n | \"hoverTextColor\"\n | \"disabledBackground\"\n | \"disabledBorderColor\"\n | \"disabledTextColor\"\n>;\n\n/**\n *\n * A specific implementation of InternalRectButton\n *\n * The following callbacks are available for tracking focus events:\n *\n * ### onClick\n * `onClick?: (event: React.MouseEvent<HTMLButtonElement, MouseEvent>) => void;`\n *\n * ### onHovered\n * `onHovered?: (event: React.MouseEvent<HTMLButtonElement, MouseEvent>, duration: number) => void;`<br>\n * called after a mouseEnter and mouseLeave event has happened\n */\nexport const OakPrimaryInvertedButton = <C extends ElementType = \"button\">({\n element,\n ...rest\n}: OakPrimaryInvertedButtonProps & PolymorphicPropsWithoutRef<C>) => {\n return (\n <InternalShadowRectButton\n element={element ?? \"button\"}\n defaultBorderColor=\"bg-btn-secondary\"\n defaultBackground=\"bg-btn-secondary\"\n defaultTextColor=\"text-primary\"\n hoverBackground=\"bg-btn-secondary\"\n hoverBorderColor=\"bg-btn-secondary\"\n hoverTextColor=\"text-primary\"\n disabledBackground=\"bg-btn-secondary\"\n disabledBorderColor=\"bg-btn-secondary\"\n disabledTextColor=\"text-disabled\"\n hoverShadow={null}\n {...rest}\n />\n );\n};\n","import React, { ElementType } from \"react\";\n\nimport {\n InternalShadowRectButton,\n InternalShadowRectButtonProps,\n} from \"@/components/molecules/InternalShadowRectButton\";\nimport { PolymorphicPropsWithoutRef } from \"@/components/polymorphic\";\n\nexport type OakSecondaryButtonProps = Omit<\n InternalShadowRectButtonProps,\n | \"defaultBorderColor\"\n | \"defaultBackground\"\n | \"defaultTextColor\"\n | \"hoverBackground\"\n | \"hoverBorderColor\"\n | \"hoverTextColor\"\n | \"disabledBackground\"\n | \"disabledBorderColor\"\n | \"disabledTextColor\"\n>;\n\n/**\n *\n * A specific implementation of InternalRectButton\n *\n * The following callbacks are available for tracking focus events:\n *\n * ### onClick\n * `onClick?: (event: React.MouseEvent<HTMLButtonElement, MouseEvent>) => void;`\n *\n * ### onHovered\n * `onHovered?: (event: React.MouseEvent<HTMLButtonElement, MouseEvent>, duration: number) => void;`<br>\n * called after a mouseEnter and mouseLeave event has happened\n */\nexport const OakSecondaryButton = <C extends ElementType = \"button\">({\n element,\n ...rest\n}: OakSecondaryButtonProps & PolymorphicPropsWithoutRef<C>) => {\n return (\n <InternalShadowRectButton\n element={element ?? \"button\"}\n defaultBorderColor=\"text-primary\"\n defaultBackground=\"bg-btn-secondary\"\n defaultTextColor=\"text-primary\"\n hoverBackground=\"bg-btn-secondary-hover\"\n hoverBorderColor=\"text-primary\"\n hoverTextColor=\"text-primary\"\n disabledBackground=\"bg-btn-secondary-disabled\"\n disabledBorderColor=\"text-disabled\"\n disabledTextColor=\"text-disabled\"\n {...rest}\n />\n );\n};\n","import React, { ElementType } from \"react\";\nimport styled, { css } from \"styled-components\";\n\nimport { OakRoundIconProps } from \"../OakRoundIcon\";\n\nimport { parseColorFilter } from \"@/styles/helpers/parseColorFilter\";\nimport { PolymorphicPropsWithoutRef } from \"@/components/polymorphic\";\nimport { OakBox, OakFlex, OakSpan } from \"@/components/atoms\";\nimport {\n InternalButton,\n InternalButtonProps,\n} from \"@/components/atoms/InternalButton\";\nimport { OakIcon, OakIconName } from \"@/components/atoms/OakIcon\";\nimport { OakLoadingSpinner } from \"@/components/molecules/OakLoadingSpinner\";\nimport { parseDropShadow } from \"@/styles/helpers/parseDropShadow\";\nimport {\n PositionStyleProps,\n positionStyle,\n} from \"@/styles/utils/positionStyle\";\nimport { parseColor } from \"@/styles/helpers/parseColor\";\nimport { OakCombinedColorToken } from \"@/styles\";\nimport { SizeStyleProps, sizeStyle } from \"@/styles/utils/sizeStyle\";\n\nexport type InternalShadowRoundButtonProps = Omit<\n InternalButtonProps,\n | \"$pa\"\n | \"$ph\"\n | \"$pv\"\n | \"$ba\"\n | \"$borderRadius\"\n | \"$borderColor\"\n | \"$background\"\n | \"$color\"\n> & {\n iconName?: OakIconName;\n isTrailingIcon?: boolean;\n defaultTextColor: OakCombinedColorToken;\n hoverTextColor: OakCombinedColorToken;\n disabledTextColor: OakCombinedColorToken;\n defaultIconBackground: OakCombinedColorToken;\n hoverIconBackground: OakCombinedColorToken;\n hoverIconColor?: OakCombinedColorToken;\n disabledIconBackground: OakCombinedColorToken;\n defaultIconColor?: OakRoundIconProps[\"$colorFilter\"];\n disabledIconColor?: OakRoundIconProps[\"$colorFilter\"];\n width?: SizeStyleProps[\"$width\"];\n maxWidth?: SizeStyleProps[\"$maxWidth\"];\n iconBackgroundSize: SizeStyleProps[\"$width\"];\n iconSize: SizeStyleProps[\"$width\"];\n} & PositionStyleProps;\n\nconst StyledInternalButton = styled(InternalButton)<\n InternalShadowRoundButtonProps & SizeStyleProps\n>`\n display: inline-block;\n ${positionStyle}\n ${sizeStyle}\n ${(props) => css`\n &:hover {\n text-decoration: underline;\n color: ${parseColor(props.$hoverTextColor)};\n\n &:not(:active) [data-icon-for=\"button\"] img {\n filter: ${props.$hoverIconColor\n ? parseColorFilter(props.$hoverIconColor)\n : undefined};\n }\n }\n &:active {\n color: ${parseColor(props.$defaultTextColor)};\n }\n &:disabled {\n color: ${parseColor(props.$disabledTextColor)};\n }\n `}\n`;\n\nconst StyledButtonWrapper = styled(OakFlex)<{\n $disabledIconBackground: OakCombinedColorToken;\n $hoverIconBackground: OakCombinedColorToken;\n $defaultIconBackground: OakCombinedColorToken;\n}>`\n > :first-child:focus-visible .shadow {\n box-shadow: ${parseDropShadow(\"drop-shadow-centered-lemon\")},\n ${parseDropShadow(\"drop-shadow-centered-grey\")};\n }\n > :first-child:hover .shadow {\n box-shadow: ${parseDropShadow(\"drop-shadow-lemon\")};\n }\n > :first-child:active .shadow {\n box-shadow: ${parseDropShadow(\"drop-shadow-lemon\")},\n ${parseDropShadow(\"drop-shadow-grey\")};\n }\n ${(props) => css`\n > :first-child:disabled .icon-container {\n background: ${parseColor(props.$disabledIconBackground)};\n }\n > :first-child:hover .icon-container {\n background: ${parseColor(props.$hoverIconBackground)};\n }\n > :first-child:active .icon-container {\n background: ${parseColor(props.$defaultIconBackground)};\n }\n `}\n`;\n\n/**\n *\n * A styled button with round icons, not intended to be used directly. \n * Instead used by OakTertiaryButton and OakHintButton.\n * \n * The following callbacks are available for tracking focus events:\n *\n * ### onClick\n * `onClick?: (event: React.MouseEvent<HTMLButtonElement, MouseEvent>) => void;`\n\n * ### onHovered\n * `onHovered?: (event: React.MouseEvent<HTMLButtonElement, MouseEvent>, duration: number) => void;`<br>\n * called after a mouseEnter and mouseLeave event has happened\n */\nexport const InternalShadowRoundButton = <C extends ElementType = \"button\">(\n props: InternalShadowRoundButtonProps & PolymorphicPropsWithoutRef<C>,\n) => {\n const {\n element = \"button\",\n children,\n iconName,\n isTrailingIcon,\n isLoading,\n disabled,\n width = \"max-content\",\n maxWidth,\n iconBackgroundSize,\n iconSize,\n disabledIconBackground,\n hoverIconColor,\n disabledTextColor,\n defaultIconColor,\n hoverIconBackground,\n defaultIconBackground,\n disabledIconColor,\n defaultTextColor,\n hoverTextColor,\n className,\n ...rest\n } = props;\n\n const icon = iconName && (\n <OakIcon\n iconName={iconName}\n $width={iconSize}\n $height={iconSize}\n $colorFilter={\n props.disabled\n ? disabledIconColor\n : defaultIconColor\n ? defaultIconColor\n : null\n }\n data-icon-for=\"button\"\n />\n );\n const loader = (\n <OakBox $width={iconSize} $height={iconSize}>\n <OakLoadingSpinner $width={iconSize} loaderColor=\"white\" />\n </OakBox>\n );\n const iconLogic = (isLoading || icon) && (\n <OakFlex\n className={\"icon-container\"}\n $background={props.defaultIconBackground}\n $color={props.defaultTextColor}\n $borderRadius={\"border-radius-circle\"}\n $position={\"relative\"}\n $width={iconBackgroundSize}\n $height={iconBackgroundSize}\n $alignItems={\"center\"}\n $justifyContent={\"center\"}\n $minWidth={iconBackgroundSize}\n >\n <OakBox\n className=\"shadow\"\n $position={\"absolute\"}\n $borderRadius={\"border-radius-circle\"}\n $width={\"100%\"}\n $height={\"100%\"}\n $top=\"all-spacing-0\"\n />\n\n {isLoading && !disabled ? loader : icon}\n </OakFlex>\n );\n\n return (\n <StyledButtonWrapper\n className={className}\n $position={\"relative\"}\n $width={width}\n $maxWidth={maxWidth}\n $disabledIconBackground={disabledIconBackground}\n $hoverIconBackground={hoverIconBackground}\n $defaultIconBackground={defaultIconBackground}\n >\n <StyledInternalButton\n element={element ?? \"button\"}\n {...rest}\n $hoverTextColor={hoverTextColor}\n $hoverIconColor={hoverIconColor}\n $defaultTextColor={defaultTextColor}\n $disabledTextColor={disabledTextColor}\n $color={defaultTextColor}\n $position={\"relative\"}\n disabled={disabled || isLoading}\n >\n <OakFlex\n $flexDirection={\"row\"}\n $alignItems={\"center\"}\n $gap={children ? \"space-between-xs\" : \"space-between-none\"}\n $justifyContent=\"center\"\n >\n {!isTrailingIcon && iconLogic}\n <OakSpan $font={\"heading-7\"}>{children}</OakSpan>\n {isTrailingIcon && iconLogic}\n </OakFlex>\n </StyledInternalButton>\n </StyledButtonWrapper>\n );\n};\n","import React, { ElementType } from \"react\";\n\nimport { OakRoundIconProps } from \"../OakRoundIcon\";\nimport { InternalShadowRoundButton } from \"../InternalShadowRoundButton\";\n\nimport { OakIconName } from \"@/components/atoms\";\nimport { InternalButtonProps } from \"@/components/atoms/InternalButton\";\nimport { PolymorphicPropsWithoutRef } from \"@/components/polymorphic\";\n\ntype OakTertiaryButtonProps = InternalButtonProps & {\n iconBackground?: OakRoundIconProps[\"$background\"];\n iconColorFilter?: OakRoundIconProps[\"$colorFilter\"];\n isTrailingIcon?: boolean;\n iconName?: OakIconName;\n};\n\n/**\n * An implementation of InternalShadowRoundButton, its a subtle button with no border and a round icon.\n */\nexport const OakTertiaryButton = <C extends ElementType = \"button\">({\n element,\n isTrailingIcon,\n iconName,\n children,\n ...props\n}: OakTertiaryButtonProps & PolymorphicPropsWithoutRef<C>) => {\n return (\n <InternalShadowRoundButton\n element={element ?? \"button\"}\n {...props}\n isTrailingIcon={isTrailingIcon}\n iconName={iconName}\n defaultIconColor={\"white\"}\n disabledIconColor=\"white\"\n disabledIconBackground=\"bg-btn-primary-disabled\"\n defaultIconBackground=\"black\"\n hoverIconBackground=\"bg-btn-primary-hover\"\n defaultTextColor=\"text-primary\"\n hoverTextColor=\"bg-btn-primary-hover\"\n disabledTextColor=\"text-disabled\"\n iconBackgroundSize={\"all-spacing-7\"}\n iconSize={\"all-spacing-6\"}\n >\n {children}\n </InternalShadowRoundButton>\n );\n};\n","import React, { createContext, useState } from \"react\";\n\nimport { TypographyStyleProps } from \"@/styles/utils/typographyStyle\";\nimport { ColorStyleProps } from \"@/styles/utils/colorStyle\";\nimport { OakFlex, OakLabel } from \"@/components/atoms\";\nimport { FlexStyleProps } from \"@/styles/utils/flexStyle\";\n\ntype RadioContextType = {\n currentValue: string;\n name: string;\n disabled?: boolean;\n onValueUpdated?: (event: React.ChangeEvent<HTMLInputElement>) => void;\n};\n\nexport const RadioContext = createContext<RadioContextType>({\n currentValue: \"default\",\n name: \"default\",\n});\n\nexport type OakRadioGroupProps = {\n label?: string;\n name: string;\n disabled?: boolean;\n children: React.ReactNode;\n onChange?: (event: React.ChangeEvent<HTMLInputElement>) => void;\n /**\n * Sets the value of the radio group\n * for use as a controlled component\n */\n value?: string;\n /**\n * Sets the initial value of the radio group\n * for use as an uncontrolled component\n */\n defaultValue?: string;\n} & Pick<TypographyStyleProps, \"$font\"> &\n ColorStyleProps &\n Pick<FlexStyleProps, \"$flexDirection\" | \"$alignItems\" | \"$gap\">;\n\n/**\n *\n * OakRadioGroup allow users to select a single item from a list of mutually exclusive options .\n * OakRadioGroup consists of a set of OakRadioButtons, and a label. Each radio includes a label and a visual selection indicator. A single radio button within the group can be selected at a time. Users may click or touch a radio button to select it, or use the Tab key to navigate to the group, the arrow keys to navigate within the group, and the Space key to select an option.\n * ## Usage\n *\n * use the callback onChange to get the value of the selected radio button.\n *\n */\nexport const OakRadioGroup = (props: OakRadioGroupProps) => {\n const {\n name,\n children,\n label,\n onChange,\n $font = \"body-1-bold\",\n $gap = \"space-between-s\",\n disabled,\n value,\n defaultValue = \"\",\n ...rest\n } = props;\n\n const [currentValue, setValue] = useState(defaultValue);\n\n const handleValueUpdated = (event: React.ChangeEvent<HTMLInputElement>) => {\n if (value === undefined) {\n setValue(event.target.value);\n }\n if (onChange) {\n onChange(event);\n }\n };\n\n return (\n <OakFlex role=\"radiogroup\" $gap={$gap} {...rest}>\n {label && <OakLabel $font={$font}>{label}</OakLabel>}\n <RadioContext.Provider\n value={{\n currentValue: value ?? currentValue,\n name,\n disabled: disabled,\n onValueUpdated: handleValueUpdated,\n }}\n >\n {children}\n </RadioContext.Provider>\n </OakFlex>\n );\n};\n","import React, { ReactNode, forwardRef, useContext } from \"react\";\nimport styled, { css } from \"styled-components\";\n\nimport { RadioContext } from \"@/components/molecules/OakRadioGroup/OakRadioGroup\";\nimport { parseColor } from \"@/styles/helpers/parseColor\";\nimport { parseSpacing } from \"@/styles/helpers/parseSpacing\";\nimport { parseBorder } from \"@/styles/helpers/parseBorder\";\nimport { FlexStyleProps } from \"@/styles/utils/flexStyle\";\nimport { responsiveStyle } from \"@/styles/utils/responsiveStyle\";\nimport {\n OakBox,\n OakBoxProps,\n OakFlex,\n OakFlexProps,\n OakLabel,\n OakLabelProps,\n} from \"@/components/atoms\";\nimport {\n OakAllSpacingToken,\n OakBorderWidthToken,\n OakCombinedColorToken,\n} from \"@/styles\";\n\ntype RadioButtonLabelProps = {\n $labelAlignItems?: FlexStyleProps[\"$alignItems\"];\n $labelGap?: FlexStyleProps[\"$gap\"];\n disabled?: boolean;\n} & OakLabelProps;\n\nconst RadioButtonLabel = styled(OakLabel)<RadioButtonLabelProps>`\n ${(props) =>\n !props.disabled &&\n css`\n cursor: pointer;\n `}\n\n display: flex;\n ${responsiveStyle(\"gap\", (props) => props.$labelGap, parseSpacing)}\n ${responsiveStyle(\"align-items\", (props) => props.$labelAlignItems)}\n`;\n\nconst HiddenRadioButtonInput = styled.input.attrs({\n type: \"radio\",\n})`\n position: absolute;\n opacity: 0;\n ${(props) =>\n !props.disabled &&\n css`\n cursor: pointer;\n `}\n`;\n\ntype VisibleRadioButtonInputProps = OakFlexProps & {\n $disableFocusRing: boolean;\n $radioInnerSize: OakAllSpacingToken;\n disabled?: boolean;\n};\n\nconst VisibleRadioButtonInput = styled(OakFlex)<VisibleRadioButtonInputProps>`\n border-radius: 50%;\n\n ${(props) =>\n !props.$disableFocusRing &&\n css`\n ${HiddenRadioButtonInput}:focus-visible ~ &::before {\n content: \"\";\n height: ${parseSpacing(\"all-spacing-7\")};\n width: ${parseSpacing(\"all-spacing-7\")};\n background: \"transparent\"\n display: block;\n position: absolute;\n border-radius: 50%;\n border: ${parseBorder(\"border-solid-m\")} ${parseColor(\"grey60\")};\n box-shadow: ${`inset 0 0 0 0.13rem ${parseColor(\"lemon\")}`};\n }`}\n\n ${HiddenRadioButtonInput}:checked ~ &::after {\n content: \"\";\n height: ${(props) => parseSpacing(props.$radioInnerSize)};\n width: ${(props) => parseSpacing(props.$radioInnerSize)};\n background: ${parseColor(\"black\")};\n position: absolute;\n border-radius: 50%;\n border: ${parseBorder(\"border-solid-m\")} ${parseColor(\"white\")};\n }\n`;\n\n// This is a hack to force React to rerender when the disabled prop is changed. Otherwise the pseudo element is not updated.\nconst DisabledVisibleRadioButtonInput = styled(VisibleRadioButtonInput)`\n ${HiddenRadioButtonInput}:checked ~ &::after {\n content: \"\";\n height: ${(props) => parseSpacing(props.$radioInnerSize)};\n width: ${(props) => parseSpacing(props.$radioInnerSize)};\n background: ${parseColor(\"bg-btn-primary-disabled\")};\n position: absolute;\n border-radius: 50%;\n border: ${parseBorder(\"border-solid-m\")} ${parseColor(\"white\")};\n }\n`;\n\nexport type OakRadioButtonProps = {\n id: string;\n label: ReactNode;\n value: string;\n tabIndex?: number;\n \"data-testid\"?: string;\n disabled?: boolean;\n /**\n * Allows the focus ring to be disabled. This is useful when focus is indicated\n * by other means, such as a border or background color change.\n */\n disableFocusRing?: boolean;\n /**\n * Allows the size of the radio button to be customized.\n */\n radioOuterSize?: OakAllSpacingToken;\n /**\n * Allows the size of the inner \"checked\" circle of the radio button to be customized.\n */\n radioInnerSize?: OakAllSpacingToken;\n /**\n * Allows the width of the radio button border to be customized.\n */\n radioBorderWidth?: OakBorderWidthToken;\n /**\n * Allows the background color of the radio button to be customized.\n */\n radioBackground?: OakCombinedColorToken;\n /**\n * Allows the width of the radio button border to be customized when the radio button is checked.\n */\n checkedRadioBorderWidth?: OakBorderWidthToken;\n} & OakBoxProps &\n RadioButtonLabelProps;\n\n/**\n * A radio button component.\n *\n * Use within `OakRadioGroup` component.\n */\nexport const OakRadioButton = forwardRef<HTMLInputElement, OakRadioButtonProps>(\n (props, ref) => {\n const radioContext = useContext(RadioContext);\n const { currentValue, name, onValueUpdated } = radioContext;\n const {\n id,\n label,\n value,\n tabIndex,\n disabled,\n $labelGap = \"space-between-ssx\",\n $labelAlignItems = \"center\",\n $font = \"body-1\",\n \"data-testid\": dataTestId,\n disableFocusRing = false,\n radioInnerSize = \"all-spacing-4\",\n radioOuterSize = \"all-spacing-6\",\n radioBorderWidth = \"border-solid-m\",\n radioBackground = \"bg-primary\",\n checkedRadioBorderWidth = \"border-solid-m\",\n ...rest\n } = props;\n const checked = value === currentValue;\n const anyDisabled = disabled || radioContext.disabled;\n const finalRadioBorderWidth = checked\n ? checkedRadioBorderWidth\n : radioBorderWidth;\n\n return (\n <OakBox {...rest}>\n <RadioButtonLabel\n htmlFor={id}\n $labelAlignItems={$labelAlignItems}\n $labelGap={$labelGap}\n $font={$font}\n data-testid={dataTestId}\n disabled={anyDisabled}\n >\n <HiddenRadioButtonInput\n name={name}\n id={id}\n value={value}\n onChange={onValueUpdated}\n checked={value === currentValue}\n tabIndex={tabIndex}\n disabled={anyDisabled}\n ref={ref}\n />\n {!anyDisabled ? (\n <VisibleRadioButtonInput\n $height={radioOuterSize}\n $width={radioOuterSize}\n $ba={finalRadioBorderWidth}\n $borderColor={\"black\"}\n $flexGrow={0}\n $flexShrink={0}\n $alignItems={\"center\"}\n $justifyContent={\"center\"}\n $background={radioBackground}\n $disableFocusRing={!!disableFocusRing}\n $radioInnerSize={radioInnerSize}\n />\n ) : (\n <DisabledVisibleRadioButtonInput\n $height={radioOuterSize}\n $width={radioOuterSize}\n $ba={finalRadioBorderWidth}\n $borderColor={\"bg-btn-primary-disabled\"}\n $flexGrow={0}\n $flexShrink={0}\n $alignItems={\"center\"}\n $justifyContent={\"center\"}\n $background={radioBackground}\n $disableFocusRing={!!disableFocusRing}\n $radioInnerSize={radioInnerSize}\n />\n )}\n {label}\n </RadioButtonLabel>\n </OakBox>\n );\n },\n);\n\nexport type OakRadioButtonType = typeof OakRadioButton;\n","import React, { forwardRef, useRef } from \"react\";\nimport styled, { css } from \"styled-components\";\n\nimport { OakBorderRadiusToken, OakCombinedColorToken } from \"@/styles\";\nimport { parseBorderRadius } from \"@/styles/helpers/parseBorderRadius\";\nimport { parseColor } from \"@/styles/helpers/parseColor\";\nimport { parseDropShadow } from \"@/styles/helpers/parseDropShadow\";\nimport { BorderStyleProps, borderStyle } from \"@/styles/utils/borderStyle\";\nimport { ColorStyleProps, colorStyle } from \"@/styles/utils/colorStyle\";\nimport { SizeStyleProps, sizeStyle } from \"@/styles/utils/sizeStyle\";\nimport { SpacingStyleProps, spacingStyle } from \"@/styles/utils/spacingStyle\";\n\n/**\n *\n * These components can be used with InternalCheckBoxWrapper which allows for customisable icons\n *\n * Several flavours of checkbox are created here:\n * - Default\n * - Hover decorations\n * - Focus decorations\n * - Hover + Focus decorations\n *\n * As they are styled components they can be further customised in implementation. Alternatively additional\n * components can be created here.\n *\n */\n\nexport type BaseCheckBoxProps = {\n id: string;\n disabled?: boolean;\n value: string;\n /**\n * Uncontrolled checked state\n */\n defaultChecked?: boolean;\n /**\n * Controlled checked state\n */\n checked?: boolean;\n onHovered?: (value: string, id: string, duration: number) => void;\n onChange?: (event: React.ChangeEvent<HTMLInputElement>) => void;\n onFocus?: (event: React.FocusEvent<HTMLInputElement>) => void;\n onBlur?: (event: React.FocusEvent<HTMLInputElement>) => void;\n \"data-testid\"?: string;\n};\n\nconst BaseCheckBox = forwardRef(\n (props: BaseCheckBoxProps, ref?: React.Ref<HTMLInputElement>) => {\n const { onHovered, ...rest } = props;\n\n const hoverStart = useRef(Date.now());\n\n const handleMouseEnter = () => {\n hoverStart.current = Date.now();\n };\n\n const handleMouseLeave = () => {\n const delta = Date.now() - hoverStart.current;\n if (onHovered) {\n onHovered(props.value, props.id, delta);\n }\n };\n\n return (\n <input\n ref={ref}\n type=\"checkbox\"\n onMouseEnter={handleMouseEnter}\n onMouseLeave={handleMouseLeave}\n {...rest}\n name={props.id}\n />\n );\n },\n);\n\ntype StyledBaseCheckBoxProps = BaseCheckBoxProps &\n ColorStyleProps &\n SpacingStyleProps &\n BorderStyleProps &\n SizeStyleProps & {\n $checkedBackground?: OakCombinedColorToken | null;\n };\n\ntype HoverBaseCheckBoxProps = {\n $hoverBorderRadius: OakBorderRadiusToken;\n};\n\n/**\n *\n * These components can be used with InternalCheckBoxWrapper which allows for customisable icons\n *\n * Several flavours of checkbox are created here:\n * - Default\n * - Hover decorations\n * - Focus decorations\n * - Hover + Focus decorations\n *\n * NB. Hover decorations must be wrapped in a box with position relative to allow for the hover effect to work\n *\n * As they are styled components they can be further customised in implementation. Alternatively additional\n * components can be created here.\n *\n *\n * ## Events\n * The following callbacks are available for tracking focus events:\n *\n * ### onChange\n * onChange?: (event: React.ChangeEvent<HTMLInputElement>) => void;\n *\n * ### onFocus\n * onFocus?: (event: React.FocusEvent<HTMLInputElement>) => void;\n *\n * ### onBlur\n * onBlur?: (event: React.FocusEvent<HTMLInputElement>) => void;\n *\n * ### onHovered\n * `onHovered?: (id, value, duration: number) => void;`<br>\n * called after a mouseEnter and mouseLeave event has happened\n *\n *\n */\nexport const InternalCheckBox = styled(BaseCheckBox)<StyledBaseCheckBoxProps>`\n /* removing default appearance */\n -webkit-appearance: none;\n appearance: none;\n cursor: pointer;\n margin: 0;\n outline: none;\n ${borderStyle}\n ${colorStyle}\n ${spacingStyle}\n ${sizeStyle}\n\n &:checked {\n ${(props) => css`\n background: ${parseColor(props.$checkedBackground)};\n `};\n }\n\n &:disabled {\n pointer-events: none;\n }\n`;\n\nInternalCheckBox.defaultProps = {\n $borderRadius: \"border-radius-xs\",\n $ba: \"border-solid-m\",\n $borderColor: \"text-primary\",\n $checkedBackground: \"text-primary\",\n};\n\nexport const InternalCheckBoxHover = styled(InternalCheckBox)<\n StyledBaseCheckBoxProps & HoverBaseCheckBoxProps\n>`\n /* @media wrapper is required to prevent hover effect on iOS Safari */\n\n @media (hover: hover) {\n &:hover:not(&:checked):not(&:disabled)::after {\n content: \"\";\n position: absolute;\n top: 50%;\n left: 50%;\n width: 60%;\n height: 60%;\n transform: translate(-50%, -50%);\n border-radius: ${(props) => css`\n ${parseBorderRadius(props.$hoverBorderRadius)}\n `};\n background: ${(props) => css`\n ${parseColor(props.$checkedBackground)}\n `};\n }\n }\n`;\n\nInternalCheckBoxHover.defaultProps = {\n $hoverBorderRadius: \"border-radius-xs\",\n};\n\nconst focusStyle = css`\n &:focus-visible {\n box-shadow: ${parseDropShadow(\"drop-shadow-centered-lemon\")};\n }\n`;\n\nexport const InternalCheckBoxFocus = styled(\n InternalCheckBox,\n)<StyledBaseCheckBoxProps>`\n ${focusStyle}\n`;\n\nexport const InternalCheckBoxHoverFocus = styled(InternalCheckBoxHover)<\n StyledBaseCheckBoxProps & HoverBaseCheckBoxProps\n>`\n ${focusStyle}\n`;\n","import styled, { css } from \"styled-components\";\n\nimport { OakLabel, OakLabelProps } from \"@/components/atoms\";\nimport { responsiveStyle } from \"@/styles/utils/responsiveStyle\";\nimport { parseSpacing } from \"@/styles/helpers/parseSpacing\";\nimport { FlexStyleProps } from \"@/styles/utils/flexStyle\";\n\nexport type InternalCheckBoxLabelProps = {\n labelAlignItems?: FlexStyleProps[\"$alignItems\"];\n labelGap?: FlexStyleProps[\"$gap\"];\n disabled?: boolean;\n \"data-testid\"?: string;\n} & OakLabelProps;\n\n/**\n *\n * Specialised Label Component can be used and extended to create various different versions of CheckboxLabels\n *\n */\nexport const InternalCheckBoxLabel = styled(\n OakLabel,\n)<InternalCheckBoxLabelProps>`\n display: flex;\n align-items: center;\n ${responsiveStyle(\"gap\", (props) => props.labelGap, parseSpacing)}\n ${responsiveStyle(\"align-items\", (props) => props.labelAlignItems)}\n`;\n\nexport const InternalCheckBoxLabelHoverDecor = styled(InternalCheckBoxLabel)`\n ${(props) =>\n props.disabled\n ? css`\n pointer-events: none;\n `\n : css`\n cursor: pointer;\n `}\n @media (hover: hover) {\n &:hover {\n text-decoration: ${(props) => (props.disabled ? \"none\" : \"underline\")};\n }\n }\n`;\n","import React from \"react\";\nimport styled from \"styled-components\";\n\nimport { OakBox, OakBoxProps, OakIcon } from \"@/components/atoms\";\nimport { OakAllSpacingToken, OakInnerPaddingToken } from \"@/styles\";\nimport { ResponsiveValues } from \"@/styles/utils/responsiveStyle\";\n\nconst StyledIconContainer = styled(OakBox)<\n OakBoxProps & { disabled?: boolean }\n>`\n pointer-events: none;\n opacity: 0;\n\n input:checked + & {\n opacity: 1;\n }\n`;\n\nexport type InternalCheckBoxWrapperProps = {\n size?: ResponsiveValues<OakAllSpacingToken>;\n internalCheckbox: React.JSX.Element;\n iconPadding?: OakInnerPaddingToken;\n checkedIcon?: React.JSX.Element;\n};\n\n/**\n *\n * This component is a wrapper for the InternalCheckBox component. It allows for customisable icons.\n *\n * NB. size must have the same value as the InternalCheckBox width and height\n *\n *\n */\nexport const InternalCheckBoxWrapper = (\n props: InternalCheckBoxWrapperProps,\n) => {\n const {\n size = \"all-spacing-6\",\n iconPadding = \"inner-padding-none\",\n internalCheckbox,\n checkedIcon = (\n <OakIcon\n iconName=\"tick\"\n $width={\"100%\"}\n $height={\"100%\"}\n $colorFilter={\"white\"}\n />\n ),\n } = props;\n\n return (\n <OakBox $position=\"relative\" $width={size} $height={size}>\n {internalCheckbox}\n <StyledIconContainer\n $position={\"absolute\"}\n $top={\"all-spacing-0\"}\n $left={\"all-spacing-0\"}\n $pa={iconPadding}\n $width={size}\n $height={size}\n >\n {checkedIcon}\n </StyledIconContainer>\n </OakBox>\n );\n};\n","import React, {\n DetailedHTMLProps,\n InputHTMLAttributes,\n FocusEvent,\n useRef,\n} from \"react\";\nimport styled from \"styled-components\";\n\nimport { parseColor } from \"@/styles/helpers/parseColor\";\nimport { getBreakpoint } from \"@/styles/utils/responsiveStyle\";\nimport { SpacingStyleProps, spacingStyle } from \"@/styles/utils/spacingStyle\";\nimport { SizeStyleProps, sizeStyle } from \"@/styles/utils/sizeStyle\";\n\ntype StyledInputProps = Omit<\n DetailedHTMLProps<InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>,\n \"ref\"\n> &\n SpacingStyleProps &\n SizeStyleProps;\n\n/**\n * Using `appearance none !important;` here because many style resets will set this\n * value to textfield, causing some browsers to implement undesirable styles.\n * E.g. ios and rounded borders (which border-radius doesn't fix without\n * appearance: none)\n */\nconst StyledInput = styled.input`\n appearance: none !important;\n border: 0;\n border-radius: 0;\n border-color: transparent;\n box-shadow: none;\n font-family: inherit;\n background: transparent;\n outline: none;\n color: inherit;\n\n @media (max-width: ${getBreakpoint(\"small\")}px) {\n /* iOS zooms in on inputs with font sizes <16px on mobile */\n font-size: 16px;\n }\n\n ::placeholder {\n color: ${({ theme }) =>\n theme && theme.uiColors && parseColor(theme.uiColors[\"text-subdued\"])};\n }\n\n ::-webkit-search-decoration,\n ::-webkit-search-cancel-button,\n ::-webkit-search-results-button,\n ::-webkit-search-results-decoration {\n appearance: none;\n }\n\n :disabled {\n cursor: not-allowed;\n }\n\n ${spacingStyle}\n ${sizeStyle}\n`;\n\nexport type InternalTextInputProps = Omit<StyledInputProps, \"placeholder\"> & {\n /**\n * A textual hint or example to display before a value has been entered\n */\n placeholder?: string;\n /**\n * Fired only when the input is focused for the first time\n */\n onInitialFocus?: (e: FocusEvent<HTMLInputElement>) => void;\n};\n\n/**\n *\n * An unstyled input to be used as a basis for UI input components.\n * Supports all the props of a regular `HTMLInputElement`\n *\n * 🚨 The CSS `outline` is disabled so a focus ring must be applied by the consuming component.\n *\n * The following callbacks are available for tracking focus events:\n *\n * ### onFocus\n * `(e: FocusEvent<HTMLInputElement>) => void;`\n * ### onBlur\n * `(e: FocusEvent<HTMLInputElement>) => void;`\n * ### onInitialFocus\n * `(e: FocusEvent<HTMLInputElement>) => void;`<br>\n * occurs only when the input is focused for the first time\n *\n */\nexport const InternalTextInput = (props: InternalTextInputProps) => {\n const { onInitialFocus, onFocus, ...rest } = props;\n\n const hadInitialFocused = useRef(false);\n\n const handleOnFocus = (e: FocusEvent<HTMLInputElement>) => {\n if (!hadInitialFocused.current && props.onInitialFocus) {\n props.onInitialFocus(e);\n hadInitialFocused.current = true;\n }\n\n if (props.onFocus) {\n props.onFocus(e);\n }\n };\n\n return <StyledInput {...rest} onFocus={handleOnFocus} />;\n};\n","import React, { ChangeEventHandler } from \"react\";\nimport styled, { css } from \"styled-components\";\n\nimport { parseColor } from \"@/styles/helpers/parseColor\";\nimport {\n InternalTextInput,\n InternalTextInputProps,\n} from \"@/components/atoms/InternalTextInput\";\nimport { OakFlex, OakIcon, OakIconName } from \"@/components/atoms\";\nimport { OakCombinedColorToken, OakDropShadowToken } from \"@/styles\";\nimport { parseDropShadow } from \"@/styles/helpers/parseDropShadow\";\nimport { SizeStyleProps } from \"@/styles/utils/sizeStyle\";\n\ntype StyledTextInputWrapperProps = {\n $color: OakCombinedColorToken;\n $hoverBackground: OakCombinedColorToken;\n $background: OakCombinedColorToken;\n $borderColor: OakCombinedColorToken;\n $focusRingDropShadows: OakDropShadowToken[];\n $disabledBackgroundColor: OakCombinedColorToken;\n $readOnlyBorderColor: OakCombinedColorToken;\n $disabledColor: OakCombinedColorToken;\n $readOnlyColor: OakCombinedColorToken;\n $disabled: boolean;\n $readOnly: boolean;\n};\n\nexport type OakTextInputProps = {\n /**\n * Disables user input and updates the appearance accordingly.\n */\n disabled?: boolean;\n /**\n * Makes the input read-only. Preventing the user from changing the value.\n */\n readOnly?: boolean;\n /**\n * Sets the value. Use this in controlled components;\n */\n value?: string;\n /**\n * Sets the initial value. Use this for an uncontrolled component;\n */\n defaultValue?: string;\n /**\n * Used to target the input element in tests.\n */\n \"data-testid\"?: string;\n onChange?: ChangeEventHandler<HTMLInputElement>;\n /**\n * Alters the appearance of the input field to indicate whether the input is valid or invalid.\n */\n validity?: \"valid\" | \"invalid\";\n /**\n * Adds an icon to the input\n *\n * Defaults to the start of the input\n */\n iconName?: OakIconName;\n /**\n * Position the icon at the end of the input\n */\n isTrailingIcon?: boolean;\n /**\n * Give the field a highlight to draw attention to it\n */\n isHighlighted?: boolean;\n iconColor?: OakCombinedColorToken;\n validBorderColor?: OakCombinedColorToken;\n invalidBorderColor?: OakCombinedColorToken;\n validIconColor?: OakCombinedColorToken;\n invalidIconColor?: OakCombinedColorToken;\n color?: OakCombinedColorToken;\n hoverBackground?: OakCombinedColorToken;\n background?: OakCombinedColorToken;\n borderColor?: OakCombinedColorToken;\n focusRingDropShadows?: OakDropShadowToken[];\n disabledBackgroundColor?: OakCombinedColorToken;\n readOnlyBorderColor?: OakCombinedColorToken;\n disabledColor?: OakCombinedColorToken;\n readOnlyColor?: OakCombinedColorToken;\n highlightBackgroundColor?: OakCombinedColorToken;\n /**\n * The width of the surrounding div - the input and icon will fill this\n */\n wrapperWidth?: SizeStyleProps[\"$width\"];\n wrapperMaxWidth?: SizeStyleProps[\"$maxWidth\"];\n iconAlt?: string;\n} & InternalTextInputProps;\n\nconst StyledTextInputWrapper = styled(OakFlex)<StyledTextInputWrapperProps>`\n &:hover {\n cursor: text;\n }\n\n &:focus-within {\n box-shadow: ${(props) =>\n props.$focusRingDropShadows\n .map((dropShadow) => parseDropShadow(dropShadow))\n .join(\",\")};\n }\n\n background: ${(props) => parseColor(props.$background)};\n\n ${(props) =>\n !props.$readOnly &&\n css`\n @media (hover: hover) {\n &:hover:not(:focus-within) {\n background: ${parseColor(props.$hoverBackground)};\n }\n }\n `}\n\n ${(props) =>\n props.$readOnly &&\n css`\n border-color: ${parseColor(props.$readOnlyBorderColor)};\n color: ${parseColor(props.$readOnlyColor)};\n `}\n\n ${(props) =>\n props.$disabled &&\n css`\n background: ${parseColor(props.$disabledBackgroundColor)};\n color: ${parseColor(props.$disabledColor)};\n &:hover {\n cursor: not-allowed;\n }\n `}\n`;\n\n/**\n * Default input which can be extended to create specialised inputs.\n */\nexport const OakTextInput = ({\n type = \"text\",\n borderColor = \"border-primary\",\n readOnlyBorderColor = \"border-neutral\",\n focusRingDropShadows = [\n \"drop-shadow-centered-lemon\",\n \"drop-shadow-centered-grey\",\n ],\n background = \"bg-primary\",\n hoverBackground = \"bg-neutral\",\n disabledBackgroundColor = \"bg-neutral\",\n highlightBackgroundColor = \"bg-decorative5-main\",\n color = \"text-primary\",\n disabledColor = \"text-disabled\",\n readOnlyColor = \"text-subdued\",\n validity,\n iconColor = \"icon-inverted\",\n validBorderColor = \"border-success\",\n invalidBorderColor = \"border-error\",\n validIconColor = \"icon-success\",\n invalidIconColor = \"border-error\",\n iconName,\n iconAlt,\n isTrailingIcon = false,\n isHighlighted = false,\n wrapperWidth,\n wrapperMaxWidth,\n ...props\n}: OakTextInputProps) => {\n let finalBackgroundColor = background;\n let finalBorderColor = borderColor;\n let finalIconColor = iconColor;\n let finalReadOnlyBorderColor = readOnlyBorderColor;\n\n switch (true) {\n case validity === \"valid\":\n finalBorderColor = validBorderColor;\n finalIconColor = validIconColor;\n finalReadOnlyBorderColor = validBorderColor;\n break;\n case validity === \"invalid\":\n finalBorderColor = invalidBorderColor;\n finalIconColor = invalidIconColor;\n finalReadOnlyBorderColor = invalidBorderColor;\n break;\n case isHighlighted:\n finalBackgroundColor = highlightBackgroundColor;\n break;\n }\n\n return (\n <StyledTextInputWrapper\n $height=\"fit-content\"\n $width={wrapperWidth}\n $maxWidth={wrapperMaxWidth}\n $borderRadius=\"border-radius-s\"\n $ba=\"border-solid-m\"\n $borderColor={finalBorderColor}\n $focusRingDropShadows={focusRingDropShadows}\n $background={finalBackgroundColor}\n $hoverBackground={hoverBackground}\n $disabledBackgroundColor={disabledBackgroundColor}\n $readOnlyBorderColor={finalReadOnlyBorderColor}\n $disabledColor={disabledColor}\n $readOnlyColor={readOnlyColor}\n $color={color}\n $alignItems=\"center\"\n $position=\"relative\"\n $gap=\"space-between-s\"\n $ph=\"inner-padding-l\"\n $disabled={!!props.disabled}\n $readOnly={!!props.readOnly}\n onClick={(event) => {\n event.currentTarget.querySelector(\"input\")?.focus();\n }}\n >\n {!isTrailingIcon && iconName && (\n <OakIcon\n iconName={iconName}\n $colorFilter={finalIconColor}\n $pointerEvents=\"none\"\n $width={\"all-spacing-7\"}\n alt={iconAlt}\n />\n )}\n\n <OakFlex $flexGrow={1}>\n <InternalTextInput\n type={type}\n {...props}\n $width={\"100%\"}\n $pv=\"inner-padding-l\"\n $height=\"all-spacing-12\"\n />\n </OakFlex>\n {isTrailingIcon && iconName && (\n <OakIcon\n iconName={iconName}\n $colorFilter={finalIconColor}\n $pointerEvents=\"none\"\n $width={\"all-spacing-7\"}\n alt={iconAlt}\n />\n )}\n </StyledTextInputWrapper>\n );\n};\n","import React from \"react\";\n\nimport {\n OakBox,\n OakIcon,\n OakIconProps,\n OakImage,\n OakImageProps,\n} from \"@/components/atoms\";\n\ntype ImageProps = OakImageProps & {\n iconName?: undefined;\n};\n\ntype IconProps = OakIconProps & {\n src?: undefined;\n};\n\nexport type OakRoundIconProps = IconProps | ImageProps;\n\n/**\n * A wrapper around `OakIcon` which applies a rounded background.\n * Supports either an icon name or an image src\n */\nexport const OakRoundIcon = ({\n $background = \"bg-decorative5-main\",\n $borderRadius = \"border-radius-circle\",\n $width = \"all-spacing-9\",\n $height = \"all-spacing-9\",\n $pa = \"inner-padding-ssx\",\n className,\n ...rest\n}: OakRoundIconProps) => {\n const icon = rest.iconName ? (\n <OakIcon {...rest} $height=\"100%\" $width=\"100%\" />\n ) : (\n <OakImage {...rest} $height=\"100%\" $width=\"100%\" />\n );\n\n return (\n <OakBox\n className={className}\n $background={$background}\n $borderRadius={$borderRadius}\n $width={$width}\n $height={$height}\n $pa={$pa}\n >\n {icon}\n </OakBox>\n );\n};\n","import React, { ReactNode } from \"react\";\nimport styled, { css } from \"styled-components\";\n\nimport { OakFlex, OakFlexProps } from \"../OakFlex\";\n\nimport { OakCombinedColorToken } from \"@/styles\";\nimport { parseColor } from \"@/styles/helpers/parseColor\";\nimport { ColorStyleProps } from \"@/styles/utils/colorStyle\";\nimport { responsiveStyle } from \"@/styles/utils/responsiveStyle\";\nimport { parseSpacing } from \"@/styles/helpers/parseSpacing\";\n\nexport type InternalTooltipProps = OakFlexProps & {\n children?: ReactNode;\n tooltipPosition?: \"bottom-left\" | \"bottom-right\" | \"top-left\" | \"top-right\";\n};\n\nconst StyledFlex = styled(OakFlex)`\n width: max-content;\n pointer-events: none;\n`;\n\ntype StyledSvgProps = {\n $fill: ColorStyleProps[\"$background\"];\n $tooltipPosition?: InternalTooltipProps[\"tooltipPosition\"];\n};\n\nconst ARROW_SIZE = parseSpacing(\"all-spacing-4\");\n\nconst StyledSvg = styled.svg<StyledSvgProps>`\n position: absolute;\n ${({ $tooltipPosition }) => {\n switch ($tooltipPosition) {\n case \"bottom-right\":\n return css`\n top: -${ARROW_SIZE};\n right: ${parseSpacing(\"all-spacing-0\")};\n transform: scale(-1, -1);\n `;\n case \"top-right\":\n return css`\n bottom: -${ARROW_SIZE};\n right: ${parseSpacing(\"all-spacing-0\")};\n transform: scaleX(-1);\n `;\n case \"top-left\":\n return css`\n bottom: -${ARROW_SIZE};\n left: ${parseSpacing(\"all-spacing-0\")};\n `;\n default:\n return css`\n top: -${ARROW_SIZE};\n left: ${parseSpacing(\"all-spacing-0\")};\n transform: scaleY(-1);\n `;\n }\n }}\n ${responsiveStyle<StyledSvgProps, OakCombinedColorToken>(\n \"fill\",\n (props) => props.$fill,\n parseColor,\n )}\n`;\n\n/**\n * A primitive tooltip to be used as a basis for more opinionated UI components.\n */\nexport const InternalTooltip = ({\n children,\n $background = \"black\",\n $color = \"text-inverted\",\n tooltipPosition = \"bottom-left\",\n ...props\n}: InternalTooltipProps) => {\n return (\n <StyledFlex\n role=\"tooltip\"\n {...props}\n $position=\"relative\"\n $background={$background}\n $color={$color}\n $maxWidth={[\"all-spacing-20\", \"all-spacing-22\"]}\n >\n {children}\n <StyledSvg\n width={ARROW_SIZE}\n height={ARROW_SIZE}\n $fill={$background}\n $tooltipPosition={tooltipPosition}\n data-testid=\"tooltip-arrow\"\n >\n <path d=\"M0 0H16L8 8L0 16V0Z\" />\n </StyledSvg>\n </StyledFlex>\n );\n};\n","import React, {\n ReactElement,\n ReactNode,\n useLayoutEffect,\n useState,\n} from \"react\";\nimport { createPortal } from \"react-dom\";\n\nimport {\n InternalTooltip,\n InternalTooltipProps,\n} from \"@/components/atoms/InternalTooltip/InternalTooltip\";\nimport { OakBox, OakBoxProps } from \"@/components/atoms\";\nimport { parseSpacing } from \"@/styles/helpers/parseSpacing\";\n\nexport type OakTooltipProps = Pick<InternalTooltipProps, \"tooltipPosition\"> & {\n /**\n * The target element that triggers the tooltip\n */\n children: ReactElement;\n /**\n * The content of the tooltip\n */\n tooltip: ReactNode;\n /**\n * Whether the tooltip is open or not\n */\n isOpen?: boolean;\n /**\n * The DOM container to render the tooltip portal into\n *\n * @default document.body\n */\n domContainer?: Element;\n};\n\n/**\n * A tooltip with oven-ready styling and positioning.\n */\nexport const OakTooltip = ({\n tooltipPosition,\n children,\n tooltip,\n isOpen,\n domContainer = document.body,\n ...props\n}: OakTooltipProps) => {\n const [targetElement, setTargetElement] = useState<Element | null>(null);\n const [isIntersecting, setIsIntersecting] = useState(true);\n const isVisible = isOpen && isIntersecting;\n\n /**\n * The overlay is positioned on top of the target element in a portal.\n * It tracks the target's size and position.\n *\n * we use it to position the tooltip relative to the target element without interfering\n * with the page layout\n */\n const [overlayStyle, setOverlayStyle] = useState<{\n top: number;\n left: number;\n width: number;\n height: number;\n }>();\n const squaredCornerRadiusProp: keyof InternalTooltipProps = (() => {\n switch (tooltipPosition) {\n case \"bottom-right\":\n return \"$btrr\";\n case \"top-right\":\n return \"$bbrr\";\n case \"top-left\":\n return \"$bblr\";\n default:\n return \"$btlr\";\n }\n })();\n const borderRadiusProps: Partial<InternalTooltipProps> = {\n $borderRadius: \"border-radius-m\",\n [squaredCornerRadiusProp]: \"border-radius-square\",\n };\n\n useLayoutEffect(() => {\n if (!targetElement) {\n return;\n }\n let ticking = false;\n const updateOverlayStyle = () => {\n if (!ticking) {\n requestAnimationFrame(() => {\n ticking = false;\n const rect = targetElement.getBoundingClientRect();\n\n setOverlayStyle({\n top: rect.top,\n left: rect.left,\n width: rect.width,\n height: rect.height,\n });\n });\n ticking = true;\n }\n };\n\n // We use an intersection observer to detect when the target element is no longer visible\n const intersection = new IntersectionObserver((entries) => {\n setIsIntersecting(entries.every((entry) => entry.isIntersecting));\n });\n intersection.observe(targetElement);\n\n // We use a resize observer to detect when the target element's size changes\n const resize = new ResizeObserver(updateOverlayStyle);\n resize.observe(targetElement);\n\n // Update the overlay position on scroll and resize\n window.addEventListener(\"scroll\", updateOverlayStyle, true);\n window.addEventListener(\"resize\", updateOverlayStyle);\n\n return () => {\n resize.disconnect();\n intersection.disconnect();\n window.removeEventListener(\"scroll\", updateOverlayStyle, true);\n window.removeEventListener(\"resize\", updateOverlayStyle);\n };\n }, [targetElement]);\n\n return (\n <>\n {createPortal(\n isVisible && (\n <OakBox\n $position=\"fixed\"\n style={overlayStyle}\n $pointerEvents=\"none\"\n $zIndex=\"modal-dialog\"\n >\n <OakBox\n $width=\"fit-content\"\n $height=\"fit-content\"\n $position=\"absolute\"\n {...getTooltipPositionProps(tooltipPosition)}\n >\n <InternalTooltip\n $background=\"bg-decorative5-main\"\n $color=\"text-primary\"\n $pv=\"inner-padding-m\"\n $ph=\"inner-padding-xl\"\n $font=\"heading-light-7\"\n tooltipPosition={tooltipPosition}\n {...props}\n {...borderRadiusProps}\n >\n {tooltip}\n </InternalTooltip>\n </OakBox>\n </OakBox>\n ),\n domContainer,\n )}\n <div\n ref={(domElement) => {\n setTargetElement(domElement?.firstElementChild ?? null);\n }}\n style={{ display: \"contents\" }}\n >\n {children}\n </div>\n </>\n );\n};\n\nfunction getTooltipPositionProps(\n tooltipPosition: OakTooltipProps[\"tooltipPosition\"],\n) {\n const props: Partial<OakBoxProps> = {};\n\n switch (tooltipPosition) {\n case \"top-left\":\n case \"top-right\":\n props.$top = \"space-between-none\";\n props.$transform = `translateY(calc(-100% - ${parseSpacing(\n \"space-between-s\",\n )}))`;\n break;\n default:\n props.$bottom = \"space-between-none\";\n props.$transform = `translateY(calc(100% + ${parseSpacing(\n \"space-between-s\",\n )}))`;\n break;\n }\n\n switch (tooltipPosition) {\n case \"top-left\":\n case \"bottom-left\":\n props.$left = \"space-between-none\";\n break;\n default:\n props.$right = \"space-between-none\";\n break;\n }\n\n return props;\n}\n","import React, { ElementType, ComponentPropsWithoutRef } from \"react\";\nimport styled from \"styled-components\";\n\nimport { parseColor } from \"@/styles/helpers/parseColor\";\nimport { parseColorFilter } from \"@/styles/helpers/parseColorFilter\";\nimport { parseDropShadow } from \"@/styles/helpers/parseDropShadow\";\nimport { OakIcon } from \"@/components/atoms\";\n\nexport type OakBackLinkProps<C extends ElementType> = {\n as?: C;\n label?: string;\n} & ComponentPropsWithoutRef<C>;\n\nconst StyledBackLink = styled.a`\n border-radius: 50%;\n display: flex;\n width: fit-content;\n height: fit-content;\n border: none;\n padding: 0;\n outline: none;\n\n img {\n pointer-events: none;\n }\n\n &:not(:disabled) {\n cursor: pointer;\n }\n\n &:active {\n box-shadow: ${parseDropShadow(\"drop-shadow-lemon\")},\n ${parseDropShadow(\"drop-shadow-grey\")};\n }\n\n &:hover,\n &:focus-visible {\n background: ${parseColor(\"bg-btn-primary\")};\n\n img {\n filter: ${parseColorFilter(\"text-inverted\")};\n }\n }\n\n &:focus-visible {\n box-shadow: ${parseDropShadow(\"drop-shadow-centered-lemon\")},\n ${parseDropShadow(\"drop-shadow-centered-grey\")};\n }\n\n &:disabled {\n background: ${parseColor(\"bg-btn-primary-disabled\")};\n\n img {\n filter: ${parseColorFilter(\"text-inverted\")};\n }\n }\n`;\n\n/**\n * Used to navigate the user back to the previous page in the app.\n *\n * Polymorphic rendering as any HTML element or component using `as` — defaults to `a`.\n *\n * E.g.\n *\n * * Default (Anchor) `<OakBackLink href=\"https://www.thenational.academy/\" />`\n * * Button `<OakBackLink as=\"button\" onClick={() => goBack(-1)} />`\n */\nexport const OakBackLink = <C extends ElementType = \"a\">({\n as,\n label = \"Back\",\n ...props\n}: OakBackLinkProps<C>) => {\n return (\n <StyledBackLink as={as ?? \"a\"} aria-label={label} {...props}>\n <OakIcon\n alt=\"\"\n iconName=\"chevron-left\"\n $width=\"all-spacing-8\"\n $height=\"all-spacing-8\"\n />\n </StyledBackLink>\n );\n};\n","import styled from \"styled-components\";\n\nimport { OakFlex, OakFlexProps } from \"@/components/atoms/OakFlex\";\n\nexport type InternalCardProps = OakFlexProps;\n\n/**\n *\n * InternalCard extends OakFlex. It has all the props of OakFlex, but applies default styles for consistency.\n *\n */\nconst InternalCard = styled(OakFlex)``;\n\nInternalCard.defaultProps = {\n $pa: \"inner-padding-xl\",\n $flexDirection: \"column\",\n $flexGrow: 1,\n $position: \"relative\",\n};\n\nexport { InternalCard };\n","import React, { ReactElement } from \"react\";\nimport styled from \"styled-components\";\n\nimport { InternalCard, InternalCardProps } from \"../InternalCard/InternalCard\";\nimport { OakBox } from \"../OakBox\";\n\nexport type InternalCardWithBackgroundElementProps = InternalCardProps & {\n backgroundElement: ReactElement;\n};\n\n/**\n * The `backgroundElement` should be sized to fit the entire card\n */\nconst StyledBackgroundBox = styled(OakBox)`\n & > * {\n width: 100%;\n height: 100%;\n }\n`;\n\n/**\n * A flexed card with a presentational background element positioned behind the card contents.\n */\nexport const InternalCardWithBackgroundElement = ({\n backgroundElement,\n children,\n ...props\n}: InternalCardWithBackgroundElementProps) => {\n return (\n <InternalCard {...props}>\n <StyledBackgroundBox\n $position=\"absolute\"\n $inset=\"space-between-none\"\n aria-hidden\n >\n {backgroundElement}\n </StyledBackgroundBox>\n <OakBox $position=\"relative\">{children}</OakBox>\n </InternalCard>\n );\n};\n","import { OakBorderWidthToken, oakBorderWidthTokens } from \"../theme\";\n\nimport pxToRem from \"./pxToRem\";\n\nexport function parseBorderWidth(\n value: OakBorderWidthToken | null | undefined,\n) {\n if (!value) {\n return undefined;\n }\n\n if (value in oakBorderWidthTokens) {\n return `${pxToRem(oakBorderWidthTokens[value])}rem`;\n }\n}\n","import styled from \"styled-components\";\n\nimport { OakBorderWidthToken, OakCombinedColorToken } from \"@/styles\";\nimport {\n ResponsiveValues,\n responsiveStyle,\n} from \"@/styles/utils/responsiveStyle\";\nimport { parseColor } from \"@/styles/helpers/parseColor\";\nimport { parseBorderWidth } from \"@/styles/helpers/parseBorderWidth\";\n\nexport type InternalStyledSvgProps = {\n $fill?: ResponsiveValues<OakCombinedColorToken>;\n $stroke?: ResponsiveValues<OakCombinedColorToken>;\n $strokeWidth?: ResponsiveValues<OakBorderWidthToken>;\n};\n\n/**\n * A styled SVG element with props to apply design tokens to the fill and stroke.\n */\nexport const InternalStyledSvg = styled.svg<InternalStyledSvgProps>`\n ${responsiveStyle<InternalStyledSvgProps, OakCombinedColorToken>(\n \"fill\",\n (props) => props.$fill,\n parseColor,\n )}\n ${responsiveStyle<InternalStyledSvgProps, OakCombinedColorToken>(\n \"stroke\",\n (props) => props.$stroke,\n parseColor,\n )}\n ${responsiveStyle<InternalStyledSvgProps, OakBorderWidthToken>(\n \"stroke-width\",\n (props) => props.$strokeWidth,\n parseBorderWidth,\n )}\n`;\n","import React from \"react\";\n\nimport {\n InternalCardWithBackgroundElement,\n InternalCardWithBackgroundElementProps,\n} from \"@/components/atoms/InternalCardWithBackgroundElement/InternalCardWithBackgroundElement\";\nimport {\n InternalStyledSvg,\n InternalStyledSvgProps,\n} from \"@/components/atoms/InternalStyledSvg\";\n\nexport type OakHandDrawnCardProps = Omit<\n InternalCardWithBackgroundElementProps,\n \"backgroundElement\"\n> & {\n fill?: InternalStyledSvgProps[\"$fill\"];\n stroke?: InternalStyledSvgProps[\"$stroke\"];\n strokeWidth?: InternalStyledSvgProps[\"$strokeWidth\"];\n};\n\n/**\n * A flexed card with a hand-drawn filled background\n *\n * An optional `stroke` and `strokeWidth` can be applied to give the background a border\n */\nexport const OakHandDrawnCard = ({\n $pa = \"inner-padding-xl\",\n fill = \"bg-decorative1-main\",\n stroke,\n strokeWidth,\n $width = \"fit-content\",\n ...props\n}: OakHandDrawnCardProps) => {\n return (\n <InternalCardWithBackgroundElement\n $pa={$pa}\n $width={$width}\n backgroundElement={\n <InternalStyledSvg\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 457 120\"\n preserveAspectRatio=\"none\"\n $fill={fill}\n $stroke={stroke}\n $strokeWidth={strokeWidth}\n >\n <path\n d=\"M27.442 2.59c5.262-.362 11.96-.656 18.624-.932 4.374-.19 8.748-.371 12.712-.578 1.367-.07 3.042-.087 4.716-.095C65.032.976 66.57.959 67.903.907 91.858-.017 115.164.268 139.325.57l6.22.078c20.333.12 40.768.086 61.033-.13 6.664-.025 13.294-.043 19.957-.06C243.656.415 260.777.363 277.83.234c8.85-.07 17.667-.052 26.518-.035 12.132.026 24.366.052 36.771-.147 8.475-.138 17.633.087 26.757.302 3.725.087 7.45.182 11.107.25 3.69.061 7.347.139 10.969.217 4.511.095 8.988.19 13.499.259 13.464.207 30.619 1.519 30.619 1.519 3.588.449 7.074 1.32 10.286 2.59 2.973 1.304 4.682 4.135 6.391 6.967.717 1.165 1.435 2.33 2.221 3.384.273.363.342.812.376 1.26.034.406.102.82.307 1.175 3.52 6.388 2.427 12.604 1.299 19.044a27.243 27.243 0 0 0-.273 1.658 70.082 70.082 0 0 0 .478 16.273l.205 5.31c.171 4.575.342 9.133.854 13.683.274 2.357.205 4.705.137 7.07-.102 3.238-.205 6.492.547 9.808.547 2.261-.308 4.705-1.162 7.13-.342.993-.684 1.986-.923 2.962-.239.984-.546 1.951-.82 2.926-.342 1.2-.718 2.392-.991 3.6-1.196 5.379-4.511 8.435-11.756 9.134-2.392.233-4.75.518-7.142.855h-6.937c-5.263.371-11.961.656-18.624.932-4.375.19-8.749.371-12.713.579-1.367.069-3.041.086-4.716.095-1.538.008-3.075.025-4.408.086-23.956.924-47.262.639-71.422.337l-6.186-.078a3693.945 3693.945 0 0 0-61.033.129c-6.664.026-13.294.044-19.958.061-17.121.043-34.241.095-51.294.224-8.851.069-17.667.052-26.518.035-12.132-.026-24.366-.052-36.771.147-8.475.138-17.633-.087-26.758-.303-3.725-.086-7.45-.181-11.106-.25-3.69-.06-7.313-.138-10.97-.216-4.51-.095-8.987-.19-13.498-.259-18.932-.293-30.175-1.079-33.66-2.754-1.47-.38-2.871-.837-4.238-1.355-3.076-1.304-4.887-4.135-6.664-6.967-.752-1.165-1.47-2.331-2.29-3.384-.273-.363-.341-.812-.376-1.261-.034-.405-.102-.82-.307-1.174C0 95.664 1.128 89.448 2.324 83.008l.308-1.658c.478-5.421.341-10.869-.513-16.273-.102-1.77-.17-3.548-.24-5.318-.17-4.567-.375-9.125-.888-13.675-.273-2.357-.205-4.705-.136-7.07.102-3.238.205-6.493-.581-9.808-.547-2.262.341-4.705 1.196-7.13.342-.994.717-1.986.99-2.962.24-.984.548-1.96.855-2.927.376-1.2.752-2.39 1.025-3.6C5.605 7.21 9.022 4.154 16.574 3.455c2.495-.233 10.936-.855 10.936-.855l-.069-.009Z\"\n vectorEffect=\"non-scaling-stroke\"\n />\n </InternalStyledSvg>\n }\n {...props}\n />\n );\n};\n","import React from \"react\";\n\nimport { OakHandDrawnCardProps, OakHandDrawnCard } from \"../OakHandDrawnCard\";\n\nimport { OakIcon, OakIconProps } from \"@/components/atoms\";\n\nexport type OakHandDrawnBoxWithIconProps = Omit<\n OakHandDrawnCardProps,\n \"children\"\n> & {\n iconName: OakIconProps[\"iconName\"];\n alt?: OakIconProps[\"alt\"];\n iconColor?: OakIconProps[\"$colorFilter\"];\n iconWidth?: OakIconProps[\"$width\"];\n iconHeight?: OakIconProps[\"$height\"];\n};\n\n/**\n * A hand-drawn card with an icon in the center\n */\nexport const OakHandDrawnCardWithIcon = ({\n iconName,\n iconColor = \"text-primary\",\n iconWidth = [\"all-spacing-11\", \"all-spacing-16\"],\n iconHeight = [\"all-spacing-11\", \"all-spacing-16\"],\n alt,\n $width = [\"all-spacing-13\", \"all-spacing-17\"],\n $height = [\"all-spacing-13\", \"all-spacing-17\"],\n $alignItems = \"center\",\n $justifyContent = \"center\",\n ...props\n}: OakHandDrawnBoxWithIconProps) => {\n return (\n <OakHandDrawnCard\n $width={$width}\n $height={$height}\n $alignItems={$alignItems}\n $justifyContent={$justifyContent}\n {...props}\n >\n <OakIcon\n iconName={iconName}\n alt={alt}\n $height={iconHeight}\n $width={iconWidth}\n $colorFilter={iconColor}\n />\n </OakHandDrawnCard>\n );\n};\n","import React from \"react\";\nimport styled from \"styled-components\";\n\nimport { OakFlex, OakSpan } from \"@/components/atoms\";\nimport { InternalStyledSvg } from \"@/components/atoms/InternalStyledSvg\";\n\nconst StyledPromoTag = styled(OakFlex)`\n aspect-ratio: 2 / 1;\n`;\n\n/**\n * Renders a tag with the text \"New\"\n */\nexport const OakPromoTag = () => {\n return (\n <StyledPromoTag\n $alignItems=\"center\"\n $justifyContent=\"center\"\n $position=\"relative\"\n $width={[\"all-spacing-8\", \"all-spacing-9\", \"all-spacing-10\"]}\n >\n <InternalStyledSvg\n height=\"100%\"\n width=\"100%\"\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 56 27\"\n $fill=\"bg-icon\"\n >\n <path d=\"M6.421 0c8.661.839 17.303.834 26.16.714a89.843 89.843 0 0 1 4.834-.013c6.333.32 12.39.317 18.506-.275 0 1.26.178 2.352 0 3.44-.276 1.38-.829 2.759-1.342 4.15-.138.354-.532.706-.808 1.06-.445.248-.63.5-.553.753 1.598 1.093-.256 2.185 0 3.277.276 1.529 1.322 3.058 1.204 4.572-.138 1.771-1.046 3.543-1.973 5.312-.288.4-1.065.792-2.309 1.169-2.288.755-4.103 1.67-11.206 1.965-9.936.417-20.953.385-30.678-.09-2.447-.12-4.38-.532-5.209-.853-1.035-.458-1.52-.929-1.44-1.4C.937 18.988-.109 14.194.01 9.4c0-2.645 1.973-5.29 3.413-7.933.237-.424 1.697-.839 3-1.468Z\" />\n </InternalStyledSvg>\n <OakFlex\n $position=\"absolute\"\n $inset=\"all-spacing-0\"\n $alignItems=\"center\"\n $justifyContent=\"center\"\n >\n <OakSpan\n $color=\"lemon\"\n $font={[\"body-3-bold\", \"body-3-bold\", \"heading-7\"]}\n >\n New\n </OakSpan>\n </OakFlex>\n </StyledPromoTag>\n );\n};\n","import React, { ComponentProps } from \"react\";\nimport styled from \"styled-components\";\n\nimport { OakBox, OakFlex } from \"@/components/atoms\";\nimport { parseColor } from \"@/styles/helpers/parseColor\";\nimport { parseSpacing } from \"@/styles/helpers/parseSpacing\";\nimport { parseBorderRadius } from \"@/styles/helpers/parseBorderRadius\";\n\nexport type OakCollapsibleContentProps = ComponentProps<typeof OakFlex> & {\n /**\n * Whether the content is displayed or not\n */\n isOpen: boolean;\n};\n\nconst StyledScrollBox = styled(OakBox)`\n &::-webkit-scrollbar-thumb {\n border-radius: ${parseBorderRadius(\"border-radius-m\")};\n background-color: ${parseColor(\"grey50\")};\n }\n &::-webkit-scrollbar-track {\n border-radius: ${parseBorderRadius(\"border-radius-m\")};\n background-color: ${parseColor(\"white\")};\n }\n &::-webkit-scrollbar {\n width: ${parseSpacing(\"all-spacing-3\")};\n height: ${parseSpacing(\"all-spacing-3\")};\n border-radius: ${parseBorderRadius(\"border-radius-m\")};\n }\n`;\n\n/**\n * A filled scrollable box that can be hidden with the `isOpen` prop.\n * Useful for hiding content that is not immediately relevant\n */\nexport const OakCollapsibleContent = ({\n isOpen,\n children,\n id,\n ...rest\n}: OakCollapsibleContentProps) => {\n return (\n <OakBox $display={isOpen ? \"block\" : \"none\"} id={id}>\n <OakFlex\n $background=\"bg-neutral-stronger\"\n $ph=\"inner-padding-m\"\n $pv=\"inner-padding-xl\"\n $borderRadius=\"border-radius-m\"\n {...rest}\n >\n <StyledScrollBox\n $overflow=\"auto\"\n $maxHeight=\"100%\"\n $width=\"100%\"\n $pr=\"inner-padding-m\"\n >\n {children}\n </StyledScrollBox>\n </OakFlex>\n </OakBox>\n );\n};\n","import React, { ElementType, forwardRef } from \"react\";\nimport styled from \"styled-components\";\n\nimport { OakLoadingSpinner } from \"../OakLoadingSpinner\";\n\nimport {\n PolymorphicPropsWithRef,\n PolymorphicRef,\n} from \"@/components/polymorphic\";\nimport { parseColor } from \"@/styles/helpers/parseColor\";\nimport { parseDropShadow } from \"@/styles/helpers/parseDropShadow\";\nimport { parseBorderRadius } from \"@/styles/helpers/parseBorderRadius\";\nimport { parseSpacing } from \"@/styles/helpers/parseSpacing\";\nimport { OakFlex, OakIcon, OakIconProps, OakSpan } from \"@/components/atoms\";\nimport { parseColorFilter } from \"@/styles/helpers/parseColorFilter\";\nimport { OakCombinedColorToken } from \"@/styles\";\n\nconst StyledOakIcon = styled(OakIcon)`\n width: ${parseSpacing(\"all-spacing-6\")};\n height: ${parseSpacing(\"all-spacing-6\")};\n`;\n\nconst StyledLink = styled.a<{\n $color: OakCombinedColorToken;\n $visitedColor: OakCombinedColorToken;\n $hoverColor: OakCombinedColorToken;\n $activeColor: OakCombinedColorToken;\n $disabledColor: OakCombinedColorToken;\n}>`\n display: inline-flex;\n align-items: center;\n gap: ${parseSpacing(\"space-between-sssx\")};\n outline: none;\n border-radius: ${parseBorderRadius(\"border-radius-m\")};\n padding: ${parseSpacing(\"inner-padding-ssx\")};\n margin: -${parseSpacing(\"inner-padding-ssx\")};\n appearance: none;\n font: inherit;\n background: none;\n border: none;\n text-decoration: underline;\n cursor: pointer;\n color: ${(props) => parseColor(props.$color)};\n\n ${StyledOakIcon} {\n filter: ${(props) => parseColorFilter(props.$color)};\n }\n\n &:focus-visible {\n box-shadow: ${parseDropShadow(\"drop-shadow-centered-lemon\")},\n ${parseDropShadow(\"drop-shadow-centered-grey\")};\n }\n\n &:visited {\n color: ${(props) => parseColor(props.$visitedColor)};\n\n ${StyledOakIcon} {\n filter: ${(props) => parseColorFilter(props.$visitedColor)};\n }\n }\n\n @media (hover: hover) {\n &:hover,\n &:visited:hover {\n color: ${(props) => parseColor(props.$hoverColor)};\n ${StyledOakIcon} {\n filter: ${(props) => parseColorFilter(props.$hoverColor)};\n }\n }\n }\n\n &:active {\n color: ${(props) => parseColor(props.$activeColor)};\n\n ${StyledOakIcon} {\n filter: ${(props) => parseColorFilter(props.$activeColor)};\n }\n }\n\n &[disabled] {\n cursor: not-allowed;\n color: ${(props) => parseColor(props.$disabledColor)};\n\n ${StyledOakIcon} {\n filter: ${(props) => parseColorFilter(props.$disabledColor)};\n }\n }\n`;\n\nexport type InternalLinkProps = {\n /**\n * The icon to display before or after the children.\n */\n iconName?: OakIconProps[\"iconName\"];\n /**\n * Whether the icon should be displayed after the children.\n */\n isTrailingIcon?: boolean;\n /**\n * Displays a loading spinner in place of the icon.\n */\n isLoading?: boolean;\n color: OakCombinedColorToken;\n visitedColor: OakCombinedColorToken;\n hoverColor: OakCombinedColorToken;\n activeColor: OakCombinedColorToken;\n disabledColor: OakCombinedColorToken;\n};\n\ntype InternalLinkComponent = <C extends React.ElementType = \"a\">(\n props: PolymorphicPropsWithRef<C> & InternalLinkProps,\n) => React.ReactNode;\n\n/**\n * A link with an optional icon and loading state.\n *\n * Defaulting to a `HTMLAnchorElement` this component is polymorphic and can be rendered as a button or any other element.\n */\nexport const InternalLink: InternalLinkComponent = forwardRef(\n <C extends ElementType = \"a\">(\n props: PolymorphicPropsWithRef<C> & InternalLinkProps,\n ref: PolymorphicRef<C>,\n ) => {\n const {\n element = \"a\",\n iconName,\n isTrailingIcon,\n children,\n isLoading,\n color,\n disabledColor,\n visitedColor,\n hoverColor,\n activeColor,\n ...rest\n } = props;\n const icon = (() => {\n switch (true) {\n case isLoading:\n return (\n <OakFlex\n $width=\"all-spacing-6\"\n $height=\"all-spacing-6\"\n $alignItems=\"center\"\n $justifyContent=\"center\"\n >\n <OakLoadingSpinner\n $width=\"all-spacing-4\"\n $color=\"icon-inverted\"\n />\n </OakFlex>\n );\n case !!iconName:\n return <StyledOakIcon iconName={iconName} />;\n default:\n return null;\n }\n })();\n const disabled = (() => {\n switch (true) {\n case \"disabled\" in rest:\n return rest.disabled;\n case isLoading:\n return true;\n default:\n return undefined;\n }\n })();\n\n return (\n <StyledLink\n as={element}\n ref={ref}\n disabled={disabled}\n $color={color}\n $disabledColor={disabledColor}\n $visitedColor={visitedColor}\n $hoverColor={hoverColor}\n $activeColor={activeColor}\n {...rest}\n >\n {!isTrailingIcon && icon}\n <OakSpan>{children}</OakSpan>\n {isTrailingIcon && icon}\n </StyledLink>\n );\n },\n);\n","import React, { ElementType, forwardRef } from \"react\";\n\nimport { InternalLink, InternalLinkProps } from \"../InternalLink\";\n\nimport {\n PolymorphicPropsWithRef,\n PolymorphicRef,\n} from \"@/components/polymorphic\";\n\nexport type OakLinkProps = Pick<\n InternalLinkProps,\n \"iconName\" | \"isTrailingIcon\" | \"isLoading\"\n>;\n\ntype OakLinkComponent = <C extends React.ElementType = \"a\">(\n props: PolymorphicPropsWithRef<C> & OakLinkProps,\n) => React.ReactNode;\n\n/**\n * A blue link with an optional icon and loading state.\n *\n * Defaulting to a `HTMLAnchorElement` this component is polymorphic and can be rendered as a button or any other element.\n */\nexport const OakLink: OakLinkComponent = forwardRef(\n <C extends ElementType = \"a\">(\n props: PolymorphicPropsWithRef<C> & OakLinkProps,\n ref: PolymorphicRef<C>,\n ) => {\n return (\n <InternalLink\n color=\"text-link-active\"\n hoverColor=\"text-link-hover\"\n activeColor=\"text-link-pressed\"\n disabledColor=\"text-disabled\"\n visitedColor=\"text-link-visited\"\n {...props}\n ref={ref}\n />\n );\n },\n);\n","import React, { ElementType, forwardRef } from \"react\";\n\nimport { InternalLink, InternalLinkProps } from \"../InternalLink\";\n\nimport {\n PolymorphicPropsWithRef,\n PolymorphicRef,\n} from \"@/components/polymorphic\";\n\nexport type OakSecondaryLinkProps = Pick<\n InternalLinkProps,\n \"iconName\" | \"isTrailingIcon\" | \"isLoading\"\n>;\n\ntype OakLinkComponent = <C extends React.ElementType = \"a\">(\n props: PolymorphicPropsWithRef<C> & OakSecondaryLinkProps,\n) => React.ReactNode;\n\n/**\n * A black link with an optional icon and loading state.\n *\n * Defaulting to a `HTMLAnchorElement` this component is polymorphic and can be rendered as a button or any other element.\n */\nexport const OakSecondaryLink: OakLinkComponent = forwardRef(\n <C extends ElementType = \"a\">(\n props: PolymorphicPropsWithRef<C> & OakSecondaryLinkProps,\n ref: PolymorphicRef<C>,\n ) => {\n return (\n <InternalLink\n color=\"text-primary\"\n hoverColor=\"text-primary\"\n activeColor=\"text-primary\"\n disabledColor=\"text-disabled\"\n visitedColor=\"text-subdued\"\n {...props}\n ref={ref}\n />\n );\n },\n);\n","import React, { ComponentPropsWithoutRef } from \"react\";\nimport styled from \"styled-components\";\n\nimport { OakBox, OakFlex, OakIcon, OakKbd } from \"@/components/atoms\";\nimport { parseSpacing } from \"@/styles/helpers/parseSpacing\";\n\n/**\n * Adds additional leading between each line of text to make room for the\n * keyboard instructions wrapped in `<OakKbd>`\n *\n * This might be a useful atom to extract\n */\nconst StyledLeadingTrim = styled(OakBox)`\n margin-block: calc(-${parseSpacing(\"space-between-ssx\")} / 2);\n line-height: calc(1.5rem + ${parseSpacing(\"space-between-ssx\")});\n`;\n\n/**\n * Displays instructions for drag and drop functionality\n */\nexport const OakDragAndDropInstructions = (\n props: ComponentPropsWithoutRef<typeof OakFlex>,\n) => {\n return (\n <OakFlex $gap=\"space-between-ssx\" {...props}>\n <OakFlex $flexGrow={0}>\n <OakIcon iconName=\"move-arrows\" />\n </OakFlex>\n <StyledLeadingTrim $font=\"body-2\">\n Click and drag answers to change the order, or select using{\" \"}\n <OakKbd>\n <span aria-hidden=\"true\">↹</span> Tab\n </OakKbd>{\" \"}\n then move by pressing <OakKbd>Space</OakKbd> and the <OakKbd>↑</OakKbd>{\" \"}\n <OakKbd>↓</OakKbd> arrows on your keyboard.\n </StyledLeadingTrim>\n </OakFlex>\n );\n};\n","import React, {\n ComponentPropsWithRef,\n ComponentPropsWithoutRef,\n FC,\n forwardRef,\n} from \"react\";\nimport styled from \"styled-components\";\n\nimport { OakBox, OakFlex, OakIcon } from \"@/components/atoms\";\nimport { parseColor } from \"@/styles/helpers/parseColor\";\nimport { parseBorder } from \"@/styles/helpers/parseBorder\";\nimport { parseDropShadow } from \"@/styles/helpers/parseDropShadow\";\nimport { parseSpacing } from \"@/styles/helpers/parseSpacing\";\nimport { IconName } from \"@/image-map\";\nimport { OakCombinedColorToken } from \"@/styles/theme/color\";\nimport { parseBorderWidth } from \"@/styles/helpers/parseBorderWidth\";\nimport { parseColorFilter } from \"@/styles/helpers/parseColorFilter\";\n\ntype OakDraggableProps = {\n /**\n * Whether the item is currently being dragged\n */\n isDragging?: boolean;\n /**\n * Present the element in a subdued state with hover effects disabled\n */\n isDisabled?: boolean;\n /**\n * Read only\n *\n * Disables hover effects\n */\n isReadOnly?: boolean;\n /**\n * Icon to display\n */\n iconName?: IconName;\n /**\n * Icon color when not being dragged or hovered\n */\n iconColor?: OakCombinedColorToken;\n /**\n * The alt text for the icon\n */\n iconAlt?: string;\n /**\n * The background color of the draggable when not being dragged or hovered\n */\n background?: OakCombinedColorToken;\n /**\n * The color of the draggable when not being dragged or hovered\n */\n color?: OakCombinedColorToken;\n};\n\nconst StyledOakIcon = styled(OakIcon)``;\n\nconst StyledDraggable = styled(OakBox)<{ $iconColor: OakCombinedColorToken }>`\n cursor: grab;\n outline: none;\n user-select: none;\n\n ${StyledOakIcon} {\n filter: ${(props) => parseColorFilter(props.$iconColor)};\n }\n\n @media (hover: hover) {\n &:hover:not([data-dragging=\"true\"]):not([data-disabled=\"true\"]):not(\n [data-readonly=\"true\"]\n ) {\n background-color: ${parseColor(\"bg-decorative1-subdued\")};\n color: ${parseColor(\"text-primary\")};\n box-shadow: ${parseDropShadow(\"drop-shadow-standard\")};\n border-bottom: ${parseBorder(\"border-solid-xl\")}\n ${parseColor(\"border-primary\")};\n padding-bottom: ${parseSpacing(\"inner-padding-m\")};\n text-decoration: underline;\n\n ${StyledOakIcon} {\n filter: ${parseColorFilter(\"icon-inverted\")};\n }\n }\n }\n\n &:focus-visible:not([data-dragging=\"true\"]):not([data-disabled=\"true\"]) {\n box-shadow: ${parseDropShadow(\"drop-shadow-centered-lemon\")},\n ${parseDropShadow(\"drop-shadow-centered-grey\")};\n }\n\n &[data-dragging=\"true\"] {\n cursor: move;\n background-color: ${parseColor(\"bg-decorative1-main\")};\n color: ${parseColor(\"text-primary\")};\n outline: ${parseBorder(\"border-solid-xl\")} ${parseColor(\"border-primary\")};\n outline-offset: -${parseBorderWidth(\"border-solid-xl\")};\n box-shadow: ${parseDropShadow(\"drop-shadow-lemon\")},\n ${parseDropShadow(\"drop-shadow-grey\")};\n text-decoration: underline;\n\n ${StyledOakIcon} {\n filter: ${parseColorFilter(\"icon-inverted\")};\n }\n }\n\n &[data-disabled=\"true\"] {\n cursor: default;\n background-color: ${parseColor(\"bg-neutral\")};\n color: ${parseColor(\"text-disabled\")};\n\n ${StyledOakIcon} {\n filter: ${parseColorFilter(\"icon-disabled\")};\n }\n }\n\n &[data-readonly=\"true\"] {\n cursor: default;\n }\n`;\n\nconst StyledFlex = styled(OakFlex)`\n margin-block: -${parseSpacing(\"space-between-ssx\")};\n`;\n\n/**\n * The component has no intrinsic draggable functionality.\n * It is intended to be used with `useDraggable` from `@dnd-kit/core`\n */\nexport const OakDraggable: FC<\n ComponentPropsWithRef<OakDraggableProps & typeof OakBox>\n> = forwardRef<\n HTMLDivElement,\n OakDraggableProps & ComponentPropsWithoutRef<typeof OakBox>\n>(\n (\n {\n children,\n iconName = \"move-arrows\",\n iconColor = \"icon-inverted\",\n iconAlt = \"\",\n color = \"text-primary\",\n background = \"bg-primary\",\n isDragging,\n isDisabled,\n isReadOnly,\n ...props\n },\n ref,\n ) => {\n return (\n <StyledDraggable\n ref={ref}\n $pv=\"inner-padding-l\"\n $pl=\"inner-padding-s\"\n $pr=\"inner-padding-m\"\n $background={background}\n $color={color}\n $borderRadius=\"border-radius-m2\"\n $minHeight=\"all-spacing-10\"\n data-dragging={isDragging}\n data-disabled={isDisabled}\n data-readonly={isReadOnly}\n $iconColor={iconColor}\n {...props}\n >\n <StyledFlex $gap=\"space-between-s\" $alignItems=\"center\">\n <StyledOakIcon\n iconName={iconName}\n $width=\"all-spacing-7\"\n $height=\"all-spacing-7\"\n alt={iconAlt}\n />\n <OakFlex $font=\"body-1-bold\">{children}</OakFlex>\n </StyledFlex>\n </StyledDraggable>\n );\n },\n);\n","import React, {\n ComponentPropsWithRef,\n ComponentPropsWithoutRef,\n FC,\n ReactNode,\n forwardRef,\n} from \"react\";\nimport styled from \"styled-components\";\n\nimport { OakBox, OakFlex } from \"@/components/atoms\";\nimport { parseBorder } from \"@/styles/helpers/parseBorder\";\nimport { parseColor } from \"@/styles/helpers/parseColor\";\n\nexport type OakDroppableProps = {\n /**\n * Indicates whether a draggable is currently being dragged over the droppable\n */\n isOver?: boolean;\n /**\n * Present the element in a state making it clear that it can be dropped into\n */\n isDisabled?: boolean;\n /**\n * Give the droppable a highlight to draw attention to it\n */\n isHighlighted?: boolean;\n /**\n * A slot for a label to be displayed to the RHS of the droppable\n *\n * useful for giving the user a hint about what to drop\n */\n labelSlot?: ReactNode;\n /**\n * A slot for the draggable that is currently occupying the droppable\n */\n children?: ReactNode;\n};\n\nconst StyledFlex = styled(OakFlex)`\n outline: ${parseBorder(\"border-solid-l\")} ${parseColor(\"border-primary\")};\n outline-style: dashed;\n\n &[data-disabled=\"true\"] {\n outline-color: ${parseColor(\"border-neutral\")};\n }\n`;\n\n/**\n * A drop zone for a draggable\n *\n * Has no intrinsic drop functionality.\n * It is intended to be used with `useDraggable` from `@dnd-kit/core`\n */\nexport const OakDroppable: FC<\n OakDroppableProps & ComponentPropsWithRef<typeof OakFlex>\n> = forwardRef<\n HTMLDivElement,\n OakDroppableProps & ComponentPropsWithoutRef<typeof OakFlex>\n>(\n (\n { children, labelSlot, isOver, isHighlighted, isDisabled, ...props },\n ref,\n ) => {\n const slotBackground = (() => {\n switch (true) {\n case isOver:\n return \"bg-primary\";\n case isDisabled:\n return \"bg-decorative2-subdued\";\n default:\n return \"bg-neutral\";\n }\n })();\n const background = (() => {\n switch (true) {\n case isOver:\n return \"bg-decorative2-main\";\n case isHighlighted:\n return \"bg-decorative5-main\";\n default:\n return \"bg-decorative2-subdued\";\n }\n })();\n\n return (\n <OakFlex\n ref={ref}\n $background={background}\n $pa=\"inner-padding-m\"\n $borderRadius=\"border-radius-l\"\n $gap=\"space-between-s\"\n $flexDirection={[\"column\", \"row\", \"row\"]}\n {...props}\n >\n <StyledFlex\n $background={slotBackground}\n $pa=\"inner-padding-ssx\"\n $borderRadius=\"border-radius-m2\"\n $minHeight=\"all-spacing-11\"\n $flexBasis=\"100%\"\n data-disabled={isDisabled}\n >\n <OakBox $width=\"100%\">{children}</OakBox>\n </StyledFlex>\n {labelSlot && (\n <OakFlex\n $background={isOver ? \"bg-primary\" : \"bg-decorative2-very-subdued\"}\n $borderRadius=\"border-radius-m2\"\n $alignItems=\"center\"\n $font=\"body-1\"\n $ph=\"inner-padding-l\"\n $minHeight=\"all-spacing-10\"\n $pv=\"inner-padding-ssx\"\n $flexBasis=\"100%\"\n $width=\"100%\"\n $alignSelf=\"center\"\n data-testid=\"label\"\n >\n {labelSlot}\n </OakFlex>\n )}\n </OakFlex>\n );\n },\n);\n","import React, { ReactNode, useState } from \"react\";\nimport styled from \"styled-components\";\n\nimport { OakBox, OakFlex, OakIcon } from \"@/components/atoms\";\nimport { parseSpacing } from \"@/styles/helpers/parseSpacing\";\nimport { parseDropShadow } from \"@/styles/helpers/parseDropShadow\";\n\nexport type OakAccordionProps = {\n /**\n * The header of the accordion\n */\n header: ReactNode;\n /**\n * Slot to place content after the header and outside the button\n */\n headerAfterSlot?: ReactNode;\n /**\n * Whether the accordion should be open initially\n */\n initialOpen?: boolean;\n /**\n * The content of the accordion\n */\n children: ReactNode;\n /**\n * The id of the accordion\n */\n id: string;\n};\n\nconst StyledOakFlex = styled(OakFlex)`\n font: inherit;\n border: none;\n background: none;\n appearance: none;\n margin: -${parseSpacing(\"inner-padding-m\")};\n\n outline: none;\n\n &:focus-visible {\n box-shadow: ${parseDropShadow(\"drop-shadow-centered-lemon\")},\n ${parseDropShadow(\"drop-shadow-centered-grey\")};\n }\n`;\n\n/**\n * An accordion component that can be used to show/hide content\n */\nexport const OakAccordion = ({\n header,\n headerAfterSlot,\n children,\n initialOpen = false,\n id,\n}: OakAccordionProps) => {\n const [isOpen, setOpen] = useState(initialOpen);\n\n return (\n <OakBox\n $borderColor=\"border-neutral-lighter\"\n $ba=\"border-solid-s\"\n $pa=\"inner-padding-m\"\n $background={isOpen ? \"bg-neutral\" : \"bg-primary\"}\n >\n <OakFlex\n as=\"h3\"\n $font=\"heading-light-7\"\n $textDecoration={isOpen ? \"underline\" : \"none\"}\n >\n <StyledOakFlex\n as=\"button\"\n onClick={() => setOpen(!isOpen)}\n $alignItems=\"center\"\n $pa=\"inner-padding-m\"\n $flexGrow={1}\n aria-expanded={isOpen}\n id={id}\n >\n <OakIcon\n iconName=\"chevron-down\"\n $mr=\"space-between-s\"\n $width=\"all-spacing-6\"\n $height=\"all-spacing-6\"\n alt=\"\"\n style={{ transform: isOpen ? \"rotate(180deg)\" : \"none\" }}\n />\n {header}\n </StyledOakFlex>\n {headerAfterSlot && (\n <OakFlex $ml=\"space-between-m\">{headerAfterSlot}</OakFlex>\n )}\n </OakFlex>\n <OakBox\n $ml=\"space-between-m\"\n $pl=\"inner-padding-m\"\n $mt=\"space-between-sssx\"\n $font=\"body-3\"\n hidden={!isOpen}\n aria-labelledby={id}\n role=\"region\"\n >\n {children}\n </OakBox>\n </OakBox>\n );\n};\n","export var zeroRightClassName = 'right-scroll-bar-position';\nexport var fullWidthClassName = 'width-before-scroll-bar';\nexport var noScrollbarsClassName = 'with-scroll-bars-hidden';\n/**\n * Name of a CSS variable containing the amount of \"hidden\" scrollbar\n * ! might be undefined ! use will fallback!\n */\nexport var removedBarSizeVariable = '--removed-body-scroll-bar-size';\n","/**\n * Assigns a value for a given ref, no matter of the ref format\n * @param {RefObject} ref - a callback function or ref object\n * @param value - a new value\n *\n * @see https://github.com/theKashey/use-callback-ref#assignref\n * @example\n * const refObject = useRef();\n * const refFn = (ref) => {....}\n *\n * assignRef(refObject, \"refValue\");\n * assignRef(refFn, \"refValue\");\n */\nexport function assignRef(ref, value) {\n if (typeof ref === 'function') {\n ref(value);\n }\n else if (ref) {\n ref.current = value;\n }\n return ref;\n}\n","import * as React from 'react';\nimport { assignRef } from './assignRef';\nimport { useCallbackRef } from './useRef';\nvar currentValues = new WeakMap();\n/**\n * Merges two or more refs together providing a single interface to set their value\n * @param {RefObject|Ref} refs\n * @returns {MutableRefObject} - a new ref, which translates all changes to {refs}\n *\n * @see {@link mergeRefs} a version without buit-in memoization\n * @see https://github.com/theKashey/use-callback-ref#usemergerefs\n * @example\n * const Component = React.forwardRef((props, ref) => {\n * const ownRef = useRef();\n * const domRef = useMergeRefs([ref, ownRef]); // 👈 merge together\n * return <div ref={domRef}>...</div>\n * }\n */\nexport function useMergeRefs(refs, defaultValue) {\n var callbackRef = useCallbackRef(defaultValue || null, function (newValue) {\n return refs.forEach(function (ref) { return assignRef(ref, newValue); });\n });\n // handle refs changes - added or removed\n React.useLayoutEffect(function () {\n var oldValue = currentValues.get(callbackRef);\n if (oldValue) {\n var prevRefs_1 = new Set(oldValue);\n var nextRefs_1 = new Set(refs);\n var current_1 = callbackRef.current;\n prevRefs_1.forEach(function (ref) {\n if (!nextRefs_1.has(ref)) {\n assignRef(ref, null);\n }\n });\n nextRefs_1.forEach(function (ref) {\n if (!prevRefs_1.has(ref)) {\n assignRef(ref, current_1);\n }\n });\n }\n currentValues.set(callbackRef, refs);\n }, [refs]);\n return callbackRef;\n}\n","import { useState } from 'react';\n/**\n * creates a MutableRef with ref change callback\n * @param initialValue - initial ref value\n * @param {Function} callback - a callback to run when value changes\n *\n * @example\n * const ref = useCallbackRef(0, (newValue, oldValue) => console.log(oldValue, '->', newValue);\n * ref.current = 1;\n * // prints 0 -> 1\n *\n * @see https://reactjs.org/docs/hooks-reference.html#useref\n * @see https://github.com/theKashey/use-callback-ref#usecallbackref---to-replace-reactuseref\n * @returns {MutableRefObject}\n */\nexport function useCallbackRef(initialValue, callback) {\n var ref = useState(function () { return ({\n // value\n value: initialValue,\n // last callback\n callback: callback,\n // \"memoized\" public interface\n facade: {\n get current() {\n return ref.value;\n },\n set current(value) {\n var last = ref.value;\n if (last !== value) {\n ref.value = value;\n ref.callback(value, last);\n }\n },\n },\n }); })[0];\n // update callback\n ref.callback = callback;\n return ref.facade;\n}\n","import { __assign } from \"tslib\";\nfunction ItoI(a) {\n return a;\n}\nfunction innerCreateMedium(defaults, middleware) {\n if (middleware === void 0) { middleware = ItoI; }\n var buffer = [];\n var assigned = false;\n var medium = {\n read: function () {\n if (assigned) {\n throw new Error('Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.');\n }\n if (buffer.length) {\n return buffer[buffer.length - 1];\n }\n return defaults;\n },\n useMedium: function (data) {\n var item = middleware(data, assigned);\n buffer.push(item);\n return function () {\n buffer = buffer.filter(function (x) { return x !== item; });\n };\n },\n assignSyncMedium: function (cb) {\n assigned = true;\n while (buffer.length) {\n var cbs = buffer;\n buffer = [];\n cbs.forEach(cb);\n }\n buffer = {\n push: function (x) { return cb(x); },\n filter: function () { return buffer; },\n };\n },\n assignMedium: function (cb) {\n assigned = true;\n var pendingQueue = [];\n if (buffer.length) {\n var cbs = buffer;\n buffer = [];\n cbs.forEach(cb);\n pendingQueue = buffer;\n }\n var executeQueue = function () {\n var cbs = pendingQueue;\n pendingQueue = [];\n cbs.forEach(cb);\n };\n var cycle = function () { return Promise.resolve().then(executeQueue); };\n cycle();\n buffer = {\n push: function (x) {\n pendingQueue.push(x);\n cycle();\n },\n filter: function (filter) {\n pendingQueue = pendingQueue.filter(filter);\n return buffer;\n },\n };\n },\n };\n return medium;\n}\nexport function createMedium(defaults, middleware) {\n if (middleware === void 0) { middleware = ItoI; }\n return innerCreateMedium(defaults, middleware);\n}\n// eslint-disable-next-line @typescript-eslint/ban-types\nexport function createSidecarMedium(options) {\n if (options === void 0) { options = {}; }\n var medium = innerCreateMedium(null);\n medium.options = __assign({ async: true, ssr: false }, options);\n return medium;\n}\n","import { __assign, __rest } from \"tslib\";\nimport * as React from 'react';\nvar SideCar = function (_a) {\n var sideCar = _a.sideCar, rest = __rest(_a, [\"sideCar\"]);\n if (!sideCar) {\n throw new Error('Sidecar: please provide `sideCar` property to import the right car');\n }\n var Target = sideCar.read();\n if (!Target) {\n throw new Error('Sidecar medium not found');\n }\n return React.createElement(Target, __assign({}, rest));\n};\nSideCar.isSideCarExport = true;\nexport function exportSidecar(medium, exported) {\n medium.useMedium(exported);\n return SideCar;\n}\n","import { createSidecarMedium } from 'use-sidecar';\nexport var effectCar = createSidecarMedium();\n","import { __assign, __rest } from \"tslib\";\nimport * as React from 'react';\nimport { fullWidthClassName, zeroRightClassName } from 'react-remove-scroll-bar/constants';\nimport { useMergeRefs } from 'use-callback-ref';\nimport { effectCar } from './medium';\nvar nothing = function () {\n return;\n};\n/**\n * Removes scrollbar from the page and contain the scroll within the Lock\n */\nvar RemoveScroll = React.forwardRef(function (props, parentRef) {\n var ref = React.useRef(null);\n var _a = React.useState({\n onScrollCapture: nothing,\n onWheelCapture: nothing,\n onTouchMoveCapture: nothing,\n }), callbacks = _a[0], setCallbacks = _a[1];\n var forwardProps = props.forwardProps, children = props.children, className = props.className, removeScrollBar = props.removeScrollBar, enabled = props.enabled, shards = props.shards, sideCar = props.sideCar, noIsolation = props.noIsolation, inert = props.inert, allowPinchZoom = props.allowPinchZoom, _b = props.as, Container = _b === void 0 ? 'div' : _b, gapMode = props.gapMode, rest = __rest(props, [\"forwardProps\", \"children\", \"className\", \"removeScrollBar\", \"enabled\", \"shards\", \"sideCar\", \"noIsolation\", \"inert\", \"allowPinchZoom\", \"as\", \"gapMode\"]);\n var SideCar = sideCar;\n var containerRef = useMergeRefs([ref, parentRef]);\n var containerProps = __assign(__assign({}, rest), callbacks);\n return (React.createElement(React.Fragment, null,\n enabled && (React.createElement(SideCar, { sideCar: effectCar, removeScrollBar: removeScrollBar, shards: shards, noIsolation: noIsolation, inert: inert, setCallbacks: setCallbacks, allowPinchZoom: !!allowPinchZoom, lockRef: ref, gapMode: gapMode })),\n forwardProps ? (React.cloneElement(React.Children.only(children), __assign(__assign({}, containerProps), { ref: containerRef }))) : (React.createElement(Container, __assign({}, containerProps, { className: className, ref: containerRef }), children))));\n});\nRemoveScroll.defaultProps = {\n enabled: true,\n removeScrollBar: true,\n inert: false,\n};\nRemoveScroll.classNames = {\n fullWidth: fullWidthClassName,\n zeroRight: zeroRightClassName,\n};\nexport { RemoveScroll };\n","export default function _extends() {\n _extends = Object.assign ? Object.assign.bind() : function (target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i];\n for (var key in source) {\n if (Object.prototype.hasOwnProperty.call(source, key)) {\n target[key] = source[key];\n }\n }\n }\n return target;\n };\n return _extends.apply(this, arguments);\n}","/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n'use strict';\n\nvar ReactPropTypesSecret = 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED';\n\nmodule.exports = ReactPropTypesSecret;\n","'use strict';\n\nif (process.env.NODE_ENV === 'production') {\n module.exports = require('./cjs/react-is.production.min.js');\n} else {\n module.exports = require('./cjs/react-is.development.js');\n}\n","/** @license React v16.13.1\n * react-is.production.min.js\n *\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n'use strict';var b=\"function\"===typeof Symbol&&Symbol.for,c=b?Symbol.for(\"react.element\"):60103,d=b?Symbol.for(\"react.portal\"):60106,e=b?Symbol.for(\"react.fragment\"):60107,f=b?Symbol.for(\"react.strict_mode\"):60108,g=b?Symbol.for(\"react.profiler\"):60114,h=b?Symbol.for(\"react.provider\"):60109,k=b?Symbol.for(\"react.context\"):60110,l=b?Symbol.for(\"react.async_mode\"):60111,m=b?Symbol.for(\"react.concurrent_mode\"):60111,n=b?Symbol.for(\"react.forward_ref\"):60112,p=b?Symbol.for(\"react.suspense\"):60113,q=b?\nSymbol.for(\"react.suspense_list\"):60120,r=b?Symbol.for(\"react.memo\"):60115,t=b?Symbol.for(\"react.lazy\"):60116,v=b?Symbol.for(\"react.block\"):60121,w=b?Symbol.for(\"react.fundamental\"):60117,x=b?Symbol.for(\"react.responder\"):60118,y=b?Symbol.for(\"react.scope\"):60119;\nfunction z(a){if(\"object\"===typeof a&&null!==a){var u=a.$$typeof;switch(u){case c:switch(a=a.type,a){case l:case m:case e:case g:case f:case p:return a;default:switch(a=a&&a.$$typeof,a){case k:case n:case t:case r:case h:return a;default:return u}}case d:return u}}}function A(a){return z(a)===m}exports.AsyncMode=l;exports.ConcurrentMode=m;exports.ContextConsumer=k;exports.ContextProvider=h;exports.Element=c;exports.ForwardRef=n;exports.Fragment=e;exports.Lazy=t;exports.Memo=r;exports.Portal=d;\nexports.Profiler=g;exports.StrictMode=f;exports.Suspense=p;exports.isAsyncMode=function(a){return A(a)||z(a)===l};exports.isConcurrentMode=A;exports.isContextConsumer=function(a){return z(a)===k};exports.isContextProvider=function(a){return z(a)===h};exports.isElement=function(a){return\"object\"===typeof a&&null!==a&&a.$$typeof===c};exports.isForwardRef=function(a){return z(a)===n};exports.isFragment=function(a){return z(a)===e};exports.isLazy=function(a){return z(a)===t};\nexports.isMemo=function(a){return z(a)===r};exports.isPortal=function(a){return z(a)===d};exports.isProfiler=function(a){return z(a)===g};exports.isStrictMode=function(a){return z(a)===f};exports.isSuspense=function(a){return z(a)===p};\nexports.isValidElementType=function(a){return\"string\"===typeof a||\"function\"===typeof a||a===e||a===m||a===g||a===f||a===p||a===q||\"object\"===typeof a&&null!==a&&(a.$$typeof===t||a.$$typeof===r||a.$$typeof===h||a.$$typeof===k||a.$$typeof===n||a.$$typeof===w||a.$$typeof===x||a.$$typeof===y||a.$$typeof===v)};exports.typeOf=z;\n","/** @license React v16.13.1\n * react-is.development.js\n *\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n'use strict';\n\n\n\nif (process.env.NODE_ENV !== \"production\") {\n (function() {\n'use strict';\n\n// The Symbol used to tag the ReactElement-like types. If there is no native Symbol\n// nor polyfill, then a plain number is used for performance.\nvar hasSymbol = typeof Symbol === 'function' && Symbol.for;\nvar REACT_ELEMENT_TYPE = hasSymbol ? Symbol.for('react.element') : 0xeac7;\nvar REACT_PORTAL_TYPE = hasSymbol ? Symbol.for('react.portal') : 0xeaca;\nvar REACT_FRAGMENT_TYPE = hasSymbol ? Symbol.for('react.fragment') : 0xeacb;\nvar REACT_STRICT_MODE_TYPE = hasSymbol ? Symbol.for('react.strict_mode') : 0xeacc;\nvar REACT_PROFILER_TYPE = hasSymbol ? Symbol.for('react.profiler') : 0xead2;\nvar REACT_PROVIDER_TYPE = hasSymbol ? Symbol.for('react.provider') : 0xeacd;\nvar REACT_CONTEXT_TYPE = hasSymbol ? Symbol.for('react.context') : 0xeace; // TODO: We don't use AsyncMode or ConcurrentMode anymore. They were temporary\n// (unstable) APIs that have been removed. Can we remove the symbols?\n\nvar REACT_ASYNC_MODE_TYPE = hasSymbol ? Symbol.for('react.async_mode') : 0xeacf;\nvar REACT_CONCURRENT_MODE_TYPE = hasSymbol ? Symbol.for('react.concurrent_mode') : 0xeacf;\nvar REACT_FORWARD_REF_TYPE = hasSymbol ? Symbol.for('react.forward_ref') : 0xead0;\nvar REACT_SUSPENSE_TYPE = hasSymbol ? Symbol.for('react.suspense') : 0xead1;\nvar REACT_SUSPENSE_LIST_TYPE = hasSymbol ? Symbol.for('react.suspense_list') : 0xead8;\nvar REACT_MEMO_TYPE = hasSymbol ? Symbol.for('react.memo') : 0xead3;\nvar REACT_LAZY_TYPE = hasSymbol ? Symbol.for('react.lazy') : 0xead4;\nvar REACT_BLOCK_TYPE = hasSymbol ? Symbol.for('react.block') : 0xead9;\nvar REACT_FUNDAMENTAL_TYPE = hasSymbol ? Symbol.for('react.fundamental') : 0xead5;\nvar REACT_RESPONDER_TYPE = hasSymbol ? Symbol.for('react.responder') : 0xead6;\nvar REACT_SCOPE_TYPE = hasSymbol ? Symbol.for('react.scope') : 0xead7;\n\nfunction isValidElementType(type) {\n return typeof type === 'string' || typeof type === 'function' || // Note: its typeof might be other than 'symbol' or 'number' if it's a polyfill.\n type === REACT_FRAGMENT_TYPE || type === REACT_CONCURRENT_MODE_TYPE || type === REACT_PROFILER_TYPE || type === REACT_STRICT_MODE_TYPE || type === REACT_SUSPENSE_TYPE || type === REACT_SUSPENSE_LIST_TYPE || typeof type === 'object' && type !== null && (type.$$typeof === REACT_LAZY_TYPE || type.$$typeof === REACT_MEMO_TYPE || type.$$typeof === REACT_PROVIDER_TYPE || type.$$typeof === REACT_CONTEXT_TYPE || type.$$typeof === REACT_FORWARD_REF_TYPE || type.$$typeof === REACT_FUNDAMENTAL_TYPE || type.$$typeof === REACT_RESPONDER_TYPE || type.$$typeof === REACT_SCOPE_TYPE || type.$$typeof === REACT_BLOCK_TYPE);\n}\n\nfunction typeOf(object) {\n if (typeof object === 'object' && object !== null) {\n var $$typeof = object.$$typeof;\n\n switch ($$typeof) {\n case REACT_ELEMENT_TYPE:\n var type = object.type;\n\n switch (type) {\n case REACT_ASYNC_MODE_TYPE:\n case REACT_CONCURRENT_MODE_TYPE:\n case REACT_FRAGMENT_TYPE:\n case REACT_PROFILER_TYPE:\n case REACT_STRICT_MODE_TYPE:\n case REACT_SUSPENSE_TYPE:\n return type;\n\n default:\n var $$typeofType = type && type.$$typeof;\n\n switch ($$typeofType) {\n case REACT_CONTEXT_TYPE:\n case REACT_FORWARD_REF_TYPE:\n case REACT_LAZY_TYPE:\n case REACT_MEMO_TYPE:\n case REACT_PROVIDER_TYPE:\n return $$typeofType;\n\n default:\n return $$typeof;\n }\n\n }\n\n case REACT_PORTAL_TYPE:\n return $$typeof;\n }\n }\n\n return undefined;\n} // AsyncMode is deprecated along with isAsyncMode\n\nvar AsyncMode = REACT_ASYNC_MODE_TYPE;\nvar ConcurrentMode = REACT_CONCURRENT_MODE_TYPE;\nvar ContextConsumer = REACT_CONTEXT_TYPE;\nvar ContextProvider = REACT_PROVIDER_TYPE;\nvar Element = REACT_ELEMENT_TYPE;\nvar ForwardRef = REACT_FORWARD_REF_TYPE;\nvar Fragment = REACT_FRAGMENT_TYPE;\nvar Lazy = REACT_LAZY_TYPE;\nvar Memo = REACT_MEMO_TYPE;\nvar Portal = REACT_PORTAL_TYPE;\nvar Profiler = REACT_PROFILER_TYPE;\nvar StrictMode = REACT_STRICT_MODE_TYPE;\nvar Suspense = REACT_SUSPENSE_TYPE;\nvar hasWarnedAboutDeprecatedIsAsyncMode = false; // AsyncMode should be deprecated\n\nfunction isAsyncMode(object) {\n {\n if (!hasWarnedAboutDeprecatedIsAsyncMode) {\n hasWarnedAboutDeprecatedIsAsyncMode = true; // Using console['warn'] to evade Babel and ESLint\n\n console['warn']('The ReactIs.isAsyncMode() alias has been deprecated, ' + 'and will be removed in React 17+. Update your code to use ' + 'ReactIs.isConcurrentMode() instead. It has the exact same API.');\n }\n }\n\n return isConcurrentMode(object) || typeOf(object) === REACT_ASYNC_MODE_TYPE;\n}\nfunction isConcurrentMode(object) {\n return typeOf(object) === REACT_CONCURRENT_MODE_TYPE;\n}\nfunction isContextConsumer(object) {\n return typeOf(object) === REACT_CONTEXT_TYPE;\n}\nfunction isContextProvider(object) {\n return typeOf(object) === REACT_PROVIDER_TYPE;\n}\nfunction isElement(object) {\n return typeof object === 'object' && object !== null && object.$$typeof === REACT_ELEMENT_TYPE;\n}\nfunction isForwardRef(object) {\n return typeOf(object) === REACT_FORWARD_REF_TYPE;\n}\nfunction isFragment(object) {\n return typeOf(object) === REACT_FRAGMENT_TYPE;\n}\nfunction isLazy(object) {\n return typeOf(object) === REACT_LAZY_TYPE;\n}\nfunction isMemo(object) {\n return typeOf(object) === REACT_MEMO_TYPE;\n}\nfunction isPortal(object) {\n return typeOf(object) === REACT_PORTAL_TYPE;\n}\nfunction isProfiler(object) {\n return typeOf(object) === REACT_PROFILER_TYPE;\n}\nfunction isStrictMode(object) {\n return typeOf(object) === REACT_STRICT_MODE_TYPE;\n}\nfunction isSuspense(object) {\n return typeOf(object) === REACT_SUSPENSE_TYPE;\n}\n\nexports.AsyncMode = AsyncMode;\nexports.ConcurrentMode = ConcurrentMode;\nexports.ContextConsumer = ContextConsumer;\nexports.ContextProvider = ContextProvider;\nexports.Element = Element;\nexports.ForwardRef = ForwardRef;\nexports.Fragment = Fragment;\nexports.Lazy = Lazy;\nexports.Memo = Memo;\nexports.Portal = Portal;\nexports.Profiler = Profiler;\nexports.StrictMode = StrictMode;\nexports.Suspense = Suspense;\nexports.isAsyncMode = isAsyncMode;\nexports.isConcurrentMode = isConcurrentMode;\nexports.isContextConsumer = isContextConsumer;\nexports.isContextProvider = isContextProvider;\nexports.isElement = isElement;\nexports.isForwardRef = isForwardRef;\nexports.isFragment = isFragment;\nexports.isLazy = isLazy;\nexports.isMemo = isMemo;\nexports.isPortal = isPortal;\nexports.isProfiler = isProfiler;\nexports.isStrictMode = isStrictMode;\nexports.isSuspense = isSuspense;\nexports.isValidElementType = isValidElementType;\nexports.typeOf = typeOf;\n })();\n}\n","/*\nobject-assign\n(c) Sindre Sorhus\n@license MIT\n*/\n\n'use strict';\n/* eslint-disable no-unused-vars */\nvar getOwnPropertySymbols = Object.getOwnPropertySymbols;\nvar hasOwnProperty = Object.prototype.hasOwnProperty;\nvar propIsEnumerable = Object.prototype.propertyIsEnumerable;\n\nfunction toObject(val) {\n\tif (val === null || val === undefined) {\n\t\tthrow new TypeError('Object.assign cannot be called with null or undefined');\n\t}\n\n\treturn Object(val);\n}\n\nfunction shouldUseNative() {\n\ttry {\n\t\tif (!Object.assign) {\n\t\t\treturn false;\n\t\t}\n\n\t\t// Detect buggy property enumeration order in older V8 versions.\n\n\t\t// https://bugs.chromium.org/p/v8/issues/detail?id=4118\n\t\tvar test1 = new String('abc'); // eslint-disable-line no-new-wrappers\n\t\ttest1[5] = 'de';\n\t\tif (Object.getOwnPropertyNames(test1)[0] === '5') {\n\t\t\treturn false;\n\t\t}\n\n\t\t// https://bugs.chromium.org/p/v8/issues/detail?id=3056\n\t\tvar test2 = {};\n\t\tfor (var i = 0; i < 10; i++) {\n\t\t\ttest2['_' + String.fromCharCode(i)] = i;\n\t\t}\n\t\tvar order2 = Object.getOwnPropertyNames(test2).map(function (n) {\n\t\t\treturn test2[n];\n\t\t});\n\t\tif (order2.join('') !== '0123456789') {\n\t\t\treturn false;\n\t\t}\n\n\t\t// https://bugs.chromium.org/p/v8/issues/detail?id=3056\n\t\tvar test3 = {};\n\t\t'abcdefghijklmnopqrst'.split('').forEach(function (letter) {\n\t\t\ttest3[letter] = letter;\n\t\t});\n\t\tif (Object.keys(Object.assign({}, test3)).join('') !==\n\t\t\t\t'abcdefghijklmnopqrst') {\n\t\t\treturn false;\n\t\t}\n\n\t\treturn true;\n\t} catch (err) {\n\t\t// We don't expect any of the above to throw, but better to be safe.\n\t\treturn false;\n\t}\n}\n\nmodule.exports = shouldUseNative() ? Object.assign : function (target, source) {\n\tvar from;\n\tvar to = toObject(target);\n\tvar symbols;\n\n\tfor (var s = 1; s < arguments.length; s++) {\n\t\tfrom = Object(arguments[s]);\n\n\t\tfor (var key in from) {\n\t\t\tif (hasOwnProperty.call(from, key)) {\n\t\t\t\tto[key] = from[key];\n\t\t\t}\n\t\t}\n\n\t\tif (getOwnPropertySymbols) {\n\t\t\tsymbols = getOwnPropertySymbols(from);\n\t\t\tfor (var i = 0; i < symbols.length; i++) {\n\t\t\t\tif (propIsEnumerable.call(from, symbols[i])) {\n\t\t\t\t\tto[symbols[i]] = from[symbols[i]];\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\treturn to;\n};\n","module.exports = Function.call.bind(Object.prototype.hasOwnProperty);\n","/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nif (process.env.NODE_ENV !== 'production') {\n var ReactIs = require('react-is');\n\n // By explicitly using `prop-types` you are opting into new development behavior.\n // http://fb.me/prop-types-in-prod\n var throwOnDirectAccess = true;\n module.exports = require('./factoryWithTypeCheckers')(ReactIs.isElement, throwOnDirectAccess);\n} else {\n // By explicitly using `prop-types` you are opting into new production behavior.\n // http://fb.me/prop-types-in-prod\n module.exports = require('./factoryWithThrowingShims')();\n}\n","/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n'use strict';\n\nvar ReactIs = require('react-is');\nvar assign = require('object-assign');\n\nvar ReactPropTypesSecret = require('./lib/ReactPropTypesSecret');\nvar has = require('./lib/has');\nvar checkPropTypes = require('./checkPropTypes');\n\nvar printWarning = function() {};\n\nif (process.env.NODE_ENV !== 'production') {\n printWarning = function(text) {\n var message = 'Warning: ' + text;\n if (typeof console !== 'undefined') {\n console.error(message);\n }\n try {\n // --- Welcome to debugging React ---\n // This error was thrown as a convenience so that you can use this stack\n // to find the callsite that caused this warning to fire.\n throw new Error(message);\n } catch (x) {}\n };\n}\n\nfunction emptyFunctionThatReturnsNull() {\n return null;\n}\n\nmodule.exports = function(isValidElement, throwOnDirectAccess) {\n /* global Symbol */\n var ITERATOR_SYMBOL = typeof Symbol === 'function' && Symbol.iterator;\n var FAUX_ITERATOR_SYMBOL = '@@iterator'; // Before Symbol spec.\n\n /**\n * Returns the iterator method function contained on the iterable object.\n *\n * Be sure to invoke the function with the iterable as context:\n *\n * var iteratorFn = getIteratorFn(myIterable);\n * if (iteratorFn) {\n * var iterator = iteratorFn.call(myIterable);\n * ...\n * }\n *\n * @param {?object} maybeIterable\n * @return {?function}\n */\n function getIteratorFn(maybeIterable) {\n var iteratorFn = maybeIterable && (ITERATOR_SYMBOL && maybeIterable[ITERATOR_SYMBOL] || maybeIterable[FAUX_ITERATOR_SYMBOL]);\n if (typeof iteratorFn === 'function') {\n return iteratorFn;\n }\n }\n\n /**\n * Collection of methods that allow declaration and validation of props that are\n * supplied to React components. Example usage:\n *\n * var Props = require('ReactPropTypes');\n * var MyArticle = React.createClass({\n * propTypes: {\n * // An optional string prop named \"description\".\n * description: Props.string,\n *\n * // A required enum prop named \"category\".\n * category: Props.oneOf(['News','Photos']).isRequired,\n *\n * // A prop named \"dialog\" that requires an instance of Dialog.\n * dialog: Props.instanceOf(Dialog).isRequired\n * },\n * render: function() { ... }\n * });\n *\n * A more formal specification of how these methods are used:\n *\n * type := array|bool|func|object|number|string|oneOf([...])|instanceOf(...)\n * decl := ReactPropTypes.{type}(.isRequired)?\n *\n * Each and every declaration produces a function with the same signature. This\n * allows the creation of custom validation functions. For example:\n *\n * var MyLink = React.createClass({\n * propTypes: {\n * // An optional string or URI prop named \"href\".\n * href: function(props, propName, componentName) {\n * var propValue = props[propName];\n * if (propValue != null && typeof propValue !== 'string' &&\n * !(propValue instanceof URI)) {\n * return new Error(\n * 'Expected a string or an URI for ' + propName + ' in ' +\n * componentName\n * );\n * }\n * }\n * },\n * render: function() {...}\n * });\n *\n * @internal\n */\n\n var ANONYMOUS = '<<anonymous>>';\n\n // Important!\n // Keep this list in sync with production version in `./factoryWithThrowingShims.js`.\n var ReactPropTypes = {\n array: createPrimitiveTypeChecker('array'),\n bigint: createPrimitiveTypeChecker('bigint'),\n bool: createPrimitiveTypeChecker('boolean'),\n func: createPrimitiveTypeChecker('function'),\n number: createPrimitiveTypeChecker('number'),\n object: createPrimitiveTypeChecker('object'),\n string: createPrimitiveTypeChecker('string'),\n symbol: createPrimitiveTypeChecker('symbol'),\n\n any: createAnyTypeChecker(),\n arrayOf: createArrayOfTypeChecker,\n element: createElementTypeChecker(),\n elementType: createElementTypeTypeChecker(),\n instanceOf: createInstanceTypeChecker,\n node: createNodeChecker(),\n objectOf: createObjectOfTypeChecker,\n oneOf: createEnumTypeChecker,\n oneOfType: createUnionTypeChecker,\n shape: createShapeTypeChecker,\n exact: createStrictShapeTypeChecker,\n };\n\n /**\n * inlined Object.is polyfill to avoid requiring consumers ship their own\n * https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is\n */\n /*eslint-disable no-self-compare*/\n function is(x, y) {\n // SameValue algorithm\n if (x === y) {\n // Steps 1-5, 7-10\n // Steps 6.b-6.e: +0 != -0\n return x !== 0 || 1 / x === 1 / y;\n } else {\n // Step 6.a: NaN == NaN\n return x !== x && y !== y;\n }\n }\n /*eslint-enable no-self-compare*/\n\n /**\n * We use an Error-like object for backward compatibility as people may call\n * PropTypes directly and inspect their output. However, we don't use real\n * Errors anymore. We don't inspect their stack anyway, and creating them\n * is prohibitively expensive if they are created too often, such as what\n * happens in oneOfType() for any type before the one that matched.\n */\n function PropTypeError(message, data) {\n this.message = message;\n this.data = data && typeof data === 'object' ? data: {};\n this.stack = '';\n }\n // Make `instanceof Error` still work for returned errors.\n PropTypeError.prototype = Error.prototype;\n\n function createChainableTypeChecker(validate) {\n if (process.env.NODE_ENV !== 'production') {\n var manualPropTypeCallCache = {};\n var manualPropTypeWarningCount = 0;\n }\n function checkType(isRequired, props, propName, componentName, location, propFullName, secret) {\n componentName = componentName || ANONYMOUS;\n propFullName = propFullName || propName;\n\n if (secret !== ReactPropTypesSecret) {\n if (throwOnDirectAccess) {\n // New behavior only for users of `prop-types` package\n var err = new Error(\n 'Calling PropTypes validators directly is not supported by the `prop-types` package. ' +\n 'Use `PropTypes.checkPropTypes()` to call them. ' +\n 'Read more at http://fb.me/use-check-prop-types'\n );\n err.name = 'Invariant Violation';\n throw err;\n } else if (process.env.NODE_ENV !== 'production' && typeof console !== 'undefined') {\n // Old behavior for people using React.PropTypes\n var cacheKey = componentName + ':' + propName;\n if (\n !manualPropTypeCallCache[cacheKey] &&\n // Avoid spamming the console because they are often not actionable except for lib authors\n manualPropTypeWarningCount < 3\n ) {\n printWarning(\n 'You are manually calling a React.PropTypes validation ' +\n 'function for the `' + propFullName + '` prop on `' + componentName + '`. This is deprecated ' +\n 'and will throw in the standalone `prop-types` package. ' +\n 'You may be seeing this warning due to a third-party PropTypes ' +\n 'library. See https://fb.me/react-warning-dont-call-proptypes ' + 'for details.'\n );\n manualPropTypeCallCache[cacheKey] = true;\n manualPropTypeWarningCount++;\n }\n }\n }\n if (props[propName] == null) {\n if (isRequired) {\n if (props[propName] === null) {\n return new PropTypeError('The ' + location + ' `' + propFullName + '` is marked as required ' + ('in `' + componentName + '`, but its value is `null`.'));\n }\n return new PropTypeError('The ' + location + ' `' + propFullName + '` is marked as required in ' + ('`' + componentName + '`, but its value is `undefined`.'));\n }\n return null;\n } else {\n return validate(props, propName, componentName, location, propFullName);\n }\n }\n\n var chainedCheckType = checkType.bind(null, false);\n chainedCheckType.isRequired = checkType.bind(null, true);\n\n return chainedCheckType;\n }\n\n function createPrimitiveTypeChecker(expectedType) {\n function validate(props, propName, componentName, location, propFullName, secret) {\n var propValue = props[propName];\n var propType = getPropType(propValue);\n if (propType !== expectedType) {\n // `propValue` being instance of, say, date/regexp, pass the 'object'\n // check, but we can offer a more precise error message here rather than\n // 'of type `object`'.\n var preciseType = getPreciseType(propValue);\n\n return new PropTypeError(\n 'Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + preciseType + '` supplied to `' + componentName + '`, expected ') + ('`' + expectedType + '`.'),\n {expectedType: expectedType}\n );\n }\n return null;\n }\n return createChainableTypeChecker(validate);\n }\n\n function createAnyTypeChecker() {\n return createChainableTypeChecker(emptyFunctionThatReturnsNull);\n }\n\n function createArrayOfTypeChecker(typeChecker) {\n function validate(props, propName, componentName, location, propFullName) {\n if (typeof typeChecker !== 'function') {\n return new PropTypeError('Property `' + propFullName + '` of component `' + componentName + '` has invalid PropType notation inside arrayOf.');\n }\n var propValue = props[propName];\n if (!Array.isArray(propValue)) {\n var propType = getPropType(propValue);\n return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected an array.'));\n }\n for (var i = 0; i < propValue.length; i++) {\n var error = typeChecker(propValue, i, componentName, location, propFullName + '[' + i + ']', ReactPropTypesSecret);\n if (error instanceof Error) {\n return error;\n }\n }\n return null;\n }\n return createChainableTypeChecker(validate);\n }\n\n function createElementTypeChecker() {\n function validate(props, propName, componentName, location, propFullName) {\n var propValue = props[propName];\n if (!isValidElement(propValue)) {\n var propType = getPropType(propValue);\n return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected a single ReactElement.'));\n }\n return null;\n }\n return createChainableTypeChecker(validate);\n }\n\n function createElementTypeTypeChecker() {\n function validate(props, propName, componentName, location, propFullName) {\n var propValue = props[propName];\n if (!ReactIs.isValidElementType(propValue)) {\n var propType = getPropType(propValue);\n return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected a single ReactElement type.'));\n }\n return null;\n }\n return createChainableTypeChecker(validate);\n }\n\n function createInstanceTypeChecker(expectedClass) {\n function validate(props, propName, componentName, location, propFullName) {\n if (!(props[propName] instanceof expectedClass)) {\n var expectedClassName = expectedClass.name || ANONYMOUS;\n var actualClassName = getClassName(props[propName]);\n return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + actualClassName + '` supplied to `' + componentName + '`, expected ') + ('instance of `' + expectedClassName + '`.'));\n }\n return null;\n }\n return createChainableTypeChecker(validate);\n }\n\n function createEnumTypeChecker(expectedValues) {\n if (!Array.isArray(expectedValues)) {\n if (process.env.NODE_ENV !== 'production') {\n if (arguments.length > 1) {\n printWarning(\n 'Invalid arguments supplied to oneOf, expected an array, got ' + arguments.length + ' arguments. ' +\n 'A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z]).'\n );\n } else {\n printWarning('Invalid argument supplied to oneOf, expected an array.');\n }\n }\n return emptyFunctionThatReturnsNull;\n }\n\n function validate(props, propName, componentName, location, propFullName) {\n var propValue = props[propName];\n for (var i = 0; i < expectedValues.length; i++) {\n if (is(propValue, expectedValues[i])) {\n return null;\n }\n }\n\n var valuesString = JSON.stringify(expectedValues, function replacer(key, value) {\n var type = getPreciseType(value);\n if (type === 'symbol') {\n return String(value);\n }\n return value;\n });\n return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of value `' + String(propValue) + '` ' + ('supplied to `' + componentName + '`, expected one of ' + valuesString + '.'));\n }\n return createChainableTypeChecker(validate);\n }\n\n function createObjectOfTypeChecker(typeChecker) {\n function validate(props, propName, componentName, location, propFullName) {\n if (typeof typeChecker !== 'function') {\n return new PropTypeError('Property `' + propFullName + '` of component `' + componentName + '` has invalid PropType notation inside objectOf.');\n }\n var propValue = props[propName];\n var propType = getPropType(propValue);\n if (propType !== 'object') {\n return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected an object.'));\n }\n for (var key in propValue) {\n if (has(propValue, key)) {\n var error = typeChecker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret);\n if (error instanceof Error) {\n return error;\n }\n }\n }\n return null;\n }\n return createChainableTypeChecker(validate);\n }\n\n function createUnionTypeChecker(arrayOfTypeCheckers) {\n if (!Array.isArray(arrayOfTypeCheckers)) {\n process.env.NODE_ENV !== 'production' ? printWarning('Invalid argument supplied to oneOfType, expected an instance of array.') : void 0;\n return emptyFunctionThatReturnsNull;\n }\n\n for (var i = 0; i < arrayOfTypeCheckers.length; i++) {\n var checker = arrayOfTypeCheckers[i];\n if (typeof checker !== 'function') {\n printWarning(\n 'Invalid argument supplied to oneOfType. Expected an array of check functions, but ' +\n 'received ' + getPostfixForTypeWarning(checker) + ' at index ' + i + '.'\n );\n return emptyFunctionThatReturnsNull;\n }\n }\n\n function validate(props, propName, componentName, location, propFullName) {\n var expectedTypes = [];\n for (var i = 0; i < arrayOfTypeCheckers.length; i++) {\n var checker = arrayOfTypeCheckers[i];\n var checkerResult = checker(props, propName, componentName, location, propFullName, ReactPropTypesSecret);\n if (checkerResult == null) {\n return null;\n }\n if (checkerResult.data && has(checkerResult.data, 'expectedType')) {\n expectedTypes.push(checkerResult.data.expectedType);\n }\n }\n var expectedTypesMessage = (expectedTypes.length > 0) ? ', expected one of type [' + expectedTypes.join(', ') + ']': '';\n return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` supplied to ' + ('`' + componentName + '`' + expectedTypesMessage + '.'));\n }\n return createChainableTypeChecker(validate);\n }\n\n function createNodeChecker() {\n function validate(props, propName, componentName, location, propFullName) {\n if (!isNode(props[propName])) {\n return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` supplied to ' + ('`' + componentName + '`, expected a ReactNode.'));\n }\n return null;\n }\n return createChainableTypeChecker(validate);\n }\n\n function invalidValidatorError(componentName, location, propFullName, key, type) {\n return new PropTypeError(\n (componentName || 'React class') + ': ' + location + ' type `' + propFullName + '.' + key + '` is invalid; ' +\n 'it must be a function, usually from the `prop-types` package, but received `' + type + '`.'\n );\n }\n\n function createShapeTypeChecker(shapeTypes) {\n function validate(props, propName, componentName, location, propFullName) {\n var propValue = props[propName];\n var propType = getPropType(propValue);\n if (propType !== 'object') {\n return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type `' + propType + '` ' + ('supplied to `' + componentName + '`, expected `object`.'));\n }\n for (var key in shapeTypes) {\n var checker = shapeTypes[key];\n if (typeof checker !== 'function') {\n return invalidValidatorError(componentName, location, propFullName, key, getPreciseType(checker));\n }\n var error = checker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret);\n if (error) {\n return error;\n }\n }\n return null;\n }\n return createChainableTypeChecker(validate);\n }\n\n function createStrictShapeTypeChecker(shapeTypes) {\n function validate(props, propName, componentName, location, propFullName) {\n var propValue = props[propName];\n var propType = getPropType(propValue);\n if (propType !== 'object') {\n return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type `' + propType + '` ' + ('supplied to `' + componentName + '`, expected `object`.'));\n }\n // We need to check all keys in case some are required but missing from props.\n var allKeys = assign({}, props[propName], shapeTypes);\n for (var key in allKeys) {\n var checker = shapeTypes[key];\n if (has(shapeTypes, key) && typeof checker !== 'function') {\n return invalidValidatorError(componentName, location, propFullName, key, getPreciseType(checker));\n }\n if (!checker) {\n return new PropTypeError(\n 'Invalid ' + location + ' `' + propFullName + '` key `' + key + '` supplied to `' + componentName + '`.' +\n '\\nBad object: ' + JSON.stringify(props[propName], null, ' ') +\n '\\nValid keys: ' + JSON.stringify(Object.keys(shapeTypes), null, ' ')\n );\n }\n var error = checker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret);\n if (error) {\n return error;\n }\n }\n return null;\n }\n\n return createChainableTypeChecker(validate);\n }\n\n function isNode(propValue) {\n switch (typeof propValue) {\n case 'number':\n case 'string':\n case 'undefined':\n return true;\n case 'boolean':\n return !propValue;\n case 'object':\n if (Array.isArray(propValue)) {\n return propValue.every(isNode);\n }\n if (propValue === null || isValidElement(propValue)) {\n return true;\n }\n\n var iteratorFn = getIteratorFn(propValue);\n if (iteratorFn) {\n var iterator = iteratorFn.call(propValue);\n var step;\n if (iteratorFn !== propValue.entries) {\n while (!(step = iterator.next()).done) {\n if (!isNode(step.value)) {\n return false;\n }\n }\n } else {\n // Iterator will provide entry [k,v] tuples rather than values.\n while (!(step = iterator.next()).done) {\n var entry = step.value;\n if (entry) {\n if (!isNode(entry[1])) {\n return false;\n }\n }\n }\n }\n } else {\n return false;\n }\n\n return true;\n default:\n return false;\n }\n }\n\n function isSymbol(propType, propValue) {\n // Native Symbol.\n if (propType === 'symbol') {\n return true;\n }\n\n // falsy value can't be a Symbol\n if (!propValue) {\n return false;\n }\n\n // 19.4.3.5 Symbol.prototype[@@toStringTag] === 'Symbol'\n if (propValue['@@toStringTag'] === 'Symbol') {\n return true;\n }\n\n // Fallback for non-spec compliant Symbols which are polyfilled.\n if (typeof Symbol === 'function' && propValue instanceof Symbol) {\n return true;\n }\n\n return false;\n }\n\n // Equivalent of `typeof` but with special handling for array and regexp.\n function getPropType(propValue) {\n var propType = typeof propValue;\n if (Array.isArray(propValue)) {\n return 'array';\n }\n if (propValue instanceof RegExp) {\n // Old webkits (at least until Android 4.0) return 'function' rather than\n // 'object' for typeof a RegExp. We'll normalize this here so that /bla/\n // passes PropTypes.object.\n return 'object';\n }\n if (isSymbol(propType, propValue)) {\n return 'symbol';\n }\n return propType;\n }\n\n // This handles more types than `getPropType`. Only used for error messages.\n // See `createPrimitiveTypeChecker`.\n function getPreciseType(propValue) {\n if (typeof propValue === 'undefined' || propValue === null) {\n return '' + propValue;\n }\n var propType = getPropType(propValue);\n if (propType === 'object') {\n if (propValue instanceof Date) {\n return 'date';\n } else if (propValue instanceof RegExp) {\n return 'regexp';\n }\n }\n return propType;\n }\n\n // Returns a string that is postfixed to a warning about an invalid type.\n // For example, \"undefined\" or \"of type array\"\n function getPostfixForTypeWarning(value) {\n var type = getPreciseType(value);\n switch (type) {\n case 'array':\n case 'object':\n return 'an ' + type;\n case 'boolean':\n case 'date':\n case 'regexp':\n return 'a ' + type;\n default:\n return type;\n }\n }\n\n // Returns class name of the object, if any.\n function getClassName(propValue) {\n if (!propValue.constructor || !propValue.constructor.name) {\n return ANONYMOUS;\n }\n return propValue.constructor.name;\n }\n\n ReactPropTypes.checkPropTypes = checkPropTypes;\n ReactPropTypes.resetWarningCache = checkPropTypes.resetWarningCache;\n ReactPropTypes.PropTypes = ReactPropTypes;\n\n return ReactPropTypes;\n};\n","/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n'use strict';\n\nvar printWarning = function() {};\n\nif (process.env.NODE_ENV !== 'production') {\n var ReactPropTypesSecret = require('./lib/ReactPropTypesSecret');\n var loggedTypeFailures = {};\n var has = require('./lib/has');\n\n printWarning = function(text) {\n var message = 'Warning: ' + text;\n if (typeof console !== 'undefined') {\n console.error(message);\n }\n try {\n // --- Welcome to debugging React ---\n // This error was thrown as a convenience so that you can use this stack\n // to find the callsite that caused this warning to fire.\n throw new Error(message);\n } catch (x) { /**/ }\n };\n}\n\n/**\n * Assert that the values match with the type specs.\n * Error messages are memorized and will only be shown once.\n *\n * @param {object} typeSpecs Map of name to a ReactPropType\n * @param {object} values Runtime values that need to be type-checked\n * @param {string} location e.g. \"prop\", \"context\", \"child context\"\n * @param {string} componentName Name of the component for error messages.\n * @param {?Function} getStack Returns the component stack.\n * @private\n */\nfunction checkPropTypes(typeSpecs, values, location, componentName, getStack) {\n if (process.env.NODE_ENV !== 'production') {\n for (var typeSpecName in typeSpecs) {\n if (has(typeSpecs, typeSpecName)) {\n var error;\n // Prop type validation may throw. In case they do, we don't want to\n // fail the render phase where it didn't fail before. So we log it.\n // After these have been cleaned up, we'll let them throw.\n try {\n // This is intentionally an invariant that gets caught. It's the same\n // behavior as without this statement except with a better message.\n if (typeof typeSpecs[typeSpecName] !== 'function') {\n var err = Error(\n (componentName || 'React class') + ': ' + location + ' type `' + typeSpecName + '` is invalid; ' +\n 'it must be a function, usually from the `prop-types` package, but received `' + typeof typeSpecs[typeSpecName] + '`.' +\n 'This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.'\n );\n err.name = 'Invariant Violation';\n throw err;\n }\n error = typeSpecs[typeSpecName](values, typeSpecName, componentName, location, null, ReactPropTypesSecret);\n } catch (ex) {\n error = ex;\n }\n if (error && !(error instanceof Error)) {\n printWarning(\n (componentName || 'React class') + ': type specification of ' +\n location + ' `' + typeSpecName + '` is invalid; the type checker ' +\n 'function must return `null` or an `Error` but returned a ' + typeof error + '. ' +\n 'You may have forgotten to pass an argument to the type checker ' +\n 'creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and ' +\n 'shape all require an argument).'\n );\n }\n if (error instanceof Error && !(error.message in loggedTypeFailures)) {\n // Only monitor this failure once because there tends to be a lot of the\n // same error.\n loggedTypeFailures[error.message] = true;\n\n var stack = getStack ? getStack() : '';\n\n printWarning(\n 'Failed ' + location + ' type: ' + error.message + (stack != null ? stack : '')\n );\n }\n }\n }\n }\n}\n\n/**\n * Resets warning cache when testing.\n *\n * @private\n */\ncheckPropTypes.resetWarningCache = function() {\n if (process.env.NODE_ENV !== 'production') {\n loggedTypeFailures = {};\n }\n}\n\nmodule.exports = checkPropTypes;\n","/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n'use strict';\n\nvar ReactPropTypesSecret = require('./lib/ReactPropTypesSecret');\n\nfunction emptyFunction() {}\nfunction emptyFunctionWithReset() {}\nemptyFunctionWithReset.resetWarningCache = emptyFunction;\n\nmodule.exports = function() {\n function shim(props, propName, componentName, location, propFullName, secret) {\n if (secret === ReactPropTypesSecret) {\n // It is still safe when called from React.\n return;\n }\n var err = new Error(\n 'Calling PropTypes validators directly is not supported by the `prop-types` package. ' +\n 'Use PropTypes.checkPropTypes() to call them. ' +\n 'Read more at http://fb.me/use-check-prop-types'\n );\n err.name = 'Invariant Violation';\n throw err;\n };\n shim.isRequired = shim;\n function getShim() {\n return shim;\n };\n // Important!\n // Keep this list in sync with production version in `./factoryWithTypeCheckers.js`.\n var ReactPropTypes = {\n array: shim,\n bigint: shim,\n bool: shim,\n func: shim,\n number: shim,\n object: shim,\n string: shim,\n symbol: shim,\n\n any: shim,\n arrayOf: getShim,\n element: shim,\n elementType: shim,\n instanceOf: getShim,\n node: shim,\n objectOf: getShim,\n oneOf: getShim,\n oneOfType: getShim,\n shape: getShim,\n exact: getShim,\n\n checkPropTypes: emptyFunctionWithReset,\n resetWarningCache: emptyFunction\n };\n\n ReactPropTypes.PropTypes = ReactPropTypes;\n\n return ReactPropTypes;\n};\n","/**\n * defines a focus group\n */\nexport var FOCUS_GROUP = 'data-focus-lock';\n/**\n * disables element discovery inside a group marked by key\n */\nexport var FOCUS_DISABLED = 'data-focus-lock-disabled';\n/**\n * allows uncontrolled focus within the marked area, effectively disabling focus lock for it's content\n */\nexport var FOCUS_ALLOW = 'data-no-focus-lock';\n/**\n * instructs autofocus engine to pick default autofocus inside a given node\n * can be set on the element or container\n */\nexport var FOCUS_AUTO = 'data-autofocus-inside';\n/**\n * instructs autofocus to ignore elements within a given node\n * can be set on the element or container\n */\nexport var FOCUS_NO_AUTOFOCUS = 'data-no-autofocus';\n","import * as React from 'react';\nimport PropTypes from 'prop-types';\nexport var hiddenGuard = {\n width: '1px',\n height: '0px',\n padding: 0,\n overflow: 'hidden',\n position: 'fixed',\n top: '1px',\n left: '1px'\n};\nvar InFocusGuard = function InFocusGuard(_ref) {\n var _ref$children = _ref.children,\n children = _ref$children === void 0 ? null : _ref$children;\n return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(\"div\", {\n key: \"guard-first\",\n \"data-focus-guard\": true,\n \"data-focus-auto-guard\": true,\n style: hiddenGuard\n }), children, children && /*#__PURE__*/React.createElement(\"div\", {\n key: \"guard-last\",\n \"data-focus-guard\": true,\n \"data-focus-auto-guard\": true,\n style: hiddenGuard\n }));\n};\nInFocusGuard.propTypes = process.env.NODE_ENV !== \"production\" ? {\n children: PropTypes.node\n} : {};\nexport default InFocusGuard;","import { createMedium, createSidecarMedium } from 'use-sidecar';\nexport var mediumFocus = createMedium({}, function (_ref) {\n var target = _ref.target,\n currentTarget = _ref.currentTarget;\n return {\n target: target,\n currentTarget: currentTarget\n };\n});\nexport var mediumBlur = createMedium();\nexport var mediumEffect = createMedium();\nexport var mediumSidecar = createSidecarMedium({\n async: true,\n ssr: typeof document !== 'undefined'\n});","import { createContext } from 'react';\nexport var focusScope = /*#__PURE__*/createContext(undefined);","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport * as React from 'react';\nimport { node, bool, string, any, arrayOf, oneOfType, object, func } from 'prop-types';\nimport * as constants from 'focus-lock/constants';\nimport { useMergeRefs } from 'use-callback-ref';\nimport { hiddenGuard } from './FocusGuard';\nimport { mediumFocus, mediumBlur, mediumSidecar } from './medium';\nimport { focusScope } from './scope';\nvar emptyArray = [];\nvar FocusLock = /*#__PURE__*/React.forwardRef(function FocusLockUI(props, parentRef) {\n var _extends2;\n var _React$useState = React.useState(),\n realObserved = _React$useState[0],\n setObserved = _React$useState[1];\n var observed = React.useRef();\n var isActive = React.useRef(false);\n var originalFocusedElement = React.useRef(null);\n var _React$useState2 = React.useState({}),\n update = _React$useState2[1];\n var children = props.children,\n _props$disabled = props.disabled,\n disabled = _props$disabled === void 0 ? false : _props$disabled,\n _props$noFocusGuards = props.noFocusGuards,\n noFocusGuards = _props$noFocusGuards === void 0 ? false : _props$noFocusGuards,\n _props$persistentFocu = props.persistentFocus,\n persistentFocus = _props$persistentFocu === void 0 ? false : _props$persistentFocu,\n _props$crossFrame = props.crossFrame,\n crossFrame = _props$crossFrame === void 0 ? true : _props$crossFrame,\n _props$autoFocus = props.autoFocus,\n autoFocus = _props$autoFocus === void 0 ? true : _props$autoFocus,\n allowTextSelection = props.allowTextSelection,\n group = props.group,\n className = props.className,\n whiteList = props.whiteList,\n hasPositiveIndices = props.hasPositiveIndices,\n _props$shards = props.shards,\n shards = _props$shards === void 0 ? emptyArray : _props$shards,\n _props$as = props.as,\n Container = _props$as === void 0 ? 'div' : _props$as,\n _props$lockProps = props.lockProps,\n containerProps = _props$lockProps === void 0 ? {} : _props$lockProps,\n SideCar = props.sideCar,\n _props$returnFocus = props.returnFocus,\n shouldReturnFocus = _props$returnFocus === void 0 ? false : _props$returnFocus,\n focusOptions = props.focusOptions,\n onActivationCallback = props.onActivation,\n onDeactivationCallback = props.onDeactivation;\n var _React$useState3 = React.useState({}),\n id = _React$useState3[0];\n var onActivation = React.useCallback(function (_ref) {\n var captureFocusRestore = _ref.captureFocusRestore;\n if (!originalFocusedElement.current) {\n var _document;\n var activeElement = (_document = document) == null ? void 0 : _document.activeElement;\n originalFocusedElement.current = activeElement;\n if (activeElement !== document.body) {\n originalFocusedElement.current = captureFocusRestore(activeElement);\n }\n }\n if (observed.current && onActivationCallback) {\n onActivationCallback(observed.current);\n }\n isActive.current = true;\n update();\n }, [onActivationCallback]);\n var onDeactivation = React.useCallback(function () {\n isActive.current = false;\n if (onDeactivationCallback) {\n onDeactivationCallback(observed.current);\n }\n update();\n }, [onDeactivationCallback]);\n var returnFocus = React.useCallback(function (allowDefer) {\n var focusRestore = originalFocusedElement.current;\n if (focusRestore) {\n var returnFocusTo = (typeof focusRestore === 'function' ? focusRestore() : focusRestore) || document.body;\n var howToReturnFocus = typeof shouldReturnFocus === 'function' ? shouldReturnFocus(returnFocusTo) : shouldReturnFocus;\n if (howToReturnFocus) {\n var returnFocusOptions = typeof howToReturnFocus === 'object' ? howToReturnFocus : undefined;\n originalFocusedElement.current = null;\n if (allowDefer) {\n Promise.resolve().then(function () {\n return returnFocusTo.focus(returnFocusOptions);\n });\n } else {\n returnFocusTo.focus(returnFocusOptions);\n }\n }\n }\n }, [shouldReturnFocus]);\n var onFocus = React.useCallback(function (event) {\n if (isActive.current) {\n mediumFocus.useMedium(event);\n }\n }, []);\n var onBlur = mediumBlur.useMedium;\n var setObserveNode = React.useCallback(function (newObserved) {\n if (observed.current !== newObserved) {\n observed.current = newObserved;\n setObserved(newObserved);\n }\n }, []);\n if (process.env.NODE_ENV !== 'production') {\n if (typeof allowTextSelection !== 'undefined') {\n console.warn('React-Focus-Lock: allowTextSelection is deprecated and enabled by default');\n }\n React.useEffect(function () {\n if (!observed.current && typeof Container !== 'string') {\n console.error('FocusLock: could not obtain ref to internal node');\n }\n }, []);\n }\n var lockProps = _extends((_extends2 = {}, _extends2[constants.FOCUS_DISABLED] = disabled && 'disabled', _extends2[constants.FOCUS_GROUP] = group, _extends2), containerProps);\n var hasLeadingGuards = noFocusGuards !== true;\n var hasTailingGuards = hasLeadingGuards && noFocusGuards !== 'tail';\n var mergedRef = useMergeRefs([parentRef, setObserveNode]);\n var focusScopeValue = React.useMemo(function () {\n return {\n observed: observed,\n shards: shards,\n enabled: !disabled,\n active: isActive.current\n };\n }, [disabled, isActive.current, shards, realObserved]);\n return /*#__PURE__*/React.createElement(React.Fragment, null, hasLeadingGuards && [\n /*#__PURE__*/\n React.createElement(\"div\", {\n key: \"guard-first\",\n \"data-focus-guard\": true,\n tabIndex: disabled ? -1 : 0,\n style: hiddenGuard\n }), hasPositiveIndices ? /*#__PURE__*/React.createElement(\"div\", {\n key: \"guard-nearest\",\n \"data-focus-guard\": true,\n tabIndex: disabled ? -1 : 1,\n style: hiddenGuard\n }) : null], !disabled && /*#__PURE__*/React.createElement(SideCar, {\n id: id,\n sideCar: mediumSidecar,\n observed: realObserved,\n disabled: disabled,\n persistentFocus: persistentFocus,\n crossFrame: crossFrame,\n autoFocus: autoFocus,\n whiteList: whiteList,\n shards: shards,\n onActivation: onActivation,\n onDeactivation: onDeactivation,\n returnFocus: returnFocus,\n focusOptions: focusOptions\n }), /*#__PURE__*/React.createElement(Container, _extends({\n ref: mergedRef\n }, lockProps, {\n className: className,\n onBlur: onBlur,\n onFocus: onFocus\n }), /*#__PURE__*/React.createElement(focusScope.Provider, {\n value: focusScopeValue\n }, children)), hasTailingGuards && /*#__PURE__*/React.createElement(\"div\", {\n \"data-focus-guard\": true,\n tabIndex: disabled ? -1 : 0,\n style: hiddenGuard\n }));\n});\nFocusLock.propTypes = process.env.NODE_ENV !== \"production\" ? {\n children: node,\n disabled: bool,\n returnFocus: oneOfType([bool, object, func]),\n focusOptions: object,\n noFocusGuards: bool,\n hasPositiveIndices: bool,\n allowTextSelection: bool,\n autoFocus: bool,\n persistentFocus: bool,\n crossFrame: bool,\n group: string,\n className: string,\n whiteList: func,\n shards: arrayOf(any),\n as: oneOfType([string, func, object]),\n lockProps: object,\n onActivation: func,\n onDeactivation: func,\n sideCar: any.isRequired\n} : {};\nexport default FocusLock;","export function deferAction(action) {\n setTimeout(action, 1);\n}\nexport var inlineProp = function inlineProp(name, value) {\n var obj = {};\n obj[name] = value;\n return obj;\n};\nexport var extractRef = function extractRef(ref) {\n return ref && 'current' in ref ? ref.current : ref;\n};","import { createSidecarMedium } from 'use-sidecar';\nexport var effectCar = createSidecarMedium();\nexport var focusHiddenMarker = 'data-focus-on-hidden';\n","import { __assign, __rest } from \"tslib\";\nimport * as React from 'react';\nimport { RemoveScroll } from 'react-remove-scroll/UI';\nimport ReactFocusLock from 'react-focus-lock/UI';\nimport { effectCar } from './medium';\nvar PREVENT_SCROLL = { preventScroll: true };\nexport var FocusOn = React.forwardRef(function (props, parentRef) {\n var _a = React.useState(false), lockProps = _a[0], setLockProps = _a[1];\n var children = props.children, autoFocus = props.autoFocus, shards = props.shards, crossFrame = props.crossFrame, _b = props.enabled, enabled = _b === void 0 ? true : _b, _c = props.scrollLock, scrollLock = _c === void 0 ? true : _c, _d = props.focusLock, focusLock = _d === void 0 ? true : _d, _e = props.returnFocus, returnFocus = _e === void 0 ? true : _e, inert = props.inert, allowPinchZoom = props.allowPinchZoom, sideCar = props.sideCar, className = props.className, shouldIgnore = props.shouldIgnore, preventScrollOnFocus = props.preventScrollOnFocus, style = props.style, as = props.as, gapMode = props.gapMode, rest = __rest(props, [\"children\", \"autoFocus\", \"shards\", \"crossFrame\", \"enabled\", \"scrollLock\", \"focusLock\", \"returnFocus\", \"inert\", \"allowPinchZoom\", \"sideCar\", \"className\", \"shouldIgnore\", \"preventScrollOnFocus\", \"style\", \"as\", \"gapMode\"]);\n var SideCar = sideCar;\n var onActivation = lockProps.onActivation, onDeactivation = lockProps.onDeactivation, restProps = __rest(lockProps, [\"onActivation\", \"onDeactivation\"]);\n var appliedLockProps = __assign(__assign({}, restProps), { as: as,\n style: style,\n sideCar: sideCar,\n shards: shards,\n allowPinchZoom: allowPinchZoom,\n gapMode: gapMode,\n inert: inert, enabled: enabled && scrollLock });\n return (React.createElement(React.Fragment, null,\n React.createElement(ReactFocusLock, { ref: parentRef, sideCar: sideCar, disabled: !(lockProps && enabled && focusLock), returnFocus: returnFocus, autoFocus: autoFocus, shards: shards, crossFrame: crossFrame, onActivation: onActivation, onDeactivation: onDeactivation, className: className, whiteList: shouldIgnore, lockProps: appliedLockProps, focusOptions: preventScrollOnFocus ? PREVENT_SCROLL : undefined, as: RemoveScroll }, children),\n enabled && (React.createElement(SideCar, __assign({}, rest, { sideCar: effectCar, setLockProps: setLockProps, shards: shards })))));\n});\nexport * from './reExports';\n","export default function _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}","import setPrototypeOf from \"./setPrototypeOf.js\";\nexport default function _inheritsLoose(subClass, superClass) {\n subClass.prototype = Object.create(superClass.prototype);\n subClass.prototype.constructor = subClass;\n setPrototypeOf(subClass, superClass);\n}","export default function _typeof(o) {\n \"@babel/helpers - typeof\";\n\n return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (o) {\n return typeof o;\n } : function (o) {\n return o && \"function\" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? \"symbol\" : typeof o;\n }, _typeof(o);\n}","import _typeof from \"./typeof.js\";\nimport toPrimitive from \"./toPrimitive.js\";\nexport default function _toPropertyKey(arg) {\n var key = toPrimitive(arg, \"string\");\n return _typeof(key) === \"symbol\" ? key : String(key);\n}","import _typeof from \"./typeof.js\";\nexport default function _toPrimitive(input, hint) {\n if (_typeof(input) !== \"object\" || input === null) return input;\n var prim = input[Symbol.toPrimitive];\n if (prim !== undefined) {\n var res = prim.call(input, hint || \"default\");\n if (_typeof(res) !== \"object\") return res;\n throw new TypeError(\"@@toPrimitive must return a primitive value.\");\n }\n return (hint === \"string\" ? String : Number)(input);\n}","/*\nIE11 support\n */\nexport var toArray = function (a) {\n var ret = Array(a.length);\n for (var i = 0; i < a.length; ++i) {\n ret[i] = a[i];\n }\n return ret;\n};\nexport var asArray = function (a) { return (Array.isArray(a) ? a : [a]); };\nexport var getFirst = function (a) { return (Array.isArray(a) ? a[0] : a); };\n","import { FOCUS_NO_AUTOFOCUS } from '../constants';\nvar isElementHidden = function (node) {\n // we can measure only \"elements\"\n // consider others as \"visible\"\n if (node.nodeType !== Node.ELEMENT_NODE) {\n return false;\n }\n var computedStyle = window.getComputedStyle(node, null);\n if (!computedStyle || !computedStyle.getPropertyValue) {\n return false;\n }\n return (computedStyle.getPropertyValue('display') === 'none' || computedStyle.getPropertyValue('visibility') === 'hidden');\n};\nvar getParentNode = function (node) {\n // DOCUMENT_FRAGMENT_NODE can also point on ShadowRoot. In this case .host will point on the next node\n return node.parentNode && node.parentNode.nodeType === Node.DOCUMENT_FRAGMENT_NODE\n ? // eslint-disable-next-line @typescript-eslint/no-explicit-any\n node.parentNode.host\n : node.parentNode;\n};\nvar isTopNode = function (node) {\n // @ts-ignore\n return node === document || (node && node.nodeType === Node.DOCUMENT_NODE);\n};\nvar isInert = function (node) { return node.hasAttribute('inert'); };\n/**\n * @see https://github.com/testing-library/jest-dom/blob/main/src/to-be-visible.js\n */\nvar isVisibleUncached = function (node, checkParent) {\n return !node || isTopNode(node) || (!isElementHidden(node) && !isInert(node) && checkParent(getParentNode(node)));\n};\nexport var isVisibleCached = function (visibilityCache, node) {\n var cached = visibilityCache.get(node);\n if (cached !== undefined) {\n return cached;\n }\n var result = isVisibleUncached(node, isVisibleCached.bind(undefined, visibilityCache));\n visibilityCache.set(node, result);\n return result;\n};\nvar isAutoFocusAllowedUncached = function (node, checkParent) {\n return node && !isTopNode(node) ? (isAutoFocusAllowed(node) ? checkParent(getParentNode(node)) : false) : true;\n};\nexport var isAutoFocusAllowedCached = function (cache, node) {\n var cached = cache.get(node);\n if (cached !== undefined) {\n return cached;\n }\n var result = isAutoFocusAllowedUncached(node, isAutoFocusAllowedCached.bind(undefined, cache));\n cache.set(node, result);\n return result;\n};\nexport var getDataset = function (node) {\n // @ts-ignore\n return node.dataset;\n};\nexport var isHTMLButtonElement = function (node) { return node.tagName === 'BUTTON'; };\nexport var isHTMLInputElement = function (node) { return node.tagName === 'INPUT'; };\nexport var isRadioElement = function (node) {\n return isHTMLInputElement(node) && node.type === 'radio';\n};\nexport var notHiddenInput = function (node) {\n return !((isHTMLInputElement(node) || isHTMLButtonElement(node)) && (node.type === 'hidden' || node.disabled));\n};\nexport var isAutoFocusAllowed = function (node) {\n var attribute = node.getAttribute(FOCUS_NO_AUTOFOCUS);\n return ![true, 'true', ''].includes(attribute);\n};\nexport var isGuard = function (node) { var _a; return Boolean(node && ((_a = getDataset(node)) === null || _a === void 0 ? void 0 : _a.focusGuard)); };\nexport var isNotAGuard = function (node) { return !isGuard(node); };\nexport var isDefined = function (x) { return Boolean(x); };\n","import { toArray } from './array';\nexport var tabSort = function (a, b) {\n var aTab = Math.max(0, a.tabIndex);\n var bTab = Math.max(0, b.tabIndex);\n var tabDiff = aTab - bTab;\n var indexDiff = a.index - b.index;\n if (tabDiff) {\n if (!aTab) {\n return 1;\n }\n if (!bTab) {\n return -1;\n }\n }\n return tabDiff || indexDiff;\n};\nvar getTabIndex = function (node) {\n if (node.tabIndex < 0) {\n // all \"focusable\" elements are already preselected\n // but some might have implicit negative tabIndex\n // return 0 for <audio without tabIndex attribute - it is \"tabbable\"\n if (!node.hasAttribute('tabindex')) {\n return 0;\n }\n }\n return node.tabIndex;\n};\nexport var orderByTabIndex = function (nodes, filterNegative, keepGuards) {\n return toArray(nodes)\n .map(function (node, index) {\n var tabIndex = getTabIndex(node);\n return {\n node: node,\n index: index,\n tabIndex: keepGuards && tabIndex === -1 ? ((node.dataset || {}).focusGuard ? 0 : -1) : tabIndex,\n };\n })\n .filter(function (data) { return !filterNegative || data.tabIndex >= 0; })\n .sort(tabSort);\n};\n","import { FOCUS_AUTO } from '../constants';\nimport { toArray } from './array';\nimport { tabbables } from './tabbables';\nvar queryTabbables = tabbables.join(',');\nvar queryGuardTabbables = \"\".concat(queryTabbables, \", [data-focus-guard]\");\nvar getFocusablesWithShadowDom = function (parent, withGuards) {\n return toArray((parent.shadowRoot || parent).children).reduce(function (acc, child) {\n return acc.concat(child.matches(withGuards ? queryGuardTabbables : queryTabbables) ? [child] : [], getFocusablesWithShadowDom(child));\n }, []);\n};\nvar getFocusablesWithIFrame = function (parent, withGuards) {\n var _a;\n // contentDocument of iframe will be null if current origin cannot access it\n if (parent instanceof HTMLIFrameElement && ((_a = parent.contentDocument) === null || _a === void 0 ? void 0 : _a.body)) {\n return getFocusables([parent.contentDocument.body], withGuards);\n }\n return [parent];\n};\nexport var getFocusables = function (parents, withGuards) {\n return parents.reduce(function (acc, parent) {\n var _a;\n var focusableWithShadowDom = getFocusablesWithShadowDom(parent, withGuards);\n var focusableWithIframes = (_a = []).concat.apply(_a, focusableWithShadowDom.map(function (node) { return getFocusablesWithIFrame(node, withGuards); }));\n return acc.concat(\n // add all tabbables inside and within shadow DOMs in DOM order\n focusableWithIframes, \n // add if node is tabbable itself\n parent.parentNode\n ? toArray(parent.parentNode.querySelectorAll(queryTabbables)).filter(function (node) { return node === parent; })\n : []);\n }, []);\n};\n/**\n * return a list of focusable nodes within an area marked as \"auto-focusable\"\n * @param parent\n */\nexport var getParentAutofocusables = function (parent) {\n var parentFocus = parent.querySelectorAll(\"[\".concat(FOCUS_AUTO, \"]\"));\n return toArray(parentFocus)\n .map(function (node) { return getFocusables([node]); })\n .reduce(function (acc, nodes) { return acc.concat(nodes); }, []);\n};\n","/**\n * list of the object to be considered as focusable\n */\nexport var tabbables = [\n 'button:enabled',\n 'select:enabled',\n 'textarea:enabled',\n 'input:enabled',\n // elements with explicit roles will also use explicit tabindex\n // '[role=\"button\"]',\n 'a[href]',\n 'area[href]',\n 'summary',\n 'iframe',\n 'object',\n 'embed',\n 'audio[controls]',\n 'video[controls]',\n '[tabindex]',\n '[contenteditable]',\n '[autofocus]',\n];\n","import { toArray } from './array';\nimport { isAutoFocusAllowedCached, isVisibleCached, notHiddenInput } from './is';\nimport { orderByTabIndex } from './tabOrder';\nimport { getFocusables, getParentAutofocusables } from './tabUtils';\n/**\n * given list of focusable elements keeps the ones user can interact with\n * @param nodes\n * @param visibilityCache\n */\nexport var filterFocusable = function (nodes, visibilityCache) {\n return toArray(nodes)\n .filter(function (node) { return isVisibleCached(visibilityCache, node); })\n .filter(function (node) { return notHiddenInput(node); });\n};\nexport var filterAutoFocusable = function (nodes, cache) {\n if (cache === void 0) { cache = new Map(); }\n return toArray(nodes).filter(function (node) { return isAutoFocusAllowedCached(cache, node); });\n};\n/**\n * !__WARNING__! Low level API.\n * @returns all tabbable nodes\n *\n * @see {@link getFocusableNodes} to get any focusable element\n *\n * @param topNodes - array of top level HTMLElements to search inside\n * @param visibilityCache - an cache to store intermediate measurements. Expected to be a fresh `new Map` on every call\n */\nexport var getTabbableNodes = function (topNodes, visibilityCache, withGuards) {\n return orderByTabIndex(filterFocusable(getFocusables(topNodes, withGuards), visibilityCache), true, withGuards);\n};\n/**\n * !__WARNING__! Low level API.\n *\n * @returns anything \"focusable\", not only tabbable. The difference is in `tabIndex=-1`\n * (without guards, as long as they are not expected to be ever focused)\n *\n * @see {@link getTabbableNodes} to get only tabble nodes element\n *\n * @param topNodes - array of top level HTMLElements to search inside\n * @param visibilityCache - an cache to store intermediate measurements. Expected to be a fresh `new Map` on every call\n */\nexport var getFocusableNodes = function (topNodes, visibilityCache) {\n return orderByTabIndex(filterFocusable(getFocusables(topNodes), visibilityCache), false);\n};\n/**\n * return list of nodes which are expected to be auto-focused\n * @param topNode\n * @param visibilityCache\n */\nexport var parentAutofocusables = function (topNode, visibilityCache) {\n return filterFocusable(getParentAutofocusables(topNode), visibilityCache);\n};\n/*\n * Determines if element is contained in scope, including nested shadow DOMs\n */\nexport var contains = function (scope, element) {\n if (scope.shadowRoot) {\n return contains(scope.shadowRoot, element);\n }\n else {\n if (Object.getPrototypeOf(scope).contains !== undefined &&\n Object.getPrototypeOf(scope).contains.call(scope, element)) {\n return true;\n }\n return toArray(scope.children).some(function (child) {\n var _a;\n if (child instanceof HTMLIFrameElement) {\n var iframeBody = (_a = child.contentDocument) === null || _a === void 0 ? void 0 : _a.body;\n if (iframeBody) {\n return contains(iframeBody, element);\n }\n return false;\n }\n return contains(child, element);\n });\n }\n};\n","import { FOCUS_DISABLED, FOCUS_GROUP } from '../constants';\nimport { asArray, toArray } from './array';\n/**\n * in case of multiple nodes nested inside each other\n * keeps only top ones\n * this is O(nlogn)\n * @param nodes\n * @returns {*}\n */\nvar filterNested = function (nodes) {\n var contained = new Set();\n var l = nodes.length;\n for (var i = 0; i < l; i += 1) {\n for (var j = i + 1; j < l; j += 1) {\n var position = nodes[i].compareDocumentPosition(nodes[j]);\n /* eslint-disable no-bitwise */\n if ((position & Node.DOCUMENT_POSITION_CONTAINED_BY) > 0) {\n contained.add(j);\n }\n if ((position & Node.DOCUMENT_POSITION_CONTAINS) > 0) {\n contained.add(i);\n }\n /* eslint-enable */\n }\n }\n return nodes.filter(function (_, index) { return !contained.has(index); });\n};\n/**\n * finds top most parent for a node\n * @param node\n * @returns {*}\n */\nvar getTopParent = function (node) {\n return node.parentNode ? getTopParent(node.parentNode) : node;\n};\n/**\n * returns all \"focus containers\" inside a given node\n * @param node - node or nodes to look inside\n * @returns Element[]\n */\nexport var getAllAffectedNodes = function (node) {\n var nodes = asArray(node);\n return nodes.filter(Boolean).reduce(function (acc, currentNode) {\n var group = currentNode.getAttribute(FOCUS_GROUP);\n acc.push.apply(acc, (group\n ? filterNested(toArray(getTopParent(currentNode).querySelectorAll(\"[\".concat(FOCUS_GROUP, \"=\\\"\").concat(group, \"\\\"]:not([\").concat(FOCUS_DISABLED, \"=\\\"disabled\\\"])\"))))\n : [currentNode]));\n return acc;\n }, []);\n};\n","/**\n * returns active element from document or from nested shadowdoms\n */\nimport { safeProbe } from './safe';\n/**\n * returns current active element. If the active element is a \"container\" itself(shadowRoot or iframe) returns active element inside it\n * @param [inDocument]\n */\nexport var getActiveElement = function (inDocument) {\n if (inDocument === void 0) { inDocument = document; }\n if (!inDocument || !inDocument.activeElement) {\n return undefined;\n }\n var activeElement = inDocument.activeElement;\n return (activeElement.shadowRoot\n ? getActiveElement(activeElement.shadowRoot)\n : activeElement instanceof HTMLIFrameElement && safeProbe(function () { return activeElement.contentWindow.document; })\n ? getActiveElement(activeElement.contentWindow.document)\n : activeElement);\n};\n","export var safeProbe = function (cb) {\n try {\n return cb();\n }\n catch (e) {\n return undefined;\n }\n};\n","import { contains } from './utils/DOMutils';\nimport { getAllAffectedNodes } from './utils/all-affected';\nimport { getFirst, toArray } from './utils/array';\nimport { getActiveElement } from './utils/getActiveElement';\nvar focusInFrame = function (frame, activeElement) { return frame === activeElement; };\nvar focusInsideIframe = function (topNode, activeElement) {\n return Boolean(toArray(topNode.querySelectorAll('iframe')).some(function (node) { return focusInFrame(node, activeElement); }));\n};\n/**\n * @returns {Boolean} true, if the current focus is inside given node or nodes.\n * Supports nodes hidden inside shadowDom\n */\nexport var focusInside = function (topNode, activeElement) {\n // const activeElement = document && getActiveElement();\n if (activeElement === void 0) { activeElement = getActiveElement(getFirst(topNode).ownerDocument); }\n if (!activeElement || (activeElement.dataset && activeElement.dataset.focusGuard)) {\n return false;\n }\n return getAllAffectedNodes(topNode).some(function (node) {\n return contains(node, activeElement) || focusInsideIframe(node, activeElement);\n });\n};\n","import { isRadioElement } from './is';\nvar findSelectedRadio = function (node, nodes) {\n return nodes\n .filter(isRadioElement)\n .filter(function (el) { return el.name === node.name; })\n .filter(function (el) { return el.checked; })[0] || node;\n};\nexport var correctNode = function (node, nodes) {\n if (isRadioElement(node) && node.name) {\n return findSelectedRadio(node, nodes);\n }\n return node;\n};\n/**\n * giving a set of radio inputs keeps only selected (tabbable) ones\n * @param nodes\n */\nexport var correctNodes = function (nodes) {\n // IE11 has no Set(array) constructor\n var resultSet = new Set();\n nodes.forEach(function (node) { return resultSet.add(correctNode(node, nodes)); });\n // using filter to support IE11\n return nodes.filter(function (node) { return resultSet.has(node); });\n};\n","import { correctNode } from './correctFocus';\nexport var pickFirstFocus = function (nodes) {\n if (nodes[0] && nodes.length > 1) {\n return correctNode(nodes[0], nodes);\n }\n return nodes[0];\n};\nexport var pickFocusable = function (nodes, node) {\n return nodes.indexOf(correctNode(node, nodes));\n};\n","import { correctNodes } from './utils/correctFocus';\nimport { pickFocusable } from './utils/firstFocus';\nimport { isGuard } from './utils/is';\nexport var NEW_FOCUS = 'NEW_FOCUS';\n/**\n * Main solver for the \"find next focus\" question\n * @param innerNodes - used to control \"return focus\"\n * @param innerTabbables - used to control \"autofocus\"\n * @param outerNodes\n * @param activeElement\n * @param lastNode\n * @returns {number|string|undefined|*}\n */\nexport var newFocus = function (innerNodes, innerTabbables, outerNodes, activeElement, lastNode) {\n var cnt = innerNodes.length;\n var firstFocus = innerNodes[0];\n var lastFocus = innerNodes[cnt - 1];\n var isOnGuard = isGuard(activeElement);\n // focus is inside\n if (activeElement && innerNodes.indexOf(activeElement) >= 0) {\n return undefined;\n }\n var activeIndex = activeElement !== undefined ? outerNodes.indexOf(activeElement) : -1;\n var lastIndex = lastNode ? outerNodes.indexOf(lastNode) : activeIndex;\n var lastNodeInside = lastNode ? innerNodes.indexOf(lastNode) : -1;\n // no active focus (or focus is on the body)\n if (activeIndex === -1) {\n // known fallback\n if (lastNodeInside !== -1) {\n return lastNodeInside;\n }\n return NEW_FOCUS;\n }\n // new focus, nothing to calculate\n if (lastNodeInside === -1) {\n return NEW_FOCUS;\n }\n var indexDiff = activeIndex - lastIndex;\n var firstNodeIndex = outerNodes.indexOf(firstFocus);\n var lastNodeIndex = outerNodes.indexOf(lastFocus);\n var correctedNodes = correctNodes(outerNodes);\n var correctedIndex = activeElement !== undefined ? correctedNodes.indexOf(activeElement) : -1;\n var correctedIndexDiff = correctedIndex - (lastNode ? correctedNodes.indexOf(lastNode) : activeIndex);\n // old focus\n if (!indexDiff && lastNodeInside >= 0) {\n return lastNodeInside;\n }\n // no tabbable elements, autofocus is not possible\n if (innerTabbables.length === 0) {\n // an edge case with no tabbable elements\n // return the last focusable one\n // with some probability this will prevent focus from cycling across the lock, but there is no tabbale elements to cycle to\n return lastNodeInside;\n }\n var returnFirstNode = pickFocusable(innerNodes, innerTabbables[0]);\n var returnLastNode = pickFocusable(innerNodes, innerTabbables[innerTabbables.length - 1]);\n // first element\n if (activeIndex <= firstNodeIndex && isOnGuard && Math.abs(indexDiff) > 1) {\n return returnLastNode;\n }\n // last element\n if (activeIndex >= lastNodeIndex && isOnGuard && Math.abs(indexDiff) > 1) {\n return returnFirstNode;\n }\n // jump out, but not on the guard\n if (indexDiff && Math.abs(correctedIndexDiff) > 1) {\n return lastNodeInside;\n }\n // focus above lock\n if (activeIndex <= firstNodeIndex) {\n return returnLastNode;\n }\n // focus below lock\n if (activeIndex > lastNodeIndex) {\n return returnFirstNode;\n }\n // index is inside tab order, but outside Lock\n if (indexDiff) {\n if (Math.abs(indexDiff) > 1) {\n return lastNodeInside;\n }\n return (cnt + lastNodeInside + indexDiff) % cnt;\n }\n // do nothing\n return undefined;\n};\n","import { filterAutoFocusable } from './DOMutils';\nimport { pickFirstFocus } from './firstFocus';\nimport { getDataset } from './is';\nvar findAutoFocused = function (autoFocusables) {\n return function (node) {\n var _a;\n var autofocus = (_a = getDataset(node)) === null || _a === void 0 ? void 0 : _a.autofocus;\n return (\n // @ts-expect-error\n node.autofocus ||\n //\n (autofocus !== undefined && autofocus !== 'false') ||\n //\n autoFocusables.indexOf(node) >= 0);\n };\n};\nexport var pickAutofocus = function (nodesIndexes, orderedNodes, groups) {\n var nodes = nodesIndexes.map(function (_a) {\n var node = _a.node;\n return node;\n });\n var autoFocusable = filterAutoFocusable(nodes.filter(findAutoFocused(groups)));\n if (autoFocusable && autoFocusable.length) {\n return pickFirstFocus(autoFocusable);\n }\n return pickFirstFocus(filterAutoFocusable(orderedNodes));\n};\n","import { parentAutofocusables } from './DOMutils';\nimport { contains } from './DOMutils';\nimport { asArray } from './array';\nvar getParents = function (node, parents) {\n if (parents === void 0) { parents = []; }\n parents.push(node);\n if (node.parentNode) {\n getParents(node.parentNode.host || node.parentNode, parents);\n }\n return parents;\n};\n/**\n * finds a parent for both nodeA and nodeB\n * @param nodeA\n * @param nodeB\n * @returns {boolean|*}\n */\nexport var getCommonParent = function (nodeA, nodeB) {\n var parentsA = getParents(nodeA);\n var parentsB = getParents(nodeB);\n // tslint:disable-next-line:prefer-for-of\n for (var i = 0; i < parentsA.length; i += 1) {\n var currentParent = parentsA[i];\n if (parentsB.indexOf(currentParent) >= 0) {\n return currentParent;\n }\n }\n return false;\n};\nexport var getTopCommonParent = function (baseActiveElement, leftEntry, rightEntries) {\n var activeElements = asArray(baseActiveElement);\n var leftEntries = asArray(leftEntry);\n var activeElement = activeElements[0];\n var topCommon = false;\n leftEntries.filter(Boolean).forEach(function (entry) {\n topCommon = getCommonParent(topCommon || entry, entry) || topCommon;\n rightEntries.filter(Boolean).forEach(function (subEntry) {\n var common = getCommonParent(activeElement, subEntry);\n if (common) {\n if (!topCommon || contains(common, topCommon)) {\n topCommon = common;\n }\n else {\n topCommon = getCommonParent(common, topCommon);\n }\n }\n });\n });\n // TODO: add assert here?\n return topCommon;\n};\n/**\n * return list of nodes which are expected to be autofocused inside a given top nodes\n * @param entries\n * @param visibilityCache\n */\nexport var allParentAutofocusables = function (entries, visibilityCache) {\n return entries.reduce(function (acc, node) { return acc.concat(parentAutofocusables(node, visibilityCache)); }, []);\n};\n","import { NEW_FOCUS, newFocus } from './solver';\nimport { getFocusableNodes } from './utils/DOMutils';\nimport { getAllAffectedNodes } from './utils/all-affected';\nimport { asArray, getFirst } from './utils/array';\nimport { pickAutofocus } from './utils/auto-focus';\nimport { getActiveElement } from './utils/getActiveElement';\nimport { isDefined, isNotAGuard } from './utils/is';\nimport { allParentAutofocusables, getTopCommonParent } from './utils/parenting';\nvar reorderNodes = function (srcNodes, dstNodes) {\n var remap = new Map();\n // no Set(dstNodes) for IE11 :(\n dstNodes.forEach(function (entity) { return remap.set(entity.node, entity); });\n // remap to dstNodes\n return srcNodes.map(function (node) { return remap.get(node); }).filter(isDefined);\n};\n/**\n * contains the main logic of the `focus-lock` package.\n *\n * ! you probably dont need this function !\n *\n * given top node(s) and the last active element returns the element to be focused next\n * @returns element which should be focused to move focus inside\n * @param topNode\n * @param lastNode\n */\nexport var focusSolver = function (topNode, lastNode) {\n var activeElement = getActiveElement(asArray(topNode).length > 0 ? document : getFirst(topNode).ownerDocument);\n var entries = getAllAffectedNodes(topNode).filter(isNotAGuard);\n var commonParent = getTopCommonParent(activeElement || topNode, topNode, entries);\n var visibilityCache = new Map();\n var anyFocusable = getFocusableNodes(entries, visibilityCache);\n var innerElements = anyFocusable.filter(function (_a) {\n var node = _a.node;\n return isNotAGuard(node);\n });\n if (!innerElements[0]) {\n return undefined;\n }\n var outerNodes = getFocusableNodes([commonParent], visibilityCache).map(function (_a) {\n var node = _a.node;\n return node;\n });\n var orderedInnerElements = reorderNodes(outerNodes, innerElements);\n // collect inner focusable and separately tabbables\n var innerFocusables = orderedInnerElements.map(function (_a) {\n var node = _a.node;\n return node;\n });\n var innerTabbable = orderedInnerElements.filter(function (_a) {\n var tabIndex = _a.tabIndex;\n return tabIndex >= 0;\n }).map(function (_a) {\n var node = _a.node;\n return node;\n });\n var newId = newFocus(innerFocusables, innerTabbable, outerNodes, activeElement, lastNode);\n if (newId === NEW_FOCUS) {\n var focusNode = \n // first try only tabbable, and the fallback to all focusable, as long as at least one element should be picked for focus\n pickAutofocus(anyFocusable, innerTabbable, allParentAutofocusables(entries, visibilityCache)) ||\n pickAutofocus(anyFocusable, innerFocusables, allParentAutofocusables(entries, visibilityCache));\n if (focusNode) {\n return { node: focusNode };\n }\n else {\n console.warn('focus-lock: cannot find any node to move focus into');\n return undefined;\n }\n }\n if (newId === undefined) {\n return newId;\n }\n return orderedInnerElements[newId];\n};\n","export var focusOn = function (target, focusOptions) {\n if (!target) {\n // not clear how, but is possible https://github.com/theKashey/focus-lock/issues/53\n return;\n }\n if ('focus' in target) {\n target.focus(focusOptions);\n }\n if ('contentWindow' in target && target.contentWindow) {\n target.contentWindow.focus();\n }\n};\n","import { focusOn } from './commands';\nimport { focusSolver } from './focusSolver';\nvar guardCount = 0;\nvar lockDisabled = false;\n/**\n * The main functionality of the focus-lock package\n *\n * Contains focus at a given node.\n * The last focused element will help to determine which element(first or last) should be focused.\n * The found element will be focused.\n *\n * This is one time action (move), not a persistent focus-lock\n *\n * HTML markers (see {@link import('./constants').FOCUS_AUTO} constants) can control autofocus\n * @see {@link focusSolver} for the same functionality without autofocus\n */\nexport var moveFocusInside = function (topNode, lastNode, options) {\n if (options === void 0) { options = {}; }\n var focusable = focusSolver(topNode, lastNode);\n // global local side effect to countain recursive lock activation and resolve focus-fighting\n if (lockDisabled) {\n return;\n }\n if (focusable) {\n /** +FOCUS-FIGHTING prevention **/\n if (guardCount > 2) {\n // we have recursive entered back the lock activation\n console.error('FocusLock: focus-fighting detected. Only one focus management system could be active. ' +\n 'See https://github.com/theKashey/focus-lock/#focus-fighting');\n lockDisabled = true;\n setTimeout(function () {\n lockDisabled = false;\n }, 1);\n return;\n }\n guardCount++;\n focusOn(focusable.node, options.focusOptions);\n guardCount--;\n }\n};\n","import { getTabbableNodes } from './utils/DOMutils';\nfunction weakRef(value) {\n if (!value)\n return null;\n var w = value ? new WeakRef(value) : null;\n return function () { return (w === null || w === void 0 ? void 0 : w.deref()) || null; };\n}\nexport var recordElementLocation = function (element) {\n if (!element) {\n return null;\n }\n var stack = [];\n var currentElement = element;\n while (currentElement && currentElement !== document.body) {\n stack.push({\n current: weakRef(currentElement),\n parent: weakRef(currentElement.parentElement),\n left: weakRef(currentElement.previousElementSibling),\n right: weakRef(currentElement.nextElementSibling),\n });\n currentElement = currentElement.parentElement;\n }\n return {\n element: weakRef(element),\n stack: stack,\n ownerDocument: element.ownerDocument,\n };\n};\nvar restoreFocusTo = function (location) {\n var _a, _b, _c, _d, _e;\n if (!location) {\n return undefined;\n }\n var stack = location.stack, ownerDocument = location.ownerDocument;\n var visibilityCache = new Map();\n for (var _i = 0, stack_1 = stack; _i < stack_1.length; _i++) {\n var line = stack_1[_i];\n var parent_1 = (_a = line.parent) === null || _a === void 0 ? void 0 : _a.call(line);\n // is it still here?\n if (parent_1 && ownerDocument.contains(parent_1)) {\n var left = (_b = line.left) === null || _b === void 0 ? void 0 : _b.call(line);\n var savedCurrent = line.current();\n var current = parent_1.contains(savedCurrent) ? savedCurrent : undefined;\n var right = (_c = line.right) === null || _c === void 0 ? void 0 : _c.call(line);\n var focusables = getTabbableNodes([parent_1], visibilityCache);\n var aim = \n // that is element itself\n (_e = (_d = current !== null && current !== void 0 ? current : \n // or something in it's place\n left === null || left === void 0 ? void 0 : left.nextElementSibling) !== null && _d !== void 0 ? _d : \n // or somebody to the right, still close enough\n right) !== null && _e !== void 0 ? _e : \n // or somebody to the left, something?\n left;\n while (aim) {\n for (var _f = 0, focusables_1 = focusables; _f < focusables_1.length; _f++) {\n var focusable = focusables_1[_f];\n if (aim === null || aim === void 0 ? void 0 : aim.contains(focusable.node)) {\n return focusable.node;\n }\n }\n aim = aim.nextElementSibling;\n }\n if (focusables.length) {\n // if parent contains a focusable - move there\n return focusables[0].node;\n }\n }\n }\n // nothing matched\n return undefined;\n};\n/**\n * Captures the current focused element to restore focus as close as possible in the future\n * Handles situations where the focused element is removed from the DOM or no longer focusable\n * moving focus to the closest focusable element\n * @param targetElement - element where focus should be restored\n * @returns a function returning a new element to focus\n */\nexport var captureFocusRestore = function (targetElement) {\n var location = recordElementLocation(targetElement);\n return function () {\n return restoreFocusTo(location);\n };\n};\n","import { focusOn } from './commands';\nimport { getTabbableNodes, contains, getFocusableNodes } from './utils/DOMutils';\nimport { asArray } from './utils/array';\n/**\n * for a given `element` in a given `scope` returns focusable siblings\n * @param element - base element\n * @param scope - common parent. Can be document, but better to narrow it down for performance reasons\n * @returns {prev,next} - references to a focusable element before and after\n * @returns undefined - if operation is not applicable\n */\nexport var getRelativeFocusable = function (element, scope, useTabbables) {\n if (!element || !scope) {\n console.error('no element or scope given');\n return {};\n }\n var shards = asArray(scope);\n if (shards.every(function (shard) { return !contains(shard, element); })) {\n console.error('Active element is not contained in the scope');\n return {};\n }\n var focusables = useTabbables\n ? getTabbableNodes(shards, new Map())\n : getFocusableNodes(shards, new Map());\n var current = focusables.findIndex(function (_a) {\n var node = _a.node;\n return node === element;\n });\n if (current === -1) {\n // an edge case, when anchor element is not found\n return undefined;\n }\n return {\n prev: focusables[current - 1],\n next: focusables[current + 1],\n first: focusables[0],\n last: focusables[focusables.length - 1],\n };\n};\nvar getBoundary = function (shards, useTabbables) {\n var set = useTabbables\n ? getTabbableNodes(asArray(shards), new Map())\n : getFocusableNodes(asArray(shards), new Map());\n return {\n first: set[0],\n last: set[set.length - 1],\n };\n};\nvar defaultOptions = function (options) {\n return Object.assign({\n scope: document.body,\n cycle: true,\n onlyTabbable: true,\n }, options);\n};\nvar moveFocus = function (fromElement, options, cb) {\n if (options === void 0) { options = {}; }\n var newOptions = defaultOptions(options);\n var solution = getRelativeFocusable(fromElement, newOptions.scope, newOptions.onlyTabbable);\n if (!solution) {\n return;\n }\n var target = cb(solution, newOptions.cycle);\n if (target) {\n focusOn(target.node, newOptions.focusOptions);\n }\n};\n/**\n * focuses next element in the tab-order\n * @param fromElement - common parent to scope active element search or tab cycle order\n * @param {FocusNextOptions} [options] - focus options\n */\nexport var focusNextElement = function (fromElement, options) {\n if (options === void 0) { options = {}; }\n moveFocus(fromElement, options, function (_a, cycle) {\n var next = _a.next, first = _a.first;\n return next || (cycle && first);\n });\n};\n/**\n * focuses prev element in the tab order\n * @param fromElement - common parent to scope active element search or tab cycle order\n * @param {FocusNextOptions} [options] - focus options\n */\nexport var focusPrevElement = function (fromElement, options) {\n if (options === void 0) { options = {}; }\n moveFocus(fromElement, options, function (_a, cycle) {\n var prev = _a.prev, last = _a.last;\n return prev || (cycle && last);\n });\n};\nvar pickBoundary = function (scope, options, what) {\n var _a;\n var boundary = getBoundary(scope, (_a = options.onlyTabbable) !== null && _a !== void 0 ? _a : true);\n var node = boundary[what];\n if (node) {\n focusOn(node.node, options.focusOptions);\n }\n};\n/**\n * focuses first element in the tab-order\n * @param {FocusNextOptions} options - focus options\n */\nexport var focusFirstElement = function (scope, options) {\n if (options === void 0) { options = {}; }\n pickBoundary(scope, options, 'first');\n};\n/**\n * focuses last element in the tab order\n * @param {FocusNextOptions} options - focus options\n */\nexport var focusLastElement = function (scope, options) {\n if (options === void 0) { options = {}; }\n pickBoundary(scope, options, 'last');\n};\n","import * as React from 'react';\nimport PropTypes from 'prop-types';\nimport withSideEffect from 'react-clientside-effect';\nimport { moveFocusInside, focusInside, focusIsHidden, expandFocusableNodes, focusNextElement, focusPrevElement, focusFirstElement, focusLastElement, captureFocusRestore } from 'focus-lock';\nimport { deferAction, extractRef } from './util';\nimport { mediumFocus, mediumBlur, mediumEffect } from './medium';\nvar focusOnBody = function focusOnBody() {\n return document && document.activeElement === document.body;\n};\nvar isFreeFocus = function isFreeFocus() {\n return focusOnBody() || focusIsHidden();\n};\nvar lastActiveTrap = null;\nvar lastActiveFocus = null;\nvar lastPortaledElement = null;\nvar focusWasOutsideWindow = false;\nvar defaultWhitelist = function defaultWhitelist() {\n return true;\n};\nvar focusWhitelisted = function focusWhitelisted(activeElement) {\n return (lastActiveTrap.whiteList || defaultWhitelist)(activeElement);\n};\nvar recordPortal = function recordPortal(observerNode, portaledElement) {\n lastPortaledElement = {\n observerNode: observerNode,\n portaledElement: portaledElement\n };\n};\nvar focusIsPortaledPair = function focusIsPortaledPair(element) {\n return lastPortaledElement && lastPortaledElement.portaledElement === element;\n};\nfunction autoGuard(startIndex, end, step, allNodes) {\n var lastGuard = null;\n var i = startIndex;\n do {\n var item = allNodes[i];\n if (item.guard) {\n if (item.node.dataset.focusAutoGuard) {\n lastGuard = item;\n }\n } else if (item.lockItem) {\n if (i !== startIndex) {\n return;\n }\n lastGuard = null;\n } else {\n break;\n }\n } while ((i += step) !== end);\n if (lastGuard) {\n lastGuard.node.tabIndex = 0;\n }\n}\nvar focusWasOutside = function focusWasOutside(crossFrameOption) {\n if (crossFrameOption) {\n return Boolean(focusWasOutsideWindow);\n }\n return focusWasOutsideWindow === 'meanwhile';\n};\nvar checkInHost = function checkInHost(check, el, boundary) {\n return el && (el.host === check && (!el.activeElement || boundary.contains(el.activeElement)) || el.parentNode && checkInHost(check, el.parentNode, boundary));\n};\nvar withinHost = function withinHost(activeElement, workingArea) {\n return workingArea.some(function (area) {\n return checkInHost(activeElement, area, area);\n });\n};\nvar activateTrap = function activateTrap() {\n var result = false;\n if (lastActiveTrap) {\n var _lastActiveTrap = lastActiveTrap,\n observed = _lastActiveTrap.observed,\n persistentFocus = _lastActiveTrap.persistentFocus,\n autoFocus = _lastActiveTrap.autoFocus,\n shards = _lastActiveTrap.shards,\n crossFrame = _lastActiveTrap.crossFrame,\n focusOptions = _lastActiveTrap.focusOptions;\n var workingNode = observed || lastPortaledElement && lastPortaledElement.portaledElement;\n var activeElement = document && document.activeElement;\n if (workingNode) {\n var workingArea = [workingNode].concat(shards.map(extractRef).filter(Boolean));\n if (!activeElement || focusWhitelisted(activeElement)) {\n if (persistentFocus || focusWasOutside(crossFrame) || !isFreeFocus() || !lastActiveFocus && autoFocus) {\n if (workingNode && !(focusInside(workingArea) || activeElement && withinHost(activeElement, workingArea) || focusIsPortaledPair(activeElement, workingNode))) {\n if (document && !lastActiveFocus && activeElement && !autoFocus) {\n if (activeElement.blur) {\n activeElement.blur();\n }\n document.body.focus();\n } else {\n result = moveFocusInside(workingArea, lastActiveFocus, {\n focusOptions: focusOptions\n });\n lastPortaledElement = {};\n }\n }\n focusWasOutsideWindow = false;\n lastActiveFocus = document && document.activeElement;\n }\n }\n if (document && activeElement !== document.activeElement && document.querySelector('[data-focus-auto-guard]')) {\n var newActiveElement = document && document.activeElement;\n var allNodes = expandFocusableNodes(workingArea);\n var focusedIndex = allNodes.map(function (_ref) {\n var node = _ref.node;\n return node;\n }).indexOf(newActiveElement);\n if (focusedIndex > -1) {\n allNodes.filter(function (_ref2) {\n var guard = _ref2.guard,\n node = _ref2.node;\n return guard && node.dataset.focusAutoGuard;\n }).forEach(function (_ref3) {\n var node = _ref3.node;\n return node.removeAttribute('tabIndex');\n });\n autoGuard(focusedIndex, allNodes.length, +1, allNodes);\n autoGuard(focusedIndex, -1, -1, allNodes);\n }\n }\n }\n }\n return result;\n};\nvar onTrap = function onTrap(event) {\n if (activateTrap() && event) {\n event.stopPropagation();\n event.preventDefault();\n }\n};\nvar onBlur = function onBlur() {\n return deferAction(activateTrap);\n};\nvar onFocus = function onFocus(event) {\n var source = event.target;\n var currentNode = event.currentTarget;\n if (!currentNode.contains(source)) {\n recordPortal(currentNode, source);\n }\n};\nvar FocusWatcher = function FocusWatcher() {\n return null;\n};\nvar FocusTrap = function FocusTrap(_ref4) {\n var children = _ref4.children;\n return /*#__PURE__*/React.createElement(\"div\", {\n onBlur: onBlur,\n onFocus: onFocus\n }, children);\n};\nFocusTrap.propTypes = process.env.NODE_ENV !== \"production\" ? {\n children: PropTypes.node.isRequired\n} : {};\nvar onWindowBlur = function onWindowBlur() {\n focusWasOutsideWindow = 'just';\n deferAction(function () {\n focusWasOutsideWindow = 'meanwhile';\n });\n};\nvar attachHandler = function attachHandler() {\n document.addEventListener('focusin', onTrap);\n document.addEventListener('focusout', onBlur);\n window.addEventListener('blur', onWindowBlur);\n};\nvar detachHandler = function detachHandler() {\n document.removeEventListener('focusin', onTrap);\n document.removeEventListener('focusout', onBlur);\n window.removeEventListener('blur', onWindowBlur);\n};\nfunction reducePropsToState(propsList) {\n return propsList.filter(function (_ref5) {\n var disabled = _ref5.disabled;\n return !disabled;\n });\n}\nvar focusLockAPI = {\n moveFocusInside: moveFocusInside,\n focusInside: focusInside,\n focusNextElement: focusNextElement,\n focusPrevElement: focusPrevElement,\n focusFirstElement: focusFirstElement,\n focusLastElement: focusLastElement,\n captureFocusRestore: captureFocusRestore\n};\nfunction handleStateChangeOnClient(traps) {\n var trap = traps.slice(-1)[0];\n if (trap && !lastActiveTrap) {\n attachHandler();\n }\n var lastTrap = lastActiveTrap;\n var sameTrap = lastTrap && trap && trap.id === lastTrap.id;\n lastActiveTrap = trap;\n if (lastTrap && !sameTrap) {\n lastTrap.onDeactivation();\n if (!traps.filter(function (_ref6) {\n var id = _ref6.id;\n return id === lastTrap.id;\n }).length) {\n lastTrap.returnFocus(!trap);\n }\n }\n if (trap) {\n lastActiveFocus = null;\n if (!sameTrap || lastTrap.observed !== trap.observed) {\n trap.onActivation(focusLockAPI);\n }\n activateTrap(true);\n deferAction(activateTrap);\n } else {\n detachHandler();\n lastActiveFocus = null;\n }\n}\nmediumFocus.assignSyncMedium(onFocus);\nmediumBlur.assignMedium(onBlur);\nmediumEffect.assignMedium(function (cb) {\n return cb(focusLockAPI);\n});\nexport default withSideEffect(reducePropsToState, handleStateChangeOnClient)(FocusWatcher);","import { FOCUS_ALLOW } from './constants';\nimport { contains } from './utils/DOMutils';\nimport { toArray } from './utils/array';\nimport { getActiveElement } from './utils/getActiveElement';\n/**\n * checks if focus is hidden FROM the focus-lock\n * ie contained inside a node focus-lock shall ignore\n *\n * This is a utility function coupled with {@link FOCUS_ALLOW} constant\n *\n * @returns {boolean} focus is currently is in \"allow\" area\n */\nexport var focusIsHidden = function (inDocument) {\n if (inDocument === void 0) { inDocument = document; }\n var activeElement = getActiveElement(inDocument);\n if (!activeElement) {\n return false;\n }\n // this does not support setting FOCUS_ALLOW within shadow dom\n return toArray(inDocument.querySelectorAll(\"[\".concat(FOCUS_ALLOW, \"]\"))).some(function (node) { return contains(node, activeElement); });\n};\n","import { getAllAffectedNodes } from './utils/all-affected';\nimport { isGuard, isNotAGuard } from './utils/is';\nimport { getTopCommonParent } from './utils/parenting';\nimport { orderByTabIndex } from './utils/tabOrder';\nimport { getFocusables } from './utils/tabUtils';\n/**\n * traverses all related nodes (including groups) returning a list of all nodes(outer and internal) with meta information\n * This is low-level API!\n * @returns list of focusable elements inside a given top(!) node.\n * @see {@link getFocusableNodes} providing a simpler API\n */\nexport var expandFocusableNodes = function (topNode) {\n var entries = getAllAffectedNodes(topNode).filter(isNotAGuard);\n var commonParent = getTopCommonParent(topNode, topNode, entries);\n var outerNodes = orderByTabIndex(getFocusables([commonParent], true), true, true);\n var innerElements = getFocusables(entries, false);\n return outerNodes.map(function (_a) {\n var node = _a.node, index = _a.index;\n return ({\n node: node,\n index: index,\n lockItem: innerElements.indexOf(node) >= 0,\n guard: isGuard(node),\n });\n });\n};\n","import _inheritsLoose from '@babel/runtime/helpers/esm/inheritsLoose';\nimport _defineProperty from '@babel/runtime/helpers/esm/defineProperty';\nimport React, { PureComponent } from 'react';\n\nfunction withSideEffect(reducePropsToState, handleStateChangeOnClient) {\n if (process.env.NODE_ENV !== \"production\") {\n if (typeof reducePropsToState !== 'function') {\n throw new Error('Expected reducePropsToState to be a function.');\n }\n\n if (typeof handleStateChangeOnClient !== 'function') {\n throw new Error('Expected handleStateChangeOnClient to be a function.');\n }\n }\n\n function getDisplayName(WrappedComponent) {\n return WrappedComponent.displayName || WrappedComponent.name || 'Component';\n }\n\n return function wrap(WrappedComponent) {\n if (process.env.NODE_ENV !== \"production\") {\n if (typeof WrappedComponent !== 'function') {\n throw new Error('Expected WrappedComponent to be a React component.');\n }\n }\n\n var mountedInstances = [];\n var state;\n\n function emitChange() {\n state = reducePropsToState(mountedInstances.map(function (instance) {\n return instance.props;\n }));\n handleStateChangeOnClient(state);\n }\n\n var SideEffect = /*#__PURE__*/function (_PureComponent) {\n _inheritsLoose(SideEffect, _PureComponent);\n\n function SideEffect() {\n return _PureComponent.apply(this, arguments) || this;\n }\n\n // Try to use displayName of wrapped component\n SideEffect.peek = function peek() {\n return state;\n };\n\n var _proto = SideEffect.prototype;\n\n _proto.componentDidMount = function componentDidMount() {\n mountedInstances.push(this);\n emitChange();\n };\n\n _proto.componentDidUpdate = function componentDidUpdate() {\n emitChange();\n };\n\n _proto.componentWillUnmount = function componentWillUnmount() {\n var index = mountedInstances.indexOf(this);\n mountedInstances.splice(index, 1);\n emitChange();\n };\n\n _proto.render = function render() {\n return /*#__PURE__*/React.createElement(WrappedComponent, this.props);\n };\n\n return SideEffect;\n }(PureComponent);\n\n _defineProperty(SideEffect, \"displayName\", \"SideEffect(\" + getDisplayName(WrappedComponent) + \")\");\n\n return SideEffect;\n };\n}\n\nexport default withSideEffect;\n","import toPropertyKey from \"./toPropertyKey.js\";\nexport default function _defineProperty(obj, key, value) {\n key = toPropertyKey(key);\n if (key in obj) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n } else {\n obj[key] = value;\n }\n return obj;\n}","import { exportSidecar } from 'use-sidecar';\nimport FocusTrap from './Trap';\nimport { mediumSidecar } from './medium';\nexport default exportSidecar(mediumSidecar, FocusTrap);","import { getNonce } from 'get-nonce';\nfunction makeStyleTag() {\n if (!document)\n return null;\n var tag = document.createElement('style');\n tag.type = 'text/css';\n var nonce = getNonce();\n if (nonce) {\n tag.setAttribute('nonce', nonce);\n }\n return tag;\n}\nfunction injectStyles(tag, css) {\n // @ts-ignore\n if (tag.styleSheet) {\n // @ts-ignore\n tag.styleSheet.cssText = css;\n }\n else {\n tag.appendChild(document.createTextNode(css));\n }\n}\nfunction insertStyleTag(tag) {\n var head = document.head || document.getElementsByTagName('head')[0];\n head.appendChild(tag);\n}\nexport var stylesheetSingleton = function () {\n var counter = 0;\n var stylesheet = null;\n return {\n add: function (style) {\n if (counter == 0) {\n if ((stylesheet = makeStyleTag())) {\n injectStyles(stylesheet, style);\n insertStyleTag(stylesheet);\n }\n }\n counter++;\n },\n remove: function () {\n counter--;\n if (!counter && stylesheet) {\n stylesheet.parentNode && stylesheet.parentNode.removeChild(stylesheet);\n stylesheet = null;\n }\n },\n };\n};\n","var currentNonce;\nexport var setNonce = function (nonce) {\n currentNonce = nonce;\n};\nexport var getNonce = function () {\n if (currentNonce) {\n return currentNonce;\n }\n if (typeof __webpack_nonce__ !== 'undefined') {\n return __webpack_nonce__;\n }\n return undefined;\n};\n","import { styleHookSingleton } from './hook';\n/**\n * create a Component to add styles on demand\n * - styles are added when first instance is mounted\n * - styles are removed when the last instance is unmounted\n * - changing styles in runtime does nothing unless dynamic is set. But with multiple components that can lead to the undefined behavior\n */\nexport var styleSingleton = function () {\n var useStyle = styleHookSingleton();\n var Sheet = function (_a) {\n var styles = _a.styles, dynamic = _a.dynamic;\n useStyle(styles, dynamic);\n return null;\n };\n return Sheet;\n};\n","import * as React from 'react';\nimport { stylesheetSingleton } from './singleton';\n/**\n * creates a hook to control style singleton\n * @see {@link styleSingleton} for a safer component version\n * @example\n * ```tsx\n * const useStyle = styleHookSingleton();\n * ///\n * useStyle('body { overflow: hidden}');\n */\nexport var styleHookSingleton = function () {\n var sheet = stylesheetSingleton();\n return function (styles, isDynamic) {\n React.useEffect(function () {\n sheet.add(styles);\n return function () {\n sheet.remove();\n };\n }, [styles && isDynamic]);\n };\n};\n","export var zeroGap = {\n left: 0,\n top: 0,\n right: 0,\n gap: 0,\n};\nvar parse = function (x) { return parseInt(x || '', 10) || 0; };\nvar getOffset = function (gapMode) {\n var cs = window.getComputedStyle(document.body);\n var left = cs[gapMode === 'padding' ? 'paddingLeft' : 'marginLeft'];\n var top = cs[gapMode === 'padding' ? 'paddingTop' : 'marginTop'];\n var right = cs[gapMode === 'padding' ? 'paddingRight' : 'marginRight'];\n return [parse(left), parse(top), parse(right)];\n};\nexport var getGapWidth = function (gapMode) {\n if (gapMode === void 0) { gapMode = 'margin'; }\n if (typeof window === 'undefined') {\n return zeroGap;\n }\n var offsets = getOffset(gapMode);\n var documentWidth = document.documentElement.clientWidth;\n var windowWidth = window.innerWidth;\n return {\n left: offsets[0],\n top: offsets[1],\n right: offsets[2],\n gap: Math.max(0, windowWidth - documentWidth + offsets[2] - offsets[0]),\n };\n};\n","import * as React from 'react';\nimport { styleSingleton } from 'react-style-singleton';\nimport { fullWidthClassName, zeroRightClassName, noScrollbarsClassName, removedBarSizeVariable } from './constants';\nimport { getGapWidth } from './utils';\nvar Style = styleSingleton();\nexport var lockAttribute = 'data-scroll-locked';\n// important tip - once we measure scrollBar width and remove them\n// we could not repeat this operation\n// thus we are using style-singleton - only the first \"yet correct\" style will be applied.\nvar getStyles = function (_a, allowRelative, gapMode, important) {\n var left = _a.left, top = _a.top, right = _a.right, gap = _a.gap;\n if (gapMode === void 0) { gapMode = 'margin'; }\n return \"\\n .\".concat(noScrollbarsClassName, \" {\\n overflow: hidden \").concat(important, \";\\n padding-right: \").concat(gap, \"px \").concat(important, \";\\n }\\n body[\").concat(lockAttribute, \"] {\\n overflow: hidden \").concat(important, \";\\n overscroll-behavior: contain;\\n \").concat([\n allowRelative && \"position: relative \".concat(important, \";\"),\n gapMode === 'margin' &&\n \"\\n padding-left: \".concat(left, \"px;\\n padding-top: \").concat(top, \"px;\\n padding-right: \").concat(right, \"px;\\n margin-left:0;\\n margin-top:0;\\n margin-right: \").concat(gap, \"px \").concat(important, \";\\n \"),\n gapMode === 'padding' && \"padding-right: \".concat(gap, \"px \").concat(important, \";\"),\n ]\n .filter(Boolean)\n .join(''), \"\\n }\\n \\n .\").concat(zeroRightClassName, \" {\\n right: \").concat(gap, \"px \").concat(important, \";\\n }\\n \\n .\").concat(fullWidthClassName, \" {\\n margin-right: \").concat(gap, \"px \").concat(important, \";\\n }\\n \\n .\").concat(zeroRightClassName, \" .\").concat(zeroRightClassName, \" {\\n right: 0 \").concat(important, \";\\n }\\n \\n .\").concat(fullWidthClassName, \" .\").concat(fullWidthClassName, \" {\\n margin-right: 0 \").concat(important, \";\\n }\\n \\n body[\").concat(lockAttribute, \"] {\\n \").concat(removedBarSizeVariable, \": \").concat(gap, \"px;\\n }\\n\");\n};\nvar getCurrentUseCounter = function () {\n var counter = parseInt(document.body.getAttribute(lockAttribute) || '0', 10);\n return isFinite(counter) ? counter : 0;\n};\nexport var useLockAttribute = function () {\n React.useEffect(function () {\n document.body.setAttribute(lockAttribute, (getCurrentUseCounter() + 1).toString());\n return function () {\n var newCounter = getCurrentUseCounter() - 1;\n if (newCounter <= 0) {\n document.body.removeAttribute(lockAttribute);\n }\n else {\n document.body.setAttribute(lockAttribute, newCounter.toString());\n }\n };\n }, []);\n};\n/**\n * Removes page scrollbar and blocks page scroll when mounted\n */\nexport var RemoveScrollBar = function (_a) {\n var noRelative = _a.noRelative, noImportant = _a.noImportant, _b = _a.gapMode, gapMode = _b === void 0 ? 'margin' : _b;\n useLockAttribute();\n /*\n gap will be measured on every component mount\n however it will be used only by the \"first\" invocation\n due to singleton nature of <Style\n */\n var gap = React.useMemo(function () { return getGapWidth(gapMode); }, [gapMode]);\n return React.createElement(Style, { styles: getStyles(gap, !noRelative, gapMode, !noImportant ? '!important' : '') });\n};\n","var passiveSupported = false;\nif (typeof window !== 'undefined') {\n try {\n var options = Object.defineProperty({}, 'passive', {\n get: function () {\n passiveSupported = true;\n return true;\n },\n });\n // @ts-ignore\n window.addEventListener('test', options, options);\n // @ts-ignore\n window.removeEventListener('test', options, options);\n }\n catch (err) {\n passiveSupported = false;\n }\n}\nexport var nonPassive = passiveSupported ? { passive: false } : false;\n","var alwaysContainsScroll = function (node) {\n // textarea will always _contain_ scroll inside self. It only can be hidden\n return node.tagName === 'TEXTAREA';\n};\nvar elementCanBeScrolled = function (node, overflow) {\n var styles = window.getComputedStyle(node);\n return (\n // not-not-scrollable\n styles[overflow] !== 'hidden' &&\n // contains scroll inside self\n !(styles.overflowY === styles.overflowX && !alwaysContainsScroll(node) && styles[overflow] === 'visible'));\n};\nvar elementCouldBeVScrolled = function (node) { return elementCanBeScrolled(node, 'overflowY'); };\nvar elementCouldBeHScrolled = function (node) { return elementCanBeScrolled(node, 'overflowX'); };\nexport var locationCouldBeScrolled = function (axis, node) {\n var ownerDocument = node.ownerDocument;\n var current = node;\n do {\n // Skip over shadow root\n if (typeof ShadowRoot !== 'undefined' && current instanceof ShadowRoot) {\n current = current.host;\n }\n var isScrollable = elementCouldBeScrolled(axis, current);\n if (isScrollable) {\n var _a = getScrollVariables(axis, current), s = _a[1], d = _a[2];\n if (s > d) {\n return true;\n }\n }\n current = current.parentNode;\n } while (current && current !== ownerDocument.body);\n return false;\n};\nvar getVScrollVariables = function (_a) {\n var scrollTop = _a.scrollTop, scrollHeight = _a.scrollHeight, clientHeight = _a.clientHeight;\n return [\n scrollTop,\n scrollHeight,\n clientHeight,\n ];\n};\nvar getHScrollVariables = function (_a) {\n var scrollLeft = _a.scrollLeft, scrollWidth = _a.scrollWidth, clientWidth = _a.clientWidth;\n return [\n scrollLeft,\n scrollWidth,\n clientWidth,\n ];\n};\nvar elementCouldBeScrolled = function (axis, node) {\n return axis === 'v' ? elementCouldBeVScrolled(node) : elementCouldBeHScrolled(node);\n};\nvar getScrollVariables = function (axis, node) {\n return axis === 'v' ? getVScrollVariables(node) : getHScrollVariables(node);\n};\nvar getDirectionFactor = function (axis, direction) {\n /**\n * If the element's direction is rtl (right-to-left), then scrollLeft is 0 when the scrollbar is at its rightmost position,\n * and then increasingly negative as you scroll towards the end of the content.\n * @see https://developer.mozilla.org/en-US/docs/Web/API/Element/scrollLeft\n */\n return axis === 'h' && direction === 'rtl' ? -1 : 1;\n};\nexport var handleScroll = function (axis, endTarget, event, sourceDelta, noOverscroll) {\n var directionFactor = getDirectionFactor(axis, window.getComputedStyle(endTarget).direction);\n var delta = directionFactor * sourceDelta;\n // find scrollable target\n var target = event.target;\n var targetInLock = endTarget.contains(target);\n var shouldCancelScroll = false;\n var isDeltaPositive = delta > 0;\n var availableScroll = 0;\n var availableScrollTop = 0;\n do {\n var _a = getScrollVariables(axis, target), position = _a[0], scroll_1 = _a[1], capacity = _a[2];\n var elementScroll = scroll_1 - capacity - directionFactor * position;\n if (position || elementScroll) {\n if (elementCouldBeScrolled(axis, target)) {\n availableScroll += elementScroll;\n availableScrollTop += position;\n }\n }\n if (target instanceof ShadowRoot) {\n target = target.host;\n }\n else {\n target = target.parentNode;\n }\n } while (\n // portaled content\n (!targetInLock && target !== document.body) ||\n // self content\n (targetInLock && (endTarget.contains(target) || endTarget === target)));\n // handle epsilon around 0 (non standard zoom levels)\n if (isDeltaPositive &&\n ((noOverscroll && Math.abs(availableScroll) < 1) || (!noOverscroll && delta > availableScroll))) {\n shouldCancelScroll = true;\n }\n else if (!isDeltaPositive &&\n ((noOverscroll && Math.abs(availableScrollTop) < 1) || (!noOverscroll && -delta > availableScrollTop))) {\n shouldCancelScroll = true;\n }\n return shouldCancelScroll;\n};\n","import { __spreadArray } from \"tslib\";\nimport * as React from 'react';\nimport { RemoveScrollBar } from 'react-remove-scroll-bar';\nimport { styleSingleton } from 'react-style-singleton';\nimport { nonPassive } from './aggresiveCapture';\nimport { handleScroll, locationCouldBeScrolled } from './handleScroll';\nexport var getTouchXY = function (event) {\n return 'changedTouches' in event ? [event.changedTouches[0].clientX, event.changedTouches[0].clientY] : [0, 0];\n};\nexport var getDeltaXY = function (event) { return [event.deltaX, event.deltaY]; };\nvar extractRef = function (ref) {\n return ref && 'current' in ref ? ref.current : ref;\n};\nvar deltaCompare = function (x, y) { return x[0] === y[0] && x[1] === y[1]; };\nvar generateStyle = function (id) { return \"\\n .block-interactivity-\".concat(id, \" {pointer-events: none;}\\n .allow-interactivity-\").concat(id, \" {pointer-events: all;}\\n\"); };\nvar idCounter = 0;\nvar lockStack = [];\nexport function RemoveScrollSideCar(props) {\n var shouldPreventQueue = React.useRef([]);\n var touchStartRef = React.useRef([0, 0]);\n var activeAxis = React.useRef();\n var id = React.useState(idCounter++)[0];\n var Style = React.useState(styleSingleton)[0];\n var lastProps = React.useRef(props);\n React.useEffect(function () {\n lastProps.current = props;\n }, [props]);\n React.useEffect(function () {\n if (props.inert) {\n document.body.classList.add(\"block-interactivity-\".concat(id));\n var allow_1 = __spreadArray([props.lockRef.current], (props.shards || []).map(extractRef), true).filter(Boolean);\n allow_1.forEach(function (el) { return el.classList.add(\"allow-interactivity-\".concat(id)); });\n return function () {\n document.body.classList.remove(\"block-interactivity-\".concat(id));\n allow_1.forEach(function (el) { return el.classList.remove(\"allow-interactivity-\".concat(id)); });\n };\n }\n return;\n }, [props.inert, props.lockRef.current, props.shards]);\n var shouldCancelEvent = React.useCallback(function (event, parent) {\n if ('touches' in event && event.touches.length === 2) {\n return !lastProps.current.allowPinchZoom;\n }\n var touch = getTouchXY(event);\n var touchStart = touchStartRef.current;\n var deltaX = 'deltaX' in event ? event.deltaX : touchStart[0] - touch[0];\n var deltaY = 'deltaY' in event ? event.deltaY : touchStart[1] - touch[1];\n var currentAxis;\n var target = event.target;\n var moveDirection = Math.abs(deltaX) > Math.abs(deltaY) ? 'h' : 'v';\n // allow horizontal touch move on Range inputs. They will not cause any scroll\n if ('touches' in event && moveDirection === 'h' && target.type === 'range') {\n return false;\n }\n var canBeScrolledInMainDirection = locationCouldBeScrolled(moveDirection, target);\n if (!canBeScrolledInMainDirection) {\n return true;\n }\n if (canBeScrolledInMainDirection) {\n currentAxis = moveDirection;\n }\n else {\n currentAxis = moveDirection === 'v' ? 'h' : 'v';\n canBeScrolledInMainDirection = locationCouldBeScrolled(moveDirection, target);\n // other axis might be not scrollable\n }\n if (!canBeScrolledInMainDirection) {\n return false;\n }\n if (!activeAxis.current && 'changedTouches' in event && (deltaX || deltaY)) {\n activeAxis.current = currentAxis;\n }\n if (!currentAxis) {\n return true;\n }\n var cancelingAxis = activeAxis.current || currentAxis;\n return handleScroll(cancelingAxis, parent, event, cancelingAxis === 'h' ? deltaX : deltaY, true);\n }, []);\n var shouldPrevent = React.useCallback(function (_event) {\n var event = _event;\n if (!lockStack.length || lockStack[lockStack.length - 1] !== Style) {\n // not the last active\n return;\n }\n var delta = 'deltaY' in event ? getDeltaXY(event) : getTouchXY(event);\n var sourceEvent = shouldPreventQueue.current.filter(function (e) { return e.name === event.type && (e.target === event.target || event.target === e.shadowParent) && deltaCompare(e.delta, delta); })[0];\n // self event, and should be canceled\n if (sourceEvent && sourceEvent.should) {\n if (event.cancelable) {\n event.preventDefault();\n }\n return;\n }\n // outside or shard event\n if (!sourceEvent) {\n var shardNodes = (lastProps.current.shards || [])\n .map(extractRef)\n .filter(Boolean)\n .filter(function (node) { return node.contains(event.target); });\n var shouldStop = shardNodes.length > 0 ? shouldCancelEvent(event, shardNodes[0]) : !lastProps.current.noIsolation;\n if (shouldStop) {\n if (event.cancelable) {\n event.preventDefault();\n }\n }\n }\n }, []);\n var shouldCancel = React.useCallback(function (name, delta, target, should) {\n var event = { name: name, delta: delta, target: target, should: should, shadowParent: getOutermostShadowParent(target) };\n shouldPreventQueue.current.push(event);\n setTimeout(function () {\n shouldPreventQueue.current = shouldPreventQueue.current.filter(function (e) { return e !== event; });\n }, 1);\n }, []);\n var scrollTouchStart = React.useCallback(function (event) {\n touchStartRef.current = getTouchXY(event);\n activeAxis.current = undefined;\n }, []);\n var scrollWheel = React.useCallback(function (event) {\n shouldCancel(event.type, getDeltaXY(event), event.target, shouldCancelEvent(event, props.lockRef.current));\n }, []);\n var scrollTouchMove = React.useCallback(function (event) {\n shouldCancel(event.type, getTouchXY(event), event.target, shouldCancelEvent(event, props.lockRef.current));\n }, []);\n React.useEffect(function () {\n lockStack.push(Style);\n props.setCallbacks({\n onScrollCapture: scrollWheel,\n onWheelCapture: scrollWheel,\n onTouchMoveCapture: scrollTouchMove,\n });\n document.addEventListener('wheel', shouldPrevent, nonPassive);\n document.addEventListener('touchmove', shouldPrevent, nonPassive);\n document.addEventListener('touchstart', scrollTouchStart, nonPassive);\n return function () {\n lockStack = lockStack.filter(function (inst) { return inst !== Style; });\n document.removeEventListener('wheel', shouldPrevent, nonPassive);\n document.removeEventListener('touchmove', shouldPrevent, nonPassive);\n document.removeEventListener('touchstart', scrollTouchStart, nonPassive);\n };\n }, []);\n var removeScrollBar = props.removeScrollBar, inert = props.inert;\n return (React.createElement(React.Fragment, null,\n inert ? React.createElement(Style, { styles: generateStyle(id) }) : null,\n removeScrollBar ? React.createElement(RemoveScrollBar, { gapMode: props.gapMode }) : null));\n}\nfunction getOutermostShadowParent(node) {\n var shadowParent = null;\n while (node !== null) {\n if (node instanceof ShadowRoot) {\n shadowParent = node.host;\n node = node.host;\n }\n node = node.parentNode;\n }\n return shadowParent;\n}\n","import { exportSidecar } from 'use-sidecar';\nimport { RemoveScrollSideCar } from './SideEffect';\nimport { effectCar } from './medium';\nexport default exportSidecar(effectCar, RemoveScrollSideCar);\n","var getDefaultParent = function (originalTarget) {\n if (typeof document === 'undefined') {\n return null;\n }\n var sampleTarget = Array.isArray(originalTarget) ? originalTarget[0] : originalTarget;\n return sampleTarget.ownerDocument.body;\n};\nvar counterMap = new WeakMap();\nvar uncontrolledNodes = new WeakMap();\nvar markerMap = {};\nvar lockCount = 0;\nvar unwrapHost = function (node) {\n return node && (node.host || unwrapHost(node.parentNode));\n};\nvar correctTargets = function (parent, targets) {\n return targets\n .map(function (target) {\n if (parent.contains(target)) {\n return target;\n }\n var correctedTarget = unwrapHost(target);\n if (correctedTarget && parent.contains(correctedTarget)) {\n return correctedTarget;\n }\n console.error('aria-hidden', target, 'in not contained inside', parent, '. Doing nothing');\n return null;\n })\n .filter(function (x) { return Boolean(x); });\n};\n/**\n * Marks everything except given node(or nodes) as aria-hidden\n * @param {Element | Element[]} originalTarget - elements to keep on the page\n * @param [parentNode] - top element, defaults to document.body\n * @param {String} [markerName] - a special attribute to mark every node\n * @param {String} [controlAttribute] - html Attribute to control\n * @return {Undo} undo command\n */\nvar applyAttributeToOthers = function (originalTarget, parentNode, markerName, controlAttribute) {\n var targets = correctTargets(parentNode, Array.isArray(originalTarget) ? originalTarget : [originalTarget]);\n if (!markerMap[markerName]) {\n markerMap[markerName] = new WeakMap();\n }\n var markerCounter = markerMap[markerName];\n var hiddenNodes = [];\n var elementsToKeep = new Set();\n var elementsToStop = new Set(targets);\n var keep = function (el) {\n if (!el || elementsToKeep.has(el)) {\n return;\n }\n elementsToKeep.add(el);\n keep(el.parentNode);\n };\n targets.forEach(keep);\n var deep = function (parent) {\n if (!parent || elementsToStop.has(parent)) {\n return;\n }\n Array.prototype.forEach.call(parent.children, function (node) {\n if (elementsToKeep.has(node)) {\n deep(node);\n }\n else {\n var attr = node.getAttribute(controlAttribute);\n var alreadyHidden = attr !== null && attr !== 'false';\n var counterValue = (counterMap.get(node) || 0) + 1;\n var markerValue = (markerCounter.get(node) || 0) + 1;\n counterMap.set(node, counterValue);\n markerCounter.set(node, markerValue);\n hiddenNodes.push(node);\n if (counterValue === 1 && alreadyHidden) {\n uncontrolledNodes.set(node, true);\n }\n if (markerValue === 1) {\n node.setAttribute(markerName, 'true');\n }\n if (!alreadyHidden) {\n node.setAttribute(controlAttribute, 'true');\n }\n }\n });\n };\n deep(parentNode);\n elementsToKeep.clear();\n lockCount++;\n return function () {\n hiddenNodes.forEach(function (node) {\n var counterValue = counterMap.get(node) - 1;\n var markerValue = markerCounter.get(node) - 1;\n counterMap.set(node, counterValue);\n markerCounter.set(node, markerValue);\n if (!counterValue) {\n if (!uncontrolledNodes.has(node)) {\n node.removeAttribute(controlAttribute);\n }\n uncontrolledNodes.delete(node);\n }\n if (!markerValue) {\n node.removeAttribute(markerName);\n }\n });\n lockCount--;\n if (!lockCount) {\n // clear\n counterMap = new WeakMap();\n counterMap = new WeakMap();\n uncontrolledNodes = new WeakMap();\n markerMap = {};\n }\n };\n};\n/**\n * Marks everything except given node(or nodes) as aria-hidden\n * @param {Element | Element[]} originalTarget - elements to keep on the page\n * @param [parentNode] - top element, defaults to document.body\n * @param {String} [markerName] - a special attribute to mark every node\n * @return {Undo} undo command\n */\nexport var hideOthers = function (originalTarget, parentNode, markerName) {\n if (markerName === void 0) { markerName = 'data-aria-hidden'; }\n var targets = Array.from(Array.isArray(originalTarget) ? originalTarget : [originalTarget]);\n var activeParentNode = parentNode || getDefaultParent(originalTarget);\n if (!activeParentNode) {\n return function () { return null; };\n }\n // we should not hide ariaLive elements - https://github.com/theKashey/aria-hidden/issues/10\n targets.push.apply(targets, Array.from(activeParentNode.querySelectorAll('[aria-live]')));\n return applyAttributeToOthers(targets, activeParentNode, markerName, 'aria-hidden');\n};\n/**\n * Marks everything except given node(or nodes) as inert\n * @param {Element | Element[]} originalTarget - elements to keep on the page\n * @param [parentNode] - top element, defaults to document.body\n * @param {String} [markerName] - a special attribute to mark every node\n * @return {Undo} undo command\n */\nexport var inertOthers = function (originalTarget, parentNode, markerName) {\n if (markerName === void 0) { markerName = 'data-inert-ed'; }\n var activeParentNode = parentNode || getDefaultParent(originalTarget);\n if (!activeParentNode) {\n return function () { return null; };\n }\n return applyAttributeToOthers(originalTarget, activeParentNode, markerName, 'inert');\n};\n/**\n * @returns if current browser supports inert\n */\nexport var supportsInert = function () {\n return typeof HTMLElement !== 'undefined' && HTMLElement.prototype.hasOwnProperty('inert');\n};\n/**\n * Automatic function to \"suppress\" DOM elements - _hide_ or _inert_ in the best possible way\n * @param {Element | Element[]} originalTarget - elements to keep on the page\n * @param [parentNode] - top element, defaults to document.body\n * @param {String} [markerName] - a special attribute to mark every node\n * @return {Undo} undo command\n */\nexport var suppressOthers = function (originalTarget, parentNode, markerName) {\n if (markerName === void 0) { markerName = 'data-suppressed'; }\n return (supportsInert() ? inertOthers : hideOthers)(originalTarget, parentNode, markerName);\n};\n","import * as React from 'react';\nimport { styleSingleton } from 'react-style-singleton';\nimport { focusHiddenMarker } from './medium';\nvar Style = styleSingleton();\nvar styles = \"\\n [\" + focusHiddenMarker + \"] {\\n pointer-events: none !important;\\n }\\n\";\nexport var InteractivityDisabler = function () { return React.createElement(Style, { styles: styles }); };\n","import { __spreadArrays } from \"tslib\";\nimport * as React from 'react';\nimport { hideOthers } from 'aria-hidden';\nimport { InteractivityDisabler } from './InteractivityDisabler';\nimport { focusHiddenMarker } from './medium';\nimport { useEffect, useRef, useState } from 'react';\nvar extractRef = function (ref) {\n return 'current' in ref ? ref.current : ref;\n};\nexport function Effect(_a) {\n var setLockProps = _a.setLockProps, onEscapeKey = _a.onEscapeKey, onClickOutside = _a.onClickOutside, shards = _a.shards, onActivation = _a.onActivation, onDeactivation = _a.onDeactivation, noIsolation = _a.noIsolation;\n var _b = useState(undefined), activeNode = _b[0], setActiveNode = _b[1];\n var lastEventTarget = useRef(null);\n var mouseTouches = useRef(0);\n React.useEffect(function () {\n var onKeyDown = function (event) {\n if (!event.defaultPrevented) {\n if ((event.code === 'Escape' ||\n event.key === 'Escape' ||\n event.keyCode === 27) &&\n onEscapeKey) {\n onEscapeKey(event);\n }\n }\n };\n var onMouseDown = function (event) {\n if (event.defaultPrevented ||\n event.target === lastEventTarget.current ||\n (event instanceof MouseEvent && event.button !== 0)) {\n return;\n }\n if (shards &&\n shards\n .map(extractRef)\n .some(function (node) {\n return (node && node.contains(event.target)) ||\n node === event.target;\n })) {\n return;\n }\n if (onClickOutside) {\n onClickOutside(event);\n }\n };\n var onTouchStart = function (event) {\n onMouseDown(event);\n mouseTouches.current = event.touches.length;\n };\n var onTouchEnd = function (event) {\n mouseTouches.current = event.touches.length;\n };\n if (activeNode) {\n document.addEventListener('keydown', onKeyDown);\n document.addEventListener('mousedown', onMouseDown);\n document.addEventListener('touchstart', onTouchStart);\n document.addEventListener('touchend', onTouchEnd);\n return function () {\n document.removeEventListener('keydown', onKeyDown);\n document.removeEventListener('mousedown', onMouseDown);\n document.removeEventListener('touchstart', onTouchStart);\n document.removeEventListener('touchend', onTouchEnd);\n };\n }\n }, [activeNode, onClickOutside, onEscapeKey]);\n useEffect(function () {\n if (activeNode) {\n if (onActivation) {\n onActivation(activeNode);\n }\n return function () {\n if (onDeactivation) {\n onDeactivation();\n }\n };\n }\n }, [!!activeNode]);\n useEffect(function () {\n var _undo = function () { return null; };\n var unmounted = false;\n var onNodeActivation = function (node) {\n if (!noIsolation) {\n _undo = hideOthers(__spreadArrays([node], (shards || []).map(extractRef)), document.body, focusHiddenMarker);\n }\n setActiveNode(function () { return node; });\n };\n var onNodeDeactivation = function () {\n _undo();\n if (!unmounted) {\n setActiveNode(null);\n }\n };\n setLockProps({\n onMouseDown: function (e) {\n lastEventTarget.current = e.target;\n },\n onTouchStart: function (e) {\n lastEventTarget.current = e.target;\n },\n onActivation: onNodeActivation,\n onDeactivation: onNodeDeactivation\n });\n return function () {\n unmounted = true;\n setLockProps(false);\n };\n }, []);\n return React.createElement(InteractivityDisabler, null);\n}\n","import { exportSidecar } from 'use-sidecar';\nimport 'react-focus-lock/sidecar';\nimport 'react-remove-scroll/sidecar';\nimport { Effect } from './Effect';\nimport { effectCar } from './medium';\nexport default exportSidecar(effectCar, Effect);\n","import { __assign } from \"tslib\";\nimport * as React from 'react';\nimport { FocusOn as ReactFocusOn } from './UI';\nimport SideCar from './sidecar';\nvar RequireSideCar = function (props) {\n return React.createElement(SideCar, __assign({}, props));\n};\nexport var FocusOn = React.forwardRef(function (props, ref) { return React.createElement(ReactFocusOn, __assign({}, props, { ref: ref, sideCar: RequireSideCar })); });\n","export default {\n disabled: false\n};","import PropTypes from 'prop-types';\nexport var timeoutsShape = process.env.NODE_ENV !== 'production' ? PropTypes.oneOfType([PropTypes.number, PropTypes.shape({\n enter: PropTypes.number,\n exit: PropTypes.number,\n appear: PropTypes.number\n}).isRequired]) : null;\nexport var classNamesShape = process.env.NODE_ENV !== 'production' ? PropTypes.oneOfType([PropTypes.string, PropTypes.shape({\n enter: PropTypes.string,\n exit: PropTypes.string,\n active: PropTypes.string\n}), PropTypes.shape({\n enter: PropTypes.string,\n enterDone: PropTypes.string,\n enterActive: PropTypes.string,\n exit: PropTypes.string,\n exitDone: PropTypes.string,\n exitActive: PropTypes.string\n})]) : null;","import React from 'react';\nexport default React.createContext(null);","import _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nimport _inheritsLoose from \"@babel/runtime/helpers/esm/inheritsLoose\";\nimport PropTypes from 'prop-types';\nimport React from 'react';\nimport ReactDOM from 'react-dom';\nimport config from './config';\nimport { timeoutsShape } from './utils/PropTypes';\nimport TransitionGroupContext from './TransitionGroupContext';\nimport { forceReflow } from './utils/reflow';\nexport var UNMOUNTED = 'unmounted';\nexport var EXITED = 'exited';\nexport var ENTERING = 'entering';\nexport var ENTERED = 'entered';\nexport var EXITING = 'exiting';\n/**\n * The Transition component lets you describe a transition from one component\n * state to another _over time_ with a simple declarative API. Most commonly\n * it's used to animate the mounting and unmounting of a component, but can also\n * be used to describe in-place transition states as well.\n *\n * ---\n *\n * **Note**: `Transition` is a platform-agnostic base component. If you're using\n * transitions in CSS, you'll probably want to use\n * [`CSSTransition`](https://reactcommunity.org/react-transition-group/css-transition)\n * instead. It inherits all the features of `Transition`, but contains\n * additional features necessary to play nice with CSS transitions (hence the\n * name of the component).\n *\n * ---\n *\n * By default the `Transition` component does not alter the behavior of the\n * component it renders, it only tracks \"enter\" and \"exit\" states for the\n * components. It's up to you to give meaning and effect to those states. For\n * example we can add styles to a component when it enters or exits:\n *\n * ```jsx\n * import { Transition } from 'react-transition-group';\n *\n * const duration = 300;\n *\n * const defaultStyle = {\n * transition: `opacity ${duration}ms ease-in-out`,\n * opacity: 0,\n * }\n *\n * const transitionStyles = {\n * entering: { opacity: 1 },\n * entered: { opacity: 1 },\n * exiting: { opacity: 0 },\n * exited: { opacity: 0 },\n * };\n *\n * const Fade = ({ in: inProp }) => (\n * <Transition in={inProp} timeout={duration}>\n * {state => (\n * <div style={{\n * ...defaultStyle,\n * ...transitionStyles[state]\n * }}>\n * I'm a fade Transition!\n * </div>\n * )}\n * </Transition>\n * );\n * ```\n *\n * There are 4 main states a Transition can be in:\n * - `'entering'`\n * - `'entered'`\n * - `'exiting'`\n * - `'exited'`\n *\n * Transition state is toggled via the `in` prop. When `true` the component\n * begins the \"Enter\" stage. During this stage, the component will shift from\n * its current transition state, to `'entering'` for the duration of the\n * transition and then to the `'entered'` stage once it's complete. Let's take\n * the following example (we'll use the\n * [useState](https://reactjs.org/docs/hooks-reference.html#usestate) hook):\n *\n * ```jsx\n * function App() {\n * const [inProp, setInProp] = useState(false);\n * return (\n * <div>\n * <Transition in={inProp} timeout={500}>\n * {state => (\n * // ...\n * )}\n * </Transition>\n * <button onClick={() => setInProp(true)}>\n * Click to Enter\n * </button>\n * </div>\n * );\n * }\n * ```\n *\n * When the button is clicked the component will shift to the `'entering'` state\n * and stay there for 500ms (the value of `timeout`) before it finally switches\n * to `'entered'`.\n *\n * When `in` is `false` the same thing happens except the state moves from\n * `'exiting'` to `'exited'`.\n */\n\nvar Transition = /*#__PURE__*/function (_React$Component) {\n _inheritsLoose(Transition, _React$Component);\n\n function Transition(props, context) {\n var _this;\n\n _this = _React$Component.call(this, props, context) || this;\n var parentGroup = context; // In the context of a TransitionGroup all enters are really appears\n\n var appear = parentGroup && !parentGroup.isMounting ? props.enter : props.appear;\n var initialStatus;\n _this.appearStatus = null;\n\n if (props.in) {\n if (appear) {\n initialStatus = EXITED;\n _this.appearStatus = ENTERING;\n } else {\n initialStatus = ENTERED;\n }\n } else {\n if (props.unmountOnExit || props.mountOnEnter) {\n initialStatus = UNMOUNTED;\n } else {\n initialStatus = EXITED;\n }\n }\n\n _this.state = {\n status: initialStatus\n };\n _this.nextCallback = null;\n return _this;\n }\n\n Transition.getDerivedStateFromProps = function getDerivedStateFromProps(_ref, prevState) {\n var nextIn = _ref.in;\n\n if (nextIn && prevState.status === UNMOUNTED) {\n return {\n status: EXITED\n };\n }\n\n return null;\n } // getSnapshotBeforeUpdate(prevProps) {\n // let nextStatus = null\n // if (prevProps !== this.props) {\n // const { status } = this.state\n // if (this.props.in) {\n // if (status !== ENTERING && status !== ENTERED) {\n // nextStatus = ENTERING\n // }\n // } else {\n // if (status === ENTERING || status === ENTERED) {\n // nextStatus = EXITING\n // }\n // }\n // }\n // return { nextStatus }\n // }\n ;\n\n var _proto = Transition.prototype;\n\n _proto.componentDidMount = function componentDidMount() {\n this.updateStatus(true, this.appearStatus);\n };\n\n _proto.componentDidUpdate = function componentDidUpdate(prevProps) {\n var nextStatus = null;\n\n if (prevProps !== this.props) {\n var status = this.state.status;\n\n if (this.props.in) {\n if (status !== ENTERING && status !== ENTERED) {\n nextStatus = ENTERING;\n }\n } else {\n if (status === ENTERING || status === ENTERED) {\n nextStatus = EXITING;\n }\n }\n }\n\n this.updateStatus(false, nextStatus);\n };\n\n _proto.componentWillUnmount = function componentWillUnmount() {\n this.cancelNextCallback();\n };\n\n _proto.getTimeouts = function getTimeouts() {\n var timeout = this.props.timeout;\n var exit, enter, appear;\n exit = enter = appear = timeout;\n\n if (timeout != null && typeof timeout !== 'number') {\n exit = timeout.exit;\n enter = timeout.enter; // TODO: remove fallback for next major\n\n appear = timeout.appear !== undefined ? timeout.appear : enter;\n }\n\n return {\n exit: exit,\n enter: enter,\n appear: appear\n };\n };\n\n _proto.updateStatus = function updateStatus(mounting, nextStatus) {\n if (mounting === void 0) {\n mounting = false;\n }\n\n if (nextStatus !== null) {\n // nextStatus will always be ENTERING or EXITING.\n this.cancelNextCallback();\n\n if (nextStatus === ENTERING) {\n if (this.props.unmountOnExit || this.props.mountOnEnter) {\n var node = this.props.nodeRef ? this.props.nodeRef.current : ReactDOM.findDOMNode(this); // https://github.com/reactjs/react-transition-group/pull/749\n // With unmountOnExit or mountOnEnter, the enter animation should happen at the transition between `exited` and `entering`.\n // To make the animation happen, we have to separate each rendering and avoid being processed as batched.\n\n if (node) forceReflow(node);\n }\n\n this.performEnter(mounting);\n } else {\n this.performExit();\n }\n } else if (this.props.unmountOnExit && this.state.status === EXITED) {\n this.setState({\n status: UNMOUNTED\n });\n }\n };\n\n _proto.performEnter = function performEnter(mounting) {\n var _this2 = this;\n\n var enter = this.props.enter;\n var appearing = this.context ? this.context.isMounting : mounting;\n\n var _ref2 = this.props.nodeRef ? [appearing] : [ReactDOM.findDOMNode(this), appearing],\n maybeNode = _ref2[0],\n maybeAppearing = _ref2[1];\n\n var timeouts = this.getTimeouts();\n var enterTimeout = appearing ? timeouts.appear : timeouts.enter; // no enter animation skip right to ENTERED\n // if we are mounting and running this it means appear _must_ be set\n\n if (!mounting && !enter || config.disabled) {\n this.safeSetState({\n status: ENTERED\n }, function () {\n _this2.props.onEntered(maybeNode);\n });\n return;\n }\n\n this.props.onEnter(maybeNode, maybeAppearing);\n this.safeSetState({\n status: ENTERING\n }, function () {\n _this2.props.onEntering(maybeNode, maybeAppearing);\n\n _this2.onTransitionEnd(enterTimeout, function () {\n _this2.safeSetState({\n status: ENTERED\n }, function () {\n _this2.props.onEntered(maybeNode, maybeAppearing);\n });\n });\n });\n };\n\n _proto.performExit = function performExit() {\n var _this3 = this;\n\n var exit = this.props.exit;\n var timeouts = this.getTimeouts();\n var maybeNode = this.props.nodeRef ? undefined : ReactDOM.findDOMNode(this); // no exit animation skip right to EXITED\n\n if (!exit || config.disabled) {\n this.safeSetState({\n status: EXITED\n }, function () {\n _this3.props.onExited(maybeNode);\n });\n return;\n }\n\n this.props.onExit(maybeNode);\n this.safeSetState({\n status: EXITING\n }, function () {\n _this3.props.onExiting(maybeNode);\n\n _this3.onTransitionEnd(timeouts.exit, function () {\n _this3.safeSetState({\n status: EXITED\n }, function () {\n _this3.props.onExited(maybeNode);\n });\n });\n });\n };\n\n _proto.cancelNextCallback = function cancelNextCallback() {\n if (this.nextCallback !== null) {\n this.nextCallback.cancel();\n this.nextCallback = null;\n }\n };\n\n _proto.safeSetState = function safeSetState(nextState, callback) {\n // This shouldn't be necessary, but there are weird race conditions with\n // setState callbacks and unmounting in testing, so always make sure that\n // we can cancel any pending setState callbacks after we unmount.\n callback = this.setNextCallback(callback);\n this.setState(nextState, callback);\n };\n\n _proto.setNextCallback = function setNextCallback(callback) {\n var _this4 = this;\n\n var active = true;\n\n this.nextCallback = function (event) {\n if (active) {\n active = false;\n _this4.nextCallback = null;\n callback(event);\n }\n };\n\n this.nextCallback.cancel = function () {\n active = false;\n };\n\n return this.nextCallback;\n };\n\n _proto.onTransitionEnd = function onTransitionEnd(timeout, handler) {\n this.setNextCallback(handler);\n var node = this.props.nodeRef ? this.props.nodeRef.current : ReactDOM.findDOMNode(this);\n var doesNotHaveTimeoutOrListener = timeout == null && !this.props.addEndListener;\n\n if (!node || doesNotHaveTimeoutOrListener) {\n setTimeout(this.nextCallback, 0);\n return;\n }\n\n if (this.props.addEndListener) {\n var _ref3 = this.props.nodeRef ? [this.nextCallback] : [node, this.nextCallback],\n maybeNode = _ref3[0],\n maybeNextCallback = _ref3[1];\n\n this.props.addEndListener(maybeNode, maybeNextCallback);\n }\n\n if (timeout != null) {\n setTimeout(this.nextCallback, timeout);\n }\n };\n\n _proto.render = function render() {\n var status = this.state.status;\n\n if (status === UNMOUNTED) {\n return null;\n }\n\n var _this$props = this.props,\n children = _this$props.children,\n _in = _this$props.in,\n _mountOnEnter = _this$props.mountOnEnter,\n _unmountOnExit = _this$props.unmountOnExit,\n _appear = _this$props.appear,\n _enter = _this$props.enter,\n _exit = _this$props.exit,\n _timeout = _this$props.timeout,\n _addEndListener = _this$props.addEndListener,\n _onEnter = _this$props.onEnter,\n _onEntering = _this$props.onEntering,\n _onEntered = _this$props.onEntered,\n _onExit = _this$props.onExit,\n _onExiting = _this$props.onExiting,\n _onExited = _this$props.onExited,\n _nodeRef = _this$props.nodeRef,\n childProps = _objectWithoutPropertiesLoose(_this$props, [\"children\", \"in\", \"mountOnEnter\", \"unmountOnExit\", \"appear\", \"enter\", \"exit\", \"timeout\", \"addEndListener\", \"onEnter\", \"onEntering\", \"onEntered\", \"onExit\", \"onExiting\", \"onExited\", \"nodeRef\"]);\n\n return (\n /*#__PURE__*/\n // allows for nested Transitions\n React.createElement(TransitionGroupContext.Provider, {\n value: null\n }, typeof children === 'function' ? children(status, childProps) : React.cloneElement(React.Children.only(children), childProps))\n );\n };\n\n return Transition;\n}(React.Component);\n\nTransition.contextType = TransitionGroupContext;\nTransition.propTypes = process.env.NODE_ENV !== \"production\" ? {\n /**\n * A React reference to DOM element that need to transition:\n * https://stackoverflow.com/a/51127130/4671932\n *\n * - When `nodeRef` prop is used, `node` is not passed to callback functions\n * (e.g. `onEnter`) because user already has direct access to the node.\n * - When changing `key` prop of `Transition` in a `TransitionGroup` a new\n * `nodeRef` need to be provided to `Transition` with changed `key` prop\n * (see\n * [test/CSSTransition-test.js](https://github.com/reactjs/react-transition-group/blob/13435f897b3ab71f6e19d724f145596f5910581c/test/CSSTransition-test.js#L362-L437)).\n */\n nodeRef: PropTypes.shape({\n current: typeof Element === 'undefined' ? PropTypes.any : function (propValue, key, componentName, location, propFullName, secret) {\n var value = propValue[key];\n return PropTypes.instanceOf(value && 'ownerDocument' in value ? value.ownerDocument.defaultView.Element : Element)(propValue, key, componentName, location, propFullName, secret);\n }\n }),\n\n /**\n * A `function` child can be used instead of a React element. This function is\n * called with the current transition status (`'entering'`, `'entered'`,\n * `'exiting'`, `'exited'`), which can be used to apply context\n * specific props to a component.\n *\n * ```jsx\n * <Transition in={this.state.in} timeout={150}>\n * {state => (\n * <MyComponent className={`fade fade-${state}`} />\n * )}\n * </Transition>\n * ```\n */\n children: PropTypes.oneOfType([PropTypes.func.isRequired, PropTypes.element.isRequired]).isRequired,\n\n /**\n * Show the component; triggers the enter or exit states\n */\n in: PropTypes.bool,\n\n /**\n * By default the child component is mounted immediately along with\n * the parent `Transition` component. If you want to \"lazy mount\" the component on the\n * first `in={true}` you can set `mountOnEnter`. After the first enter transition the component will stay\n * mounted, even on \"exited\", unless you also specify `unmountOnExit`.\n */\n mountOnEnter: PropTypes.bool,\n\n /**\n * By default the child component stays mounted after it reaches the `'exited'` state.\n * Set `unmountOnExit` if you'd prefer to unmount the component after it finishes exiting.\n */\n unmountOnExit: PropTypes.bool,\n\n /**\n * By default the child component does not perform the enter transition when\n * it first mounts, regardless of the value of `in`. If you want this\n * behavior, set both `appear` and `in` to `true`.\n *\n * > **Note**: there are no special appear states like `appearing`/`appeared`, this prop\n * > only adds an additional enter transition. However, in the\n * > `<CSSTransition>` component that first enter transition does result in\n * > additional `.appear-*` classes, that way you can choose to style it\n * > differently.\n */\n appear: PropTypes.bool,\n\n /**\n * Enable or disable enter transitions.\n */\n enter: PropTypes.bool,\n\n /**\n * Enable or disable exit transitions.\n */\n exit: PropTypes.bool,\n\n /**\n * The duration of the transition, in milliseconds.\n * Required unless `addEndListener` is provided.\n *\n * You may specify a single timeout for all transitions:\n *\n * ```jsx\n * timeout={500}\n * ```\n *\n * or individually:\n *\n * ```jsx\n * timeout={{\n * appear: 500,\n * enter: 300,\n * exit: 500,\n * }}\n * ```\n *\n * - `appear` defaults to the value of `enter`\n * - `enter` defaults to `0`\n * - `exit` defaults to `0`\n *\n * @type {number | { enter?: number, exit?: number, appear?: number }}\n */\n timeout: function timeout(props) {\n var pt = timeoutsShape;\n if (!props.addEndListener) pt = pt.isRequired;\n\n for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n args[_key - 1] = arguments[_key];\n }\n\n return pt.apply(void 0, [props].concat(args));\n },\n\n /**\n * Add a custom transition end trigger. Called with the transitioning\n * DOM node and a `done` callback. Allows for more fine grained transition end\n * logic. Timeouts are still used as a fallback if provided.\n *\n * **Note**: when `nodeRef` prop is passed, `node` is not passed.\n *\n * ```jsx\n * addEndListener={(node, done) => {\n * // use the css transitionend event to mark the finish of a transition\n * node.addEventListener('transitionend', done, false);\n * }}\n * ```\n */\n addEndListener: PropTypes.func,\n\n /**\n * Callback fired before the \"entering\" status is applied. An extra parameter\n * `isAppearing` is supplied to indicate if the enter stage is occurring on the initial mount\n *\n * **Note**: when `nodeRef` prop is passed, `node` is not passed.\n *\n * @type Function(node: HtmlElement, isAppearing: bool) -> void\n */\n onEnter: PropTypes.func,\n\n /**\n * Callback fired after the \"entering\" status is applied. An extra parameter\n * `isAppearing` is supplied to indicate if the enter stage is occurring on the initial mount\n *\n * **Note**: when `nodeRef` prop is passed, `node` is not passed.\n *\n * @type Function(node: HtmlElement, isAppearing: bool)\n */\n onEntering: PropTypes.func,\n\n /**\n * Callback fired after the \"entered\" status is applied. An extra parameter\n * `isAppearing` is supplied to indicate if the enter stage is occurring on the initial mount\n *\n * **Note**: when `nodeRef` prop is passed, `node` is not passed.\n *\n * @type Function(node: HtmlElement, isAppearing: bool) -> void\n */\n onEntered: PropTypes.func,\n\n /**\n * Callback fired before the \"exiting\" status is applied.\n *\n * **Note**: when `nodeRef` prop is passed, `node` is not passed.\n *\n * @type Function(node: HtmlElement) -> void\n */\n onExit: PropTypes.func,\n\n /**\n * Callback fired after the \"exiting\" status is applied.\n *\n * **Note**: when `nodeRef` prop is passed, `node` is not passed.\n *\n * @type Function(node: HtmlElement) -> void\n */\n onExiting: PropTypes.func,\n\n /**\n * Callback fired after the \"exited\" status is applied.\n *\n * **Note**: when `nodeRef` prop is passed, `node` is not passed\n *\n * @type Function(node: HtmlElement) -> void\n */\n onExited: PropTypes.func\n} : {}; // Name the function so it is clearer in the documentation\n\nfunction noop() {}\n\nTransition.defaultProps = {\n in: false,\n mountOnEnter: false,\n unmountOnExit: false,\n appear: false,\n enter: true,\n exit: true,\n onEnter: noop,\n onEntering: noop,\n onEntered: noop,\n onExit: noop,\n onExiting: noop,\n onExited: noop\n};\nTransition.UNMOUNTED = UNMOUNTED;\nTransition.EXITED = EXITED;\nTransition.ENTERING = ENTERING;\nTransition.ENTERED = ENTERED;\nTransition.EXITING = EXITING;\nexport default Transition;","export var forceReflow = function forceReflow(node) {\n return node.scrollTop;\n};","export default function _objectWithoutPropertiesLoose(source, excluded) {\n if (source == null) return {};\n var target = {};\n var sourceKeys = Object.keys(source);\n var key, i;\n for (i = 0; i < sourceKeys.length; i++) {\n key = sourceKeys[i];\n if (excluded.indexOf(key) >= 0) continue;\n target[key] = source[key];\n }\n return target;\n}","import React, {\n HTMLAttributes,\n ReactNode,\n useLayoutEffect,\n useRef,\n useState,\n} from \"react\";\nimport { createPortal } from \"react-dom\";\nimport { FocusOn } from \"react-focus-on\";\nimport { Transition, TransitionStatus } from \"react-transition-group\";\nimport styled from \"styled-components\";\n\nimport { InternalShadowRoundButton } from \"../InternalShadowRoundButton\";\n\nimport { OakBox, OakFlex, OakImage } from \"@/components/atoms\";\nimport { parseOpacity } from \"@/styles/helpers/parseOpacity\";\n\nexport type OakModalProps = {\n /**\n * The content of the modal.\n * Use with `<OakModalBody>` for best results.\n */\n children: ReactNode;\n /**\n * Slot for the footer of the modal.\n * Use with `<OakModalFooter>` for best results.\n */\n footerSlot?: ReactNode;\n /**\n * Indicates whether the modal is open or closed\n */\n isOpen: boolean;\n /**\n * Called when the modal is closed\n */\n onClose: () => void;\n /**\n * The DOM container to render the modal portal into.\n *\n * @default document.body\n */\n domContainer?: Element;\n} & Pick<\n HTMLAttributes<Element>,\n \"aria-label\" | \"aria-description\" | \"aria-labelledby\" | \"aria-describedby\"\n>;\n\nconst FadeOutBox = styled(OakBox)<{ $state: TransitionStatus }>`\n opacity: ${({ $state }) => {\n switch ($state) {\n case \"entered\":\n case \"entering\":\n return parseOpacity(\"semi-transparent\");\n default:\n return parseOpacity(\"transparent\");\n }\n }};\n`;\n\nconst SlideInFlex = styled(OakFlex)<{ $state: TransitionStatus }>`\n transform: ${({ $state }) => {\n switch ($state) {\n case \"entered\":\n case \"entering\":\n return \"translateX(0)\";\n default:\n return \"translateX(-100%)\";\n }\n }};\n`;\n\nconst logoSrc = `https://${process.env.NEXT_PUBLIC_OAK_ASSETS_HOST}/${process.env.NEXT_PUBLIC_OAK_ASSETS_PATH}/logo-mark.svg`;\n\n/**\n * Modal dialog with trapped focus and a close button.\n */\nexport const OakModal = ({\n children,\n footerSlot,\n domContainer = document.body,\n isOpen,\n onClose,\n ...rest\n}: OakModalProps) => {\n const [canaryElement, setCanaryElement] = useState<HTMLDivElement | null>(\n null,\n );\n const [isScrolled, setIsScrolled] = useState(false);\n const transitionRef = useRef<HTMLDivElement>(null);\n\n useLayoutEffect(() => {\n if (!canaryElement) {\n return;\n }\n const observer = new IntersectionObserver(\n (mutations) => {\n setIsScrolled(!mutations.some((mutation) => mutation.isIntersecting));\n },\n {\n root: canaryElement.parentElement,\n },\n );\n observer.observe(canaryElement);\n\n return () => {\n observer.disconnect();\n };\n }, [canaryElement]);\n\n return createPortal(\n <Transition\n in={isOpen}\n nodeRef={transitionRef}\n addEndListener={(done) => {\n transitionRef.current?.addEventListener(\"transitionend\", done);\n }}\n timeout={500}\n mountOnEnter\n unmountOnExit\n >\n {(state) => (\n <FocusOn onEscapeKey={onClose} returnFocus autoFocus>\n <FadeOutBox\n $position=\"fixed\"\n $inset=\"all-spacing-0\"\n $zIndex=\"modal-dialog\"\n $background=\"black\"\n $opacity=\"semi-transparent\"\n $state={state}\n $transition=\"standard-ease\"\n />\n <SlideInFlex\n ref={transitionRef}\n $background=\"bg-primary\"\n $position=\"fixed\"\n $left=\"all-spacing-0\"\n $top=\"all-spacing-0\"\n $bottom=\"all-spacing-0\"\n $width=\"all-spacing-22\"\n $maxWidth=\"100vw\"\n $zIndex=\"modal-dialog\"\n $flexDirection=\"column\"\n $transition=\"standard-ease\"\n role=\"dialog\"\n $state={state}\n {...rest}\n >\n <OakFlex\n $ma=\"space-between-s\"\n $justifyContent=\"space-between\"\n $alignItems=\"center\"\n >\n <OakImage\n src={logoSrc}\n $height=\"all-spacing-8\"\n $width=\"all-spacing-7\"\n alt=\"\"\n />\n <InternalShadowRoundButton\n onClick={onClose}\n aria-label=\"Close\"\n defaultIconBackground=\"transparent\"\n defaultIconColor=\"black\"\n defaultTextColor=\"transparent\"\n hoverTextColor=\"transparent\"\n disabledTextColor=\"transparent\"\n hoverIconBackground=\"black\"\n hoverIconColor=\"white\"\n disabledIconBackground=\"transparent\"\n iconBackgroundSize=\"all-spacing-6\"\n iconSize=\"all-spacing-6\"\n iconName=\"cross\"\n />\n </OakFlex>\n <div style={{ display: \"contents\" }} data-autofocus-inside>\n <OakFlex\n $flexGrow={1}\n $flexDirection=\"column\"\n $overflow=\"auto\"\n $bt=\"border-solid-s\"\n $borderColor={\n isScrolled ? \"border-neutral-lighter\" : \"transparent\"\n }\n >\n <div ref={setCanaryElement} />\n {children}\n </OakFlex>\n {footerSlot}\n </div>\n </SlideInFlex>\n </FocusOn>\n )}\n </Transition>,\n domContainer,\n );\n};\n","import React, { useRef } from \"react\";\nimport styled, { css } from \"styled-components\";\n\nimport { OakBox, OakFlex, OakFlexProps, OakIcon } from \"@/components/atoms\";\nimport { InternalCheckBoxWrapper } from \"@/components/atoms/InternalCheckBoxWrapper\";\nimport { InternalCheckBoxLabelHoverDecor } from \"@/components/atoms/InternalCheckBoxLabel\";\nimport {\n BaseCheckBoxProps,\n InternalCheckBox,\n} from \"@/components/atoms/InternalCheckBox/InternalCheckBox\";\nimport { parseColor } from \"@/styles/helpers/parseColor\";\nimport { parseBorder } from \"@/styles/helpers/parseBorder\";\nimport { parseBorderRadius } from \"@/styles/helpers/parseBorderRadius\";\nimport { parseDropShadow } from \"@/styles/helpers/parseDropShadow\";\nimport { OakCombinedColorToken } from \"@/styles\";\n\nconst StyledInternalCheckBox = styled(InternalCheckBox)`\n &:checked:not(:disabled) {\n border: ${parseBorder(\"border-solid-l\")};\n border-color: ${parseColor(\"border-primary\")};\n }\n\n &:checked:disabled {\n border: ${parseBorder(\"border-solid-l\")};\n border-color: ${parseColor(\"text-disabled\")};\n }\n\n @media (hover: hover) {\n &:hover:not(:disabled) {\n background: ${parseColor(\"bg-primary\")};\n }\n }\n`;\n\nconst StyledInternalCheckBoxLabelHoverDecor = styled(\n InternalCheckBoxLabelHoverDecor,\n)`\n pointer-events: none; // To prevent the label from stealing the click event from the input\n`;\n\ntype StyledFlexBoxProps = OakFlexProps & {\n $overlayBorderColor: OakCombinedColorToken;\n $feedbackBgColor?: OakCombinedColorToken;\n $outlineColor: OakCombinedColorToken;\n};\n\nconst StyledFlexBox = styled(OakFlex)<StyledFlexBoxProps>`\n &:not(:focus-within) {\n ${(props) =>\n !!props.$outlineColor &&\n css`\n outline: ${parseBorder(\"border-solid-xl\")}\n ${parseColor(props.$outlineColor)};\n `}\n }\n\n &:has(input:not(:disabled)) {\n cursor: pointer;\n }\n\n &:has(input:disabled) {\n pointer-events: none;\n cursor: none;\n }\n\n &:focus-within {\n box-shadow: ${parseDropShadow(\"drop-shadow-centered-lemon\")},\n ${parseDropShadow(\"drop-shadow-centered-grey\")};\n }\n\n @media (hover: hover) {\n &:hover:has(input:not(:disabled)){\n background-color: ${parseColor(\"bg-decorative1-subdued\")};\n }\n\n &:hover input:not(:disabled) {\n background: ${parseColor(\"bg-primary\")};\n }\n\n &:hover:has(input:not(:disabled)) ${InternalCheckBoxLabelHoverDecor} {\n text-decoration: underline;\n }\n\n &:hover:has(\n ${InternalCheckBoxLabelHoverDecor} input:not(:focus-visible):not(:checked):not(:disabled)\n )::after {\n content: \"\";\n inset: 0;\n pointer-events: none;\n position: absolute;\n border-bottom: ${parseBorder(\"border-solid-xl\")};\n border-radius: ${parseBorderRadius(\"border-radius-m2\")};\n }\n\n &:focus-within {\n box-shadow: ${parseDropShadow(\"drop-shadow-centered-lemon\")},\n ${parseDropShadow(\"drop-shadow-centered-grey\")};\n }\n \n &:has(input:checked:not(:disabled)) {\n outline: ${parseBorder(\"border-solid-xl\")};\n }\n\n &:has(input:checked:disabled) {\n outline-color: ${(props) => css`\n ${parseColor(props.$overlayBorderColor)}\n `};\n }\n\n &:has(input:disabled:not(:checked)) {\n ${(props) =>\n props.$feedbackBgColor\n ? css`\n background-color: ${props.$feedbackBgColor};\n `\n : undefined}\n }\n\n &:has(input:disabled:checked) {\n ${(props) => css`\n background-color: ${parseColor(props.$feedbackBgColor)};\n `};\n }\n`;\n\nexport type OakQuizCheckBoxProps = Omit<BaseCheckBoxProps, \"defaultChecked\"> & {\n feedback?: \"correct\" | \"incorrect\" | null;\n image?: React.JSX.Element;\n innerRef?: React.RefObject<HTMLInputElement>;\n displayValue?: string;\n /**\n * Give the field a highlight to draw attention to it\n */\n isHighlighted?: boolean;\n};\n\n/**\n * A checkbox representing the options in a multiple choice question.\n */\nexport const OakQuizCheckBox = (props: OakQuizCheckBoxProps) => {\n const {\n id,\n value,\n feedback,\n image,\n disabled,\n innerRef,\n displayValue,\n isHighlighted,\n ...rest\n } = props;\n\n const isFeedback = !!feedback;\n\n const defaultRef = useRef<HTMLInputElement>(null);\n const inputRef = innerRef ?? defaultRef;\n const showTick =\n (feedback === \"correct\" && inputRef.current?.checked) ||\n (feedback === \"incorrect\" && !inputRef.current?.checked);\n const showCross = feedback === \"incorrect\" && inputRef.current?.checked;\n\n const handleContainerClick = (\n e:\n | React.MouseEvent<HTMLDivElement>\n | React.MouseEvent<HTMLInputElement>\n | React.MouseEvent<HTMLLabelElement>,\n ) => {\n const inputId = (e.target as HTMLInputElement).id;\n\n if (inputId !== id) {\n inputRef.current?.click();\n }\n };\n\n const imageContainer = (\n <OakFlex\n $flexDirection=\"column\"\n $minWidth={\"all-spacing-20\"}\n $gap={\"space-between-s\"}\n >\n <OakBox>{image}</OakBox>\n {displayValue}\n </OakFlex>\n );\n\n const feedbackBgColor = showTick ? \"bg-correct\" : \"bg-incorrect\";\n const feedbackBorderColor = showTick ? \"border-success\" : \"border-error\";\n\n const inputCheckbox = (\n <StyledFlexBox\n $pa=\"inner-padding-l\"\n $borderRadius={\"border-radius-m2\"}\n $borderColor={\n isHighlighted ? \"border-decorative5-stronger\" : \"border-primary\"\n }\n $background={\n disabled && !isFeedback ? \"bg-neutral-stronger\" : \"bg-primary\"\n }\n $flexGrow={1}\n onClick={handleContainerClick}\n $overlayBorderColor={isFeedback ? feedbackBorderColor : \"text-disabled\"}\n $feedbackBgColor={isFeedback ? feedbackBgColor : undefined}\n $outlineColor={\n isHighlighted ? \"border-decorative5-stronger\" : \"transparent\"\n }\n >\n <StyledInternalCheckBoxLabelHoverDecor\n htmlFor={id}\n labelGap={\"space-between-s\"}\n labelAlignItems={\"center\"}\n $color={disabled && !isFeedback ? \"text-disabled\" : \"text-primary\"}\n $font={\"body-1\"}\n disabled={disabled}\n >\n <InternalCheckBoxWrapper\n size={\"all-spacing-7\"}\n iconPadding=\"inner-padding-ssx\"\n checkedIcon={\n <OakBox\n $width=\"100%\"\n $height=\"100%\"\n $background={\n disabled || isFeedback ? \"text-disabled\" : \"text-primary\"\n }\n >\n <OakBox\n $ba={\"border-solid-m\"}\n $borderColor={\"white\"}\n $width={\"100%\"}\n $height={\"100%\"}\n />\n </OakBox>\n }\n internalCheckbox={\n <StyledInternalCheckBox\n id={id}\n value={value}\n disabled={disabled || isFeedback}\n {...rest}\n $width={\"all-spacing-7\"}\n $height={\"all-spacing-7\"}\n $ba={\"border-solid-m\"}\n $borderColor=\"border-neutral\"\n $borderRadius={\"border-radius-s\"}\n $background={isHighlighted ? \"bg-decorative5-main\" : \"bg-primary\"}\n $checkedBackground={null}\n ref={inputRef}\n />\n }\n />\n {image ? imageContainer : displayValue}\n </StyledInternalCheckBoxLabelHoverDecor>\n {isFeedback && (showTick || showCross) && (\n <OakFlex\n className=\"feedbackIconWrapper\"\n $flexGrow={1}\n $justifyContent={\"flex-end\"}\n $alignItems={\"flex-end\"}\n $height={\"100%\"}\n >\n {showTick && (\n <OakIcon\n iconName={\"tick\"}\n $colorFilter={\"icon-success\"}\n alt={\n feedback === \"correct\" ? \"Correct\" : \"Unselected correct choice\"\n }\n />\n )}\n {showCross && (\n <OakIcon\n iconName={\"cross\"}\n $colorFilter={\"icon-error\"}\n alt={\"Incorrect\"}\n />\n )}\n </OakFlex>\n )}\n </StyledFlexBox>\n );\n\n return (\n <OakFlex $width={\"100%\"} $position={\"relative\"}>\n {inputCheckbox}\n </OakFlex>\n );\n};\n","import React, { MouseEventHandler, useContext } from \"react\";\nimport styled, { css } from \"styled-components\";\n\nimport { OakBox, OakFlex, OakIcon } from \"@/components/atoms\";\nimport {\n OakRadioButton,\n OakRadioButtonProps,\n} from \"@/components/molecules/OakRadioButton/OakRadioButton\";\nimport { parseDropShadow } from \"@/styles/helpers/parseDropShadow\";\nimport { parseBorder } from \"@/styles/helpers/parseBorder\";\nimport { parseColor } from \"@/styles/helpers/parseColor\";\nimport { parseBorderRadius } from \"@/styles/helpers/parseBorderRadius\";\nimport { RadioContext } from \"@/components/molecules/OakRadioGroup/OakRadioGroup\";\nimport { OakUiRoleToken } from \"@/styles\";\n\nexport type OakQuizRadioButtonProps = OakRadioButtonProps & {\n /**\n * Present the element with answer feedback\n */\n feedback?: \"correct\" | \"incorrect\" | null;\n /**\n * An image to display above the label\n */\n image?: JSX.Element;\n /**\n * Give the field a highlight to draw attention to it\n */\n isHighlighted?: boolean;\n};\n\ntype StyledOakFlexProps = {\n $disabled: boolean;\n $checked: boolean;\n $outlineColor?: OakUiRoleToken;\n};\n\nconst StyledOakFlex = styled(OakFlex)<StyledOakFlexProps>`\n &:not(:focus-within) {\n ${(props) =>\n !!props.$outlineColor &&\n css`\n outline: ${parseBorder(\"border-solid-xl\")}\n ${parseColor(props.$outlineColor)};\n `}\n }\n\n &:hover {\n cursor: ${(props) => (props.$disabled ? \"default\" : \"pointer\")};\n }\n\n &:focus-within {\n box-shadow: ${parseDropShadow(\"drop-shadow-centered-lemon\")},\n ${parseDropShadow(\"drop-shadow-centered-grey\")};\n }\n\n ${(props) =>\n !props.$disabled &&\n css`\n &:hover {\n background-color: ${parseColor(\"bg-decorative1-subdued\")};\n text-decoration: underline;\n }\n `}\n\n ${(props) =>\n !props.$disabled &&\n !props.$checked &&\n css`\n &:hover:not(:focus-within)::after {\n pointer-events: none;\n content: \"\";\n position: absolute;\n inset: 0;\n border-radius: ${parseBorderRadius(\"border-radius-m2\")};\n border-bottom: ${parseBorder(\"border-solid-l\")} ${parseColor(\"grey60\")};\n }\n `}\n`;\n\n/**\n * A radio button representing the options in a multiple choice question.\n *\n * Use with `OakRadioGroup` to create a group of radio buttons.\n */\nexport const OakQuizRadioButton = (props: OakQuizRadioButtonProps) => {\n const { value, feedback, image, disabled, isHighlighted, label, ...rest } =\n props;\n const showFeedback = !!feedback;\n // Give the input focus when the entire component is clicked\n const handleOnClick: MouseEventHandler<HTMLElement> = (event) => {\n event.currentTarget.querySelector(\"input\")?.click();\n };\n const checked = useContext(RadioContext).currentValue === value;\n let outlineColor: OakUiRoleToken | undefined;\n let backgroundColor: OakUiRoleToken = \"bg-primary\";\n let feedbackIcon: \"tick\" | \"cross\" | null = null;\n let feedbackAltText: string | undefined;\n let radioBackground: OakUiRoleToken = \"bg-primary\";\n\n switch (true) {\n case disabled && !showFeedback:\n backgroundColor = \"bg-neutral-stronger\";\n break;\n case feedback === \"correct\" && checked:\n outlineColor = \"border-success\";\n backgroundColor = \"bg-correct\";\n feedbackIcon = \"tick\";\n feedbackAltText = \"Correct\";\n break;\n case feedback === \"incorrect\" && checked:\n outlineColor = \"border-error\";\n backgroundColor = \"bg-incorrect\";\n feedbackIcon = \"cross\";\n feedbackAltText = \"Incorrect\";\n break;\n case feedback === \"incorrect\" && !checked:\n feedbackIcon = \"tick\";\n feedbackAltText = \"Unselected correct choice\";\n break;\n case isHighlighted:\n radioBackground = \"bg-decorative5-main\";\n outlineColor = \"border-decorative5-stronger\";\n break;\n case checked && !disabled:\n outlineColor = \"border-primary\";\n break;\n }\n\n return (\n <StyledOakFlex\n $pa=\"inner-padding-l\"\n $borderRadius=\"border-radius-m2\"\n $justifyContent=\"space-between\"\n $position=\"relative\"\n $alignContent=\"center\"\n onClick={handleOnClick}\n $disabled={disabled || showFeedback}\n $checked={checked}\n $outlineColor={outlineColor}\n $background={backgroundColor}\n >\n <OakRadioButton\n value={value}\n disabled={disabled || showFeedback}\n $labelGap=\"space-between-s\"\n disableFocusRing\n radioInnerSize=\"all-spacing-6\"\n radioOuterSize=\"all-spacing-7\"\n radioBackground={radioBackground}\n checkedRadioBorderWidth=\"border-solid-l\"\n label={\n image ? (\n <OakFlex\n $flexDirection=\"column\"\n $minWidth=\"all-spacing-20\"\n $gap=\"space-between-s\"\n >\n <OakBox>{image}</OakBox>\n {label}\n </OakFlex>\n ) : (\n label\n )\n }\n {...rest}\n />\n {showFeedback && feedbackIcon && (\n <OakFlex $alignSelf=\"flex-end\">\n <OakIcon\n iconName={feedbackIcon}\n $colorFilter={\n feedbackIcon === \"tick\" ? \"icon-success\" : \"icon-error\"\n }\n alt={feedbackAltText}\n />\n </OakFlex>\n )}\n </StyledOakFlex>\n );\n};\n","import React, { MouseEventHandler } from \"react\";\nimport styled from \"styled-components\";\n\nimport { InternalShadowRoundButton } from \"@/components/molecules/InternalShadowRoundButton\";\nimport { parseDropShadow } from \"@/styles/helpers/parseDropShadow\";\n\nexport type OakHintButtonProps = {\n isOpen: boolean;\n onClick?: MouseEventHandler;\n isLoading?: boolean;\n disabled?: boolean;\n};\n\nconst StyledInternalShadowRoundButton = styled(InternalShadowRoundButton)`\n &:hover .shadow {\n box-shadow: none !important;\n }\n &:active .shadow {\n box-shadow: ${parseDropShadow(\"drop-shadow-lemon\")},\n ${parseDropShadow(\"drop-shadow-grey\")} !important;\n }\n`;\n\n/**\n *\n * A specific implementation of InternalShadowRoundButton\n *\n * The following callbacks are available for tracking focus events:\n *\n * ### onClick\n * `onClick?: (event: React.MouseEvent<HTMLButtonElement, MouseEvent>) => void;`\n *\n * ### onHovered\n * `onHovered?: (event: React.MouseEvent<HTMLButtonElement, MouseEvent>, duration: number) => void;`<br>\n * called after a mouseEnter and mouseLeave event has happened\n */\nexport const OakHintButton = (props: OakHintButtonProps) => {\n const { isOpen, disabled } = props;\n return (\n <StyledInternalShadowRoundButton\n iconName={isOpen && !disabled ? \"lightbulb-yellow\" : \"lightbulb\"}\n defaultIconBackground={isOpen ? \"black\" : \"bg-decorative5-main\"}\n hoverIconBackground={isOpen ? \"black\" : \"bg-decorative5-main\"}\n defaultTextColor={\"text-primary\"}\n hoverTextColor={\"text-primary\"}\n disabledIconBackground={\"bg-btn-primary-disabled\"}\n disabledTextColor={\"text-disabled\"}\n disabledIconColor={\"white\"}\n onClick={props.onClick}\n isLoading={props.isLoading}\n disabled={props.disabled}\n iconBackgroundSize={\"all-spacing-8\"}\n iconSize={\"all-spacing-6\"}\n >\n {!isOpen ? \"Need a hint?\" : \"Close hint\"}\n </StyledInternalShadowRoundButton>\n );\n};\n","import React, { MouseEventHandler, ReactNode, useState } from \"react\";\n\nimport { OakTooltip } from \"@/components/molecules\";\nimport { OakHintButton } from \"@/components/organisms/pupil/OakHintButton\";\n\nexport type OakQuizHintProps = {\n /**\n * Some content to give as a hint to answer a question\n */\n hint: ReactNode;\n};\n\n/**\n * Presents a button which will show a hint when clicked\n */\nexport const OakQuizHint = ({ hint }: OakQuizHintProps) => {\n const [isOpen, setIsOpen] = useState(false);\n const handleClick: MouseEventHandler = () => {\n setIsOpen(!isOpen);\n };\n\n return (\n <OakTooltip tooltip={hint} isOpen={isOpen}>\n <OakHintButton isOpen={isOpen} onClick={handleClick} />\n </OakTooltip>\n );\n};\n","import React, { ReactNode } from \"react\";\n\nimport { OakBox, OakFlex, OakSpan } from \"@/components/atoms\";\nimport { OakRoundIcon } from \"@/components/molecules\";\n\nexport type OakQuizFeedbackProps = {\n /**\n * Feedback for an answer\n * `partially-correct` can be used to feedback on a multi-answer MCQ where some\n * correct options were not selected and/or some incorrect answers were selected\n */\n feedback: \"correct\" | \"incorrect\" | \"partially-correct\";\n /**\n * Some additional content to present with the feedback.\n * This is likely the correct answer(s) to the question or some praise.\n *\n * Only displayed when `feedback` has been applied.\n */\n answerFeedback?: ReactNode;\n};\n\n/**\n * Gives feedback after a question has been answered\n */\nexport const OakQuizFeedback = ({\n feedback,\n answerFeedback,\n}: OakQuizFeedbackProps) => {\n let feedbackLabel: string;\n\n switch (feedback) {\n case \"correct\":\n feedbackLabel = \"Correct\";\n break;\n case \"incorrect\":\n feedbackLabel = \"Incorrect\";\n break;\n case \"partially-correct\":\n feedbackLabel = \"Almost correct\";\n break;\n }\n\n return (\n <OakBox aria-live=\"polite\">\n <OakFlex $gap=\"space-between-xs\">\n <OakRoundIcon\n iconName={feedback === \"correct\" ? \"tick\" : \"cross\"}\n alt=\"\"\n $pa=\"inner-padding-none\"\n $background={feedback === \"correct\" ? \"icon-success\" : \"icon-error\"}\n $colorFilter=\"text-inverted\"\n $width=\"all-spacing-6\"\n $height=\"all-spacing-6\"\n />\n <OakSpan\n $font=\"heading-6\"\n $color={feedback === \"correct\" ? \"text-success\" : \"text-error\"}\n >\n {feedbackLabel}\n </OakSpan>\n </OakFlex>\n {answerFeedback && (\n <OakSpan\n as=\"p\"\n $mt=\"space-between-xs\"\n $font={feedback === \"correct\" ? \"body-2-bold\" : \"body-2\"}\n >\n {answerFeedback}\n </OakSpan>\n )}\n </OakBox>\n );\n};\n","import React, { ReactNode } from \"react\";\nimport styled from \"styled-components\";\n\nimport { OakQuizHint, OakQuizHintProps } from \"../OakQuizHint\";\nimport {\n OakQuizFeedback,\n OakQuizFeedbackProps,\n} from \"../OakQuizFeedback/OakQuizFeedback\";\n\nimport { OakFlex } from \"@/components/atoms\";\n\n/**\n * `content-box` ensures that the border is not subtracted from the height of the element\n */\nconst StyledOakFlex = styled(OakFlex)`\n box-sizing: content-box;\n`;\n\nexport type OakLessonBottomNavProps = {\n children?: ReactNode;\n feedback?: OakQuizFeedbackProps[\"feedback\"] | null;\n answerFeedback?: OakQuizFeedbackProps[\"answerFeedback\"];\n hint?: OakQuizHintProps[\"hint\"];\n};\n\n/**\n * Renders feedback for an answer and onward navigation buttons to continue the lesson\n */\nexport const OakLessonBottomNav = ({\n hint,\n feedback,\n answerFeedback,\n children,\n}: OakLessonBottomNavProps) => {\n let content: ReactNode;\n\n switch (true) {\n case !!feedback:\n content = (\n <OakQuizFeedback feedback={feedback} answerFeedback={answerFeedback} />\n );\n break;\n case !!hint:\n content = <OakQuizHint hint={hint} />;\n break;\n default:\n content = null;\n }\n\n return (\n <StyledOakFlex\n $flexDirection={[\"column\", \"row\"]}\n $pa=\"inner-padding-m\"\n $minHeight=\"all-spacing-9\"\n $gap=\"space-between-m\"\n >\n <OakFlex $alignItems=\"center\">{content}</OakFlex>\n <OakFlex\n $flexGrow=\"1\"\n $height=\"fit-content\"\n $alignSelf=\"flex-end\"\n $justifyContent={[\"initial\", \"flex-end\"]}\n $width={[\"100%\", \"auto\"]}\n >\n {children}\n </OakFlex>\n </StyledOakFlex>\n );\n};\n","import React, { ReactNode } from \"react\";\nimport styled from \"styled-components\";\n\nimport {\n OakBox,\n OakFlex,\n OakHeading,\n OakIconProps,\n OakSpan,\n} from \"@/components/atoms\";\nimport { OakRoundIcon } from \"@/components/molecules\";\nimport { getBreakpoint } from \"@/styles/utils/responsiveStyle\";\n\ntype LessonSectionName = \"intro\" | \"starter-quiz\" | \"video\" | \"exit-quiz\";\n\nconst StyledMobileSummary = styled(OakSpan)`\n @media (min-width: ${getBreakpoint(\"small\")}px) {\n display: none;\n }\n`;\n\nexport type OakLessonTopNavProps = {\n lessonSectionName: LessonSectionName;\n /**\n * Slot to render `OakBackLink` or similar\n */\n backLinkSlot: ReactNode;\n heading: ReactNode;\n /**\n * Displayed at the mobile breakpoint where the counter is not rendered.\n * Provides alternative content for the counter/progress in the lesson.\n */\n mobileSummary: ReactNode;\n /**\n * Slot to render `OakQuizCounter` or similar\n */\n counterSlot?: ReactNode;\n};\n\n/**\n * Controls for navigating back and displaying progress in a lesson\n */\nexport const OakLessonTopNav = ({\n lessonSectionName,\n backLinkSlot,\n counterSlot,\n heading,\n mobileSummary,\n}: OakLessonTopNavProps) => {\n return (\n <OakFlex $gap=\"space-between-m\" $alignItems=\"center\">\n <OakBox $pl={[\"inner-padding-none\", \"inner-padding-s\"]}>\n {backLinkSlot}\n </OakBox>\n <OakFlex $flexGrow=\"none\">\n <OakRoundIcon\n {...pickSectionIcon(lessonSectionName)}\n $width=\"all-spacing-8\"\n $height=\"all-spacing-8\"\n />\n </OakFlex>\n <OakBox>\n <OakHeading tag=\"h1\" $font={[\"heading-7\", \"heading-5\"]}>\n {heading}\n </OakHeading>\n <StyledMobileSummary $font=\"body-3\">\n {mobileSummary}\n </StyledMobileSummary>\n </OakBox>\n <OakFlex $flexGrow={1} $justifyContent=\"flex-end\">\n <OakBox $display={[\"none\", \"block\"]}>{counterSlot}</OakBox>\n </OakFlex>\n </OakFlex>\n );\n};\n\nfunction pickSectionIcon(\n sectionName: LessonSectionName,\n): Pick<OakIconProps, \"iconName\" | \"$background\"> {\n switch (sectionName) {\n case \"intro\":\n return {\n iconName: \"intro\",\n $background: \"aqua110\",\n };\n case \"starter-quiz\":\n return {\n iconName: \"quiz\",\n $background: \"mint110\",\n };\n case \"video\":\n return {\n iconName: \"video\",\n $background: \"pink110\",\n };\n case \"exit-quiz\":\n return {\n iconName: \"quiz\",\n $background: \"lemon110\",\n };\n }\n}\n","import React from \"react\";\n\nimport { OakSpan } from \"@/components/atoms\";\n\nexport type OakQuizCounterProps = {\n counter: number;\n total: number;\n};\n\n/**\n * A counter representing progress through the questions in a quiz\n */\nexport const OakQuizCounter = (props: OakQuizCounterProps) => {\n const { counter, total } = props;\n return (\n <OakSpan $font={\"heading-light-4\"} $color={\"text-disabled\"}>\n <OakSpan $font={\"heading-4\"} $color={\"text-primary\"}>\n {counter}{\" \"}\n </OakSpan>\n of {total}\n </OakSpan>\n );\n};\n","import React, { ReactNode } from \"react\";\nimport styled from \"styled-components\";\n\nimport { OakBox, OakFlex } from \"@/components/atoms\";\nimport { parseSpacing } from \"@/styles/helpers/parseSpacing\";\nimport { getBreakpoint } from \"@/styles/utils/responsiveStyle\";\nimport { OakCombinedColorToken } from \"@/styles\";\n\ntype LessonSectionName =\n | \"overview\"\n | \"intro\"\n | \"starter-quiz\"\n | \"video\"\n | \"exit-quiz\"\n | \"review\";\n\nexport type OakLessonLayoutProps = {\n lessonSectionName: LessonSectionName;\n topNavSlot: ReactNode;\n bottomNavSlot: ReactNode;\n children: ReactNode;\n};\n\n/**\n * `OakBox` does not support space-between tokens on `padding` only `margin`, so we need to\n * set it here to apply appropriate padding to the top of the content.\n */\nconst StyledLayoutBox = styled(OakBox)`\n @media (min-width: ${getBreakpoint(\"small\")}px) {\n padding-top: ${parseSpacing(\"space-between-xl\")};\n }\n`;\n\nconst StickyFooter = styled(OakBox)`\n position: sticky;\n bottom: 0;\n z-index: 10;\n`;\n\n/**\n * Provides overall page layout and colours for the sections of a lesson.\n */\nexport const OakLessonLayout = ({\n lessonSectionName,\n topNavSlot,\n bottomNavSlot,\n children,\n}: OakLessonLayoutProps) => {\n const [\n pageBackgroundColor,\n contentBackgroundColor,\n contentBorderColor,\n mobileContentBackgroundColor,\n ] = pickSectionColours(lessonSectionName);\n\n return (\n <StyledLayoutBox\n $display={\"flex\"}\n $width=\"100%\"\n $minHeight={\"100%\"}\n $ph={[\"inner-padding-none\", \"inner-padding-xl\"]}\n $background={pageBackgroundColor}\n >\n <OakFlex\n $flexDirection=\"column\"\n $flexGrow={1}\n $background={[mobileContentBackgroundColor, contentBackgroundColor]}\n $btr={[null, \"border-radius-xl\"]}\n $bt={[null, \"border-solid-xl\"]}\n $bh={[null, \"border-solid-xl\"]}\n $borderColor={[null, contentBorderColor]}\n $maxWidth=\"all-spacing-24\"\n $minHeight=\"100%\"\n $mh=\"auto\"\n $pt={[\"inner-padding-none\", \"inner-padding-m\"]}\n $gap={[\"space-between-l\", \"space-between-xl\"]}\n >\n {topNavSlot && (\n <OakBox\n $pv=\"inner-padding-l\"\n $pl={[\"inner-padding-m\", \"inner-padding-xs\"]}\n $pr={[\"inner-padding-m\", \"inner-padding-none\"]}\n $mr={[\"space-between-none\", \"space-between-l\"]}\n $background={[\"bg-primary\", \"transparent\"]}\n >\n {topNavSlot}\n </OakBox>\n )}\n <OakFlex $flexGrow={1} $flexDirection=\"column\">\n {children}\n </OakFlex>\n {bottomNavSlot && (\n <StickyFooter\n $mh={[\n \"space-between-none\",\n \"space-between-none\",\n \"space-between-sssx\",\n ]}\n $borderColor={contentBorderColor}\n $bt={\"border-solid-xl\"}\n $background={[\"bg-primary\", contentBackgroundColor]}\n >\n {bottomNavSlot}\n </StickyFooter>\n )}\n </OakFlex>\n </StyledLayoutBox>\n );\n};\n\nfunction pickSectionColours(\n sectionName: LessonSectionName,\n): [\n pageBackgroundColor: OakCombinedColorToken,\n contentBackgroundColor: OakCombinedColorToken,\n contentBorderColor: OakCombinedColorToken,\n mobileContentBackgroundColor: OakCombinedColorToken,\n] {\n switch (sectionName) {\n case \"overview\":\n return [\n \"bg-decorative1-main\",\n \"bg-primary\",\n \"border-decorative1-stronger\",\n \"bg-primary\",\n ];\n case \"intro\":\n return [\n \"bg-decorative2-subdued\",\n \"bg-decorative2-very-subdued\",\n \"border-inverted\",\n \"bg-decorative2-subdued\",\n ];\n case \"starter-quiz\":\n return [\n \"bg-decorative1-main\",\n \"bg-decorative1-very-subdued\",\n \"border-inverted\",\n \"bg-decorative1-subdued\",\n ];\n case \"video\":\n return [\n \"bg-decorative4-subdued\",\n \"bg-primary\",\n \"border-decorative4\",\n \"bg-primary\",\n ];\n case \"exit-quiz\":\n return [\n \"bg-decorative5-main\",\n \"bg-decorative5-very-subdued\",\n \"border-inverted\",\n \"bg-decorative5-subdued\",\n ];\n case \"review\":\n return [\n \"bg-decorative1-main\",\n \"bg-primary\",\n \"border-decorative1-stronger\",\n \"bg-primary\",\n ];\n }\n}\n","import React, { ComponentPropsWithoutRef, ElementType } from \"react\";\nimport styled, { css } from \"styled-components\";\n\nimport {\n OakBox,\n OakFlex,\n OakIcon,\n OakIconName,\n OakSpan,\n} from \"@/components/atoms\";\nimport { parseColor } from \"@/styles/helpers/parseColor\";\nimport { OakRoundIcon } from \"@/components/molecules\";\nimport { parseColorFilter } from \"@/styles/helpers/parseColorFilter\";\nimport { parseSpacing } from \"@/styles/helpers/parseSpacing\";\nimport { parseDropShadow } from \"@/styles/helpers/parseDropShadow\";\nimport { OakCombinedColorToken } from \"@/styles\";\n\ntype LessonSectionName = \"intro\" | \"starter-quiz\" | \"video\" | \"exit-quiz\";\n\ntype BaseOakLessonNavItemProps<C extends ElementType> = {\n as?: C;\n /**\n * Disable the section preventing navigation to it.\n */\n disabled?: boolean;\n} & ComponentPropsWithoutRef<C>;\n\ntype QuizSectionProps = {\n lessonSectionName: \"starter-quiz\" | \"exit-quiz\";\n /**\n * The number of questions in the quiz\n */\n numQuestions: number;\n /**\n * The number of questions answered correctly\n */\n grade: number;\n};\n\ntype VideoSectionProps = {\n lessonSectionName: \"video\";\n};\n\ntype IntroSectionProps = {\n lessonSectionName: \"intro\";\n};\n\ntype SectionProps = {\n /**\n * Denotes the progress in the lesson section\n */\n progress: \"not-started\" | \"in-progress\" | \"complete\";\n} & (IntroSectionProps | QuizSectionProps | VideoSectionProps);\n\nexport type OakLessonNavItemProps<C extends ElementType> =\n BaseOakLessonNavItemProps<C> & SectionProps;\n\nconst StyledLabel = styled(OakBox)``;\n\nconst StyledRoundIcon = styled(OakRoundIcon)<{\n $disabled?: boolean;\n}>`\n width: ${parseSpacing(\"all-spacing-8\")};\n height: ${parseSpacing(\"all-spacing-8\")};\n padding: 0;\n\n background: transparent;\n\n img {\n filter: ${(props) =>\n parseColorFilter(props.$disabled ? \"icon-disabled\" : \"icon-inverted\")};\n }\n`;\n\nconst activeIconStyles = css`\n ${StyledRoundIcon} {\n background: ${parseColor(\"bg-btn-primary\")};\n\n img {\n filter: ${parseColorFilter(\"icon-main\")};\n }\n }\n`;\n\nconst StyledLessonNavItem = styled(OakFlex)<{ $disabled?: boolean }>`\n outline: none;\n text-align: initial;\n\n &:focus-visible {\n box-shadow: ${parseDropShadow(\"drop-shadow-centered-lemon\")},\n ${parseDropShadow(\"drop-shadow-centered-grey\")};\n }\n\n ${(props) => props.$disabled && \"cursor: default\"}\n\n ${(props) =>\n !props.$disabled &&\n css`\n cursor: pointer;\n\n /* Don't apply hover styles on touch devices */\n @media (hover: hover) {\n &:hover {\n ${StyledLabel} {\n text-decoration: underline;\n }\n\n ${activeIconStyles}\n }\n }\n\n &:active {\n box-shadow: ${parseDropShadow(\"drop-shadow-lemon\")},\n ${parseDropShadow(\"drop-shadow-grey\")};\n ${activeIconStyles}\n }\n `}\n`;\n\nconst FlexedOakBox = styled(OakBox)`\n flex: 1;\n`;\n\n/**\n * Enables navigation to the given section of a lesson as well as displaying current progress\n */\nexport const OakLessonNavItem = <C extends ElementType = \"a\">(\n props: OakLessonNavItemProps<C>,\n) => {\n const { as, lessonSectionName, progress, disabled, href, onClick, ...rest } =\n props;\n const [notStartedBackgroundColor, backgroundColor, borderColor] =\n pickColorsForSection(lessonSectionName);\n\n return (\n <StyledLessonNavItem\n as={disabled ? \"div\" : as ?? \"a\"}\n $gap=\"space-between-m\"\n $alignItems=\"center\"\n $background={\n progress === \"not-started\" ? notStartedBackgroundColor : backgroundColor\n }\n $ph={[\"inner-padding-m\", \"inner-padding-xl\"]}\n $pv=\"inner-padding-l\"\n $borderRadius=\"border-radius-l\"\n $borderColor={borderColor}\n $ba=\"border-solid-l\"\n $disabled={disabled}\n $color=\"text-primary\"\n href={disabled ? undefined : href}\n onClick={disabled ? undefined : onClick}\n {...rest}\n >\n <OakFlex $width=\"all-spacing-13\" $justifyContent=\"center\">\n <OakIcon\n iconName={pickIconForSection(lessonSectionName)}\n $width=\"all-spacing-10\"\n $height=\"all-spacing-10\"\n />\n </OakFlex>\n <FlexedOakBox>\n <StyledLabel\n as=\"strong\"\n $font={[\"heading-6\", \"heading-5\"]}\n $color={disabled ? \"text-disabled\" : \"text-primary\"}\n >\n {pickLabelForSection(lessonSectionName)}\n </StyledLabel>\n <OakBox $font={[\"body-2\", \"body-1\"]}>\n {pickSummaryForProgress(props)}\n </OakBox>\n </FlexedOakBox>\n {renderQuestionCounter(props)}\n <StyledRoundIcon iconName=\"chevron-right\" $disabled={disabled} />\n </StyledLessonNavItem>\n );\n};\n\nfunction renderQuestionCounter(props: SectionProps) {\n if (props.progress !== \"complete\") {\n return null;\n }\n\n /**\n * The large answer counter is only rendered when on a non-mobile screen\n */\n switch (props.lessonSectionName) {\n case \"exit-quiz\":\n case \"starter-quiz\":\n return (\n <OakBox $display={[\"none\", \"block\"]} $mr=\"space-between-m\">\n <OakSpan $font=\"heading-4\">{props.grade}</OakSpan>\n <OakSpan $font=\"heading-6\">&nbsp;/&nbsp;{props.numQuestions}</OakSpan>\n </OakBox>\n );\n default:\n return null;\n }\n}\n\nfunction pickIconForSection(sectionName: LessonSectionName): OakIconName {\n switch (sectionName) {\n case \"intro\":\n return \"intro\";\n case \"starter-quiz\":\n case \"exit-quiz\":\n return \"quiz\";\n case \"video\":\n return \"video\";\n }\n}\n\nfunction pickColorsForSection(\n sectionName: LessonSectionName,\n): [\n notStartedBackgroundColor: OakCombinedColorToken,\n backgroundColor: OakCombinedColorToken,\n borderColor: OakCombinedColorToken,\n] {\n switch (sectionName) {\n case \"intro\":\n return [\n \"bg-decorative2-very-subdued\",\n \"bg-decorative2-main\",\n \"border-decorative2-stronger\",\n ];\n case \"starter-quiz\":\n return [\n \"bg-decorative1-very-subdued\",\n \"bg-decorative1-main\",\n \"border-decorative1-stronger\",\n ];\n case \"video\":\n return [\n \"bg-decorative4-very-subdued\",\n \"bg-decorative4-main\",\n \"border-decorative4-stronger\",\n ];\n case \"exit-quiz\":\n return [\n \"bg-decorative5-very-subdued\",\n \"bg-decorative5-main\",\n \"border-decorative5-stronger\",\n ];\n }\n}\n\nfunction pickLabelForSection(sectionName: LessonSectionName): string {\n switch (sectionName) {\n case \"intro\":\n return \"Introduction\";\n case \"starter-quiz\":\n return \"Starter quiz\";\n case \"video\":\n return \"Lesson video\";\n case \"exit-quiz\":\n return \"Exit quiz\";\n }\n}\n\nfunction pickSummaryForProgress(props: SectionProps) {\n switch (props.progress) {\n case \"not-started\":\n return pickSummaryForNotStarted(props);\n case \"in-progress\":\n return \"In progress...\";\n case \"complete\":\n return (\n <OakFlex $gap=\"space-between-sssx\" $alignItems=\"center\">\n <OakIcon\n iconName=\"tick\"\n $width=\"all-spacing-6\"\n $height=\"all-spacing-6\"\n />\n {pickSummaryForComplete(props)}\n </OakFlex>\n );\n }\n}\n\nfunction pickSummaryForNotStarted(props: SectionProps) {\n switch (props.lessonSectionName) {\n case \"intro\":\n return \"Prepare\";\n case \"starter-quiz\":\n return `Activate - ${props.numQuestions} Questions`;\n case \"exit-quiz\":\n return `Check - ${props.numQuestions} questions`;\n case \"video\":\n return \"Learn\";\n }\n}\n\nfunction pickSummaryForComplete(props: SectionProps) {\n switch (props.lessonSectionName) {\n case \"intro\":\n case \"video\":\n return \"Completed\";\n case \"starter-quiz\":\n case \"exit-quiz\":\n // The counter is rendered as the summary next\n // when on a mobile device, so it is hidden on larger screens\n return (\n <>\n <OakBox $display={[\"none\", \"block\"]}>Completed</OakBox>\n <OakBox $display={[\"block\", \"none\"]}>\n {props.grade}/{props.numQuestions} correct\n </OakBox>\n </>\n );\n }\n}\n","import React from \"react\";\nimport styled from \"styled-components\";\n\nimport { OakBox, OakFlex, OakIcon, OakSpan } from \"@/components/atoms\";\nimport { OakRoundIcon } from \"@/components/molecules\";\nimport { OakCombinedColorToken } from \"@/styles\";\n\ntype LessonSectionName = \"intro\" | \"starter-quiz\" | \"video\" | \"exit-quiz\";\ntype BaseOakLessonReviewItemProps = {\n completed: boolean;\n};\ntype QuizSectionProps = {\n lessonSectionName: \"starter-quiz\" | \"exit-quiz\";\n /**\n * The number of questions in the quiz\n */\n numQuestions: number;\n /**\n * The number of questions answered correctly\n */\n grade: number;\n};\n\ntype VideoSectionProps = {\n lessonSectionName: \"video\";\n};\ntype IntroSectionProps = {\n lessonSectionName: \"intro\";\n};\n\nexport type OakLessonReviewItemProps = BaseOakLessonReviewItemProps &\n (IntroSectionProps | QuizSectionProps | VideoSectionProps);\n\nconst StyledLessonReviewItem = styled(OakFlex)<{ completed: boolean }>`\n outline: none;\n text-align: initial;\n`;\n\nexport const OakLessonReviewItem = (props: OakLessonReviewItemProps) => {\n const { completed, lessonSectionName, ...rest } = props;\n const [completedBackgroundColor, borderColor, iconBackgroundColor] =\n pickColorsForSection(lessonSectionName);\n const lessonSectionNameToIconMap = new Map();\n\n lessonSectionNameToIconMap.set(\"intro\", \"intro\");\n lessonSectionNameToIconMap.set(\"starter-quiz\", \"quiz\");\n lessonSectionNameToIconMap.set(\"exit-quiz\", \"quiz\");\n lessonSectionNameToIconMap.set(\"video\", \"video\");\n\n return (\n <StyledLessonReviewItem\n completed={completed}\n $gap=\"space-between-m\"\n $alignItems=\"center\"\n $background={completed ? completedBackgroundColor : \"white\"}\n $ph={[\"inner-padding-m\", \"inner-padding-xl\"]}\n $pv=\"inner-padding-l\"\n $borderRadius=\"border-radius-l\"\n $borderColor={completed ? completedBackgroundColor : borderColor}\n $ba=\"border-solid-l\"\n {...rest}\n >\n <OakRoundIcon\n iconName={lessonSectionNameToIconMap.get(lessonSectionName)}\n $width=\"all-spacing-10\"\n $height=\"all-spacing-10\"\n $background={iconBackgroundColor}\n />\n <OakFlex $flexGrow={1} $flexShrink={1} $flexDirection={\"column\"}>\n <OakBox $font={[\"heading-6\", \"heading-5\"]} $color={\"text-primary\"}>\n {pickLabelForSection(lessonSectionName)}\n </OakBox>\n <OakBox $font={[\"body-2\", \"body-1\"]}>\n {pickSummaryForProgress(props)}\n </OakBox>\n </OakFlex>\n {renderQuestionCounter(props)}\n </StyledLessonReviewItem>\n );\n};\n\nconst pickSummaryForProgress = (props: OakLessonReviewItemProps) => {\n if (props.completed === false) {\n return pickSummaryForIncomplete(props);\n } else {\n return (\n <OakFlex $gap=\"space-between-sssx\" $alignItems=\"center\">\n <OakIcon\n iconName=\"tick\"\n $width=\"all-spacing-6\"\n $height=\"all-spacing-6\"\n />\n Completed\n </OakFlex>\n );\n }\n};\n\nconst pickSummaryForIncomplete = (props: OakLessonReviewItemProps) => {\n switch (props.lessonSectionName) {\n case \"intro\":\n return \"Prepare\";\n case \"starter-quiz\":\n return `Activate - ${props.numQuestions} questions`;\n case \"exit-quiz\":\n return `Check - ${props.numQuestions} questions`;\n case \"video\":\n return \"Learn\";\n }\n};\n\nconst pickLabelForSection = (sectionName: LessonSectionName): string => {\n switch (sectionName) {\n case \"intro\":\n return \"Introduction\";\n case \"starter-quiz\":\n return \"Starter quiz\";\n case \"video\":\n return \"Lesson video\";\n case \"exit-quiz\":\n return \"Exit quiz\";\n }\n};\n\nconst pickColorsForSection = (\n sectionName: LessonSectionName,\n): [\n completedBackgroundColor: OakCombinedColorToken,\n borderColor: OakCombinedColorToken,\n iconBackgroundColor: OakCombinedColorToken,\n] => {\n switch (sectionName) {\n case \"intro\":\n return [\"bg-decorative2-very-subdued\", \"border-decorative2\", \"aqua\"];\n case \"starter-quiz\":\n return [\"bg-decorative1-very-subdued\", \"border-decorative1\", \"mint\"];\n case \"video\":\n return [\"bg-decorative4-very-subdued\", \"border-decorative4\", \"pink\"];\n case \"exit-quiz\":\n return [\"bg-decorative5-very-subdued\", \"border-decorative5\", \"lemon\"];\n }\n};\n\nconst renderQuestionCounter = (props: OakLessonReviewItemProps) => {\n if (props.completed === false) {\n return null;\n }\n\n switch (props.lessonSectionName) {\n case \"exit-quiz\":\n case \"starter-quiz\":\n return (\n <OakBox>\n <OakSpan $font=\"heading-4\">{props.grade}</OakSpan>\n <OakSpan $font=\"heading-6\">&nbsp;/&nbsp;{props.numQuestions}</OakSpan>\n </OakBox>\n );\n default:\n return null;\n }\n};\n","import { useMemo, useLayoutEffect, useEffect, useRef, useCallback } from 'react';\n\nfunction useCombinedRefs() {\n for (var _len = arguments.length, refs = new Array(_len), _key = 0; _key < _len; _key++) {\n refs[_key] = arguments[_key];\n }\n\n return useMemo(() => node => {\n refs.forEach(ref => ref(node));\n }, // eslint-disable-next-line react-hooks/exhaustive-deps\n refs);\n}\n\n// https://github.com/facebook/react/blob/master/packages/shared/ExecutionEnvironment.js\nconst canUseDOM = typeof window !== 'undefined' && typeof window.document !== 'undefined' && typeof window.document.createElement !== 'undefined';\n\nfunction isWindow(element) {\n const elementString = Object.prototype.toString.call(element);\n return elementString === '[object Window]' || // In Electron context the Window object serializes to [object global]\n elementString === '[object global]';\n}\n\nfunction isNode(node) {\n return 'nodeType' in node;\n}\n\nfunction getWindow(target) {\n var _target$ownerDocument, _target$ownerDocument2;\n\n if (!target) {\n return window;\n }\n\n if (isWindow(target)) {\n return target;\n }\n\n if (!isNode(target)) {\n return window;\n }\n\n return (_target$ownerDocument = (_target$ownerDocument2 = target.ownerDocument) == null ? void 0 : _target$ownerDocument2.defaultView) != null ? _target$ownerDocument : window;\n}\n\nfunction isDocument(node) {\n const {\n Document\n } = getWindow(node);\n return node instanceof Document;\n}\n\nfunction isHTMLElement(node) {\n if (isWindow(node)) {\n return false;\n }\n\n return node instanceof getWindow(node).HTMLElement;\n}\n\nfunction isSVGElement(node) {\n return node instanceof getWindow(node).SVGElement;\n}\n\nfunction getOwnerDocument(target) {\n if (!target) {\n return document;\n }\n\n if (isWindow(target)) {\n return target.document;\n }\n\n if (!isNode(target)) {\n return document;\n }\n\n if (isDocument(target)) {\n return target;\n }\n\n if (isHTMLElement(target) || isSVGElement(target)) {\n return target.ownerDocument;\n }\n\n return document;\n}\n\n/**\r\n * A hook that resolves to useEffect on the server and useLayoutEffect on the client\r\n * @param callback {function} Callback function that is invoked when the dependencies of the hook change\r\n */\n\nconst useIsomorphicLayoutEffect = canUseDOM ? useLayoutEffect : useEffect;\n\nfunction useEvent(handler) {\n const handlerRef = useRef(handler);\n useIsomorphicLayoutEffect(() => {\n handlerRef.current = handler;\n });\n return useCallback(function () {\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n return handlerRef.current == null ? void 0 : handlerRef.current(...args);\n }, []);\n}\n\nfunction useInterval() {\n const intervalRef = useRef(null);\n const set = useCallback((listener, duration) => {\n intervalRef.current = setInterval(listener, duration);\n }, []);\n const clear = useCallback(() => {\n if (intervalRef.current !== null) {\n clearInterval(intervalRef.current);\n intervalRef.current = null;\n }\n }, []);\n return [set, clear];\n}\n\nfunction useLatestValue(value, dependencies) {\n if (dependencies === void 0) {\n dependencies = [value];\n }\n\n const valueRef = useRef(value);\n useIsomorphicLayoutEffect(() => {\n if (valueRef.current !== value) {\n valueRef.current = value;\n }\n }, dependencies);\n return valueRef;\n}\n\nfunction useLazyMemo(callback, dependencies) {\n const valueRef = useRef();\n return useMemo(() => {\n const newValue = callback(valueRef.current);\n valueRef.current = newValue;\n return newValue;\n }, // eslint-disable-next-line react-hooks/exhaustive-deps\n [...dependencies]);\n}\n\nfunction useNodeRef(onChange) {\n const onChangeHandler = useEvent(onChange);\n const node = useRef(null);\n const setNodeRef = useCallback(element => {\n if (element !== node.current) {\n onChangeHandler == null ? void 0 : onChangeHandler(element, node.current);\n }\n\n node.current = element;\n }, //eslint-disable-next-line\n []);\n return [node, setNodeRef];\n}\n\nfunction usePrevious(value) {\n const ref = useRef();\n useEffect(() => {\n ref.current = value;\n }, [value]);\n return ref.current;\n}\n\nlet ids = {};\nfunction useUniqueId(prefix, value) {\n return useMemo(() => {\n if (value) {\n return value;\n }\n\n const id = ids[prefix] == null ? 0 : ids[prefix] + 1;\n ids[prefix] = id;\n return prefix + \"-\" + id;\n }, [prefix, value]);\n}\n\nfunction createAdjustmentFn(modifier) {\n return function (object) {\n for (var _len = arguments.length, adjustments = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n adjustments[_key - 1] = arguments[_key];\n }\n\n return adjustments.reduce((accumulator, adjustment) => {\n const entries = Object.entries(adjustment);\n\n for (const [key, valueAdjustment] of entries) {\n const value = accumulator[key];\n\n if (value != null) {\n accumulator[key] = value + modifier * valueAdjustment;\n }\n }\n\n return accumulator;\n }, { ...object\n });\n };\n}\n\nconst add = /*#__PURE__*/createAdjustmentFn(1);\nconst subtract = /*#__PURE__*/createAdjustmentFn(-1);\n\nfunction hasViewportRelativeCoordinates(event) {\n return 'clientX' in event && 'clientY' in event;\n}\n\nfunction isKeyboardEvent(event) {\n if (!event) {\n return false;\n }\n\n const {\n KeyboardEvent\n } = getWindow(event.target);\n return KeyboardEvent && event instanceof KeyboardEvent;\n}\n\nfunction isTouchEvent(event) {\n if (!event) {\n return false;\n }\n\n const {\n TouchEvent\n } = getWindow(event.target);\n return TouchEvent && event instanceof TouchEvent;\n}\n\n/**\r\n * Returns the normalized x and y coordinates for mouse and touch events.\r\n */\n\nfunction getEventCoordinates(event) {\n if (isTouchEvent(event)) {\n if (event.touches && event.touches.length) {\n const {\n clientX: x,\n clientY: y\n } = event.touches[0];\n return {\n x,\n y\n };\n } else if (event.changedTouches && event.changedTouches.length) {\n const {\n clientX: x,\n clientY: y\n } = event.changedTouches[0];\n return {\n x,\n y\n };\n }\n }\n\n if (hasViewportRelativeCoordinates(event)) {\n return {\n x: event.clientX,\n y: event.clientY\n };\n }\n\n return null;\n}\n\nconst CSS = /*#__PURE__*/Object.freeze({\n Translate: {\n toString(transform) {\n if (!transform) {\n return;\n }\n\n const {\n x,\n y\n } = transform;\n return \"translate3d(\" + (x ? Math.round(x) : 0) + \"px, \" + (y ? Math.round(y) : 0) + \"px, 0)\";\n }\n\n },\n Scale: {\n toString(transform) {\n if (!transform) {\n return;\n }\n\n const {\n scaleX,\n scaleY\n } = transform;\n return \"scaleX(\" + scaleX + \") scaleY(\" + scaleY + \")\";\n }\n\n },\n Transform: {\n toString(transform) {\n if (!transform) {\n return;\n }\n\n return [CSS.Translate.toString(transform), CSS.Scale.toString(transform)].join(' ');\n }\n\n },\n Transition: {\n toString(_ref) {\n let {\n property,\n duration,\n easing\n } = _ref;\n return property + \" \" + duration + \"ms \" + easing;\n }\n\n }\n});\n\nconst SELECTOR = 'a,frame,iframe,input:not([type=hidden]):not(:disabled),select:not(:disabled),textarea:not(:disabled),button:not(:disabled),*[tabindex]';\nfunction findFirstFocusableNode(element) {\n if (element.matches(SELECTOR)) {\n return element;\n }\n\n return element.querySelector(SELECTOR);\n}\n\nexport { CSS, add, canUseDOM, findFirstFocusableNode, getEventCoordinates, getOwnerDocument, getWindow, hasViewportRelativeCoordinates, isDocument, isHTMLElement, isKeyboardEvent, isNode, isSVGElement, isTouchEvent, isWindow, subtract, useCombinedRefs, useEvent, useInterval, useIsomorphicLayoutEffect, useLatestValue, useLazyMemo, useNodeRef, usePrevious, useUniqueId };\n//# sourceMappingURL=utilities.esm.js.map\n","import React, { useState, useCallback } from 'react';\n\nconst hiddenStyles = {\n display: 'none'\n};\nfunction HiddenText(_ref) {\n let {\n id,\n value\n } = _ref;\n return React.createElement(\"div\", {\n id: id,\n style: hiddenStyles\n }, value);\n}\n\nfunction LiveRegion(_ref) {\n let {\n id,\n announcement,\n ariaLiveType = \"assertive\"\n } = _ref;\n // Hide element visually but keep it readable by screen readers\n const visuallyHidden = {\n position: 'fixed',\n width: 1,\n height: 1,\n margin: -1,\n border: 0,\n padding: 0,\n overflow: 'hidden',\n clip: 'rect(0 0 0 0)',\n clipPath: 'inset(100%)',\n whiteSpace: 'nowrap'\n };\n return React.createElement(\"div\", {\n id: id,\n style: visuallyHidden,\n role: \"status\",\n \"aria-live\": ariaLiveType,\n \"aria-atomic\": true\n }, announcement);\n}\n\nfunction useAnnouncement() {\n const [announcement, setAnnouncement] = useState('');\n const announce = useCallback(value => {\n if (value != null) {\n setAnnouncement(value);\n }\n }, []);\n return {\n announce,\n announcement\n };\n}\n\nexport { HiddenText, LiveRegion, useAnnouncement };\n//# sourceMappingURL=accessibility.esm.js.map\n","import React, { createContext, useContext, useEffect, useState, useCallback, useMemo, useRef, useReducer, memo, cloneElement, forwardRef } from 'react';\nimport { createPortal, unstable_batchedUpdates } from 'react-dom';\nimport { useUniqueId, getEventCoordinates, getWindow, isDocument, isHTMLElement, isSVGElement, canUseDOM, isWindow, isNode, getOwnerDocument, add, isKeyboardEvent, subtract, useLazyMemo, useInterval, usePrevious, useLatestValue, useEvent, useIsomorphicLayoutEffect, useNodeRef, findFirstFocusableNode, CSS } from '@dnd-kit/utilities';\nimport { useAnnouncement, HiddenText, LiveRegion } from '@dnd-kit/accessibility';\n\nconst DndMonitorContext = /*#__PURE__*/createContext(null);\n\nfunction useDndMonitor(listener) {\n const registerListener = useContext(DndMonitorContext);\n useEffect(() => {\n if (!registerListener) {\n throw new Error('useDndMonitor must be used within a children of <DndContext>');\n }\n\n const unsubscribe = registerListener(listener);\n return unsubscribe;\n }, [listener, registerListener]);\n}\n\nfunction useDndMonitorProvider() {\n const [listeners] = useState(() => new Set());\n const registerListener = useCallback(listener => {\n listeners.add(listener);\n return () => listeners.delete(listener);\n }, [listeners]);\n const dispatch = useCallback(_ref => {\n let {\n type,\n event\n } = _ref;\n listeners.forEach(listener => {\n var _listener$type;\n\n return (_listener$type = listener[type]) == null ? void 0 : _listener$type.call(listener, event);\n });\n }, [listeners]);\n return [dispatch, registerListener];\n}\n\nconst defaultScreenReaderInstructions = {\n draggable: \"\\n To pick up a draggable item, press the space bar.\\n While dragging, use the arrow keys to move the item.\\n Press space again to drop the item in its new position, or press escape to cancel.\\n \"\n};\nconst defaultAnnouncements = {\n onDragStart(_ref) {\n let {\n active\n } = _ref;\n return \"Picked up draggable item \" + active.id + \".\";\n },\n\n onDragOver(_ref2) {\n let {\n active,\n over\n } = _ref2;\n\n if (over) {\n return \"Draggable item \" + active.id + \" was moved over droppable area \" + over.id + \".\";\n }\n\n return \"Draggable item \" + active.id + \" is no longer over a droppable area.\";\n },\n\n onDragEnd(_ref3) {\n let {\n active,\n over\n } = _ref3;\n\n if (over) {\n return \"Draggable item \" + active.id + \" was dropped over droppable area \" + over.id;\n }\n\n return \"Draggable item \" + active.id + \" was dropped.\";\n },\n\n onDragCancel(_ref4) {\n let {\n active\n } = _ref4;\n return \"Dragging was cancelled. Draggable item \" + active.id + \" was dropped.\";\n }\n\n};\n\nfunction Accessibility(_ref) {\n let {\n announcements = defaultAnnouncements,\n container,\n hiddenTextDescribedById,\n screenReaderInstructions = defaultScreenReaderInstructions\n } = _ref;\n const {\n announce,\n announcement\n } = useAnnouncement();\n const liveRegionId = useUniqueId(\"DndLiveRegion\");\n const [mounted, setMounted] = useState(false);\n useEffect(() => {\n setMounted(true);\n }, []);\n useDndMonitor(useMemo(() => ({\n onDragStart(_ref2) {\n let {\n active\n } = _ref2;\n announce(announcements.onDragStart({\n active\n }));\n },\n\n onDragMove(_ref3) {\n let {\n active,\n over\n } = _ref3;\n\n if (announcements.onDragMove) {\n announce(announcements.onDragMove({\n active,\n over\n }));\n }\n },\n\n onDragOver(_ref4) {\n let {\n active,\n over\n } = _ref4;\n announce(announcements.onDragOver({\n active,\n over\n }));\n },\n\n onDragEnd(_ref5) {\n let {\n active,\n over\n } = _ref5;\n announce(announcements.onDragEnd({\n active,\n over\n }));\n },\n\n onDragCancel(_ref6) {\n let {\n active,\n over\n } = _ref6;\n announce(announcements.onDragCancel({\n active,\n over\n }));\n }\n\n }), [announce, announcements]));\n\n if (!mounted) {\n return null;\n }\n\n const markup = React.createElement(React.Fragment, null, React.createElement(HiddenText, {\n id: hiddenTextDescribedById,\n value: screenReaderInstructions.draggable\n }), React.createElement(LiveRegion, {\n id: liveRegionId,\n announcement: announcement\n }));\n return container ? createPortal(markup, container) : markup;\n}\n\nvar Action;\n\n(function (Action) {\n Action[\"DragStart\"] = \"dragStart\";\n Action[\"DragMove\"] = \"dragMove\";\n Action[\"DragEnd\"] = \"dragEnd\";\n Action[\"DragCancel\"] = \"dragCancel\";\n Action[\"DragOver\"] = \"dragOver\";\n Action[\"RegisterDroppable\"] = \"registerDroppable\";\n Action[\"SetDroppableDisabled\"] = \"setDroppableDisabled\";\n Action[\"UnregisterDroppable\"] = \"unregisterDroppable\";\n})(Action || (Action = {}));\n\nfunction noop() {}\n\nfunction useSensor(sensor, options) {\n return useMemo(() => ({\n sensor,\n options: options != null ? options : {}\n }), // eslint-disable-next-line react-hooks/exhaustive-deps\n [sensor, options]);\n}\n\nfunction useSensors() {\n for (var _len = arguments.length, sensors = new Array(_len), _key = 0; _key < _len; _key++) {\n sensors[_key] = arguments[_key];\n }\n\n return useMemo(() => [...sensors].filter(sensor => sensor != null), // eslint-disable-next-line react-hooks/exhaustive-deps\n [...sensors]);\n}\n\nconst defaultCoordinates = /*#__PURE__*/Object.freeze({\n x: 0,\n y: 0\n});\n\n/**\r\n * Returns the distance between two points\r\n */\nfunction distanceBetween(p1, p2) {\n return Math.sqrt(Math.pow(p1.x - p2.x, 2) + Math.pow(p1.y - p2.y, 2));\n}\n\nfunction getRelativeTransformOrigin(event, rect) {\n const eventCoordinates = getEventCoordinates(event);\n\n if (!eventCoordinates) {\n return '0 0';\n }\n\n const transformOrigin = {\n x: (eventCoordinates.x - rect.left) / rect.width * 100,\n y: (eventCoordinates.y - rect.top) / rect.height * 100\n };\n return transformOrigin.x + \"% \" + transformOrigin.y + \"%\";\n}\n\n/**\r\n * Sort collisions from smallest to greatest value\r\n */\nfunction sortCollisionsAsc(_ref, _ref2) {\n let {\n data: {\n value: a\n }\n } = _ref;\n let {\n data: {\n value: b\n }\n } = _ref2;\n return a - b;\n}\n/**\r\n * Sort collisions from greatest to smallest value\r\n */\n\nfunction sortCollisionsDesc(_ref3, _ref4) {\n let {\n data: {\n value: a\n }\n } = _ref3;\n let {\n data: {\n value: b\n }\n } = _ref4;\n return b - a;\n}\n/**\r\n * Returns the coordinates of the corners of a given rectangle:\r\n * [TopLeft {x, y}, TopRight {x, y}, BottomLeft {x, y}, BottomRight {x, y}]\r\n */\n\nfunction cornersOfRectangle(_ref5) {\n let {\n left,\n top,\n height,\n width\n } = _ref5;\n return [{\n x: left,\n y: top\n }, {\n x: left + width,\n y: top\n }, {\n x: left,\n y: top + height\n }, {\n x: left + width,\n y: top + height\n }];\n}\nfunction getFirstCollision(collisions, property) {\n if (!collisions || collisions.length === 0) {\n return null;\n }\n\n const [firstCollision] = collisions;\n return property ? firstCollision[property] : firstCollision;\n}\n\n/**\r\n * Returns the coordinates of the center of a given ClientRect\r\n */\n\nfunction centerOfRectangle(rect, left, top) {\n if (left === void 0) {\n left = rect.left;\n }\n\n if (top === void 0) {\n top = rect.top;\n }\n\n return {\n x: left + rect.width * 0.5,\n y: top + rect.height * 0.5\n };\n}\n/**\r\n * Returns the closest rectangles from an array of rectangles to the center of a given\r\n * rectangle.\r\n */\n\n\nconst closestCenter = _ref => {\n let {\n collisionRect,\n droppableRects,\n droppableContainers\n } = _ref;\n const centerRect = centerOfRectangle(collisionRect, collisionRect.left, collisionRect.top);\n const collisions = [];\n\n for (const droppableContainer of droppableContainers) {\n const {\n id\n } = droppableContainer;\n const rect = droppableRects.get(id);\n\n if (rect) {\n const distBetween = distanceBetween(centerOfRectangle(rect), centerRect);\n collisions.push({\n id,\n data: {\n droppableContainer,\n value: distBetween\n }\n });\n }\n }\n\n return collisions.sort(sortCollisionsAsc);\n};\n\n/**\r\n * Returns the closest rectangles from an array of rectangles to the corners of\r\n * another rectangle.\r\n */\n\nconst closestCorners = _ref => {\n let {\n collisionRect,\n droppableRects,\n droppableContainers\n } = _ref;\n const corners = cornersOfRectangle(collisionRect);\n const collisions = [];\n\n for (const droppableContainer of droppableContainers) {\n const {\n id\n } = droppableContainer;\n const rect = droppableRects.get(id);\n\n if (rect) {\n const rectCorners = cornersOfRectangle(rect);\n const distances = corners.reduce((accumulator, corner, index) => {\n return accumulator + distanceBetween(rectCorners[index], corner);\n }, 0);\n const effectiveDistance = Number((distances / 4).toFixed(4));\n collisions.push({\n id,\n data: {\n droppableContainer,\n value: effectiveDistance\n }\n });\n }\n }\n\n return collisions.sort(sortCollisionsAsc);\n};\n\n/**\r\n * Returns the intersecting rectangle area between two rectangles\r\n */\n\nfunction getIntersectionRatio(entry, target) {\n const top = Math.max(target.top, entry.top);\n const left = Math.max(target.left, entry.left);\n const right = Math.min(target.left + target.width, entry.left + entry.width);\n const bottom = Math.min(target.top + target.height, entry.top + entry.height);\n const width = right - left;\n const height = bottom - top;\n\n if (left < right && top < bottom) {\n const targetArea = target.width * target.height;\n const entryArea = entry.width * entry.height;\n const intersectionArea = width * height;\n const intersectionRatio = intersectionArea / (targetArea + entryArea - intersectionArea);\n return Number(intersectionRatio.toFixed(4));\n } // Rectangles do not overlap, or overlap has an area of zero (edge/corner overlap)\n\n\n return 0;\n}\n/**\r\n * Returns the rectangles that has the greatest intersection area with a given\r\n * rectangle in an array of rectangles.\r\n */\n\nconst rectIntersection = _ref => {\n let {\n collisionRect,\n droppableRects,\n droppableContainers\n } = _ref;\n const collisions = [];\n\n for (const droppableContainer of droppableContainers) {\n const {\n id\n } = droppableContainer;\n const rect = droppableRects.get(id);\n\n if (rect) {\n const intersectionRatio = getIntersectionRatio(rect, collisionRect);\n\n if (intersectionRatio > 0) {\n collisions.push({\n id,\n data: {\n droppableContainer,\n value: intersectionRatio\n }\n });\n }\n }\n }\n\n return collisions.sort(sortCollisionsDesc);\n};\n\n/**\r\n * Check if a given point is contained within a bounding rectangle\r\n */\n\nfunction isPointWithinRect(point, rect) {\n const {\n top,\n left,\n bottom,\n right\n } = rect;\n return top <= point.y && point.y <= bottom && left <= point.x && point.x <= right;\n}\n/**\r\n * Returns the rectangles that the pointer is hovering over\r\n */\n\n\nconst pointerWithin = _ref => {\n let {\n droppableContainers,\n droppableRects,\n pointerCoordinates\n } = _ref;\n\n if (!pointerCoordinates) {\n return [];\n }\n\n const collisions = [];\n\n for (const droppableContainer of droppableContainers) {\n const {\n id\n } = droppableContainer;\n const rect = droppableRects.get(id);\n\n if (rect && isPointWithinRect(pointerCoordinates, rect)) {\n /* There may be more than a single rectangle intersecting\r\n * with the pointer coordinates. In order to sort the\r\n * colliding rectangles, we measure the distance between\r\n * the pointer and the corners of the intersecting rectangle\r\n */\n const corners = cornersOfRectangle(rect);\n const distances = corners.reduce((accumulator, corner) => {\n return accumulator + distanceBetween(pointerCoordinates, corner);\n }, 0);\n const effectiveDistance = Number((distances / 4).toFixed(4));\n collisions.push({\n id,\n data: {\n droppableContainer,\n value: effectiveDistance\n }\n });\n }\n }\n\n return collisions.sort(sortCollisionsAsc);\n};\n\nfunction adjustScale(transform, rect1, rect2) {\n return { ...transform,\n scaleX: rect1 && rect2 ? rect1.width / rect2.width : 1,\n scaleY: rect1 && rect2 ? rect1.height / rect2.height : 1\n };\n}\n\nfunction getRectDelta(rect1, rect2) {\n return rect1 && rect2 ? {\n x: rect1.left - rect2.left,\n y: rect1.top - rect2.top\n } : defaultCoordinates;\n}\n\nfunction createRectAdjustmentFn(modifier) {\n return function adjustClientRect(rect) {\n for (var _len = arguments.length, adjustments = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n adjustments[_key - 1] = arguments[_key];\n }\n\n return adjustments.reduce((acc, adjustment) => ({ ...acc,\n top: acc.top + modifier * adjustment.y,\n bottom: acc.bottom + modifier * adjustment.y,\n left: acc.left + modifier * adjustment.x,\n right: acc.right + modifier * adjustment.x\n }), { ...rect\n });\n };\n}\nconst getAdjustedRect = /*#__PURE__*/createRectAdjustmentFn(1);\n\nfunction parseTransform(transform) {\n if (transform.startsWith('matrix3d(')) {\n const transformArray = transform.slice(9, -1).split(/, /);\n return {\n x: +transformArray[12],\n y: +transformArray[13],\n scaleX: +transformArray[0],\n scaleY: +transformArray[5]\n };\n } else if (transform.startsWith('matrix(')) {\n const transformArray = transform.slice(7, -1).split(/, /);\n return {\n x: +transformArray[4],\n y: +transformArray[5],\n scaleX: +transformArray[0],\n scaleY: +transformArray[3]\n };\n }\n\n return null;\n}\n\nfunction inverseTransform(rect, transform, transformOrigin) {\n const parsedTransform = parseTransform(transform);\n\n if (!parsedTransform) {\n return rect;\n }\n\n const {\n scaleX,\n scaleY,\n x: translateX,\n y: translateY\n } = parsedTransform;\n const x = rect.left - translateX - (1 - scaleX) * parseFloat(transformOrigin);\n const y = rect.top - translateY - (1 - scaleY) * parseFloat(transformOrigin.slice(transformOrigin.indexOf(' ') + 1));\n const w = scaleX ? rect.width / scaleX : rect.width;\n const h = scaleY ? rect.height / scaleY : rect.height;\n return {\n width: w,\n height: h,\n top: y,\n right: x + w,\n bottom: y + h,\n left: x\n };\n}\n\nconst defaultOptions = {\n ignoreTransform: false\n};\n/**\r\n * Returns the bounding client rect of an element relative to the viewport.\r\n */\n\nfunction getClientRect(element, options) {\n if (options === void 0) {\n options = defaultOptions;\n }\n\n let rect = element.getBoundingClientRect();\n\n if (options.ignoreTransform) {\n const {\n transform,\n transformOrigin\n } = getWindow(element).getComputedStyle(element);\n\n if (transform) {\n rect = inverseTransform(rect, transform, transformOrigin);\n }\n }\n\n const {\n top,\n left,\n width,\n height,\n bottom,\n right\n } = rect;\n return {\n top,\n left,\n width,\n height,\n bottom,\n right\n };\n}\n/**\r\n * Returns the bounding client rect of an element relative to the viewport.\r\n *\r\n * @remarks\r\n * The ClientRect returned by this method does not take into account transforms\r\n * applied to the element it measures.\r\n *\r\n */\n\nfunction getTransformAgnosticClientRect(element) {\n return getClientRect(element, {\n ignoreTransform: true\n });\n}\n\nfunction getWindowClientRect(element) {\n const width = element.innerWidth;\n const height = element.innerHeight;\n return {\n top: 0,\n left: 0,\n right: width,\n bottom: height,\n width,\n height\n };\n}\n\nfunction isFixed(node, computedStyle) {\n if (computedStyle === void 0) {\n computedStyle = getWindow(node).getComputedStyle(node);\n }\n\n return computedStyle.position === 'fixed';\n}\n\nfunction isScrollable(element, computedStyle) {\n if (computedStyle === void 0) {\n computedStyle = getWindow(element).getComputedStyle(element);\n }\n\n const overflowRegex = /(auto|scroll|overlay)/;\n const properties = ['overflow', 'overflowX', 'overflowY'];\n return properties.some(property => {\n const value = computedStyle[property];\n return typeof value === 'string' ? overflowRegex.test(value) : false;\n });\n}\n\nfunction getScrollableAncestors(element, limit) {\n const scrollParents = [];\n\n function findScrollableAncestors(node) {\n if (limit != null && scrollParents.length >= limit) {\n return scrollParents;\n }\n\n if (!node) {\n return scrollParents;\n }\n\n if (isDocument(node) && node.scrollingElement != null && !scrollParents.includes(node.scrollingElement)) {\n scrollParents.push(node.scrollingElement);\n return scrollParents;\n }\n\n if (!isHTMLElement(node) || isSVGElement(node)) {\n return scrollParents;\n }\n\n if (scrollParents.includes(node)) {\n return scrollParents;\n }\n\n const computedStyle = getWindow(element).getComputedStyle(node);\n\n if (node !== element) {\n if (isScrollable(node, computedStyle)) {\n scrollParents.push(node);\n }\n }\n\n if (isFixed(node, computedStyle)) {\n return scrollParents;\n }\n\n return findScrollableAncestors(node.parentNode);\n }\n\n if (!element) {\n return scrollParents;\n }\n\n return findScrollableAncestors(element);\n}\nfunction getFirstScrollableAncestor(node) {\n const [firstScrollableAncestor] = getScrollableAncestors(node, 1);\n return firstScrollableAncestor != null ? firstScrollableAncestor : null;\n}\n\nfunction getScrollableElement(element) {\n if (!canUseDOM || !element) {\n return null;\n }\n\n if (isWindow(element)) {\n return element;\n }\n\n if (!isNode(element)) {\n return null;\n }\n\n if (isDocument(element) || element === getOwnerDocument(element).scrollingElement) {\n return window;\n }\n\n if (isHTMLElement(element)) {\n return element;\n }\n\n return null;\n}\n\nfunction getScrollXCoordinate(element) {\n if (isWindow(element)) {\n return element.scrollX;\n }\n\n return element.scrollLeft;\n}\nfunction getScrollYCoordinate(element) {\n if (isWindow(element)) {\n return element.scrollY;\n }\n\n return element.scrollTop;\n}\nfunction getScrollCoordinates(element) {\n return {\n x: getScrollXCoordinate(element),\n y: getScrollYCoordinate(element)\n };\n}\n\nvar Direction;\n\n(function (Direction) {\n Direction[Direction[\"Forward\"] = 1] = \"Forward\";\n Direction[Direction[\"Backward\"] = -1] = \"Backward\";\n})(Direction || (Direction = {}));\n\nfunction isDocumentScrollingElement(element) {\n if (!canUseDOM || !element) {\n return false;\n }\n\n return element === document.scrollingElement;\n}\n\nfunction getScrollPosition(scrollingContainer) {\n const minScroll = {\n x: 0,\n y: 0\n };\n const dimensions = isDocumentScrollingElement(scrollingContainer) ? {\n height: window.innerHeight,\n width: window.innerWidth\n } : {\n height: scrollingContainer.clientHeight,\n width: scrollingContainer.clientWidth\n };\n const maxScroll = {\n x: scrollingContainer.scrollWidth - dimensions.width,\n y: scrollingContainer.scrollHeight - dimensions.height\n };\n const isTop = scrollingContainer.scrollTop <= minScroll.y;\n const isLeft = scrollingContainer.scrollLeft <= minScroll.x;\n const isBottom = scrollingContainer.scrollTop >= maxScroll.y;\n const isRight = scrollingContainer.scrollLeft >= maxScroll.x;\n return {\n isTop,\n isLeft,\n isBottom,\n isRight,\n maxScroll,\n minScroll\n };\n}\n\nconst defaultThreshold = {\n x: 0.2,\n y: 0.2\n};\nfunction getScrollDirectionAndSpeed(scrollContainer, scrollContainerRect, _ref, acceleration, thresholdPercentage) {\n let {\n top,\n left,\n right,\n bottom\n } = _ref;\n\n if (acceleration === void 0) {\n acceleration = 10;\n }\n\n if (thresholdPercentage === void 0) {\n thresholdPercentage = defaultThreshold;\n }\n\n const {\n isTop,\n isBottom,\n isLeft,\n isRight\n } = getScrollPosition(scrollContainer);\n const direction = {\n x: 0,\n y: 0\n };\n const speed = {\n x: 0,\n y: 0\n };\n const threshold = {\n height: scrollContainerRect.height * thresholdPercentage.y,\n width: scrollContainerRect.width * thresholdPercentage.x\n };\n\n if (!isTop && top <= scrollContainerRect.top + threshold.height) {\n // Scroll Up\n direction.y = Direction.Backward;\n speed.y = acceleration * Math.abs((scrollContainerRect.top + threshold.height - top) / threshold.height);\n } else if (!isBottom && bottom >= scrollContainerRect.bottom - threshold.height) {\n // Scroll Down\n direction.y = Direction.Forward;\n speed.y = acceleration * Math.abs((scrollContainerRect.bottom - threshold.height - bottom) / threshold.height);\n }\n\n if (!isRight && right >= scrollContainerRect.right - threshold.width) {\n // Scroll Right\n direction.x = Direction.Forward;\n speed.x = acceleration * Math.abs((scrollContainerRect.right - threshold.width - right) / threshold.width);\n } else if (!isLeft && left <= scrollContainerRect.left + threshold.width) {\n // Scroll Left\n direction.x = Direction.Backward;\n speed.x = acceleration * Math.abs((scrollContainerRect.left + threshold.width - left) / threshold.width);\n }\n\n return {\n direction,\n speed\n };\n}\n\nfunction getScrollElementRect(element) {\n if (element === document.scrollingElement) {\n const {\n innerWidth,\n innerHeight\n } = window;\n return {\n top: 0,\n left: 0,\n right: innerWidth,\n bottom: innerHeight,\n width: innerWidth,\n height: innerHeight\n };\n }\n\n const {\n top,\n left,\n right,\n bottom\n } = element.getBoundingClientRect();\n return {\n top,\n left,\n right,\n bottom,\n width: element.clientWidth,\n height: element.clientHeight\n };\n}\n\nfunction getScrollOffsets(scrollableAncestors) {\n return scrollableAncestors.reduce((acc, node) => {\n return add(acc, getScrollCoordinates(node));\n }, defaultCoordinates);\n}\nfunction getScrollXOffset(scrollableAncestors) {\n return scrollableAncestors.reduce((acc, node) => {\n return acc + getScrollXCoordinate(node);\n }, 0);\n}\nfunction getScrollYOffset(scrollableAncestors) {\n return scrollableAncestors.reduce((acc, node) => {\n return acc + getScrollYCoordinate(node);\n }, 0);\n}\n\nfunction scrollIntoViewIfNeeded(element, measure) {\n if (measure === void 0) {\n measure = getClientRect;\n }\n\n if (!element) {\n return;\n }\n\n const {\n top,\n left,\n bottom,\n right\n } = measure(element);\n const firstScrollableAncestor = getFirstScrollableAncestor(element);\n\n if (!firstScrollableAncestor) {\n return;\n }\n\n if (bottom <= 0 || right <= 0 || top >= window.innerHeight || left >= window.innerWidth) {\n element.scrollIntoView({\n block: 'center',\n inline: 'center'\n });\n }\n}\n\nconst properties = [['x', ['left', 'right'], getScrollXOffset], ['y', ['top', 'bottom'], getScrollYOffset]];\nclass Rect {\n constructor(rect, element) {\n this.rect = void 0;\n this.width = void 0;\n this.height = void 0;\n this.top = void 0;\n this.bottom = void 0;\n this.right = void 0;\n this.left = void 0;\n const scrollableAncestors = getScrollableAncestors(element);\n const scrollOffsets = getScrollOffsets(scrollableAncestors);\n this.rect = { ...rect\n };\n this.width = rect.width;\n this.height = rect.height;\n\n for (const [axis, keys, getScrollOffset] of properties) {\n for (const key of keys) {\n Object.defineProperty(this, key, {\n get: () => {\n const currentOffsets = getScrollOffset(scrollableAncestors);\n const scrollOffsetsDeltla = scrollOffsets[axis] - currentOffsets;\n return this.rect[key] + scrollOffsetsDeltla;\n },\n enumerable: true\n });\n }\n }\n\n Object.defineProperty(this, 'rect', {\n enumerable: false\n });\n }\n\n}\n\nclass Listeners {\n constructor(target) {\n this.target = void 0;\n this.listeners = [];\n\n this.removeAll = () => {\n this.listeners.forEach(listener => {\n var _this$target;\n\n return (_this$target = this.target) == null ? void 0 : _this$target.removeEventListener(...listener);\n });\n };\n\n this.target = target;\n }\n\n add(eventName, handler, options) {\n var _this$target2;\n\n (_this$target2 = this.target) == null ? void 0 : _this$target2.addEventListener(eventName, handler, options);\n this.listeners.push([eventName, handler, options]);\n }\n\n}\n\nfunction getEventListenerTarget(target) {\n // If the `event.target` element is removed from the document events will still be targeted\n // at it, and hence won't always bubble up to the window or document anymore.\n // If there is any risk of an element being removed while it is being dragged,\n // the best practice is to attach the event listeners directly to the target.\n // https://developer.mozilla.org/en-US/docs/Web/API/EventTarget\n const {\n EventTarget\n } = getWindow(target);\n return target instanceof EventTarget ? target : getOwnerDocument(target);\n}\n\nfunction hasExceededDistance(delta, measurement) {\n const dx = Math.abs(delta.x);\n const dy = Math.abs(delta.y);\n\n if (typeof measurement === 'number') {\n return Math.sqrt(dx ** 2 + dy ** 2) > measurement;\n }\n\n if ('x' in measurement && 'y' in measurement) {\n return dx > measurement.x && dy > measurement.y;\n }\n\n if ('x' in measurement) {\n return dx > measurement.x;\n }\n\n if ('y' in measurement) {\n return dy > measurement.y;\n }\n\n return false;\n}\n\nvar EventName;\n\n(function (EventName) {\n EventName[\"Click\"] = \"click\";\n EventName[\"DragStart\"] = \"dragstart\";\n EventName[\"Keydown\"] = \"keydown\";\n EventName[\"ContextMenu\"] = \"contextmenu\";\n EventName[\"Resize\"] = \"resize\";\n EventName[\"SelectionChange\"] = \"selectionchange\";\n EventName[\"VisibilityChange\"] = \"visibilitychange\";\n})(EventName || (EventName = {}));\n\nfunction preventDefault(event) {\n event.preventDefault();\n}\nfunction stopPropagation(event) {\n event.stopPropagation();\n}\n\nvar KeyboardCode;\n\n(function (KeyboardCode) {\n KeyboardCode[\"Space\"] = \"Space\";\n KeyboardCode[\"Down\"] = \"ArrowDown\";\n KeyboardCode[\"Right\"] = \"ArrowRight\";\n KeyboardCode[\"Left\"] = \"ArrowLeft\";\n KeyboardCode[\"Up\"] = \"ArrowUp\";\n KeyboardCode[\"Esc\"] = \"Escape\";\n KeyboardCode[\"Enter\"] = \"Enter\";\n})(KeyboardCode || (KeyboardCode = {}));\n\nconst defaultKeyboardCodes = {\n start: [KeyboardCode.Space, KeyboardCode.Enter],\n cancel: [KeyboardCode.Esc],\n end: [KeyboardCode.Space, KeyboardCode.Enter]\n};\nconst defaultKeyboardCoordinateGetter = (event, _ref) => {\n let {\n currentCoordinates\n } = _ref;\n\n switch (event.code) {\n case KeyboardCode.Right:\n return { ...currentCoordinates,\n x: currentCoordinates.x + 25\n };\n\n case KeyboardCode.Left:\n return { ...currentCoordinates,\n x: currentCoordinates.x - 25\n };\n\n case KeyboardCode.Down:\n return { ...currentCoordinates,\n y: currentCoordinates.y + 25\n };\n\n case KeyboardCode.Up:\n return { ...currentCoordinates,\n y: currentCoordinates.y - 25\n };\n }\n\n return undefined;\n};\n\nclass KeyboardSensor {\n constructor(props) {\n this.props = void 0;\n this.autoScrollEnabled = false;\n this.referenceCoordinates = void 0;\n this.listeners = void 0;\n this.windowListeners = void 0;\n this.props = props;\n const {\n event: {\n target\n }\n } = props;\n this.props = props;\n this.listeners = new Listeners(getOwnerDocument(target));\n this.windowListeners = new Listeners(getWindow(target));\n this.handleKeyDown = this.handleKeyDown.bind(this);\n this.handleCancel = this.handleCancel.bind(this);\n this.attach();\n }\n\n attach() {\n this.handleStart();\n this.windowListeners.add(EventName.Resize, this.handleCancel);\n this.windowListeners.add(EventName.VisibilityChange, this.handleCancel);\n setTimeout(() => this.listeners.add(EventName.Keydown, this.handleKeyDown));\n }\n\n handleStart() {\n const {\n activeNode,\n onStart\n } = this.props;\n const node = activeNode.node.current;\n\n if (node) {\n scrollIntoViewIfNeeded(node);\n }\n\n onStart(defaultCoordinates);\n }\n\n handleKeyDown(event) {\n if (isKeyboardEvent(event)) {\n const {\n active,\n context,\n options\n } = this.props;\n const {\n keyboardCodes = defaultKeyboardCodes,\n coordinateGetter = defaultKeyboardCoordinateGetter,\n scrollBehavior = 'smooth'\n } = options;\n const {\n code\n } = event;\n\n if (keyboardCodes.end.includes(code)) {\n this.handleEnd(event);\n return;\n }\n\n if (keyboardCodes.cancel.includes(code)) {\n this.handleCancel(event);\n return;\n }\n\n const {\n collisionRect\n } = context.current;\n const currentCoordinates = collisionRect ? {\n x: collisionRect.left,\n y: collisionRect.top\n } : defaultCoordinates;\n\n if (!this.referenceCoordinates) {\n this.referenceCoordinates = currentCoordinates;\n }\n\n const newCoordinates = coordinateGetter(event, {\n active,\n context: context.current,\n currentCoordinates\n });\n\n if (newCoordinates) {\n const coordinatesDelta = subtract(newCoordinates, currentCoordinates);\n const scrollDelta = {\n x: 0,\n y: 0\n };\n const {\n scrollableAncestors\n } = context.current;\n\n for (const scrollContainer of scrollableAncestors) {\n const direction = event.code;\n const {\n isTop,\n isRight,\n isLeft,\n isBottom,\n maxScroll,\n minScroll\n } = getScrollPosition(scrollContainer);\n const scrollElementRect = getScrollElementRect(scrollContainer);\n const clampedCoordinates = {\n x: Math.min(direction === KeyboardCode.Right ? scrollElementRect.right - scrollElementRect.width / 2 : scrollElementRect.right, Math.max(direction === KeyboardCode.Right ? scrollElementRect.left : scrollElementRect.left + scrollElementRect.width / 2, newCoordinates.x)),\n y: Math.min(direction === KeyboardCode.Down ? scrollElementRect.bottom - scrollElementRect.height / 2 : scrollElementRect.bottom, Math.max(direction === KeyboardCode.Down ? scrollElementRect.top : scrollElementRect.top + scrollElementRect.height / 2, newCoordinates.y))\n };\n const canScrollX = direction === KeyboardCode.Right && !isRight || direction === KeyboardCode.Left && !isLeft;\n const canScrollY = direction === KeyboardCode.Down && !isBottom || direction === KeyboardCode.Up && !isTop;\n\n if (canScrollX && clampedCoordinates.x !== newCoordinates.x) {\n const newScrollCoordinates = scrollContainer.scrollLeft + coordinatesDelta.x;\n const canScrollToNewCoordinates = direction === KeyboardCode.Right && newScrollCoordinates <= maxScroll.x || direction === KeyboardCode.Left && newScrollCoordinates >= minScroll.x;\n\n if (canScrollToNewCoordinates && !coordinatesDelta.y) {\n // We don't need to update coordinates, the scroll adjustment alone will trigger\n // logic to auto-detect the new container we are over\n scrollContainer.scrollTo({\n left: newScrollCoordinates,\n behavior: scrollBehavior\n });\n return;\n }\n\n if (canScrollToNewCoordinates) {\n scrollDelta.x = scrollContainer.scrollLeft - newScrollCoordinates;\n } else {\n scrollDelta.x = direction === KeyboardCode.Right ? scrollContainer.scrollLeft - maxScroll.x : scrollContainer.scrollLeft - minScroll.x;\n }\n\n if (scrollDelta.x) {\n scrollContainer.scrollBy({\n left: -scrollDelta.x,\n behavior: scrollBehavior\n });\n }\n\n break;\n } else if (canScrollY && clampedCoordinates.y !== newCoordinates.y) {\n const newScrollCoordinates = scrollContainer.scrollTop + coordinatesDelta.y;\n const canScrollToNewCoordinates = direction === KeyboardCode.Down && newScrollCoordinates <= maxScroll.y || direction === KeyboardCode.Up && newScrollCoordinates >= minScroll.y;\n\n if (canScrollToNewCoordinates && !coordinatesDelta.x) {\n // We don't need to update coordinates, the scroll adjustment alone will trigger\n // logic to auto-detect the new container we are over\n scrollContainer.scrollTo({\n top: newScrollCoordinates,\n behavior: scrollBehavior\n });\n return;\n }\n\n if (canScrollToNewCoordinates) {\n scrollDelta.y = scrollContainer.scrollTop - newScrollCoordinates;\n } else {\n scrollDelta.y = direction === KeyboardCode.Down ? scrollContainer.scrollTop - maxScroll.y : scrollContainer.scrollTop - minScroll.y;\n }\n\n if (scrollDelta.y) {\n scrollContainer.scrollBy({\n top: -scrollDelta.y,\n behavior: scrollBehavior\n });\n }\n\n break;\n }\n }\n\n this.handleMove(event, add(subtract(newCoordinates, this.referenceCoordinates), scrollDelta));\n }\n }\n }\n\n handleMove(event, coordinates) {\n const {\n onMove\n } = this.props;\n event.preventDefault();\n onMove(coordinates);\n }\n\n handleEnd(event) {\n const {\n onEnd\n } = this.props;\n event.preventDefault();\n this.detach();\n onEnd();\n }\n\n handleCancel(event) {\n const {\n onCancel\n } = this.props;\n event.preventDefault();\n this.detach();\n onCancel();\n }\n\n detach() {\n this.listeners.removeAll();\n this.windowListeners.removeAll();\n }\n\n}\nKeyboardSensor.activators = [{\n eventName: 'onKeyDown',\n handler: (event, _ref, _ref2) => {\n let {\n keyboardCodes = defaultKeyboardCodes,\n onActivation\n } = _ref;\n let {\n active\n } = _ref2;\n const {\n code\n } = event.nativeEvent;\n\n if (keyboardCodes.start.includes(code)) {\n const activator = active.activatorNode.current;\n\n if (activator && event.target !== activator) {\n return false;\n }\n\n event.preventDefault();\n onActivation == null ? void 0 : onActivation({\n event: event.nativeEvent\n });\n return true;\n }\n\n return false;\n }\n}];\n\nfunction isDistanceConstraint(constraint) {\n return Boolean(constraint && 'distance' in constraint);\n}\n\nfunction isDelayConstraint(constraint) {\n return Boolean(constraint && 'delay' in constraint);\n}\n\nclass AbstractPointerSensor {\n constructor(props, events, listenerTarget) {\n var _getEventCoordinates;\n\n if (listenerTarget === void 0) {\n listenerTarget = getEventListenerTarget(props.event.target);\n }\n\n this.props = void 0;\n this.events = void 0;\n this.autoScrollEnabled = true;\n this.document = void 0;\n this.activated = false;\n this.initialCoordinates = void 0;\n this.timeoutId = null;\n this.listeners = void 0;\n this.documentListeners = void 0;\n this.windowListeners = void 0;\n this.props = props;\n this.events = events;\n const {\n event\n } = props;\n const {\n target\n } = event;\n this.props = props;\n this.events = events;\n this.document = getOwnerDocument(target);\n this.documentListeners = new Listeners(this.document);\n this.listeners = new Listeners(listenerTarget);\n this.windowListeners = new Listeners(getWindow(target));\n this.initialCoordinates = (_getEventCoordinates = getEventCoordinates(event)) != null ? _getEventCoordinates : defaultCoordinates;\n this.handleStart = this.handleStart.bind(this);\n this.handleMove = this.handleMove.bind(this);\n this.handleEnd = this.handleEnd.bind(this);\n this.handleCancel = this.handleCancel.bind(this);\n this.handleKeydown = this.handleKeydown.bind(this);\n this.removeTextSelection = this.removeTextSelection.bind(this);\n this.attach();\n }\n\n attach() {\n const {\n events,\n props: {\n options: {\n activationConstraint,\n bypassActivationConstraint\n }\n }\n } = this;\n this.listeners.add(events.move.name, this.handleMove, {\n passive: false\n });\n this.listeners.add(events.end.name, this.handleEnd);\n this.windowListeners.add(EventName.Resize, this.handleCancel);\n this.windowListeners.add(EventName.DragStart, preventDefault);\n this.windowListeners.add(EventName.VisibilityChange, this.handleCancel);\n this.windowListeners.add(EventName.ContextMenu, preventDefault);\n this.documentListeners.add(EventName.Keydown, this.handleKeydown);\n\n if (activationConstraint) {\n if (bypassActivationConstraint != null && bypassActivationConstraint({\n event: this.props.event,\n activeNode: this.props.activeNode,\n options: this.props.options\n })) {\n return this.handleStart();\n }\n\n if (isDelayConstraint(activationConstraint)) {\n this.timeoutId = setTimeout(this.handleStart, activationConstraint.delay);\n return;\n }\n\n if (isDistanceConstraint(activationConstraint)) {\n return;\n }\n }\n\n this.handleStart();\n }\n\n detach() {\n this.listeners.removeAll();\n this.windowListeners.removeAll(); // Wait until the next event loop before removing document listeners\n // This is necessary because we listen for `click` and `selection` events on the document\n\n setTimeout(this.documentListeners.removeAll, 50);\n\n if (this.timeoutId !== null) {\n clearTimeout(this.timeoutId);\n this.timeoutId = null;\n }\n }\n\n handleStart() {\n const {\n initialCoordinates\n } = this;\n const {\n onStart\n } = this.props;\n\n if (initialCoordinates) {\n this.activated = true; // Stop propagation of click events once activation constraints are met\n\n this.documentListeners.add(EventName.Click, stopPropagation, {\n capture: true\n }); // Remove any text selection from the document\n\n this.removeTextSelection(); // Prevent further text selection while dragging\n\n this.documentListeners.add(EventName.SelectionChange, this.removeTextSelection);\n onStart(initialCoordinates);\n }\n }\n\n handleMove(event) {\n var _getEventCoordinates2;\n\n const {\n activated,\n initialCoordinates,\n props\n } = this;\n const {\n onMove,\n options: {\n activationConstraint\n }\n } = props;\n\n if (!initialCoordinates) {\n return;\n }\n\n const coordinates = (_getEventCoordinates2 = getEventCoordinates(event)) != null ? _getEventCoordinates2 : defaultCoordinates;\n const delta = subtract(initialCoordinates, coordinates); // Constraint validation\n\n if (!activated && activationConstraint) {\n if (isDistanceConstraint(activationConstraint)) {\n if (activationConstraint.tolerance != null && hasExceededDistance(delta, activationConstraint.tolerance)) {\n return this.handleCancel();\n }\n\n if (hasExceededDistance(delta, activationConstraint.distance)) {\n return this.handleStart();\n }\n }\n\n if (isDelayConstraint(activationConstraint)) {\n if (hasExceededDistance(delta, activationConstraint.tolerance)) {\n return this.handleCancel();\n }\n }\n\n return;\n }\n\n if (event.cancelable) {\n event.preventDefault();\n }\n\n onMove(coordinates);\n }\n\n handleEnd() {\n const {\n onEnd\n } = this.props;\n this.detach();\n onEnd();\n }\n\n handleCancel() {\n const {\n onCancel\n } = this.props;\n this.detach();\n onCancel();\n }\n\n handleKeydown(event) {\n if (event.code === KeyboardCode.Esc) {\n this.handleCancel();\n }\n }\n\n removeTextSelection() {\n var _this$document$getSel;\n\n (_this$document$getSel = this.document.getSelection()) == null ? void 0 : _this$document$getSel.removeAllRanges();\n }\n\n}\n\nconst events = {\n move: {\n name: 'pointermove'\n },\n end: {\n name: 'pointerup'\n }\n};\nclass PointerSensor extends AbstractPointerSensor {\n constructor(props) {\n const {\n event\n } = props; // Pointer events stop firing if the target is unmounted while dragging\n // Therefore we attach listeners to the owner document instead\n\n const listenerTarget = getOwnerDocument(event.target);\n super(props, events, listenerTarget);\n }\n\n}\nPointerSensor.activators = [{\n eventName: 'onPointerDown',\n handler: (_ref, _ref2) => {\n let {\n nativeEvent: event\n } = _ref;\n let {\n onActivation\n } = _ref2;\n\n if (!event.isPrimary || event.button !== 0) {\n return false;\n }\n\n onActivation == null ? void 0 : onActivation({\n event\n });\n return true;\n }\n}];\n\nconst events$1 = {\n move: {\n name: 'mousemove'\n },\n end: {\n name: 'mouseup'\n }\n};\nvar MouseButton;\n\n(function (MouseButton) {\n MouseButton[MouseButton[\"RightClick\"] = 2] = \"RightClick\";\n})(MouseButton || (MouseButton = {}));\n\nclass MouseSensor extends AbstractPointerSensor {\n constructor(props) {\n super(props, events$1, getOwnerDocument(props.event.target));\n }\n\n}\nMouseSensor.activators = [{\n eventName: 'onMouseDown',\n handler: (_ref, _ref2) => {\n let {\n nativeEvent: event\n } = _ref;\n let {\n onActivation\n } = _ref2;\n\n if (event.button === MouseButton.RightClick) {\n return false;\n }\n\n onActivation == null ? void 0 : onActivation({\n event\n });\n return true;\n }\n}];\n\nconst events$2 = {\n move: {\n name: 'touchmove'\n },\n end: {\n name: 'touchend'\n }\n};\nclass TouchSensor extends AbstractPointerSensor {\n constructor(props) {\n super(props, events$2);\n }\n\n static setup() {\n // Adding a non-capture and non-passive `touchmove` listener in order\n // to force `event.preventDefault()` calls to work in dynamically added\n // touchmove event handlers. This is required for iOS Safari.\n window.addEventListener(events$2.move.name, noop, {\n capture: false,\n passive: false\n });\n return function teardown() {\n window.removeEventListener(events$2.move.name, noop);\n }; // We create a new handler because the teardown function of another sensor\n // could remove our event listener if we use a referentially equal listener.\n\n function noop() {}\n }\n\n}\nTouchSensor.activators = [{\n eventName: 'onTouchStart',\n handler: (_ref, _ref2) => {\n let {\n nativeEvent: event\n } = _ref;\n let {\n onActivation\n } = _ref2;\n const {\n touches\n } = event;\n\n if (touches.length > 1) {\n return false;\n }\n\n onActivation == null ? void 0 : onActivation({\n event\n });\n return true;\n }\n}];\n\nvar AutoScrollActivator;\n\n(function (AutoScrollActivator) {\n AutoScrollActivator[AutoScrollActivator[\"Pointer\"] = 0] = \"Pointer\";\n AutoScrollActivator[AutoScrollActivator[\"DraggableRect\"] = 1] = \"DraggableRect\";\n})(AutoScrollActivator || (AutoScrollActivator = {}));\n\nvar TraversalOrder;\n\n(function (TraversalOrder) {\n TraversalOrder[TraversalOrder[\"TreeOrder\"] = 0] = \"TreeOrder\";\n TraversalOrder[TraversalOrder[\"ReversedTreeOrder\"] = 1] = \"ReversedTreeOrder\";\n})(TraversalOrder || (TraversalOrder = {}));\n\nfunction useAutoScroller(_ref) {\n let {\n acceleration,\n activator = AutoScrollActivator.Pointer,\n canScroll,\n draggingRect,\n enabled,\n interval = 5,\n order = TraversalOrder.TreeOrder,\n pointerCoordinates,\n scrollableAncestors,\n scrollableAncestorRects,\n delta,\n threshold\n } = _ref;\n const scrollIntent = useScrollIntent({\n delta,\n disabled: !enabled\n });\n const [setAutoScrollInterval, clearAutoScrollInterval] = useInterval();\n const scrollSpeed = useRef({\n x: 0,\n y: 0\n });\n const scrollDirection = useRef({\n x: 0,\n y: 0\n });\n const rect = useMemo(() => {\n switch (activator) {\n case AutoScrollActivator.Pointer:\n return pointerCoordinates ? {\n top: pointerCoordinates.y,\n bottom: pointerCoordinates.y,\n left: pointerCoordinates.x,\n right: pointerCoordinates.x\n } : null;\n\n case AutoScrollActivator.DraggableRect:\n return draggingRect;\n }\n }, [activator, draggingRect, pointerCoordinates]);\n const scrollContainerRef = useRef(null);\n const autoScroll = useCallback(() => {\n const scrollContainer = scrollContainerRef.current;\n\n if (!scrollContainer) {\n return;\n }\n\n const scrollLeft = scrollSpeed.current.x * scrollDirection.current.x;\n const scrollTop = scrollSpeed.current.y * scrollDirection.current.y;\n scrollContainer.scrollBy(scrollLeft, scrollTop);\n }, []);\n const sortedScrollableAncestors = useMemo(() => order === TraversalOrder.TreeOrder ? [...scrollableAncestors].reverse() : scrollableAncestors, [order, scrollableAncestors]);\n useEffect(() => {\n if (!enabled || !scrollableAncestors.length || !rect) {\n clearAutoScrollInterval();\n return;\n }\n\n for (const scrollContainer of sortedScrollableAncestors) {\n if ((canScroll == null ? void 0 : canScroll(scrollContainer)) === false) {\n continue;\n }\n\n const index = scrollableAncestors.indexOf(scrollContainer);\n const scrollContainerRect = scrollableAncestorRects[index];\n\n if (!scrollContainerRect) {\n continue;\n }\n\n const {\n direction,\n speed\n } = getScrollDirectionAndSpeed(scrollContainer, scrollContainerRect, rect, acceleration, threshold);\n\n for (const axis of ['x', 'y']) {\n if (!scrollIntent[axis][direction[axis]]) {\n speed[axis] = 0;\n direction[axis] = 0;\n }\n }\n\n if (speed.x > 0 || speed.y > 0) {\n clearAutoScrollInterval();\n scrollContainerRef.current = scrollContainer;\n setAutoScrollInterval(autoScroll, interval);\n scrollSpeed.current = speed;\n scrollDirection.current = direction;\n return;\n }\n }\n\n scrollSpeed.current = {\n x: 0,\n y: 0\n };\n scrollDirection.current = {\n x: 0,\n y: 0\n };\n clearAutoScrollInterval();\n }, // eslint-disable-next-line react-hooks/exhaustive-deps\n [acceleration, autoScroll, canScroll, clearAutoScrollInterval, enabled, interval, // eslint-disable-next-line react-hooks/exhaustive-deps\n JSON.stringify(rect), // eslint-disable-next-line react-hooks/exhaustive-deps\n JSON.stringify(scrollIntent), setAutoScrollInterval, scrollableAncestors, sortedScrollableAncestors, scrollableAncestorRects, // eslint-disable-next-line react-hooks/exhaustive-deps\n JSON.stringify(threshold)]);\n}\nconst defaultScrollIntent = {\n x: {\n [Direction.Backward]: false,\n [Direction.Forward]: false\n },\n y: {\n [Direction.Backward]: false,\n [Direction.Forward]: false\n }\n};\n\nfunction useScrollIntent(_ref2) {\n let {\n delta,\n disabled\n } = _ref2;\n const previousDelta = usePrevious(delta);\n return useLazyMemo(previousIntent => {\n if (disabled || !previousDelta || !previousIntent) {\n // Reset scroll intent tracking when auto-scrolling is disabled\n return defaultScrollIntent;\n }\n\n const direction = {\n x: Math.sign(delta.x - previousDelta.x),\n y: Math.sign(delta.y - previousDelta.y)\n }; // Keep track of the user intent to scroll in each direction for both axis\n\n return {\n x: {\n [Direction.Backward]: previousIntent.x[Direction.Backward] || direction.x === -1,\n [Direction.Forward]: previousIntent.x[Direction.Forward] || direction.x === 1\n },\n y: {\n [Direction.Backward]: previousIntent.y[Direction.Backward] || direction.y === -1,\n [Direction.Forward]: previousIntent.y[Direction.Forward] || direction.y === 1\n }\n };\n }, [disabled, delta, previousDelta]);\n}\n\nfunction useCachedNode(draggableNodes, id) {\n const draggableNode = id !== null ? draggableNodes.get(id) : undefined;\n const node = draggableNode ? draggableNode.node.current : null;\n return useLazyMemo(cachedNode => {\n var _ref;\n\n if (id === null) {\n return null;\n } // In some cases, the draggable node can unmount while dragging\n // This is the case for virtualized lists. In those situations,\n // we fall back to the last known value for that node.\n\n\n return (_ref = node != null ? node : cachedNode) != null ? _ref : null;\n }, [node, id]);\n}\n\nfunction useCombineActivators(sensors, getSyntheticHandler) {\n return useMemo(() => sensors.reduce((accumulator, sensor) => {\n const {\n sensor: Sensor\n } = sensor;\n const sensorActivators = Sensor.activators.map(activator => ({\n eventName: activator.eventName,\n handler: getSyntheticHandler(activator.handler, sensor)\n }));\n return [...accumulator, ...sensorActivators];\n }, []), [sensors, getSyntheticHandler]);\n}\n\nvar MeasuringStrategy;\n\n(function (MeasuringStrategy) {\n MeasuringStrategy[MeasuringStrategy[\"Always\"] = 0] = \"Always\";\n MeasuringStrategy[MeasuringStrategy[\"BeforeDragging\"] = 1] = \"BeforeDragging\";\n MeasuringStrategy[MeasuringStrategy[\"WhileDragging\"] = 2] = \"WhileDragging\";\n})(MeasuringStrategy || (MeasuringStrategy = {}));\n\nvar MeasuringFrequency;\n\n(function (MeasuringFrequency) {\n MeasuringFrequency[\"Optimized\"] = \"optimized\";\n})(MeasuringFrequency || (MeasuringFrequency = {}));\n\nconst defaultValue = /*#__PURE__*/new Map();\nfunction useDroppableMeasuring(containers, _ref) {\n let {\n dragging,\n dependencies,\n config\n } = _ref;\n const [queue, setQueue] = useState(null);\n const {\n frequency,\n measure,\n strategy\n } = config;\n const containersRef = useRef(containers);\n const disabled = isDisabled();\n const disabledRef = useLatestValue(disabled);\n const measureDroppableContainers = useCallback(function (ids) {\n if (ids === void 0) {\n ids = [];\n }\n\n if (disabledRef.current) {\n return;\n }\n\n setQueue(value => {\n if (value === null) {\n return ids;\n }\n\n return value.concat(ids.filter(id => !value.includes(id)));\n });\n }, [disabledRef]);\n const timeoutId = useRef(null);\n const droppableRects = useLazyMemo(previousValue => {\n if (disabled && !dragging) {\n return defaultValue;\n }\n\n if (!previousValue || previousValue === defaultValue || containersRef.current !== containers || queue != null) {\n const map = new Map();\n\n for (let container of containers) {\n if (!container) {\n continue;\n }\n\n if (queue && queue.length > 0 && !queue.includes(container.id) && container.rect.current) {\n // This container does not need to be re-measured\n map.set(container.id, container.rect.current);\n continue;\n }\n\n const node = container.node.current;\n const rect = node ? new Rect(measure(node), node) : null;\n container.rect.current = rect;\n\n if (rect) {\n map.set(container.id, rect);\n }\n }\n\n return map;\n }\n\n return previousValue;\n }, [containers, queue, dragging, disabled, measure]);\n useEffect(() => {\n containersRef.current = containers;\n }, [containers]);\n useEffect(() => {\n if (disabled) {\n return;\n }\n\n measureDroppableContainers();\n }, // eslint-disable-next-line react-hooks/exhaustive-deps\n [dragging, disabled]);\n useEffect(() => {\n if (queue && queue.length > 0) {\n setQueue(null);\n }\n }, //eslint-disable-next-line react-hooks/exhaustive-deps\n [JSON.stringify(queue)]);\n useEffect(() => {\n if (disabled || typeof frequency !== 'number' || timeoutId.current !== null) {\n return;\n }\n\n timeoutId.current = setTimeout(() => {\n measureDroppableContainers();\n timeoutId.current = null;\n }, frequency);\n }, // eslint-disable-next-line react-hooks/exhaustive-deps\n [frequency, disabled, measureDroppableContainers, ...dependencies]);\n return {\n droppableRects,\n measureDroppableContainers,\n measuringScheduled: queue != null\n };\n\n function isDisabled() {\n switch (strategy) {\n case MeasuringStrategy.Always:\n return false;\n\n case MeasuringStrategy.BeforeDragging:\n return dragging;\n\n default:\n return !dragging;\n }\n }\n}\n\nfunction useInitialValue(value, computeFn) {\n return useLazyMemo(previousValue => {\n if (!value) {\n return null;\n }\n\n if (previousValue) {\n return previousValue;\n }\n\n return typeof computeFn === 'function' ? computeFn(value) : value;\n }, [computeFn, value]);\n}\n\nfunction useInitialRect(node, measure) {\n return useInitialValue(node, measure);\n}\n\n/**\r\n * Returns a new MutationObserver instance.\r\n * If `MutationObserver` is undefined in the execution environment, returns `undefined`.\r\n */\n\nfunction useMutationObserver(_ref) {\n let {\n callback,\n disabled\n } = _ref;\n const handleMutations = useEvent(callback);\n const mutationObserver = useMemo(() => {\n if (disabled || typeof window === 'undefined' || typeof window.MutationObserver === 'undefined') {\n return undefined;\n }\n\n const {\n MutationObserver\n } = window;\n return new MutationObserver(handleMutations);\n }, [handleMutations, disabled]);\n useEffect(() => {\n return () => mutationObserver == null ? void 0 : mutationObserver.disconnect();\n }, [mutationObserver]);\n return mutationObserver;\n}\n\n/**\r\n * Returns a new ResizeObserver instance bound to the `onResize` callback.\r\n * If `ResizeObserver` is undefined in the execution environment, returns `undefined`.\r\n */\n\nfunction useResizeObserver(_ref) {\n let {\n callback,\n disabled\n } = _ref;\n const handleResize = useEvent(callback);\n const resizeObserver = useMemo(() => {\n if (disabled || typeof window === 'undefined' || typeof window.ResizeObserver === 'undefined') {\n return undefined;\n }\n\n const {\n ResizeObserver\n } = window;\n return new ResizeObserver(handleResize);\n }, // eslint-disable-next-line react-hooks/exhaustive-deps\n [disabled]);\n useEffect(() => {\n return () => resizeObserver == null ? void 0 : resizeObserver.disconnect();\n }, [resizeObserver]);\n return resizeObserver;\n}\n\nfunction defaultMeasure(element) {\n return new Rect(getClientRect(element), element);\n}\n\nfunction useRect(element, measure, fallbackRect) {\n if (measure === void 0) {\n measure = defaultMeasure;\n }\n\n const [rect, measureRect] = useReducer(reducer, null);\n const mutationObserver = useMutationObserver({\n callback(records) {\n if (!element) {\n return;\n }\n\n for (const record of records) {\n const {\n type,\n target\n } = record;\n\n if (type === 'childList' && target instanceof HTMLElement && target.contains(element)) {\n measureRect();\n break;\n }\n }\n }\n\n });\n const resizeObserver = useResizeObserver({\n callback: measureRect\n });\n useIsomorphicLayoutEffect(() => {\n measureRect();\n\n if (element) {\n resizeObserver == null ? void 0 : resizeObserver.observe(element);\n mutationObserver == null ? void 0 : mutationObserver.observe(document.body, {\n childList: true,\n subtree: true\n });\n } else {\n resizeObserver == null ? void 0 : resizeObserver.disconnect();\n mutationObserver == null ? void 0 : mutationObserver.disconnect();\n }\n }, [element]);\n return rect;\n\n function reducer(currentRect) {\n if (!element) {\n return null;\n }\n\n if (element.isConnected === false) {\n var _ref;\n\n // Fall back to last rect we measured if the element is\n // no longer connected to the DOM.\n return (_ref = currentRect != null ? currentRect : fallbackRect) != null ? _ref : null;\n }\n\n const newRect = measure(element);\n\n if (JSON.stringify(currentRect) === JSON.stringify(newRect)) {\n return currentRect;\n }\n\n return newRect;\n }\n}\n\nfunction useRectDelta(rect) {\n const initialRect = useInitialValue(rect);\n return getRectDelta(rect, initialRect);\n}\n\nconst defaultValue$1 = [];\nfunction useScrollableAncestors(node) {\n const previousNode = useRef(node);\n const ancestors = useLazyMemo(previousValue => {\n if (!node) {\n return defaultValue$1;\n }\n\n if (previousValue && previousValue !== defaultValue$1 && node && previousNode.current && node.parentNode === previousNode.current.parentNode) {\n return previousValue;\n }\n\n return getScrollableAncestors(node);\n }, [node]);\n useEffect(() => {\n previousNode.current = node;\n }, [node]);\n return ancestors;\n}\n\nfunction useScrollOffsets(elements) {\n const [scrollCoordinates, setScrollCoordinates] = useState(null);\n const prevElements = useRef(elements); // To-do: Throttle the handleScroll callback\n\n const handleScroll = useCallback(event => {\n const scrollingElement = getScrollableElement(event.target);\n\n if (!scrollingElement) {\n return;\n }\n\n setScrollCoordinates(scrollCoordinates => {\n if (!scrollCoordinates) {\n return null;\n }\n\n scrollCoordinates.set(scrollingElement, getScrollCoordinates(scrollingElement));\n return new Map(scrollCoordinates);\n });\n }, []);\n useEffect(() => {\n const previousElements = prevElements.current;\n\n if (elements !== previousElements) {\n cleanup(previousElements);\n const entries = elements.map(element => {\n const scrollableElement = getScrollableElement(element);\n\n if (scrollableElement) {\n scrollableElement.addEventListener('scroll', handleScroll, {\n passive: true\n });\n return [scrollableElement, getScrollCoordinates(scrollableElement)];\n }\n\n return null;\n }).filter(entry => entry != null);\n setScrollCoordinates(entries.length ? new Map(entries) : null);\n prevElements.current = elements;\n }\n\n return () => {\n cleanup(elements);\n cleanup(previousElements);\n };\n\n function cleanup(elements) {\n elements.forEach(element => {\n const scrollableElement = getScrollableElement(element);\n scrollableElement == null ? void 0 : scrollableElement.removeEventListener('scroll', handleScroll);\n });\n }\n }, [handleScroll, elements]);\n return useMemo(() => {\n if (elements.length) {\n return scrollCoordinates ? Array.from(scrollCoordinates.values()).reduce((acc, coordinates) => add(acc, coordinates), defaultCoordinates) : getScrollOffsets(elements);\n }\n\n return defaultCoordinates;\n }, [elements, scrollCoordinates]);\n}\n\nfunction useScrollOffsetsDelta(scrollOffsets, dependencies) {\n if (dependencies === void 0) {\n dependencies = [];\n }\n\n const initialScrollOffsets = useRef(null);\n useEffect(() => {\n initialScrollOffsets.current = null;\n }, // eslint-disable-next-line react-hooks/exhaustive-deps\n dependencies);\n useEffect(() => {\n const hasScrollOffsets = scrollOffsets !== defaultCoordinates;\n\n if (hasScrollOffsets && !initialScrollOffsets.current) {\n initialScrollOffsets.current = scrollOffsets;\n }\n\n if (!hasScrollOffsets && initialScrollOffsets.current) {\n initialScrollOffsets.current = null;\n }\n }, [scrollOffsets]);\n return initialScrollOffsets.current ? subtract(scrollOffsets, initialScrollOffsets.current) : defaultCoordinates;\n}\n\nfunction useSensorSetup(sensors) {\n useEffect(() => {\n if (!canUseDOM) {\n return;\n }\n\n const teardownFns = sensors.map(_ref => {\n let {\n sensor\n } = _ref;\n return sensor.setup == null ? void 0 : sensor.setup();\n });\n return () => {\n for (const teardown of teardownFns) {\n teardown == null ? void 0 : teardown();\n }\n };\n }, // TO-DO: Sensors length could theoretically change which would not be a valid dependency\n // eslint-disable-next-line react-hooks/exhaustive-deps\n sensors.map(_ref2 => {\n let {\n sensor\n } = _ref2;\n return sensor;\n }));\n}\n\nfunction useSyntheticListeners(listeners, id) {\n return useMemo(() => {\n return listeners.reduce((acc, _ref) => {\n let {\n eventName,\n handler\n } = _ref;\n\n acc[eventName] = event => {\n handler(event, id);\n };\n\n return acc;\n }, {});\n }, [listeners, id]);\n}\n\nfunction useWindowRect(element) {\n return useMemo(() => element ? getWindowClientRect(element) : null, [element]);\n}\n\nconst defaultValue$2 = [];\nfunction useRects(elements, measure) {\n if (measure === void 0) {\n measure = getClientRect;\n }\n\n const [firstElement] = elements;\n const windowRect = useWindowRect(firstElement ? getWindow(firstElement) : null);\n const [rects, measureRects] = useReducer(reducer, defaultValue$2);\n const resizeObserver = useResizeObserver({\n callback: measureRects\n });\n\n if (elements.length > 0 && rects === defaultValue$2) {\n measureRects();\n }\n\n useIsomorphicLayoutEffect(() => {\n if (elements.length) {\n elements.forEach(element => resizeObserver == null ? void 0 : resizeObserver.observe(element));\n } else {\n resizeObserver == null ? void 0 : resizeObserver.disconnect();\n measureRects();\n }\n }, [elements]);\n return rects;\n\n function reducer() {\n if (!elements.length) {\n return defaultValue$2;\n }\n\n return elements.map(element => isDocumentScrollingElement(element) ? windowRect : new Rect(measure(element), element));\n }\n}\n\nfunction getMeasurableNode(node) {\n if (!node) {\n return null;\n }\n\n if (node.children.length > 1) {\n return node;\n }\n\n const firstChild = node.children[0];\n return isHTMLElement(firstChild) ? firstChild : node;\n}\n\nfunction useDragOverlayMeasuring(_ref) {\n let {\n measure\n } = _ref;\n const [rect, setRect] = useState(null);\n const handleResize = useCallback(entries => {\n for (const {\n target\n } of entries) {\n if (isHTMLElement(target)) {\n setRect(rect => {\n const newRect = measure(target);\n return rect ? { ...rect,\n width: newRect.width,\n height: newRect.height\n } : newRect;\n });\n break;\n }\n }\n }, [measure]);\n const resizeObserver = useResizeObserver({\n callback: handleResize\n });\n const handleNodeChange = useCallback(element => {\n const node = getMeasurableNode(element);\n resizeObserver == null ? void 0 : resizeObserver.disconnect();\n\n if (node) {\n resizeObserver == null ? void 0 : resizeObserver.observe(node);\n }\n\n setRect(node ? measure(node) : null);\n }, [measure, resizeObserver]);\n const [nodeRef, setRef] = useNodeRef(handleNodeChange);\n return useMemo(() => ({\n nodeRef,\n rect,\n setRef\n }), [rect, nodeRef, setRef]);\n}\n\nconst defaultSensors = [{\n sensor: PointerSensor,\n options: {}\n}, {\n sensor: KeyboardSensor,\n options: {}\n}];\nconst defaultData = {\n current: {}\n};\nconst defaultMeasuringConfiguration = {\n draggable: {\n measure: getTransformAgnosticClientRect\n },\n droppable: {\n measure: getTransformAgnosticClientRect,\n strategy: MeasuringStrategy.WhileDragging,\n frequency: MeasuringFrequency.Optimized\n },\n dragOverlay: {\n measure: getClientRect\n }\n};\n\nclass DroppableContainersMap extends Map {\n get(id) {\n var _super$get;\n\n return id != null ? (_super$get = super.get(id)) != null ? _super$get : undefined : undefined;\n }\n\n toArray() {\n return Array.from(this.values());\n }\n\n getEnabled() {\n return this.toArray().filter(_ref => {\n let {\n disabled\n } = _ref;\n return !disabled;\n });\n }\n\n getNodeFor(id) {\n var _this$get$node$curren, _this$get;\n\n return (_this$get$node$curren = (_this$get = this.get(id)) == null ? void 0 : _this$get.node.current) != null ? _this$get$node$curren : undefined;\n }\n\n}\n\nconst defaultPublicContext = {\n activatorEvent: null,\n active: null,\n activeNode: null,\n activeNodeRect: null,\n collisions: null,\n containerNodeRect: null,\n draggableNodes: /*#__PURE__*/new Map(),\n droppableRects: /*#__PURE__*/new Map(),\n droppableContainers: /*#__PURE__*/new DroppableContainersMap(),\n over: null,\n dragOverlay: {\n nodeRef: {\n current: null\n },\n rect: null,\n setRef: noop\n },\n scrollableAncestors: [],\n scrollableAncestorRects: [],\n measuringConfiguration: defaultMeasuringConfiguration,\n measureDroppableContainers: noop,\n windowRect: null,\n measuringScheduled: false\n};\nconst defaultInternalContext = {\n activatorEvent: null,\n activators: [],\n active: null,\n activeNodeRect: null,\n ariaDescribedById: {\n draggable: ''\n },\n dispatch: noop,\n draggableNodes: /*#__PURE__*/new Map(),\n over: null,\n measureDroppableContainers: noop\n};\nconst InternalContext = /*#__PURE__*/createContext(defaultInternalContext);\nconst PublicContext = /*#__PURE__*/createContext(defaultPublicContext);\n\nfunction getInitialState() {\n return {\n draggable: {\n active: null,\n initialCoordinates: {\n x: 0,\n y: 0\n },\n nodes: new Map(),\n translate: {\n x: 0,\n y: 0\n }\n },\n droppable: {\n containers: new DroppableContainersMap()\n }\n };\n}\nfunction reducer(state, action) {\n switch (action.type) {\n case Action.DragStart:\n return { ...state,\n draggable: { ...state.draggable,\n initialCoordinates: action.initialCoordinates,\n active: action.active\n }\n };\n\n case Action.DragMove:\n if (!state.draggable.active) {\n return state;\n }\n\n return { ...state,\n draggable: { ...state.draggable,\n translate: {\n x: action.coordinates.x - state.draggable.initialCoordinates.x,\n y: action.coordinates.y - state.draggable.initialCoordinates.y\n }\n }\n };\n\n case Action.DragEnd:\n case Action.DragCancel:\n return { ...state,\n draggable: { ...state.draggable,\n active: null,\n initialCoordinates: {\n x: 0,\n y: 0\n },\n translate: {\n x: 0,\n y: 0\n }\n }\n };\n\n case Action.RegisterDroppable:\n {\n const {\n element\n } = action;\n const {\n id\n } = element;\n const containers = new DroppableContainersMap(state.droppable.containers);\n containers.set(id, element);\n return { ...state,\n droppable: { ...state.droppable,\n containers\n }\n };\n }\n\n case Action.SetDroppableDisabled:\n {\n const {\n id,\n key,\n disabled\n } = action;\n const element = state.droppable.containers.get(id);\n\n if (!element || key !== element.key) {\n return state;\n }\n\n const containers = new DroppableContainersMap(state.droppable.containers);\n containers.set(id, { ...element,\n disabled\n });\n return { ...state,\n droppable: { ...state.droppable,\n containers\n }\n };\n }\n\n case Action.UnregisterDroppable:\n {\n const {\n id,\n key\n } = action;\n const element = state.droppable.containers.get(id);\n\n if (!element || key !== element.key) {\n return state;\n }\n\n const containers = new DroppableContainersMap(state.droppable.containers);\n containers.delete(id);\n return { ...state,\n droppable: { ...state.droppable,\n containers\n }\n };\n }\n\n default:\n {\n return state;\n }\n }\n}\n\nfunction RestoreFocus(_ref) {\n let {\n disabled\n } = _ref;\n const {\n active,\n activatorEvent,\n draggableNodes\n } = useContext(InternalContext);\n const previousActivatorEvent = usePrevious(activatorEvent);\n const previousActiveId = usePrevious(active == null ? void 0 : active.id); // Restore keyboard focus on the activator node\n\n useEffect(() => {\n if (disabled) {\n return;\n }\n\n if (!activatorEvent && previousActivatorEvent && previousActiveId != null) {\n if (!isKeyboardEvent(previousActivatorEvent)) {\n return;\n }\n\n if (document.activeElement === previousActivatorEvent.target) {\n // No need to restore focus\n return;\n }\n\n const draggableNode = draggableNodes.get(previousActiveId);\n\n if (!draggableNode) {\n return;\n }\n\n const {\n activatorNode,\n node\n } = draggableNode;\n\n if (!activatorNode.current && !node.current) {\n return;\n }\n\n requestAnimationFrame(() => {\n for (const element of [activatorNode.current, node.current]) {\n if (!element) {\n continue;\n }\n\n const focusableNode = findFirstFocusableNode(element);\n\n if (focusableNode) {\n focusableNode.focus();\n break;\n }\n }\n });\n }\n }, [activatorEvent, disabled, draggableNodes, previousActiveId, previousActivatorEvent]);\n return null;\n}\n\nfunction applyModifiers(modifiers, _ref) {\n let {\n transform,\n ...args\n } = _ref;\n return modifiers != null && modifiers.length ? modifiers.reduce((accumulator, modifier) => {\n return modifier({\n transform: accumulator,\n ...args\n });\n }, transform) : transform;\n}\n\nfunction useMeasuringConfiguration(config) {\n return useMemo(() => ({\n draggable: { ...defaultMeasuringConfiguration.draggable,\n ...(config == null ? void 0 : config.draggable)\n },\n droppable: { ...defaultMeasuringConfiguration.droppable,\n ...(config == null ? void 0 : config.droppable)\n },\n dragOverlay: { ...defaultMeasuringConfiguration.dragOverlay,\n ...(config == null ? void 0 : config.dragOverlay)\n }\n }), // eslint-disable-next-line react-hooks/exhaustive-deps\n [config == null ? void 0 : config.draggable, config == null ? void 0 : config.droppable, config == null ? void 0 : config.dragOverlay]);\n}\n\nfunction useLayoutShiftScrollCompensation(_ref) {\n let {\n activeNode,\n measure,\n initialRect,\n config = true\n } = _ref;\n const initialized = useRef(false);\n const {\n x,\n y\n } = typeof config === 'boolean' ? {\n x: config,\n y: config\n } : config;\n useIsomorphicLayoutEffect(() => {\n const disabled = !x && !y;\n\n if (disabled || !activeNode) {\n initialized.current = false;\n return;\n }\n\n if (initialized.current || !initialRect) {\n // Return early if layout shift scroll compensation was already attempted\n // or if there is no initialRect to compare to.\n return;\n } // Get the most up to date node ref for the active draggable\n\n\n const node = activeNode == null ? void 0 : activeNode.node.current;\n\n if (!node || node.isConnected === false) {\n // Return early if there is no attached node ref or if the node is\n // disconnected from the document.\n return;\n }\n\n const rect = measure(node);\n const rectDelta = getRectDelta(rect, initialRect);\n\n if (!x) {\n rectDelta.x = 0;\n }\n\n if (!y) {\n rectDelta.y = 0;\n } // Only perform layout shift scroll compensation once\n\n\n initialized.current = true;\n\n if (Math.abs(rectDelta.x) > 0 || Math.abs(rectDelta.y) > 0) {\n const firstScrollableAncestor = getFirstScrollableAncestor(node);\n\n if (firstScrollableAncestor) {\n firstScrollableAncestor.scrollBy({\n top: rectDelta.y,\n left: rectDelta.x\n });\n }\n }\n }, [activeNode, x, y, initialRect, measure]);\n}\n\nconst ActiveDraggableContext = /*#__PURE__*/createContext({ ...defaultCoordinates,\n scaleX: 1,\n scaleY: 1\n});\nvar Status;\n\n(function (Status) {\n Status[Status[\"Uninitialized\"] = 0] = \"Uninitialized\";\n Status[Status[\"Initializing\"] = 1] = \"Initializing\";\n Status[Status[\"Initialized\"] = 2] = \"Initialized\";\n})(Status || (Status = {}));\n\nconst DndContext = /*#__PURE__*/memo(function DndContext(_ref) {\n var _sensorContext$curren, _dragOverlay$nodeRef$, _dragOverlay$rect, _over$rect;\n\n let {\n id,\n accessibility,\n autoScroll = true,\n children,\n sensors = defaultSensors,\n collisionDetection = rectIntersection,\n measuring,\n modifiers,\n ...props\n } = _ref;\n const store = useReducer(reducer, undefined, getInitialState);\n const [state, dispatch] = store;\n const [dispatchMonitorEvent, registerMonitorListener] = useDndMonitorProvider();\n const [status, setStatus] = useState(Status.Uninitialized);\n const isInitialized = status === Status.Initialized;\n const {\n draggable: {\n active: activeId,\n nodes: draggableNodes,\n translate\n },\n droppable: {\n containers: droppableContainers\n }\n } = state;\n const node = activeId ? draggableNodes.get(activeId) : null;\n const activeRects = useRef({\n initial: null,\n translated: null\n });\n const active = useMemo(() => {\n var _node$data;\n\n return activeId != null ? {\n id: activeId,\n // It's possible for the active node to unmount while dragging\n data: (_node$data = node == null ? void 0 : node.data) != null ? _node$data : defaultData,\n rect: activeRects\n } : null;\n }, [activeId, node]);\n const activeRef = useRef(null);\n const [activeSensor, setActiveSensor] = useState(null);\n const [activatorEvent, setActivatorEvent] = useState(null);\n const latestProps = useLatestValue(props, Object.values(props));\n const draggableDescribedById = useUniqueId(\"DndDescribedBy\", id);\n const enabledDroppableContainers = useMemo(() => droppableContainers.getEnabled(), [droppableContainers]);\n const measuringConfiguration = useMeasuringConfiguration(measuring);\n const {\n droppableRects,\n measureDroppableContainers,\n measuringScheduled\n } = useDroppableMeasuring(enabledDroppableContainers, {\n dragging: isInitialized,\n dependencies: [translate.x, translate.y],\n config: measuringConfiguration.droppable\n });\n const activeNode = useCachedNode(draggableNodes, activeId);\n const activationCoordinates = useMemo(() => activatorEvent ? getEventCoordinates(activatorEvent) : null, [activatorEvent]);\n const autoScrollOptions = getAutoScrollerOptions();\n const initialActiveNodeRect = useInitialRect(activeNode, measuringConfiguration.draggable.measure);\n useLayoutShiftScrollCompensation({\n activeNode: activeId ? draggableNodes.get(activeId) : null,\n config: autoScrollOptions.layoutShiftCompensation,\n initialRect: initialActiveNodeRect,\n measure: measuringConfiguration.draggable.measure\n });\n const activeNodeRect = useRect(activeNode, measuringConfiguration.draggable.measure, initialActiveNodeRect);\n const containerNodeRect = useRect(activeNode ? activeNode.parentElement : null);\n const sensorContext = useRef({\n activatorEvent: null,\n active: null,\n activeNode,\n collisionRect: null,\n collisions: null,\n droppableRects,\n draggableNodes,\n draggingNode: null,\n draggingNodeRect: null,\n droppableContainers,\n over: null,\n scrollableAncestors: [],\n scrollAdjustedTranslate: null\n });\n const overNode = droppableContainers.getNodeFor((_sensorContext$curren = sensorContext.current.over) == null ? void 0 : _sensorContext$curren.id);\n const dragOverlay = useDragOverlayMeasuring({\n measure: measuringConfiguration.dragOverlay.measure\n }); // Use the rect of the drag overlay if it is mounted\n\n const draggingNode = (_dragOverlay$nodeRef$ = dragOverlay.nodeRef.current) != null ? _dragOverlay$nodeRef$ : activeNode;\n const draggingNodeRect = isInitialized ? (_dragOverlay$rect = dragOverlay.rect) != null ? _dragOverlay$rect : activeNodeRect : null;\n const usesDragOverlay = Boolean(dragOverlay.nodeRef.current && dragOverlay.rect); // The delta between the previous and new position of the draggable node\n // is only relevant when there is no drag overlay\n\n const nodeRectDelta = useRectDelta(usesDragOverlay ? null : activeNodeRect); // Get the window rect of the dragging node\n\n const windowRect = useWindowRect(draggingNode ? getWindow(draggingNode) : null); // Get scrollable ancestors of the dragging node\n\n const scrollableAncestors = useScrollableAncestors(isInitialized ? overNode != null ? overNode : activeNode : null);\n const scrollableAncestorRects = useRects(scrollableAncestors); // Apply modifiers\n\n const modifiedTranslate = applyModifiers(modifiers, {\n transform: {\n x: translate.x - nodeRectDelta.x,\n y: translate.y - nodeRectDelta.y,\n scaleX: 1,\n scaleY: 1\n },\n activatorEvent,\n active,\n activeNodeRect,\n containerNodeRect,\n draggingNodeRect,\n over: sensorContext.current.over,\n overlayNodeRect: dragOverlay.rect,\n scrollableAncestors,\n scrollableAncestorRects,\n windowRect\n });\n const pointerCoordinates = activationCoordinates ? add(activationCoordinates, translate) : null;\n const scrollOffsets = useScrollOffsets(scrollableAncestors); // Represents the scroll delta since dragging was initiated\n\n const scrollAdjustment = useScrollOffsetsDelta(scrollOffsets); // Represents the scroll delta since the last time the active node rect was measured\n\n const activeNodeScrollDelta = useScrollOffsetsDelta(scrollOffsets, [activeNodeRect]);\n const scrollAdjustedTranslate = add(modifiedTranslate, scrollAdjustment);\n const collisionRect = draggingNodeRect ? getAdjustedRect(draggingNodeRect, modifiedTranslate) : null;\n const collisions = active && collisionRect ? collisionDetection({\n active,\n collisionRect,\n droppableRects,\n droppableContainers: enabledDroppableContainers,\n pointerCoordinates\n }) : null;\n const overId = getFirstCollision(collisions, 'id');\n const [over, setOver] = useState(null); // When there is no drag overlay used, we need to account for the\n // window scroll delta\n\n const appliedTranslate = usesDragOverlay ? modifiedTranslate : add(modifiedTranslate, activeNodeScrollDelta);\n const transform = adjustScale(appliedTranslate, (_over$rect = over == null ? void 0 : over.rect) != null ? _over$rect : null, activeNodeRect);\n const instantiateSensor = useCallback((event, _ref2) => {\n let {\n sensor: Sensor,\n options\n } = _ref2;\n\n if (activeRef.current == null) {\n return;\n }\n\n const activeNode = draggableNodes.get(activeRef.current);\n\n if (!activeNode) {\n return;\n }\n\n const activatorEvent = event.nativeEvent;\n const sensorInstance = new Sensor({\n active: activeRef.current,\n activeNode,\n event: activatorEvent,\n options,\n // Sensors need to be instantiated with refs for arguments that change over time\n // otherwise they are frozen in time with the stale arguments\n context: sensorContext,\n\n onStart(initialCoordinates) {\n const id = activeRef.current;\n\n if (id == null) {\n return;\n }\n\n const draggableNode = draggableNodes.get(id);\n\n if (!draggableNode) {\n return;\n }\n\n const {\n onDragStart\n } = latestProps.current;\n const event = {\n active: {\n id,\n data: draggableNode.data,\n rect: activeRects\n }\n };\n unstable_batchedUpdates(() => {\n onDragStart == null ? void 0 : onDragStart(event);\n setStatus(Status.Initializing);\n dispatch({\n type: Action.DragStart,\n initialCoordinates,\n active: id\n });\n dispatchMonitorEvent({\n type: 'onDragStart',\n event\n });\n });\n },\n\n onMove(coordinates) {\n dispatch({\n type: Action.DragMove,\n coordinates\n });\n },\n\n onEnd: createHandler(Action.DragEnd),\n onCancel: createHandler(Action.DragCancel)\n });\n unstable_batchedUpdates(() => {\n setActiveSensor(sensorInstance);\n setActivatorEvent(event.nativeEvent);\n });\n\n function createHandler(type) {\n return async function handler() {\n const {\n active,\n collisions,\n over,\n scrollAdjustedTranslate\n } = sensorContext.current;\n let event = null;\n\n if (active && scrollAdjustedTranslate) {\n const {\n cancelDrop\n } = latestProps.current;\n event = {\n activatorEvent,\n active: active,\n collisions,\n delta: scrollAdjustedTranslate,\n over\n };\n\n if (type === Action.DragEnd && typeof cancelDrop === 'function') {\n const shouldCancel = await Promise.resolve(cancelDrop(event));\n\n if (shouldCancel) {\n type = Action.DragCancel;\n }\n }\n }\n\n activeRef.current = null;\n unstable_batchedUpdates(() => {\n dispatch({\n type\n });\n setStatus(Status.Uninitialized);\n setOver(null);\n setActiveSensor(null);\n setActivatorEvent(null);\n const eventName = type === Action.DragEnd ? 'onDragEnd' : 'onDragCancel';\n\n if (event) {\n const handler = latestProps.current[eventName];\n handler == null ? void 0 : handler(event);\n dispatchMonitorEvent({\n type: eventName,\n event\n });\n }\n });\n };\n }\n }, // eslint-disable-next-line react-hooks/exhaustive-deps\n [draggableNodes]);\n const bindActivatorToSensorInstantiator = useCallback((handler, sensor) => {\n return (event, active) => {\n const nativeEvent = event.nativeEvent;\n const activeDraggableNode = draggableNodes.get(active);\n\n if ( // Another sensor is already instantiating\n activeRef.current !== null || // No active draggable\n !activeDraggableNode || // Event has already been captured\n nativeEvent.dndKit || nativeEvent.defaultPrevented) {\n return;\n }\n\n const activationContext = {\n active: activeDraggableNode\n };\n const shouldActivate = handler(event, sensor.options, activationContext);\n\n if (shouldActivate === true) {\n nativeEvent.dndKit = {\n capturedBy: sensor.sensor\n };\n activeRef.current = active;\n instantiateSensor(event, sensor);\n }\n };\n }, [draggableNodes, instantiateSensor]);\n const activators = useCombineActivators(sensors, bindActivatorToSensorInstantiator);\n useSensorSetup(sensors);\n useIsomorphicLayoutEffect(() => {\n if (activeNodeRect && status === Status.Initializing) {\n setStatus(Status.Initialized);\n }\n }, [activeNodeRect, status]);\n useEffect(() => {\n const {\n onDragMove\n } = latestProps.current;\n const {\n active,\n activatorEvent,\n collisions,\n over\n } = sensorContext.current;\n\n if (!active || !activatorEvent) {\n return;\n }\n\n const event = {\n active,\n activatorEvent,\n collisions,\n delta: {\n x: scrollAdjustedTranslate.x,\n y: scrollAdjustedTranslate.y\n },\n over\n };\n unstable_batchedUpdates(() => {\n onDragMove == null ? void 0 : onDragMove(event);\n dispatchMonitorEvent({\n type: 'onDragMove',\n event\n });\n });\n }, // eslint-disable-next-line react-hooks/exhaustive-deps\n [scrollAdjustedTranslate.x, scrollAdjustedTranslate.y]);\n useEffect(() => {\n const {\n active,\n activatorEvent,\n collisions,\n droppableContainers,\n scrollAdjustedTranslate\n } = sensorContext.current;\n\n if (!active || activeRef.current == null || !activatorEvent || !scrollAdjustedTranslate) {\n return;\n }\n\n const {\n onDragOver\n } = latestProps.current;\n const overContainer = droppableContainers.get(overId);\n const over = overContainer && overContainer.rect.current ? {\n id: overContainer.id,\n rect: overContainer.rect.current,\n data: overContainer.data,\n disabled: overContainer.disabled\n } : null;\n const event = {\n active,\n activatorEvent,\n collisions,\n delta: {\n x: scrollAdjustedTranslate.x,\n y: scrollAdjustedTranslate.y\n },\n over\n };\n unstable_batchedUpdates(() => {\n setOver(over);\n onDragOver == null ? void 0 : onDragOver(event);\n dispatchMonitorEvent({\n type: 'onDragOver',\n event\n });\n });\n }, // eslint-disable-next-line react-hooks/exhaustive-deps\n [overId]);\n useIsomorphicLayoutEffect(() => {\n sensorContext.current = {\n activatorEvent,\n active,\n activeNode,\n collisionRect,\n collisions,\n droppableRects,\n draggableNodes,\n draggingNode,\n draggingNodeRect,\n droppableContainers,\n over,\n scrollableAncestors,\n scrollAdjustedTranslate\n };\n activeRects.current = {\n initial: draggingNodeRect,\n translated: collisionRect\n };\n }, [active, activeNode, collisions, collisionRect, draggableNodes, draggingNode, draggingNodeRect, droppableRects, droppableContainers, over, scrollableAncestors, scrollAdjustedTranslate]);\n useAutoScroller({ ...autoScrollOptions,\n delta: translate,\n draggingRect: collisionRect,\n pointerCoordinates,\n scrollableAncestors,\n scrollableAncestorRects\n });\n const publicContext = useMemo(() => {\n const context = {\n active,\n activeNode,\n activeNodeRect,\n activatorEvent,\n collisions,\n containerNodeRect,\n dragOverlay,\n draggableNodes,\n droppableContainers,\n droppableRects,\n over,\n measureDroppableContainers,\n scrollableAncestors,\n scrollableAncestorRects,\n measuringConfiguration,\n measuringScheduled,\n windowRect\n };\n return context;\n }, [active, activeNode, activeNodeRect, activatorEvent, collisions, containerNodeRect, dragOverlay, draggableNodes, droppableContainers, droppableRects, over, measureDroppableContainers, scrollableAncestors, scrollableAncestorRects, measuringConfiguration, measuringScheduled, windowRect]);\n const internalContext = useMemo(() => {\n const context = {\n activatorEvent,\n activators,\n active,\n activeNodeRect,\n ariaDescribedById: {\n draggable: draggableDescribedById\n },\n dispatch,\n draggableNodes,\n over,\n measureDroppableContainers\n };\n return context;\n }, [activatorEvent, activators, active, activeNodeRect, dispatch, draggableDescribedById, draggableNodes, over, measureDroppableContainers]);\n return React.createElement(DndMonitorContext.Provider, {\n value: registerMonitorListener\n }, React.createElement(InternalContext.Provider, {\n value: internalContext\n }, React.createElement(PublicContext.Provider, {\n value: publicContext\n }, React.createElement(ActiveDraggableContext.Provider, {\n value: transform\n }, children)), React.createElement(RestoreFocus, {\n disabled: (accessibility == null ? void 0 : accessibility.restoreFocus) === false\n })), React.createElement(Accessibility, { ...accessibility,\n hiddenTextDescribedById: draggableDescribedById\n }));\n\n function getAutoScrollerOptions() {\n const activeSensorDisablesAutoscroll = (activeSensor == null ? void 0 : activeSensor.autoScrollEnabled) === false;\n const autoScrollGloballyDisabled = typeof autoScroll === 'object' ? autoScroll.enabled === false : autoScroll === false;\n const enabled = isInitialized && !activeSensorDisablesAutoscroll && !autoScrollGloballyDisabled;\n\n if (typeof autoScroll === 'object') {\n return { ...autoScroll,\n enabled\n };\n }\n\n return {\n enabled\n };\n }\n});\n\nconst NullContext = /*#__PURE__*/createContext(null);\nconst defaultRole = 'button';\nconst ID_PREFIX = 'Droppable';\nfunction useDraggable(_ref) {\n let {\n id,\n data,\n disabled = false,\n attributes\n } = _ref;\n const key = useUniqueId(ID_PREFIX);\n const {\n activators,\n activatorEvent,\n active,\n activeNodeRect,\n ariaDescribedById,\n draggableNodes,\n over\n } = useContext(InternalContext);\n const {\n role = defaultRole,\n roleDescription = 'draggable',\n tabIndex = 0\n } = attributes != null ? attributes : {};\n const isDragging = (active == null ? void 0 : active.id) === id;\n const transform = useContext(isDragging ? ActiveDraggableContext : NullContext);\n const [node, setNodeRef] = useNodeRef();\n const [activatorNode, setActivatorNodeRef] = useNodeRef();\n const listeners = useSyntheticListeners(activators, id);\n const dataRef = useLatestValue(data);\n useIsomorphicLayoutEffect(() => {\n draggableNodes.set(id, {\n id,\n key,\n node,\n activatorNode,\n data: dataRef\n });\n return () => {\n const node = draggableNodes.get(id);\n\n if (node && node.key === key) {\n draggableNodes.delete(id);\n }\n };\n }, // eslint-disable-next-line react-hooks/exhaustive-deps\n [draggableNodes, id]);\n const memoizedAttributes = useMemo(() => ({\n role,\n tabIndex,\n 'aria-disabled': disabled,\n 'aria-pressed': isDragging && role === defaultRole ? true : undefined,\n 'aria-roledescription': roleDescription,\n 'aria-describedby': ariaDescribedById.draggable\n }), [disabled, role, tabIndex, isDragging, roleDescription, ariaDescribedById.draggable]);\n return {\n active,\n activatorEvent,\n activeNodeRect,\n attributes: memoizedAttributes,\n isDragging,\n listeners: disabled ? undefined : listeners,\n node,\n over,\n setNodeRef,\n setActivatorNodeRef,\n transform\n };\n}\n\nfunction useDndContext() {\n return useContext(PublicContext);\n}\n\nconst ID_PREFIX$1 = 'Droppable';\nconst defaultResizeObserverConfig = {\n timeout: 25\n};\nfunction useDroppable(_ref) {\n let {\n data,\n disabled = false,\n id,\n resizeObserverConfig\n } = _ref;\n const key = useUniqueId(ID_PREFIX$1);\n const {\n active,\n dispatch,\n over,\n measureDroppableContainers\n } = useContext(InternalContext);\n const previous = useRef({\n disabled\n });\n const resizeObserverConnected = useRef(false);\n const rect = useRef(null);\n const callbackId = useRef(null);\n const {\n disabled: resizeObserverDisabled,\n updateMeasurementsFor,\n timeout: resizeObserverTimeout\n } = { ...defaultResizeObserverConfig,\n ...resizeObserverConfig\n };\n const ids = useLatestValue(updateMeasurementsFor != null ? updateMeasurementsFor : id);\n const handleResize = useCallback(() => {\n if (!resizeObserverConnected.current) {\n // ResizeObserver invokes the `handleResize` callback as soon as `observe` is called,\n // assuming the element is rendered and displayed.\n resizeObserverConnected.current = true;\n return;\n }\n\n if (callbackId.current != null) {\n clearTimeout(callbackId.current);\n }\n\n callbackId.current = setTimeout(() => {\n measureDroppableContainers(Array.isArray(ids.current) ? ids.current : [ids.current]);\n callbackId.current = null;\n }, resizeObserverTimeout);\n }, //eslint-disable-next-line react-hooks/exhaustive-deps\n [resizeObserverTimeout]);\n const resizeObserver = useResizeObserver({\n callback: handleResize,\n disabled: resizeObserverDisabled || !active\n });\n const handleNodeChange = useCallback((newElement, previousElement) => {\n if (!resizeObserver) {\n return;\n }\n\n if (previousElement) {\n resizeObserver.unobserve(previousElement);\n resizeObserverConnected.current = false;\n }\n\n if (newElement) {\n resizeObserver.observe(newElement);\n }\n }, [resizeObserver]);\n const [nodeRef, setNodeRef] = useNodeRef(handleNodeChange);\n const dataRef = useLatestValue(data);\n useEffect(() => {\n if (!resizeObserver || !nodeRef.current) {\n return;\n }\n\n resizeObserver.disconnect();\n resizeObserverConnected.current = false;\n resizeObserver.observe(nodeRef.current);\n }, [nodeRef, resizeObserver]);\n useIsomorphicLayoutEffect(() => {\n dispatch({\n type: Action.RegisterDroppable,\n element: {\n id,\n key,\n disabled,\n node: nodeRef,\n rect,\n data: dataRef\n }\n });\n return () => dispatch({\n type: Action.UnregisterDroppable,\n key,\n id\n });\n }, // eslint-disable-next-line react-hooks/exhaustive-deps\n [id]);\n useEffect(() => {\n if (disabled !== previous.current.disabled) {\n dispatch({\n type: Action.SetDroppableDisabled,\n id,\n key,\n disabled\n });\n previous.current.disabled = disabled;\n }\n }, [id, key, disabled, dispatch]);\n return {\n active,\n rect,\n isOver: (over == null ? void 0 : over.id) === id,\n node: nodeRef,\n over,\n setNodeRef\n };\n}\n\nfunction AnimationManager(_ref) {\n let {\n animation,\n children\n } = _ref;\n const [clonedChildren, setClonedChildren] = useState(null);\n const [element, setElement] = useState(null);\n const previousChildren = usePrevious(children);\n\n if (!children && !clonedChildren && previousChildren) {\n setClonedChildren(previousChildren);\n }\n\n useIsomorphicLayoutEffect(() => {\n if (!element) {\n return;\n }\n\n const key = clonedChildren == null ? void 0 : clonedChildren.key;\n const id = clonedChildren == null ? void 0 : clonedChildren.props.id;\n\n if (key == null || id == null) {\n setClonedChildren(null);\n return;\n }\n\n Promise.resolve(animation(id, element)).then(() => {\n setClonedChildren(null);\n });\n }, [animation, clonedChildren, element]);\n return React.createElement(React.Fragment, null, children, clonedChildren ? cloneElement(clonedChildren, {\n ref: setElement\n }) : null);\n}\n\nconst defaultTransform = {\n x: 0,\n y: 0,\n scaleX: 1,\n scaleY: 1\n};\nfunction NullifiedContextProvider(_ref) {\n let {\n children\n } = _ref;\n return React.createElement(InternalContext.Provider, {\n value: defaultInternalContext\n }, React.createElement(ActiveDraggableContext.Provider, {\n value: defaultTransform\n }, children));\n}\n\nconst baseStyles = {\n position: 'fixed',\n touchAction: 'none'\n};\n\nconst defaultTransition = activatorEvent => {\n const isKeyboardActivator = isKeyboardEvent(activatorEvent);\n return isKeyboardActivator ? 'transform 250ms ease' : undefined;\n};\n\nconst PositionedOverlay = /*#__PURE__*/forwardRef((_ref, ref) => {\n let {\n as,\n activatorEvent,\n adjustScale,\n children,\n className,\n rect,\n style,\n transform,\n transition = defaultTransition\n } = _ref;\n\n if (!rect) {\n return null;\n }\n\n const scaleAdjustedTransform = adjustScale ? transform : { ...transform,\n scaleX: 1,\n scaleY: 1\n };\n const styles = { ...baseStyles,\n width: rect.width,\n height: rect.height,\n top: rect.top,\n left: rect.left,\n transform: CSS.Transform.toString(scaleAdjustedTransform),\n transformOrigin: adjustScale && activatorEvent ? getRelativeTransformOrigin(activatorEvent, rect) : undefined,\n transition: typeof transition === 'function' ? transition(activatorEvent) : transition,\n ...style\n };\n return React.createElement(as, {\n className,\n style: styles,\n ref\n }, children);\n});\n\nconst defaultDropAnimationSideEffects = options => _ref => {\n let {\n active,\n dragOverlay\n } = _ref;\n const originalStyles = {};\n const {\n styles,\n className\n } = options;\n\n if (styles != null && styles.active) {\n for (const [key, value] of Object.entries(styles.active)) {\n if (value === undefined) {\n continue;\n }\n\n originalStyles[key] = active.node.style.getPropertyValue(key);\n active.node.style.setProperty(key, value);\n }\n }\n\n if (styles != null && styles.dragOverlay) {\n for (const [key, value] of Object.entries(styles.dragOverlay)) {\n if (value === undefined) {\n continue;\n }\n\n dragOverlay.node.style.setProperty(key, value);\n }\n }\n\n if (className != null && className.active) {\n active.node.classList.add(className.active);\n }\n\n if (className != null && className.dragOverlay) {\n dragOverlay.node.classList.add(className.dragOverlay);\n }\n\n return function cleanup() {\n for (const [key, value] of Object.entries(originalStyles)) {\n active.node.style.setProperty(key, value);\n }\n\n if (className != null && className.active) {\n active.node.classList.remove(className.active);\n }\n };\n};\n\nconst defaultKeyframeResolver = _ref2 => {\n let {\n transform: {\n initial,\n final\n }\n } = _ref2;\n return [{\n transform: CSS.Transform.toString(initial)\n }, {\n transform: CSS.Transform.toString(final)\n }];\n};\n\nconst defaultDropAnimationConfiguration = {\n duration: 250,\n easing: 'ease',\n keyframes: defaultKeyframeResolver,\n sideEffects: /*#__PURE__*/defaultDropAnimationSideEffects({\n styles: {\n active: {\n opacity: '0'\n }\n }\n })\n};\nfunction useDropAnimation(_ref3) {\n let {\n config,\n draggableNodes,\n droppableContainers,\n measuringConfiguration\n } = _ref3;\n return useEvent((id, node) => {\n if (config === null) {\n return;\n }\n\n const activeDraggable = draggableNodes.get(id);\n\n if (!activeDraggable) {\n return;\n }\n\n const activeNode = activeDraggable.node.current;\n\n if (!activeNode) {\n return;\n }\n\n const measurableNode = getMeasurableNode(node);\n\n if (!measurableNode) {\n return;\n }\n\n const {\n transform\n } = getWindow(node).getComputedStyle(node);\n const parsedTransform = parseTransform(transform);\n\n if (!parsedTransform) {\n return;\n }\n\n const animation = typeof config === 'function' ? config : createDefaultDropAnimation(config);\n scrollIntoViewIfNeeded(activeNode, measuringConfiguration.draggable.measure);\n return animation({\n active: {\n id,\n data: activeDraggable.data,\n node: activeNode,\n rect: measuringConfiguration.draggable.measure(activeNode)\n },\n draggableNodes,\n dragOverlay: {\n node,\n rect: measuringConfiguration.dragOverlay.measure(measurableNode)\n },\n droppableContainers,\n measuringConfiguration,\n transform: parsedTransform\n });\n });\n}\n\nfunction createDefaultDropAnimation(options) {\n const {\n duration,\n easing,\n sideEffects,\n keyframes\n } = { ...defaultDropAnimationConfiguration,\n ...options\n };\n return _ref4 => {\n let {\n active,\n dragOverlay,\n transform,\n ...rest\n } = _ref4;\n\n if (!duration) {\n // Do not animate if animation duration is zero.\n return;\n }\n\n const delta = {\n x: dragOverlay.rect.left - active.rect.left,\n y: dragOverlay.rect.top - active.rect.top\n };\n const scale = {\n scaleX: transform.scaleX !== 1 ? active.rect.width * transform.scaleX / dragOverlay.rect.width : 1,\n scaleY: transform.scaleY !== 1 ? active.rect.height * transform.scaleY / dragOverlay.rect.height : 1\n };\n const finalTransform = {\n x: transform.x - delta.x,\n y: transform.y - delta.y,\n ...scale\n };\n const animationKeyframes = keyframes({ ...rest,\n active,\n dragOverlay,\n transform: {\n initial: transform,\n final: finalTransform\n }\n });\n const [firstKeyframe] = animationKeyframes;\n const lastKeyframe = animationKeyframes[animationKeyframes.length - 1];\n\n if (JSON.stringify(firstKeyframe) === JSON.stringify(lastKeyframe)) {\n // The start and end keyframes are the same, infer that there is no animation needed.\n return;\n }\n\n const cleanup = sideEffects == null ? void 0 : sideEffects({\n active,\n dragOverlay,\n ...rest\n });\n const animation = dragOverlay.node.animate(animationKeyframes, {\n duration,\n easing,\n fill: 'forwards'\n });\n return new Promise(resolve => {\n animation.onfinish = () => {\n cleanup == null ? void 0 : cleanup();\n resolve();\n };\n });\n };\n}\n\nlet key = 0;\nfunction useKey(id) {\n return useMemo(() => {\n if (id == null) {\n return;\n }\n\n key++;\n return key;\n }, [id]);\n}\n\nconst DragOverlay = /*#__PURE__*/React.memo(_ref => {\n let {\n adjustScale = false,\n children,\n dropAnimation: dropAnimationConfig,\n style,\n transition,\n modifiers,\n wrapperElement = 'div',\n className,\n zIndex = 999\n } = _ref;\n const {\n activatorEvent,\n active,\n activeNodeRect,\n containerNodeRect,\n draggableNodes,\n droppableContainers,\n dragOverlay,\n over,\n measuringConfiguration,\n scrollableAncestors,\n scrollableAncestorRects,\n windowRect\n } = useDndContext();\n const transform = useContext(ActiveDraggableContext);\n const key = useKey(active == null ? void 0 : active.id);\n const modifiedTransform = applyModifiers(modifiers, {\n activatorEvent,\n active,\n activeNodeRect,\n containerNodeRect,\n draggingNodeRect: dragOverlay.rect,\n over,\n overlayNodeRect: dragOverlay.rect,\n scrollableAncestors,\n scrollableAncestorRects,\n transform,\n windowRect\n });\n const initialRect = useInitialValue(activeNodeRect);\n const dropAnimation = useDropAnimation({\n config: dropAnimationConfig,\n draggableNodes,\n droppableContainers,\n measuringConfiguration\n }); // We need to wait for the active node to be measured before connecting the drag overlay ref\n // otherwise collisions can be computed against a mispositioned drag overlay\n\n const ref = initialRect ? dragOverlay.setRef : undefined;\n return React.createElement(NullifiedContextProvider, null, React.createElement(AnimationManager, {\n animation: dropAnimation\n }, active && key ? React.createElement(PositionedOverlay, {\n key: key,\n id: active.id,\n ref: ref,\n as: wrapperElement,\n activatorEvent: activatorEvent,\n adjustScale: adjustScale,\n className: className,\n transition: transition,\n rect: initialRect,\n style: {\n zIndex,\n ...style\n },\n transform: modifiedTransform\n }, children) : null));\n});\n\nexport { AutoScrollActivator, DndContext, DragOverlay, KeyboardCode, KeyboardSensor, MeasuringFrequency, MeasuringStrategy, MouseSensor, PointerSensor, TouchSensor, TraversalOrder, applyModifiers, closestCenter, closestCorners, defaultAnnouncements, defaultCoordinates, defaultDropAnimationConfiguration as defaultDropAnimation, defaultDropAnimationSideEffects, defaultScreenReaderInstructions, getClientRect, getFirstCollision, getScrollableAncestors, pointerWithin, rectIntersection, useDndContext, useDndMonitor, useDraggable, useDroppable, useSensor, useSensors };\n//# sourceMappingURL=core.esm.js.map\n","import React, { useMemo, useRef, useEffect, useState, useContext } from 'react';\nimport { useDndContext, getClientRect, useDroppable, useDraggable, closestCorners, getFirstCollision, getScrollableAncestors, KeyboardCode } from '@dnd-kit/core';\nimport { useUniqueId, useIsomorphicLayoutEffect, CSS, useCombinedRefs, isKeyboardEvent, subtract } from '@dnd-kit/utilities';\n\n/**\r\n * Move an array item to a different position. Returns a new array with the item moved to the new position.\r\n */\nfunction arrayMove(array, from, to) {\n const newArray = array.slice();\n newArray.splice(to < 0 ? newArray.length + to : to, 0, newArray.splice(from, 1)[0]);\n return newArray;\n}\n\n/**\r\n * Swap an array item to a different position. Returns a new array with the item swapped to the new position.\r\n */\nfunction arraySwap(array, from, to) {\n const newArray = array.slice();\n newArray[from] = array[to];\n newArray[to] = array[from];\n return newArray;\n}\n\nfunction getSortedRects(items, rects) {\n return items.reduce((accumulator, id, index) => {\n const rect = rects.get(id);\n\n if (rect) {\n accumulator[index] = rect;\n }\n\n return accumulator;\n }, Array(items.length));\n}\n\nfunction isValidIndex(index) {\n return index !== null && index >= 0;\n}\n\nfunction itemsEqual(a, b) {\n if (a === b) {\n return true;\n }\n\n if (a.length !== b.length) {\n return false;\n }\n\n for (let i = 0; i < a.length; i++) {\n if (a[i] !== b[i]) {\n return false;\n }\n }\n\n return true;\n}\n\nfunction normalizeDisabled(disabled) {\n if (typeof disabled === 'boolean') {\n return {\n draggable: disabled,\n droppable: disabled\n };\n }\n\n return disabled;\n}\n\n// To-do: We should be calculating scale transformation\nconst defaultScale = {\n scaleX: 1,\n scaleY: 1\n};\nconst horizontalListSortingStrategy = _ref => {\n var _rects$activeIndex;\n\n let {\n rects,\n activeNodeRect: fallbackActiveRect,\n activeIndex,\n overIndex,\n index\n } = _ref;\n const activeNodeRect = (_rects$activeIndex = rects[activeIndex]) != null ? _rects$activeIndex : fallbackActiveRect;\n\n if (!activeNodeRect) {\n return null;\n }\n\n const itemGap = getItemGap(rects, index, activeIndex);\n\n if (index === activeIndex) {\n const newIndexRect = rects[overIndex];\n\n if (!newIndexRect) {\n return null;\n }\n\n return {\n x: activeIndex < overIndex ? newIndexRect.left + newIndexRect.width - (activeNodeRect.left + activeNodeRect.width) : newIndexRect.left - activeNodeRect.left,\n y: 0,\n ...defaultScale\n };\n }\n\n if (index > activeIndex && index <= overIndex) {\n return {\n x: -activeNodeRect.width - itemGap,\n y: 0,\n ...defaultScale\n };\n }\n\n if (index < activeIndex && index >= overIndex) {\n return {\n x: activeNodeRect.width + itemGap,\n y: 0,\n ...defaultScale\n };\n }\n\n return {\n x: 0,\n y: 0,\n ...defaultScale\n };\n};\n\nfunction getItemGap(rects, index, activeIndex) {\n const currentRect = rects[index];\n const previousRect = rects[index - 1];\n const nextRect = rects[index + 1];\n\n if (!currentRect || !previousRect && !nextRect) {\n return 0;\n }\n\n if (activeIndex < index) {\n return previousRect ? currentRect.left - (previousRect.left + previousRect.width) : nextRect.left - (currentRect.left + currentRect.width);\n }\n\n return nextRect ? nextRect.left - (currentRect.left + currentRect.width) : currentRect.left - (previousRect.left + previousRect.width);\n}\n\nconst rectSortingStrategy = _ref => {\n let {\n rects,\n activeIndex,\n overIndex,\n index\n } = _ref;\n const newRects = arrayMove(rects, overIndex, activeIndex);\n const oldRect = rects[index];\n const newRect = newRects[index];\n\n if (!newRect || !oldRect) {\n return null;\n }\n\n return {\n x: newRect.left - oldRect.left,\n y: newRect.top - oldRect.top,\n scaleX: newRect.width / oldRect.width,\n scaleY: newRect.height / oldRect.height\n };\n};\n\nconst rectSwappingStrategy = _ref => {\n let {\n activeIndex,\n index,\n rects,\n overIndex\n } = _ref;\n let oldRect;\n let newRect;\n\n if (index === activeIndex) {\n oldRect = rects[index];\n newRect = rects[overIndex];\n }\n\n if (index === overIndex) {\n oldRect = rects[index];\n newRect = rects[activeIndex];\n }\n\n if (!newRect || !oldRect) {\n return null;\n }\n\n return {\n x: newRect.left - oldRect.left,\n y: newRect.top - oldRect.top,\n scaleX: newRect.width / oldRect.width,\n scaleY: newRect.height / oldRect.height\n };\n};\n\n// To-do: We should be calculating scale transformation\nconst defaultScale$1 = {\n scaleX: 1,\n scaleY: 1\n};\nconst verticalListSortingStrategy = _ref => {\n var _rects$activeIndex;\n\n let {\n activeIndex,\n activeNodeRect: fallbackActiveRect,\n index,\n rects,\n overIndex\n } = _ref;\n const activeNodeRect = (_rects$activeIndex = rects[activeIndex]) != null ? _rects$activeIndex : fallbackActiveRect;\n\n if (!activeNodeRect) {\n return null;\n }\n\n if (index === activeIndex) {\n const overIndexRect = rects[overIndex];\n\n if (!overIndexRect) {\n return null;\n }\n\n return {\n x: 0,\n y: activeIndex < overIndex ? overIndexRect.top + overIndexRect.height - (activeNodeRect.top + activeNodeRect.height) : overIndexRect.top - activeNodeRect.top,\n ...defaultScale$1\n };\n }\n\n const itemGap = getItemGap$1(rects, index, activeIndex);\n\n if (index > activeIndex && index <= overIndex) {\n return {\n x: 0,\n y: -activeNodeRect.height - itemGap,\n ...defaultScale$1\n };\n }\n\n if (index < activeIndex && index >= overIndex) {\n return {\n x: 0,\n y: activeNodeRect.height + itemGap,\n ...defaultScale$1\n };\n }\n\n return {\n x: 0,\n y: 0,\n ...defaultScale$1\n };\n};\n\nfunction getItemGap$1(clientRects, index, activeIndex) {\n const currentRect = clientRects[index];\n const previousRect = clientRects[index - 1];\n const nextRect = clientRects[index + 1];\n\n if (!currentRect) {\n return 0;\n }\n\n if (activeIndex < index) {\n return previousRect ? currentRect.top - (previousRect.top + previousRect.height) : nextRect ? nextRect.top - (currentRect.top + currentRect.height) : 0;\n }\n\n return nextRect ? nextRect.top - (currentRect.top + currentRect.height) : previousRect ? currentRect.top - (previousRect.top + previousRect.height) : 0;\n}\n\nconst ID_PREFIX = 'Sortable';\nconst Context = /*#__PURE__*/React.createContext({\n activeIndex: -1,\n containerId: ID_PREFIX,\n disableTransforms: false,\n items: [],\n overIndex: -1,\n useDragOverlay: false,\n sortedRects: [],\n strategy: rectSortingStrategy,\n disabled: {\n draggable: false,\n droppable: false\n }\n});\nfunction SortableContext(_ref) {\n let {\n children,\n id,\n items: userDefinedItems,\n strategy = rectSortingStrategy,\n disabled: disabledProp = false\n } = _ref;\n const {\n active,\n dragOverlay,\n droppableRects,\n over,\n measureDroppableContainers\n } = useDndContext();\n const containerId = useUniqueId(ID_PREFIX, id);\n const useDragOverlay = Boolean(dragOverlay.rect !== null);\n const items = useMemo(() => userDefinedItems.map(item => typeof item === 'object' && 'id' in item ? item.id : item), [userDefinedItems]);\n const isDragging = active != null;\n const activeIndex = active ? items.indexOf(active.id) : -1;\n const overIndex = over ? items.indexOf(over.id) : -1;\n const previousItemsRef = useRef(items);\n const itemsHaveChanged = !itemsEqual(items, previousItemsRef.current);\n const disableTransforms = overIndex !== -1 && activeIndex === -1 || itemsHaveChanged;\n const disabled = normalizeDisabled(disabledProp);\n useIsomorphicLayoutEffect(() => {\n if (itemsHaveChanged && isDragging) {\n measureDroppableContainers(items);\n }\n }, [itemsHaveChanged, items, isDragging, measureDroppableContainers]);\n useEffect(() => {\n previousItemsRef.current = items;\n }, [items]);\n const contextValue = useMemo(() => ({\n activeIndex,\n containerId,\n disabled,\n disableTransforms,\n items,\n overIndex,\n useDragOverlay,\n sortedRects: getSortedRects(items, droppableRects),\n strategy\n }), // eslint-disable-next-line react-hooks/exhaustive-deps\n [activeIndex, containerId, disabled.draggable, disabled.droppable, disableTransforms, items, overIndex, droppableRects, useDragOverlay, strategy]);\n return React.createElement(Context.Provider, {\n value: contextValue\n }, children);\n}\n\nconst defaultNewIndexGetter = _ref => {\n let {\n id,\n items,\n activeIndex,\n overIndex\n } = _ref;\n return arrayMove(items, activeIndex, overIndex).indexOf(id);\n};\nconst defaultAnimateLayoutChanges = _ref2 => {\n let {\n containerId,\n isSorting,\n wasDragging,\n index,\n items,\n newIndex,\n previousItems,\n previousContainerId,\n transition\n } = _ref2;\n\n if (!transition || !wasDragging) {\n return false;\n }\n\n if (previousItems !== items && index === newIndex) {\n return false;\n }\n\n if (isSorting) {\n return true;\n }\n\n return newIndex !== index && containerId === previousContainerId;\n};\nconst defaultTransition = {\n duration: 200,\n easing: 'ease'\n};\nconst transitionProperty = 'transform';\nconst disabledTransition = /*#__PURE__*/CSS.Transition.toString({\n property: transitionProperty,\n duration: 0,\n easing: 'linear'\n});\nconst defaultAttributes = {\n roleDescription: 'sortable'\n};\n\n/*\r\n * When the index of an item changes while sorting,\r\n * we need to temporarily disable the transforms\r\n */\n\nfunction useDerivedTransform(_ref) {\n let {\n disabled,\n index,\n node,\n rect\n } = _ref;\n const [derivedTransform, setDerivedtransform] = useState(null);\n const previousIndex = useRef(index);\n useIsomorphicLayoutEffect(() => {\n if (!disabled && index !== previousIndex.current && node.current) {\n const initial = rect.current;\n\n if (initial) {\n const current = getClientRect(node.current, {\n ignoreTransform: true\n });\n const delta = {\n x: initial.left - current.left,\n y: initial.top - current.top,\n scaleX: initial.width / current.width,\n scaleY: initial.height / current.height\n };\n\n if (delta.x || delta.y) {\n setDerivedtransform(delta);\n }\n }\n }\n\n if (index !== previousIndex.current) {\n previousIndex.current = index;\n }\n }, [disabled, index, node, rect]);\n useEffect(() => {\n if (derivedTransform) {\n setDerivedtransform(null);\n }\n }, [derivedTransform]);\n return derivedTransform;\n}\n\nfunction useSortable(_ref) {\n let {\n animateLayoutChanges = defaultAnimateLayoutChanges,\n attributes: userDefinedAttributes,\n disabled: localDisabled,\n data: customData,\n getNewIndex = defaultNewIndexGetter,\n id,\n strategy: localStrategy,\n resizeObserverConfig,\n transition = defaultTransition\n } = _ref;\n const {\n items,\n containerId,\n activeIndex,\n disabled: globalDisabled,\n disableTransforms,\n sortedRects,\n overIndex,\n useDragOverlay,\n strategy: globalStrategy\n } = useContext(Context);\n const disabled = normalizeLocalDisabled(localDisabled, globalDisabled);\n const index = items.indexOf(id);\n const data = useMemo(() => ({\n sortable: {\n containerId,\n index,\n items\n },\n ...customData\n }), [containerId, customData, index, items]);\n const itemsAfterCurrentSortable = useMemo(() => items.slice(items.indexOf(id)), [items, id]);\n const {\n rect,\n node,\n isOver,\n setNodeRef: setDroppableNodeRef\n } = useDroppable({\n id,\n data,\n disabled: disabled.droppable,\n resizeObserverConfig: {\n updateMeasurementsFor: itemsAfterCurrentSortable,\n ...resizeObserverConfig\n }\n });\n const {\n active,\n activatorEvent,\n activeNodeRect,\n attributes,\n setNodeRef: setDraggableNodeRef,\n listeners,\n isDragging,\n over,\n setActivatorNodeRef,\n transform\n } = useDraggable({\n id,\n data,\n attributes: { ...defaultAttributes,\n ...userDefinedAttributes\n },\n disabled: disabled.draggable\n });\n const setNodeRef = useCombinedRefs(setDroppableNodeRef, setDraggableNodeRef);\n const isSorting = Boolean(active);\n const displaceItem = isSorting && !disableTransforms && isValidIndex(activeIndex) && isValidIndex(overIndex);\n const shouldDisplaceDragSource = !useDragOverlay && isDragging;\n const dragSourceDisplacement = shouldDisplaceDragSource && displaceItem ? transform : null;\n const strategy = localStrategy != null ? localStrategy : globalStrategy;\n const finalTransform = displaceItem ? dragSourceDisplacement != null ? dragSourceDisplacement : strategy({\n rects: sortedRects,\n activeNodeRect,\n activeIndex,\n overIndex,\n index\n }) : null;\n const newIndex = isValidIndex(activeIndex) && isValidIndex(overIndex) ? getNewIndex({\n id,\n items,\n activeIndex,\n overIndex\n }) : index;\n const activeId = active == null ? void 0 : active.id;\n const previous = useRef({\n activeId,\n items,\n newIndex,\n containerId\n });\n const itemsHaveChanged = items !== previous.current.items;\n const shouldAnimateLayoutChanges = animateLayoutChanges({\n active,\n containerId,\n isDragging,\n isSorting,\n id,\n index,\n items,\n newIndex: previous.current.newIndex,\n previousItems: previous.current.items,\n previousContainerId: previous.current.containerId,\n transition,\n wasDragging: previous.current.activeId != null\n });\n const derivedTransform = useDerivedTransform({\n disabled: !shouldAnimateLayoutChanges,\n index,\n node,\n rect\n });\n useEffect(() => {\n if (isSorting && previous.current.newIndex !== newIndex) {\n previous.current.newIndex = newIndex;\n }\n\n if (containerId !== previous.current.containerId) {\n previous.current.containerId = containerId;\n }\n\n if (items !== previous.current.items) {\n previous.current.items = items;\n }\n }, [isSorting, newIndex, containerId, items]);\n useEffect(() => {\n if (activeId === previous.current.activeId) {\n return;\n }\n\n if (activeId && !previous.current.activeId) {\n previous.current.activeId = activeId;\n return;\n }\n\n const timeoutId = setTimeout(() => {\n previous.current.activeId = activeId;\n }, 50);\n return () => clearTimeout(timeoutId);\n }, [activeId]);\n return {\n active,\n activeIndex,\n attributes,\n data,\n rect,\n index,\n newIndex,\n items,\n isOver,\n isSorting,\n isDragging,\n listeners,\n node,\n overIndex,\n over,\n setNodeRef,\n setActivatorNodeRef,\n setDroppableNodeRef,\n setDraggableNodeRef,\n transform: derivedTransform != null ? derivedTransform : finalTransform,\n transition: getTransition()\n };\n\n function getTransition() {\n if ( // Temporarily disable transitions for a single frame to set up derived transforms\n derivedTransform || // Or to prevent items jumping to back to their \"new\" position when items change\n itemsHaveChanged && previous.current.newIndex === index) {\n return disabledTransition;\n }\n\n if (shouldDisplaceDragSource && !isKeyboardEvent(activatorEvent) || !transition) {\n return undefined;\n }\n\n if (isSorting || shouldAnimateLayoutChanges) {\n return CSS.Transition.toString({ ...transition,\n property: transitionProperty\n });\n }\n\n return undefined;\n }\n}\n\nfunction normalizeLocalDisabled(localDisabled, globalDisabled) {\n var _localDisabled$dragga, _localDisabled$droppa;\n\n if (typeof localDisabled === 'boolean') {\n return {\n draggable: localDisabled,\n // Backwards compatibility\n droppable: false\n };\n }\n\n return {\n draggable: (_localDisabled$dragga = localDisabled == null ? void 0 : localDisabled.draggable) != null ? _localDisabled$dragga : globalDisabled.draggable,\n droppable: (_localDisabled$droppa = localDisabled == null ? void 0 : localDisabled.droppable) != null ? _localDisabled$droppa : globalDisabled.droppable\n };\n}\n\nfunction hasSortableData(entry) {\n if (!entry) {\n return false;\n }\n\n const data = entry.data.current;\n\n if (data && 'sortable' in data && typeof data.sortable === 'object' && 'containerId' in data.sortable && 'items' in data.sortable && 'index' in data.sortable) {\n return true;\n }\n\n return false;\n}\n\nconst directions = [KeyboardCode.Down, KeyboardCode.Right, KeyboardCode.Up, KeyboardCode.Left];\nconst sortableKeyboardCoordinates = (event, _ref) => {\n let {\n context: {\n active,\n collisionRect,\n droppableRects,\n droppableContainers,\n over,\n scrollableAncestors\n }\n } = _ref;\n\n if (directions.includes(event.code)) {\n event.preventDefault();\n\n if (!active || !collisionRect) {\n return;\n }\n\n const filteredContainers = [];\n droppableContainers.getEnabled().forEach(entry => {\n if (!entry || entry != null && entry.disabled) {\n return;\n }\n\n const rect = droppableRects.get(entry.id);\n\n if (!rect) {\n return;\n }\n\n switch (event.code) {\n case KeyboardCode.Down:\n if (collisionRect.top < rect.top) {\n filteredContainers.push(entry);\n }\n\n break;\n\n case KeyboardCode.Up:\n if (collisionRect.top > rect.top) {\n filteredContainers.push(entry);\n }\n\n break;\n\n case KeyboardCode.Left:\n if (collisionRect.left > rect.left) {\n filteredContainers.push(entry);\n }\n\n break;\n\n case KeyboardCode.Right:\n if (collisionRect.left < rect.left) {\n filteredContainers.push(entry);\n }\n\n break;\n }\n });\n const collisions = closestCorners({\n active,\n collisionRect: collisionRect,\n droppableRects,\n droppableContainers: filteredContainers,\n pointerCoordinates: null\n });\n let closestId = getFirstCollision(collisions, 'id');\n\n if (closestId === (over == null ? void 0 : over.id) && collisions.length > 1) {\n closestId = collisions[1].id;\n }\n\n if (closestId != null) {\n const activeDroppable = droppableContainers.get(active.id);\n const newDroppable = droppableContainers.get(closestId);\n const newRect = newDroppable ? droppableRects.get(newDroppable.id) : null;\n const newNode = newDroppable == null ? void 0 : newDroppable.node.current;\n\n if (newNode && newRect && activeDroppable && newDroppable) {\n const newScrollAncestors = getScrollableAncestors(newNode);\n const hasDifferentScrollAncestors = newScrollAncestors.some((element, index) => scrollableAncestors[index] !== element);\n const hasSameContainer = isSameContainer(activeDroppable, newDroppable);\n const isAfterActive = isAfter(activeDroppable, newDroppable);\n const offset = hasDifferentScrollAncestors || !hasSameContainer ? {\n x: 0,\n y: 0\n } : {\n x: isAfterActive ? collisionRect.width - newRect.width : 0,\n y: isAfterActive ? collisionRect.height - newRect.height : 0\n };\n const rectCoordinates = {\n x: newRect.left,\n y: newRect.top\n };\n const newCoordinates = offset.x && offset.y ? rectCoordinates : subtract(rectCoordinates, offset);\n return newCoordinates;\n }\n }\n }\n\n return undefined;\n};\n\nfunction isSameContainer(a, b) {\n if (!hasSortableData(a) || !hasSortableData(b)) {\n return false;\n }\n\n return a.data.current.sortable.containerId === b.data.current.sortable.containerId;\n}\n\nfunction isAfter(a, b) {\n if (!hasSortableData(a) || !hasSortableData(b)) {\n return false;\n }\n\n if (!isSameContainer(a, b)) {\n return false;\n }\n\n return a.data.current.sortable.index < b.data.current.sortable.index;\n}\n\nexport { SortableContext, arrayMove, arraySwap, defaultAnimateLayoutChanges, defaultNewIndexGetter, hasSortableData, horizontalListSortingStrategy, rectSortingStrategy, rectSwappingStrategy, sortableKeyboardCoordinates, useSortable, verticalListSortingStrategy };\n//# sourceMappingURL=sortable.esm.js.map\n","import { DndContext, DndContextProps } from \"@dnd-kit/core\";\nimport React, { FC, createContext, useContext, useEffect } from \"react\";\n\n/**\n * Facilitates DI for the DndContext\n */\nexport const injectDndContext = createContext<FC<DndContextProps>>(DndContext);\n\n/**\n * Wraps dnd-kit's `DndContext` to normalise scroll behaviour and enable dependency injection\n */\nexport const InternalDndContext = (props: DndContextProps) => {\n const DndContext = useContext(injectDndContext);\n\n /**\n * Disable smooth scrolling during drag to ensure that the dragged item is always visible\n */\n useEffect(() => {\n const originalScrollingBehaviour =\n document.documentElement.style.scrollBehavior;\n document.documentElement.style.scrollBehavior = \"auto\";\n\n return () => {\n document.documentElement.style.scrollBehavior =\n originalScrollingBehaviour;\n };\n });\n\n return <DndContext {...props} />;\n};\n","import { useEffect, useState } from \"react\";\n\n/**\n * Returns true if the user has requested that the system minimize the amount of non-essential motion it uses.\n */\nexport function usePrefersReducedMotion() {\n const [prefersReducedMotion, setPrefersReducedMotion] = useState(false);\n\n useEffect(() => {\n const mediaQuery = window.matchMedia(\"(prefers-reduced-motion: reduce)\");\n\n setPrefersReducedMotion(mediaQuery.matches);\n }, []);\n\n return prefersReducedMotion;\n}\n","import React, { useState } from \"react\";\nimport {\n closestCenter,\n KeyboardSensor,\n useSensor,\n useSensors,\n DragEndEvent,\n DragOverlay,\n DragStartEvent,\n UniqueIdentifier,\n Announcements,\n MouseSensor,\n TouchSensor,\n} from \"@dnd-kit/core\";\nimport {\n arrayMove,\n SortableContext,\n sortableKeyboardCoordinates,\n useSortable,\n verticalListSortingStrategy,\n} from \"@dnd-kit/sortable\";\nimport { CSS } from \"@dnd-kit/utilities\";\nimport { createPortal } from \"react-dom\";\n\nimport { OakFlex } from \"@/components/atoms\";\nimport {\n OakDragAndDropInstructions,\n OakDraggable,\n OakDroppable,\n} from \"@/components/molecules\";\nimport { InternalDndContext } from \"@/components/atoms/InternalDndContext/InternalDndContext\";\nimport { usePrefersReducedMotion } from \"@/animation/usePrefersReducedMotion\";\n\ntype OakQuizOrderItem = {\n id: string;\n label: string;\n};\n\nexport type OakQuizOrderProps = {\n /**\n * The initial order of items\n *\n * this cannot be updated on subsequent renders\n */\n initialItems: OakQuizOrderItem[];\n /**\n * Notified the consumer when the order of items has changed\n */\n onChange?: (items: OakQuizOrderItem[]) => void;\n /**\n * Highlight all items to indicate that they can be interacted with\n */\n isHighlighted?: boolean;\n};\n\nconst ConnectedDraggable = ({\n id,\n label,\n isHighlighted,\n}: OakQuizOrderItem & { isHighlighted?: boolean }) => {\n const {\n attributes,\n listeners,\n setNodeRef,\n transform,\n transition,\n isOver,\n isDragging,\n } = useSortable({ id });\n const style = {\n transform: CSS.Transform.toString(transform),\n transition,\n };\n\n return (\n <OakDroppable isOver={isOver} isHighlighted={isHighlighted}>\n <OakDraggable\n ref={setNodeRef}\n style={style}\n isDisabled={isDragging}\n {...attributes}\n {...listeners}\n aria-describedby={undefined}\n aria-roledescription=\"sortable item\"\n aria-pressed={undefined}\n aria-selected={!!attributes[\"aria-pressed\"]}\n role=\"option\"\n >\n {label}\n </OakDraggable>\n </OakDroppable>\n );\n};\n\n/**\n * A sortable list of items with drag and drop functionality. Items can be dragged over named slots to re-arrange them\n *\n * Keyboard navigation is supported with the `tab`, `space` and `arrow` keys\n */\nexport const OakQuizOrder = ({\n initialItems,\n onChange,\n isHighlighted,\n}: OakQuizOrderProps) => {\n const [items, setItems] = useState<OakQuizOrderItem[]>(initialItems);\n const [activeId, setActiveId] = useState<string | null>(null);\n const activeItem = items.find((item) => item.id === activeId);\n const sensors = useSensors(\n useSensor(MouseSensor),\n useSensor(TouchSensor),\n useSensor(KeyboardSensor, {\n coordinateGetter: sortableKeyboardCoordinates,\n scrollBehavior: usePrefersReducedMotion() ? \"instant\" : \"smooth\",\n }),\n );\n\n return (\n <>\n <OakDragAndDropInstructions $mb=\"space-between-m2\" />\n <InternalDndContext\n sensors={sensors}\n collisionDetection={closestCenter}\n onDragEnd={handleDragEnd}\n onDragStart={handleDragStart}\n accessibility={{\n announcements: createAccouncements(items),\n }}\n >\n <SortableContext items={items} strategy={verticalListSortingStrategy}>\n <OakFlex\n $gap=\"space-between-s\"\n $flexDirection=\"column\"\n role=\"listbox\"\n aria-label=\"Sortable items\"\n >\n {items.map((item) => (\n <ConnectedDraggable\n key={item.id}\n {...item}\n isHighlighted={isHighlighted}\n />\n ))}\n </OakFlex>\n {createPortal(\n <DragOverlay>\n {activeItem && (\n <OakDraggable isDragging>{activeItem.label}</OakDraggable>\n )}\n </DragOverlay>,\n document.body,\n )}\n </SortableContext>\n </InternalDndContext>\n </>\n );\n\n function handleDragStart(event: DragStartEvent) {\n const { active } = event;\n setActiveId(active.id.toString());\n }\n\n function handleDragEnd(event: DragEndEvent) {\n const { active, over } = event;\n\n if (active.id !== over?.id) {\n setItems((items) => {\n const oldIndex = items.findIndex((item) => item.id === active.id);\n const newIndex = items.findIndex((item) => item.id === over?.id);\n const newItems = arrayMove(items, oldIndex, newIndex);\n\n onChange?.(newItems);\n\n return newItems;\n });\n }\n\n setActiveId(null);\n }\n};\n\nfunction createAccouncements(items: OakQuizOrderItem[]): Announcements {\n const getPosition = (id: UniqueIdentifier) =>\n items.findIndex((item) => item.id === id) + 1;\n const getItemLabel = (id: UniqueIdentifier) =>\n items.find((item) => item.id === id)?.label;\n\n return {\n onDragStart() {\n return undefined;\n },\n onDragOver({ active, over }) {\n if (over) {\n return `Sortable item ${getItemLabel(\n active.id,\n )} is in position ${getPosition(over.id)} of ${items.length}`;\n }\n },\n onDragEnd({ active, over }) {\n if (over) {\n return `Sortable item ${getItemLabel(\n active.id,\n )} was dropped into position ${getPosition(over.id)} of ${\n items.length\n }`;\n }\n },\n onDragCancel({ active }) {\n return `Dragging was cancelled. Sortable item ${getItemLabel(\n active.id,\n )} was dropped.`;\n },\n };\n}\n","import React, {\n ComponentPropsWithRef,\n ComponentPropsWithoutRef,\n FC,\n forwardRef,\n useLayoutEffect,\n useState,\n} from \"react\";\nimport styled from \"styled-components\";\n\nimport { OakBox, OakFlex } from \"@/components/atoms\";\nimport { parseColor } from \"@/styles/helpers/parseColor\";\n\nconst StyledOakBox = styled(OakBox)`\n background-color: ${parseColor(\"grey20\")};\n background-color: color-mix(in lch, ${parseColor(\"black\")} 5%, transparent);\n\n &[data-over=\"true\"] {\n background-color: ${parseColor(\"white\")};\n background-color: color-mix(\n in lch,\n ${parseColor(\"white\")} 60%,\n transparent\n );\n }\n`;\n\ntype InternalDroppableHoldingPenProps = {\n /**\n * Indicates whether a draggable is currently being dragged over the droppable\n */\n isOver?: boolean;\n};\n\n/**\n * An internal holding pen for multiple draggable items\n *\n * Has no intrinsic drop functionally.\n * It is intended to be used with `useDroppable` from `@dnd-kit/core`\n */\nexport const InternalDroppableHoldingPen: FC<\n ComponentPropsWithRef<typeof OakFlex>\n> = forwardRef<\n HTMLDivElement,\n InternalDroppableHoldingPenProps & ComponentPropsWithoutRef<typeof OakFlex>\n>(({ isOver, children, ...props }, ref) => {\n const [domContent, setContentBox] = useState<HTMLDivElement | null>(null);\n const [minHeight, setMinHeight] = useState<number>(0);\n\n useLayoutEffect(() => {\n if (!domContent) {\n return;\n }\n\n // Prevents the holding area from shrinking when an item is removed\n // avoiding layout shift\n const observer = new ResizeObserver((entries) => {\n for (const entry of entries) {\n setMinHeight((currentHeight) =>\n Math.max(entry.borderBoxSize[0]?.blockSize ?? 0, currentHeight),\n );\n }\n });\n\n observer.observe(domContent);\n\n // Reset min height when the window is resized so that the holding pen can shrink\n function resetMinHeight() {\n setMinHeight(0);\n }\n window.addEventListener(\"resize\", resetMinHeight);\n\n return () => {\n observer.disconnect();\n window.removeEventListener(\"resize\", resetMinHeight);\n };\n }, [domContent]);\n\n return (\n <StyledOakBox\n ref={ref}\n $mb=\"space-between-m2\"\n $borderRadius=\"border-radius-l\"\n data-over={isOver}\n style={{ minHeight: minHeight === 0 ? \"auto\" : minHeight }}\n {...props}\n >\n <OakFlex\n $alignItems=\"flex-start\"\n $minHeight=\"all-spacing-13\"\n $pa=\"inner-padding-s\"\n $gap=\"space-between-xs\"\n $flexWrap=\"wrap\"\n ref={setContentBox}\n >\n {children}\n </OakFlex>\n </StyledOakBox>\n );\n});\n","import React, { ReactNode, useRef, useState } from \"react\";\nimport {\n closestCenter,\n KeyboardSensor,\n useSensor,\n useSensors,\n DragEndEvent,\n DragOverlay,\n DragStartEvent,\n Announcements,\n MouseSensor,\n TouchSensor,\n useDraggable,\n useDroppable,\n} from \"@dnd-kit/core\";\nimport { createPortal } from \"react-dom\";\nimport { sortableKeyboardCoordinates } from \"@dnd-kit/sortable\";\n\nimport { InternalDroppableHoldingPen } from \"../InternalDroppableHoldingPen\";\n\nimport { OakFlex } from \"@/components/atoms\";\nimport {\n OakDragAndDropInstructions,\n OakDraggable,\n OakDroppable,\n} from \"@/components/molecules\";\nimport { usePrefersReducedMotion } from \"@/animation/usePrefersReducedMotion\";\nimport { InternalDndContext } from \"@/components/atoms/InternalDndContext/InternalDndContext\";\n\ntype DraggableId = string;\ntype DroppableId = string;\ntype DraggableItem = {\n id: DraggableId;\n label: string;\n};\ntype DroppableItem = {\n id: DroppableId;\n label: string;\n};\ntype Matches = Record<DroppableId, DraggableItem>;\n\nexport type OakQuizMatchProps = {\n /**\n * The initial options\n *\n * these are the items that can be dragged into a slot to form a match\n *\n * this cannot be updated on subsequent renders\n */\n initialOptions: DraggableItem[];\n /**\n * The initial slots\n *\n * these are the slots into which an option can be dropped to form a match\n *\n * this cannot be updated on subsequent renders\n */\n initialSlots: DroppableItem[];\n /**\n * Notify the consumer when matches have changed\n */\n onChange?: (matches: Matches) => void;\n /**\n * Highlight the droppable slots\n */\n isHighlighted?: boolean;\n};\n\nconst ConnectedDraggable = ({\n id,\n label,\n isOver,\n}: DraggableItem & { isOver?: boolean }) => {\n const { attributes, listeners, setNodeRef, isDragging } = useDraggable({\n id,\n data: { id, label },\n });\n\n return (\n <OakDraggable\n ref={setNodeRef}\n isDisabled={isOver}\n color=\"text-inverted\"\n background=\"bg-btn-primary\"\n iconColor=\"icon-main\"\n {...attributes}\n {...listeners}\n role=\"option\"\n aria-describedby={undefined}\n aria-roledescription=\"draggable item\"\n aria-pressed={undefined}\n aria-selected={!!attributes[\"aria-pressed\"]}\n style={{ opacity: isDragging ? 0 : 1 }}\n >\n {label}\n </OakDraggable>\n );\n};\n\nconst ConnectedDroppableHoldingPen = ({\n children,\n}: {\n children?: ReactNode;\n}) => {\n const { setNodeRef, isOver } = useDroppable({\n id: \"holding-pen\",\n data: { label: \"holding pen\" },\n });\n\n return (\n <InternalDroppableHoldingPen\n ref={setNodeRef}\n isOver={isOver}\n aria-label=\"Available items\"\n data-testid=\"holding-pen\"\n role=\"listbox\"\n >\n {children}\n </InternalDroppableHoldingPen>\n );\n};\n\nconst ConnectedDroppable = ({\n id,\n label,\n match,\n isHighlighted,\n}: DroppableItem & { match?: DraggableItem; isHighlighted?: boolean }) => {\n const { setNodeRef, isOver, active } = useDroppable({\n id,\n data: { id, label },\n });\n\n return (\n <OakDroppable\n isOver={isOver}\n isDisabled={!active}\n ref={setNodeRef}\n id={id}\n labelSlot={label}\n data-testid=\"slot\"\n isHighlighted={isHighlighted}\n >\n {match && <ConnectedDraggable {...match} isOver={isOver} />}\n </OakDroppable>\n );\n};\n\n/**\n * A list of draggable items with matching slots to drop them into.\n *\n * Keyboard navigation is supported with the `tab`, `space` and `arrow` keys\n */\nexport const OakQuizMatch = ({\n initialOptions,\n initialSlots,\n isHighlighted,\n onChange,\n}: OakQuizMatchProps) => {\n const [matches, setMatches] = useState<Matches>({});\n const draggables = useRef(\n initialOptions.slice().sort(() => Math.random() - 0.5),\n ).current;\n const droppables = useRef(initialSlots).current;\n const [activeId, setActiveId] = useState<DraggableId | null>(null);\n const activeDraggable = draggables.find((item) => item.id === activeId);\n const prefersReducedMotion = usePrefersReducedMotion();\n const sensors = useSensors(\n useSensor(MouseSensor),\n useSensor(TouchSensor),\n useSensor(KeyboardSensor, {\n coordinateGetter: sortableKeyboardCoordinates,\n scrollBehavior: prefersReducedMotion ? \"instant\" : \"smooth\",\n }),\n );\n const matchedDraggableIds = Object.values(matches).map((item) => item.id);\n const unmatchedDraggables = draggables.filter(\n (draggable) => !matchedDraggableIds.includes(draggable.id),\n );\n return (\n <>\n <OakDragAndDropInstructions $mb=\"space-between-m2\" />\n <InternalDndContext\n sensors={sensors}\n collisionDetection={closestCenter}\n onDragEnd={handleDragEnd}\n onDragStart={handleDragStart}\n accessibility={{ announcements }}\n >\n <ConnectedDroppableHoldingPen>\n {unmatchedDraggables.map((item) => (\n <ConnectedDraggable key={item.id} {...item} />\n ))}\n </ConnectedDroppableHoldingPen>\n <OakFlex\n $gap=\"space-between-s\"\n $flexDirection=\"column\"\n aria-label=\"Matched items\"\n role=\"listbox\"\n >\n {droppables.map((droppable) => (\n <ConnectedDroppable\n key={droppable.id}\n {...droppable}\n isHighlighted={isHighlighted}\n match={matches[droppable.id]}\n />\n ))}\n </OakFlex>\n {createPortal(\n <DragOverlay dropAnimation={prefersReducedMotion ? null : undefined}>\n {activeDraggable && (\n <OakDraggable isDragging>{activeDraggable.label}</OakDraggable>\n )}\n </DragOverlay>,\n document.body,\n )}\n </InternalDndContext>\n </>\n );\n\n function handleDragStart(event: DragStartEvent) {\n const { active } = event;\n setActiveId(active.id.toString());\n }\n\n function handleDragEnd(event: DragEndEvent) {\n const { active, over } = event;\n\n if (over) {\n setMatches((matches) => {\n // Remove the draggable from its current slot\n const entries = Object.entries(matches).filter(\n ([, draggable]) => draggable?.id !== active.id,\n );\n const newMatches = Object.fromEntries(entries);\n\n if (over.id !== \"holding-pen\") {\n // We've dropped the draggable into a slot so add it to the new slot\n newMatches[over.id] = active.data.current as DraggableItem;\n }\n\n onChange?.(newMatches);\n\n return newMatches;\n });\n }\n\n setActiveId(null);\n }\n};\n\nconst announcements: Announcements = {\n onDragStart() {\n return undefined;\n },\n onDragOver({ active, over }) {\n if (over?.data.current && active.data?.current) {\n return `Item ${active.data.current.label} is over ${over.data.current.label}`;\n }\n },\n onDragEnd({ active, over }) {\n if (over?.data.current && active.data?.current) {\n return `Item ${active.data.current.label} was dropped onto ${over.data.current.label}`;\n }\n },\n onDragCancel({ active }) {\n if (active.data?.current) {\n return `Dragging was cancelled. Item ${active.data.current.label} was dropped.`;\n }\n },\n};\n","import type { UrlObject } from \"url\";\n\nimport React, { ReactNode } from \"react\";\nimport Link from \"next/link\";\nimport styled from \"styled-components\";\n\nimport {\n OakPrimaryButton,\n OakPrimaryButtonProps,\n} from \"@/components/molecules/OakPrimaryButton\";\nimport {\n OakPrimaryInvertedButton,\n OakPrimaryInvertedButtonProps,\n} from \"@/components/molecules/OakPrimaryInvertedButton\";\n\ntype Url = string | UrlObject;\n\nexport type OakPrimaryNavItemProps = {\n href: Url;\n isCurrent?: boolean;\n shallow?: boolean;\n children: ReactNode;\n} & OakPrimaryButtonProps &\n OakPrimaryInvertedButtonProps;\n\nconst OakPrimaryButtonWithoutPointerEvents = styled(OakPrimaryButton)`\n pointer-events: none;\n`;\n\n/**\n *\n * A specific implementation of OakPrimaryButton and OakPrimaryInvertedButton rendering\n * relevant view depending on isCurrent prop\n *\n */\nexport const OakPrimaryNavItem = ({\n href,\n isCurrent = false,\n shallow = true,\n children,\n}: OakPrimaryNavItemProps) => {\n return isCurrent ? (\n <OakPrimaryButtonWithoutPointerEvents\n element={\"span\"}\n aria-current={\"page\"}\n >\n {children}\n </OakPrimaryButtonWithoutPointerEvents>\n ) : (\n <OakPrimaryInvertedButton\n element={Link}\n href={href}\n shallow={shallow}\n isTrailingIcon={true}\n >\n {children}\n </OakPrimaryInvertedButton>\n );\n};\n","import React from \"react\";\n\nimport { OakSpan, OakSpanProps } from \"@/components/atoms\";\n\nexport type OakBulletListProps = {\n listItems: string[];\n} & OakSpanProps;\n\n/**\n * An inline bulleted list\n */\nexport const OakBulletList = (props: OakBulletListProps) => {\n const { listItems, ...rest } = props;\n return (\n <OakSpan {...rest}>\n {listItems.map((item, i) => {\n return (\n <OakSpan key={i}>\n {i !== 0 && <OakSpan> • </OakSpan>}\n <OakSpan>{item}</OakSpan>\n </OakSpan>\n );\n })}\n </OakSpan>\n );\n};\n","import React from \"react\";\n\nimport {\n OakFlex,\n OakHeading,\n OakHeadingTag,\n OakIcon,\n OakIconName,\n} from \"@/components/atoms\";\nimport { OakHandDrawnCard } from \"@/components/molecules/OakHandDrawnCard\";\n\nexport type OakInfoCardProps = {\n children: React.ReactNode;\n};\n\nexport type OakCardHeaderprops = {\n iconName: OakIconName;\n tag: OakHeadingTag;\n children: string;\n};\n\nexport const OakCardHeader = (props: OakCardHeaderprops) => {\n const { iconName, tag, children } = props;\n\n return (\n <OakFlex $alignItems={\"center\"} $gap={\"space-between-ssx\"}>\n <OakIcon iconName={iconName} />\n <OakHeading $font={\"heading-6\"} tag={tag}>\n {children}\n </OakHeading>\n </OakFlex>\n );\n};\n\n/**\n *\n * OakLessonInfoCards are created using the custom card either oakLessoninfoCard or oakStaticMessageCard and the content is added as children. And use the oakCardHeader to create the header of the card.\n *\n */\nexport const OakLessonInfoCard = (props: OakInfoCardProps) => {\n const { children, ...rest } = props;\n\n return (\n <OakFlex\n $borderRadius={\"border-radius-l\"}\n $pa={\"inner-padding-xl\"}\n $flexDirection={\"column\"}\n $gap={\"space-between-s\"}\n $background={\"white\"}\n {...rest}\n >\n {children}\n </OakFlex>\n );\n};\n\nexport const OakStaticMessageCard = (props: OakInfoCardProps) => {\n const { children, ...rest } = props;\n\n return (\n <OakHandDrawnCard\n {...rest}\n fill={[\n \"bg-decorative2-very-subdued\",\n \"bg-decorative2-subdued\",\n \"bg-decorative2-subdued\",\n ]}\n >\n <OakFlex\n $pa={\"inner-padding-none\"}\n $flexDirection={\"column\"}\n $gap={\"space-between-s\"}\n >\n {children}\n </OakFlex>\n </OakHandDrawnCard>\n );\n};\n","import React, { useRef } from \"react\";\n\nimport {\n BaseCheckBoxProps,\n InternalCheckBoxHoverFocus,\n} from \"@/components/atoms/InternalCheckBox/InternalCheckBox\";\nimport {\n InternalCheckBoxLabel,\n InternalCheckBoxLabelProps,\n} from \"@/components/atoms/InternalCheckBoxLabel\";\nimport { InternalCheckBoxWrapper } from \"@/components/atoms/InternalCheckBoxWrapper\";\nimport {\n OakAllSpacingToken,\n OakBorderRadiusToken,\n OakBorderWidthToken,\n OakCombinedColorToken,\n OakInnerPaddingToken,\n} from \"@/styles\";\n\nexport type OakCheckBoxProps = BaseCheckBoxProps & {\n checkboxSize?: OakAllSpacingToken;\n checkboxBorder?: OakBorderWidthToken;\n checkboxBorderRadius?: OakBorderRadiusToken;\n checkedIcon?: React.JSX.Element;\n checkedBackgroundFill?: boolean;\n hoverBorderRadius?: OakBorderRadiusToken;\n iconPadding?: OakInnerPaddingToken;\n defaultColor?: OakCombinedColorToken;\n disabledColor?: OakCombinedColorToken;\n displayValue?: string;\n} & InternalCheckBoxLabelProps;\n\n/**\n *\n * Default checkbox which can be extended to create specialised checkboxes.\n * - if provided, displayValue is used to display a different value to the value prop.\n *\n *\n * ## Events\n * The following callbacks are available for tracking focus events:\n *\n * ### onChange\n * onChange?: (event: React.ChangeEvent<HTMLInputElement>) => void;\n *\n * ### onFocus\n * onFocus?: (event: React.FocusEvent<HTMLInputElement>) => void;\n *\n * ### onBlur\n * onBlur?: (event: React.FocusEvent<HTMLInputElement>) => void;\n *\n * ### onHovered\n * `onHovered?: (id, value, duration: number) => void;`<br>\n * called after a mouseEnter and mouseLeave event has happened\n *\n *\n */\nexport const OakCheckBox = (props: OakCheckBoxProps) => {\n const {\n id,\n value,\n displayValue = value,\n disabled = false,\n defaultChecked,\n checked,\n onChange,\n onFocus,\n onBlur,\n onHovered,\n iconPadding = \"inner-padding-none\",\n hoverBorderRadius = \"border-radius-xs\",\n checkboxSize = \"all-spacing-6\",\n checkboxBorder = \"border-solid-m\",\n checkboxBorderRadius = \"border-radius-xs\",\n defaultColor = \"text-primary\",\n disabledColor = \"text-disabled\",\n labelGap = \"space-between-s\",\n labelAlignItems = \"center\",\n checkedBackgroundFill = true,\n checkedIcon,\n } = props;\n\n const hoverStart = useRef(Date.now());\n\n const handleMouseEnter = () => {\n hoverStart.current = Date.now();\n };\n\n const handleMouseLeave = () => {\n const delta = Date.now() - hoverStart.current;\n if (onHovered) {\n onHovered(value, id, delta);\n }\n };\n\n const currentColor = disabled ? disabledColor : defaultColor;\n\n return (\n <InternalCheckBoxLabel\n htmlFor={id}\n labelGap={labelGap}\n labelAlignItems={labelAlignItems}\n $color={currentColor}\n disabled={disabled}\n onMouseEnter={handleMouseEnter}\n onMouseLeave={handleMouseLeave}\n data-testid={props[\"data-testid\"]}\n >\n <InternalCheckBoxWrapper\n size={checkboxSize}\n internalCheckbox={\n <InternalCheckBoxHoverFocus\n id={id}\n value={value}\n $width={checkboxSize}\n $height={checkboxSize}\n $ba={checkboxBorder}\n $borderRadius={checkboxBorderRadius}\n $borderColor={currentColor}\n $checkedBackground={checkedBackgroundFill ? currentColor : null}\n $hoverBorderRadius={hoverBorderRadius}\n onChange={onChange}\n onFocus={onFocus}\n onBlur={onBlur}\n defaultChecked={defaultChecked}\n checked={checked}\n disabled={disabled}\n />\n }\n checkedIcon={checkedIcon}\n iconPadding={iconPadding}\n />\n {displayValue}\n </InternalCheckBoxLabel>\n );\n};\n","import React from \"react\";\n\nimport { OakBox, OakFlex, OakSpan } from \"@/components/atoms\";\nimport {\n OakPrimaryButton,\n OakSecondaryButton,\n OakSecondaryLink,\n OakTertiaryButton,\n} from \"@/components/molecules\";\nimport { OakAllSpacingToken } from \"@/styles\";\nimport { ResponsiveValues } from \"@/styles/utils/responsiveStyle\";\n\nexport type OakCookieBannerProps = {\n /**\n * Triggered when the user clicks the \"Hide this message\" button.\n */\n onHide(): void;\n /**\n * Triggered when the user clicks the \"Accept all cookies\" button.\n */\n onAccept(): void;\n /**\n * Triggered when the user clicks the \"Reject non-essential cookies\" button.\n */\n onReject(): void;\n /**\n * Triggered when the user clicks the \"Cookie settings\" button.\n */\n onOpenSettings(): void;\n /**\n * The banner is intended to span the full width of the viewport.\n * this prop will set the maximum width of the inner content so that\n * it can line up with the rest of the content on the page.\n **/\n innerMaxWidth?: ResponsiveValues<OakAllSpacingToken>;\n /**\n * The current state of the cookie banner.\n *\n * - `initial` - The user has not made any choices.\n * - `accepted` - The user has accepted all cookies.\n * - `rejected` - The user has rejected non-essential cookies.\n */\n state: \"accepted\" | \"rejected\" | \"initial\";\n /**\n * Whether the banner should be fixed to the bottom of the viewport.\n *\n * @default false\n */\n isFixed?: boolean;\n};\n\n/**\n * A banner presenting the user with options to accept or reject cookies.\n */\nexport const OakCookieBanner = ({\n state,\n innerMaxWidth,\n onOpenSettings,\n onHide,\n onAccept,\n onReject,\n isFixed = false,\n}: OakCookieBannerProps) => {\n return (\n <OakBox\n $background=\"bg-neutral\"\n $bt=\"border-solid-s\"\n $borderColor=\"border-neutral\"\n $position={isFixed ? \"fixed\" : undefined}\n $bottom={isFixed ? \"all-spacing-0\" : undefined}\n $right={isFixed ? \"all-spacing-0\" : undefined}\n $left={isFixed ? \"all-spacing-0\" : undefined}\n $zIndex={isFixed ? \"in-front\" : undefined}\n data-testid=\"cookie-banner\"\n >\n <OakBox $maxWidth={innerMaxWidth} $mh=\"auto\">\n <OakFlex\n $alignItems={[\"flex-start\", \"flex-start\", \"center\"]}\n $flexDirection={[\"column\", \"column\", \"row\"]}\n $mh={[\"space-between-s\", \"space-between-m\", \"space-between-xl\"]}\n $pv=\"inner-padding-xl\"\n $gap={[\"space-between-m\", \"space-between-m\", \"space-between-m2\"]}\n >\n {(() => {\n switch (state) {\n case \"accepted\":\n case \"rejected\":\n return (\n <>\n <OakBox $font={[\"body-3\", \"body-2\", \"heading-light-7\"]}>\n You've{\" \"}\n <OakSpan\n as=\"strong\"\n $font={[\"body-3-bold\", \"body-2-bold\", \"heading-7\"]}\n >\n {state}\n </OakSpan>{\" \"}\n additional cookies. You can{\" \"}\n <OakSecondaryLink\n element=\"button\"\n onClick={onOpenSettings}\n >\n change your cookie settings\n </OakSecondaryLink>{\" \"}\n at any time.\n </OakBox>\n <OakFlex $justifyContent=\"flex-end\" $flexGrow={1}>\n <OakSecondaryButton onClick={onHide}>\n Hide this message\n </OakSecondaryButton>\n </OakFlex>\n </>\n );\n default:\n return (\n <>\n <OakBox $font={[\"body-3\", \"body-2\"]}>\n <OakSpan\n as=\"strong\"\n $font={[\"body-3-bold\", \"body-2-bold\"]}\n >\n This site uses cookies to store information on your\n computer.\n </OakSpan>{\" \"}\n Some of these cookies are essential, while others help us\n to improve your experience by providing insights into how\n the site is being used.\n </OakBox>\n <OakFlex\n $gap={[\"space-between-xs\", \"space-between-m2\"]}\n $justifyContent=\"flex-end\"\n $flexDirection={[\"column\", \"row\"]}\n $flexWrap={[\"wrap\", \"wrap\", \"nowrap\"]}\n $flexGrow={1}\n >\n <OakTertiaryButton onClick={onReject}>\n Reject non-essential cookies\n </OakTertiaryButton>\n <OakSecondaryButton onClick={onOpenSettings}>\n Cookie settings\n </OakSecondaryButton>\n <OakPrimaryButton onClick={onAccept}>\n Accept all cookies\n </OakPrimaryButton>\n </OakFlex>\n </>\n );\n }\n })()}\n </OakFlex>\n </OakBox>\n </OakBox>\n );\n};\n","import React, { ComponentPropsWithoutRef } from \"react\";\n\nimport { OakDraggable } from \"@/components/molecules/OakDraggable\";\n\ntype OakDraggableFeedbackProps = ComponentPropsWithoutRef<\n typeof OakDraggable\n> & {\n /**\n * Alters the appearance of the element to indicate whether or not it is in a correct state\n */\n feedback: \"correct\" | \"incorrect\";\n};\n\n/**\n * A draggable element that visually indicates whether or not its state is correct or not\n */\nexport const OakDraggableFeedback = ({\n feedback,\n ...props\n}: OakDraggableFeedbackProps) => {\n return (\n <OakDraggable\n {...props}\n iconName={feedback === \"correct\" ? \"tick\" : \"cross\"}\n iconColor={feedback === \"correct\" ? \"icon-success\" : \"icon-error\"}\n iconAlt={feedback === \"correct\" ? \"correct\" : \"incorrect\"}\n $ba=\"border-solid-xl\"\n $borderColor={feedback === \"correct\" ? \"border-success\" : \"border-error\"}\n $background={feedback === \"correct\" ? \"bg-correct\" : \"bg-incorrect\"}\n isReadOnly\n />\n );\n};\n","import React from \"react\";\n\nimport { OakFlex } from \"@/components/atoms/OakFlex\";\nimport { OakSpan } from \"@/components/atoms/OakSpan\";\nimport { OakIcon } from \"@/components/atoms/OakIcon\";\n\nexport type OakFieldErrorProps = {\n children?: React.ReactNode;\n};\n\n/**\n *\n * OakFieldError renders a error message when passed children.\n *\n */\nexport const OakFieldError = (props: OakFieldErrorProps) => {\n const { children } = props;\n if (!children) {\n /**\n * Return early to avoid unwanted whitespace when there's no error\n */\n return null;\n }\n return (\n <OakFlex $alignItems={\"center\"} $flexDirection={\"row\"}>\n <OakFlex $alignSelf={\"flex-start\"} $mr={\"space-between-s\"}>\n <OakIcon iconName=\"content-guidance\" $colorFilter={\"red\"} />\n </OakFlex>\n <OakSpan $color=\"red\">{children}</OakSpan>\n </OakFlex>\n );\n};\n","import React, { ReactNode, useState } from \"react\";\n\nimport { OakBox, OakFlex } from \"@/components/atoms\";\nimport {\n OakCollapsibleContent,\n OakTertiaryButton,\n} from \"@/components/molecules\";\n\ntype OakLessonVideoTranscriptProps = {\n /**\n * The transcript content\n */\n children: ReactNode;\n /**\n * The id of the collapsible content element. This is used to link the button to the content\n */\n id: string;\n /**\n * A control to toggle the video to display sign language\n */\n signLanguageControl?: ReactNode;\n};\n\n/**\n * Display a togglable video transcript with a slot to display a sign language control\n */\nexport const OakLessonVideoTranscript = ({\n children,\n id,\n signLanguageControl = null,\n}: OakLessonVideoTranscriptProps) => {\n const [showTranscript, setShowTranscript] = useState(false);\n\n return (\n <>\n <OakFlex\n $flexDirection={[\"column-reverse\", \"row\"]}\n $justifyContent=\"space-between\"\n >\n <OakBox>\n {children && (\n <OakTertiaryButton\n onClick={() => setShowTranscript(!showTranscript)}\n iconName={showTranscript ? \"chevron-up\" : \"chevron-down\"}\n isTrailingIcon\n aria-controls={id}\n aria-expanded={showTranscript}\n $mb=\"space-between-m\"\n >\n {showTranscript ? \"Hide transcript\" : \"Show transcript\"}\n </OakTertiaryButton>\n )}\n </OakBox>\n {signLanguageControl && (\n <OakBox $mb=\"space-between-m\">{signLanguageControl}</OakBox>\n )}\n </OakFlex>\n {children && (\n <OakCollapsibleContent\n id={id}\n $maxHeight=\"all-spacing-23\"\n isOpen={showTranscript}\n $font=\"body-1\"\n $color=\"text-primary\"\n >\n {children}\n </OakCollapsibleContent>\n )}\n </>\n );\n};\n","import React, { ReactNode } from \"react\";\n\nimport { OakBox } from \"@/components/atoms\";\n\nexport type OakModalBodyProps = {\n children: ReactNode;\n};\n\n/**\n * Intended to be used in the `children` slot of `OakModal`\n * it applies some padding and margin to ensure that the contents\n * line up with the modal's header and footer\n */\nexport const OakModalBody = (props: OakModalBodyProps) => {\n return (\n <OakBox $mv=\"space-between-m\" $ph=\"inner-padding-m\">\n {props.children}\n </OakBox>\n );\n};\n","import React, { ReactNode } from \"react\";\n\nimport { OakFlex } from \"@/components/atoms\";\n\nexport type OakModalFooterProps = {\n children: ReactNode;\n};\n\n/**\n * Intended to be used in the `footer` slot of `OakModal`\n * it is ideal as a container for one or more buttons.\n * It switches from a horizontal to vertical layout on smaller screens\n */\nexport const OakModalFooter = (props: OakModalFooterProps) => {\n return (\n <OakFlex\n {...props}\n $flexDirection={[\"column\", \"row\"]}\n $bt=\"border-solid-s\"\n $borderColor=\"border-neutral-lighter\"\n $pa=\"inner-padding-xl\"\n $gap={[\"space-between-s\", \"space-between-m\"]}\n $width=\"100%\"\n />\n );\n};\n","import React from \"react\";\n\nimport { OakFlex } from \"@/components/atoms/OakFlex\";\nimport { OakLI } from \"@/components/atoms\";\nimport {\n OakPrimaryNavItem,\n OakPrimaryNavItemProps,\n} from \"@/components/organisms/OakPrimaryNavItem\";\n\nexport type OakPrimaryNavProps = {\n ariaLabel?: string;\n navItems: OakPrimaryNavItemProps[];\n};\n\n/**\n * A row of buttons for navigating between different sections\n */\nexport const OakPrimaryNav = ({ ariaLabel, navItems }: OakPrimaryNavProps) => {\n return (\n <nav aria-label={ariaLabel}>\n <OakFlex\n as={\"ul\"}\n $flexDirection={[\"row\"]}\n $gap={\"space-between-m\"}\n $mh={\"space-between-none\"}\n $mv={\"space-between-none\"}\n $ph={\"inner-padding-none\"}\n >\n {navItems.map(\n (\n { href, isCurrent, children }: OakPrimaryNavItemProps,\n index: number,\n ) => (\n <OakLI $listStyle={\"none\"} key={index}>\n <OakPrimaryNavItem href={href} isCurrent={isCurrent}>\n {children}\n </OakPrimaryNavItem>\n </OakLI>\n ),\n )}\n </OakFlex>\n </nav>\n );\n};\n","import React from \"react\";\n\nimport { OakTextInput, OakTextInputProps } from \"@/components/molecules\";\n\ntype OakQuizTextInputProps = Omit<\n OakTextInputProps,\n \"validity\" | \"iconName\" | \"iconAlt\" | \"isTrailingIcon\"\n> & {\n /**\n * Alters the appearance of the input to indicate whether or not a correct answer was given.\n * Also sets the input to read-only.\n */\n feedback?: \"correct\" | \"incorrect\" | null;\n};\n\n/**\n * A text input for a free-text question in a quiz\n */\nexport const OakQuizTextInput = ({\n feedback,\n readOnly,\n ...props\n}: OakQuizTextInputProps) => {\n let validity: OakTextInputProps[\"validity\"];\n let iconName: OakTextInputProps[\"iconName\"];\n let iconAlt: OakTextInputProps[\"iconAlt\"] = undefined;\n\n switch (feedback) {\n case \"correct\":\n validity = \"valid\";\n iconName = \"tick\";\n iconAlt = \"Correct\";\n break;\n case \"incorrect\":\n validity = \"invalid\";\n iconName = \"cross\";\n iconAlt = \"Incorrect\";\n break;\n }\n\n return (\n <OakTextInput\n {...props}\n validity={validity}\n iconName={iconName}\n iconAlt={iconAlt}\n readOnly={readOnly || !!feedback}\n isTrailingIcon\n />\n );\n};\n","import React from \"react\";\n\nimport {\n OakHandDrawnBoxWithIconProps,\n OakHandDrawnCardWithIcon,\n OakPromoTag,\n} from \"@/components/molecules\";\nimport { OakBox } from \"@/components/atoms\";\n\nexport type OakSubjectIconProps = Pick<\n OakHandDrawnBoxWithIconProps,\n \"iconName\" | \"fill\" | \"iconColor\" | \"alt\"\n> & {\n iconName: `subject-${string}`;\n showPromoTag?: boolean;\n};\n\n/**\n * A large illuminated hand-drawn box with a subject icon in the center\n *\n * Accepts an optional `showPromoTag` prop to display a \"New\" tag in the top left corner\n */\nexport const OakSubjectIcon = ({\n showPromoTag,\n ...rest\n}: OakSubjectIconProps) => {\n return (\n <OakBox $width=\"fit-content\" $height=\"fit-content\" $position=\"relative\">\n <OakHandDrawnCardWithIcon {...rest} />\n {showPromoTag && (\n <OakBox\n $position=\"absolute\"\n $top={[\"all-spacing-0\", \"all-spacing-2\"]}\n $left={[\"all-spacing-0\", \"all-spacing-2\"]}\n >\n <OakPromoTag />\n </OakBox>\n )}\n </OakBox>\n );\n};\n","import React from \"react\";\nimport { ThemeProvider } from \"styled-components\";\n\nimport { OakTheme } from \"@/styles\";\n\nexport type OakThemeProviderProps = {\n theme: OakTheme;\n children: React.ReactNode;\n};\n\n/**\n *\n * OakThemeProvider wraps Styled Components ThemeProvider allowing the use of the custom type OakTheme.\n *\n */\nexport const OakThemeProvider = ({\n theme,\n children,\n}: OakThemeProviderProps) => {\n return <ThemeProvider theme={theme}>{children}</ThemeProvider>;\n};\n","import { OakTheme } from \"./theme\";\n\nexport const oakDefaultTheme: OakTheme = {\n name: \"default\",\n uiColors: {\n \"text-primary\": \"black\",\n \"text-subdued\": \"grey60\",\n \"text-error\": \"red\",\n \"text-disabled\": \"grey50\",\n \"text-link-active\": \"navy\",\n \"text-link-hover\": \"navy110\",\n \"text-link-pressed\": \"navy120\",\n \"text-link-visited\": \"navy120\",\n \"text-inverted\": \"white\",\n \"text-success\": \"oakGreen\",\n \"text-warning\": \"amber\",\n \"bg-primary\": \"white\",\n \"bg-neutral\": \"grey20\",\n \"bg-neutral-stronger\": \"grey30\",\n \"bg-btn-primary\": \"black\",\n \"bg-btn-primary-hover\": \"grey60\",\n \"bg-btn-primary-disabled\": \"grey50\",\n \"bg-btn-secondary\": \"white\",\n \"bg-btn-secondary-hover\": \"grey20\",\n \"bg-btn-secondary-disabled\": \"grey30\",\n \"bg-icon\": \"black\",\n \"bg-icon-hover\": \"grey60\",\n \"bg-decorative1-main\": \"mint\",\n \"bg-decorative1-subdued\": \"mint50\",\n \"bg-decorative1-very-subdued\": \"mint30\",\n \"bg-decorative2-main\": \"aqua\",\n \"bg-decorative2-subdued\": \"aqua50\",\n \"bg-decorative2-very-subdued\": \"aqua30\",\n \"bg-decorative3-main\": \"lavender\",\n \"bg-decorative3-subdued\": \"lavender50\",\n \"bg-decorative3-very-subdued\": \"lavender30\",\n \"bg-decorative4-main\": \"pink\",\n \"bg-decorative4-subdued\": \"pink50\",\n \"bg-decorative4-very-subdued\": \"pink30\",\n \"bg-decorative5-main\": \"lemon\",\n \"bg-decorative5-subdued\": \"lemon50\",\n \"bg-decorative5-very-subdued\": \"lemon30\",\n \"bg-correct\": \"mint50\",\n \"bg-incorrect\": \"red30\",\n \"icon-main\": \"white\",\n \"icon-inverted\": \"black\",\n \"icon-disabled\": \"grey50\",\n \"icon-brand\": \"oakGreen\",\n \"icon-success\": \"oakGreen\",\n \"icon-error\": \"red\",\n \"icon-warning\": \"amber\",\n \"border-primary\": \"black\",\n \"border-inverted\": \"white\",\n \"border-neutral\": \"grey50\",\n \"border-neutral-lighter\": \"grey40\",\n \"border-brand\": \"oakGreen\",\n \"border-success\": \"oakGreen\",\n \"border-error\": \"red\",\n \"border-warning\": \"amber\",\n \"border-decorative1\": \"mint\",\n \"border-decorative1-stronger\": \"mint110\",\n \"border-decorative2\": \"aqua\",\n \"border-decorative2-stronger\": \"aqua110\",\n \"border-decorative3\": \"lavender\",\n \"border-decorative3-stronger\": \"lavender110\",\n \"border-decorative4\": \"pink\",\n \"border-decorative4-stronger\": \"pink110\",\n \"border-decorative5\": \"lemon\",\n \"border-decorative5-stronger\": \"lemon110\",\n \"border-decorative6\": \"amber50\",\n \"border-decorative6-stronger\": \"amber\",\n transparent: \"transparent\",\n },\n};\n"],"names":["__assign","Object","assign","t","s","i","n","arguments","length","p","prototype","hasOwnProperty","call","apply","this","__rest","e","indexOf","getOwnPropertySymbols","propertyIsEnumerable","__read","o","m","Symbol","iterator","r","ar","next","done","push","value","error","__spreadArray","to","from","pack","l","Array","slice","concat","__makeTemplateObject","cooked","raw","defineProperty","SuppressedError","oakColorTokens","white","grey10","grey20","grey30","grey40","grey50","grey60","grey70","black","oakGreen","mint","mint30","mint50","mint110","aqua","aqua30","aqua50","aqua110","lavender","lavender30","lavender50","lavender110","pink","pink30","pink50","pink110","lemon","lemon30","lemon50","lemon110","amber","amber30","amber50","red","red30","red50","navy","navy110","navy120","blue","magenta","purple","teal","transparent","oakColorFilterTokens","oakUiRoleTokens","parseColor","includes","_a","c","theme","uiColors","truthy","breakpointsByName","small","large","breakpoints","values","sort","a","b","getBreakpoint","breakpointName","responsiveStyle","attr","getValues","parse","x","props","attrCss","undefined","css","templateObject_1","isArray","templateObject_3","map","breakpoint","templateObject_4","filter","templateObject_2","colorStyle","$color","$background","BASE_FONT_SIZE_PX","REM_DP","pxToRem","px","Number","toFixed","oakAllSpacingTokens","oakInnerPaddingTokens","oakSpaceBetweenTokens","parseSpacing","v","positionStyle","$position","$top","$right","$bottom","$left","$inset","$overflow","$overflowX","$overflowY","$objectFit","$pointerEvents","$visibility","sizeStyle","$width","$minWidth","$maxWidth","$height","$minHeight","$maxHeight","$aspectRatio","$boxSizing","paddingAll","$pa","paddingHorizontal","$ph","paddingVertical","$pv","paddingLeft","$pl","paddingRight","templateObject_5","$pr","paddingTop","templateObject_6","$pt","paddingBottom","templateObject_7","$pb","marginAll","templateObject_8","$ma","marginHorizontal","templateObject_9","$mh","marginVertical","templateObject_10","$mv","marginLeft","templateObject_11","$ml","marginRight","templateObject_12","$mr","marginTop","templateObject_13","$mt","marginBottom","templateObject_14","$mb","marginStyle","paddingStyle","spacingStyle","oakBorderWidthTokens","oakBorderRadiusTokens","parseBorder","parseBorderRadius","borderAll","$ba","borderTop","$bt","borderRight","$br","borderBottom","$bb","borderLeft","$bl","borderHorizontal","$bh","borderVertical","$bv","borderColor","$borderColor","borderRadius","$borderRadius","borderRadiusTopLeft","$btlr","borderRadiusTopRight","$btrr","borderRadiusBottomLeft","$bblr","borderRadiusBottomRight","$bbrr","borderRadiusTop","$btr","borderRadiusBottom","templateObject_15","$bbr","borderStrokeStyle","templateObject_16","$borderStyle","borderStyle","templateObject_17","displayStyle","$display","oakDropShadowTokens","parseDropShadow","variant","dropShadowStyle","$dropShadow","oakOpacityTokens","opaque","parseOpacity","opacityStyle","$opacity","transformStyle","$transform","$transformOrigin","oakTransitionTokens","transitionStyle","$transition","oakFontSizeTokens","oakFontTokens","typographyStyle","$font","font","fontSize","lineHeight","$textAlign","$textDecoration","$whiteSpace","$wordWrap","$textOverflow","oakZIndexTokens","behind","neutral","zIndexStyle","$zIndex","oakBoxCss","onClick","OakBox","styled","div","flexStyle","$flexDirection","$flexWrap","$alignItems","$alignContent","$justifyContent","$alignSelf","$order","$flexGrow","$flexShrink","$flexBasis","$gap","$columnGap","$rowGap","OakFlex","default","OakSpan","span","OakForm","form","parseColorFilter","colorFilterStyle","$colorFilter","clickStyles","placeholderStyles","$showOakPlaceholder","StyledFillImage","Image","StyledResponsiveImage","OakImage","as","src","alt","width","height","sizes","_b","_c","_d","placeholder","unoptimized","imageProps","onLoad","onError","rest","finalPlaceholder","_e","useState","showPlaceholder","setShowPlaceholder","setImg","useCallback","img","complete","handleComplete","originalHandler","event","useShowPlaceholder","React","createElement","ref","fill","OakTypography","HeadingTagComponent","tag","ariaLabel","ariaHidden","otherProps","Tag","OakHeading","OakP","OakUL","ul","$reset","OakOL","ol","listStyle","$listStyle","OakLI","li","defaultProps","OakLabel","label","icons","home","send","rocket","edit","hamburger","cross","bell","twitter","worksheet","facebook","share","save","linkedin","books","external","download","search","go","copyright","project","tick","instagram","dot","warning","lightbulb","quiz","video","intro","oakIconNames","keys","OakIcon","iconName","process","env","NEXT_PUBLIC_OAK_ASSETS_HOST","NEXT_PUBLIC_OAK_ASSETS_PATH","gridStyle","$rg","$cg","$gridAutoRows","$gridTemplateAreas","$gridTemplateColumns","$gridTemplateRows","OakGrid","combineSpanStart","start","parseSpanStart","split","span_1","gridArea","$colSpan","index","$colStart","$rowSpan","$rowStart","$colEnd","OakGridArea","OakMaxWidth","getCloudinaryIdFromUrl","config","toString","replace","canaryUrl","URL","getCldImageUrl","origin","getCloudinaryRootUrl","cloudinaryConfigContext","createContext","OakCloudinaryConfigProvider","Provider","OakKbd","children","resetGlobalCss","oakGlobalCss","OakGlobalStyle","createGlobalStyle","screenReaderStyle","OakScreenReader","SpinnerKeyframe","keyframes","StyledLoadingSpinner","loaderColor","OakLoadingSpinner","internalButtonCss","InternalButton","onHovered","Component","hoverStart","useRef","Date","now","onMouseEnter","current","onMouseLeave","delta","StyledInternalButton","$hoverTextColor","$hoverBackground","$hoverBorderColor","$defaultBackground","$defaultBorderColor","$defaultTextColor","$disabledBackground","$disabledBorderColor","$disabledTextColor","StyledButtonWrapper","$hoverShadow","InternalShadowRectButton","element","isTrailingIcon","isLoading","disabled","maxWidth","defaultBackground","defaultBorderColor","defaultTextColor","disabledTextColor","hoverTextColor","hoverBackground","hoverBorderColor","disabledBackground","disabledBorderColor","className","hoverShadow","icon","Fragment","loader","iconLogic","OakPrimaryButton","OakPrimaryInvertedButton","OakSecondaryButton","$hoverIconColor","$disabledIconBackground","$hoverIconBackground","$defaultIconBackground","InternalShadowRoundButton","iconBackgroundSize","iconSize","disabledIconBackground","hoverIconColor","defaultIconColor","hoverIconBackground","defaultIconBackground","disabledIconColor","OakTertiaryButton","RadioContext","currentValue","name","RadioButtonLabel","$labelGap","$labelAlignItems","HiddenRadioButtonInput","input","attrs","type","VisibleRadioButtonInput","$disableFocusRing","$radioInnerSize","DisabledVisibleRadioButtonInput","OakRadioButton","forwardRef","radioContext","useContext","onValueUpdated","id","tabIndex","dataTestId","disableFocusRing","radioInnerSize","_f","radioOuterSize","_g","radioBorderWidth","_h","radioBackground","_j","checkedRadioBorderWidth","checked","anyDisabled","finalRadioBorderWidth","htmlFor","onChange","BaseCheckBox","InternalCheckBox","$checkedBackground","InternalCheckBoxHover","$hoverBorderRadius","focusStyle","InternalCheckBoxHoverFocus","InternalCheckBoxLabel","labelGap","labelAlignItems","InternalCheckBoxLabelHoverDecor","StyledIconContainer","InternalCheckBoxWrapper","size","iconPadding","internalCheckbox","checkedIcon","StyledInput","InternalTextInput","onInitialFocus","onFocus","hadInitialFocused","StyledTextInputWrapper","$focusRingDropShadows","dropShadow","join","$readOnly","$readOnlyBorderColor","$readOnlyColor","$disabled","$disabledBackgroundColor","$disabledColor","OakTextInput","readOnlyBorderColor","focusRingDropShadows","background","disabledBackgroundColor","highlightBackgroundColor","_k","color","_l","disabledColor","_m","readOnlyColor","validity","_o","iconColor","_p","validBorderColor","_q","invalidBorderColor","_r","validIconColor","_s","invalidIconColor","iconAlt","_t","_u","isHighlighted","wrapperWidth","wrapperMaxWidth","finalBackgroundColor","finalBorderColor","finalIconColor","finalReadOnlyBorderColor","readOnly","currentTarget","querySelector","focus","OakRoundIcon","StyledFlex","ARROW_SIZE","StyledSvg","svg","$tooltipPosition","$fill","InternalTooltip","tooltipPosition","role","d","OakTooltip","tooltip","isOpen","domContainer","document","body","targetElement","setTargetElement","isIntersecting","setIsIntersecting","isVisible","overlayStyle","setOverlayStyle","borderRadiusProps","useLayoutEffect","ticking","updateOverlayStyle","requestAnimationFrame","rect","getBoundingClientRect","top","left","intersection","IntersectionObserver","entries","every","entry","observe","resize","ResizeObserver","window","addEventListener","disconnect","removeEventListener","createPortal","style","getTooltipPositionProps","domElement","firstElementChild","display","StyledBackLink","InternalCard","StyledBackgroundBox","InternalCardWithBackgroundElement","backgroundElement","parseBorderWidth","InternalStyledSvg","$stroke","$strokeWidth","OakHandDrawnCard","stroke","strokeWidth","xmlns","viewBox","preserveAspectRatio","vectorEffect","OakHandDrawnCardWithIcon","iconWidth","iconHeight","StyledPromoTag","OakPromoTag","StyledScrollBox","OakCollapsibleContent","StyledOakIcon","StyledLink","$visitedColor","$hoverColor","$activeColor","InternalLink","visitedColor","hoverColor","activeColor","OakLink","OakSecondaryLink","StyledLeadingTrim","OakDragAndDropInstructions","StyledDraggable","$iconColor","OakDraggable","isDragging","isDisabled","isReadOnly","OakDroppable","labelSlot","isOver","slotBackground","StyledOakFlex","zeroRightClassName","fullWidthClassName","assignRef","currentValues","WeakMap","useMergeRefs","refs","defaultValue","initialValue","callback","callbackRef","newValue","forEach","facade","last","oldValue","get","prevRefs_1","Set","nextRefs_1","current_1","has","set","ItoI","innerCreateMedium","defaults","middleware","buffer","assigned","read","Error","useMedium","data","item","assignSyncMedium","cb","cbs","assignMedium","pendingQueue","executeQueue","cycle","Promise","resolve","then","createMedium","createSidecarMedium","options","medium","async","ssr","SideCar","sideCar","Target","exportSidecar","exported","isSideCarExport","effectCar","nothing","RemoveScroll","parentRef","onScrollCapture","onWheelCapture","onTouchMoveCapture","callbacks","setCallbacks","forwardProps","removeScrollBar","enabled","shards","noIsolation","inert","allowPinchZoom","Container","gapMode","containerRef","containerProps","lockRef","cloneElement","Children","only","_extends","bind","target","source","key","classNames","fullWidth","zeroRight","ReactPropTypesSecret_1","NODE_ENV","reactIsModule","exports","for","f","g","h","k","q","w","y","z","u","$$typeof","A","reactIs_production_min","AsyncMode","ConcurrentMode","ContextProvider","Element","ForwardRef","Memo","Portal","Profiler","StrictMode","Suspense","isAsyncMode","isConcurrentMode","isContextConsumer","isContextProvider","isElement","isForwardRef","isFragment","isLazy","isMemo","isProfiler","isStrictMode","isSuspense","isValidElementType","typeOf","require$$1","hasSymbol","REACT_ELEMENT_TYPE","REACT_PORTAL_TYPE","REACT_FRAGMENT_TYPE","REACT_STRICT_MODE_TYPE","REACT_PROFILER_TYPE","REACT_PROVIDER_TYPE","REACT_CONTEXT_TYPE","REACT_ASYNC_MODE_TYPE","REACT_CONCURRENT_MODE_TYPE","REACT_FORWARD_REF_TYPE","REACT_SUSPENSE_TYPE","REACT_SUSPENSE_LIST_TYPE","REACT_MEMO_TYPE","REACT_LAZY_TYPE","REACT_BLOCK_TYPE","REACT_FUNDAMENTAL_TYPE","REACT_RESPONDER_TYPE","REACT_SCOPE_TYPE","object","$$typeofType","ContextConsumer","Lazy","hasWarnedAboutDeprecatedIsAsyncMode","reactIs_development","console","isPortal","propIsEnumerable","objectAssign","test1","String","getOwnPropertyNames","test2","fromCharCode","test3","letter","err","shouldUseNative","symbols","val","TypeError","toObject","Function","ReactIs","propTypesModule","require$$0","ReactPropTypesSecret","require$$2","require$$3","checkPropTypes","printWarning","loggedTypeFailures","text","message","typeSpecs","location","componentName","getStack","typeSpecName","ex","stack","resetWarningCache","checkPropTypes_1","require$$4","emptyFunctionThatReturnsNull","factoryWithTypeCheckers","isValidElement","throwOnDirectAccess","ITERATOR_SYMBOL","FAUX_ITERATOR_SYMBOL","ANONYMOUS","ReactPropTypes","array","createPrimitiveTypeChecker","bigint","bool","func","number","string","symbol","any","createChainableTypeChecker","arrayOf","typeChecker","propName","propFullName","PropTypeError","propValue","getPropType","elementType","instanceOf","expectedClass","expectedClassName","constructor","node","isNode","objectOf","propType","oneOf","expectedValues","is","valuesString","JSON","stringify","getPreciseType","oneOfType","arrayOfTypeCheckers","checker","getPostfixForTypeWarning","expectedTypes","checkerResult","expectedType","shape","shapeTypes","invalidValidatorError","exact","allKeys","validate","manualPropTypeCallCache","manualPropTypeWarningCount","checkType","isRequired","secret","cacheKey","chainedCheckType","iteratorFn","maybeIterable","getIteratorFn","step","RegExp","isSymbol","PropTypes","emptyFunction","emptyFunctionWithReset","factoryWithThrowingShims","shim","getShim","FOCUS_GROUP","FOCUS_DISABLED","hiddenGuard","padding","overflow","position","mediumFocus","_ref","mediumBlur","mediumEffect","mediumSidecar","focusScope","emptyArray","FocusLock","_extends2","_React$useState","realObserved","setObserved","observed","isActive","originalFocusedElement","update","_props$disabled","_props$noFocusGuards","noFocusGuards","_props$persistentFocu","persistentFocus","_props$crossFrame","crossFrame","_props$autoFocus","autoFocus","allowTextSelection","group","whiteList","hasPositiveIndices","_props$shards","_props$as","_props$lockProps","lockProps","_props$returnFocus","returnFocus","shouldReturnFocus","focusOptions","onActivationCallback","onActivation","onDeactivationCallback","onDeactivation","captureFocusRestore","_document","activeElement","allowDefer","focusRestore","returnFocusTo","howToReturnFocus","returnFocusOptions","onBlur","setObserveNode","newObserved","warn","useEffect","constants.FOCUS_DISABLED","constants.FOCUS_GROUP","hasLeadingGuards","hasTailingGuards","mergedRef","focusScopeValue","useMemo","active","propTypes","FocusLockUI","deferAction","action","setTimeout","extractRef","focusHiddenMarker","PREVENT_SCROLL","preventScroll","FocusOn","setLockProps","scrollLock","focusLock","shouldIgnore","preventScrollOnFocus","restProps","appliedLockProps","ReactFocusLock","_setPrototypeOf","setPrototypeOf","__proto__","_inheritsLoose","subClass","superClass","create","_typeof","_toPropertyKey","arg","hint","prim","toPrimitive","res","toArray","ret","asArray","getFirst","getParentNode","parentNode","nodeType","Node","DOCUMENT_FRAGMENT_NODE","host","isTopNode","DOCUMENT_NODE","isVisibleUncached","checkParent","ELEMENT_NODE","computedStyle","getComputedStyle","getPropertyValue","isElementHidden","hasAttribute","isInert","isVisibleCached","visibilityCache","cached","result","isAutoFocusAllowedCached","cache","isAutoFocusAllowed","isAutoFocusAllowedUncached","getDataset","dataset","isHTMLInputElement","tagName","isRadioElement","attribute","getAttribute","isGuard","Boolean","focusGuard","isNotAGuard","isDefined","tabSort","aTab","Math","max","bTab","tabDiff","indexDiff","orderByTabIndex","nodes","filterNegative","keepGuards","getTabIndex","queryTabbables","queryGuardTabbables","getFocusablesWithShadowDom","parent","withGuards","shadowRoot","reduce","acc","child","matches","getFocusables","parents","focusableWithShadowDom","focusableWithIframes","HTMLIFrameElement","contentDocument","getFocusablesWithIFrame","querySelectorAll","filterFocusable","isHTMLButtonElement","notHiddenInput","filterAutoFocusable","Map","getTabbableNodes","topNodes","getFocusableNodes","parentAutofocusables","topNode","parentFocus","contains","scope","getPrototypeOf","some","iframeBody","getTopParent","getAllAffectedNodes","currentNode","contained","j","compareDocumentPosition","DOCUMENT_POSITION_CONTAINED_BY","add","DOCUMENT_POSITION_CONTAINS","_","filterNested","getActiveElement","inDocument","safeProbe","contentWindow","focusInside","ownerDocument","frame","focusInFrame","focusInsideIframe","correctNode","el","findSelectedRadio","pickFirstFocus","pickFocusable","NEW_FOCUS","newFocus","innerNodes","innerTabbables","outerNodes","lastNode","cnt","firstFocus","lastFocus","isOnGuard","activeIndex","lastIndex","lastNodeInside","resultSet","firstNodeIndex","lastNodeIndex","correctedNodes","correctedIndexDiff","returnFirstNode","returnLastNode","abs","pickAutofocus","nodesIndexes","orderedNodes","groups","autoFocusables","autoFocusable","autofocus","getParents","getCommonParent","nodeA","nodeB","parentsA","parentsB","currentParent","getTopCommonParent","baseActiveElement","leftEntry","rightEntries","activeElements","leftEntries","topCommon","subEntry","common","allParentAutofocusables","focusSolver","commonParent","anyFocusable","innerElements","srcNodes","dstNodes","remap","orderedInnerElements","entity","innerFocusables","innerTabbable","newId","focusNode","focusOn","guardCount","lockDisabled","moveFocusInside","focusable","weakRef","WeakRef","deref","moveFocus","fromElement","newOptions","onlyTabbable","defaultOptions","solution","useTabbables","shard","focusables","findIndex","prev","first","getRelativeFocusable","pickBoundary","what","isFreeFocus","focusIsHidden","lastActiveTrap","lastActiveFocus","lastPortaledElement","focusWasOutsideWindow","defaultWhitelist","autoGuard","startIndex","end","allNodes","lastGuard","guard","focusAutoGuard","lockItem","checkInHost","check","boundary","activateTrap","_lastActiveTrap","workingNode","portaledElement","workingArea","focusWhitelisted","area","withinHost","blur","newActiveElement","focusedIndex","_ref2","_ref3","removeAttribute","onTrap","stopPropagation","preventDefault","onWindowBlur","focusLockAPI","focusNextElement","focusPrevElement","focusFirstElement","focusLastElement","currentElement","parentElement","previousElementSibling","right","nextElementSibling","recordElementLocation","_i","stack_1","line","parent_1","savedCurrent","aim","focusables_1","restoreFocusTo","observerNode","FocusTrap","reducePropsToState","handleStateChangeOnClient","WrappedComponent","state","mountedInstances","emitChange","instance","SideEffect","_PureComponent","peek","_proto","componentDidMount","componentDidUpdate","componentWillUnmount","splice","render","PureComponent","obj","toPropertyKey","enumerable","configurable","writable","_defineProperty","displayName","getDisplayName","withSideEffect","propsList","_ref5","traps","trap","lastTrap","sameTrap","_ref6","makeStyleTag","nonce","__webpack_nonce__","getNonce","setAttribute","stylesheetSingleton","counter","stylesheet","styleSheet","cssText","appendChild","createTextNode","head","getElementsByTagName","insertStyleTag","remove","removeChild","styleSingleton","sheet","useStyle","styles","isDynamic","dynamic","zeroGap","gap","parseInt","getGapWidth","offsets","cs","getOffset","documentWidth","documentElement","clientWidth","windowWidth","innerWidth","Style","lockAttribute","getStyles","allowRelative","important","getCurrentUseCounter","isFinite","RemoveScrollBar","noRelative","noImportant","newCounter","passiveSupported","nonPassive","passive","elementCanBeScrolled","overflowY","overflowX","alwaysContainsScroll","locationCouldBeScrolled","axis","ShadowRoot","elementCouldBeScrolled","getScrollVariables","elementCouldBeVScrolled","elementCouldBeHScrolled","scrollTop","scrollHeight","clientHeight","scrollLeft","scrollWidth","getHScrollVariables","getTouchXY","changedTouches","clientX","clientY","getDeltaXY","deltaX","deltaY","generateStyle","idCounter","lockStack","getOutermostShadowParent","shadowParent","shouldPreventQueue","touchStartRef","activeAxis","lastProps","classList","allow_1","shouldCancelEvent","touches","currentAxis","touch","touchStart","moveDirection","canBeScrolledInMainDirection","cancelingAxis","endTarget","sourceDelta","noOverscroll","directionFactor","direction","getDirectionFactor","targetInLock","shouldCancelScroll","isDeltaPositive","availableScroll","availableScrollTop","elementScroll","handleScroll","shouldPrevent","_event","sourceEvent","should","cancelable","shardNodes","shouldCancel","scrollTouchStart","scrollWheel","scrollTouchMove","inst","counterMap","uncontrolledNodes","markerMap","lockCount","unwrapHost","applyAttributeToOthers","originalTarget","markerName","controlAttribute","targets","correctedTarget","correctTargets","markerCounter","hiddenNodes","elementsToKeep","elementsToStop","keep","deep","alreadyHidden","counterValue","markerValue","clear","delete","hideOthers","activeParentNode","getDefaultParent","InteractivityDisabler","onEscapeKey","onClickOutside","activeNode","setActiveNode","lastEventTarget","mouseTouches","onKeyDown","defaultPrevented","code","keyCode","onMouseDown","MouseEvent","button","onTouchStart","onTouchEnd","_undo","unmounted","il","jl","__spreadArrays","RequireSideCar","ReactFocusOn","timeoutsShape","enter","exit","appear","enterDone","enterActive","exitDone","exitActive","TransitionGroupContext","UNMOUNTED","EXITED","ENTERING","ENTERED","EXITING","Transition","_React$Component","context","_this","initialStatus","isMounting","appearStatus","in","unmountOnExit","mountOnEnter","status","nextCallback","getDerivedStateFromProps","prevState","updateStatus","prevProps","nextStatus","cancelNextCallback","getTimeouts","timeout","mounting","nodeRef","ReactDOM","findDOMNode","forceReflow","performEnter","performExit","setState","_this2","appearing","maybeNode","maybeAppearing","timeouts","enterTimeout","safeSetState","onEntered","onEnter","onEntering","onTransitionEnd","_this3","onExit","onExiting","onExited","cancel","nextState","setNextCallback","_this4","handler","doesNotHaveTimeoutOrListener","addEndListener","maybeNextCallback","_this$props","childProps","excluded","sourceKeys","_objectWithoutPropertiesLoose","noop","contextType","defaultView","pt","_len","args","_key","Transition$1","FadeOutBox","$state","SlideInFlex","logoSrc","StyledInternalCheckBox","StyledInternalCheckBoxLabelHoverDecor","StyledFlexBox","$outlineColor","$overlayBorderColor","$feedbackBgColor","$checked","StyledInternalShadowRoundButton","OakHintButton","OakQuizHint","setIsOpen","OakQuizFeedback","feedbackLabel","feedback","answerFeedback","StyledMobileSummary","StyledLayoutBox","StickyFooter","StyledLabel","StyledRoundIcon","activeIconStyles","StyledLessonNavItem","FlexedOakBox","pickIconForSection","sectionName","StyledLessonReviewItem","pickSummaryForProgress","completed","pickSummaryForIncomplete","lessonSectionName","numQuestions","pickLabelForSection","pickColorsForSection","renderQuestionCounter","grade","canUseDOM","isWindow","elementString","getWindow","_target$ownerDocument","_target$ownerDocument2","isDocument","Document","isHTMLElement","HTMLElement","isSVGElement","SVGElement","getOwnerDocument","useIsomorphicLayoutEffect","useEvent","handlerRef","useLatestValue","dependencies","valueRef","useLazyMemo","useNodeRef","onChangeHandler","setNodeRef","usePrevious","ids","useUniqueId","prefix","createAdjustmentFn","modifier","adjustments","accumulator","adjustment","valueAdjustment","subtract","isKeyboardEvent","KeyboardEvent","getEventCoordinates","TouchEvent","isTouchEvent","hasViewportRelativeCoordinates","CSS","freeze","Translate","transform","round","Scale","scaleX","scaleY","Transform","property","duration","easing","SELECTOR","findFirstFocusableNode","hiddenStyles","HiddenText","LiveRegion","announcement","ariaLiveType","margin","border","clip","clipPath","whiteSpace","DndMonitorContext","defaultScreenReaderInstructions","draggable","defaultAnnouncements","onDragStart","onDragOver","over","onDragEnd","onDragCancel","_ref4","Accessibility","announcements","container","hiddenTextDescribedById","screenReaderInstructions","announce","setAnnouncement","useAnnouncement","liveRegionId","mounted","setMounted","listener","registerListener","useDndMonitor","onDragMove","markup","Action","useSensor","sensor","useSensors","sensors","defaultCoordinates","distanceBetween","p1","p2","sqrt","pow","getRelativeTransformOrigin","eventCoordinates","sortCollisionsAsc","sortCollisionsDesc","cornersOfRectangle","getFirstCollision","collisions","firstCollision","centerOfRectangle","closestCenter","collisionRect","droppableRects","droppableContainers","centerRect","droppableContainer","distBetween","getIntersectionRatio","min","bottom","targetArea","entryArea","intersectionArea","rectIntersection","intersectionRatio","getRectDelta","rect1","rect2","createRectAdjustmentFn","getAdjustedRect","parseTransform","startsWith","transformArray","ignoreTransform","getClientRect","transformOrigin","parsedTransform","translateX","translateY","parseFloat","inverseTransform","getTransformAgnosticClientRect","getScrollableAncestors","limit","scrollParents","findScrollableAncestors","scrollingElement","overflowRegex","test","isScrollable","isFixed","getFirstScrollableAncestor","firstScrollableAncestor","getScrollableElement","getScrollXCoordinate","scrollX","getScrollYCoordinate","scrollY","getScrollCoordinates","Direction","isDocumentScrollingElement","getScrollPosition","scrollingContainer","minScroll","dimensions","innerHeight","maxScroll","isTop","isLeft","isBottom","isRight","defaultThreshold","getScrollDirectionAndSpeed","scrollContainer","scrollContainerRect","acceleration","thresholdPercentage","speed","threshold","Backward","Forward","getScrollElementRect","getScrollOffsets","scrollableAncestors","scrollIntoViewIfNeeded","measure","scrollIntoView","block","inline","properties","Rect","scrollOffsets","getScrollOffset","currentOffsets","scrollOffsetsDeltla","Listeners","listeners","removeAll","_this$target","eventName","_this$target2","hasExceededDistance","measurement","dx","dy","EventName","KeyboardCode","defaultKeyboardCodes","Space","Enter","Esc","defaultKeyboardCoordinateGetter","currentCoordinates","Right","Left","Down","Up","KeyboardSensor","autoScrollEnabled","referenceCoordinates","windowListeners","handleKeyDown","handleCancel","attach","handleStart","Resize","VisibilityChange","Keydown","onStart","keyboardCodes","coordinateGetter","scrollBehavior","handleEnd","newCoordinates","coordinatesDelta","scrollDelta","scrollElementRect","clampedCoordinates","canScrollX","canScrollY","newScrollCoordinates","canScrollToNewCoordinates","scrollTo","behavior","scrollBy","handleMove","coordinates","onMove","onEnd","detach","onCancel","isDistanceConstraint","constraint","isDelayConstraint","activators","nativeEvent","activator","activatorNode","AbstractPointerSensor","events","listenerTarget","_getEventCoordinates","EventTarget","getEventListenerTarget","activated","initialCoordinates","timeoutId","documentListeners","handleKeydown","removeTextSelection","activationConstraint","bypassActivationConstraint","move","DragStart","ContextMenu","delay","clearTimeout","Click","capture","SelectionChange","_getEventCoordinates2","tolerance","distance","_this$document$getSel","getSelection","removeAllRanges","PointerSensor","super","isPrimary","events$1","MouseButton","MouseSensor","RightClick","events$2","TouchSensor","setup","AutoScrollActivator","TraversalOrder","useAutoScroller","Pointer","canScroll","draggingRect","interval","order","TreeOrder","pointerCoordinates","scrollableAncestorRects","scrollIntent","previousDelta","previousIntent","defaultScrollIntent","sign","useScrollIntent","setAutoScrollInterval","clearAutoScrollInterval","intervalRef","setInterval","clearInterval","useInterval","scrollSpeed","scrollDirection","DraggableRect","scrollContainerRef","autoScroll","sortedScrollableAncestors","reverse","MeasuringStrategy","MeasuringFrequency","useInitialValue","computeFn","previousValue","useResizeObserver","handleResize","resizeObserver","defaultMeasure","useRect","fallbackRect","measureRect","useReducer","currentRect","isConnected","newRect","mutationObserver","handleMutations","MutationObserver","useMutationObserver","records","record","childList","subtree","defaultValue$1","useScrollOffsetsDelta","initialScrollOffsets","hasScrollOffsets","useWindowRect","getWindowClientRect","defaultValue$2","getMeasurableNode","firstChild","defaultSensors","defaultData","defaultMeasuringConfiguration","droppable","strategy","WhileDragging","frequency","Optimized","dragOverlay","DroppableContainersMap","_super$get","getEnabled","getNodeFor","_this$get$node$curren","_this$get","defaultPublicContext","activatorEvent","activeNodeRect","containerNodeRect","draggableNodes","setRef","measuringConfiguration","measureDroppableContainers","windowRect","measuringScheduled","defaultInternalContext","ariaDescribedById","dispatch","InternalContext","PublicContext","getInitialState","translate","containers","reducer","DragMove","DragEnd","DragCancel","RegisterDroppable","SetDroppableDisabled","UnregisterDroppable","RestoreFocus","previousActivatorEvent","previousActiveId","draggableNode","focusableNode","applyModifiers","modifiers","ActiveDraggableContext","Status","DndContext","memo","_sensorContext$curren","_dragOverlay$nodeRef$","_dragOverlay$rect","_over$rect","accessibility","collisionDetection","measuring","store","dispatchMonitorEvent","registerMonitorListener","_listener$type","useDndMonitorProvider","setStatus","Uninitialized","isInitialized","Initialized","activeId","activeRects","initial","translated","_node$data","activeRef","activeSensor","setActiveSensor","setActivatorEvent","latestProps","draggableDescribedById","enabledDroppableContainers","useMeasuringConfiguration","dragging","queue","setQueue","containersRef","Always","BeforeDragging","disabledRef","useDroppableMeasuring","cachedNode","useCachedNode","activationCoordinates","autoScrollOptions","activeSensorDisablesAutoscroll","autoScrollGloballyDisabled","getAutoScrollerOptions","initialActiveNodeRect","useInitialRect","initialRect","initialized","rectDelta","useLayoutShiftScrollCompensation","layoutShiftCompensation","sensorContext","draggingNode","draggingNodeRect","scrollAdjustedTranslate","overNode","setRect","handleNodeChange","useDragOverlayMeasuring","usesDragOverlay","nodeRectDelta","previousNode","ancestors","useScrollableAncestors","elements","firstElement","rects","measureRects","useRects","modifiedTranslate","overlayNodeRect","scrollCoordinates","setScrollCoordinates","prevElements","previousElements","cleanup","scrollableElement","useScrollOffsets","scrollAdjustment","activeNodeScrollDelta","overId","setOver","adjustScale","instantiateSensor","Sensor","sensorInstance","unstable_batchedUpdates","Initializing","createHandler","cancelDrop","bindActivatorToSensorInstantiator","activeDraggableNode","dndKit","activationContext","capturedBy","getSyntheticHandler","useCombineActivators","teardownFns","teardown","useSensorSetup","overContainer","publicContext","internalContext","restoreFocus","NullContext","defaultRole","ID_PREFIX","useDraggable","attributes","roleDescription","setActivatorNodeRef","useSyntheticListeners","dataRef","useDndContext","ID_PREFIX$1","defaultResizeObserverConfig","useDroppable","resizeObserverConfig","previous","resizeObserverConnected","callbackId","resizeObserverDisabled","updateMeasurementsFor","resizeObserverTimeout","newElement","previousElement","unobserve","AnimationManager","animation","clonedChildren","setClonedChildren","setElement","previousChildren","defaultTransform","NullifiedContextProvider","baseStyles","touchAction","defaultTransition","PositionedOverlay","transition","scaleAdjustedTransform","defaultDropAnimationSideEffects","originalStyles","setProperty","defaultDropAnimationConfiguration","final","sideEffects","opacity","useDropAnimation","activeDraggable","measurableNode","scale","finalTransform","animationKeyframes","firstKeyframe","lastKeyframe","animate","onfinish","createDefaultDropAnimation","useKey","DragOverlay","dropAnimation","dropAnimationConfig","wrapperElement","zIndex","modifiedTransform","arrayMove","newArray","getSortedRects","items","isValidIndex","rectSortingStrategy","overIndex","newRects","oldRect","defaultScale$1","verticalListSortingStrategy","_rects$activeIndex","fallbackActiveRect","overIndexRect","itemGap","clientRects","previousRect","nextRect","getItemGap$1","Context","containerId","disableTransforms","useDragOverlay","sortedRects","SortableContext","userDefinedItems","disabledProp","previousItemsRef","itemsHaveChanged","itemsEqual","normalizeDisabled","contextValue","defaultNewIndexGetter","defaultAnimateLayoutChanges","isSorting","wasDragging","newIndex","previousItems","previousContainerId","transitionProperty","disabledTransition","defaultAttributes","useSortable","animateLayoutChanges","userDefinedAttributes","localDisabled","customData","getNewIndex","localStrategy","globalDisabled","globalStrategy","_localDisabled$dragga","_localDisabled$droppa","normalizeLocalDisabled","sortable","itemsAfterCurrentSortable","setDroppableNodeRef","setDraggableNodeRef","useCombinedRefs","displaceItem","shouldDisplaceDragSource","dragSourceDisplacement","shouldAnimateLayoutChanges","derivedTransform","setDerivedtransform","previousIndex","useDerivedTransform","getTransition","hasSortableData","directions","sortableKeyboardCoordinates","filteredContainers","corners","rectCorners","distances","corner","effectiveDistance","closestCorners","closestId","activeDroppable","newDroppable","newNode","hasDifferentScrollAncestors","hasSameContainer","isSameContainer","isAfterActive","isAfter","offset","rectCoordinates","injectDndContext","InternalDndContext","originalScrollingBehaviour","usePrefersReducedMotion","prefersReducedMotion","setPrefersReducedMotion","mediaQuery","matchMedia","ConnectedDraggable","createAccouncements","getPosition","getItemLabel","find","StyledOakBox","InternalDroppableHoldingPen","domContent","setContentBox","minHeight","setMinHeight","observer","currentHeight","borderBoxSize","blockSize","entries_1","__values","entries_1_1","resetMinHeight","ConnectedDroppableHoldingPen","ConnectedDroppable","match","OakPrimaryButtonWithoutPointerEvents","OakPrimaryNavItem","href","isCurrent","shallow","Link","header","headerAfterSlot","initialOpen","setOpen","hidden","listItems","displayValue","defaultChecked","hoverBorderRadius","checkboxSize","checkboxBorder","checkboxBorderRadius","defaultColor","checkedBackgroundFill","currentColor","cloudinaryId","endsWith","CldImage","flags","innerMaxWidth","onOpenSettings","onHide","onAccept","onReject","content","topNavSlot","bottomNavSlot","pickSectionColours","pageBackgroundColor","contentBackgroundColor","contentBorderColor","mobileContentBackgroundColor","progress","notStartedBackgroundColor","backgroundColor","pickSummaryForNotStarted","pickSummaryForComplete","completedBackgroundColor","iconBackgroundColor","lessonSectionNameToIconMap","backLinkSlot","counterSlot","heading","mobileSummary","pickSectionIcon","signLanguageControl","showTranscript","setShowTranscript","footerSlot","onClose","canaryElement","setCanaryElement","isScrolled","setIsScrolled","transitionRef","mutations","mutation","root","navItems","image","innerRef","isFeedback","defaultRef","inputRef","showTick","showCross","imageContainer","feedbackBgColor","feedbackBorderColor","inputCheckbox","click","total","initialOptions","initialSlots","setMatches","draggables","random","droppables","setActiveId","matchedDraggableIds","unmatchedDraggables","newMatches","fromEntries","initialItems","setItems","activeItem","oldIndex","newItems","outlineColor","feedbackAltText","showFeedback","feedbackIcon","setValue","showPromoTag","ThemeProvider"],"mappings":"ykBA+BWA,EAAW,WAQlB,OAPAA,EAAWC,OAAOC,QAAU,SAAkBC,GAC1C,IAAK,IAAIC,EAAGC,EAAI,EAAGC,EAAIC,UAAUC,OAAQH,EAAIC,EAAGD,IAE5C,IAAK,IAAII,KADTL,EAAIG,UAAUF,GACOJ,OAAOS,UAAUC,eAAeC,KAAKR,EAAGK,KAAIN,EAAEM,GAAKL,EAAEK,IAE9E,OAAON,CACV,EACMH,EAASa,MAAMC,KAAMP,UAChC,EAEO,SAASQ,EAAOX,EAAGY,GACtB,IAAIb,EAAI,CAAA,EACR,IAAK,IAAIM,KAAKL,EAAOH,OAAOS,UAAUC,eAAeC,KAAKR,EAAGK,IAAMO,EAAEC,QAAQR,GAAK,IAC9EN,EAAEM,GAAKL,EAAEK,IACb,GAAS,MAALL,GAAqD,mBAAjCH,OAAOiB,sBACtB,KAAIb,EAAI,EAAb,IAAgBI,EAAIR,OAAOiB,sBAAsBd,GAAIC,EAAII,EAAED,OAAQH,IAC3DW,EAAEC,QAAQR,EAAEJ,IAAM,GAAKJ,OAAOS,UAAUS,qBAAqBP,KAAKR,EAAGK,EAAEJ,MACvEF,EAAEM,EAAEJ,IAAMD,EAAEK,EAAEJ,IAF4B,CAItD,OAAOF,CACX,CAgIO,SAASiB,EAAOC,EAAGf,GACtB,IAAIgB,EAAsB,mBAAXC,QAAyBF,EAAEE,OAAOC,UACjD,IAAKF,EAAG,OAAOD,EACf,IAAmBI,EAAYT,EAA3BX,EAAIiB,EAA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S,UACTC,QAAS,UACTC,SAAU,UACVC,MAAO,UACPC,QAAS,UACTC,QAAS,UACTC,IAAK,UACLC,MAAO,UACPC,MAAO,UACPC,KAAM,UACNC,QAAS,UACTC,QAAS,UACTC,KAAM,UACNC,QAAS,UACTC,OAAQ,UACRC,KAAM,UACNC,YAAa,eAWFC,EAAuB,CAClCpC,MACE,wFACFyB,IAAK,2FACLxB,SACE,0FACFT,MACE,yFACFI,OACE,wFACFC,OACE,uFACF+B,KAAM,2FACNC,QACE,2FACFC,QACE,4FAKSO,EAAkB,CAC7B,eACA,eACA,aACA,gBACA,mBACA,kBACA,oBACA,oBACA,gBACA,eACA,eACA,aACA,aACA,sBACA,iBACA,uBACA,0BACA,mBACA,yBACA,4BACA,UACA,gBACA,sBACA,yBACA,8BACA,sBACA,yBACA,8BACA,sBACA,yBACA,8BACA,sBACA,yBACA,8BACA,sBACA,yBACA,8BACA,aACA,eACA,YACA,gBACA,gBACA,aACA,eACA,aACA,eACA,iBACA,kBACA,iBACA,yBACA,eACA,iBACA,eACA,iBACA,qBACA,8BACA,qBACA,8BACA,qBACA,8BACA,qBACA,8BACA,qBACA,8BACA,qBACA,8BACA,eC1HF,SAASC,EAAW9D,GAClB,GAAIA,QAGJ,OAAIA,KAASe,EACJA,EAAef,GAGpB6D,EAAgBE,SAAS/D,GACpB,SAACgE,GAAE,IACFC,EADOD,EAAAE,MACGC,SAASnE,GACzB,OAAOe,EAAekD,EACxB,OAJF,CAMF,CCxBM,SAAUG,EAAUpE,GACxB,QAASA,CACX,CCHA,gBAAMqE,EAAoB,CACxBC,MAAO,IACPC,MAAO,MAGIC,EAAcrG,OAAOsG,OAAOJ,GAAmBK,MAAK,SAACC,EAAGC,GACnE,OAAAD,EAAIC,EAAI,GAAK,CAAb,IAKWC,EAAgB,SAC3BC,GAEA,OAAOT,EAAkBS,EAC3B,EAoBaC,EACX,SACEC,EACAC,EACAC,GAMF,YANE,IAAAA,IAAAA,EAIgD,SAAAC,GAAM,OAAAA,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,OACvB,yBAA0B,SAC1B,8BAA+B,SAC/B,sBAAuB,OACvB,yBAA0B,SAC1B,8BAA+B,SAC/B,sBAAuB,WACvB,yBAA0B,aAC1B,8BAA+B,aAC/B,sBAAuB,OACvB,yBAA0B,SAC1B,8BAA+B,SAC/B,sBAAuB,QACvB,yBAA0B,UAC1B,8BAA+B,UAC/B,aAAc,SACd,eAAgB,QAChB,YAAa,QACb,gBAAiB,QACjB,gBAAiB,SACjB,aAAc,WACd,eAAgB,WAChB,aAAc,MACd,eAAgB,QAChB,iBAAkB,QAClB,kBAAmB,QACnB,iBAAkB,SAClB,yBAA0B,SAC1B,eAAgB,WAChB,iBAAkB,WAClB,eAAgB,MAChB,iBAAkB,QAClB,qBAAsB,OACtB,8BAA+B,UAC/B,qBAAsB,OACtB,8BAA+B,UAC/B,qBAAsB,WACtB,8BAA+B,cAC/B,qBAAsB,OACtB,8BAA+B,UAC/B,qBAAsB,QACtB,8BAA+B,WAC/B,qBAAsB,UACtB,8BAA+B,QAC/BR,YAAa,4HvK5Da,CAC5B,MACA,KACA,KACA,KACA,KACA,KACA","x_google_ignoreList":[0,96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127,128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,187,188,189,190]}