@epic-web/workshop-app 4.5.0 → 4.6.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.
- package/bin/epicshop.js +3 -3
- package/build/client/assets/{_-CGn-2XfF.js → _-COWH0sBh.js} +2 -2
- package/build/client/assets/{_-CGn-2XfF.js.map → _-COWH0sBh.js.map} +1 -1
- package/build/client/assets/_exerciseNumber-rfzZiDNa.js +2 -0
- package/build/client/assets/_exerciseNumber-rfzZiDNa.js.map +1 -0
- package/build/client/assets/{_exerciseNumber_._stepNumber-D00x64Vg.js → _exerciseNumber_._stepNumber-C37pli7_.js} +2 -2
- package/build/client/assets/_exerciseNumber_._stepNumber-C37pli7_.js.map +1 -0
- package/build/client/assets/_exerciseNumber_.finished-B7SgnqdS.js +2 -0
- package/build/client/assets/_exerciseNumber_.finished-B7SgnqdS.js.map +1 -0
- package/build/client/assets/_layout-BG1Jwh7V.js +2 -0
- package/build/client/assets/_layout-BG1Jwh7V.js.map +1 -0
- package/build/client/assets/{_layout-Caqk73Ed.js → _layout-CNgYirUN.js} +2 -2
- package/build/client/assets/_layout-CNgYirUN.js.map +1 -0
- package/build/client/assets/{_layout-MFX35ekR.js → _layout-D0zbQZjf.js} +2 -2
- package/build/client/assets/_layout-D0zbQZjf.js.map +1 -0
- package/build/client/assets/{account-Cp6A7SfU.js → account-DesvwOeg.js} +2 -2
- package/build/client/assets/{account-Cp6A7SfU.js.map → account-DesvwOeg.js.map} +1 -1
- package/build/client/assets/diff-BKsbFB6w.js +42 -0
- package/build/client/assets/diff-BKsbFB6w.js.map +1 -0
- package/build/client/assets/{diff-Ddyuc0-s.js → diff-KDzcgGYL.js} +2 -2
- package/build/client/assets/diff-KDzcgGYL.js.map +1 -0
- package/build/client/assets/{discord-DZWTKMPn.js → discord-0kv66Q6F.js} +2 -2
- package/build/client/assets/{discord-DZWTKMPn.js.map → discord-0kv66Q6F.js.map} +1 -1
- package/build/client/assets/discord-Xp0X4-Fl.js +2 -0
- package/build/client/assets/discord-Xp0X4-Fl.js.map +1 -0
- package/build/client/assets/epic-video-BwtXsHGU.js +2988 -0
- package/build/client/assets/epic-video-BwtXsHGU.js.map +1 -0
- package/build/client/assets/{error-boundary-BUV7xD2e.js → error-boundary-Bcric_4t.js} +2 -2
- package/build/client/assets/error-boundary-Bcric_4t.js.map +1 -0
- package/build/client/assets/finished-BI2-0Ykt.js +2 -0
- package/build/client/assets/finished-BI2-0Ykt.js.map +1 -0
- package/build/client/assets/{index-CVJowtf6.js → index-BQRtqn3g.js} +2 -2
- package/build/client/assets/index-BQRtqn3g.js.map +1 -0
- package/build/client/assets/index-Bg9MMnnf.js +2 -0
- package/build/client/assets/index-Bg9MMnnf.js.map +1 -0
- package/build/client/assets/{login-BCM4kJTm.js → login-D8zyjBAb.js} +2 -2
- package/build/client/assets/{login-BCM4kJTm.js.map → login-D8zyjBAb.js.map} +1 -1
- package/build/client/assets/manifest-c65c0481.js +1 -0
- package/build/client/assets/{mdx-BVZ4sNxQ.js → mdx-BYvGbvEr.js} +2 -2
- package/build/client/assets/mdx-BYvGbvEr.js.map +1 -0
- package/build/client/assets/{misc-DBBsMyAP.js → misc-DNgC2Frq.js} +2 -2
- package/build/client/assets/{misc-DBBsMyAP.js.map → misc-DNgC2Frq.js.map} +1 -1
- package/build/client/assets/{nav-chevrons-DnG58Hov.js → nav-chevrons-DOYtx9XE.js} +2 -2
- package/build/client/assets/{nav-chevrons-DnG58Hov.js.map → nav-chevrons-DOYtx9XE.js.map} +1 -1
- package/build/client/assets/og-l0sNRNKZ.js +2 -0
- package/build/client/assets/og-l0sNRNKZ.js.map +1 -0
- package/build/client/assets/{onboarding-oSo74A5L.js → onboarding-euWyXpCL.js} +2 -2
- package/build/client/assets/{onboarding-oSo74A5L.js.map → onboarding-euWyXpCL.js.map} +1 -1
- package/build/client/assets/presence-BJPzwbUy.js.map +1 -1
- package/build/client/assets/progress-CF9Xwfxf.js +2 -0
- package/build/client/assets/progress-CF9Xwfxf.js.map +1 -0
- package/build/client/assets/{progress-bar-TRgQ8YZ8.js → progress-bar-7LK87ZMh.js} +2 -2
- package/build/client/assets/progress-bar-7LK87ZMh.js.map +1 -0
- package/build/client/assets/{root-CxuwYUpK.js → root-BXq0yevS.js} +4 -4
- package/build/client/assets/root-BXq0yevS.js.map +1 -0
- package/build/client/assets/seo-CHrqghsC.js +2 -0
- package/build/client/assets/seo-CHrqghsC.js.map +1 -0
- package/build/client/assets/support-DUAHYT3r.js.map +1 -1
- package/build/client/assets/tooltip-Kw0lYWBI.js +2 -0
- package/build/client/assets/tooltip-Kw0lYWBI.js.map +1 -0
- package/build/client/img/epicweb-og-background.png +0 -0
- package/build/server/index.js +1816 -1472
- package/build/server/index.js.map +1 -1
- package/dist/server/index.js +0 -2
- package/node_modules/@babel/runtime/helpers/AwaitValue.js +2 -2
- package/node_modules/@babel/runtime/helpers/OverloadYield.js +2 -2
- package/node_modules/@babel/runtime/helpers/applyDecoratedDescriptor.js +7 -22
- package/node_modules/@babel/runtime/helpers/applyDecs2311.js +9 -9
- package/node_modules/@babel/runtime/helpers/arrayLikeToArray.js +4 -4
- package/node_modules/@babel/runtime/helpers/arrayWithHoles.js +2 -2
- package/node_modules/@babel/runtime/helpers/arrayWithoutHoles.js +2 -2
- package/node_modules/@babel/runtime/helpers/assertThisInitialized.js +3 -5
- package/node_modules/@babel/runtime/helpers/asyncToGenerator.js +16 -21
- package/node_modules/@babel/runtime/helpers/checkPrivateRedeclaration.js +2 -4
- package/node_modules/@babel/runtime/helpers/classApplyDescriptorDestructureSet.js +7 -15
- package/node_modules/@babel/runtime/helpers/classApplyDescriptorGet.js +2 -5
- package/node_modules/@babel/runtime/helpers/classApplyDescriptorSet.js +4 -8
- package/node_modules/@babel/runtime/helpers/classCallCheck.js +2 -4
- package/node_modules/@babel/runtime/helpers/classCheckPrivateStaticAccess.js +2 -2
- package/node_modules/@babel/runtime/helpers/classCheckPrivateStaticFieldDescriptor.js +2 -4
- package/node_modules/@babel/runtime/helpers/classExtractFieldDescriptor.js +2 -2
- package/node_modules/@babel/runtime/helpers/classNameTDZError.js +2 -2
- package/node_modules/@babel/runtime/helpers/classPrivateFieldDestructureSet.js +3 -3
- package/node_modules/@babel/runtime/helpers/classPrivateFieldGet.js +3 -3
- package/node_modules/@babel/runtime/helpers/classPrivateFieldInitSpec.js +2 -3
- package/node_modules/@babel/runtime/helpers/classPrivateFieldLooseBase.js +3 -5
- package/node_modules/@babel/runtime/helpers/classPrivateFieldLooseKey.js +2 -2
- package/node_modules/@babel/runtime/helpers/classPrivateFieldSet.js +3 -4
- package/node_modules/@babel/runtime/helpers/classPrivateMethodGet.js +2 -3
- package/node_modules/@babel/runtime/helpers/classPrivateMethodInitSpec.js +2 -3
- package/node_modules/@babel/runtime/helpers/classStaticPrivateFieldDestructureSet.js +2 -4
- package/node_modules/@babel/runtime/helpers/classStaticPrivateFieldSpecGet.js +2 -4
- package/node_modules/@babel/runtime/helpers/classStaticPrivateFieldSpecSet.js +2 -5
- package/node_modules/@babel/runtime/helpers/classStaticPrivateMethodGet.js +2 -3
- package/node_modules/@babel/runtime/helpers/construct.js +1 -1
- package/node_modules/@babel/runtime/helpers/createClass.js +8 -14
- package/node_modules/@babel/runtime/helpers/createForOfIteratorHelper.js +24 -27
- package/node_modules/@babel/runtime/helpers/createForOfIteratorHelperLoose.js +11 -12
- package/node_modules/@babel/runtime/helpers/createSuper.js +10 -12
- package/node_modules/@babel/runtime/helpers/decorate.js +185 -278
- package/node_modules/@babel/runtime/helpers/defaults.js +6 -9
- package/node_modules/@babel/runtime/helpers/defineEnumerableProperties.js +8 -16
- package/node_modules/@babel/runtime/helpers/defineProperty.js +7 -13
- package/node_modules/@babel/runtime/helpers/esm/AsyncGenerator.js +3 -2
- package/node_modules/@babel/runtime/helpers/esm/AwaitValue.js +4 -3
- package/node_modules/@babel/runtime/helpers/esm/OverloadYield.js +4 -3
- package/node_modules/@babel/runtime/helpers/esm/applyDecoratedDescriptor.js +9 -23
- package/node_modules/@babel/runtime/helpers/esm/applyDecs.js +3 -2
- package/node_modules/@babel/runtime/helpers/esm/applyDecs2203.js +3 -2
- package/node_modules/@babel/runtime/helpers/esm/applyDecs2203R.js +3 -2
- package/node_modules/@babel/runtime/helpers/esm/applyDecs2301.js +3 -2
- package/node_modules/@babel/runtime/helpers/esm/applyDecs2305.js +3 -2
- package/node_modules/@babel/runtime/helpers/esm/applyDecs2311.js +12 -11
- package/node_modules/@babel/runtime/helpers/esm/arrayLikeToArray.js +6 -5
- package/node_modules/@babel/runtime/helpers/esm/arrayWithHoles.js +4 -3
- package/node_modules/@babel/runtime/helpers/esm/arrayWithoutHoles.js +4 -3
- package/node_modules/@babel/runtime/helpers/esm/assertClassBrand.js +3 -2
- package/node_modules/@babel/runtime/helpers/esm/assertThisInitialized.js +5 -6
- package/node_modules/@babel/runtime/helpers/esm/asyncGeneratorDelegate.js +3 -2
- package/node_modules/@babel/runtime/helpers/esm/asyncIterator.js +3 -2
- package/node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js +18 -22
- package/node_modules/@babel/runtime/helpers/esm/awaitAsyncGenerator.js +3 -2
- package/node_modules/@babel/runtime/helpers/esm/callSuper.js +3 -2
- package/node_modules/@babel/runtime/helpers/esm/checkInRHS.js +3 -2
- package/node_modules/@babel/runtime/helpers/esm/checkPrivateRedeclaration.js +4 -5
- package/node_modules/@babel/runtime/helpers/esm/classApplyDescriptorDestructureSet.js +9 -16
- package/node_modules/@babel/runtime/helpers/esm/classApplyDescriptorGet.js +4 -6
- package/node_modules/@babel/runtime/helpers/esm/classApplyDescriptorSet.js +6 -9
- package/node_modules/@babel/runtime/helpers/esm/classCallCheck.js +4 -5
- package/node_modules/@babel/runtime/helpers/esm/classCheckPrivateStaticAccess.js +4 -3
- package/node_modules/@babel/runtime/helpers/esm/classCheckPrivateStaticFieldDescriptor.js +4 -5
- package/node_modules/@babel/runtime/helpers/esm/classExtractFieldDescriptor.js +4 -3
- package/node_modules/@babel/runtime/helpers/esm/classNameTDZError.js +4 -3
- package/node_modules/@babel/runtime/helpers/esm/classPrivateFieldDestructureSet.js +5 -4
- package/node_modules/@babel/runtime/helpers/esm/classPrivateFieldGet.js +5 -4
- package/node_modules/@babel/runtime/helpers/esm/classPrivateFieldGet2.js +3 -2
- package/node_modules/@babel/runtime/helpers/esm/classPrivateFieldInitSpec.js +4 -4
- package/node_modules/@babel/runtime/helpers/esm/classPrivateFieldLooseBase.js +5 -6
- package/node_modules/@babel/runtime/helpers/esm/classPrivateFieldLooseKey.js +4 -3
- package/node_modules/@babel/runtime/helpers/esm/classPrivateFieldSet.js +5 -5
- package/node_modules/@babel/runtime/helpers/esm/classPrivateFieldSet2.js +3 -2
- package/node_modules/@babel/runtime/helpers/esm/classPrivateGetter.js +3 -2
- package/node_modules/@babel/runtime/helpers/esm/classPrivateMethodGet.js +4 -4
- package/node_modules/@babel/runtime/helpers/esm/classPrivateMethodInitSpec.js +4 -4
- package/node_modules/@babel/runtime/helpers/esm/classPrivateMethodSet.js +3 -2
- package/node_modules/@babel/runtime/helpers/esm/classPrivateSetter.js +3 -2
- package/node_modules/@babel/runtime/helpers/esm/classStaticPrivateFieldDestructureSet.js +4 -5
- package/node_modules/@babel/runtime/helpers/esm/classStaticPrivateFieldSpecGet.js +4 -5
- package/node_modules/@babel/runtime/helpers/esm/classStaticPrivateFieldSpecSet.js +4 -6
- package/node_modules/@babel/runtime/helpers/esm/classStaticPrivateMethodGet.js +4 -4
- package/node_modules/@babel/runtime/helpers/esm/classStaticPrivateMethodSet.js +3 -2
- package/node_modules/@babel/runtime/helpers/esm/construct.js +4 -3
- package/node_modules/@babel/runtime/helpers/esm/createClass.js +10 -15
- package/node_modules/@babel/runtime/helpers/esm/createForOfIteratorHelper.js +26 -28
- package/node_modules/@babel/runtime/helpers/esm/createForOfIteratorHelperLoose.js +13 -13
- package/node_modules/@babel/runtime/helpers/esm/createSuper.js +12 -13
- package/node_modules/@babel/runtime/helpers/esm/decorate.js +187 -279
- package/node_modules/@babel/runtime/helpers/esm/defaults.js +8 -10
- package/node_modules/@babel/runtime/helpers/esm/defineAccessor.js +3 -2
- package/node_modules/@babel/runtime/helpers/esm/defineEnumerableProperties.js +10 -17
- package/node_modules/@babel/runtime/helpers/esm/defineProperty.js +9 -14
- package/node_modules/@babel/runtime/helpers/esm/dispose.js +3 -2
- package/node_modules/@babel/runtime/helpers/esm/extends.js +9 -13
- package/node_modules/@babel/runtime/helpers/esm/get.js +10 -16
- package/node_modules/@babel/runtime/helpers/esm/getPrototypeOf.js +6 -6
- package/node_modules/@babel/runtime/helpers/esm/identity.js +4 -3
- package/node_modules/@babel/runtime/helpers/esm/importDeferProxy.js +3 -2
- package/node_modules/@babel/runtime/helpers/esm/inherits.js +11 -14
- package/node_modules/@babel/runtime/helpers/esm/inheritsLoose.js +4 -5
- package/node_modules/@babel/runtime/helpers/esm/initializerDefineProperty.js +8 -8
- package/node_modules/@babel/runtime/helpers/esm/initializerWarningHelper.js +4 -3
- package/node_modules/@babel/runtime/helpers/esm/instanceof.js +4 -7
- package/node_modules/@babel/runtime/helpers/esm/interopRequireDefault.js +5 -4
- package/node_modules/@babel/runtime/helpers/esm/interopRequireWildcard.js +3 -2
- package/node_modules/@babel/runtime/helpers/esm/isNativeFunction.js +6 -5
- package/node_modules/@babel/runtime/helpers/esm/isNativeReflectConstruct.js +3 -2
- package/node_modules/@babel/runtime/helpers/esm/iterableToArray.js +4 -3
- package/node_modules/@babel/runtime/helpers/esm/iterableToArrayLimit.js +3 -2
- package/node_modules/@babel/runtime/helpers/esm/iterableToArrayLimitLoose.js +3 -2
- package/node_modules/@babel/runtime/helpers/esm/jsx.js +3 -2
- package/node_modules/@babel/runtime/helpers/esm/maybeArrayLike.js +7 -6
- package/node_modules/@babel/runtime/helpers/esm/newArrowCheck.js +4 -5
- package/node_modules/@babel/runtime/helpers/esm/nonIterableRest.js +3 -2
- package/node_modules/@babel/runtime/helpers/esm/nonIterableSpread.js +3 -2
- package/node_modules/@babel/runtime/helpers/esm/nullishReceiverError.js +3 -2
- package/node_modules/@babel/runtime/helpers/esm/objectDestructuringEmpty.js +4 -3
- package/node_modules/@babel/runtime/helpers/esm/objectSpread.js +11 -13
- package/node_modules/@babel/runtime/helpers/esm/objectSpread2.js +3 -2
- package/node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js +10 -13
- package/node_modules/@babel/runtime/helpers/esm/objectWithoutPropertiesLoose.js +9 -10
- package/node_modules/@babel/runtime/helpers/esm/possibleConstructorReturn.js +6 -8
- package/node_modules/@babel/runtime/helpers/esm/readOnlyError.js +4 -3
- package/node_modules/@babel/runtime/helpers/esm/regeneratorRuntime.js +3 -2
- package/node_modules/@babel/runtime/helpers/esm/set.js +19 -37
- package/node_modules/@babel/runtime/helpers/esm/setFunctionName.js +3 -2
- package/node_modules/@babel/runtime/helpers/esm/setPrototypeOf.js +6 -7
- package/node_modules/@babel/runtime/helpers/esm/skipFirstGeneratorNext.js +5 -5
- package/node_modules/@babel/runtime/helpers/esm/slicedToArray.js +4 -3
- package/node_modules/@babel/runtime/helpers/esm/slicedToArrayLoose.js +4 -3
- package/node_modules/@babel/runtime/helpers/esm/superPropBase.js +5 -7
- package/node_modules/@babel/runtime/helpers/esm/taggedTemplateLiteral.js +5 -7
- package/node_modules/@babel/runtime/helpers/esm/taggedTemplateLiteralLoose.js +4 -7
- package/node_modules/@babel/runtime/helpers/esm/tdz.js +4 -3
- package/node_modules/@babel/runtime/helpers/esm/temporalRef.js +6 -5
- package/node_modules/@babel/runtime/helpers/esm/temporalUndefined.js +2 -1
- package/node_modules/@babel/runtime/helpers/esm/toArray.js +4 -3
- package/node_modules/@babel/runtime/helpers/esm/toConsumableArray.js +4 -3
- package/node_modules/@babel/runtime/helpers/esm/toPrimitive.js +3 -2
- package/node_modules/@babel/runtime/helpers/esm/toPropertyKey.js +3 -2
- package/node_modules/@babel/runtime/helpers/esm/toSetter.js +3 -2
- package/node_modules/@babel/runtime/helpers/esm/typeof.js +3 -2
- package/node_modules/@babel/runtime/helpers/esm/unsupportedIterableToArray.js +8 -8
- package/node_modules/@babel/runtime/helpers/esm/using.js +3 -2
- package/node_modules/@babel/runtime/helpers/esm/usingCtx.js +3 -2
- package/node_modules/@babel/runtime/helpers/esm/wrapAsyncGenerator.js +4 -3
- package/node_modules/@babel/runtime/helpers/esm/wrapNativeSuper.js +17 -20
- package/node_modules/@babel/runtime/helpers/esm/wrapRegExp.js +3 -2
- package/node_modules/@babel/runtime/helpers/esm/writeOnlyError.js +4 -3
- package/node_modules/@babel/runtime/helpers/extends.js +6 -11
- package/node_modules/@babel/runtime/helpers/get.js +7 -14
- package/node_modules/@babel/runtime/helpers/getPrototypeOf.js +4 -5
- package/node_modules/@babel/runtime/helpers/identity.js +2 -2
- package/node_modules/@babel/runtime/helpers/inherits.js +9 -13
- package/node_modules/@babel/runtime/helpers/inheritsLoose.js +2 -4
- package/node_modules/@babel/runtime/helpers/initializerDefineProperty.js +6 -7
- package/node_modules/@babel/runtime/helpers/initializerWarningHelper.js +2 -2
- package/node_modules/@babel/runtime/helpers/instanceof.js +2 -6
- package/node_modules/@babel/runtime/helpers/interopRequireDefault.js +3 -3
- package/node_modules/@babel/runtime/helpers/isNativeFunction.js +4 -4
- package/node_modules/@babel/runtime/helpers/iterableToArray.js +2 -2
- package/node_modules/@babel/runtime/helpers/maybeArrayLike.js +5 -5
- package/node_modules/@babel/runtime/helpers/newArrowCheck.js +2 -4
- package/node_modules/@babel/runtime/helpers/objectDestructuringEmpty.js +2 -2
- package/node_modules/@babel/runtime/helpers/objectSpread.js +9 -12
- package/node_modules/@babel/runtime/helpers/objectWithoutProperties.js +8 -12
- package/node_modules/@babel/runtime/helpers/objectWithoutPropertiesLoose.js +7 -9
- package/node_modules/@babel/runtime/helpers/possibleConstructorReturn.js +4 -7
- package/node_modules/@babel/runtime/helpers/readOnlyError.js +2 -2
- package/node_modules/@babel/runtime/helpers/set.js +17 -36
- package/node_modules/@babel/runtime/helpers/setPrototypeOf.js +4 -6
- package/node_modules/@babel/runtime/helpers/skipFirstGeneratorNext.js +3 -4
- package/node_modules/@babel/runtime/helpers/slicedToArray.js +2 -2
- package/node_modules/@babel/runtime/helpers/slicedToArrayLoose.js +2 -2
- package/node_modules/@babel/runtime/helpers/superPropBase.js +3 -6
- package/node_modules/@babel/runtime/helpers/taggedTemplateLiteral.js +3 -6
- package/node_modules/@babel/runtime/helpers/taggedTemplateLiteralLoose.js +2 -6
- package/node_modules/@babel/runtime/helpers/tdz.js +2 -2
- package/node_modules/@babel/runtime/helpers/temporalRef.js +2 -2
- package/node_modules/@babel/runtime/helpers/toArray.js +2 -2
- package/node_modules/@babel/runtime/helpers/toConsumableArray.js +2 -2
- package/node_modules/@babel/runtime/helpers/unsupportedIterableToArray.js +6 -7
- package/node_modules/@babel/runtime/helpers/wrapAsyncGenerator.js +2 -2
- package/node_modules/@babel/runtime/helpers/wrapNativeSuper.js +15 -19
- package/node_modules/@babel/runtime/helpers/writeOnlyError.js +2 -2
- package/node_modules/@babel/runtime/package.json +587 -587
- package/node_modules/@conform-to/dom/form.js +1 -1
- package/node_modules/@conform-to/dom/form.mjs +1 -1
- package/node_modules/@conform-to/dom/formdata.d.ts +2 -2
- package/node_modules/@conform-to/dom/formdata.js +12 -34
- package/node_modules/@conform-to/dom/formdata.mjs +12 -34
- package/node_modules/@conform-to/dom/intent.d.ts +82 -0
- package/node_modules/@conform-to/dom/intent.js +136 -0
- package/node_modules/@conform-to/dom/intent.mjs +126 -0
- package/node_modules/@conform-to/dom/package.json +58 -59
- package/node_modules/@conform-to/dom/parse.d.ts +30 -0
- package/node_modules/@conform-to/dom/parse.js +43 -0
- package/node_modules/@conform-to/dom/parse.mjs +37 -0
- package/node_modules/@conform-to/dom/submission.d.ts +2 -2
- package/node_modules/@conform-to/dom/submission.js +23 -21
- package/node_modules/@conform-to/dom/submission.mjs +23 -21
- package/node_modules/@conform-to/dom/types.d.ts +20 -0
- package/node_modules/@conform-to/react/helpers.js +1 -1
- package/node_modules/@conform-to/react/helpers.mjs +1 -1
- package/node_modules/@conform-to/react/package.json +68 -69
- package/node_modules/@conform-to/zod/package.json +60 -61
- package/node_modules/framer-motion/dist/cjs/{dom-entry-fJy-kji5.js → dom-entry-DSxBucW4.js} +115 -107
- package/node_modules/framer-motion/dist/cjs/dom-entry.js +1 -1
- package/node_modules/framer-motion/dist/cjs/index.js +43 -10
- package/node_modules/framer-motion/dist/dom-entry.d.ts +1 -1
- package/node_modules/framer-motion/dist/dom.js +1 -1
- package/node_modules/framer-motion/dist/es/animation/GroupPlaybackControls.mjs +2 -3
- package/node_modules/framer-motion/dist/es/animation/interfaces/motion-value.mjs +4 -1
- package/node_modules/framer-motion/dist/es/animation/interfaces/visual-element-target.mjs +2 -3
- package/node_modules/framer-motion/dist/es/animation/optimized-appear/get-appear-id.mjs +7 -0
- package/node_modules/framer-motion/dist/es/projection/node/create-projection-node.mjs +43 -9
- package/node_modules/framer-motion/dist/es/render/dom/DOMKeyframesResolver.mjs +11 -8
- package/node_modules/framer-motion/dist/es/render/utils/motion-values.mjs +1 -1
- package/node_modules/framer-motion/dist/es/value/index.mjs +1 -1
- package/node_modules/framer-motion/dist/framer-motion.dev.js +156 -116
- package/node_modules/framer-motion/dist/framer-motion.js +1 -1
- package/node_modules/framer-motion/dist/index.d.ts +2 -1
- package/node_modules/framer-motion/dist/projection.dev.js +163 -20
- package/node_modules/framer-motion/dist/three-entry.d.ts +1 -0
- package/node_modules/framer-motion/package.json +8 -8
- package/node_modules/remix-utils/node_modules/type-fest/package.json +1 -1
- package/node_modules/remix-utils/node_modules/type-fest/source/conditional-keys.d.ts +5 -3
- package/node_modules/tslib/package.json +1 -1
- package/node_modules/tslib/tslib.d.ts +1 -1
- package/node_modules/tslib/tslib.es6.js +7 -3
- package/node_modules/tslib/tslib.es6.mjs +10 -7
- package/node_modules/tslib/tslib.js +7 -4
- package/package.json +8 -6
- package/start.js +6 -4
- package/build/client/assets/_exerciseNumber-D6YNCQoj.js +0 -2
- package/build/client/assets/_exerciseNumber-D6YNCQoj.js.map +0 -1
- package/build/client/assets/_exerciseNumber_._stepNumber-D00x64Vg.js.map +0 -1
- package/build/client/assets/_exerciseNumber_.finished-DR3gQ1pK.js +0 -2
- package/build/client/assets/_exerciseNumber_.finished-DR3gQ1pK.js.map +0 -1
- package/build/client/assets/_layout-Caqk73Ed.js.map +0 -1
- package/build/client/assets/_layout-DXegGcTM.js +0 -2
- package/build/client/assets/_layout-DXegGcTM.js.map +0 -1
- package/build/client/assets/_layout-MFX35ekR.js.map +0 -1
- package/build/client/assets/diff-Ddyuc0-s.js.map +0 -1
- package/build/client/assets/diff-ZJmYghvh.js +0 -42
- package/build/client/assets/diff-ZJmYghvh.js.map +0 -1
- package/build/client/assets/discord-fsySDDKv.js +0 -2
- package/build/client/assets/discord-fsySDDKv.js.map +0 -1
- package/build/client/assets/epic-video-BKzHxm70.js +0 -2985
- package/build/client/assets/epic-video-BKzHxm70.js.map +0 -1
- package/build/client/assets/error-boundary-BUV7xD2e.js.map +0 -1
- package/build/client/assets/finished-gQ-B3k8j.js +0 -2
- package/build/client/assets/finished-gQ-B3k8j.js.map +0 -1
- package/build/client/assets/index-CVJowtf6.js.map +0 -1
- package/build/client/assets/index-Drecz7hr.js +0 -2
- package/build/client/assets/index-Drecz7hr.js.map +0 -1
- package/build/client/assets/manifest-0b01450d.js +0 -1
- package/build/client/assets/mdx-BVZ4sNxQ.js.map +0 -1
- package/build/client/assets/progress-HmjERaPh.js +0 -2
- package/build/client/assets/progress-HmjERaPh.js.map +0 -1
- package/build/client/assets/progress-bar-TRgQ8YZ8.js.map +0 -1
- package/build/client/assets/root-CxuwYUpK.js.map +0 -1
- package/build/client/assets/tooltip-BdTNdCYE.js +0 -2
- package/build/client/assets/tooltip-BdTNdCYE.js.map +0 -1
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"mdx-BVZ4sNxQ.js","sources":["../../../app/components/apps.tsx","../../../app/routes/launch-editor.tsx","../../../../../node_modules/lru-cache/dist/esm/index.js","../../../../../node_modules/mdx-bundler/dist/client.js","../../../../../node_modules/mdx-bundler/client/index.js","../../../app/utils/mdx.tsx"],"sourcesContent":["import { useRouteLoaderData } from '@remix-run/react'\nimport { type loader as rootLoader } from '#app/root.tsx'\n\nexport function useApps() {\n\tconst data = useRouteLoaderData<typeof rootLoader>('root')\n\tif (!data) {\n\t\tthrow new Error('useApps requires a data object from the root loader')\n\t}\n\treturn data.apps\n}\n","import path from 'path'\nimport { getAppByName } from '@epic-web/workshop-utils/apps.server'\nimport { type ActionFunctionArgs, json } from '@remix-run/node'\nimport { Link, useFetcher } from '@remix-run/react'\nimport { clsx } from 'clsx'\nimport fsExtra from 'fs-extra'\nimport { useEffect } from 'react'\nimport { type ZodTypeAny, z } from 'zod'\nimport { useApps } from '#app/components/apps'\nimport { showProgressBarField } from '#app/components/progress-bar.tsx'\nimport { SimpleTooltip } from '#app/components/ui/tooltip.tsx'\nimport { launchEditor } from '#app/utils/launch-editor.server.ts'\nimport { ensureUndeployed } from '#app/utils/misc.tsx'\nimport { useRequestInfo } from '#app/utils/request-info'\nimport { createToastHeaders } from '#app/utils/toast.server.ts'\n\nfunction getFileDescriptorSchema<AppFile extends ZodTypeAny>(appFile: AppFile) {\n\treturn z.union([\n\t\tz.object({\n\t\t\ttype: z.literal('file'),\n\t\t\tfile: z.string(),\n\t\t}),\n\t\tz.object({\n\t\t\ttype: z.literal('appFile'),\n\t\t\tappFile,\n\t\t\tappName: z.string(),\n\t\t}),\n\t])\n}\n\nconst LaunchSchema = z.intersection(\n\tz.object({\n\t\tline: z.coerce.number().optional(),\n\t\tcolumn: z.coerce.number().optional(),\n\t\tsyncTo: getFileDescriptorSchema(z.string()).optional(),\n\t}),\n\tgetFileDescriptorSchema(z.array(z.string())),\n)\n\nexport async function action({ request }: ActionFunctionArgs) {\n\tensureUndeployed()\n\tconst formData = await request.formData()\n\tconst syncTo = {\n\t\ttype: formData.get('syncTo.type') ?? undefined,\n\t\tfile: formData.get('syncTo.file') ?? undefined,\n\t\tworkshopFile: formData.get('syncTo.workshopFile') ?? undefined,\n\t\tappFile: formData.getAll('syncTo.appFile'),\n\t\tappName: formData.get('syncTo.appName') ?? undefined,\n\t}\n\tconst syncToIsProvided = Object.values(syncTo).some(v =>\n\t\tArray.isArray(v) ? v.length : v,\n\t)\n\tconst rawData = {\n\t\ttype: formData.get('type'),\n\t\tfile: formData.get('file'),\n\t\tworkshopFile: formData.get('workshopFile'),\n\t\tappFile: formData.getAll('appFile'),\n\t\tappName: formData.get('appName'),\n\t\tline: formData.get('line') ?? undefined,\n\t\tcolumn: formData.get('column') ?? undefined,\n\t\tsyncTo: syncToIsProvided\n\t\t\t? {\n\t\t\t\t\ttype: formData.get('syncTo.type'),\n\t\t\t\t\tfile: formData.get('syncTo.file'),\n\t\t\t\t\tworkshopFile: formData.get('syncTo.workshopFile'),\n\t\t\t\t\tappFile: formData.getAll('syncTo.appFile'),\n\t\t\t\t\tappName: formData.get('syncTo.appName'),\n\t\t\t\t}\n\t\t\t: undefined,\n\t}\n\tconst form = LaunchSchema.parse(rawData)\n\n\tasync function getFiles(\n\t\tfileDescriptor:\n\t\t\t| ({ line?: number; colum?: number } & {\n\t\t\t\t\ttype: 'file'\n\t\t\t\t\tfile: string\n\t\t\t\t\tappName?: never\n\t\t\t\t\tappFile?: never\n\t\t\t })\n\t\t\t| {\n\t\t\t\t\ttype: 'appFile'\n\t\t\t\t\tfile?: never\n\t\t\t\t\tappName: string\n\t\t\t\t\tappFile: string | Array<string>\n\t\t\t },\n\t): Promise<Array<{ filepath: string; line?: number; column?: number }>> {\n\t\tif (fileDescriptor.type === 'file') {\n\t\t\treturn [\n\t\t\t\t{\n\t\t\t\t\tfilepath: fileDescriptor.file,\n\t\t\t\t\tline: fileDescriptor.line,\n\t\t\t\t\tcolumn: fileDescriptor.colum,\n\t\t\t\t},\n\t\t\t]\n\t\t} else {\n\t\t\tconst fileDescriptorApp = await getAppByName(fileDescriptor.appName)\n\t\t\tif (!fileDescriptorApp) {\n\t\t\t\tthrow new Response(`App \"${fileDescriptor.appName}\" Not found`, {\n\t\t\t\t\tstatus: 404,\n\t\t\t\t})\n\t\t\t}\n\t\t\tconst appFile = Array.isArray(fileDescriptor.appFile)\n\t\t\t\t? fileDescriptor.appFile\n\t\t\t\t: [fileDescriptor.appFile]\n\t\t\treturn appFile.map(file => {\n\t\t\t\tconst [filePath, line = '1', column = '1'] = file.split(',')\n\t\t\t\tif (!filePath) {\n\t\t\t\t\tthrow new Response(\n\t\t\t\t\t\t`appFile missing file path: ${fileDescriptor.appFile}`,\n\t\t\t\t\t\t{ status: 400 },\n\t\t\t\t\t)\n\t\t\t\t}\n\t\t\t\treturn {\n\t\t\t\t\tfilepath: path.join(fileDescriptorApp.fullPath, filePath),\n\t\t\t\t\tline: Number(line),\n\t\t\t\t\tcolumn: Number(column),\n\t\t\t\t}\n\t\t\t})\n\t\t}\n\t}\n\n\tconst filesToOpen = await getFiles(form)\n\tif ('syncTo' in form && form.syncTo) {\n\t\tconst originFiles = await getFiles(form.syncTo)\n\t\tfor (let index = 0; index < originFiles.length; index++) {\n\t\t\tconst originFile = originFiles[index]\n\t\t\tif (!originFile) continue\n\t\t\tconst destFile = filesToOpen[index]\n\t\t\tif (!destFile) {\n\t\t\t\tthrow new Response(\n\t\t\t\t\t`Trying to sync to a file that does not appear at index ${index}`,\n\t\t\t\t)\n\t\t\t}\n\t\t\tawait fsExtra.ensureDir(path.dirname(destFile.filepath))\n\t\t\tawait fsExtra.promises.copyFile(originFile.filepath, destFile.filepath)\n\t\t}\n\t}\n\tconst results: Array<\n\t\t{ status: 'success' } | { status: 'error'; message: string }\n\t> = []\n\tfor (const file of filesToOpen) {\n\t\tresults.push(await launchEditor(file.filepath, file.line, file.column))\n\t}\n\n\tif (results.every(r => r.status === 'success')) {\n\t\treturn json({ status: 'success' } as const)\n\t} else {\n\t\tconst messages = results\n\t\t\t.map((r, index, array) =>\n\t\t\t\tr.status === 'error'\n\t\t\t\t\t? array.length > 1\n\t\t\t\t\t\t? `${index}. ${r.message}`\n\t\t\t\t\t\t: r.message\n\t\t\t\t\t: null,\n\t\t\t)\n\t\t\t.filter(Boolean)\n\t\t\t.join('\\n')\n\t\tconsole.error('Launch editor error:', messages)\n\t\treturn json({ status: 'error', message: messages } as const, {\n\t\t\theaders: await createToastHeaders({\n\t\t\t\ttype: 'error',\n\t\t\t\ttitle: 'Launch Editor Error',\n\t\t\t\tdescription: messages,\n\t\t\t}),\n\t\t})\n\t}\n}\n\ntype FileDescriptorProps<AppFile> =\n\t| {\n\t\t\tfile: string\n\t\t\tappFile?: never\n\t\t\tappName?: never\n\t }\n\t| {\n\t\t\tfile?: never\n\t\t\tappFile: AppFile\n\t\t\tappName: string\n\t }\n\ntype LaunchEditorProps = {\n\tline?: number\n\tcolumn?: number\n\tsyncTo?: FileDescriptorProps<string>\n\tchildren: React.ReactNode\n\tonUpdate?: (state: string) => void\n} & FileDescriptorProps<string | string[]>\n\nfunction useLaunchFetcher(onUpdate?: ((state: string) => void) | undefined) {\n\tconst fetcher = useFetcher<typeof action>()\n\n\tuseEffect(() => {\n\t\tif (fetcher.state === 'idle' && fetcher.data != null) {\n\t\t\tonUpdate?.('fetcher-done')\n\t\t}\n\t}, [fetcher, onUpdate])\n\n\treturn fetcher\n}\n\nfunction LaunchEditorImpl({\n\tfile,\n\tappFile,\n\tappName,\n\tsyncTo,\n\tline,\n\tcolumn,\n\tchildren,\n\tonUpdate,\n}: LaunchEditorProps) {\n\tconst fetcher = useLaunchFetcher(onUpdate)\n\n\tconst fileList = typeof appFile === 'string' ? [appFile] : appFile\n\tconst type = file ? 'file' : appFile ? 'appFile' : ''\n\tconst syncToType = syncTo?.file ? 'file' : syncTo?.appFile ? 'appFile' : ''\n\n\treturn (\n\t\t<fetcher.Form\n\t\t\taction=\"/launch-editor\"\n\t\t\tmethod=\"POST\"\n\t\t\tclassName=\"flex items-center\"\n\t\t>\n\t\t\t{showProgressBarField}\n\t\t\t<input type=\"hidden\" name=\"line\" value={line} />\n\t\t\t<input type=\"hidden\" name=\"column\" value={column} />\n\t\t\t<input type=\"hidden\" name=\"type\" value={type} />\n\t\t\t<input type=\"hidden\" name=\"file\" value={file} />\n\t\t\t<input type=\"hidden\" name=\"appName\" value={appName} />\n\t\t\t{fileList?.map(file => (\n\t\t\t\t<input type=\"hidden\" name=\"appFile\" key={file} value={file} />\n\t\t\t))}\n\t\t\t{syncTo ? (\n\t\t\t\t<>\n\t\t\t\t\t<input type=\"hidden\" name=\"syncTo.type\" value={syncToType} />\n\t\t\t\t\t<input type=\"hidden\" name=\"syncTo.file\" value={syncTo.file} />\n\t\t\t\t\t<input type=\"hidden\" name=\"syncTo.appName\" value={syncTo.appName} />\n\t\t\t\t\t<input type=\"hidden\" name=\"syncTo.appFile\" value={syncTo.appFile} />\n\t\t\t\t</>\n\t\t\t) : null}\n\t\t\t<button\n\t\t\t\ttype=\"submit\"\n\t\t\t\tclassName={clsx(\n\t\t\t\t\t'launch_button',\n\t\t\t\t\tfetcher.state === 'idle' ? null : 'cursor-progress',\n\t\t\t\t\tfetcher.data?.status === 'error' ? 'cursor-not-allowed' : null,\n\t\t\t\t)}\n\t\t\t>\n\t\t\t\t{children}\n\t\t\t</button>\n\t\t</fetcher.Form>\n\t)\n}\n\nfunction LaunchGitHub({\n\tfile,\n\tappFile,\n\tappName,\n\tline,\n\tchildren,\n}: LaunchEditorProps) {\n\tconst apps = useApps()\n\tconst requestInfo = useRequestInfo()\n\tif (Array.isArray(appFile)) {\n\t\treturn <div>Cannot open more than one file</div>\n\t}\n\tif (file) {\n\t\tconst safePath = (s: string) => s.replace(/\\\\/g, '/')\n\t\treturn (\n\t\t\t<a\n\t\t\t\tclassName=\"launch_button !no-underline\"\n\t\t\t\thref={\n\t\t\t\t\tsafePath(file).replace(\n\t\t\t\t\t\tsafePath(ENV.EPICSHOP_CONTEXT_CWD),\n\t\t\t\t\t\tENV.EPICSHOP_GITHUB_ROOT,\n\t\t\t\t\t) + (line ? `#L${line}` : '')\n\t\t\t\t}\n\t\t\t\trel=\"noreferrer\"\n\t\t\t\ttarget=\"_blank\"\n\t\t\t>\n\t\t\t\t{children}\n\t\t\t</a>\n\t\t)\n\t}\n\tconst app = apps.find(a => a.name === appName)\n\tconst path = [\n\t\t...(app?.relativePath.split(requestInfo.separator) ?? []),\n\t\tappFile + (line ? `#L${line}` : ''),\n\t].join('/')\n\treturn (\n\t\t<a\n\t\t\tclassName=\"launch_button !no-underline\"\n\t\t\thref={`${ENV.EPICSHOP_GITHUB_ROOT}/${path}`}\n\t\t\trel=\"noreferrer\"\n\t\t\ttarget=\"_blank\"\n\t\t>\n\t\t\t{children}\n\t\t</a>\n\t)\n}\n\nexport function EditFileOnGitHub({\n\tappFile = 'README.mdx',\n\tappName,\n\tfile,\n\trelativePath,\n}: {\n\tappFile?: string\n\trelativePath: string\n} & (\n\t| {\n\t\t\tfile: string\n\t\t\tappName?: never\n\t }\n\t| {\n\t\t\tfile?: never\n\t\t\tappName: string\n\t }\n)) {\n\tconst fetcher = useLaunchFetcher()\n\n\tconst handleClick = (e: React.MouseEvent<HTMLAnchorElement>) => {\n\t\tif (!e.altKey || ENV.EPICSHOP_DEPLOYED) return\n\t\te.preventDefault()\n\t\tconst formData = new FormData()\n\t\tconst type = file ? 'file' : 'appFile'\n\t\tformData.append(type, file ?? appFile)\n\t\tformData.append('type', type)\n\t\tif (appName) {\n\t\t\tformData.append('appName', appName)\n\t\t}\n\t\tfetcher.submit(formData, { method: 'POST', action: '/launch-editor' })\n\t}\n\n\tconst githubPath = ENV.EPICSHOP_GITHUB_ROOT.replace(\n\t\t/\\/tree\\/|\\/blob\\//,\n\t\t'/edit/',\n\t)\n\n\treturn (\n\t\t<Link\n\t\t\tclassName=\"self-center font-mono text-sm\"\n\t\t\tonClick={handleClick}\n\t\t\ttarget=\"_blank\"\n\t\t\tto={`${githubPath}/${relativePath}/${appFile}`.replace(/\\\\/g, '/')}\n\t\t>\n\t\t\t<span className=\"block md:hidden\">Edit on GitHub</span>\n\t\t\t<span className=\"hidden md:block\">Edit this page on GitHub</span>\n\t\t</Link>\n\t)\n}\n\nexport const LaunchEditor = ENV.EPICSHOP_DEPLOYED\n\t? ENV.EPICSHOP_GITHUB_ROOT\n\t\t? LaunchGitHub\n\t\t: ({ children }: LaunchEditorProps) => (\n\t\t\t\t<SimpleTooltip content=\"Cannot open files in deployed app\">\n\t\t\t\t\t<button className=\"launch_button cursor-not-allowed\">\n\t\t\t\t\t\t{children}\n\t\t\t\t\t</button>\n\t\t\t\t</SimpleTooltip>\n\t\t\t)\n\t: LaunchEditorImpl\n","/**\n * @module LRUCache\n */\nconst perf = typeof performance === 'object' &&\n performance &&\n typeof performance.now === 'function'\n ? performance\n : Date;\nconst warned = new Set();\n/* c8 ignore start */\nconst PROCESS = (typeof process === 'object' && !!process ? process : {});\n/* c8 ignore start */\nconst emitWarning = (msg, type, code, fn) => {\n typeof PROCESS.emitWarning === 'function'\n ? PROCESS.emitWarning(msg, type, code, fn)\n : console.error(`[${code}] ${type}: ${msg}`);\n};\nlet AC = globalThis.AbortController;\nlet AS = globalThis.AbortSignal;\n/* c8 ignore start */\nif (typeof AC === 'undefined') {\n //@ts-ignore\n AS = class AbortSignal {\n onabort;\n _onabort = [];\n reason;\n aborted = false;\n addEventListener(_, fn) {\n this._onabort.push(fn);\n }\n };\n //@ts-ignore\n AC = class AbortController {\n constructor() {\n warnACPolyfill();\n }\n signal = new AS();\n abort(reason) {\n if (this.signal.aborted)\n return;\n //@ts-ignore\n this.signal.reason = reason;\n //@ts-ignore\n this.signal.aborted = true;\n //@ts-ignore\n for (const fn of this.signal._onabort) {\n fn(reason);\n }\n this.signal.onabort?.(reason);\n }\n };\n let printACPolyfillWarning = PROCESS.env?.LRU_CACHE_IGNORE_AC_WARNING !== '1';\n const warnACPolyfill = () => {\n if (!printACPolyfillWarning)\n return;\n printACPolyfillWarning = false;\n emitWarning('AbortController is not defined. If using lru-cache in ' +\n 'node 14, load an AbortController polyfill from the ' +\n '`node-abort-controller` package. A minimal polyfill is ' +\n 'provided for use by LRUCache.fetch(), but it should not be ' +\n 'relied upon in other contexts (eg, passing it to other APIs that ' +\n 'use AbortController/AbortSignal might have undesirable effects). ' +\n 'You may disable this with LRU_CACHE_IGNORE_AC_WARNING=1 in the env.', 'NO_ABORT_CONTROLLER', 'ENOTSUP', warnACPolyfill);\n };\n}\n/* c8 ignore stop */\nconst shouldWarn = (code) => !warned.has(code);\nconst TYPE = Symbol('type');\nconst isPosInt = (n) => n && n === Math.floor(n) && n > 0 && isFinite(n);\n/* c8 ignore start */\n// This is a little bit ridiculous, tbh.\n// The maximum array length is 2^32-1 or thereabouts on most JS impls.\n// And well before that point, you're caching the entire world, I mean,\n// that's ~32GB of just integers for the next/prev links, plus whatever\n// else to hold that many keys and values. Just filling the memory with\n// zeroes at init time is brutal when you get that big.\n// But why not be complete?\n// Maybe in the future, these limits will have expanded.\nconst getUintArray = (max) => !isPosInt(max)\n ? null\n : max <= Math.pow(2, 8)\n ? Uint8Array\n : max <= Math.pow(2, 16)\n ? Uint16Array\n : max <= Math.pow(2, 32)\n ? Uint32Array\n : max <= Number.MAX_SAFE_INTEGER\n ? ZeroArray\n : null;\n/* c8 ignore stop */\nclass ZeroArray extends Array {\n constructor(size) {\n super(size);\n this.fill(0);\n }\n}\nclass Stack {\n heap;\n length;\n // private constructor\n static #constructing = false;\n static create(max) {\n const HeapCls = getUintArray(max);\n if (!HeapCls)\n return [];\n Stack.#constructing = true;\n const s = new Stack(max, HeapCls);\n Stack.#constructing = false;\n return s;\n }\n constructor(max, HeapCls) {\n /* c8 ignore start */\n if (!Stack.#constructing) {\n throw new TypeError('instantiate Stack using Stack.create(n)');\n }\n /* c8 ignore stop */\n this.heap = new HeapCls(max);\n this.length = 0;\n }\n push(n) {\n this.heap[this.length++] = n;\n }\n pop() {\n return this.heap[--this.length];\n }\n}\n/**\n * Default export, the thing you're using this module to get.\n *\n * All properties from the options object (with the exception of\n * {@link OptionsBase.max} and {@link OptionsBase.maxSize}) are added as\n * normal public members. (`max` and `maxBase` are read-only getters.)\n * Changing any of these will alter the defaults for subsequent method calls,\n * but is otherwise safe.\n */\nexport class LRUCache {\n // properties coming in from the options of these, only max and maxSize\n // really *need* to be protected. The rest can be modified, as they just\n // set defaults for various methods.\n #max;\n #maxSize;\n #dispose;\n #disposeAfter;\n #fetchMethod;\n /**\n * {@link LRUCache.OptionsBase.ttl}\n */\n ttl;\n /**\n * {@link LRUCache.OptionsBase.ttlResolution}\n */\n ttlResolution;\n /**\n * {@link LRUCache.OptionsBase.ttlAutopurge}\n */\n ttlAutopurge;\n /**\n * {@link LRUCache.OptionsBase.updateAgeOnGet}\n */\n updateAgeOnGet;\n /**\n * {@link LRUCache.OptionsBase.updateAgeOnHas}\n */\n updateAgeOnHas;\n /**\n * {@link LRUCache.OptionsBase.allowStale}\n */\n allowStale;\n /**\n * {@link LRUCache.OptionsBase.noDisposeOnSet}\n */\n noDisposeOnSet;\n /**\n * {@link LRUCache.OptionsBase.noUpdateTTL}\n */\n noUpdateTTL;\n /**\n * {@link LRUCache.OptionsBase.maxEntrySize}\n */\n maxEntrySize;\n /**\n * {@link LRUCache.OptionsBase.sizeCalculation}\n */\n sizeCalculation;\n /**\n * {@link LRUCache.OptionsBase.noDeleteOnFetchRejection}\n */\n noDeleteOnFetchRejection;\n /**\n * {@link LRUCache.OptionsBase.noDeleteOnStaleGet}\n */\n noDeleteOnStaleGet;\n /**\n * {@link LRUCache.OptionsBase.allowStaleOnFetchAbort}\n */\n allowStaleOnFetchAbort;\n /**\n * {@link LRUCache.OptionsBase.allowStaleOnFetchRejection}\n */\n allowStaleOnFetchRejection;\n /**\n * {@link LRUCache.OptionsBase.ignoreFetchAbort}\n */\n ignoreFetchAbort;\n // computed properties\n #size;\n #calculatedSize;\n #keyMap;\n #keyList;\n #valList;\n #next;\n #prev;\n #head;\n #tail;\n #free;\n #disposed;\n #sizes;\n #starts;\n #ttls;\n #hasDispose;\n #hasFetchMethod;\n #hasDisposeAfter;\n /**\n * Do not call this method unless you need to inspect the\n * inner workings of the cache. If anything returned by this\n * object is modified in any way, strange breakage may occur.\n *\n * These fields are private for a reason!\n *\n * @internal\n */\n static unsafeExposeInternals(c) {\n return {\n // properties\n starts: c.#starts,\n ttls: c.#ttls,\n sizes: c.#sizes,\n keyMap: c.#keyMap,\n keyList: c.#keyList,\n valList: c.#valList,\n next: c.#next,\n prev: c.#prev,\n get head() {\n return c.#head;\n },\n get tail() {\n return c.#tail;\n },\n free: c.#free,\n // methods\n isBackgroundFetch: (p) => c.#isBackgroundFetch(p),\n backgroundFetch: (k, index, options, context) => c.#backgroundFetch(k, index, options, context),\n moveToTail: (index) => c.#moveToTail(index),\n indexes: (options) => c.#indexes(options),\n rindexes: (options) => c.#rindexes(options),\n isStale: (index) => c.#isStale(index),\n };\n }\n // Protected read-only members\n /**\n * {@link LRUCache.OptionsBase.max} (read-only)\n */\n get max() {\n return this.#max;\n }\n /**\n * {@link LRUCache.OptionsBase.maxSize} (read-only)\n */\n get maxSize() {\n return this.#maxSize;\n }\n /**\n * The total computed size of items in the cache (read-only)\n */\n get calculatedSize() {\n return this.#calculatedSize;\n }\n /**\n * The number of items stored in the cache (read-only)\n */\n get size() {\n return this.#size;\n }\n /**\n * {@link LRUCache.OptionsBase.fetchMethod} (read-only)\n */\n get fetchMethod() {\n return this.#fetchMethod;\n }\n /**\n * {@link LRUCache.OptionsBase.dispose} (read-only)\n */\n get dispose() {\n return this.#dispose;\n }\n /**\n * {@link LRUCache.OptionsBase.disposeAfter} (read-only)\n */\n get disposeAfter() {\n return this.#disposeAfter;\n }\n constructor(options) {\n const { max = 0, ttl, ttlResolution = 1, ttlAutopurge, updateAgeOnGet, updateAgeOnHas, allowStale, dispose, disposeAfter, noDisposeOnSet, noUpdateTTL, maxSize = 0, maxEntrySize = 0, sizeCalculation, fetchMethod, noDeleteOnFetchRejection, noDeleteOnStaleGet, allowStaleOnFetchRejection, allowStaleOnFetchAbort, ignoreFetchAbort, } = options;\n if (max !== 0 && !isPosInt(max)) {\n throw new TypeError('max option must be a nonnegative integer');\n }\n const UintArray = max ? getUintArray(max) : Array;\n if (!UintArray) {\n throw new Error('invalid max value: ' + max);\n }\n this.#max = max;\n this.#maxSize = maxSize;\n this.maxEntrySize = maxEntrySize || this.#maxSize;\n this.sizeCalculation = sizeCalculation;\n if (this.sizeCalculation) {\n if (!this.#maxSize && !this.maxEntrySize) {\n throw new TypeError('cannot set sizeCalculation without setting maxSize or maxEntrySize');\n }\n if (typeof this.sizeCalculation !== 'function') {\n throw new TypeError('sizeCalculation set to non-function');\n }\n }\n if (fetchMethod !== undefined &&\n typeof fetchMethod !== 'function') {\n throw new TypeError('fetchMethod must be a function if specified');\n }\n this.#fetchMethod = fetchMethod;\n this.#hasFetchMethod = !!fetchMethod;\n this.#keyMap = new Map();\n this.#keyList = new Array(max).fill(undefined);\n this.#valList = new Array(max).fill(undefined);\n this.#next = new UintArray(max);\n this.#prev = new UintArray(max);\n this.#head = 0;\n this.#tail = 0;\n this.#free = Stack.create(max);\n this.#size = 0;\n this.#calculatedSize = 0;\n if (typeof dispose === 'function') {\n this.#dispose = dispose;\n }\n if (typeof disposeAfter === 'function') {\n this.#disposeAfter = disposeAfter;\n this.#disposed = [];\n }\n else {\n this.#disposeAfter = undefined;\n this.#disposed = undefined;\n }\n this.#hasDispose = !!this.#dispose;\n this.#hasDisposeAfter = !!this.#disposeAfter;\n this.noDisposeOnSet = !!noDisposeOnSet;\n this.noUpdateTTL = !!noUpdateTTL;\n this.noDeleteOnFetchRejection = !!noDeleteOnFetchRejection;\n this.allowStaleOnFetchRejection = !!allowStaleOnFetchRejection;\n this.allowStaleOnFetchAbort = !!allowStaleOnFetchAbort;\n this.ignoreFetchAbort = !!ignoreFetchAbort;\n // NB: maxEntrySize is set to maxSize if it's set\n if (this.maxEntrySize !== 0) {\n if (this.#maxSize !== 0) {\n if (!isPosInt(this.#maxSize)) {\n throw new TypeError('maxSize must be a positive integer if specified');\n }\n }\n if (!isPosInt(this.maxEntrySize)) {\n throw new TypeError('maxEntrySize must be a positive integer if specified');\n }\n this.#initializeSizeTracking();\n }\n this.allowStale = !!allowStale;\n this.noDeleteOnStaleGet = !!noDeleteOnStaleGet;\n this.updateAgeOnGet = !!updateAgeOnGet;\n this.updateAgeOnHas = !!updateAgeOnHas;\n this.ttlResolution =\n isPosInt(ttlResolution) || ttlResolution === 0\n ? ttlResolution\n : 1;\n this.ttlAutopurge = !!ttlAutopurge;\n this.ttl = ttl || 0;\n if (this.ttl) {\n if (!isPosInt(this.ttl)) {\n throw new TypeError('ttl must be a positive integer if specified');\n }\n this.#initializeTTLTracking();\n }\n // do not allow completely unbounded caches\n if (this.#max === 0 && this.ttl === 0 && this.#maxSize === 0) {\n throw new TypeError('At least one of max, maxSize, or ttl is required');\n }\n if (!this.ttlAutopurge && !this.#max && !this.#maxSize) {\n const code = 'LRU_CACHE_UNBOUNDED';\n if (shouldWarn(code)) {\n warned.add(code);\n const msg = 'TTL caching without ttlAutopurge, max, or maxSize can ' +\n 'result in unbounded memory consumption.';\n emitWarning(msg, 'UnboundedCacheWarning', code, LRUCache);\n }\n }\n }\n /**\n * Return the remaining TTL time for a given entry key\n */\n getRemainingTTL(key) {\n return this.#keyMap.has(key) ? Infinity : 0;\n }\n #initializeTTLTracking() {\n const ttls = new ZeroArray(this.#max);\n const starts = new ZeroArray(this.#max);\n this.#ttls = ttls;\n this.#starts = starts;\n this.#setItemTTL = (index, ttl, start = perf.now()) => {\n starts[index] = ttl !== 0 ? start : 0;\n ttls[index] = ttl;\n if (ttl !== 0 && this.ttlAutopurge) {\n const t = setTimeout(() => {\n if (this.#isStale(index)) {\n this.delete(this.#keyList[index]);\n }\n }, ttl + 1);\n // unref() not supported on all platforms\n /* c8 ignore start */\n if (t.unref) {\n t.unref();\n }\n /* c8 ignore stop */\n }\n };\n this.#updateItemAge = index => {\n starts[index] = ttls[index] !== 0 ? perf.now() : 0;\n };\n this.#statusTTL = (status, index) => {\n if (ttls[index]) {\n const ttl = ttls[index];\n const start = starts[index];\n /* c8 ignore next */\n if (!ttl || !start)\n return;\n status.ttl = ttl;\n status.start = start;\n status.now = cachedNow || getNow();\n const age = status.now - start;\n status.remainingTTL = ttl - age;\n }\n };\n // debounce calls to perf.now() to 1s so we're not hitting\n // that costly call repeatedly.\n let cachedNow = 0;\n const getNow = () => {\n const n = perf.now();\n if (this.ttlResolution > 0) {\n cachedNow = n;\n const t = setTimeout(() => (cachedNow = 0), this.ttlResolution);\n // not available on all platforms\n /* c8 ignore start */\n if (t.unref) {\n t.unref();\n }\n /* c8 ignore stop */\n }\n return n;\n };\n this.getRemainingTTL = key => {\n const index = this.#keyMap.get(key);\n if (index === undefined) {\n return 0;\n }\n const ttl = ttls[index];\n const start = starts[index];\n if (!ttl || !start) {\n return Infinity;\n }\n const age = (cachedNow || getNow()) - start;\n return ttl - age;\n };\n this.#isStale = index => {\n const s = starts[index];\n const t = ttls[index];\n return !!t && !!s && (cachedNow || getNow()) - s > t;\n };\n }\n // conditionally set private methods related to TTL\n #updateItemAge = () => { };\n #statusTTL = () => { };\n #setItemTTL = () => { };\n /* c8 ignore stop */\n #isStale = () => false;\n #initializeSizeTracking() {\n const sizes = new ZeroArray(this.#max);\n this.#calculatedSize = 0;\n this.#sizes = sizes;\n this.#removeItemSize = index => {\n this.#calculatedSize -= sizes[index];\n sizes[index] = 0;\n };\n this.#requireSize = (k, v, size, sizeCalculation) => {\n // provisionally accept background fetches.\n // actual value size will be checked when they return.\n if (this.#isBackgroundFetch(v)) {\n return 0;\n }\n if (!isPosInt(size)) {\n if (sizeCalculation) {\n if (typeof sizeCalculation !== 'function') {\n throw new TypeError('sizeCalculation must be a function');\n }\n size = sizeCalculation(v, k);\n if (!isPosInt(size)) {\n throw new TypeError('sizeCalculation return invalid (expect positive integer)');\n }\n }\n else {\n throw new TypeError('invalid size value (must be positive integer). ' +\n 'When maxSize or maxEntrySize is used, sizeCalculation ' +\n 'or size must be set.');\n }\n }\n return size;\n };\n this.#addItemSize = (index, size, status) => {\n sizes[index] = size;\n if (this.#maxSize) {\n const maxSize = this.#maxSize - sizes[index];\n while (this.#calculatedSize > maxSize) {\n this.#evict(true);\n }\n }\n this.#calculatedSize += sizes[index];\n if (status) {\n status.entrySize = size;\n status.totalCalculatedSize = this.#calculatedSize;\n }\n };\n }\n #removeItemSize = _i => { };\n #addItemSize = (_i, _s, _st) => { };\n #requireSize = (_k, _v, size, sizeCalculation) => {\n if (size || sizeCalculation) {\n throw new TypeError('cannot set size without setting maxSize or maxEntrySize on cache');\n }\n return 0;\n };\n *#indexes({ allowStale = this.allowStale } = {}) {\n if (this.#size) {\n for (let i = this.#tail; true;) {\n if (!this.#isValidIndex(i)) {\n break;\n }\n if (allowStale || !this.#isStale(i)) {\n yield i;\n }\n if (i === this.#head) {\n break;\n }\n else {\n i = this.#prev[i];\n }\n }\n }\n }\n *#rindexes({ allowStale = this.allowStale } = {}) {\n if (this.#size) {\n for (let i = this.#head; true;) {\n if (!this.#isValidIndex(i)) {\n break;\n }\n if (allowStale || !this.#isStale(i)) {\n yield i;\n }\n if (i === this.#tail) {\n break;\n }\n else {\n i = this.#next[i];\n }\n }\n }\n }\n #isValidIndex(index) {\n return (index !== undefined &&\n this.#keyMap.get(this.#keyList[index]) === index);\n }\n /**\n * Return a generator yielding `[key, value]` pairs,\n * in order from most recently used to least recently used.\n */\n *entries() {\n for (const i of this.#indexes()) {\n if (this.#valList[i] !== undefined &&\n this.#keyList[i] !== undefined &&\n !this.#isBackgroundFetch(this.#valList[i])) {\n yield [this.#keyList[i], this.#valList[i]];\n }\n }\n }\n /**\n * Inverse order version of {@link LRUCache.entries}\n *\n * Return a generator yielding `[key, value]` pairs,\n * in order from least recently used to most recently used.\n */\n *rentries() {\n for (const i of this.#rindexes()) {\n if (this.#valList[i] !== undefined &&\n this.#keyList[i] !== undefined &&\n !this.#isBackgroundFetch(this.#valList[i])) {\n yield [this.#keyList[i], this.#valList[i]];\n }\n }\n }\n /**\n * Return a generator yielding the keys in the cache,\n * in order from most recently used to least recently used.\n */\n *keys() {\n for (const i of this.#indexes()) {\n const k = this.#keyList[i];\n if (k !== undefined &&\n !this.#isBackgroundFetch(this.#valList[i])) {\n yield k;\n }\n }\n }\n /**\n * Inverse order version of {@link LRUCache.keys}\n *\n * Return a generator yielding the keys in the cache,\n * in order from least recently used to most recently used.\n */\n *rkeys() {\n for (const i of this.#rindexes()) {\n const k = this.#keyList[i];\n if (k !== undefined &&\n !this.#isBackgroundFetch(this.#valList[i])) {\n yield k;\n }\n }\n }\n /**\n * Return a generator yielding the values in the cache,\n * in order from most recently used to least recently used.\n */\n *values() {\n for (const i of this.#indexes()) {\n const v = this.#valList[i];\n if (v !== undefined &&\n !this.#isBackgroundFetch(this.#valList[i])) {\n yield this.#valList[i];\n }\n }\n }\n /**\n * Inverse order version of {@link LRUCache.values}\n *\n * Return a generator yielding the values in the cache,\n * in order from least recently used to most recently used.\n */\n *rvalues() {\n for (const i of this.#rindexes()) {\n const v = this.#valList[i];\n if (v !== undefined &&\n !this.#isBackgroundFetch(this.#valList[i])) {\n yield this.#valList[i];\n }\n }\n }\n /**\n * Iterating over the cache itself yields the same results as\n * {@link LRUCache.entries}\n */\n [Symbol.iterator]() {\n return this.entries();\n }\n /**\n * A String value that is used in the creation of the default string description of an object.\n * Called by the built-in method Object.prototype.toString.\n */\n [Symbol.toStringTag] = 'LRUCache';\n /**\n * Find a value for which the supplied fn method returns a truthy value,\n * similar to Array.find(). fn is called as fn(value, key, cache).\n */\n find(fn, getOptions = {}) {\n for (const i of this.#indexes()) {\n const v = this.#valList[i];\n const value = this.#isBackgroundFetch(v)\n ? v.__staleWhileFetching\n : v;\n if (value === undefined)\n continue;\n if (fn(value, this.#keyList[i], this)) {\n return this.get(this.#keyList[i], getOptions);\n }\n }\n }\n /**\n * Call the supplied function on each item in the cache, in order from\n * most recently used to least recently used. fn is called as\n * fn(value, key, cache). Does not update age or recenty of use.\n * Does not iterate over stale values.\n */\n forEach(fn, thisp = this) {\n for (const i of this.#indexes()) {\n const v = this.#valList[i];\n const value = this.#isBackgroundFetch(v)\n ? v.__staleWhileFetching\n : v;\n if (value === undefined)\n continue;\n fn.call(thisp, value, this.#keyList[i], this);\n }\n }\n /**\n * The same as {@link LRUCache.forEach} but items are iterated over in\n * reverse order. (ie, less recently used items are iterated over first.)\n */\n rforEach(fn, thisp = this) {\n for (const i of this.#rindexes()) {\n const v = this.#valList[i];\n const value = this.#isBackgroundFetch(v)\n ? v.__staleWhileFetching\n : v;\n if (value === undefined)\n continue;\n fn.call(thisp, value, this.#keyList[i], this);\n }\n }\n /**\n * Delete any stale entries. Returns true if anything was removed,\n * false otherwise.\n */\n purgeStale() {\n let deleted = false;\n for (const i of this.#rindexes({ allowStale: true })) {\n if (this.#isStale(i)) {\n this.delete(this.#keyList[i]);\n deleted = true;\n }\n }\n return deleted;\n }\n /**\n * Get the extended info about a given entry, to get its value, size, and\n * TTL info simultaneously. Like {@link LRUCache#dump}, but just for a\n * single key. Always returns stale values, if their info is found in the\n * cache, so be sure to check for expired TTLs if relevant.\n */\n info(key) {\n const i = this.#keyMap.get(key);\n if (i === undefined)\n return undefined;\n const v = this.#valList[i];\n const value = this.#isBackgroundFetch(v)\n ? v.__staleWhileFetching\n : v;\n if (value === undefined)\n return undefined;\n const entry = { value };\n if (this.#ttls && this.#starts) {\n const ttl = this.#ttls[i];\n const start = this.#starts[i];\n if (ttl && start) {\n const remain = ttl - (perf.now() - start);\n entry.ttl = remain;\n entry.start = Date.now();\n }\n }\n if (this.#sizes) {\n entry.size = this.#sizes[i];\n }\n return entry;\n }\n /**\n * Return an array of [key, {@link LRUCache.Entry}] tuples which can be\n * passed to cache.load()\n */\n dump() {\n const arr = [];\n for (const i of this.#indexes({ allowStale: true })) {\n const key = this.#keyList[i];\n const v = this.#valList[i];\n const value = this.#isBackgroundFetch(v)\n ? v.__staleWhileFetching\n : v;\n if (value === undefined || key === undefined)\n continue;\n const entry = { value };\n if (this.#ttls && this.#starts) {\n entry.ttl = this.#ttls[i];\n // always dump the start relative to a portable timestamp\n // it's ok for this to be a bit slow, it's a rare operation.\n const age = perf.now() - this.#starts[i];\n entry.start = Math.floor(Date.now() - age);\n }\n if (this.#sizes) {\n entry.size = this.#sizes[i];\n }\n arr.unshift([key, entry]);\n }\n return arr;\n }\n /**\n * Reset the cache and load in the items in entries in the order listed.\n * Note that the shape of the resulting cache may be different if the\n * same options are not used in both caches.\n */\n load(arr) {\n this.clear();\n for (const [key, entry] of arr) {\n if (entry.start) {\n // entry.start is a portable timestamp, but we may be using\n // node's performance.now(), so calculate the offset, so that\n // we get the intended remaining TTL, no matter how long it's\n // been on ice.\n //\n // it's ok for this to be a bit slow, it's a rare operation.\n const age = Date.now() - entry.start;\n entry.start = perf.now() - age;\n }\n this.set(key, entry.value, entry);\n }\n }\n /**\n * Add a value to the cache.\n *\n * Note: if `undefined` is specified as a value, this is an alias for\n * {@link LRUCache#delete}\n */\n set(k, v, setOptions = {}) {\n if (v === undefined) {\n this.delete(k);\n return this;\n }\n const { ttl = this.ttl, start, noDisposeOnSet = this.noDisposeOnSet, sizeCalculation = this.sizeCalculation, status, } = setOptions;\n let { noUpdateTTL = this.noUpdateTTL } = setOptions;\n const size = this.#requireSize(k, v, setOptions.size || 0, sizeCalculation);\n // if the item doesn't fit, don't do anything\n // NB: maxEntrySize set to maxSize by default\n if (this.maxEntrySize && size > this.maxEntrySize) {\n if (status) {\n status.set = 'miss';\n status.maxEntrySizeExceeded = true;\n }\n // have to delete, in case something is there already.\n this.delete(k);\n return this;\n }\n let index = this.#size === 0 ? undefined : this.#keyMap.get(k);\n if (index === undefined) {\n // addition\n index = (this.#size === 0\n ? this.#tail\n : this.#free.length !== 0\n ? this.#free.pop()\n : this.#size === this.#max\n ? this.#evict(false)\n : this.#size);\n this.#keyList[index] = k;\n this.#valList[index] = v;\n this.#keyMap.set(k, index);\n this.#next[this.#tail] = index;\n this.#prev[index] = this.#tail;\n this.#tail = index;\n this.#size++;\n this.#addItemSize(index, size, status);\n if (status)\n status.set = 'add';\n noUpdateTTL = false;\n }\n else {\n // update\n this.#moveToTail(index);\n const oldVal = this.#valList[index];\n if (v !== oldVal) {\n if (this.#hasFetchMethod && this.#isBackgroundFetch(oldVal)) {\n oldVal.__abortController.abort(new Error('replaced'));\n const { __staleWhileFetching: s } = oldVal;\n if (s !== undefined && !noDisposeOnSet) {\n if (this.#hasDispose) {\n this.#dispose?.(s, k, 'set');\n }\n if (this.#hasDisposeAfter) {\n this.#disposed?.push([s, k, 'set']);\n }\n }\n }\n else if (!noDisposeOnSet) {\n if (this.#hasDispose) {\n this.#dispose?.(oldVal, k, 'set');\n }\n if (this.#hasDisposeAfter) {\n this.#disposed?.push([oldVal, k, 'set']);\n }\n }\n this.#removeItemSize(index);\n this.#addItemSize(index, size, status);\n this.#valList[index] = v;\n if (status) {\n status.set = 'replace';\n const oldValue = oldVal && this.#isBackgroundFetch(oldVal)\n ? oldVal.__staleWhileFetching\n : oldVal;\n if (oldValue !== undefined)\n status.oldValue = oldValue;\n }\n }\n else if (status) {\n status.set = 'update';\n }\n }\n if (ttl !== 0 && !this.#ttls) {\n this.#initializeTTLTracking();\n }\n if (this.#ttls) {\n if (!noUpdateTTL) {\n this.#setItemTTL(index, ttl, start);\n }\n if (status)\n this.#statusTTL(status, index);\n }\n if (!noDisposeOnSet && this.#hasDisposeAfter && this.#disposed) {\n const dt = this.#disposed;\n let task;\n while ((task = dt?.shift())) {\n this.#disposeAfter?.(...task);\n }\n }\n return this;\n }\n /**\n * Evict the least recently used item, returning its value or\n * `undefined` if cache is empty.\n */\n pop() {\n try {\n while (this.#size) {\n const val = this.#valList[this.#head];\n this.#evict(true);\n if (this.#isBackgroundFetch(val)) {\n if (val.__staleWhileFetching) {\n return val.__staleWhileFetching;\n }\n }\n else if (val !== undefined) {\n return val;\n }\n }\n }\n finally {\n if (this.#hasDisposeAfter && this.#disposed) {\n const dt = this.#disposed;\n let task;\n while ((task = dt?.shift())) {\n this.#disposeAfter?.(...task);\n }\n }\n }\n }\n #evict(free) {\n const head = this.#head;\n const k = this.#keyList[head];\n const v = this.#valList[head];\n if (this.#hasFetchMethod && this.#isBackgroundFetch(v)) {\n v.__abortController.abort(new Error('evicted'));\n }\n else if (this.#hasDispose || this.#hasDisposeAfter) {\n if (this.#hasDispose) {\n this.#dispose?.(v, k, 'evict');\n }\n if (this.#hasDisposeAfter) {\n this.#disposed?.push([v, k, 'evict']);\n }\n }\n this.#removeItemSize(head);\n // if we aren't about to use the index, then null these out\n if (free) {\n this.#keyList[head] = undefined;\n this.#valList[head] = undefined;\n this.#free.push(head);\n }\n if (this.#size === 1) {\n this.#head = this.#tail = 0;\n this.#free.length = 0;\n }\n else {\n this.#head = this.#next[head];\n }\n this.#keyMap.delete(k);\n this.#size--;\n return head;\n }\n /**\n * Check if a key is in the cache, without updating the recency of use.\n * Will return false if the item is stale, even though it is technically\n * in the cache.\n *\n * Will not update item age unless\n * {@link LRUCache.OptionsBase.updateAgeOnHas} is set.\n */\n has(k, hasOptions = {}) {\n const { updateAgeOnHas = this.updateAgeOnHas, status } = hasOptions;\n const index = this.#keyMap.get(k);\n if (index !== undefined) {\n const v = this.#valList[index];\n if (this.#isBackgroundFetch(v) &&\n v.__staleWhileFetching === undefined) {\n return false;\n }\n if (!this.#isStale(index)) {\n if (updateAgeOnHas) {\n this.#updateItemAge(index);\n }\n if (status) {\n status.has = 'hit';\n this.#statusTTL(status, index);\n }\n return true;\n }\n else if (status) {\n status.has = 'stale';\n this.#statusTTL(status, index);\n }\n }\n else if (status) {\n status.has = 'miss';\n }\n return false;\n }\n /**\n * Like {@link LRUCache#get} but doesn't update recency or delete stale\n * items.\n *\n * Returns `undefined` if the item is stale, unless\n * {@link LRUCache.OptionsBase.allowStale} is set.\n */\n peek(k, peekOptions = {}) {\n const { allowStale = this.allowStale } = peekOptions;\n const index = this.#keyMap.get(k);\n if (index === undefined ||\n (!allowStale && this.#isStale(index))) {\n return;\n }\n const v = this.#valList[index];\n // either stale and allowed, or forcing a refresh of non-stale value\n return this.#isBackgroundFetch(v) ? v.__staleWhileFetching : v;\n }\n #backgroundFetch(k, index, options, context) {\n const v = index === undefined ? undefined : this.#valList[index];\n if (this.#isBackgroundFetch(v)) {\n return v;\n }\n const ac = new AC();\n const { signal } = options;\n // when/if our AC signals, then stop listening to theirs.\n signal?.addEventListener('abort', () => ac.abort(signal.reason), {\n signal: ac.signal,\n });\n const fetchOpts = {\n signal: ac.signal,\n options,\n context,\n };\n const cb = (v, updateCache = false) => {\n const { aborted } = ac.signal;\n const ignoreAbort = options.ignoreFetchAbort && v !== undefined;\n if (options.status) {\n if (aborted && !updateCache) {\n options.status.fetchAborted = true;\n options.status.fetchError = ac.signal.reason;\n if (ignoreAbort)\n options.status.fetchAbortIgnored = true;\n }\n else {\n options.status.fetchResolved = true;\n }\n }\n if (aborted && !ignoreAbort && !updateCache) {\n return fetchFail(ac.signal.reason);\n }\n // either we didn't abort, and are still here, or we did, and ignored\n const bf = p;\n if (this.#valList[index] === p) {\n if (v === undefined) {\n if (bf.__staleWhileFetching) {\n this.#valList[index] = bf.__staleWhileFetching;\n }\n else {\n this.delete(k);\n }\n }\n else {\n if (options.status)\n options.status.fetchUpdated = true;\n this.set(k, v, fetchOpts.options);\n }\n }\n return v;\n };\n const eb = (er) => {\n if (options.status) {\n options.status.fetchRejected = true;\n options.status.fetchError = er;\n }\n return fetchFail(er);\n };\n const fetchFail = (er) => {\n const { aborted } = ac.signal;\n const allowStaleAborted = aborted && options.allowStaleOnFetchAbort;\n const allowStale = allowStaleAborted || options.allowStaleOnFetchRejection;\n const noDelete = allowStale || options.noDeleteOnFetchRejection;\n const bf = p;\n if (this.#valList[index] === p) {\n // if we allow stale on fetch rejections, then we need to ensure that\n // the stale value is not removed from the cache when the fetch fails.\n const del = !noDelete || bf.__staleWhileFetching === undefined;\n if (del) {\n this.delete(k);\n }\n else if (!allowStaleAborted) {\n // still replace the *promise* with the stale value,\n // since we are done with the promise at this point.\n // leave it untouched if we're still waiting for an\n // aborted background fetch that hasn't yet returned.\n this.#valList[index] = bf.__staleWhileFetching;\n }\n }\n if (allowStale) {\n if (options.status && bf.__staleWhileFetching !== undefined) {\n options.status.returnedStale = true;\n }\n return bf.__staleWhileFetching;\n }\n else if (bf.__returned === bf) {\n throw er;\n }\n };\n const pcall = (res, rej) => {\n const fmp = this.#fetchMethod?.(k, v, fetchOpts);\n if (fmp && fmp instanceof Promise) {\n fmp.then(v => res(v === undefined ? undefined : v), rej);\n }\n // ignored, we go until we finish, regardless.\n // defer check until we are actually aborting,\n // so fetchMethod can override.\n ac.signal.addEventListener('abort', () => {\n if (!options.ignoreFetchAbort ||\n options.allowStaleOnFetchAbort) {\n res(undefined);\n // when it eventually resolves, update the cache.\n if (options.allowStaleOnFetchAbort) {\n res = v => cb(v, true);\n }\n }\n });\n };\n if (options.status)\n options.status.fetchDispatched = true;\n const p = new Promise(pcall).then(cb, eb);\n const bf = Object.assign(p, {\n __abortController: ac,\n __staleWhileFetching: v,\n __returned: undefined,\n });\n if (index === undefined) {\n // internal, don't expose status.\n this.set(k, bf, { ...fetchOpts.options, status: undefined });\n index = this.#keyMap.get(k);\n }\n else {\n this.#valList[index] = bf;\n }\n return bf;\n }\n #isBackgroundFetch(p) {\n if (!this.#hasFetchMethod)\n return false;\n const b = p;\n return (!!b &&\n b instanceof Promise &&\n b.hasOwnProperty('__staleWhileFetching') &&\n b.__abortController instanceof AC);\n }\n async fetch(k, fetchOptions = {}) {\n const { \n // get options\n allowStale = this.allowStale, updateAgeOnGet = this.updateAgeOnGet, noDeleteOnStaleGet = this.noDeleteOnStaleGet, \n // set options\n ttl = this.ttl, noDisposeOnSet = this.noDisposeOnSet, size = 0, sizeCalculation = this.sizeCalculation, noUpdateTTL = this.noUpdateTTL, \n // fetch exclusive options\n noDeleteOnFetchRejection = this.noDeleteOnFetchRejection, allowStaleOnFetchRejection = this.allowStaleOnFetchRejection, ignoreFetchAbort = this.ignoreFetchAbort, allowStaleOnFetchAbort = this.allowStaleOnFetchAbort, context, forceRefresh = false, status, signal, } = fetchOptions;\n if (!this.#hasFetchMethod) {\n if (status)\n status.fetch = 'get';\n return this.get(k, {\n allowStale,\n updateAgeOnGet,\n noDeleteOnStaleGet,\n status,\n });\n }\n const options = {\n allowStale,\n updateAgeOnGet,\n noDeleteOnStaleGet,\n ttl,\n noDisposeOnSet,\n size,\n sizeCalculation,\n noUpdateTTL,\n noDeleteOnFetchRejection,\n allowStaleOnFetchRejection,\n allowStaleOnFetchAbort,\n ignoreFetchAbort,\n status,\n signal,\n };\n let index = this.#keyMap.get(k);\n if (index === undefined) {\n if (status)\n status.fetch = 'miss';\n const p = this.#backgroundFetch(k, index, options, context);\n return (p.__returned = p);\n }\n else {\n // in cache, maybe already fetching\n const v = this.#valList[index];\n if (this.#isBackgroundFetch(v)) {\n const stale = allowStale && v.__staleWhileFetching !== undefined;\n if (status) {\n status.fetch = 'inflight';\n if (stale)\n status.returnedStale = true;\n }\n return stale ? v.__staleWhileFetching : (v.__returned = v);\n }\n // if we force a refresh, that means do NOT serve the cached value,\n // unless we are already in the process of refreshing the cache.\n const isStale = this.#isStale(index);\n if (!forceRefresh && !isStale) {\n if (status)\n status.fetch = 'hit';\n this.#moveToTail(index);\n if (updateAgeOnGet) {\n this.#updateItemAge(index);\n }\n if (status)\n this.#statusTTL(status, index);\n return v;\n }\n // ok, it is stale or a forced refresh, and not already fetching.\n // refresh the cache.\n const p = this.#backgroundFetch(k, index, options, context);\n const hasStale = p.__staleWhileFetching !== undefined;\n const staleVal = hasStale && allowStale;\n if (status) {\n status.fetch = isStale ? 'stale' : 'refresh';\n if (staleVal && isStale)\n status.returnedStale = true;\n }\n return staleVal ? p.__staleWhileFetching : (p.__returned = p);\n }\n }\n /**\n * Return a value from the cache. Will update the recency of the cache\n * entry found.\n *\n * If the key is not found, get() will return `undefined`.\n */\n get(k, getOptions = {}) {\n const { allowStale = this.allowStale, updateAgeOnGet = this.updateAgeOnGet, noDeleteOnStaleGet = this.noDeleteOnStaleGet, status, } = getOptions;\n const index = this.#keyMap.get(k);\n if (index !== undefined) {\n const value = this.#valList[index];\n const fetching = this.#isBackgroundFetch(value);\n if (status)\n this.#statusTTL(status, index);\n if (this.#isStale(index)) {\n if (status)\n status.get = 'stale';\n // delete only if not an in-flight background fetch\n if (!fetching) {\n if (!noDeleteOnStaleGet) {\n this.delete(k);\n }\n if (status && allowStale)\n status.returnedStale = true;\n return allowStale ? value : undefined;\n }\n else {\n if (status &&\n allowStale &&\n value.__staleWhileFetching !== undefined) {\n status.returnedStale = true;\n }\n return allowStale ? value.__staleWhileFetching : undefined;\n }\n }\n else {\n if (status)\n status.get = 'hit';\n // if we're currently fetching it, we don't actually have it yet\n // it's not stale, which means this isn't a staleWhileRefetching.\n // If it's not stale, and fetching, AND has a __staleWhileFetching\n // value, then that means the user fetched with {forceRefresh:true},\n // so it's safe to return that value.\n if (fetching) {\n return value.__staleWhileFetching;\n }\n this.#moveToTail(index);\n if (updateAgeOnGet) {\n this.#updateItemAge(index);\n }\n return value;\n }\n }\n else if (status) {\n status.get = 'miss';\n }\n }\n #connect(p, n) {\n this.#prev[n] = p;\n this.#next[p] = n;\n }\n #moveToTail(index) {\n // if tail already, nothing to do\n // if head, move head to next[index]\n // else\n // move next[prev[index]] to next[index] (head has no prev)\n // move prev[next[index]] to prev[index]\n // prev[index] = tail\n // next[tail] = index\n // tail = index\n if (index !== this.#tail) {\n if (index === this.#head) {\n this.#head = this.#next[index];\n }\n else {\n this.#connect(this.#prev[index], this.#next[index]);\n }\n this.#connect(this.#tail, index);\n this.#tail = index;\n }\n }\n /**\n * Deletes a key out of the cache.\n * Returns true if the key was deleted, false otherwise.\n */\n delete(k) {\n let deleted = false;\n if (this.#size !== 0) {\n const index = this.#keyMap.get(k);\n if (index !== undefined) {\n deleted = true;\n if (this.#size === 1) {\n this.clear();\n }\n else {\n this.#removeItemSize(index);\n const v = this.#valList[index];\n if (this.#isBackgroundFetch(v)) {\n v.__abortController.abort(new Error('deleted'));\n }\n else if (this.#hasDispose || this.#hasDisposeAfter) {\n if (this.#hasDispose) {\n this.#dispose?.(v, k, 'delete');\n }\n if (this.#hasDisposeAfter) {\n this.#disposed?.push([v, k, 'delete']);\n }\n }\n this.#keyMap.delete(k);\n this.#keyList[index] = undefined;\n this.#valList[index] = undefined;\n if (index === this.#tail) {\n this.#tail = this.#prev[index];\n }\n else if (index === this.#head) {\n this.#head = this.#next[index];\n }\n else {\n const pi = this.#prev[index];\n this.#next[pi] = this.#next[index];\n const ni = this.#next[index];\n this.#prev[ni] = this.#prev[index];\n }\n this.#size--;\n this.#free.push(index);\n }\n }\n }\n if (this.#hasDisposeAfter && this.#disposed?.length) {\n const dt = this.#disposed;\n let task;\n while ((task = dt?.shift())) {\n this.#disposeAfter?.(...task);\n }\n }\n return deleted;\n }\n /**\n * Clear the cache entirely, throwing away all values.\n */\n clear() {\n for (const index of this.#rindexes({ allowStale: true })) {\n const v = this.#valList[index];\n if (this.#isBackgroundFetch(v)) {\n v.__abortController.abort(new Error('deleted'));\n }\n else {\n const k = this.#keyList[index];\n if (this.#hasDispose) {\n this.#dispose?.(v, k, 'delete');\n }\n if (this.#hasDisposeAfter) {\n this.#disposed?.push([v, k, 'delete']);\n }\n }\n }\n this.#keyMap.clear();\n this.#valList.fill(undefined);\n this.#keyList.fill(undefined);\n if (this.#ttls && this.#starts) {\n this.#ttls.fill(0);\n this.#starts.fill(0);\n }\n if (this.#sizes) {\n this.#sizes.fill(0);\n }\n this.#head = 0;\n this.#tail = 0;\n this.#free.length = 0;\n this.#calculatedSize = 0;\n this.#size = 0;\n if (this.#hasDisposeAfter && this.#disposed) {\n const dt = this.#disposed;\n let task;\n while ((task = dt?.shift())) {\n this.#disposeAfter?.(...task);\n }\n }\n }\n}\n//# sourceMappingURL=index.js.map","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.getMDXComponent = getMDXComponent;\nexports.getMDXExport = getMDXExport;\nvar React = _interopRequireWildcard(require(\"react\"));\nvar _jsx_runtime = _interopRequireWildcard(require(\"react/jsx-runtime\"));\nvar ReactDOM = _interopRequireWildcard(require(\"react-dom\"));\nfunction _getRequireWildcardCache(e) { if (\"function\" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }\nfunction _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || \"object\" != typeof e && \"function\" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if (\"default\" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }\n/**\n * @typedef {import('./types').MDXContentProps} MDXContentProps\n */\n\n/**\n *\n * @param {string} code - The string of code you got from bundleMDX\n * @param {Record<string, unknown>} [globals] - Any variables your MDX needs to have accessible when it runs\n * @return {React.FunctionComponent<MDXContentProps>}\n */\nfunction getMDXComponent(code, globals) {\n const mdxExport = getMDXExport(code, globals);\n return mdxExport.default;\n}\n\n/**\n * @template ExportedObject\n * @template Frontmatter\n * @type {import('./types').MDXExportFunction<ExportedObject, Frontmatter>}\n * @param {string} code - The string of code you got from bundleMDX\n * @param {Record<string, unknown>} [globals] - Any variables your MDX needs to have accessible when it runs\n *\n */\nfunction getMDXExport(code, globals) {\n const scope = {\n React,\n ReactDOM,\n _jsx_runtime,\n ...globals\n };\n // eslint-disable-next-line\n const fn = new Function(...Object.keys(scope), code);\n return fn(...Object.values(scope));\n}","module.exports = require('../dist/client')\n","import { Link, useLoaderData } from '@remix-run/react'\nimport { clsx } from 'clsx'\nimport { LRUCache } from 'lru-cache'\nimport { type MDXContentProps } from 'mdx-bundler/client'\nimport * as mdxBundler from 'mdx-bundler/client/index.js'\nimport { useEffect, useMemo, useState } from 'react'\nimport { AnchorOrLink, Heading, cn } from './misc.tsx'\nimport { VideoEmbed, DeferredEpicVideo } from '#app/components/epic-video.tsx'\nimport { Icon } from '#app/components/icons.tsx'\nimport { type loader } from '#app/routes/_app+/_exercises+/$exerciseNumber_.$stepNumber.$type+/_layout.tsx'\nimport { LaunchEditor } from '#app/routes/launch-editor.tsx'\n\nconst safePath = (s: string) => s.replace(/\\\\/g, '/')\n\nfunction getRelativePath(file: string, separator: string, type?: string) {\n\tconst [, relativePath] = file\n\t\t.replace(/\\\\|\\//g, separator)\n\t\t.split(`${type === 'playground' ? 'example' : 'exercises'}${separator}`)\n\treturn relativePath\n}\n\nconst buttonClassName =\n\t'border-border bg-[var(--shiki-background)] hover:bg-foreground/20 active:bg-foreground/30 box-content block rounded border-2 px-2 py-0.5 font-mono text-xs font-semibold outline-none transition duration-300 ease-in-out'\n\ntype DataProps = {\n\t'data-buttons'?: string\n\t'data-filename'?: string\n\t'data-fullpath'?: string\n\t'data-nocopy'?: string\n\t'data-sep'?: string\n\t'data-start'?: string\n\t'data-type'?: string\n}\n\nfunction OpenInEditor({\n\t'data-buttons': buttons,\n\t'data-filename': filename,\n\t'data-fullpath': fullPath,\n\t'data-sep': separator = '/',\n\t'data-start': start,\n\t'data-type': type,\n}: DataProps) {\n\tconst data = useLoaderData<typeof loader>()\n\n\tif (type === 'other' || !buttons || !filename || !fullPath) return null\n\n\tconst currentAppFullPath = safePath(data[data.type]?.fullPath ?? '')\n\tconst isFileFromDifferentApp = !fullPath.startsWith(currentAppFullPath)\n\tconst validButtons = ENV.EPICSHOP_DEPLOYED\n\t\t? (['problem', 'solution'] as const)\n\t\t: (['problem', 'solution', 'playground'] as const)\n\tconst buttonList = buttons.split(',')\n\tconst apps = validButtons.filter(button => buttonList.includes(button))\n\n\treturn (\n\t\t<>\n\t\t\t{apps.map(type => {\n\t\t\t\tconst app = data[type]\n\t\t\t\tif (type === 'playground') {\n\t\t\t\t\tconst isDifferentApp =\n\t\t\t\t\t\tdata.playground && data.playground.appName !== data.problem?.name\n\t\t\t\t\tif (!app || isDifferentApp || isFileFromDifferentApp) {\n\t\t\t\t\t\treturn (\n\t\t\t\t\t\t\t<button\n\t\t\t\t\t\t\t\tkey={type}\n\t\t\t\t\t\t\t\tclassName={clsx(buttonClassName, 'cursor-not-allowed')}\n\t\t\t\t\t\t\t\ttitle={\n\t\t\t\t\t\t\t\t\tisDifferentApp\n\t\t\t\t\t\t\t\t\t\t? 'Playground is not set to the right app'\n\t\t\t\t\t\t\t\t\t\t: isFileFromDifferentApp\n\t\t\t\t\t\t\t\t\t\t\t? 'This file is from different app'\n\t\t\t\t\t\t\t\t\t\t\t: \"You must 'Set to Playground' before opening a file\"\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t<span className=\"uppercase\">Open</span> in {type}\n\t\t\t\t\t\t\t</button>\n\t\t\t\t\t\t)\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tif (!app || !app.fullPath) {\n\t\t\t\t\t// unexpected\n\t\t\t\t\treturn null\n\t\t\t\t}\n\n\t\t\t\tconst file = [safePath(app.fullPath), safePath(filename)].join(\n\t\t\t\t\tseparator,\n\t\t\t\t)\n\t\t\t\tconst fixedTitle = getRelativePath(file, separator, type)\n\t\t\t\treturn (\n\t\t\t\t\t<LaunchEditor key={type} file={file} line={Number(start ?? 1)}>\n\t\t\t\t\t\t<span title={fixedTitle} className={buttonClassName}>\n\t\t\t\t\t\t\t<span className=\"uppercase\">Open</span> in {type}\n\t\t\t\t\t\t</span>\n\t\t\t\t\t</LaunchEditor>\n\t\t\t\t)\n\t\t\t})}\n\t\t</>\n\t)\n}\n\nfunction CopyButton(): React.ReactNode {\n\tconst [copied, setCopied] = useState(false)\n\n\tuseEffect(() => {\n\t\tif (copied) {\n\t\t\tconst timeoutId = setTimeout(() => setCopied(false), 1500)\n\t\t\treturn () => clearTimeout(timeoutId)\n\t\t}\n\t}, [copied])\n\n\treturn (\n\t\t<button\n\t\t\tclassName={cn(buttonClassName, 'w-12 uppercase')}\n\t\t\tonClick={event => {\n\t\t\t\tsetCopied(true)\n\t\t\t\tconst button = event.currentTarget\n\t\t\t\tconst code =\n\t\t\t\t\tbutton.parentElement?.parentElement?.querySelector('pre')\n\t\t\t\t\t\t?.textContent || ''\n\t\t\t\tvoid navigator.clipboard.writeText(code)\n\t\t\t}}\n\t\t>\n\t\t\t{copied ? 'copied' : 'copy'}\n\t\t</button>\n\t)\n}\n\nexport function PreWithButtons({ children, ...props }: any) {\n\tconst {\n\t\t'data-buttons': buttons,\n\t\t'data-filename': filename,\n\t\t'data-fullpath': fullPath,\n\t\t'data-nocopy': hideCopyButton,\n\t\t'data-sep': separator,\n\t} = props as DataProps\n\tconst showCopyButton = hideCopyButton === undefined\n\n\tfunction updateFilename() {\n\t\tif (fullPath && separator) {\n\t\t\tif (!filename || filename.includes('..')) {\n\t\t\t\treturn { 'data-filename': getRelativePath(fullPath, separator) }\n\t\t\t} else {\n\t\t\t\treturn { 'data-filename': filename.replace(/\\//g, separator) }\n\t\t\t}\n\t\t}\n\t}\n\n\treturn (\n\t\t<div className=\"group relative\">\n\t\t\t<div className=\"absolute right-0 top-0 z-50 m-2 flex items-baseline justify-end gap-4 opacity-0 transition duration-300 ease-in-out focus-within:opacity-100 group-hover:opacity-100\">\n\t\t\t\t{buttons ? <OpenInEditor {...props} /> : null}\n\t\t\t\t{showCopyButton ? <CopyButton /> : null}\n\t\t\t</div>\n\t\t\t<pre\n\t\t\t\t{...props}\n\t\t\t\tclassName={clsx(\n\t\t\t\t\t'scrollbar-thin scrollbar-thumb-scrollbar',\n\t\t\t\t\t// eslint-disable-next-line @typescript-eslint/no-unsafe-argument, @typescript-eslint/no-unsafe-member-access\n\t\t\t\t\tprops.className ?? '',\n\t\t\t\t)}\n\t\t\t\t{...updateFilename()}\n\t\t\t>\n\t\t\t\t{children}\n\t\t\t</pre>\n\t\t</div>\n\t)\n}\n\nexport const mdxComponents = {\n\th1: (props: any) => <Heading {...props} as=\"h1\" />,\n\th2: (props: any) => <Heading {...props} as=\"h2\" />,\n\th3: (props: any) => <Heading {...props} as=\"h3\" />,\n\th4: (props: any) => <Heading {...props} as=\"h4\" />,\n\th5: (props: any) => <Heading {...props} as=\"h5\" />,\n\th6: (props: any) => <Heading {...props} as=\"h6\" />,\n\ta: AnchorOrLink,\n\t// you can't put a <form> inside a <p> so we'll just use a div\n\t// if this is a problem, then render the form outside of the MDX and update <LaunchEditor /> to reference that one instead or something.\n\tp: (props: any) => <div {...props} />,\n\tpre: (props: any) => (\n\t\t<pre\n\t\t\t{...props}\n\t\t\tclassName={clsx(\n\t\t\t\t'scrollbar-thin scrollbar-thumb-scrollbar',\n\t\t\t\t// eslint-disable-next-line @typescript-eslint/no-unsafe-argument, @typescript-eslint/no-unsafe-member-access\n\t\t\t\tprops.className ?? '',\n\t\t\t)}\n\t\t/>\n\t),\n\tLaunchEditor,\n\tVideoEmbed,\n\tEpicVideo: DeferredEpicVideo,\n}\n\n/**\n * This should be rendered within a useMemo\n * @param code the code to get the component from\n * @returns the component\n */\nfunction getMdxComponent(code: string) {\n\tconst Component = mdxBundler.getMDXComponent(code)\n\tfunction EpicMdxComponent({\n\t\tcomponents: externalComponents,\n\t\t...rest\n\t}: Parameters<typeof Component>['0']) {\n\t\tconst components = useMemo(\n\t\t\t() => ({ ...mdxComponents, ...externalComponents }),\n\t\t\t[externalComponents],\n\t\t)\n\t\treturn <Component components={components} {...rest} />\n\t}\n\treturn EpicMdxComponent\n}\n\n// This exists so we don't have to call new Function for the given code\n// for every request for a given blog post/mdx file.\nconst mdxComponentCache = new LRUCache<\n\tstring,\n\tReturnType<typeof getMdxComponent>\n>({ max: 1000 })\n\nexport function useMdxComponent(code: string) {\n\treturn useMemo(() => {\n\t\tif (mdxComponentCache.has(code)) {\n\t\t\treturn mdxComponentCache.get(code)!\n\t\t}\n\t\tconst component = getMdxComponent(code)\n\t\tmdxComponentCache.set(code, component)\n\t\treturn component\n\t}, [code])\n}\n\nexport function Mdx({\n\tcode,\n\tcomponents: externalComponents,\n}: {\n\tcode: string\n\tcomponents?: MDXContentProps['components']\n}) {\n\tconst Component = useMdxComponent(code)\n\tconst components = useMemo(\n\t\t() => ({ Icon, pre: PreWithButtons, Link, ...externalComponents }),\n\t\t[externalComponents],\n\t)\n\treturn <Component components={components} />\n}\n"],"names":["useApps","data","useRouteLoaderData","useLaunchFetcher","onUpdate","fetcher","useFetcher","useEffect","state","LaunchEditorImpl","file","appFile","appName","syncTo","line","column","children","fileList","type","syncToType","jsxs","Form","action","method","className","showProgressBarField","name","value","map","jsx","Fragment","clsx","status","LaunchGitHub","apps","requestInfo","useRequestInfo","Array","isArray","safePath","s","replace","href","ENV","EPICSHOP_CONTEXT_CWD","EPICSHOP_GITHUB_ROOT","rel","target","app","find","a","path","relativePath","split","separator","join","EditFileOnGitHub","handleClick","e","altKey","EPICSHOP_DEPLOYED","preventDefault","formData","FormData","append","submit","githubPath","Link","onClick","to","LaunchEditor","SimpleTooltip","content","perf","warned","PROCESS","emitWarning","msg","code","fn","AC","AS","__publicField","_","warnACPolyfill","reason","_b","_a","printACPolyfillWarning","shouldWarn","isPosInt","getUintArray","max","ZeroArray","size","_Stack","HeapCls","__privateGet","_constructing","__privateSet","n","__privateAdd","Stack","_LRUCache","options","_initializeTTLTracking","_initializeSizeTracking","_indexes","_rindexes","_isValidIndex","_evict","_backgroundFetch","_isBackgroundFetch","_connect","_moveToTail","_max","_maxSize","_dispose","_disposeAfter","_fetchMethod","_size","_calculatedSize","_keyMap","_keyList","_valList","_next","_prev","_head","_tail","_free","_disposed","_sizes","_starts","_ttls","_hasDispose","_hasFetchMethod","_hasDisposeAfter","_updateItemAge","_statusTTL","_setItemTTL","_isStale","_removeItemSize","_i","_addItemSize","_s","_st","_requireSize","_k","_v","sizeCalculation","ttl","ttlResolution","ttlAutopurge","updateAgeOnGet","updateAgeOnHas","allowStale","dispose","disposeAfter","noDisposeOnSet","noUpdateTTL","maxSize","maxEntrySize","fetchMethod","noDeleteOnFetchRejection","noDeleteOnStaleGet","allowStaleOnFetchRejection","allowStaleOnFetchAbort","ignoreFetchAbort","UintArray","__privateMethod","initializeSizeTracking_fn","initializeTTLTracking_fn","c","p","isBackgroundFetch_fn","k","index","context","backgroundFetch_fn","moveToTail_fn","indexes_fn","rindexes_fn","key","i","getOptions","v","thisp","deleted","entry","start","remain","arr","age","setOptions","evict_fn","__privateWrapper","oldVal","_c","_d","oldValue","dt","task","_e","val","hasOptions","peekOptions","fetchOptions","forceRefresh","signal","stale","isStale","staleVal","fetching","pi","ni","ttls","starts","t","cachedNow","getNow","sizes","isValidIndex_fn","free","head","ac","fetchOpts","cb","updateCache","aborted","ignoreAbort","fetchFail","bf","eb","er","allowStaleAborted","noDelete","pcall","res","rej","fmp","b","connect_fn","LRUCache","client","getMDXComponent","getMDXExport","React","_interopRequireWildcard","require$$0","_jsx_runtime","require$$1","ReactDOM","require$$2","_getRequireWildcardCache","r","u","globals","scope","getRelativePath","buttonClassName","OpenInEditor","buttons","filename","fullPath","useLoaderData","currentAppFullPath","isFileFromDifferentApp","validButtons","buttonList","button","isDifferentApp","fixedTitle","CopyButton","copied","setCopied","useState","timeoutId","cn","event","PreWithButtons","props","hideCopyButton","showCopyButton","updateFilename","mdxComponents","Heading","AnchorOrLink","VideoEmbed","DeferredEpicVideo","getMdxComponent","Component","mdxBundler.getMDXComponent","EpicMdxComponent","externalComponents","rest","components","useMemo","mdxComponentCache","useMdxComponent","component","Mdx","Icon"],"mappings":"whCAGO,SAASA,IAAU,CACnB,MAAAC,EAAOC,GAAsC,MAAM,EACzD,GAAI,CAACD,EACE,MAAA,IAAI,MAAM,qDAAqD,EAEtE,OAAOA,EAAK,IACb,CCoLA,SAASE,GAAiBC,EAAkD,CAC3E,MAAMC,EAAUC,KAEhBC,OAAAA,GAAAA,UAAU,IAAM,CACXF,EAAQG,QAAU,QAAUH,EAAQJ,MAAQ,OAC/CG,GAAAA,MAA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GAAG2P,EACJ,UAAWzP,GACV,2CAEAyP,EAAM,WAAa,EACpB,CAAA,CACD,EAED,aAAAlN,GACA,WAAAyN,GACA,UAAWC,EACZ,EAOA,SAASC,GAAgBnN,EAAc,CAChC,MAAAoN,EAAYC,mBAA2BrN,CAAI,EACjD,SAASsN,EAAiB,CACzB,WAAYC,EACZ,GAAGC,CAAA,EACkC,CACrC,MAAMC,EAAaC,GAAA,QAClB,KAAO,CAAE,GAAGZ,GAAe,GAAGS,IAC9B,CAACA,CAAkB,CAAA,EAEpB,OAAQxQ,EAAAA,IAAAqQ,EAAA,CAAU,WAAAK,EAAyB,GAAGD,CAAM,CAAA,CACrD,CACO,OAAAF,CACR,CAIA,MAAMK,GAAoB,IAAIvD,GAG5B,CAAE,IAAK,GAAM,CAAA,EAER,SAASwD,GAAgB5N,EAAc,CAC7C,OAAO0N,WAAQ,IAAM,CAChB,GAAAC,GAAkB,IAAI3N,CAAI,EACtB,OAAA2N,GAAkB,IAAI3N,CAAI,EAE5B,MAAA6N,EAAYV,GAAgBnN,CAAI,EACpB,OAAA2N,GAAA,IAAI3N,EAAM6N,CAAS,EAC9BA,CAAA,EACL,CAAC7N,CAAI,CAAC,CACV,CAEO,SAAS8N,GAAI,CACnB,KAAA9N,EACA,WAAYuN,CACb,EAGG,CACI,MAAAH,EAAYQ,GAAgB5N,CAAI,EAChCyN,EAAaC,GAAA,QAClB,KAAO,CAAE,KAAAK,GAAM,IAAKtB,GAAgB,KAAApN,GAAM,GAAGkO,IAC7C,CAACA,CAAkB,CAAA,EAEb,OAAAxQ,MAACqQ,GAAU,WAAAK,CAAwB,CAAA,CAC3C","x_google_ignoreList":[2,3,4]}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{r as P,j as N,u as ki,c as Bi}from"./index-D6ygCrVn.js";import{c as nn}from"./clsx-B-dksMZM.js";import{b as ji,d as Oi,a as Ii}from"./components-C5xBZAiL.js";const fs=P.createContext({transformPagePoint:t=>t,isStatic:!1,reducedMotion:"never"}),Kt=P.createContext({}),we=P.createContext(null),Ae=typeof document<"u",Ni=Ae?P.useLayoutEffect:P.useEffect,ds=P.createContext({strict:!1}),Ce=t=>t.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),Ui="framerAppearId",ms="data-"+Ce(Ui),Ki={skipAnimations:!1,useManualTiming:!1};class sn{constructor(){this.order=[],this.scheduled=new Set}add(e){if(!this.scheduled.has(e))return this.scheduled.add(e),this.order.push(e),!0}remove(e){const n=this.order.indexOf(e);n!==-1&&(this.order.splice(n,1),this.scheduled.delete(e))}clear(){this.order.length=0,this.scheduled.clear()}}function Wi(t){let e=new sn,n=new sn,s=0,i=!1,o=!1;const r=new WeakSet,a={schedule:(l,u=!1,c=!1)=>{const h=c&&i,f=h?e:n;return u&&r.add(l),f.add(l)&&h&&i&&(s=e.order.length),l},cancel:l=>{n.remove(l),r.delete(l)},process:l=>{if(i){o=!0;return}if(i=!0,[e,n]=[n,e],n.clear(),s=e.order.length,s)for(let u=0;u<s;u++){const c=e.order[u];r.has(c)&&(a.schedule(c),t()),c(l)}i=!1,o&&(o=!1,a.process(l))}};return a}const Mt=["read","resolveKeyframes","update","preRender","render","postRender"],$i=40;function ps(t,e){let n=!1,s=!0;const i={delta:0,timestamp:0,isProcessing:!1},o=Mt.reduce((h,f)=>(h[f]=Wi(()=>n=!0),h),{}),r=h=>{o[h].process(i)},a=()=>{const h=performance.now();n=!1,i.delta=s?1e3/60:Math.max(Math.min(h-i.timestamp,$i),1),i.timestamp=h,i.isProcessing=!0,Mt.forEach(r),i.isProcessing=!1,n&&e&&(s=!1,t(a))},l=()=>{n=!0,s=!0,i.isProcessing||t(a)};return{schedule:Mt.reduce((h,f)=>{const d=o[f];return h[f]=(m,p=!1,y=!1)=>(n||l(),d.schedule(m,p,y)),h},{}),cancel:h=>Mt.forEach(f=>o[f].cancel(h)),state:i,steps:o}}const{schedule:De,cancel:nu}=ps(queueMicrotask,!1);function Gi(t,e,n,s){const{visualElement:i}=P.useContext(Kt),o=P.useContext(ds),r=P.useContext(we),a=P.useContext(fs).reducedMotion,l=P.useRef();s=s||o.renderer,!l.current&&s&&(l.current=s(t,{visualState:e,parent:i,props:n,presenceContext:r,blockInitialAnimation:r?r.initial===!1:!1,reducedMotionConfig:a}));const u=l.current;P.useInsertionEffect(()=>{u&&u.update(n,r)});const c=P.useRef(!!(n[ms]&&!window.HandoffComplete));return Ni(()=>{u&&(De.render(u.render),c.current&&u.animationState&&u.animationState.animateChanges())}),P.useEffect(()=>{u&&(u.updateFeatures(),!c.current&&u.animationState&&u.animationState.animateChanges(),c.current&&(c.current=!1,window.HandoffComplete=!0))}),u}function lt(t){return t&&typeof t=="object"&&Object.prototype.hasOwnProperty.call(t,"current")}function _i(t,e,n){return P.useCallback(s=>{s&&t.mount&&t.mount(s),e&&(s?e.mount(s):e.unmount()),n&&(typeof n=="function"?n(s):lt(n)&&(n.current=s))},[e])}function Tt(t){return typeof t=="string"||Array.isArray(t)}function Wt(t){return t!==null&&typeof t=="object"&&typeof t.start=="function"}const Me=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],Re=["initial",...Me];function $t(t){return Wt(t.animate)||Re.some(e=>Tt(t[e]))}function gs(t){return!!($t(t)||t.variants)}function Hi(t,e){if($t(t)){const{initial:n,animate:s}=t;return{initial:n===!1||Tt(n)?n:void 0,animate:Tt(s)?s:void 0}}return t.inherit!==!1?e:{}}function zi(t){const{initial:e,animate:n}=Hi(t,P.useContext(Kt));return P.useMemo(()=>({initial:e,animate:n}),[rn(e),rn(n)])}function rn(t){return Array.isArray(t)?t.join(" "):t}const on={animation:["animate","variants","whileHover","whileTap","exit","whileInView","whileFocus","whileDrag"],exit:["exit"],drag:["drag","dragControls"],focus:["whileFocus"],hover:["whileHover","onHoverStart","onHoverEnd"],tap:["whileTap","onTap","onTapStart","onTapCancel"],pan:["onPan","onPanStart","onPanSessionStart","onPanEnd"],inView:["whileInView","onViewportEnter","onViewportLeave"],layout:["layout","layoutId"]},Pt={};for(const t in on)Pt[t]={isEnabled:e=>on[t].some(n=>!!e[n])};function Yi(t){for(const e in t)Pt[e]={...Pt[e],...t[e]}}const ys=P.createContext({}),vs=P.createContext({}),Xi=Symbol.for("motionComponentSymbol");function qi({preloadedFeatures:t,createVisualElement:e,useRender:n,useVisualState:s,Component:i}){t&&Yi(t);function o(a,l){let u;const c={...P.useContext(fs),...a,layoutId:Zi(a)},{isStatic:h}=c,f=zi(a),d=s(a,h);if(!h&&Ae){f.visualElement=Gi(i,d,c,e);const m=P.useContext(vs),p=P.useContext(ds).strict;f.visualElement&&(u=f.visualElement.loadFeatures(c,p,t,m))}return N.jsxs(Kt.Provider,{value:f,children:[u&&f.visualElement?N.jsx(u,{visualElement:f.visualElement,...c}):null,n(i,a,_i(d,f.visualElement,l),d,h,f.visualElement)]})}const r=P.forwardRef(o);return r[Xi]=i,r}function Zi({layoutId:t}){const e=P.useContext(ys).id;return e&&t!==void 0?e+"-"+t:t}function Qi(t){function e(s,i={}){return qi(t(s,i))}if(typeof Proxy>"u")return e;const n=new Map;return new Proxy(e,{get:(s,i)=>(n.has(i)||n.set(i,e(i)),n.get(i))})}const Ji=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","switch","symbol","svg","text","tspan","use","view"];function Ee(t){return typeof t!="string"||t.includes("-")?!1:!!(Ji.indexOf(t)>-1||/[A-Z]/u.test(t))}const Bt={};function tr(t){Object.assign(Bt,t)}const wt=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],ot=new Set(wt);function xs(t,{layout:e,layoutId:n}){return ot.has(t)||t.startsWith("origin")||(e||n!==void 0)&&(!!Bt[t]||t==="opacity")}const E=t=>!!(t&&t.getVelocity),er={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},nr=wt.length;function sr(t,{enableHardwareAcceleration:e=!0,allowTransformNone:n=!0},s,i){let o="";for(let r=0;r<nr;r++){const a=wt[r];if(t[a]!==void 0){const l=er[a]||a;o+=`${l}(${t[a]}) `}}return e&&!t.z&&(o+="translateZ(0)"),o=o.trim(),i?o=i(t,s?"":o):n&&s&&(o="none"),o}const Ts=t=>e=>typeof e=="string"&&e.startsWith(t),Ps=Ts("--"),ir=Ts("var(--"),Le=t=>ir(t)?rr.test(t.split("/*")[0].trim()):!1,rr=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,or=(t,e)=>e&&typeof t=="number"?e.transform(t):t,Z=(t,e,n)=>n>e?e:n<t?t:n,dt={test:t=>typeof t=="number",parse:parseFloat,transform:t=>t},gt={...dt,transform:t=>Z(0,1,t)},Rt={...dt,default:1},yt=t=>Math.round(t*1e5)/1e5,Fe=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu,ar=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu,lr=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu;function At(t){return typeof t=="string"}const Ct=t=>({test:e=>At(e)&&e.endsWith(t)&&e.split(" ").length===1,parse:parseFloat,transform:e=>`${e}${t}`}),z=Ct("deg"),U=Ct("%"),T=Ct("px"),ur=Ct("vh"),cr=Ct("vw"),an={...U,parse:t=>U.parse(t)/100,transform:t=>U.transform(t*100)},ln={...dt,transform:Math.round},bs={borderWidth:T,borderTopWidth:T,borderRightWidth:T,borderBottomWidth:T,borderLeftWidth:T,borderRadius:T,radius:T,borderTopLeftRadius:T,borderTopRightRadius:T,borderBottomRightRadius:T,borderBottomLeftRadius:T,width:T,maxWidth:T,height:T,maxHeight:T,size:T,top:T,right:T,bottom:T,left:T,padding:T,paddingTop:T,paddingRight:T,paddingBottom:T,paddingLeft:T,margin:T,marginTop:T,marginRight:T,marginBottom:T,marginLeft:T,rotate:z,rotateX:z,rotateY:z,rotateZ:z,scale:Rt,scaleX:Rt,scaleY:Rt,scaleZ:Rt,skew:z,skewX:z,skewY:z,distance:T,translateX:T,translateY:T,translateZ:T,x:T,y:T,z:T,perspective:T,transformPerspective:T,opacity:gt,originX:an,originY:an,originZ:T,zIndex:ln,backgroundPositionX:T,backgroundPositionY:T,fillOpacity:gt,strokeOpacity:gt,numOctaves:ln};function ke(t,e,n,s){const{style:i,vars:o,transform:r,transformOrigin:a}=t;let l=!1,u=!1,c=!0;for(const h in e){const f=e[h];if(Ps(h)){o[h]=f;continue}const d=bs[h],m=or(f,d);if(ot.has(h)){if(l=!0,r[h]=m,!c)continue;f!==(d.default||0)&&(c=!1)}else h.startsWith("origin")?(u=!0,a[h]=m):i[h]=m}if(e.transform||(l||s?i.transform=sr(t.transform,n,c,s):i.transform&&(i.transform="none")),u){const{originX:h="50%",originY:f="50%",originZ:d=0}=a;i.transformOrigin=`${h} ${f} ${d}`}}const Be=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function Ss(t,e,n){for(const s in e)!E(e[s])&&!xs(s,n)&&(t[s]=e[s])}function hr({transformTemplate:t},e,n){return P.useMemo(()=>{const s=Be();return ke(s,e,{enableHardwareAcceleration:!n},t),Object.assign({},s.vars,s.style)},[e])}function fr(t,e,n){const s=t.style||{},i={};return Ss(i,s,t),Object.assign(i,hr(t,e,n)),i}function dr(t,e,n){const s={},i=fr(t,e,n);return t.drag&&t.dragListener!==!1&&(s.draggable=!1,i.userSelect=i.WebkitUserSelect=i.WebkitTouchCallout="none",i.touchAction=t.drag===!0?"none":`pan-${t.drag==="x"?"y":"x"}`),t.tabIndex===void 0&&(t.onTap||t.onTapStart||t.whileTap)&&(s.tabIndex=0),s.style=i,s}const mr=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","custom","inherit","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","globalTapTarget","ignoreStrict","viewport"]);function jt(t){return t.startsWith("while")||t.startsWith("drag")&&t!=="draggable"||t.startsWith("layout")||t.startsWith("onTap")||t.startsWith("onPan")||t.startsWith("onLayout")||mr.has(t)}let Vs=t=>!jt(t);function pr(t){t&&(Vs=e=>e.startsWith("on")?!jt(e):t(e))}try{pr(require("@emotion/is-prop-valid").default)}catch{}function gr(t,e,n){const s={};for(const i in t)i==="values"&&typeof t.values=="object"||(Vs(i)||n===!0&&jt(i)||!e&&!jt(i)||t.draggable&&i.startsWith("onDrag"))&&(s[i]=t[i]);return s}function un(t,e,n){return typeof t=="string"?t:T.transform(e+n*t)}function yr(t,e,n){const s=un(e,t.x,t.width),i=un(n,t.y,t.height);return`${s} ${i}`}const vr={offset:"stroke-dashoffset",array:"stroke-dasharray"},xr={offset:"strokeDashoffset",array:"strokeDasharray"};function Tr(t,e,n=1,s=0,i=!0){t.pathLength=1;const o=i?vr:xr;t[o.offset]=T.transform(-s);const r=T.transform(e),a=T.transform(n);t[o.array]=`${r} ${a}`}function je(t,{attrX:e,attrY:n,attrScale:s,originX:i,originY:o,pathLength:r,pathSpacing:a=1,pathOffset:l=0,...u},c,h,f){if(ke(t,u,c,f),h){t.style.viewBox&&(t.attrs.viewBox=t.style.viewBox);return}t.attrs=t.style,t.style={};const{attrs:d,style:m,dimensions:p}=t;d.transform&&(p&&(m.transform=d.transform),delete d.transform),p&&(i!==void 0||o!==void 0||m.transform)&&(m.transformOrigin=yr(p,i!==void 0?i:.5,o!==void 0?o:.5)),e!==void 0&&(d.x=e),n!==void 0&&(d.y=n),s!==void 0&&(d.scale=s),r!==void 0&&Tr(d,r,a,l,!1)}const ws=()=>({...Be(),attrs:{}}),Oe=t=>typeof t=="string"&&t.toLowerCase()==="svg";function Pr(t,e,n,s){const i=P.useMemo(()=>{const o=ws();return je(o,e,{enableHardwareAcceleration:!1},Oe(s),t.transformTemplate),{...o.attrs,style:{...o.style}}},[e]);if(t.style){const o={};Ss(o,t.style,t),i.style={...o,...i.style}}return i}function br(t=!1){return(n,s,i,{latestValues:o},r)=>{const l=(Ee(n)?Pr:dr)(s,o,r,n),u=gr(s,typeof n=="string",t),c=n!==P.Fragment?{...u,...l,ref:i}:{},{children:h}=s,f=P.useMemo(()=>E(h)?h.get():h,[h]);return P.createElement(n,{...c,children:f})}}function As(t,{style:e,vars:n},s,i){Object.assign(t.style,e,i&&i.getProjectionStyles(s));for(const o in n)t.style.setProperty(o,n[o])}const Cs=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength","startOffset","textLength","lengthAdjust"]);function Ds(t,e,n,s){As(t,e,void 0,s);for(const i in e.attrs)t.setAttribute(Cs.has(i)?i:Ce(i),e.attrs[i])}function Ie(t,e,n){var s;const{style:i}=t,o={};for(const r in i)(E(i[r])||e.style&&E(e.style[r])||xs(r,t)||((s=n==null?void 0:n.getValue(r))===null||s===void 0?void 0:s.liveStyle)!==void 0)&&(o[r]=i[r]);return o}function Ms(t,e,n){const s=Ie(t,e,n);for(const i in t)if(E(t[i])||E(e[i])){const o=wt.indexOf(i)!==-1?"attr"+i.charAt(0).toUpperCase()+i.substring(1):i;s[o]=t[i]}return s}function cn(t){const e=[{},{}];return t==null||t.values.forEach((n,s)=>{e[0][s]=n.get(),e[1][s]=n.getVelocity()}),e}function Ne(t,e,n,s){if(typeof e=="function"){const[i,o]=cn(s);e=e(n!==void 0?n:t.custom,i,o)}if(typeof e=="string"&&(e=t.variants&&t.variants[e]),typeof e=="function"){const[i,o]=cn(s);e=e(n!==void 0?n:t.custom,i,o)}return e}function Sr(t){const e=P.useRef(null);return e.current===null&&(e.current=t()),e.current}const ue=t=>Array.isArray(t),Vr=t=>!!(t&&typeof t=="object"&&t.mix&&t.toValue),wr=t=>ue(t)?t[t.length-1]||0:t;function Lt(t){const e=E(t)?t.get():t;return Vr(e)?e.toValue():e}function Ar({scrapeMotionValuesFromProps:t,createRenderState:e,onMount:n},s,i,o){const r={latestValues:Cr(s,i,o,t),renderState:e()};return n&&(r.mount=a=>n(s,a,r)),r}const Rs=t=>(e,n)=>{const s=P.useContext(Kt),i=P.useContext(we),o=()=>Ar(t,e,s,i);return n?o():Sr(o)};function Cr(t,e,n,s){const i={},o=s(t,{});for(const f in o)i[f]=Lt(o[f]);let{initial:r,animate:a}=t;const l=$t(t),u=gs(t);e&&u&&!l&&t.inherit!==!1&&(r===void 0&&(r=e.initial),a===void 0&&(a=e.animate));let c=n?n.initial===!1:!1;c=c||r===!1;const h=c?a:r;return h&&typeof h!="boolean"&&!Wt(h)&&(Array.isArray(h)?h:[h]).forEach(d=>{const m=Ne(t,d);if(!m)return;const{transitionEnd:p,transition:y,...v}=m;for(const x in v){let g=v[x];if(Array.isArray(g)){const b=c?g.length-1:0;g=g[b]}g!==null&&(i[x]=g)}for(const x in p)i[x]=p[x]}),i}const L=t=>t,{schedule:w,cancel:Q,state:D,steps:Xt}=ps(typeof requestAnimationFrame<"u"?requestAnimationFrame:L,!0),Dr={useVisualState:Rs({scrapeMotionValuesFromProps:Ms,createRenderState:ws,onMount:(t,e,{renderState:n,latestValues:s})=>{w.read(()=>{try{n.dimensions=typeof e.getBBox=="function"?e.getBBox():e.getBoundingClientRect()}catch{n.dimensions={x:0,y:0,width:0,height:0}}}),w.render(()=>{je(n,s,{enableHardwareAcceleration:!1},Oe(e.tagName),t.transformTemplate),Ds(e,n)})}})},Mr={useVisualState:Rs({scrapeMotionValuesFromProps:Ie,createRenderState:Be})};function Rr(t,{forwardMotionProps:e=!1},n,s){return{...Ee(t)?Dr:Mr,preloadedFeatures:n,useRender:br(e),createVisualElement:s,Component:t}}function W(t,e,n,s={passive:!0}){return t.addEventListener(e,n,s),()=>t.removeEventListener(e,n)}const Es=t=>t.pointerType==="mouse"?typeof t.button!="number"||t.button<=0:t.isPrimary!==!1;function Gt(t,e="page"){return{point:{x:t[`${e}X`],y:t[`${e}Y`]}}}const Er=t=>e=>Es(e)&&t(e,Gt(e));function $(t,e,n,s){return W(t,e,Er(n),s)}const Lr=(t,e)=>n=>e(t(n)),G=(...t)=>t.reduce(Lr);function Ls(t){let e=null;return()=>{const n=()=>{e=null};return e===null?(e=t,n):!1}}const hn=Ls("dragHorizontal"),fn=Ls("dragVertical");function Fs(t){let e=!1;if(t==="y")e=fn();else if(t==="x")e=hn();else{const n=hn(),s=fn();n&&s?e=()=>{n(),s()}:(n&&n(),s&&s())}return e}function ks(){const t=Fs(!0);return t?(t(),!1):!0}class tt{constructor(e){this.isMounted=!1,this.node=e}update(){}}function dn(t,e){const n=e?"pointerenter":"pointerleave",s=e?"onHoverStart":"onHoverEnd",i=(o,r)=>{if(o.pointerType==="touch"||ks())return;const a=t.getProps();t.animationState&&a.whileHover&&t.animationState.setActive("whileHover",e);const l=a[s];l&&w.postRender(()=>l(o,r))};return $(t.current,n,i,{passive:!t.getProps()[s]})}class Fr extends tt{mount(){this.unmount=G(dn(this.node,!0),dn(this.node,!1))}unmount(){}}class kr extends tt{constructor(){super(...arguments),this.isActive=!1}onFocus(){let e=!1;try{e=this.node.current.matches(":focus-visible")}catch{e=!0}!e||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){!this.isActive||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=G(W(this.node.current,"focus",()=>this.onFocus()),W(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}const Bs=(t,e)=>e?t===e?!0:Bs(t,e.parentElement):!1;function qt(t,e){if(!e)return;const n=new PointerEvent("pointer"+t);e(n,Gt(n))}class Br extends tt{constructor(){super(...arguments),this.removeStartListeners=L,this.removeEndListeners=L,this.removeAccessibleListeners=L,this.startPointerPress=(e,n)=>{if(this.isPressing)return;this.removeEndListeners();const s=this.node.getProps(),o=$(window,"pointerup",(a,l)=>{if(!this.checkPressEnd())return;const{onTap:u,onTapCancel:c,globalTapTarget:h}=this.node.getProps(),f=!h&&!Bs(this.node.current,a.target)?c:u;f&&w.update(()=>f(a,l))},{passive:!(s.onTap||s.onPointerUp)}),r=$(window,"pointercancel",(a,l)=>this.cancelPress(a,l),{passive:!(s.onTapCancel||s.onPointerCancel)});this.removeEndListeners=G(o,r),this.startPress(e,n)},this.startAccessiblePress=()=>{const e=o=>{if(o.key!=="Enter"||this.isPressing)return;const r=a=>{a.key!=="Enter"||!this.checkPressEnd()||qt("up",(l,u)=>{const{onTap:c}=this.node.getProps();c&&w.postRender(()=>c(l,u))})};this.removeEndListeners(),this.removeEndListeners=W(this.node.current,"keyup",r),qt("down",(a,l)=>{this.startPress(a,l)})},n=W(this.node.current,"keydown",e),s=()=>{this.isPressing&&qt("cancel",(o,r)=>this.cancelPress(o,r))},i=W(this.node.current,"blur",s);this.removeAccessibleListeners=G(n,i)}}startPress(e,n){this.isPressing=!0;const{onTapStart:s,whileTap:i}=this.node.getProps();i&&this.node.animationState&&this.node.animationState.setActive("whileTap",!0),s&&w.postRender(()=>s(e,n))}checkPressEnd(){return this.removeEndListeners(),this.isPressing=!1,this.node.getProps().whileTap&&this.node.animationState&&this.node.animationState.setActive("whileTap",!1),!ks()}cancelPress(e,n){if(!this.checkPressEnd())return;const{onTapCancel:s}=this.node.getProps();s&&w.postRender(()=>s(e,n))}mount(){const e=this.node.getProps(),n=$(e.globalTapTarget?window:this.node.current,"pointerdown",this.startPointerPress,{passive:!(e.onTapStart||e.onPointerStart)}),s=W(this.node.current,"focus",this.startAccessiblePress);this.removeStartListeners=G(n,s)}unmount(){this.removeStartListeners(),this.removeEndListeners(),this.removeAccessibleListeners()}}const ce=new WeakMap,Zt=new WeakMap,jr=t=>{const e=ce.get(t.target);e&&e(t)},Or=t=>{t.forEach(jr)};function Ir({root:t,...e}){const n=t||document;Zt.has(n)||Zt.set(n,{});const s=Zt.get(n),i=JSON.stringify(e);return s[i]||(s[i]=new IntersectionObserver(Or,{root:t,...e})),s[i]}function Nr(t,e,n){const s=Ir(e);return ce.set(t,n),s.observe(t),()=>{ce.delete(t),s.unobserve(t)}}const Ur={some:0,all:1};class Kr extends tt{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:e={}}=this.node.getProps(),{root:n,margin:s,amount:i="some",once:o}=e,r={root:n?n.current:void 0,rootMargin:s,threshold:typeof i=="number"?i:Ur[i]},a=l=>{const{isIntersecting:u}=l;if(this.isInView===u||(this.isInView=u,o&&!u&&this.hasEnteredView))return;u&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",u);const{onViewportEnter:c,onViewportLeave:h}=this.node.getProps(),f=u?c:h;f&&f(l)};return Nr(this.node.current,r,a)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:e,prevProps:n}=this.node;["amount","margin","root"].some(Wr(e,n))&&this.startObserver()}unmount(){}}function Wr({viewport:t={}},{viewport:e={}}={}){return n=>t[n]!==e[n]}const $r={inView:{Feature:Kr},tap:{Feature:Br},focus:{Feature:kr},hover:{Feature:Fr}};function js(t,e){if(!Array.isArray(e))return!1;const n=e.length;if(n!==t.length)return!1;for(let s=0;s<n;s++)if(e[s]!==t[s])return!1;return!0}function _t(t,e,n){const s=t.getProps();return Ne(s,e,n!==void 0?n:s.custom,t)}const X=t=>t*1e3,_=t=>t/1e3,Gr={type:"spring",stiffness:500,damping:25,restSpeed:10},_r=t=>({type:"spring",stiffness:550,damping:t===0?2*Math.sqrt(550):30,restSpeed:10}),Hr={type:"keyframes",duration:.8},zr={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},Yr=(t,{keyframes:e})=>e.length>2?Hr:ot.has(t)?t.startsWith("scale")?_r(e[1]):Gr:zr;function Xr({when:t,delay:e,delayChildren:n,staggerChildren:s,staggerDirection:i,repeat:o,repeatType:r,repeatDelay:a,from:l,elapsed:u,...c}){return!!Object.keys(c).length}function Ue(t,e){return t[e]||t.default||t}const qr=t=>t!==null;function Ht(t,{repeat:e,repeatType:n="loop"},s){const i=t.filter(qr),o=e&&n!=="loop"&&e%2===1?0:i.length-1;return!o||s===void 0?i[o]:s}let Ft;function Zr(){Ft=void 0}const q={now:()=>(Ft===void 0&&q.set(D.isProcessing||Ki.useManualTiming?D.timestamp:performance.now()),Ft),set:t=>{Ft=t,queueMicrotask(Zr)}},Os=t=>/^0[^.\s]+$/u.test(t);function Qr(t){return typeof t=="number"?t===0:t!==null?t==="none"||t==="0"||Os(t):!0}let he=L;const Is=t=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(t),Jr=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function to(t){const e=Jr.exec(t);if(!e)return[,];const[,n,s,i]=e;return[`--${n??s}`,i]}function Ns(t,e,n=1){const[s,i]=to(t);if(!s)return;const o=window.getComputedStyle(e).getPropertyValue(s);if(o){const r=o.trim();return Is(r)?parseFloat(r):r}return Le(i)?Ns(i,e,n+1):i}const eo=new Set(["width","height","top","left","right","bottom","x","y","translateX","translateY"]),mn=t=>t===dt||t===T,pn=(t,e)=>parseFloat(t.split(", ")[e]),gn=(t,e)=>(n,{transform:s})=>{if(s==="none"||!s)return 0;const i=s.match(/^matrix3d\((.+)\)$/u);if(i)return pn(i[1],e);{const o=s.match(/^matrix\((.+)\)$/u);return o?pn(o[1],t):0}},no=new Set(["x","y","z"]),so=wt.filter(t=>!no.has(t));function io(t){const e=[];return so.forEach(n=>{const s=t.getValue(n);s!==void 0&&(e.push([n,s.get()]),s.set(n.startsWith("scale")?1:0))}),e}const ft={width:({x:t},{paddingLeft:e="0",paddingRight:n="0"})=>t.max-t.min-parseFloat(e)-parseFloat(n),height:({y:t},{paddingTop:e="0",paddingBottom:n="0"})=>t.max-t.min-parseFloat(e)-parseFloat(n),top:(t,{top:e})=>parseFloat(e),left:(t,{left:e})=>parseFloat(e),bottom:({y:t},{top:e})=>parseFloat(e)+(t.max-t.min),right:({x:t},{left:e})=>parseFloat(e)+(t.max-t.min),x:gn(4,13),y:gn(5,14)};ft.translateX=ft.x;ft.translateY=ft.y;const Us=t=>e=>e.test(t),ro={test:t=>t==="auto",parse:t=>t},Ks=[dt,T,U,z,cr,ur,ro],yn=t=>Ks.find(Us(t)),rt=new Set;let fe=!1,de=!1;function Ws(){if(de){const t=Array.from(rt).filter(s=>s.needsMeasurement),e=new Set(t.map(s=>s.element)),n=new Map;e.forEach(s=>{const i=io(s);i.length&&(n.set(s,i),s.render())}),t.forEach(s=>s.measureInitialState()),e.forEach(s=>{s.render();const i=n.get(s);i&&i.forEach(([o,r])=>{var a;(a=s.getValue(o))===null||a===void 0||a.set(r)})}),t.forEach(s=>s.measureEndState()),t.forEach(s=>{s.suspendedScrollY!==void 0&&window.scrollTo(0,s.suspendedScrollY)})}de=!1,fe=!1,rt.forEach(t=>t.complete()),rt.clear()}function $s(){rt.forEach(t=>{t.readKeyframes(),t.needsMeasurement&&(de=!0)})}function oo(){$s(),Ws()}class Ke{constructor(e,n,s,i,o,r=!1){this.isComplete=!1,this.isAsync=!1,this.needsMeasurement=!1,this.isScheduled=!1,this.unresolvedKeyframes=[...e],this.onComplete=n,this.name=s,this.motionValue=i,this.element=o,this.isAsync=r}scheduleResolve(){this.isScheduled=!0,this.isAsync?(rt.add(this),fe||(fe=!0,w.read($s),w.resolveKeyframes(Ws))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:e,name:n,element:s,motionValue:i}=this;for(let o=0;o<e.length;o++)if(e[o]===null)if(o===0){const r=i==null?void 0:i.get(),a=e[e.length-1];if(r!==void 0)e[0]=r;else if(s&&n){const l=s.readValue(n,a);l!=null&&(e[0]=l)}e[0]===void 0&&(e[0]=a),i&&r===void 0&&i.set(e[0])}else e[o]=e[o-1]}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(){this.isComplete=!0,this.onComplete(this.unresolvedKeyframes,this.finalKeyframe),rt.delete(this)}cancel(){this.isComplete||(this.isScheduled=!1,rt.delete(this))}resume(){this.isComplete||this.scheduleResolve()}}const We=(t,e)=>n=>!!(At(n)&&lr.test(n)&&n.startsWith(t)||e&&Object.prototype.hasOwnProperty.call(n,e)),Gs=(t,e,n)=>s=>{if(!At(s))return s;const[i,o,r,a]=s.match(Fe);return{[t]:parseFloat(i),[e]:parseFloat(o),[n]:parseFloat(r),alpha:a!==void 0?parseFloat(a):1}},ao=t=>Z(0,255,t),Qt={...dt,transform:t=>Math.round(ao(t))},it={test:We("rgb","red"),parse:Gs("red","green","blue"),transform:({red:t,green:e,blue:n,alpha:s=1})=>"rgba("+Qt.transform(t)+", "+Qt.transform(e)+", "+Qt.transform(n)+", "+yt(gt.transform(s))+")"};function lo(t){let e="",n="",s="",i="";return t.length>5?(e=t.substring(1,3),n=t.substring(3,5),s=t.substring(5,7),i=t.substring(7,9)):(e=t.substring(1,2),n=t.substring(2,3),s=t.substring(3,4),i=t.substring(4,5),e+=e,n+=n,s+=s,i+=i),{red:parseInt(e,16),green:parseInt(n,16),blue:parseInt(s,16),alpha:i?parseInt(i,16)/255:1}}const me={test:We("#"),parse:lo,transform:it.transform},ut={test:We("hsl","hue"),parse:Gs("hue","saturation","lightness"),transform:({hue:t,saturation:e,lightness:n,alpha:s=1})=>"hsla("+Math.round(t)+", "+U.transform(yt(e))+", "+U.transform(yt(n))+", "+yt(gt.transform(s))+")"},R={test:t=>it.test(t)||me.test(t)||ut.test(t),parse:t=>it.test(t)?it.parse(t):ut.test(t)?ut.parse(t):me.parse(t),transform:t=>At(t)?t:t.hasOwnProperty("red")?it.transform(t):ut.transform(t)};function uo(t){var e,n;return isNaN(t)&&At(t)&&(((e=t.match(Fe))===null||e===void 0?void 0:e.length)||0)+(((n=t.match(ar))===null||n===void 0?void 0:n.length)||0)>0}const _s="number",Hs="color",co="var",ho="var(",vn="${}",fo=/var\s*\(\s*--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)|#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\)|-?(?:\d+(?:\.\d+)?|\.\d+)/giu;function bt(t){const e=t.toString(),n=[],s={color:[],number:[],var:[]},i=[];let o=0;const a=e.replace(fo,l=>(R.test(l)?(s.color.push(o),i.push(Hs),n.push(R.parse(l))):l.startsWith(ho)?(s.var.push(o),i.push(co),n.push(l)):(s.number.push(o),i.push(_s),n.push(parseFloat(l))),++o,vn)).split(vn);return{values:n,split:a,indexes:s,types:i}}function zs(t){return bt(t).values}function Ys(t){const{split:e,types:n}=bt(t),s=e.length;return i=>{let o="";for(let r=0;r<s;r++)if(o+=e[r],i[r]!==void 0){const a=n[r];a===_s?o+=yt(i[r]):a===Hs?o+=R.transform(i[r]):o+=i[r]}return o}}const mo=t=>typeof t=="number"?0:t;function po(t){const e=zs(t);return Ys(t)(e.map(mo))}const J={test:uo,parse:zs,createTransformer:Ys,getAnimatableNone:po},go=new Set(["brightness","contrast","saturate","opacity"]);function yo(t){const[e,n]=t.slice(0,-1).split("(");if(e==="drop-shadow")return t;const[s]=n.match(Fe)||[];if(!s)return t;const i=n.replace(s,"");let o=go.has(e)?1:0;return s!==n&&(o*=100),e+"("+o+i+")"}const vo=/\b([a-z-]*)\(.*?\)/gu,pe={...J,getAnimatableNone:t=>{const e=t.match(vo);return e?e.map(yo).join(" "):t}},xo={...bs,color:R,backgroundColor:R,outlineColor:R,fill:R,stroke:R,borderColor:R,borderTopColor:R,borderRightColor:R,borderBottomColor:R,borderLeftColor:R,filter:pe,WebkitFilter:pe},$e=t=>xo[t];function Xs(t,e){let n=$e(t);return n!==pe&&(n=J),n.getAnimatableNone?n.getAnimatableNone(e):void 0}const To=new Set(["auto","none","0"]);function Po(t,e,n){let s=0,i;for(;s<t.length&&!i;){const o=t[s];typeof o=="string"&&!To.has(o)&&bt(o).values.length&&(i=t[s]),s++}if(i&&n)for(const o of e)t[o]=Xs(n,i)}class qs extends Ke{constructor(e,n,s,i){super(e,n,s,i,i==null?void 0:i.owner,!0)}readKeyframes(){const{unresolvedKeyframes:e,element:n,name:s}=this;if(!n.current)return;super.readKeyframes();for(let l=0;l<e.length;l++){const u=e[l];if(typeof u=="string"&&Le(u)){const c=Ns(u,n.current);c!==void 0&&(e[l]=c),l===e.length-1&&(this.finalKeyframe=u)}}if(this.resolveNoneKeyframes(),!eo.has(s)||e.length!==2)return;const[i,o]=e,r=yn(i),a=yn(o);if(r!==a)if(mn(r)&&mn(a))for(let l=0;l<e.length;l++){const u=e[l];typeof u=="string"&&(e[l]=parseFloat(u))}else this.needsMeasurement=!0}resolveNoneKeyframes(){const{unresolvedKeyframes:e,name:n}=this,s=[];for(let i=0;i<e.length;i++)Qr(e[i])&&s.push(i);s.length&&Po(e,s,n)}measureInitialState(){const{element:e,unresolvedKeyframes:n,name:s}=this;if(!e.current)return;s==="height"&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=ft[s](e.measureViewportBox(),window.getComputedStyle(e.current)),n[0]=this.measuredOrigin;const i=n[n.length-1];i!==void 0&&e.getValue(s,i).jump(i,!1)}measureEndState(){var e;const{element:n,name:s,unresolvedKeyframes:i}=this;if(!n.current)return;const o=n.getValue(s);o&&o.jump(this.measuredOrigin,!1);const r=i.length-1,a=i[r];i[r]=ft[s](n.measureViewportBox(),window.getComputedStyle(n.current)),a!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=a),!((e=this.removedTransforms)===null||e===void 0)&&e.length&&this.removedTransforms.forEach(([l,u])=>{n.getValue(l).set(u)}),this.resolveNoneKeyframes()}}function bo(t){let e;return()=>(e===void 0&&(e=t()),e)}const xn=(t,e)=>e==="zIndex"?!1:!!(typeof t=="number"||Array.isArray(t)||typeof t=="string"&&(J.test(t)||t==="0")&&!t.startsWith("url("));function So(t){const e=t[0];if(t.length===1)return!0;for(let n=0;n<t.length;n++)if(t[n]!==e)return!0}function Vo(t,e,n,s){const i=t[0];if(i===null)return!1;if(e==="display"||e==="visibility")return!0;const o=t[t.length-1],r=xn(i,e),a=xn(o,e);return!r||!a?!1:So(t)||n==="spring"&&s}class Zs{constructor({autoplay:e=!0,delay:n=0,type:s="keyframes",repeat:i=0,repeatDelay:o=0,repeatType:r="loop",...a}){this.isStopped=!1,this.hasAttemptedResolve=!1,this.options={autoplay:e,delay:n,type:s,repeat:i,repeatDelay:o,repeatType:r,...a},this.updateFinishedPromise()}get resolved(){return!this._resolved&&!this.hasAttemptedResolve&&oo(),this._resolved}onKeyframesResolved(e,n){this.hasAttemptedResolve=!0;const{name:s,type:i,velocity:o,delay:r,onComplete:a,onUpdate:l,isGenerator:u}=this.options;if(!u&&!Vo(e,s,i,o))if(r)this.options.duration=0;else{l==null||l(Ht(e,this.options,n)),a==null||a(),this.resolveFinishedPromise();return}const c=this.initPlayback(e,n);c!==!1&&(this._resolved={keyframes:e,finalKeyframe:n,...c},this.onPostResolved())}onPostResolved(){}then(e,n){return this.currentFinishedPromise.then(e,n)}updateFinishedPromise(){this.currentFinishedPromise=new Promise(e=>{this.resolveFinishedPromise=e})}}function Qs(t,e){return e?t*(1e3/e):0}const wo=5;function Js(t,e,n){const s=Math.max(e-wo,0);return Qs(n-t(s),e-s)}const Jt=.001,Ao=.01,Co=10,Do=.05,Mo=1;function Ro({duration:t=800,bounce:e=.25,velocity:n=0,mass:s=1}){let i,o,r=1-e;r=Z(Do,Mo,r),t=Z(Ao,Co,_(t)),r<1?(i=u=>{const c=u*r,h=c*t,f=c-n,d=ge(u,r),m=Math.exp(-h);return Jt-f/d*m},o=u=>{const h=u*r*t,f=h*n+n,d=Math.pow(r,2)*Math.pow(u,2)*t,m=Math.exp(-h),p=ge(Math.pow(u,2),r);return(-i(u)+Jt>0?-1:1)*((f-d)*m)/p}):(i=u=>{const c=Math.exp(-u*t),h=(u-n)*t+1;return-Jt+c*h},o=u=>{const c=Math.exp(-u*t),h=(n-u)*(t*t);return c*h});const a=5/t,l=Lo(i,o,a);if(t=X(t),isNaN(l))return{stiffness:100,damping:10,duration:t};{const u=Math.pow(l,2)*s;return{stiffness:u,damping:r*2*Math.sqrt(s*u),duration:t}}}const Eo=12;function Lo(t,e,n){let s=n;for(let i=1;i<Eo;i++)s=s-t(s)/e(s);return s}function ge(t,e){return t*Math.sqrt(1-e*e)}const Fo=["duration","bounce"],ko=["stiffness","damping","mass"];function Tn(t,e){return e.some(n=>t[n]!==void 0)}function Bo(t){let e={velocity:0,stiffness:100,damping:10,mass:1,isResolvedFromDuration:!1,...t};if(!Tn(t,ko)&&Tn(t,Fo)){const n=Ro(t);e={...e,...n,mass:1},e.isResolvedFromDuration=!0}return e}function ti({keyframes:t,restDelta:e,restSpeed:n,...s}){const i=t[0],o=t[t.length-1],r={done:!1,value:i},{stiffness:a,damping:l,mass:u,duration:c,velocity:h,isResolvedFromDuration:f}=Bo({...s,velocity:-_(s.velocity||0)}),d=h||0,m=l/(2*Math.sqrt(a*u)),p=o-i,y=_(Math.sqrt(a/u)),v=Math.abs(p)<5;n||(n=v?.01:2),e||(e=v?.005:.5);let x;if(m<1){const g=ge(y,m);x=b=>{const V=Math.exp(-m*y*b);return o-V*((d+m*y*p)/g*Math.sin(g*b)+p*Math.cos(g*b))}}else if(m===1)x=g=>o-Math.exp(-y*g)*(p+(d+y*p)*g);else{const g=y*Math.sqrt(m*m-1);x=b=>{const V=Math.exp(-m*y*b),M=Math.min(g*b,300);return o-V*((d+m*y*p)*Math.sinh(M)+g*p*Math.cosh(M))/g}}return{calculatedDuration:f&&c||null,next:g=>{const b=x(g);if(f)r.done=g>=c;else{let V=d;g!==0&&(m<1?V=Js(x,g,b):V=0);const M=Math.abs(V)<=n,H=Math.abs(o-b)<=e;r.done=M&&H}return r.value=r.done?o:b,r}}}function Pn({keyframes:t,velocity:e=0,power:n=.8,timeConstant:s=325,bounceDamping:i=10,bounceStiffness:o=500,modifyTarget:r,min:a,max:l,restDelta:u=.5,restSpeed:c}){const h=t[0],f={done:!1,value:h},d=S=>a!==void 0&&S<a||l!==void 0&&S>l,m=S=>a===void 0?l:l===void 0||Math.abs(a-S)<Math.abs(l-S)?a:l;let p=n*e;const y=h+p,v=r===void 0?y:r(y);v!==y&&(p=v-h);const x=S=>-p*Math.exp(-S/s),g=S=>v+x(S),b=S=>{const B=x(S),j=g(S);f.done=Math.abs(B)<=u,f.value=f.done?v:j};let V,M;const H=S=>{d(f.value)&&(V=S,M=ti({keyframes:[f.value,m(f.value)],velocity:Js(g,S,f.value),damping:i,stiffness:o,restDelta:u,restSpeed:c}))};return H(0),{calculatedDuration:null,next:S=>{let B=!1;return!M&&V===void 0&&(B=!0,b(S),H(S)),V!==void 0&&S>=V?M.next(S-V):(!B&&b(S),f)}}}const ei=(t,e,n)=>(((1-3*n+3*e)*t+(3*n-6*e))*t+3*e)*t,jo=1e-7,Oo=12;function Io(t,e,n,s,i){let o,r,a=0;do r=e+(n-e)/2,o=ei(r,s,i)-t,o>0?n=r:e=r;while(Math.abs(o)>jo&&++a<Oo);return r}function Dt(t,e,n,s){if(t===e&&n===s)return L;const i=o=>Io(o,0,1,t,n);return o=>o===0||o===1?o:ei(i(o),e,s)}const No=Dt(.42,0,1,1),Uo=Dt(0,0,.58,1),ni=Dt(.42,0,.58,1),Ko=t=>Array.isArray(t)&&typeof t[0]!="number",si=t=>e=>e<=.5?t(2*e)/2:(2-t(2*(1-e)))/2,ii=t=>e=>1-t(1-e),Ge=t=>1-Math.sin(Math.acos(t)),ri=ii(Ge),Wo=si(Ge),oi=Dt(.33,1.53,.69,.99),_e=ii(oi),$o=si(_e),Go=t=>(t*=2)<1?.5*_e(t):.5*(2-Math.pow(2,-10*(t-1))),bn={linear:L,easeIn:No,easeInOut:ni,easeOut:Uo,circIn:Ge,circInOut:Wo,circOut:ri,backIn:_e,backInOut:$o,backOut:oi,anticipate:Go},Sn=t=>{if(Array.isArray(t)){he(t.length===4);const[e,n,s,i]=t;return Dt(e,n,s,i)}else if(typeof t=="string")return he(bn[t]!==void 0),bn[t];return t},St=(t,e,n)=>{const s=e-t;return s===0?1:(n-t)/s},A=(t,e,n)=>t+(e-t)*n;function te(t,e,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?t+(e-t)*6*n:n<1/2?e:n<2/3?t+(e-t)*(2/3-n)*6:t}function _o({hue:t,saturation:e,lightness:n,alpha:s}){t/=360,e/=100,n/=100;let i=0,o=0,r=0;if(!e)i=o=r=n;else{const a=n<.5?n*(1+e):n+e-n*e,l=2*n-a;i=te(l,a,t+1/3),o=te(l,a,t),r=te(l,a,t-1/3)}return{red:Math.round(i*255),green:Math.round(o*255),blue:Math.round(r*255),alpha:s}}const ee=(t,e,n)=>{const s=t*t,i=n*(e*e-s)+s;return i<0?0:Math.sqrt(i)},Ho=[me,it,ut],zo=t=>Ho.find(e=>e.test(t));function Vn(t){const e=zo(t);let n=e.parse(t);return e===ut&&(n=_o(n)),n}const wn=(t,e)=>{const n=Vn(t),s=Vn(e),i={...n};return o=>(i.red=ee(n.red,s.red,o),i.green=ee(n.green,s.green,o),i.blue=ee(n.blue,s.blue,o),i.alpha=A(n.alpha,s.alpha,o),it.transform(i))},ye=new Set(["none","hidden"]);function Yo(t,e){return ye.has(t)?n=>n<=0?t:e:n=>n>=1?e:t}function ve(t,e){return n=>n>0?e:t}function Xo(t,e){return n=>A(t,e,n)}function He(t){return typeof t=="number"?Xo:typeof t=="string"?Le(t)?ve:R.test(t)?wn:Qo:Array.isArray(t)?ai:typeof t=="object"?R.test(t)?wn:qo:ve}function ai(t,e){const n=[...t],s=n.length,i=t.map((o,r)=>He(o)(o,e[r]));return o=>{for(let r=0;r<s;r++)n[r]=i[r](o);return n}}function qo(t,e){const n={...t,...e},s={};for(const i in n)t[i]!==void 0&&e[i]!==void 0&&(s[i]=He(t[i])(t[i],e[i]));return i=>{for(const o in s)n[o]=s[o](i);return n}}function Zo(t,e){var n;const s=[],i={color:0,var:0,number:0};for(let o=0;o<e.values.length;o++){const r=e.types[o],a=t.indexes[r][i[r]],l=(n=t.values[a])!==null&&n!==void 0?n:0;s[o]=l,i[r]++}return s}const Qo=(t,e)=>{const n=J.createTransformer(e),s=bt(t),i=bt(e);return s.indexes.var.length===i.indexes.var.length&&s.indexes.color.length===i.indexes.color.length&&s.indexes.number.length>=i.indexes.number.length?ye.has(t)&&!i.values.length||ye.has(e)&&!s.values.length?Yo(t,e):G(ai(Zo(s,i),i.values),n):ve(t,e)};function li(t,e,n){return typeof t=="number"&&typeof e=="number"&&typeof n=="number"?A(t,e,n):He(t)(t,e)}function Jo(t,e,n){const s=[],i=n||li,o=t.length-1;for(let r=0;r<o;r++){let a=i(t[r],t[r+1]);if(e){const l=Array.isArray(e)?e[r]||L:e;a=G(l,a)}s.push(a)}return s}function ta(t,e,{clamp:n=!0,ease:s,mixer:i}={}){const o=t.length;if(he(o===e.length),o===1)return()=>e[0];if(o===2&&t[0]===t[1])return()=>e[1];t[0]>t[o-1]&&(t=[...t].reverse(),e=[...e].reverse());const r=Jo(e,s,i),a=r.length,l=u=>{let c=0;if(a>1)for(;c<t.length-2&&!(u<t[c+1]);c++);const h=St(t[c],t[c+1],u);return r[c](h)};return n?u=>l(Z(t[0],t[o-1],u)):l}function ea(t,e){const n=t[t.length-1];for(let s=1;s<=e;s++){const i=St(0,e,s);t.push(A(n,1,i))}}function na(t){const e=[0];return ea(e,t.length-1),e}function sa(t,e){return t.map(n=>n*e)}function ia(t,e){return t.map(()=>e||ni).splice(0,t.length-1)}function Ot({duration:t=300,keyframes:e,times:n,ease:s="easeInOut"}){const i=Ko(s)?s.map(Sn):Sn(s),o={done:!1,value:e[0]},r=sa(n&&n.length===e.length?n:na(e),t),a=ta(r,e,{ease:Array.isArray(i)?i:ia(e,i)});return{calculatedDuration:t,next:l=>(o.value=a(l),o.done=l>=t,o)}}const An=2e4;function ra(t){let e=0;const n=50;let s=t.next(e);for(;!s.done&&e<An;)e+=n,s=t.next(e);return e>=An?1/0:e}const oa=t=>{const e=({timestamp:n})=>t(n);return{start:()=>w.update(e,!0),stop:()=>Q(e),now:()=>D.isProcessing?D.timestamp:q.now()}},aa={decay:Pn,inertia:Pn,tween:Ot,keyframes:Ot,spring:ti},la=t=>t/100;class ze extends Zs{constructor({KeyframeResolver:e=Ke,...n}){super(n),this.holdTime=null,this.startTime=null,this.cancelTime=null,this.currentTime=0,this.playbackSpeed=1,this.pendingPlayState="running",this.state="idle",this.stop=()=>{if(this.resolver.cancel(),this.isStopped=!0,this.state==="idle")return;this.teardown();const{onStop:a}=this.options;a&&a()};const{name:s,motionValue:i,keyframes:o}=this.options,r=(a,l)=>this.onKeyframesResolved(a,l);s&&i&&i.owner?this.resolver=i.owner.resolveKeyframes(o,r,s,i):this.resolver=new e(o,r,s,i),this.resolver.scheduleResolve()}initPlayback(e){const{type:n="keyframes",repeat:s=0,repeatDelay:i=0,repeatType:o,velocity:r=0}=this.options,a=aa[n]||Ot;let l,u;a!==Ot&&typeof e[0]!="number"&&(l=G(la,li(e[0],e[1])),e=[0,100]);const c=a({...this.options,keyframes:e});o==="mirror"&&(u=a({...this.options,keyframes:[...e].reverse(),velocity:-r})),c.calculatedDuration===null&&(c.calculatedDuration=ra(c));const{calculatedDuration:h}=c,f=h+i,d=f*(s+1)-i;return{generator:c,mirroredGenerator:u,mapPercentToKeyframes:l,calculatedDuration:h,resolvedDuration:f,totalDuration:d}}onPostResolved(){const{autoplay:e=!0}=this.options;this.play(),this.pendingPlayState==="paused"||!e?this.pause():this.state=this.pendingPlayState}tick(e,n=!1){const{resolved:s}=this;if(!s){const{keyframes:S}=this.options;return{done:!0,value:S[S.length-1]}}const{finalKeyframe:i,generator:o,mirroredGenerator:r,mapPercentToKeyframes:a,keyframes:l,calculatedDuration:u,totalDuration:c,resolvedDuration:h}=s;if(this.startTime===null)return o.next(0);const{delay:f,repeat:d,repeatType:m,repeatDelay:p,onUpdate:y}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,e):this.speed<0&&(this.startTime=Math.min(e-c/this.speed,this.startTime)),n?this.currentTime=e:this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=Math.round(e-this.startTime)*this.speed;const v=this.currentTime-f*(this.speed>=0?1:-1),x=this.speed>=0?v<0:v>c;this.currentTime=Math.max(v,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=c);let g=this.currentTime,b=o;if(d){const S=Math.min(this.currentTime,c)/h;let B=Math.floor(S),j=S%1;!j&&S>=1&&(j=1),j===1&&B--,B=Math.min(B,d+1),!!(B%2)&&(m==="reverse"?(j=1-j,p&&(j-=p/h)):m==="mirror"&&(b=r)),g=Z(0,1,j)*h}const V=x?{done:!1,value:l[0]}:b.next(g);a&&(V.value=a(V.value));let{done:M}=V;!x&&u!==null&&(M=this.speed>=0?this.currentTime>=c:this.currentTime<=0);const H=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&M);return H&&i!==void 0&&(V.value=Ht(l,this.options,i)),y&&y(V.value),H&&this.finish(),V}get duration(){const{resolved:e}=this;return e?_(e.calculatedDuration):0}get time(){return _(this.currentTime)}set time(e){e=X(e),this.currentTime=e,this.holdTime!==null||this.speed===0?this.holdTime=e:this.driver&&(this.startTime=this.driver.now()-e/this.speed)}get speed(){return this.playbackSpeed}set speed(e){const n=this.playbackSpeed!==e;this.playbackSpeed=e,n&&(this.time=_(this.currentTime))}play(){if(this.resolver.isScheduled||this.resolver.resume(),!this._resolved){this.pendingPlayState="running";return}if(this.isStopped)return;const{driver:e=oa,onPlay:n}=this.options;this.driver||(this.driver=e(i=>this.tick(i))),n&&n();const s=this.driver.now();this.holdTime!==null?this.startTime=s-this.holdTime:(!this.startTime||this.state==="finished")&&(this.startTime=s),this.state==="finished"&&this.updateFinishedPromise(),this.cancelTime=this.startTime,this.holdTime=null,this.state="running",this.driver.start()}pause(){var e;if(!this._resolved){this.pendingPlayState="paused";return}this.state="paused",this.holdTime=(e=this.currentTime)!==null&&e!==void 0?e:0}complete(){this.state!=="running"&&this.play(),this.pendingPlayState=this.state="finished",this.holdTime=null}finish(){this.teardown(),this.state="finished";const{onComplete:e}=this.options;e&&e()}cancel(){this.cancelTime!==null&&this.tick(this.cancelTime),this.teardown(),this.updateFinishedPromise()}teardown(){this.state="idle",this.stopDriver(),this.resolveFinishedPromise(),this.updateFinishedPromise(),this.startTime=this.cancelTime=null,this.resolver.cancel()}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(e){return this.startTime=0,this.tick(e,!0)}}const ui=t=>Array.isArray(t)&&typeof t[0]=="number";function ci(t){return!!(!t||typeof t=="string"&&t in Ye||ui(t)||Array.isArray(t)&&t.every(ci))}const pt=([t,e,n,s])=>`cubic-bezier(${t}, ${e}, ${n}, ${s})`,Ye={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:pt([0,.65,.55,1]),circOut:pt([.55,0,1,.45]),backIn:pt([.31,.01,.66,-.59]),backOut:pt([.33,1.53,.69,.99])};function ua(t){return hi(t)||Ye.easeOut}function hi(t){if(t)return ui(t)?pt(t):Array.isArray(t)?t.map(ua):Ye[t]}function ca(t,e,n,{delay:s=0,duration:i=300,repeat:o=0,repeatType:r="loop",ease:a,times:l}={}){const u={[e]:n};l&&(u.offset=l);const c=hi(a);return Array.isArray(c)&&(u.easing=c),t.animate(u,{delay:s,duration:i,easing:Array.isArray(c)?"linear":c,fill:"both",iterations:o+1,direction:r==="reverse"?"alternate":"normal"})}const ha=bo(()=>Object.hasOwnProperty.call(Element.prototype,"animate")),fa=new Set(["opacity","clipPath","filter","transform"]),It=10,da=2e4;function ma(t){return t.type==="spring"||t.name==="backgroundColor"||!ci(t.ease)}function pa(t,e){const n=new ze({...e,keyframes:t,repeat:0,delay:0,isGenerator:!0});let s={done:!1,value:t[0]};const i=[];let o=0;for(;!s.done&&o<da;)s=n.sample(o),i.push(s.value),o+=It;return{times:void 0,keyframes:i,duration:o-It,ease:"linear"}}class Cn extends Zs{constructor(e){super(e);const{name:n,motionValue:s,keyframes:i}=this.options;this.resolver=new qs(i,(o,r)=>this.onKeyframesResolved(o,r),n,s),this.resolver.scheduleResolve()}initPlayback(e,n){var s;let{duration:i=300,times:o,ease:r,type:a,motionValue:l,name:u}=this.options;if(!(!((s=l.owner)===null||s===void 0)&&s.current))return!1;if(ma(this.options)){const{onComplete:h,onUpdate:f,motionValue:d,...m}=this.options,p=pa(e,m);e=p.keyframes,e.length===1&&(e[1]=e[0]),i=p.duration,o=p.times,r=p.ease,a="keyframes"}const c=ca(l.owner.current,u,e,{...this.options,duration:i,times:o,ease:r});return c.startTime=q.now(),this.pendingTimeline?(c.timeline=this.pendingTimeline,this.pendingTimeline=void 0):c.onfinish=()=>{const{onComplete:h}=this.options;l.set(Ht(e,this.options,n)),h&&h(),this.cancel(),this.resolveFinishedPromise()},{animation:c,duration:i,times:o,type:a,ease:r,keyframes:e}}get duration(){const{resolved:e}=this;if(!e)return 0;const{duration:n}=e;return _(n)}get time(){const{resolved:e}=this;if(!e)return 0;const{animation:n}=e;return _(n.currentTime||0)}set time(e){const{resolved:n}=this;if(!n)return;const{animation:s}=n;s.currentTime=X(e)}get speed(){const{resolved:e}=this;if(!e)return 1;const{animation:n}=e;return n.playbackRate}set speed(e){const{resolved:n}=this;if(!n)return;const{animation:s}=n;s.playbackRate=e}get state(){const{resolved:e}=this;if(!e)return"idle";const{animation:n}=e;return n.playState}attachTimeline(e){if(!this._resolved)this.pendingTimeline=e;else{const{resolved:n}=this;if(!n)return L;const{animation:s}=n;s.timeline=e,s.onfinish=null}return L}play(){if(this.isStopped)return;const{resolved:e}=this;if(!e)return;const{animation:n}=e;n.playState==="finished"&&this.updateFinishedPromise(),n.play()}pause(){const{resolved:e}=this;if(!e)return;const{animation:n}=e;n.pause()}stop(){if(this.resolver.cancel(),this.isStopped=!0,this.state==="idle")return;const{resolved:e}=this;if(!e)return;const{animation:n,keyframes:s,duration:i,type:o,ease:r,times:a}=e;if(!(n.playState==="idle"||n.playState==="finished")){if(this.time){const{motionValue:l,onUpdate:u,onComplete:c,...h}=this.options,f=new ze({...h,keyframes:s,duration:i,type:o,ease:r,times:a,isGenerator:!0}),d=X(this.time);l.setWithVelocity(f.sample(d-It).value,f.sample(d).value,It)}this.cancel()}}complete(){const{resolved:e}=this;e&&e.animation.finish()}cancel(){const{resolved:e}=this;e&&e.animation.cancel()}static supports(e){const{motionValue:n,name:s,repeatDelay:i,repeatType:o,damping:r,type:a}=e;return ha()&&s&&fa.has(s)&&n&&n.owner&&n.owner.current instanceof HTMLElement&&!n.owner.getProps().onUpdate&&!i&&o!=="mirror"&&r!==0&&a!=="inertia"}}const Xe=(t,e,n,s={},i,o)=>r=>{const a=Ue(s,t)||{},l=a.delay||s.delay||0;let{elapsed:u=0}=s;u=u-X(l);let c={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:e.getVelocity(),...a,delay:-u,onUpdate:f=>{e.set(f),a.onUpdate&&a.onUpdate(f)},onComplete:()=>{r(),a.onComplete&&a.onComplete()},name:t,motionValue:e,element:o?void 0:i};Xr(a)||(c={...c,...Yr(t,c)}),c.duration&&(c.duration=X(c.duration)),c.repeatDelay&&(c.repeatDelay=X(c.repeatDelay)),c.from!==void 0&&(c.keyframes[0]=c.from);let h=!1;if((c.type===!1||c.duration===0&&!c.repeatDelay)&&(c.duration=0,c.delay===0&&(h=!0)),h&&!o&&e.get()!==void 0){const f=Ht(c.keyframes,a);if(f!==void 0){w.update(()=>{c.onUpdate(f),c.onComplete()});return}}return!o&&Cn.supports(c)?new Cn(c):new ze(c)};function Nt(t){return!!(E(t)&&t.add)}function qe(t,e){t.indexOf(e)===-1&&t.push(e)}function Ze(t,e){const n=t.indexOf(e);n>-1&&t.splice(n,1)}class Qe{constructor(){this.subscriptions=[]}add(e){return qe(this.subscriptions,e),()=>Ze(this.subscriptions,e)}notify(e,n,s){const i=this.subscriptions.length;if(i)if(i===1)this.subscriptions[0](e,n,s);else for(let o=0;o<i;o++){const r=this.subscriptions[o];r&&r(e,n,s)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const Dn=30,ga=t=>!isNaN(parseFloat(t));class ya{constructor(e,n={}){this.version="11.2.6",this.canTrackVelocity=null,this.events={},this.updateAndNotify=(s,i=!0)=>{const o=q.now();this.updatedAt!==o&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(s),this.current!==this.prev&&this.events.change&&this.events.change.notify(this.current),i&&this.events.renderRequest&&this.events.renderRequest.notify(this.current)},this.hasAnimated=!1,this.setCurrent(e),this.owner=n.owner}setCurrent(e){this.current=e,this.updatedAt=q.now(),this.canTrackVelocity===null&&e!==void 0&&(this.canTrackVelocity=ga(this.current))}setPrevFrameValue(e=this.current){this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt}onChange(e){return this.on("change",e)}on(e,n){this.events[e]||(this.events[e]=new Qe);const s=this.events[e].add(n);return e==="change"?()=>{s(),w.read(()=>{this.events.change.getSize()||this.stop()})}:s}clearListeners(){for(const e in this.events)this.events[e].clear()}attach(e,n){this.passiveEffect=e,this.stopPassiveEffect=n}set(e,n=!0){!n||!this.passiveEffect?this.updateAndNotify(e,n):this.passiveEffect(e,this.updateAndNotify)}setWithVelocity(e,n,s){this.set(n),this.prev=void 0,this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt-s}jump(e,n=!0){this.updateAndNotify(e),this.prev=e,this.prevUpdatedAt=this.prevFrameValue=void 0,n&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}get(){return this.current}getPrevious(){return this.prev}getVelocity(){const e=q.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||e-this.updatedAt>Dn)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,Dn);return Qs(parseFloat(this.current)-parseFloat(this.prevFrameValue),n)}start(e){return this.stop(),new Promise(n=>{this.hasAnimated=!0,this.animation=e(n),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function Vt(t,e){return new ya(t,e)}function va(t,e,n){t.hasValue(e)?t.getValue(e).set(n):t.addValue(e,Vt(n))}function xa(t,e){const n=_t(t,e);let{transitionEnd:s={},transition:i={},...o}=n||{};o={...o,...s};for(const r in o){const a=wr(o[r]);va(t,r,a)}}function Ta({protectedKeys:t,needsAnimating:e},n){const s=t.hasOwnProperty(n)&&e[n]!==!0;return e[n]=!1,s}function fi(t,e,{delay:n=0,transitionOverride:s,type:i}={}){var o;let{transition:r=t.getDefaultTransition(),transitionEnd:a,...l}=e;const u=t.getValue("willChange");s&&(r=s);const c=[],h=i&&t.animationState&&t.animationState.getState()[i];for(const f in l){const d=t.getValue(f,(o=t.latestValues[f])!==null&&o!==void 0?o:null),m=l[f];if(m===void 0||h&&Ta(h,f))continue;const p={delay:n,elapsed:0,...Ue(r||{},f)};let y=!1;if(window.HandoffAppearAnimations){const g=t.getProps()[ms];if(g){const b=window.HandoffAppearAnimations(g,f,d,w);b!==null&&(p.elapsed=b,y=!0)}}d.start(Xe(f,d,m,t.shouldReduceMotion&&ot.has(f)?{type:!1}:p,t,y));const v=d.animation;v&&(Nt(u)&&(u.add(f),v.then(()=>u.remove(f))),c.push(v))}return a&&Promise.all(c).then(()=>{w.update(()=>{a&&xa(t,a)})}),c}function xe(t,e,n={}){var s;const i=_t(t,e,n.type==="exit"?(s=t.presenceContext)===null||s===void 0?void 0:s.custom:void 0);let{transition:o=t.getDefaultTransition()||{}}=i||{};n.transitionOverride&&(o=n.transitionOverride);const r=i?()=>Promise.all(fi(t,i,n)):()=>Promise.resolve(),a=t.variantChildren&&t.variantChildren.size?(u=0)=>{const{delayChildren:c=0,staggerChildren:h,staggerDirection:f}=o;return Pa(t,e,c+u,h,f,n)}:()=>Promise.resolve(),{when:l}=o;if(l){const[u,c]=l==="beforeChildren"?[r,a]:[a,r];return u().then(()=>c())}else return Promise.all([r(),a(n.delay)])}function Pa(t,e,n=0,s=0,i=1,o){const r=[],a=(t.variantChildren.size-1)*s,l=i===1?(u=0)=>u*s:(u=0)=>a-u*s;return Array.from(t.variantChildren).sort(ba).forEach((u,c)=>{u.notify("AnimationStart",e),r.push(xe(u,e,{...o,delay:n+l(c)}).then(()=>u.notify("AnimationComplete",e)))}),Promise.all(r)}function ba(t,e){return t.sortNodePosition(e)}function Sa(t,e,n={}){t.notify("AnimationStart",e);let s;if(Array.isArray(e)){const i=e.map(o=>xe(t,o,n));s=Promise.all(i)}else if(typeof e=="string")s=xe(t,e,n);else{const i=typeof e=="function"?_t(t,e,n.custom):e;s=Promise.all(fi(t,i,n))}return s.then(()=>{w.postRender(()=>{t.notify("AnimationComplete",e)})})}const Va=[...Me].reverse(),wa=Me.length;function Aa(t){return e=>Promise.all(e.map(({animation:n,options:s})=>Sa(t,n,s)))}function Ca(t){let e=Aa(t);const n=Ma();let s=!0;const i=l=>(u,c)=>{var h;const f=_t(t,c,l==="exit"?(h=t.presenceContext)===null||h===void 0?void 0:h.custom:void 0);if(f){const{transition:d,transitionEnd:m,...p}=f;u={...u,...p,...m}}return u};function o(l){e=l(t)}function r(l){const u=t.getProps(),c=t.getVariantContext(!0)||{},h=[],f=new Set;let d={},m=1/0;for(let y=0;y<wa;y++){const v=Va[y],x=n[v],g=u[v]!==void 0?u[v]:c[v],b=Tt(g),V=v===l?x.isActive:null;V===!1&&(m=y);let M=g===c[v]&&g!==u[v]&&b;if(M&&s&&t.manuallyAnimateOnMount&&(M=!1),x.protectedKeys={...d},!x.isActive&&V===null||!g&&!x.prevProp||Wt(g)||typeof g=="boolean")continue;let S=Da(x.prevProp,g)||v===l&&x.isActive&&!M&&b||y>m&&b,B=!1;const j=Array.isArray(g)?g:[g];let at=j.reduce(i(v),{});V===!1&&(at={});const{prevResolvedValues:tn={}}=x,Fi={...tn,...at},en=F=>{S=!0,f.has(F)&&(B=!0,f.delete(F)),x.needsAnimating[F]=!0;const K=t.getValue(F);K&&(K.liveStyle=!1)};for(const F in Fi){const K=at[F],zt=tn[F];if(d.hasOwnProperty(F))continue;let Yt=!1;ue(K)&&ue(zt)?Yt=!js(K,zt):Yt=K!==zt,Yt?K!=null?en(F):f.add(F):K!==void 0&&f.has(F)?en(F):x.protectedKeys[F]=!0}x.prevProp=g,x.prevResolvedValues=at,x.isActive&&(d={...d,...at}),s&&t.blockInitialAnimation&&(S=!1),S&&(!M||B)&&h.push(...j.map(F=>({animation:F,options:{type:v}})))}if(f.size){const y={};f.forEach(v=>{const x=t.getBaseTarget(v),g=t.getValue(v);g&&(g.liveStyle=!0),y[v]=x??null}),h.push({animation:y})}let p=!!h.length;return s&&(u.initial===!1||u.initial===u.animate)&&!t.manuallyAnimateOnMount&&(p=!1),s=!1,p?e(h):Promise.resolve()}function a(l,u){var c;if(n[l].isActive===u)return Promise.resolve();(c=t.variantChildren)===null||c===void 0||c.forEach(f=>{var d;return(d=f.animationState)===null||d===void 0?void 0:d.setActive(l,u)}),n[l].isActive=u;const h=r(l);for(const f in n)n[f].protectedKeys={};return h}return{animateChanges:r,setActive:a,setAnimateFunction:o,getState:()=>n}}function Da(t,e){return typeof e=="string"?e!==t:Array.isArray(e)?!js(e,t):!1}function et(t=!1){return{isActive:t,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function Ma(){return{animate:et(!0),whileInView:et(),whileHover:et(),whileTap:et(),whileDrag:et(),whileFocus:et(),exit:et()}}class Ra extends tt{constructor(e){super(e),e.animationState||(e.animationState=Ca(e))}updateAnimationControlsSubscription(){const{animate:e}=this.node.getProps();this.unmount(),Wt(e)&&(this.unmount=e.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:e}=this.node.getProps(),{animate:n}=this.node.prevProps||{};e!==n&&this.updateAnimationControlsSubscription()}unmount(){}}let Ea=0;class La extends tt{constructor(){super(...arguments),this.id=Ea++}update(){if(!this.node.presenceContext)return;const{isPresent:e,onExitComplete:n}=this.node.presenceContext,{isPresent:s}=this.node.prevPresenceContext||{};if(!this.node.animationState||e===s)return;const i=this.node.animationState.setActive("exit",!e);n&&!e&&i.then(()=>n(this.id))}mount(){const{register:e}=this.node.presenceContext||{};e&&(this.unmount=e(this.id))}unmount(){}}const Fa={animation:{Feature:Ra},exit:{Feature:La}},Mn=(t,e)=>Math.abs(t-e);function ka(t,e){const n=Mn(t.x,e.x),s=Mn(t.y,e.y);return Math.sqrt(n**2+s**2)}class di{constructor(e,n,{transformPagePoint:s,contextWindow:i,dragSnapToOrigin:o=!1}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const h=se(this.lastMoveEventInfo,this.history),f=this.startEvent!==null,d=ka(h.offset,{x:0,y:0})>=3;if(!f&&!d)return;const{point:m}=h,{timestamp:p}=D;this.history.push({...m,timestamp:p});const{onStart:y,onMove:v}=this.handlers;f||(y&&y(this.lastMoveEvent,h),this.startEvent=this.lastMoveEvent),v&&v(this.lastMoveEvent,h)},this.handlePointerMove=(h,f)=>{this.lastMoveEvent=h,this.lastMoveEventInfo=ne(f,this.transformPagePoint),w.update(this.updatePoint,!0)},this.handlePointerUp=(h,f)=>{this.end();const{onEnd:d,onSessionEnd:m,resumeAnimation:p}=this.handlers;if(this.dragSnapToOrigin&&p&&p(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const y=se(h.type==="pointercancel"?this.lastMoveEventInfo:ne(f,this.transformPagePoint),this.history);this.startEvent&&d&&d(h,y),m&&m(h,y)},!Es(e))return;this.dragSnapToOrigin=o,this.handlers=n,this.transformPagePoint=s,this.contextWindow=i||window;const r=Gt(e),a=ne(r,this.transformPagePoint),{point:l}=a,{timestamp:u}=D;this.history=[{...l,timestamp:u}];const{onSessionStart:c}=n;c&&c(e,se(a,this.history)),this.removeListeners=G($(this.contextWindow,"pointermove",this.handlePointerMove),$(this.contextWindow,"pointerup",this.handlePointerUp),$(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(e){this.handlers=e}end(){this.removeListeners&&this.removeListeners(),Q(this.updatePoint)}}function ne(t,e){return e?{point:e(t.point)}:t}function Rn(t,e){return{x:t.x-e.x,y:t.y-e.y}}function se({point:t},e){return{point:t,delta:Rn(t,mi(e)),offset:Rn(t,Ba(e)),velocity:ja(e,.1)}}function Ba(t){return t[0]}function mi(t){return t[t.length-1]}function ja(t,e){if(t.length<2)return{x:0,y:0};let n=t.length-1,s=null;const i=mi(t);for(;n>=0&&(s=t[n],!(i.timestamp-s.timestamp>X(e)));)n--;if(!s)return{x:0,y:0};const o=_(i.timestamp-s.timestamp);if(o===0)return{x:0,y:0};const r={x:(i.x-s.x)/o,y:(i.y-s.y)/o};return r.x===1/0&&(r.x=0),r.y===1/0&&(r.y=0),r}function k(t){return t.max-t.min}function Te(t,e=0,n=.01){return Math.abs(t-e)<=n}function En(t,e,n,s=.5){t.origin=s,t.originPoint=A(e.min,e.max,t.origin),t.scale=k(n)/k(e),(Te(t.scale,1,1e-4)||isNaN(t.scale))&&(t.scale=1),t.translate=A(n.min,n.max,t.origin)-t.originPoint,(Te(t.translate)||isNaN(t.translate))&&(t.translate=0)}function vt(t,e,n,s){En(t.x,e.x,n.x,s?s.originX:void 0),En(t.y,e.y,n.y,s?s.originY:void 0)}function Ln(t,e,n){t.min=n.min+e.min,t.max=t.min+k(e)}function Oa(t,e,n){Ln(t.x,e.x,n.x),Ln(t.y,e.y,n.y)}function Fn(t,e,n){t.min=e.min-n.min,t.max=t.min+k(e)}function xt(t,e,n){Fn(t.x,e.x,n.x),Fn(t.y,e.y,n.y)}function Ia(t,{min:e,max:n},s){return e!==void 0&&t<e?t=s?A(e,t,s.min):Math.max(t,e):n!==void 0&&t>n&&(t=s?A(n,t,s.max):Math.min(t,n)),t}function kn(t,e,n){return{min:e!==void 0?t.min+e:void 0,max:n!==void 0?t.max+n-(t.max-t.min):void 0}}function Na(t,{top:e,left:n,bottom:s,right:i}){return{x:kn(t.x,n,i),y:kn(t.y,e,s)}}function Bn(t,e){let n=e.min-t.min,s=e.max-t.max;return e.max-e.min<t.max-t.min&&([n,s]=[s,n]),{min:n,max:s}}function Ua(t,e){return{x:Bn(t.x,e.x),y:Bn(t.y,e.y)}}function Ka(t,e){let n=.5;const s=k(t),i=k(e);return i>s?n=St(e.min,e.max-s,t.min):s>i&&(n=St(t.min,t.max-i,e.min)),Z(0,1,n)}function Wa(t,e){const n={};return e.min!==void 0&&(n.min=e.min-t.min),e.max!==void 0&&(n.max=e.max-t.min),n}const Pe=.35;function $a(t=Pe){return t===!1?t=0:t===!0&&(t=Pe),{x:jn(t,"left","right"),y:jn(t,"top","bottom")}}function jn(t,e,n){return{min:On(t,e),max:On(t,n)}}function On(t,e){return typeof t=="number"?t:t[e]||0}const In=()=>({translate:0,scale:1,origin:0,originPoint:0}),ct=()=>({x:In(),y:In()}),Nn=()=>({min:0,max:0}),C=()=>({x:Nn(),y:Nn()});function I(t){return[t("x"),t("y")]}function pi({top:t,left:e,right:n,bottom:s}){return{x:{min:e,max:n},y:{min:t,max:s}}}function Ga({x:t,y:e}){return{top:e.min,right:t.max,bottom:e.max,left:t.min}}function _a(t,e){if(!e)return t;const n=e({x:t.left,y:t.top}),s=e({x:t.right,y:t.bottom});return{top:n.y,left:n.x,bottom:s.y,right:s.x}}function ie(t){return t===void 0||t===1}function be({scale:t,scaleX:e,scaleY:n}){return!ie(t)||!ie(e)||!ie(n)}function nt(t){return be(t)||gi(t)||t.z||t.rotate||t.rotateX||t.rotateY||t.skewX||t.skewY}function gi(t){return Un(t.x)||Un(t.y)}function Un(t){return t&&t!=="0%"}function Ut(t,e,n){const s=t-n,i=e*s;return n+i}function Kn(t,e,n,s,i){return i!==void 0&&(t=Ut(t,i,s)),Ut(t,n,s)+e}function Se(t,e=0,n=1,s,i){t.min=Kn(t.min,e,n,s,i),t.max=Kn(t.max,e,n,s,i)}function yi(t,{x:e,y:n}){Se(t.x,e.translate,e.scale,e.originPoint),Se(t.y,n.translate,n.scale,n.originPoint)}function Ha(t,e,n,s=!1){const i=n.length;if(!i)return;e.x=e.y=1;let o,r;for(let a=0;a<i;a++){o=n[a],r=o.projectionDelta;const l=o.instance;l&&l.style&&l.style.display==="contents"||(s&&o.options.layoutScroll&&o.scroll&&o!==o.root&&ht(t,{x:-o.scroll.offset.x,y:-o.scroll.offset.y}),r&&(e.x*=r.x.scale,e.y*=r.y.scale,yi(t,r)),s&&nt(o.latestValues)&&ht(t,o.latestValues))}e.x=Wn(e.x),e.y=Wn(e.y)}function Wn(t){return Number.isInteger(t)||t>1.0000000000001||t<.999999999999?t:1}function Y(t,e){t.min=t.min+e,t.max=t.max+e}function $n(t,e,[n,s,i]){const o=e[i]!==void 0?e[i]:.5,r=A(t.min,t.max,o);Se(t,e[n],e[s],r,e.scale)}const za=["x","scaleX","originX"],Ya=["y","scaleY","originY"];function ht(t,e){$n(t.x,e,za),$n(t.y,e,Ya)}function vi(t,e){return pi(_a(t.getBoundingClientRect(),e))}function Xa(t,e,n){const s=vi(t,n),{scroll:i}=e;return i&&(Y(s.x,i.offset.x),Y(s.y,i.offset.y)),s}const xi=({current:t})=>t?t.ownerDocument.defaultView:null,qa=new WeakMap;class Za{constructor(e){this.openGlobalLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=C(),this.visualElement=e}start(e,{snapToCursor:n=!1}={}){const{presenceContext:s}=this.visualElement;if(s&&s.isPresent===!1)return;const i=c=>{const{dragSnapToOrigin:h}=this.getProps();h?this.pauseAnimation():this.stopAnimation(),n&&this.snapToCursor(Gt(c,"page").point)},o=(c,h)=>{const{drag:f,dragPropagation:d,onDragStart:m}=this.getProps();if(f&&!d&&(this.openGlobalLock&&this.openGlobalLock(),this.openGlobalLock=Fs(f),!this.openGlobalLock))return;this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),I(y=>{let v=this.getAxisMotionValue(y).get()||0;if(U.test(v)){const{projection:x}=this.visualElement;if(x&&x.layout){const g=x.layout.layoutBox[y];g&&(v=k(g)*(parseFloat(v)/100))}}this.originPoint[y]=v}),m&&w.postRender(()=>m(c,h));const{animationState:p}=this.visualElement;p&&p.setActive("whileDrag",!0)},r=(c,h)=>{const{dragPropagation:f,dragDirectionLock:d,onDirectionLock:m,onDrag:p}=this.getProps();if(!f&&!this.openGlobalLock)return;const{offset:y}=h;if(d&&this.currentDirection===null){this.currentDirection=Qa(y),this.currentDirection!==null&&m&&m(this.currentDirection);return}this.updateAxis("x",h.point,y),this.updateAxis("y",h.point,y),this.visualElement.render(),p&&p(c,h)},a=(c,h)=>this.stop(c,h),l=()=>I(c=>{var h;return this.getAnimationState(c)==="paused"&&((h=this.getAxisMotionValue(c).animation)===null||h===void 0?void 0:h.play())}),{dragSnapToOrigin:u}=this.getProps();this.panSession=new di(e,{onSessionStart:i,onStart:o,onMove:r,onSessionEnd:a,resumeAnimation:l},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:u,contextWindow:xi(this.visualElement)})}stop(e,n){const s=this.isDragging;if(this.cancel(),!s)return;const{velocity:i}=n;this.startAnimation(i);const{onDragEnd:o}=this.getProps();o&&w.postRender(()=>o(e,n))}cancel(){this.isDragging=!1;const{projection:e,animationState:n}=this.visualElement;e&&(e.isAnimationBlocked=!1),this.panSession&&this.panSession.end(),this.panSession=void 0;const{dragPropagation:s}=this.getProps();!s&&this.openGlobalLock&&(this.openGlobalLock(),this.openGlobalLock=null),n&&n.setActive("whileDrag",!1)}updateAxis(e,n,s){const{drag:i}=this.getProps();if(!s||!Et(e,i,this.currentDirection))return;const o=this.getAxisMotionValue(e);let r=this.originPoint[e]+s[e];this.constraints&&this.constraints[e]&&(r=Ia(r,this.constraints[e],this.elastic[e])),o.set(r)}resolveConstraints(){var e;const{dragConstraints:n,dragElastic:s}=this.getProps(),i=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):(e=this.visualElement.projection)===null||e===void 0?void 0:e.layout,o=this.constraints;n&<(n)?this.constraints||(this.constraints=this.resolveRefConstraints()):n&&i?this.constraints=Na(i.layoutBox,n):this.constraints=!1,this.elastic=$a(s),o!==this.constraints&&i&&this.constraints&&!this.hasMutatedConstraints&&I(r=>{this.constraints!==!1&&this.getAxisMotionValue(r)&&(this.constraints[r]=Wa(i.layoutBox[r],this.constraints[r]))})}resolveRefConstraints(){const{dragConstraints:e,onMeasureDragConstraints:n}=this.getProps();if(!e||!lt(e))return!1;const s=e.current,{projection:i}=this.visualElement;if(!i||!i.layout)return!1;const o=Xa(s,i.root,this.visualElement.getTransformPagePoint());let r=Ua(i.layout.layoutBox,o);if(n){const a=n(Ga(r));this.hasMutatedConstraints=!!a,a&&(r=pi(a))}return r}startAnimation(e){const{drag:n,dragMomentum:s,dragElastic:i,dragTransition:o,dragSnapToOrigin:r,onDragTransitionEnd:a}=this.getProps(),l=this.constraints||{},u=I(c=>{if(!Et(c,n,this.currentDirection))return;let h=l&&l[c]||{};r&&(h={min:0,max:0});const f=i?200:1e6,d=i?40:1e7,m={type:"inertia",velocity:s?e[c]:0,bounceStiffness:f,bounceDamping:d,timeConstant:750,restDelta:1,restSpeed:10,...o,...h};return this.startAxisValueAnimation(c,m)});return Promise.all(u).then(a)}startAxisValueAnimation(e,n){const s=this.getAxisMotionValue(e);return s.start(Xe(e,s,0,n,this.visualElement))}stopAnimation(){I(e=>this.getAxisMotionValue(e).stop())}pauseAnimation(){I(e=>{var n;return(n=this.getAxisMotionValue(e).animation)===null||n===void 0?void 0:n.pause()})}getAnimationState(e){var n;return(n=this.getAxisMotionValue(e).animation)===null||n===void 0?void 0:n.state}getAxisMotionValue(e){const n=`_drag${e.toUpperCase()}`,s=this.visualElement.getProps(),i=s[n];return i||this.visualElement.getValue(e,(s.initial?s.initial[e]:void 0)||0)}snapToCursor(e){I(n=>{const{drag:s}=this.getProps();if(!Et(n,s,this.currentDirection))return;const{projection:i}=this.visualElement,o=this.getAxisMotionValue(n);if(i&&i.layout){const{min:r,max:a}=i.layout.layoutBox[n];o.set(e[n]-A(r,a,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:e,dragConstraints:n}=this.getProps(),{projection:s}=this.visualElement;if(!lt(n)||!s||!this.constraints)return;this.stopAnimation();const i={x:0,y:0};I(r=>{const a=this.getAxisMotionValue(r);if(a&&this.constraints!==!1){const l=a.get();i[r]=Ka({min:l,max:l},this.constraints[r])}});const{transformTemplate:o}=this.visualElement.getProps();this.visualElement.current.style.transform=o?o({},""):"none",s.root&&s.root.updateScroll(),s.updateLayout(),this.resolveConstraints(),I(r=>{if(!Et(r,e,null))return;const a=this.getAxisMotionValue(r),{min:l,max:u}=this.constraints[r];a.set(A(l,u,i[r]))})}addListeners(){if(!this.visualElement.current)return;qa.set(this.visualElement,this);const e=this.visualElement.current,n=$(e,"pointerdown",l=>{const{drag:u,dragListener:c=!0}=this.getProps();u&&c&&this.start(l)}),s=()=>{const{dragConstraints:l}=this.getProps();lt(l)&&(this.constraints=this.resolveRefConstraints())},{projection:i}=this.visualElement,o=i.addEventListener("measure",s);i&&!i.layout&&(i.root&&i.root.updateScroll(),i.updateLayout()),s();const r=W(window,"resize",()=>this.scalePositionWithinConstraints()),a=i.addEventListener("didUpdate",({delta:l,hasLayoutChanged:u})=>{this.isDragging&&u&&(I(c=>{const h=this.getAxisMotionValue(c);h&&(this.originPoint[c]+=l[c].translate,h.set(h.get()+l[c].translate))}),this.visualElement.render())});return()=>{r(),n(),o(),a&&a()}}getProps(){const e=this.visualElement.getProps(),{drag:n=!1,dragDirectionLock:s=!1,dragPropagation:i=!1,dragConstraints:o=!1,dragElastic:r=Pe,dragMomentum:a=!0}=e;return{...e,drag:n,dragDirectionLock:s,dragPropagation:i,dragConstraints:o,dragElastic:r,dragMomentum:a}}}function Et(t,e,n){return(e===!0||e===t)&&(n===null||n===t)}function Qa(t,e=10){let n=null;return Math.abs(t.y)>e?n="y":Math.abs(t.x)>e&&(n="x"),n}class Ja extends tt{constructor(e){super(e),this.removeGroupControls=L,this.removeListeners=L,this.controls=new Za(e)}mount(){const{dragControls:e}=this.node.getProps();e&&(this.removeGroupControls=e.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||L}unmount(){this.removeGroupControls(),this.removeListeners()}}const Gn=t=>(e,n)=>{t&&w.postRender(()=>t(e,n))};class tl extends tt{constructor(){super(...arguments),this.removePointerDownListener=L}onPointerDown(e){this.session=new di(e,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:xi(this.node)})}createPanHandlers(){const{onPanSessionStart:e,onPanStart:n,onPan:s,onPanEnd:i}=this.node.getProps();return{onSessionStart:Gn(e),onStart:Gn(n),onMove:s,onEnd:(o,r)=>{delete this.session,i&&w.postRender(()=>i(o,r))}}}mount(){this.removePointerDownListener=$(this.node.current,"pointerdown",e=>this.onPointerDown(e))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}function el(){const t=P.useContext(we);if(t===null)return[!0,null];const{isPresent:e,onExitComplete:n,register:s}=t,i=P.useId();return P.useEffect(()=>s(i),[]),!e&&n?[!1,()=>n&&n(i)]:[!0]}const kt={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function _n(t,e){return e.max===e.min?0:t/(e.max-e.min)*100}const mt={correct:(t,e)=>{if(!e.target)return t;if(typeof t=="string")if(T.test(t))t=parseFloat(t);else return t;const n=_n(t,e.target.x),s=_n(t,e.target.y);return`${n}% ${s}%`}},nl={correct:(t,{treeScale:e,projectionDelta:n})=>{const s=t,i=J.parse(t);if(i.length>5)return s;const o=J.createTransformer(t),r=typeof i[0]!="number"?1:0,a=n.x.scale*e.x,l=n.y.scale*e.y;i[0+r]/=a,i[1+r]/=l;const u=A(a,l,.5);return typeof i[2+r]=="number"&&(i[2+r]/=u),typeof i[3+r]=="number"&&(i[3+r]/=u),o(i)}};class sl extends P.Component{componentDidMount(){const{visualElement:e,layoutGroup:n,switchLayoutGroup:s,layoutId:i}=this.props,{projection:o}=e;tr(il),o&&(n.group&&n.group.add(o),s&&s.register&&i&&s.register(o),o.root.didUpdate(),o.addEventListener("animationComplete",()=>{this.safeToRemove()}),o.setOptions({...o.options,onExitComplete:()=>this.safeToRemove()})),kt.hasEverUpdated=!0}getSnapshotBeforeUpdate(e){const{layoutDependency:n,visualElement:s,drag:i,isPresent:o}=this.props,r=s.projection;return r&&(r.isPresent=o,i||e.layoutDependency!==n||n===void 0?r.willUpdate():this.safeToRemove(),e.isPresent!==o&&(o?r.promote():r.relegate()||w.postRender(()=>{const a=r.getStack();(!a||!a.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:e}=this.props.visualElement;e&&(e.root.didUpdate(),De.postRender(()=>{!e.currentAnimation&&e.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:e,layoutGroup:n,switchLayoutGroup:s}=this.props,{projection:i}=e;i&&(i.scheduleCheckAfterUnmount(),n&&n.group&&n.group.remove(i),s&&s.deregister&&s.deregister(i))}safeToRemove(){const{safeToRemove:e}=this.props;e&&e()}render(){return null}}function Ti(t){const[e,n]=el(),s=P.useContext(ys);return N.jsx(sl,{...t,layoutGroup:s,switchLayoutGroup:P.useContext(vs),isPresent:e,safeToRemove:n})}const il={borderRadius:{...mt,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:mt,borderTopRightRadius:mt,borderBottomLeftRadius:mt,borderBottomRightRadius:mt,boxShadow:nl},Pi=["TopLeft","TopRight","BottomLeft","BottomRight"],rl=Pi.length,Hn=t=>typeof t=="string"?parseFloat(t):t,zn=t=>typeof t=="number"||T.test(t);function ol(t,e,n,s,i,o){i?(t.opacity=A(0,n.opacity!==void 0?n.opacity:1,al(s)),t.opacityExit=A(e.opacity!==void 0?e.opacity:1,0,ll(s))):o&&(t.opacity=A(e.opacity!==void 0?e.opacity:1,n.opacity!==void 0?n.opacity:1,s));for(let r=0;r<rl;r++){const a=`border${Pi[r]}Radius`;let l=Yn(e,a),u=Yn(n,a);if(l===void 0&&u===void 0)continue;l||(l=0),u||(u=0),l===0||u===0||zn(l)===zn(u)?(t[a]=Math.max(A(Hn(l),Hn(u),s),0),(U.test(u)||U.test(l))&&(t[a]+="%")):t[a]=u}(e.rotate||n.rotate)&&(t.rotate=A(e.rotate||0,n.rotate||0,s))}function Yn(t,e){return t[e]!==void 0?t[e]:t.borderRadius}const al=bi(0,.5,ri),ll=bi(.5,.95,L);function bi(t,e,n){return s=>s<t?0:s>e?1:n(St(t,e,s))}function Xn(t,e){t.min=e.min,t.max=e.max}function O(t,e){Xn(t.x,e.x),Xn(t.y,e.y)}function qn(t,e,n,s,i){return t-=e,t=Ut(t,1/n,s),i!==void 0&&(t=Ut(t,1/i,s)),t}function ul(t,e=0,n=1,s=.5,i,o=t,r=t){if(U.test(e)&&(e=parseFloat(e),e=A(r.min,r.max,e/100)-r.min),typeof e!="number")return;let a=A(o.min,o.max,s);t===o&&(a-=e),t.min=qn(t.min,e,n,a,i),t.max=qn(t.max,e,n,a,i)}function Zn(t,e,[n,s,i],o,r){ul(t,e[n],e[s],e[i],e.scale,o,r)}const cl=["x","scaleX","originX"],hl=["y","scaleY","originY"];function Qn(t,e,n,s){Zn(t.x,e,cl,n?n.x:void 0,s?s.x:void 0),Zn(t.y,e,hl,n?n.y:void 0,s?s.y:void 0)}function Jn(t){return t.translate===0&&t.scale===1}function Si(t){return Jn(t.x)&&Jn(t.y)}function fl(t,e){return t.x.min===e.x.min&&t.x.max===e.x.max&&t.y.min===e.y.min&&t.y.max===e.y.max}function Vi(t,e){return Math.round(t.x.min)===Math.round(e.x.min)&&Math.round(t.x.max)===Math.round(e.x.max)&&Math.round(t.y.min)===Math.round(e.y.min)&&Math.round(t.y.max)===Math.round(e.y.max)}function ts(t){return k(t.x)/k(t.y)}class dl{constructor(){this.members=[]}add(e){qe(this.members,e),e.scheduleRender()}remove(e){if(Ze(this.members,e),e===this.prevLead&&(this.prevLead=void 0),e===this.lead){const n=this.members[this.members.length-1];n&&this.promote(n)}}relegate(e){const n=this.members.findIndex(i=>e===i);if(n===0)return!1;let s;for(let i=n;i>=0;i--){const o=this.members[i];if(o.isPresent!==!1){s=o;break}}return s?(this.promote(s),!0):!1}promote(e,n){const s=this.lead;if(e!==s&&(this.prevLead=s,this.lead=e,e.show(),s)){s.instance&&s.scheduleRender(),e.scheduleRender(),e.resumeFrom=s,n&&(e.resumeFrom.preserveOpacity=!0),s.snapshot&&(e.snapshot=s.snapshot,e.snapshot.latestValues=s.animationValues||s.latestValues),e.root&&e.root.isUpdating&&(e.isLayoutDirty=!0);const{crossfade:i}=e.options;i===!1&&s.hide()}}exitAnimationComplete(){this.members.forEach(e=>{const{options:n,resumingFrom:s}=e;n.onExitComplete&&n.onExitComplete(),s&&s.options.onExitComplete&&s.options.onExitComplete()})}scheduleRender(){this.members.forEach(e=>{e.instance&&e.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}function es(t,e,n){let s="";const i=t.x.translate/e.x,o=t.y.translate/e.y,r=(n==null?void 0:n.z)||0;if((i||o||r)&&(s=`translate3d(${i}px, ${o}px, ${r}px) `),(e.x!==1||e.y!==1)&&(s+=`scale(${1/e.x}, ${1/e.y}) `),n){const{transformPerspective:u,rotate:c,rotateX:h,rotateY:f,skewX:d,skewY:m}=n;u&&(s=`perspective(${u}px) ${s}`),c&&(s+=`rotate(${c}deg) `),h&&(s+=`rotateX(${h}deg) `),f&&(s+=`rotateY(${f}deg) `),d&&(s+=`skewX(${d}deg) `),m&&(s+=`skewY(${m}deg) `)}const a=t.x.scale*e.x,l=t.y.scale*e.y;return(a!==1||l!==1)&&(s+=`scale(${a}, ${l})`),s||"none"}const ml=(t,e)=>t.depth-e.depth;class pl{constructor(){this.children=[],this.isDirty=!1}add(e){qe(this.children,e),this.isDirty=!0}remove(e){Ze(this.children,e),this.isDirty=!0}forEach(e){this.isDirty&&this.children.sort(ml),this.isDirty=!1,this.children.forEach(e)}}function gl(t,e){const n=q.now(),s=({timestamp:i})=>{const o=i-n;o>=e&&(Q(s),t(o-e))};return w.read(s,!0),()=>Q(s)}function yl(t){window.MotionDebug&&window.MotionDebug.record(t)}function vl(t){return t instanceof SVGElement&&t.tagName!=="svg"}function xl(t,e,n){const s=E(t)?t:Vt(t);return s.start(Xe("",s,e,n)),s.animation}const re=["","X","Y","Z"],Tl={visibility:"hidden"},ns=1e3;let Pl=0;const st={type:"projectionFrame",totalNodes:0,resolvedTargetDeltas:0,recalculatedProjection:0};function oe(t,e,n,s){const{latestValues:i}=e;i[t]&&(n[t]=i[t],e.setStaticValue(t,0),s&&(s[t]=0))}function wi({attachResizeListener:t,defaultParent:e,measureScroll:n,checkIsScrollRoot:s,resetTransform:i}){return class{constructor(r={},a=e==null?void 0:e()){this.id=Pl++,this.animationId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.updateScheduled=!1,this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,st.totalNodes=st.resolvedTargetDeltas=st.recalculatedProjection=0,this.nodes.forEach(Vl),this.nodes.forEach(Ml),this.nodes.forEach(Rl),this.nodes.forEach(wl),yl(st)},this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=r,this.root=a?a.root||a:this,this.path=a?[...a.path,a]:[],this.parent=a,this.depth=a?a.depth+1:0;for(let l=0;l<this.path.length;l++)this.path[l].shouldResetTransform=!0;this.root===this&&(this.nodes=new pl)}addEventListener(r,a){return this.eventHandlers.has(r)||this.eventHandlers.set(r,new Qe),this.eventHandlers.get(r).add(a)}notifyListeners(r,...a){const l=this.eventHandlers.get(r);l&&l.notify(...a)}hasListeners(r){return this.eventHandlers.has(r)}mount(r,a=this.root.hasTreeAnimated){if(this.instance)return;this.isSVG=vl(r),this.instance=r;const{layoutId:l,layout:u,visualElement:c}=this.options;if(c&&!c.current&&c.mount(r),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),a&&(u||l)&&(this.isLayoutDirty=!0),t){let h;const f=()=>this.root.updateBlockedByResize=!1;t(r,()=>{this.root.updateBlockedByResize=!0,h&&h(),h=gl(f,250),kt.hasAnimatedSinceResize&&(kt.hasAnimatedSinceResize=!1,this.nodes.forEach(is))})}l&&this.root.registerSharedNode(l,this),this.options.animate!==!1&&c&&(l||u)&&this.addEventListener("didUpdate",({delta:h,hasLayoutChanged:f,hasRelativeTargetChanged:d,layout:m})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const p=this.options.transition||c.getDefaultTransition()||Bl,{onLayoutAnimationStart:y,onLayoutAnimationComplete:v}=c.getProps(),x=!this.targetLayout||!Vi(this.targetLayout,m)||d,g=!f&&d;if(this.options.layoutRoot||this.resumeFrom&&this.resumeFrom.instance||g||f&&(x||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0),this.setAnimationOrigin(h,g);const b={...Ue(p,"layout"),onPlay:y,onComplete:v};(c.shouldReduceMotion||this.options.layoutRoot)&&(b.delay=0,b.type=!1),this.startAnimation(b)}else f||is(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=m})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const r=this.getStack();r&&r.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,Q(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){return this.isAnimationBlocked||this.parent&&this.parent.isTreeAnimationBlocked()||!1}startUpdate(){this.isUpdateBlocked()||(this.isUpdating=!0,window.HandoffCancelAllAnimations&&window.HandoffCancelAllAnimations(),this.nodes&&this.nodes.forEach(El),this.animationId++)}getTransformTemplate(){const{visualElement:r}=this.options;return r&&r.getProps().transformTemplate}willUpdate(r=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let c=0;c<this.path.length;c++){const h=this.path[c];h.shouldResetTransform=!0,h.updateScroll("snapshot"),h.options.layoutRoot&&h.willUpdate(!1)}const{layoutId:a,layout:l}=this.options;if(a===void 0&&!l)return;const u=this.getTransformTemplate();this.prevTransformTemplateValue=u?u(this.latestValues,""):void 0,this.updateSnapshot(),r&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){this.unblockUpdate(),this.clearAllSnapshots(),this.nodes.forEach(ss);return}this.isUpdating||this.nodes.forEach(Cl),this.isUpdating=!1,this.nodes.forEach(Dl),this.nodes.forEach(bl),this.nodes.forEach(Sl),this.clearAllSnapshots();const a=q.now();D.delta=Z(0,1e3/60,a-D.timestamp),D.timestamp=a,D.isProcessing=!0,Xt.update.process(D),Xt.preRender.process(D),Xt.render.process(D),D.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,De.read(()=>this.update()))}clearAllSnapshots(){this.nodes.forEach(Al),this.sharedNodes.forEach(Ll)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,w.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){w.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure())}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let l=0;l<this.path.length;l++)this.path[l].updateScroll();const r=this.layout;this.layout=this.measure(!1),this.layoutCorrected=C(),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:a}=this.options;a&&a.notify("LayoutMeasure",this.layout.layoutBox,r?r.layoutBox:void 0)}updateScroll(r="measure"){let a=!!(this.options.layoutScroll&&this.instance);this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===r&&(a=!1),a&&(this.scroll={animationId:this.root.animationId,phase:r,isRoot:s(this.instance),offset:n(this.instance)})}resetTransform(){if(!i)return;const r=this.isLayoutDirty||this.shouldResetTransform,a=this.projectionDelta&&!Si(this.projectionDelta),l=this.getTransformTemplate(),u=l?l(this.latestValues,""):void 0,c=u!==this.prevTransformTemplateValue;r&&(a||nt(this.latestValues)||c)&&(i(this.instance,u),this.shouldResetTransform=!1,this.scheduleRender())}measure(r=!0){const a=this.measurePageBox();let l=this.removeElementScroll(a);return r&&(l=this.removeTransform(l)),jl(l),{animationId:this.root.animationId,measuredBox:a,layoutBox:l,latestValues:{},source:this.id}}measurePageBox(){const{visualElement:r}=this.options;if(!r)return C();const a=r.measureViewportBox(),{scroll:l}=this.root;return l&&(Y(a.x,l.offset.x),Y(a.y,l.offset.y)),a}removeElementScroll(r){const a=C();O(a,r);for(let l=0;l<this.path.length;l++){const u=this.path[l],{scroll:c,options:h}=u;if(u!==this.root&&c&&h.layoutScroll){if(c.isRoot){O(a,r);const{scroll:f}=this.root;f&&(Y(a.x,-f.offset.x),Y(a.y,-f.offset.y))}Y(a.x,c.offset.x),Y(a.y,c.offset.y)}}return a}applyTransform(r,a=!1){const l=C();O(l,r);for(let u=0;u<this.path.length;u++){const c=this.path[u];!a&&c.options.layoutScroll&&c.scroll&&c!==c.root&&ht(l,{x:-c.scroll.offset.x,y:-c.scroll.offset.y}),nt(c.latestValues)&&ht(l,c.latestValues)}return nt(this.latestValues)&&ht(l,this.latestValues),l}removeTransform(r){const a=C();O(a,r);for(let l=0;l<this.path.length;l++){const u=this.path[l];if(!u.instance||!nt(u.latestValues))continue;be(u.latestValues)&&u.updateSnapshot();const c=C(),h=u.measurePageBox();O(c,h),Qn(a,u.latestValues,u.snapshot?u.snapshot.layoutBox:void 0,c)}return nt(this.latestValues)&&Qn(a,this.latestValues),a}setTargetDelta(r){this.targetDelta=r,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(r){this.options={...this.options,...r,crossfade:r.crossfade!==void 0?r.crossfade:!0}}clearMeasurements(){this.scroll=void 0,this.layout=void 0,this.snapshot=void 0,this.prevTransformTemplateValue=void 0,this.targetDelta=void 0,this.target=void 0,this.isLayoutDirty=!1}forceRelativeParentToResolveTarget(){this.relativeParent&&this.relativeParent.resolvedRelativeTargetAt!==D.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(r=!1){var a;const l=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=l.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=l.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=l.isSharedProjectionDirty);const u=!!this.resumingFrom||this!==l;if(!(r||u&&this.isSharedProjectionDirty||this.isProjectionDirty||!((a=this.parent)===null||a===void 0)&&a.isProjectionDirty||this.attemptToResolveRelativeTarget))return;const{layout:h,layoutId:f}=this.options;if(!(!this.layout||!(h||f))){if(this.resolvedRelativeTargetAt=D.timestamp,!this.targetDelta&&!this.relativeTarget){const d=this.getClosestProjectingParent();d&&d.layout&&this.animationProgress!==1?(this.relativeParent=d,this.forceRelativeParentToResolveTarget(),this.relativeTarget=C(),this.relativeTargetOrigin=C(),xt(this.relativeTargetOrigin,this.layout.layoutBox,d.layout.layoutBox),O(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}if(!(!this.relativeTarget&&!this.targetDelta)){if(this.target||(this.target=C(),this.targetWithTransforms=C()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),Oa(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):O(this.target,this.layout.layoutBox),yi(this.target,this.targetDelta)):O(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget){this.attemptToResolveRelativeTarget=!1;const d=this.getClosestProjectingParent();d&&!!d.resumingFrom==!!this.resumingFrom&&!d.options.layoutScroll&&d.target&&this.animationProgress!==1?(this.relativeParent=d,this.forceRelativeParentToResolveTarget(),this.relativeTarget=C(),this.relativeTargetOrigin=C(),xt(this.relativeTargetOrigin,this.target,d.target),O(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}st.resolvedTargetDeltas++}}}getClosestProjectingParent(){if(!(!this.parent||be(this.parent.latestValues)||gi(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}calcProjection(){var r;const a=this.getLead(),l=!!this.resumingFrom||this!==a;let u=!0;if((this.isProjectionDirty||!((r=this.parent)===null||r===void 0)&&r.isProjectionDirty)&&(u=!1),l&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(u=!1),this.resolvedRelativeTargetAt===D.timestamp&&(u=!1),u)return;const{layout:c,layoutId:h}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(c||h))return;O(this.layoutCorrected,this.layout.layoutBox);const f=this.treeScale.x,d=this.treeScale.y;Ha(this.layoutCorrected,this.treeScale,this.path,l),a.layout&&!a.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(a.target=a.layout.layoutBox,a.targetWithTransforms=C());const{target:m}=a;if(!m){this.projectionTransform&&(this.projectionDelta=ct(),this.projectionTransform="none",this.scheduleRender());return}this.projectionDelta||(this.projectionDelta=ct(),this.projectionDeltaWithTransform=ct());const p=this.projectionTransform;vt(this.projectionDelta,this.layoutCorrected,m,this.latestValues),this.projectionTransform=es(this.projectionDelta,this.treeScale),(this.projectionTransform!==p||this.treeScale.x!==f||this.treeScale.y!==d)&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",m)),st.recalculatedProjection++}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(r=!0){if(this.options.scheduleRender&&this.options.scheduleRender(),r){const a=this.getStack();a&&a.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}setAnimationOrigin(r,a=!1){const l=this.snapshot,u=l?l.latestValues:{},c={...this.latestValues},h=ct();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!a;const f=C(),d=l?l.source:void 0,m=this.layout?this.layout.source:void 0,p=d!==m,y=this.getStack(),v=!y||y.members.length<=1,x=!!(p&&!v&&this.options.crossfade===!0&&!this.path.some(kl));this.animationProgress=0;let g;this.mixTargetDelta=b=>{const V=b/1e3;rs(h.x,r.x,V),rs(h.y,r.y,V),this.setTargetDelta(h),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(xt(f,this.layout.layoutBox,this.relativeParent.layout.layoutBox),Fl(this.relativeTarget,this.relativeTargetOrigin,f,V),g&&fl(this.relativeTarget,g)&&(this.isProjectionDirty=!1),g||(g=C()),O(g,this.relativeTarget)),p&&(this.animationValues=c,ol(c,u,this.latestValues,V,x,v)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=V},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(r){this.notifyListeners("animationStart"),this.currentAnimation&&this.currentAnimation.stop(),this.resumingFrom&&this.resumingFrom.currentAnimation&&this.resumingFrom.currentAnimation.stop(),this.pendingAnimation&&(Q(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=w.update(()=>{kt.hasAnimatedSinceResize=!0,this.currentAnimation=xl(0,ns,{...r,onUpdate:a=>{this.mixTargetDelta(a),r.onUpdate&&r.onUpdate(a)},onComplete:()=>{r.onComplete&&r.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);const r=this.getStack();r&&r.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(ns),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const r=this.getLead();let{targetWithTransforms:a,target:l,layout:u,latestValues:c}=r;if(!(!a||!l||!u)){if(this!==r&&this.layout&&u&&Ai(this.options.animationType,this.layout.layoutBox,u.layoutBox)){l=this.target||C();const h=k(this.layout.layoutBox.x);l.x.min=r.target.x.min,l.x.max=l.x.min+h;const f=k(this.layout.layoutBox.y);l.y.min=r.target.y.min,l.y.max=l.y.min+f}O(a,l),ht(a,c),vt(this.projectionDeltaWithTransform,this.layoutCorrected,a,c)}}registerSharedNode(r,a){this.sharedNodes.has(r)||this.sharedNodes.set(r,new dl),this.sharedNodes.get(r).add(a);const u=a.options.initialPromotionConfig;a.promote({transition:u?u.transition:void 0,preserveFollowOpacity:u&&u.shouldPreserveFollowOpacity?u.shouldPreserveFollowOpacity(a):void 0})}isLead(){const r=this.getStack();return r?r.lead===this:!0}getLead(){var r;const{layoutId:a}=this.options;return a?((r=this.getStack())===null||r===void 0?void 0:r.lead)||this:this}getPrevLead(){var r;const{layoutId:a}=this.options;return a?(r=this.getStack())===null||r===void 0?void 0:r.prevLead:void 0}getStack(){const{layoutId:r}=this.options;if(r)return this.root.sharedNodes.get(r)}promote({needsReset:r,transition:a,preserveFollowOpacity:l}={}){const u=this.getStack();u&&u.promote(this,l),r&&(this.projectionDelta=void 0,this.needsReset=!0),a&&this.setOptions({transition:a})}relegate(){const r=this.getStack();return r?r.relegate(this):!1}resetSkewAndRotation(){const{visualElement:r}=this.options;if(!r)return;let a=!1;const{latestValues:l}=r;if((l.z||l.rotate||l.rotateX||l.rotateY||l.rotateZ||l.skewX||l.skewY)&&(a=!0),!a)return;const u={};l.z&&oe("z",r,u,this.animationValues);for(let c=0;c<re.length;c++)oe(`rotate${re[c]}`,r,u,this.animationValues),oe(`skew${re[c]}`,r,u,this.animationValues);r.render();for(const c in u)r.setStaticValue(c,u[c]),this.animationValues&&(this.animationValues[c]=u[c]);r.scheduleRender()}getProjectionStyles(r){var a,l;if(!this.instance||this.isSVG)return;if(!this.isVisible)return Tl;const u={visibility:""},c=this.getTransformTemplate();if(this.needsReset)return this.needsReset=!1,u.opacity="",u.pointerEvents=Lt(r==null?void 0:r.pointerEvents)||"",u.transform=c?c(this.latestValues,""):"none",u;const h=this.getLead();if(!this.projectionDelta||!this.layout||!h.target){const p={};return this.options.layoutId&&(p.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,p.pointerEvents=Lt(r==null?void 0:r.pointerEvents)||""),this.hasProjected&&!nt(this.latestValues)&&(p.transform=c?c({},""):"none",this.hasProjected=!1),p}const f=h.animationValues||h.latestValues;this.applyTransformsToTarget(),u.transform=es(this.projectionDeltaWithTransform,this.treeScale,f),c&&(u.transform=c(f,u.transform));const{x:d,y:m}=this.projectionDelta;u.transformOrigin=`${d.origin*100}% ${m.origin*100}% 0`,h.animationValues?u.opacity=h===this?(l=(a=f.opacity)!==null&&a!==void 0?a:this.latestValues.opacity)!==null&&l!==void 0?l:1:this.preserveOpacity?this.latestValues.opacity:f.opacityExit:u.opacity=h===this?f.opacity!==void 0?f.opacity:"":f.opacityExit!==void 0?f.opacityExit:0;for(const p in Bt){if(f[p]===void 0)continue;const{correct:y,applyTo:v}=Bt[p],x=u.transform==="none"?f[p]:y(f[p],h);if(v){const g=v.length;for(let b=0;b<g;b++)u[v[b]]=x}else u[p]=x}return this.options.layoutId&&(u.pointerEvents=h===this?Lt(r==null?void 0:r.pointerEvents)||"":"none"),u}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(r=>{var a;return(a=r.currentAnimation)===null||a===void 0?void 0:a.stop()}),this.root.nodes.forEach(ss),this.root.sharedNodes.clear()}}}function bl(t){t.updateLayout()}function Sl(t){var e;const n=((e=t.resumeFrom)===null||e===void 0?void 0:e.snapshot)||t.snapshot;if(t.isLead()&&t.layout&&n&&t.hasListeners("didUpdate")){const{layoutBox:s,measuredBox:i}=t.layout,{animationType:o}=t.options,r=n.source!==t.layout.source;o==="size"?I(h=>{const f=r?n.measuredBox[h]:n.layoutBox[h],d=k(f);f.min=s[h].min,f.max=f.min+d}):Ai(o,n.layoutBox,s)&&I(h=>{const f=r?n.measuredBox[h]:n.layoutBox[h],d=k(s[h]);f.max=f.min+d,t.relativeTarget&&!t.currentAnimation&&(t.isProjectionDirty=!0,t.relativeTarget[h].max=t.relativeTarget[h].min+d)});const a=ct();vt(a,s,n.layoutBox);const l=ct();r?vt(l,t.applyTransform(i,!0),n.measuredBox):vt(l,s,n.layoutBox);const u=!Si(a);let c=!1;if(!t.resumeFrom){const h=t.getClosestProjectingParent();if(h&&!h.resumeFrom){const{snapshot:f,layout:d}=h;if(f&&d){const m=C();xt(m,n.layoutBox,f.layoutBox);const p=C();xt(p,s,d.layoutBox),Vi(m,p)||(c=!0),h.options.layoutRoot&&(t.relativeTarget=p,t.relativeTargetOrigin=m,t.relativeParent=h)}}}t.notifyListeners("didUpdate",{layout:s,snapshot:n,delta:l,layoutDelta:a,hasLayoutChanged:u,hasRelativeTargetChanged:c})}else if(t.isLead()){const{onExitComplete:s}=t.options;s&&s()}t.options.transition=void 0}function Vl(t){st.totalNodes++,t.parent&&(t.isProjecting()||(t.isProjectionDirty=t.parent.isProjectionDirty),t.isSharedProjectionDirty||(t.isSharedProjectionDirty=!!(t.isProjectionDirty||t.parent.isProjectionDirty||t.parent.isSharedProjectionDirty)),t.isTransformDirty||(t.isTransformDirty=t.parent.isTransformDirty))}function wl(t){t.isProjectionDirty=t.isSharedProjectionDirty=t.isTransformDirty=!1}function Al(t){t.clearSnapshot()}function ss(t){t.clearMeasurements()}function Cl(t){t.isLayoutDirty=!1}function Dl(t){const{visualElement:e}=t.options;e&&e.getProps().onBeforeLayoutMeasure&&e.notify("BeforeLayoutMeasure"),t.resetTransform()}function is(t){t.finishAnimation(),t.targetDelta=t.relativeTarget=t.target=void 0,t.isProjectionDirty=!0}function Ml(t){t.resolveTargetDelta()}function Rl(t){t.calcProjection()}function El(t){t.resetSkewAndRotation()}function Ll(t){t.removeLeadSnapshot()}function rs(t,e,n){t.translate=A(e.translate,0,n),t.scale=A(e.scale,1,n),t.origin=e.origin,t.originPoint=e.originPoint}function os(t,e,n,s){t.min=A(e.min,n.min,s),t.max=A(e.max,n.max,s)}function Fl(t,e,n,s){os(t.x,e.x,n.x,s),os(t.y,e.y,n.y,s)}function kl(t){return t.animationValues&&t.animationValues.opacityExit!==void 0}const Bl={duration:.45,ease:[.4,0,.1,1]},as=t=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(t),ls=as("applewebkit/")&&!as("chrome/")?Math.round:L;function us(t){t.min=ls(t.min),t.max=ls(t.max)}function jl(t){us(t.x),us(t.y)}function Ai(t,e,n){return t==="position"||t==="preserve-aspect"&&!Te(ts(e),ts(n),.2)}const Ol=wi({attachResizeListener:(t,e)=>W(t,"resize",e),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),ae={current:void 0},Ci=wi({measureScroll:t=>({x:t.scrollLeft,y:t.scrollTop}),defaultParent:()=>{if(!ae.current){const t=new Ol({});t.mount(window),t.setOptions({layoutScroll:!0}),ae.current=t}return ae.current},resetTransform:(t,e)=>{t.style.transform=e!==void 0?e:"none"},checkIsScrollRoot:t=>window.getComputedStyle(t).position==="fixed"}),Il={pan:{Feature:tl},drag:{Feature:Ja,ProjectionNode:Ci,MeasureLayout:Ti}},Ve={current:null},Di={current:!1};function Nl(){if(Di.current=!0,!!Ae)if(window.matchMedia){const t=window.matchMedia("(prefers-reduced-motion)"),e=()=>Ve.current=t.matches;t.addListener(e),e()}else Ve.current=!1}function Ul(t,e,n){const{willChange:s}=e;for(const i in e){const o=e[i],r=n[i];if(E(o))t.addValue(i,o),Nt(s)&&s.add(i);else if(E(r))t.addValue(i,Vt(o,{owner:t})),Nt(s)&&s.remove(i);else if(r!==o)if(t.hasValue(i)){const a=t.getValue(i);a.liveStyle===!0?a.jump(o):a.hasAnimated||a.set(o)}else{const a=t.getStaticValue(i);t.addValue(i,Vt(a!==void 0?a:o,{owner:t}))}}for(const i in n)e[i]===void 0&&t.removeValue(i);return e}const cs=new WeakMap,Kl=[...Ks,R,J],Wl=t=>Kl.find(Us(t)),Mi=Object.keys(Pt),$l=Mi.length,hs=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"],Gl=Re.length;function Ri(t){if(t)return t.options.allowProjection!==!1?t.projection:Ri(t.parent)}class _l{scrapeMotionValuesFromProps(e,n,s){return{}}constructor({parent:e,props:n,presenceContext:s,reducedMotionConfig:i,blockInitialAnimation:o,visualState:r},a={}){this.resolveKeyframes=(f,d,m,p)=>new this.KeyframeResolver(f,d,m,p,this),this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.KeyframeResolver=Ke,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.scheduleRender=()=>w.render(this.render,!1,!0);const{latestValues:l,renderState:u}=r;this.latestValues=l,this.baseTarget={...l},this.initialValues=n.initial?{...l}:{},this.renderState=u,this.parent=e,this.props=n,this.presenceContext=s,this.depth=e?e.depth+1:0,this.reducedMotionConfig=i,this.options=a,this.blockInitialAnimation=!!o,this.isControllingVariants=$t(n),this.isVariantNode=gs(n),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(e&&e.current);const{willChange:c,...h}=this.scrapeMotionValuesFromProps(n,{},this);for(const f in h){const d=h[f];l[f]!==void 0&&E(d)&&(d.set(l[f],!1),Nt(c)&&c.add(f))}}mount(e){this.current=e,cs.set(e,this),this.projection&&!this.projection.instance&&this.projection.mount(e),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((n,s)=>this.bindToMotionValue(s,n)),Di.current||Nl(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:Ve.current,this.parent&&this.parent.children.add(this),this.update(this.props,this.presenceContext)}unmount(){var e;cs.delete(this.current),this.projection&&this.projection.unmount(),Q(this.notifyUpdate),Q(this.render),this.valueSubscriptions.forEach(n=>n()),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent&&this.parent.children.delete(this);for(const n in this.events)this.events[n].clear();for(const n in this.features)(e=this.features[n])===null||e===void 0||e.unmount();this.current=null}bindToMotionValue(e,n){const s=ot.has(e),i=n.on("change",r=>{this.latestValues[e]=r,this.props.onUpdate&&w.preRender(this.notifyUpdate),s&&this.projection&&(this.projection.isTransformDirty=!0)}),o=n.on("renderRequest",this.scheduleRender);this.valueSubscriptions.set(e,()=>{i(),o(),n.owner&&n.stop()})}sortNodePosition(e){return!this.current||!this.sortInstanceNodePosition||this.type!==e.type?0:this.sortInstanceNodePosition(this.current,e.current)}loadFeatures({children:e,...n},s,i,o){let r,a;for(let l=0;l<$l;l++){const u=Mi[l],{isEnabled:c,Feature:h,ProjectionNode:f,MeasureLayout:d}=Pt[u];f&&(r=f),c(n)&&(!this.features[u]&&h&&(this.features[u]=new h(this)),d&&(a=d))}if((this.type==="html"||this.type==="svg")&&!this.projection&&r){const{layoutId:l,layout:u,drag:c,dragConstraints:h,layoutScroll:f,layoutRoot:d}=n;this.projection=new r(this.latestValues,n["data-framer-portal-id"]?void 0:Ri(this.parent)),this.projection.setOptions({layoutId:l,layout:u,alwaysMeasureLayout:!!c||h&<(h),visualElement:this,scheduleRender:()=>this.scheduleRender(),animationType:typeof u=="string"?u:"both",initialPromotionConfig:o,layoutScroll:f,layoutRoot:d})}return a}updateFeatures(){for(const e in this.features){const n=this.features[e];n.isMounted?n.update():(n.mount(),n.isMounted=!0)}}triggerBuild(){this.build(this.renderState,this.latestValues,this.options,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):C()}getStaticValue(e){return this.latestValues[e]}setStaticValue(e,n){this.latestValues[e]=n}update(e,n){(e.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=e,this.prevPresenceContext=this.presenceContext,this.presenceContext=n;for(let s=0;s<hs.length;s++){const i=hs[s];this.propEventSubscriptions[i]&&(this.propEventSubscriptions[i](),delete this.propEventSubscriptions[i]);const o="on"+i,r=e[o];r&&(this.propEventSubscriptions[i]=this.on(i,r))}this.prevMotionValues=Ul(this,this.scrapeMotionValuesFromProps(e,this.prevProps,this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}getProps(){return this.props}getVariant(e){return this.props.variants?this.props.variants[e]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}getVariantContext(e=!1){if(e)return this.parent?this.parent.getVariantContext():void 0;if(!this.isControllingVariants){const s=this.parent?this.parent.getVariantContext()||{}:{};return this.props.initial!==void 0&&(s.initial=this.props.initial),s}const n={};for(let s=0;s<Gl;s++){const i=Re[s],o=this.props[i];(Tt(o)||o===!1)&&(n[i]=o)}return n}addVariantChild(e){const n=this.getClosestVariantNode();if(n)return n.variantChildren&&n.variantChildren.add(e),()=>n.variantChildren.delete(e)}addValue(e,n){const s=this.values.get(e);n!==s&&(s&&this.removeValue(e),this.bindToMotionValue(e,n),this.values.set(e,n),this.latestValues[e]=n.get())}removeValue(e){this.values.delete(e);const n=this.valueSubscriptions.get(e);n&&(n(),this.valueSubscriptions.delete(e)),delete this.latestValues[e],this.removeValueFromRenderState(e,this.renderState)}hasValue(e){return this.values.has(e)}getValue(e,n){if(this.props.values&&this.props.values[e])return this.props.values[e];let s=this.values.get(e);return s===void 0&&n!==void 0&&(s=Vt(n===null?void 0:n,{owner:this}),this.addValue(e,s)),s}readValue(e,n){var s;let i=this.latestValues[e]!==void 0||!this.current?this.latestValues[e]:(s=this.getBaseTargetFromProps(this.props,e))!==null&&s!==void 0?s:this.readValueFromInstance(this.current,e,this.options);return i!=null&&(typeof i=="string"&&(Is(i)||Os(i))?i=parseFloat(i):!Wl(i)&&J.test(n)&&(i=Xs(e,n)),this.setBaseTarget(e,E(i)?i.get():i)),E(i)?i.get():i}setBaseTarget(e,n){this.baseTarget[e]=n}getBaseTarget(e){var n;const{initial:s}=this.props;let i;if(typeof s=="string"||typeof s=="object"){const r=Ne(this.props,s,(n=this.presenceContext)===null||n===void 0?void 0:n.custom);r&&(i=r[e])}if(s&&i!==void 0)return i;const o=this.getBaseTargetFromProps(this.props,e);return o!==void 0&&!E(o)?o:this.initialValues[e]!==void 0&&i===void 0?void 0:this.baseTarget[e]}on(e,n){return this.events[e]||(this.events[e]=new Qe),this.events[e].add(n)}notify(e,...n){this.events[e]&&this.events[e].notify(...n)}}class Ei extends _l{constructor(){super(...arguments),this.KeyframeResolver=qs}sortInstanceNodePosition(e,n){return e.compareDocumentPosition(n)&2?1:-1}getBaseTargetFromProps(e,n){return e.style?e.style[n]:void 0}removeValueFromRenderState(e,{vars:n,style:s}){delete n[e],delete s[e]}}function Hl(t){return window.getComputedStyle(t)}class zl extends Ei{constructor(){super(...arguments),this.type="html"}readValueFromInstance(e,n){if(ot.has(n)){const s=$e(n);return s&&s.default||0}else{const s=Hl(e),i=(Ps(n)?s.getPropertyValue(n):s[n])||0;return typeof i=="string"?i.trim():i}}measureInstanceViewportBox(e,{transformPagePoint:n}){return vi(e,n)}build(e,n,s,i){ke(e,n,s,i.transformTemplate)}scrapeMotionValuesFromProps(e,n,s){return Ie(e,n,s)}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:e}=this.props;E(e)&&(this.childSubscription=e.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}renderInstance(e,n,s,i){As(e,n,s,i)}}class Yl extends Ei{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1}getBaseTargetFromProps(e,n){return e[n]}readValueFromInstance(e,n){if(ot.has(n)){const s=$e(n);return s&&s.default||0}return n=Cs.has(n)?n:Ce(n),e.getAttribute(n)}measureInstanceViewportBox(){return C()}scrapeMotionValuesFromProps(e,n,s){return Ms(e,n,s)}build(e,n,s,i){je(e,n,s,this.isSVGTag,i.transformTemplate)}renderInstance(e,n,s,i){Ds(e,n,s,i)}mount(e){this.isSVGTag=Oe(e.tagName),super.mount(e)}}const Xl=(t,e)=>Ee(t)?new Yl(e,{enableHardwareAcceleration:!1}):new zl(e,{allowProjection:t!==P.Fragment,enableHardwareAcceleration:!0}),ql={layout:{ProjectionNode:Ci,MeasureLayout:Ti}},Zl={...Fa,...$r,...Il,...ql},le=Qi((t,e)=>Rr(t,e,Zl,Xl));function Je(){const t=ji("root"),e=Oi().find(n=>{var s;return n.formAction==="/progress"&&((s=n.formData)==null?void 0:s.has("complete"))});return!e||!(t!=null&&t.progress)?(t==null?void 0:t.progress)??null:t.progress.map(n=>{var o,r;const s=((o=e.formData)==null?void 0:o.get("complete"))==="true";return((r=e.formData)==null?void 0:r.get("lessonSlug"))===n.epicLessonSlug?{...n,epicCompletedAt:s?Date.now():null}:n})}function iu(){const t=Je();if(!t)return null;const e=r=>r.type==="workshop-instructions"?0:r.type==="workshop-finished"?1e4:r.type==="instructions"?r.exerciseNumber*100:r.type==="step"?r.exerciseNumber*100+r.stepNumber:r.type==="finished"?r.exerciseNumber*100+100:r.type==="unknown"?1e5:-1,s=t.sort((r,a)=>e(r)-e(a)).find(r=>!r.epicCompletedAt);if(!s||s.type==="unknown")return null;if(s.type==="workshop-instructions")return"/";if(s.type==="workshop-finished")return"/finished";const i=s.exerciseNumber.toString().padStart(2,"0");if(s.type==="instructions")return`/${i}`;if(s.type==="finished")return`/${i}/finished`;const o=s.stepNumber.toString().padStart(2,"0");return s.type==="step"?`/${i}/${o}/problem`:null}const Ql={0:"",1:"before:h-[10%]",2:"before:h-[20%]",3:"before:h-[30%]",4:"before:h-[40%]",5:"before:h-[50%]",6:"before:h-[60%]",7:"before:h-[70%]",8:"before:h-[80%]",9:"before:h-[90%]",10:"before:h-[100%]"};function ru(t){const e=Je();if(!(e!=null&&e.length))return null;const n=e.filter(o=>(o.type==="instructions"||o.type==="step"||o.type==="finished")&&o.exerciseNumber===t);if(!n.length)return null;const s=n.reduce((o,r)=>r.epicCompletedAt?o+1:o,0)/n.length,i=Math[s>.1?"floor":"ceil"](s*10);return`relative ${Ql[i]} before:bg-highlight before:absolute before:left-0 before:top-0 before:w-[4px]`}function ou(t){const e=Li(t);return e!=null&&e.epicCompletedAt?"relative before:h-[100%] before:bg-highlight before:absolute before:left-0 before:top-0 before:w-[4px]":null}function Li({exerciseNumber:t,stepNumber:e,type:n}){const s=Je();return s!=null&&s.length?n==="workshop-finished"||n==="workshop-instructions"?s.find(i=>i.type===n)??null:n==="instructions"||n==="finished"?s.find(i=>i.type===n&&i.exerciseNumber===t)??null:n==="step"?s.find(i=>i.type===n&&i.exerciseNumber===t&&i.stepNumber===e)??null:null:null}function au({className:t,...e}){var m,p,y,v;const n=Ii(),s=Li(e),i=P.useRef(null),o=P.useRef(null),r=(m=n.formData)!=null&&m.has("complete")?n.formData.get("complete")==="true":!!(s!=null&&s.epicCompletedAt),[a,l]=P.useState(!1),u=ki(),c=Bi(),h=(y=(p=c.location)==null?void 0:p.state)==null?void 0:y.from,f=(v=c.location)==null?void 0:v.pathname,d=u.pathname;return P.useEffect(()=>{var x;h==="continue next lesson button"&&d===f&&(l(!0),(x=o.current)==null||x.focus())},[u.key,d,f,h]),P.useEffect(()=>{if(!i.current||!a)return;const x=i.current.getAnimations().map(({finished:g})=>g);Promise.allSettled(x).then(()=>{l(!1)})},[a]),ENV.EPICSHOP_DEPLOYED||!s?null:N.jsxs(n.Form,{method:"POST",action:"/progress",children:[N.jsx("input",{type:"hidden",name:"lessonSlug",value:s.epicLessonSlug}),N.jsx("input",{type:"hidden",name:"complete",value:(!r).toString()}),N.jsxs(le.button,{ref:o,onClick:()=>{l(!r)},type:"submit",className:nn("group relative flex w-full items-center justify-between overflow-hidden transition hover:bg-[hsl(var(--foreground)/0.02)] focus:bg-[hsl(var(--foreground)/0.02)]",t),children:[r?"Mark as incomplete":"Mark as complete",a?N.jsx(le.div,{ref:i,className:"absolute right-0 h-20 w-20 rounded-full bg-foreground/20",initial:{scale:.5,opacity:0},animate:{scale:[.5,2],opacity:[0,1,0]},transition:{duration:1,ease:"easeInOut"}}):null,N.jsx(le.div,{"aria-hidden":!0,className:nn("relative flex h-8 w-8 items-center justify-center overflow-hidden rounded-full border transition",{"bg-foreground text-background duration-1000":r,"duration-100 group-hover:bg-background":!r}),children:r?"✓":N.jsx("div",{className:"absolute -translate-y-10 opacity-25 transition group-hover:translate-y-0",children:"✓"})})]})]})}export{au as P,Je as a,Sa as b,Sr as c,Ni as d,iu as e,ou as f,le as m,xa as s,ru as u};
|
|
2
|
-
//# sourceMappingURL=progress-HmjERaPh.js.map
|