{"version":3,"sources":["../node_modules/@react-spring/animated/dist/react-spring-animated.esm.js","../node_modules/@react-spring/rafz/dist/react-spring-rafz.esm.js","../node_modules/@react-spring/shared/dist/react-spring-shared.esm.js","../node_modules/@react-spring/core/dist/react-spring-core.esm.js","../node_modules/@react-oauth/google/dist/index.esm.js","../node_modules/@react-spring/web/dist/react-spring-web.esm.js"],"names":["$node","Symbol","for","getAnimated","owner","setAnimated","node","defineHidden","getPayload","Animated","constructor","this","payload","AnimatedValue","_value","super","done","elapsedTime","lastPosition","lastVelocity","v0","durationProgress","is","num","static","value","getValue","setValue","step","Math","round","reset","AnimatedString","_string","_toString","createInterpolator","output","str","goal","TreeContext","dependencies","AnimatedObject","source","animated","values","eachProp","key","hasFluidValue","getFluidValue","_makePayload","each","Set","_addToPayload","Array","from","add","AnimatedArray","map","length","i","some","Boolean","makeAnimated","isAnimatedString","create","getAnimatedType","parentNode","arr","_extends","Object","assign","target","arguments","prototype","hasOwnProperty","call","apply","withAnimated","Component","host","hasInstance","fun","isReactComponent","forwardRef","givenProps","givenRef","instanceRef","useRef","ref","useCallback","current","updateRef","props","deps","style","createAnimatedStyle","getAnimatedState","forceUpdate","useForceUpdate","callback","instance","applyAnimatedValues","observer","PropsObserver","observerRef","useLayoutEffect","lastObserver","dep","addFluidObserver","removeFluidObserver","raf","cancel","update","useEffect","useOnce","usedProps","getComponentProps","React","eventObserved","event","type","write","cacheKey","createHost","components","_applyAnimatedValues","_createAnimatedStyle","_getComponentProps","undefined","hostConfig","displayName","getDisplayName","arg","name","updateQueue","makeQueue","fn","schedule","writeQueue","onStartQueue","onStart","onFrameQueue","onFrame","onFinishQueue","onFinish","timeouts","setTimeout","handler","ms","time","now","findIndex","t","splice","pendingCount","timeout","findTimeout","start","delete","sync","batchedUpdates","throttle","lastArgs","queuedFn","throttled","_len","args","_key","nativeRaf","window","requestAnimationFrame","use","impl","performance","Date","catch","console","error","frameLoop","advance","ts","queue","loop","prevTs","count","eachSafely","flush","min","next","has","size","forEach","e","noop","obj","defineProperty","writable","configurable","isArray","a","und","isEqual","b","ctx","toArray","iterator","items","clear","flushCalls","isSSR","navigator","test","userAgent","createStringInterpolator$1","to","colors$1","skipAnimation","willAdvance","globals","freeze","__proto__","createStringInterpolator","colors","startQueue","currentFrame","prevFrame","priority","idle","animation","flushStartQueue","startSafely","sort","prevIndex","indexOf","startUnsafely","includes","index","other","dt","nextFrame","push","transparent","aliceblue","antiquewhite","aqua","aquamarine","azure","beige","bisque","black","blanchedalmond","blue","blueviolet","brown","burlywood","burntsienna","cadetblue","chartreuse","chocolate","coral","cornflowerblue","cornsilk","crimson","cyan","darkblue","darkcyan","darkgoldenrod","darkgray","darkgreen","darkgrey","darkkhaki","darkmagenta","darkolivegreen","darkorange","darkorchid","darkred","darksalmon","darkseagreen","darkslateblue","darkslategray","darkslategrey","darkturquoise","darkviolet","deeppink","deepskyblue","dimgray","dimgrey","dodgerblue","firebrick","floralwhite","forestgreen","fuchsia","gainsboro","ghostwhite","gold","goldenrod","gray","green","greenyellow","grey","honeydew","hotpink","indianred","indigo","ivory","khaki","lavender","lavenderblush","lawngreen","lemonchiffon","lightblue","lightcoral","lightcyan","lightgoldenrodyellow","lightgray","lightgreen","lightgrey","lightpink","lightsalmon","lightseagreen","lightskyblue","lightslategray","lightslategrey","lightsteelblue","lightyellow","lime","limegreen","linen","magenta","maroon","mediumaquamarine","mediumblue","mediumorchid","mediumpurple","mediumseagreen","mediumslateblue","mediumspringgreen","mediumturquoise","mediumvioletred","midnightblue","mintcream","mistyrose","moccasin","navajowhite","navy","oldlace","olive","olivedrab","orange","orangered","orchid","palegoldenrod","palegreen","paleturquoise","palevioletred","papayawhip","peachpuff","peru","pink","plum","powderblue","purple","rebeccapurple","red","rosybrown","royalblue","saddlebrown","salmon","sandybrown","seagreen","seashell","sienna","silver","skyblue","slateblue","slategray","slategrey","snow","springgreen","steelblue","tan","teal","thistle","tomato","turquoise","violet","wheat","white","whitesmoke","yellow","yellowgreen","NUMBER","PERCENTAGE","_len2","parts","_key2","join","rgb","RegExp","rgba","hsl","hsla","hex3","hex4","hex6","hex8","hue2rgb","p","q","hslToRgb","h","s","l","r","g","parse255","int","parseInt","parse360","parseFloat","parse1","parsePercentage","colorToRgba","input","int32Color","color","match","exec","normalizeColor","range","extrapolate","config","outputRange","inputRange","extrapolateLeft","extrapolateRight","easing","findRange","inputMin","inputMax","outputMin","outputMax","result","Infinity","interpolate","$get","$observers","getFluidObservers","callFluidObservers","observers","callFluidObserver","FluidValue","get","Error","setFluidGetter","setHidden","observerAdded","observerRemoved","numberRegex","colorRegex","unitRegex","rgbaRegex","cssVariableRegex","variableToRgba","token","fallback","parseCSSVariable","getComputedStyle","document","documentElement","getPropertyValue","trim","startsWith","namedColorRegex","rgbaRound","_","p1","p2","p3","p4","keys","replace","keyframes","Number","interpolators","_output$find","missingUnit","find","prefix","once","func","called","TypeError","warnInterpolate","warn","deprecateInterpolate","warnDirectCall","deprecateDirectCall","effect","emptyDeps","useState","mounted","makeMountedRef","unmount","useMemoOne","getResult","inputs","initial","committed","prevCache","cache","prev","areInputsEqual","usePrev","prevRef","createElement","callProp","matchProp","resolveProp","prop","getDefaultProp","default","noopTransform","getDefaultProps","transform","DEFAULT_PROPS","defaults","RESERVED_PROPS","pause","reverse","immediate","delay","onProps","onChange","onPause","onResume","onRest","onResolve","trail","expires","enter","leave","children","onDestroyed","callId","parentId","inferTo","forward","getForwardProps","out","val","computeGoal","Globals","hasProps","isAsyncTo","detachRefs","ctrl","_ctrl$ref","replaceRef","_ctrl$ref2","c1","c2","c3","c4","PI","c5","bounceOut","x","n1","d1","tension","friction","mass","damping","linear","easeInQuad","easeOutQuad","easeInOutQuad","pow","easeInCubic","easeOutCubic","easeInOutCubic","easeInQuart","easeOutQuart","easeInOutQuart","easeInQuint","easeOutQuint","easeInOutQuint","easeInSine","cos","easeOutSine","sin","easeInOutSine","easeInExpo","easeOutExpo","easeInOutExpo","easeInCirc","sqrt","easeOutCirc","easeInOutCirc","easeInBack","easeOutBack","easeInOutBack","easeInElastic","easeOutElastic","easeInOutElastic","easeInBounce","easeOutBounce","easeInOutBounce","clamp","AnimationConfig","frequency","velocity","restVelocity","precision","progress","duration","bounce","decay","sanitizeConfig","isTensionConfig","emptyArray","Animation","changed","toValues","fromValues","scheduleProps","_ref2","defaultProps","state","actions","Promise","resolve","reject","_props$cancel","paused","resumeQueue","resume","delayed","pauseQueue","cancelId","err","getCombinedResult","results","cancelled","getCancelledResult","every","getNoopResult","getFinishedResult","finished","runAsync","asyncTo","prevTo","promise","prevPromise","asyncId","preventBail","bail","bailPromise","bailIfEnded","bailSignal","bailResult","animate","arg1","arg2","BailSignal","skipAnimationSignal","SkipAniamtionSignal","stopAsync","animating","async","stop","bind","all","then","item","isFrameValue","FrameValue","nextId$1","id","_priority","_onPriorityChange","_len3","_key3","toJSON","_attach","_detach","_onChange","parent","$P","hasAnimated","isAnimating","isPaused","setActiveBit","active","IS_ANIMATING","setPausedBit","SpringValue","_state","_pendingCalls","_lastCallId","_lastToId","_memoizedDuration","isDelayed","anim","position","elapsed","exp","abs","bounceFactor","canBounce","isGrowing","isMoving","isBouncing","numSteps","ceil","n","isNaN","currVal","finalVal","_stop","set","_focus","_set","_update","finish","_onStart","_start","_prepareNode","_ref","isLoop","mergeActiveFn","sendEvent","isFrozen","checkFinished","_resume","_merge","nextProps","createLoopUpdate","hasToProp","hasFromProp","prevFrom","hasFromChanged","hasToChanged","hasAsyncTo","newConfig","defaultConfig","mergeConfig","isAnimatable","nodeType","goalType","started","hasValueChanged","ACTIVE_EVENTS","oldNode","loopRet","overrides","createUpdate","findDefined","declareUpdate","_target$animation$typ","_target$animation","_target$defaultProps$","_target$defaultProps","_len4","_key4","BATCHED_EVENTS","nextId","Controller","springs","_flush","_initialProps","_lastAsyncId","_active","_changed","_started","_item","_events","Map","_onFrame","spring","prepareKeys","flushUpdateQueue","_ref3","_ref4","_ref5","flushUpdate","_ref6","promises","getSprings","prepareSprings","createSpring","setSprings","_objectWithoutPropertiesLoose","excluded","sourceKeys","_excluded$3","SpringContext","inherited","useContext","Provider","init","_context","Consumer","SpringRef","_getProps","useSprings","propsFn","useMemo","layoutId","ctrls","updates","prevLength","declareUpdates","startIndex","endIndex","slice","context","prevContext","hasContext","cb","useSpring","isFn","TransitionPhase","Interpolation","calc","_get","_dt","oldValue","checkIdle","becomeIdle","max","reduce","highest","isIdle","self","GoogleOAuthContext","createContext","GoogleOAuthProvider","clientId","onScriptLoadSuccess","onScriptLoadError","scriptLoadedSuccessfully","options","setScriptLoadedSuccessfully","onScriptLoadSuccessRef","onScriptLoadErrorRef","scriptTag","src","defer","onload","_a","onerror","body","appendChild","removeChild","useLoadGsiScript","contextValue","useGoogleOAuth","containerHeightMap","large","medium","small","GoogleLogin","onSuccess","onError","useOneTap","promptMomentNotification","theme","text","shape","logo_alignment","width","locale","btnContainerRef","onSuccessRef","onErrorRef","promptMomentNotificationRef","_b","_c","google","accounts","initialize","client_id","credentialResponse","credential","renderButton","prompt","height","_excluded$2","isCustomPropRE","dangerousStyleValue","isUnitlessNumber","attributeCache","animationIterationCount","borderImageOutset","borderImageSlice","borderImageWidth","boxFlex","boxFlexGroup","boxOrdinalGroup","columnCount","columns","flex","flexGrow","flexPositive","flexShrink","flexNegative","flexOrder","gridRow","gridRowEnd","gridRowSpan","gridRowStart","gridColumn","gridColumnEnd","gridColumnSpan","gridColumnStart","fontWeight","lineClamp","lineHeight","opacity","order","orphans","tabSize","widows","zIndex","zoom","fillOpacity","floodOpacity","stopOpacity","strokeDasharray","strokeDashoffset","strokeMiterlimit","strokeOpacity","strokeWidth","prefixes","acc","prefixKey","charAt","toUpperCase","substring","_excluded$1","domTransforms","pxTransforms","degTransforms","addUnit","unit","isValueIdentity","v","AnimatedStyle","y","z","transforms","xyz","deg","FluidTransform","identity","_excluded","unstable_batchedUpdates","setAttribute","isFilterElement","nodeName","scrollTop","scrollLeft","attributes","names","hasAttribute","toLowerCase","textContent","setProperty"],"mappings":"qHAAA,mSAIA,MA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AkB,OAAQ,OAAQ,MAAO,OAAQ,SAQlmC,CAClCtB,oBAtMF,SAA6BD,EAAUR,GACrC,IAAKQ,EAASyoB,WAAazoB,EAAS21B,aAClC,OAAO,EAGT,MAAMC,EAAwC,WAAtB51B,EAAS61B,UAAyB71B,EAASlC,YAA+C,WAAjCkC,EAASlC,WAAW+3B,SAE/FxO,EAAO7nB,GACP,MACJE,EAAK,SACLgc,EAAQ,UACRoa,EAAS,WACTC,GACE1O,EACE2O,EAAa3K,EAA8BhE,EAAMgK,GAEjD70B,EAASyB,OAAOzB,OAAOw5B,GACvBC,EAAQh4B,OAAO2Z,KAAKoe,GAAY34B,KAAI4E,GAAQ2zB,GAAmB51B,EAASk2B,aAAaj0B,GAAQA,EAAOwvB,EAAexvB,KAAUwvB,EAAexvB,GAAQA,EAAK4V,QAAQ,YAAY2O,GAAK,IAAMA,EAAE2P,wBAE/K,IAAbza,IACF1b,EAASo2B,YAAc1a,GAGzB,IAAK,IAAIzZ,KAAQvC,EACf,GAAIA,EAAMpB,eAAe2D,GAAO,CAC9B,MAAM5G,EAAQk2B,EAAoBtvB,EAAMvC,EAAMuC,IAE1CqvB,EAAevqB,KAAK9E,GACtBjC,EAASN,MAAM22B,YAAYp0B,EAAM5G,GAEjC2E,EAASN,MAAMuC,GAAQ5G,CAE3B,CAGF46B,EAAMtwB,SAAQ,CAAC1D,EAAM1E,KACnByC,EAAS21B,aAAa1zB,EAAMzF,EAAOe,GAAG,SAGtB,IAAdu4B,IACF91B,EAAS81B,UAAYA,QAGJ,IAAfC,IACF/1B,EAAS+1B,WAAaA,EAE1B,EAyJEp2B,oBAAqBD,GAAS,IAAIu1B,EAAcv1B,GAChDsB,kBAAmBqmB,GACLgE,EAA8BhE,EAAMoO,KAK9Bl5B,Q","file":"static/js/main~51118fca.2e7a7249.chunk.js","sourcesContent":["import { defineHidden, is, createInterpolator, eachProp, hasFluidValue, getFluidValue, each, isAnimatedString, useForceUpdate, useLayoutEffect, addFluidObserver, removeFluidObserver, raf, useOnce } from '@react-spring/shared';\nimport * as React from 'react';\nimport { forwardRef, useRef, useCallback, useEffect } from 'react';\n\nconst $node = Symbol.for('Animated:node');\nconst isAnimated = value => !!value && value[$node] === value;\nconst getAnimated = owner => owner && owner[$node];\nconst setAnimated = (owner, node) => defineHidden(owner, $node, node);\nconst getPayload = owner => owner && owner[$node] && owner[$node].getPayload();\nclass Animated {\n constructor() {\n this.payload = void 0;\n setAnimated(this, this);\n }\n\n getPayload() {\n return this.payload || [];\n }\n\n}\n\nclass AnimatedValue extends Animated {\n constructor(_value) {\n super();\n this.done = true;\n this.elapsedTime = void 0;\n this.lastPosition = void 0;\n this.lastVelocity = void 0;\n this.v0 = void 0;\n this.durationProgress = 0;\n this._value = _value;\n\n if (is.num(this._value)) {\n this.lastPosition = this._value;\n }\n }\n\n static create(value) {\n return new AnimatedValue(value);\n }\n\n getPayload() {\n return [this];\n }\n\n getValue() {\n return this._value;\n }\n\n setValue(value, step) {\n if (is.num(value)) {\n this.lastPosition = value;\n\n if (step) {\n value = Math.round(value / step) * step;\n\n if (this.done) {\n this.lastPosition = value;\n }\n }\n }\n\n if (this._value === value) {\n return false;\n }\n\n this._value = value;\n return true;\n }\n\n reset() {\n const {\n done\n } = this;\n this.done = false;\n\n if (is.num(this._value)) {\n this.elapsedTime = 0;\n this.durationProgress = 0;\n this.lastPosition = this._value;\n if (done) this.lastVelocity = null;\n this.v0 = null;\n }\n }\n\n}\n\nclass AnimatedString extends AnimatedValue {\n constructor(value) {\n super(0);\n this._string = null;\n this._toString = void 0;\n this._toString = createInterpolator({\n output: [value, value]\n });\n }\n\n static create(value) {\n return new AnimatedString(value);\n }\n\n getValue() {\n let value = this._string;\n return value == null ? this._string = this._toString(this._value) : value;\n }\n\n setValue(value) {\n if (is.str(value)) {\n if (value == this._string) {\n return false;\n }\n\n this._string = value;\n this._value = 1;\n } else if (super.setValue(value)) {\n this._string = null;\n } else {\n return false;\n }\n\n return true;\n }\n\n reset(goal) {\n if (goal) {\n this._toString = createInterpolator({\n output: [this.getValue(), goal]\n });\n }\n\n this._value = 0;\n super.reset();\n }\n\n}\n\nconst TreeContext = {\n dependencies: null\n};\n\nclass AnimatedObject extends Animated {\n constructor(source) {\n super();\n this.source = source;\n this.setValue(source);\n }\n\n getValue(animated) {\n const values = {};\n eachProp(this.source, (source, key) => {\n if (isAnimated(source)) {\n values[key] = source.getValue(animated);\n } else if (hasFluidValue(source)) {\n values[key] = getFluidValue(source);\n } else if (!animated) {\n values[key] = source;\n }\n });\n return values;\n }\n\n setValue(source) {\n this.source = source;\n this.payload = this._makePayload(source);\n }\n\n reset() {\n if (this.payload) {\n each(this.payload, node => node.reset());\n }\n }\n\n _makePayload(source) {\n if (source) {\n const payload = new Set();\n eachProp(source, this._addToPayload, payload);\n return Array.from(payload);\n }\n }\n\n _addToPayload(source) {\n if (TreeContext.dependencies && hasFluidValue(source)) {\n TreeContext.dependencies.add(source);\n }\n\n const payload = getPayload(source);\n\n if (payload) {\n each(payload, node => this.add(node));\n }\n }\n\n}\n\nclass AnimatedArray extends AnimatedObject {\n constructor(source) {\n super(source);\n }\n\n static create(source) {\n return new AnimatedArray(source);\n }\n\n getValue() {\n return this.source.map(node => node.getValue());\n }\n\n setValue(source) {\n const payload = this.getPayload();\n\n if (source.length == payload.length) {\n return payload.map((node, i) => node.setValue(source[i])).some(Boolean);\n }\n\n super.setValue(source.map(makeAnimated));\n return true;\n }\n\n}\n\nfunction makeAnimated(value) {\n const nodeType = isAnimatedString(value) ? AnimatedString : AnimatedValue;\n return nodeType.create(value);\n}\n\nfunction getAnimatedType(value) {\n const parentNode = getAnimated(value);\n return parentNode ? parentNode.constructor : is.arr(value) ? AnimatedArray : isAnimatedString(value) ? AnimatedString : AnimatedValue;\n}\n\nfunction _extends() {\n _extends = Object.assign || function (target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i];\n\n for (var key in source) {\n if (Object.prototype.hasOwnProperty.call(source, key)) {\n target[key] = source[key];\n }\n }\n }\n\n return target;\n };\n\n return _extends.apply(this, arguments);\n}\n\nconst withAnimated = (Component, host) => {\n const hasInstance = !is.fun(Component) || Component.prototype && Component.prototype.isReactComponent;\n return forwardRef((givenProps, givenRef) => {\n const instanceRef = useRef(null);\n const ref = hasInstance && useCallback(value => {\n instanceRef.current = updateRef(givenRef, value);\n }, [givenRef]);\n const [props, deps] = getAnimatedState(givenProps, host);\n const forceUpdate = useForceUpdate();\n\n const callback = () => {\n const instance = instanceRef.current;\n\n if (hasInstance && !instance) {\n return;\n }\n\n const didUpdate = instance ? host.applyAnimatedValues(instance, props.getValue(true)) : false;\n\n if (didUpdate === false) {\n forceUpdate();\n }\n };\n\n const observer = new PropsObserver(callback, deps);\n const observerRef = useRef();\n useLayoutEffect(() => {\n const lastObserver = observerRef.current;\n observerRef.current = observer;\n each(deps, dep => addFluidObserver(dep, observer));\n\n if (lastObserver) {\n each(lastObserver.deps, dep => removeFluidObserver(dep, lastObserver));\n raf.cancel(lastObserver.update);\n }\n });\n useEffect(callback, []);\n useOnce(() => () => {\n const observer = observerRef.current;\n each(observer.deps, dep => removeFluidObserver(dep, observer));\n });\n const usedProps = host.getComponentProps(props.getValue());\n return React.createElement(Component, _extends({}, usedProps, {\n ref: ref\n }));\n });\n};\n\nclass PropsObserver {\n constructor(update, deps) {\n this.update = update;\n this.deps = deps;\n }\n\n eventObserved(event) {\n if (event.type == 'change') {\n raf.write(this.update);\n }\n }\n\n}\n\nfunction getAnimatedState(props, host) {\n const dependencies = new Set();\n TreeContext.dependencies = dependencies;\n if (props.style) props = _extends({}, props, {\n style: host.createAnimatedStyle(props.style)\n });\n props = new AnimatedObject(props);\n TreeContext.dependencies = null;\n return [props, dependencies];\n}\n\nfunction updateRef(ref, value) {\n if (ref) {\n if (is.fun(ref)) ref(value);else ref.current = value;\n }\n\n return value;\n}\n\nconst cacheKey = Symbol.for('AnimatedComponent');\nconst createHost = (components, {\n applyAnimatedValues: _applyAnimatedValues = () => false,\n createAnimatedStyle: _createAnimatedStyle = style => new AnimatedObject(style),\n getComponentProps: _getComponentProps = props => props\n} = {}) => {\n const hostConfig = {\n applyAnimatedValues: _applyAnimatedValues,\n createAnimatedStyle: _createAnimatedStyle,\n getComponentProps: _getComponentProps\n };\n\n const animated = Component => {\n const displayName = getDisplayName(Component) || 'Anonymous';\n\n if (is.str(Component)) {\n Component = animated[Component] || (animated[Component] = withAnimated(Component, hostConfig));\n } else {\n Component = Component[cacheKey] || (Component[cacheKey] = withAnimated(Component, hostConfig));\n }\n\n Component.displayName = `Animated(${displayName})`;\n return Component;\n };\n\n eachProp(components, (Component, key) => {\n if (is.arr(components)) {\n key = getDisplayName(Component);\n }\n\n animated[key] = animated(Component);\n });\n return {\n animated\n };\n};\n\nconst getDisplayName = arg => is.str(arg) ? arg : arg && is.str(arg.displayName) ? arg.displayName : is.fun(arg) && arg.name || null;\n\nexport { Animated, AnimatedArray, AnimatedObject, AnimatedString, AnimatedValue, createHost, getAnimated, getAnimatedType, getPayload, isAnimated, setAnimated };\n","let updateQueue = makeQueue();\nconst raf = fn => schedule(fn, updateQueue);\nlet writeQueue = makeQueue();\n\nraf.write = fn => schedule(fn, writeQueue);\n\nlet onStartQueue = makeQueue();\n\nraf.onStart = fn => schedule(fn, onStartQueue);\n\nlet onFrameQueue = makeQueue();\n\nraf.onFrame = fn => schedule(fn, onFrameQueue);\n\nlet onFinishQueue = makeQueue();\n\nraf.onFinish = fn => schedule(fn, onFinishQueue);\n\nlet timeouts = [];\n\nraf.setTimeout = (handler, ms) => {\n let time = raf.now() + ms;\n\n let cancel = () => {\n let i = timeouts.findIndex(t => t.cancel == cancel);\n if (~i) timeouts.splice(i, 1);\n pendingCount -= ~i ? 1 : 0;\n };\n\n let timeout = {\n time,\n handler,\n cancel\n };\n timeouts.splice(findTimeout(time), 0, timeout);\n pendingCount += 1;\n start();\n return timeout;\n};\n\nlet findTimeout = time => ~(~timeouts.findIndex(t => t.time > time) || ~timeouts.length);\n\nraf.cancel = fn => {\n onStartQueue.delete(fn);\n onFrameQueue.delete(fn);\n updateQueue.delete(fn);\n writeQueue.delete(fn);\n onFinishQueue.delete(fn);\n};\n\nraf.sync = fn => {\n sync = true;\n raf.batchedUpdates(fn);\n sync = false;\n};\n\nraf.throttle = fn => {\n let lastArgs;\n\n function queuedFn() {\n try {\n fn(...lastArgs);\n } finally {\n lastArgs = null;\n }\n }\n\n function throttled(...args) {\n lastArgs = args;\n raf.onStart(queuedFn);\n }\n\n throttled.handler = fn;\n\n throttled.cancel = () => {\n onStartQueue.delete(queuedFn);\n lastArgs = null;\n };\n\n return throttled;\n};\n\nlet nativeRaf = typeof window != 'undefined' ? window.requestAnimationFrame : () => {};\n\nraf.use = impl => nativeRaf = impl;\n\nraf.now = typeof performance != 'undefined' ? () => performance.now() : Date.now;\n\nraf.batchedUpdates = fn => fn();\n\nraf.catch = console.error;\nraf.frameLoop = 'always';\n\nraf.advance = () => {\n if (raf.frameLoop !== 'demand') {\n console.warn('Cannot call the manual advancement of rafz whilst frameLoop is not set as demand');\n } else {\n update();\n }\n};\n\nlet ts = -1;\nlet pendingCount = 0;\nlet sync = false;\n\nfunction schedule(fn, queue) {\n if (sync) {\n queue.delete(fn);\n fn(0);\n } else {\n queue.add(fn);\n start();\n }\n}\n\nfunction start() {\n if (ts < 0) {\n ts = 0;\n\n if (raf.frameLoop !== 'demand') {\n nativeRaf(loop);\n }\n }\n}\n\nfunction stop() {\n ts = -1;\n}\n\nfunction loop() {\n if (~ts) {\n nativeRaf(loop);\n raf.batchedUpdates(update);\n }\n}\n\nfunction update() {\n let prevTs = ts;\n ts = raf.now();\n let count = findTimeout(ts);\n\n if (count) {\n eachSafely(timeouts.splice(0, count), t => t.handler());\n pendingCount -= count;\n }\n\n onStartQueue.flush();\n updateQueue.flush(prevTs ? Math.min(64, ts - prevTs) : 16.667);\n onFrameQueue.flush();\n writeQueue.flush();\n onFinishQueue.flush();\n\n if (!pendingCount) {\n stop();\n }\n}\n\nfunction makeQueue() {\n let next = new Set();\n let current = next;\n return {\n add(fn) {\n pendingCount += current == next && !next.has(fn) ? 1 : 0;\n next.add(fn);\n },\n\n delete(fn) {\n pendingCount -= current == next && next.has(fn) ? 1 : 0;\n return next.delete(fn);\n },\n\n flush(arg) {\n if (current.size) {\n next = new Set();\n pendingCount -= current.size;\n eachSafely(current, fn => fn(arg) && next.add(fn));\n pendingCount += next.size;\n current = next;\n }\n }\n\n };\n}\n\nfunction eachSafely(values, each) {\n values.forEach(value => {\n try {\n each(value);\n } catch (e) {\n raf.catch(e);\n }\n });\n}\n\nconst __raf = {\n count() {\n return pendingCount;\n },\n\n isRunning() {\n return ts >= 0;\n },\n\n clear() {\n ts = -1;\n timeouts = [];\n onStartQueue = makeQueue();\n updateQueue = makeQueue();\n onFrameQueue = makeQueue();\n writeQueue = makeQueue();\n onFinishQueue = makeQueue();\n pendingCount = 0;\n }\n\n};\n\nexport { __raf, raf };\n","import { raf } from '@react-spring/rafz';\nexport { raf } from '@react-spring/rafz';\nimport * as React from 'react';\nimport { useEffect, useState, useRef } from 'react';\n\nfunction noop() {}\nconst defineHidden = (obj, key, value) => Object.defineProperty(obj, key, {\n value,\n writable: true,\n configurable: true\n});\nconst is = {\n arr: Array.isArray,\n obj: a => !!a && a.constructor.name === 'Object',\n fun: a => typeof a === 'function',\n str: a => typeof a === 'string',\n num: a => typeof a === 'number',\n und: a => a === undefined\n};\nfunction isEqual(a, b) {\n if (is.arr(a)) {\n if (!is.arr(b) || a.length !== b.length) return false;\n\n for (let i = 0; i < a.length; i++) {\n if (a[i] !== b[i]) return false;\n }\n\n return true;\n }\n\n return a === b;\n}\nconst each = (obj, fn) => obj.forEach(fn);\nfunction eachProp(obj, fn, ctx) {\n if (is.arr(obj)) {\n for (let i = 0; i < obj.length; i++) {\n fn.call(ctx, obj[i], `${i}`);\n }\n\n return;\n }\n\n for (const key in obj) {\n if (obj.hasOwnProperty(key)) {\n fn.call(ctx, obj[key], key);\n }\n }\n}\nconst toArray = a => is.und(a) ? [] : is.arr(a) ? a : [a];\nfunction flush(queue, iterator) {\n if (queue.size) {\n const items = Array.from(queue);\n queue.clear();\n each(items, iterator);\n }\n}\nconst flushCalls = (queue, ...args) => flush(queue, fn => fn(...args));\nconst isSSR = () => typeof window === 'undefined' || !window.navigator || /ServerSideRendering|^Deno\\//.test(window.navigator.userAgent);\n\nlet createStringInterpolator$1;\nlet to;\nlet colors$1 = null;\nlet skipAnimation = false;\nlet willAdvance = noop;\nconst assign = globals => {\n if (globals.to) to = globals.to;\n if (globals.now) raf.now = globals.now;\n if (globals.colors !== undefined) colors$1 = globals.colors;\n if (globals.skipAnimation != null) skipAnimation = globals.skipAnimation;\n if (globals.createStringInterpolator) createStringInterpolator$1 = globals.createStringInterpolator;\n if (globals.requestAnimationFrame) raf.use(globals.requestAnimationFrame);\n if (globals.batchedUpdates) raf.batchedUpdates = globals.batchedUpdates;\n if (globals.willAdvance) willAdvance = globals.willAdvance;\n if (globals.frameLoop) raf.frameLoop = globals.frameLoop;\n};\n\nvar globals = /*#__PURE__*/Object.freeze({\n __proto__: null,\n get createStringInterpolator () { return createStringInterpolator$1; },\n get to () { return to; },\n get colors () { return colors$1; },\n get skipAnimation () { return skipAnimation; },\n get willAdvance () { return willAdvance; },\n assign: assign\n});\n\nconst startQueue = new Set();\nlet currentFrame = [];\nlet prevFrame = [];\nlet priority = 0;\nconst frameLoop = {\n get idle() {\n return !startQueue.size && !currentFrame.length;\n },\n\n start(animation) {\n if (priority > animation.priority) {\n startQueue.add(animation);\n raf.onStart(flushStartQueue);\n } else {\n startSafely(animation);\n raf(advance);\n }\n },\n\n advance,\n\n sort(animation) {\n if (priority) {\n raf.onFrame(() => frameLoop.sort(animation));\n } else {\n const prevIndex = currentFrame.indexOf(animation);\n\n if (~prevIndex) {\n currentFrame.splice(prevIndex, 1);\n startUnsafely(animation);\n }\n }\n },\n\n clear() {\n currentFrame = [];\n startQueue.clear();\n }\n\n};\n\nfunction flushStartQueue() {\n startQueue.forEach(startSafely);\n startQueue.clear();\n raf(advance);\n}\n\nfunction startSafely(animation) {\n if (!currentFrame.includes(animation)) startUnsafely(animation);\n}\n\nfunction startUnsafely(animation) {\n currentFrame.splice(findIndex(currentFrame, other => other.priority > animation.priority), 0, animation);\n}\n\nfunction advance(dt) {\n const nextFrame = prevFrame;\n\n for (let i = 0; i < currentFrame.length; i++) {\n const animation = currentFrame[i];\n priority = animation.priority;\n\n if (!animation.idle) {\n willAdvance(animation);\n animation.advance(dt);\n\n if (!animation.idle) {\n nextFrame.push(animation);\n }\n }\n }\n\n priority = 0;\n prevFrame = currentFrame;\n prevFrame.length = 0;\n currentFrame = nextFrame;\n return currentFrame.length > 0;\n}\n\nfunction findIndex(arr, test) {\n const index = arr.findIndex(test);\n return index < 0 ? arr.length : index;\n}\n\nconst colors = {\n transparent: 0x00000000,\n aliceblue: 0xf0f8ffff,\n antiquewhite: 0xfaebd7ff,\n aqua: 0x00ffffff,\n aquamarine: 0x7fffd4ff,\n azure: 0xf0ffffff,\n beige: 0xf5f5dcff,\n bisque: 0xffe4c4ff,\n black: 0x000000ff,\n blanchedalmond: 0xffebcdff,\n blue: 0x0000ffff,\n blueviolet: 0x8a2be2ff,\n brown: 0xa52a2aff,\n burlywood: 0xdeb887ff,\n burntsienna: 0xea7e5dff,\n cadetblue: 0x5f9ea0ff,\n chartreuse: 0x7fff00ff,\n chocolate: 0xd2691eff,\n coral: 0xff7f50ff,\n cornflowerblue: 0x6495edff,\n cornsilk: 0xfff8dcff,\n crimson: 0xdc143cff,\n cyan: 0x00ffffff,\n darkblue: 0x00008bff,\n darkcyan: 0x008b8bff,\n darkgoldenrod: 0xb8860bff,\n darkgray: 0xa9a9a9ff,\n darkgreen: 0x006400ff,\n darkgrey: 0xa9a9a9ff,\n darkkhaki: 0xbdb76bff,\n darkmagenta: 0x8b008bff,\n darkolivegreen: 0x556b2fff,\n darkorange: 0xff8c00ff,\n darkorchid: 0x9932ccff,\n darkred: 0x8b0000ff,\n darksalmon: 0xe9967aff,\n darkseagreen: 0x8fbc8fff,\n darkslateblue: 0x483d8bff,\n darkslategray: 0x2f4f4fff,\n darkslategrey: 0x2f4f4fff,\n darkturquoise: 0x00ced1ff,\n darkviolet: 0x9400d3ff,\n deeppink: 0xff1493ff,\n deepskyblue: 0x00bfffff,\n dimgray: 0x696969ff,\n dimgrey: 0x696969ff,\n dodgerblue: 0x1e90ffff,\n firebrick: 0xb22222ff,\n floralwhite: 0xfffaf0ff,\n forestgreen: 0x228b22ff,\n fuchsia: 0xff00ffff,\n gainsboro: 0xdcdcdcff,\n ghostwhite: 0xf8f8ffff,\n gold: 0xffd700ff,\n goldenrod: 0xdaa520ff,\n gray: 0x808080ff,\n green: 0x008000ff,\n greenyellow: 0xadff2fff,\n grey: 0x808080ff,\n honeydew: 0xf0fff0ff,\n hotpink: 0xff69b4ff,\n indianred: 0xcd5c5cff,\n indigo: 0x4b0082ff,\n ivory: 0xfffff0ff,\n khaki: 0xf0e68cff,\n lavender: 0xe6e6faff,\n lavenderblush: 0xfff0f5ff,\n lawngreen: 0x7cfc00ff,\n lemonchiffon: 0xfffacdff,\n lightblue: 0xadd8e6ff,\n lightcoral: 0xf08080ff,\n lightcyan: 0xe0ffffff,\n lightgoldenrodyellow: 0xfafad2ff,\n lightgray: 0xd3d3d3ff,\n lightgreen: 0x90ee90ff,\n lightgrey: 0xd3d3d3ff,\n lightpink: 0xffb6c1ff,\n lightsalmon: 0xffa07aff,\n lightseagreen: 0x20b2aaff,\n lightskyblue: 0x87cefaff,\n lightslategray: 0x778899ff,\n lightslategrey: 0x778899ff,\n lightsteelblue: 0xb0c4deff,\n lightyellow: 0xffffe0ff,\n lime: 0x00ff00ff,\n limegreen: 0x32cd32ff,\n linen: 0xfaf0e6ff,\n magenta: 0xff00ffff,\n maroon: 0x800000ff,\n mediumaquamarine: 0x66cdaaff,\n mediumblue: 0x0000cdff,\n mediumorchid: 0xba55d3ff,\n mediumpurple: 0x9370dbff,\n mediumseagreen: 0x3cb371ff,\n mediumslateblue: 0x7b68eeff,\n mediumspringgreen: 0x00fa9aff,\n mediumturquoise: 0x48d1ccff,\n mediumvioletred: 0xc71585ff,\n midnightblue: 0x191970ff,\n mintcream: 0xf5fffaff,\n mistyrose: 0xffe4e1ff,\n moccasin: 0xffe4b5ff,\n navajowhite: 0xffdeadff,\n navy: 0x000080ff,\n oldlace: 0xfdf5e6ff,\n olive: 0x808000ff,\n olivedrab: 0x6b8e23ff,\n orange: 0xffa500ff,\n orangered: 0xff4500ff,\n orchid: 0xda70d6ff,\n palegoldenrod: 0xeee8aaff,\n palegreen: 0x98fb98ff,\n paleturquoise: 0xafeeeeff,\n palevioletred: 0xdb7093ff,\n papayawhip: 0xffefd5ff,\n peachpuff: 0xffdab9ff,\n peru: 0xcd853fff,\n pink: 0xffc0cbff,\n plum: 0xdda0ddff,\n powderblue: 0xb0e0e6ff,\n purple: 0x800080ff,\n rebeccapurple: 0x663399ff,\n red: 0xff0000ff,\n rosybrown: 0xbc8f8fff,\n royalblue: 0x4169e1ff,\n saddlebrown: 0x8b4513ff,\n salmon: 0xfa8072ff,\n sandybrown: 0xf4a460ff,\n seagreen: 0x2e8b57ff,\n seashell: 0xfff5eeff,\n sienna: 0xa0522dff,\n silver: 0xc0c0c0ff,\n skyblue: 0x87ceebff,\n slateblue: 0x6a5acdff,\n slategray: 0x708090ff,\n slategrey: 0x708090ff,\n snow: 0xfffafaff,\n springgreen: 0x00ff7fff,\n steelblue: 0x4682b4ff,\n tan: 0xd2b48cff,\n teal: 0x008080ff,\n thistle: 0xd8bfd8ff,\n tomato: 0xff6347ff,\n turquoise: 0x40e0d0ff,\n violet: 0xee82eeff,\n wheat: 0xf5deb3ff,\n white: 0xffffffff,\n whitesmoke: 0xf5f5f5ff,\n yellow: 0xffff00ff,\n yellowgreen: 0x9acd32ff\n};\n\nconst NUMBER = '[-+]?\\\\d*\\\\.?\\\\d+';\nconst PERCENTAGE = NUMBER + '%';\n\nfunction call(...parts) {\n return '\\\\(\\\\s*(' + parts.join(')\\\\s*,\\\\s*(') + ')\\\\s*\\\\)';\n}\n\nconst rgb = new RegExp('rgb' + call(NUMBER, NUMBER, NUMBER));\nconst rgba = new RegExp('rgba' + call(NUMBER, NUMBER, NUMBER, NUMBER));\nconst hsl = new RegExp('hsl' + call(NUMBER, PERCENTAGE, PERCENTAGE));\nconst hsla = new RegExp('hsla' + call(NUMBER, PERCENTAGE, PERCENTAGE, NUMBER));\nconst hex3 = /^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/;\nconst hex4 = /^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/;\nconst hex6 = /^#([0-9a-fA-F]{6})$/;\nconst hex8 = /^#([0-9a-fA-F]{8})$/;\n\nfunction normalizeColor(color) {\n let match;\n\n if (typeof color === 'number') {\n return color >>> 0 === color && color >= 0 && color <= 0xffffffff ? color : null;\n }\n\n if (match = hex6.exec(color)) return parseInt(match[1] + 'ff', 16) >>> 0;\n\n if (colors$1 && colors$1[color] !== undefined) {\n return colors$1[color];\n }\n\n if (match = rgb.exec(color)) {\n return (parse255(match[1]) << 24 | parse255(match[2]) << 16 | parse255(match[3]) << 8 | 0x000000ff) >>> 0;\n }\n\n if (match = rgba.exec(color)) {\n return (parse255(match[1]) << 24 | parse255(match[2]) << 16 | parse255(match[3]) << 8 | parse1(match[4])) >>> 0;\n }\n\n if (match = hex3.exec(color)) {\n return parseInt(match[1] + match[1] + match[2] + match[2] + match[3] + match[3] + 'ff', 16) >>> 0;\n }\n\n if (match = hex8.exec(color)) return parseInt(match[1], 16) >>> 0;\n\n if (match = hex4.exec(color)) {\n return parseInt(match[1] + match[1] + match[2] + match[2] + match[3] + match[3] + match[4] + match[4], 16) >>> 0;\n }\n\n if (match = hsl.exec(color)) {\n return (hslToRgb(parse360(match[1]), parsePercentage(match[2]), parsePercentage(match[3])) | 0x000000ff) >>> 0;\n }\n\n if (match = hsla.exec(color)) {\n return (hslToRgb(parse360(match[1]), parsePercentage(match[2]), parsePercentage(match[3])) | parse1(match[4])) >>> 0;\n }\n\n return null;\n}\n\nfunction hue2rgb(p, q, t) {\n if (t < 0) t += 1;\n if (t > 1) t -= 1;\n if (t < 1 / 6) return p + (q - p) * 6 * t;\n if (t < 1 / 2) return q;\n if (t < 2 / 3) return p + (q - p) * (2 / 3 - t) * 6;\n return p;\n}\n\nfunction hslToRgb(h, s, l) {\n const q = l < 0.5 ? l * (1 + s) : l + s - l * s;\n const p = 2 * l - q;\n const r = hue2rgb(p, q, h + 1 / 3);\n const g = hue2rgb(p, q, h);\n const b = hue2rgb(p, q, h - 1 / 3);\n return Math.round(r * 255) << 24 | Math.round(g * 255) << 16 | Math.round(b * 255) << 8;\n}\n\nfunction parse255(str) {\n const int = parseInt(str, 10);\n if (int < 0) return 0;\n if (int > 255) return 255;\n return int;\n}\n\nfunction parse360(str) {\n const int = parseFloat(str);\n return (int % 360 + 360) % 360 / 360;\n}\n\nfunction parse1(str) {\n const num = parseFloat(str);\n if (num < 0) return 0;\n if (num > 1) return 255;\n return Math.round(num * 255);\n}\n\nfunction parsePercentage(str) {\n const int = parseFloat(str);\n if (int < 0) return 0;\n if (int > 100) return 1;\n return int / 100;\n}\n\nfunction colorToRgba(input) {\n let int32Color = normalizeColor(input);\n if (int32Color === null) return input;\n int32Color = int32Color || 0;\n let r = (int32Color & 0xff000000) >>> 24;\n let g = (int32Color & 0x00ff0000) >>> 16;\n let b = (int32Color & 0x0000ff00) >>> 8;\n let a = (int32Color & 0x000000ff) / 255;\n return `rgba(${r}, ${g}, ${b}, ${a})`;\n}\n\nconst createInterpolator = (range, output, extrapolate) => {\n if (is.fun(range)) {\n return range;\n }\n\n if (is.arr(range)) {\n return createInterpolator({\n range,\n output: output,\n extrapolate\n });\n }\n\n if (is.str(range.output[0])) {\n return createStringInterpolator$1(range);\n }\n\n const config = range;\n const outputRange = config.output;\n const inputRange = config.range || [0, 1];\n const extrapolateLeft = config.extrapolateLeft || config.extrapolate || 'extend';\n const extrapolateRight = config.extrapolateRight || config.extrapolate || 'extend';\n\n const easing = config.easing || (t => t);\n\n return input => {\n const range = findRange(input, inputRange);\n return interpolate(input, inputRange[range], inputRange[range + 1], outputRange[range], outputRange[range + 1], easing, extrapolateLeft, extrapolateRight, config.map);\n };\n};\n\nfunction interpolate(input, inputMin, inputMax, outputMin, outputMax, easing, extrapolateLeft, extrapolateRight, map) {\n let result = map ? map(input) : input;\n\n if (result < inputMin) {\n if (extrapolateLeft === 'identity') return result;else if (extrapolateLeft === 'clamp') result = inputMin;\n }\n\n if (result > inputMax) {\n if (extrapolateRight === 'identity') return result;else if (extrapolateRight === 'clamp') result = inputMax;\n }\n\n if (outputMin === outputMax) return outputMin;\n if (inputMin === inputMax) return input <= inputMin ? outputMin : outputMax;\n if (inputMin === -Infinity) result = -result;else if (inputMax === Infinity) result = result - inputMin;else result = (result - inputMin) / (inputMax - inputMin);\n result = easing(result);\n if (outputMin === -Infinity) result = -result;else if (outputMax === Infinity) result = result + outputMin;else result = result * (outputMax - outputMin) + outputMin;\n return result;\n}\n\nfunction findRange(input, inputRange) {\n for (var i = 1; i < inputRange.length - 1; ++i) if (inputRange[i] >= input) break;\n\n return i - 1;\n}\n\nfunction _extends() {\n _extends = Object.assign || function (target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i];\n\n for (var key in source) {\n if (Object.prototype.hasOwnProperty.call(source, key)) {\n target[key] = source[key];\n }\n }\n }\n\n return target;\n };\n\n return _extends.apply(this, arguments);\n}\n\nconst $get = Symbol.for('FluidValue.get');\nconst $observers = Symbol.for('FluidValue.observers');\n\nconst hasFluidValue = arg => Boolean(arg && arg[$get]);\n\nconst getFluidValue = arg => arg && arg[$get] ? arg[$get]() : arg;\n\nconst getFluidObservers = target => target[$observers] || null;\n\nfunction callFluidObserver(observer, event) {\n if (observer.eventObserved) {\n observer.eventObserved(event);\n } else {\n observer(event);\n }\n}\n\nfunction callFluidObservers(target, event) {\n let observers = target[$observers];\n\n if (observers) {\n observers.forEach(observer => {\n callFluidObserver(observer, event);\n });\n }\n}\n\nclass FluidValue {\n constructor(get) {\n this[$get] = void 0;\n this[$observers] = void 0;\n\n if (!get && !(get = this.get)) {\n throw Error('Unknown getter');\n }\n\n setFluidGetter(this, get);\n }\n\n}\n\nconst setFluidGetter = (target, get) => setHidden(target, $get, get);\n\nfunction addFluidObserver(target, observer) {\n if (target[$get]) {\n let observers = target[$observers];\n\n if (!observers) {\n setHidden(target, $observers, observers = new Set());\n }\n\n if (!observers.has(observer)) {\n observers.add(observer);\n\n if (target.observerAdded) {\n target.observerAdded(observers.size, observer);\n }\n }\n }\n\n return observer;\n}\n\nfunction removeFluidObserver(target, observer) {\n let observers = target[$observers];\n\n if (observers && observers.has(observer)) {\n const count = observers.size - 1;\n\n if (count) {\n observers.delete(observer);\n } else {\n target[$observers] = null;\n }\n\n if (target.observerRemoved) {\n target.observerRemoved(count, observer);\n }\n }\n}\n\nconst setHidden = (target, key, value) => Object.defineProperty(target, key, {\n value,\n writable: true,\n configurable: true\n});\n\nconst numberRegex = /[+\\-]?(?:0|[1-9]\\d*)(?:\\.\\d*)?(?:[eE][+\\-]?\\d+)?/g;\nconst colorRegex = /(#(?:[0-9a-f]{2}){2,4}|(#[0-9a-f]{3})|(rgb|hsl)a?\\((-?\\d+%?[,\\s]+){2,3}\\s*[\\d\\.]+%?\\))/gi;\nconst unitRegex = new RegExp(`(${numberRegex.source})(%|[a-z]+)`, 'i');\nconst rgbaRegex = /rgba\\(([0-9\\.-]+), ([0-9\\.-]+), ([0-9\\.-]+), ([0-9\\.-]+)\\)/gi;\nconst cssVariableRegex = /var\\((--[a-zA-Z0-9-_]+),? ?([a-zA-Z0-9 ()%#.,-]+)?\\)/;\n\nconst variableToRgba = input => {\n const [token, fallback] = parseCSSVariable(input);\n\n if (!token || isSSR()) {\n return input;\n }\n\n const value = window.getComputedStyle(document.documentElement).getPropertyValue(token);\n\n if (value) {\n return value.trim();\n } else if (fallback && fallback.startsWith('--')) {\n const _value = window.getComputedStyle(document.documentElement).getPropertyValue(fallback);\n\n if (_value) {\n return _value;\n } else {\n return input;\n }\n } else if (fallback && cssVariableRegex.test(fallback)) {\n return variableToRgba(fallback);\n } else if (fallback) {\n return fallback;\n }\n\n return input;\n};\n\nconst parseCSSVariable = current => {\n const match = cssVariableRegex.exec(current);\n if (!match) return [,];\n const [, token, fallback] = match;\n return [token, fallback];\n};\n\nlet namedColorRegex;\n\nconst rgbaRound = (_, p1, p2, p3, p4) => `rgba(${Math.round(p1)}, ${Math.round(p2)}, ${Math.round(p3)}, ${p4})`;\n\nconst createStringInterpolator = config => {\n if (!namedColorRegex) namedColorRegex = colors$1 ? new RegExp(`(${Object.keys(colors$1).join('|')})(?!\\\\w)`, 'g') : /^\\b$/;\n const output = config.output.map(value => {\n return getFluidValue(value).replace(cssVariableRegex, variableToRgba).replace(colorRegex, colorToRgba).replace(namedColorRegex, colorToRgba);\n });\n const keyframes = output.map(value => value.match(numberRegex).map(Number));\n const outputRanges = keyframes[0].map((_, i) => keyframes.map(values => {\n if (!(i in values)) {\n throw Error('The arity of each \"output\" value must be equal');\n }\n\n return values[i];\n }));\n const interpolators = outputRanges.map(output => createInterpolator(_extends({}, config, {\n output\n })));\n return input => {\n var _output$find;\n\n const missingUnit = !unitRegex.test(output[0]) && ((_output$find = output.find(value => unitRegex.test(value))) == null ? void 0 : _output$find.replace(numberRegex, ''));\n let i = 0;\n return output[0].replace(numberRegex, () => `${interpolators[i++](input)}${missingUnit || ''}`).replace(rgbaRegex, rgbaRound);\n };\n};\n\nconst prefix = 'react-spring: ';\n\nconst once = fn => {\n const func = fn;\n let called = false;\n\n if (typeof func != 'function') {\n throw new TypeError(`${prefix}once requires a function parameter`);\n }\n\n return (...args) => {\n if (!called) {\n func(...args);\n called = true;\n }\n };\n};\n\nconst warnInterpolate = once(console.warn);\nfunction deprecateInterpolate() {\n warnInterpolate(`${prefix}The \"interpolate\" function is deprecated in v9 (use \"to\" instead)`);\n}\nconst warnDirectCall = once(console.warn);\nfunction deprecateDirectCall() {\n warnDirectCall(`${prefix}Directly calling start instead of using the api object is deprecated in v9 (use \".start\" instead), this will be removed in later 0.X.0 versions`);\n}\n\nfunction isAnimatedString(value) {\n return is.str(value) && (value[0] == '#' || /\\d/.test(value) || !isSSR() && cssVariableRegex.test(value) || value in (colors$1 || {}));\n}\n\nconst useOnce = effect => useEffect(effect, emptyDeps);\nconst emptyDeps = [];\n\nfunction useForceUpdate() {\n const update = useState()[1];\n const mounted = useState(makeMountedRef)[0];\n useOnce(mounted.unmount);\n return () => {\n if (mounted.current) {\n update({});\n }\n };\n}\n\nfunction makeMountedRef() {\n const mounted = {\n current: true,\n unmount: () => () => {\n mounted.current = false;\n }\n };\n return mounted;\n}\n\nfunction useMemoOne(getResult, inputs) {\n const [initial] = useState(() => ({\n inputs,\n result: getResult()\n }));\n const committed = useRef();\n const prevCache = committed.current;\n let cache = prevCache;\n\n if (cache) {\n const useCache = Boolean(inputs && cache.inputs && areInputsEqual(inputs, cache.inputs));\n\n if (!useCache) {\n cache = {\n inputs,\n result: getResult()\n };\n }\n } else {\n cache = initial;\n }\n\n useEffect(() => {\n committed.current = cache;\n\n if (prevCache == initial) {\n initial.inputs = initial.result = undefined;\n }\n }, [cache]);\n return cache.result;\n}\n\nfunction areInputsEqual(next, prev) {\n if (next.length !== prev.length) {\n return false;\n }\n\n for (let i = 0; i < next.length; i++) {\n if (next[i] !== prev[i]) {\n return false;\n }\n }\n\n return true;\n}\n\nfunction usePrev(value) {\n const prevRef = useRef();\n useEffect(() => {\n prevRef.current = value;\n });\n return prevRef.current;\n}\n\nconst useLayoutEffect = typeof window !== 'undefined' && window.document && window.document.createElement ? React.useLayoutEffect : React.useEffect;\n\nexport { FluidValue, globals as Globals, addFluidObserver, callFluidObserver, callFluidObservers, colorToRgba, colors, createInterpolator, createStringInterpolator, defineHidden, deprecateDirectCall, deprecateInterpolate, each, eachProp, flush, flushCalls, frameLoop, getFluidObservers, getFluidValue, hasFluidValue, hex3, hex4, hex6, hex8, hsl, hsla, is, isAnimatedString, isEqual, isSSR, noop, removeFluidObserver, rgb, rgba, setFluidGetter, toArray, useForceUpdate, useLayoutEffect, useMemoOne, useOnce, usePrev };\n","import { eachProp, is, toArray, isAnimatedString, Globals, getFluidValue, useLayoutEffect, each, raf, flush, FluidValue, deprecateInterpolate, callFluidObservers, frameLoop, hasFluidValue, flushCalls, isEqual, getFluidObservers, addFluidObserver, removeFluidObserver, noop, useMemoOne, deprecateDirectCall, useForceUpdate, usePrev, useOnce, createInterpolator, createStringInterpolator } from '@react-spring/shared';\nexport { Globals, createInterpolator } from '@react-spring/shared';\nimport * as React from 'react';\nimport { useContext, useMemo, useRef, useState } from 'react';\nimport { getAnimated, AnimatedValue, getPayload, AnimatedString, getAnimatedType, setAnimated } from '@react-spring/animated';\nexport * from '@react-spring/types/animated';\nexport * from '@react-spring/types/interpolation';\n\nfunction _extends() {\n _extends = Object.assign || function (target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i];\n\n for (var key in source) {\n if (Object.prototype.hasOwnProperty.call(source, key)) {\n target[key] = source[key];\n }\n }\n }\n\n return target;\n };\n\n return _extends.apply(this, arguments);\n}\n\nfunction callProp(value, ...args) {\n return is.fun(value) ? value(...args) : value;\n}\nconst matchProp = (value, key) => value === true || !!(key && value && (is.fun(value) ? value(key) : toArray(value).includes(key)));\nconst resolveProp = (prop, key) => is.obj(prop) ? key && prop[key] : prop;\nconst getDefaultProp = (props, key) => props.default === true ? props[key] : props.default ? props.default[key] : undefined;\n\nconst noopTransform = value => value;\n\nconst getDefaultProps = (props, transform = noopTransform) => {\n let keys = DEFAULT_PROPS;\n\n if (props.default && props.default !== true) {\n props = props.default;\n keys = Object.keys(props);\n }\n\n const defaults = {};\n\n for (const key of keys) {\n const value = transform(props[key], key);\n\n if (!is.und(value)) {\n defaults[key] = value;\n }\n }\n\n return defaults;\n};\nconst DEFAULT_PROPS = ['config', 'onProps', 'onStart', 'onChange', 'onPause', 'onResume', 'onRest'];\nconst RESERVED_PROPS = {\n config: 1,\n from: 1,\n to: 1,\n ref: 1,\n loop: 1,\n reset: 1,\n pause: 1,\n cancel: 1,\n reverse: 1,\n immediate: 1,\n default: 1,\n delay: 1,\n onProps: 1,\n onStart: 1,\n onChange: 1,\n onPause: 1,\n onResume: 1,\n onRest: 1,\n onResolve: 1,\n items: 1,\n trail: 1,\n sort: 1,\n expires: 1,\n initial: 1,\n enter: 1,\n update: 1,\n leave: 1,\n children: 1,\n onDestroyed: 1,\n keys: 1,\n callId: 1,\n parentId: 1\n};\n\nfunction getForwardProps(props) {\n const forward = {};\n let count = 0;\n eachProp(props, (value, prop) => {\n if (!RESERVED_PROPS[prop]) {\n forward[prop] = value;\n count++;\n }\n });\n\n if (count) {\n return forward;\n }\n}\n\nfunction inferTo(props) {\n const to = getForwardProps(props);\n\n if (to) {\n const out = {\n to\n };\n eachProp(props, (val, key) => key in to || (out[key] = val));\n return out;\n }\n\n return _extends({}, props);\n}\nfunction computeGoal(value) {\n value = getFluidValue(value);\n return is.arr(value) ? value.map(computeGoal) : isAnimatedString(value) ? Globals.createStringInterpolator({\n range: [0, 1],\n output: [value, value]\n })(1) : value;\n}\nfunction hasProps(props) {\n for (const _ in props) return true;\n\n return false;\n}\nfunction isAsyncTo(to) {\n return is.fun(to) || is.arr(to) && is.obj(to[0]);\n}\nfunction detachRefs(ctrl, ref) {\n var _ctrl$ref;\n\n (_ctrl$ref = ctrl.ref) == null ? void 0 : _ctrl$ref.delete(ctrl);\n ref == null ? void 0 : ref.delete(ctrl);\n}\nfunction replaceRef(ctrl, ref) {\n if (ref && ctrl.ref !== ref) {\n var _ctrl$ref2;\n\n (_ctrl$ref2 = ctrl.ref) == null ? void 0 : _ctrl$ref2.delete(ctrl);\n ref.add(ctrl);\n ctrl.ref = ref;\n }\n}\n\nfunction useChain(refs, timeSteps, timeFrame = 1000) {\n useLayoutEffect(() => {\n if (timeSteps) {\n let prevDelay = 0;\n each(refs, (ref, i) => {\n const controllers = ref.current;\n\n if (controllers.length) {\n let delay = timeFrame * timeSteps[i];\n if (isNaN(delay)) delay = prevDelay;else prevDelay = delay;\n each(controllers, ctrl => {\n each(ctrl.queue, props => {\n const memoizedDelayProp = props.delay;\n\n props.delay = key => delay + callProp(memoizedDelayProp || 0, key);\n });\n });\n ref.start();\n }\n });\n } else {\n let p = Promise.resolve();\n each(refs, ref => {\n const controllers = ref.current;\n\n if (controllers.length) {\n const queues = controllers.map(ctrl => {\n const q = ctrl.queue;\n ctrl.queue = [];\n return q;\n });\n p = p.then(() => {\n each(controllers, (ctrl, i) => each(queues[i] || [], update => ctrl.queue.push(update)));\n return Promise.all(ref.start());\n });\n }\n });\n }\n });\n}\n\nconst config = {\n default: {\n tension: 170,\n friction: 26\n },\n gentle: {\n tension: 120,\n friction: 14\n },\n wobbly: {\n tension: 180,\n friction: 12\n },\n stiff: {\n tension: 210,\n friction: 20\n },\n slow: {\n tension: 280,\n friction: 60\n },\n molasses: {\n tension: 280,\n friction: 120\n }\n};\nconst c1 = 1.70158;\nconst c2 = c1 * 1.525;\nconst c3 = c1 + 1;\nconst c4 = 2 * Math.PI / 3;\nconst c5 = 2 * Math.PI / 4.5;\n\nconst bounceOut = x => {\n const n1 = 7.5625;\n const d1 = 2.75;\n\n if (x < 1 / d1) {\n return n1 * x * x;\n } else if (x < 2 / d1) {\n return n1 * (x -= 1.5 / d1) * x + 0.75;\n } else if (x < 2.5 / d1) {\n return n1 * (x -= 2.25 / d1) * x + 0.9375;\n } else {\n return n1 * (x -= 2.625 / d1) * x + 0.984375;\n }\n};\n\nconst easings = {\n linear: x => x,\n easeInQuad: x => x * x,\n easeOutQuad: x => 1 - (1 - x) * (1 - x),\n easeInOutQuad: x => x < 0.5 ? 2 * x * x : 1 - Math.pow(-2 * x + 2, 2) / 2,\n easeInCubic: x => x * x * x,\n easeOutCubic: x => 1 - Math.pow(1 - x, 3),\n easeInOutCubic: x => x < 0.5 ? 4 * x * x * x : 1 - Math.pow(-2 * x + 2, 3) / 2,\n easeInQuart: x => x * x * x * x,\n easeOutQuart: x => 1 - Math.pow(1 - x, 4),\n easeInOutQuart: x => x < 0.5 ? 8 * x * x * x * x : 1 - Math.pow(-2 * x + 2, 4) / 2,\n easeInQuint: x => x * x * x * x * x,\n easeOutQuint: x => 1 - Math.pow(1 - x, 5),\n easeInOutQuint: x => x < 0.5 ? 16 * x * x * x * x * x : 1 - Math.pow(-2 * x + 2, 5) / 2,\n easeInSine: x => 1 - Math.cos(x * Math.PI / 2),\n easeOutSine: x => Math.sin(x * Math.PI / 2),\n easeInOutSine: x => -(Math.cos(Math.PI * x) - 1) / 2,\n easeInExpo: x => x === 0 ? 0 : Math.pow(2, 10 * x - 10),\n easeOutExpo: x => x === 1 ? 1 : 1 - Math.pow(2, -10 * x),\n easeInOutExpo: x => x === 0 ? 0 : x === 1 ? 1 : x < 0.5 ? Math.pow(2, 20 * x - 10) / 2 : (2 - Math.pow(2, -20 * x + 10)) / 2,\n easeInCirc: x => 1 - Math.sqrt(1 - Math.pow(x, 2)),\n easeOutCirc: x => Math.sqrt(1 - Math.pow(x - 1, 2)),\n easeInOutCirc: x => x < 0.5 ? (1 - Math.sqrt(1 - Math.pow(2 * x, 2))) / 2 : (Math.sqrt(1 - Math.pow(-2 * x + 2, 2)) + 1) / 2,\n easeInBack: x => c3 * x * x * x - c1 * x * x,\n easeOutBack: x => 1 + c3 * Math.pow(x - 1, 3) + c1 * Math.pow(x - 1, 2),\n easeInOutBack: x => x < 0.5 ? Math.pow(2 * x, 2) * ((c2 + 1) * 2 * x - c2) / 2 : (Math.pow(2 * x - 2, 2) * ((c2 + 1) * (x * 2 - 2) + c2) + 2) / 2,\n easeInElastic: x => x === 0 ? 0 : x === 1 ? 1 : -Math.pow(2, 10 * x - 10) * Math.sin((x * 10 - 10.75) * c4),\n easeOutElastic: x => x === 0 ? 0 : x === 1 ? 1 : Math.pow(2, -10 * x) * Math.sin((x * 10 - 0.75) * c4) + 1,\n easeInOutElastic: x => x === 0 ? 0 : x === 1 ? 1 : x < 0.5 ? -(Math.pow(2, 20 * x - 10) * Math.sin((20 * x - 11.125) * c5)) / 2 : Math.pow(2, -20 * x + 10) * Math.sin((20 * x - 11.125) * c5) / 2 + 1,\n easeInBounce: x => 1 - bounceOut(1 - x),\n easeOutBounce: bounceOut,\n easeInOutBounce: x => x < 0.5 ? (1 - bounceOut(1 - 2 * x)) / 2 : (1 + bounceOut(2 * x - 1)) / 2\n};\n\nconst defaults = _extends({}, config.default, {\n mass: 1,\n damping: 1,\n easing: easings.linear,\n clamp: false\n});\n\nclass AnimationConfig {\n constructor() {\n this.tension = void 0;\n this.friction = void 0;\n this.frequency = void 0;\n this.damping = void 0;\n this.mass = void 0;\n this.velocity = 0;\n this.restVelocity = void 0;\n this.precision = void 0;\n this.progress = void 0;\n this.duration = void 0;\n this.easing = void 0;\n this.clamp = void 0;\n this.bounce = void 0;\n this.decay = void 0;\n this.round = void 0;\n Object.assign(this, defaults);\n }\n\n}\nfunction mergeConfig(config, newConfig, defaultConfig) {\n if (defaultConfig) {\n defaultConfig = _extends({}, defaultConfig);\n sanitizeConfig(defaultConfig, newConfig);\n newConfig = _extends({}, defaultConfig, newConfig);\n }\n\n sanitizeConfig(config, newConfig);\n Object.assign(config, newConfig);\n\n for (const key in defaults) {\n if (config[key] == null) {\n config[key] = defaults[key];\n }\n }\n\n let {\n mass,\n frequency,\n damping\n } = config;\n\n if (!is.und(frequency)) {\n if (frequency < 0.01) frequency = 0.01;\n if (damping < 0) damping = 0;\n config.tension = Math.pow(2 * Math.PI / frequency, 2) * mass;\n config.friction = 4 * Math.PI * damping * mass / frequency;\n }\n\n return config;\n}\n\nfunction sanitizeConfig(config, props) {\n if (!is.und(props.decay)) {\n config.duration = undefined;\n } else {\n const isTensionConfig = !is.und(props.tension) || !is.und(props.friction);\n\n if (isTensionConfig || !is.und(props.frequency) || !is.und(props.damping) || !is.und(props.mass)) {\n config.duration = undefined;\n config.decay = undefined;\n }\n\n if (isTensionConfig) {\n config.frequency = undefined;\n }\n }\n}\n\nconst emptyArray = [];\nclass Animation {\n constructor() {\n this.changed = false;\n this.values = emptyArray;\n this.toValues = null;\n this.fromValues = emptyArray;\n this.to = void 0;\n this.from = void 0;\n this.config = new AnimationConfig();\n this.immediate = false;\n }\n\n}\n\nfunction scheduleProps(callId, {\n key,\n props,\n defaultProps,\n state,\n actions\n}) {\n return new Promise((resolve, reject) => {\n var _props$cancel;\n\n let delay;\n let timeout;\n let cancel = matchProp((_props$cancel = props.cancel) != null ? _props$cancel : defaultProps == null ? void 0 : defaultProps.cancel, key);\n\n if (cancel) {\n onStart();\n } else {\n if (!is.und(props.pause)) {\n state.paused = matchProp(props.pause, key);\n }\n\n let pause = defaultProps == null ? void 0 : defaultProps.pause;\n\n if (pause !== true) {\n pause = state.paused || matchProp(pause, key);\n }\n\n delay = callProp(props.delay || 0, key);\n\n if (pause) {\n state.resumeQueue.add(onResume);\n actions.pause();\n } else {\n actions.resume();\n onResume();\n }\n }\n\n function onPause() {\n state.resumeQueue.add(onResume);\n state.timeouts.delete(timeout);\n timeout.cancel();\n delay = timeout.time - raf.now();\n }\n\n function onResume() {\n if (delay > 0 && !Globals.skipAnimation) {\n state.delayed = true;\n timeout = raf.setTimeout(onStart, delay);\n state.pauseQueue.add(onPause);\n state.timeouts.add(timeout);\n } else {\n onStart();\n }\n }\n\n function onStart() {\n if (state.delayed) {\n state.delayed = false;\n }\n\n state.pauseQueue.delete(onPause);\n state.timeouts.delete(timeout);\n\n if (callId <= (state.cancelId || 0)) {\n cancel = true;\n }\n\n try {\n actions.start(_extends({}, props, {\n callId,\n cancel\n }), resolve);\n } catch (err) {\n reject(err);\n }\n }\n });\n}\n\nconst getCombinedResult = (target, results) => results.length == 1 ? results[0] : results.some(result => result.cancelled) ? getCancelledResult(target.get()) : results.every(result => result.noop) ? getNoopResult(target.get()) : getFinishedResult(target.get(), results.every(result => result.finished));\nconst getNoopResult = value => ({\n value,\n noop: true,\n finished: true,\n cancelled: false\n});\nconst getFinishedResult = (value, finished, cancelled = false) => ({\n value,\n finished,\n cancelled\n});\nconst getCancelledResult = value => ({\n value,\n cancelled: true,\n finished: false\n});\n\nfunction runAsync(to, props, state, target) {\n const {\n callId,\n parentId,\n onRest\n } = props;\n const {\n asyncTo: prevTo,\n promise: prevPromise\n } = state;\n\n if (!parentId && to === prevTo && !props.reset) {\n return prevPromise;\n }\n\n return state.promise = (async () => {\n state.asyncId = callId;\n state.asyncTo = to;\n const defaultProps = getDefaultProps(props, (value, key) => key === 'onRest' ? undefined : value);\n let preventBail;\n let bail;\n const bailPromise = new Promise((resolve, reject) => (preventBail = resolve, bail = reject));\n\n const bailIfEnded = bailSignal => {\n const bailResult = callId <= (state.cancelId || 0) && getCancelledResult(target) || callId !== state.asyncId && getFinishedResult(target, false);\n\n if (bailResult) {\n bailSignal.result = bailResult;\n bail(bailSignal);\n throw bailSignal;\n }\n };\n\n const animate = (arg1, arg2) => {\n const bailSignal = new BailSignal();\n const skipAnimationSignal = new SkipAniamtionSignal();\n return (async () => {\n if (Globals.skipAnimation) {\n stopAsync(state);\n skipAnimationSignal.result = getFinishedResult(target, false);\n bail(skipAnimationSignal);\n throw skipAnimationSignal;\n }\n\n bailIfEnded(bailSignal);\n const props = is.obj(arg1) ? _extends({}, arg1) : _extends({}, arg2, {\n to: arg1\n });\n props.parentId = callId;\n eachProp(defaultProps, (value, key) => {\n if (is.und(props[key])) {\n props[key] = value;\n }\n });\n const result = await target.start(props);\n bailIfEnded(bailSignal);\n\n if (state.paused) {\n await new Promise(resume => {\n state.resumeQueue.add(resume);\n });\n }\n\n return result;\n })();\n };\n\n let result;\n\n if (Globals.skipAnimation) {\n stopAsync(state);\n return getFinishedResult(target, false);\n }\n\n try {\n let animating;\n\n if (is.arr(to)) {\n animating = (async queue => {\n for (const props of queue) {\n await animate(props);\n }\n })(to);\n } else {\n animating = Promise.resolve(to(animate, target.stop.bind(target)));\n }\n\n await Promise.all([animating.then(preventBail), bailPromise]);\n result = getFinishedResult(target.get(), true, false);\n } catch (err) {\n if (err instanceof BailSignal) {\n result = err.result;\n } else if (err instanceof SkipAniamtionSignal) {\n result = err.result;\n } else {\n throw err;\n }\n } finally {\n if (callId == state.asyncId) {\n state.asyncId = parentId;\n state.asyncTo = parentId ? prevTo : undefined;\n state.promise = parentId ? prevPromise : undefined;\n }\n }\n\n if (is.fun(onRest)) {\n raf.batchedUpdates(() => {\n onRest(result, target, target.item);\n });\n }\n\n return result;\n })();\n}\nfunction stopAsync(state, cancelId) {\n flush(state.timeouts, t => t.cancel());\n state.pauseQueue.clear();\n state.resumeQueue.clear();\n state.asyncId = state.asyncTo = state.promise = undefined;\n if (cancelId) state.cancelId = cancelId;\n}\nclass BailSignal extends Error {\n constructor() {\n super('An async animation has been interrupted. You see this error because you ' + 'forgot to use `await` or `.catch(...)` on its returned promise.');\n this.result = void 0;\n }\n\n}\nclass SkipAniamtionSignal extends Error {\n constructor() {\n super('SkipAnimationSignal');\n this.result = void 0;\n }\n\n}\n\nconst isFrameValue = value => value instanceof FrameValue;\nlet nextId$1 = 1;\nclass FrameValue extends FluidValue {\n constructor(...args) {\n super(...args);\n this.id = nextId$1++;\n this.key = void 0;\n this._priority = 0;\n }\n\n get priority() {\n return this._priority;\n }\n\n set priority(priority) {\n if (this._priority != priority) {\n this._priority = priority;\n\n this._onPriorityChange(priority);\n }\n }\n\n get() {\n const node = getAnimated(this);\n return node && node.getValue();\n }\n\n to(...args) {\n return Globals.to(this, args);\n }\n\n interpolate(...args) {\n deprecateInterpolate();\n return Globals.to(this, args);\n }\n\n toJSON() {\n return this.get();\n }\n\n observerAdded(count) {\n if (count == 1) this._attach();\n }\n\n observerRemoved(count) {\n if (count == 0) this._detach();\n }\n\n _attach() {}\n\n _detach() {}\n\n _onChange(value, idle = false) {\n callFluidObservers(this, {\n type: 'change',\n parent: this,\n value,\n idle\n });\n }\n\n _onPriorityChange(priority) {\n if (!this.idle) {\n frameLoop.sort(this);\n }\n\n callFluidObservers(this, {\n type: 'priority',\n parent: this,\n priority\n });\n }\n\n}\n\nconst $P = Symbol.for('SpringPhase');\nconst HAS_ANIMATED = 1;\nconst IS_ANIMATING = 2;\nconst IS_PAUSED = 4;\nconst hasAnimated = target => (target[$P] & HAS_ANIMATED) > 0;\nconst isAnimating = target => (target[$P] & IS_ANIMATING) > 0;\nconst isPaused = target => (target[$P] & IS_PAUSED) > 0;\nconst setActiveBit = (target, active) => active ? target[$P] |= IS_ANIMATING | HAS_ANIMATED : target[$P] &= ~IS_ANIMATING;\nconst setPausedBit = (target, paused) => paused ? target[$P] |= IS_PAUSED : target[$P] &= ~IS_PAUSED;\n\nclass SpringValue extends FrameValue {\n constructor(arg1, arg2) {\n super();\n this.key = void 0;\n this.animation = new Animation();\n this.queue = void 0;\n this.defaultProps = {};\n this._state = {\n paused: false,\n delayed: false,\n pauseQueue: new Set(),\n resumeQueue: new Set(),\n timeouts: new Set()\n };\n this._pendingCalls = new Set();\n this._lastCallId = 0;\n this._lastToId = 0;\n this._memoizedDuration = 0;\n\n if (!is.und(arg1) || !is.und(arg2)) {\n const props = is.obj(arg1) ? _extends({}, arg1) : _extends({}, arg2, {\n from: arg1\n });\n\n if (is.und(props.default)) {\n props.default = true;\n }\n\n this.start(props);\n }\n }\n\n get idle() {\n return !(isAnimating(this) || this._state.asyncTo) || isPaused(this);\n }\n\n get goal() {\n return getFluidValue(this.animation.to);\n }\n\n get velocity() {\n const node = getAnimated(this);\n return node instanceof AnimatedValue ? node.lastVelocity || 0 : node.getPayload().map(node => node.lastVelocity || 0);\n }\n\n get hasAnimated() {\n return hasAnimated(this);\n }\n\n get isAnimating() {\n return isAnimating(this);\n }\n\n get isPaused() {\n return isPaused(this);\n }\n\n get isDelayed() {\n return this._state.delayed;\n }\n\n advance(dt) {\n let idle = true;\n let changed = false;\n const anim = this.animation;\n let {\n config,\n toValues\n } = anim;\n const payload = getPayload(anim.to);\n\n if (!payload && hasFluidValue(anim.to)) {\n toValues = toArray(getFluidValue(anim.to));\n }\n\n anim.values.forEach((node, i) => {\n if (node.done) return;\n const to = node.constructor == AnimatedString ? 1 : payload ? payload[i].lastPosition : toValues[i];\n let finished = anim.immediate;\n let position = to;\n\n if (!finished) {\n position = node.lastPosition;\n\n if (config.tension <= 0) {\n node.done = true;\n return;\n }\n\n let elapsed = node.elapsedTime += dt;\n const from = anim.fromValues[i];\n const v0 = node.v0 != null ? node.v0 : node.v0 = is.arr(config.velocity) ? config.velocity[i] : config.velocity;\n let velocity;\n\n if (!is.und(config.duration)) {\n let p = 1;\n\n if (config.duration > 0) {\n if (this._memoizedDuration !== config.duration) {\n this._memoizedDuration = config.duration;\n\n if (node.durationProgress > 0) {\n node.elapsedTime = config.duration * node.durationProgress;\n elapsed = node.elapsedTime += dt;\n }\n }\n\n p = (config.progress || 0) + elapsed / this._memoizedDuration;\n p = p > 1 ? 1 : p < 0 ? 0 : p;\n node.durationProgress = p;\n }\n\n position = from + config.easing(p) * (to - from);\n velocity = (position - node.lastPosition) / dt;\n finished = p == 1;\n } else if (config.decay) {\n const decay = config.decay === true ? 0.998 : config.decay;\n const e = Math.exp(-(1 - decay) * elapsed);\n position = from + v0 / (1 - decay) * (1 - e);\n finished = Math.abs(node.lastPosition - position) < 0.1;\n velocity = v0 * e;\n } else {\n velocity = node.lastVelocity == null ? v0 : node.lastVelocity;\n const precision = config.precision || (from == to ? 0.005 : Math.min(1, Math.abs(to - from) * 0.001));\n const restVelocity = config.restVelocity || precision / 10;\n const bounceFactor = config.clamp ? 0 : config.bounce;\n const canBounce = !is.und(bounceFactor);\n const isGrowing = from == to ? node.v0 > 0 : from < to;\n let isMoving;\n let isBouncing = false;\n const step = 1;\n const numSteps = Math.ceil(dt / step);\n\n for (let n = 0; n < numSteps; ++n) {\n isMoving = Math.abs(velocity) > restVelocity;\n\n if (!isMoving) {\n finished = Math.abs(to - position) <= precision;\n\n if (finished) {\n break;\n }\n }\n\n if (canBounce) {\n isBouncing = position == to || position > to == isGrowing;\n\n if (isBouncing) {\n velocity = -velocity * bounceFactor;\n position = to;\n }\n }\n\n const springForce = -config.tension * 0.000001 * (position - to);\n const dampingForce = -config.friction * 0.001 * velocity;\n const acceleration = (springForce + dampingForce) / config.mass;\n velocity = velocity + acceleration * step;\n position = position + velocity * step;\n }\n }\n\n node.lastVelocity = velocity;\n\n if (Number.isNaN(position)) {\n console.warn(`Got NaN while animating:`, this);\n finished = true;\n }\n }\n\n if (payload && !payload[i].done) {\n finished = false;\n }\n\n if (finished) {\n node.done = true;\n } else {\n idle = false;\n }\n\n if (node.setValue(position, config.round)) {\n changed = true;\n }\n });\n const node = getAnimated(this);\n const currVal = node.getValue();\n\n if (idle) {\n const finalVal = getFluidValue(anim.to);\n\n if ((currVal !== finalVal || changed) && !config.decay) {\n node.setValue(finalVal);\n\n this._onChange(finalVal);\n } else if (changed && config.decay) {\n this._onChange(currVal);\n }\n\n this._stop();\n } else if (changed) {\n this._onChange(currVal);\n }\n }\n\n set(value) {\n raf.batchedUpdates(() => {\n this._stop();\n\n this._focus(value);\n\n this._set(value);\n });\n return this;\n }\n\n pause() {\n this._update({\n pause: true\n });\n }\n\n resume() {\n this._update({\n pause: false\n });\n }\n\n finish() {\n if (isAnimating(this)) {\n const {\n to,\n config\n } = this.animation;\n raf.batchedUpdates(() => {\n this._onStart();\n\n if (!config.decay) {\n this._set(to, false);\n }\n\n this._stop();\n });\n }\n\n return this;\n }\n\n update(props) {\n const queue = this.queue || (this.queue = []);\n queue.push(props);\n return this;\n }\n\n start(to, arg2) {\n let queue;\n\n if (!is.und(to)) {\n queue = [is.obj(to) ? to : _extends({}, arg2, {\n to\n })];\n } else {\n queue = this.queue || [];\n this.queue = [];\n }\n\n return Promise.all(queue.map(props => {\n const up = this._update(props);\n\n return up;\n })).then(results => getCombinedResult(this, results));\n }\n\n stop(cancel) {\n const {\n to\n } = this.animation;\n\n this._focus(this.get());\n\n stopAsync(this._state, cancel && this._lastCallId);\n raf.batchedUpdates(() => this._stop(to, cancel));\n return this;\n }\n\n reset() {\n this._update({\n reset: true\n });\n }\n\n eventObserved(event) {\n if (event.type == 'change') {\n this._start();\n } else if (event.type == 'priority') {\n this.priority = event.priority + 1;\n }\n }\n\n _prepareNode(props) {\n const key = this.key || '';\n let {\n to,\n from\n } = props;\n to = is.obj(to) ? to[key] : to;\n\n if (to == null || isAsyncTo(to)) {\n to = undefined;\n }\n\n from = is.obj(from) ? from[key] : from;\n\n if (from == null) {\n from = undefined;\n }\n\n const range = {\n to,\n from\n };\n\n if (!hasAnimated(this)) {\n if (props.reverse) [to, from] = [from, to];\n from = getFluidValue(from);\n\n if (!is.und(from)) {\n this._set(from);\n } else if (!getAnimated(this)) {\n this._set(to);\n }\n }\n\n return range;\n }\n\n _update(_ref, isLoop) {\n let props = _extends({}, _ref);\n\n const {\n key,\n defaultProps\n } = this;\n if (props.default) Object.assign(defaultProps, getDefaultProps(props, (value, prop) => /^on/.test(prop) ? resolveProp(value, key) : value));\n mergeActiveFn(this, props, 'onProps');\n sendEvent(this, 'onProps', props, this);\n\n const range = this._prepareNode(props);\n\n if (Object.isFrozen(this)) {\n throw Error('Cannot animate a `SpringValue` object that is frozen. ' + 'Did you forget to pass your component to `animated(...)` before animating its props?');\n }\n\n const state = this._state;\n return scheduleProps(++this._lastCallId, {\n key,\n props,\n defaultProps,\n state,\n actions: {\n pause: () => {\n if (!isPaused(this)) {\n setPausedBit(this, true);\n flushCalls(state.pauseQueue);\n sendEvent(this, 'onPause', getFinishedResult(this, checkFinished(this, this.animation.to)), this);\n }\n },\n resume: () => {\n if (isPaused(this)) {\n setPausedBit(this, false);\n\n if (isAnimating(this)) {\n this._resume();\n }\n\n flushCalls(state.resumeQueue);\n sendEvent(this, 'onResume', getFinishedResult(this, checkFinished(this, this.animation.to)), this);\n }\n },\n start: this._merge.bind(this, range)\n }\n }).then(result => {\n if (props.loop && result.finished && !(isLoop && result.noop)) {\n const nextProps = createLoopUpdate(props);\n\n if (nextProps) {\n return this._update(nextProps, true);\n }\n }\n\n return result;\n });\n }\n\n _merge(range, props, resolve) {\n if (props.cancel) {\n this.stop(true);\n return resolve(getCancelledResult(this));\n }\n\n const hasToProp = !is.und(range.to);\n const hasFromProp = !is.und(range.from);\n\n if (hasToProp || hasFromProp) {\n if (props.callId > this._lastToId) {\n this._lastToId = props.callId;\n } else {\n return resolve(getCancelledResult(this));\n }\n }\n\n const {\n key,\n defaultProps,\n animation: anim\n } = this;\n const {\n to: prevTo,\n from: prevFrom\n } = anim;\n let {\n to = prevTo,\n from = prevFrom\n } = range;\n\n if (hasFromProp && !hasToProp && (!props.default || is.und(to))) {\n to = from;\n }\n\n if (props.reverse) [to, from] = [from, to];\n const hasFromChanged = !isEqual(from, prevFrom);\n\n if (hasFromChanged) {\n anim.from = from;\n }\n\n from = getFluidValue(from);\n const hasToChanged = !isEqual(to, prevTo);\n\n if (hasToChanged) {\n this._focus(to);\n }\n\n const hasAsyncTo = isAsyncTo(props.to);\n const {\n config\n } = anim;\n const {\n decay,\n velocity\n } = config;\n\n if (hasToProp || hasFromProp) {\n config.velocity = 0;\n }\n\n if (props.config && !hasAsyncTo) {\n mergeConfig(config, callProp(props.config, key), props.config !== defaultProps.config ? callProp(defaultProps.config, key) : void 0);\n }\n\n let node = getAnimated(this);\n\n if (!node || is.und(to)) {\n return resolve(getFinishedResult(this, true));\n }\n\n const reset = is.und(props.reset) ? hasFromProp && !props.default : !is.und(from) && matchProp(props.reset, key);\n const value = reset ? from : this.get();\n const goal = computeGoal(to);\n const isAnimatable = is.num(goal) || is.arr(goal) || isAnimatedString(goal);\n const immediate = !hasAsyncTo && (!isAnimatable || matchProp(defaultProps.immediate || props.immediate, key));\n\n if (hasToChanged) {\n const nodeType = getAnimatedType(to);\n\n if (nodeType !== node.constructor) {\n if (immediate) {\n node = this._set(goal);\n } else throw Error(`Cannot animate between ${node.constructor.name} and ${nodeType.name}, as the \"to\" prop suggests`);\n }\n }\n\n const goalType = node.constructor;\n let started = hasFluidValue(to);\n let finished = false;\n\n if (!started) {\n const hasValueChanged = reset || !hasAnimated(this) && hasFromChanged;\n\n if (hasToChanged || hasValueChanged) {\n finished = isEqual(computeGoal(value), goal);\n started = !finished;\n }\n\n if (!isEqual(anim.immediate, immediate) && !immediate || !isEqual(config.decay, decay) || !isEqual(config.velocity, velocity)) {\n started = true;\n }\n }\n\n if (finished && isAnimating(this)) {\n if (anim.changed && !reset) {\n started = true;\n } else if (!started) {\n this._stop(prevTo);\n }\n }\n\n if (!hasAsyncTo) {\n if (started || hasFluidValue(prevTo)) {\n anim.values = node.getPayload();\n anim.toValues = hasFluidValue(to) ? null : goalType == AnimatedString ? [1] : toArray(goal);\n }\n\n if (anim.immediate != immediate) {\n anim.immediate = immediate;\n\n if (!immediate && !reset) {\n this._set(prevTo);\n }\n }\n\n if (started) {\n const {\n onRest\n } = anim;\n each(ACTIVE_EVENTS, type => mergeActiveFn(this, props, type));\n const result = getFinishedResult(this, checkFinished(this, prevTo));\n flushCalls(this._pendingCalls, result);\n\n this._pendingCalls.add(resolve);\n\n if (anim.changed) raf.batchedUpdates(() => {\n anim.changed = !reset;\n onRest == null ? void 0 : onRest(result, this);\n\n if (reset) {\n callProp(defaultProps.onRest, result);\n } else {\n anim.onStart == null ? void 0 : anim.onStart(result, this);\n }\n });\n }\n }\n\n if (reset) {\n this._set(value);\n }\n\n if (hasAsyncTo) {\n resolve(runAsync(props.to, props, this._state, this));\n } else if (started) {\n this._start();\n } else if (isAnimating(this) && !hasToChanged) {\n this._pendingCalls.add(resolve);\n } else {\n resolve(getNoopResult(value));\n }\n }\n\n _focus(value) {\n const anim = this.animation;\n\n if (value !== anim.to) {\n if (getFluidObservers(this)) {\n this._detach();\n }\n\n anim.to = value;\n\n if (getFluidObservers(this)) {\n this._attach();\n }\n }\n }\n\n _attach() {\n let priority = 0;\n const {\n to\n } = this.animation;\n\n if (hasFluidValue(to)) {\n addFluidObserver(to, this);\n\n if (isFrameValue(to)) {\n priority = to.priority + 1;\n }\n }\n\n this.priority = priority;\n }\n\n _detach() {\n const {\n to\n } = this.animation;\n\n if (hasFluidValue(to)) {\n removeFluidObserver(to, this);\n }\n }\n\n _set(arg, idle = true) {\n const value = getFluidValue(arg);\n\n if (!is.und(value)) {\n const oldNode = getAnimated(this);\n\n if (!oldNode || !isEqual(value, oldNode.getValue())) {\n const nodeType = getAnimatedType(value);\n\n if (!oldNode || oldNode.constructor != nodeType) {\n setAnimated(this, nodeType.create(value));\n } else {\n oldNode.setValue(value);\n }\n\n if (oldNode) {\n raf.batchedUpdates(() => {\n this._onChange(value, idle);\n });\n }\n }\n }\n\n return getAnimated(this);\n }\n\n _onStart() {\n const anim = this.animation;\n\n if (!anim.changed) {\n anim.changed = true;\n sendEvent(this, 'onStart', getFinishedResult(this, checkFinished(this, anim.to)), this);\n }\n }\n\n _onChange(value, idle) {\n if (!idle) {\n this._onStart();\n\n callProp(this.animation.onChange, value, this);\n }\n\n callProp(this.defaultProps.onChange, value, this);\n\n super._onChange(value, idle);\n }\n\n _start() {\n const anim = this.animation;\n getAnimated(this).reset(getFluidValue(anim.to));\n\n if (!anim.immediate) {\n anim.fromValues = anim.values.map(node => node.lastPosition);\n }\n\n if (!isAnimating(this)) {\n setActiveBit(this, true);\n\n if (!isPaused(this)) {\n this._resume();\n }\n }\n }\n\n _resume() {\n if (Globals.skipAnimation) {\n this.finish();\n } else {\n frameLoop.start(this);\n }\n }\n\n _stop(goal, cancel) {\n if (isAnimating(this)) {\n setActiveBit(this, false);\n const anim = this.animation;\n each(anim.values, node => {\n node.done = true;\n });\n\n if (anim.toValues) {\n anim.onChange = anim.onPause = anim.onResume = undefined;\n }\n\n callFluidObservers(this, {\n type: 'idle',\n parent: this\n });\n const result = cancel ? getCancelledResult(this.get()) : getFinishedResult(this.get(), checkFinished(this, goal != null ? goal : anim.to));\n flushCalls(this._pendingCalls, result);\n\n if (anim.changed) {\n anim.changed = false;\n sendEvent(this, 'onRest', result, this);\n }\n }\n }\n\n}\n\nfunction checkFinished(target, to) {\n const goal = computeGoal(to);\n const value = computeGoal(target.get());\n return isEqual(value, goal);\n}\n\nfunction createLoopUpdate(props, loop = props.loop, to = props.to) {\n let loopRet = callProp(loop);\n\n if (loopRet) {\n const overrides = loopRet !== true && inferTo(loopRet);\n const reverse = (overrides || props).reverse;\n const reset = !overrides || overrides.reset;\n return createUpdate(_extends({}, props, {\n loop,\n default: false,\n pause: undefined,\n to: !reverse || isAsyncTo(to) ? to : undefined,\n from: reset ? props.from : undefined,\n reset\n }, overrides));\n }\n}\nfunction createUpdate(props) {\n const {\n to,\n from\n } = props = inferTo(props);\n const keys = new Set();\n if (is.obj(to)) findDefined(to, keys);\n if (is.obj(from)) findDefined(from, keys);\n props.keys = keys.size ? Array.from(keys) : null;\n return props;\n}\nfunction declareUpdate(props) {\n const update = createUpdate(props);\n\n if (is.und(update.default)) {\n update.default = getDefaultProps(update);\n }\n\n return update;\n}\n\nfunction findDefined(values, keys) {\n eachProp(values, (value, key) => value != null && keys.add(key));\n}\n\nconst ACTIVE_EVENTS = ['onStart', 'onRest', 'onChange', 'onPause', 'onResume'];\n\nfunction mergeActiveFn(target, props, type) {\n target.animation[type] = props[type] !== getDefaultProp(props, type) ? resolveProp(props[type], target.key) : undefined;\n}\n\nfunction sendEvent(target, type, ...args) {\n var _target$animation$typ, _target$animation, _target$defaultProps$, _target$defaultProps;\n\n (_target$animation$typ = (_target$animation = target.animation)[type]) == null ? void 0 : _target$animation$typ.call(_target$animation, ...args);\n (_target$defaultProps$ = (_target$defaultProps = target.defaultProps)[type]) == null ? void 0 : _target$defaultProps$.call(_target$defaultProps, ...args);\n}\n\nconst BATCHED_EVENTS = ['onStart', 'onChange', 'onRest'];\nlet nextId = 1;\nclass Controller {\n constructor(props, flush) {\n this.id = nextId++;\n this.springs = {};\n this.queue = [];\n this.ref = void 0;\n this._flush = void 0;\n this._initialProps = void 0;\n this._lastAsyncId = 0;\n this._active = new Set();\n this._changed = new Set();\n this._started = false;\n this._item = void 0;\n this._state = {\n paused: false,\n pauseQueue: new Set(),\n resumeQueue: new Set(),\n timeouts: new Set()\n };\n this._events = {\n onStart: new Map(),\n onChange: new Map(),\n onRest: new Map()\n };\n this._onFrame = this._onFrame.bind(this);\n\n if (flush) {\n this._flush = flush;\n }\n\n if (props) {\n this.start(_extends({\n default: true\n }, props));\n }\n }\n\n get idle() {\n return !this._state.asyncTo && Object.values(this.springs).every(spring => {\n return spring.idle && !spring.isDelayed && !spring.isPaused;\n });\n }\n\n get item() {\n return this._item;\n }\n\n set item(item) {\n this._item = item;\n }\n\n get() {\n const values = {};\n this.each((spring, key) => values[key] = spring.get());\n return values;\n }\n\n set(values) {\n for (const key in values) {\n const value = values[key];\n\n if (!is.und(value)) {\n this.springs[key].set(value);\n }\n }\n }\n\n update(props) {\n if (props) {\n this.queue.push(createUpdate(props));\n }\n\n return this;\n }\n\n start(props) {\n let {\n queue\n } = this;\n\n if (props) {\n queue = toArray(props).map(createUpdate);\n } else {\n this.queue = [];\n }\n\n if (this._flush) {\n return this._flush(this, queue);\n }\n\n prepareKeys(this, queue);\n return flushUpdateQueue(this, queue);\n }\n\n stop(arg, keys) {\n if (arg !== !!arg) {\n keys = arg;\n }\n\n if (keys) {\n const springs = this.springs;\n each(toArray(keys), key => springs[key].stop(!!arg));\n } else {\n stopAsync(this._state, this._lastAsyncId);\n this.each(spring => spring.stop(!!arg));\n }\n\n return this;\n }\n\n pause(keys) {\n if (is.und(keys)) {\n this.start({\n pause: true\n });\n } else {\n const springs = this.springs;\n each(toArray(keys), key => springs[key].pause());\n }\n\n return this;\n }\n\n resume(keys) {\n if (is.und(keys)) {\n this.start({\n pause: false\n });\n } else {\n const springs = this.springs;\n each(toArray(keys), key => springs[key].resume());\n }\n\n return this;\n }\n\n each(iterator) {\n eachProp(this.springs, iterator);\n }\n\n _onFrame() {\n const {\n onStart,\n onChange,\n onRest\n } = this._events;\n const active = this._active.size > 0;\n const changed = this._changed.size > 0;\n\n if (active && !this._started || changed && !this._started) {\n this._started = true;\n flush(onStart, ([onStart, result]) => {\n result.value = this.get();\n onStart(result, this, this._item);\n });\n }\n\n const idle = !active && this._started;\n const values = changed || idle && onRest.size ? this.get() : null;\n\n if (changed && onChange.size) {\n flush(onChange, ([onChange, result]) => {\n result.value = values;\n onChange(result, this, this._item);\n });\n }\n\n if (idle) {\n this._started = false;\n flush(onRest, ([onRest, result]) => {\n result.value = values;\n onRest(result, this, this._item);\n });\n }\n }\n\n eventObserved(event) {\n if (event.type == 'change') {\n this._changed.add(event.parent);\n\n if (!event.idle) {\n this._active.add(event.parent);\n }\n } else if (event.type == 'idle') {\n this._active.delete(event.parent);\n } else return;\n\n raf.onFrame(this._onFrame);\n }\n\n}\nfunction flushUpdateQueue(ctrl, queue) {\n return Promise.all(queue.map(props => flushUpdate(ctrl, props))).then(results => getCombinedResult(ctrl, results));\n}\nasync function flushUpdate(ctrl, props, isLoop) {\n const {\n keys,\n to,\n from,\n loop,\n onRest,\n onResolve\n } = props;\n const defaults = is.obj(props.default) && props.default;\n\n if (loop) {\n props.loop = false;\n }\n\n if (to === false) props.to = null;\n if (from === false) props.from = null;\n const asyncTo = is.arr(to) || is.fun(to) ? to : undefined;\n\n if (asyncTo) {\n props.to = undefined;\n props.onRest = undefined;\n\n if (defaults) {\n defaults.onRest = undefined;\n }\n } else {\n each(BATCHED_EVENTS, key => {\n const handler = props[key];\n\n if (is.fun(handler)) {\n const queue = ctrl['_events'][key];\n\n props[key] = ({\n finished,\n cancelled\n }) => {\n const result = queue.get(handler);\n\n if (result) {\n if (!finished) result.finished = false;\n if (cancelled) result.cancelled = true;\n } else {\n queue.set(handler, {\n value: null,\n finished: finished || false,\n cancelled: cancelled || false\n });\n }\n };\n\n if (defaults) {\n defaults[key] = props[key];\n }\n }\n });\n }\n\n const state = ctrl['_state'];\n\n if (props.pause === !state.paused) {\n state.paused = props.pause;\n flushCalls(props.pause ? state.pauseQueue : state.resumeQueue);\n } else if (state.paused) {\n props.pause = true;\n }\n\n const promises = (keys || Object.keys(ctrl.springs)).map(key => ctrl.springs[key].start(props));\n const cancel = props.cancel === true || getDefaultProp(props, 'cancel') === true;\n\n if (asyncTo || cancel && state.asyncId) {\n promises.push(scheduleProps(++ctrl['_lastAsyncId'], {\n props,\n state,\n actions: {\n pause: noop,\n resume: noop,\n\n start(props, resolve) {\n if (cancel) {\n stopAsync(state, ctrl['_lastAsyncId']);\n resolve(getCancelledResult(ctrl));\n } else {\n props.onRest = onRest;\n resolve(runAsync(asyncTo, props, state, ctrl));\n }\n }\n\n }\n }));\n }\n\n if (state.paused) {\n await new Promise(resume => {\n state.resumeQueue.add(resume);\n });\n }\n\n const result = getCombinedResult(ctrl, await Promise.all(promises));\n\n if (loop && result.finished && !(isLoop && result.noop)) {\n const nextProps = createLoopUpdate(props, loop, to);\n\n if (nextProps) {\n prepareKeys(ctrl, [nextProps]);\n return flushUpdate(ctrl, nextProps, true);\n }\n }\n\n if (onResolve) {\n raf.batchedUpdates(() => onResolve(result, ctrl, ctrl.item));\n }\n\n return result;\n}\nfunction getSprings(ctrl, props) {\n const springs = _extends({}, ctrl.springs);\n\n if (props) {\n each(toArray(props), props => {\n if (is.und(props.keys)) {\n props = createUpdate(props);\n }\n\n if (!is.obj(props.to)) {\n props = _extends({}, props, {\n to: undefined\n });\n }\n\n prepareSprings(springs, props, key => {\n return createSpring(key);\n });\n });\n }\n\n setSprings(ctrl, springs);\n return springs;\n}\nfunction setSprings(ctrl, springs) {\n eachProp(springs, (spring, key) => {\n if (!ctrl.springs[key]) {\n ctrl.springs[key] = spring;\n addFluidObserver(spring, ctrl);\n }\n });\n}\n\nfunction createSpring(key, observer) {\n const spring = new SpringValue();\n spring.key = key;\n\n if (observer) {\n addFluidObserver(spring, observer);\n }\n\n return spring;\n}\n\nfunction prepareSprings(springs, props, create) {\n if (props.keys) {\n each(props.keys, key => {\n const spring = springs[key] || (springs[key] = create(key));\n spring['_prepareNode'](props);\n });\n }\n}\n\nfunction prepareKeys(ctrl, queue) {\n each(queue, props => {\n prepareSprings(ctrl.springs, props, key => {\n return createSpring(key, ctrl);\n });\n });\n}\n\nfunction _objectWithoutPropertiesLoose(source, excluded) {\n if (source == null) return {};\n var target = {};\n var sourceKeys = Object.keys(source);\n var key, i;\n\n for (i = 0; i < sourceKeys.length; i++) {\n key = sourceKeys[i];\n if (excluded.indexOf(key) >= 0) continue;\n target[key] = source[key];\n }\n\n return target;\n}\n\nconst _excluded$3 = [\"children\"];\nconst SpringContext = _ref => {\n let {\n children\n } = _ref,\n props = _objectWithoutPropertiesLoose(_ref, _excluded$3);\n\n const inherited = useContext(ctx);\n const pause = props.pause || !!inherited.pause,\n immediate = props.immediate || !!inherited.immediate;\n props = useMemoOne(() => ({\n pause,\n immediate\n }), [pause, immediate]);\n const {\n Provider\n } = ctx;\n return React.createElement(Provider, {\n value: props\n }, children);\n};\nconst ctx = makeContext(SpringContext, {});\nSpringContext.Provider = ctx.Provider;\nSpringContext.Consumer = ctx.Consumer;\n\nfunction makeContext(target, init) {\n Object.assign(target, React.createContext(init));\n target.Provider._context = target;\n target.Consumer._context = target;\n return target;\n}\n\nconst SpringRef = () => {\n const current = [];\n\n const SpringRef = function SpringRef(props) {\n deprecateDirectCall();\n const results = [];\n each(current, (ctrl, i) => {\n if (is.und(props)) {\n results.push(ctrl.start());\n } else {\n const update = _getProps(props, ctrl, i);\n\n if (update) {\n results.push(ctrl.start(update));\n }\n }\n });\n return results;\n };\n\n SpringRef.current = current;\n\n SpringRef.add = function (ctrl) {\n if (!current.includes(ctrl)) {\n current.push(ctrl);\n }\n };\n\n SpringRef.delete = function (ctrl) {\n const i = current.indexOf(ctrl);\n if (~i) current.splice(i, 1);\n };\n\n SpringRef.pause = function () {\n each(current, ctrl => ctrl.pause(...arguments));\n return this;\n };\n\n SpringRef.resume = function () {\n each(current, ctrl => ctrl.resume(...arguments));\n return this;\n };\n\n SpringRef.set = function (values) {\n each(current, ctrl => ctrl.set(values));\n };\n\n SpringRef.start = function (props) {\n const results = [];\n each(current, (ctrl, i) => {\n if (is.und(props)) {\n results.push(ctrl.start());\n } else {\n const update = this._getProps(props, ctrl, i);\n\n if (update) {\n results.push(ctrl.start(update));\n }\n }\n });\n return results;\n };\n\n SpringRef.stop = function () {\n each(current, ctrl => ctrl.stop(...arguments));\n return this;\n };\n\n SpringRef.update = function (props) {\n each(current, (ctrl, i) => ctrl.update(this._getProps(props, ctrl, i)));\n return this;\n };\n\n const _getProps = function _getProps(arg, ctrl, index) {\n return is.fun(arg) ? arg(index, ctrl) : arg;\n };\n\n SpringRef._getProps = _getProps;\n return SpringRef;\n};\n\nfunction useSprings(length, props, deps) {\n const propsFn = is.fun(props) && props;\n if (propsFn && !deps) deps = [];\n const ref = useMemo(() => propsFn || arguments.length == 3 ? SpringRef() : void 0, []);\n const layoutId = useRef(0);\n const forceUpdate = useForceUpdate();\n const state = useMemo(() => ({\n ctrls: [],\n queue: [],\n\n flush(ctrl, updates) {\n const springs = getSprings(ctrl, updates);\n const canFlushSync = layoutId.current > 0 && !state.queue.length && !Object.keys(springs).some(key => !ctrl.springs[key]);\n return canFlushSync ? flushUpdateQueue(ctrl, updates) : new Promise(resolve => {\n setSprings(ctrl, springs);\n state.queue.push(() => {\n resolve(flushUpdateQueue(ctrl, updates));\n });\n forceUpdate();\n });\n }\n\n }), []);\n const ctrls = useRef([...state.ctrls]);\n const updates = [];\n const prevLength = usePrev(length) || 0;\n useMemo(() => {\n each(ctrls.current.slice(length, prevLength), ctrl => {\n detachRefs(ctrl, ref);\n ctrl.stop(true);\n });\n ctrls.current.length = length;\n declareUpdates(prevLength, length);\n }, [length]);\n useMemo(() => {\n declareUpdates(0, Math.min(prevLength, length));\n }, deps);\n\n function declareUpdates(startIndex, endIndex) {\n for (let i = startIndex; i < endIndex; i++) {\n const ctrl = ctrls.current[i] || (ctrls.current[i] = new Controller(null, state.flush));\n const update = propsFn ? propsFn(i, ctrl) : props[i];\n\n if (update) {\n updates[i] = declareUpdate(update);\n }\n }\n }\n\n const springs = ctrls.current.map((ctrl, i) => getSprings(ctrl, updates[i]));\n const context = useContext(SpringContext);\n const prevContext = usePrev(context);\n const hasContext = context !== prevContext && hasProps(context);\n useLayoutEffect(() => {\n layoutId.current++;\n state.ctrls = ctrls.current;\n const {\n queue\n } = state;\n\n if (queue.length) {\n state.queue = [];\n each(queue, cb => cb());\n }\n\n each(ctrls.current, (ctrl, i) => {\n ref == null ? void 0 : ref.add(ctrl);\n\n if (hasContext) {\n ctrl.start({\n default: context\n });\n }\n\n const update = updates[i];\n\n if (update) {\n replaceRef(ctrl, update.ref);\n\n if (ctrl.ref) {\n ctrl.queue.push(update);\n } else {\n ctrl.start(update);\n }\n }\n });\n });\n useOnce(() => () => {\n each(state.ctrls, ctrl => ctrl.stop(true));\n });\n const values = springs.map(x => _extends({}, x));\n return ref ? [values, ref] : values;\n}\n\nfunction useSpring(props, deps) {\n const isFn = is.fun(props);\n const [[values], ref] = useSprings(1, isFn ? props : [props], isFn ? deps || [] : deps);\n return isFn || arguments.length == 2 ? [values, ref] : values;\n}\n\nconst initSpringRef = () => SpringRef();\n\nconst useSpringRef = () => useState(initSpringRef)[0];\n\nfunction useTrail(length, propsArg, deps) {\n var _passedRef;\n\n const propsFn = is.fun(propsArg) && propsArg;\n if (propsFn && !deps) deps = [];\n let reverse = true;\n let passedRef = undefined;\n const result = useSprings(length, (i, ctrl) => {\n const props = propsFn ? propsFn(i, ctrl) : propsArg;\n passedRef = props.ref;\n reverse = reverse && props.reverse;\n return props;\n }, deps || [{}]);\n const ref = (_passedRef = passedRef) != null ? _passedRef : result[1];\n useLayoutEffect(() => {\n each(ref.current, (ctrl, i) => {\n const parent = ref.current[i + (reverse ? 1 : -1)];\n\n if (parent) {\n ctrl.start({\n to: parent.springs\n });\n } else {\n ctrl.start();\n }\n });\n }, deps);\n\n if (propsFn || arguments.length == 3) {\n ref['_getProps'] = (propsArg, ctrl, i) => {\n const props = is.fun(propsArg) ? propsArg(i, ctrl) : propsArg;\n\n if (props) {\n const parent = ref.current[i + (props.reverse ? 1 : -1)];\n if (parent) props.to = parent.springs;\n return props;\n }\n };\n\n return result;\n }\n\n ref['start'] = propsArg => {\n const results = [];\n each(ref.current, (ctrl, i) => {\n const props = is.fun(propsArg) ? propsArg(i, ctrl) : propsArg;\n const parent = ref.current[i + (reverse ? 1 : -1)];\n\n if (parent) {\n results.push(ctrl.start(_extends({}, props, {\n to: parent.springs\n })));\n } else {\n results.push(ctrl.start(_extends({}, props)));\n }\n });\n return results;\n };\n\n return result[0];\n}\n\nlet TransitionPhase;\n\n(function (TransitionPhase) {\n TransitionPhase[\"MOUNT\"] = \"mount\";\n TransitionPhase[\"ENTER\"] = \"enter\";\n TransitionPhase[\"UPDATE\"] = \"update\";\n TransitionPhase[\"LEAVE\"] = \"leave\";\n})(TransitionPhase || (TransitionPhase = {}));\n\nfunction useTransition(data, props, deps) {\n const propsFn = is.fun(props) && props;\n const {\n reset,\n sort,\n trail = 0,\n expires = true,\n exitBeforeEnter = false,\n onDestroyed,\n ref: propsRef,\n config: propsConfig\n } = propsFn ? propsFn() : props;\n const ref = useMemo(() => propsFn || arguments.length == 3 ? SpringRef() : void 0, []);\n const items = toArray(data);\n const transitions = [];\n const usedTransitions = useRef(null);\n const prevTransitions = reset ? null : usedTransitions.current;\n useLayoutEffect(() => {\n usedTransitions.current = transitions;\n });\n useOnce(() => () => {\n each(usedTransitions.current, t => {\n if (t.expired) {\n clearTimeout(t.expirationId);\n }\n\n detachRefs(t.ctrl, ref);\n t.ctrl.stop(true);\n });\n });\n const keys = getKeys(items, propsFn ? propsFn() : props, prevTransitions);\n const expired = reset && usedTransitions.current || [];\n useLayoutEffect(() => each(expired, ({\n ctrl,\n item,\n key\n }) => {\n detachRefs(ctrl, ref);\n callProp(onDestroyed, item, key);\n }));\n const reused = [];\n if (prevTransitions) each(prevTransitions, (t, i) => {\n if (t.expired) {\n clearTimeout(t.expirationId);\n expired.push(t);\n } else {\n i = reused[i] = keys.indexOf(t.key);\n if (~i) transitions[i] = t;\n }\n });\n each(items, (item, i) => {\n if (!transitions[i]) {\n transitions[i] = {\n key: keys[i],\n item,\n phase: TransitionPhase.MOUNT,\n ctrl: new Controller()\n };\n transitions[i].ctrl.item = item;\n }\n });\n\n if (reused.length) {\n let i = -1;\n const {\n leave\n } = propsFn ? propsFn() : props;\n each(reused, (keyIndex, prevIndex) => {\n const t = prevTransitions[prevIndex];\n\n if (~keyIndex) {\n i = transitions.indexOf(t);\n transitions[i] = _extends({}, t, {\n item: items[keyIndex]\n });\n } else if (leave) {\n transitions.splice(++i, 0, t);\n }\n });\n }\n\n if (is.fun(sort)) {\n transitions.sort((a, b) => sort(a.item, b.item));\n }\n\n let delay = -trail;\n const forceUpdate = useForceUpdate();\n const defaultProps = getDefaultProps(props);\n const changes = new Map();\n const exitingTransitions = useRef(new Map());\n const forceChange = useRef(false);\n each(transitions, (t, i) => {\n const key = t.key;\n const prevPhase = t.phase;\n const p = propsFn ? propsFn() : props;\n let to;\n let phase;\n let propsDelay = callProp(p.delay || 0, key);\n\n if (prevPhase == TransitionPhase.MOUNT) {\n to = p.enter;\n phase = TransitionPhase.ENTER;\n } else {\n const isLeave = keys.indexOf(key) < 0;\n\n if (prevPhase != TransitionPhase.LEAVE) {\n if (isLeave) {\n to = p.leave;\n phase = TransitionPhase.LEAVE;\n } else if (to = p.update) {\n phase = TransitionPhase.UPDATE;\n } else return;\n } else if (!isLeave) {\n to = p.enter;\n phase = TransitionPhase.ENTER;\n } else return;\n }\n\n to = callProp(to, t.item, i);\n to = is.obj(to) ? inferTo(to) : {\n to\n };\n\n if (!to.config) {\n const config = propsConfig || defaultProps.config;\n to.config = callProp(config, t.item, i, phase);\n }\n\n delay += trail;\n\n const payload = _extends({}, defaultProps, {\n delay: propsDelay + delay,\n ref: propsRef,\n immediate: p.immediate,\n reset: false\n }, to);\n\n if (phase == TransitionPhase.ENTER && is.und(payload.from)) {\n const _p = propsFn ? propsFn() : props;\n\n const from = is.und(_p.initial) || prevTransitions ? _p.from : _p.initial;\n payload.from = callProp(from, t.item, i);\n }\n\n const {\n onResolve\n } = payload;\n\n payload.onResolve = result => {\n callProp(onResolve, result);\n const transitions = usedTransitions.current;\n const t = transitions.find(t => t.key === key);\n if (!t) return;\n\n if (result.cancelled && t.phase != TransitionPhase.UPDATE) {\n return;\n }\n\n if (t.ctrl.idle) {\n const idle = transitions.every(t => t.ctrl.idle);\n\n if (t.phase == TransitionPhase.LEAVE) {\n const expiry = callProp(expires, t.item);\n\n if (expiry !== false) {\n const expiryMs = expiry === true ? 0 : expiry;\n t.expired = true;\n\n if (!idle && expiryMs > 0) {\n if (expiryMs <= 0x7fffffff) t.expirationId = setTimeout(forceUpdate, expiryMs);\n return;\n }\n }\n }\n\n if (idle && transitions.some(t => t.expired)) {\n exitingTransitions.current.delete(t);\n\n if (exitBeforeEnter) {\n forceChange.current = true;\n }\n\n forceUpdate();\n }\n }\n };\n\n const springs = getSprings(t.ctrl, payload);\n\n if (phase === TransitionPhase.LEAVE && exitBeforeEnter) {\n exitingTransitions.current.set(t, {\n phase,\n springs,\n payload\n });\n } else {\n changes.set(t, {\n phase,\n springs,\n payload\n });\n }\n });\n const context = useContext(SpringContext);\n const prevContext = usePrev(context);\n const hasContext = context !== prevContext && hasProps(context);\n useLayoutEffect(() => {\n if (hasContext) {\n each(transitions, t => {\n t.ctrl.start({\n default: context\n });\n });\n }\n }, [context]);\n each(changes, (_, t) => {\n if (exitingTransitions.current.size) {\n const ind = transitions.findIndex(state => state.key === t.key);\n transitions.splice(ind, 1);\n }\n });\n useLayoutEffect(() => {\n each(exitingTransitions.current.size ? exitingTransitions.current : changes, ({\n phase,\n payload\n }, t) => {\n const {\n ctrl\n } = t;\n t.phase = phase;\n ref == null ? void 0 : ref.add(ctrl);\n\n if (hasContext && phase == TransitionPhase.ENTER) {\n ctrl.start({\n default: context\n });\n }\n\n if (payload) {\n replaceRef(ctrl, payload.ref);\n\n if (ctrl.ref && !forceChange.current) {\n ctrl.update(payload);\n } else {\n ctrl.start(payload);\n\n if (forceChange.current) {\n forceChange.current = false;\n }\n }\n }\n });\n }, reset ? void 0 : deps);\n\n const renderTransitions = render => React.createElement(React.Fragment, null, transitions.map((t, i) => {\n const {\n springs\n } = changes.get(t) || t.ctrl;\n const elem = render(_extends({}, springs), t.item, t, i);\n return elem && elem.type ? React.createElement(elem.type, _extends({}, elem.props, {\n key: is.str(t.key) || is.num(t.key) ? t.key : t.ctrl.id,\n ref: elem.ref\n })) : elem;\n }));\n\n return ref ? [renderTransitions, ref] : renderTransitions;\n}\nlet nextKey = 1;\n\nfunction getKeys(items, {\n key,\n keys = key\n}, prevTransitions) {\n if (keys === null) {\n const reused = new Set();\n return items.map(item => {\n const t = prevTransitions && prevTransitions.find(t => t.item === item && t.phase !== TransitionPhase.LEAVE && !reused.has(t));\n\n if (t) {\n reused.add(t);\n return t.key;\n }\n\n return nextKey++;\n });\n }\n\n return is.und(keys) ? items : is.fun(keys) ? items.map(keys) : toArray(keys);\n}\n\nconst _excluded$2 = [\"children\"];\nfunction Spring(_ref) {\n let {\n children\n } = _ref,\n props = _objectWithoutPropertiesLoose(_ref, _excluded$2);\n\n return children(useSpring(props));\n}\n\nconst _excluded$1 = [\"items\", \"children\"];\nfunction Trail(_ref) {\n let {\n items,\n children\n } = _ref,\n props = _objectWithoutPropertiesLoose(_ref, _excluded$1);\n\n const trails = useTrail(items.length, props);\n return items.map((item, index) => {\n const result = children(item, index);\n return is.fun(result) ? result(trails[index]) : result;\n });\n}\n\nconst _excluded = [\"items\", \"children\"];\nfunction Transition(_ref) {\n let {\n items,\n children\n } = _ref,\n props = _objectWithoutPropertiesLoose(_ref, _excluded);\n\n return useTransition(items, props)(children);\n}\n\nclass Interpolation extends FrameValue {\n constructor(source, args) {\n super();\n this.key = void 0;\n this.idle = true;\n this.calc = void 0;\n this._active = new Set();\n this.source = source;\n this.calc = createInterpolator(...args);\n\n const value = this._get();\n\n const nodeType = getAnimatedType(value);\n setAnimated(this, nodeType.create(value));\n }\n\n advance(_dt) {\n const value = this._get();\n\n const oldValue = this.get();\n\n if (!isEqual(value, oldValue)) {\n getAnimated(this).setValue(value);\n\n this._onChange(value, this.idle);\n }\n\n if (!this.idle && checkIdle(this._active)) {\n becomeIdle(this);\n }\n }\n\n _get() {\n const inputs = is.arr(this.source) ? this.source.map(getFluidValue) : toArray(getFluidValue(this.source));\n return this.calc(...inputs);\n }\n\n _start() {\n if (this.idle && !checkIdle(this._active)) {\n this.idle = false;\n each(getPayload(this), node => {\n node.done = false;\n });\n\n if (Globals.skipAnimation) {\n raf.batchedUpdates(() => this.advance());\n becomeIdle(this);\n } else {\n frameLoop.start(this);\n }\n }\n }\n\n _attach() {\n let priority = 1;\n each(toArray(this.source), source => {\n if (hasFluidValue(source)) {\n addFluidObserver(source, this);\n }\n\n if (isFrameValue(source)) {\n if (!source.idle) {\n this._active.add(source);\n }\n\n priority = Math.max(priority, source.priority + 1);\n }\n });\n this.priority = priority;\n\n this._start();\n }\n\n _detach() {\n each(toArray(this.source), source => {\n if (hasFluidValue(source)) {\n removeFluidObserver(source, this);\n }\n });\n\n this._active.clear();\n\n becomeIdle(this);\n }\n\n eventObserved(event) {\n if (event.type == 'change') {\n if (event.idle) {\n this.advance();\n } else {\n this._active.add(event.parent);\n\n this._start();\n }\n } else if (event.type == 'idle') {\n this._active.delete(event.parent);\n } else if (event.type == 'priority') {\n this.priority = toArray(this.source).reduce((highest, parent) => Math.max(highest, (isFrameValue(parent) ? parent.priority : 0) + 1), 0);\n }\n }\n\n}\n\nfunction isIdle(source) {\n return source.idle !== false;\n}\n\nfunction checkIdle(active) {\n return !active.size || Array.from(active).every(isIdle);\n}\n\nfunction becomeIdle(self) {\n if (!self.idle) {\n self.idle = true;\n each(getPayload(self), node => {\n node.done = true;\n });\n callFluidObservers(self, {\n type: 'idle',\n parent: self\n });\n }\n}\n\nconst to = (source, ...args) => new Interpolation(source, args);\nconst interpolate = (source, ...args) => (deprecateInterpolate(), new Interpolation(source, args));\n\nGlobals.assign({\n createStringInterpolator,\n to: (source, args) => new Interpolation(source, args)\n});\nconst update = frameLoop.advance;\n\nexport { BailSignal, Controller, FrameValue, Interpolation, Spring, SpringContext, SpringRef, SpringValue, Trail, Transition, config, easings, inferTo, interpolate, to, update, useChain, useSpring, useSpringRef, useSprings, useTrail, useTransition };\n","import React, { useState, useRef, useEffect, createContext, useMemo, useContext, useCallback } from 'react';\n\nfunction useLoadGsiScript(options = {}) {\r\n const { onScriptLoadSuccess, onScriptLoadError } = options;\r\n const [scriptLoadedSuccessfully, setScriptLoadedSuccessfully] = useState(false);\r\n const onScriptLoadSuccessRef = useRef(onScriptLoadSuccess);\r\n onScriptLoadSuccessRef.current = onScriptLoadSuccess;\r\n const onScriptLoadErrorRef = useRef(onScriptLoadError);\r\n onScriptLoadErrorRef.current = onScriptLoadError;\r\n useEffect(() => {\r\n const scriptTag = document.createElement('script');\r\n scriptTag.src = 'https://accounts.google.com/gsi/client';\r\n scriptTag.async = true;\r\n scriptTag.defer = true;\r\n scriptTag.onload = () => {\r\n var _a;\r\n setScriptLoadedSuccessfully(true);\r\n (_a = onScriptLoadSuccessRef.current) === null || _a === void 0 ? void 0 : _a.call(onScriptLoadSuccessRef);\r\n };\r\n scriptTag.onerror = () => {\r\n var _a;\r\n setScriptLoadedSuccessfully(false);\r\n (_a = onScriptLoadErrorRef.current) === null || _a === void 0 ? void 0 : _a.call(onScriptLoadErrorRef);\r\n };\r\n document.body.appendChild(scriptTag);\r\n return () => {\r\n document.body.removeChild(scriptTag);\r\n };\r\n }, []);\r\n return scriptLoadedSuccessfully;\r\n}\n\nconst GoogleOAuthContext = createContext(null);\r\nfunction GoogleOAuthProvider({ clientId, onScriptLoadSuccess, onScriptLoadError, children, }) {\r\n const scriptLoadedSuccessfully = useLoadGsiScript({\r\n onScriptLoadSuccess,\r\n onScriptLoadError,\r\n });\r\n const contextValue = useMemo(() => ({\r\n clientId,\r\n scriptLoadedSuccessfully,\r\n }), [clientId, scriptLoadedSuccessfully]);\r\n return (React.createElement(GoogleOAuthContext.Provider, { value: contextValue }, children));\r\n}\r\nfunction useGoogleOAuth() {\r\n const context = useContext(GoogleOAuthContext);\r\n if (!context) {\r\n throw new Error('Google OAuth components must be used within GoogleOAuthProvider');\r\n }\r\n return context;\r\n}\n\nconst containerHeightMap = { large: 40, medium: 32, small: 20 };\r\nfunction GoogleLogin({ onSuccess, onError, useOneTap, promptMomentNotification, type = 'standard', theme = 'outline', size = 'large', text, shape, logo_alignment, width, locale, ...props }) {\r\n const btnContainerRef = useRef(null);\r\n const { clientId, scriptLoadedSuccessfully } = useGoogleOAuth();\r\n const onSuccessRef = useRef(onSuccess);\r\n onSuccessRef.current = onSuccess;\r\n const onErrorRef = useRef(onError);\r\n onErrorRef.current = onError;\r\n const promptMomentNotificationRef = useRef(promptMomentNotification);\r\n promptMomentNotificationRef.current = promptMomentNotification;\r\n useEffect(() => {\r\n var _a, _b, _c;\r\n if (!scriptLoadedSuccessfully)\r\n return;\r\n (_a = window.google) === null || _a === void 0 ? void 0 : _a.accounts.id.initialize({\r\n client_id: clientId,\r\n callback: (credentialResponse) => {\r\n var _a;\r\n if (!credentialResponse.clientId || !credentialResponse.credential) {\r\n return (_a = onErrorRef.current) === null || _a === void 0 ? void 0 : _a.call(onErrorRef);\r\n }\r\n onSuccessRef.current(credentialResponse);\r\n },\r\n ...props,\r\n });\r\n (_b = window.google) === null || _b === void 0 ? void 0 : _b.accounts.id.renderButton(btnContainerRef.current, {\r\n type,\r\n theme,\r\n size,\r\n text,\r\n shape,\r\n logo_alignment,\r\n width,\r\n locale,\r\n });\r\n if (useOneTap)\r\n (_c = window.google) === null || _c === void 0 ? void 0 : _c.accounts.id.prompt(promptMomentNotificationRef.current);\r\n return () => {\r\n var _a;\r\n if (useOneTap)\r\n (_a = window.google) === null || _a === void 0 ? void 0 : _a.accounts.id.cancel();\r\n };\r\n // eslint-disable-next-line react-hooks/exhaustive-deps\r\n }, [\r\n clientId,\r\n scriptLoadedSuccessfully,\r\n useOneTap,\r\n type,\r\n theme,\r\n size,\r\n text,\r\n shape,\r\n logo_alignment,\r\n width,\r\n locale,\r\n ]);\r\n return (React.createElement(\"div\", { ref: btnContainerRef, style: { height: containerHeightMap[size] } }));\r\n}\n\nfunction googleLogout() {\r\n var _a;\r\n (_a = window.google) === null || _a === void 0 ? void 0 : _a.accounts.id.disableAutoSelect();\r\n}\n\n/* eslint-disable import/export */\r\nfunction useGoogleLogin({ flow = 'implicit', scope = '', onSuccess, onError, ...props }) {\r\n const { clientId, scriptLoadedSuccessfully } = useGoogleOAuth();\r\n const clientRef = useRef();\r\n const onSuccessRef = useRef(onSuccess);\r\n onSuccessRef.current = onSuccess;\r\n const onErrorRef = useRef(onError);\r\n onErrorRef.current = onError;\r\n useEffect(() => {\r\n var _a;\r\n if (!scriptLoadedSuccessfully)\r\n return;\r\n const clientMethod = flow === 'implicit' ? 'initTokenClient' : 'initCodeClient';\r\n const client = (_a = window.google) === null || _a === void 0 ? void 0 : _a.accounts.oauth2[clientMethod]({\r\n client_id: clientId,\r\n scope: `openid profile email ${scope}`,\r\n callback: (response) => {\r\n var _a, _b;\r\n if (response.error)\r\n return (_a = onErrorRef.current) === null || _a === void 0 ? void 0 : _a.call(onErrorRef, response);\r\n (_b = onSuccessRef.current) === null || _b === void 0 ? void 0 : _b.call(onSuccessRef, response);\r\n },\r\n ...props,\r\n });\r\n clientRef.current = client;\r\n // eslint-disable-next-line react-hooks/exhaustive-deps\r\n }, [clientId, scriptLoadedSuccessfully, flow, scope]);\r\n const loginImplicitFlow = useCallback((overrideConfig) => clientRef.current.requestAccessToken(overrideConfig), []);\r\n const loginAuthCodeFlow = useCallback(() => clientRef.current.requestCode(), []);\r\n return flow === 'implicit' ? loginImplicitFlow : loginAuthCodeFlow;\r\n}\n\nfunction useGoogleOneTapLogin({ onSuccess, onError, promptMomentNotification, cancel_on_tap_outside, hosted_domain, }) {\r\n const { clientId, scriptLoadedSuccessfully } = useGoogleOAuth();\r\n const onSuccessRef = useRef(onSuccess);\r\n onSuccessRef.current = onSuccess;\r\n const onErrorRef = useRef(onError);\r\n onErrorRef.current = onError;\r\n const promptMomentNotificationRef = useRef(promptMomentNotification);\r\n promptMomentNotificationRef.current = promptMomentNotification;\r\n useEffect(() => {\r\n var _a, _b;\r\n if (!scriptLoadedSuccessfully)\r\n return;\r\n (_a = window.google) === null || _a === void 0 ? void 0 : _a.accounts.id.initialize({\r\n client_id: clientId,\r\n callback: (credentialResponse) => {\r\n var _a;\r\n if (!credentialResponse.clientId || !credentialResponse.credential) {\r\n return (_a = onErrorRef.current) === null || _a === void 0 ? void 0 : _a.call(onErrorRef);\r\n }\r\n onSuccessRef.current(credentialResponse);\r\n },\r\n hosted_domain,\r\n cancel_on_tap_outside,\r\n });\r\n (_b = window.google) === null || _b === void 0 ? void 0 : _b.accounts.id.prompt(promptMomentNotificationRef.current);\r\n return () => {\r\n var _a;\r\n (_a = window.google) === null || _a === void 0 ? void 0 : _a.accounts.id.cancel();\r\n };\r\n }, [\r\n clientId,\r\n scriptLoadedSuccessfully,\r\n cancel_on_tap_outside,\r\n hosted_domain,\r\n ]);\r\n}\n\n/**\r\n * Checks if the user granted all the specified scope or scopes\r\n * @returns True if all the scopes are granted\r\n */\r\nfunction hasGrantedAllScopesGoogle(tokenResponse, firstScope, ...restScopes) {\r\n if (!window.google)\r\n return false;\r\n return window.google.accounts.oauth2.hasGrantedAllScopes(tokenResponse, firstScope, ...restScopes);\r\n}\n\n/**\r\n * Checks if the user granted any of the specified scope or scopes.\r\n * @returns True if any of the scopes are granted\r\n */\r\nfunction hasGrantedAnyScopeGoogle(tokenResponse, firstScope, ...restScopes) {\r\n if (!window.google)\r\n return false;\r\n return window.google.accounts.oauth2.hasGrantedAnyScope(tokenResponse, firstScope, ...restScopes);\r\n}\n\nexport { GoogleLogin, GoogleOAuthProvider, googleLogout, hasGrantedAllScopesGoogle, hasGrantedAnyScopeGoogle, useGoogleLogin, useGoogleOneTapLogin };\n","import { Globals } from '@react-spring/core';\nexport * from '@react-spring/core';\nimport { unstable_batchedUpdates } from 'react-dom';\nimport { eachProp, is, toArray, FluidValue, each, getFluidValue, hasFluidValue, addFluidObserver, removeFluidObserver, callFluidObservers, createStringInterpolator, colors } from '@react-spring/shared';\nimport { AnimatedObject, createHost } from '@react-spring/animated';\n\nfunction _objectWithoutPropertiesLoose(source, excluded) {\n if (source == null) return {};\n var target = {};\n var sourceKeys = Object.keys(source);\n var key, i;\n\n for (i = 0; i < sourceKeys.length; i++) {\n key = sourceKeys[i];\n if (excluded.indexOf(key) >= 0) continue;\n target[key] = source[key];\n }\n\n return target;\n}\n\nconst _excluded$2 = [\"style\", \"children\", \"scrollTop\", \"scrollLeft\"];\nconst isCustomPropRE = /^--/;\n\nfunction dangerousStyleValue(name, value) {\n if (value == null || typeof value === 'boolean' || value === '') return '';\n if (typeof value === 'number' && value !== 0 && !isCustomPropRE.test(name) && !(isUnitlessNumber.hasOwnProperty(name) && isUnitlessNumber[name])) return value + 'px';\n return ('' + value).trim();\n}\n\nconst attributeCache = {};\nfunction applyAnimatedValues(instance, props) {\n if (!instance.nodeType || !instance.setAttribute) {\n return false;\n }\n\n const isFilterElement = instance.nodeName === 'filter' || instance.parentNode && instance.parentNode.nodeName === 'filter';\n\n const _ref = props,\n {\n style,\n children,\n scrollTop,\n scrollLeft\n } = _ref,\n attributes = _objectWithoutPropertiesLoose(_ref, _excluded$2);\n\n const values = Object.values(attributes);\n const names = Object.keys(attributes).map(name => isFilterElement || instance.hasAttribute(name) ? name : attributeCache[name] || (attributeCache[name] = name.replace(/([A-Z])/g, n => '-' + n.toLowerCase())));\n\n if (children !== void 0) {\n instance.textContent = children;\n }\n\n for (let name in style) {\n if (style.hasOwnProperty(name)) {\n const value = dangerousStyleValue(name, style[name]);\n\n if (isCustomPropRE.test(name)) {\n instance.style.setProperty(name, value);\n } else {\n instance.style[name] = value;\n }\n }\n }\n\n names.forEach((name, i) => {\n instance.setAttribute(name, values[i]);\n });\n\n if (scrollTop !== void 0) {\n instance.scrollTop = scrollTop;\n }\n\n if (scrollLeft !== void 0) {\n instance.scrollLeft = scrollLeft;\n }\n}\nlet isUnitlessNumber = {\n animationIterationCount: true,\n borderImageOutset: true,\n borderImageSlice: true,\n borderImageWidth: true,\n boxFlex: true,\n boxFlexGroup: true,\n boxOrdinalGroup: true,\n columnCount: true,\n columns: true,\n flex: true,\n flexGrow: true,\n flexPositive: true,\n flexShrink: true,\n flexNegative: true,\n flexOrder: true,\n gridRow: true,\n gridRowEnd: true,\n gridRowSpan: true,\n gridRowStart: true,\n gridColumn: true,\n gridColumnEnd: true,\n gridColumnSpan: true,\n gridColumnStart: true,\n fontWeight: true,\n lineClamp: true,\n lineHeight: true,\n opacity: true,\n order: true,\n orphans: true,\n tabSize: true,\n widows: true,\n zIndex: true,\n zoom: true,\n fillOpacity: true,\n floodOpacity: true,\n stopOpacity: true,\n strokeDasharray: true,\n strokeDashoffset: true,\n strokeMiterlimit: true,\n strokeOpacity: true,\n strokeWidth: true\n};\n\nconst prefixKey = (prefix, key) => prefix + key.charAt(0).toUpperCase() + key.substring(1);\n\nconst prefixes = ['Webkit', 'Ms', 'Moz', 'O'];\nisUnitlessNumber = Object.keys(isUnitlessNumber).reduce((acc, prop) => {\n prefixes.forEach(prefix => acc[prefixKey(prefix, prop)] = acc[prop]);\n return acc;\n}, isUnitlessNumber);\n\nconst _excluded$1 = [\"x\", \"y\", \"z\"];\nconst domTransforms = /^(matrix|translate|scale|rotate|skew)/;\nconst pxTransforms = /^(translate)/;\nconst degTransforms = /^(rotate|skew)/;\n\nconst addUnit = (value, unit) => is.num(value) && value !== 0 ? value + unit : value;\n\nconst isValueIdentity = (value, id) => is.arr(value) ? value.every(v => isValueIdentity(v, id)) : is.num(value) ? value === id : parseFloat(value) === id;\n\nclass AnimatedStyle extends AnimatedObject {\n constructor(_ref) {\n let {\n x,\n y,\n z\n } = _ref,\n style = _objectWithoutPropertiesLoose(_ref, _excluded$1);\n\n const inputs = [];\n const transforms = [];\n\n if (x || y || z) {\n inputs.push([x || 0, y || 0, z || 0]);\n transforms.push(xyz => [`translate3d(${xyz.map(v => addUnit(v, 'px')).join(',')})`, isValueIdentity(xyz, 0)]);\n }\n\n eachProp(style, (value, key) => {\n if (key === 'transform') {\n inputs.push([value || '']);\n transforms.push(transform => [transform, transform === '']);\n } else if (domTransforms.test(key)) {\n delete style[key];\n if (is.und(value)) return;\n const unit = pxTransforms.test(key) ? 'px' : degTransforms.test(key) ? 'deg' : '';\n inputs.push(toArray(value));\n transforms.push(key === 'rotate3d' ? ([x, y, z, deg]) => [`rotate3d(${x},${y},${z},${addUnit(deg, unit)})`, isValueIdentity(deg, 0)] : input => [`${key}(${input.map(v => addUnit(v, unit)).join(',')})`, isValueIdentity(input, key.startsWith('scale') ? 1 : 0)]);\n }\n });\n\n if (inputs.length) {\n style.transform = new FluidTransform(inputs, transforms);\n }\n\n super(style);\n }\n\n}\n\nclass FluidTransform extends FluidValue {\n constructor(inputs, transforms) {\n super();\n this._value = null;\n this.inputs = inputs;\n this.transforms = transforms;\n }\n\n get() {\n return this._value || (this._value = this._get());\n }\n\n _get() {\n let transform = '';\n let identity = true;\n each(this.inputs, (input, i) => {\n const arg1 = getFluidValue(input[0]);\n const [t, id] = this.transforms[i](is.arr(arg1) ? arg1 : input.map(getFluidValue));\n transform += ' ' + t;\n identity = identity && id;\n });\n return identity ? 'none' : transform;\n }\n\n observerAdded(count) {\n if (count == 1) each(this.inputs, input => each(input, value => hasFluidValue(value) && addFluidObserver(value, this)));\n }\n\n observerRemoved(count) {\n if (count == 0) each(this.inputs, input => each(input, value => hasFluidValue(value) && removeFluidObserver(value, this)));\n }\n\n eventObserved(event) {\n if (event.type == 'change') {\n this._value = null;\n }\n\n callFluidObservers(this, event);\n }\n\n}\n\nconst primitives = ['a', 'abbr', 'address', 'area', 'article', 'aside', 'audio', 'b', 'base', 'bdi', 'bdo', 'big', 'blockquote', 'body', 'br', 'button', 'canvas', 'caption', 'cite', 'code', 'col', 'colgroup', 'data', 'datalist', 'dd', 'del', 'details', 'dfn', 'dialog', 'div', 'dl', 'dt', 'em', 'embed', 'fieldset', 'figcaption', 'figure', 'footer', 'form', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'head', 'header', 'hgroup', 'hr', 'html', 'i', 'iframe', 'img', 'input', 'ins', 'kbd', 'keygen', 'label', 'legend', 'li', 'link', 'main', 'map', 'mark', 'menu', 'menuitem', 'meta', 'meter', 'nav', 'noscript', 'object', 'ol', 'optgroup', 'option', 'output', 'p', 'param', 'picture', 'pre', 'progress', 'q', 'rp', 'rt', 'ruby', 's', 'samp', 'script', 'section', 'select', 'small', 'source', 'span', 'strong', 'style', 'sub', 'summary', 'sup', 'table', 'tbody', 'td', 'textarea', 'tfoot', 'th', 'thead', 'time', 'title', 'tr', 'track', 'u', 'ul', 'var', 'video', 'wbr', 'circle', 'clipPath', 'defs', 'ellipse', 'foreignObject', 'g', 'image', 'line', 'linearGradient', 'mask', 'path', 'pattern', 'polygon', 'polyline', 'radialGradient', 'rect', 'stop', 'svg', 'text', 'tspan'];\n\nconst _excluded = [\"scrollTop\", \"scrollLeft\"];\nGlobals.assign({\n batchedUpdates: unstable_batchedUpdates,\n createStringInterpolator,\n colors\n});\nconst host = createHost(primitives, {\n applyAnimatedValues,\n createAnimatedStyle: style => new AnimatedStyle(style),\n getComponentProps: _ref => {\n let props = _objectWithoutPropertiesLoose(_ref, _excluded);\n\n return props;\n }\n});\nconst animated = host.animated;\n\nexport { animated as a, animated };\n"],"sourceRoot":""}