1 line
175 KiB
JavaScript
1 line
175 KiB
JavaScript
"use strict";(self.webpackChunk_woocommerce_storybook=self.webpackChunk_woocommerce_storybook||[]).push([[8893],{"../../node_modules/.pnpm/@emotion+is-prop-valid@0.8.8/node_modules/@emotion/is-prop-valid/dist/is-prop-valid.browser.esm.js":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{__webpack_require__.d(__webpack_exports__,{A:()=>is_prop_valid_browser_esm});var reactPropsRegex=/^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|download|draggable|encType|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|inert|itemProp|itemScope|itemType|itemID|itemRef|on|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/;const is_prop_valid_browser_esm=function memoize(fn){var cache={};return function(arg){return void 0===cache[arg]&&(cache[arg]=fn(arg)),cache[arg]}}((function(prop){return reactPropsRegex.test(prop)||111===prop.charCodeAt(0)&&110===prop.charCodeAt(1)&&prop.charCodeAt(2)<91}))},"../../node_modules/.pnpm/framer-motion@6.5.1_react-dom@17.0.2_react@17.0.2__react@17.0.2/node_modules/framer-motion/dist/es/context/LayoutGroupContext.mjs":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{__webpack_require__.d(__webpack_exports__,{L:()=>LayoutGroupContext});var LayoutGroupContext=(0,__webpack_require__("../../node_modules/.pnpm/react@18.3.1/node_modules/react/index.js").createContext)({})},"../../node_modules/.pnpm/framer-motion@6.5.1_react-dom@17.0.2_react@17.0.2__react@17.0.2/node_modules/framer-motion/dist/es/context/MotionConfigContext.mjs":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{__webpack_require__.d(__webpack_exports__,{Q:()=>MotionConfigContext});var MotionConfigContext=(0,__webpack_require__("../../node_modules/.pnpm/react@18.3.1/node_modules/react/index.js").createContext)({transformPagePoint:function(p){return p},isStatic:!1,reducedMotion:"never"})},"../../node_modules/.pnpm/framer-motion@6.5.1_react-dom@17.0.2_react@17.0.2__react@17.0.2/node_modules/framer-motion/dist/es/context/PresenceContext.mjs":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{__webpack_require__.d(__webpack_exports__,{t:()=>PresenceContext});var PresenceContext=(0,__webpack_require__("../../node_modules/.pnpm/react@18.3.1/node_modules/react/index.js").createContext)(null)},"../../node_modules/.pnpm/framer-motion@6.5.1_react-dom@17.0.2_react@17.0.2__react@17.0.2/node_modules/framer-motion/dist/es/render/dom/motion.mjs":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{__webpack_require__.d(__webpack_exports__,{P:()=>motion});var tslib_es6=__webpack_require__("../../node_modules/.pnpm/tslib@2.6.2/node_modules/tslib/tslib.es6.mjs"),react=__webpack_require__("../../node_modules/.pnpm/react@18.3.1/node_modules/react/index.js"),process=__webpack_require__("../../node_modules/.pnpm/framer-motion@6.5.1_react-dom@17.0.2_react@17.0.2__react@17.0.2/node_modules/framer-motion/dist/es/utils/process.mjs"),createDefinition=function(propNames){return{isEnabled:function(props){return propNames.some((function(name){return!!props[name]}))}}},featureDefinitions={measureLayout:createDefinition(["layout","layoutId","drag"]),animation:createDefinition(["animate","exit","variants","whileHover","whileTap","whileFocus","whileDrag","whileInView"]),exit:createDefinition(["exit"]),drag:createDefinition(["drag","dragControls"]),focus:createDefinition(["whileFocus"]),hover:createDefinition(["whileHover","onHoverStart","onHoverEnd"]),tap:createDefinition(["whileTap","onTap","onTapStart","onTapCancel"]),pan:createDefinition(["onPan","onPanStart","onPanSessionStart","onPanEnd"]),inView:createDefinition(["whileInView","onViewportEnter","onViewportLeave"])};var warning=function(){},invariant=function(){};var LazyContext=(0,react.createContext)({strict:!1}),featureNames=Object.keys(featureDefinitions),numFeatures=featureNames.length;var MotionConfigContext=__webpack_require__("../../node_modules/.pnpm/framer-motion@6.5.1_react-dom@17.0.2_react@17.0.2__react@17.0.2/node_modules/framer-motion/dist/es/context/MotionConfigContext.mjs"),MotionContext=(0,react.createContext)({});var context_PresenceContext=__webpack_require__("../../node_modules/.pnpm/framer-motion@6.5.1_react-dom@17.0.2_react@17.0.2__react@17.0.2/node_modules/framer-motion/dist/es/context/PresenceContext.mjs"),use_isomorphic_effect=__webpack_require__("../../node_modules/.pnpm/framer-motion@6.5.1_react-dom@17.0.2_react@17.0.2__react@17.0.2/node_modules/framer-motion/dist/es/utils/use-isomorphic-effect.mjs"),use_reduced_motion=__webpack_require__("../../node_modules/.pnpm/framer-motion@6.5.1_react-dom@17.0.2_react@17.0.2__react@17.0.2/node_modules/framer-motion/dist/es/utils/use-reduced-motion.mjs");function useVisualElement(Component,visualState,props,createVisualElement){var lazyContext=(0,react.useContext)(LazyContext),parent=function useVisualElementContext(){return(0,react.useContext)(MotionContext).visualElement}(),presenceContext=(0,react.useContext)(context_PresenceContext.t),shouldReduceMotion=(0,use_reduced_motion.K)(),visualElementRef=(0,react.useRef)(void 0);createVisualElement||(createVisualElement=lazyContext.renderer),!visualElementRef.current&&createVisualElement&&(visualElementRef.current=createVisualElement(Component,{visualState,parent,props,presenceId:null==presenceContext?void 0:presenceContext.id,blockInitialAnimation:!1===(null==presenceContext?void 0:presenceContext.initial),shouldReduceMotion}));var visualElement=visualElementRef.current;return(0,use_isomorphic_effect.E)((function(){null==visualElement||visualElement.syncRender()})),(0,react.useEffect)((function(){var _a;null===(_a=null==visualElement?void 0:visualElement.animationState)||void 0===_a||_a.animateChanges()})),(0,use_isomorphic_effect.E)((function(){return function(){return null==visualElement?void 0:visualElement.notifyUnmount()}}),[]),visualElement}function isRefObject(ref){return"object"==typeof ref&&Object.prototype.hasOwnProperty.call(ref,"current")}function isVariantLabels(v){return Array.isArray(v)}function isVariantLabel(v){return"string"==typeof v||isVariantLabels(v)}function resolveVariantFromProps(props,definition,custom,currentValues,currentVelocity){var _a;return void 0===currentValues&&(currentValues={}),void 0===currentVelocity&&(currentVelocity={}),"function"==typeof definition&&(definition=definition(null!=custom?custom:props.custom,currentValues,currentVelocity)),"string"==typeof definition&&(definition=null===(_a=props.variants)||void 0===_a?void 0:_a[definition]),"function"==typeof definition&&(definition=definition(null!=custom?custom:props.custom,currentValues,currentVelocity)),definition}function resolveVariant(visualElement,definition,custom){var props=visualElement.getProps();return resolveVariantFromProps(props,definition,null!=custom?custom:props.custom,function getCurrent(visualElement){var current={};return visualElement.forEachValue((function(value,key){return current[key]=value.get()})),current}(visualElement),function getVelocity(visualElement){var velocity={};return visualElement.forEachValue((function(value,key){return velocity[key]=value.getVelocity()})),velocity}(visualElement))}function checkIfControllingVariants(props){var _a;return"function"==typeof(null===(_a=props.animate)||void 0===_a?void 0:_a.start)||isVariantLabel(props.initial)||isVariantLabel(props.animate)||isVariantLabel(props.whileHover)||isVariantLabel(props.whileDrag)||isVariantLabel(props.whileTap)||isVariantLabel(props.whileFocus)||isVariantLabel(props.exit)}function checkIfVariantNode(props){return Boolean(checkIfControllingVariants(props)||props.variants)}function useCreateMotionContext(props){var _a=function getCurrentTreeVariants(props,context){if(checkIfControllingVariants(props)){var initial=props.initial,animate=props.animate;return{initial:!1===initial||isVariantLabel(initial)?initial:void 0,animate:isVariantLabel(animate)?animate:void 0}}return!1!==props.inherit?context:{}}(props,(0,react.useContext)(MotionContext)),initial=_a.initial,animate=_a.animate;return(0,react.useMemo)((function(){return{initial,animate}}),[variantLabelsAsDependency(initial),variantLabelsAsDependency(animate)])}function variantLabelsAsDependency(prop){return Array.isArray(prop)?prop.join(" "):prop}var is_browser=__webpack_require__("../../node_modules/.pnpm/framer-motion@6.5.1_react-dom@17.0.2_react@17.0.2__react@17.0.2/node_modules/framer-motion/dist/es/utils/is-browser.mjs"),use_constant=__webpack_require__("../../node_modules/.pnpm/framer-motion@6.5.1_react-dom@17.0.2_react@17.0.2__react@17.0.2/node_modules/framer-motion/dist/es/utils/use-constant.mjs"),globalProjectionState={hasAnimatedSinceResize:!0,hasEverUpdated:!1},id=1;var LayoutGroupContext=__webpack_require__("../../node_modules/.pnpm/framer-motion@6.5.1_react-dom@17.0.2_react@17.0.2__react@17.0.2/node_modules/framer-motion/dist/es/context/LayoutGroupContext.mjs"),SwitchLayoutGroupContext=(0,react.createContext)({});var VisualElementHandler=function(_super){function VisualElementHandler(){return null!==_super&&_super.apply(this,arguments)||this}return(0,tslib_es6.C6)(VisualElementHandler,_super),VisualElementHandler.prototype.getSnapshotBeforeUpdate=function(){return this.updateProps(),null},VisualElementHandler.prototype.componentDidUpdate=function(){},VisualElementHandler.prototype.updateProps=function(){var _a=this.props,visualElement=_a.visualElement,props=_a.props;visualElement&&visualElement.setProps(props)},VisualElementHandler.prototype.render=function(){return this.props.children},VisualElementHandler}(react.Component);function motion_createMotionComponent(_a){var preloadedFeatures=_a.preloadedFeatures,createVisualElement=_a.createVisualElement,projectionNodeConstructor=_a.projectionNodeConstructor,useRender=_a.useRender,useVisualState=_a.useVisualState,Component=_a.Component;return preloadedFeatures&&function loadFeatures(features){for(var key in features)null!==features[key]&&("projectionNodeConstructor"===key?featureDefinitions.projectionNodeConstructor=features[key]:featureDefinitions[key].Component=features[key])}(preloadedFeatures),(0,react.forwardRef)((function MotionComponent(props,externalRef){var layoutId=function useLayoutId(_a){var _b,layoutId=_a.layoutId,layoutGroupId=null===(_b=(0,react.useContext)(LayoutGroupContext.L))||void 0===_b?void 0:_b.id;return layoutGroupId&&void 0!==layoutId?layoutGroupId+"-"+layoutId:layoutId}(props);props=(0,tslib_es6.Cl)((0,tslib_es6.Cl)({},props),{layoutId});var config=(0,react.useContext)(MotionConfigContext.Q),features=null,context=useCreateMotionContext(props),projectionId=config.isStatic?void 0:function useProjectionId(){return(0,use_constant.M)((function(){if(globalProjectionState.hasEverUpdated)return id++}))}(),visualState=useVisualState(props,config.isStatic);return!config.isStatic&&is_browser.B&&(context.visualElement=useVisualElement(Component,visualState,(0,tslib_es6.Cl)((0,tslib_es6.Cl)({},config),props),createVisualElement),function useProjection(projectionId,_a,visualElement,ProjectionNodeConstructor){var _b,layoutId=_a.layoutId,layout=_a.layout,drag=_a.drag,dragConstraints=_a.dragConstraints,layoutScroll=_a.layoutScroll,initialPromotionConfig=(0,react.useContext)(SwitchLayoutGroupContext);ProjectionNodeConstructor&&visualElement&&!(null==visualElement?void 0:visualElement.projection)&&(visualElement.projection=new ProjectionNodeConstructor(projectionId,visualElement.getLatestValues(),null===(_b=visualElement.parent)||void 0===_b?void 0:_b.projection),visualElement.projection.setOptions({layoutId,layout,alwaysMeasureLayout:Boolean(drag)||dragConstraints&&isRefObject(dragConstraints),visualElement,scheduleRender:function(){return visualElement.scheduleRender()},animationType:"string"==typeof layout?layout:"both",initialPromotionConfig,layoutScroll}))}(projectionId,props,context.visualElement,projectionNodeConstructor||featureDefinitions.projectionNodeConstructor),features=function useFeatures(props,visualElement,preloadedFeatures){var features=[],lazyContext=(0,react.useContext)(LazyContext);if(!visualElement)return null;"production"!==process._&&preloadedFeatures&&lazyContext.strict&&invariant(!1,"You have rendered a `motion` component within a `LazyMotion` component. This will break tree shaking. Import and render a `m` component instead.");for(var i=0;i<numFeatures;i++){var name_1=featureNames[i],_a=featureDefinitions[name_1],isEnabled=_a.isEnabled,Component=_a.Component;isEnabled(props)&&Component&&features.push(react.createElement(Component,(0,tslib_es6.Cl)({key:name_1},props,{visualElement})))}return features}(props,context.visualElement,preloadedFeatures)),react.createElement(VisualElementHandler,{visualElement:context.visualElement,props:(0,tslib_es6.Cl)((0,tslib_es6.Cl)({},config),props)},features,react.createElement(MotionContext.Provider,{value:context},useRender(Component,props,projectionId,function useMotionRef(visualState,visualElement,externalRef){return(0,react.useCallback)((function(instance){var _a;instance&&(null===(_a=visualState.mount)||void 0===_a||_a.call(visualState,instance)),visualElement&&(instance?visualElement.mount(instance):visualElement.unmount()),externalRef&&("function"==typeof externalRef?externalRef(instance):isRefObject(externalRef)&&(externalRef.current=instance))}),[visualElement])}(visualState,context.visualElement,externalRef),visualState,config.isStatic,context.visualElement)))}))}function createMotionProxy(createConfig){function custom(Component,customMotionComponentConfig){return void 0===customMotionComponentConfig&&(customMotionComponentConfig={}),motion_createMotionComponent(createConfig(Component,customMotionComponentConfig))}if("undefined"==typeof Proxy)return custom;var componentCache=new Map;return new Proxy(custom,{get:function(_target,key){return componentCache.has(key)||componentCache.set(key,custom(key)),componentCache.get(key)}})}var lowercaseSVGElements=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","svg","switch","symbol","text","tspan","use","view"];function isSVGComponent(Component){return"string"==typeof Component&&!Component.includes("-")&&!!(lowercaseSVGElements.indexOf(Component)>-1||/[A-Z]/.test(Component))}var scaleCorrectors={};var transformAxes=["","X","Y","Z"],transformProps=["transformPerspective","x","y","z"];function sortTransformProps(a,b){return transformProps.indexOf(a)-transformProps.indexOf(b)}["translate","scale","rotate","skew"].forEach((function(operationKey){return transformAxes.forEach((function(axesKey){return transformProps.push(operationKey+axesKey)}))}));var transformPropSet=new Set(transformProps);function isTransformProp(key){return transformPropSet.has(key)}var transformOriginProps=new Set(["originX","originY","originZ"]);function isTransformOriginProp(key){return transformOriginProps.has(key)}function isForcedMotionValue(key,_a){var layout=_a.layout,layoutId=_a.layoutId;return isTransformProp(key)||isTransformOriginProp(key)||(layout||void 0!==layoutId)&&(!!scaleCorrectors[key]||"opacity"===key)}var isMotionValue=function(value){return Boolean(null!==value&&"object"==typeof value&&value.getVelocity)},translateAlias={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"};function isCSSVariable(key){return key.startsWith("--")}var getValueAsType=function(value,type){return type&&"number"==typeof value?type.transform(value):value};const clamp=(min,max)=>v=>Math.max(Math.min(v,max),min),sanitize=v=>v%1?Number(v.toFixed(5)):v,floatRegex=/(-)?([\d]*\.?[\d])+/g,colorRegex=/(#[0-9a-f]{6}|#[0-9a-f]{3}|#(?:[0-9a-f]{2}){2,4}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2,3}\s*\/*\s*[\d\.]+%?\))/gi,singleColorRegex=/^(#[0-9a-f]{3}|#(?:[0-9a-f]{2}){2,4}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2,3}\s*\/*\s*[\d\.]+%?\))$/i;function isString(v){return"string"==typeof v}const createUnitType=unit=>({test:v=>isString(v)&&v.endsWith(unit)&&1===v.split(" ").length,parse:parseFloat,transform:v=>`${v}${unit}`}),degrees=createUnitType("deg"),percent=createUnitType("%"),px=createUnitType("px"),vh=createUnitType("vh"),vw=createUnitType("vw"),progressPercentage=Object.assign(Object.assign({},percent),{parse:v=>percent.parse(v)/100,transform:v=>percent.transform(100*v)}),number={test:v=>"number"==typeof v,parse:parseFloat,transform:v=>v},alpha=Object.assign(Object.assign({},number),{transform:clamp(0,1)}),scale=Object.assign(Object.assign({},number),{default:1});var type_int_int=(0,tslib_es6.Cl)((0,tslib_es6.Cl)({},number),{transform:Math.round}),numberValueTypes={borderWidth:px,borderTopWidth:px,borderRightWidth:px,borderBottomWidth:px,borderLeftWidth:px,borderRadius:px,radius:px,borderTopLeftRadius:px,borderTopRightRadius:px,borderBottomRightRadius:px,borderBottomLeftRadius:px,width:px,maxWidth:px,height:px,maxHeight:px,size:px,top:px,right:px,bottom:px,left:px,padding:px,paddingTop:px,paddingRight:px,paddingBottom:px,paddingLeft:px,margin:px,marginTop:px,marginRight:px,marginBottom:px,marginLeft:px,rotate:degrees,rotateX:degrees,rotateY:degrees,rotateZ:degrees,scale,scaleX:scale,scaleY:scale,scaleZ:scale,skew:degrees,skewX:degrees,skewY:degrees,distance:px,translateX:px,translateY:px,translateZ:px,x:px,y:px,z:px,perspective:px,transformPerspective:px,opacity:alpha,originX:progressPercentage,originY:progressPercentage,originZ:px,zIndex:type_int_int,fillOpacity:alpha,strokeOpacity:alpha,numOctaves:type_int_int};function buildHTMLStyles(state,latestValues,options,transformTemplate){var _a,style=state.style,vars=state.vars,transform=state.transform,transformKeys=state.transformKeys,transformOrigin=state.transformOrigin;transformKeys.length=0;var hasTransform=!1,hasTransformOrigin=!1,transformIsNone=!0;for(var key in latestValues){var value=latestValues[key];if(isCSSVariable(key))vars[key]=value;else{var valueType=numberValueTypes[key],valueAsType=getValueAsType(value,valueType);if(isTransformProp(key)){if(hasTransform=!0,transform[key]=valueAsType,transformKeys.push(key),!transformIsNone)continue;value!==(null!==(_a=valueType.default)&&void 0!==_a?_a:0)&&(transformIsNone=!1)}else isTransformOriginProp(key)?(transformOrigin[key]=valueAsType,hasTransformOrigin=!0):style[key]=valueAsType}}hasTransform?style.transform=function buildTransform(_a,_b,transformIsDefault,transformTemplate){var transform=_a.transform,transformKeys=_a.transformKeys,_c=_b.enableHardwareAcceleration,enableHardwareAcceleration=void 0===_c||_c,_d=_b.allowTransformNone,allowTransformNone=void 0===_d||_d,transformString="";transformKeys.sort(sortTransformProps);for(var transformHasZ=!1,numTransformKeys=transformKeys.length,i=0;i<numTransformKeys;i++){var key=transformKeys[i];transformString+="".concat(translateAlias[key]||key,"(").concat(transform[key],") "),"z"===key&&(transformHasZ=!0)}return!transformHasZ&&enableHardwareAcceleration?transformString+="translateZ(0)":transformString=transformString.trim(),transformTemplate?transformString=transformTemplate(transform,transformIsDefault?"":transformString):allowTransformNone&&transformIsDefault&&(transformString="none"),transformString}(state,options,transformIsNone,transformTemplate):transformTemplate?style.transform=transformTemplate({},""):!latestValues.transform&&style.transform&&(style.transform="none"),hasTransformOrigin&&(style.transformOrigin=function buildTransformOrigin(_a){var _b=_a.originX,originX=void 0===_b?"50%":_b,_c=_a.originY,originY=void 0===_c?"50%":_c,_d=_a.originZ,originZ=void 0===_d?0:_d;return"".concat(originX," ").concat(originY," ").concat(originZ)}(transformOrigin))}var createHtmlRenderState=function(){return{style:{},transform:{},transformKeys:[],transformOrigin:{},vars:{}}};function copyRawValuesOnly(target,source,props){for(var key in source)isMotionValue(source[key])||isForcedMotionValue(key,props)||(target[key]=source[key])}function useStyle(props,visualState,isStatic){var style={};return copyRawValuesOnly(style,props.style||{},props),Object.assign(style,function useInitialMotionValues(_a,visualState,isStatic){var transformTemplate=_a.transformTemplate;return(0,react.useMemo)((function(){var state=createHtmlRenderState();buildHTMLStyles(state,visualState,{enableHardwareAcceleration:!isStatic},transformTemplate);var vars=state.vars,style=state.style;return(0,tslib_es6.Cl)((0,tslib_es6.Cl)({},vars),style)}),[visualState])}(props,visualState,isStatic)),props.transformValues&&(style=props.transformValues(style)),style}function useHTMLProps(props,visualState,isStatic){var htmlProps={},style=useStyle(props,visualState,isStatic);return Boolean(props.drag)&&!1!==props.dragListener&&(htmlProps.draggable=!1,style.userSelect=style.WebkitUserSelect=style.WebkitTouchCallout="none",style.touchAction=!0===props.drag?"none":"pan-".concat("x"===props.drag?"y":"x")),htmlProps.style=style,htmlProps}var validMotionProps=new Set(["initial","animate","exit","style","variants","transition","transformTemplate","transformValues","custom","inherit","layout","layoutId","layoutDependency","onLayoutAnimationStart","onLayoutAnimationComplete","onLayoutMeasure","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","drag","dragControls","dragListener","dragConstraints","dragDirectionLock","dragSnapToOrigin","_dragX","_dragY","dragElastic","dragMomentum","dragPropagation","dragTransition","whileDrag","onPan","onPanStart","onPanEnd","onPanSessionStart","onTap","onTapStart","onTapCancel","onHoverStart","onHoverEnd","whileFocus","whileTap","whileHover","whileInView","onViewportEnter","onViewportLeave","viewport","layoutScroll"]);function isValidMotionProp(key){return validMotionProps.has(key)}var shouldForward=function(key){return!isValidMotionProp(key)};try{!function loadExternalIsValidProp(isValidProp){isValidProp&&(shouldForward=function(key){return key.startsWith("on")?!isValidMotionProp(key):isValidProp(key)})}(__webpack_require__("../../node_modules/.pnpm/@emotion+is-prop-valid@0.8.8/node_modules/@emotion/is-prop-valid/dist/is-prop-valid.browser.esm.js").A)}catch(_a){}function calcOrigin(origin,offset,size){return"string"==typeof origin?origin:px.transform(offset+size*origin)}var dashKeys={offset:"stroke-dashoffset",array:"stroke-dasharray"},camelKeys={offset:"strokeDashoffset",array:"strokeDasharray"};function buildSVGAttrs(state,_a,options,transformTemplate){var attrX=_a.attrX,attrY=_a.attrY,originX=_a.originX,originY=_a.originY,pathLength=_a.pathLength,_b=_a.pathSpacing,pathSpacing=void 0===_b?1:_b,_c=_a.pathOffset,pathOffset=void 0===_c?0:_c;buildHTMLStyles(state,(0,tslib_es6.Tt)(_a,["attrX","attrY","originX","originY","pathLength","pathSpacing","pathOffset"]),options,transformTemplate),state.attrs=state.style,state.style={};var attrs=state.attrs,style=state.style,dimensions=state.dimensions;attrs.transform&&(dimensions&&(style.transform=attrs.transform),delete attrs.transform),dimensions&&(void 0!==originX||void 0!==originY||style.transform)&&(style.transformOrigin=function calcSVGTransformOrigin(dimensions,originX,originY){var pxOriginX=calcOrigin(originX,dimensions.x,dimensions.width),pxOriginY=calcOrigin(originY,dimensions.y,dimensions.height);return"".concat(pxOriginX," ").concat(pxOriginY)}(dimensions,void 0!==originX?originX:.5,void 0!==originY?originY:.5)),void 0!==attrX&&(attrs.x=attrX),void 0!==attrY&&(attrs.y=attrY),void 0!==pathLength&&function buildSVGPath(attrs,length,spacing,offset,useDashCase){void 0===spacing&&(spacing=1),void 0===offset&&(offset=0),void 0===useDashCase&&(useDashCase=!0),attrs.pathLength=1;var keys=useDashCase?dashKeys:camelKeys;attrs[keys.offset]=px.transform(-offset);var pathLength=px.transform(length),pathSpacing=px.transform(spacing);attrs[keys.array]="".concat(pathLength," ").concat(pathSpacing)}(attrs,pathLength,pathSpacing,pathOffset,!1)}var createSvgRenderState=function(){return(0,tslib_es6.Cl)((0,tslib_es6.Cl)({},createHtmlRenderState()),{attrs:{}})};function useSVGProps(props,visualState){var visualProps=(0,react.useMemo)((function(){var state=createSvgRenderState();return buildSVGAttrs(state,visualState,{enableHardwareAcceleration:!1},props.transformTemplate),(0,tslib_es6.Cl)((0,tslib_es6.Cl)({},state.attrs),{style:(0,tslib_es6.Cl)({},state.style)})}),[visualState]);if(props.style){var rawStyles={};copyRawValuesOnly(rawStyles,props.style,props),visualProps.style=(0,tslib_es6.Cl)((0,tslib_es6.Cl)({},rawStyles),visualProps.style)}return visualProps}function createUseRender(forwardMotionProps){void 0===forwardMotionProps&&(forwardMotionProps=!1);return function(Component,props,projectionId,ref,_a,isStatic){var latestValues=_a.latestValues,visualProps=(isSVGComponent(Component)?useSVGProps:useHTMLProps)(props,latestValues,isStatic),filteredProps=function filterProps(props,isDom,forwardMotionProps){var filteredProps={};for(var key in props)(shouldForward(key)||!0===forwardMotionProps&&isValidMotionProp(key)||!isDom&&!isValidMotionProp(key)||props.draggable&&key.startsWith("onDrag"))&&(filteredProps[key]=props[key]);return filteredProps}(props,"string"==typeof Component,forwardMotionProps),elementProps=(0,tslib_es6.Cl)((0,tslib_es6.Cl)((0,tslib_es6.Cl)({},filteredProps),visualProps),{ref});return projectionId&&(elementProps["data-projection-id"]=projectionId),(0,react.createElement)(Component,elementProps)}}var CAMEL_CASE_PATTERN=/([a-z])([A-Z])/g,camelToDash=function(str){return str.replace(CAMEL_CASE_PATTERN,"$1-$2").toLowerCase()};function renderHTML(element,_a,styleProp,projection){var style=_a.style,vars=_a.vars;for(var key in Object.assign(element.style,style,projection&&projection.getProjectionStyles(styleProp)),vars)element.style.setProperty(key,vars[key])}var camelCaseAttributes=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength"]);function renderSVG(element,renderState,_styleProp,projection){for(var key in renderHTML(element,renderState,void 0,projection),renderState.attrs)element.setAttribute(camelCaseAttributes.has(key)?key:camelToDash(key),renderState.attrs[key])}function scrapeMotionValuesFromProps(props){var style=props.style,newValues={};for(var key in style)(isMotionValue(style[key])||isForcedMotionValue(key,props))&&(newValues[key]=style[key]);return newValues}function scrape_motion_values_scrapeMotionValuesFromProps(props){var newValues=scrapeMotionValuesFromProps(props);for(var key in props){if(isMotionValue(props[key]))newValues["x"===key||"y"===key?"attr"+key.toUpperCase():key]=props[key]}return newValues}function isAnimationControls(v){return"object"==typeof v&&"function"==typeof v.start}var isKeyframesTarget=function(v){return Array.isArray(v)},isCustomValue=function(v){return Boolean(v&&"object"==typeof v&&v.mix&&v.toValue)},resolveFinalValueInKeyframes=function(v){return isKeyframesTarget(v)?v[v.length-1]||0:v};function resolveMotionValue(value){var unwrappedValue=isMotionValue(value)?value.get():value;return isCustomValue(unwrappedValue)?unwrappedValue.toValue():unwrappedValue}function makeState(_a,props,context,presenceContext){var scrapeMotionValuesFromProps=_a.scrapeMotionValuesFromProps,createRenderState=_a.createRenderState,onMount=_a.onMount,state={latestValues:makeLatestValues(props,context,presenceContext,scrapeMotionValuesFromProps),renderState:createRenderState()};return onMount&&(state.mount=function(instance){return onMount(props,instance,state)}),state}var makeUseVisualState=function(config){return function(props,isStatic){var context=(0,react.useContext)(MotionContext),presenceContext=(0,react.useContext)(context_PresenceContext.t);return isStatic?makeState(config,props,context,presenceContext):(0,use_constant.M)((function(){return makeState(config,props,context,presenceContext)}))}};function makeLatestValues(props,context,presenceContext,scrapeMotionValues){var values={},blockInitialAnimation=!1===(null==presenceContext?void 0:presenceContext.initial),motionValues=scrapeMotionValues(props);for(var key in motionValues)values[key]=resolveMotionValue(motionValues[key]);var initial=props.initial,animate=props.animate,isControllingVariants=checkIfControllingVariants(props),isVariantNode=checkIfVariantNode(props);context&&isVariantNode&&!isControllingVariants&&!1!==props.inherit&&(null!=initial||(initial=context.initial),null!=animate||(animate=context.animate));var initialAnimationIsBlocked=blockInitialAnimation||!1===initial,variantToSet=initialAnimationIsBlocked?animate:initial;variantToSet&&"boolean"!=typeof variantToSet&&!isAnimationControls(variantToSet)&&(Array.isArray(variantToSet)?variantToSet:[variantToSet]).forEach((function(definition){var resolved=resolveVariantFromProps(props,definition);if(resolved){var transitionEnd=resolved.transitionEnd;resolved.transition;var target=(0,tslib_es6.Tt)(resolved,["transitionEnd","transition"]);for(var key in target){var valueTarget=target[key];if(Array.isArray(valueTarget))valueTarget=valueTarget[initialAnimationIsBlocked?valueTarget.length-1:0];null!==valueTarget&&(values[key]=valueTarget)}for(var key in transitionEnd)values[key]=transitionEnd[key]}}));return values}var AnimationType,svgMotionConfig={useVisualState:makeUseVisualState({scrapeMotionValuesFromProps:scrape_motion_values_scrapeMotionValuesFromProps,createRenderState:createSvgRenderState,onMount:function(props,instance,_a){var renderState=_a.renderState,latestValues=_a.latestValues;try{renderState.dimensions="function"==typeof instance.getBBox?instance.getBBox():instance.getBoundingClientRect()}catch(e){renderState.dimensions={x:0,y:0,width:0,height:0}}buildSVGAttrs(renderState,latestValues,{enableHardwareAcceleration:!1},props.transformTemplate),renderSVG(instance,renderState)}})},htmlMotionConfig={useVisualState:makeUseVisualState({scrapeMotionValuesFromProps,createRenderState:createHtmlRenderState})};function addDomEvent(target,eventName,handler,options){return void 0===options&&(options={passive:!0}),target.addEventListener(eventName,handler,options),function(){return target.removeEventListener(eventName,handler)}}function useDomEvent(ref,eventName,handler,options){(0,react.useEffect)((function(){var element=ref.current;if(handler&&element)return addDomEvent(element,eventName,handler,options)}),[ref,eventName,handler,options])}function isMouseEvent(event){return"undefined"!=typeof PointerEvent&&event instanceof PointerEvent?!("mouse"!==event.pointerType):event instanceof MouseEvent}function isTouchEvent(event){return!!event.touches}!function(AnimationType){AnimationType.Animate="animate",AnimationType.Hover="whileHover",AnimationType.Tap="whileTap",AnimationType.Drag="whileDrag",AnimationType.Focus="whileFocus",AnimationType.InView="whileInView",AnimationType.Exit="exit"}(AnimationType||(AnimationType={}));var defaultPagePoint={pageX:0,pageY:0};function pointFromTouch(e,pointType){void 0===pointType&&(pointType="page");var point=e.touches[0]||e.changedTouches[0]||defaultPagePoint;return{x:point[pointType+"X"],y:point[pointType+"Y"]}}function pointFromMouse(point,pointType){return void 0===pointType&&(pointType="page"),{x:point[pointType+"X"],y:point[pointType+"Y"]}}function extractEventInfo(event,pointType){return void 0===pointType&&(pointType="page"),{point:isTouchEvent(event)?pointFromTouch(event,pointType):pointFromMouse(event,pointType)}}var wrapHandler=function(handler,shouldFilterPrimaryPointer){void 0===shouldFilterPrimaryPointer&&(shouldFilterPrimaryPointer=!1);var listener=function(event){return handler(event,extractEventInfo(event))};return shouldFilterPrimaryPointer?function filterPrimaryPointer(eventHandler){return function(event){var isMouseEvent=event instanceof MouseEvent;(!isMouseEvent||isMouseEvent&&0===event.button)&&eventHandler(event)}}(listener):listener},supportsPointerEvents=function(){return is_browser.B&&null===window.onpointerdown},supportsTouchEvents=function(){return is_browser.B&&null===window.ontouchstart},supportsMouseEvents=function(){return is_browser.B&&null===window.onmousedown},mouseEventNames={pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointercancel:"mousecancel",pointerover:"mouseover",pointerout:"mouseout",pointerenter:"mouseenter",pointerleave:"mouseleave"},touchEventNames={pointerdown:"touchstart",pointermove:"touchmove",pointerup:"touchend",pointercancel:"touchcancel"};function getPointerEventName(name){return supportsPointerEvents()?name:supportsTouchEvents()?touchEventNames[name]:supportsMouseEvents()?mouseEventNames[name]:name}function addPointerEvent(target,eventName,handler,options){return addDomEvent(target,getPointerEventName(eventName),wrapHandler(handler,"pointerdown"===eventName),options)}function usePointerEvent(ref,eventName,handler,options){return useDomEvent(ref,getPointerEventName(eventName),handler&&wrapHandler(handler,"pointerdown"===eventName),options)}function createLock(name){var lock=null;return function(){return null===lock&&(lock=name,function(){lock=null})}}var globalHorizontalLock=createLock("dragHorizontal"),globalVerticalLock=createLock("dragVertical");function getGlobalLock(drag){var lock=!1;if("y"===drag)lock=globalVerticalLock();else if("x"===drag)lock=globalHorizontalLock();else{var openHorizontal_1=globalHorizontalLock(),openVertical_1=globalVerticalLock();openHorizontal_1&&openVertical_1?lock=function(){openHorizontal_1(),openVertical_1()}:(openHorizontal_1&&openHorizontal_1(),openVertical_1&&openVertical_1())}return lock}function isDragActive(){var openGestureLock=getGlobalLock(!0);return!openGestureLock||(openGestureLock(),!1)}function createHoverEvent(visualElement,isActive,callback){return function(event,info){var _a;isMouseEvent(event)&&!isDragActive()&&(null===(_a=visualElement.animationState)||void 0===_a||_a.setActive(AnimationType.Hover,isActive),null==callback||callback(event,info))}}var isNodeOrChild=function(parent,child){return!!child&&(parent===child||isNodeOrChild(parent,child.parentElement))},use_unmount_effect=__webpack_require__("../../node_modules/.pnpm/framer-motion@6.5.1_react-dom@17.0.2_react@17.0.2__react@17.0.2/node_modules/framer-motion/dist/es/utils/use-unmount-effect.mjs");const combineFunctions=(a,b)=>v=>b(a(v)),pipe=(...transformers)=>transformers.reduce(combineFunctions);var warned=new Set;var observerCallbacks=new WeakMap,observers=new WeakMap,fireObserverCallback=function(entry){var _a;null===(_a=observerCallbacks.get(entry.target))||void 0===_a||_a(entry)},fireAllObserverCallbacks=function(entries){entries.forEach(fireObserverCallback)};function observeIntersection(element,options,callback){var rootInteresectionObserver=function initIntersectionObserver(_a){var root=_a.root,options=(0,tslib_es6.Tt)(_a,["root"]),lookupRoot=root||document;observers.has(lookupRoot)||observers.set(lookupRoot,{});var rootObservers=observers.get(lookupRoot),key=JSON.stringify(options);return rootObservers[key]||(rootObservers[key]=new IntersectionObserver(fireAllObserverCallbacks,(0,tslib_es6.Cl)({root},options))),rootObservers[key]}(options);return observerCallbacks.set(element,callback),rootInteresectionObserver.observe(element),function(){observerCallbacks.delete(element),rootInteresectionObserver.unobserve(element)}}var thresholdNames={some:0,all:1};function useIntersectionObserver(shouldObserve,state,visualElement,_a){var root=_a.root,rootMargin=_a.margin,_b=_a.amount,amount=void 0===_b?"some":_b,once=_a.once;(0,react.useEffect)((function(){if(shouldObserve){var options={root:null==root?void 0:root.current,rootMargin,threshold:"number"==typeof amount?amount:thresholdNames[amount]};return observeIntersection(visualElement.getInstance(),options,(function(entry){var _a,isIntersecting=entry.isIntersecting;if(state.isInView!==isIntersecting&&(state.isInView=isIntersecting,!once||isIntersecting||!state.hasEnteredView)){isIntersecting&&(state.hasEnteredView=!0),null===(_a=visualElement.animationState)||void 0===_a||_a.setActive(AnimationType.InView,isIntersecting);var props=visualElement.getProps(),callback=isIntersecting?props.onViewportEnter:props.onViewportLeave;null==callback||callback(entry)}}))}}),[shouldObserve,root,rootMargin,amount])}function useMissingIntersectionObserver(shouldObserve,state,visualElement,_a){var _b=_a.fallback,fallback=void 0===_b||_b;(0,react.useEffect)((function(){shouldObserve&&fallback&&("production"!==process._&&function warnOnce(condition,message,element){condition||warned.has(message)||(console.warn(message),element&&console.warn(element),warned.add(message))}(!1,"IntersectionObserver not available on this device. whileInView animations will trigger on mount."),requestAnimationFrame((function(){var _a;state.hasEnteredView=!0;var onViewportEnter=visualElement.getProps().onViewportEnter;null==onViewportEnter||onViewportEnter(null),null===(_a=visualElement.animationState)||void 0===_a||_a.setActive(AnimationType.InView,!0)})))}),[shouldObserve])}var makeRenderlessComponent=function(hook){return function(props){return hook(props),null}},gestureAnimations={inView:makeRenderlessComponent((function useViewport(_a){var visualElement=_a.visualElement,whileInView=_a.whileInView,onViewportEnter=_a.onViewportEnter,onViewportLeave=_a.onViewportLeave,_b=_a.viewport,viewport=void 0===_b?{}:_b,state=(0,react.useRef)({hasEnteredView:!1,isInView:!1}),shouldObserve=Boolean(whileInView||onViewportEnter||onViewportLeave);viewport.once&&state.current.hasEnteredView&&(shouldObserve=!1),("undefined"==typeof IntersectionObserver?useMissingIntersectionObserver:useIntersectionObserver)(shouldObserve,state.current,visualElement,viewport)})),tap:makeRenderlessComponent((function useTapGesture(_a){var onTap=_a.onTap,onTapStart=_a.onTapStart,onTapCancel=_a.onTapCancel,whileTap=_a.whileTap,visualElement=_a.visualElement,hasPressListeners=onTap||onTapStart||onTapCancel||whileTap,isPressing=(0,react.useRef)(!1),cancelPointerEndListeners=(0,react.useRef)(null),eventOptions={passive:!(onTapStart||onTap||onTapCancel||onPointerDown)};function removePointerEndListener(){var _a;null===(_a=cancelPointerEndListeners.current)||void 0===_a||_a.call(cancelPointerEndListeners),cancelPointerEndListeners.current=null}function checkPointerEnd(){var _a;return removePointerEndListener(),isPressing.current=!1,null===(_a=visualElement.animationState)||void 0===_a||_a.setActive(AnimationType.Tap,!1),!isDragActive()}function onPointerUp(event,info){checkPointerEnd()&&(isNodeOrChild(visualElement.getInstance(),event.target)?null==onTap||onTap(event,info):null==onTapCancel||onTapCancel(event,info))}function onPointerCancel(event,info){checkPointerEnd()&&(null==onTapCancel||onTapCancel(event,info))}function onPointerDown(event,info){var _a;removePointerEndListener(),isPressing.current||(isPressing.current=!0,cancelPointerEndListeners.current=pipe(addPointerEvent(window,"pointerup",onPointerUp,eventOptions),addPointerEvent(window,"pointercancel",onPointerCancel,eventOptions)),null===(_a=visualElement.animationState)||void 0===_a||_a.setActive(AnimationType.Tap,!0),null==onTapStart||onTapStart(event,info))}usePointerEvent(visualElement,"pointerdown",hasPressListeners?onPointerDown:void 0,eventOptions),(0,use_unmount_effect.l)(removePointerEndListener)})),focus:makeRenderlessComponent((function useFocusGesture(_a){var whileFocus=_a.whileFocus,visualElement=_a.visualElement;useDomEvent(visualElement,"focus",whileFocus?function(){var _a;null===(_a=visualElement.animationState)||void 0===_a||_a.setActive(AnimationType.Focus,!0)}:void 0),useDomEvent(visualElement,"blur",whileFocus?function(){var _a;null===(_a=visualElement.animationState)||void 0===_a||_a.setActive(AnimationType.Focus,!1)}:void 0)})),hover:makeRenderlessComponent((function useHoverGesture(_a){var onHoverStart=_a.onHoverStart,onHoverEnd=_a.onHoverEnd,whileHover=_a.whileHover,visualElement=_a.visualElement;usePointerEvent(visualElement,"pointerenter",onHoverStart||whileHover?createHoverEvent(visualElement,!0,onHoverStart):void 0,{passive:!onHoverStart}),usePointerEvent(visualElement,"pointerleave",onHoverEnd||whileHover?createHoverEvent(visualElement,!1,onHoverEnd):void 0,{passive:!onHoverEnd})}))},use_id=__webpack_require__("../../node_modules/.pnpm/framer-motion@6.5.1_react-dom@17.0.2_react@17.0.2__react@17.0.2/node_modules/framer-motion/dist/es/utils/use-id.mjs");function usePresence(){var context=(0,react.useContext)(context_PresenceContext.t);if(null===context)return[!0,null];var isPresent=context.isPresent,onExitComplete=context.onExitComplete,register=context.register,id=(0,use_id.B)();(0,react.useEffect)((function(){return register(id)}),[]);return!isPresent&&onExitComplete?[!1,function(){return null==onExitComplete?void 0:onExitComplete(id)}]:[!0]}function shallowCompare(next,prev){if(!Array.isArray(prev))return!1;var prevLength=prev.length;if(prevLength!==next.length)return!1;for(var i=0;i<prevLength;i++)if(prev[i]!==next[i])return!1;return!0}var tslib_tslib_es6=__webpack_require__("../../node_modules/.pnpm/tslib@2.6.3/node_modules/tslib/tslib.es6.mjs");const clamp_clamp=(min,max,v)=>Math.min(Math.max(v,min),max),safeMin=.001,minDuration=.01,maxDuration=10,minDamping=.05,maxDamping=1;function findSpring({duration=800,bounce=.25,velocity=0,mass=1}){let envelope,derivative;warning(duration<=1e3*maxDuration,"Spring duration must be 10 seconds or less");let dampingRatio=1-bounce;dampingRatio=clamp_clamp(minDamping,maxDamping,dampingRatio),duration=clamp_clamp(minDuration,maxDuration,duration/1e3),dampingRatio<1?(envelope=undampedFreq=>{const exponentialDecay=undampedFreq*dampingRatio,delta=exponentialDecay*duration,a=exponentialDecay-velocity,b=calcAngularFreq(undampedFreq,dampingRatio),c=Math.exp(-delta);return safeMin-a/b*c},derivative=undampedFreq=>{const delta=undampedFreq*dampingRatio*duration,d=delta*velocity+velocity,e=Math.pow(dampingRatio,2)*Math.pow(undampedFreq,2)*duration,f=Math.exp(-delta),g=calcAngularFreq(Math.pow(undampedFreq,2),dampingRatio);return(-envelope(undampedFreq)+safeMin>0?-1:1)*((d-e)*f)/g}):(envelope=undampedFreq=>Math.exp(-undampedFreq*duration)*((undampedFreq-velocity)*duration+1)-safeMin,derivative=undampedFreq=>Math.exp(-undampedFreq*duration)*(duration*duration*(velocity-undampedFreq)));const undampedFreq=function approximateRoot(envelope,derivative,initialGuess){let result=initialGuess;for(let i=1;i<rootIterations;i++)result-=envelope(result)/derivative(result);return result}(envelope,derivative,5/duration);if(duration*=1e3,isNaN(undampedFreq))return{stiffness:100,damping:10,duration};{const stiffness=Math.pow(undampedFreq,2)*mass;return{stiffness,damping:2*dampingRatio*Math.sqrt(mass*stiffness),duration}}}const rootIterations=12;function calcAngularFreq(undampedFreq,dampingRatio){return undampedFreq*Math.sqrt(1-dampingRatio*dampingRatio)}const durationKeys=["duration","bounce"],physicsKeys=["stiffness","damping","mass"];function isSpringType(options,keys){return keys.some((key=>void 0!==options[key]))}function spring(_a){var{from=0,to=1,restSpeed=2,restDelta}=_a,options=(0,tslib_tslib_es6.Tt)(_a,["from","to","restSpeed","restDelta"]);const state={done:!1,value:from};let{stiffness,damping,mass,velocity,duration,isResolvedFromDuration}=function getSpringOptions(options){let springOptions=Object.assign({velocity:0,stiffness:100,damping:10,mass:1,isResolvedFromDuration:!1},options);if(!isSpringType(options,physicsKeys)&&isSpringType(options,durationKeys)){const derived=findSpring(options);springOptions=Object.assign(Object.assign(Object.assign({},springOptions),derived),{velocity:0,mass:1}),springOptions.isResolvedFromDuration=!0}return springOptions}(options),resolveSpring=zero,resolveVelocity=zero;function createSpring(){const initialVelocity=velocity?-velocity/1e3:0,initialDelta=to-from,dampingRatio=damping/(2*Math.sqrt(stiffness*mass)),undampedAngularFreq=Math.sqrt(stiffness/mass)/1e3;if(void 0===restDelta&&(restDelta=Math.min(Math.abs(to-from)/100,.4)),dampingRatio<1){const angularFreq=calcAngularFreq(undampedAngularFreq,dampingRatio);resolveSpring=t=>{const envelope=Math.exp(-dampingRatio*undampedAngularFreq*t);return to-envelope*((initialVelocity+dampingRatio*undampedAngularFreq*initialDelta)/angularFreq*Math.sin(angularFreq*t)+initialDelta*Math.cos(angularFreq*t))},resolveVelocity=t=>{const envelope=Math.exp(-dampingRatio*undampedAngularFreq*t);return dampingRatio*undampedAngularFreq*envelope*(Math.sin(angularFreq*t)*(initialVelocity+dampingRatio*undampedAngularFreq*initialDelta)/angularFreq+initialDelta*Math.cos(angularFreq*t))-envelope*(Math.cos(angularFreq*t)*(initialVelocity+dampingRatio*undampedAngularFreq*initialDelta)-angularFreq*initialDelta*Math.sin(angularFreq*t))}}else if(1===dampingRatio)resolveSpring=t=>to-Math.exp(-undampedAngularFreq*t)*(initialDelta+(initialVelocity+undampedAngularFreq*initialDelta)*t);else{const dampedAngularFreq=undampedAngularFreq*Math.sqrt(dampingRatio*dampingRatio-1);resolveSpring=t=>{const envelope=Math.exp(-dampingRatio*undampedAngularFreq*t),freqForT=Math.min(dampedAngularFreq*t,300);return to-envelope*((initialVelocity+dampingRatio*undampedAngularFreq*initialDelta)*Math.sinh(freqForT)+dampedAngularFreq*initialDelta*Math.cosh(freqForT))/dampedAngularFreq}}}return createSpring(),{next:t=>{const current=resolveSpring(t);if(isResolvedFromDuration)state.done=t>=duration;else{const currentVelocity=1e3*resolveVelocity(t),isBelowVelocityThreshold=Math.abs(currentVelocity)<=restSpeed,isBelowDisplacementThreshold=Math.abs(to-current)<=restDelta;state.done=isBelowVelocityThreshold&&isBelowDisplacementThreshold}return state.value=state.done?to:current,state},flipTarget:()=>{velocity=-velocity,[from,to]=[to,from],createSpring()}}}spring.needsInterpolation=(a,b)=>"string"==typeof a||"string"==typeof b;const zero=_t=>0,progress=(from,to,value)=>{const toFromDifference=to-from;return 0===toFromDifference?1:(value-from)/toFromDifference},mix=(from,to,progress)=>-progress*from+progress*to+from,isColorString=(type,testProp)=>v=>Boolean(isString(v)&&singleColorRegex.test(v)&&v.startsWith(type)||testProp&&Object.prototype.hasOwnProperty.call(v,testProp)),splitColor=(aName,bName,cName)=>v=>{if(!isString(v))return v;const[a,b,c,alpha]=v.match(floatRegex);return{[aName]:parseFloat(a),[bName]:parseFloat(b),[cName]:parseFloat(c),alpha:void 0!==alpha?parseFloat(alpha):1}},clampRgbUnit=clamp(0,255),rgbUnit=Object.assign(Object.assign({},number),{transform:v=>Math.round(clampRgbUnit(v))}),rgba={test:isColorString("rgb","red"),parse:splitColor("red","green","blue"),transform:({red,green,blue,alpha:alpha$1=1})=>"rgba("+rgbUnit.transform(red)+", "+rgbUnit.transform(green)+", "+rgbUnit.transform(blue)+", "+sanitize(alpha.transform(alpha$1))+")"};const hex={test:isColorString("#"),parse:function parseHex(v){let r="",g="",b="",a="";return v.length>5?(r=v.substr(1,2),g=v.substr(3,2),b=v.substr(5,2),a=v.substr(7,2)):(r=v.substr(1,1),g=v.substr(2,1),b=v.substr(3,1),a=v.substr(4,1),r+=r,g+=g,b+=b,a+=a),{red:parseInt(r,16),green:parseInt(g,16),blue:parseInt(b,16),alpha:a?parseInt(a,16)/255:1}},transform:rgba.transform},hsla={test:isColorString("hsl","hue"),parse:splitColor("hue","saturation","lightness"),transform:({hue,saturation,lightness,alpha:alpha$1=1})=>"hsla("+Math.round(hue)+", "+percent.transform(sanitize(saturation))+", "+percent.transform(sanitize(lightness))+", "+sanitize(alpha.transform(alpha$1))+")"};function hueToRgb(p,q,t){return t<0&&(t+=1),t>1&&(t-=1),t<1/6?p+6*(q-p)*t:t<.5?q:t<2/3?p+(q-p)*(2/3-t)*6:p}function hslaToRgba({hue,saturation,lightness,alpha}){hue/=360,lightness/=100;let red=0,green=0,blue=0;if(saturation/=100){const q=lightness<.5?lightness*(1+saturation):lightness+saturation-lightness*saturation,p=2*lightness-q;red=hueToRgb(p,q,hue+1/3),green=hueToRgb(p,q,hue),blue=hueToRgb(p,q,hue-1/3)}else red=green=blue=lightness;return{red:Math.round(255*red),green:Math.round(255*green),blue:Math.round(255*blue),alpha}}const mixLinearColor=(from,to,v)=>{const fromExpo=from*from,toExpo=to*to;return Math.sqrt(Math.max(0,v*(toExpo-fromExpo)+fromExpo))},colorTypes=[hex,rgba,hsla],getColorType=v=>colorTypes.find((type=>type.test(v))),notAnimatable=color=>`'${color}' is not an animatable color. Use the equivalent color code instead.`,mixColor=(from,to)=>{let fromColorType=getColorType(from),toColorType=getColorType(to);invariant(!!fromColorType,notAnimatable(from)),invariant(!!toColorType,notAnimatable(to));let fromColor=fromColorType.parse(from),toColor=toColorType.parse(to);fromColorType===hsla&&(fromColor=hslaToRgba(fromColor),fromColorType=rgba),toColorType===hsla&&(toColor=hslaToRgba(toColor),toColorType=rgba);const blended=Object.assign({},fromColor);return v=>{for(const key in blended)"alpha"!==key&&(blended[key]=mixLinearColor(fromColor[key],toColor[key],v));return blended.alpha=mix(fromColor.alpha,toColor.alpha,v),fromColorType.transform(blended)}},color={test:v=>rgba.test(v)||hex.test(v)||hsla.test(v),parse:v=>rgba.test(v)?rgba.parse(v):hsla.test(v)?hsla.parse(v):hex.parse(v),transform:v=>isString(v)?v:v.hasOwnProperty("red")?rgba.transform(v):hsla.transform(v)},colorToken="${c}",numberToken="${n}";function analyse(v){"number"==typeof v&&(v=`${v}`);const values=[];let numColors=0;const colors=v.match(colorRegex);colors&&(numColors=colors.length,v=v.replace(colorRegex,colorToken),values.push(...colors.map(color.parse)));const numbers=v.match(floatRegex);return numbers&&(v=v.replace(floatRegex,numberToken),values.push(...numbers.map(number.parse))),{values,numColors,tokenised:v}}function parse(v){return analyse(v).values}function createTransformer(v){const{values,numColors,tokenised}=analyse(v),numValues=values.length;return v=>{let output=tokenised;for(let i=0;i<numValues;i++)output=output.replace(i<numColors?colorToken:numberToken,i<numColors?color.transform(v[i]):sanitize(v[i]));return output}}const convertNumbersToZero=v=>"number"==typeof v?0:v;const complex={test:function test(v){var _a,_b,_c,_d;return isNaN(v)&&isString(v)&&(null!==(_b=null===(_a=v.match(floatRegex))||void 0===_a?void 0:_a.length)&&void 0!==_b?_b:0)+(null!==(_d=null===(_c=v.match(colorRegex))||void 0===_c?void 0:_c.length)&&void 0!==_d?_d:0)>0},parse,createTransformer,getAnimatableNone:function getAnimatableNone(v){const parsed=parse(v);return createTransformer(v)(parsed.map(convertNumbersToZero))}},isNum=v=>"number"==typeof v;function getMixer(origin,target){return isNum(origin)?v=>mix(origin,target,v):color.test(origin)?mixColor(origin,target):mixComplex(origin,target)}const mixArray=(from,to)=>{const output=[...from],numValues=output.length,blendValue=from.map(((fromThis,i)=>getMixer(fromThis,to[i])));return v=>{for(let i=0;i<numValues;i++)output[i]=blendValue[i](v);return output}},mixObject=(origin,target)=>{const output=Object.assign(Object.assign({},origin),target),blendValue={};for(const key in output)void 0!==origin[key]&&void 0!==target[key]&&(blendValue[key]=getMixer(origin[key],target[key]));return v=>{for(const key in blendValue)output[key]=blendValue[key](v);return output}};function mix_complex_analyse(value){const parsed=complex.parse(value),numValues=parsed.length;let numNumbers=0,numRGB=0,numHSL=0;for(let i=0;i<numValues;i++)numNumbers||"number"==typeof parsed[i]?numNumbers++:void 0!==parsed[i].hue?numHSL++:numRGB++;return{parsed,numNumbers,numRGB,numHSL}}const mixComplex=(origin,target)=>{const template=complex.createTransformer(target),originStats=mix_complex_analyse(origin),targetStats=mix_complex_analyse(target);return originStats.numHSL===targetStats.numHSL&&originStats.numRGB===targetStats.numRGB&&originStats.numNumbers>=targetStats.numNumbers?pipe(mixArray(originStats.parsed,targetStats.parsed),template):(warning(!0,`Complex values '${origin}' and '${target}' too different to mix. Ensure all colors are of the same type, and that each contains the same quantity of number and color values. Falling back to instant transition.`),p=>`${p>0?target:origin}`)},mixNumber=(from,to)=>p=>mix(from,to,p);function createMixers(output,ease,customMixer){const mixers=[],mixerFactory=customMixer||function detectMixerFactory(v){return"number"==typeof v?mixNumber:"string"==typeof v?color.test(v)?mixColor:mixComplex:Array.isArray(v)?mixArray:"object"==typeof v?mixObject:void 0}(output[0]),numMixers=output.length-1;for(let i=0;i<numMixers;i++){let mixer=mixerFactory(output[i],output[i+1]);if(ease){const easingFunction=Array.isArray(ease)?ease[i]:ease;mixer=pipe(easingFunction,mixer)}mixers.push(mixer)}return mixers}function interpolate(input,output,{clamp:isClamp=!0,ease,mixer}={}){const inputLength=input.length;invariant(inputLength===output.length,"Both input and output ranges must be the same length"),invariant(!ease||!Array.isArray(ease)||ease.length===inputLength-1,"Array of easing functions must be of length `input.length - 1`, as it applies to the transitions **between** the defined values."),input[0]>input[inputLength-1]&&(input=[].concat(input),output=[].concat(output),input.reverse(),output.reverse());const mixers=createMixers(output,ease,mixer),interpolator=2===inputLength?function fastInterpolate([from,to],[mixer]){return v=>mixer(progress(from,to,v))}(input,mixers):function slowInterpolate(input,mixers){const inputLength=input.length,lastInputIndex=inputLength-1;return v=>{let mixerIndex=0,foundMixerIndex=!1;if(v<=input[0]?foundMixerIndex=!0:v>=input[lastInputIndex]&&(mixerIndex=lastInputIndex-1,foundMixerIndex=!0),!foundMixerIndex){let i=1;for(;i<inputLength&&!(input[i]>v||i===lastInputIndex);i++);mixerIndex=i-1}const progressInRange=progress(input[mixerIndex],input[mixerIndex+1],v);return mixers[mixerIndex](progressInRange)}}(input,mixers);return isClamp?v=>interpolator(clamp_clamp(input[0],input[inputLength-1],v)):interpolator}const reverseEasing=easing=>p=>1-easing(1-p),mirrorEasing=easing=>p=>p<=.5?easing(2*p)/2:(2-easing(2*(1-p)))/2,createBackIn=power=>p=>p*p*((power+1)*p-power),linear=p=>p,easeIn=(power=2,p=>Math.pow(p,power));var power;const easeOut=reverseEasing(easeIn),easeInOut=mirrorEasing(easeIn),circIn=p=>1-Math.sin(Math.acos(p)),circOut=reverseEasing(circIn),circInOut=mirrorEasing(circOut),backIn=createBackIn(1.525),backOut=reverseEasing(backIn),backInOut=mirrorEasing(backIn),anticipate=(power=>{const backEasing=createBackIn(power);return p=>(p*=2)<1?.5*backEasing(p):.5*(2-Math.pow(2,-10*(p-1)))})(1.525),bounceOut=p=>{if(1===p||0===p)return p;const p2=p*p;return p<.36363636363636365?7.5625*p2:p<.7272727272727273?9.075*p2-9.9*p+3.4:p<.9?12.066481994459833*p2-19.63545706371191*p+8.898060941828255:10.8*p*p-20.52*p+10.72},bounceIn=reverseEasing(bounceOut);function defaultEasing(values,easing){return values.map((()=>easing||easeInOut)).splice(0,values.length-1)}function keyframes({from=0,to=1,ease,offset,duration=300}){const state={done:!1,value:from},values=Array.isArray(to)?to:[from,to],times=function convertOffsetToTimes(offset,duration){return offset.map((o=>o*duration))}(offset&&offset.length===values.length?offset:function defaultOffset(values){const numValues=values.length;return values.map(((_value,i)=>0!==i?i/(numValues-1):0))}(values),duration);function createInterpolator(){return interpolate(times,values,{ease:Array.isArray(ease)?ease:defaultEasing(values,ease)})}let interpolator=createInterpolator();return{next:t=>(state.value=interpolator(t),state.done=t>=duration,state),flipTarget:()=>{values.reverse(),interpolator=createInterpolator()}}}const types={keyframes,spring,decay:function decay({velocity=0,from=0,power=.8,timeConstant=350,restDelta=.5,modifyTarget}){const state={done:!1,value:from};let amplitude=power*velocity;const ideal=from+amplitude,target=void 0===modifyTarget?ideal:modifyTarget(ideal);return target!==ideal&&(amplitude=target-from),{next:t=>{const delta=-amplitude*Math.exp(-t/timeConstant);return state.done=!(delta>restDelta||delta<-restDelta),state.value=state.done?target:target+delta,state},flipTarget:()=>{}}}};var es=__webpack_require__("../../node_modules/.pnpm/framesync@6.0.1/node_modules/framesync/dist/es/index.mjs");function loopElapsed(elapsed,duration,delay=0){return elapsed-duration-delay}const framesync=update=>{const passTimestamp=({delta})=>update(delta);return{start:()=>es.Ay.update(passTimestamp,!0),stop:()=>es.eO.update(passTimestamp)}};function animate(_a){var _b,_c,{from,autoplay=!0,driver=framesync,elapsed=0,repeat:repeatMax=0,repeatType="loop",repeatDelay=0,onPlay,onStop,onComplete,onRepeat,onUpdate}=_a,options=(0,tslib_tslib_es6.Tt)(_a,["from","autoplay","driver","elapsed","repeat","repeatType","repeatDelay","onPlay","onStop","onComplete","onRepeat","onUpdate"]);let driverControls,latest,interpolateFromNumber,{to}=options,repeatCount=0,computedDuration=options.duration,isComplete=!1,isForwardPlayback=!0;const animator=function detectAnimationFromOptions(config){if(Array.isArray(config.to))return keyframes;if(types[config.type])return types[config.type];const keys=new Set(Object.keys(config));return keys.has("ease")||keys.has("duration")&&!keys.has("dampingRatio")?keyframes:keys.has("dampingRatio")||keys.has("stiffness")||keys.has("mass")||keys.has("damping")||keys.has("restSpeed")||keys.has("restDelta")?spring:keyframes}(options);(null===(_c=(_b=animator).needsInterpolation)||void 0===_c?void 0:_c.call(_b,from,to))&&(interpolateFromNumber=interpolate([0,100],[from,to],{clamp:!1}),from=0,to=100);const animation=animator(Object.assign(Object.assign({},options),{from,to}));function repeat(){repeatCount++,"reverse"===repeatType?(isForwardPlayback=repeatCount%2==0,elapsed=function reverseElapsed(elapsed,duration,delay=0,isForwardPlayback=!0){return isForwardPlayback?loopElapsed(duration+-elapsed,duration,delay):duration-(elapsed-duration)+delay}(elapsed,computedDuration,repeatDelay,isForwardPlayback)):(elapsed=loopElapsed(elapsed,computedDuration,repeatDelay),"mirror"===repeatType&&animation.flipTarget()),isComplete=!1,onRepeat&&onRepeat()}function update(delta){if(isForwardPlayback||(delta=-delta),elapsed+=delta,!isComplete){const state=animation.next(Math.max(0,elapsed));latest=state.value,interpolateFromNumber&&(latest=interpolateFromNumber(latest)),isComplete=isForwardPlayback?state.done:elapsed<=0}null==onUpdate||onUpdate(latest),isComplete&&(0===repeatCount&&(null!=computedDuration||(computedDuration=elapsed)),repeatCount<repeatMax?function hasRepeatDelayElapsed(elapsed,duration,delay,isForwardPlayback){return isForwardPlayback?elapsed>=duration+delay:elapsed<=-delay}(elapsed,computedDuration,repeatDelay,isForwardPlayback)&&repeat():function complete(){driverControls.stop(),onComplete&&onComplete()}())}return autoplay&&function play(){null==onPlay||onPlay(),driverControls=driver(update),driverControls.start()}(),{stop:()=>{null==onStop||onStop(),driverControls.stop()}}}function velocityPerSecond(velocity,frameDuration){return frameDuration?velocity*(1e3/frameDuration):0}var secondsToMilliseconds=function(seconds){return 1e3*seconds};const a=(a1,a2)=>1-3*a2+3*a1,b=(a1,a2)=>3*a2-6*a1,c=a1=>3*a1,calcBezier=(t,a1,a2)=>((a(a1,a2)*t+b(a1,a2))*t+c(a1))*t,getSlope=(t,a1,a2)=>3*a(a1,a2)*t*t+2*b(a1,a2)*t+c(a1),subdivisionPrecision=1e-7,subdivisionMaxIterations=10;const newtonIterations=8;function cubicBezier(mX1,mY1,mX2,mY2){if(mX1===mY1&&mX2===mY2)return linear;const sampleValues=new Float32Array(11);for(let i=0;i<11;++i)sampleValues[i]=calcBezier(.1*i,mX1,mX2);function getTForX(aX){let intervalStart=0,currentSample=1;for(;10!==currentSample&&sampleValues[currentSample]<=aX;++currentSample)intervalStart+=.1;--currentSample;const guessForT=intervalStart+.1*((aX-sampleValues[currentSample])/(sampleValues[currentSample+1]-sampleValues[currentSample])),initialSlope=getSlope(guessForT,mX1,mX2);return initialSlope>=.001?function newtonRaphsonIterate(aX,aGuessT,mX1,mX2){for(let i=0;i<newtonIterations;++i){const currentSlope=getSlope(aGuessT,mX1,mX2);if(0===currentSlope)return aGuessT;aGuessT-=(calcBezier(aGuessT,mX1,mX2)-aX)/currentSlope}return aGuessT}(aX,guessForT,mX1,mX2):0===initialSlope?guessForT:function binarySubdivide(aX,aA,aB,mX1,mX2){let currentX,currentT,i=0;do{currentT=aA+(aB-aA)/2,currentX=calcBezier(currentT,mX1,mX2)-aX,currentX>0?aB=currentT:aA=currentT}while(Math.abs(currentX)>subdivisionPrecision&&++i<subdivisionMaxIterations);return currentT}(aX,intervalStart,intervalStart+.1,mX1,mX2)}return t=>0===t||1===t?t:calcBezier(getTForX(t),mY1,mY2)}var easingLookup={linear,easeIn,easeInOut,easeOut,circIn,circInOut,circOut,backIn,backInOut,backOut,anticipate,bounceIn,bounceInOut:p=>p<.5?.5*(1-bounceOut(1-2*p)):.5*bounceOut(2*p-1)+.5,bounceOut},easingDefinitionToFunction=function(definition){if(Array.isArray(definition)){invariant(4===definition.length,"Cubic bezier arrays must contain four numerical values.");var _a=(0,tslib_es6.zs)(definition,4);return cubicBezier(_a[0],_a[1],_a[2],_a[3])}return"string"==typeof definition?(invariant(void 0!==easingLookup[definition],"Invalid easing type '".concat(definition,"'")),easingLookup[definition]):definition},isEasingArray=function(ease){return Array.isArray(ease)&&"number"!=typeof ease[0]},isAnimatable=function(key,value){return"zIndex"!==key&&(!("number"!=typeof value&&!Array.isArray(value))||!("string"!=typeof value||!complex.test(value)||value.startsWith("url(")))},underDampedSpring=function(){return{type:"spring",stiffness:500,damping:25,restSpeed:10}},criticallyDampedSpring=function(to){return{type:"spring",stiffness:550,damping:0===to?2*Math.sqrt(550):30,restSpeed:10}},linearTween=function(){return{type:"keyframes",ease:"linear",duration:.3}},default_transitions_keyframes=function(values){return{type:"keyframes",duration:.8,values}},defaultTransitions={x:underDampedSpring,y:underDampedSpring,z:underDampedSpring,rotate:underDampedSpring,rotateX:underDampedSpring,rotateY:underDampedSpring,rotateZ:underDampedSpring,scaleX:criticallyDampedSpring,scaleY:criticallyDampedSpring,scale:criticallyDampedSpring,opacity:linearTween,backgroundColor:linearTween,color:linearTween,default:criticallyDampedSpring},getDefaultTransition=function(valueKey,to){var transitionFactory;return transitionFactory=isKeyframesTarget(to)?default_transitions_keyframes:defaultTransitions[valueKey]||defaultTransitions.default,(0,tslib_es6.Cl)({to},transitionFactory(to))};const maxDefaults=new Set(["brightness","contrast","saturate","opacity"]);function applyDefaultFilter(v){let[name,value]=v.slice(0,-1).split("(");if("drop-shadow"===name)return v;const[number]=value.match(floatRegex)||[];if(!number)return v;const unit=value.replace(number,"");let defaultValue=maxDefaults.has(name)?1:0;return number!==value&&(defaultValue*=100),name+"("+defaultValue+unit+")"}const functionRegex=/([a-z-]*)\(.*?\)/g,filter=Object.assign(Object.assign({},complex),{getAnimatableNone:v=>{const functions=v.match(functionRegex);return functions?functions.map(applyDefaultFilter).join(" "):v}});var defaultValueTypes=(0,tslib_es6.Cl)((0,tslib_es6.Cl)({},numberValueTypes),{color,backgroundColor:color,outlineColor:color,fill:color,stroke:color,borderColor:color,borderTopColor:color,borderRightColor:color,borderBottomColor:color,borderLeftColor:color,filter,WebkitFilter:filter}),getDefaultValueType=function(key){return defaultValueTypes[key]};function animatable_none_getAnimatableNone(key,value){var _a,defaultValueType=getDefaultValueType(key);return defaultValueType!==filter&&(defaultValueType=complex),null===(_a=defaultValueType.getAnimatableNone)||void 0===_a?void 0:_a.call(defaultValueType,value)}var instantAnimationState={current:!1};var legacyRepeatWarning=!1;function getPopmotionAnimationOptions(transition,options,key){var _a;return Array.isArray(options.to)&&(null!==(_a=transition.duration)&&void 0!==_a||(transition.duration=.8)),function hydrateKeyframes(options){return Array.isArray(options.to)&&null===options.to[0]&&(options.to=(0,tslib_es6.fX)([],(0,tslib_es6.zs)(options.to),!1),options.to[0]=options.from),options}(options),function isTransitionDefined(_a){_a.when,_a.delay,_a.delayChildren,_a.staggerChildren,_a.staggerDirection,_a.repeat,_a.repeatType,_a.repeatDelay,_a.from;var transition=(0,tslib_es6.Tt)(_a,["when","delay","delayChildren","staggerChildren","staggerDirection","repeat","repeatType","repeatDelay","from"]);return!!Object.keys(transition).length}(transition)||(transition=(0,tslib_es6.Cl)((0,tslib_es6.Cl)({},transition),getDefaultTransition(key,options.to))),(0,tslib_es6.Cl)((0,tslib_es6.Cl)({},options),function convertTransitionToAnimationOptions(_a){var ease=_a.ease,times=_a.times,yoyo=_a.yoyo,flip=_a.flip,loop=_a.loop,transition=(0,tslib_es6.Tt)(_a,["ease","times","yoyo","flip","loop"]),options=(0,tslib_es6.Cl)({},transition);return times&&(options.offset=times),transition.duration&&(options.duration=secondsToMilliseconds(transition.duration)),transition.repeatDelay&&(options.repeatDelay=secondsToMilliseconds(transition.repeatDelay)),ease&&(options.ease=isEasingArray(ease)?ease.map(easingDefinitionToFunction):easingDefinitionToFunction(ease)),"tween"===transition.type&&(options.type="keyframes"),(yoyo||loop||flip)&&(warning(!legacyRepeatWarning,"yoyo, loop and flip have been removed from the API. Replace with repeat and repeatType options."),legacyRepeatWarning=!0,yoyo?options.repeatType="reverse":loop?options.repeatType="loop":flip&&(options.repeatType="mirror"),options.repeat=loop||yoyo||flip||transition.repeat),"spring"!==transition.type&&(options.type="keyframes"),options}(transition))}function getAnimation(key,value,target,transition,onComplete){var _a,valueTransition=getValueTransition(transition,key),origin=null!==(_a=valueTransition.from)&&void 0!==_a?_a:value.get(),isTargetAnimatable=isAnimatable(key,target);"none"===origin&&isTargetAnimatable&&"string"==typeof target?origin=animatable_none_getAnimatableNone(key,target):isZero(origin)&&"string"==typeof target?origin=getZeroUnit(target):!Array.isArray(target)&&isZero(target)&&"string"==typeof origin&&(target=getZeroUnit(origin));var isOriginAnimatable=isAnimatable(key,origin);return warning(isOriginAnimatable===isTargetAnimatable,"You are trying to animate ".concat(key,' from "').concat(origin,'" to "').concat(target,'". ').concat(origin," is not an animatable value - to enable this animation set ").concat(origin," to a value animatable to ").concat(target," via the `style` property.")),isOriginAnimatable&&isTargetAnimatable&&!1!==valueTransition.type?function start(){var options={from:origin,to:target,velocity:value.getVelocity(),onComplete,onUpdate:function(v){return value.set(v)}};return"inertia"===valueTransition.type||"decay"===valueTransition.type?function inertia({from=0,velocity=0,min,max,power=.8,timeConstant=750,bounceStiffness=500,bounceDamping=10,restDelta=1,modifyTarget,driver,onUpdate,onComplete,onStop}){let currentAnimation;function isOutOfBounds(v){return void 0!==min&&v<min||void 0!==max&&v>max}function boundaryNearest(v){return void 0===min?max:void 0===max||Math.abs(min-v)<Math.abs(max-v)?min:max}function startAnimation(options){null==currentAnimation||currentAnimation.stop(),currentAnimation=animate(Object.assign(Object.assign({},options),{driver,onUpdate:v=>{var _a;null==onUpdate||onUpdate(v),null===(_a=options.onUpdate)||void 0===_a||_a.call(options,v)},onComplete,onStop}))}function startSpring(options){startAnimation(Object.assign({type:"spring",stiffness:bounceStiffness,damping:bounceDamping,restDelta},options))}if(isOutOfBounds(from))startSpring({from,velocity,to:boundaryNearest(from)});else{let target=power*velocity+from;void 0!==modifyTarget&&(target=modifyTarget(target));const boundary=boundaryNearest(target),heading=boundary===min?-1:1;let prev,current;const checkBoundary=v=>{prev=current,current=v,velocity=velocityPerSecond(v-prev,(0,es.KK)().delta),(1===heading&&v>boundary||-1===heading&&v<boundary)&&startSpring({from:v,to:boundary,velocity})};startAnimation({type:"decay",from,velocity,timeConstant,power,restDelta,modifyTarget,onUpdate:isOutOfBounds(target)?checkBoundary:void 0})}return{stop:()=>null==currentAnimation?void 0:currentAnimation.stop()}}((0,tslib_es6.Cl)((0,tslib_es6.Cl)({},options),valueTransition)):animate((0,tslib_es6.Cl)((0,tslib_es6.Cl)({},getPopmotionAnimationOptions(valueTransition,options,key)),{onUpdate:function(v){var _a;options.onUpdate(v),null===(_a=valueTransition.onUpdate)||void 0===_a||_a.call(valueTransition,v)},onComplete:function(){var _a;options.onComplete(),null===(_a=valueTransition.onComplete)||void 0===_a||_a.call(valueTransition)}}))}:function set(){var _a,_b,finalTarget=resolveFinalValueInKeyframes(target);return value.set(finalTarget),onComplete(),null===(_a=null==valueTransition?void 0:valueTransition.onUpdate)||void 0===_a||_a.call(valueTransition,finalTarget),null===(_b=null==valueTransition?void 0:valueTransition.onComplete)||void 0===_b||_b.call(valueTransition),{stop:function(){}}}}function isZero(value){return 0===value||"string"==typeof value&&0===parseFloat(value)&&-1===value.indexOf(" ")}function getZeroUnit(potentialUnitType){return"number"==typeof potentialUnitType?0:animatable_none_getAnimatableNone("",potentialUnitType)}function getValueTransition(transition,key){return transition[key]||transition.default||transition}function startAnimation(key,value,target,transition){return void 0===transition&&(transition={}),instantAnimationState.current&&(transition={type:!1}),value.start((function(onComplete){var delayTimer,controls,animation=getAnimation(key,value,target,transition,onComplete),delay=function getDelayFromTransition(transition,key){var _a,_b;return null!==(_b=null!==(_a=(getValueTransition(transition,key)||{}).delay)&&void 0!==_a?_a:transition.delay)&&void 0!==_b?_b:0}(transition,key),start=function(){return controls=animation()};return delay?delayTimer=window.setTimeout(start,secondsToMilliseconds(delay)):start(),function(){clearTimeout(delayTimer),null==controls||controls.stop()}}))}var isZeroValueString=function(v){return/^0[^.\s]+$/.test(v)};function addUniqueItem(arr,item){-1===arr.indexOf(item)&&arr.push(item)}function removeItem(arr,item){var index=arr.indexOf(item);index>-1&&arr.splice(index,1)}var SubscriptionManager=function(){function SubscriptionManager(){this.subscriptions=[]}return SubscriptionManager.prototype.add=function(handler){var _this=this;return addUniqueItem(this.subscriptions,handler),function(){return removeItem(_this.subscriptions,handler)}},SubscriptionManager.prototype.notify=function(a,b,c){var numSubscriptions=this.subscriptions.length;if(numSubscriptions)if(1===numSubscriptions)this.subscriptions[0](a,b,c);else for(var i=0;i<numSubscriptions;i++){var handler=this.subscriptions[i];handler&&handler(a,b,c)}},SubscriptionManager.prototype.getSize=function(){return this.subscriptions.length},SubscriptionManager.prototype.clear=function(){this.subscriptions.length=0},SubscriptionManager}(),MotionValue=function(){function MotionValue(init){var value,_this=this;this.version="6.5.1",this.timeDelta=0,this.lastUpdated=0,this.updateSubscribers=new SubscriptionManager,this.velocityUpdateSubscribers=new SubscriptionManager,this.renderSubscribers=new SubscriptionManager,this.canTrackVelocity=!1,this.updateAndNotify=function(v,render){void 0===render&&(render=!0),_this.prev=_this.current,_this.current=v;var _a=(0,es.KK)(),delta=_a.delta,timestamp=_a.timestamp;_this.lastUpdated!==timestamp&&(_this.timeDelta=delta,_this.lastUpdated=timestamp,es.Ay.postRender(_this.scheduleVelocityCheck)),_this.prev!==_this.current&&_this.updateSubscribers.notify(_this.current),_this.velocityUpdateSubscribers.getSize()&&_this.velocityUpdateSubscribers.notify(_this.getVelocity()),render&&_this.renderSubscribers.notify(_this.current)},this.scheduleVelocityCheck=function(){return es.Ay.postRender(_this.velocityCheck)},this.velocityCheck=function(_a){_a.timestamp!==_this.lastUpdated&&(_this.prev=_this.current,_this.velocityUpdateSubscribers.notify(_this.getVelocity()))},this.hasAnimated=!1,this.prev=this.current=init,this.canTrackVelocity=(value=this.current,!isNaN(parseFloat(value)))}return MotionValue.prototype.onChange=function(subscription){return this.updateSubscribers.add(subscription)},MotionValue.prototype.clearListeners=function(){this.updateSubscribers.clear()},MotionValue.prototype.onRenderRequest=function(subscription){return subscription(this.get()),this.renderSubscribers.add(subscription)},MotionValue.prototype.attach=function(passiveEffect){this.passiveEffect=passiveEffect},MotionValue.prototype.set=function(v,render){void 0===render&&(render=!0),render&&this.passiveEffect?this.passiveEffect(v,this.updateAndNotify):this.updateAndNotify(v,render)},MotionValue.prototype.get=function(){return this.current},MotionValue.prototype.getPrevious=function(){return this.prev},MotionValue.prototype.getVelocity=function(){return this.canTrackVelocity?velocityPerSecond(parseFloat(this.current)-parseFloat(this.prev),this.timeDelta):0},MotionValue.prototype.start=function(animation){var _this=this;return this.stop(),new Promise((function(resolve){_this.hasAnimated=!0,_this.stopAnimation=animation(resolve)})).then((function(){return _this.clearAnimation()}))},MotionValue.prototype.stop=function(){this.stopAnimation&&this.stopAnimation(),this.clearAnimation()},MotionValue.prototype.isAnimating=function(){return!!this.stopAnimation},MotionValue.prototype.clearAnimation=function(){this.stopAnimation=null},MotionValue.prototype.destroy=function(){this.updateSubscribers.clear(),this.renderSubscribers.clear(),this.stop()},MotionValue}();function motionValue(init){return new MotionValue(init)}var testValueType=function(v){return function(type){return type.test(v)}},dimensionValueTypes=[number,px,percent,degrees,vw,vh,{test:function(v){return"auto"===v},parse:function(v){return v}}],findDimensionValueType=function(v){return dimensionValueTypes.find(testValueType(v))},valueTypes=(0,tslib_es6.fX)((0,tslib_es6.fX)([],(0,tslib_es6.zs)(dimensionValueTypes),!1),[color,complex],!1),findValueType=function(v){return valueTypes.find(testValueType(v))};function setMotionValue(visualElement,key,value){visualElement.hasValue(key)?visualElement.getValue(key).set(value):visualElement.addValue(key,motionValue(value))}function setTarget(visualElement,definition){var resolved=resolveVariant(visualElement,definition),_a=resolved?visualElement.makeTargetAnimatable(resolved,!1):{},_b=_a.transitionEnd,transitionEnd=void 0===_b?{}:_b;_a.transition;var target=(0,tslib_es6.Tt)(_a,["transitionEnd","transition"]);for(var key in target=(0,tslib_es6.Cl)((0,tslib_es6.Cl)({},target),transitionEnd)){setMotionValue(visualElement,key,resolveFinalValueInKeyframes(target[key]))}}function getOriginFromTransition(key,transition){if(transition)return(transition[key]||transition.default||transition).from}function animateVariant(visualElement,variant,options){var _a;void 0===options&&(options={});var resolved=resolveVariant(visualElement,variant,options.custom),_b=(resolved||{}).transition,transition=void 0===_b?visualElement.getDefaultTransition()||{}:_b;options.transitionOverride&&(transition=options.transitionOverride);var getAnimation=resolved?function(){return animateTarget(visualElement,resolved,options)}:function(){return Promise.resolve()},getChildAnimations=(null===(_a=visualElement.variantChildren)||void 0===_a?void 0:_a.size)?function(forwardDelay){void 0===forwardDelay&&(forwardDelay=0);var _a=transition.delayChildren,delayChildren=void 0===_a?0:_a,staggerChildren=transition.staggerChildren,staggerDirection=transition.staggerDirection;return function animateChildren(visualElement,variant,delayChildren,staggerChildren,staggerDirection,options){void 0===delayChildren&&(delayChildren=0);void 0===staggerChildren&&(staggerChildren=0);void 0===staggerDirection&&(staggerDirection=1);var animations=[],maxStaggerDuration=(visualElement.variantChildren.size-1)*staggerChildren,generateStaggerDuration=1===staggerDirection?function(i){return void 0===i&&(i=0),i*staggerChildren}:function(i){return void 0===i&&(i=0),maxStaggerDuration-i*staggerChildren};return Array.from(visualElement.variantChildren).sort(sortByTreeOrder).forEach((function(child,i){animations.push(animateVariant(child,variant,(0,tslib_es6.Cl)((0,tslib_es6.Cl)({},options),{delay:delayChildren+generateStaggerDuration(i)})).then((function(){return child.notifyAnimationComplete(variant)})))})),Promise.all(animations)}(visualElement,variant,delayChildren+forwardDelay,staggerChildren,staggerDirection,options)}:function(){return Promise.resolve()},when=transition.when;if(when){var _c=(0,tslib_es6.zs)("beforeChildren"===when?[getAnimation,getChildAnimations]:[getChildAnimations,getAnimation],2),first=_c[0],last=_c[1];return first().then(last)}return Promise.all([getAnimation(),getChildAnimations(options.delay)])}function animateTarget(visualElement,definition,_a){var _b,_c=void 0===_a?{}:_a,_d=_c.delay,delay=void 0===_d?0:_d,transitionOverride=_c.transitionOverride,type=_c.type,_e=visualElement.makeTargetAnimatable(definition),_f=_e.transition,transition=void 0===_f?visualElement.getDefaultTransition():_f,transitionEnd=_e.transitionEnd,target=(0,tslib_es6.Tt)(_e,["transition","transitionEnd"]);transitionOverride&&(transition=transitionOverride);var animations=[],animationTypeState=type&&(null===(_b=visualElement.animationState)||void 0===_b?void 0:_b.getState()[type]);for(var key in target){var value=visualElement.getValue(key),valueTarget=target[key];if(!(!value||void 0===valueTarget||animationTypeState&&shouldBlockAnimation(animationTypeState,key))){var valueTransition=(0,tslib_es6.Cl)({delay},transition);visualElement.shouldReduceMotion&&isTransformProp(key)&&(valueTransition=(0,tslib_es6.Cl)((0,tslib_es6.Cl)({},valueTransition),{type:!1,delay:0}));var animation=startAnimation(key,value,valueTarget,valueTransition);animations.push(animation)}}return Promise.all(animations).then((function(){transitionEnd&&setTarget(visualElement,transitionEnd)}))}function sortByTreeOrder(a,b){return a.sortNodePosition(b)}function shouldBlockAnimation(_a,key){var protectedKeys=_a.protectedKeys,needsAnimating=_a.needsAnimating,shouldBlock=protectedKeys.hasOwnProperty(key)&&!0!==needsAnimating[key];return needsAnimating[key]=!1,shouldBlock}var variantPriorityOrder=[AnimationType.Animate,AnimationType.InView,AnimationType.Focus,AnimationType.Hover,AnimationType.Tap,AnimationType.Drag,AnimationType.Exit],reversePriorityOrder=(0,tslib_es6.fX)([],(0,tslib_es6.zs)(variantPriorityOrder),!1).reverse(),numAnimationTypes=variantPriorityOrder.length;function animateList(visualElement){return function(animations){return Promise.all(animations.map((function(_a){var animation=_a.animation,options=_a.options;return function animateVisualElement(visualElement,definition,options){var animation;if(void 0===options&&(options={}),visualElement.notifyAnimationStart(definition),Array.isArray(definition)){var animations=definition.map((function(variant){return animateVariant(visualElement,variant,options)}));animation=Promise.all(animations)}else if("string"==typeof definition)animation=animateVariant(visualElement,definition,options);else{var resolvedDefinition="function"==typeof definition?resolveVariant(visualElement,definition,options.custom):definition;animation=animateTarget(visualElement,resolvedDefinition,options)}return animation.then((function(){return visualElement.notifyAnimationComplete(definition)}))}(visualElement,animation,options)})))}}function createAnimationState(visualElement){var animate=animateList(visualElement),state=function createState(){var _a;return(_a={})[AnimationType.Animate]=createTypeState(!0),_a[AnimationType.InView]=createTypeState(),_a[AnimationType.Hover]=createTypeState(),_a[AnimationType.Tap]=createTypeState(),_a[AnimationType.Drag]=createTypeState(),_a[AnimationType.Focus]=createTypeState(),_a[AnimationType.Exit]=createTypeState(),_a}(),allAnimatedKeys={},isInitialRender=!0,buildResolvedTypeValues=function(acc,definition){var resolved=resolveVariant(visualElement,definition);if(resolved){resolved.transition;var transitionEnd=resolved.transitionEnd,target=(0,tslib_es6.Tt)(resolved,["transition","transitionEnd"]);acc=(0,tslib_es6.Cl)((0,tslib_es6.Cl)((0,tslib_es6.Cl)({},acc),target),transitionEnd)}return acc};function animateChanges(options,changedActiveType){for(var _a,props=visualElement.getProps(),context=visualElement.getVariantContext(!0)||{},animations=[],removedKeys=new Set,encounteredKeys={},removedVariantIndex=1/0,_loop_1=function(i){var type=reversePriorityOrder[i],typeState=state[type],prop=null!==(_a=props[type])&&void 0!==_a?_a:context[type],propIsVariant=isVariantLabel(prop),activeDelta=type===changedActiveType?typeState.isActive:null;!1===activeDelta&&(removedVariantIndex=i);var isInherited=prop===context[type]&&prop!==props[type]&&propIsVariant;if(isInherited&&isInitialRender&&visualElement.manuallyAnimateOnMount&&(isInherited=!1),typeState.protectedKeys=(0,tslib_es6.Cl)({},encounteredKeys),!typeState.isActive&&null===activeDelta||!prop&&!typeState.prevProp||isAnimationControls(prop)||"boolean"==typeof prop)return"continue";var variantDidChange=function checkVariantsDidChange(prev,next){if("string"==typeof next)return next!==prev;if(isVariantLabels(next))return!shallowCompare(next,prev);return!1}(typeState.prevProp,prop),shouldAnimateType=variantDidChange||type===changedActiveType&&typeState.isActive&&!isInherited&&propIsVariant||i>removedVariantIndex&&propIsVariant,definitionList=Array.isArray(prop)?prop:[prop],resolvedValues=definitionList.reduce(buildResolvedTypeValues,{});!1===activeDelta&&(resolvedValues={});var _b=typeState.prevResolvedValues,prevResolvedValues=void 0===_b?{}:_b,allKeys=(0,tslib_es6.Cl)((0,tslib_es6.Cl)({},prevResolvedValues),resolvedValues),markToAnimate=function(key){shouldAnimateType=!0,removedKeys.delete(key),typeState.needsAnimating[key]=!0};for(var key in allKeys){var next=resolvedValues[key],prev=prevResolvedValues[key];encounteredKeys.hasOwnProperty(key)||(next!==prev?isKeyframesTarget(next)&&isKeyframesTarget(prev)?!shallowCompare(next,prev)||variantDidChange?markToAnimate(key):typeState.protectedKeys[key]=!0:void 0!==next?markToAnimate(key):removedKeys.add(key):void 0!==next&&removedKeys.has(key)?markToAnimate(key):typeState.protectedKeys[key]=!0)}typeState.prevProp=prop,typeState.prevResolvedValues=resolvedValues,typeState.isActive&&(encounteredKeys=(0,tslib_es6.Cl)((0,tslib_es6.Cl)({},encounteredKeys),resolvedValues)),isInitialRender&&visualElement.blockInitialAnimation&&(shouldAnimateType=!1),shouldAnimateType&&!isInherited&&animations.push.apply(animations,(0,tslib_es6.fX)([],(0,tslib_es6.zs)(definitionList.map((function(animation){return{animation,options:(0,tslib_es6.Cl)({type},options)}}))),!1))},i=0;i<numAnimationTypes;i++)_loop_1(i);if(allAnimatedKeys=(0,tslib_es6.Cl)({},encounteredKeys),removedKeys.size){var fallbackAnimation_1={};removedKeys.forEach((function(key){var fallbackTarget=visualElement.getBaseTarget(key);void 0!==fallbackTarget&&(fallbackAnimation_1[key]=fallbackTarget)})),animations.push({animation:fallbackAnimation_1})}var shouldAnimate=Boolean(animations.length);return isInitialRender&&!1===props.initial&&!visualElement.manuallyAnimateOnMount&&(shouldAnimate=!1),isInitialRender=!1,shouldAnimate?animate(animations):Promise.resolve()}return{isAnimated:function isAnimated(key){return void 0!==allAnimatedKeys[key]},animateChanges,setActive:function setActive(type,isActive,options){var _a;if(state[type].isActive===isActive)return Promise.resolve();null===(_a=visualElement.variantChildren)||void 0===_a||_a.forEach((function(child){var _a;return null===(_a=child.animationState)||void 0===_a?void 0:_a.setActive(type,isActive)})),state[type].isActive=isActive;var animations=animateChanges(options,type);for(var key in state)state[key].protectedKeys={};return animations},setAnimateFunction:function setAnimateFunction(makeAnimator){animate=makeAnimator(visualElement)},getState:function(){return state}}}function createTypeState(isActive){return void 0===isActive&&(isActive=!1),{isActive,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}var animations={animation:makeRenderlessComponent((function(_a){var visualElement=_a.visualElement,animate=_a.animate;visualElement.animationState||(visualElement.animationState=createAnimationState(visualElement)),isAnimationControls(animate)&&(0,react.useEffect)((function(){return animate.subscribe(visualElement)}),[animate])})),exit:makeRenderlessComponent((function(props){var custom=props.custom,visualElement=props.visualElement,_a=(0,tslib_es6.zs)(usePresence(),2),isPresent=_a[0],safeToRemove=_a[1],presenceContext=(0,react.useContext)(context_PresenceContext.t);(0,react.useEffect)((function(){var _a,_b;visualElement.isPresent=isPresent;var animation=null===(_a=visualElement.animationState)||void 0===_a?void 0:_a.setActive(AnimationType.Exit,!isPresent,{custom:null!==(_b=null==presenceContext?void 0:presenceContext.custom)&&void 0!==_b?_b:custom});!isPresent&&(null==animation||animation.then(safeToRemove))}),[isPresent])}))};const isPoint=point=>point.hasOwnProperty("x")&&point.hasOwnProperty("y"),isPoint3D=point=>isPoint(point)&&point.hasOwnProperty("z"),distance1D=(a,b)=>Math.abs(a-b);function distance(a,b){if(isNum(a)&&isNum(b))return distance1D(a,b);if(isPoint(a)&&isPoint(b)){const xDelta=distance1D(a.x,b.x),yDelta=distance1D(a.y,b.y),zDelta=isPoint3D(a)&&isPoint3D(b)?distance1D(a.z,b.z):0;return Math.sqrt(Math.pow(xDelta,2)+Math.pow(yDelta,2)+Math.pow(zDelta,2))}}var PanSession=function(){function PanSession(event,handlers,_a){var _this=this,transformPagePoint=(void 0===_a?{}:_a).transformPagePoint;if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.updatePoint=function(){if(_this.lastMoveEvent&&_this.lastMoveEventInfo){var info=getPanInfo(_this.lastMoveEventInfo,_this.history),isPanStarted=null!==_this.startEvent,isDistancePastThreshold=distance(info.offset,{x:0,y:0})>=3;if(isPanStarted||isDistancePastThreshold){var point=info.point,timestamp=(0,es.KK)().timestamp;_this.history.push((0,tslib_es6.Cl)((0,tslib_es6.Cl)({},point),{timestamp}));var _a=_this.handlers,onStart=_a.onStart,onMove=_a.onMove;isPanStarted||(onStart&&onStart(_this.lastMoveEvent,info),_this.startEvent=_this.lastMoveEvent),onMove&&onMove(_this.lastMoveEvent,info)}}},this.handlePointerMove=function(event,info){_this.lastMoveEvent=event,_this.lastMoveEventInfo=transformPoint(info,_this.transformPagePoint),isMouseEvent(event)&&0===event.buttons?_this.handlePointerUp(event,info):es.Ay.update(_this.updatePoint,!0)},this.handlePointerUp=function(event,info){_this.end();var _a=_this.handlers,onEnd=_a.onEnd,onSessionEnd=_a.onSessionEnd,panInfo=getPanInfo(transformPoint(info,_this.transformPagePoint),_this.history);_this.startEvent&&onEnd&&onEnd(event,panInfo),onSessionEnd&&onSessionEnd(event,panInfo)},!(isTouchEvent(event)&&event.touches.length>1)){this.handlers=handlers,this.transformPagePoint=transformPagePoint;var initialInfo=transformPoint(extractEventInfo(event),this.transformPagePoint),point=initialInfo.point,timestamp=(0,es.KK)().timestamp;this.history=[(0,tslib_es6.Cl)((0,tslib_es6.Cl)({},point),{timestamp})];var onSessionStart=handlers.onSessionStart;onSessionStart&&onSessionStart(event,getPanInfo(initialInfo,this.history)),this.removeListeners=pipe(addPointerEvent(window,"pointermove",this.handlePointerMove),addPointerEvent(window,"pointerup",this.handlePointerUp),addPointerEvent(window,"pointercancel",this.handlePointerUp))}}return PanSession.prototype.updateHandlers=function(handlers){this.handlers=handlers},PanSession.prototype.end=function(){this.removeListeners&&this.removeListeners(),es.eO.update(this.updatePoint)},PanSession}();function transformPoint(info,transformPagePoint){return transformPagePoint?{point:transformPagePoint(info.point)}:info}function subtractPoint(a,b){return{x:a.x-b.x,y:a.y-b.y}}function getPanInfo(_a,history){var point=_a.point;return{point,delta:subtractPoint(point,lastDevicePoint(history)),offset:subtractPoint(point,startDevicePoint(history)),velocity:PanSession_getVelocity(history,.1)}}function startDevicePoint(history){return history[0]}function lastDevicePoint(history){return history[history.length-1]}function PanSession_getVelocity(history,timeDelta){if(history.length<2)return{x:0,y:0};for(var i=history.length-1,timestampedPoint=null,lastPoint=lastDevicePoint(history);i>=0&&(timestampedPoint=history[i],!(lastPoint.timestamp-timestampedPoint.timestamp>secondsToMilliseconds(timeDelta)));)i--;if(!timestampedPoint)return{x:0,y:0};var time=(lastPoint.timestamp-timestampedPoint.timestamp)/1e3;if(0===time)return{x:0,y:0};var currentVelocity={x:(lastPoint.x-timestampedPoint.x)/time,y:(lastPoint.y-timestampedPoint.y)/time};return currentVelocity.x===1/0&&(currentVelocity.x=0),currentVelocity.y===1/0&&(currentVelocity.y=0),currentVelocity}function calcLength(axis){return axis.max-axis.min}function isNear(value,target,maxDistance){return void 0===target&&(target=0),void 0===maxDistance&&(maxDistance=.01),distance(value,target)<maxDistance}function calcAxisDelta(delta,source,target,origin){void 0===origin&&(origin=.5),delta.origin=origin,delta.originPoint=mix(source.min,source.max,delta.origin),delta.scale=calcLength(target)/calcLength(source),(isNear(delta.scale,1,1e-4)||isNaN(delta.scale))&&(delta.scale=1),delta.translate=mix(target.min,target.max,delta.origin)-delta.originPoint,(isNear(delta.translate)||isNaN(delta.translate))&&(delta.translate=0)}function calcBoxDelta(delta,source,target,origin){calcAxisDelta(delta.x,source.x,target.x,null==origin?void 0:origin.originX),calcAxisDelta(delta.y,source.y,target.y,null==origin?void 0:origin.originY)}function calcRelativeAxis(target,relative,parent){target.min=parent.min+relative.min,target.max=target.min+calcLength(relative)}function calcRelativeAxisPosition(target,layout,parent){target.min=layout.min-parent.min,target.max=target.min+calcLength(layout)}function calcRelativePosition(target,layout,parent){calcRelativeAxisPosition(target.x,layout.x,parent.x),calcRelativeAxisPosition(target.y,layout.y,parent.y)}function calcRelativeAxisConstraints(axis,min,max){return{min:void 0!==min?axis.min+min:void 0,max:void 0!==max?axis.max+max-(axis.max-axis.min):void 0}}function calcViewportAxisConstraints(layoutAxis,constraintsAxis){var _a,min=constraintsAxis.min-layoutAxis.min,max=constraintsAxis.max-layoutAxis.max;return constraintsAxis.max-constraintsAxis.min<layoutAxis.max-layoutAxis.min&&(min=(_a=(0,tslib_es6.zs)([max,min],2))[0],max=_a[1]),{min,max}}function resolveAxisElastic(dragElastic,minLabel,maxLabel){return{min:resolvePointElastic(dragElastic,minLabel),max:resolvePointElastic(dragElastic,maxLabel)}}function resolvePointElastic(dragElastic,label){var _a;return"number"==typeof dragElastic?dragElastic:null!==(_a=dragElastic[label])&&void 0!==_a?_a:0}var createDelta=function(){return{x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}}},createBox=function(){return{x:{min:0,max:0},y:{min:0,max:0}}};function eachAxis(callback){return[callback("x"),callback("y")]}function convertBoundingBoxToBox(_a){var top=_a.top;return{x:{min:_a.left,max:_a.right},y:{min:top,max:_a.bottom}}}function isIdentityScale(scale){return void 0===scale||1===scale}function hasScale(_a){var scale=_a.scale,scaleX=_a.scaleX,scaleY=_a.scaleY;return!isIdentityScale(scale)||!isIdentityScale(scaleX)||!isIdentityScale(scaleY)}function hasTransform(values){return hasScale(values)||hasTranslate(values.x)||hasTranslate(values.y)||values.z||values.rotate||values.rotateX||values.rotateY}function hasTranslate(value){return value&&"0%"!==value}function scalePoint(point,scale,originPoint){return originPoint+scale*(point-originPoint)}function applyPointDelta(point,translate,scale,originPoint,boxScale){return void 0!==boxScale&&(point=scalePoint(point,boxScale,originPoint)),scalePoint(point,scale,originPoint)+translate}function applyAxisDelta(axis,translate,scale,originPoint,boxScale){void 0===translate&&(translate=0),void 0===scale&&(scale=1),axis.min=applyPointDelta(axis.min,translate,scale,originPoint,boxScale),axis.max=applyPointDelta(axis.max,translate,scale,originPoint,boxScale)}function applyBoxDelta(box,_a){var x=_a.x,y=_a.y;applyAxisDelta(box.x,x.translate,x.scale,x.originPoint),applyAxisDelta(box.y,y.translate,y.scale,y.originPoint)}function translateAxis(axis,distance){axis.min=axis.min+distance,axis.max=axis.max+distance}function transformAxis(axis,transforms,_a){var _b=(0,tslib_es6.zs)(_a,3),key=_b[0],scaleKey=_b[1],originKey=_b[2],axisOrigin=void 0!==transforms[originKey]?transforms[originKey]:.5,originPoint=mix(axis.min,axis.max,axisOrigin);applyAxisDelta(axis,transforms[key],transforms[scaleKey],originPoint,transforms.scale)}var xKeys=["x","scaleX","originX"],yKeys=["y","scaleY","originY"];function transformBox(box,transform){transformAxis(box.x,transform,xKeys),transformAxis(box.y,transform,yKeys)}function measureViewportBox(instance,transformPoint){return convertBoundingBoxToBox(function transformBoxPoints(point,transformPoint){if(!transformPoint)return point;var topLeft=transformPoint({x:point.left,y:point.top}),bottomRight=transformPoint({x:point.right,y:point.bottom});return{top:topLeft.y,left:topLeft.x,bottom:bottomRight.y,right:bottomRight.x}}(instance.getBoundingClientRect(),transformPoint))}var elementDragControls=new WeakMap,VisualElementDragControls=function(){function VisualElementDragControls(visualElement){this.openGlobalLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=createBox(),this.visualElement=visualElement}return VisualElementDragControls.prototype.start=function(originEvent,_a){var _this=this,_c=(void 0===_a?{}:_a).snapToCursor,snapToCursor=void 0!==_c&&_c;if(!1!==this.visualElement.isPresent){this.panSession=new PanSession(originEvent,{onSessionStart:function(event){_this.stopAnimation(),snapToCursor&&_this.snapToCursor(extractEventInfo(event,"page").point)},onStart:function(event,info){var _a,_b=_this.getProps(),drag=_b.drag,dragPropagation=_b.dragPropagation,onDragStart=_b.onDragStart;(!drag||dragPropagation||(_this.openGlobalLock&&_this.openGlobalLock(),_this.openGlobalLock=getGlobalLock(drag),_this.openGlobalLock))&&(_this.isDragging=!0,_this.currentDirection=null,_this.resolveConstraints(),_this.visualElement.projection&&(_this.visualElement.projection.isAnimationBlocked=!0,_this.visualElement.projection.target=void 0),eachAxis((function(axis){var _a,_b,current=_this.getAxisMotionValue(axis).get()||0;if(percent.test(current)){var measuredAxis=null===(_b=null===(_a=_this.visualElement.projection)||void 0===_a?void 0:_a.layout)||void 0===_b?void 0:_b.actual[axis];if(measuredAxis)current=calcLength(measuredAxis)*(parseFloat(current)/100)}_this.originPoint[axis]=current})),null==onDragStart||onDragStart(event,info),null===(_a=_this.visualElement.animationState)||void 0===_a||_a.setActive(AnimationType.Drag,!0))},onMove:function(event,info){var _a=_this.getProps(),dragPropagation=_a.dragPropagation,dragDirectionLock=_a.dragDirectionLock,onDirectionLock=_a.onDirectionLock,onDrag=_a.onDrag;if(dragPropagation||_this.openGlobalLock){var offset=info.offset;if(dragDirectionLock&&null===_this.currentDirection)return _this.currentDirection=function getCurrentDirection(offset,lockThreshold){void 0===lockThreshold&&(lockThreshold=10);var direction=null;Math.abs(offset.y)>lockThreshold?direction="y":Math.abs(offset.x)>lockThreshold&&(direction="x");return direction}(offset),void(null!==_this.currentDirection&&(null==onDirectionLock||onDirectionLock(_this.currentDirection)));_this.updateAxis("x",info.point,offset),_this.updateAxis("y",info.point,offset),_this.visualElement.syncRender(),null==onDrag||onDrag(event,info)}},onSessionEnd:function(event,info){return _this.stop(event,info)}},{transformPagePoint:this.visualElement.getTransformPagePoint()})}},VisualElementDragControls.prototype.stop=function(event,info){var isDragging=this.isDragging;if(this.cancel(),isDragging){var velocity=info.velocity;this.startAnimation(velocity);var onDragEnd=this.getProps().onDragEnd;null==onDragEnd||onDragEnd(event,info)}},VisualElementDragControls.prototype.cancel=function(){var _a,_b;this.isDragging=!1,this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!1),null===(_a=this.panSession)||void 0===_a||_a.end(),this.panSession=void 0,!this.getProps().dragPropagation&&this.openGlobalLock&&(this.openGlobalLock(),this.openGlobalLock=null),null===(_b=this.visualElement.animationState)||void 0===_b||_b.setActive(AnimationType.Drag,!1)},VisualElementDragControls.prototype.updateAxis=function(axis,_point,offset){var drag=this.getProps().drag;if(offset&&shouldDrag(axis,drag,this.currentDirection)){var axisValue=this.getAxisMotionValue(axis),next=this.originPoint[axis]+offset[axis];this.constraints&&this.constraints[axis]&&(next=function applyConstraints(point,_a,elastic){var min=_a.min,max=_a.max;return void 0!==min&&point<min?point=elastic?mix(min,point,elastic.min):Math.max(point,min):void 0!==max&&point>max&&(point=elastic?mix(max,point,elastic.max):Math.min(point,max)),point}(next,this.constraints[axis],this.elastic[axis])),axisValue.set(next)}},VisualElementDragControls.prototype.resolveConstraints=function(){var _this=this,_a=this.getProps(),dragConstraints=_a.dragConstraints,dragElastic=_a.dragElastic,layout=(this.visualElement.projection||{}).layout,prevConstraints=this.constraints;dragConstraints&&isRefObject(dragConstraints)?this.constraints||(this.constraints=this.resolveRefConstraints()):this.constraints=!(!dragConstraints||!layout)&&function calcRelativeConstraints(layoutBox,_a){var top=_a.top,left=_a.left,bottom=_a.bottom,right=_a.right;return{x:calcRelativeAxisConstraints(layoutBox.x,left,right),y:calcRelativeAxisConstraints(layoutBox.y,top,bottom)}}(layout.actual,dragConstraints),this.elastic=function resolveDragElastic(dragElastic){return void 0===dragElastic&&(dragElastic=.35),!1===dragElastic?dragElastic=0:!0===dragElastic&&(dragElastic=.35),{x:resolveAxisElastic(dragElastic,"left","right"),y:resolveAxisElastic(dragElastic,"top","bottom")}}(dragElastic),prevConstraints!==this.constraints&&layout&&this.constraints&&!this.hasMutatedConstraints&&eachAxis((function(axis){_this.getAxisMotionValue(axis)&&(_this.constraints[axis]=function rebaseAxisConstraints(layout,constraints){var relativeConstraints={};return void 0!==constraints.min&&(relativeConstraints.min=constraints.min-layout.min),void 0!==constraints.max&&(relativeConstraints.max=constraints.max-layout.min),relativeConstraints}(layout.actual[axis],_this.constraints[axis]))}))},VisualElementDragControls.prototype.resolveRefConstraints=function(){var _a=this.getProps(),constraints=_a.dragConstraints,onMeasureDragConstraints=_a.onMeasureDragConstraints;if(!constraints||!isRefObject(constraints))return!1;var constraintsElement=constraints.current;invariant(null!==constraintsElement,"If `dragConstraints` is set as a React ref, that ref must be passed to another component's `ref` prop.");var projection=this.visualElement.projection;if(!projection||!projection.layout)return!1;var constraintsBox=function measurePageBox(element,rootProjectionNode,transformPagePoint){var viewportBox=measureViewportBox(element,transformPagePoint),scroll=rootProjectionNode.scroll;return scroll&&(translateAxis(viewportBox.x,scroll.x),translateAxis(viewportBox.y,scroll.y)),viewportBox}(constraintsElement,projection.root,this.visualElement.getTransformPagePoint()),measuredConstraints=function calcViewportConstraints(layoutBox,constraintsBox){return{x:calcViewportAxisConstraints(layoutBox.x,constraintsBox.x),y:calcViewportAxisConstraints(layoutBox.y,constraintsBox.y)}}(projection.layout.actual,constraintsBox);if(onMeasureDragConstraints){var userConstraints=onMeasureDragConstraints(function convertBoxToBoundingBox(_a){var x=_a.x,y=_a.y;return{top:y.min,right:x.max,bottom:y.max,left:x.min}}(measuredConstraints));this.hasMutatedConstraints=!!userConstraints,userConstraints&&(measuredConstraints=convertBoundingBoxToBox(userConstraints))}return measuredConstraints},VisualElementDragControls.prototype.startAnimation=function(velocity){var _this=this,_a=this.getProps(),drag=_a.drag,dragMomentum=_a.dragMomentum,dragElastic=_a.dragElastic,dragTransition=_a.dragTransition,dragSnapToOrigin=_a.dragSnapToOrigin,onDragTransitionEnd=_a.onDragTransitionEnd,constraints=this.constraints||{},momentumAnimations=eachAxis((function(axis){var _a;if(shouldDrag(axis,drag,_this.currentDirection)){var transition=null!==(_a=null==constraints?void 0:constraints[axis])&&void 0!==_a?_a:{};dragSnapToOrigin&&(transition={min:0,max:0});var bounceStiffness=dragElastic?200:1e6,bounceDamping=dragElastic?40:1e7,inertia=(0,tslib_es6.Cl)((0,tslib_es6.Cl)({type:"inertia",velocity:dragMomentum?velocity[axis]:0,bounceStiffness,bounceDamping,timeConstant:750,restDelta:1,restSpeed:10},dragTransition),transition);return _this.startAxisValueAnimation(axis,inertia)}}));return Promise.all(momentumAnimations).then(onDragTransitionEnd)},VisualElementDragControls.prototype.startAxisValueAnimation=function(axis,transition){return startAnimation(axis,this.getAxisMotionValue(axis),0,transition)},VisualElementDragControls.prototype.stopAnimation=function(){var _this=this;eachAxis((function(axis){return _this.getAxisMotionValue(axis).stop()}))},VisualElementDragControls.prototype.getAxisMotionValue=function(axis){var _a,_b,dragKey="_drag"+axis.toUpperCase(),externalMotionValue=this.visualElement.getProps()[dragKey];return externalMotionValue||this.visualElement.getValue(axis,null!==(_b=null===(_a=this.visualElement.getProps().initial)||void 0===_a?void 0:_a[axis])&&void 0!==_b?_b:0)},VisualElementDragControls.prototype.snapToCursor=function(point){var _this=this;eachAxis((function(axis){if(shouldDrag(axis,_this.getProps().drag,_this.currentDirection)){var projection=_this.visualElement.projection,axisValue=_this.getAxisMotionValue(axis);if(projection&&projection.layout){var _a=projection.layout.actual[axis],min=_a.min,max=_a.max;axisValue.set(point[axis]-mix(min,max,.5))}}}))},VisualElementDragControls.prototype.scalePositionWithinConstraints=function(){var _a,_this=this,_b=this.getProps(),drag=_b.drag,dragConstraints=_b.dragConstraints,projection=this.visualElement.projection;if(isRefObject(dragConstraints)&&projection&&this.constraints){this.stopAnimation();var boxProgress={x:0,y:0};eachAxis((function(axis){var axisValue=_this.getAxisMotionValue(axis);if(axisValue){var latest=axisValue.get();boxProgress[axis]=function constraints_calcOrigin(source,target){var origin=.5,sourceLength=calcLength(source),targetLength=calcLength(target);return targetLength>sourceLength?origin=progress(target.min,target.max-sourceLength,source.min):sourceLength>targetLength&&(origin=progress(source.min,source.max-targetLength,target.min)),clamp_clamp(0,1,origin)}({min:latest,max:latest},_this.constraints[axis])}}));var transformTemplate=this.visualElement.getProps().transformTemplate;this.visualElement.getInstance().style.transform=transformTemplate?transformTemplate({},""):"none",null===(_a=projection.root)||void 0===_a||_a.updateScroll(),projection.updateLayout(),this.resolveConstraints(),eachAxis((function(axis){if(shouldDrag(axis,drag,null)){var axisValue=_this.getAxisMotionValue(axis),_a=_this.constraints[axis],min=_a.min,max=_a.max;axisValue.set(mix(min,max,boxProgress[axis]))}}))}},VisualElementDragControls.prototype.addListeners=function(){var _a,_this=this;elementDragControls.set(this.visualElement,this);var stopPointerListener=addPointerEvent(this.visualElement.getInstance(),"pointerdown",(function(event){var _a=_this.getProps(),drag=_a.drag,_b=_a.dragListener;drag&&(void 0===_b||_b)&&_this.start(event)})),measureDragConstraints=function(){isRefObject(_this.getProps().dragConstraints)&&(_this.constraints=_this.resolveRefConstraints())},projection=this.visualElement.projection,stopMeasureLayoutListener=projection.addEventListener("measure",measureDragConstraints);projection&&!projection.layout&&(null===(_a=projection.root)||void 0===_a||_a.updateScroll(),projection.updateLayout()),measureDragConstraints();var stopResizeListener=addDomEvent(window,"resize",(function(){return _this.scalePositionWithinConstraints()}));return projection.addEventListener("didUpdate",(function(_a){var delta=_a.delta,hasLayoutChanged=_a.hasLayoutChanged;_this.isDragging&&hasLayoutChanged&&(eachAxis((function(axis){var motionValue=_this.getAxisMotionValue(axis);motionValue&&(_this.originPoint[axis]+=delta[axis].translate,motionValue.set(motionValue.get()+delta[axis].translate))})),_this.visualElement.syncRender())})),function(){stopResizeListener(),stopPointerListener(),stopMeasureLayoutListener()}},VisualElementDragControls.prototype.getProps=function(){var props=this.visualElement.getProps(),_a=props.drag,drag=void 0!==_a&&_a,_b=props.dragDirectionLock,dragDirectionLock=void 0!==_b&&_b,_c=props.dragPropagation,dragPropagation=void 0!==_c&&_c,_d=props.dragConstraints,dragConstraints=void 0!==_d&&_d,_e=props.dragElastic,dragElastic=void 0===_e?.35:_e,_f=props.dragMomentum,dragMomentum=void 0===_f||_f;return(0,tslib_es6.Cl)((0,tslib_es6.Cl)({},props),{drag,dragDirectionLock,dragPropagation,dragConstraints,dragElastic,dragMomentum})},VisualElementDragControls}();function shouldDrag(direction,drag,currentDirection){return!(!0!==drag&&drag!==direction||null!==currentDirection&¤tDirection!==direction)}var drag={pan:makeRenderlessComponent((function usePanGesture(_a){var onPan=_a.onPan,onPanStart=_a.onPanStart,onPanEnd=_a.onPanEnd,onPanSessionStart=_a.onPanSessionStart,visualElement=_a.visualElement,hasPanEvents=onPan||onPanStart||onPanEnd||onPanSessionStart,panSession=(0,react.useRef)(null),transformPagePoint=(0,react.useContext)(MotionConfigContext.Q).transformPagePoint,handlers={onSessionStart:onPanSessionStart,onStart:onPanStart,onMove:onPan,onEnd:function(event,info){panSession.current=null,onPanEnd&&onPanEnd(event,info)}};(0,react.useEffect)((function(){null!==panSession.current&&panSession.current.updateHandlers(handlers)})),usePointerEvent(visualElement,"pointerdown",hasPanEvents&&function onPointerDown(event){panSession.current=new PanSession(event,handlers,{transformPagePoint})}),(0,use_unmount_effect.l)((function(){return panSession.current&&panSession.current.end()}))})),drag:makeRenderlessComponent((function useDrag(props){var groupDragControls=props.dragControls,visualElement=props.visualElement,dragControls=(0,use_constant.M)((function(){return new VisualElementDragControls(visualElement)}));(0,react.useEffect)((function(){return groupDragControls&&groupDragControls.subscribe(dragControls)}),[dragControls,groupDragControls]),(0,react.useEffect)((function(){return dragControls.addListeners()}),[dragControls])}))},names=["LayoutMeasure","BeforeLayoutMeasure","LayoutUpdate","ViewportBoxUpdate","Update","Render","AnimationComplete","LayoutAnimationComplete","AnimationStart","LayoutAnimationStart","SetAxisTarget","Unmount"];var visualElement=function(_a){var _b=_a.treeType,treeType=void 0===_b?"":_b,build=_a.build,getBaseTarget=_a.getBaseTarget,makeTargetAnimatable=_a.makeTargetAnimatable,measureViewportBox=_a.measureViewportBox,renderInstance=_a.render,readValueFromInstance=_a.readValueFromInstance,removeValueFromRenderState=_a.removeValueFromRenderState,sortNodePosition=_a.sortNodePosition,scrapeMotionValuesFromProps=_a.scrapeMotionValuesFromProps;return function(_a,options){var parent=_a.parent,props=_a.props,presenceId=_a.presenceId,blockInitialAnimation=_a.blockInitialAnimation,visualState=_a.visualState,shouldReduceMotion=_a.shouldReduceMotion;void 0===options&&(options={});var instance,removeFromVariantTree,isMounted=!1,latestValues=visualState.latestValues,renderState=visualState.renderState,lifecycles=function createLifecycles(){var managers=names.map((function(){return new SubscriptionManager})),propSubscriptions={},lifecycles={clearAllListeners:function(){return managers.forEach((function(manager){return manager.clear()}))},updatePropListeners:function(props){names.forEach((function(name){var _a,on="on"+name,propListener=props[on];null===(_a=propSubscriptions[name])||void 0===_a||_a.call(propSubscriptions),propListener&&(propSubscriptions[name]=lifecycles[on](propListener))}))}};return managers.forEach((function(manager,i){lifecycles["on"+names[i]]=function(handler){return manager.add(handler)},lifecycles["notify"+names[i]]=function(){for(var args=[],_i=0;_i<arguments.length;_i++)args[_i]=arguments[_i];return manager.notify.apply(manager,(0,tslib_es6.fX)([],(0,tslib_es6.zs)(args),!1))}})),lifecycles}(),values=new Map,valueSubscriptions=new Map,prevMotionValues={},baseTarget=(0,tslib_es6.Cl)({},latestValues);function render(){instance&&isMounted&&(triggerBuild(),renderInstance(instance,renderState,props.style,element.projection))}function triggerBuild(){build(element,renderState,latestValues,options,props)}function update(){lifecycles.notifyUpdate(latestValues)}function bindToMotionValue(key,value){var removeOnChange=value.onChange((function(latestValue){latestValues[key]=latestValue,props.onUpdate&&es.Ay.update(update,!1,!0)})),removeOnRenderRequest=value.onRenderRequest(element.scheduleRender);valueSubscriptions.set(key,(function(){removeOnChange(),removeOnRenderRequest()}))}var initialMotionValues=scrapeMotionValuesFromProps(props);for(var key in initialMotionValues){var value=initialMotionValues[key];void 0!==latestValues[key]&&isMotionValue(value)&&value.set(latestValues[key],!1)}var isControllingVariants=checkIfControllingVariants(props),isVariantNode=checkIfVariantNode(props),element=(0,tslib_es6.Cl)((0,tslib_es6.Cl)({treeType,current:null,depth:parent?parent.depth+1:0,parent,children:new Set,presenceId,shouldReduceMotion,variantChildren:isVariantNode?new Set:void 0,isVisible:void 0,manuallyAnimateOnMount:Boolean(null==parent?void 0:parent.isMounted()),blockInitialAnimation,isMounted:function(){return Boolean(instance)},mount:function(newInstance){isMounted=!0,instance=element.current=newInstance,element.projection&&element.projection.mount(newInstance),isVariantNode&&parent&&!isControllingVariants&&(removeFromVariantTree=null==parent?void 0:parent.addVariantChild(element)),values.forEach((function(value,key){return bindToMotionValue(key,value)})),null==parent||parent.children.add(element),element.setProps(props)},unmount:function(){var _a;null===(_a=element.projection)||void 0===_a||_a.unmount(),es.eO.update(update),es.eO.render(render),valueSubscriptions.forEach((function(remove){return remove()})),null==removeFromVariantTree||removeFromVariantTree(),null==parent||parent.children.delete(element),lifecycles.clearAllListeners(),instance=void 0,isMounted=!1},addVariantChild:function(child){var _a,closestVariantNode=element.getClosestVariantNode();if(closestVariantNode)return null===(_a=closestVariantNode.variantChildren)||void 0===_a||_a.add(child),function(){return closestVariantNode.variantChildren.delete(child)}},sortNodePosition:function(other){return sortNodePosition&&treeType===other.treeType?sortNodePosition(element.getInstance(),other.getInstance()):0},getClosestVariantNode:function(){return isVariantNode?element:null==parent?void 0:parent.getClosestVariantNode()},getLayoutId:function(){return props.layoutId},getInstance:function(){return instance},getStaticValue:function(key){return latestValues[key]},setStaticValue:function(key,value){return latestValues[key]=value},getLatestValues:function(){return latestValues},setVisibility:function(visibility){element.isVisible!==visibility&&(element.isVisible=visibility,element.scheduleRender())},makeTargetAnimatable:function(target,canMutate){return void 0===canMutate&&(canMutate=!0),makeTargetAnimatable(element,target,props,canMutate)},measureViewportBox:function(){return measureViewportBox(instance,props)},addValue:function(key,value){element.hasValue(key)&&element.removeValue(key),values.set(key,value),latestValues[key]=value.get(),bindToMotionValue(key,value)},removeValue:function(key){var _a;values.delete(key),null===(_a=valueSubscriptions.get(key))||void 0===_a||_a(),valueSubscriptions.delete(key),delete latestValues[key],removeValueFromRenderState(key,renderState)},hasValue:function(key){return values.has(key)},getValue:function(key,defaultValue){var value=values.get(key);return void 0===value&&void 0!==defaultValue&&(value=motionValue(defaultValue),element.addValue(key,value)),value},forEachValue:function(callback){return values.forEach(callback)},readValue:function(key){var _a;return null!==(_a=latestValues[key])&&void 0!==_a?_a:readValueFromInstance(instance,key,options)},setBaseTarget:function(key,value){baseTarget[key]=value},getBaseTarget:function(key){if(getBaseTarget){var target=getBaseTarget(props,key);if(void 0!==target&&!isMotionValue(target))return target}return baseTarget[key]}},lifecycles),{build:function(){return triggerBuild(),renderState},scheduleRender:function(){es.Ay.render(render,!1,!0)},syncRender:render,setProps:function(newProps){(newProps.transformTemplate||props.transformTemplate)&&element.scheduleRender(),props=newProps,lifecycles.updatePropListeners(newProps),prevMotionValues=function updateMotionValuesFromProps(element,next,prev){var _a;for(var key in next){var nextValue=next[key],prevValue=prev[key];if(isMotionValue(nextValue))element.addValue(key,nextValue);else if(isMotionValue(prevValue))element.addValue(key,motionValue(nextValue));else if(prevValue!==nextValue)if(element.hasValue(key)){var existingValue=element.getValue(key);!existingValue.hasAnimated&&existingValue.set(nextValue)}else element.addValue(key,motionValue(null!==(_a=element.getStaticValue(key))&&void 0!==_a?_a:nextValue))}for(var key in prev)void 0===next[key]&&element.removeValue(key);return next}(element,scrapeMotionValuesFromProps(props),prevMotionValues)},getProps:function(){return props},getVariant:function(name){var _a;return null===(_a=props.variants)||void 0===_a?void 0:_a[name]},getDefaultTransition:function(){return props.transition},getTransformPagePoint:function(){return props.transformPagePoint},getVariantContext:function(startAtParent){if(void 0===startAtParent&&(startAtParent=!1),startAtParent)return null==parent?void 0:parent.getVariantContext();if(!isControllingVariants){var context_1=(null==parent?void 0:parent.getVariantContext())||{};return void 0!==props.initial&&(context_1.initial=props.initial),context_1}for(var context={},i=0;i<numVariantProps;i++){var name_1=variantProps[i],prop=props[name_1];(isVariantLabel(prop)||!1===prop)&&(context[name_1]=prop)}return context}});return element}},variantProps=(0,tslib_es6.fX)(["initial"],(0,tslib_es6.zs)(variantPriorityOrder),!1),numVariantProps=variantProps.length;function css_variables_conversion_isCSSVariable(value){return"string"==typeof value&&value.startsWith("var(--")}var cssVariableRegex=/var\((--[a-zA-Z0-9-_]+),? ?([a-zA-Z0-9 ()%#.,-]+)?\)/;var maxDepth=4;function getVariableValue(current,element,depth){void 0===depth&&(depth=1),invariant(depth<=maxDepth,'Max CSS variable fallback depth detected in property "'.concat(current,'". This may indicate a circular fallback dependency.'));var _a=(0,tslib_es6.zs)(function parseCSSVariable(current){var match=cssVariableRegex.exec(current);if(!match)return[,];var _a=(0,tslib_es6.zs)(match,3);return[_a[1],_a[2]]}(current),2),token=_a[0],fallback=_a[1];if(token){var resolved=window.getComputedStyle(element).getPropertyValue(token);return resolved?resolved.trim():css_variables_conversion_isCSSVariable(fallback)?getVariableValue(fallback,element,depth+1):fallback}}var BoundingBoxDimension,positionalKeys=new Set(["width","height","top","left","right","bottom","x","y"]),isPositionalKey=function(key){return positionalKeys.has(key)},setAndResetVelocity=function(value,to){value.set(to,!1),value.set(to)},isNumOrPxType=function(v){return v===number||v===px};!function(BoundingBoxDimension){BoundingBoxDimension.width="width",BoundingBoxDimension.height="height",BoundingBoxDimension.left="left",BoundingBoxDimension.right="right",BoundingBoxDimension.top="top",BoundingBoxDimension.bottom="bottom"}(BoundingBoxDimension||(BoundingBoxDimension={}));var getPosFromMatrix=function(matrix,pos){return parseFloat(matrix.split(", ")[pos])},getTranslateFromMatrix=function(pos2,pos3){return function(_bbox,_a){var transform=_a.transform;if("none"===transform||!transform)return 0;var matrix3d=transform.match(/^matrix3d\((.+)\)$/);if(matrix3d)return getPosFromMatrix(matrix3d[1],pos3);var matrix=transform.match(/^matrix\((.+)\)$/);return matrix?getPosFromMatrix(matrix[1],pos2):0}},transformKeys=new Set(["x","y","z"]),nonTranslationalTransformKeys=transformProps.filter((function(key){return!transformKeys.has(key)}));var positionalValues={width:function(_a,_b){var x=_a.x,_c=_b.paddingLeft,paddingLeft=void 0===_c?"0":_c,_d=_b.paddingRight,paddingRight=void 0===_d?"0":_d;return x.max-x.min-parseFloat(paddingLeft)-parseFloat(paddingRight)},height:function(_a,_b){var y=_a.y,_c=_b.paddingTop,paddingTop=void 0===_c?"0":_c,_d=_b.paddingBottom,paddingBottom=void 0===_d?"0":_d;return y.max-y.min-parseFloat(paddingTop)-parseFloat(paddingBottom)},top:function(_bbox,_a){var top=_a.top;return parseFloat(top)},left:function(_bbox,_a){var left=_a.left;return parseFloat(left)},bottom:function(_a,_b){var y=_a.y,top=_b.top;return parseFloat(top)+(y.max-y.min)},right:function(_a,_b){var x=_a.x,left=_b.left;return parseFloat(left)+(x.max-x.min)},x:getTranslateFromMatrix(4,13),y:getTranslateFromMatrix(5,14)},checkAndConvertChangedValueTypes=function(visualElement,target,origin,transitionEnd){void 0===origin&&(origin={}),void 0===transitionEnd&&(transitionEnd={}),target=(0,tslib_es6.Cl)({},target),transitionEnd=(0,tslib_es6.Cl)({},transitionEnd);var targetPositionalKeys=Object.keys(target).filter(isPositionalKey),removedTransformValues=[],hasAttemptedToRemoveTransformValues=!1,changedValueTypeKeys=[];if(targetPositionalKeys.forEach((function(key){var value=visualElement.getValue(key);if(visualElement.hasValue(key)){var toType,from=origin[key],fromType=findDimensionValueType(from),to=target[key];if(isKeyframesTarget(to)){var numKeyframes=to.length,fromIndex=null===to[0]?1:0;from=to[fromIndex],fromType=findDimensionValueType(from);for(var i=fromIndex;i<numKeyframes;i++)toType?invariant(findDimensionValueType(to[i])===toType,"All keyframes must be of the same type"):(toType=findDimensionValueType(to[i]),invariant(toType===fromType||isNumOrPxType(fromType)&&isNumOrPxType(toType),"Keyframes must be of the same dimension as the current value"))}else toType=findDimensionValueType(to);if(fromType!==toType)if(isNumOrPxType(fromType)&&isNumOrPxType(toType)){var current=value.get();"string"==typeof current&&value.set(parseFloat(current)),"string"==typeof to?target[key]=parseFloat(to):Array.isArray(to)&&toType===px&&(target[key]=to.map(parseFloat))}else(null==fromType?void 0:fromType.transform)&&(null==toType?void 0:toType.transform)&&(0===from||0===to)?0===from?value.set(toType.transform(from)):target[key]=fromType.transform(to):(hasAttemptedToRemoveTransformValues||(removedTransformValues=function removeNonTranslationalTransform(visualElement){var removedTransforms=[];return nonTranslationalTransformKeys.forEach((function(key){var value=visualElement.getValue(key);void 0!==value&&(removedTransforms.push([key,value.get()]),value.set(key.startsWith("scale")?1:0))})),removedTransforms.length&&visualElement.syncRender(),removedTransforms}(visualElement),hasAttemptedToRemoveTransformValues=!0),changedValueTypeKeys.push(key),transitionEnd[key]=void 0!==transitionEnd[key]?transitionEnd[key]:target[key],setAndResetVelocity(value,to))}})),changedValueTypeKeys.length){var scrollY_1=changedValueTypeKeys.indexOf("height")>=0?window.pageYOffset:null,convertedTarget=function(target,visualElement,changedKeys){var originBbox=visualElement.measureViewportBox(),element=visualElement.getInstance(),elementComputedStyle=getComputedStyle(element),display=elementComputedStyle.display,origin={};"none"===display&&visualElement.setStaticValue("display",target.display||"block"),changedKeys.forEach((function(key){origin[key]=positionalValues[key](originBbox,elementComputedStyle)})),visualElement.syncRender();var targetBbox=visualElement.measureViewportBox();return changedKeys.forEach((function(key){var value=visualElement.getValue(key);setAndResetVelocity(value,origin[key]),target[key]=positionalValues[key](targetBbox,elementComputedStyle)})),target}(target,visualElement,changedValueTypeKeys);return removedTransformValues.length&&removedTransformValues.forEach((function(_a){var _b=(0,tslib_es6.zs)(_a,2),key=_b[0],value=_b[1];visualElement.getValue(key).set(value)})),visualElement.syncRender(),null!==scrollY_1&&window.scrollTo({top:scrollY_1}),{target:convertedTarget,transitionEnd}}return{target,transitionEnd}};function unitConversion(visualElement,target,origin,transitionEnd){return function(target){return Object.keys(target).some(isPositionalKey)}(target)?checkAndConvertChangedValueTypes(visualElement,target,origin,transitionEnd):{target,transitionEnd}}var parseDomVariant=function(visualElement,target,origin,transitionEnd){var resolved=function resolveCSSVariables(visualElement,_a,transitionEnd){var _b,target=(0,tslib_es6.Tt)(_a,[]),element=visualElement.getInstance();if(!(element instanceof Element))return{target,transitionEnd};for(var key in transitionEnd&&(transitionEnd=(0,tslib_es6.Cl)({},transitionEnd)),visualElement.forEachValue((function(value){var current=value.get();if(css_variables_conversion_isCSSVariable(current)){var resolved=getVariableValue(current,element);resolved&&value.set(resolved)}})),target){var current=target[key];if(css_variables_conversion_isCSSVariable(current)){var resolved=getVariableValue(current,element);resolved&&(target[key]=resolved,transitionEnd&&(null!==(_b=transitionEnd[key])&&void 0!==_b||(transitionEnd[key]=current)))}}return{target,transitionEnd}}(visualElement,target,transitionEnd);return unitConversion(visualElement,target=resolved.target,origin,transitionEnd=resolved.transitionEnd)};var htmlConfig={treeType:"dom",readValueFromInstance:function(domElement,key){if(isTransformProp(key)){var defaultType=getDefaultValueType(key);return defaultType&&defaultType.default||0}var computedStyle=function visual_element_getComputedStyle(element){return window.getComputedStyle(element)}(domElement);return(isCSSVariable(key)?computedStyle.getPropertyValue(key):computedStyle[key])||0},sortNodePosition:function(a,b){return 2&a.compareDocumentPosition(b)?1:-1},getBaseTarget:function(props,key){var _a;return null===(_a=props.style)||void 0===_a?void 0:_a[key]},measureViewportBox:function(element,_a){return measureViewportBox(element,_a.transformPagePoint)},resetTransform:function(element,domElement,props){var transformTemplate=props.transformTemplate;domElement.style.transform=transformTemplate?transformTemplate({},""):"none",element.scheduleRender()},restoreTransform:function(instance,mutableState){instance.style.transform=mutableState.style.transform},removeValueFromRenderState:function(key,_a){var vars=_a.vars,style=_a.style;delete vars[key],delete style[key]},makeTargetAnimatable:function(element,_a,_b,isMounted){var transformValues=_b.transformValues;void 0===isMounted&&(isMounted=!0);var transition=_a.transition,transitionEnd=_a.transitionEnd,target=(0,tslib_es6.Tt)(_a,["transition","transitionEnd"]),origin=function getOrigin(target,transition,visualElement){var _a,_b,origin={};for(var key in target)origin[key]=null!==(_a=getOriginFromTransition(key,transition))&&void 0!==_a?_a:null===(_b=visualElement.getValue(key))||void 0===_b?void 0:_b.get();return origin}(target,transition||{},element);if(transformValues&&(transitionEnd&&(transitionEnd=transformValues(transitionEnd)),target&&(target=transformValues(target)),origin&&(origin=transformValues(origin))),isMounted){!function checkTargetForNewValues(visualElement,target,origin){var _a,_b,_c,_d,newValueKeys=Object.keys(target).filter((function(key){return!visualElement.hasValue(key)})),numNewValues=newValueKeys.length;if(numNewValues)for(var i=0;i<numNewValues;i++){var key=newValueKeys[i],targetValue=target[key],value=null;Array.isArray(targetValue)&&(value=targetValue[0]),null===value&&(value=null!==(_b=null!==(_a=origin[key])&&void 0!==_a?_a:visualElement.readValue(key))&&void 0!==_b?_b:target[key]),null!=value&&("string"==typeof value&&(/^\-?\d*\.?\d+$/.test(value)||isZeroValueString(value))?value=parseFloat(value):!findValueType(value)&&complex.test(targetValue)&&(value=animatable_none_getAnimatableNone(key,targetValue)),visualElement.addValue(key,motionValue(value)),null!==(_c=(_d=origin)[key])&&void 0!==_c||(_d[key]=value),visualElement.setBaseTarget(key,value))}}(element,target,origin);var parsed=parseDomVariant(element,target,origin,transitionEnd);transitionEnd=parsed.transitionEnd,target=parsed.target}return(0,tslib_es6.Cl)({transition,transitionEnd},target)},scrapeMotionValuesFromProps,build:function(element,renderState,latestValues,options,props){void 0!==element.isVisible&&(renderState.style.visibility=element.isVisible?"visible":"hidden"),buildHTMLStyles(renderState,latestValues,options,props.transformTemplate)},render:renderHTML},htmlVisualElement=visualElement(htmlConfig),svgVisualElement=visualElement((0,tslib_es6.Cl)((0,tslib_es6.Cl)({},htmlConfig),{getBaseTarget:function(props,key){return props[key]},readValueFromInstance:function(domElement,key){var _a;return isTransformProp(key)?(null===(_a=getDefaultValueType(key))||void 0===_a?void 0:_a.default)||0:(key=camelCaseAttributes.has(key)?key:camelToDash(key),domElement.getAttribute(key))},scrapeMotionValuesFromProps:scrape_motion_values_scrapeMotionValuesFromProps,build:function(_element,renderState,latestValues,options,props){buildSVGAttrs(renderState,latestValues,options,props.transformTemplate)},render:renderSVG})),create_visual_element_createDomVisualElement=function(Component,options){return isSVGComponent(Component)?svgVisualElement(options,{enableHardwareAcceleration:!1}):htmlVisualElement(options,{enableHardwareAcceleration:!0})};function pixelsToPercent(pixels,axis){return axis.max===axis.min?0:pixels/(axis.max-axis.min)*100}var correctBorderRadius={correct:function(latest,node){if(!node.target)return latest;if("string"==typeof latest){if(!px.test(latest))return latest;latest=parseFloat(latest)}var x=pixelsToPercent(latest,node.target.x),y=pixelsToPercent(latest,node.target.y);return"".concat(x,"% ").concat(y,"%")}},correctBoxShadow={correct:function(latest,_a){var treeScale=_a.treeScale,projectionDelta=_a.projectionDelta,original=latest,containsCSSVariables=latest.includes("var("),cssVariables=[];containsCSSVariables&&(latest=latest.replace(cssVariableRegex,(function(match){return cssVariables.push(match),"_$css"})));var shadow=complex.parse(latest);if(shadow.length>5)return original;var template=complex.createTransformer(latest),offset="number"!=typeof shadow[0]?1:0,xScale=projectionDelta.x.scale*treeScale.x,yScale=projectionDelta.y.scale*treeScale.y;shadow[0+offset]/=xScale,shadow[1+offset]/=yScale;var averageScale=mix(xScale,yScale,.5);"number"==typeof shadow[2+offset]&&(shadow[2+offset]/=averageScale),"number"==typeof shadow[3+offset]&&(shadow[3+offset]/=averageScale);var output=template(shadow);if(containsCSSVariables){var i_1=0;output=output.replace("_$css",(function(){var cssVariable=cssVariables[i_1];return i_1++,cssVariable}))}return output}},MeasureLayoutWithContext=function(_super){function MeasureLayoutWithContext(){return null!==_super&&_super.apply(this,arguments)||this}return(0,tslib_es6.C6)(MeasureLayoutWithContext,_super),MeasureLayoutWithContext.prototype.componentDidMount=function(){var _this=this,_a=this.props,visualElement=_a.visualElement,layoutGroup=_a.layoutGroup,switchLayoutGroup=_a.switchLayoutGroup,layoutId=_a.layoutId,projection=visualElement.projection;!function addScaleCorrector(correctors){Object.assign(scaleCorrectors,correctors)}(defaultScaleCorrectors),projection&&((null==layoutGroup?void 0:layoutGroup.group)&&layoutGroup.group.add(projection),(null==switchLayoutGroup?void 0:switchLayoutGroup.register)&&layoutId&&switchLayoutGroup.register(projection),projection.root.didUpdate(),projection.addEventListener("animationComplete",(function(){_this.safeToRemove()})),projection.setOptions((0,tslib_es6.Cl)((0,tslib_es6.Cl)({},projection.options),{onExitComplete:function(){return _this.safeToRemove()}}))),globalProjectionState.hasEverUpdated=!0},MeasureLayoutWithContext.prototype.getSnapshotBeforeUpdate=function(prevProps){var _this=this,_a=this.props,layoutDependency=_a.layoutDependency,visualElement=_a.visualElement,drag=_a.drag,isPresent=_a.isPresent,projection=visualElement.projection;return projection?(projection.isPresent=isPresent,drag||prevProps.layoutDependency!==layoutDependency||void 0===layoutDependency?projection.willUpdate():this.safeToRemove(),prevProps.isPresent!==isPresent&&(isPresent?projection.promote():projection.relegate()||es.Ay.postRender((function(){var _a;(null===(_a=projection.getStack())||void 0===_a?void 0:_a.members.length)||_this.safeToRemove()}))),null):null},MeasureLayoutWithContext.prototype.componentDidUpdate=function(){var projection=this.props.visualElement.projection;projection&&(projection.root.didUpdate(),!projection.currentAnimation&&projection.isLead()&&this.safeToRemove())},MeasureLayoutWithContext.prototype.componentWillUnmount=function(){var _a=this.props,visualElement=_a.visualElement,layoutGroup=_a.layoutGroup,promoteContext=_a.switchLayoutGroup,projection=visualElement.projection;projection&&(projection.scheduleCheckAfterUnmount(),(null==layoutGroup?void 0:layoutGroup.group)&&layoutGroup.group.remove(projection),(null==promoteContext?void 0:promoteContext.deregister)&&promoteContext.deregister(projection))},MeasureLayoutWithContext.prototype.safeToRemove=function(){var safeToRemove=this.props.safeToRemove;null==safeToRemove||safeToRemove()},MeasureLayoutWithContext.prototype.render=function(){return null},MeasureLayoutWithContext}(react.Component);var defaultScaleCorrectors={borderRadius:(0,tslib_es6.Cl)((0,tslib_es6.Cl)({},correctBorderRadius),{applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]}),borderTopLeftRadius:correctBorderRadius,borderTopRightRadius:correctBorderRadius,borderBottomLeftRadius:correctBorderRadius,borderBottomRightRadius:correctBorderRadius,boxShadow:correctBoxShadow},layoutFeatures={measureLayout:function MeasureLayout(props){var _a=(0,tslib_es6.zs)(usePresence(),2),isPresent=_a[0],safeToRemove=_a[1],layoutGroup=(0,react.useContext)(LayoutGroupContext.L);return react.createElement(MeasureLayoutWithContext,(0,tslib_es6.Cl)({},props,{layoutGroup,switchLayoutGroup:(0,react.useContext)(SwitchLayoutGroupContext),isPresent,safeToRemove}))}};var borders=["TopLeft","TopRight","BottomLeft","BottomRight"],numBorders=borders.length,asNumber=function(value){return"string"==typeof value?parseFloat(value):value},isPx=function(value){return"number"==typeof value||px.test(value)};function getRadius(values,radiusName){var _a;return null!==(_a=values[radiusName])&&void 0!==_a?_a:values.borderRadius}var easeCrossfadeIn=compress(0,.5,circOut),easeCrossfadeOut=compress(.5,.95,linear);function compress(min,max,easing){return function(p){return p<min?0:p>max?1:easing(progress(min,max,p))}}function copyAxisInto(axis,originAxis){axis.min=originAxis.min,axis.max=originAxis.max}function copyBoxInto(box,originBox){copyAxisInto(box.x,originBox.x),copyAxisInto(box.y,originBox.y)}function removePointDelta(point,translate,scale,originPoint,boxScale){return point=scalePoint(point-=translate,1/scale,originPoint),void 0!==boxScale&&(point=scalePoint(point,1/boxScale,originPoint)),point}function removeAxisTransforms(axis,transforms,_a,origin,sourceAxis){var _b=(0,tslib_es6.zs)(_a,3),key=_b[0],scaleKey=_b[1],originKey=_b[2];!function removeAxisDelta(axis,translate,scale,origin,boxScale,originAxis,sourceAxis){if(void 0===translate&&(translate=0),void 0===scale&&(scale=1),void 0===origin&&(origin=.5),void 0===originAxis&&(originAxis=axis),void 0===sourceAxis&&(sourceAxis=axis),percent.test(translate)&&(translate=parseFloat(translate),translate=mix(sourceAxis.min,sourceAxis.max,translate/100)-sourceAxis.min),"number"==typeof translate){var originPoint=mix(originAxis.min,originAxis.max,origin);axis===originAxis&&(originPoint-=translate),axis.min=removePointDelta(axis.min,translate,scale,originPoint,boxScale),axis.max=removePointDelta(axis.max,translate,scale,originPoint,boxScale)}}(axis,transforms[key],transforms[scaleKey],transforms[originKey],transforms.scale,origin,sourceAxis)}var delta_remove_xKeys=["x","scaleX","originX"],delta_remove_yKeys=["y","scaleY","originY"];function removeBoxTransforms(box,transforms,originBox,sourceBox){removeAxisTransforms(box.x,transforms,delta_remove_xKeys,null==originBox?void 0:originBox.x,null==sourceBox?void 0:sourceBox.x),removeAxisTransforms(box.y,transforms,delta_remove_yKeys,null==originBox?void 0:originBox.y,null==sourceBox?void 0:sourceBox.y)}function isAxisDeltaZero(delta){return 0===delta.translate&&1===delta.scale}function isDeltaZero(delta){return isAxisDeltaZero(delta.x)&&isAxisDeltaZero(delta.y)}function boxEquals(a,b){return a.x.min===b.x.min&&a.x.max===b.x.max&&a.y.min===b.y.min&&a.y.max===b.y.max}var NodeStack=function(){function NodeStack(){this.members=[]}return NodeStack.prototype.add=function(node){addUniqueItem(this.members,node),node.scheduleRender()},NodeStack.prototype.remove=function(node){if(removeItem(this.members,node),node===this.prevLead&&(this.prevLead=void 0),node===this.lead){var prevLead=this.members[this.members.length-1];prevLead&&this.promote(prevLead)}},NodeStack.prototype.relegate=function(node){var prevLead,indexOfNode=this.members.findIndex((function(member){return node===member}));if(0===indexOfNode)return!1;for(var i=indexOfNode;i>=0;i--){var member=this.members[i];if(!1!==member.isPresent){prevLead=member;break}}return!!prevLead&&(this.promote(prevLead),!0)},NodeStack.prototype.promote=function(node,preserveFollowOpacity){var _a,prevLead=this.lead;node!==prevLead&&(this.prevLead=prevLead,this.lead=node,node.show(),prevLead&&(prevLead.instance&&prevLead.scheduleRender(),node.scheduleRender(),node.resumeFrom=prevLead,preserveFollowOpacity&&(node.resumeFrom.preserveOpacity=!0),prevLead.snapshot&&(node.snapshot=prevLead.snapshot,node.snapshot.latestValues=prevLead.animationValues||prevLead.latestValues,node.snapshot.isShared=!0),(null===(_a=node.root)||void 0===_a?void 0:_a.isUpdating)&&(node.isLayoutDirty=!0),!1===node.options.crossfade&&prevLead.hide()))},NodeStack.prototype.exitAnimationComplete=function(){this.members.forEach((function(node){var _a,_b,_c,_d,_e;null===(_b=(_a=node.options).onExitComplete)||void 0===_b||_b.call(_a),null===(_e=null===(_c=node.resumingFrom)||void 0===_c?void 0:(_d=_c.options).onExitComplete)||void 0===_e||_e.call(_d)}))},NodeStack.prototype.scheduleRender=function(){this.members.forEach((function(node){node.instance&&node.scheduleRender(!1)}))},NodeStack.prototype.removeLeadSnapshot=function(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)},NodeStack}(),identityProjection="translate3d(0px, 0px, 0) scale(1, 1) scale(1, 1)";function buildProjectionTransform(delta,treeScale,latestTransform){var xTranslate=delta.x.translate/treeScale.x,yTranslate=delta.y.translate/treeScale.y,transform="translate3d(".concat(xTranslate,"px, ").concat(yTranslate,"px, 0) ");if(transform+="scale(".concat(1/treeScale.x,", ").concat(1/treeScale.y,") "),latestTransform){var rotate=latestTransform.rotate,rotateX=latestTransform.rotateX,rotateY=latestTransform.rotateY;rotate&&(transform+="rotate(".concat(rotate,"deg) ")),rotateX&&(transform+="rotateX(".concat(rotateX,"deg) ")),rotateY&&(transform+="rotateY(".concat(rotateY,"deg) "))}var elementScaleX=delta.x.scale*treeScale.x,elementScaleY=delta.y.scale*treeScale.y;return(transform+="scale(".concat(elementScaleX,", ").concat(elementScaleY,")"))===identityProjection?"none":transform}var compareByDepth=function(a,b){return a.depth-b.depth},FlatTree=function(){function FlatTree(){this.children=[],this.isDirty=!1}return FlatTree.prototype.add=function(child){addUniqueItem(this.children,child),this.isDirty=!0},FlatTree.prototype.remove=function(child){removeItem(this.children,child),this.isDirty=!0},FlatTree.prototype.forEach=function(callback){this.isDirty&&this.children.sort(compareByDepth),this.isDirty=!1,this.children.forEach(callback)},FlatTree}();function createProjectionNode(_a){var attachResizeListener=_a.attachResizeListener,defaultParent=_a.defaultParent,measureScroll=_a.measureScroll,checkIsScrollRoot=_a.checkIsScrollRoot,resetTransform=_a.resetTransform;return function(){function ProjectionNode(id,latestValues,parent){var _this=this;void 0===latestValues&&(latestValues={}),void 0===parent&&(parent=null==defaultParent?void 0:defaultParent()),this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!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.potentialNodes=new Map,this.checkUpdateFailed=function(){_this.isUpdating&&(_this.isUpdating=!1,_this.clearAllSnapshots())},this.updateProjection=function(){_this.nodes.forEach(resolveTargetDelta),_this.nodes.forEach(calcProjection)},this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.id=id,this.latestValues=latestValues,this.root=parent?parent.root||parent:this,this.path=parent?(0,tslib_es6.fX)((0,tslib_es6.fX)([],(0,tslib_es6.zs)(parent.path),!1),[parent],!1):[],this.parent=parent,this.depth=parent?parent.depth+1:0,id&&this.root.registerPotentialNode(id,this);for(var i=0;i<this.path.length;i++)this.path[i].shouldResetTransform=!0;this.root===this&&(this.nodes=new FlatTree)}return ProjectionNode.prototype.addEventListener=function(name,handler){return this.eventHandlers.has(name)||this.eventHandlers.set(name,new SubscriptionManager),this.eventHandlers.get(name).add(handler)},ProjectionNode.prototype.notifyListeners=function(name){for(var args=[],_i=1;_i<arguments.length;_i++)args[_i-1]=arguments[_i];var subscriptionManager=this.eventHandlers.get(name);null==subscriptionManager||subscriptionManager.notify.apply(subscriptionManager,(0,tslib_es6.fX)([],(0,tslib_es6.zs)(args),!1))},ProjectionNode.prototype.hasListeners=function(name){return this.eventHandlers.has(name)},ProjectionNode.prototype.registerPotentialNode=function(id,node){this.potentialNodes.set(id,node)},ProjectionNode.prototype.mount=function(instance,isLayoutDirty){var _a,_this=this;if(void 0===isLayoutDirty&&(isLayoutDirty=!1),!this.instance){this.isSVG=instance instanceof SVGElement&&"svg"!==instance.tagName,this.instance=instance;var _b=this.options,layoutId=_b.layoutId,layout=_b.layout,visualElement=_b.visualElement;if(visualElement&&!visualElement.getInstance()&&visualElement.mount(instance),this.root.nodes.add(this),null===(_a=this.parent)||void 0===_a||_a.children.add(this),this.id&&this.root.potentialNodes.delete(this.id),isLayoutDirty&&(layout||layoutId)&&(this.isLayoutDirty=!0),attachResizeListener){var unblockTimeout_1,resizeUnblockUpdate_1=function(){return _this.root.updateBlockedByResize=!1};attachResizeListener(instance,(function(){_this.root.updateBlockedByResize=!0,clearTimeout(unblockTimeout_1),unblockTimeout_1=window.setTimeout(resizeUnblockUpdate_1,250),globalProjectionState.hasAnimatedSinceResize&&(globalProjectionState.hasAnimatedSinceResize=!1,_this.nodes.forEach(finishAnimation))}))}layoutId&&this.root.registerSharedNode(layoutId,this),!1!==this.options.animate&&visualElement&&(layoutId||layout)&&this.addEventListener("didUpdate",(function(_a){var _b,_c,_d,_e,_f,delta=_a.delta,hasLayoutChanged=_a.hasLayoutChanged,hasRelativeTargetChanged=_a.hasRelativeTargetChanged,newLayout=_a.layout;if(_this.isTreeAnimationBlocked())return _this.target=void 0,void(_this.relativeTarget=void 0);var layoutTransition=null!==(_c=null!==(_b=_this.options.transition)&&void 0!==_b?_b:visualElement.getDefaultTransition())&&void 0!==_c?_c:defaultLayoutTransition,_g=visualElement.getProps(),onLayoutAnimationStart=_g.onLayoutAnimationStart,onLayoutAnimationComplete=_g.onLayoutAnimationComplete,targetChanged=!_this.targetLayout||!boxEquals(_this.targetLayout,newLayout)||hasRelativeTargetChanged,hasOnlyRelativeTargetChanged=!hasLayoutChanged&&hasRelativeTargetChanged;if((null===(_d=_this.resumeFrom)||void 0===_d?void 0:_d.instance)||hasOnlyRelativeTargetChanged||hasLayoutChanged&&(targetChanged||!_this.currentAnimation)){_this.resumeFrom&&(_this.resumingFrom=_this.resumeFrom,_this.resumingFrom.resumingFrom=void 0),_this.setAnimationOrigin(delta,hasOnlyRelativeTargetChanged);var animationOptions=(0,tslib_es6.Cl)((0,tslib_es6.Cl)({},getValueTransition(layoutTransition,"layout")),{onPlay:onLayoutAnimationStart,onComplete:onLayoutAnimationComplete});visualElement.shouldReduceMotion&&(animationOptions.delay=0,animationOptions.type=!1),_this.startAnimation(animationOptions)}else hasLayoutChanged||0!==_this.animationProgress||_this.finishAnimation(),_this.isLead()&&(null===(_f=(_e=_this.options).onExitComplete)||void 0===_f||_f.call(_e));_this.targetLayout=newLayout}))}},ProjectionNode.prototype.unmount=function(){var _a,_b;this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this),null===(_a=this.getStack())||void 0===_a||_a.remove(this),null===(_b=this.parent)||void 0===_b||_b.children.delete(this),this.instance=void 0,es.eO.preRender(this.updateProjection)},ProjectionNode.prototype.blockUpdate=function(){this.updateManuallyBlocked=!0},ProjectionNode.prototype.unblockUpdate=function(){this.updateManuallyBlocked=!1},ProjectionNode.prototype.isUpdateBlocked=function(){return this.updateManuallyBlocked||this.updateBlockedByResize},ProjectionNode.prototype.isTreeAnimationBlocked=function(){var _a;return this.isAnimationBlocked||(null===(_a=this.parent)||void 0===_a?void 0:_a.isTreeAnimationBlocked())||!1},ProjectionNode.prototype.startUpdate=function(){var _a;this.isUpdateBlocked()||(this.isUpdating=!0,null===(_a=this.nodes)||void 0===_a||_a.forEach(resetRotation))},ProjectionNode.prototype.willUpdate=function(shouldNotifyListeners){var _a,_b,_c;if(void 0===shouldNotifyListeners&&(shouldNotifyListeners=!0),this.root.isUpdateBlocked())null===(_b=(_a=this.options).onExitComplete)||void 0===_b||_b.call(_a);else if(!this.root.isUpdating&&this.root.startUpdate(),!this.isLayoutDirty){this.isLayoutDirty=!0;for(var i=0;i<this.path.length;i++){var node=this.path[i];node.shouldResetTransform=!0,node.updateScroll()}var _d=this.options,layoutId=_d.layoutId,layout=_d.layout;if(void 0!==layoutId||layout){var transformTemplate=null===(_c=this.options.visualElement)||void 0===_c?void 0:_c.getProps().transformTemplate;this.prevTransformTemplateValue=null==transformTemplate?void 0:transformTemplate(this.latestValues,""),this.updateSnapshot(),shouldNotifyListeners&&this.notifyListeners("willUpdate")}}},ProjectionNode.prototype.didUpdate=function(){if(this.isUpdateBlocked())return this.unblockUpdate(),this.clearAllSnapshots(),void this.nodes.forEach(clearMeasurements);this.isUpdating&&(this.isUpdating=!1,this.potentialNodes.size&&(this.potentialNodes.forEach(mountNodeEarly),this.potentialNodes.clear()),this.nodes.forEach(resetTransformStyle),this.nodes.forEach(updateLayout),this.nodes.forEach(notifyLayoutUpdate),this.clearAllSnapshots(),es.qX.update(),es.qX.preRender(),es.qX.render())},ProjectionNode.prototype.clearAllSnapshots=function(){this.nodes.forEach(clearSnapshot),this.sharedNodes.forEach(removeLeadSnapshots)},ProjectionNode.prototype.scheduleUpdateProjection=function(){es.Ay.preRender(this.updateProjection,!1,!0)},ProjectionNode.prototype.scheduleCheckAfterUnmount=function(){var _this=this;es.Ay.postRender((function(){_this.isLayoutDirty?_this.root.didUpdate():_this.root.checkUpdateFailed()}))},ProjectionNode.prototype.updateSnapshot=function(){if(!this.snapshot&&this.instance){var measured=this.measure(),layout=this.removeTransform(this.removeElementScroll(measured));roundBox(layout),this.snapshot={measured,layout,latestValues:{}}}},ProjectionNode.prototype.updateLayout=function(){var _a;if(this.instance&&(this.updateScroll(),this.options.alwaysMeasureLayout&&this.isLead()||this.isLayoutDirty)){if(this.resumeFrom&&!this.resumeFrom.instance)for(var i=0;i<this.path.length;i++){this.path[i].updateScroll()}var measured=this.measure();roundBox(measured);var prevLayout=this.layout;this.layout={measured,actual:this.removeElementScroll(measured)},this.layoutCorrected=createBox(),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.actual),null===(_a=this.options.visualElement)||void 0===_a||_a.notifyLayoutMeasure(this.layout.actual,null==prevLayout?void 0:prevLayout.actual)}},ProjectionNode.prototype.updateScroll=function(){this.options.layoutScroll&&this.instance&&(this.isScrollRoot=checkIsScrollRoot(this.instance),this.scroll=measureScroll(this.instance))},ProjectionNode.prototype.resetTransform=function(){var _a;if(resetTransform){var isResetRequested=this.isLayoutDirty||this.shouldResetTransform,hasProjection=this.projectionDelta&&!isDeltaZero(this.projectionDelta),transformTemplate=null===(_a=this.options.visualElement)||void 0===_a?void 0:_a.getProps().transformTemplate,transformTemplateValue=null==transformTemplate?void 0:transformTemplate(this.latestValues,""),transformTemplateHasChanged=transformTemplateValue!==this.prevTransformTemplateValue;isResetRequested&&(hasProjection||hasTransform(this.latestValues)||transformTemplateHasChanged)&&(resetTransform(this.instance,transformTemplateValue),this.shouldResetTransform=!1,this.scheduleRender())}},ProjectionNode.prototype.measure=function(){var visualElement=this.options.visualElement;if(!visualElement)return createBox();var box=visualElement.measureViewportBox(),scroll=this.root.scroll;return scroll&&(translateAxis(box.x,scroll.x),translateAxis(box.y,scroll.y)),box},ProjectionNode.prototype.removeElementScroll=function(box){var boxWithoutScroll=createBox();copyBoxInto(boxWithoutScroll,box);for(var i=0;i<this.path.length;i++){var node=this.path[i],scroll_1=node.scroll,options=node.options,isScrollRoot=node.isScrollRoot;if(node!==this.root&&scroll_1&&options.layoutScroll){if(isScrollRoot){copyBoxInto(boxWithoutScroll,box);var rootScroll=this.root.scroll;rootScroll&&(translateAxis(boxWithoutScroll.x,-rootScroll.x),translateAxis(boxWithoutScroll.y,-rootScroll.y))}translateAxis(boxWithoutScroll.x,scroll_1.x),translateAxis(boxWithoutScroll.y,scroll_1.y)}}return boxWithoutScroll},ProjectionNode.prototype.applyTransform=function(box,transformOnly){void 0===transformOnly&&(transformOnly=!1);var withTransforms=createBox();copyBoxInto(withTransforms,box);for(var i=0;i<this.path.length;i++){var node=this.path[i];!transformOnly&&node.options.layoutScroll&&node.scroll&&node!==node.root&&transformBox(withTransforms,{x:-node.scroll.x,y:-node.scroll.y}),hasTransform(node.latestValues)&&transformBox(withTransforms,node.latestValues)}return hasTransform(this.latestValues)&&transformBox(withTransforms,this.latestValues),withTransforms},ProjectionNode.prototype.removeTransform=function(box){var _a,boxWithoutTransform=createBox();copyBoxInto(boxWithoutTransform,box);for(var i=0;i<this.path.length;i++){var node=this.path[i];if(node.instance&&hasTransform(node.latestValues)){hasScale(node.latestValues)&&node.updateSnapshot();var sourceBox=createBox();copyBoxInto(sourceBox,node.measure()),removeBoxTransforms(boxWithoutTransform,node.latestValues,null===(_a=node.snapshot)||void 0===_a?void 0:_a.layout,sourceBox)}}return hasTransform(this.latestValues)&&removeBoxTransforms(boxWithoutTransform,this.latestValues),boxWithoutTransform},ProjectionNode.prototype.setTargetDelta=function(delta){this.targetDelta=delta,this.root.scheduleUpdateProjection()},ProjectionNode.prototype.setOptions=function(options){var _a;this.options=(0,tslib_es6.Cl)((0,tslib_es6.Cl)((0,tslib_es6.Cl)({},this.options),options),{crossfade:null===(_a=options.crossfade)||void 0===_a||_a})},ProjectionNode.prototype.clearMeasurements=function(){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},ProjectionNode.prototype.resolveTargetDelta=function(){var _a,_b=this.options,layout=_b.layout,layoutId=_b.layoutId;this.layout&&(layout||layoutId)&&(this.targetDelta||this.relativeTarget||(this.relativeParent=this.getClosestProjectingParent(),this.relativeParent&&this.relativeParent.layout&&(this.relativeTarget=createBox(),this.relativeTargetOrigin=createBox(),calcRelativePosition(this.relativeTargetOrigin,this.layout.actual,this.relativeParent.layout.actual),copyBoxInto(this.relativeTarget,this.relativeTargetOrigin))),(this.relativeTarget||this.targetDelta)&&(this.target||(this.target=createBox(),this.targetWithTransforms=createBox()),this.relativeTarget&&this.relativeTargetOrigin&&(null===(_a=this.relativeParent)||void 0===_a?void 0:_a.target)?function calcRelativeBox(target,relative,parent){calcRelativeAxis(target.x,relative.x,parent.x),calcRelativeAxis(target.y,relative.y,parent.y)}(this.target,this.relativeTarget,this.relativeParent.target):this.targetDelta?(Boolean(this.resumingFrom)?this.target=this.applyTransform(this.layout.actual):copyBoxInto(this.target,this.layout.actual),applyBoxDelta(this.target,this.targetDelta)):copyBoxInto(this.target,this.layout.actual),this.attemptToResolveRelativeTarget&&(this.attemptToResolveRelativeTarget=!1,this.relativeParent=this.getClosestProjectingParent(),this.relativeParent&&Boolean(this.relativeParent.resumingFrom)===Boolean(this.resumingFrom)&&!this.relativeParent.options.layoutScroll&&this.relativeParent.target&&(this.relativeTarget=createBox(),this.relativeTargetOrigin=createBox(),calcRelativePosition(this.relativeTargetOrigin,this.target,this.relativeParent.target),copyBoxInto(this.relativeTarget,this.relativeTargetOrigin)))))},ProjectionNode.prototype.getClosestProjectingParent=function(){if(this.parent&&!hasTransform(this.parent.latestValues))return(this.parent.relativeTarget||this.parent.targetDelta)&&this.parent.layout?this.parent:this.parent.getClosestProjectingParent()},ProjectionNode.prototype.calcProjection=function(){var _a,_b=this.options,layout=_b.layout,layoutId=_b.layoutId;if(this.isTreeAnimating=Boolean((null===(_a=this.parent)||void 0===_a?void 0:_a.isTreeAnimating)||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),this.layout&&(layout||layoutId)){var lead=this.getLead();copyBoxInto(this.layoutCorrected,this.layout.actual),function applyTreeDeltas(box,treeScale,treePath,isSharedTransition){var _a,_b;void 0===isSharedTransition&&(isSharedTransition=!1);var treeLength=treePath.length;if(treeLength){var node,delta;treeScale.x=treeScale.y=1;for(var i=0;i<treeLength;i++)delta=(node=treePath[i]).projectionDelta,"contents"!==(null===(_b=null===(_a=node.instance)||void 0===_a?void 0:_a.style)||void 0===_b?void 0:_b.display)&&(isSharedTransition&&node.options.layoutScroll&&node.scroll&&node!==node.root&&transformBox(box,{x:-node.scroll.x,y:-node.scroll.y}),delta&&(treeScale.x*=delta.x.scale,treeScale.y*=delta.y.scale,applyBoxDelta(box,delta)),isSharedTransition&&hasTransform(node.latestValues)&&transformBox(box,node.latestValues))}}(this.layoutCorrected,this.treeScale,this.path,Boolean(this.resumingFrom)||this!==lead);var target=lead.target;if(target){this.projectionDelta||(this.projectionDelta=createDelta(),this.projectionDeltaWithTransform=createDelta());var prevTreeScaleX=this.treeScale.x,prevTreeScaleY=this.treeScale.y,prevProjectionTransform=this.projectionTransform;calcBoxDelta(this.projectionDelta,this.layoutCorrected,target,this.latestValues),this.projectionTransform=buildProjectionTransform(this.projectionDelta,this.treeScale),this.projectionTransform===prevProjectionTransform&&this.treeScale.x===prevTreeScaleX&&this.treeScale.y===prevTreeScaleY||(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",target))}}},ProjectionNode.prototype.hide=function(){this.isVisible=!1},ProjectionNode.prototype.show=function(){this.isVisible=!0},ProjectionNode.prototype.scheduleRender=function(notifyAll){var _a,_b,_c;void 0===notifyAll&&(notifyAll=!0),null===(_b=(_a=this.options).scheduleRender)||void 0===_b||_b.call(_a),notifyAll&&(null===(_c=this.getStack())||void 0===_c||_c.scheduleRender()),this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)},ProjectionNode.prototype.setAnimationOrigin=function(delta,hasOnlyRelativeTargetChanged){var _a,_this=this;void 0===hasOnlyRelativeTargetChanged&&(hasOnlyRelativeTargetChanged=!1);var snapshot=this.snapshot,snapshotLatestValues=(null==snapshot?void 0:snapshot.latestValues)||{},mixedValues=(0,tslib_es6.Cl)({},this.latestValues),targetDelta=createDelta();this.relativeTarget=this.relativeTargetOrigin=void 0,this.attemptToResolveRelativeTarget=!hasOnlyRelativeTargetChanged;var relativeLayout=createBox(),isSharedLayoutAnimation=null==snapshot?void 0:snapshot.isShared,isOnlyMember=((null===(_a=this.getStack())||void 0===_a?void 0:_a.members.length)||0)<=1,shouldCrossfadeOpacity=Boolean(isSharedLayoutAnimation&&!isOnlyMember&&!0===this.options.crossfade&&!this.path.some(hasOpacityCrossfade));this.animationProgress=0,this.mixTargetDelta=function(latest){var _a,progress=latest/1e3;mixAxisDelta(targetDelta.x,delta.x,progress),mixAxisDelta(targetDelta.y,delta.y,progress),_this.setTargetDelta(targetDelta),_this.relativeTarget&&_this.relativeTargetOrigin&&_this.layout&&(null===(_a=_this.relativeParent)||void 0===_a?void 0:_a.layout)&&(calcRelativePosition(relativeLayout,_this.layout.actual,_this.relativeParent.layout.actual),function mixBox(output,from,to,p){mixAxis(output.x,from.x,to.x,p),mixAxis(output.y,from.y,to.y,p)}(_this.relativeTarget,_this.relativeTargetOrigin,relativeLayout,progress)),isSharedLayoutAnimation&&(_this.animationValues=mixedValues,function mixValues(target,follow,lead,progress,shouldCrossfadeOpacity,isOnlyMember){var _a,_b,_c,_d;shouldCrossfadeOpacity?(target.opacity=mix(0,null!==(_a=lead.opacity)&&void 0!==_a?_a:1,easeCrossfadeIn(progress)),target.opacityExit=mix(null!==(_b=follow.opacity)&&void 0!==_b?_b:1,0,easeCrossfadeOut(progress))):isOnlyMember&&(target.opacity=mix(null!==(_c=follow.opacity)&&void 0!==_c?_c:1,null!==(_d=lead.opacity)&&void 0!==_d?_d:1,progress));for(var i=0;i<numBorders;i++){var borderLabel="border".concat(borders[i],"Radius"),followRadius=getRadius(follow,borderLabel),leadRadius=getRadius(lead,borderLabel);void 0===followRadius&&void 0===leadRadius||(followRadius||(followRadius=0),leadRadius||(leadRadius=0),0===followRadius||0===leadRadius||isPx(followRadius)===isPx(leadRadius)?(target[borderLabel]=Math.max(mix(asNumber(followRadius),asNumber(leadRadius),progress),0),(percent.test(leadRadius)||percent.test(followRadius))&&(target[borderLabel]+="%")):target[borderLabel]=leadRadius)}(follow.rotate||lead.rotate)&&(target.rotate=mix(follow.rotate||0,lead.rotate||0,progress))}(mixedValues,snapshotLatestValues,_this.latestValues,progress,shouldCrossfadeOpacity,isOnlyMember)),_this.root.scheduleUpdateProjection(),_this.scheduleRender(),_this.animationProgress=progress},this.mixTargetDelta(0)},ProjectionNode.prototype.startAnimation=function(options){var _a,_b,_this=this;this.notifyListeners("animationStart"),null===(_a=this.currentAnimation)||void 0===_a||_a.stop(),this.resumingFrom&&(null===(_b=this.resumingFrom.currentAnimation)||void 0===_b||_b.stop()),this.pendingAnimation&&(es.eO.update(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=es.Ay.update((function(){globalProjectionState.hasAnimatedSinceResize=!0,_this.currentAnimation=function animate_animate(from,to,transition){void 0===transition&&(transition={});var value=isMotionValue(from)?from:motionValue(from);return startAnimation("",value,to,transition),{stop:function(){return value.stop()},isAnimating:function(){return value.isAnimating()}}}(0,1e3,(0,tslib_es6.Cl)((0,tslib_es6.Cl)({},options),{onUpdate:function(latest){var _a;_this.mixTargetDelta(latest),null===(_a=options.onUpdate)||void 0===_a||_a.call(options,latest)},onComplete:function(){var _a;null===(_a=options.onComplete)||void 0===_a||_a.call(options),_this.completeAnimation()}})),_this.resumingFrom&&(_this.resumingFrom.currentAnimation=_this.currentAnimation),_this.pendingAnimation=void 0}))},ProjectionNode.prototype.completeAnimation=function(){var _a;this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0),null===(_a=this.getStack())||void 0===_a||_a.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")},ProjectionNode.prototype.finishAnimation=function(){var _a;this.currentAnimation&&(null===(_a=this.mixTargetDelta)||void 0===_a||_a.call(this,1e3),this.currentAnimation.stop()),this.completeAnimation()},ProjectionNode.prototype.applyTransformsToTarget=function(){var _a=this.getLead(),targetWithTransforms=_a.targetWithTransforms,target=_a.target,layout=_a.layout,latestValues=_a.latestValues;targetWithTransforms&&target&&layout&&(copyBoxInto(targetWithTransforms,target),transformBox(targetWithTransforms,latestValues),calcBoxDelta(this.projectionDeltaWithTransform,this.layoutCorrected,targetWithTransforms,latestValues))},ProjectionNode.prototype.registerSharedNode=function(layoutId,node){var _a,_b,_c;this.sharedNodes.has(layoutId)||this.sharedNodes.set(layoutId,new NodeStack),this.sharedNodes.get(layoutId).add(node),node.promote({transition:null===(_a=node.options.initialPromotionConfig)||void 0===_a?void 0:_a.transition,preserveFollowOpacity:null===(_c=null===(_b=node.options.initialPromotionConfig)||void 0===_b?void 0:_b.shouldPreserveFollowOpacity)||void 0===_c?void 0:_c.call(_b,node)})},ProjectionNode.prototype.isLead=function(){var stack=this.getStack();return!stack||stack.lead===this},ProjectionNode.prototype.getLead=function(){var _a;return this.options.layoutId&&(null===(_a=this.getStack())||void 0===_a?void 0:_a.lead)||this},ProjectionNode.prototype.getPrevLead=function(){var _a;return this.options.layoutId?null===(_a=this.getStack())||void 0===_a?void 0:_a.prevLead:void 0},ProjectionNode.prototype.getStack=function(){var layoutId=this.options.layoutId;if(layoutId)return this.root.sharedNodes.get(layoutId)},ProjectionNode.prototype.promote=function(_a){var _b=void 0===_a?{}:_a,needsReset=_b.needsReset,transition=_b.transition,preserveFollowOpacity=_b.preserveFollowOpacity,stack=this.getStack();stack&&stack.promote(this,preserveFollowOpacity),needsReset&&(this.projectionDelta=void 0,this.needsReset=!0),transition&&this.setOptions({transition})},ProjectionNode.prototype.relegate=function(){var stack=this.getStack();return!!stack&&stack.relegate(this)},ProjectionNode.prototype.resetRotation=function(){var visualElement=this.options.visualElement;if(visualElement){for(var hasRotate=!1,resetValues={},i=0;i<transformAxes.length;i++){var key="rotate"+transformAxes[i];visualElement.getStaticValue(key)&&(hasRotate=!0,resetValues[key]=visualElement.getStaticValue(key),visualElement.setStaticValue(key,0))}if(hasRotate){for(var key in null==visualElement||visualElement.syncRender(),resetValues)visualElement.setStaticValue(key,resetValues[key]);visualElement.scheduleRender()}}},ProjectionNode.prototype.getProjectionStyles=function(styleProp){var _a,_b,_c,_d,_e,_f;void 0===styleProp&&(styleProp={});var styles={};if(!this.instance||this.isSVG)return styles;if(!this.isVisible)return{visibility:"hidden"};styles.visibility="";var transformTemplate=null===(_a=this.options.visualElement)||void 0===_a?void 0:_a.getProps().transformTemplate;if(this.needsReset)return this.needsReset=!1,styles.opacity="",styles.pointerEvents=resolveMotionValue(styleProp.pointerEvents)||"",styles.transform=transformTemplate?transformTemplate(this.latestValues,""):"none",styles;var lead=this.getLead();if(!this.projectionDelta||!this.layout||!lead.target){var emptyStyles={};return this.options.layoutId&&(emptyStyles.opacity=null!==(_b=this.latestValues.opacity)&&void 0!==_b?_b:1,emptyStyles.pointerEvents=resolveMotionValue(styleProp.pointerEvents)||""),this.hasProjected&&!hasTransform(this.latestValues)&&(emptyStyles.transform=transformTemplate?transformTemplate({},""):"none",this.hasProjected=!1),emptyStyles}var valuesToRender=lead.animationValues||lead.latestValues;this.applyTransformsToTarget(),styles.transform=buildProjectionTransform(this.projectionDeltaWithTransform,this.treeScale,valuesToRender),transformTemplate&&(styles.transform=transformTemplate(valuesToRender,styles.transform));var _g=this.projectionDelta,x=_g.x,y=_g.y;for(var key in styles.transformOrigin="".concat(100*x.origin,"% ").concat(100*y.origin,"% 0"),lead.animationValues?styles.opacity=lead===this?null!==(_d=null!==(_c=valuesToRender.opacity)&&void 0!==_c?_c:this.latestValues.opacity)&&void 0!==_d?_d:1:this.preserveOpacity?this.latestValues.opacity:valuesToRender.opacityExit:styles.opacity=lead===this?null!==(_e=valuesToRender.opacity)&&void 0!==_e?_e:"":null!==(_f=valuesToRender.opacityExit)&&void 0!==_f?_f:0,scaleCorrectors)if(void 0!==valuesToRender[key]){var _h=scaleCorrectors[key],correct=_h.correct,applyTo=_h.applyTo,corrected=correct(valuesToRender[key],lead);if(applyTo)for(var num=applyTo.length,i=0;i<num;i++)styles[applyTo[i]]=corrected;else styles[key]=corrected}return this.options.layoutId&&(styles.pointerEvents=lead===this?resolveMotionValue(styleProp.pointerEvents)||"":"none"),styles},ProjectionNode.prototype.clearSnapshot=function(){this.resumeFrom=this.snapshot=void 0},ProjectionNode.prototype.resetTree=function(){this.root.nodes.forEach((function(node){var _a;return null===(_a=node.currentAnimation)||void 0===_a?void 0:_a.stop()})),this.root.nodes.forEach(clearMeasurements),this.root.sharedNodes.clear()},ProjectionNode}()}function updateLayout(node){node.updateLayout()}function notifyLayoutUpdate(node){var _a,_b,_c,_d,snapshot=null!==(_b=null===(_a=node.resumeFrom)||void 0===_a?void 0:_a.snapshot)&&void 0!==_b?_b:node.snapshot;if(node.isLead()&&node.layout&&snapshot&&node.hasListeners("didUpdate")){var _e=node.layout,layout_1=_e.actual,measuredLayout=_e.measured;"size"===node.options.animationType?eachAxis((function(axis){var axisSnapshot=snapshot.isShared?snapshot.measured[axis]:snapshot.layout[axis],length=calcLength(axisSnapshot);axisSnapshot.min=layout_1[axis].min,axisSnapshot.max=axisSnapshot.min+length})):"position"===node.options.animationType&&eachAxis((function(axis){var axisSnapshot=snapshot.isShared?snapshot.measured[axis]:snapshot.layout[axis],length=calcLength(layout_1[axis]);axisSnapshot.max=axisSnapshot.min+length}));var layoutDelta=createDelta();calcBoxDelta(layoutDelta,layout_1,snapshot.layout);var visualDelta=createDelta();snapshot.isShared?calcBoxDelta(visualDelta,node.applyTransform(measuredLayout,!0),snapshot.measured):calcBoxDelta(visualDelta,layout_1,snapshot.layout);var hasLayoutChanged=!isDeltaZero(layoutDelta),hasRelativeTargetChanged=!1;if(!node.resumeFrom&&(node.relativeParent=node.getClosestProjectingParent(),node.relativeParent&&!node.relativeParent.resumeFrom)){var _f=node.relativeParent,parentSnapshot=_f.snapshot,parentLayout=_f.layout;if(parentSnapshot&&parentLayout){var relativeSnapshot=createBox();calcRelativePosition(relativeSnapshot,snapshot.layout,parentSnapshot.layout);var relativeLayout=createBox();calcRelativePosition(relativeLayout,layout_1,parentLayout.actual),boxEquals(relativeSnapshot,relativeLayout)||(hasRelativeTargetChanged=!0)}}node.notifyListeners("didUpdate",{layout:layout_1,snapshot,delta:visualDelta,layoutDelta,hasLayoutChanged,hasRelativeTargetChanged})}else node.isLead()&&(null===(_d=(_c=node.options).onExitComplete)||void 0===_d||_d.call(_c));node.options.transition=void 0}function clearSnapshot(node){node.clearSnapshot()}function clearMeasurements(node){node.clearMeasurements()}function resetTransformStyle(node){var visualElement=node.options.visualElement;(null==visualElement?void 0:visualElement.getProps().onBeforeLayoutMeasure)&&visualElement.notifyBeforeLayoutMeasure(),node.resetTransform()}function finishAnimation(node){node.finishAnimation(),node.targetDelta=node.relativeTarget=node.target=void 0}function resolveTargetDelta(node){node.resolveTargetDelta()}function calcProjection(node){node.calcProjection()}function resetRotation(node){node.resetRotation()}function removeLeadSnapshots(stack){stack.removeLeadSnapshot()}function mixAxisDelta(output,delta,p){output.translate=mix(delta.translate,0,p),output.scale=mix(delta.scale,1,p),output.origin=delta.origin,output.originPoint=delta.originPoint}function mixAxis(output,from,to,p){output.min=mix(from.min,to.min,p),output.max=mix(from.max,to.max,p)}function hasOpacityCrossfade(node){return node.animationValues&&void 0!==node.animationValues.opacityExit}var defaultLayoutTransition={duration:.45,ease:[.4,0,.1,1]};function mountNodeEarly(node,id){for(var searchNode=node.root,i=node.path.length-1;i>=0;i--)if(Boolean(node.path[i].instance)){searchNode=node.path[i];break}var element=(searchNode&&searchNode!==node.root?searchNode.instance:document).querySelector('[data-projection-id="'.concat(id,'"]'));element&&node.mount(element,!0)}function roundAxis(axis){axis.min=Math.round(axis.min),axis.max=Math.round(axis.max)}function roundBox(box){roundAxis(box.x),roundAxis(box.y)}var DocumentProjectionNode=createProjectionNode({attachResizeListener:function(ref,notify){return addDomEvent(ref,"resize",notify)},measureScroll:function(){return{x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}},checkIsScrollRoot:function(){return!0}}),rootProjectionNode={current:void 0},HTMLProjectionNode_HTMLProjectionNode=createProjectionNode({measureScroll:function(instance){return{x:instance.scrollLeft,y:instance.scrollTop}},defaultParent:function(){if(!rootProjectionNode.current){var documentNode=new DocumentProjectionNode(0,{});documentNode.mount(window),documentNode.setOptions({layoutScroll:!0}),rootProjectionNode.current=documentNode}return rootProjectionNode.current},resetTransform:function(instance,value){instance.style.transform=null!=value?value:"none"},checkIsScrollRoot:function(instance){return Boolean("fixed"===window.getComputedStyle(instance).position)}}),featureBundle=(0,tslib_es6.Cl)((0,tslib_es6.Cl)((0,tslib_es6.Cl)((0,tslib_es6.Cl)({},animations),gestureAnimations),drag),layoutFeatures),motion=createMotionProxy((function(Component,config){return function create_config_createDomMotionConfig(Component,_a,preloadedFeatures,createVisualElement,projectionNodeConstructor){var _b=_a.forwardMotionProps,forwardMotionProps=void 0!==_b&&_b,baseConfig=isSVGComponent(Component)?svgMotionConfig:htmlMotionConfig;return(0,tslib_es6.Cl)((0,tslib_es6.Cl)({},baseConfig),{preloadedFeatures,useRender:createUseRender(forwardMotionProps),createVisualElement,projectionNodeConstructor,Component})}(Component,config,featureBundle,create_visual_element_createDomVisualElement,HTMLProjectionNode_HTMLProjectionNode)}))},"../../node_modules/.pnpm/framer-motion@6.5.1_react-dom@17.0.2_react@17.0.2__react@17.0.2/node_modules/framer-motion/dist/es/utils/is-browser.mjs":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{__webpack_require__.d(__webpack_exports__,{B:()=>isBrowser});var isBrowser="undefined"!=typeof document},"../../node_modules/.pnpm/framer-motion@6.5.1_react-dom@17.0.2_react@17.0.2__react@17.0.2/node_modules/framer-motion/dist/es/utils/process.mjs":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{__webpack_require__.d(__webpack_exports__,{_:()=>env});var process=__webpack_require__("../../node_modules/.pnpm/process@0.11.10/node_modules/process/browser.js"),env=(void 0===process||process.env,"production")},"../../node_modules/.pnpm/framer-motion@6.5.1_react-dom@17.0.2_react@17.0.2__react@17.0.2/node_modules/framer-motion/dist/es/utils/use-constant.mjs":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{__webpack_require__.d(__webpack_exports__,{M:()=>useConstant});var react__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("../../node_modules/.pnpm/react@18.3.1/node_modules/react/index.js");function useConstant(init){var ref=(0,react__WEBPACK_IMPORTED_MODULE_0__.useRef)(null);return null===ref.current&&(ref.current=init()),ref.current}},"../../node_modules/.pnpm/framer-motion@6.5.1_react-dom@17.0.2_react@17.0.2__react@17.0.2/node_modules/framer-motion/dist/es/utils/use-id.mjs":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{__webpack_require__.d(__webpack_exports__,{B:()=>useId});var _use_constant_mjs__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("../../node_modules/.pnpm/framer-motion@6.5.1_react-dom@17.0.2_react@17.0.2__react@17.0.2/node_modules/framer-motion/dist/es/utils/use-constant.mjs"),counter=0,incrementId=function(){return counter++},useId=function(){return(0,_use_constant_mjs__WEBPACK_IMPORTED_MODULE_0__.M)(incrementId)}},"../../node_modules/.pnpm/framer-motion@6.5.1_react-dom@17.0.2_react@17.0.2__react@17.0.2/node_modules/framer-motion/dist/es/utils/use-isomorphic-effect.mjs":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{__webpack_require__.d(__webpack_exports__,{E:()=>useIsomorphicLayoutEffect});var react__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("../../node_modules/.pnpm/react@18.3.1/node_modules/react/index.js"),useIsomorphicLayoutEffect=__webpack_require__("../../node_modules/.pnpm/framer-motion@6.5.1_react-dom@17.0.2_react@17.0.2__react@17.0.2/node_modules/framer-motion/dist/es/utils/is-browser.mjs").B?react__WEBPACK_IMPORTED_MODULE_0__.useLayoutEffect:react__WEBPACK_IMPORTED_MODULE_0__.useEffect},"../../node_modules/.pnpm/framer-motion@6.5.1_react-dom@17.0.2_react@17.0.2__react@17.0.2/node_modules/framer-motion/dist/es/utils/use-reduced-motion.mjs":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{__webpack_require__.d(__webpack_exports__,{I:()=>useReducedMotion,K:()=>useReducedMotionConfig});var tslib__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("../../node_modules/.pnpm/tslib@2.6.2/node_modules/tslib/tslib.es6.mjs"),react__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("../../node_modules/.pnpm/react@18.3.1/node_modules/react/index.js"),_context_MotionConfigContext_mjs__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("../../node_modules/.pnpm/framer-motion@6.5.1_react-dom@17.0.2_react@17.0.2__react@17.0.2/node_modules/framer-motion/dist/es/context/MotionConfigContext.mjs"),_is_browser_mjs__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("../../node_modules/.pnpm/framer-motion@6.5.1_react-dom@17.0.2_react@17.0.2__react@17.0.2/node_modules/framer-motion/dist/es/utils/is-browser.mjs"),prefersReducedMotion={current:null},hasDetected=!1;function useReducedMotion(){return!hasDetected&&function initPrefersReducedMotion(){if(hasDetected=!0,_is_browser_mjs__WEBPACK_IMPORTED_MODULE_1__.B)if(window.matchMedia){var motionMediaQuery_1=window.matchMedia("(prefers-reduced-motion)"),setReducedMotionPreferences=function(){return prefersReducedMotion.current=motionMediaQuery_1.matches};motionMediaQuery_1.addListener(setReducedMotionPreferences),setReducedMotionPreferences()}else prefersReducedMotion.current=!1}(),(0,tslib__WEBPACK_IMPORTED_MODULE_2__.zs)((0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(prefersReducedMotion.current),1)[0]}function useReducedMotionConfig(){var reducedMotionPreference=useReducedMotion(),reducedMotion=(0,react__WEBPACK_IMPORTED_MODULE_0__.useContext)(_context_MotionConfigContext_mjs__WEBPACK_IMPORTED_MODULE_3__.Q).reducedMotion;return"never"!==reducedMotion&&("always"===reducedMotion||reducedMotionPreference)}},"../../node_modules/.pnpm/framer-motion@6.5.1_react-dom@17.0.2_react@17.0.2__react@17.0.2/node_modules/framer-motion/dist/es/utils/use-unmount-effect.mjs":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{__webpack_require__.d(__webpack_exports__,{l:()=>useUnmountEffect});var react__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("../../node_modules/.pnpm/react@18.3.1/node_modules/react/index.js");function useUnmountEffect(callback){return(0,react__WEBPACK_IMPORTED_MODULE_0__.useEffect)((function(){return function(){return callback()}}),[])}},"../../node_modules/.pnpm/framesync@6.0.1/node_modules/framesync/dist/es/index.mjs":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{__webpack_require__.d(__webpack_exports__,{eO:()=>cancelSync,Ay:()=>es,qX:()=>flushSync,KK:()=>getFrameData});const getCurrentTime="undefined"!=typeof performance?()=>performance.now():()=>Date.now(),onNextFrame="undefined"!=typeof window?callback=>window.requestAnimationFrame(callback):callback=>setTimeout((()=>callback(getCurrentTime())),16.666666666666668);let useDefaultElapsed=!0,runNextFrame=!1,isProcessing=!1;const es_frame={delta:0,timestamp:0},stepsOrder=["read","update","preRender","render","postRender"],steps=stepsOrder.reduce(((acc,key)=>(acc[key]=function createRenderStep(runNextFrame){let toRun=[],toRunNextFrame=[],numToRun=0,isProcessing=!1,flushNextFrame=!1;const toKeepAlive=new WeakSet,step={schedule:(callback,keepAlive=!1,immediate=!1)=>{const addToCurrentFrame=immediate&&isProcessing,buffer=addToCurrentFrame?toRun:toRunNextFrame;return keepAlive&&toKeepAlive.add(callback),-1===buffer.indexOf(callback)&&(buffer.push(callback),addToCurrentFrame&&isProcessing&&(numToRun=toRun.length)),callback},cancel:callback=>{const index=toRunNextFrame.indexOf(callback);-1!==index&&toRunNextFrame.splice(index,1),toKeepAlive.delete(callback)},process:frameData=>{if(isProcessing)flushNextFrame=!0;else{if(isProcessing=!0,[toRun,toRunNextFrame]=[toRunNextFrame,toRun],toRunNextFrame.length=0,numToRun=toRun.length,numToRun)for(let i=0;i<numToRun;i++){const callback=toRun[i];callback(frameData),toKeepAlive.has(callback)&&(step.schedule(callback),runNextFrame())}isProcessing=!1,flushNextFrame&&(flushNextFrame=!1,step.process(frameData))}}};return step}((()=>runNextFrame=!0)),acc)),{}),sync=stepsOrder.reduce(((acc,key)=>{const step=steps[key];return acc[key]=(process,keepAlive=!1,immediate=!1)=>(runNextFrame||startLoop(),step.schedule(process,keepAlive,immediate)),acc}),{}),cancelSync=stepsOrder.reduce(((acc,key)=>(acc[key]=steps[key].cancel,acc)),{}),flushSync=stepsOrder.reduce(((acc,key)=>(acc[key]=()=>steps[key].process(es_frame),acc)),{}),processStep=stepId=>steps[stepId].process(es_frame),processFrame=timestamp=>{runNextFrame=!1,es_frame.delta=useDefaultElapsed?16.666666666666668:Math.max(Math.min(timestamp-es_frame.timestamp,40),1),es_frame.timestamp=timestamp,isProcessing=!0,stepsOrder.forEach(processStep),isProcessing=!1,runNextFrame&&(useDefaultElapsed=!1,onNextFrame(processFrame))},startLoop=()=>{runNextFrame=!0,useDefaultElapsed=!0,isProcessing||onNextFrame(processFrame)},getFrameData=()=>es_frame,es=sync}}]); |