@gardenfi/garden-book 0.2.26 → 0.2.28
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/ui.umd.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
(function(e,t){typeof exports=="object"&&typeof module<"u"?t(exports,require("react/jsx-runtime"),require("react"),require("react-dom")):typeof define=="function"&&define.amd?define(["exports","react/jsx-runtime","react","react-dom"],t):(e=typeof globalThis<"u"?globalThis:e||self,t(e.ui={},e.jsxRuntime,e.React,e.ReactDOM))})(this,function(exports,jsxRuntime,React,ReactDOM){"use strict";function _interopNamespaceDefault(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const i in e)if(i!=="default"){const n=Object.getOwnPropertyDescriptor(e,i);Object.defineProperty(t,i,n.get?n:{enumerable:!0,get:()=>e[i]})}}return t.default=e,Object.freeze(t)}const React__namespace=_interopNamespaceDefault(React),ReactDOM__namespace=_interopNamespaceDefault(ReactDOM);function r(e){var t,i,n="";if(typeof e=="string"||typeof e=="number")n+=e;else if(typeof e=="object")if(Array.isArray(e)){var s=e.length;for(t=0;t<s;t++)e[t]&&(i=r(e[t]))&&(n&&(n+=" "),n+=i)}else for(i in e)e[i]&&(n&&(n+=" "),n+=i);return n}function clsx(){for(var e,t,i=0,n="",s=arguments.length;i<s;i++)(e=arguments[i])&&(t=r(e))&&(n&&(n+=" "),n+=t);return n}const falsyToString=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,cx=clsx,cva=(e,t)=>i=>{var n;if((t==null?void 0:t.variants)==null)return cx(e,i==null?void 0:i.class,i==null?void 0:i.className);const{variants:s,defaultVariants:a}=t,o=Object.keys(s).map(u=>{const f=i==null?void 0:i[u],d=a==null?void 0:a[u];if(f===null)return null;const p=falsyToString(f)||falsyToString(d);return s[u][p]}),l=i&&Object.entries(i).reduce((u,f)=>{let[d,p]=f;return p===void 0||(u[d]=p),u},{}),c=t==null||(n=t.compoundVariants)===null||n===void 0?void 0:n.reduce((u,f)=>{let{class:d,className:p,...b}=f;return Object.entries(b).every(y=>{let[g,P]=y;return Array.isArray(P)?P.includes({...a,...l}[g]):{...a,...l}[g]===P})?[...u,d,p]:u},[]);return cx(e,o,c,i==null?void 0:i.class,i==null?void 0:i.className)},CLASS_PART_SEPARATOR="-",createClassGroupUtils=e=>{const t=createClassMap(e),{conflictingClassGroups:i,conflictingClassGroupModifiers:n}=e;return{getClassGroupId:o=>{const l=o.split(CLASS_PART_SEPARATOR);return l[0]===""&&l.length!==1&&l.shift(),getGroupRecursive(l,t)||getGroupIdForArbitraryProperty(o)},getConflictingClassGroupIds:(o,l)=>{const c=i[o]||[];return l&&n[o]?[...c,...n[o]]:c}}},getGroupRecursive=(e,t)=>{var o;if(e.length===0)return t.classGroupId;const i=e[0],n=t.nextPart.get(i),s=n?getGroupRecursive(e.slice(1),n):void 0;if(s)return s;if(t.validators.length===0)return;const a=e.join(CLASS_PART_SEPARATOR);return(o=t.validators.find(({validator:l})=>l(a)))==null?void 0:o.classGroupId},arbitraryPropertyRegex=/^\[(.+)\]$/,getGroupIdForArbitraryProperty=e=>{if(arbitraryPropertyRegex.test(e)){const t=arbitraryPropertyRegex.exec(e)[1],i=t==null?void 0:t.substring(0,t.indexOf(":"));if(i)return"arbitrary.."+i}},createClassMap=e=>{const{theme:t,prefix:i}=e,n={nextPart:new Map,validators:[]};return getPrefixedClassGroupEntries(Object.entries(e.classGroups),i).forEach(([a,o])=>{processClassesRecursively(o,n,a,t)}),n},processClassesRecursively=(e,t,i,n)=>{e.forEach(s=>{if(typeof s=="string"){const a=s===""?t:getPart(t,s);a.classGroupId=i;return}if(typeof s=="function"){if(isThemeGetter(s)){processClassesRecursively(s(n),t,i,n);return}t.validators.push({validator:s,classGroupId:i});return}Object.entries(s).forEach(([a,o])=>{processClassesRecursively(o,getPart(t,a),i,n)})})},getPart=(e,t)=>{let i=e;return t.split(CLASS_PART_SEPARATOR).forEach(n=>{i.nextPart.has(n)||i.nextPart.set(n,{nextPart:new Map,validators:[]}),i=i.nextPart.get(n)}),i},isThemeGetter=e=>e.isThemeGetter,getPrefixedClassGroupEntries=(e,t)=>t?e.map(([i,n])=>{const s=n.map(a=>typeof a=="string"?t+a:typeof a=="object"?Object.fromEntries(Object.entries(a).map(([o,l])=>[t+o,l])):a);return[i,s]}):e,createLruCache=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,i=new Map,n=new Map;const s=(a,o)=>{i.set(a,o),t++,t>e&&(t=0,n=i,i=new Map)};return{get(a){let o=i.get(a);if(o!==void 0)return o;if((o=n.get(a))!==void 0)return s(a,o),o},set(a,o){i.has(a)?i.set(a,o):s(a,o)}}},IMPORTANT_MODIFIER="!",createParseClassName=e=>{const{separator:t,experimentalParseClassName:i}=e,n=t.length===1,s=t[0],a=t.length,o=l=>{const c=[];let u=0,f=0,d;for(let P=0;P<l.length;P++){let m=l[P];if(u===0){if(m===s&&(n||l.slice(P,P+a)===t)){c.push(l.slice(f,P)),f=P+a;continue}if(m==="/"){d=P;continue}}m==="["?u++:m==="]"&&u--}const p=c.length===0?l:l.substring(f),b=p.startsWith(IMPORTANT_MODIFIER),y=b?p.substring(1):p,g=d&&d>f?d-f:void 0;return{modifiers:c,hasImportantModifier:b,baseClassName:y,maybePostfixModifierPosition:g}};return i?l=>i({className:l,parseClassName:o}):o},sortModifiers=e=>{if(e.length<=1)return e;const t=[];let i=[];return e.forEach(n=>{n[0]==="["?(t.push(...i.sort(),n),i=[]):i.push(n)}),t.push(...i.sort()),t},createConfigUtils=e=>({cache:createLruCache(e.cacheSize),parseClassName:createParseClassName(e),...createClassGroupUtils(e)}),SPLIT_CLASSES_REGEX=/\s+/,mergeClassList=(e,t)=>{const{parseClassName:i,getClassGroupId:n,getConflictingClassGroupIds:s}=t,a=[],o=e.trim().split(SPLIT_CLASSES_REGEX);let l="";for(let c=o.length-1;c>=0;c-=1){const u=o[c],{modifiers:f,hasImportantModifier:d,baseClassName:p,maybePostfixModifierPosition:b}=i(u);let y=!!b,g=n(y?p.substring(0,b):p);if(!g){if(!y){l=u+(l.length>0?" "+l:l);continue}if(g=n(p),!g){l=u+(l.length>0?" "+l:l);continue}y=!1}const P=sortModifiers(f).join(":"),m=d?P+IMPORTANT_MODIFIER:P,x=m+g;if(a.includes(x))continue;a.push(x);const C=s(g,y);for(let S=0;S<C.length;++S){const E=C[S];a.push(m+E)}l=u+(l.length>0?" "+l:l)}return l};function twJoin(){let e=0,t,i,n="";for(;e<arguments.length;)(t=arguments[e++])&&(i=toValue(t))&&(n&&(n+=" "),n+=i);return n}const toValue=e=>{if(typeof e=="string")return e;let t,i="";for(let n=0;n<e.length;n++)e[n]&&(t=toValue(e[n]))&&(i&&(i+=" "),i+=t);return i};function createTailwindMerge(e,...t){let i,n,s,a=o;function o(c){const u=t.reduce((f,d)=>d(f),e());return i=createConfigUtils(u),n=i.cache.get,s=i.cache.set,a=l,l(c)}function l(c){const u=n(c);if(u)return u;const f=mergeClassList(c,i);return s(c,f),f}return function(){return a(twJoin.apply(null,arguments))}}const fromTheme=e=>{const t=i=>i[e]||[];return t.isThemeGetter=!0,t},arbitraryValueRegex=/^\[(?:([a-z-]+):)?(.+)\]$/i,fractionRegex=/^\d+\/\d+$/,stringLengths=new Set(["px","full","screen"]),tshirtUnitRegex=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,lengthUnitRegex=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,colorFunctionRegex=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,shadowRegex=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,imageRegex=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,isLength=e=>isNumber$1(e)||stringLengths.has(e)||fractionRegex.test(e),isArbitraryLength=e=>getIsArbitraryValue(e,"length",isLengthOnly),isNumber$1=e=>!!e&&!Number.isNaN(Number(e)),isArbitraryNumber=e=>getIsArbitraryValue(e,"number",isNumber$1),isInteger=e=>!!e&&Number.isInteger(Number(e)),isPercent=e=>e.endsWith("%")&&isNumber$1(e.slice(0,-1)),isArbitraryValue=e=>arbitraryValueRegex.test(e),isTshirtSize=e=>tshirtUnitRegex.test(e),sizeLabels=new Set(["length","size","percentage"]),isArbitrarySize=e=>getIsArbitraryValue(e,sizeLabels,isNever),isArbitraryPosition=e=>getIsArbitraryValue(e,"position",isNever),imageLabels=new Set(["image","url"]),isArbitraryImage=e=>getIsArbitraryValue(e,imageLabels,isImage),isArbitraryShadow=e=>getIsArbitraryValue(e,"",isShadow),isAny=()=>!0,getIsArbitraryValue=(e,t,i)=>{const n=arbitraryValueRegex.exec(e);return n?n[1]?typeof t=="string"?n[1]===t:t.has(n[1]):i(n[2]):!1},isLengthOnly=e=>lengthUnitRegex.test(e)&&!colorFunctionRegex.test(e),isNever=()=>!1,isShadow=e=>shadowRegex.test(e),isImage=e=>imageRegex.test(e),getDefaultConfig=()=>{const e=fromTheme("colors"),t=fromTheme("spacing"),i=fromTheme("blur"),n=fromTheme("brightness"),s=fromTheme("borderColor"),a=fromTheme("borderRadius"),o=fromTheme("borderSpacing"),l=fromTheme("borderWidth"),c=fromTheme("contrast"),u=fromTheme("grayscale"),f=fromTheme("hueRotate"),d=fromTheme("invert"),p=fromTheme("gap"),b=fromTheme("gradientColorStops"),y=fromTheme("gradientColorStopPositions"),g=fromTheme("inset"),P=fromTheme("margin"),m=fromTheme("opacity"),x=fromTheme("padding"),C=fromTheme("saturate"),S=fromTheme("scale"),E=fromTheme("sepia"),T=fromTheme("skew"),L=fromTheme("space"),_=fromTheme("translate"),k=()=>["auto","contain","none"],Z=()=>["auto","hidden","clip","visible","scroll"],B=()=>["auto",isArbitraryValue,t],D=()=>[isArbitraryValue,t],H=()=>["",isLength,isArbitraryLength],z=()=>["auto",isNumber$1,isArbitraryValue],O=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],V=()=>["solid","dashed","dotted","double","none"],A=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],R=()=>["start","end","center","between","around","evenly","stretch"],M=()=>["","0",isArbitraryValue],I=()=>["auto","avoid","all","avoid-page","page","left","right","column"],j=()=>[isNumber$1,isArbitraryValue];return{cacheSize:500,separator:":",theme:{colors:[isAny],spacing:[isLength,isArbitraryLength],blur:["none","",isTshirtSize,isArbitraryValue],brightness:j(),borderColor:[e],borderRadius:["none","","full",isTshirtSize,isArbitraryValue],borderSpacing:D(),borderWidth:H(),contrast:j(),grayscale:M(),hueRotate:j(),invert:M(),gap:D(),gradientColorStops:[e],gradientColorStopPositions:[isPercent,isArbitraryLength],inset:B(),margin:B(),opacity:j(),padding:D(),saturate:j(),scale:j(),sepia:M(),skew:j(),space:D(),translate:D()},classGroups:{aspect:[{aspect:["auto","square","video",isArbitraryValue]}],container:["container"],columns:[{columns:[isTshirtSize]}],"break-after":[{"break-after":I()}],"break-before":[{"break-before":I()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:[...O(),isArbitraryValue]}],overflow:[{overflow:Z()}],"overflow-x":[{"overflow-x":Z()}],"overflow-y":[{"overflow-y":Z()}],overscroll:[{overscroll:k()}],"overscroll-x":[{"overscroll-x":k()}],"overscroll-y":[{"overscroll-y":k()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[g]}],"inset-x":[{"inset-x":[g]}],"inset-y":[{"inset-y":[g]}],start:[{start:[g]}],end:[{end:[g]}],top:[{top:[g]}],right:[{right:[g]}],bottom:[{bottom:[g]}],left:[{left:[g]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",isInteger,isArbitraryValue]}],basis:[{basis:B()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",isArbitraryValue]}],grow:[{grow:M()}],shrink:[{shrink:M()}],order:[{order:["first","last","none",isInteger,isArbitraryValue]}],"grid-cols":[{"grid-cols":[isAny]}],"col-start-end":[{col:["auto",{span:["full",isInteger,isArbitraryValue]},isArbitraryValue]}],"col-start":[{"col-start":z()}],"col-end":[{"col-end":z()}],"grid-rows":[{"grid-rows":[isAny]}],"row-start-end":[{row:["auto",{span:[isInteger,isArbitraryValue]},isArbitraryValue]}],"row-start":[{"row-start":z()}],"row-end":[{"row-end":z()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",isArbitraryValue]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",isArbitraryValue]}],gap:[{gap:[p]}],"gap-x":[{"gap-x":[p]}],"gap-y":[{"gap-y":[p]}],"justify-content":[{justify:["normal",...R()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...R(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...R(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[x]}],px:[{px:[x]}],py:[{py:[x]}],ps:[{ps:[x]}],pe:[{pe:[x]}],pt:[{pt:[x]}],pr:[{pr:[x]}],pb:[{pb:[x]}],pl:[{pl:[x]}],m:[{m:[P]}],mx:[{mx:[P]}],my:[{my:[P]}],ms:[{ms:[P]}],me:[{me:[P]}],mt:[{mt:[P]}],mr:[{mr:[P]}],mb:[{mb:[P]}],ml:[{ml:[P]}],"space-x":[{"space-x":[L]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[L]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",isArbitraryValue,t]}],"min-w":[{"min-w":[isArbitraryValue,t,"min","max","fit"]}],"max-w":[{"max-w":[isArbitraryValue,t,"none","full","min","max","fit","prose",{screen:[isTshirtSize]},isTshirtSize]}],h:[{h:[isArbitraryValue,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[isArbitraryValue,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[isArbitraryValue,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[isArbitraryValue,t,"auto","min","max","fit"]}],"font-size":[{text:["base",isTshirtSize,isArbitraryLength]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",isArbitraryNumber]}],"font-family":[{font:[isAny]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:["tighter","tight","normal","wide","wider","widest",isArbitraryValue]}],"line-clamp":[{"line-clamp":["none",isNumber$1,isArbitraryNumber]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",isLength,isArbitraryValue]}],"list-image":[{"list-image":["none",isArbitraryValue]}],"list-style-type":[{list:["none","disc","decimal",isArbitraryValue]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[m]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[m]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...V(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",isLength,isArbitraryLength]}],"underline-offset":[{"underline-offset":["auto",isLength,isArbitraryValue]}],"text-decoration-color":[{decoration:[e]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:D()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",isArbitraryValue]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",isArbitraryValue]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[m]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...O(),isArbitraryPosition]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",isArbitrarySize]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},isArbitraryImage]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[y]}],"gradient-via-pos":[{via:[y]}],"gradient-to-pos":[{to:[y]}],"gradient-from":[{from:[b]}],"gradient-via":[{via:[b]}],"gradient-to":[{to:[b]}],rounded:[{rounded:[a]}],"rounded-s":[{"rounded-s":[a]}],"rounded-e":[{"rounded-e":[a]}],"rounded-t":[{"rounded-t":[a]}],"rounded-r":[{"rounded-r":[a]}],"rounded-b":[{"rounded-b":[a]}],"rounded-l":[{"rounded-l":[a]}],"rounded-ss":[{"rounded-ss":[a]}],"rounded-se":[{"rounded-se":[a]}],"rounded-ee":[{"rounded-ee":[a]}],"rounded-es":[{"rounded-es":[a]}],"rounded-tl":[{"rounded-tl":[a]}],"rounded-tr":[{"rounded-tr":[a]}],"rounded-br":[{"rounded-br":[a]}],"rounded-bl":[{"rounded-bl":[a]}],"border-w":[{border:[l]}],"border-w-x":[{"border-x":[l]}],"border-w-y":[{"border-y":[l]}],"border-w-s":[{"border-s":[l]}],"border-w-e":[{"border-e":[l]}],"border-w-t":[{"border-t":[l]}],"border-w-r":[{"border-r":[l]}],"border-w-b":[{"border-b":[l]}],"border-w-l":[{"border-l":[l]}],"border-opacity":[{"border-opacity":[m]}],"border-style":[{border:[...V(),"hidden"]}],"divide-x":[{"divide-x":[l]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[l]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[m]}],"divide-style":[{divide:V()}],"border-color":[{border:[s]}],"border-color-x":[{"border-x":[s]}],"border-color-y":[{"border-y":[s]}],"border-color-s":[{"border-s":[s]}],"border-color-e":[{"border-e":[s]}],"border-color-t":[{"border-t":[s]}],"border-color-r":[{"border-r":[s]}],"border-color-b":[{"border-b":[s]}],"border-color-l":[{"border-l":[s]}],"divide-color":[{divide:[s]}],"outline-style":[{outline:["",...V()]}],"outline-offset":[{"outline-offset":[isLength,isArbitraryValue]}],"outline-w":[{outline:[isLength,isArbitraryLength]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:H()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[m]}],"ring-offset-w":[{"ring-offset":[isLength,isArbitraryLength]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",isTshirtSize,isArbitraryShadow]}],"shadow-color":[{shadow:[isAny]}],opacity:[{opacity:[m]}],"mix-blend":[{"mix-blend":[...A(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":A()}],filter:[{filter:["","none"]}],blur:[{blur:[i]}],brightness:[{brightness:[n]}],contrast:[{contrast:[c]}],"drop-shadow":[{"drop-shadow":["","none",isTshirtSize,isArbitraryValue]}],grayscale:[{grayscale:[u]}],"hue-rotate":[{"hue-rotate":[f]}],invert:[{invert:[d]}],saturate:[{saturate:[C]}],sepia:[{sepia:[E]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[i]}],"backdrop-brightness":[{"backdrop-brightness":[n]}],"backdrop-contrast":[{"backdrop-contrast":[c]}],"backdrop-grayscale":[{"backdrop-grayscale":[u]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[f]}],"backdrop-invert":[{"backdrop-invert":[d]}],"backdrop-opacity":[{"backdrop-opacity":[m]}],"backdrop-saturate":[{"backdrop-saturate":[C]}],"backdrop-sepia":[{"backdrop-sepia":[E]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[o]}],"border-spacing-x":[{"border-spacing-x":[o]}],"border-spacing-y":[{"border-spacing-y":[o]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",isArbitraryValue]}],duration:[{duration:j()}],ease:[{ease:["linear","in","out","in-out",isArbitraryValue]}],delay:[{delay:j()}],animate:[{animate:["none","spin","ping","pulse","bounce",isArbitraryValue]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[S]}],"scale-x":[{"scale-x":[S]}],"scale-y":[{"scale-y":[S]}],rotate:[{rotate:[isInteger,isArbitraryValue]}],"translate-x":[{"translate-x":[_]}],"translate-y":[{"translate-y":[_]}],"skew-x":[{"skew-x":[T]}],"skew-y":[{"skew-y":[T]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",isArbitraryValue]}],accent:[{accent:["auto",e]}],appearance:[{appearance:["none","auto"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",isArbitraryValue]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":D()}],"scroll-mx":[{"scroll-mx":D()}],"scroll-my":[{"scroll-my":D()}],"scroll-ms":[{"scroll-ms":D()}],"scroll-me":[{"scroll-me":D()}],"scroll-mt":[{"scroll-mt":D()}],"scroll-mr":[{"scroll-mr":D()}],"scroll-mb":[{"scroll-mb":D()}],"scroll-ml":[{"scroll-ml":D()}],"scroll-p":[{"scroll-p":D()}],"scroll-px":[{"scroll-px":D()}],"scroll-py":[{"scroll-py":D()}],"scroll-ps":[{"scroll-ps":D()}],"scroll-pe":[{"scroll-pe":D()}],"scroll-pt":[{"scroll-pt":D()}],"scroll-pr":[{"scroll-pr":D()}],"scroll-pb":[{"scroll-pb":D()}],"scroll-pl":[{"scroll-pl":D()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",isArbitraryValue]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[isLength,isArbitraryLength,isArbitraryNumber]}],stroke:[{stroke:[e,"none"]}],sr:["sr-only","not-sr-only"],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]}}},twMerge=createTailwindMerge(getDefaultConfig),cn=(...e)=>twMerge(clsx(e)),useClientOnly=()=>{const[e,t]=React.useState(!1);return React.useEffect(()=>{t(!0)},[]),e},ClientOnly=({children:e,fallback:t=null})=>useClientOnly()?jsxRuntime.jsx(jsxRuntime.Fragment,{children:e}):jsxRuntime.jsx(jsxRuntime.Fragment,{children:t}),ClientOnlyLottie=({animationData:e,loop:t=!0,autoplay:i=!0,style:n})=>{const[s,a]=React.useState(null);return React.useEffect(()=>{Promise.resolve().then(()=>index_es).then(o=>{a(()=>o.default)})},[]),jsxRuntime.jsx(ClientOnly,{fallback:jsxRuntime.jsx("div",{style:n}),children:s?jsxRuntime.jsx(s,{animationData:e,loop:t,autoplay:i,style:n}):jsxRuntime.jsx("div",{style:n})})},v="5.7.4",fr=60,ip=0,op=120,w=64,h=64,nm="loading spinner",ddd=0,assets=[],layers=[{ddd:0,ind:1,ty:4,nm:"Shape Layer 1",sr:1,ks:{o:{a:0,k:100,ix:11},r:{a:1,k:[{i:{x:[.34],y:[1]},o:{x:[.66],y:[0]},t:0,s:[180]},{t:119,s:[540]}],ix:10},p:{a:0,k:[32.135,31.505,0],ix:2,l:2},a:{a:0,k:[-.75,2.75,0],ix:1,l:2},s:{a:0,k:[82,82,100],ix:6,l:2}},ao:0,shapes:[{ty:"gr",it:[{ind:0,ty:"sh",ix:1,ks:{a:0,k:{i:[[15.326,0],[0,-15.326],[-15.326,0],[0,15.326]],o:[[-15.326,0],[0,15.326],[15.326,0],[0,-15.326]],v:[[0,-27.75],[-27.75,0],[0,27.75],[27.75,0]],c:!0},ix:2},nm:"Path 1",mn:"ADBE Vector Shape - Group",hd:!1},{ty:"st",c:{a:0,k:[.505882352941,.478431372549,.564705882353,1],ix:3},o:{a:0,k:100,ix:4},w:{a:0,k:10,ix:5},lc:1,lj:1,ml:4,bm:0,nm:"Stroke 1",mn:"ADBE Vector Graphic - Stroke",hd:!1},{ty:"tr",p:{a:0,k:[-.75,2.75],ix:2},a:{a:0,k:[0,0],ix:1},s:{a:0,k:[100,100],ix:3},r:{a:0,k:0,ix:6},o:{a:0,k:100,ix:7},sk:{a:0,k:0,ix:4},sa:{a:0,k:0,ix:5},nm:"Transform"}],nm:"Ellipse 1",np:3,cix:2,bm:0,ix:1,mn:"ADBE Vector Group",hd:!1},{ty:"tm",s:{a:1,k:[{i:{x:[.833],y:[.833]},o:{x:[.167],y:[.167]},t:0,s:[100]},{i:{x:[.351],y:[.985]},o:{x:[.665],y:[0]},t:60,s:[90]},{t:120,s:[0]}],ix:1},e:{a:1,k:[{i:{x:[.34],y:[1]},o:{x:[.66],y:[0]},t:0,s:[100]},{t:60,s:[0]}],ix:2},o:{a:0,k:176,ix:3},m:1,ix:2,nm:"Trim Paths 1",mn:"ADBE Vector Filter - Trim",hd:!1}],ip:0,op:600,st:0,bm:0}],markers=[],spinnerAnimation={v,fr,ip,op,w,h,nm,ddd,assets,layers,markers},buttonStyles=cva(["gf-font-haffer","gf-font-medium","gf-min-w-32","gf-px-6","gf-focus:outline-none","gf-border-none","gf-transition-colors","gf-duration-500"],{variants:{variant:{primary:"gf-text-white gf-bg-button-primary",secondary:"gf-text-white gf-bg-button-secondary",ternary:"gf-text-dark-grey gf-bg-button-ternary",disabled:"gf-bg-button-disabled-bg gf-text-button-disabled-text gf-cursor-not-allowed"},size:{sm:"gf-h-9 gf-rounded-xl gf-text-xs",md:"gf-h-10 gf-rounded-xl gf-text-sm",lg:"gf-h-12 gf-rounded-2xl gf-text-base"},breakpointSize:{"xs:sm":"xs:gf-h-9 xs:gf-rounded-xl xs:gf-text-xs","xs:md":"xs:gf-h-10 xs:gf-rounded-xl xs:gf-text-sm","xs:lg":"xs:gf-h-12 xs:gf-rounded-2xl xs:gf-text-base","sm:sm":"sm:gf-h-9 sm:gf-rounded-xl sm:gf-text-xs","sm:md":"sm:gf-h-10 sm:gf-rounded-xl sm:gf-text-sm","sm:lg":"sm:gf-h-12 sm:gf-rounded-2xl sm:gf-text-base","md:sm":"md:gf-h-9 md:gf-rounded-xl md:gf-text-xs","md:md":"md:gf-h-10 md:gf-rounded-xl md:gf-text-sm","md:lg":"md:gf-h-12 md:gf-rounded-2xl md:gf-text-base","lg:sm":"lg:gf-h-9 lg:gf-rounded-xl lg:gf-text-xs","lg:md":"lg:gf-h-10 lg:gf-rounded-xl lg:gf-text-sm","lg:lg":"lg:gf-h-12 lg:gf-rounded-2xl lg:gf-text-base","xl:sm":"xl:gf-h-9 xl:gf-rounded-xl xl:gf-text-xs","xl:md":"xl:gf-h-10 xl:gf-rounded-xl xl:gf-text-sm","xl:lg":"xl:gf-h-12 xl:gf-rounded-2xl xl:gf-text-base"}},defaultVariants:{variant:"primary",size:"md"}}),Button=React.forwardRef(({variant:e,size:t,breakpoints:i,loading:n,className:s,children:a,colors:o,...l},c)=>{const u=i?Object.entries(i).map(([p,b])=>`${p}:${b}`).map(p=>buttonStyles({breakpointSize:p})).join(" "):"",d=(()=>{if(!o||!e)return{};const p=o[e];return p?e==="primary"?{backgroundColor:p}:e==="secondary"?{backgroundColor:p}:e==="ternary"?{backgroundColor:p}:e==="disabled"?{backgroundColor:p}:{}:{}})();return jsxRuntime.jsx("button",{ref:c,className:cn("gf-transition-colors gf-duration-300",s,buttonStyles({variant:e,size:t}),u,n),style:d,disabled:n||e==="disabled",...l,children:jsxRuntime.jsxs("div",{className:"gf-flex gf-justify-center gf-items-center gf-gap-3",children:[a,n&&jsxRuntime.jsx(ClientOnlyLottie,{animationData:spinnerAnimation,loop:!0,autoplay:!0,style:{width:24,height:24}})]})})}),typographyStyles=cva(["gf-font-haffer gf-text-dark-grey"],{variants:{size:{h1:"gf-text-[32px] gf-leading-[40px]",h2:"gf-text-xl gf-leading-[20px]",h3:"gf-text-base gf-leading-[20px]",h4:"gf-text-sm gf-leading-[20px]",h5:"gf-text-xs gf-leading-[16px]",h6:"gf-text-[10px] gf-leading-[12px]"},weight:{thin:"gf-font-thin",light:"gf-font-light",regular:"gf-font-regular",medium:"gf-font-medium",semibold:"gf-font-semibold",bold:"gf-font-bold",heavy:"gf-font-heavy",black:"gf-font-black"},breakpointSize:{"xs:h1":"xs:gf-text-[32px] xs:gf-leading-[48px]","xs:h2":"xs:gf-text-xl xs:gf-leading-7","xs:h3":"xs:gf-text-base xs:gf-leading-6","xs:h4":"xs:gf-text-sm xs:gf-leading-5","xs:h5":"xs:gf-text-xs xs:gf-leading-4","xs:h6":"xs:gf-text-[10px] xs:gf-leading-3","sm:h1":"sm:gf-text-[32px] sm:gf-leading-[48px]","sm:h2":"sm:gf-text-xl sm:gf-leading-7","sm:h3":"sm:gf-text-base sm:gf-leading-6","sm:h4":"sm:gf-text-sm sm:gf-leading-5","sm:h5":"sm:gf-text-xs sm:gf-leading-4","sm:h6":"sm:gf-text-[10px] sm:gf-leading-3","md:h1":"md:gf-text-[32px] md:gf-leading-[48px]","md:h2":"md:gf-text-xl md:gf-leading-7","md:h3":"md:gf-text-base md:gf-leading-6","md:h4":"md:gf-text-sm md:gf-leading-5","md:h5":"md:gf-text-xs md:gf-leading-4","md:h6":"md:gf-text-[10px] md:gf-leading-3","lg:h1":"lg:gf-text-[32px] lg:gf-leading-[48px]","lg:h2":"lg:gf-text-xl lg:gf-leading-7","lg:h3":"lg:gf-text-base lg:gf-leading-6","lg:h4":"lg:gf-text-sm lg:gf-leading-5","lg:h5":"lg:gf-text-xs lg:gf-leading-4","lg:h6":"lg:gf-text-[10px] lg:gf-leading-3","xl:h1":"xl:gf-text-[32px] xl:gf-leading-[48px]","xl:h2":"xl:gf-text-xl xl:gf-leading-7","xl:h3":"xl:gf-text-base xl:gf-leading-6","xl:h4":"xl:gf-text-sm xl:gf-leading-5","xl:h5":"xl:gf-text-xs xl:gf-leading-4","xl:h6":"xl:gf-text-[10px] xl:gf-leading-3"},defaultVariants:{size:"h3",weight:"medium"}}}),Typography=({as:e="span",size:t,weight:i="regular",breakpoints:n,className:s,...a})=>{const o=n?Object.entries(n).map(([l,c])=>`${l}:${c}`).map(l=>typographyStyles({breakpointSize:l})).join(" "):"";return jsxRuntime.jsx(e,{className:cn(typographyStyles({size:t,weight:i,className:s}),o),...a})},OpacityStyles=cva("gf-bg-white",{variants:{level:{"extra-light":"gf-bg-opacity-10",light:"gf-bg-opacity-25",medium:"gf-bg-opacity-50","semi-dark":"gf-bg-opacity-75",full:"gf-bg-opacity-100"}},defaultVariants:{level:"full"}}),Opacity=({level:e,className:t,children:i,...n})=>jsxRuntime.jsx("div",{...n,className:cn(OpacityStyles({level:e}),t),children:i});var __assign=function(){return __assign=Object.assign||function(t){for(var i,n=1,s=arguments.length;n<s;n++){i=arguments[n];for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(t[a]=i[a])}return t},__assign.apply(this,arguments)};function __rest(e,t){var i={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(i[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var s=0,n=Object.getOwnPropertySymbols(e);s<n.length;s++)t.indexOf(n[s])<0&&Object.prototype.propertyIsEnumerable.call(e,n[s])&&(i[n[s]]=e[n[s]]);return i}function __spreadArray(e,t,i){if(i||arguments.length===2)for(var n=0,s=t.length,a;n<s;n++)(a||!(n in t))&&(a||(a=Array.prototype.slice.call(t,0,n)),a[n]=t[n]);return e.concat(a||Array.prototype.slice.call(t))}typeof SuppressedError=="function"&&SuppressedError;var zeroRightClassName="right-scroll-bar-position",fullWidthClassName="width-before-scroll-bar",noScrollbarsClassName="with-scroll-bars-hidden",removedBarSizeVariable="--removed-body-scroll-bar-size";function assignRef(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function useCallbackRef$2(e,t){var i=React.useState(function(){return{value:e,callback:t,facade:{get current(){return i.value},set current(n){var s=i.value;s!==n&&(i.value=n,i.callback(n,s))}}}})[0];return i.callback=t,i.facade}var useIsomorphicLayoutEffect$2=typeof window<"u"?React__namespace.useLayoutEffect:React__namespace.useEffect,currentValues=new WeakMap;function useMergeRefs(e,t){var i=useCallbackRef$2(null,function(n){return e.forEach(function(s){return assignRef(s,n)})});return useIsomorphicLayoutEffect$2(function(){var n=currentValues.get(i);if(n){var s=new Set(n),a=new Set(e),o=i.current;s.forEach(function(l){a.has(l)||assignRef(l,null)}),a.forEach(function(l){s.has(l)||assignRef(l,o)})}currentValues.set(i,e)},[e]),i}function ItoI(e){return e}function innerCreateMedium(e,t){t===void 0&&(t=ItoI);var i=[],n=!1,s={read:function(){if(n)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return i.length?i[i.length-1]:e},useMedium:function(a){var o=t(a,n);return i.push(o),function(){i=i.filter(function(l){return l!==o})}},assignSyncMedium:function(a){for(n=!0;i.length;){var o=i;i=[],o.forEach(a)}i={push:function(l){return a(l)},filter:function(){return i}}},assignMedium:function(a){n=!0;var o=[];if(i.length){var l=i;i=[],l.forEach(a),o=i}var c=function(){var f=o;o=[],f.forEach(a)},u=function(){return Promise.resolve().then(c)};u(),i={push:function(f){o.push(f),u()},filter:function(f){return o=o.filter(f),i}}}};return s}function createSidecarMedium(e){e===void 0&&(e={});var t=innerCreateMedium(null);return t.options=__assign({async:!0,ssr:!1},e),t}var SideCar$1=function(e){var t=e.sideCar,i=__rest(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var n=t.read();if(!n)throw new Error("Sidecar medium not found");return React__namespace.createElement(n,__assign({},i))};SideCar$1.isSideCarExport=!0;function exportSidecar(e,t){return e.useMedium(t),SideCar$1}var effectCar=createSidecarMedium(),nothing=function(){},RemoveScroll=React__namespace.forwardRef(function(e,t){var i=React__namespace.useRef(null),n=React__namespace.useState({onScrollCapture:nothing,onWheelCapture:nothing,onTouchMoveCapture:nothing}),s=n[0],a=n[1],o=e.forwardProps,l=e.children,c=e.className,u=e.removeScrollBar,f=e.enabled,d=e.shards,p=e.sideCar,b=e.noRelative,y=e.noIsolation,g=e.inert,P=e.allowPinchZoom,m=e.as,x=m===void 0?"div":m,C=e.gapMode,S=__rest(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),E=p,T=useMergeRefs([i,t]),L=__assign(__assign({},S),s);return React__namespace.createElement(React__namespace.Fragment,null,f&&React__namespace.createElement(E,{sideCar:effectCar,removeScrollBar:u,shards:d,noRelative:b,noIsolation:y,inert:g,setCallbacks:a,allowPinchZoom:!!P,lockRef:i,gapMode:C}),o?React__namespace.cloneElement(React__namespace.Children.only(l),__assign(__assign({},L),{ref:T})):React__namespace.createElement(x,__assign({},L,{className:c,ref:T}),l))});RemoveScroll.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},RemoveScroll.classNames={fullWidth:fullWidthClassName,zeroRight:zeroRightClassName};var getNonce=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function makeStyleTag(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=getNonce();return t&&e.setAttribute("nonce",t),e}function injectStyles(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function insertStyleTag(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var stylesheetSingleton=function(){var e=0,t=null;return{add:function(i){e==0&&(t=makeStyleTag())&&(injectStyles(t,i),insertStyleTag(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},styleHookSingleton=function(){var e=stylesheetSingleton();return function(t,i){React__namespace.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&i])}},styleSingleton=function(){var e=styleHookSingleton(),t=function(i){var n=i.styles,s=i.dynamic;return e(n,s),null};return t},zeroGap={left:0,top:0,right:0,gap:0},parse=function(e){return parseInt(e||"",10)||0},getOffset=function(e){var t=window.getComputedStyle(document.body),i=t[e==="padding"?"paddingLeft":"marginLeft"],n=t[e==="padding"?"paddingTop":"marginTop"],s=t[e==="padding"?"paddingRight":"marginRight"];return[parse(i),parse(n),parse(s)]},getGapWidth=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return zeroGap;var t=getOffset(e),i=document.documentElement.clientWidth,n=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,n-i+t[2]-t[0])}},Style=styleSingleton(),lockAttribute="data-scroll-locked",getStyles=function(e,t,i,n){var s=e.left,a=e.top,o=e.right,l=e.gap;return i===void 0&&(i="margin"),`
|
|
1
|
+
(function(e,t){typeof exports=="object"&&typeof module<"u"?t(exports,require("react/jsx-runtime"),require("react"),require("react-dom")):typeof define=="function"&&define.amd?define(["exports","react/jsx-runtime","react","react-dom"],t):(e=typeof globalThis<"u"?globalThis:e||self,t(e.ui={},e.jsxRuntime,e.React,e.ReactDOM))})(this,function(exports,jsxRuntime,React,ReactDOM){"use strict";function _interopNamespaceDefault(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const i in e)if(i!=="default"){const n=Object.getOwnPropertyDescriptor(e,i);Object.defineProperty(t,i,n.get?n:{enumerable:!0,get:()=>e[i]})}}return t.default=e,Object.freeze(t)}const React__namespace=_interopNamespaceDefault(React),ReactDOM__namespace=_interopNamespaceDefault(ReactDOM);function r(e){var t,i,n="";if(typeof e=="string"||typeof e=="number")n+=e;else if(typeof e=="object")if(Array.isArray(e)){var s=e.length;for(t=0;t<s;t++)e[t]&&(i=r(e[t]))&&(n&&(n+=" "),n+=i)}else for(i in e)e[i]&&(n&&(n+=" "),n+=i);return n}function clsx(){for(var e,t,i=0,n="",s=arguments.length;i<s;i++)(e=arguments[i])&&(t=r(e))&&(n&&(n+=" "),n+=t);return n}const falsyToString=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,cx=clsx,cva=(e,t)=>i=>{var n;if((t==null?void 0:t.variants)==null)return cx(e,i==null?void 0:i.class,i==null?void 0:i.className);const{variants:s,defaultVariants:a}=t,o=Object.keys(s).map(u=>{const f=i==null?void 0:i[u],d=a==null?void 0:a[u];if(f===null)return null;const p=falsyToString(f)||falsyToString(d);return s[u][p]}),l=i&&Object.entries(i).reduce((u,f)=>{let[d,p]=f;return p===void 0||(u[d]=p),u},{}),c=t==null||(n=t.compoundVariants)===null||n===void 0?void 0:n.reduce((u,f)=>{let{class:d,className:p,...b}=f;return Object.entries(b).every(y=>{let[g,P]=y;return Array.isArray(P)?P.includes({...a,...l}[g]):{...a,...l}[g]===P})?[...u,d,p]:u},[]);return cx(e,o,c,i==null?void 0:i.class,i==null?void 0:i.className)},CLASS_PART_SEPARATOR="-",createClassGroupUtils=e=>{const t=createClassMap(e),{conflictingClassGroups:i,conflictingClassGroupModifiers:n}=e;return{getClassGroupId:o=>{const l=o.split(CLASS_PART_SEPARATOR);return l[0]===""&&l.length!==1&&l.shift(),getGroupRecursive(l,t)||getGroupIdForArbitraryProperty(o)},getConflictingClassGroupIds:(o,l)=>{const c=i[o]||[];return l&&n[o]?[...c,...n[o]]:c}}},getGroupRecursive=(e,t)=>{var o;if(e.length===0)return t.classGroupId;const i=e[0],n=t.nextPart.get(i),s=n?getGroupRecursive(e.slice(1),n):void 0;if(s)return s;if(t.validators.length===0)return;const a=e.join(CLASS_PART_SEPARATOR);return(o=t.validators.find(({validator:l})=>l(a)))==null?void 0:o.classGroupId},arbitraryPropertyRegex=/^\[(.+)\]$/,getGroupIdForArbitraryProperty=e=>{if(arbitraryPropertyRegex.test(e)){const t=arbitraryPropertyRegex.exec(e)[1],i=t==null?void 0:t.substring(0,t.indexOf(":"));if(i)return"arbitrary.."+i}},createClassMap=e=>{const{theme:t,prefix:i}=e,n={nextPart:new Map,validators:[]};return getPrefixedClassGroupEntries(Object.entries(e.classGroups),i).forEach(([a,o])=>{processClassesRecursively(o,n,a,t)}),n},processClassesRecursively=(e,t,i,n)=>{e.forEach(s=>{if(typeof s=="string"){const a=s===""?t:getPart(t,s);a.classGroupId=i;return}if(typeof s=="function"){if(isThemeGetter(s)){processClassesRecursively(s(n),t,i,n);return}t.validators.push({validator:s,classGroupId:i});return}Object.entries(s).forEach(([a,o])=>{processClassesRecursively(o,getPart(t,a),i,n)})})},getPart=(e,t)=>{let i=e;return t.split(CLASS_PART_SEPARATOR).forEach(n=>{i.nextPart.has(n)||i.nextPart.set(n,{nextPart:new Map,validators:[]}),i=i.nextPart.get(n)}),i},isThemeGetter=e=>e.isThemeGetter,getPrefixedClassGroupEntries=(e,t)=>t?e.map(([i,n])=>{const s=n.map(a=>typeof a=="string"?t+a:typeof a=="object"?Object.fromEntries(Object.entries(a).map(([o,l])=>[t+o,l])):a);return[i,s]}):e,createLruCache=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,i=new Map,n=new Map;const s=(a,o)=>{i.set(a,o),t++,t>e&&(t=0,n=i,i=new Map)};return{get(a){let o=i.get(a);if(o!==void 0)return o;if((o=n.get(a))!==void 0)return s(a,o),o},set(a,o){i.has(a)?i.set(a,o):s(a,o)}}},IMPORTANT_MODIFIER="!",createParseClassName=e=>{const{separator:t,experimentalParseClassName:i}=e,n=t.length===1,s=t[0],a=t.length,o=l=>{const c=[];let u=0,f=0,d;for(let P=0;P<l.length;P++){let m=l[P];if(u===0){if(m===s&&(n||l.slice(P,P+a)===t)){c.push(l.slice(f,P)),f=P+a;continue}if(m==="/"){d=P;continue}}m==="["?u++:m==="]"&&u--}const p=c.length===0?l:l.substring(f),b=p.startsWith(IMPORTANT_MODIFIER),y=b?p.substring(1):p,g=d&&d>f?d-f:void 0;return{modifiers:c,hasImportantModifier:b,baseClassName:y,maybePostfixModifierPosition:g}};return i?l=>i({className:l,parseClassName:o}):o},sortModifiers=e=>{if(e.length<=1)return e;const t=[];let i=[];return e.forEach(n=>{n[0]==="["?(t.push(...i.sort(),n),i=[]):i.push(n)}),t.push(...i.sort()),t},createConfigUtils=e=>({cache:createLruCache(e.cacheSize),parseClassName:createParseClassName(e),...createClassGroupUtils(e)}),SPLIT_CLASSES_REGEX=/\s+/,mergeClassList=(e,t)=>{const{parseClassName:i,getClassGroupId:n,getConflictingClassGroupIds:s}=t,a=[],o=e.trim().split(SPLIT_CLASSES_REGEX);let l="";for(let c=o.length-1;c>=0;c-=1){const u=o[c],{modifiers:f,hasImportantModifier:d,baseClassName:p,maybePostfixModifierPosition:b}=i(u);let y=!!b,g=n(y?p.substring(0,b):p);if(!g){if(!y){l=u+(l.length>0?" "+l:l);continue}if(g=n(p),!g){l=u+(l.length>0?" "+l:l);continue}y=!1}const P=sortModifiers(f).join(":"),m=d?P+IMPORTANT_MODIFIER:P,x=m+g;if(a.includes(x))continue;a.push(x);const C=s(g,y);for(let S=0;S<C.length;++S){const E=C[S];a.push(m+E)}l=u+(l.length>0?" "+l:l)}return l};function twJoin(){let e=0,t,i,n="";for(;e<arguments.length;)(t=arguments[e++])&&(i=toValue(t))&&(n&&(n+=" "),n+=i);return n}const toValue=e=>{if(typeof e=="string")return e;let t,i="";for(let n=0;n<e.length;n++)e[n]&&(t=toValue(e[n]))&&(i&&(i+=" "),i+=t);return i};function createTailwindMerge(e,...t){let i,n,s,a=o;function o(c){const u=t.reduce((f,d)=>d(f),e());return i=createConfigUtils(u),n=i.cache.get,s=i.cache.set,a=l,l(c)}function l(c){const u=n(c);if(u)return u;const f=mergeClassList(c,i);return s(c,f),f}return function(){return a(twJoin.apply(null,arguments))}}const fromTheme=e=>{const t=i=>i[e]||[];return t.isThemeGetter=!0,t},arbitraryValueRegex=/^\[(?:([a-z-]+):)?(.+)\]$/i,fractionRegex=/^\d+\/\d+$/,stringLengths=new Set(["px","full","screen"]),tshirtUnitRegex=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,lengthUnitRegex=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,colorFunctionRegex=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,shadowRegex=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,imageRegex=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,isLength=e=>isNumber$1(e)||stringLengths.has(e)||fractionRegex.test(e),isArbitraryLength=e=>getIsArbitraryValue(e,"length",isLengthOnly),isNumber$1=e=>!!e&&!Number.isNaN(Number(e)),isArbitraryNumber=e=>getIsArbitraryValue(e,"number",isNumber$1),isInteger=e=>!!e&&Number.isInteger(Number(e)),isPercent=e=>e.endsWith("%")&&isNumber$1(e.slice(0,-1)),isArbitraryValue=e=>arbitraryValueRegex.test(e),isTshirtSize=e=>tshirtUnitRegex.test(e),sizeLabels=new Set(["length","size","percentage"]),isArbitrarySize=e=>getIsArbitraryValue(e,sizeLabels,isNever),isArbitraryPosition=e=>getIsArbitraryValue(e,"position",isNever),imageLabels=new Set(["image","url"]),isArbitraryImage=e=>getIsArbitraryValue(e,imageLabels,isImage),isArbitraryShadow=e=>getIsArbitraryValue(e,"",isShadow),isAny=()=>!0,getIsArbitraryValue=(e,t,i)=>{const n=arbitraryValueRegex.exec(e);return n?n[1]?typeof t=="string"?n[1]===t:t.has(n[1]):i(n[2]):!1},isLengthOnly=e=>lengthUnitRegex.test(e)&&!colorFunctionRegex.test(e),isNever=()=>!1,isShadow=e=>shadowRegex.test(e),isImage=e=>imageRegex.test(e),getDefaultConfig=()=>{const e=fromTheme("colors"),t=fromTheme("spacing"),i=fromTheme("blur"),n=fromTheme("brightness"),s=fromTheme("borderColor"),a=fromTheme("borderRadius"),o=fromTheme("borderSpacing"),l=fromTheme("borderWidth"),c=fromTheme("contrast"),u=fromTheme("grayscale"),f=fromTheme("hueRotate"),d=fromTheme("invert"),p=fromTheme("gap"),b=fromTheme("gradientColorStops"),y=fromTheme("gradientColorStopPositions"),g=fromTheme("inset"),P=fromTheme("margin"),m=fromTheme("opacity"),x=fromTheme("padding"),C=fromTheme("saturate"),S=fromTheme("scale"),E=fromTheme("sepia"),T=fromTheme("skew"),L=fromTheme("space"),_=fromTheme("translate"),k=()=>["auto","contain","none"],Z=()=>["auto","hidden","clip","visible","scroll"],B=()=>["auto",isArbitraryValue,t],D=()=>[isArbitraryValue,t],H=()=>["",isLength,isArbitraryLength],z=()=>["auto",isNumber$1,isArbitraryValue],O=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],V=()=>["solid","dashed","dotted","double","none"],A=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],R=()=>["start","end","center","between","around","evenly","stretch"],M=()=>["","0",isArbitraryValue],I=()=>["auto","avoid","all","avoid-page","page","left","right","column"],j=()=>[isNumber$1,isArbitraryValue];return{cacheSize:500,separator:":",theme:{colors:[isAny],spacing:[isLength,isArbitraryLength],blur:["none","",isTshirtSize,isArbitraryValue],brightness:j(),borderColor:[e],borderRadius:["none","","full",isTshirtSize,isArbitraryValue],borderSpacing:D(),borderWidth:H(),contrast:j(),grayscale:M(),hueRotate:j(),invert:M(),gap:D(),gradientColorStops:[e],gradientColorStopPositions:[isPercent,isArbitraryLength],inset:B(),margin:B(),opacity:j(),padding:D(),saturate:j(),scale:j(),sepia:M(),skew:j(),space:D(),translate:D()},classGroups:{aspect:[{aspect:["auto","square","video",isArbitraryValue]}],container:["container"],columns:[{columns:[isTshirtSize]}],"break-after":[{"break-after":I()}],"break-before":[{"break-before":I()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:[...O(),isArbitraryValue]}],overflow:[{overflow:Z()}],"overflow-x":[{"overflow-x":Z()}],"overflow-y":[{"overflow-y":Z()}],overscroll:[{overscroll:k()}],"overscroll-x":[{"overscroll-x":k()}],"overscroll-y":[{"overscroll-y":k()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[g]}],"inset-x":[{"inset-x":[g]}],"inset-y":[{"inset-y":[g]}],start:[{start:[g]}],end:[{end:[g]}],top:[{top:[g]}],right:[{right:[g]}],bottom:[{bottom:[g]}],left:[{left:[g]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",isInteger,isArbitraryValue]}],basis:[{basis:B()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",isArbitraryValue]}],grow:[{grow:M()}],shrink:[{shrink:M()}],order:[{order:["first","last","none",isInteger,isArbitraryValue]}],"grid-cols":[{"grid-cols":[isAny]}],"col-start-end":[{col:["auto",{span:["full",isInteger,isArbitraryValue]},isArbitraryValue]}],"col-start":[{"col-start":z()}],"col-end":[{"col-end":z()}],"grid-rows":[{"grid-rows":[isAny]}],"row-start-end":[{row:["auto",{span:[isInteger,isArbitraryValue]},isArbitraryValue]}],"row-start":[{"row-start":z()}],"row-end":[{"row-end":z()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",isArbitraryValue]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",isArbitraryValue]}],gap:[{gap:[p]}],"gap-x":[{"gap-x":[p]}],"gap-y":[{"gap-y":[p]}],"justify-content":[{justify:["normal",...R()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...R(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...R(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[x]}],px:[{px:[x]}],py:[{py:[x]}],ps:[{ps:[x]}],pe:[{pe:[x]}],pt:[{pt:[x]}],pr:[{pr:[x]}],pb:[{pb:[x]}],pl:[{pl:[x]}],m:[{m:[P]}],mx:[{mx:[P]}],my:[{my:[P]}],ms:[{ms:[P]}],me:[{me:[P]}],mt:[{mt:[P]}],mr:[{mr:[P]}],mb:[{mb:[P]}],ml:[{ml:[P]}],"space-x":[{"space-x":[L]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[L]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",isArbitraryValue,t]}],"min-w":[{"min-w":[isArbitraryValue,t,"min","max","fit"]}],"max-w":[{"max-w":[isArbitraryValue,t,"none","full","min","max","fit","prose",{screen:[isTshirtSize]},isTshirtSize]}],h:[{h:[isArbitraryValue,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[isArbitraryValue,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[isArbitraryValue,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[isArbitraryValue,t,"auto","min","max","fit"]}],"font-size":[{text:["base",isTshirtSize,isArbitraryLength]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",isArbitraryNumber]}],"font-family":[{font:[isAny]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:["tighter","tight","normal","wide","wider","widest",isArbitraryValue]}],"line-clamp":[{"line-clamp":["none",isNumber$1,isArbitraryNumber]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",isLength,isArbitraryValue]}],"list-image":[{"list-image":["none",isArbitraryValue]}],"list-style-type":[{list:["none","disc","decimal",isArbitraryValue]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[m]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[m]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...V(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",isLength,isArbitraryLength]}],"underline-offset":[{"underline-offset":["auto",isLength,isArbitraryValue]}],"text-decoration-color":[{decoration:[e]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:D()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",isArbitraryValue]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",isArbitraryValue]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[m]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...O(),isArbitraryPosition]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",isArbitrarySize]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},isArbitraryImage]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[y]}],"gradient-via-pos":[{via:[y]}],"gradient-to-pos":[{to:[y]}],"gradient-from":[{from:[b]}],"gradient-via":[{via:[b]}],"gradient-to":[{to:[b]}],rounded:[{rounded:[a]}],"rounded-s":[{"rounded-s":[a]}],"rounded-e":[{"rounded-e":[a]}],"rounded-t":[{"rounded-t":[a]}],"rounded-r":[{"rounded-r":[a]}],"rounded-b":[{"rounded-b":[a]}],"rounded-l":[{"rounded-l":[a]}],"rounded-ss":[{"rounded-ss":[a]}],"rounded-se":[{"rounded-se":[a]}],"rounded-ee":[{"rounded-ee":[a]}],"rounded-es":[{"rounded-es":[a]}],"rounded-tl":[{"rounded-tl":[a]}],"rounded-tr":[{"rounded-tr":[a]}],"rounded-br":[{"rounded-br":[a]}],"rounded-bl":[{"rounded-bl":[a]}],"border-w":[{border:[l]}],"border-w-x":[{"border-x":[l]}],"border-w-y":[{"border-y":[l]}],"border-w-s":[{"border-s":[l]}],"border-w-e":[{"border-e":[l]}],"border-w-t":[{"border-t":[l]}],"border-w-r":[{"border-r":[l]}],"border-w-b":[{"border-b":[l]}],"border-w-l":[{"border-l":[l]}],"border-opacity":[{"border-opacity":[m]}],"border-style":[{border:[...V(),"hidden"]}],"divide-x":[{"divide-x":[l]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[l]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[m]}],"divide-style":[{divide:V()}],"border-color":[{border:[s]}],"border-color-x":[{"border-x":[s]}],"border-color-y":[{"border-y":[s]}],"border-color-s":[{"border-s":[s]}],"border-color-e":[{"border-e":[s]}],"border-color-t":[{"border-t":[s]}],"border-color-r":[{"border-r":[s]}],"border-color-b":[{"border-b":[s]}],"border-color-l":[{"border-l":[s]}],"divide-color":[{divide:[s]}],"outline-style":[{outline:["",...V()]}],"outline-offset":[{"outline-offset":[isLength,isArbitraryValue]}],"outline-w":[{outline:[isLength,isArbitraryLength]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:H()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[m]}],"ring-offset-w":[{"ring-offset":[isLength,isArbitraryLength]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",isTshirtSize,isArbitraryShadow]}],"shadow-color":[{shadow:[isAny]}],opacity:[{opacity:[m]}],"mix-blend":[{"mix-blend":[...A(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":A()}],filter:[{filter:["","none"]}],blur:[{blur:[i]}],brightness:[{brightness:[n]}],contrast:[{contrast:[c]}],"drop-shadow":[{"drop-shadow":["","none",isTshirtSize,isArbitraryValue]}],grayscale:[{grayscale:[u]}],"hue-rotate":[{"hue-rotate":[f]}],invert:[{invert:[d]}],saturate:[{saturate:[C]}],sepia:[{sepia:[E]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[i]}],"backdrop-brightness":[{"backdrop-brightness":[n]}],"backdrop-contrast":[{"backdrop-contrast":[c]}],"backdrop-grayscale":[{"backdrop-grayscale":[u]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[f]}],"backdrop-invert":[{"backdrop-invert":[d]}],"backdrop-opacity":[{"backdrop-opacity":[m]}],"backdrop-saturate":[{"backdrop-saturate":[C]}],"backdrop-sepia":[{"backdrop-sepia":[E]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[o]}],"border-spacing-x":[{"border-spacing-x":[o]}],"border-spacing-y":[{"border-spacing-y":[o]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",isArbitraryValue]}],duration:[{duration:j()}],ease:[{ease:["linear","in","out","in-out",isArbitraryValue]}],delay:[{delay:j()}],animate:[{animate:["none","spin","ping","pulse","bounce",isArbitraryValue]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[S]}],"scale-x":[{"scale-x":[S]}],"scale-y":[{"scale-y":[S]}],rotate:[{rotate:[isInteger,isArbitraryValue]}],"translate-x":[{"translate-x":[_]}],"translate-y":[{"translate-y":[_]}],"skew-x":[{"skew-x":[T]}],"skew-y":[{"skew-y":[T]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",isArbitraryValue]}],accent:[{accent:["auto",e]}],appearance:[{appearance:["none","auto"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",isArbitraryValue]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":D()}],"scroll-mx":[{"scroll-mx":D()}],"scroll-my":[{"scroll-my":D()}],"scroll-ms":[{"scroll-ms":D()}],"scroll-me":[{"scroll-me":D()}],"scroll-mt":[{"scroll-mt":D()}],"scroll-mr":[{"scroll-mr":D()}],"scroll-mb":[{"scroll-mb":D()}],"scroll-ml":[{"scroll-ml":D()}],"scroll-p":[{"scroll-p":D()}],"scroll-px":[{"scroll-px":D()}],"scroll-py":[{"scroll-py":D()}],"scroll-ps":[{"scroll-ps":D()}],"scroll-pe":[{"scroll-pe":D()}],"scroll-pt":[{"scroll-pt":D()}],"scroll-pr":[{"scroll-pr":D()}],"scroll-pb":[{"scroll-pb":D()}],"scroll-pl":[{"scroll-pl":D()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",isArbitraryValue]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[isLength,isArbitraryLength,isArbitraryNumber]}],stroke:[{stroke:[e,"none"]}],sr:["sr-only","not-sr-only"],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]}}},twMerge=createTailwindMerge(getDefaultConfig),cn=(...e)=>twMerge(clsx(e)),useClientOnly=()=>{const[e,t]=React.useState(!1);return React.useEffect(()=>{t(!0)},[]),e},ClientOnly=({children:e,fallback:t=null})=>useClientOnly()?jsxRuntime.jsx(jsxRuntime.Fragment,{children:e}):jsxRuntime.jsx(jsxRuntime.Fragment,{children:t}),ClientOnlyLottie=({animationData:e,loop:t=!0,autoplay:i=!0,style:n})=>{const[s,a]=React.useState(null);return React.useEffect(()=>{Promise.resolve().then(()=>index_es).then(o=>{a(()=>o.default)})},[]),jsxRuntime.jsx(ClientOnly,{fallback:jsxRuntime.jsx("div",{style:n}),children:s?jsxRuntime.jsx(s,{animationData:e,loop:t,autoplay:i,style:n}):jsxRuntime.jsx("div",{style:n})})},v="5.7.4",fr=60,ip=0,op=120,w=64,h=64,nm="loading spinner",ddd=0,assets=[],layers=[{ddd:0,ind:1,ty:4,nm:"Shape Layer 1",sr:1,ks:{o:{a:0,k:100,ix:11},r:{a:1,k:[{i:{x:[.34],y:[1]},o:{x:[.66],y:[0]},t:0,s:[180]},{t:119,s:[540]}],ix:10},p:{a:0,k:[32.135,31.505,0],ix:2,l:2},a:{a:0,k:[-.75,2.75,0],ix:1,l:2},s:{a:0,k:[82,82,100],ix:6,l:2}},ao:0,shapes:[{ty:"gr",it:[{ind:0,ty:"sh",ix:1,ks:{a:0,k:{i:[[15.326,0],[0,-15.326],[-15.326,0],[0,15.326]],o:[[-15.326,0],[0,15.326],[15.326,0],[0,-15.326]],v:[[0,-27.75],[-27.75,0],[0,27.75],[27.75,0]],c:!0},ix:2},nm:"Path 1",mn:"ADBE Vector Shape - Group",hd:!1},{ty:"st",c:{a:0,k:[.505882352941,.478431372549,.564705882353,1],ix:3},o:{a:0,k:100,ix:4},w:{a:0,k:10,ix:5},lc:1,lj:1,ml:4,bm:0,nm:"Stroke 1",mn:"ADBE Vector Graphic - Stroke",hd:!1},{ty:"tr",p:{a:0,k:[-.75,2.75],ix:2},a:{a:0,k:[0,0],ix:1},s:{a:0,k:[100,100],ix:3},r:{a:0,k:0,ix:6},o:{a:0,k:100,ix:7},sk:{a:0,k:0,ix:4},sa:{a:0,k:0,ix:5},nm:"Transform"}],nm:"Ellipse 1",np:3,cix:2,bm:0,ix:1,mn:"ADBE Vector Group",hd:!1},{ty:"tm",s:{a:1,k:[{i:{x:[.833],y:[.833]},o:{x:[.167],y:[.167]},t:0,s:[100]},{i:{x:[.351],y:[.985]},o:{x:[.665],y:[0]},t:60,s:[90]},{t:120,s:[0]}],ix:1},e:{a:1,k:[{i:{x:[.34],y:[1]},o:{x:[.66],y:[0]},t:0,s:[100]},{t:60,s:[0]}],ix:2},o:{a:0,k:176,ix:3},m:1,ix:2,nm:"Trim Paths 1",mn:"ADBE Vector Filter - Trim",hd:!1}],ip:0,op:600,st:0,bm:0}],markers=[],spinnerAnimation={v,fr,ip,op,w,h,nm,ddd,assets,layers,markers},buttonStyles=cva(["gf-font-haffer","gf-font-medium","gf-min-w-32","gf-px-6","gf-focus:outline-none","gf-border-none","gf-transition-colors","gf-duration-500"],{variants:{variant:{primary:"gf-text-white gf-bg-button-primary",secondary:"gf-text-white gf-bg-button-secondary",ternary:"gf-text-dark-grey gf-bg-button-ternary",disabled:"gf-bg-button-disabled-bg gf-text-button-disabled-text gf-cursor-not-allowed"},size:{sm:"gf-h-9 gf-rounded-xl gf-text-xs",md:"gf-h-10 gf-rounded-xl gf-text-sm",lg:"gf-h-12 gf-rounded-2xl gf-text-base"},breakpointSize:{"xs:sm":"xs:gf-h-9 xs:gf-rounded-xl xs:gf-text-xs","xs:md":"xs:gf-h-10 xs:gf-rounded-xl xs:gf-text-sm","xs:lg":"xs:gf-h-12 xs:gf-rounded-2xl xs:gf-text-base","sm:sm":"sm:gf-h-9 sm:gf-rounded-xl sm:gf-text-xs","sm:md":"sm:gf-h-10 sm:gf-rounded-xl sm:gf-text-sm","sm:lg":"sm:gf-h-12 sm:gf-rounded-2xl sm:gf-text-base","md:sm":"md:gf-h-9 md:gf-rounded-xl md:gf-text-xs","md:md":"md:gf-h-10 md:gf-rounded-xl md:gf-text-sm","md:lg":"md:gf-h-12 md:gf-rounded-2xl md:gf-text-base","lg:sm":"lg:gf-h-9 lg:gf-rounded-xl lg:gf-text-xs","lg:md":"lg:gf-h-10 lg:gf-rounded-xl lg:gf-text-sm","lg:lg":"lg:gf-h-12 lg:gf-rounded-2xl lg:gf-text-base","xl:sm":"xl:gf-h-9 xl:gf-rounded-xl xl:gf-text-xs","xl:md":"xl:gf-h-10 xl:gf-rounded-xl xl:gf-text-sm","xl:lg":"xl:gf-h-12 xl:gf-rounded-2xl xl:gf-text-base"}},defaultVariants:{variant:"primary",size:"md"}}),Button=React.forwardRef(({variant:e,size:t,breakpoints:i,loading:n,className:s,children:a,colors:o,...l},c)=>{const u=i?Object.entries(i).map(([p,b])=>`${p}:${b}`).map(p=>buttonStyles({breakpointSize:p})).join(" "):"",d=(()=>{if(!o||!e)return{};const p=o[e];return p?e==="primary"?{backgroundColor:p}:e==="secondary"?{backgroundColor:p}:e==="ternary"?{backgroundColor:p}:e==="disabled"?{backgroundColor:p}:{}:{}})();return jsxRuntime.jsx("button",{ref:c,className:cn("gf-transition-colors gf-duration-300",s,buttonStyles({variant:e,size:t}),u,n),style:d,disabled:n||e==="disabled",...l,children:jsxRuntime.jsxs("div",{className:"gf-flex gf-justify-center gf-items-center gf-gap-3",children:[a,n&&jsxRuntime.jsx(ClientOnlyLottie,{animationData:spinnerAnimation,loop:!0,autoplay:!0,style:{width:24,height:24}})]})})}),typographyStyles=cva(["gf-font-haffer gf-text-dark-grey not-italic"],{variants:{size:{h1:"gf-text-[32px] gf-leading-[40px]",h2:"gf-text-xl gf-leading-[20px]",h3:"gf-text-base gf-leading-[20px]",h4:"gf-text-sm gf-leading-[20px]",h5:"gf-text-xs gf-leading-[16px]",h6:"gf-text-[10px] gf-leading-[12px]"},weight:{thin:"gf-font-thin",light:"gf-font-light",regular:"gf-font-regular",medium:"gf-font-medium",semibold:"gf-font-semibold",bold:"gf-font-bold",heavy:"gf-font-heavy",black:"gf-font-black"},breakpointSize:{"xs:h1":"xs:gf-text-[32px] xs:gf-leading-[48px]","xs:h2":"xs:gf-text-xl xs:gf-leading-7","xs:h3":"xs:gf-text-base xs:gf-leading-6","xs:h4":"xs:gf-text-sm xs:gf-leading-5","xs:h5":"xs:gf-text-xs xs:gf-leading-4","xs:h6":"xs:gf-text-[10px] xs:gf-leading-3","sm:h1":"sm:gf-text-[32px] sm:gf-leading-[48px]","sm:h2":"sm:gf-text-xl sm:gf-leading-7","sm:h3":"sm:gf-text-base sm:gf-leading-6","sm:h4":"sm:gf-text-sm sm:gf-leading-5","sm:h5":"sm:gf-text-xs sm:gf-leading-4","sm:h6":"sm:gf-text-[10px] sm:gf-leading-3","md:h1":"md:gf-text-[32px] md:gf-leading-[48px]","md:h2":"md:gf-text-xl md:gf-leading-7","md:h3":"md:gf-text-base md:gf-leading-6","md:h4":"md:gf-text-sm md:gf-leading-5","md:h5":"md:gf-text-xs md:gf-leading-4","md:h6":"md:gf-text-[10px] md:gf-leading-3","lg:h1":"lg:gf-text-[32px] lg:gf-leading-[48px]","lg:h2":"lg:gf-text-xl lg:gf-leading-7","lg:h3":"lg:gf-text-base lg:gf-leading-6","lg:h4":"lg:gf-text-sm lg:gf-leading-5","lg:h5":"lg:gf-text-xs lg:gf-leading-4","lg:h6":"lg:gf-text-[10px] lg:gf-leading-3","xl:h1":"xl:gf-text-[32px] xl:gf-leading-[48px]","xl:h2":"xl:gf-text-xl xl:gf-leading-7","xl:h3":"xl:gf-text-base xl:gf-leading-6","xl:h4":"xl:gf-text-sm xl:gf-leading-5","xl:h5":"xl:gf-text-xs xl:gf-leading-4","xl:h6":"xl:gf-text-[10px] xl:gf-leading-3"},defaultVariants:{size:"h3",weight:"medium"}}}),Typography=({as:e="span",size:t,weight:i="regular",breakpoints:n,className:s,...a})=>{const o=n?Object.entries(n).map(([l,c])=>`${l}:${c}`).map(l=>typographyStyles({breakpointSize:l})).join(" "):"";return jsxRuntime.jsx(e,{className:cn(typographyStyles({size:t,weight:i,className:s}),o),...a})},OpacityStyles=cva("gf-bg-white",{variants:{level:{"extra-light":"gf-bg-opacity-10",light:"gf-bg-opacity-25",medium:"gf-bg-opacity-50","semi-dark":"gf-bg-opacity-75",full:"gf-bg-opacity-100"}},defaultVariants:{level:"full"}}),Opacity=({level:e,className:t,children:i,...n})=>jsxRuntime.jsx("div",{...n,className:cn(OpacityStyles({level:e}),t),children:i});var __assign=function(){return __assign=Object.assign||function(t){for(var i,n=1,s=arguments.length;n<s;n++){i=arguments[n];for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(t[a]=i[a])}return t},__assign.apply(this,arguments)};function __rest(e,t){var i={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(i[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var s=0,n=Object.getOwnPropertySymbols(e);s<n.length;s++)t.indexOf(n[s])<0&&Object.prototype.propertyIsEnumerable.call(e,n[s])&&(i[n[s]]=e[n[s]]);return i}function __spreadArray(e,t,i){if(i||arguments.length===2)for(var n=0,s=t.length,a;n<s;n++)(a||!(n in t))&&(a||(a=Array.prototype.slice.call(t,0,n)),a[n]=t[n]);return e.concat(a||Array.prototype.slice.call(t))}typeof SuppressedError=="function"&&SuppressedError;var zeroRightClassName="right-scroll-bar-position",fullWidthClassName="width-before-scroll-bar",noScrollbarsClassName="with-scroll-bars-hidden",removedBarSizeVariable="--removed-body-scroll-bar-size";function assignRef(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function useCallbackRef$2(e,t){var i=React.useState(function(){return{value:e,callback:t,facade:{get current(){return i.value},set current(n){var s=i.value;s!==n&&(i.value=n,i.callback(n,s))}}}})[0];return i.callback=t,i.facade}var useIsomorphicLayoutEffect$2=typeof window<"u"?React__namespace.useLayoutEffect:React__namespace.useEffect,currentValues=new WeakMap;function useMergeRefs(e,t){var i=useCallbackRef$2(null,function(n){return e.forEach(function(s){return assignRef(s,n)})});return useIsomorphicLayoutEffect$2(function(){var n=currentValues.get(i);if(n){var s=new Set(n),a=new Set(e),o=i.current;s.forEach(function(l){a.has(l)||assignRef(l,null)}),a.forEach(function(l){s.has(l)||assignRef(l,o)})}currentValues.set(i,e)},[e]),i}function ItoI(e){return e}function innerCreateMedium(e,t){t===void 0&&(t=ItoI);var i=[],n=!1,s={read:function(){if(n)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return i.length?i[i.length-1]:e},useMedium:function(a){var o=t(a,n);return i.push(o),function(){i=i.filter(function(l){return l!==o})}},assignSyncMedium:function(a){for(n=!0;i.length;){var o=i;i=[],o.forEach(a)}i={push:function(l){return a(l)},filter:function(){return i}}},assignMedium:function(a){n=!0;var o=[];if(i.length){var l=i;i=[],l.forEach(a),o=i}var c=function(){var f=o;o=[],f.forEach(a)},u=function(){return Promise.resolve().then(c)};u(),i={push:function(f){o.push(f),u()},filter:function(f){return o=o.filter(f),i}}}};return s}function createSidecarMedium(e){e===void 0&&(e={});var t=innerCreateMedium(null);return t.options=__assign({async:!0,ssr:!1},e),t}var SideCar$1=function(e){var t=e.sideCar,i=__rest(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var n=t.read();if(!n)throw new Error("Sidecar medium not found");return React__namespace.createElement(n,__assign({},i))};SideCar$1.isSideCarExport=!0;function exportSidecar(e,t){return e.useMedium(t),SideCar$1}var effectCar=createSidecarMedium(),nothing=function(){},RemoveScroll=React__namespace.forwardRef(function(e,t){var i=React__namespace.useRef(null),n=React__namespace.useState({onScrollCapture:nothing,onWheelCapture:nothing,onTouchMoveCapture:nothing}),s=n[0],a=n[1],o=e.forwardProps,l=e.children,c=e.className,u=e.removeScrollBar,f=e.enabled,d=e.shards,p=e.sideCar,b=e.noRelative,y=e.noIsolation,g=e.inert,P=e.allowPinchZoom,m=e.as,x=m===void 0?"div":m,C=e.gapMode,S=__rest(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),E=p,T=useMergeRefs([i,t]),L=__assign(__assign({},S),s);return React__namespace.createElement(React__namespace.Fragment,null,f&&React__namespace.createElement(E,{sideCar:effectCar,removeScrollBar:u,shards:d,noRelative:b,noIsolation:y,inert:g,setCallbacks:a,allowPinchZoom:!!P,lockRef:i,gapMode:C}),o?React__namespace.cloneElement(React__namespace.Children.only(l),__assign(__assign({},L),{ref:T})):React__namespace.createElement(x,__assign({},L,{className:c,ref:T}),l))});RemoveScroll.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},RemoveScroll.classNames={fullWidth:fullWidthClassName,zeroRight:zeroRightClassName};var getNonce=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function makeStyleTag(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=getNonce();return t&&e.setAttribute("nonce",t),e}function injectStyles(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function insertStyleTag(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var stylesheetSingleton=function(){var e=0,t=null;return{add:function(i){e==0&&(t=makeStyleTag())&&(injectStyles(t,i),insertStyleTag(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},styleHookSingleton=function(){var e=stylesheetSingleton();return function(t,i){React__namespace.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&i])}},styleSingleton=function(){var e=styleHookSingleton(),t=function(i){var n=i.styles,s=i.dynamic;return e(n,s),null};return t},zeroGap={left:0,top:0,right:0,gap:0},parse=function(e){return parseInt(e||"",10)||0},getOffset=function(e){var t=window.getComputedStyle(document.body),i=t[e==="padding"?"paddingLeft":"marginLeft"],n=t[e==="padding"?"paddingTop":"marginTop"],s=t[e==="padding"?"paddingRight":"marginRight"];return[parse(i),parse(n),parse(s)]},getGapWidth=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return zeroGap;var t=getOffset(e),i=document.documentElement.clientWidth,n=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,n-i+t[2]-t[0])}},Style=styleSingleton(),lockAttribute="data-scroll-locked",getStyles=function(e,t,i,n){var s=e.left,a=e.top,o=e.right,l=e.gap;return i===void 0&&(i="margin"),`
|
|
2
2
|
.`.concat(noScrollbarsClassName,` {
|
|
3
3
|
overflow: hidden `).concat(n,`;
|
|
4
4
|
padding-right: `).concat(l,"px ").concat(n,`;
|
|
@@ -62,7 +62,7 @@ For more information, see https://radix-ui.com/primitives/docs/components/${t.do
|
|
|
62
62
|
top: ${c}px !important;
|
|
63
63
|
left: ${u}px !important;
|
|
64
64
|
}
|
|
65
|
-
`),()=>{document.head.removeChild(f)}},[t]),jsxRuntime.jsx(PopChildMeasure,{isPresent:t,childRef:n,sizeRef:s,children:React__namespace.cloneElement(e,{ref:n})})}const PresenceChild=({children:e,initial:t,isPresent:i,onExitComplete:n,custom:s,presenceAffectsLayout:a,mode:o})=>{const l=useConstant(newChildrenMap),c=React.useId(),u=React.useCallback(d=>{l.set(d,!0);for(const p of l.values())if(!p)return;n&&n()},[l,n]),f=React.useMemo(()=>({id:c,initial:t,isPresent:i,custom:s,onExitComplete:u,register:d=>(l.set(d,!1),()=>l.delete(d))}),a?[Math.random(),u]:[i,u]);return React.useMemo(()=>{l.forEach((d,p)=>l.set(p,!1))},[i]),React__namespace.useEffect(()=>{!i&&!l.size&&n&&n()},[i]),o==="popLayout"&&(e=jsxRuntime.jsx(PopChild,{isPresent:i,children:e})),jsxRuntime.jsx(PresenceContext.Provider,{value:f,children:e})};function newChildrenMap(){return new Map}function usePresence(e=!0){const t=React.useContext(PresenceContext);if(t===null)return[!0,null];const{isPresent:i,onExitComplete:n,register:s}=t,a=React.useId();React.useEffect(()=>{e&&s(a)},[e]);const o=React.useCallback(()=>e&&n&&n(a),[a,n,e]);return!i&&n?[!1,o]:[!0]}const getChildKey=e=>e.key||"";function onlyElements(e){const t=[];return React.Children.forEach(e,i=>{React.isValidElement(i)&&t.push(i)}),t}const isBrowser=typeof window<"u",useIsomorphicLayoutEffect=isBrowser?React.useLayoutEffect:React.useEffect,AnimatePresence=({children:e,custom:t,initial:i=!0,onExitComplete:n,presenceAffectsLayout:s=!0,mode:a="sync",propagate:o=!1})=>{const[l,c]=usePresence(o),u=React.useMemo(()=>onlyElements(e),[e]),f=o&&!l?[]:u.map(getChildKey),d=React.useRef(!0),p=React.useRef(u),b=useConstant(()=>new Map),[y,g]=React.useState(u),[P,m]=React.useState(u);useIsomorphicLayoutEffect(()=>{d.current=!1,p.current=u;for(let S=0;S<P.length;S++){const E=getChildKey(P[S]);f.includes(E)?b.delete(E):b.get(E)!==!0&&b.set(E,!1)}},[P,f.length,f.join("-")]);const x=[];if(u!==y){let S=[...u];for(let E=0;E<P.length;E++){const T=P[E],L=getChildKey(T);f.includes(L)||(S.splice(E,0,T),x.push(T))}a==="wait"&&x.length&&(S=x),m(onlyElements(S)),g(u);return}process.env.NODE_ENV!=="production"&&a==="wait"&&P.length>1&&console.warn(`You're attempting to animate multiple children within AnimatePresence, but its mode is set to "wait". This will lead to odd visual behaviour.`);const{forceRender:C}=React.useContext(LayoutGroupContext);return jsxRuntime.jsx(jsxRuntime.Fragment,{children:P.map(S=>{const E=getChildKey(S),T=o&&!l?!1:u===P||f.includes(E),L=()=>{if(b.has(E))b.set(E,!0);else return;let _=!0;b.forEach(k=>{k||(_=!1)}),_&&(C==null||C(),m(p.current),o&&(c==null||c()),n&&n())};return jsxRuntime.jsx(PresenceChild,{isPresent:T,initial:!d.current||i?void 0:!1,custom:T?void 0:t,presenceAffectsLayout:s,mode:a,onExitComplete:T?void 0:L,children:S},E)})})},noop=e=>e;let warning=noop,invariant=noop;process.env.NODE_ENV!=="production"&&(warning=(e,t)=>{!e&&typeof console<"u"&&console.warn(t)},invariant=(e,t)=>{if(!e)throw new Error(t)});function memo(e){let t;return()=>(t===void 0&&(t=e()),t)}const progress=(e,t,i)=>{const n=t-e;return n===0?1:(i-e)/n},secondsToMilliseconds=e=>e*1e3,millisecondsToSeconds=e=>e/1e3,MotionGlobalConfig={useManualTiming:!1};function createRenderStep(e){let t=new Set,i=new Set,n=!1,s=!1;const a=new WeakSet;let o={delta:0,timestamp:0,isProcessing:!1};function l(u){a.has(u)&&(c.schedule(u),e()),u(o)}const c={schedule:(u,f=!1,d=!1)=>{const b=d&&n?t:i;return f&&a.add(u),b.has(u)||b.add(u),u},cancel:u=>{i.delete(u),a.delete(u)},process:u=>{if(o=u,n){s=!0;return}n=!0,[t,i]=[i,t],t.forEach(l),t.clear(),n=!1,s&&(s=!1,c.process(u))}};return c}const stepsOrder=["read","resolveKeyframes","update","preRender","render","postRender"],maxElapsed=40;function createRenderBatcher(e,t){let i=!1,n=!0;const s={delta:0,timestamp:0,isProcessing:!1},a=()=>i=!0,o=stepsOrder.reduce((m,x)=>(m[x]=createRenderStep(a),m),{}),{read:l,resolveKeyframes:c,update:u,preRender:f,render:d,postRender:p}=o,b=()=>{const m=performance.now();i=!1,s.delta=n?1e3/60:Math.max(Math.min(m-s.timestamp,maxElapsed),1),s.timestamp=m,s.isProcessing=!0,l.process(s),c.process(s),u.process(s),f.process(s),d.process(s),p.process(s),s.isProcessing=!1,i&&t&&(n=!1,e(b))},y=()=>{i=!0,n=!0,s.isProcessing||e(b)};return{schedule:stepsOrder.reduce((m,x)=>{const C=o[x];return m[x]=(S,E=!1,T=!1)=>(i||y(),C.schedule(S,E,T)),m},{}),cancel:m=>{for(let x=0;x<stepsOrder.length;x++)o[stepsOrder[x]].cancel(m)},state:s,steps:o}}const{schedule:frame,cancel:cancelFrame,state:frameData,steps:frameSteps}=createRenderBatcher(typeof requestAnimationFrame<"u"?requestAnimationFrame:noop,!0),LazyContext=React.createContext({strict:!1}),featureProps={animation:["animate","variants","whileHover","whileTap","exit","whileInView","whileFocus","whileDrag"],exit:["exit"],drag:["drag","dragControls"],focus:["whileFocus"],hover:["whileHover","onHoverStart","onHoverEnd"],tap:["whileTap","onTap","onTapStart","onTapCancel"],pan:["onPan","onPanStart","onPanSessionStart","onPanEnd"],inView:["whileInView","onViewportEnter","onViewportLeave"],layout:["layout","layoutId"]},featureDefinitions={};for(const e in featureProps)featureDefinitions[e]={isEnabled:t=>featureProps[e].some(i=>!!t[i])};function loadFeatures(e){for(const t in e)featureDefinitions[t]={...featureDefinitions[t],...e[t]}}const validMotionProps=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","custom","inherit","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","globalTapTarget","ignoreStrict","viewport"]);function isValidMotionProp(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||validMotionProps.has(e)}let shouldForward=e=>!isValidMotionProp(e);function loadExternalIsValidProp(e){e&&(shouldForward=t=>t.startsWith("on")?!isValidMotionProp(t):e(t))}try{loadExternalIsValidProp(require("@emotion/is-prop-valid").default)}catch(e){}function filterProps(e,t,i){const n={};for(const s in e)s==="values"&&typeof e.values=="object"||(shouldForward(s)||i===!0&&isValidMotionProp(s)||!t&&!isValidMotionProp(s)||e.draggable&&s.startsWith("onDrag"))&&(n[s]=e[s]);return n}const warned=new Set;function warnOnce(e,t,i){e||warned.has(t)||(console.warn(t),warned.add(t))}function createDOMMotionComponentProxy(e){if(typeof Proxy>"u")return e;const t=new Map,i=(...n)=>(process.env.NODE_ENV!=="production"&&warnOnce(!1,"motion() is deprecated. Use motion.create() instead."),e(...n));return new Proxy(i,{get:(n,s)=>s==="create"?e:(t.has(s)||t.set(s,e(s)),t.get(s))})}const MotionContext=React.createContext({});function isVariantLabel(e){return typeof e=="string"||Array.isArray(e)}function isAnimationControls(e){return e!==null&&typeof e=="object"&&typeof e.start=="function"}const variantPriorityOrder=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],variantProps=["initial",...variantPriorityOrder];function isControllingVariants(e){return isAnimationControls(e.animate)||variantProps.some(t=>isVariantLabel(e[t]))}function isVariantNode(e){return!!(isControllingVariants(e)||e.variants)}function getCurrentTreeVariants(e,t){if(isControllingVariants(e)){const{initial:i,animate:n}=e;return{initial:i===!1||isVariantLabel(i)?i:void 0,animate:isVariantLabel(n)?n:void 0}}return e.inherit!==!1?t:{}}function useCreateMotionContext(e){const{initial:t,animate:i}=getCurrentTreeVariants(e,React.useContext(MotionContext));return React.useMemo(()=>({initial:t,animate:i}),[variantLabelsAsDependency(t),variantLabelsAsDependency(i)])}function variantLabelsAsDependency(e){return Array.isArray(e)?e.join(" "):e}const motionComponentSymbol=Symbol.for("motionComponentSymbol");function isRefObject(e){return e&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function useMotionRef(e,t,i){return React.useCallback(n=>{n&&e.onMount&&e.onMount(n),t&&(n?t.mount(n):t.unmount()),i&&(typeof i=="function"?i(n):isRefObject(i)&&(i.current=n))},[t])}const camelToDash=e=>e.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),optimizedAppearDataId="framerAppearId",optimizedAppearDataAttribute="data-"+camelToDash(optimizedAppearDataId),{schedule:microtask}=createRenderBatcher(queueMicrotask,!1),SwitchLayoutGroupContext=React.createContext({});function useVisualElement(e,t,i,n,s){var a,o;const{visualElement:l}=React.useContext(MotionContext),c=React.useContext(LazyContext),u=React.useContext(PresenceContext),f=React.useContext(MotionConfigContext).reducedMotion,d=React.useRef(null);n=n||c.renderer,!d.current&&n&&(d.current=n(e,{visualState:t,parent:l,props:i,presenceContext:u,blockInitialAnimation:u?u.initial===!1:!1,reducedMotionConfig:f}));const p=d.current,b=React.useContext(SwitchLayoutGroupContext);p&&!p.projection&&s&&(p.type==="html"||p.type==="svg")&&createProjectionNode$1(d.current,i,s,b);const y=React.useRef(!1);React.useInsertionEffect(()=>{p&&y.current&&p.update(i,u)});const g=i[optimizedAppearDataAttribute],P=React.useRef(!!g&&!(!((a=window.MotionHandoffIsComplete)===null||a===void 0)&&a.call(window,g))&&((o=window.MotionHasOptimisedAnimation)===null||o===void 0?void 0:o.call(window,g)));return useIsomorphicLayoutEffect(()=>{p&&(y.current=!0,window.MotionIsMounted=!0,p.updateFeatures(),microtask.render(p.render),P.current&&p.animationState&&p.animationState.animateChanges())}),React.useEffect(()=>{p&&(!P.current&&p.animationState&&p.animationState.animateChanges(),P.current&&(queueMicrotask(()=>{var m;(m=window.MotionHandoffMarkAsComplete)===null||m===void 0||m.call(window,g)}),P.current=!1))}),p}function createProjectionNode$1(e,t,i,n){const{layoutId:s,layout:a,drag:o,dragConstraints:l,layoutScroll:c,layoutRoot:u}=t;e.projection=new i(e.latestValues,t["data-framer-portal-id"]?void 0:getClosestProjectingNode(e.parent)),e.projection.setOptions({layoutId:s,layout:a,alwaysMeasureLayout:!!o||l&&isRefObject(l),visualElement:e,animationType:typeof a=="string"?a:"both",initialPromotionConfig:n,layoutScroll:c,layoutRoot:u})}function getClosestProjectingNode(e){if(e)return e.options.allowProjection!==!1?e.projection:getClosestProjectingNode(e.parent)}function createRendererMotionComponent({preloadedFeatures:e,createVisualElement:t,useRender:i,useVisualState:n,Component:s}){var a,o;e&&loadFeatures(e);function l(u,f){let d;const p={...React.useContext(MotionConfigContext),...u,layoutId:useLayoutId(u)},{isStatic:b}=p,y=useCreateMotionContext(u),g=n(u,b);if(!b&&isBrowser){useStrictMode(p,e);const P=getProjectionFunctionality(p);d=P.MeasureLayout,y.visualElement=useVisualElement(s,g,p,t,P.ProjectionNode)}return jsxRuntime.jsxs(MotionContext.Provider,{value:y,children:[d&&y.visualElement?jsxRuntime.jsx(d,{visualElement:y.visualElement,...p}):null,i(s,u,useMotionRef(g,y.visualElement,f),g,b,y.visualElement)]})}l.displayName=`motion.${typeof s=="string"?s:`create(${(o=(a=s.displayName)!==null&&a!==void 0?a:s.name)!==null&&o!==void 0?o:""})`}`;const c=React.forwardRef(l);return c[motionComponentSymbol]=s,c}function useLayoutId({layoutId:e}){const t=React.useContext(LayoutGroupContext).id;return t&&e!==void 0?t+"-"+e:e}function useStrictMode(e,t){const i=React.useContext(LazyContext).strict;if(process.env.NODE_ENV!=="production"&&t&&i){const n="You have rendered a `motion` component within a `LazyMotion` component. This will break tree shaking. Import and render a `m` component instead.";e.ignoreStrict?warning(!1,n):invariant(!1,n)}}function getProjectionFunctionality(e){const{drag:t,layout:i}=featureDefinitions;if(!t&&!i)return{};const n={...t,...i};return{MeasureLayout:t!=null&&t.isEnabled(e)||i!=null&&i.isEnabled(e)?n.MeasureLayout:void 0,ProjectionNode:n.ProjectionNode}}const lowercaseSVGElements=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","switch","symbol","svg","text","tspan","use","view"];function isSVGComponent(e){return typeof e!="string"||e.includes("-")?!1:!!(lowercaseSVGElements.indexOf(e)>-1||/[A-Z]/u.test(e))}function getValueState(e){const t=[{},{}];return e==null||e.values.forEach((i,n)=>{t[0][n]=i.get(),t[1][n]=i.getVelocity()}),t}function resolveVariantFromProps(e,t,i,n){if(typeof t=="function"){const[s,a]=getValueState(n);t=t(i!==void 0?i:e.custom,s,a)}if(typeof t=="string"&&(t=e.variants&&e.variants[t]),typeof t=="function"){const[s,a]=getValueState(n);t=t(i!==void 0?i:e.custom,s,a)}return t}const isKeyframesTarget=e=>Array.isArray(e),isCustomValue=e=>!!(e&&typeof e=="object"&&e.mix&&e.toValue),resolveFinalValueInKeyframes=e=>isKeyframesTarget(e)?e[e.length-1]||0:e,isMotionValue=e=>!!(e&&e.getVelocity);function resolveMotionValue(e){const t=isMotionValue(e)?e.get():e;return isCustomValue(t)?t.toValue():t}function makeState({scrapeMotionValuesFromProps:e,createRenderState:t,onUpdate:i},n,s,a){const o={latestValues:makeLatestValues(n,s,a,e),renderState:t()};return i&&(o.onMount=l=>i({props:n,current:l,...o}),o.onUpdate=l=>i(l)),o}const makeUseVisualState=e=>(t,i)=>{const n=React.useContext(MotionContext),s=React.useContext(PresenceContext),a=()=>makeState(e,t,n,s);return i?a():useConstant(a)};function makeLatestValues(e,t,i,n){const s={},a=n(e,{});for(const p in a)s[p]=resolveMotionValue(a[p]);let{initial:o,animate:l}=e;const c=isControllingVariants(e),u=isVariantNode(e);t&&u&&!c&&e.inherit!==!1&&(o===void 0&&(o=t.initial),l===void 0&&(l=t.animate));let f=i?i.initial===!1:!1;f=f||o===!1;const d=f?l:o;if(d&&typeof d!="boolean"&&!isAnimationControls(d)){const p=Array.isArray(d)?d:[d];for(let b=0;b<p.length;b++){const y=resolveVariantFromProps(e,p[b]);if(y){const{transitionEnd:g,transition:P,...m}=y;for(const x in m){let C=m[x];if(Array.isArray(C)){const S=f?C.length-1:0;C=C[S]}C!==null&&(s[x]=C)}for(const x in g)s[x]=g[x]}}}return s}const transformPropOrder=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],transformProps=new Set(transformPropOrder),checkStringStartsWith=e=>t=>typeof t=="string"&&t.startsWith(e),isCSSVariableName=checkStringStartsWith("--"),startsAsVariableToken=checkStringStartsWith("var(--"),isCSSVariableToken=e=>startsAsVariableToken(e)?singleCssVariableRegex.test(e.split("/*")[0].trim()):!1,singleCssVariableRegex=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,getValueAsType=(e,t)=>t&&typeof e=="number"?t.transform(e):e,clamp=(e,t,i)=>i>t?t:i<e?e:i,number={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},alpha={...number,transform:e=>clamp(0,1,e)},scale={...number,default:1},createUnitType=e=>({test:t=>typeof t=="string"&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),degrees=createUnitType("deg"),percent=createUnitType("%"),px=createUnitType("px"),vh=createUnitType("vh"),vw=createUnitType("vw"),progressPercentage={...percent,parse:e=>percent.parse(e)/100,transform:e=>percent.transform(e*100)},browserNumberValueTypes={borderWidth:px,borderTopWidth:px,borderRightWidth:px,borderBottomWidth:px,borderLeftWidth:px,borderRadius:px,radius:px,borderTopLeftRadius:px,borderTopRightRadius:px,borderBottomRightRadius:px,borderBottomLeftRadius:px,width:px,maxWidth:px,height:px,maxHeight:px,top:px,right:px,bottom:px,left:px,padding:px,paddingTop:px,paddingRight:px,paddingBottom:px,paddingLeft:px,margin:px,marginTop:px,marginRight:px,marginBottom:px,marginLeft:px,backgroundPositionX:px,backgroundPositionY:px},transformValueTypes={rotate:degrees,rotateX:degrees,rotateY:degrees,rotateZ:degrees,scale,scaleX:scale,scaleY:scale,scaleZ:scale,skew:degrees,skewX:degrees,skewY:degrees,distance:px,translateX:px,translateY:px,translateZ:px,x:px,y:px,z:px,perspective:px,transformPerspective:px,opacity:alpha,originX:progressPercentage,originY:progressPercentage,originZ:px},int={...number,transform:Math.round},numberValueTypes={...browserNumberValueTypes,...transformValueTypes,zIndex:int,size:px,fillOpacity:alpha,strokeOpacity:alpha,numOctaves:int},translateAlias={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},numTransforms=transformPropOrder.length;function buildTransform(e,t,i){let n="",s=!0;for(let a=0;a<numTransforms;a++){const o=transformPropOrder[a],l=e[o];if(l===void 0)continue;let c=!0;if(typeof l=="number"?c=l===(o.startsWith("scale")?1:0):c=parseFloat(l)===0,!c||i){const u=getValueAsType(l,numberValueTypes[o]);if(!c){s=!1;const f=translateAlias[o]||o;n+=`${f}(${u}) `}i&&(t[o]=u)}}return n=n.trim(),i?n=i(t,s?"":n):s&&(n="none"),n}function buildHTMLStyles(e,t,i){const{style:n,vars:s,transformOrigin:a}=e;let o=!1,l=!1;for(const c in t){const u=t[c];if(transformProps.has(c)){o=!0;continue}else if(isCSSVariableName(c)){s[c]=u;continue}else{const f=getValueAsType(u,numberValueTypes[c]);c.startsWith("origin")?(l=!0,a[c]=f):n[c]=f}}if(t.transform||(o||i?n.transform=buildTransform(t,e.transform,i):n.transform&&(n.transform="none")),l){const{originX:c="50%",originY:u="50%",originZ:f=0}=a;n.transformOrigin=`${c} ${u} ${f}`}}const dashKeys={offset:"stroke-dashoffset",array:"stroke-dasharray"},camelKeys={offset:"strokeDashoffset",array:"strokeDasharray"};function buildSVGPath(e,t,i=1,n=0,s=!0){e.pathLength=1;const a=s?dashKeys:camelKeys;e[a.offset]=px.transform(-n);const o=px.transform(t),l=px.transform(i);e[a.array]=`${o} ${l}`}function calcOrigin$1(e,t,i){return typeof e=="string"?e:px.transform(t+i*e)}function calcSVGTransformOrigin(e,t,i){const n=calcOrigin$1(t,e.x,e.width),s=calcOrigin$1(i,e.y,e.height);return`${n} ${s}`}function buildSVGAttrs(e,{attrX:t,attrY:i,attrScale:n,originX:s,originY:a,pathLength:o,pathSpacing:l=1,pathOffset:c=0,...u},f,d){if(buildHTMLStyles(e,u,d),f){e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);return}e.attrs=e.style,e.style={};const{attrs:p,style:b,dimensions:y}=e;p.transform&&(y&&(b.transform=p.transform),delete p.transform),y&&(s!==void 0||a!==void 0||b.transform)&&(b.transformOrigin=calcSVGTransformOrigin(y,s!==void 0?s:.5,a!==void 0?a:.5)),t!==void 0&&(p.x=t),i!==void 0&&(p.y=i),n!==void 0&&(p.scale=n),o!==void 0&&buildSVGPath(p,o,l,c,!1)}const createHtmlRenderState=()=>({style:{},transform:{},transformOrigin:{},vars:{}}),createSvgRenderState=()=>({...createHtmlRenderState(),attrs:{}}),isSVGTag=e=>typeof e=="string"&&e.toLowerCase()==="svg";function renderHTML(e,{style:t,vars:i},n,s){Object.assign(e.style,t,s&&s.getProjectionStyles(n));for(const a in i)e.style.setProperty(a,i[a])}const camelCaseAttributes=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength","startOffset","textLength","lengthAdjust"]);function renderSVG(e,t,i,n){renderHTML(e,t,void 0,n);for(const s in t.attrs)e.setAttribute(camelCaseAttributes.has(s)?s:camelToDash(s),t.attrs[s])}const scaleCorrectors={};function addScaleCorrector(e){Object.assign(scaleCorrectors,e)}function isForcedMotionValue(e,{layout:t,layoutId:i}){return transformProps.has(e)||e.startsWith("origin")||(t||i!==void 0)&&(!!scaleCorrectors[e]||e==="opacity")}function scrapeMotionValuesFromProps$1(e,t,i){var n;const{style:s}=e,a={};for(const o in s)(isMotionValue(s[o])||t.style&&isMotionValue(t.style[o])||isForcedMotionValue(o,e)||((n=i==null?void 0:i.getValue(o))===null||n===void 0?void 0:n.liveStyle)!==void 0)&&(a[o]=s[o]);return a}function scrapeMotionValuesFromProps(e,t,i){const n=scrapeMotionValuesFromProps$1(e,t,i);for(const s in e)if(isMotionValue(e[s])||isMotionValue(t[s])){const a=transformPropOrder.indexOf(s)!==-1?"attr"+s.charAt(0).toUpperCase()+s.substring(1):s;n[a]=e[s]}return n}function updateSVGDimensions(e,t){try{t.dimensions=typeof e.getBBox=="function"?e.getBBox():e.getBoundingClientRect()}catch{t.dimensions={x:0,y:0,width:0,height:0}}}const layoutProps=["x","y","width","height","cx","cy","r"],svgMotionConfig={useVisualState:makeUseVisualState({scrapeMotionValuesFromProps,createRenderState:createSvgRenderState,onUpdate:({props:e,prevProps:t,current:i,renderState:n,latestValues:s})=>{if(!i)return;let a=!!e.drag;if(!a){for(const l in s)if(transformProps.has(l)){a=!0;break}}if(!a)return;let o=!t;if(t)for(let l=0;l<layoutProps.length;l++){const c=layoutProps[l];e[c]!==t[c]&&(o=!0)}o&&frame.read(()=>{updateSVGDimensions(i,n),frame.render(()=>{buildSVGAttrs(n,s,isSVGTag(i.tagName),e.transformTemplate),renderSVG(i,n)})})}})},htmlMotionConfig={useVisualState:makeUseVisualState({scrapeMotionValuesFromProps:scrapeMotionValuesFromProps$1,createRenderState:createHtmlRenderState})};function copyRawValuesOnly(e,t,i){for(const n in t)!isMotionValue(t[n])&&!isForcedMotionValue(n,i)&&(e[n]=t[n])}function useInitialMotionValues({transformTemplate:e},t){return React.useMemo(()=>{const i=createHtmlRenderState();return buildHTMLStyles(i,t,e),Object.assign({},i.vars,i.style)},[t])}function useStyle(e,t){const i=e.style||{},n={};return copyRawValuesOnly(n,i,e),Object.assign(n,useInitialMotionValues(e,t)),n}function useHTMLProps(e,t){const i={},n=useStyle(e,t);return e.drag&&e.dragListener!==!1&&(i.draggable=!1,n.userSelect=n.WebkitUserSelect=n.WebkitTouchCallout="none",n.touchAction=e.drag===!0?"none":`pan-${e.drag==="x"?"y":"x"}`),e.tabIndex===void 0&&(e.onTap||e.onTapStart||e.whileTap)&&(i.tabIndex=0),i.style=n,i}function useSVGProps(e,t,i,n){const s=React.useMemo(()=>{const a=createSvgRenderState();return buildSVGAttrs(a,t,isSVGTag(n),e.transformTemplate),{...a.attrs,style:{...a.style}}},[t]);if(e.style){const a={};copyRawValuesOnly(a,e.style,e),s.style={...a,...s.style}}return s}function createUseRender(e=!1){return(i,n,s,{latestValues:a},o)=>{const c=(isSVGComponent(i)?useSVGProps:useHTMLProps)(n,a,o,i),u=filterProps(n,typeof i=="string",e),f=i!==React.Fragment?{...u,...c,ref:s}:{},{children:d}=n,p=React.useMemo(()=>isMotionValue(d)?d.get():d,[d]);return React.createElement(i,{...f,children:p})}}function createMotionComponentFactory(e,t){return function(n,{forwardMotionProps:s}={forwardMotionProps:!1}){const o={...isSVGComponent(n)?svgMotionConfig:htmlMotionConfig,preloadedFeatures:e,useRender:createUseRender(s),createVisualElement:t,Component:n};return createRendererMotionComponent(o)}}function shallowCompare(e,t){if(!Array.isArray(t))return!1;const i=t.length;if(i!==e.length)return!1;for(let n=0;n<i;n++)if(t[n]!==e[n])return!1;return!0}function resolveVariant(e,t,i){const n=e.getProps();return resolveVariantFromProps(n,t,i!==void 0?i:n.custom,e)}const supportsScrollTimeline=memo(()=>window.ScrollTimeline!==void 0);class BaseGroupPlaybackControls{constructor(t){this.stop=()=>this.runAll("stop"),this.animations=t.filter(Boolean)}get finished(){return Promise.all(this.animations.map(t=>"finished"in t?t.finished:t))}getAll(t){return this.animations[0][t]}setAll(t,i){for(let n=0;n<this.animations.length;n++)this.animations[n][t]=i}attachTimeline(t,i){const n=this.animations.map(s=>{if(supportsScrollTimeline()&&s.attachTimeline)return s.attachTimeline(t);if(typeof i=="function")return i(s)});return()=>{n.forEach((s,a)=>{s&&s(),this.animations[a].stop()})}}get time(){return this.getAll("time")}set time(t){this.setAll("time",t)}get speed(){return this.getAll("speed")}set speed(t){this.setAll("speed",t)}get startTime(){return this.getAll("startTime")}get duration(){let t=0;for(let i=0;i<this.animations.length;i++)t=Math.max(t,this.animations[i].duration);return t}runAll(t){this.animations.forEach(i=>i[t]())}flatten(){this.runAll("flatten")}play(){this.runAll("play")}pause(){this.runAll("pause")}cancel(){this.runAll("cancel")}complete(){this.runAll("complete")}}class GroupPlaybackControls extends BaseGroupPlaybackControls{then(t,i){return Promise.all(this.animations).then(t).catch(i)}}function getValueTransition$1(e,t){return e?e[t]||e.default||e:void 0}const maxGeneratorDuration=2e4;function calcGeneratorDuration(e){let t=0;const i=50;let n=e.next(t);for(;!n.done&&t<maxGeneratorDuration;)t+=i,n=e.next(t);return t>=maxGeneratorDuration?1/0:t}function createGeneratorEasing(e,t=100,i){const n=i({...e,keyframes:[0,t]}),s=Math.min(calcGeneratorDuration(n),maxGeneratorDuration);return{type:"keyframes",ease:a=>n.next(s*a).value/t,duration:millisecondsToSeconds(s)}}function isGenerator(e){return typeof e=="function"}function attachTimeline(e,t){e.timeline=t,e.onfinish=null}const isBezierDefinition=e=>Array.isArray(e)&&typeof e[0]=="number",supportsFlags={linearEasing:void 0};function memoSupports(e,t){const i=memo(e);return()=>{var n;return(n=supportsFlags[t])!==null&&n!==void 0?n:i()}}const supportsLinearEasing=memoSupports(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),generateLinearEasing=(e,t,i=10)=>{let n="";const s=Math.max(Math.round(t/i),2);for(let a=0;a<s;a++)n+=e(progress(0,s-1,a))+", ";return`linear(${n.substring(0,n.length-2)})`};function isWaapiSupportedEasing(e){return!!(typeof e=="function"&&supportsLinearEasing()||!e||typeof e=="string"&&(e in supportedWaapiEasing||supportsLinearEasing())||isBezierDefinition(e)||Array.isArray(e)&&e.every(isWaapiSupportedEasing))}const cubicBezierAsString=([e,t,i,n])=>`cubic-bezier(${e}, ${t}, ${i}, ${n})`,supportedWaapiEasing={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:cubicBezierAsString([0,.65,.55,1]),circOut:cubicBezierAsString([.55,0,1,.45]),backIn:cubicBezierAsString([.31,.01,.66,-.59]),backOut:cubicBezierAsString([.33,1.53,.69,.99])};function mapEasingToNativeEasing(e,t){if(e)return typeof e=="function"&&supportsLinearEasing()?generateLinearEasing(e,t):isBezierDefinition(e)?cubicBezierAsString(e):Array.isArray(e)?e.map(i=>mapEasingToNativeEasing(i,t)||supportedWaapiEasing.easeOut):supportedWaapiEasing[e]}const isDragging={x:!1,y:!1};function isDragActive(){return isDragging.x||isDragging.y}function resolveElements(e,t,i){var n;if(e instanceof Element)return[e];if(typeof e=="string"){let s=document;t&&(s=t.current);const a=(n=i==null?void 0:i[e])!==null&&n!==void 0?n:s.querySelectorAll(e);return a?Array.from(a):[]}return Array.from(e)}function setupGesture(e,t){const i=resolveElements(e),n=new AbortController,s={passive:!0,...t,signal:n.signal};return[i,s,()=>n.abort()]}function filterEvents$1(e){return t=>{t.pointerType==="touch"||isDragActive()||e(t)}}function hover(e,t,i={}){const[n,s,a]=setupGesture(e,i),o=filterEvents$1(l=>{const{target:c}=l,u=t(l);if(typeof u!="function"||!c)return;const f=filterEvents$1(d=>{u(d),c.removeEventListener("pointerleave",f)});c.addEventListener("pointerleave",f,s)});return n.forEach(l=>{l.addEventListener("pointerenter",o,s)}),a}const isNodeOrChild=(e,t)=>t?e===t?!0:isNodeOrChild(e,t.parentElement):!1,isPrimaryPointer=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==!1,focusableElements=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function isElementKeyboardAccessible(e){return focusableElements.has(e.tagName)||e.tabIndex!==-1}const isPressing=new WeakSet;function filterEvents(e){return t=>{t.key==="Enter"&&e(t)}}function firePointerEvent(e,t){e.dispatchEvent(new PointerEvent("pointer"+t,{isPrimary:!0,bubbles:!0}))}const enableKeyboardPress=(e,t)=>{const i=e.currentTarget;if(!i)return;const n=filterEvents(()=>{if(isPressing.has(i))return;firePointerEvent(i,"down");const s=filterEvents(()=>{firePointerEvent(i,"up")}),a=()=>firePointerEvent(i,"cancel");i.addEventListener("keyup",s,t),i.addEventListener("blur",a,t)});i.addEventListener("keydown",n,t),i.addEventListener("blur",()=>i.removeEventListener("keydown",n),t)};function isValidPressEvent(e){return isPrimaryPointer(e)&&!isDragActive()}function press(e,t,i={}){const[n,s,a]=setupGesture(e,i),o=l=>{const c=l.currentTarget;if(!isValidPressEvent(l)||isPressing.has(c))return;isPressing.add(c);const u=t(l),f=(b,y)=>{window.removeEventListener("pointerup",d),window.removeEventListener("pointercancel",p),!(!isValidPressEvent(b)||!isPressing.has(c))&&(isPressing.delete(c),typeof u=="function"&&u(b,{success:y}))},d=b=>{f(b,i.useGlobalTarget||isNodeOrChild(c,b.target))},p=b=>{f(b,!1)};window.addEventListener("pointerup",d,s),window.addEventListener("pointercancel",p,s)};return n.forEach(l=>{!isElementKeyboardAccessible(l)&&l.getAttribute("tabindex")===null&&(l.tabIndex=0),(i.useGlobalTarget?window:l).addEventListener("pointerdown",o,s),l.addEventListener("focus",u=>enableKeyboardPress(u,s),s)}),a}function setDragLock(e){return e==="x"||e==="y"?isDragging[e]?null:(isDragging[e]=!0,()=>{isDragging[e]=!1}):isDragging.x||isDragging.y?null:(isDragging.x=isDragging.y=!0,()=>{isDragging.x=isDragging.y=!1})}const positionalKeys=new Set(["width","height","top","left","right","bottom",...transformPropOrder]);let now;function clearTime(){now=void 0}const time={now:()=>(now===void 0&&time.set(frameData.isProcessing||MotionGlobalConfig.useManualTiming?frameData.timestamp:performance.now()),now),set:e=>{now=e,queueMicrotask(clearTime)}};function addUniqueItem(e,t){e.indexOf(t)===-1&&e.push(t)}function removeItem(e,t){const i=e.indexOf(t);i>-1&&e.splice(i,1)}class SubscriptionManager{constructor(){this.subscriptions=[]}add(t){return addUniqueItem(this.subscriptions,t),()=>removeItem(this.subscriptions,t)}notify(t,i,n){const s=this.subscriptions.length;if(s)if(s===1)this.subscriptions[0](t,i,n);else for(let a=0;a<s;a++){const o=this.subscriptions[a];o&&o(t,i,n)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}function velocityPerSecond(e,t){return t?e*(1e3/t):0}const MAX_VELOCITY_DELTA=30,isFloat=e=>!isNaN(parseFloat(e)),collectMotionValues={current:void 0};class MotionValue{constructor(t,i={}){this.version="11.18.2",this.canTrackVelocity=null,this.events={},this.updateAndNotify=(n,s=!0)=>{const a=time.now();this.updatedAt!==a&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(n),this.current!==this.prev&&this.events.change&&this.events.change.notify(this.current),s&&this.events.renderRequest&&this.events.renderRequest.notify(this.current)},this.hasAnimated=!1,this.setCurrent(t),this.owner=i.owner}setCurrent(t){this.current=t,this.updatedAt=time.now(),this.canTrackVelocity===null&&t!==void 0&&(this.canTrackVelocity=isFloat(this.current))}setPrevFrameValue(t=this.current){this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt}onChange(t){return process.env.NODE_ENV!=="production"&&warnOnce(!1,'value.onChange(callback) is deprecated. Switch to value.on("change", callback).'),this.on("change",t)}on(t,i){this.events[t]||(this.events[t]=new SubscriptionManager);const n=this.events[t].add(i);return t==="change"?()=>{n(),frame.read(()=>{this.events.change.getSize()||this.stop()})}:n}clearListeners(){for(const t in this.events)this.events[t].clear()}attach(t,i){this.passiveEffect=t,this.stopPassiveEffect=i}set(t,i=!0){!i||!this.passiveEffect?this.updateAndNotify(t,i):this.passiveEffect(t,this.updateAndNotify)}setWithVelocity(t,i,n){this.set(i),this.prev=void 0,this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt-n}jump(t,i=!0){this.updateAndNotify(t),this.prev=t,this.prevUpdatedAt=this.prevFrameValue=void 0,i&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}get(){return collectMotionValues.current&&collectMotionValues.current.push(this),this.current}getPrevious(){return this.prev}getVelocity(){const t=time.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||t-this.updatedAt>MAX_VELOCITY_DELTA)return 0;const i=Math.min(this.updatedAt-this.prevUpdatedAt,MAX_VELOCITY_DELTA);return velocityPerSecond(parseFloat(this.current)-parseFloat(this.prevFrameValue),i)}start(t){return this.stop(),new Promise(i=>{this.hasAnimated=!0,this.animation=t(i),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function motionValue(e,t){return new MotionValue(e,t)}function setMotionValue(e,t,i){e.hasValue(t)?e.getValue(t).set(i):e.addValue(t,motionValue(i))}function setTarget(e,t){const i=resolveVariant(e,t);let{transitionEnd:n={},transition:s={},...a}=i||{};a={...a,...n};for(const o in a){const l=resolveFinalValueInKeyframes(a[o]);setMotionValue(e,o,l)}}function isWillChangeMotionValue(e){return!!(isMotionValue(e)&&e.add)}function addValueToWillChange(e,t){const i=e.getValue("willChange");if(isWillChangeMotionValue(i))return i.add(t)}function getOptimisedAppearId(e){return e.props[optimizedAppearDataAttribute]}const calcBezier=(e,t,i)=>(((1-3*i+3*t)*e+(3*i-6*t))*e+3*t)*e,subdivisionPrecision=1e-7,subdivisionMaxIterations=12;function binarySubdivide(e,t,i,n,s){let a,o,l=0;do o=t+(i-t)/2,a=calcBezier(o,n,s)-e,a>0?i=o:t=o;while(Math.abs(a)>subdivisionPrecision&&++l<subdivisionMaxIterations);return o}function cubicBezier(e,t,i,n){if(e===t&&i===n)return noop;const s=a=>binarySubdivide(a,0,1,e,i);return a=>a===0||a===1?a:calcBezier(s(a),t,n)}const mirrorEasing=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,reverseEasing=e=>t=>1-e(1-t),backOut=cubicBezier(.33,1.53,.69,.99),backIn=reverseEasing(backOut),backInOut=mirrorEasing(backIn),anticipate=e=>(e*=2)<1?.5*backIn(e):.5*(2-Math.pow(2,-10*(e-1))),circIn=e=>1-Math.sin(Math.acos(e)),circOut=reverseEasing(circIn),circInOut=mirrorEasing(circIn),isZeroValueString=e=>/^0[^.\s]+$/u.test(e);function isNone(e){return typeof e=="number"?e===0:e!==null?e==="none"||e==="0"||isZeroValueString(e):!0}const sanitize=e=>Math.round(e*1e5)/1e5,floatRegex=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function isNullish(e){return e==null}const singleColorRegex=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,isColorString=(e,t)=>i=>!!(typeof i=="string"&&singleColorRegex.test(i)&&i.startsWith(e)||t&&!isNullish(i)&&Object.prototype.hasOwnProperty.call(i,t)),splitColor=(e,t,i)=>n=>{if(typeof n!="string")return n;const[s,a,o,l]=n.match(floatRegex);return{[e]:parseFloat(s),[t]:parseFloat(a),[i]:parseFloat(o),alpha:l!==void 0?parseFloat(l):1}},clampRgbUnit=e=>clamp(0,255,e),rgbUnit={...number,transform:e=>Math.round(clampRgbUnit(e))},rgba={test:isColorString("rgb","red"),parse:splitColor("red","green","blue"),transform:({red:e,green:t,blue:i,alpha:n=1})=>"rgba("+rgbUnit.transform(e)+", "+rgbUnit.transform(t)+", "+rgbUnit.transform(i)+", "+sanitize(alpha.transform(n))+")"};function parseHex(e){let t="",i="",n="",s="";return e.length>5?(t=e.substring(1,3),i=e.substring(3,5),n=e.substring(5,7),s=e.substring(7,9)):(t=e.substring(1,2),i=e.substring(2,3),n=e.substring(3,4),s=e.substring(4,5),t+=t,i+=i,n+=n,s+=s),{red:parseInt(t,16),green:parseInt(i,16),blue:parseInt(n,16),alpha:s?parseInt(s,16)/255:1}}const hex={test:isColorString("#"),parse:parseHex,transform:rgba.transform},hsla={test:isColorString("hsl","hue"),parse:splitColor("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:i,alpha:n=1})=>"hsla("+Math.round(e)+", "+percent.transform(sanitize(t))+", "+percent.transform(sanitize(i))+", "+sanitize(alpha.transform(n))+")"},color={test:e=>rgba.test(e)||hex.test(e)||hsla.test(e),parse:e=>rgba.test(e)?rgba.parse(e):hsla.test(e)?hsla.parse(e):hex.parse(e),transform:e=>typeof e=="string"?e:e.hasOwnProperty("red")?rgba.transform(e):hsla.transform(e)},colorRegex=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function test(e){var t,i;return isNaN(e)&&typeof e=="string"&&(((t=e.match(floatRegex))===null||t===void 0?void 0:t.length)||0)+(((i=e.match(colorRegex))===null||i===void 0?void 0:i.length)||0)>0}const NUMBER_TOKEN="number",COLOR_TOKEN="color",VAR_TOKEN="var",VAR_FUNCTION_TOKEN="var(",SPLIT_TOKEN="${}",complexRegex=/var\s*\(\s*--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)|#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\)|-?(?:\d+(?:\.\d+)?|\.\d+)/giu;function analyseComplexValue(e){const t=e.toString(),i=[],n={color:[],number:[],var:[]},s=[];let a=0;const l=t.replace(complexRegex,c=>(color.test(c)?(n.color.push(a),s.push(COLOR_TOKEN),i.push(color.parse(c))):c.startsWith(VAR_FUNCTION_TOKEN)?(n.var.push(a),s.push(VAR_TOKEN),i.push(c)):(n.number.push(a),s.push(NUMBER_TOKEN),i.push(parseFloat(c))),++a,SPLIT_TOKEN)).split(SPLIT_TOKEN);return{values:i,split:l,indexes:n,types:s}}function parseComplexValue(e){return analyseComplexValue(e).values}function createTransformer(e){const{split:t,types:i}=analyseComplexValue(e),n=t.length;return s=>{let a="";for(let o=0;o<n;o++)if(a+=t[o],s[o]!==void 0){const l=i[o];l===NUMBER_TOKEN?a+=sanitize(s[o]):l===COLOR_TOKEN?a+=color.transform(s[o]):a+=s[o]}return a}}const convertNumbersToZero=e=>typeof e=="number"?0:e;function getAnimatableNone$1(e){const t=parseComplexValue(e);return createTransformer(e)(t.map(convertNumbersToZero))}const complex={test,parse:parseComplexValue,createTransformer,getAnimatableNone:getAnimatableNone$1},maxDefaults=new Set(["brightness","contrast","saturate","opacity"]);function applyDefaultFilter(e){const[t,i]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[n]=i.match(floatRegex)||[];if(!n)return e;const s=i.replace(n,"");let a=maxDefaults.has(t)?1:0;return n!==i&&(a*=100),t+"("+a+s+")"}const functionRegex=/\b([a-z-]*)\(.*?\)/gu,filter={...complex,getAnimatableNone:e=>{const t=e.match(functionRegex);return t?t.map(applyDefaultFilter).join(" "):e}},defaultValueTypes={...numberValueTypes,color,backgroundColor:color,outlineColor:color,fill:color,stroke:color,borderColor:color,borderTopColor:color,borderRightColor:color,borderBottomColor:color,borderLeftColor:color,filter,WebkitFilter:filter},getDefaultValueType=e=>defaultValueTypes[e];function getAnimatableNone(e,t){let i=getDefaultValueType(e);return i!==filter&&(i=complex),i.getAnimatableNone?i.getAnimatableNone(t):void 0}const invalidTemplates=new Set(["auto","none","0"]);function makeNoneKeyframesAnimatable(e,t,i){let n=0,s;for(;n<e.length&&!s;){const a=e[n];typeof a=="string"&&!invalidTemplates.has(a)&&analyseComplexValue(a).values.length&&(s=e[n]),n++}if(s&&i)for(const a of t)e[a]=getAnimatableNone(i,s)}const isNumOrPxType=e=>e===number||e===px,getPosFromMatrix=(e,t)=>parseFloat(e.split(", ")[t]),getTranslateFromMatrix=(e,t)=>(i,{transform:n})=>{if(n==="none"||!n)return 0;const s=n.match(/^matrix3d\((.+)\)$/u);if(s)return getPosFromMatrix(s[1],t);{const a=n.match(/^matrix\((.+)\)$/u);return a?getPosFromMatrix(a[1],e):0}},transformKeys=new Set(["x","y","z"]),nonTranslationalTransformKeys=transformPropOrder.filter(e=>!transformKeys.has(e));function removeNonTranslationalTransform(e){const t=[];return nonTranslationalTransformKeys.forEach(i=>{const n=e.getValue(i);n!==void 0&&(t.push([i,n.get()]),n.set(i.startsWith("scale")?1:0))}),t}const positionalValues={width:({x:e},{paddingLeft:t="0",paddingRight:i="0"})=>e.max-e.min-parseFloat(t)-parseFloat(i),height:({y:e},{paddingTop:t="0",paddingBottom:i="0"})=>e.max-e.min-parseFloat(t)-parseFloat(i),top:(e,{top:t})=>parseFloat(t),left:(e,{left:t})=>parseFloat(t),bottom:({y:e},{top:t})=>parseFloat(t)+(e.max-e.min),right:({x:e},{left:t})=>parseFloat(t)+(e.max-e.min),x:getTranslateFromMatrix(4,13),y:getTranslateFromMatrix(5,14)};positionalValues.translateX=positionalValues.x,positionalValues.translateY=positionalValues.y;const toResolve=new Set;let isScheduled=!1,anyNeedsMeasurement=!1;function measureAllKeyframes(){if(anyNeedsMeasurement){const e=Array.from(toResolve).filter(n=>n.needsMeasurement),t=new Set(e.map(n=>n.element)),i=new Map;t.forEach(n=>{const s=removeNonTranslationalTransform(n);s.length&&(i.set(n,s),n.render())}),e.forEach(n=>n.measureInitialState()),t.forEach(n=>{n.render();const s=i.get(n);s&&s.forEach(([a,o])=>{var l;(l=n.getValue(a))===null||l===void 0||l.set(o)})}),e.forEach(n=>n.measureEndState()),e.forEach(n=>{n.suspendedScrollY!==void 0&&window.scrollTo(0,n.suspendedScrollY)})}anyNeedsMeasurement=!1,isScheduled=!1,toResolve.forEach(e=>e.complete()),toResolve.clear()}function readAllKeyframes(){toResolve.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(anyNeedsMeasurement=!0)})}function flushKeyframeResolvers(){readAllKeyframes(),measureAllKeyframes()}class KeyframeResolver{constructor(t,i,n,s,a,o=!1){this.isComplete=!1,this.isAsync=!1,this.needsMeasurement=!1,this.isScheduled=!1,this.unresolvedKeyframes=[...t],this.onComplete=i,this.name=n,this.motionValue=s,this.element=a,this.isAsync=o}scheduleResolve(){this.isScheduled=!0,this.isAsync?(toResolve.add(this),isScheduled||(isScheduled=!0,frame.read(readAllKeyframes),frame.resolveKeyframes(measureAllKeyframes))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:t,name:i,element:n,motionValue:s}=this;for(let a=0;a<t.length;a++)if(t[a]===null)if(a===0){const o=s==null?void 0:s.get(),l=t[t.length-1];if(o!==void 0)t[0]=o;else if(n&&i){const c=n.readValue(i,l);c!=null&&(t[0]=c)}t[0]===void 0&&(t[0]=l),s&&o===void 0&&s.set(t[0])}else t[a]=t[a-1]}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(){this.isComplete=!0,this.onComplete(this.unresolvedKeyframes,this.finalKeyframe),toResolve.delete(this)}cancel(){this.isComplete||(this.isScheduled=!1,toResolve.delete(this))}resume(){this.isComplete||this.scheduleResolve()}}const isNumericalString=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e),splitCSSVariableRegex=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function parseCSSVariable(e){const t=splitCSSVariableRegex.exec(e);if(!t)return[,];const[,i,n,s]=t;return[`--${i??n}`,s]}const maxDepth=4;function getVariableValue(e,t,i=1){invariant(i<=maxDepth,`Max CSS variable fallback depth detected in property "${e}". This may indicate a circular fallback dependency.`);const[n,s]=parseCSSVariable(e);if(!n)return;const a=window.getComputedStyle(t).getPropertyValue(n);if(a){const o=a.trim();return isNumericalString(o)?parseFloat(o):o}return isCSSVariableToken(s)?getVariableValue(s,t,i+1):s}const testValueType=e=>t=>t.test(e),auto={test:e=>e==="auto",parse:e=>e},dimensionValueTypes=[number,px,percent,degrees,vw,vh,auto],findDimensionValueType=e=>dimensionValueTypes.find(testValueType(e));class DOMKeyframesResolver extends KeyframeResolver{constructor(t,i,n,s,a){super(t,i,n,s,a,!0)}readKeyframes(){const{unresolvedKeyframes:t,element:i,name:n}=this;if(!i||!i.current)return;super.readKeyframes();for(let c=0;c<t.length;c++){let u=t[c];if(typeof u=="string"&&(u=u.trim(),isCSSVariableToken(u))){const f=getVariableValue(u,i.current);f!==void 0&&(t[c]=f),c===t.length-1&&(this.finalKeyframe=u)}}if(this.resolveNoneKeyframes(),!positionalKeys.has(n)||t.length!==2)return;const[s,a]=t,o=findDimensionValueType(s),l=findDimensionValueType(a);if(o!==l)if(isNumOrPxType(o)&&isNumOrPxType(l))for(let c=0;c<t.length;c++){const u=t[c];typeof u=="string"&&(t[c]=parseFloat(u))}else this.needsMeasurement=!0}resolveNoneKeyframes(){const{unresolvedKeyframes:t,name:i}=this,n=[];for(let s=0;s<t.length;s++)isNone(t[s])&&n.push(s);n.length&&makeNoneKeyframesAnimatable(t,n,i)}measureInitialState(){const{element:t,unresolvedKeyframes:i,name:n}=this;if(!t||!t.current)return;n==="height"&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=positionalValues[n](t.measureViewportBox(),window.getComputedStyle(t.current)),i[0]=this.measuredOrigin;const s=i[i.length-1];s!==void 0&&t.getValue(n,s).jump(s,!1)}measureEndState(){var t;const{element:i,name:n,unresolvedKeyframes:s}=this;if(!i||!i.current)return;const a=i.getValue(n);a&&a.jump(this.measuredOrigin,!1);const o=s.length-1,l=s[o];s[o]=positionalValues[n](i.measureViewportBox(),window.getComputedStyle(i.current)),l!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=l),!((t=this.removedTransforms)===null||t===void 0)&&t.length&&this.removedTransforms.forEach(([c,u])=>{i.getValue(c).set(u)}),this.resolveNoneKeyframes()}}const isAnimatable=(e,t)=>t==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&(complex.test(e)||e==="0")&&!e.startsWith("url("));function hasKeyframesChanged(e){const t=e[0];if(e.length===1)return!0;for(let i=0;i<e.length;i++)if(e[i]!==t)return!0}function canAnimate(e,t,i,n){const s=e[0];if(s===null)return!1;if(t==="display"||t==="visibility")return!0;const a=e[e.length-1],o=isAnimatable(s,t),l=isAnimatable(a,t);return warning(o===l,`You are trying to animate ${t} from "${s}" to "${a}". ${s} is not an animatable value - to enable this animation set ${s} to a value animatable to ${a} via the \`style\` property.`),!o||!l?!1:hasKeyframesChanged(e)||(i==="spring"||isGenerator(i))&&n}const isNotNull=e=>e!==null;function getFinalKeyframe(e,{repeat:t,repeatType:i="loop"},n){const s=e.filter(isNotNull),a=t&&i!=="loop"&&t%2===1?0:s.length-1;return!a||n===void 0?s[a]:n}const MAX_RESOLVE_DELAY=40;class BaseAnimation{constructor({autoplay:t=!0,delay:i=0,type:n="keyframes",repeat:s=0,repeatDelay:a=0,repeatType:o="loop",...l}){this.isStopped=!1,this.hasAttemptedResolve=!1,this.createdAt=time.now(),this.options={autoplay:t,delay:i,type:n,repeat:s,repeatDelay:a,repeatType:o,...l},this.updateFinishedPromise()}calcStartTime(){return this.resolvedAt?this.resolvedAt-this.createdAt>MAX_RESOLVE_DELAY?this.resolvedAt:this.createdAt:this.createdAt}get resolved(){return!this._resolved&&!this.hasAttemptedResolve&&flushKeyframeResolvers(),this._resolved}onKeyframesResolved(t,i){this.resolvedAt=time.now(),this.hasAttemptedResolve=!0;const{name:n,type:s,velocity:a,delay:o,onComplete:l,onUpdate:c,isGenerator:u}=this.options;if(!u&&!canAnimate(t,n,s,a))if(o)this.options.duration=0;else{c&&c(getFinalKeyframe(t,this.options,i)),l&&l(),this.resolveFinishedPromise();return}const f=this.initPlayback(t,i);f!==!1&&(this._resolved={keyframes:t,finalKeyframe:i,...f},this.onPostResolved())}onPostResolved(){}then(t,i){return this.currentFinishedPromise.then(t,i)}flatten(){this.options.type="keyframes",this.options.ease="linear"}updateFinishedPromise(){this.currentFinishedPromise=new Promise(t=>{this.resolveFinishedPromise=t})}}const mixNumber$1=(e,t,i)=>e+(t-e)*i;function hueToRgb(e,t,i){return i<0&&(i+=1),i>1&&(i-=1),i<1/6?e+(t-e)*6*i:i<1/2?t:i<2/3?e+(t-e)*(2/3-i)*6:e}function hslaToRgba({hue:e,saturation:t,lightness:i,alpha:n}){e/=360,t/=100,i/=100;let s=0,a=0,o=0;if(!t)s=a=o=i;else{const l=i<.5?i*(1+t):i+t-i*t,c=2*i-l;s=hueToRgb(c,l,e+1/3),a=hueToRgb(c,l,e),o=hueToRgb(c,l,e-1/3)}return{red:Math.round(s*255),green:Math.round(a*255),blue:Math.round(o*255),alpha:n}}function mixImmediate(e,t){return i=>i>0?t:e}const mixLinearColor=(e,t,i)=>{const n=e*e,s=i*(t*t-n)+n;return s<0?0:Math.sqrt(s)},colorTypes=[hex,rgba,hsla],getColorType=e=>colorTypes.find(t=>t.test(e));function asRGBA(e){const t=getColorType(e);if(warning(!!t,`'${e}' is not an animatable color. Use the equivalent color code instead.`),!t)return!1;let i=t.parse(e);return t===hsla&&(i=hslaToRgba(i)),i}const mixColor=(e,t)=>{const i=asRGBA(e),n=asRGBA(t);if(!i||!n)return mixImmediate(e,t);const s={...i};return a=>(s.red=mixLinearColor(i.red,n.red,a),s.green=mixLinearColor(i.green,n.green,a),s.blue=mixLinearColor(i.blue,n.blue,a),s.alpha=mixNumber$1(i.alpha,n.alpha,a),rgba.transform(s))},combineFunctions=(e,t)=>i=>t(e(i)),pipe=(...e)=>e.reduce(combineFunctions),invisibleValues=new Set(["none","hidden"]);function mixVisibility(e,t){return invisibleValues.has(e)?i=>i<=0?e:t:i=>i>=1?t:e}function mixNumber(e,t){return i=>mixNumber$1(e,t,i)}function getMixer$1(e){return typeof e=="number"?mixNumber:typeof e=="string"?isCSSVariableToken(e)?mixImmediate:color.test(e)?mixColor:mixComplex:Array.isArray(e)?mixArray:typeof e=="object"?color.test(e)?mixColor:mixObject:mixImmediate}function mixArray(e,t){const i=[...e],n=i.length,s=e.map((a,o)=>getMixer$1(a)(a,t[o]));return a=>{for(let o=0;o<n;o++)i[o]=s[o](a);return i}}function mixObject(e,t){const i={...e,...t},n={};for(const s in i)e[s]!==void 0&&t[s]!==void 0&&(n[s]=getMixer$1(e[s])(e[s],t[s]));return s=>{for(const a in n)i[a]=n[a](s);return i}}function matchOrder(e,t){var i;const n=[],s={color:0,var:0,number:0};for(let a=0;a<t.values.length;a++){const o=t.types[a],l=e.indexes[o][s[o]],c=(i=e.values[l])!==null&&i!==void 0?i:0;n[a]=c,s[o]++}return n}const mixComplex=(e,t)=>{const i=complex.createTransformer(t),n=analyseComplexValue(e),s=analyseComplexValue(t);return n.indexes.var.length===s.indexes.var.length&&n.indexes.color.length===s.indexes.color.length&&n.indexes.number.length>=s.indexes.number.length?invisibleValues.has(e)&&!s.values.length||invisibleValues.has(t)&&!n.values.length?mixVisibility(e,t):pipe(mixArray(matchOrder(n,s),s.values),i):(warning(!0,`Complex values '${e}' and '${t}' too different to mix. Ensure all colors are of the same type, and that each contains the same quantity of number and color values. Falling back to instant transition.`),mixImmediate(e,t))};function mix(e,t,i){return typeof e=="number"&&typeof t=="number"&&typeof i=="number"?mixNumber$1(e,t,i):getMixer$1(e)(e,t)}const velocitySampleDuration=5;function calcGeneratorVelocity(e,t,i){const n=Math.max(t-velocitySampleDuration,0);return velocityPerSecond(i-e(n),t-n)}const springDefaults={stiffness:100,damping:10,mass:1,velocity:0,duration:800,bounce:.3,visualDuration:.3,restSpeed:{granular:.01,default:2},restDelta:{granular:.005,default:.5},minDuration:.01,maxDuration:10,minDamping:.05,maxDamping:1},safeMin=.001;function findSpring({duration:e=springDefaults.duration,bounce:t=springDefaults.bounce,velocity:i=springDefaults.velocity,mass:n=springDefaults.mass}){let s,a;warning(e<=secondsToMilliseconds(springDefaults.maxDuration),"Spring duration must be 10 seconds or less");let o=1-t;o=clamp(springDefaults.minDamping,springDefaults.maxDamping,o),e=clamp(springDefaults.minDuration,springDefaults.maxDuration,millisecondsToSeconds(e)),o<1?(s=u=>{const f=u*o,d=f*e,p=f-i,b=calcAngularFreq(u,o),y=Math.exp(-d);return safeMin-p/b*y},a=u=>{const d=u*o*e,p=d*i+i,b=Math.pow(o,2)*Math.pow(u,2)*e,y=Math.exp(-d),g=calcAngularFreq(Math.pow(u,2),o);return(-s(u)+safeMin>0?-1:1)*((p-b)*y)/g}):(s=u=>{const f=Math.exp(-u*e),d=(u-i)*e+1;return-safeMin+f*d},a=u=>{const f=Math.exp(-u*e),d=(i-u)*(e*e);return f*d});const l=5/e,c=approximateRoot(s,a,l);if(e=secondsToMilliseconds(e),isNaN(c))return{stiffness:springDefaults.stiffness,damping:springDefaults.damping,duration:e};{const u=Math.pow(c,2)*n;return{stiffness:u,damping:o*2*Math.sqrt(n*u),duration:e}}}const rootIterations=12;function approximateRoot(e,t,i){let n=i;for(let s=1;s<rootIterations;s++)n=n-e(n)/t(n);return n}function calcAngularFreq(e,t){return e*Math.sqrt(1-t*t)}const durationKeys=["duration","bounce"],physicsKeys=["stiffness","damping","mass"];function isSpringType(e,t){return t.some(i=>e[i]!==void 0)}function getSpringOptions(e){let t={velocity:springDefaults.velocity,stiffness:springDefaults.stiffness,damping:springDefaults.damping,mass:springDefaults.mass,isResolvedFromDuration:!1,...e};if(!isSpringType(e,physicsKeys)&&isSpringType(e,durationKeys))if(e.visualDuration){const i=e.visualDuration,n=2*Math.PI/(i*1.2),s=n*n,a=2*clamp(.05,1,1-(e.bounce||0))*Math.sqrt(s);t={...t,mass:springDefaults.mass,stiffness:s,damping:a}}else{const i=findSpring(e);t={...t,...i,mass:springDefaults.mass},t.isResolvedFromDuration=!0}return t}function spring(e=springDefaults.visualDuration,t=springDefaults.bounce){const i=typeof e!="object"?{visualDuration:e,keyframes:[0,1],bounce:t}:e;let{restSpeed:n,restDelta:s}=i;const a=i.keyframes[0],o=i.keyframes[i.keyframes.length-1],l={done:!1,value:a},{stiffness:c,damping:u,mass:f,duration:d,velocity:p,isResolvedFromDuration:b}=getSpringOptions({...i,velocity:-millisecondsToSeconds(i.velocity||0)}),y=p||0,g=u/(2*Math.sqrt(c*f)),P=o-a,m=millisecondsToSeconds(Math.sqrt(c/f)),x=Math.abs(P)<5;n||(n=x?springDefaults.restSpeed.granular:springDefaults.restSpeed.default),s||(s=x?springDefaults.restDelta.granular:springDefaults.restDelta.default);let C;if(g<1){const E=calcAngularFreq(m,g);C=T=>{const L=Math.exp(-g*m*T);return o-L*((y+g*m*P)/E*Math.sin(E*T)+P*Math.cos(E*T))}}else if(g===1)C=E=>o-Math.exp(-m*E)*(P+(y+m*P)*E);else{const E=m*Math.sqrt(g*g-1);C=T=>{const L=Math.exp(-g*m*T),_=Math.min(E*T,300);return o-L*((y+g*m*P)*Math.sinh(_)+E*P*Math.cosh(_))/E}}const S={calculatedDuration:b&&d||null,next:E=>{const T=C(E);if(b)l.done=E>=d;else{let L=0;g<1&&(L=E===0?secondsToMilliseconds(y):calcGeneratorVelocity(C,E,T));const _=Math.abs(L)<=n,k=Math.abs(o-T)<=s;l.done=_&&k}return l.value=l.done?o:T,l},toString:()=>{const E=Math.min(calcGeneratorDuration(S),maxGeneratorDuration),T=generateLinearEasing(L=>S.next(E*L).value,E,30);return E+"ms "+T}};return S}function inertia({keyframes:e,velocity:t=0,power:i=.8,timeConstant:n=325,bounceDamping:s=10,bounceStiffness:a=500,modifyTarget:o,min:l,max:c,restDelta:u=.5,restSpeed:f}){const d=e[0],p={done:!1,value:d},b=_=>l!==void 0&&_<l||c!==void 0&&_>c,y=_=>l===void 0?c:c===void 0||Math.abs(l-_)<Math.abs(c-_)?l:c;let g=i*t;const P=d+g,m=o===void 0?P:o(P);m!==P&&(g=m-d);const x=_=>-g*Math.exp(-_/n),C=_=>m+x(_),S=_=>{const k=x(_),Z=C(_);p.done=Math.abs(k)<=u,p.value=p.done?m:Z};let E,T;const L=_=>{b(p.value)&&(E=_,T=spring({keyframes:[p.value,y(p.value)],velocity:calcGeneratorVelocity(C,_,p.value),damping:s,stiffness:a,restDelta:u,restSpeed:f}))};return L(0),{calculatedDuration:null,next:_=>{let k=!1;return!T&&E===void 0&&(k=!0,S(_),L(_)),E!==void 0&&_>=E?T.next(_-E):(!k&&S(_),p)}}}const easeIn=cubicBezier(.42,0,1,1),easeOut=cubicBezier(0,0,.58,1),easeInOut=cubicBezier(.42,0,.58,1),isEasingArray=e=>Array.isArray(e)&&typeof e[0]!="number",easingLookup={linear:noop,easeIn,easeInOut,easeOut,circIn,circInOut,circOut,backIn,backInOut,backOut,anticipate},easingDefinitionToFunction=e=>{if(isBezierDefinition(e)){invariant(e.length===4,"Cubic bezier arrays must contain four numerical values.");const[t,i,n,s]=e;return cubicBezier(t,i,n,s)}else if(typeof e=="string")return invariant(easingLookup[e]!==void 0,`Invalid easing type '${e}'`),easingLookup[e];return e};function createMixers(e,t,i){const n=[],s=i||mix,a=e.length-1;for(let o=0;o<a;o++){let l=s(e[o],e[o+1]);if(t){const c=Array.isArray(t)?t[o]||noop:t;l=pipe(c,l)}n.push(l)}return n}function interpolate(e,t,{clamp:i=!0,ease:n,mixer:s}={}){const a=e.length;if(invariant(a===t.length,"Both input and output ranges must be the same length"),a===1)return()=>t[0];if(a===2&&t[0]===t[1])return()=>t[1];const o=e[0]===e[1];e[0]>e[a-1]&&(e=[...e].reverse(),t=[...t].reverse());const l=createMixers(t,n,s),c=l.length,u=f=>{if(o&&f<e[0])return t[0];let d=0;if(c>1)for(;d<e.length-2&&!(f<e[d+1]);d++);const p=progress(e[d],e[d+1],f);return l[d](p)};return i?f=>u(clamp(e[0],e[a-1],f)):u}function fillOffset(e,t){const i=e[e.length-1];for(let n=1;n<=t;n++){const s=progress(0,t,n);e.push(mixNumber$1(i,1,s))}}function defaultOffset(e){const t=[0];return fillOffset(t,e.length-1),t}function convertOffsetToTimes(e,t){return e.map(i=>i*t)}function defaultEasing(e,t){return e.map(()=>t||easeInOut).splice(0,e.length-1)}function keyframes({duration:e=300,keyframes:t,times:i,ease:n="easeInOut"}){const s=isEasingArray(n)?n.map(easingDefinitionToFunction):easingDefinitionToFunction(n),a={done:!1,value:t[0]},o=convertOffsetToTimes(i&&i.length===t.length?i:defaultOffset(t),e),l=interpolate(o,t,{ease:Array.isArray(s)?s:defaultEasing(t,s)});return{calculatedDuration:e,next:c=>(a.value=l(c),a.done=c>=e,a)}}const frameloopDriver=e=>{const t=({timestamp:i})=>e(i);return{start:()=>frame.update(t,!0),stop:()=>cancelFrame(t),now:()=>frameData.isProcessing?frameData.timestamp:time.now()}},generators={decay:inertia,inertia,tween:keyframes,keyframes,spring},percentToProgress=e=>e/100;class MainThreadAnimation extends BaseAnimation{constructor(t){super(t),this.holdTime=null,this.cancelTime=null,this.currentTime=0,this.playbackSpeed=1,this.pendingPlayState="running",this.startTime=null,this.state="idle",this.stop=()=>{if(this.resolver.cancel(),this.isStopped=!0,this.state==="idle")return;this.teardown();const{onStop:c}=this.options;c&&c()};const{name:i,motionValue:n,element:s,keyframes:a}=this.options,o=(s==null?void 0:s.KeyframeResolver)||KeyframeResolver,l=(c,u)=>this.onKeyframesResolved(c,u);this.resolver=new o(a,l,i,n,s),this.resolver.scheduleResolve()}flatten(){super.flatten(),this._resolved&&Object.assign(this._resolved,this.initPlayback(this._resolved.keyframes))}initPlayback(t){const{type:i="keyframes",repeat:n=0,repeatDelay:s=0,repeatType:a,velocity:o=0}=this.options,l=isGenerator(i)?i:generators[i]||keyframes;let c,u;l!==keyframes&&typeof t[0]!="number"&&(process.env.NODE_ENV!=="production"&&invariant(t.length===2,`Only two keyframes currently supported with spring and inertia animations. Trying to animate ${t}`),c=pipe(percentToProgress,mix(t[0],t[1])),t=[0,100]);const f=l({...this.options,keyframes:t});a==="mirror"&&(u=l({...this.options,keyframes:[...t].reverse(),velocity:-o})),f.calculatedDuration===null&&(f.calculatedDuration=calcGeneratorDuration(f));const{calculatedDuration:d}=f,p=d+s,b=p*(n+1)-s;return{generator:f,mirroredGenerator:u,mapPercentToKeyframes:c,calculatedDuration:d,resolvedDuration:p,totalDuration:b}}onPostResolved(){const{autoplay:t=!0}=this.options;this.play(),this.pendingPlayState==="paused"||!t?this.pause():this.state=this.pendingPlayState}tick(t,i=!1){const{resolved:n}=this;if(!n){const{keyframes:_}=this.options;return{done:!0,value:_[_.length-1]}}const{finalKeyframe:s,generator:a,mirroredGenerator:o,mapPercentToKeyframes:l,keyframes:c,calculatedDuration:u,totalDuration:f,resolvedDuration:d}=n;if(this.startTime===null)return a.next(0);const{delay:p,repeat:b,repeatType:y,repeatDelay:g,onUpdate:P}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,t):this.speed<0&&(this.startTime=Math.min(t-f/this.speed,this.startTime)),i?this.currentTime=t:this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=Math.round(t-this.startTime)*this.speed;const m=this.currentTime-p*(this.speed>=0?1:-1),x=this.speed>=0?m<0:m>f;this.currentTime=Math.max(m,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=f);let C=this.currentTime,S=a;if(b){const _=Math.min(this.currentTime,f)/d;let k=Math.floor(_),Z=_%1;!Z&&_>=1&&(Z=1),Z===1&&k--,k=Math.min(k,b+1),!!(k%2)&&(y==="reverse"?(Z=1-Z,g&&(Z-=g/d)):y==="mirror"&&(S=o)),C=clamp(0,1,Z)*d}const E=x?{done:!1,value:c[0]}:S.next(C);l&&(E.value=l(E.value));let{done:T}=E;!x&&u!==null&&(T=this.speed>=0?this.currentTime>=f:this.currentTime<=0);const L=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&T);return L&&s!==void 0&&(E.value=getFinalKeyframe(c,this.options,s)),P&&P(E.value),L&&this.finish(),E}get duration(){const{resolved:t}=this;return t?millisecondsToSeconds(t.calculatedDuration):0}get time(){return millisecondsToSeconds(this.currentTime)}set time(t){t=secondsToMilliseconds(t),this.currentTime=t,this.holdTime!==null||this.speed===0?this.holdTime=t:this.driver&&(this.startTime=this.driver.now()-t/this.speed)}get speed(){return this.playbackSpeed}set speed(t){const i=this.playbackSpeed!==t;this.playbackSpeed=t,i&&(this.time=millisecondsToSeconds(this.currentTime))}play(){if(this.resolver.isScheduled||this.resolver.resume(),!this._resolved){this.pendingPlayState="running";return}if(this.isStopped)return;const{driver:t=frameloopDriver,onPlay:i,startTime:n}=this.options;this.driver||(this.driver=t(a=>this.tick(a))),i&&i();const s=this.driver.now();this.holdTime!==null?this.startTime=s-this.holdTime:this.startTime?this.state==="finished"&&(this.startTime=s):this.startTime=n??this.calcStartTime(),this.state==="finished"&&this.updateFinishedPromise(),this.cancelTime=this.startTime,this.holdTime=null,this.state="running",this.driver.start()}pause(){var t;if(!this._resolved){this.pendingPlayState="paused";return}this.state="paused",this.holdTime=(t=this.currentTime)!==null&&t!==void 0?t:0}complete(){this.state!=="running"&&this.play(),this.pendingPlayState=this.state="finished",this.holdTime=null}finish(){this.teardown(),this.state="finished";const{onComplete:t}=this.options;t&&t()}cancel(){this.cancelTime!==null&&this.tick(this.cancelTime),this.teardown(),this.updateFinishedPromise()}teardown(){this.state="idle",this.stopDriver(),this.resolveFinishedPromise(),this.updateFinishedPromise(),this.startTime=this.cancelTime=null,this.resolver.cancel()}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(t){return this.startTime=0,this.tick(t,!0)}}const acceleratedValues=new Set(["opacity","clipPath","filter","transform"]);function startWaapiAnimation(e,t,i,{delay:n=0,duration:s=300,repeat:a=0,repeatType:o="loop",ease:l="easeInOut",times:c}={}){const u={[t]:i};c&&(u.offset=c);const f=mapEasingToNativeEasing(l,s);return Array.isArray(f)&&(u.easing=f),e.animate(u,{delay:n,duration:s,easing:Array.isArray(f)?"linear":f,fill:"both",iterations:a+1,direction:o==="reverse"?"alternate":"normal"})}const supportsWaapi=memo(()=>Object.hasOwnProperty.call(Element.prototype,"animate")),sampleDelta=10,maxDuration=2e4;function requiresPregeneratedKeyframes(e){return isGenerator(e.type)||e.type==="spring"||!isWaapiSupportedEasing(e.ease)}function pregenerateKeyframes(e,t){const i=new MainThreadAnimation({...t,keyframes:e,repeat:0,delay:0,isGenerator:!0});let n={done:!1,value:e[0]};const s=[];let a=0;for(;!n.done&&a<maxDuration;)n=i.sample(a),s.push(n.value),a+=sampleDelta;return{times:void 0,keyframes:s,duration:a-sampleDelta,ease:"linear"}}const unsupportedEasingFunctions={anticipate,backInOut,circInOut};function isUnsupportedEase(e){return e in unsupportedEasingFunctions}class AcceleratedAnimation extends BaseAnimation{constructor(t){super(t);const{name:i,motionValue:n,element:s,keyframes:a}=this.options;this.resolver=new DOMKeyframesResolver(a,(o,l)=>this.onKeyframesResolved(o,l),i,n,s),this.resolver.scheduleResolve()}initPlayback(t,i){let{duration:n=300,times:s,ease:a,type:o,motionValue:l,name:c,startTime:u}=this.options;if(!l.owner||!l.owner.current)return!1;if(typeof a=="string"&&supportsLinearEasing()&&isUnsupportedEase(a)&&(a=unsupportedEasingFunctions[a]),requiresPregeneratedKeyframes(this.options)){const{onComplete:d,onUpdate:p,motionValue:b,element:y,...g}=this.options,P=pregenerateKeyframes(t,g);t=P.keyframes,t.length===1&&(t[1]=t[0]),n=P.duration,s=P.times,a=P.ease,o="keyframes"}const f=startWaapiAnimation(l.owner.current,c,t,{...this.options,duration:n,times:s,ease:a});return f.startTime=u??this.calcStartTime(),this.pendingTimeline?(attachTimeline(f,this.pendingTimeline),this.pendingTimeline=void 0):f.onfinish=()=>{const{onComplete:d}=this.options;l.set(getFinalKeyframe(t,this.options,i)),d&&d(),this.cancel(),this.resolveFinishedPromise()},{animation:f,duration:n,times:s,type:o,ease:a,keyframes:t}}get duration(){const{resolved:t}=this;if(!t)return 0;const{duration:i}=t;return millisecondsToSeconds(i)}get time(){const{resolved:t}=this;if(!t)return 0;const{animation:i}=t;return millisecondsToSeconds(i.currentTime||0)}set time(t){const{resolved:i}=this;if(!i)return;const{animation:n}=i;n.currentTime=secondsToMilliseconds(t)}get speed(){const{resolved:t}=this;if(!t)return 1;const{animation:i}=t;return i.playbackRate}set speed(t){const{resolved:i}=this;if(!i)return;const{animation:n}=i;n.playbackRate=t}get state(){const{resolved:t}=this;if(!t)return"idle";const{animation:i}=t;return i.playState}get startTime(){const{resolved:t}=this;if(!t)return null;const{animation:i}=t;return i.startTime}attachTimeline(t){if(!this._resolved)this.pendingTimeline=t;else{const{resolved:i}=this;if(!i)return noop;const{animation:n}=i;attachTimeline(n,t)}return noop}play(){if(this.isStopped)return;const{resolved:t}=this;if(!t)return;const{animation:i}=t;i.playState==="finished"&&this.updateFinishedPromise(),i.play()}pause(){const{resolved:t}=this;if(!t)return;const{animation:i}=t;i.pause()}stop(){if(this.resolver.cancel(),this.isStopped=!0,this.state==="idle")return;this.resolveFinishedPromise(),this.updateFinishedPromise();const{resolved:t}=this;if(!t)return;const{animation:i,keyframes:n,duration:s,type:a,ease:o,times:l}=t;if(i.playState==="idle"||i.playState==="finished")return;if(this.time){const{motionValue:u,onUpdate:f,onComplete:d,element:p,...b}=this.options,y=new MainThreadAnimation({...b,keyframes:n,duration:s,type:a,ease:o,times:l,isGenerator:!0}),g=secondsToMilliseconds(this.time);u.setWithVelocity(y.sample(g-sampleDelta).value,y.sample(g).value,sampleDelta)}const{onStop:c}=this.options;c&&c(),this.cancel()}complete(){const{resolved:t}=this;t&&t.animation.finish()}cancel(){const{resolved:t}=this;t&&t.animation.cancel()}static supports(t){const{motionValue:i,name:n,repeatDelay:s,repeatType:a,damping:o,type:l}=t;if(!i||!i.owner||!(i.owner.current instanceof HTMLElement))return!1;const{onUpdate:c,transformTemplate:u}=i.owner.getProps();return supportsWaapi()&&n&&acceleratedValues.has(n)&&!c&&!u&&!s&&a!=="mirror"&&o!==0&&l!=="inertia"}}const underDampedSpring={type:"spring",stiffness:500,damping:25,restSpeed:10},criticallyDampedSpring=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),keyframesTransition={type:"keyframes",duration:.8},ease={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},getDefaultTransition=(e,{keyframes:t})=>t.length>2?keyframesTransition:transformProps.has(e)?e.startsWith("scale")?criticallyDampedSpring(t[1]):underDampedSpring:ease;function isTransitionDefined({when:e,delay:t,delayChildren:i,staggerChildren:n,staggerDirection:s,repeat:a,repeatType:o,repeatDelay:l,from:c,elapsed:u,...f}){return!!Object.keys(f).length}const animateMotionValue=(e,t,i,n={},s,a)=>o=>{const l=getValueTransition$1(n,e)||{},c=l.delay||n.delay||0;let{elapsed:u=0}=n;u=u-secondsToMilliseconds(c);let f={keyframes:Array.isArray(i)?i:[null,i],ease:"easeOut",velocity:t.getVelocity(),...l,delay:-u,onUpdate:p=>{t.set(p),l.onUpdate&&l.onUpdate(p)},onComplete:()=>{o(),l.onComplete&&l.onComplete()},name:e,motionValue:t,element:a?void 0:s};isTransitionDefined(l)||(f={...f,...getDefaultTransition(e,f)}),f.duration&&(f.duration=secondsToMilliseconds(f.duration)),f.repeatDelay&&(f.repeatDelay=secondsToMilliseconds(f.repeatDelay)),f.from!==void 0&&(f.keyframes[0]=f.from);let d=!1;if((f.type===!1||f.duration===0&&!f.repeatDelay)&&(f.duration=0,f.delay===0&&(d=!0)),d&&!a&&t.get()!==void 0){const p=getFinalKeyframe(f.keyframes,l);if(p!==void 0)return frame.update(()=>{f.onUpdate(p),f.onComplete()}),new GroupPlaybackControls([])}return!a&&AcceleratedAnimation.supports(f)?new AcceleratedAnimation(f):new MainThreadAnimation(f)};function shouldBlockAnimation({protectedKeys:e,needsAnimating:t},i){const n=e.hasOwnProperty(i)&&t[i]!==!0;return t[i]=!1,n}function animateTarget(e,t,{delay:i=0,transitionOverride:n,type:s}={}){var a;let{transition:o=e.getDefaultTransition(),transitionEnd:l,...c}=t;n&&(o=n);const u=[],f=s&&e.animationState&&e.animationState.getState()[s];for(const d in c){const p=e.getValue(d,(a=e.latestValues[d])!==null&&a!==void 0?a:null),b=c[d];if(b===void 0||f&&shouldBlockAnimation(f,d))continue;const y={delay:i,...getValueTransition$1(o||{},d)};let g=!1;if(window.MotionHandoffAnimation){const m=getOptimisedAppearId(e);if(m){const x=window.MotionHandoffAnimation(m,d,frame);x!==null&&(y.startTime=x,g=!0)}}addValueToWillChange(e,d),p.start(animateMotionValue(d,p,b,e.shouldReduceMotion&&positionalKeys.has(d)?{type:!1}:y,e,g));const P=p.animation;P&&u.push(P)}return l&&Promise.all(u).then(()=>{frame.update(()=>{l&&setTarget(e,l)})}),u}function animateVariant(e,t,i={}){var n;const s=resolveVariant(e,t,i.type==="exit"?(n=e.presenceContext)===null||n===void 0?void 0:n.custom:void 0);let{transition:a=e.getDefaultTransition()||{}}=s||{};i.transitionOverride&&(a=i.transitionOverride);const o=s?()=>Promise.all(animateTarget(e,s,i)):()=>Promise.resolve(),l=e.variantChildren&&e.variantChildren.size?(u=0)=>{const{delayChildren:f=0,staggerChildren:d,staggerDirection:p}=a;return animateChildren(e,t,f+u,d,p,i)}:()=>Promise.resolve(),{when:c}=a;if(c){const[u,f]=c==="beforeChildren"?[o,l]:[l,o];return u().then(()=>f())}else return Promise.all([o(),l(i.delay)])}function animateChildren(e,t,i=0,n=0,s=1,a){const o=[],l=(e.variantChildren.size-1)*n,c=s===1?(u=0)=>u*n:(u=0)=>l-u*n;return Array.from(e.variantChildren).sort(sortByTreeOrder).forEach((u,f)=>{u.notify("AnimationStart",t),o.push(animateVariant(u,t,{...a,delay:i+c(f)}).then(()=>u.notify("AnimationComplete",t)))}),Promise.all(o)}function sortByTreeOrder(e,t){return e.sortNodePosition(t)}function animateVisualElement(e,t,i={}){e.notify("AnimationStart",t);let n;if(Array.isArray(t)){const s=t.map(a=>animateVariant(e,a,i));n=Promise.all(s)}else if(typeof t=="string")n=animateVariant(e,t,i);else{const s=typeof t=="function"?resolveVariant(e,t,i.custom):t;n=Promise.all(animateTarget(e,s,i))}return n.then(()=>{e.notify("AnimationComplete",t)})}const numVariantProps=variantProps.length;function getVariantContext(e){if(!e)return;if(!e.isControllingVariants){const i=e.parent?getVariantContext(e.parent)||{}:{};return e.props.initial!==void 0&&(i.initial=e.props.initial),i}const t={};for(let i=0;i<numVariantProps;i++){const n=variantProps[i],s=e.props[n];(isVariantLabel(s)||s===!1)&&(t[n]=s)}return t}const reversePriorityOrder=[...variantPriorityOrder].reverse(),numAnimationTypes=variantPriorityOrder.length;function animateList(e){return t=>Promise.all(t.map(({animation:i,options:n})=>animateVisualElement(e,i,n)))}function createAnimationState(e){let t=animateList(e),i=createState(),n=!0;const s=c=>(u,f)=>{var d;const p=resolveVariant(e,f,c==="exit"?(d=e.presenceContext)===null||d===void 0?void 0:d.custom:void 0);if(p){const{transition:b,transitionEnd:y,...g}=p;u={...u,...g,...y}}return u};function a(c){t=c(e)}function o(c){const{props:u}=e,f=getVariantContext(e.parent)||{},d=[],p=new Set;let b={},y=1/0;for(let P=0;P<numAnimationTypes;P++){const m=reversePriorityOrder[P],x=i[m],C=u[m]!==void 0?u[m]:f[m],S=isVariantLabel(C),E=m===c?x.isActive:null;E===!1&&(y=P);let T=C===f[m]&&C!==u[m]&&S;if(T&&n&&e.manuallyAnimateOnMount&&(T=!1),x.protectedKeys={...b},!x.isActive&&E===null||!C&&!x.prevProp||isAnimationControls(C)||typeof C=="boolean")continue;const L=checkVariantsDidChange(x.prevProp,C);let _=L||m===c&&x.isActive&&!T&&S||P>y&&S,k=!1;const Z=Array.isArray(C)?C:[C];let B=Z.reduce(s(m),{});E===!1&&(B={});const{prevResolvedValues:D={}}=x,H={...D,...B},z=A=>{_=!0,p.has(A)&&(k=!0,p.delete(A)),x.needsAnimating[A]=!0;const R=e.getValue(A);R&&(R.liveStyle=!1)};for(const A in H){const R=B[A],M=D[A];if(b.hasOwnProperty(A))continue;let I=!1;isKeyframesTarget(R)&&isKeyframesTarget(M)?I=!shallowCompare(R,M):I=R!==M,I?R!=null?z(A):p.add(A):R!==void 0&&p.has(A)?z(A):x.protectedKeys[A]=!0}x.prevProp=C,x.prevResolvedValues=B,x.isActive&&(b={...b,...B}),n&&e.blockInitialAnimation&&(_=!1),_&&(!(T&&L)||k)&&d.push(...Z.map(A=>({animation:A,options:{type:m}})))}if(p.size){const P={};p.forEach(m=>{const x=e.getBaseTarget(m),C=e.getValue(m);C&&(C.liveStyle=!0),P[m]=x??null}),d.push({animation:P})}let g=!!d.length;return n&&(u.initial===!1||u.initial===u.animate)&&!e.manuallyAnimateOnMount&&(g=!1),n=!1,g?t(d):Promise.resolve()}function l(c,u){var f;if(i[c].isActive===u)return Promise.resolve();(f=e.variantChildren)===null||f===void 0||f.forEach(p=>{var b;return(b=p.animationState)===null||b===void 0?void 0:b.setActive(c,u)}),i[c].isActive=u;const d=o(c);for(const p in i)i[p].protectedKeys={};return d}return{animateChanges:o,setActive:l,setAnimateFunction:a,getState:()=>i,reset:()=>{i=createState(),n=!0}}}function checkVariantsDidChange(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!shallowCompare(t,e):!1}function createTypeState(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function createState(){return{animate:createTypeState(!0),whileInView:createTypeState(),whileHover:createTypeState(),whileTap:createTypeState(),whileDrag:createTypeState(),whileFocus:createTypeState(),exit:createTypeState()}}class Feature{constructor(t){this.isMounted=!1,this.node=t}update(){}}class AnimationFeature extends Feature{constructor(t){super(t),t.animationState||(t.animationState=createAnimationState(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();isAnimationControls(t)&&(this.unmountControls=t.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:t}=this.node.getProps(),{animate:i}=this.node.prevProps||{};t!==i&&this.updateAnimationControlsSubscription()}unmount(){var t;this.node.animationState.reset(),(t=this.unmountControls)===null||t===void 0||t.call(this)}}let id$1=0;class ExitAnimationFeature extends Feature{constructor(){super(...arguments),this.id=id$1++}update(){if(!this.node.presenceContext)return;const{isPresent:t,onExitComplete:i}=this.node.presenceContext,{isPresent:n}=this.node.prevPresenceContext||{};if(!this.node.animationState||t===n)return;const s=this.node.animationState.setActive("exit",!t);i&&!t&&s.then(()=>i(this.id))}mount(){const{register:t}=this.node.presenceContext||{};t&&(this.unmount=t(this.id))}unmount(){}}const animations={animation:{Feature:AnimationFeature},exit:{Feature:ExitAnimationFeature}};function addDomEvent(e,t,i,n={passive:!0}){return e.addEventListener(t,i,n),()=>e.removeEventListener(t,i)}function extractEventInfo(e){return{point:{x:e.pageX,y:e.pageY}}}const addPointerInfo=e=>t=>isPrimaryPointer(t)&&e(t,extractEventInfo(t));function addPointerEvent(e,t,i,n){return addDomEvent(e,t,addPointerInfo(i),n)}const distance=(e,t)=>Math.abs(e-t);function distance2D(e,t){const i=distance(e.x,t.x),n=distance(e.y,t.y);return Math.sqrt(i**2+n**2)}class PanSession{constructor(t,i,{transformPagePoint:n,contextWindow:s,dragSnapToOrigin:a=!1}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const d=getPanInfo(this.lastMoveEventInfo,this.history),p=this.startEvent!==null,b=distance2D(d.offset,{x:0,y:0})>=3;if(!p&&!b)return;const{point:y}=d,{timestamp:g}=frameData;this.history.push({...y,timestamp:g});const{onStart:P,onMove:m}=this.handlers;p||(P&&P(this.lastMoveEvent,d),this.startEvent=this.lastMoveEvent),m&&m(this.lastMoveEvent,d)},this.handlePointerMove=(d,p)=>{this.lastMoveEvent=d,this.lastMoveEventInfo=transformPoint(p,this.transformPagePoint),frame.update(this.updatePoint,!0)},this.handlePointerUp=(d,p)=>{this.end();const{onEnd:b,onSessionEnd:y,resumeAnimation:g}=this.handlers;if(this.dragSnapToOrigin&&g&&g(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const P=getPanInfo(d.type==="pointercancel"?this.lastMoveEventInfo:transformPoint(p,this.transformPagePoint),this.history);this.startEvent&&b&&b(d,P),y&&y(d,P)},!isPrimaryPointer(t))return;this.dragSnapToOrigin=a,this.handlers=i,this.transformPagePoint=n,this.contextWindow=s||window;const o=extractEventInfo(t),l=transformPoint(o,this.transformPagePoint),{point:c}=l,{timestamp:u}=frameData;this.history=[{...c,timestamp:u}];const{onSessionStart:f}=i;f&&f(t,getPanInfo(l,this.history)),this.removeListeners=pipe(addPointerEvent(this.contextWindow,"pointermove",this.handlePointerMove),addPointerEvent(this.contextWindow,"pointerup",this.handlePointerUp),addPointerEvent(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),cancelFrame(this.updatePoint)}}function transformPoint(e,t){return t?{point:t(e.point)}:e}function subtractPoint(e,t){return{x:e.x-t.x,y:e.y-t.y}}function getPanInfo({point:e},t){return{point:e,delta:subtractPoint(e,lastDevicePoint(t)),offset:subtractPoint(e,startDevicePoint(t)),velocity:getVelocity(t,.1)}}function startDevicePoint(e){return e[0]}function lastDevicePoint(e){return e[e.length-1]}function getVelocity(e,t){if(e.length<2)return{x:0,y:0};let i=e.length-1,n=null;const s=lastDevicePoint(e);for(;i>=0&&(n=e[i],!(s.timestamp-n.timestamp>secondsToMilliseconds(t)));)i--;if(!n)return{x:0,y:0};const a=millisecondsToSeconds(s.timestamp-n.timestamp);if(a===0)return{x:0,y:0};const o={x:(s.x-n.x)/a,y:(s.y-n.y)/a};return o.x===1/0&&(o.x=0),o.y===1/0&&(o.y=0),o}const SCALE_PRECISION=1e-4,SCALE_MIN=1-SCALE_PRECISION,SCALE_MAX=1+SCALE_PRECISION,TRANSLATE_PRECISION=.01,TRANSLATE_MIN=0-TRANSLATE_PRECISION,TRANSLATE_MAX=0+TRANSLATE_PRECISION;function calcLength(e){return e.max-e.min}function isNear(e,t,i){return Math.abs(e-t)<=i}function calcAxisDelta(e,t,i,n=.5){e.origin=n,e.originPoint=mixNumber$1(t.min,t.max,e.origin),e.scale=calcLength(i)/calcLength(t),e.translate=mixNumber$1(i.min,i.max,e.origin)-e.originPoint,(e.scale>=SCALE_MIN&&e.scale<=SCALE_MAX||isNaN(e.scale))&&(e.scale=1),(e.translate>=TRANSLATE_MIN&&e.translate<=TRANSLATE_MAX||isNaN(e.translate))&&(e.translate=0)}function calcBoxDelta(e,t,i,n){calcAxisDelta(e.x,t.x,i.x,n?n.originX:void 0),calcAxisDelta(e.y,t.y,i.y,n?n.originY:void 0)}function calcRelativeAxis(e,t,i){e.min=i.min+t.min,e.max=e.min+calcLength(t)}function calcRelativeBox(e,t,i){calcRelativeAxis(e.x,t.x,i.x),calcRelativeAxis(e.y,t.y,i.y)}function calcRelativeAxisPosition(e,t,i){e.min=t.min-i.min,e.max=e.min+calcLength(t)}function calcRelativePosition(e,t,i){calcRelativeAxisPosition(e.x,t.x,i.x),calcRelativeAxisPosition(e.y,t.y,i.y)}function applyConstraints(e,{min:t,max:i},n){return t!==void 0&&e<t?e=n?mixNumber$1(t,e,n.min):Math.max(e,t):i!==void 0&&e>i&&(e=n?mixNumber$1(i,e,n.max):Math.min(e,i)),e}function calcRelativeAxisConstraints(e,t,i){return{min:t!==void 0?e.min+t:void 0,max:i!==void 0?e.max+i-(e.max-e.min):void 0}}function calcRelativeConstraints(e,{top:t,left:i,bottom:n,right:s}){return{x:calcRelativeAxisConstraints(e.x,i,s),y:calcRelativeAxisConstraints(e.y,t,n)}}function calcViewportAxisConstraints(e,t){let i=t.min-e.min,n=t.max-e.max;return t.max-t.min<e.max-e.min&&([i,n]=[n,i]),{min:i,max:n}}function calcViewportConstraints(e,t){return{x:calcViewportAxisConstraints(e.x,t.x),y:calcViewportAxisConstraints(e.y,t.y)}}function calcOrigin(e,t){let i=.5;const n=calcLength(e),s=calcLength(t);return s>n?i=progress(t.min,t.max-n,e.min):n>s&&(i=progress(e.min,e.max-s,t.min)),clamp(0,1,i)}function rebaseAxisConstraints(e,t){const i={};return t.min!==void 0&&(i.min=t.min-e.min),t.max!==void 0&&(i.max=t.max-e.min),i}const defaultElastic=.35;function resolveDragElastic(e=defaultElastic){return e===!1?e=0:e===!0&&(e=defaultElastic),{x:resolveAxisElastic(e,"left","right"),y:resolveAxisElastic(e,"top","bottom")}}function resolveAxisElastic(e,t,i){return{min:resolvePointElastic(e,t),max:resolvePointElastic(e,i)}}function resolvePointElastic(e,t){return typeof e=="number"?e:e[t]||0}const createAxisDelta=()=>({translate:0,scale:1,origin:0,originPoint:0}),createDelta=()=>({x:createAxisDelta(),y:createAxisDelta()}),createAxis=()=>({min:0,max:0}),createBox=()=>({x:createAxis(),y:createAxis()});function eachAxis(e){return[e("x"),e("y")]}function convertBoundingBoxToBox({top:e,left:t,right:i,bottom:n}){return{x:{min:t,max:i},y:{min:e,max:n}}}function convertBoxToBoundingBox({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function transformBoxPoints(e,t){if(!t)return e;const i=t({x:e.left,y:e.top}),n=t({x:e.right,y:e.bottom});return{top:i.y,left:i.x,bottom:n.y,right:n.x}}function isIdentityScale(e){return e===void 0||e===1}function hasScale({scale:e,scaleX:t,scaleY:i}){return!isIdentityScale(e)||!isIdentityScale(t)||!isIdentityScale(i)}function hasTransform(e){return hasScale(e)||has2DTranslate(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function has2DTranslate(e){return is2DTranslate(e.x)||is2DTranslate(e.y)}function is2DTranslate(e){return e&&e!=="0%"}function scalePoint(e,t,i){const n=e-i,s=t*n;return i+s}function applyPointDelta(e,t,i,n,s){return s!==void 0&&(e=scalePoint(e,s,n)),scalePoint(e,i,n)+t}function applyAxisDelta(e,t=0,i=1,n,s){e.min=applyPointDelta(e.min,t,i,n,s),e.max=applyPointDelta(e.max,t,i,n,s)}function applyBoxDelta(e,{x:t,y:i}){applyAxisDelta(e.x,t.translate,t.scale,t.originPoint),applyAxisDelta(e.y,i.translate,i.scale,i.originPoint)}const TREE_SCALE_SNAP_MIN=.999999999999,TREE_SCALE_SNAP_MAX=1.0000000000001;function applyTreeDeltas(e,t,i,n=!1){const s=i.length;if(!s)return;t.x=t.y=1;let a,o;for(let l=0;l<s;l++){a=i[l],o=a.projectionDelta;const{visualElement:c}=a.options;c&&c.props.style&&c.props.style.display==="contents"||(n&&a.options.layoutScroll&&a.scroll&&a!==a.root&&transformBox(e,{x:-a.scroll.offset.x,y:-a.scroll.offset.y}),o&&(t.x*=o.x.scale,t.y*=o.y.scale,applyBoxDelta(e,o)),n&&hasTransform(a.latestValues)&&transformBox(e,a.latestValues))}t.x<TREE_SCALE_SNAP_MAX&&t.x>TREE_SCALE_SNAP_MIN&&(t.x=1),t.y<TREE_SCALE_SNAP_MAX&&t.y>TREE_SCALE_SNAP_MIN&&(t.y=1)}function translateAxis(e,t){e.min=e.min+t,e.max=e.max+t}function transformAxis(e,t,i,n,s=.5){const a=mixNumber$1(e.min,e.max,s);applyAxisDelta(e,t,i,a,n)}function transformBox(e,t){transformAxis(e.x,t.x,t.scaleX,t.scale,t.originX),transformAxis(e.y,t.y,t.scaleY,t.scale,t.originY)}function measureViewportBox(e,t){return convertBoundingBoxToBox(transformBoxPoints(e.getBoundingClientRect(),t))}function measurePageBox(e,t,i){const n=measureViewportBox(e,i),{scroll:s}=t;return s&&(translateAxis(n.x,s.offset.x),translateAxis(n.y,s.offset.y)),n}const getContextWindow=({current:e})=>e?e.ownerDocument.defaultView:null,elementDragControls=new WeakMap;class VisualElementDragControls{constructor(t){this.openDragLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=createBox(),this.visualElement=t}start(t,{snapToCursor:i=!1}={}){const{presenceContext:n}=this.visualElement;if(n&&n.isPresent===!1)return;const s=f=>{const{dragSnapToOrigin:d}=this.getProps();d?this.pauseAnimation():this.stopAnimation(),i&&this.snapToCursor(extractEventInfo(f).point)},a=(f,d)=>{const{drag:p,dragPropagation:b,onDragStart:y}=this.getProps();if(p&&!b&&(this.openDragLock&&this.openDragLock(),this.openDragLock=setDragLock(p),!this.openDragLock))return;this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),eachAxis(P=>{let m=this.getAxisMotionValue(P).get()||0;if(percent.test(m)){const{projection:x}=this.visualElement;if(x&&x.layout){const C=x.layout.layoutBox[P];C&&(m=calcLength(C)*(parseFloat(m)/100))}}this.originPoint[P]=m}),y&&frame.postRender(()=>y(f,d)),addValueToWillChange(this.visualElement,"transform");const{animationState:g}=this.visualElement;g&&g.setActive("whileDrag",!0)},o=(f,d)=>{const{dragPropagation:p,dragDirectionLock:b,onDirectionLock:y,onDrag:g}=this.getProps();if(!p&&!this.openDragLock)return;const{offset:P}=d;if(b&&this.currentDirection===null){this.currentDirection=getCurrentDirection(P),this.currentDirection!==null&&y&&y(this.currentDirection);return}this.updateAxis("x",d.point,P),this.updateAxis("y",d.point,P),this.visualElement.render(),g&&g(f,d)},l=(f,d)=>this.stop(f,d),c=()=>eachAxis(f=>{var d;return this.getAnimationState(f)==="paused"&&((d=this.getAxisMotionValue(f).animation)===null||d===void 0?void 0:d.play())}),{dragSnapToOrigin:u}=this.getProps();this.panSession=new PanSession(t,{onSessionStart:s,onStart:a,onMove:o,onSessionEnd:l,resumeAnimation:c},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:u,contextWindow:getContextWindow(this.visualElement)})}stop(t,i){const n=this.isDragging;if(this.cancel(),!n)return;const{velocity:s}=i;this.startAnimation(s);const{onDragEnd:a}=this.getProps();a&&frame.postRender(()=>a(t,i))}cancel(){this.isDragging=!1;const{projection:t,animationState:i}=this.visualElement;t&&(t.isAnimationBlocked=!1),this.panSession&&this.panSession.end(),this.panSession=void 0;const{dragPropagation:n}=this.getProps();!n&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),i&&i.setActive("whileDrag",!1)}updateAxis(t,i,n){const{drag:s}=this.getProps();if(!n||!shouldDrag(t,s,this.currentDirection))return;const a=this.getAxisMotionValue(t);let o=this.originPoint[t]+n[t];this.constraints&&this.constraints[t]&&(o=applyConstraints(o,this.constraints[t],this.elastic[t])),a.set(o)}resolveConstraints(){var t;const{dragConstraints:i,dragElastic:n}=this.getProps(),s=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):(t=this.visualElement.projection)===null||t===void 0?void 0:t.layout,a=this.constraints;i&&isRefObject(i)?this.constraints||(this.constraints=this.resolveRefConstraints()):i&&s?this.constraints=calcRelativeConstraints(s.layoutBox,i):this.constraints=!1,this.elastic=resolveDragElastic(n),a!==this.constraints&&s&&this.constraints&&!this.hasMutatedConstraints&&eachAxis(o=>{this.constraints!==!1&&this.getAxisMotionValue(o)&&(this.constraints[o]=rebaseAxisConstraints(s.layoutBox[o],this.constraints[o]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:i}=this.getProps();if(!t||!isRefObject(t))return!1;const n=t.current;invariant(n!==null,"If `dragConstraints` is set as a React ref, that ref must be passed to another component's `ref` prop.");const{projection:s}=this.visualElement;if(!s||!s.layout)return!1;const a=measurePageBox(n,s.root,this.visualElement.getTransformPagePoint());let o=calcViewportConstraints(s.layout.layoutBox,a);if(i){const l=i(convertBoxToBoundingBox(o));this.hasMutatedConstraints=!!l,l&&(o=convertBoundingBoxToBox(l))}return o}startAnimation(t){const{drag:i,dragMomentum:n,dragElastic:s,dragTransition:a,dragSnapToOrigin:o,onDragTransitionEnd:l}=this.getProps(),c=this.constraints||{},u=eachAxis(f=>{if(!shouldDrag(f,i,this.currentDirection))return;let d=c&&c[f]||{};o&&(d={min:0,max:0});const p=s?200:1e6,b=s?40:1e7,y={type:"inertia",velocity:n?t[f]:0,bounceStiffness:p,bounceDamping:b,timeConstant:750,restDelta:1,restSpeed:10,...a,...d};return this.startAxisValueAnimation(f,y)});return Promise.all(u).then(l)}startAxisValueAnimation(t,i){const n=this.getAxisMotionValue(t);return addValueToWillChange(this.visualElement,t),n.start(animateMotionValue(t,n,0,i,this.visualElement,!1))}stopAnimation(){eachAxis(t=>this.getAxisMotionValue(t).stop())}pauseAnimation(){eachAxis(t=>{var i;return(i=this.getAxisMotionValue(t).animation)===null||i===void 0?void 0:i.pause()})}getAnimationState(t){var i;return(i=this.getAxisMotionValue(t).animation)===null||i===void 0?void 0:i.state}getAxisMotionValue(t){const i=`_drag${t.toUpperCase()}`,n=this.visualElement.getProps(),s=n[i];return s||this.visualElement.getValue(t,(n.initial?n.initial[t]:void 0)||0)}snapToCursor(t){eachAxis(i=>{const{drag:n}=this.getProps();if(!shouldDrag(i,n,this.currentDirection))return;const{projection:s}=this.visualElement,a=this.getAxisMotionValue(i);if(s&&s.layout){const{min:o,max:l}=s.layout.layoutBox[i];a.set(t[i]-mixNumber$1(o,l,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:i}=this.getProps(),{projection:n}=this.visualElement;if(!isRefObject(i)||!n||!this.constraints)return;this.stopAnimation();const s={x:0,y:0};eachAxis(o=>{const l=this.getAxisMotionValue(o);if(l&&this.constraints!==!1){const c=l.get();s[o]=calcOrigin({min:c,max:c},this.constraints[o])}});const{transformTemplate:a}=this.visualElement.getProps();this.visualElement.current.style.transform=a?a({},""):"none",n.root&&n.root.updateScroll(),n.updateLayout(),this.resolveConstraints(),eachAxis(o=>{if(!shouldDrag(o,t,null))return;const l=this.getAxisMotionValue(o),{min:c,max:u}=this.constraints[o];l.set(mixNumber$1(c,u,s[o]))})}addListeners(){if(!this.visualElement.current)return;elementDragControls.set(this.visualElement,this);const t=this.visualElement.current,i=addPointerEvent(t,"pointerdown",c=>{const{drag:u,dragListener:f=!0}=this.getProps();u&&f&&this.start(c)}),n=()=>{const{dragConstraints:c}=this.getProps();isRefObject(c)&&c.current&&(this.constraints=this.resolveRefConstraints())},{projection:s}=this.visualElement,a=s.addEventListener("measure",n);s&&!s.layout&&(s.root&&s.root.updateScroll(),s.updateLayout()),frame.read(n);const o=addDomEvent(window,"resize",()=>this.scalePositionWithinConstraints()),l=s.addEventListener("didUpdate",({delta:c,hasLayoutChanged:u})=>{this.isDragging&&u&&(eachAxis(f=>{const d=this.getAxisMotionValue(f);d&&(this.originPoint[f]+=c[f].translate,d.set(d.get()+c[f].translate))}),this.visualElement.render())});return()=>{o(),i(),a(),l&&l()}}getProps(){const t=this.visualElement.getProps(),{drag:i=!1,dragDirectionLock:n=!1,dragPropagation:s=!1,dragConstraints:a=!1,dragElastic:o=defaultElastic,dragMomentum:l=!0}=t;return{...t,drag:i,dragDirectionLock:n,dragPropagation:s,dragConstraints:a,dragElastic:o,dragMomentum:l}}}function shouldDrag(e,t,i){return(t===!0||t===e)&&(i===null||i===e)}function getCurrentDirection(e,t=10){let i=null;return Math.abs(e.y)>t?i="y":Math.abs(e.x)>t&&(i="x"),i}class DragGesture extends Feature{constructor(t){super(t),this.removeGroupControls=noop,this.removeListeners=noop,this.controls=new VisualElementDragControls(t)}mount(){const{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||noop}unmount(){this.removeGroupControls(),this.removeListeners()}}const asyncHandler=e=>(t,i)=>{e&&frame.postRender(()=>e(t,i))};class PanGesture extends Feature{constructor(){super(...arguments),this.removePointerDownListener=noop}onPointerDown(t){this.session=new PanSession(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:getContextWindow(this.node)})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:i,onPan:n,onPanEnd:s}=this.node.getProps();return{onSessionStart:asyncHandler(t),onStart:asyncHandler(i),onMove:n,onEnd:(a,o)=>{delete this.session,s&&frame.postRender(()=>s(a,o))}}}mount(){this.removePointerDownListener=addPointerEvent(this.node.current,"pointerdown",t=>this.onPointerDown(t))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}const globalProjectionState={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function pixelsToPercent(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const correctBorderRadius={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if(px.test(e))e=parseFloat(e);else return e;const i=pixelsToPercent(e,t.target.x),n=pixelsToPercent(e,t.target.y);return`${i}% ${n}%`}},correctBoxShadow={correct:(e,{treeScale:t,projectionDelta:i})=>{const n=e,s=complex.parse(e);if(s.length>5)return n;const a=complex.createTransformer(e),o=typeof s[0]!="number"?1:0,l=i.x.scale*t.x,c=i.y.scale*t.y;s[0+o]/=l,s[1+o]/=c;const u=mixNumber$1(l,c,.5);return typeof s[2+o]=="number"&&(s[2+o]/=u),typeof s[3+o]=="number"&&(s[3+o]/=u),a(s)}};class MeasureLayoutWithContext extends React.Component{componentDidMount(){const{visualElement:t,layoutGroup:i,switchLayoutGroup:n,layoutId:s}=this.props,{projection:a}=t;addScaleCorrector(defaultScaleCorrectors),a&&(i.group&&i.group.add(a),n&&n.register&&s&&n.register(a),a.root.didUpdate(),a.addEventListener("animationComplete",()=>{this.safeToRemove()}),a.setOptions({...a.options,onExitComplete:()=>this.safeToRemove()})),globalProjectionState.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){const{layoutDependency:i,visualElement:n,drag:s,isPresent:a}=this.props,o=n.projection;return o&&(o.isPresent=a,s||t.layoutDependency!==i||i===void 0?o.willUpdate():this.safeToRemove(),t.isPresent!==a&&(a?o.promote():o.relegate()||frame.postRender(()=>{const l=o.getStack();(!l||!l.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:t}=this.props.visualElement;t&&(t.root.didUpdate(),microtask.postRender(()=>{!t.currentAnimation&&t.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:t,layoutGroup:i,switchLayoutGroup:n}=this.props,{projection:s}=t;s&&(s.scheduleCheckAfterUnmount(),i&&i.group&&i.group.remove(s),n&&n.deregister&&n.deregister(s))}safeToRemove(){const{safeToRemove:t}=this.props;t&&t()}render(){return null}}function MeasureLayout(e){const[t,i]=usePresence(),n=React.useContext(LayoutGroupContext);return jsxRuntime.jsx(MeasureLayoutWithContext,{...e,layoutGroup:n,switchLayoutGroup:React.useContext(SwitchLayoutGroupContext),isPresent:t,safeToRemove:i})}const defaultScaleCorrectors={borderRadius:{...correctBorderRadius,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:correctBorderRadius,borderTopRightRadius:correctBorderRadius,borderBottomLeftRadius:correctBorderRadius,borderBottomRightRadius:correctBorderRadius,boxShadow:correctBoxShadow};function animateSingleValue(e,t,i){const n=isMotionValue(e)?e:motionValue(e);return n.start(animateMotionValue("",n,t,i)),n.animation}function isSVGElement(e){return e instanceof SVGElement&&e.tagName!=="svg"}const compareByDepth=(e,t)=>e.depth-t.depth;class FlatTree{constructor(){this.children=[],this.isDirty=!1}add(t){addUniqueItem(this.children,t),this.isDirty=!0}remove(t){removeItem(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(compareByDepth),this.isDirty=!1,this.children.forEach(t)}}function delay(e,t){const i=time.now(),n=({timestamp:s})=>{const a=s-i;a>=t&&(cancelFrame(n),e(a-t))};return frame.read(n,!0),()=>cancelFrame(n)}const borders=["TopLeft","TopRight","BottomLeft","BottomRight"],numBorders=borders.length,asNumber=e=>typeof e=="string"?parseFloat(e):e,isPx=e=>typeof e=="number"||px.test(e);function mixValues(e,t,i,n,s,a){s?(e.opacity=mixNumber$1(0,i.opacity!==void 0?i.opacity:1,easeCrossfadeIn(n)),e.opacityExit=mixNumber$1(t.opacity!==void 0?t.opacity:1,0,easeCrossfadeOut(n))):a&&(e.opacity=mixNumber$1(t.opacity!==void 0?t.opacity:1,i.opacity!==void 0?i.opacity:1,n));for(let o=0;o<numBorders;o++){const l=`border${borders[o]}Radius`;let c=getRadius(t,l),u=getRadius(i,l);if(c===void 0&&u===void 0)continue;c||(c=0),u||(u=0),c===0||u===0||isPx(c)===isPx(u)?(e[l]=Math.max(mixNumber$1(asNumber(c),asNumber(u),n),0),(percent.test(u)||percent.test(c))&&(e[l]+="%")):e[l]=u}(t.rotate||i.rotate)&&(e.rotate=mixNumber$1(t.rotate||0,i.rotate||0,n))}function getRadius(e,t){return e[t]!==void 0?e[t]:e.borderRadius}const easeCrossfadeIn=compress(0,.5,circOut),easeCrossfadeOut=compress(.5,.95,noop);function compress(e,t,i){return n=>n<e?0:n>t?1:i(progress(e,t,n))}function copyAxisInto(e,t){e.min=t.min,e.max=t.max}function copyBoxInto(e,t){copyAxisInto(e.x,t.x),copyAxisInto(e.y,t.y)}function copyAxisDeltaInto(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}function removePointDelta(e,t,i,n,s){return e-=t,e=scalePoint(e,1/i,n),s!==void 0&&(e=scalePoint(e,1/s,n)),e}function removeAxisDelta(e,t=0,i=1,n=.5,s,a=e,o=e){if(percent.test(t)&&(t=parseFloat(t),t=mixNumber$1(o.min,o.max,t/100)-o.min),typeof t!="number")return;let l=mixNumber$1(a.min,a.max,n);e===a&&(l-=t),e.min=removePointDelta(e.min,t,i,l,s),e.max=removePointDelta(e.max,t,i,l,s)}function removeAxisTransforms(e,t,[i,n,s],a,o){removeAxisDelta(e,t[i],t[n],t[s],t.scale,a,o)}const xKeys=["x","scaleX","originX"],yKeys=["y","scaleY","originY"];function removeBoxTransforms(e,t,i,n){removeAxisTransforms(e.x,t,xKeys,i?i.x:void 0,n?n.x:void 0),removeAxisTransforms(e.y,t,yKeys,i?i.y:void 0,n?n.y:void 0)}function isAxisDeltaZero(e){return e.translate===0&&e.scale===1}function isDeltaZero(e){return isAxisDeltaZero(e.x)&&isAxisDeltaZero(e.y)}function axisEquals(e,t){return e.min===t.min&&e.max===t.max}function boxEquals(e,t){return axisEquals(e.x,t.x)&&axisEquals(e.y,t.y)}function axisEqualsRounded(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function boxEqualsRounded(e,t){return axisEqualsRounded(e.x,t.x)&&axisEqualsRounded(e.y,t.y)}function aspectRatio(e){return calcLength(e.x)/calcLength(e.y)}function axisDeltaEquals(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}class NodeStack{constructor(){this.members=[]}add(t){addUniqueItem(this.members,t),t.scheduleRender()}remove(t){if(removeItem(this.members,t),t===this.prevLead&&(this.prevLead=void 0),t===this.lead){const i=this.members[this.members.length-1];i&&this.promote(i)}}relegate(t){const i=this.members.findIndex(s=>t===s);if(i===0)return!1;let n;for(let s=i;s>=0;s--){const a=this.members[s];if(a.isPresent!==!1){n=a;break}}return n?(this.promote(n),!0):!1}promote(t,i){const n=this.lead;if(t!==n&&(this.prevLead=n,this.lead=t,t.show(),n)){n.instance&&n.scheduleRender(),t.scheduleRender(),t.resumeFrom=n,i&&(t.resumeFrom.preserveOpacity=!0),n.snapshot&&(t.snapshot=n.snapshot,t.snapshot.latestValues=n.animationValues||n.latestValues),t.root&&t.root.isUpdating&&(t.isLayoutDirty=!0);const{crossfade:s}=t.options;s===!1&&n.hide()}}exitAnimationComplete(){this.members.forEach(t=>{const{options:i,resumingFrom:n}=t;i.onExitComplete&&i.onExitComplete(),n&&n.options.onExitComplete&&n.options.onExitComplete()})}scheduleRender(){this.members.forEach(t=>{t.instance&&t.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}function buildProjectionTransform(e,t,i){let n="";const s=e.x.translate/t.x,a=e.y.translate/t.y,o=(i==null?void 0:i.z)||0;if((s||a||o)&&(n=`translate3d(${s}px, ${a}px, ${o}px) `),(t.x!==1||t.y!==1)&&(n+=`scale(${1/t.x}, ${1/t.y}) `),i){const{transformPerspective:u,rotate:f,rotateX:d,rotateY:p,skewX:b,skewY:y}=i;u&&(n=`perspective(${u}px) ${n}`),f&&(n+=`rotate(${f}deg) `),d&&(n+=`rotateX(${d}deg) `),p&&(n+=`rotateY(${p}deg) `),b&&(n+=`skewX(${b}deg) `),y&&(n+=`skewY(${y}deg) `)}const l=e.x.scale*t.x,c=e.y.scale*t.y;return(l!==1||c!==1)&&(n+=`scale(${l}, ${c})`),n||"none"}const metrics={type:"projectionFrame",totalNodes:0,resolvedTargetDeltas:0,recalculatedProjection:0},isDebug=typeof window<"u"&&window.MotionDebug!==void 0,transformAxes=["","X","Y","Z"],hiddenVisibility={visibility:"hidden"},animationTarget=1e3;let id=0;function resetDistortingTransform(e,t,i,n){const{latestValues:s}=t;s[e]&&(i[e]=s[e],t.setStaticValue(e,0),n&&(n[e]=0))}function cancelTreeOptimisedTransformAnimations(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;const{visualElement:t}=e.options;if(!t)return;const i=getOptimisedAppearId(t);if(window.MotionHasOptimisedAnimation(i,"transform")){const{layout:s,layoutId:a}=e.options;window.MotionCancelOptimisedAnimation(i,"transform",frame,!(s||a))}const{parent:n}=e;n&&!n.hasCheckedOptimisedAppear&&cancelTreeOptimisedTransformAnimations(n)}function createProjectionNode({attachResizeListener:e,defaultParent:t,measureScroll:i,checkIsScrollRoot:n,resetTransform:s}){return class{constructor(o={},l=t==null?void 0:t()){this.id=id++,this.animationId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.hasCheckedOptimisedAppear=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,isDebug&&(metrics.totalNodes=metrics.resolvedTargetDeltas=metrics.recalculatedProjection=0),this.nodes.forEach(propagateDirtyNodes),this.nodes.forEach(resolveTargetDelta),this.nodes.forEach(calcProjection),this.nodes.forEach(cleanDirtyNodes),isDebug&&window.MotionDebug.record(metrics)},this.resolvedRelativeTargetAt=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=o,this.root=l?l.root||l:this,this.path=l?[...l.path,l]:[],this.parent=l,this.depth=l?l.depth+1:0;for(let c=0;c<this.path.length;c++)this.path[c].shouldResetTransform=!0;this.root===this&&(this.nodes=new FlatTree)}addEventListener(o,l){return this.eventHandlers.has(o)||this.eventHandlers.set(o,new SubscriptionManager),this.eventHandlers.get(o).add(l)}notifyListeners(o,...l){const c=this.eventHandlers.get(o);c&&c.notify(...l)}hasListeners(o){return this.eventHandlers.has(o)}mount(o,l=this.root.hasTreeAnimated){if(this.instance)return;this.isSVG=isSVGElement(o),this.instance=o;const{layoutId:c,layout:u,visualElement:f}=this.options;if(f&&!f.current&&f.mount(o),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),l&&(u||c)&&(this.isLayoutDirty=!0),e){let d;const p=()=>this.root.updateBlockedByResize=!1;e(o,()=>{this.root.updateBlockedByResize=!0,d&&d(),d=delay(p,250),globalProjectionState.hasAnimatedSinceResize&&(globalProjectionState.hasAnimatedSinceResize=!1,this.nodes.forEach(finishAnimation))})}c&&this.root.registerSharedNode(c,this),this.options.animate!==!1&&f&&(c||u)&&this.addEventListener("didUpdate",({delta:d,hasLayoutChanged:p,hasRelativeTargetChanged:b,layout:y})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const g=this.options.transition||f.getDefaultTransition()||defaultLayoutTransition,{onLayoutAnimationStart:P,onLayoutAnimationComplete:m}=f.getProps(),x=!this.targetLayout||!boxEqualsRounded(this.targetLayout,y)||b,C=!p&&b;if(this.options.layoutRoot||this.resumeFrom&&this.resumeFrom.instance||C||p&&(x||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0),this.setAnimationOrigin(d,C);const S={...getValueTransition$1(g,"layout"),onPlay:P,onComplete:m};(f.shouldReduceMotion||this.options.layoutRoot)&&(S.delay=0,S.type=!1),this.startAnimation(S)}else p||finishAnimation(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=y})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const o=this.getStack();o&&o.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,cancelFrame(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){return this.isAnimationBlocked||this.parent&&this.parent.isTreeAnimationBlocked()||!1}startUpdate(){this.isUpdateBlocked()||(this.isUpdating=!0,this.nodes&&this.nodes.forEach(resetSkewAndRotation),this.animationId++)}getTransformTemplate(){const{visualElement:o}=this.options;return o&&o.getProps().transformTemplate}willUpdate(o=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&cancelTreeOptimisedTransformAnimations(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let f=0;f<this.path.length;f++){const d=this.path[f];d.shouldResetTransform=!0,d.updateScroll("snapshot"),d.options.layoutRoot&&d.willUpdate(!1)}const{layoutId:l,layout:c}=this.options;if(l===void 0&&!c)return;const u=this.getTransformTemplate();this.prevTransformTemplateValue=u?u(this.latestValues,""):void 0,this.updateSnapshot(),o&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){this.unblockUpdate(),this.clearAllSnapshots(),this.nodes.forEach(clearMeasurements);return}this.isUpdating||this.nodes.forEach(clearIsLayoutDirty),this.isUpdating=!1,this.nodes.forEach(resetTransformStyle),this.nodes.forEach(updateLayout),this.nodes.forEach(notifyLayoutUpdate),this.clearAllSnapshots();const l=time.now();frameData.delta=clamp(0,1e3/60,l-frameData.timestamp),frameData.timestamp=l,frameData.isProcessing=!0,frameSteps.update.process(frameData),frameSteps.preRender.process(frameData),frameSteps.render.process(frameData),frameData.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,microtask.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(clearSnapshot),this.sharedNodes.forEach(removeLeadSnapshots)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,frame.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){frame.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure())}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let c=0;c<this.path.length;c++)this.path[c].updateScroll();const o=this.layout;this.layout=this.measure(!1),this.layoutCorrected=createBox(),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:l}=this.options;l&&l.notify("LayoutMeasure",this.layout.layoutBox,o?o.layoutBox:void 0)}updateScroll(o="measure"){let l=!!(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===o&&(l=!1),l){const c=n(this.instance);this.scroll={animationId:this.root.animationId,phase:o,isRoot:c,offset:i(this.instance),wasRoot:this.scroll?this.scroll.isRoot:c}}}resetTransform(){if(!s)return;const o=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,l=this.projectionDelta&&!isDeltaZero(this.projectionDelta),c=this.getTransformTemplate(),u=c?c(this.latestValues,""):void 0,f=u!==this.prevTransformTemplateValue;o&&(l||hasTransform(this.latestValues)||f)&&(s(this.instance,u),this.shouldResetTransform=!1,this.scheduleRender())}measure(o=!0){const l=this.measurePageBox();let c=this.removeElementScroll(l);return o&&(c=this.removeTransform(c)),roundBox(c),{animationId:this.root.animationId,measuredBox:l,layoutBox:c,latestValues:{},source:this.id}}measurePageBox(){var o;const{visualElement:l}=this.options;if(!l)return createBox();const c=l.measureViewportBox();if(!(((o=this.scroll)===null||o===void 0?void 0:o.wasRoot)||this.path.some(checkNodeWasScrollRoot))){const{scroll:f}=this.root;f&&(translateAxis(c.x,f.offset.x),translateAxis(c.y,f.offset.y))}return c}removeElementScroll(o){var l;const c=createBox();if(copyBoxInto(c,o),!((l=this.scroll)===null||l===void 0)&&l.wasRoot)return c;for(let u=0;u<this.path.length;u++){const f=this.path[u],{scroll:d,options:p}=f;f!==this.root&&d&&p.layoutScroll&&(d.wasRoot&©BoxInto(c,o),translateAxis(c.x,d.offset.x),translateAxis(c.y,d.offset.y))}return c}applyTransform(o,l=!1){const c=createBox();copyBoxInto(c,o);for(let u=0;u<this.path.length;u++){const f=this.path[u];!l&&f.options.layoutScroll&&f.scroll&&f!==f.root&&transformBox(c,{x:-f.scroll.offset.x,y:-f.scroll.offset.y}),hasTransform(f.latestValues)&&transformBox(c,f.latestValues)}return hasTransform(this.latestValues)&&transformBox(c,this.latestValues),c}removeTransform(o){const l=createBox();copyBoxInto(l,o);for(let c=0;c<this.path.length;c++){const u=this.path[c];if(!u.instance||!hasTransform(u.latestValues))continue;hasScale(u.latestValues)&&u.updateSnapshot();const f=createBox(),d=u.measurePageBox();copyBoxInto(f,d),removeBoxTransforms(l,u.latestValues,u.snapshot?u.snapshot.layoutBox:void 0,f)}return hasTransform(this.latestValues)&&removeBoxTransforms(l,this.latestValues),l}setTargetDelta(o){this.targetDelta=o,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(o){this.options={...this.options,...o,crossfade:o.crossfade!==void 0?o.crossfade:!0}}clearMeasurements(){this.scroll=void 0,this.layout=void 0,this.snapshot=void 0,this.prevTransformTemplateValue=void 0,this.targetDelta=void 0,this.target=void 0,this.isLayoutDirty=!1}forceRelativeParentToResolveTarget(){this.relativeParent&&this.relativeParent.resolvedRelativeTargetAt!==frameData.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(o=!1){var l;const c=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=c.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=c.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=c.isSharedProjectionDirty);const u=!!this.resumingFrom||this!==c;if(!(o||u&&this.isSharedProjectionDirty||this.isProjectionDirty||!((l=this.parent)===null||l===void 0)&&l.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:d,layoutId:p}=this.options;if(!(!this.layout||!(d||p))){if(this.resolvedRelativeTargetAt=frameData.timestamp,!this.targetDelta&&!this.relativeTarget){const b=this.getClosestProjectingParent();b&&b.layout&&this.animationProgress!==1?(this.relativeParent=b,this.forceRelativeParentToResolveTarget(),this.relativeTarget=createBox(),this.relativeTargetOrigin=createBox(),calcRelativePosition(this.relativeTargetOrigin,this.layout.layoutBox,b.layout.layoutBox),copyBoxInto(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}if(!(!this.relativeTarget&&!this.targetDelta)){if(this.target||(this.target=createBox(),this.targetWithTransforms=createBox()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),calcRelativeBox(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):copyBoxInto(this.target,this.layout.layoutBox),applyBoxDelta(this.target,this.targetDelta)):copyBoxInto(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget){this.attemptToResolveRelativeTarget=!1;const b=this.getClosestProjectingParent();b&&!!b.resumingFrom==!!this.resumingFrom&&!b.options.layoutScroll&&b.target&&this.animationProgress!==1?(this.relativeParent=b,this.forceRelativeParentToResolveTarget(),this.relativeTarget=createBox(),this.relativeTargetOrigin=createBox(),calcRelativePosition(this.relativeTargetOrigin,this.target,b.target),copyBoxInto(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}isDebug&&metrics.resolvedTargetDeltas++}}}getClosestProjectingParent(){if(!(!this.parent||hasScale(this.parent.latestValues)||has2DTranslate(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}calcProjection(){var o;const l=this.getLead(),c=!!this.resumingFrom||this!==l;let u=!0;if((this.isProjectionDirty||!((o=this.parent)===null||o===void 0)&&o.isProjectionDirty)&&(u=!1),c&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(u=!1),this.resolvedRelativeTargetAt===frameData.timestamp&&(u=!1),u)return;const{layout:f,layoutId:d}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(f||d))return;copyBoxInto(this.layoutCorrected,this.layout.layoutBox);const p=this.treeScale.x,b=this.treeScale.y;applyTreeDeltas(this.layoutCorrected,this.treeScale,this.path,c),l.layout&&!l.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(l.target=l.layout.layoutBox,l.targetWithTransforms=createBox());const{target:y}=l;if(!y){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(copyAxisDeltaInto(this.prevProjectionDelta.x,this.projectionDelta.x),copyAxisDeltaInto(this.prevProjectionDelta.y,this.projectionDelta.y)),calcBoxDelta(this.projectionDelta,this.layoutCorrected,y,this.latestValues),(this.treeScale.x!==p||this.treeScale.y!==b||!axisDeltaEquals(this.projectionDelta.x,this.prevProjectionDelta.x)||!axisDeltaEquals(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",y)),isDebug&&metrics.recalculatedProjection++}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(o=!0){var l;if((l=this.options.visualElement)===null||l===void 0||l.scheduleRender(),o){const c=this.getStack();c&&c.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=createDelta(),this.projectionDelta=createDelta(),this.projectionDeltaWithTransform=createDelta()}setAnimationOrigin(o,l=!1){const c=this.snapshot,u=c?c.latestValues:{},f={...this.latestValues},d=createDelta();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!l;const p=createBox(),b=c?c.source:void 0,y=this.layout?this.layout.source:void 0,g=b!==y,P=this.getStack(),m=!P||P.members.length<=1,x=!!(g&&!m&&this.options.crossfade===!0&&!this.path.some(hasOpacityCrossfade));this.animationProgress=0;let C;this.mixTargetDelta=S=>{const E=S/1e3;mixAxisDelta(d.x,o.x,E),mixAxisDelta(d.y,o.y,E),this.setTargetDelta(d),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(calcRelativePosition(p,this.layout.layoutBox,this.relativeParent.layout.layoutBox),mixBox(this.relativeTarget,this.relativeTargetOrigin,p,E),C&&boxEquals(this.relativeTarget,C)&&(this.isProjectionDirty=!1),C||(C=createBox()),copyBoxInto(C,this.relativeTarget)),g&&(this.animationValues=f,mixValues(f,u,this.latestValues,E,x,m)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=E},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(o){this.notifyListeners("animationStart"),this.currentAnimation&&this.currentAnimation.stop(),this.resumingFrom&&this.resumingFrom.currentAnimation&&this.resumingFrom.currentAnimation.stop(),this.pendingAnimation&&(cancelFrame(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=frame.update(()=>{globalProjectionState.hasAnimatedSinceResize=!0,this.currentAnimation=animateSingleValue(0,animationTarget,{...o,onUpdate:l=>{this.mixTargetDelta(l),o.onUpdate&&o.onUpdate(l)},onComplete:()=>{o.onComplete&&o.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);const o=this.getStack();o&&o.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(animationTarget),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const o=this.getLead();let{targetWithTransforms:l,target:c,layout:u,latestValues:f}=o;if(!(!l||!c||!u)){if(this!==o&&this.layout&&u&&shouldAnimatePositionOnly(this.options.animationType,this.layout.layoutBox,u.layoutBox)){c=this.target||createBox();const d=calcLength(this.layout.layoutBox.x);c.x.min=o.target.x.min,c.x.max=c.x.min+d;const p=calcLength(this.layout.layoutBox.y);c.y.min=o.target.y.min,c.y.max=c.y.min+p}copyBoxInto(l,c),transformBox(l,f),calcBoxDelta(this.projectionDeltaWithTransform,this.layoutCorrected,l,f)}}registerSharedNode(o,l){this.sharedNodes.has(o)||this.sharedNodes.set(o,new NodeStack),this.sharedNodes.get(o).add(l);const u=l.options.initialPromotionConfig;l.promote({transition:u?u.transition:void 0,preserveFollowOpacity:u&&u.shouldPreserveFollowOpacity?u.shouldPreserveFollowOpacity(l):void 0})}isLead(){const o=this.getStack();return o?o.lead===this:!0}getLead(){var o;const{layoutId:l}=this.options;return l?((o=this.getStack())===null||o===void 0?void 0:o.lead)||this:this}getPrevLead(){var o;const{layoutId:l}=this.options;return l?(o=this.getStack())===null||o===void 0?void 0:o.prevLead:void 0}getStack(){const{layoutId:o}=this.options;if(o)return this.root.sharedNodes.get(o)}promote({needsReset:o,transition:l,preserveFollowOpacity:c}={}){const u=this.getStack();u&&u.promote(this,c),o&&(this.projectionDelta=void 0,this.needsReset=!0),l&&this.setOptions({transition:l})}relegate(){const o=this.getStack();return o?o.relegate(this):!1}resetSkewAndRotation(){const{visualElement:o}=this.options;if(!o)return;let l=!1;const{latestValues:c}=o;if((c.z||c.rotate||c.rotateX||c.rotateY||c.rotateZ||c.skewX||c.skewY)&&(l=!0),!l)return;const u={};c.z&&resetDistortingTransform("z",o,u,this.animationValues);for(let f=0;f<transformAxes.length;f++)resetDistortingTransform(`rotate${transformAxes[f]}`,o,u,this.animationValues),resetDistortingTransform(`skew${transformAxes[f]}`,o,u,this.animationValues);o.render();for(const f in u)o.setStaticValue(f,u[f]),this.animationValues&&(this.animationValues[f]=u[f]);o.scheduleRender()}getProjectionStyles(o){var l,c;if(!this.instance||this.isSVG)return;if(!this.isVisible)return hiddenVisibility;const u={visibility:""},f=this.getTransformTemplate();if(this.needsReset)return this.needsReset=!1,u.opacity="",u.pointerEvents=resolveMotionValue(o==null?void 0:o.pointerEvents)||"",u.transform=f?f(this.latestValues,""):"none",u;const d=this.getLead();if(!this.projectionDelta||!this.layout||!d.target){const g={};return this.options.layoutId&&(g.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,g.pointerEvents=resolveMotionValue(o==null?void 0:o.pointerEvents)||""),this.hasProjected&&!hasTransform(this.latestValues)&&(g.transform=f?f({},""):"none",this.hasProjected=!1),g}const p=d.animationValues||d.latestValues;this.applyTransformsToTarget(),u.transform=buildProjectionTransform(this.projectionDeltaWithTransform,this.treeScale,p),f&&(u.transform=f(p,u.transform));const{x:b,y}=this.projectionDelta;u.transformOrigin=`${b.origin*100}% ${y.origin*100}% 0`,d.animationValues?u.opacity=d===this?(c=(l=p.opacity)!==null&&l!==void 0?l:this.latestValues.opacity)!==null&&c!==void 0?c:1:this.preserveOpacity?this.latestValues.opacity:p.opacityExit:u.opacity=d===this?p.opacity!==void 0?p.opacity:"":p.opacityExit!==void 0?p.opacityExit:0;for(const g in scaleCorrectors){if(p[g]===void 0)continue;const{correct:P,applyTo:m}=scaleCorrectors[g],x=u.transform==="none"?p[g]:P(p[g],d);if(m){const C=m.length;for(let S=0;S<C;S++)u[m[S]]=x}else u[g]=x}return this.options.layoutId&&(u.pointerEvents=d===this?resolveMotionValue(o==null?void 0:o.pointerEvents)||"":"none"),u}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(o=>{var l;return(l=o.currentAnimation)===null||l===void 0?void 0:l.stop()}),this.root.nodes.forEach(clearMeasurements),this.root.sharedNodes.clear()}}}function updateLayout(e){e.updateLayout()}function notifyLayoutUpdate(e){var t;const i=((t=e.resumeFrom)===null||t===void 0?void 0:t.snapshot)||e.snapshot;if(e.isLead()&&e.layout&&i&&e.hasListeners("didUpdate")){const{layoutBox:n,measuredBox:s}=e.layout,{animationType:a}=e.options,o=i.source!==e.layout.source;a==="size"?eachAxis(d=>{const p=o?i.measuredBox[d]:i.layoutBox[d],b=calcLength(p);p.min=n[d].min,p.max=p.min+b}):shouldAnimatePositionOnly(a,i.layoutBox,n)&&eachAxis(d=>{const p=o?i.measuredBox[d]:i.layoutBox[d],b=calcLength(n[d]);p.max=p.min+b,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[d].max=e.relativeTarget[d].min+b)});const l=createDelta();calcBoxDelta(l,n,i.layoutBox);const c=createDelta();o?calcBoxDelta(c,e.applyTransform(s,!0),i.measuredBox):calcBoxDelta(c,n,i.layoutBox);const u=!isDeltaZero(l);let f=!1;if(!e.resumeFrom){const d=e.getClosestProjectingParent();if(d&&!d.resumeFrom){const{snapshot:p,layout:b}=d;if(p&&b){const y=createBox();calcRelativePosition(y,i.layoutBox,p.layoutBox);const g=createBox();calcRelativePosition(g,n,b.layoutBox),boxEqualsRounded(y,g)||(f=!0),d.options.layoutRoot&&(e.relativeTarget=g,e.relativeTargetOrigin=y,e.relativeParent=d)}}}e.notifyListeners("didUpdate",{layout:n,snapshot:i,delta:c,layoutDelta:l,hasLayoutChanged:u,hasRelativeTargetChanged:f})}else if(e.isLead()){const{onExitComplete:n}=e.options;n&&n()}e.options.transition=void 0}function propagateDirtyNodes(e){isDebug&&metrics.totalNodes++,e.parent&&(e.isProjecting()||(e.isProjectionDirty=e.parent.isProjectionDirty),e.isSharedProjectionDirty||(e.isSharedProjectionDirty=!!(e.isProjectionDirty||e.parent.isProjectionDirty||e.parent.isSharedProjectionDirty)),e.isTransformDirty||(e.isTransformDirty=e.parent.isTransformDirty))}function cleanDirtyNodes(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function clearSnapshot(e){e.clearSnapshot()}function clearMeasurements(e){e.clearMeasurements()}function clearIsLayoutDirty(e){e.isLayoutDirty=!1}function resetTransformStyle(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function finishAnimation(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function resolveTargetDelta(e){e.resolveTargetDelta()}function calcProjection(e){e.calcProjection()}function resetSkewAndRotation(e){e.resetSkewAndRotation()}function removeLeadSnapshots(e){e.removeLeadSnapshot()}function mixAxisDelta(e,t,i){e.translate=mixNumber$1(t.translate,0,i),e.scale=mixNumber$1(t.scale,1,i),e.origin=t.origin,e.originPoint=t.originPoint}function mixAxis(e,t,i,n){e.min=mixNumber$1(t.min,i.min,n),e.max=mixNumber$1(t.max,i.max,n)}function mixBox(e,t,i,n){mixAxis(e.x,t.x,i.x,n),mixAxis(e.y,t.y,i.y,n)}function hasOpacityCrossfade(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}const defaultLayoutTransition={duration:.45,ease:[.4,0,.1,1]},userAgentContains=e=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),roundPoint=userAgentContains("applewebkit/")&&!userAgentContains("chrome/")?Math.round:noop;function roundAxis(e){e.min=roundPoint(e.min),e.max=roundPoint(e.max)}function roundBox(e){roundAxis(e.x),roundAxis(e.y)}function shouldAnimatePositionOnly(e,t,i){return e==="position"||e==="preserve-aspect"&&!isNear(aspectRatio(t),aspectRatio(i),.2)}function checkNodeWasScrollRoot(e){var t;return e!==e.root&&((t=e.scroll)===null||t===void 0?void 0:t.wasRoot)}const DocumentProjectionNode=createProjectionNode({attachResizeListener:(e,t)=>addDomEvent(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),rootProjectionNode={current:void 0},HTMLProjectionNode=createProjectionNode({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!rootProjectionNode.current){const e=new DocumentProjectionNode({});e.mount(window),e.setOptions({layoutScroll:!0}),rootProjectionNode.current=e}return rootProjectionNode.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:e=>window.getComputedStyle(e).position==="fixed"}),drag={pan:{Feature:PanGesture},drag:{Feature:DragGesture,ProjectionNode:HTMLProjectionNode,MeasureLayout}};function handleHoverEvent(e,t,i){const{props:n}=e;e.animationState&&n.whileHover&&e.animationState.setActive("whileHover",i==="Start");const s="onHover"+i,a=n[s];a&&frame.postRender(()=>a(t,extractEventInfo(t)))}class HoverGesture extends Feature{mount(){const{current:t}=this.node;t&&(this.unmount=hover(t,i=>(handleHoverEvent(this.node,i,"Start"),n=>handleHoverEvent(this.node,n,"End"))))}unmount(){}}class FocusGesture extends Feature{constructor(){super(...arguments),this.isActive=!1}onFocus(){let t=!1;try{t=this.node.current.matches(":focus-visible")}catch{t=!0}!t||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){!this.isActive||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=pipe(addDomEvent(this.node.current,"focus",()=>this.onFocus()),addDomEvent(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}function handlePressEvent(e,t,i){const{props:n}=e;e.animationState&&n.whileTap&&e.animationState.setActive("whileTap",i==="Start");const s="onTap"+(i==="End"?"":i),a=n[s];a&&frame.postRender(()=>a(t,extractEventInfo(t)))}class PressGesture extends Feature{mount(){const{current:t}=this.node;t&&(this.unmount=press(t,i=>(handlePressEvent(this.node,i,"Start"),(n,{success:s})=>handlePressEvent(this.node,n,s?"End":"Cancel")),{useGlobalTarget:this.node.props.globalTapTarget}))}unmount(){}}const observerCallbacks=new WeakMap,observers=new WeakMap,fireObserverCallback=e=>{const t=observerCallbacks.get(e.target);t&&t(e)},fireAllObserverCallbacks=e=>{e.forEach(fireObserverCallback)};function initIntersectionObserver({root:e,...t}){const i=e||document;observers.has(i)||observers.set(i,{});const n=observers.get(i),s=JSON.stringify(t);return n[s]||(n[s]=new IntersectionObserver(fireAllObserverCallbacks,{root:e,...t})),n[s]}function observeIntersection(e,t,i){const n=initIntersectionObserver(t);return observerCallbacks.set(e,i),n.observe(e),()=>{observerCallbacks.delete(e),n.unobserve(e)}}const thresholdNames={some:0,all:1};class InViewFeature extends Feature{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:t={}}=this.node.getProps(),{root:i,margin:n,amount:s="some",once:a}=t,o={root:i?i.current:void 0,rootMargin:n,threshold:typeof s=="number"?s:thresholdNames[s]},l=c=>{const{isIntersecting:u}=c;if(this.isInView===u||(this.isInView=u,a&&!u&&this.hasEnteredView))return;u&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",u);const{onViewportEnter:f,onViewportLeave:d}=this.node.getProps(),p=u?f:d;p&&p(c)};return observeIntersection(this.node.current,o,l)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:t,prevProps:i}=this.node;["amount","margin","root"].some(hasViewportOptionChanged(t,i))&&this.startObserver()}unmount(){}}function hasViewportOptionChanged({viewport:e={}},{viewport:t={}}={}){return i=>e[i]!==t[i]}const gestureAnimations={inView:{Feature:InViewFeature},tap:{Feature:PressGesture},focus:{Feature:FocusGesture},hover:{Feature:HoverGesture}},layout={layout:{ProjectionNode:HTMLProjectionNode,MeasureLayout}},prefersReducedMotion={current:null},hasReducedMotionListener={current:!1};function initPrefersReducedMotion(){if(hasReducedMotionListener.current=!0,!!isBrowser)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>prefersReducedMotion.current=e.matches;e.addListener(t),t()}else prefersReducedMotion.current=!1}const valueTypes=[...dimensionValueTypes,color,complex],findValueType=e=>valueTypes.find(testValueType(e)),visualElementStore=new WeakMap;function updateMotionValuesFromProps(e,t,i){for(const n in t){const s=t[n],a=i[n];if(isMotionValue(s))e.addValue(n,s),process.env.NODE_ENV==="development"&&warnOnce(s.version==="11.18.2",`Attempting to mix Motion versions ${s.version} with 11.18.2 may not work as expected.`);else if(isMotionValue(a))e.addValue(n,motionValue(s,{owner:e}));else if(a!==s)if(e.hasValue(n)){const o=e.getValue(n);o.liveStyle===!0?o.jump(s):o.hasAnimated||o.set(s)}else{const o=e.getStaticValue(n);e.addValue(n,motionValue(o!==void 0?o:s,{owner:e}))}}for(const n in i)t[n]===void 0&&e.removeValue(n);return t}const propEventHandlers=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];class VisualElement{scrapeMotionValuesFromProps(t,i,n){return{}}constructor({parent:t,props:i,presenceContext:n,reducedMotionConfig:s,blockInitialAnimation:a,visualState:o},l={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.KeyframeResolver=KeyframeResolver,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{const b=time.now();this.renderScheduledAt<b&&(this.renderScheduledAt=b,frame.render(this.render,!1,!0))};const{latestValues:c,renderState:u,onUpdate:f}=o;this.onUpdate=f,this.latestValues=c,this.baseTarget={...c},this.initialValues=i.initial?{...c}:{},this.renderState=u,this.parent=t,this.props=i,this.presenceContext=n,this.depth=t?t.depth+1:0,this.reducedMotionConfig=s,this.options=l,this.blockInitialAnimation=!!a,this.isControllingVariants=isControllingVariants(i),this.isVariantNode=isVariantNode(i),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(t&&t.current);const{willChange:d,...p}=this.scrapeMotionValuesFromProps(i,{},this);for(const b in p){const y=p[b];c[b]!==void 0&&isMotionValue(y)&&y.set(c[b],!1)}}mount(t){this.current=t,visualElementStore.set(t,this),this.projection&&!this.projection.instance&&this.projection.mount(t),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((i,n)=>this.bindToMotionValue(n,i)),hasReducedMotionListener.current||initPrefersReducedMotion(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:prefersReducedMotion.current,process.env.NODE_ENV!=="production"&&warnOnce(this.shouldReduceMotion!==!0,"You have Reduced Motion enabled on your device. Animations may not appear as expected."),this.parent&&this.parent.children.add(this),this.update(this.props,this.presenceContext)}unmount(){visualElementStore.delete(this.current),this.projection&&this.projection.unmount(),cancelFrame(this.notifyUpdate),cancelFrame(this.render),this.valueSubscriptions.forEach(t=>t()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent&&this.parent.children.delete(this);for(const t in this.events)this.events[t].clear();for(const t in this.features){const i=this.features[t];i&&(i.unmount(),i.isMounted=!1)}this.current=null}bindToMotionValue(t,i){this.valueSubscriptions.has(t)&&this.valueSubscriptions.get(t)();const n=transformProps.has(t),s=i.on("change",l=>{this.latestValues[t]=l,this.props.onUpdate&&frame.preRender(this.notifyUpdate),n&&this.projection&&(this.projection.isTransformDirty=!0)}),a=i.on("renderRequest",this.scheduleRender);let o;window.MotionCheckAppearSync&&(o=window.MotionCheckAppearSync(this,t,i)),this.valueSubscriptions.set(t,()=>{s(),a(),o&&o(),i.owner&&i.stop()})}sortNodePosition(t){return!this.current||!this.sortInstanceNodePosition||this.type!==t.type?0:this.sortInstanceNodePosition(this.current,t.current)}updateFeatures(){let t="animation";for(t in featureDefinitions){const i=featureDefinitions[t];if(!i)continue;const{isEnabled:n,Feature:s}=i;if(!this.features[t]&&s&&n(this.props)&&(this.features[t]=new s(this)),this.features[t]){const a=this.features[t];a.isMounted?a.update():(a.mount(),a.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):createBox()}getStaticValue(t){return this.latestValues[t]}setStaticValue(t,i){this.latestValues[t]=i}update(t,i){(t.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=t,this.prevPresenceContext=this.presenceContext,this.presenceContext=i;for(let n=0;n<propEventHandlers.length;n++){const s=propEventHandlers[n];this.propEventSubscriptions[s]&&(this.propEventSubscriptions[s](),delete this.propEventSubscriptions[s]);const a="on"+s,o=t[a];o&&(this.propEventSubscriptions[s]=this.on(s,o))}this.prevMotionValues=updateMotionValuesFromProps(this,this.scrapeMotionValuesFromProps(t,this.prevProps,this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue(),this.onUpdate&&this.onUpdate(this)}getProps(){return this.props}getVariant(t){return this.props.variants?this.props.variants[t]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}addVariantChild(t){const i=this.getClosestVariantNode();if(i)return i.variantChildren&&i.variantChildren.add(t),()=>i.variantChildren.delete(t)}addValue(t,i){const n=this.values.get(t);i!==n&&(n&&this.removeValue(t),this.bindToMotionValue(t,i),this.values.set(t,i),this.latestValues[t]=i.get())}removeValue(t){this.values.delete(t);const i=this.valueSubscriptions.get(t);i&&(i(),this.valueSubscriptions.delete(t)),delete this.latestValues[t],this.removeValueFromRenderState(t,this.renderState)}hasValue(t){return this.values.has(t)}getValue(t,i){if(this.props.values&&this.props.values[t])return this.props.values[t];let n=this.values.get(t);return n===void 0&&i!==void 0&&(n=motionValue(i===null?void 0:i,{owner:this}),this.addValue(t,n)),n}readValue(t,i){var n;let s=this.latestValues[t]!==void 0||!this.current?this.latestValues[t]:(n=this.getBaseTargetFromProps(this.props,t))!==null&&n!==void 0?n:this.readValueFromInstance(this.current,t,this.options);return s!=null&&(typeof s=="string"&&(isNumericalString(s)||isZeroValueString(s))?s=parseFloat(s):!findValueType(s)&&complex.test(i)&&(s=getAnimatableNone(t,i)),this.setBaseTarget(t,isMotionValue(s)?s.get():s)),isMotionValue(s)?s.get():s}setBaseTarget(t,i){this.baseTarget[t]=i}getBaseTarget(t){var i;const{initial:n}=this.props;let s;if(typeof n=="string"||typeof n=="object"){const o=resolveVariantFromProps(this.props,n,(i=this.presenceContext)===null||i===void 0?void 0:i.custom);o&&(s=o[t])}if(n&&s!==void 0)return s;const a=this.getBaseTargetFromProps(this.props,t);return a!==void 0&&!isMotionValue(a)?a:this.initialValues[t]!==void 0&&s===void 0?void 0:this.baseTarget[t]}on(t,i){return this.events[t]||(this.events[t]=new SubscriptionManager),this.events[t].add(i)}notify(t,...i){this.events[t]&&this.events[t].notify(...i)}}class DOMVisualElement extends VisualElement{constructor(){super(...arguments),this.KeyframeResolver=DOMKeyframesResolver}sortInstanceNodePosition(t,i){return t.compareDocumentPosition(i)&2?1:-1}getBaseTargetFromProps(t,i){return t.style?t.style[i]:void 0}removeValueFromRenderState(t,{vars:i,style:n}){delete i[t],delete n[t]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:t}=this.props;isMotionValue(t)&&(this.childSubscription=t.on("change",i=>{this.current&&(this.current.textContent=`${i}`)}))}}function getComputedStyle$1(e){return window.getComputedStyle(e)}class HTMLVisualElement extends DOMVisualElement{constructor(){super(...arguments),this.type="html",this.renderInstance=renderHTML}readValueFromInstance(t,i){if(transformProps.has(i)){const n=getDefaultValueType(i);return n&&n.default||0}else{const n=getComputedStyle$1(t),s=(isCSSVariableName(i)?n.getPropertyValue(i):n[i])||0;return typeof s=="string"?s.trim():s}}measureInstanceViewportBox(t,{transformPagePoint:i}){return measureViewportBox(t,i)}build(t,i,n){buildHTMLStyles(t,i,n.transformTemplate)}scrapeMotionValuesFromProps(t,i,n){return scrapeMotionValuesFromProps$1(t,i,n)}}class SVGVisualElement extends DOMVisualElement{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=createBox}getBaseTargetFromProps(t,i){return t[i]}readValueFromInstance(t,i){if(transformProps.has(i)){const n=getDefaultValueType(i);return n&&n.default||0}return i=camelCaseAttributes.has(i)?i:camelToDash(i),t.getAttribute(i)}scrapeMotionValuesFromProps(t,i,n){return scrapeMotionValuesFromProps(t,i,n)}build(t,i,n){buildSVGAttrs(t,i,this.isSVGTag,n.transformTemplate)}renderInstance(t,i,n,s){renderSVG(t,i,n,s)}mount(t){this.isSVGTag=isSVGTag(t.tagName),super.mount(t)}}const createDomVisualElement=(e,t)=>isSVGComponent(e)?new SVGVisualElement(t):new HTMLVisualElement(t,{allowProjection:e!==React.Fragment}),createMotionComponent=createMotionComponentFactory({...animations,...gestureAnimations,...drag,...layout},createDomVisualElement),motion=createDOMMotionComponentProxy(createMotionComponent);function useMotionValue(e){const t=useConstant(()=>motionValue(e)),{isStatic:i}=React.useContext(MotionConfigContext);if(i){const[,n]=React.useState(e);React.useEffect(()=>t.on("change",n),[])}return t}function useCombineMotionValues(e,t){const i=useMotionValue(t()),n=()=>i.set(t());return n(),useIsomorphicLayoutEffect(()=>{const s=()=>frame.preRender(n,!1,!0),a=e.map(o=>o.on("change",s));return()=>{a.forEach(o=>o()),cancelFrame(n)}}),i}const isCustomValueType=e=>e&&typeof e=="object"&&e.mix,getMixer=e=>isCustomValueType(e)?e.mix:void 0;function transform(...e){const t=!Array.isArray(e[0]),i=t?0:-1,n=e[0+i],s=e[1+i],a=e[2+i],o=e[3+i],l=interpolate(s,a,{mixer:getMixer(a[0]),...o});return t?l(n):l}function useComputed(e){collectMotionValues.current=[],e();const t=useCombineMotionValues(collectMotionValues.current,e);return collectMotionValues.current=void 0,t}function useTransform(e,t,i,n){if(typeof e=="function")return useComputed(e);const s=typeof t=="function"?t:transform(t,i,n);return Array.isArray(e)?useListTransform(e,s):useListTransform([e],([a])=>s(a))}function useListTransform(e,t){const i=useConstant(()=>[]);return useCombineMotionValues(e,()=>{i.length=0;const n=e.length;for(let s=0;s<n;s++)i[s]=e[s].get();return t(i)})}function useUnmountEffect(e){return React.useEffect(()=>()=>e(),[])}const wrap=(e,t,i)=>{const n=t-e;return((i-e)%n+n)%n+e};function getEasingForSegment(e,t){return isEasingArray(e)?e[wrap(0,e.length,t)]:e}function isDOMKeyframes(e){return typeof e=="object"&&!Array.isArray(e)}function resolveSubjects(e,t,i,n){return typeof e=="string"&&isDOMKeyframes(t)?resolveElements(e,i,n):e instanceof NodeList?Array.from(e):Array.isArray(e)?e:[e]}function calculateRepeatDuration(e,t,i){return e*(t+1)}function calcNextTime(e,t,i,n){var s;return typeof t=="number"?t:t.startsWith("-")||t.startsWith("+")?Math.max(0,e+parseFloat(t)):t==="<"?i:(s=n.get(t))!==null&&s!==void 0?s:e}function eraseKeyframes(e,t,i){for(let n=0;n<e.length;n++){const s=e[n];s.at>t&&s.at<i&&(removeItem(e,s),n--)}}function addKeyframes(e,t,i,n,s,a){eraseKeyframes(e,s,a);for(let o=0;o<t.length;o++)e.push({value:t[o],at:mixNumber$1(s,a,n[o]),easing:getEasingForSegment(i,o)})}function normalizeTimes(e,t){for(let i=0;i<e.length;i++)e[i]=e[i]/(t+1)}function compareByTime(e,t){return e.at===t.at?e.value===null?1:t.value===null?-1:0:e.at-t.at}const defaultSegmentEasing="easeInOut",MAX_REPEAT=20;function createAnimationsFromSequence(e,{defaultTransition:t={},...i}={},n,s){const a=t.duration||.3,o=new Map,l=new Map,c={},u=new Map;let f=0,d=0,p=0;for(let b=0;b<e.length;b++){const y=e[b];if(typeof y=="string"){u.set(y,d);continue}else if(!Array.isArray(y)){u.set(y.name,calcNextTime(d,y.at,f,u));continue}let[g,P,m={}]=y;m.at!==void 0&&(d=calcNextTime(d,m.at,f,u));let x=0;const C=(S,E,T,L=0,_=0)=>{const k=keyframesAsList(S),{delay:Z=0,times:B=defaultOffset(k),type:D="keyframes",repeat:H,repeatType:z,repeatDelay:O=0,...V}=E;let{ease:A=t.ease||"easeOut",duration:R}=E;const M=typeof Z=="function"?Z(L,_):Z,I=k.length,j=isGenerator(D)?D:s==null?void 0:s[D];if(I<=2&&j){let te=100;if(I===2&&isNumberKeyframesArray(k)){const de=k[1]-k[0];te=Math.abs(de)}const ie={...V};R!==void 0&&(ie.duration=secondsToMilliseconds(R));const pe=createGeneratorEasing(ie,te,j);A=pe.ease,R=pe.duration}R??(R=a);const G=d+M;B.length===1&&B[0]===0&&(B[1]=1);const U=B.length-k.length;if(U>0&&fillOffset(B,U),k.length===1&&k.unshift(null),H){invariant(H<MAX_REPEAT,"Repeat count too high, must be less than 20"),R=calculateRepeatDuration(R,H);const te=[...k],ie=[...B];A=Array.isArray(A)?[...A]:[A];const pe=[...A];for(let de=0;de<H;de++){k.push(...te);for(let ve=0;ve<te.length;ve++)B.push(ie[ve]+(de+1)),A.push(ve===0?"linear":getEasingForSegment(pe,ve-1))}normalizeTimes(B,H)}const Y=G+R;addKeyframes(T,k,A,B,G,Y),x=Math.max(M+R,x),p=Math.max(Y,p)};if(isMotionValue(g)){const S=getSubjectSequence(g,l);C(P,m,getValueSequence("default",S))}else{const S=resolveSubjects(g,P,n,c),E=S.length;for(let T=0;T<E;T++){P=P,m=m;const L=S[T],_=getSubjectSequence(L,l);for(const k in P)C(P[k],getValueTransition(m,k),getValueSequence(k,_),T,E)}}f=d,d+=x}return l.forEach((b,y)=>{for(const g in b){const P=b[g];P.sort(compareByTime);const m=[],x=[],C=[];for(let E=0;E<P.length;E++){const{at:T,value:L,easing:_}=P[E];m.push(L),x.push(progress(0,p,T)),C.push(_||"easeOut")}x[0]!==0&&(x.unshift(0),m.unshift(m[0]),C.unshift(defaultSegmentEasing)),x[x.length-1]!==1&&(x.push(1),m.push(null)),o.has(y)||o.set(y,{keyframes:{},transition:{}});const S=o.get(y);S.keyframes[g]=m,S.transition[g]={...t,duration:p,ease:C,times:x,...i}}}),o}function getSubjectSequence(e,t){return!t.has(e)&&t.set(e,{}),t.get(e)}function getValueSequence(e,t){return t[e]||(t[e]=[]),t[e]}function keyframesAsList(e){return Array.isArray(e)?e:[e]}function getValueTransition(e,t){return e&&e[t]?{...e,...e[t]}:{...e}}const isNumber=e=>typeof e=="number",isNumberKeyframesArray=e=>e.every(isNumber);function isObjectKey(e,t){return e in t}class ObjectVisualElement extends VisualElement{constructor(){super(...arguments),this.type="object"}readValueFromInstance(t,i){if(isObjectKey(i,t)){const n=t[i];if(typeof n=="string"||typeof n=="number")return n}}getBaseTargetFromProps(){}removeValueFromRenderState(t,i){delete i.output[t]}measureInstanceViewportBox(){return createBox()}build(t,i){Object.assign(t.output,i)}renderInstance(t,{output:i}){Object.assign(t,i)}sortInstanceNodePosition(){return 0}}function createDOMVisualElement(e){const t={presenceContext:null,props:{},visualState:{renderState:{transform:{},transformOrigin:{},style:{},vars:{},attrs:{}},latestValues:{}}},i=isSVGElement(e)?new SVGVisualElement(t):new HTMLVisualElement(t);i.mount(e),visualElementStore.set(e,i)}function createObjectVisualElement(e){const t={presenceContext:null,props:{},visualState:{renderState:{output:{}},latestValues:{}}},i=new ObjectVisualElement(t);i.mount(e),visualElementStore.set(e,i)}function isSingleValue(e,t){return isMotionValue(e)||typeof e=="number"||typeof e=="string"&&!isDOMKeyframes(t)}function animateSubject(e,t,i,n){const s=[];if(isSingleValue(e,t))s.push(animateSingleValue(e,isDOMKeyframes(t)&&t.default||t,i&&(i.default||i)));else{const a=resolveSubjects(e,t,n),o=a.length;invariant(!!o,"No valid elements provided.");for(let l=0;l<o;l++){const c=a[l],u=c instanceof Element?createDOMVisualElement:createObjectVisualElement;visualElementStore.has(c)||u(c);const f=visualElementStore.get(c),d={...i};"delay"in d&&typeof d.delay=="function"&&(d.delay=d.delay(l,o)),s.push(...animateTarget(f,{...t,transition:d},{}))}}return s}function animateSequence(e,t,i){const n=[];return createAnimationsFromSequence(e,t,i,{spring}).forEach(({keyframes:a,transition:o},l)=>{n.push(...animateSubject(l,a,o))}),n}function isSequence(e){return Array.isArray(e)&&e.some(Array.isArray)}function createScopedAnimate(e){function t(i,n,s){let a=[];isSequence(i)?a=animateSequence(i,n,e):a=animateSubject(i,n,s,e);const o=new GroupPlaybackControls(a);return e&&e.animations.push(o),o}return t}function useAnimate(){const e=useConstant(()=>({current:null,animations:[]})),t=useConstant(()=>createScopedAnimate(e));return useUnmountEffect(()=>{e.animations.forEach(i=>i.stop())}),[e,t]}function getOriginIndex(e,t){if(e==="first")return 0;{const i=t-1;return e==="last"?i:i/2}}function stagger(e=.1,{startDelay:t=0,from:i=0,ease:n}={}){return(s,a)=>{const o=typeof i=="number"?i:getOriginIndex(i,a),l=Math.abs(o-s);let c=e*l;if(n){const u=a*e;c=easingDefinitionToFunction(n)(c/u)*u}return t+c}}const FooterBackgroundAnimation=({isMobile:e,isLogoHovered:t,maskUrl:i})=>{const[n]=React.useState("https://garden-bucket-cdn.s3.eu-central-1.amazonaws.com/flowers_bg.mp4"),[s,a]=React.useState("initial"),o=React.useRef(null),l=React.useRef(null),c=useMotionValue(45),u=useTransform(c,f=>`${f}% center`);return React.useEffect(()=>{if(t)a("visible");else{a("exit");const f=setTimeout(()=>{a("initial")},800);return()=>clearTimeout(f)}},[t]),jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx("video",{ref:o,src:n,autoPlay:!0,loop:!0,muted:!0,controls:!1,preload:"metadata",playsInline:!0,className:"gf-pointer-events-none gf-absolute gf-left-0 gf-top-0 gf-z-0 gf-h-full gf-w-screen gf-object-cover gf-opacity-0"},"video-flowers"),jsxRuntime.jsx(AnimatePresence,{mode:"wait",children:jsxRuntime.jsx(motion.div,{animate:s,variants:{initial:{maskPosition:"45%",opacity:0},visible:{maskPosition:"10%",opacity:1},exit:{maskPosition:"-60%",opacity:0,transition:{duration:1.2,ease:[0,.77,.3,1],opacity:{delay:.4}}}},transition:{duration:1,ease:[.22,.68,.88,.96],delay:.15,opacity:{times:[0,1,1,1]}},style:{maskImage:`linear-gradient(black, black), url('${i}')`,maskComposite:"exclude",maskSize:e?"1200% 200%":"820% 600%",maskPosition:u},className:"gf-pointer-events-none gf-absolute gf-left-0 gf-top-0 gf-z-0 gf-h-full gf-w-full gf-overflow-hidden gf-opacity-0",children:jsxRuntime.jsx("video",{ref:l,src:n,autoPlay:!0,loop:!0,muted:!0,controls:!1,preload:"metadata",playsInline:!0,className:"gf-pointer-events-none gf-h-full gf-w-screen gf-object-cover",onCanPlayThrough:()=>{l.current&&l.current.play().catch(console.error)},onLoadStart:()=>{l.current&&l.current.play().catch(console.error)}},"video-flowers-animated")},"hovered")})]})},ScaleY=({children:e,triggerAnimation:t})=>{const i={animation:{scaleY:[0,1],opacity:[0,1],transition:{duration:.5,ease:cubicBezier(.84,0,.16,1),opacity:{duration:.2,ease:"easeInOut"},once:!0}},idle:{scaleY:1,opacity:1}};return jsxRuntime.jsx(motion.div,{animate:t?"animation":"idle",variants:i,style:{transformOrigin:"bottom"},children:e})},Shine=({children:e})=>jsxRuntime.jsx(motion.div,{className:"gf-relative gf-inline-block gf-overflow-hidden gf-rounded-xl gf-w-[300px] before:gf-z-50 before:gf-absolute before:gf-bg-gradient-to-r before:gf-from-transparent before:gf-via-white/50 before:gf-via-50% before:gf-to-transparent before:gf-top-0 before:gf-left-0 before:gf-w-[168px] before:gf-h-full before:gf-animate-shine before:gf-opacity-0",children:e}),RollingText=React.forwardRef(({value:e,isHovered:t,className:i,delay:n},s)=>{const a=e.split(""),[o,l]=useAnimate(),c=()=>{l([[".gf-letter",{y:"-100%"},{duration:.5,delay:n?stagger(.014,{startDelay:n}):stagger(.014),ease:[.76,0,.24,1]}]])},u=()=>{l([[".gf-letter",{y:"0%"},{duration:.5,delay:n?stagger(.014,{startDelay:n}):stagger(.014),ease:[.76,0,.24,1]}]])};return React.useImperativeHandle(s,()=>({startAnimation:c,stopAnimation:u})),React.useEffect(()=>{t?c():u()},[t]),React.useEffect(()=>{const f=()=>{t||c()},d=()=>{t||u()},p=o.current;if(p)return p.addEventListener("mouseenter",f),p.addEventListener("mouseleave",d),()=>{p.removeEventListener("mouseenter",f),p.removeEventListener("mouseleave",d)}},[o,t]),jsxRuntime.jsx("div",{ref:o,children:jsxRuntime.jsx("span",{className:cn("gf-flex gf-h-5 gf-items-center gf-justify-start gf-overflow-hidden gf-pr-0.5",i),children:a.map((f,d)=>jsxRuntime.jsx("span",{"data-letter":f,className:"gf-letter gf-relative gf-h-5 gf-whitespace-pre gf-leading-5 after:gf-absolute after:gf-left-0 after:gf-top-full after:gf-h-5 after:gf-leading-5 after:gf-content-[attr(data-letter)]",children:f},`${f}-${d}`))})})});RollingText.displayName="RollingText";const FooterLinks=({title:e,links:t,hoveredIndex:i,onHover:n,className:s="gf-flex gf-w-full gf-flex-col gf-gap-3 md:gf-w-fit",listClassName:a="gf-flex gf-flex-col gf-gap-1",isRoutes:o=!1})=>jsxRuntime.jsxs("div",{className:s,children:[jsxRuntime.jsx(Typography,{size:"h4",weight:"medium",className:"gf-flex gf-items-center gf-gap-2 gf-transition-all gf-duration-500 gf-ease-in-out gf-text-inherit",children:jsxRuntime.jsx("span",{children:e})}),jsxRuntime.jsx("ul",{className:a,children:Object.values(t).map((l,c)=>l.link&&jsxRuntime.jsx("li",{className:o?"gf-w-fit":"",onMouseEnter:()=>{n==null||n(c)},onMouseLeave:()=>{n==null||n(null)},children:jsxRuntime.jsxs(Typography,{as:"a",href:l.link,target:"_blank",size:"h4",weight:"regular",className:`gf-cursor-pointer gf-transition-all gf-duration-500 gf-ease-in-out gf-text-inherit ${o?"gf-flex gf-w-fit gf-gap-0.5 gf-items-end gf-transition-colors gf-duration-500 gf-ease-in-out":""}`,children:[l.inputAsset&&jsxRuntime.jsx(RollingText,{delay:.2,value:l.inputAsset||"",isHovered:i===c}),o&&l.inputChain&&jsxRuntime.jsx(RollingText,{delay:.3,className:"gf-text-xs gf-italic gf-translate-y-[0.6px]",value:l.inputChain,isHovered:i===c}),jsxRuntime.jsx(RollingText,{delay:.35,value:l.title,isHovered:i===c}),o&&l.chain&&jsxRuntime.jsx(RollingText,{delay:.5,className:"gf-text-xs gf-italic gf-translate-y-[0.6px] -gf-translate-x-[2px]",value:l.chain,isHovered:i===c})]})},c))})]}),MaskURL="data:image/svg+xml,%3csvg%20width='3956'%20height='906'%20viewBox='0%200%203956%20906'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3crect%20width='3956'%20height='906'%20fill='url(%23paint0_linear_579_2)'/%3e%3cdefs%3e%3clinearGradient%20id='paint0_linear_579_2'%20x1='1465.5'%20y1='731.406'%20x2='2604.91'%20y2='227.235'%20gradientUnits='userSpaceOnUse'%3e%3cstop%20stop-opacity='0'/%3e%3cstop%20offset='0.115385'/%3e%3cstop%20offset='0.88'/%3e%3cstop%20offset='1'%20stop-opacity='0'/%3e%3c/linearGradient%3e%3c/defs%3e%3c/svg%3e",Footer=({className:e,network:t="mainnet",maskUrl:i=MaskURL,...n})=>{const[s,a]=React.useState(!1),[o,l]=React.useState(null),c=useClientOnly(),u=React.useRef(null);React.useEffect(()=>()=>{u.current&&clearTimeout(u.current)},[]);const f=t&&t==="testnet"?"https://testnet.garden.finance":"https://app.garden.finance",d="https://garden.finance",p={Products:{swap:{title:"Swap",link:t&&t==="testnet"?`${f}/?input-chain=bitcoin_testnet&input-asset=BTC`:`${f}/?input-chain=bitcoin&input-asset=BTC`,isExternal:!0},stake:{title:"Stake",link:t&&t==="testnet"?void 0:`${f}/stake`,isExternal:!0},explorer:{title:"Explorer",link:t&&t==="testnet"?"https://testnet-explorer.garden.finance/":"https://explorer.garden.finance/",isExternal:!0}},Resources:{blog:{title:"Blog",link:`${d}/blog`,isExternal:!0},routes:{title:"Routes",link:`${d}/routes`,isExternal:!0},faq:{title:"FAQs",link:`${d}/faq`,isExternal:!0},brandKit:{title:"Brand kit",link:`${d}/brand-kit`,isExternal:!0},analytics:{title:"Analytics",link:"https://dune.com/garden_finance/gardenfinance",isExternal:!0},Governance:{title:"Governance",link:"https://docs.garden.finance/home/governance",isExternal:!0}},Developers:{docs:{title:"Docs",link:"https://docs.garden.finance/",isExternal:!0},api:{title:"API",link:"https://docs.garden.finance/developers/api/overview",isExternal:!0},sdk:{title:"SDK",link:"https://docs.garden.finance/developers/sdk/overview",isExternal:!0},security:{title:"Security",link:`${d}/security`,isExternal:!0}}},b={btcToSol:{title:"BTC to SOL",link:d+"/routes/bridge-btc-to-sol",chain:"Solana",isExternal:!0},btcToEth:{title:"BTC to ETH",link:d+"/routes/bridge-btc-to-eth",chain:"Ethereum",isExternal:!0},btcToUsdc:{title:"BTC to USDC",link:d+"/routes/bridge-btc-to-usdc-arbitrum",chain:"Arbitrum",isExternal:!0},btctoUsdcEth:{title:"BTC to USDC",link:d+"/routes/bridge-btc-to-usdc-ethereum",chain:"Ethereum",isExternal:!0},btcToWbtc:{title:"BTC to WBTC",link:d+"/routes/bridge-btc-to-wbtc-ethereum",chain:"Ethereum",isExternal:!0},btcTocbBtc:{title:"BTC to cbBTC",link:d+"/routes/bridge-btc-to-cbbtc-base",chain:"Base",isExternal:!0},btcToSui:{title:"BTC to SUI",link:d+"/routes/bridge-btc-to-sui",chain:"Sui",isExternal:!0},btcToBnb:{title:"BTC to BNB",link:d+"/routes/bridge-btc-to-bnb",chain:"BNB Chain",isExternal:!0},btcToMon:{title:"BTC to MON",link:d+"/routes/bridge-btc-to-mon",chain:"Monad",isExternal:!0},cbBtcBaseTocbBtcSolana:{title:" to cbBTC",link:d+"/routes/bridge-cbbtc-base-to-cbbtc-solana",inputAsset:"cbBTC",inputChain:"Base",chain:"Solana",isExternal:!0},usdcBnbToBtc:{title:" to BTC",link:d+"/routes/bridge-usdc-bnb-to-btc",inputAsset:"USDC",inputChain:"BNB Chain",isExternal:!0},btcToUsdtEthereum:{title:" to USDT",link:d+"/routes/bridge-btc-to-usdt-ethereum",inputAsset:"BTC",chain:"Ethereum",isExternal:!0},btcToUsdcSolana:{title:" to USDC",link:d+"/routes/bridge-btc-to-usdc-solana",inputAsset:"BTC",chain:"Solana",isExternal:!0},usdcEthereumToBtc:{title:" to BTC",link:d+"/routes/bridge-usdc-ethereum-to-btc",inputAsset:"USDC",inputChain:"Ethereum",isExternal:!0},solToBtc:{title:" to BTC",link:d+"/routes/bridge-sol-to-btc",inputAsset:"SOL",inputChain:"Solana",isExternal:!0},usdcEthereumToUsdcBase:{title:" to USDC",link:d+"/routes/bridge-usdc-ethereum-to-usdc-base",inputAsset:"USDC",inputChain:"Ethereum",chain:"Base",isExternal:!0}},y={discord:"https://discord.gg/7feudTFMXB",x:"https://x.com/gardenfi"},{Products:g,Resources:P,Developers:m}=p;return jsxRuntime.jsxs("footer",{className:cn("gf-z-10 gf-relative gf-mx-auto gf-flex gf-w-full gf-flex-col gf-items-center gf-justify-center gf-bg-white gf-px-6 gf-pb-10 gf-pt-20 md:gf-px-10",e,s?"gf-text-white":"gf-text-dark-grey"),...n,children:[jsxRuntime.jsxs("div",{className:"gf-z-30 gf-w-full gf-max-w-screen-2xl",children:[jsxRuntime.jsxs("div",{className:"gf-mx-auto gf-flex gf-w-full gf-flex-col gf-items-start gf-justify-between gf-gap-8",children:[jsxRuntime.jsxs("div",{className:"gf-flex gf-w-full gf-items-center gf-justify-between gf-gap-6",children:[jsxRuntime.jsx(GardenIcon,{onMouseEnter:()=>{u.current&&clearTimeout(u.current),u.current=setTimeout(()=>{a(!0)},300)},onMouseLeave:()=>{u.current&&(clearTimeout(u.current),u.current=null),a(!1)},className:"gf-h-8 gf-w-8 gf-cursor-pointer gf-duration-500 gf-ease-in-out",onClick:x=>x.preventDefault()}),jsxRuntime.jsxs("div",{className:"gf-flex gf-items-center gf-gap-4",children:[jsxRuntime.jsx(XIcon,{onClick:()=>{c&&window.open(y.x,"_blank")},className:"gf-cursor-pointer gf-duration-500 gf-ease-in-out"}),jsxRuntime.jsx(DiscordIcon,{onClick:()=>{c&&window.open(y.discord,"_blank")},className:"gf-cursor-pointer gf-duration-500 gf-ease-in-out"})]})]}),jsxRuntime.jsxs("div",{className:"gf-flex gf-w-full gf-max-w-screen-2xl gf-flex-col-reverse gf-items-start gf-justify-between gf-gap-6 md:gf-flex-row",children:[jsxRuntime.jsxs("div",{className:"gf-flex gf-w-full gf-flex-col sm:gf-flex-row gf-gap-6 gf-items-start gf-justify-between sm:gf-gap-3 md:gf-w-fit",children:[jsxRuntime.jsx("div",{className:"gf-w-full md:gf-hidden",children:jsxRuntime.jsx(FooterLinks,{title:"Resources",links:P,className:"gf-flex gf-w-full gf-flex-col gf-gap-3",listClassName:"gf-flex gf-flex-col gf-gap-2"})}),jsxRuntime.jsx("div",{className:"gf-flex gf-w-full gf-max-w-[400px] gf-flex-col gf-gap-3 md:gf-w-fit",children:jsxRuntime.jsx(FooterLinks,{title:"Routes",links:b,hoveredIndex:o,onHover:l,className:"gf-flex gf-w-full gf-max-w-[400px] gf-flex-col gf-gap-3 md:gf-w-fit",listClassName:"gf-grid gf-w-full gf-grid-cols-1 gf-gap-1 gf-gap-x-8 md:gf-grid-cols-2 md:gf-grid-rows-2",isRoutes:!0})})]}),jsxRuntime.jsxs("div",{className:"gf-flex gf-w-full gf-items-start gf-justify-between gf-gap-3 md:gf-w-fit md:gf-gap-16",children:[jsxRuntime.jsx(FooterLinks,{title:"Products",links:g,className:"gf-flex gf-w-full gf-flex-col gf-gap-3 md:gf-w-fit",listClassName:"gf-flex gf-w-fit gf-flex-col gf-gap-1 gf-gap-x-6"}),jsxRuntime.jsx(FooterLinks,{title:"Developers",links:m,className:"gf-flex gf-w-full gf-flex-col gf-gap-3 md:gf-w-fit",listClassName:"gf-flex gf-flex-col gf-gap-1"}),jsxRuntime.jsx("div",{className:"gf-hidden md:gf-flex",children:jsxRuntime.jsx(FooterLinks,{title:"Resources",links:P,className:"gf-flex gf-w-full gf-flex-col gf-gap-3",listClassName:"gf-flex gf-flex-col gf-gap-1"})})]})]})]}),jsxRuntime.jsxs("div",{className:"gf-relative gf-mt-6 gf-flex gf-w-full gf-max-w-screen-2xl gf-items-center gf-justify-center",children:[jsxRuntime.jsx("div",{className:`gf-absolute gf-left-0 gf-top-0 gf-h-[1px] gf-w-full gf-transition-all gf-duration-500 gf-ease-in-out ${s?"gf-bg-white":"gf-bg-dark-grey"}`}),jsxRuntime.jsxs("div",{className:"gf-z-10 gf-my-6 gf-flex gf-w-full gf-items-center gf-justify-between gf-gap-4",children:[jsxRuntime.jsx("div",{className:"gf-flex gf-w-fit gf-items-center gf-justify-start gf-gap-6",children:jsxRuntime.jsxs(Typography,{size:"h5",className:"gf-flex gf-items-center gf-gap-1 gf-transition-all gf-duration-500 gf-ease-in-out gf-text-inherit",weight:"regular",children:[jsxRuntime.jsx(CopyrightsIcon,{}),jsxRuntime.jsx("span",{children:"Garden"}),jsxRuntime.jsx("span",{children:"2026"})]})}),jsxRuntime.jsxs("div",{className:"gf-flex gf-w-fit gf-items-center gf-justify-end gf-gap-6",children:[jsxRuntime.jsx(Typography,{size:"h5",as:"a",className:"gf-cursor-pointer gf-underline-offset-2 gf-transition-all gf-duration-500 gf-ease-in-out gf-hover:underline gf-text-inherit",weight:"regular",href:"https://garden.finance/privacy.pdf",target:"_blank",children:"Privacy Policy"}),jsxRuntime.jsx(Typography,{as:"a",size:"h5",className:"gf-cursor-pointer gf-underline-offset-2 gf-transition-all gf-duration-500 gf-ease-in-out gf-hover:underline gf-text-inherit",weight:"regular",href:"https://garden.finance/terms.pdf",target:"_blank",children:"Terms of Service"})]})]})]})]}),jsxRuntime.jsx(FooterBackgroundAnimation,{isMobile:!1,isLogoHovered:s,maskUrl:i})]})};var commonjsGlobal=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function getDefaultExportFromCjs(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var build={exports:{}};(()=>{var e={296:(s,a,o)=>{var l=/^\s+|\s+$/g,c=/^[-+]0x[0-9a-f]+$/i,u=/^0b[01]+$/i,f=/^0o[0-7]+$/i,d=parseInt,p=typeof o.g=="object"&&o.g&&o.g.Object===Object&&o.g,b=typeof self=="object"&&self&&self.Object===Object&&self,y=p||b||Function("return this")(),g=Object.prototype.toString,P=Math.max,m=Math.min,x=function(){return y.Date.now()};function C(E){var T=typeof E;return!!E&&(T=="object"||T=="function")}function S(E){if(typeof E=="number")return E;if(function(_){return typeof _=="symbol"||function(k){return!!k&&typeof k=="object"}(_)&&g.call(_)=="[object Symbol]"}(E))return NaN;if(C(E)){var T=typeof E.valueOf=="function"?E.valueOf():E;E=C(T)?T+"":T}if(typeof E!="string")return E===0?E:+E;E=E.replace(l,"");var L=u.test(E);return L||f.test(E)?d(E.slice(2),L?2:8):c.test(E)?NaN:+E}s.exports=function(E,T,L){var _,k,Z,B,D,H,z=0,O=!1,V=!1,A=!0;if(typeof E!="function")throw new TypeError("Expected a function");function R(U){var Y=_,te=k;return _=k=void 0,z=U,B=E.apply(te,Y)}function M(U){var Y=U-H;return H===void 0||Y>=T||Y<0||V&&U-z>=Z}function I(){var U=x();if(M(U))return j(U);D=setTimeout(I,function(Y){var te=T-(Y-H);return V?m(te,Z-(Y-z)):te}(U))}function j(U){return D=void 0,A&&_?R(U):(_=k=void 0,B)}function G(){var U=x(),Y=M(U);if(_=arguments,k=this,H=U,Y){if(D===void 0)return function(te){return z=te,D=setTimeout(I,T),O?R(te):B}(H);if(V)return D=setTimeout(I,T),R(H)}return D===void 0&&(D=setTimeout(I,T)),B}return T=S(T)||0,C(L)&&(O=!!L.leading,Z=(V="maxWait"in L)?P(S(L.maxWait)||0,T):Z,A="trailing"in L?!!L.trailing:A),G.cancel=function(){D!==void 0&&clearTimeout(D),z=0,_=H=k=D=void 0},G.flush=function(){return D===void 0?B:j(x())},G}},96:(s,a,o)=>{var l="Expected a function",c=NaN,u="[object Symbol]",f=/^\s+|\s+$/g,d=/^[-+]0x[0-9a-f]+$/i,p=/^0b[01]+$/i,b=/^0o[0-7]+$/i,y=parseInt,g=typeof o.g=="object"&&o.g&&o.g.Object===Object&&o.g,P=typeof self=="object"&&self&&self.Object===Object&&self,m=g||P||Function("return this")(),x=Object.prototype.toString,C=Math.max,S=Math.min,E=function(){return m.Date.now()};function T(_){var k=typeof _;return!!_&&(k=="object"||k=="function")}function L(_){if(typeof _=="number")return _;if(function(B){return typeof B=="symbol"||function(D){return!!D&&typeof D=="object"}(B)&&x.call(B)==u}(_))return c;if(T(_)){var k=typeof _.valueOf=="function"?_.valueOf():_;_=T(k)?k+"":k}if(typeof _!="string")return _===0?_:+_;_=_.replace(f,"");var Z=p.test(_);return Z||b.test(_)?y(_.slice(2),Z?2:8):d.test(_)?c:+_}s.exports=function(_,k,Z){var B=!0,D=!0;if(typeof _!="function")throw new TypeError(l);return T(Z)&&(B="leading"in Z?!!Z.leading:B,D="trailing"in Z?!!Z.trailing:D),function(H,z,O){var V,A,R,M,I,j,G=0,U=!1,Y=!1,te=!0;if(typeof H!="function")throw new TypeError(l);function ie(ue){var ge=V,ae=A;return V=A=void 0,G=ue,M=H.apply(ae,ge)}function pe(ue){var ge=ue-j;return j===void 0||ge>=z||ge<0||Y&&ue-G>=R}function de(){var ue=E();if(pe(ue))return ve(ue);I=setTimeout(de,function(ge){var ae=z-(ge-j);return Y?S(ae,R-(ge-G)):ae}(ue))}function ve(ue){return I=void 0,te&&V?ie(ue):(V=A=void 0,M)}function Ce(){var ue=E(),ge=pe(ue);if(V=arguments,A=this,j=ue,ge){if(I===void 0)return function(ae){return G=ae,I=setTimeout(de,z),U?ie(ae):M}(j);if(Y)return I=setTimeout(de,z),ie(j)}return I===void 0&&(I=setTimeout(de,z)),M}return z=L(z)||0,T(O)&&(U=!!O.leading,R=(Y="maxWait"in O)?C(L(O.maxWait)||0,z):R,te="trailing"in O?!!O.trailing:te),Ce.cancel=function(){I!==void 0&&clearTimeout(I),G=0,V=j=A=I=void 0},Ce.flush=function(){return I===void 0?M:ve(E())},Ce}(_,k,{leading:B,maxWait:k,trailing:D})}},703:(s,a,o)=>{var l=o(414);function c(){}function u(){}u.resetWarningCache=c,s.exports=function(){function f(b,y,g,P,m,x){if(x!==l){var C=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw C.name="Invariant Violation",C}}function d(){return f}f.isRequired=f;var p={array:f,bigint:f,bool:f,func:f,number:f,object:f,string:f,symbol:f,any:f,arrayOf:d,element:f,elementType:f,instanceOf:d,node:f,objectOf:d,oneOf:d,oneOfType:d,shape:d,exact:d,checkPropTypes:u,resetWarningCache:c};return p.PropTypes=p,p}},697:(s,a,o)=>{s.exports=o(703)()},414:s=>{s.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"}},t={};function i(s){var a=t[s];if(a!==void 0)return a.exports;var o=t[s]={exports:{}};return e[s](o,o.exports,i),o.exports}i.n=s=>{var a=s&&s.__esModule?()=>s.default:()=>s;return i.d(a,{a}),a},i.d=(s,a)=>{for(var o in a)i.o(a,o)&&!i.o(s,o)&&Object.defineProperty(s,o,{enumerable:!0,get:a[o]})},i.g=function(){if(typeof globalThis=="object")return globalThis;try{return this||new Function("return this")()}catch{if(typeof window=="object")return window}}(),i.o=(s,a)=>Object.prototype.hasOwnProperty.call(s,a),i.r=s=>{typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(s,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(s,"__esModule",{value:!0})};var n={};(()=>{i.r(n),i.d(n,{LazyLoadComponent:()=>ge,LazyLoadImage:()=>Le,trackWindowScroll:()=>M});const s=React;var a=i.n(s),o=i(697);function l(){return typeof window<"u"&&"IntersectionObserver"in window&&"isIntersecting"in window.IntersectionObserverEntry.prototype}function c(W){return c=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(F){return typeof F}:function(F){return F&&typeof Symbol=="function"&&F.constructor===Symbol&&F!==Symbol.prototype?"symbol":typeof F},c(W)}function u(W,F){var q=Object.keys(W);if(Object.getOwnPropertySymbols){var X=Object.getOwnPropertySymbols(W);F&&(X=X.filter(function(oe){return Object.getOwnPropertyDescriptor(W,oe).enumerable})),q.push.apply(q,X)}return q}function f(W,F,q){return(F=p(F))in W?Object.defineProperty(W,F,{value:q,enumerable:!0,configurable:!0,writable:!0}):W[F]=q,W}function d(W,F){for(var q=0;q<F.length;q++){var X=F[q];X.enumerable=X.enumerable||!1,X.configurable=!0,"value"in X&&(X.writable=!0),Object.defineProperty(W,p(X.key),X)}}function p(W){var F=function(q,X){if(c(q)!=="object"||q===null)return q;var oe=q[Symbol.toPrimitive];if(oe!==void 0){var le=oe.call(q,"string");if(c(le)!=="object")return le;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(q)}(W);return c(F)==="symbol"?F:String(F)}function b(W,F){return b=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(q,X){return q.__proto__=X,q},b(W,F)}function y(W){return y=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(F){return F.__proto__||Object.getPrototypeOf(F)},y(W)}var g=function(W){W.forEach(function(F){F.isIntersecting&&F.target.onVisible()})},P={},m=function(W){(function(N,$){if(typeof $!="function"&&$!==null)throw new TypeError("Super expression must either be null or a function");N.prototype=Object.create($&&$.prototype,{constructor:{value:N,writable:!0,configurable:!0}}),Object.defineProperty(N,"prototype",{writable:!1}),$&&b(N,$)})(me,W);var F,q,X,oe,le=(X=me,oe=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}(),function(){var N,$=y(X);if(oe){var re=y(this).constructor;N=Reflect.construct($,arguments,re)}else N=$.apply(this,arguments);return function(ee,Q){if(Q&&(c(Q)==="object"||typeof Q=="function"))return Q;if(Q!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(he){if(he===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return he}(ee)}(this,N)});function me(N){var $;if(function(ee,Q){if(!(ee instanceof Q))throw new TypeError("Cannot call a class as a function")}(this,me),($=le.call(this,N)).supportsObserver=!N.scrollPosition&&N.useIntersectionObserver&&l(),$.supportsObserver){var re=N.threshold;$.observer=function(ee){return P[ee]=P[ee]||new IntersectionObserver(g,{rootMargin:ee+"px"}),P[ee]}(re)}return $}return F=me,q=[{key:"componentDidMount",value:function(){this.placeholder&&this.observer&&(this.placeholder.onVisible=this.props.onVisible,this.observer.observe(this.placeholder)),this.supportsObserver||this.updateVisibility()}},{key:"componentWillUnmount",value:function(){this.observer&&this.placeholder&&this.observer.unobserve(this.placeholder)}},{key:"componentDidUpdate",value:function(){this.supportsObserver||this.updateVisibility()}},{key:"getPlaceholderBoundingBox",value:function(){var N=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.props.scrollPosition,$=this.placeholder.getBoundingClientRect(),re=this.placeholder.style,ee=parseInt(re.getPropertyValue("margin-left"),10)||0,Q=parseInt(re.getPropertyValue("margin-top"),10)||0;return{bottom:N.y+$.bottom+Q,left:N.x+$.left+ee,right:N.x+$.right+ee,top:N.y+$.top+Q}}},{key:"isPlaceholderInViewport",value:function(){if(typeof window>"u"||!this.placeholder)return!1;var N=this.props,$=N.scrollPosition,re=N.threshold,ee=this.getPlaceholderBoundingBox($),Q=$.y+window.innerHeight,he=$.x,ye=$.x+window.innerWidth,J=$.y;return J-re<=ee.bottom&&Q+re>=ee.top&&he-re<=ee.right&&ye+re>=ee.left}},{key:"updateVisibility",value:function(){this.isPlaceholderInViewport()&&this.props.onVisible()}},{key:"render",value:function(){var N=this,$=this.props,re=$.className,ee=$.height,Q=$.placeholder,he=$.style,ye=$.width;if(Q&&typeof Q.type!="function")return a().cloneElement(Q,{ref:function(ne){return N.placeholder=ne}});var J=function(ne){for(var ce=1;ce<arguments.length;ce++){var se=arguments[ce]!=null?arguments[ce]:{};ce%2?u(Object(se),!0).forEach(function(fe){f(ne,fe,se[fe])}):Object.getOwnPropertyDescriptors?Object.defineProperties(ne,Object.getOwnPropertyDescriptors(se)):u(Object(se)).forEach(function(fe){Object.defineProperty(ne,fe,Object.getOwnPropertyDescriptor(se,fe))})}return ne}({display:"inline-block"},he);return ye!==void 0&&(J.width=ye),ee!==void 0&&(J.height=ee),a().createElement("span",{className:re,ref:function(ne){return N.placeholder=ne},style:J},Q)}}],q&&d(F.prototype,q),Object.defineProperty(F,"prototype",{writable:!1}),me}(a().Component);m.propTypes={onVisible:o.PropTypes.func.isRequired,className:o.PropTypes.string,height:o.PropTypes.oneOfType([o.PropTypes.number,o.PropTypes.string]),placeholder:o.PropTypes.element,threshold:o.PropTypes.number,useIntersectionObserver:o.PropTypes.bool,scrollPosition:o.PropTypes.shape({x:o.PropTypes.number.isRequired,y:o.PropTypes.number.isRequired}),width:o.PropTypes.oneOfType([o.PropTypes.number,o.PropTypes.string])},m.defaultProps={className:"",placeholder:null,threshold:100,useIntersectionObserver:!0};const x=m;var C=i(296),S=i.n(C),E=i(96),T=i.n(E),L=function(W){var F=getComputedStyle(W,null);return F.getPropertyValue("overflow")+F.getPropertyValue("overflow-y")+F.getPropertyValue("overflow-x")};const _=function(W){if(!(W instanceof HTMLElement))return window;for(var F=W;F&&F instanceof HTMLElement;){if(/(scroll|auto)/.test(L(F)))return F;F=F.parentNode}return window};function k(W){return k=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(F){return typeof F}:function(F){return F&&typeof Symbol=="function"&&F.constructor===Symbol&&F!==Symbol.prototype?"symbol":typeof F},k(W)}var Z=["delayMethod","delayTime"];function B(){return B=Object.assign?Object.assign.bind():function(W){for(var F=1;F<arguments.length;F++){var q=arguments[F];for(var X in q)Object.prototype.hasOwnProperty.call(q,X)&&(W[X]=q[X])}return W},B.apply(this,arguments)}function D(W,F){for(var q=0;q<F.length;q++){var X=F[q];X.enumerable=X.enumerable||!1,X.configurable=!0,"value"in X&&(X.writable=!0),Object.defineProperty(W,(oe=function(le,me){if(k(le)!=="object"||le===null)return le;var N=le[Symbol.toPrimitive];if(N!==void 0){var $=N.call(le,"string");if(k($)!=="object")return $;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(le)}(X.key),k(oe)==="symbol"?oe:String(oe)),X)}var oe}function H(W,F){return H=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(q,X){return q.__proto__=X,q},H(W,F)}function z(W,F){if(F&&(k(F)==="object"||typeof F=="function"))return F;if(F!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return O(W)}function O(W){if(W===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return W}function V(W){return V=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(F){return F.__proto__||Object.getPrototypeOf(F)},V(W)}var A=function(){return typeof window>"u"?0:window.scrollX||window.pageXOffset},R=function(){return typeof window>"u"?0:window.scrollY||window.pageYOffset};const M=function(W){var F=function(q){(function(re,ee){if(typeof ee!="function"&&ee!==null)throw new TypeError("Super expression must either be null or a function");re.prototype=Object.create(ee&&ee.prototype,{constructor:{value:re,writable:!0,configurable:!0}}),Object.defineProperty(re,"prototype",{writable:!1}),ee&&H(re,ee)})($,q);var X,oe,le,me,N=(le=$,me=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}(),function(){var re,ee=V(le);if(me){var Q=V(this).constructor;re=Reflect.construct(ee,arguments,Q)}else re=ee.apply(this,arguments);return z(this,re)});function $(re){var ee;if(function(he,ye){if(!(he instanceof ye))throw new TypeError("Cannot call a class as a function")}(this,$),(ee=N.call(this,re)).useIntersectionObserver=re.useIntersectionObserver&&l(),ee.useIntersectionObserver)return z(ee);var Q=ee.onChangeScroll.bind(O(ee));return re.delayMethod==="debounce"?ee.delayedScroll=S()(Q,re.delayTime):re.delayMethod==="throttle"&&(ee.delayedScroll=T()(Q,re.delayTime)),ee.state={scrollPosition:{x:A(),y:R()}},ee.baseComponentRef=a().createRef(),ee}return X=$,(oe=[{key:"componentDidMount",value:function(){this.addListeners()}},{key:"componentWillUnmount",value:function(){this.removeListeners()}},{key:"componentDidUpdate",value:function(){typeof window>"u"||this.useIntersectionObserver||_(this.baseComponentRef.current)!==this.scrollElement&&(this.removeListeners(),this.addListeners())}},{key:"addListeners",value:function(){typeof window>"u"||this.useIntersectionObserver||(this.scrollElement=_(this.baseComponentRef.current),this.scrollElement.addEventListener("scroll",this.delayedScroll,{passive:!0}),window.addEventListener("resize",this.delayedScroll,{passive:!0}),this.scrollElement!==window&&window.addEventListener("scroll",this.delayedScroll,{passive:!0}))}},{key:"removeListeners",value:function(){typeof window>"u"||this.useIntersectionObserver||(this.scrollElement.removeEventListener("scroll",this.delayedScroll),window.removeEventListener("resize",this.delayedScroll),this.scrollElement!==window&&window.removeEventListener("scroll",this.delayedScroll))}},{key:"onChangeScroll",value:function(){this.useIntersectionObserver||this.setState({scrollPosition:{x:A(),y:R()}})}},{key:"render",value:function(){var re=this.props,ee=(re.delayMethod,re.delayTime,function(he,ye){if(he==null)return{};var J,ne,ce=function(fe,we){if(fe==null)return{};var xe,je,Ve={},ke=Object.keys(fe);for(je=0;je<ke.length;je++)xe=ke[je],we.indexOf(xe)>=0||(Ve[xe]=fe[xe]);return Ve}(he,ye);if(Object.getOwnPropertySymbols){var se=Object.getOwnPropertySymbols(he);for(ne=0;ne<se.length;ne++)J=se[ne],ye.indexOf(J)>=0||Object.prototype.propertyIsEnumerable.call(he,J)&&(ce[J]=he[J])}return ce}(re,Z)),Q=this.useIntersectionObserver?null:this.state.scrollPosition;return a().createElement(W,B({forwardRef:this.baseComponentRef,scrollPosition:Q},ee))}}])&&D(X.prototype,oe),Object.defineProperty(X,"prototype",{writable:!1}),$}(a().Component);return F.propTypes={delayMethod:o.PropTypes.oneOf(["debounce","throttle"]),delayTime:o.PropTypes.number,useIntersectionObserver:o.PropTypes.bool},F.defaultProps={delayMethod:"throttle",delayTime:300,useIntersectionObserver:!0},F};function I(W){return I=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(F){return typeof F}:function(F){return F&&typeof Symbol=="function"&&F.constructor===Symbol&&F!==Symbol.prototype?"symbol":typeof F},I(W)}function j(W,F){for(var q=0;q<F.length;q++){var X=F[q];X.enumerable=X.enumerable||!1,X.configurable=!0,"value"in X&&(X.writable=!0),Object.defineProperty(W,(oe=function(le,me){if(I(le)!=="object"||le===null)return le;var N=le[Symbol.toPrimitive];if(N!==void 0){var $=N.call(le,"string");if(I($)!=="object")return $;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(le)}(X.key),I(oe)==="symbol"?oe:String(oe)),X)}var oe}function G(W,F){return G=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(q,X){return q.__proto__=X,q},G(W,F)}function U(W){return U=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(F){return F.__proto__||Object.getPrototypeOf(F)},U(W)}var Y=function(W){(function(N,$){if(typeof $!="function"&&$!==null)throw new TypeError("Super expression must either be null or a function");N.prototype=Object.create($&&$.prototype,{constructor:{value:N,writable:!0,configurable:!0}}),Object.defineProperty(N,"prototype",{writable:!1}),$&&G(N,$)})(me,W);var F,q,X,oe,le=(X=me,oe=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}(),function(){var N,$=U(X);if(oe){var re=U(this).constructor;N=Reflect.construct($,arguments,re)}else N=$.apply(this,arguments);return function(ee,Q){if(Q&&(I(Q)==="object"||typeof Q=="function"))return Q;if(Q!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(he){if(he===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return he}(ee)}(this,N)});function me(N){return function($,re){if(!($ instanceof re))throw new TypeError("Cannot call a class as a function")}(this,me),le.call(this,N)}return F=me,(q=[{key:"render",value:function(){return a().createElement(x,this.props)}}])&&j(F.prototype,q),Object.defineProperty(F,"prototype",{writable:!1}),me}(a().Component);const te=M(Y);function ie(W){return ie=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(F){return typeof F}:function(F){return F&&typeof Symbol=="function"&&F.constructor===Symbol&&F!==Symbol.prototype?"symbol":typeof F},ie(W)}function pe(W,F){for(var q=0;q<F.length;q++){var X=F[q];X.enumerable=X.enumerable||!1,X.configurable=!0,"value"in X&&(X.writable=!0),Object.defineProperty(W,(oe=function(le,me){if(ie(le)!=="object"||le===null)return le;var N=le[Symbol.toPrimitive];if(N!==void 0){var $=N.call(le,"string");if(ie($)!=="object")return $;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(le)}(X.key),ie(oe)==="symbol"?oe:String(oe)),X)}var oe}function de(W,F){return de=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(q,X){return q.__proto__=X,q},de(W,F)}function ve(W){if(W===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return W}function Ce(W){return Ce=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(F){return F.__proto__||Object.getPrototypeOf(F)},Ce(W)}var ue=function(W){(function(N,$){if(typeof $!="function"&&$!==null)throw new TypeError("Super expression must either be null or a function");N.prototype=Object.create($&&$.prototype,{constructor:{value:N,writable:!0,configurable:!0}}),Object.defineProperty(N,"prototype",{writable:!1}),$&&de(N,$)})(me,W);var F,q,X,oe,le=(X=me,oe=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}(),function(){var N,$=Ce(X);if(oe){var re=Ce(this).constructor;N=Reflect.construct($,arguments,re)}else N=$.apply(this,arguments);return function(ee,Q){if(Q&&(ie(Q)==="object"||typeof Q=="function"))return Q;if(Q!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return ve(ee)}(this,N)});function me(N){var $;(function(ye,J){if(!(ye instanceof J))throw new TypeError("Cannot call a class as a function")})(this,me),$=le.call(this,N);var re=N.afterLoad,ee=N.beforeLoad,Q=N.scrollPosition,he=N.visibleByDefault;return $.state={visible:he},he&&(ee(),re()),$.onVisible=$.onVisible.bind(ve($)),$.isScrollTracked=!!(Q&&Number.isFinite(Q.x)&&Q.x>=0&&Number.isFinite(Q.y)&&Q.y>=0),$}return F=me,(q=[{key:"componentDidUpdate",value:function(N,$){$.visible!==this.state.visible&&this.props.afterLoad()}},{key:"onVisible",value:function(){this.props.beforeLoad(),this.setState({visible:!0})}},{key:"render",value:function(){if(this.state.visible)return this.props.children;var N=this.props,$=N.className,re=N.delayMethod,ee=N.delayTime,Q=N.height,he=N.placeholder,ye=N.scrollPosition,J=N.style,ne=N.threshold,ce=N.useIntersectionObserver,se=N.width;return this.isScrollTracked||ce&&l()?a().createElement(x,{className:$,height:Q,onVisible:this.onVisible,placeholder:he,scrollPosition:ye,style:J,threshold:ne,useIntersectionObserver:ce,width:se}):a().createElement(te,{className:$,delayMethod:re,delayTime:ee,height:Q,onVisible:this.onVisible,placeholder:he,style:J,threshold:ne,width:se})}}])&&pe(F.prototype,q),Object.defineProperty(F,"prototype",{writable:!1}),me}(a().Component);ue.propTypes={afterLoad:o.PropTypes.func,beforeLoad:o.PropTypes.func,useIntersectionObserver:o.PropTypes.bool,visibleByDefault:o.PropTypes.bool},ue.defaultProps={afterLoad:function(){return{}},beforeLoad:function(){return{}},useIntersectionObserver:!0,visibleByDefault:!1};const ge=ue;function ae(W){return ae=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(F){return typeof F}:function(F){return F&&typeof Symbol=="function"&&F.constructor===Symbol&&F!==Symbol.prototype?"symbol":typeof F},ae(W)}var K=["afterLoad","beforeLoad","delayMethod","delayTime","effect","placeholder","placeholderSrc","scrollPosition","threshold","useIntersectionObserver","visibleByDefault","wrapperClassName","wrapperProps"];function Ee(W,F){var q=Object.keys(W);if(Object.getOwnPropertySymbols){var X=Object.getOwnPropertySymbols(W);F&&(X=X.filter(function(oe){return Object.getOwnPropertyDescriptor(W,oe).enumerable})),q.push.apply(q,X)}return q}function _e(W){for(var F=1;F<arguments.length;F++){var q=arguments[F]!=null?arguments[F]:{};F%2?Ee(Object(q),!0).forEach(function(X){Me(W,X,q[X])}):Object.getOwnPropertyDescriptors?Object.defineProperties(W,Object.getOwnPropertyDescriptors(q)):Ee(Object(q)).forEach(function(X){Object.defineProperty(W,X,Object.getOwnPropertyDescriptor(q,X))})}return W}function Me(W,F,q){return(F=Se(F))in W?Object.defineProperty(W,F,{value:q,enumerable:!0,configurable:!0,writable:!0}):W[F]=q,W}function Pe(){return Pe=Object.assign?Object.assign.bind():function(W){for(var F=1;F<arguments.length;F++){var q=arguments[F];for(var X in q)Object.prototype.hasOwnProperty.call(q,X)&&(W[X]=q[X])}return W},Pe.apply(this,arguments)}function Ae(W,F){for(var q=0;q<F.length;q++){var X=F[q];X.enumerable=X.enumerable||!1,X.configurable=!0,"value"in X&&(X.writable=!0),Object.defineProperty(W,Se(X.key),X)}}function Se(W){var F=function(q,X){if(ae(q)!=="object"||q===null)return q;var oe=q[Symbol.toPrimitive];if(oe!==void 0){var le=oe.call(q,"string");if(ae(le)!=="object")return le;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(q)}(W);return ae(F)==="symbol"?F:String(F)}function be(W,F){return be=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(q,X){return q.__proto__=X,q},be(W,F)}function Te(W){return Te=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(F){return F.__proto__||Object.getPrototypeOf(F)},Te(W)}var Re=function(W){(function(N,$){if(typeof $!="function"&&$!==null)throw new TypeError("Super expression must either be null or a function");N.prototype=Object.create($&&$.prototype,{constructor:{value:N,writable:!0,configurable:!0}}),Object.defineProperty(N,"prototype",{writable:!1}),$&&be(N,$)})(me,W);var F,q,X,oe,le=(X=me,oe=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}(),function(){var N,$=Te(X);if(oe){var re=Te(this).constructor;N=Reflect.construct($,arguments,re)}else N=$.apply(this,arguments);return function(ee,Q){if(Q&&(ae(Q)==="object"||typeof Q=="function"))return Q;if(Q!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(he){if(he===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return he}(ee)}(this,N)});function me(N){var $;return function(re,ee){if(!(re instanceof ee))throw new TypeError("Cannot call a class as a function")}(this,me),($=le.call(this,N)).state={loaded:!1},$}return F=me,(q=[{key:"onImageLoad",value:function(){var N=this;return this.state.loaded?null:function($){N.props.onLoad($),N.props.afterLoad(),N.setState({loaded:!0})}}},{key:"getImg",value:function(){var N=this.props,$=(N.afterLoad,N.beforeLoad,N.delayMethod,N.delayTime,N.effect,N.placeholder,N.placeholderSrc,N.scrollPosition,N.threshold,N.useIntersectionObserver,N.visibleByDefault,N.wrapperClassName,N.wrapperProps,function(re,ee){if(re==null)return{};var Q,he,ye=function(ne,ce){if(ne==null)return{};var se,fe,we={},xe=Object.keys(ne);for(fe=0;fe<xe.length;fe++)se=xe[fe],ce.indexOf(se)>=0||(we[se]=ne[se]);return we}(re,ee);if(Object.getOwnPropertySymbols){var J=Object.getOwnPropertySymbols(re);for(he=0;he<J.length;he++)Q=J[he],ee.indexOf(Q)>=0||Object.prototype.propertyIsEnumerable.call(re,Q)&&(ye[Q]=re[Q])}return ye}(N,K));return a().createElement("img",Pe({},$,{onLoad:this.onImageLoad()}))}},{key:"getLazyLoadImage",value:function(){var N=this.props,$=N.beforeLoad,re=N.className,ee=N.delayMethod,Q=N.delayTime,he=N.height,ye=N.placeholder,J=N.scrollPosition,ne=N.style,ce=N.threshold,se=N.useIntersectionObserver,fe=N.visibleByDefault,we=N.width;return a().createElement(ge,{beforeLoad:$,className:re,delayMethod:ee,delayTime:Q,height:he,placeholder:ye,scrollPosition:J,style:ne,threshold:ce,useIntersectionObserver:se,visibleByDefault:fe,width:we},this.getImg())}},{key:"getWrappedLazyLoadImage",value:function(N){var $=this.props,re=$.effect,ee=$.height,Q=$.placeholderSrc,he=$.width,ye=$.wrapperClassName,J=$.wrapperProps,ne=this.state.loaded,ce=ne?" lazy-load-image-loaded":"",se=ne||!Q?{}:{backgroundImage:"url(".concat(Q,")"),backgroundSize:"100% 100%"};return a().createElement("span",Pe({className:ye+" lazy-load-image-background "+re+ce,style:_e(_e({},se),{},{color:"transparent",display:"inline-block",height:ee,width:he})},J),N)}},{key:"render",value:function(){var N=this.props,$=N.effect,re=N.placeholderSrc,ee=N.visibleByDefault,Q=N.wrapperClassName,he=N.wrapperProps,ye=this.getLazyLoadImage();return($||re)&&!ee||Q||he?this.getWrappedLazyLoadImage(ye):ye}}])&&Ae(F.prototype,q),Object.defineProperty(F,"prototype",{writable:!1}),me}(a().Component);Re.propTypes={onLoad:o.PropTypes.func,afterLoad:o.PropTypes.func,beforeLoad:o.PropTypes.func,delayMethod:o.PropTypes.string,delayTime:o.PropTypes.number,effect:o.PropTypes.string,placeholderSrc:o.PropTypes.string,threshold:o.PropTypes.number,useIntersectionObserver:o.PropTypes.bool,visibleByDefault:o.PropTypes.bool,wrapperClassName:o.PropTypes.string,wrapperProps:o.PropTypes.object},Re.defaultProps={onLoad:function(){},afterLoad:function(){return{}},beforeLoad:function(){return{}},delayMethod:"throttle",delayTime:300,effect:"",placeholderSrc:null,threshold:100,useIntersectionObserver:!0,visibleByDefault:!1,wrapperClassName:""};const Le=Re})(),build.exports=n})();var buildExports=build.exports;const placeholderUrl="data:image/svg+xml,%3csvg%20width='384'%20height='216'%20viewBox='0%200%20384%20216'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20clip-path='url(%23clip0_11648_9381)'%3e%3crect%20width='384'%20height='216'%20fill='%2359BB99'/%3e%3ccircle%20cx='-7'%20cy='184'%20r='87'%20fill='url(%23paint0_radial_11648_9381)'/%3e%3ccircle%20cx='368'%20cy='33'%20r='87'%20fill='url(%23paint1_radial_11648_9381)'/%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M136%2078C141.959%2078%20146.986%2081.9942%20148.548%2087.4516C154.006%2089.014%20158%2094.0405%20158%2099.9999C158%20105.959%20154.006%20110.986%20148.548%20112.548C146.986%20118.006%20141.959%20122%20136%20122C130.04%20122%20125.014%20118.006%20123.452%20112.548C117.994%20110.986%20114%20105.959%20114%2099.9999C114%2094.0406%20117.994%2089.0142%20123.452%2087.4517C125.014%2081.9943%20130.04%2078%20136%2078Z'%20fill='%23F7CFDB'/%3e%3cpath%20d='M139.954%2095.3616C139.923%2097.884%20135.962%2097.5421%20134.7%2097.5267L134.755%2093.063C136.016%2093.0784%20139.985%2092.7277%20139.954%2095.3616ZM140.906%20102.316C140.874%20105.09%20136.128%20104.716%20134.611%20104.698L134.688%2099.7811C136.2%2099.8017%20140.958%2099.4226%20140.922%20102.32L140.906%20102.316ZM144.148%2094.4178C143.928%2091.7661%20141.653%2090.8548%20138.771%2090.5621L138.816%2086.8898L136.578%2086.8608L136.533%2090.4382C135.948%2090.4302%20135.347%2090.4347%20134.75%2090.4401L134.775%2086.845L132.543%2086.8093L132.499%2090.4777C132.013%2090.4841%20131.538%2090.4848%20131.075%2090.4809L127.993%2090.4406L127.964%2092.8313C127.964%2092.8313%20129.621%2092.8205%20129.584%2092.8518C130.21%2092.7802%20130.777%2093.2229%20130.86%2093.8471L130.822%2098.0175C130.901%2098.0184%20130.979%2098.0242%20131.057%2098.035L130.822%2098.034L130.737%20103.891C130.7%20104.329%20130.317%20104.655%20129.88%20104.621C129.914%20104.63%20128.256%20104.6%20128.256%20104.6L127.778%20107.263L130.688%20107.298L132.289%20107.314L132.246%20111.024L134.48%20111.052L134.512%20107.397C135.106%20107.419%20135.702%20107.43%20136.296%20107.436L136.25%20111.096L138.484%20111.124L138.535%20107.416C142.302%20107.247%20144.938%20106.332%20145.307%20102.809C145.601%2099.9679%20144.29%2098.6862%20142.168%2098.1466C143.474%2097.504%20144.303%2096.3533%20144.132%2094.4136L144.148%2094.4178Z'%20fill='%23DB6A93'/%3e%3cpath%20d='M170%2098.8577C170%2094.4242%20172.859%2090.9544%20177.421%2090.9544C179.959%2090.9544%20181.919%2092.111%20182.915%2094.0708L183.14%2091.4042H185.839V106.472C185.839%20111.42%20182.787%20114.568%20177.968%20114.568C173.695%20114.568%20170.771%20112.158%20170.193%20108.175H173.213C173.598%20110.488%20175.333%20111.837%20177.968%20111.837C180.923%20111.837%20182.851%20109.91%20182.851%20106.922V103.773C181.823%20105.604%20179.767%20106.697%20177.293%20106.697C172.827%20106.697%20170%20103.259%20170%2098.8577ZM173.02%2098.7935C173.02%20101.749%20174.851%20104.062%20177.807%20104.062C180.859%20104.062%20182.722%20101.878%20182.722%2098.7935C182.722%2095.7735%20180.923%2093.5889%20177.839%2093.5889C174.819%2093.5889%20173.02%2095.902%20173.02%2098.7935Z'%20fill='white'/%3e%3cpath%20d='M194.791%20107.5C191.418%20107.5%20189.426%20105.604%20189.426%20102.745C189.426%2099.8537%20191.579%2098.0545%20195.273%2097.7654L200.221%2097.3799V96.9301C200.221%2094.2957%20198.647%2093.364%20196.526%2093.364C193.988%2093.364%20192.542%2094.4884%20192.542%2096.3839H189.908C189.908%2093.1069%20192.607%2090.9544%20196.655%2090.9544C200.542%2090.9544%20203.176%2093.0106%20203.176%2097.2514V107.114H200.606L200.285%20104.576C199.482%20106.376%20197.329%20107.5%20194.791%20107.5ZM195.659%20105.155C198.518%20105.155%20200.253%20103.291%20200.253%20100.336V99.5003L196.237%2099.8216C193.57%20100.079%20192.478%20101.107%20192.478%20102.649C192.478%20104.319%20193.699%20105.155%20195.659%20105.155Z'%20fill='white'/%3e%3cpath%20d='M216.354%2091.2757V94.0386H215.005C212.146%2094.0386%20210.379%2095.7735%20210.379%2098.7935V107.114H207.359V91.4363H210.186L210.379%2093.8137C211.021%2092.1753%20212.596%2091.0829%20214.748%2091.0829C215.294%2091.0829%20215.744%2091.1472%20216.354%2091.2757Z'%20fill='white'/%3e%3cpath%20d='M224.919%20107.5C220.357%20107.5%20217.594%20104.094%20217.594%2099.3075C217.594%2094.4884%20220.389%2090.9544%20225.048%2090.9544C227.457%2090.9544%20229.481%2092.0146%20230.541%2093.9423V83.4688H233.529V107.114H230.831L230.574%20104.255C229.545%20106.408%20227.425%20107.5%20224.919%20107.5ZM225.53%20104.769C228.614%20104.769%20230.509%20102.488%20230.509%2099.2111C230.509%2095.9984%20228.614%2093.6852%20225.53%2093.6852C222.445%2093.6852%20220.646%2095.9984%20220.646%2099.2111C220.646%20102.456%20222.445%20104.769%20225.53%20104.769Z'%20fill='white'/%3e%3cpath%20d='M244.665%20107.5C240.039%20107.5%20236.858%20104.159%20236.858%2099.2754C236.858%2094.3599%20239.974%2090.9544%20244.536%2090.9544C249.002%2090.9544%20251.926%2094.0386%20251.926%2098.6971V99.8216L239.782%2099.8537C240.006%20103.163%20241.741%20104.994%20244.729%20104.994C247.074%20104.994%20248.617%20104.03%20249.131%20102.231H251.958C251.187%20105.604%20248.552%20107.5%20244.665%20107.5ZM244.536%2093.4925C241.902%2093.4925%20240.231%2095.0667%20239.846%2097.8297H248.906C248.906%2095.2273%20247.203%2093.4925%20244.536%2093.4925Z'%20fill='white'/%3e%3cpath%20d='M258.319%20107.114H255.299V91.4042H258.03L258.351%2093.8137C259.347%2092.0146%20261.339%2090.9544%20263.555%2090.9544C267.7%2090.9544%20269.595%2093.4925%20269.595%2097.5084V107.114H266.575V98.1831C266.575%2095.0025%20265.098%2093.7174%20262.784%2093.7174C259.957%2093.7174%20258.319%2095.7414%20258.319%2098.7935V107.114Z'%20fill='white'/%3e%3c/g%3e%3cdefs%3e%3cradialGradient%20id='paint0_radial_11648_9381'%20cx='0'%20cy='0'%20r='1'%20gradientUnits='userSpaceOnUse'%20gradientTransform='translate(-7%20184)%20rotate(90)%20scale(87)'%3e%3cstop%20offset='0.380208'%20stop-color='%239BC8FF'/%3e%3cstop%20offset='1'%20stop-color='%239BC8FF'%20stop-opacity='0.2'/%3e%3c/radialGradient%3e%3cradialGradient%20id='paint1_radial_11648_9381'%20cx='0'%20cy='0'%20r='1'%20gradientUnits='userSpaceOnUse'%20gradientTransform='translate(368%2033)%20rotate(90)%20scale(87)'%3e%3cstop%20offset='0.380208'%20stop-color='%239BC8FF'/%3e%3cstop%20offset='1'%20stop-color='%239BC8FF'%20stop-opacity='0.2'/%3e%3c/radialGradient%3e%3cclipPath%20id='clip0_11648_9381'%3e%3crect%20width='384'%20height='216'%20fill='white'/%3e%3c/clipPath%3e%3c/defs%3e%3c/svg%3e",BlogCard=({thumbnail:e,category:t,date:i,title:n,className:s,thumbnailClassName:a})=>{const[o,l]=React.useState(!1),[c,u]=React.useState(e??placeholderUrl);React.useEffect(()=>{u(e??placeholderUrl)},[e]);const f=()=>{u(placeholderUrl)};return jsxRuntime.jsx(Opacity,{level:"semi-dark",className:"gf-rounded-2xl h-full",children:jsxRuntime.jsxs("div",{className:cn(s,"gf-overflow-hidden gf-rounded-2xl"),children:[jsxRuntime.jsx("div",{className:cn(a,`${o?"":"gf-filter gf-blur-md"}`),children:jsxRuntime.jsx(buildExports.LazyLoadImage,{alt:n,effect:"blur",src:c,onLoad:()=>l(!0),onError:f})}),jsxRuntime.jsxs("div",{className:"gf-px-4 gf-pt-4 gf-pb-5 gf-md:px-5 gf-md:pb-11",children:[jsxRuntime.jsxs("div",{className:"gf-flex gf-justify-between gf-mb-3",children:[jsxRuntime.jsx(Typography,{size:"h5",weight:"medium",className:"gf-bg-rose gf-px-3 gf-py-1 gf-rounded-full",children:t}),jsxRuntime.jsx(Typography,{size:"h5",weight:"medium",className:"gf-px-3 gf-py-1",children:i})]}),jsxRuntime.jsx(Typography,{size:"h3",weight:"bold",children:n})]})]})})},questCardStyles=cva(["gf-w-full gf-max-w-96 gf-p-4 gf-pb-5 md:gf-p-6 md:gf-pb-8 gf-rounded-2xl"],{variants:{variant:{locked:"gf-bg-white gf-bg-opacity-25",default:"gf-bg-white gf-bg-opacity-50"}},defaultVariants:{variant:"locked"}}),QuestCard=({variant:e,title:t,description:i,chipContent:n,logo:s})=>jsxRuntime.jsxs("div",{className:cn(questCardStyles({variant:e})),children:[jsxRuntime.jsxs("div",{className:"gf-flex gf-justify-between gf-items-center gf-mb-4",children:[jsxRuntime.jsxs(Chip,{className:"gf-cursor-pointer gf-px-2 gf-py-1",children:[jsxRuntime.jsx(Chip.Logo,{children:s}),t,jsxRuntime.jsx(Chip.CheckBox,{checked:!1})]}),e==="default"?jsxRuntime.jsx(OpenInFullIcon,{className:"gf-cursor-pointer",height:"20px",width:"20px"}):jsxRuntime.jsx(LockIcon,{className:"gf-cursor-pointer",height:"20px",width:"20px"})]}),jsxRuntime.jsx("div",{className:"gf-mb-3 md:gf-mb-8",children:jsxRuntime.jsx(Typography,{size:"h3",weight:"medium",children:i})}),jsxRuntime.jsxs("div",{className:"gf-flex gf-justify-end gf-space-x-2",children:[jsxRuntime.jsxs(Chip,{className:"gf-pl-3 gf-pr-2 gf-py-1",children:[jsxRuntime.jsx(Typography,{size:"h4",weight:"medium",children:"Quest Access"}),jsxRuntime.jsx(Chip.CheckBox,{checked:!1})]}),jsxRuntime.jsxs(Chip,{className:"gf-pl-3 gf-pr-2 gf-py-1",children:[jsxRuntime.jsx(Typography,{size:"h4",weight:"medium",children:n}),jsxRuntime.jsx(Chip.CheckBox,{checked:!1})]})]})]});var lottie$1={exports:{}};(function(module,exports$1){typeof document<"u"&&typeof navigator<"u"&&function(e,t){module.exports=t()}(commonjsGlobal,function(){var svgNS="http://www.w3.org/2000/svg",locationHref="",_useWebWorker=!1,initialDefaultFrame=-999999,setWebWorker=function(t){_useWebWorker=!!t},getWebWorker=function(){return _useWebWorker},setLocationHref=function(t){locationHref=t},getLocationHref=function(){return locationHref};function createTag(e){return document.createElement(e)}function extendPrototype(e,t){var i,n=e.length,s;for(i=0;i<n;i+=1){s=e[i].prototype;for(var a in s)Object.prototype.hasOwnProperty.call(s,a)&&(t.prototype[a]=s[a])}}function getDescriptor(e,t){return Object.getOwnPropertyDescriptor(e,t)}function createProxyFunction(e){function t(){}return t.prototype=e,t}var audioControllerFactory=function(){function e(t){this.audios=[],this.audioFactory=t,this._volume=1,this._isMuted=!1}return e.prototype={addAudio:function(i){this.audios.push(i)},pause:function(){var i,n=this.audios.length;for(i=0;i<n;i+=1)this.audios[i].pause()},resume:function(){var i,n=this.audios.length;for(i=0;i<n;i+=1)this.audios[i].resume()},setRate:function(i){var n,s=this.audios.length;for(n=0;n<s;n+=1)this.audios[n].setRate(i)},createAudio:function(i){return this.audioFactory?this.audioFactory(i):window.Howl?new window.Howl({src:[i]}):{isPlaying:!1,play:function(){this.isPlaying=!0},seek:function(){this.isPlaying=!1},playing:function(){},rate:function(){},setVolume:function(){}}},setAudioFactory:function(i){this.audioFactory=i},setVolume:function(i){this._volume=i,this._updateVolume()},mute:function(){this._isMuted=!0,this._updateVolume()},unmute:function(){this._isMuted=!1,this._updateVolume()},getVolume:function(){return this._volume},_updateVolume:function(){var i,n=this.audios.length;for(i=0;i<n;i+=1)this.audios[i].volume(this._volume*(this._isMuted?0:1))}},function(){return new e}}(),createTypedArray=function(){function e(i,n){var s=0,a=[],o;switch(i){case"int16":case"uint8c":o=1;break;default:o=1.1;break}for(s=0;s<n;s+=1)a.push(o);return a}function t(i,n){return i==="float32"?new Float32Array(n):i==="int16"?new Int16Array(n):i==="uint8c"?new Uint8ClampedArray(n):e(i,n)}return typeof Uint8ClampedArray=="function"&&typeof Float32Array=="function"?t:e}();function createSizedArray(e){return Array.apply(null,{length:e})}function _typeof$6(e){"@babel/helpers - typeof";return _typeof$6=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},_typeof$6(e)}var subframeEnabled=!0,expressionsPlugin=null,expressionsInterfaces=null,idPrefix$1="",isSafari=/^((?!chrome|android).)*safari/i.test(navigator.userAgent),bmPow=Math.pow,bmSqrt=Math.sqrt,bmFloor=Math.floor,bmMax=Math.max,bmMin=Math.min,BMMath={};(function(){var e=["abs","acos","acosh","asin","asinh","atan","atanh","atan2","ceil","cbrt","expm1","clz32","cos","cosh","exp","floor","fround","hypot","imul","log","log1p","log2","log10","max","min","pow","random","round","sign","sin","sinh","sqrt","tan","tanh","trunc","E","LN10","LN2","LOG10E","LOG2E","PI","SQRT1_2","SQRT2"],t,i=e.length;for(t=0;t<i;t+=1)BMMath[e[t]]=Math[e[t]]})(),BMMath.random=Math.random,BMMath.abs=function(e){var t=_typeof$6(e);if(t==="object"&&e.length){var i=createSizedArray(e.length),n,s=e.length;for(n=0;n<s;n+=1)i[n]=Math.abs(e[n]);return i}return Math.abs(e)};var defaultCurveSegments=150,degToRads=Math.PI/180,roundCorner=.5519;function styleDiv(e){e.style.position="absolute",e.style.top=0,e.style.left=0,e.style.display="block",e.style.transformOrigin="0 0",e.style.webkitTransformOrigin="0 0",e.style.backfaceVisibility="visible",e.style.webkitBackfaceVisibility="visible",e.style.transformStyle="preserve-3d",e.style.webkitTransformStyle="preserve-3d",e.style.mozTransformStyle="preserve-3d"}function BMEnterFrameEvent(e,t,i,n){this.type=e,this.currentTime=t,this.totalTime=i,this.direction=n<0?-1:1}function BMCompleteEvent(e,t){this.type=e,this.direction=t<0?-1:1}function BMCompleteLoopEvent(e,t,i,n){this.type=e,this.currentLoop=i,this.totalLoops=t,this.direction=n<0?-1:1}function BMSegmentStartEvent(e,t,i){this.type=e,this.firstFrame=t,this.totalFrames=i}function BMDestroyEvent(e,t){this.type=e,this.target=t}function BMRenderFrameErrorEvent(e,t){this.type="renderFrameError",this.nativeError=e,this.currentTime=t}function BMConfigErrorEvent(e){this.type="configError",this.nativeError=e}var createElementID=function(){var e=0;return function(){return e+=1,idPrefix$1+"__lottie_element_"+e}}();function HSVtoRGB(e,t,i){var n,s,a,o,l,c,u,f;switch(o=Math.floor(e*6),l=e*6-o,c=i*(1-t),u=i*(1-l*t),f=i*(1-(1-l)*t),o%6){case 0:n=i,s=f,a=c;break;case 1:n=u,s=i,a=c;break;case 2:n=c,s=i,a=f;break;case 3:n=c,s=u,a=i;break;case 4:n=f,s=c,a=i;break;case 5:n=i,s=c,a=u;break}return[n,s,a]}function RGBtoHSV(e,t,i){var n=Math.max(e,t,i),s=Math.min(e,t,i),a=n-s,o,l=n===0?0:a/n,c=n/255;switch(n){case s:o=0;break;case e:o=t-i+a*(t<i?6:0),o/=6*a;break;case t:o=i-e+a*2,o/=6*a;break;case i:o=e-t+a*4,o/=6*a;break}return[o,l,c]}function addSaturationToRGB(e,t){var i=RGBtoHSV(e[0]*255,e[1]*255,e[2]*255);return i[1]+=t,i[1]>1?i[1]=1:i[1]<=0&&(i[1]=0),HSVtoRGB(i[0],i[1],i[2])}function addBrightnessToRGB(e,t){var i=RGBtoHSV(e[0]*255,e[1]*255,e[2]*255);return i[2]+=t,i[2]>1?i[2]=1:i[2]<0&&(i[2]=0),HSVtoRGB(i[0],i[1],i[2])}function addHueToRGB(e,t){var i=RGBtoHSV(e[0]*255,e[1]*255,e[2]*255);return i[0]+=t/360,i[0]>1?i[0]-=1:i[0]<0&&(i[0]+=1),HSVtoRGB(i[0],i[1],i[2])}var rgbToHex=function(){var e=[],t,i;for(t=0;t<256;t+=1)i=t.toString(16),e[t]=i.length===1?"0"+i:i;return function(n,s,a){return n<0&&(n=0),s<0&&(s=0),a<0&&(a=0),"#"+e[n]+e[s]+e[a]}}(),setSubframeEnabled=function(t){subframeEnabled=!!t},getSubframeEnabled=function(){return subframeEnabled},setExpressionsPlugin=function(t){expressionsPlugin=t},getExpressionsPlugin=function(){return expressionsPlugin},setExpressionInterfaces=function(t){expressionsInterfaces=t},getExpressionInterfaces=function(){return expressionsInterfaces},setDefaultCurveSegments=function(t){defaultCurveSegments=t},getDefaultCurveSegments=function(){return defaultCurveSegments},setIdPrefix=function(t){idPrefix$1=t};function createNS(e){return document.createElementNS(svgNS,e)}function _typeof$5(e){"@babel/helpers - typeof";return _typeof$5=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},_typeof$5(e)}var dataManager=function(){var e=1,t=[],i,n,s={onmessage:function(){},postMessage:function(b){i({data:b})}},a={postMessage:function(b){s.onmessage({data:b})}};function o(p){if(window.Worker&&window.Blob&&getWebWorker()){var b=new Blob(["var _workerSelf = self; self.onmessage = ",p.toString()],{type:"text/javascript"}),y=URL.createObjectURL(b);return new Worker(y)}return i=p,s}function l(){n||(n=o(function(b){function y(){function P(O,V){var A,R,M=O.length,I,j,G,U;for(R=0;R<M;R+=1)if(A=O[R],"ks"in A&&!A.completed){if(A.completed=!0,A.hasMask){var Y=A.masksProperties;for(j=Y.length,I=0;I<j;I+=1)if(Y[I].pt.k.i)E(Y[I].pt.k);else for(U=Y[I].pt.k.length,G=0;G<U;G+=1)Y[I].pt.k[G].s&&E(Y[I].pt.k[G].s[0]),Y[I].pt.k[G].e&&E(Y[I].pt.k[G].e[0])}A.ty===0?(A.layers=C(A.refId,V),P(A.layers,V)):A.ty===4?S(A.shapes):A.ty===5&&H(A)}}function m(O,V){if(O){var A=0,R=O.length;for(A=0;A<R;A+=1)O[A].t===1&&(O[A].data.layers=C(O[A].data.refId,V),P(O[A].data.layers,V))}}function x(O,V){for(var A=0,R=V.length;A<R;){if(V[A].id===O)return V[A];A+=1}return null}function C(O,V){var A=x(O,V);return A?A.layers.__used?JSON.parse(JSON.stringify(A.layers)):(A.layers.__used=!0,A.layers):null}function S(O){var V,A=O.length,R,M;for(V=A-1;V>=0;V-=1)if(O[V].ty==="sh")if(O[V].ks.k.i)E(O[V].ks.k);else for(M=O[V].ks.k.length,R=0;R<M;R+=1)O[V].ks.k[R].s&&E(O[V].ks.k[R].s[0]),O[V].ks.k[R].e&&E(O[V].ks.k[R].e[0]);else O[V].ty==="gr"&&S(O[V].it)}function E(O){var V,A=O.i.length;for(V=0;V<A;V+=1)O.i[V][0]+=O.v[V][0],O.i[V][1]+=O.v[V][1],O.o[V][0]+=O.v[V][0],O.o[V][1]+=O.v[V][1]}function T(O,V){var A=V?V.split("."):[100,100,100];return O[0]>A[0]?!0:A[0]>O[0]?!1:O[1]>A[1]?!0:A[1]>O[1]?!1:O[2]>A[2]?!0:A[2]>O[2]?!1:null}var L=function(){var O=[4,4,14];function V(R){var M=R.t.d;R.t.d={k:[{s:M,t:0}]}}function A(R){var M,I=R.length;for(M=0;M<I;M+=1)R[M].ty===5&&V(R[M])}return function(R){if(T(O,R.v)&&(A(R.layers),R.assets)){var M,I=R.assets.length;for(M=0;M<I;M+=1)R.assets[M].layers&&A(R.assets[M].layers)}}}(),_=function(){var O=[4,7,99];return function(V){if(V.chars&&!T(O,V.v)){var A,R=V.chars.length;for(A=0;A<R;A+=1){var M=V.chars[A];M.data&&M.data.shapes&&(S(M.data.shapes),M.data.ip=0,M.data.op=99999,M.data.st=0,M.data.sr=1,M.data.ks={p:{k:[0,0],a:0},s:{k:[100,100],a:0},a:{k:[0,0],a:0},r:{k:0,a:0},o:{k:100,a:0}},V.chars[A].t||(M.data.shapes.push({ty:"no"}),M.data.shapes[0].it.push({p:{k:[0,0],a:0},s:{k:[100,100],a:0},a:{k:[0,0],a:0},r:{k:0,a:0},o:{k:100,a:0},sk:{k:0,a:0},sa:{k:0,a:0},ty:"tr"})))}}}}(),k=function(){var O=[5,7,15];function V(R){var M=R.t.p;typeof M.a=="number"&&(M.a={a:0,k:M.a}),typeof M.p=="number"&&(M.p={a:0,k:M.p}),typeof M.r=="number"&&(M.r={a:0,k:M.r})}function A(R){var M,I=R.length;for(M=0;M<I;M+=1)R[M].ty===5&&V(R[M])}return function(R){if(T(O,R.v)&&(A(R.layers),R.assets)){var M,I=R.assets.length;for(M=0;M<I;M+=1)R.assets[M].layers&&A(R.assets[M].layers)}}}(),Z=function(){var O=[4,1,9];function V(R){var M,I=R.length,j,G;for(M=0;M<I;M+=1)if(R[M].ty==="gr")V(R[M].it);else if(R[M].ty==="fl"||R[M].ty==="st")if(R[M].c.k&&R[M].c.k[0].i)for(G=R[M].c.k.length,j=0;j<G;j+=1)R[M].c.k[j].s&&(R[M].c.k[j].s[0]/=255,R[M].c.k[j].s[1]/=255,R[M].c.k[j].s[2]/=255,R[M].c.k[j].s[3]/=255),R[M].c.k[j].e&&(R[M].c.k[j].e[0]/=255,R[M].c.k[j].e[1]/=255,R[M].c.k[j].e[2]/=255,R[M].c.k[j].e[3]/=255);else R[M].c.k[0]/=255,R[M].c.k[1]/=255,R[M].c.k[2]/=255,R[M].c.k[3]/=255}function A(R){var M,I=R.length;for(M=0;M<I;M+=1)R[M].ty===4&&V(R[M].shapes)}return function(R){if(T(O,R.v)&&(A(R.layers),R.assets)){var M,I=R.assets.length;for(M=0;M<I;M+=1)R.assets[M].layers&&A(R.assets[M].layers)}}}(),B=function(){var O=[4,4,18];function V(R){var M,I=R.length,j,G;for(M=I-1;M>=0;M-=1)if(R[M].ty==="sh")if(R[M].ks.k.i)R[M].ks.k.c=R[M].closed;else for(G=R[M].ks.k.length,j=0;j<G;j+=1)R[M].ks.k[j].s&&(R[M].ks.k[j].s[0].c=R[M].closed),R[M].ks.k[j].e&&(R[M].ks.k[j].e[0].c=R[M].closed);else R[M].ty==="gr"&&V(R[M].it)}function A(R){var M,I,j=R.length,G,U,Y,te;for(I=0;I<j;I+=1){if(M=R[I],M.hasMask){var ie=M.masksProperties;for(U=ie.length,G=0;G<U;G+=1)if(ie[G].pt.k.i)ie[G].pt.k.c=ie[G].cl;else for(te=ie[G].pt.k.length,Y=0;Y<te;Y+=1)ie[G].pt.k[Y].s&&(ie[G].pt.k[Y].s[0].c=ie[G].cl),ie[G].pt.k[Y].e&&(ie[G].pt.k[Y].e[0].c=ie[G].cl)}M.ty===4&&V(M.shapes)}}return function(R){if(T(O,R.v)&&(A(R.layers),R.assets)){var M,I=R.assets.length;for(M=0;M<I;M+=1)R.assets[M].layers&&A(R.assets[M].layers)}}}();function D(O){O.__complete||(Z(O),L(O),_(O),k(O),B(O),P(O.layers,O.assets),m(O.chars,O.assets),O.__complete=!0)}function H(O){O.t.a.length===0&&"m"in O.t.p}var z={};return z.completeData=D,z.checkColors=Z,z.checkChars=_,z.checkPathProperties=k,z.checkShapes=B,z.completeLayers=P,z}if(a.dataManager||(a.dataManager=y()),a.assetLoader||(a.assetLoader=function(){function P(x){var C=x.getResponseHeader("content-type");return C&&x.responseType==="json"&&C.indexOf("json")!==-1||x.response&&_typeof$5(x.response)==="object"?x.response:x.response&&typeof x.response=="string"?JSON.parse(x.response):x.responseText?JSON.parse(x.responseText):null}function m(x,C,S,E){var T,L=new XMLHttpRequest;try{L.responseType="json"}catch{}L.onreadystatechange=function(){if(L.readyState===4)if(L.status===200)T=P(L),S(T);else try{T=P(L),S(T)}catch(_){E&&E(_)}};try{L.open(["G","E","T"].join(""),x,!0)}catch{L.open(["G","E","T"].join(""),C+"/"+x,!0)}L.send()}return{load:m}}()),b.data.type==="loadAnimation")a.assetLoader.load(b.data.path,b.data.fullPath,function(P){a.dataManager.completeData(P),a.postMessage({id:b.data.id,payload:P,status:"success"})},function(){a.postMessage({id:b.data.id,status:"error"})});else if(b.data.type==="complete"){var g=b.data.animation;a.dataManager.completeData(g),a.postMessage({id:b.data.id,payload:g,status:"success"})}else b.data.type==="loadData"&&a.assetLoader.load(b.data.path,b.data.fullPath,function(P){a.postMessage({id:b.data.id,payload:P,status:"success"})},function(){a.postMessage({id:b.data.id,status:"error"})})}),n.onmessage=function(p){var b=p.data,y=b.id,g=t[y];t[y]=null,b.status==="success"?g.onComplete(b.payload):g.onError&&g.onError()})}function c(p,b){e+=1;var y="processId_"+e;return t[y]={onComplete:p,onError:b},y}function u(p,b,y){l();var g=c(b,y);n.postMessage({type:"loadAnimation",path:p,fullPath:window.location.origin+window.location.pathname,id:g})}function f(p,b,y){l();var g=c(b,y);n.postMessage({type:"loadData",path:p,fullPath:window.location.origin+window.location.pathname,id:g})}function d(p,b,y){l();var g=c(b,y);n.postMessage({type:"complete",animation:p,id:g})}return{loadAnimation:u,loadData:f,completeAnimation:d}}(),ImagePreloader=function(){var e=function(){var m=createTag("canvas");m.width=1,m.height=1;var x=m.getContext("2d");return x.fillStyle="rgba(0,0,0,0)",x.fillRect(0,0,1,1),m}();function t(){this.loadedAssets+=1,this.loadedAssets===this.totalImages&&this.loadedFootagesCount===this.totalFootages&&this.imagesLoadedCb&&this.imagesLoadedCb(null)}function i(){this.loadedFootagesCount+=1,this.loadedAssets===this.totalImages&&this.loadedFootagesCount===this.totalFootages&&this.imagesLoadedCb&&this.imagesLoadedCb(null)}function n(m,x,C){var S="";if(m.e)S=m.p;else if(x){var E=m.p;E.indexOf("images/")!==-1&&(E=E.split("/")[1]),S=x+E}else S=C,S+=m.u?m.u:"",S+=m.p;return S}function s(m){var x=0,C=setInterval((function(){var S=m.getBBox();(S.width||x>500)&&(this._imageLoaded(),clearInterval(C)),x+=1}).bind(this),50)}function a(m){var x=n(m,this.assetsPath,this.path),C=createNS("image");isSafari?this.testImageLoaded(C):C.addEventListener("load",this._imageLoaded,!1),C.addEventListener("error",(function(){S.img=e,this._imageLoaded()}).bind(this),!1),C.setAttributeNS("http://www.w3.org/1999/xlink","href",x),this._elementHelper.append?this._elementHelper.append(C):this._elementHelper.appendChild(C);var S={img:C,assetData:m};return S}function o(m){var x=n(m,this.assetsPath,this.path),C=createTag("img");C.crossOrigin="anonymous",C.addEventListener("load",this._imageLoaded,!1),C.addEventListener("error",(function(){S.img=e,this._imageLoaded()}).bind(this),!1),C.src=x;var S={img:C,assetData:m};return S}function l(m){var x={assetData:m},C=n(m,this.assetsPath,this.path);return dataManager.loadData(C,(function(S){x.img=S,this._footageLoaded()}).bind(this),(function(){x.img={},this._footageLoaded()}).bind(this)),x}function c(m,x){this.imagesLoadedCb=x;var C,S=m.length;for(C=0;C<S;C+=1)m[C].layers||(!m[C].t||m[C].t==="seq"?(this.totalImages+=1,this.images.push(this._createImageData(m[C]))):m[C].t===3&&(this.totalFootages+=1,this.images.push(this.createFootageData(m[C]))))}function u(m){this.path=m||""}function f(m){this.assetsPath=m||""}function d(m){for(var x=0,C=this.images.length;x<C;){if(this.images[x].assetData===m)return this.images[x].img;x+=1}return null}function p(){this.imagesLoadedCb=null,this.images.length=0}function b(){return this.totalImages===this.loadedAssets}function y(){return this.totalFootages===this.loadedFootagesCount}function g(m,x){m==="svg"?(this._elementHelper=x,this._createImageData=this.createImageData.bind(this)):this._createImageData=this.createImgData.bind(this)}function P(){this._imageLoaded=t.bind(this),this._footageLoaded=i.bind(this),this.testImageLoaded=s.bind(this),this.createFootageData=l.bind(this),this.assetsPath="",this.path="",this.totalImages=0,this.totalFootages=0,this.loadedAssets=0,this.loadedFootagesCount=0,this.imagesLoadedCb=null,this.images=[]}return P.prototype={loadAssets:c,setAssetsPath:f,setPath:u,loadedImages:b,loadedFootages:y,destroy:p,getAsset:d,createImgData:o,createImageData:a,imageLoaded:t,footageLoaded:i,setCacheType:g},P}();function BaseEvent(){}BaseEvent.prototype={triggerEvent:function(t,i){if(this._cbs[t])for(var n=this._cbs[t],s=0;s<n.length;s+=1)n[s](i)},addEventListener:function(t,i){return this._cbs[t]||(this._cbs[t]=[]),this._cbs[t].push(i),(function(){this.removeEventListener(t,i)}).bind(this)},removeEventListener:function(t,i){if(!i)this._cbs[t]=null;else if(this._cbs[t]){for(var n=0,s=this._cbs[t].length;n<s;)this._cbs[t][n]===i&&(this._cbs[t].splice(n,1),n-=1,s-=1),n+=1;this._cbs[t].length||(this._cbs[t]=null)}}};var markerParser=function(){function e(t){for(var i=t.split(`\r
|
|
65
|
+
`),()=>{document.head.removeChild(f)}},[t]),jsxRuntime.jsx(PopChildMeasure,{isPresent:t,childRef:n,sizeRef:s,children:React__namespace.cloneElement(e,{ref:n})})}const PresenceChild=({children:e,initial:t,isPresent:i,onExitComplete:n,custom:s,presenceAffectsLayout:a,mode:o})=>{const l=useConstant(newChildrenMap),c=React.useId(),u=React.useCallback(d=>{l.set(d,!0);for(const p of l.values())if(!p)return;n&&n()},[l,n]),f=React.useMemo(()=>({id:c,initial:t,isPresent:i,custom:s,onExitComplete:u,register:d=>(l.set(d,!1),()=>l.delete(d))}),a?[Math.random(),u]:[i,u]);return React.useMemo(()=>{l.forEach((d,p)=>l.set(p,!1))},[i]),React__namespace.useEffect(()=>{!i&&!l.size&&n&&n()},[i]),o==="popLayout"&&(e=jsxRuntime.jsx(PopChild,{isPresent:i,children:e})),jsxRuntime.jsx(PresenceContext.Provider,{value:f,children:e})};function newChildrenMap(){return new Map}function usePresence(e=!0){const t=React.useContext(PresenceContext);if(t===null)return[!0,null];const{isPresent:i,onExitComplete:n,register:s}=t,a=React.useId();React.useEffect(()=>{e&&s(a)},[e]);const o=React.useCallback(()=>e&&n&&n(a),[a,n,e]);return!i&&n?[!1,o]:[!0]}const getChildKey=e=>e.key||"";function onlyElements(e){const t=[];return React.Children.forEach(e,i=>{React.isValidElement(i)&&t.push(i)}),t}const isBrowser=typeof window<"u",useIsomorphicLayoutEffect=isBrowser?React.useLayoutEffect:React.useEffect,AnimatePresence=({children:e,custom:t,initial:i=!0,onExitComplete:n,presenceAffectsLayout:s=!0,mode:a="sync",propagate:o=!1})=>{const[l,c]=usePresence(o),u=React.useMemo(()=>onlyElements(e),[e]),f=o&&!l?[]:u.map(getChildKey),d=React.useRef(!0),p=React.useRef(u),b=useConstant(()=>new Map),[y,g]=React.useState(u),[P,m]=React.useState(u);useIsomorphicLayoutEffect(()=>{d.current=!1,p.current=u;for(let S=0;S<P.length;S++){const E=getChildKey(P[S]);f.includes(E)?b.delete(E):b.get(E)!==!0&&b.set(E,!1)}},[P,f.length,f.join("-")]);const x=[];if(u!==y){let S=[...u];for(let E=0;E<P.length;E++){const T=P[E],L=getChildKey(T);f.includes(L)||(S.splice(E,0,T),x.push(T))}a==="wait"&&x.length&&(S=x),m(onlyElements(S)),g(u);return}process.env.NODE_ENV!=="production"&&a==="wait"&&P.length>1&&console.warn(`You're attempting to animate multiple children within AnimatePresence, but its mode is set to "wait". This will lead to odd visual behaviour.`);const{forceRender:C}=React.useContext(LayoutGroupContext);return jsxRuntime.jsx(jsxRuntime.Fragment,{children:P.map(S=>{const E=getChildKey(S),T=o&&!l?!1:u===P||f.includes(E),L=()=>{if(b.has(E))b.set(E,!0);else return;let _=!0;b.forEach(k=>{k||(_=!1)}),_&&(C==null||C(),m(p.current),o&&(c==null||c()),n&&n())};return jsxRuntime.jsx(PresenceChild,{isPresent:T,initial:!d.current||i?void 0:!1,custom:T?void 0:t,presenceAffectsLayout:s,mode:a,onExitComplete:T?void 0:L,children:S},E)})})},noop=e=>e;let warning=noop,invariant=noop;process.env.NODE_ENV!=="production"&&(warning=(e,t)=>{!e&&typeof console<"u"&&console.warn(t)},invariant=(e,t)=>{if(!e)throw new Error(t)});function memo(e){let t;return()=>(t===void 0&&(t=e()),t)}const progress=(e,t,i)=>{const n=t-e;return n===0?1:(i-e)/n},secondsToMilliseconds=e=>e*1e3,millisecondsToSeconds=e=>e/1e3,MotionGlobalConfig={useManualTiming:!1};function createRenderStep(e){let t=new Set,i=new Set,n=!1,s=!1;const a=new WeakSet;let o={delta:0,timestamp:0,isProcessing:!1};function l(u){a.has(u)&&(c.schedule(u),e()),u(o)}const c={schedule:(u,f=!1,d=!1)=>{const b=d&&n?t:i;return f&&a.add(u),b.has(u)||b.add(u),u},cancel:u=>{i.delete(u),a.delete(u)},process:u=>{if(o=u,n){s=!0;return}n=!0,[t,i]=[i,t],t.forEach(l),t.clear(),n=!1,s&&(s=!1,c.process(u))}};return c}const stepsOrder=["read","resolveKeyframes","update","preRender","render","postRender"],maxElapsed=40;function createRenderBatcher(e,t){let i=!1,n=!0;const s={delta:0,timestamp:0,isProcessing:!1},a=()=>i=!0,o=stepsOrder.reduce((m,x)=>(m[x]=createRenderStep(a),m),{}),{read:l,resolveKeyframes:c,update:u,preRender:f,render:d,postRender:p}=o,b=()=>{const m=performance.now();i=!1,s.delta=n?1e3/60:Math.max(Math.min(m-s.timestamp,maxElapsed),1),s.timestamp=m,s.isProcessing=!0,l.process(s),c.process(s),u.process(s),f.process(s),d.process(s),p.process(s),s.isProcessing=!1,i&&t&&(n=!1,e(b))},y=()=>{i=!0,n=!0,s.isProcessing||e(b)};return{schedule:stepsOrder.reduce((m,x)=>{const C=o[x];return m[x]=(S,E=!1,T=!1)=>(i||y(),C.schedule(S,E,T)),m},{}),cancel:m=>{for(let x=0;x<stepsOrder.length;x++)o[stepsOrder[x]].cancel(m)},state:s,steps:o}}const{schedule:frame,cancel:cancelFrame,state:frameData,steps:frameSteps}=createRenderBatcher(typeof requestAnimationFrame<"u"?requestAnimationFrame:noop,!0),LazyContext=React.createContext({strict:!1}),featureProps={animation:["animate","variants","whileHover","whileTap","exit","whileInView","whileFocus","whileDrag"],exit:["exit"],drag:["drag","dragControls"],focus:["whileFocus"],hover:["whileHover","onHoverStart","onHoverEnd"],tap:["whileTap","onTap","onTapStart","onTapCancel"],pan:["onPan","onPanStart","onPanSessionStart","onPanEnd"],inView:["whileInView","onViewportEnter","onViewportLeave"],layout:["layout","layoutId"]},featureDefinitions={};for(const e in featureProps)featureDefinitions[e]={isEnabled:t=>featureProps[e].some(i=>!!t[i])};function loadFeatures(e){for(const t in e)featureDefinitions[t]={...featureDefinitions[t],...e[t]}}const validMotionProps=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","custom","inherit","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","globalTapTarget","ignoreStrict","viewport"]);function isValidMotionProp(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||validMotionProps.has(e)}let shouldForward=e=>!isValidMotionProp(e);function loadExternalIsValidProp(e){e&&(shouldForward=t=>t.startsWith("on")?!isValidMotionProp(t):e(t))}try{loadExternalIsValidProp(require("@emotion/is-prop-valid").default)}catch(e){}function filterProps(e,t,i){const n={};for(const s in e)s==="values"&&typeof e.values=="object"||(shouldForward(s)||i===!0&&isValidMotionProp(s)||!t&&!isValidMotionProp(s)||e.draggable&&s.startsWith("onDrag"))&&(n[s]=e[s]);return n}const warned=new Set;function warnOnce(e,t,i){e||warned.has(t)||(console.warn(t),warned.add(t))}function createDOMMotionComponentProxy(e){if(typeof Proxy>"u")return e;const t=new Map,i=(...n)=>(process.env.NODE_ENV!=="production"&&warnOnce(!1,"motion() is deprecated. Use motion.create() instead."),e(...n));return new Proxy(i,{get:(n,s)=>s==="create"?e:(t.has(s)||t.set(s,e(s)),t.get(s))})}const MotionContext=React.createContext({});function isVariantLabel(e){return typeof e=="string"||Array.isArray(e)}function isAnimationControls(e){return e!==null&&typeof e=="object"&&typeof e.start=="function"}const variantPriorityOrder=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],variantProps=["initial",...variantPriorityOrder];function isControllingVariants(e){return isAnimationControls(e.animate)||variantProps.some(t=>isVariantLabel(e[t]))}function isVariantNode(e){return!!(isControllingVariants(e)||e.variants)}function getCurrentTreeVariants(e,t){if(isControllingVariants(e)){const{initial:i,animate:n}=e;return{initial:i===!1||isVariantLabel(i)?i:void 0,animate:isVariantLabel(n)?n:void 0}}return e.inherit!==!1?t:{}}function useCreateMotionContext(e){const{initial:t,animate:i}=getCurrentTreeVariants(e,React.useContext(MotionContext));return React.useMemo(()=>({initial:t,animate:i}),[variantLabelsAsDependency(t),variantLabelsAsDependency(i)])}function variantLabelsAsDependency(e){return Array.isArray(e)?e.join(" "):e}const motionComponentSymbol=Symbol.for("motionComponentSymbol");function isRefObject(e){return e&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function useMotionRef(e,t,i){return React.useCallback(n=>{n&&e.onMount&&e.onMount(n),t&&(n?t.mount(n):t.unmount()),i&&(typeof i=="function"?i(n):isRefObject(i)&&(i.current=n))},[t])}const camelToDash=e=>e.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),optimizedAppearDataId="framerAppearId",optimizedAppearDataAttribute="data-"+camelToDash(optimizedAppearDataId),{schedule:microtask}=createRenderBatcher(queueMicrotask,!1),SwitchLayoutGroupContext=React.createContext({});function useVisualElement(e,t,i,n,s){var a,o;const{visualElement:l}=React.useContext(MotionContext),c=React.useContext(LazyContext),u=React.useContext(PresenceContext),f=React.useContext(MotionConfigContext).reducedMotion,d=React.useRef(null);n=n||c.renderer,!d.current&&n&&(d.current=n(e,{visualState:t,parent:l,props:i,presenceContext:u,blockInitialAnimation:u?u.initial===!1:!1,reducedMotionConfig:f}));const p=d.current,b=React.useContext(SwitchLayoutGroupContext);p&&!p.projection&&s&&(p.type==="html"||p.type==="svg")&&createProjectionNode$1(d.current,i,s,b);const y=React.useRef(!1);React.useInsertionEffect(()=>{p&&y.current&&p.update(i,u)});const g=i[optimizedAppearDataAttribute],P=React.useRef(!!g&&!(!((a=window.MotionHandoffIsComplete)===null||a===void 0)&&a.call(window,g))&&((o=window.MotionHasOptimisedAnimation)===null||o===void 0?void 0:o.call(window,g)));return useIsomorphicLayoutEffect(()=>{p&&(y.current=!0,window.MotionIsMounted=!0,p.updateFeatures(),microtask.render(p.render),P.current&&p.animationState&&p.animationState.animateChanges())}),React.useEffect(()=>{p&&(!P.current&&p.animationState&&p.animationState.animateChanges(),P.current&&(queueMicrotask(()=>{var m;(m=window.MotionHandoffMarkAsComplete)===null||m===void 0||m.call(window,g)}),P.current=!1))}),p}function createProjectionNode$1(e,t,i,n){const{layoutId:s,layout:a,drag:o,dragConstraints:l,layoutScroll:c,layoutRoot:u}=t;e.projection=new i(e.latestValues,t["data-framer-portal-id"]?void 0:getClosestProjectingNode(e.parent)),e.projection.setOptions({layoutId:s,layout:a,alwaysMeasureLayout:!!o||l&&isRefObject(l),visualElement:e,animationType:typeof a=="string"?a:"both",initialPromotionConfig:n,layoutScroll:c,layoutRoot:u})}function getClosestProjectingNode(e){if(e)return e.options.allowProjection!==!1?e.projection:getClosestProjectingNode(e.parent)}function createRendererMotionComponent({preloadedFeatures:e,createVisualElement:t,useRender:i,useVisualState:n,Component:s}){var a,o;e&&loadFeatures(e);function l(u,f){let d;const p={...React.useContext(MotionConfigContext),...u,layoutId:useLayoutId(u)},{isStatic:b}=p,y=useCreateMotionContext(u),g=n(u,b);if(!b&&isBrowser){useStrictMode(p,e);const P=getProjectionFunctionality(p);d=P.MeasureLayout,y.visualElement=useVisualElement(s,g,p,t,P.ProjectionNode)}return jsxRuntime.jsxs(MotionContext.Provider,{value:y,children:[d&&y.visualElement?jsxRuntime.jsx(d,{visualElement:y.visualElement,...p}):null,i(s,u,useMotionRef(g,y.visualElement,f),g,b,y.visualElement)]})}l.displayName=`motion.${typeof s=="string"?s:`create(${(o=(a=s.displayName)!==null&&a!==void 0?a:s.name)!==null&&o!==void 0?o:""})`}`;const c=React.forwardRef(l);return c[motionComponentSymbol]=s,c}function useLayoutId({layoutId:e}){const t=React.useContext(LayoutGroupContext).id;return t&&e!==void 0?t+"-"+e:e}function useStrictMode(e,t){const i=React.useContext(LazyContext).strict;if(process.env.NODE_ENV!=="production"&&t&&i){const n="You have rendered a `motion` component within a `LazyMotion` component. This will break tree shaking. Import and render a `m` component instead.";e.ignoreStrict?warning(!1,n):invariant(!1,n)}}function getProjectionFunctionality(e){const{drag:t,layout:i}=featureDefinitions;if(!t&&!i)return{};const n={...t,...i};return{MeasureLayout:t!=null&&t.isEnabled(e)||i!=null&&i.isEnabled(e)?n.MeasureLayout:void 0,ProjectionNode:n.ProjectionNode}}const lowercaseSVGElements=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","switch","symbol","svg","text","tspan","use","view"];function isSVGComponent(e){return typeof e!="string"||e.includes("-")?!1:!!(lowercaseSVGElements.indexOf(e)>-1||/[A-Z]/u.test(e))}function getValueState(e){const t=[{},{}];return e==null||e.values.forEach((i,n)=>{t[0][n]=i.get(),t[1][n]=i.getVelocity()}),t}function resolveVariantFromProps(e,t,i,n){if(typeof t=="function"){const[s,a]=getValueState(n);t=t(i!==void 0?i:e.custom,s,a)}if(typeof t=="string"&&(t=e.variants&&e.variants[t]),typeof t=="function"){const[s,a]=getValueState(n);t=t(i!==void 0?i:e.custom,s,a)}return t}const isKeyframesTarget=e=>Array.isArray(e),isCustomValue=e=>!!(e&&typeof e=="object"&&e.mix&&e.toValue),resolveFinalValueInKeyframes=e=>isKeyframesTarget(e)?e[e.length-1]||0:e,isMotionValue=e=>!!(e&&e.getVelocity);function resolveMotionValue(e){const t=isMotionValue(e)?e.get():e;return isCustomValue(t)?t.toValue():t}function makeState({scrapeMotionValuesFromProps:e,createRenderState:t,onUpdate:i},n,s,a){const o={latestValues:makeLatestValues(n,s,a,e),renderState:t()};return i&&(o.onMount=l=>i({props:n,current:l,...o}),o.onUpdate=l=>i(l)),o}const makeUseVisualState=e=>(t,i)=>{const n=React.useContext(MotionContext),s=React.useContext(PresenceContext),a=()=>makeState(e,t,n,s);return i?a():useConstant(a)};function makeLatestValues(e,t,i,n){const s={},a=n(e,{});for(const p in a)s[p]=resolveMotionValue(a[p]);let{initial:o,animate:l}=e;const c=isControllingVariants(e),u=isVariantNode(e);t&&u&&!c&&e.inherit!==!1&&(o===void 0&&(o=t.initial),l===void 0&&(l=t.animate));let f=i?i.initial===!1:!1;f=f||o===!1;const d=f?l:o;if(d&&typeof d!="boolean"&&!isAnimationControls(d)){const p=Array.isArray(d)?d:[d];for(let b=0;b<p.length;b++){const y=resolveVariantFromProps(e,p[b]);if(y){const{transitionEnd:g,transition:P,...m}=y;for(const x in m){let C=m[x];if(Array.isArray(C)){const S=f?C.length-1:0;C=C[S]}C!==null&&(s[x]=C)}for(const x in g)s[x]=g[x]}}}return s}const transformPropOrder=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],transformProps=new Set(transformPropOrder),checkStringStartsWith=e=>t=>typeof t=="string"&&t.startsWith(e),isCSSVariableName=checkStringStartsWith("--"),startsAsVariableToken=checkStringStartsWith("var(--"),isCSSVariableToken=e=>startsAsVariableToken(e)?singleCssVariableRegex.test(e.split("/*")[0].trim()):!1,singleCssVariableRegex=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,getValueAsType=(e,t)=>t&&typeof e=="number"?t.transform(e):e,clamp=(e,t,i)=>i>t?t:i<e?e:i,number={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},alpha={...number,transform:e=>clamp(0,1,e)},scale={...number,default:1},createUnitType=e=>({test:t=>typeof t=="string"&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),degrees=createUnitType("deg"),percent=createUnitType("%"),px=createUnitType("px"),vh=createUnitType("vh"),vw=createUnitType("vw"),progressPercentage={...percent,parse:e=>percent.parse(e)/100,transform:e=>percent.transform(e*100)},browserNumberValueTypes={borderWidth:px,borderTopWidth:px,borderRightWidth:px,borderBottomWidth:px,borderLeftWidth:px,borderRadius:px,radius:px,borderTopLeftRadius:px,borderTopRightRadius:px,borderBottomRightRadius:px,borderBottomLeftRadius:px,width:px,maxWidth:px,height:px,maxHeight:px,top:px,right:px,bottom:px,left:px,padding:px,paddingTop:px,paddingRight:px,paddingBottom:px,paddingLeft:px,margin:px,marginTop:px,marginRight:px,marginBottom:px,marginLeft:px,backgroundPositionX:px,backgroundPositionY:px},transformValueTypes={rotate:degrees,rotateX:degrees,rotateY:degrees,rotateZ:degrees,scale,scaleX:scale,scaleY:scale,scaleZ:scale,skew:degrees,skewX:degrees,skewY:degrees,distance:px,translateX:px,translateY:px,translateZ:px,x:px,y:px,z:px,perspective:px,transformPerspective:px,opacity:alpha,originX:progressPercentage,originY:progressPercentage,originZ:px},int={...number,transform:Math.round},numberValueTypes={...browserNumberValueTypes,...transformValueTypes,zIndex:int,size:px,fillOpacity:alpha,strokeOpacity:alpha,numOctaves:int},translateAlias={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},numTransforms=transformPropOrder.length;function buildTransform(e,t,i){let n="",s=!0;for(let a=0;a<numTransforms;a++){const o=transformPropOrder[a],l=e[o];if(l===void 0)continue;let c=!0;if(typeof l=="number"?c=l===(o.startsWith("scale")?1:0):c=parseFloat(l)===0,!c||i){const u=getValueAsType(l,numberValueTypes[o]);if(!c){s=!1;const f=translateAlias[o]||o;n+=`${f}(${u}) `}i&&(t[o]=u)}}return n=n.trim(),i?n=i(t,s?"":n):s&&(n="none"),n}function buildHTMLStyles(e,t,i){const{style:n,vars:s,transformOrigin:a}=e;let o=!1,l=!1;for(const c in t){const u=t[c];if(transformProps.has(c)){o=!0;continue}else if(isCSSVariableName(c)){s[c]=u;continue}else{const f=getValueAsType(u,numberValueTypes[c]);c.startsWith("origin")?(l=!0,a[c]=f):n[c]=f}}if(t.transform||(o||i?n.transform=buildTransform(t,e.transform,i):n.transform&&(n.transform="none")),l){const{originX:c="50%",originY:u="50%",originZ:f=0}=a;n.transformOrigin=`${c} ${u} ${f}`}}const dashKeys={offset:"stroke-dashoffset",array:"stroke-dasharray"},camelKeys={offset:"strokeDashoffset",array:"strokeDasharray"};function buildSVGPath(e,t,i=1,n=0,s=!0){e.pathLength=1;const a=s?dashKeys:camelKeys;e[a.offset]=px.transform(-n);const o=px.transform(t),l=px.transform(i);e[a.array]=`${o} ${l}`}function calcOrigin$1(e,t,i){return typeof e=="string"?e:px.transform(t+i*e)}function calcSVGTransformOrigin(e,t,i){const n=calcOrigin$1(t,e.x,e.width),s=calcOrigin$1(i,e.y,e.height);return`${n} ${s}`}function buildSVGAttrs(e,{attrX:t,attrY:i,attrScale:n,originX:s,originY:a,pathLength:o,pathSpacing:l=1,pathOffset:c=0,...u},f,d){if(buildHTMLStyles(e,u,d),f){e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);return}e.attrs=e.style,e.style={};const{attrs:p,style:b,dimensions:y}=e;p.transform&&(y&&(b.transform=p.transform),delete p.transform),y&&(s!==void 0||a!==void 0||b.transform)&&(b.transformOrigin=calcSVGTransformOrigin(y,s!==void 0?s:.5,a!==void 0?a:.5)),t!==void 0&&(p.x=t),i!==void 0&&(p.y=i),n!==void 0&&(p.scale=n),o!==void 0&&buildSVGPath(p,o,l,c,!1)}const createHtmlRenderState=()=>({style:{},transform:{},transformOrigin:{},vars:{}}),createSvgRenderState=()=>({...createHtmlRenderState(),attrs:{}}),isSVGTag=e=>typeof e=="string"&&e.toLowerCase()==="svg";function renderHTML(e,{style:t,vars:i},n,s){Object.assign(e.style,t,s&&s.getProjectionStyles(n));for(const a in i)e.style.setProperty(a,i[a])}const camelCaseAttributes=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength","startOffset","textLength","lengthAdjust"]);function renderSVG(e,t,i,n){renderHTML(e,t,void 0,n);for(const s in t.attrs)e.setAttribute(camelCaseAttributes.has(s)?s:camelToDash(s),t.attrs[s])}const scaleCorrectors={};function addScaleCorrector(e){Object.assign(scaleCorrectors,e)}function isForcedMotionValue(e,{layout:t,layoutId:i}){return transformProps.has(e)||e.startsWith("origin")||(t||i!==void 0)&&(!!scaleCorrectors[e]||e==="opacity")}function scrapeMotionValuesFromProps$1(e,t,i){var n;const{style:s}=e,a={};for(const o in s)(isMotionValue(s[o])||t.style&&isMotionValue(t.style[o])||isForcedMotionValue(o,e)||((n=i==null?void 0:i.getValue(o))===null||n===void 0?void 0:n.liveStyle)!==void 0)&&(a[o]=s[o]);return a}function scrapeMotionValuesFromProps(e,t,i){const n=scrapeMotionValuesFromProps$1(e,t,i);for(const s in e)if(isMotionValue(e[s])||isMotionValue(t[s])){const a=transformPropOrder.indexOf(s)!==-1?"attr"+s.charAt(0).toUpperCase()+s.substring(1):s;n[a]=e[s]}return n}function updateSVGDimensions(e,t){try{t.dimensions=typeof e.getBBox=="function"?e.getBBox():e.getBoundingClientRect()}catch{t.dimensions={x:0,y:0,width:0,height:0}}}const layoutProps=["x","y","width","height","cx","cy","r"],svgMotionConfig={useVisualState:makeUseVisualState({scrapeMotionValuesFromProps,createRenderState:createSvgRenderState,onUpdate:({props:e,prevProps:t,current:i,renderState:n,latestValues:s})=>{if(!i)return;let a=!!e.drag;if(!a){for(const l in s)if(transformProps.has(l)){a=!0;break}}if(!a)return;let o=!t;if(t)for(let l=0;l<layoutProps.length;l++){const c=layoutProps[l];e[c]!==t[c]&&(o=!0)}o&&frame.read(()=>{updateSVGDimensions(i,n),frame.render(()=>{buildSVGAttrs(n,s,isSVGTag(i.tagName),e.transformTemplate),renderSVG(i,n)})})}})},htmlMotionConfig={useVisualState:makeUseVisualState({scrapeMotionValuesFromProps:scrapeMotionValuesFromProps$1,createRenderState:createHtmlRenderState})};function copyRawValuesOnly(e,t,i){for(const n in t)!isMotionValue(t[n])&&!isForcedMotionValue(n,i)&&(e[n]=t[n])}function useInitialMotionValues({transformTemplate:e},t){return React.useMemo(()=>{const i=createHtmlRenderState();return buildHTMLStyles(i,t,e),Object.assign({},i.vars,i.style)},[t])}function useStyle(e,t){const i=e.style||{},n={};return copyRawValuesOnly(n,i,e),Object.assign(n,useInitialMotionValues(e,t)),n}function useHTMLProps(e,t){const i={},n=useStyle(e,t);return e.drag&&e.dragListener!==!1&&(i.draggable=!1,n.userSelect=n.WebkitUserSelect=n.WebkitTouchCallout="none",n.touchAction=e.drag===!0?"none":`pan-${e.drag==="x"?"y":"x"}`),e.tabIndex===void 0&&(e.onTap||e.onTapStart||e.whileTap)&&(i.tabIndex=0),i.style=n,i}function useSVGProps(e,t,i,n){const s=React.useMemo(()=>{const a=createSvgRenderState();return buildSVGAttrs(a,t,isSVGTag(n),e.transformTemplate),{...a.attrs,style:{...a.style}}},[t]);if(e.style){const a={};copyRawValuesOnly(a,e.style,e),s.style={...a,...s.style}}return s}function createUseRender(e=!1){return(i,n,s,{latestValues:a},o)=>{const c=(isSVGComponent(i)?useSVGProps:useHTMLProps)(n,a,o,i),u=filterProps(n,typeof i=="string",e),f=i!==React.Fragment?{...u,...c,ref:s}:{},{children:d}=n,p=React.useMemo(()=>isMotionValue(d)?d.get():d,[d]);return React.createElement(i,{...f,children:p})}}function createMotionComponentFactory(e,t){return function(n,{forwardMotionProps:s}={forwardMotionProps:!1}){const o={...isSVGComponent(n)?svgMotionConfig:htmlMotionConfig,preloadedFeatures:e,useRender:createUseRender(s),createVisualElement:t,Component:n};return createRendererMotionComponent(o)}}function shallowCompare(e,t){if(!Array.isArray(t))return!1;const i=t.length;if(i!==e.length)return!1;for(let n=0;n<i;n++)if(t[n]!==e[n])return!1;return!0}function resolveVariant(e,t,i){const n=e.getProps();return resolveVariantFromProps(n,t,i!==void 0?i:n.custom,e)}const supportsScrollTimeline=memo(()=>window.ScrollTimeline!==void 0);class BaseGroupPlaybackControls{constructor(t){this.stop=()=>this.runAll("stop"),this.animations=t.filter(Boolean)}get finished(){return Promise.all(this.animations.map(t=>"finished"in t?t.finished:t))}getAll(t){return this.animations[0][t]}setAll(t,i){for(let n=0;n<this.animations.length;n++)this.animations[n][t]=i}attachTimeline(t,i){const n=this.animations.map(s=>{if(supportsScrollTimeline()&&s.attachTimeline)return s.attachTimeline(t);if(typeof i=="function")return i(s)});return()=>{n.forEach((s,a)=>{s&&s(),this.animations[a].stop()})}}get time(){return this.getAll("time")}set time(t){this.setAll("time",t)}get speed(){return this.getAll("speed")}set speed(t){this.setAll("speed",t)}get startTime(){return this.getAll("startTime")}get duration(){let t=0;for(let i=0;i<this.animations.length;i++)t=Math.max(t,this.animations[i].duration);return t}runAll(t){this.animations.forEach(i=>i[t]())}flatten(){this.runAll("flatten")}play(){this.runAll("play")}pause(){this.runAll("pause")}cancel(){this.runAll("cancel")}complete(){this.runAll("complete")}}class GroupPlaybackControls extends BaseGroupPlaybackControls{then(t,i){return Promise.all(this.animations).then(t).catch(i)}}function getValueTransition$1(e,t){return e?e[t]||e.default||e:void 0}const maxGeneratorDuration=2e4;function calcGeneratorDuration(e){let t=0;const i=50;let n=e.next(t);for(;!n.done&&t<maxGeneratorDuration;)t+=i,n=e.next(t);return t>=maxGeneratorDuration?1/0:t}function createGeneratorEasing(e,t=100,i){const n=i({...e,keyframes:[0,t]}),s=Math.min(calcGeneratorDuration(n),maxGeneratorDuration);return{type:"keyframes",ease:a=>n.next(s*a).value/t,duration:millisecondsToSeconds(s)}}function isGenerator(e){return typeof e=="function"}function attachTimeline(e,t){e.timeline=t,e.onfinish=null}const isBezierDefinition=e=>Array.isArray(e)&&typeof e[0]=="number",supportsFlags={linearEasing:void 0};function memoSupports(e,t){const i=memo(e);return()=>{var n;return(n=supportsFlags[t])!==null&&n!==void 0?n:i()}}const supportsLinearEasing=memoSupports(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),generateLinearEasing=(e,t,i=10)=>{let n="";const s=Math.max(Math.round(t/i),2);for(let a=0;a<s;a++)n+=e(progress(0,s-1,a))+", ";return`linear(${n.substring(0,n.length-2)})`};function isWaapiSupportedEasing(e){return!!(typeof e=="function"&&supportsLinearEasing()||!e||typeof e=="string"&&(e in supportedWaapiEasing||supportsLinearEasing())||isBezierDefinition(e)||Array.isArray(e)&&e.every(isWaapiSupportedEasing))}const cubicBezierAsString=([e,t,i,n])=>`cubic-bezier(${e}, ${t}, ${i}, ${n})`,supportedWaapiEasing={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:cubicBezierAsString([0,.65,.55,1]),circOut:cubicBezierAsString([.55,0,1,.45]),backIn:cubicBezierAsString([.31,.01,.66,-.59]),backOut:cubicBezierAsString([.33,1.53,.69,.99])};function mapEasingToNativeEasing(e,t){if(e)return typeof e=="function"&&supportsLinearEasing()?generateLinearEasing(e,t):isBezierDefinition(e)?cubicBezierAsString(e):Array.isArray(e)?e.map(i=>mapEasingToNativeEasing(i,t)||supportedWaapiEasing.easeOut):supportedWaapiEasing[e]}const isDragging={x:!1,y:!1};function isDragActive(){return isDragging.x||isDragging.y}function resolveElements(e,t,i){var n;if(e instanceof Element)return[e];if(typeof e=="string"){let s=document;t&&(s=t.current);const a=(n=i==null?void 0:i[e])!==null&&n!==void 0?n:s.querySelectorAll(e);return a?Array.from(a):[]}return Array.from(e)}function setupGesture(e,t){const i=resolveElements(e),n=new AbortController,s={passive:!0,...t,signal:n.signal};return[i,s,()=>n.abort()]}function filterEvents$1(e){return t=>{t.pointerType==="touch"||isDragActive()||e(t)}}function hover(e,t,i={}){const[n,s,a]=setupGesture(e,i),o=filterEvents$1(l=>{const{target:c}=l,u=t(l);if(typeof u!="function"||!c)return;const f=filterEvents$1(d=>{u(d),c.removeEventListener("pointerleave",f)});c.addEventListener("pointerleave",f,s)});return n.forEach(l=>{l.addEventListener("pointerenter",o,s)}),a}const isNodeOrChild=(e,t)=>t?e===t?!0:isNodeOrChild(e,t.parentElement):!1,isPrimaryPointer=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==!1,focusableElements=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function isElementKeyboardAccessible(e){return focusableElements.has(e.tagName)||e.tabIndex!==-1}const isPressing=new WeakSet;function filterEvents(e){return t=>{t.key==="Enter"&&e(t)}}function firePointerEvent(e,t){e.dispatchEvent(new PointerEvent("pointer"+t,{isPrimary:!0,bubbles:!0}))}const enableKeyboardPress=(e,t)=>{const i=e.currentTarget;if(!i)return;const n=filterEvents(()=>{if(isPressing.has(i))return;firePointerEvent(i,"down");const s=filterEvents(()=>{firePointerEvent(i,"up")}),a=()=>firePointerEvent(i,"cancel");i.addEventListener("keyup",s,t),i.addEventListener("blur",a,t)});i.addEventListener("keydown",n,t),i.addEventListener("blur",()=>i.removeEventListener("keydown",n),t)};function isValidPressEvent(e){return isPrimaryPointer(e)&&!isDragActive()}function press(e,t,i={}){const[n,s,a]=setupGesture(e,i),o=l=>{const c=l.currentTarget;if(!isValidPressEvent(l)||isPressing.has(c))return;isPressing.add(c);const u=t(l),f=(b,y)=>{window.removeEventListener("pointerup",d),window.removeEventListener("pointercancel",p),!(!isValidPressEvent(b)||!isPressing.has(c))&&(isPressing.delete(c),typeof u=="function"&&u(b,{success:y}))},d=b=>{f(b,i.useGlobalTarget||isNodeOrChild(c,b.target))},p=b=>{f(b,!1)};window.addEventListener("pointerup",d,s),window.addEventListener("pointercancel",p,s)};return n.forEach(l=>{!isElementKeyboardAccessible(l)&&l.getAttribute("tabindex")===null&&(l.tabIndex=0),(i.useGlobalTarget?window:l).addEventListener("pointerdown",o,s),l.addEventListener("focus",u=>enableKeyboardPress(u,s),s)}),a}function setDragLock(e){return e==="x"||e==="y"?isDragging[e]?null:(isDragging[e]=!0,()=>{isDragging[e]=!1}):isDragging.x||isDragging.y?null:(isDragging.x=isDragging.y=!0,()=>{isDragging.x=isDragging.y=!1})}const positionalKeys=new Set(["width","height","top","left","right","bottom",...transformPropOrder]);let now;function clearTime(){now=void 0}const time={now:()=>(now===void 0&&time.set(frameData.isProcessing||MotionGlobalConfig.useManualTiming?frameData.timestamp:performance.now()),now),set:e=>{now=e,queueMicrotask(clearTime)}};function addUniqueItem(e,t){e.indexOf(t)===-1&&e.push(t)}function removeItem(e,t){const i=e.indexOf(t);i>-1&&e.splice(i,1)}class SubscriptionManager{constructor(){this.subscriptions=[]}add(t){return addUniqueItem(this.subscriptions,t),()=>removeItem(this.subscriptions,t)}notify(t,i,n){const s=this.subscriptions.length;if(s)if(s===1)this.subscriptions[0](t,i,n);else for(let a=0;a<s;a++){const o=this.subscriptions[a];o&&o(t,i,n)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}function velocityPerSecond(e,t){return t?e*(1e3/t):0}const MAX_VELOCITY_DELTA=30,isFloat=e=>!isNaN(parseFloat(e)),collectMotionValues={current:void 0};class MotionValue{constructor(t,i={}){this.version="11.18.2",this.canTrackVelocity=null,this.events={},this.updateAndNotify=(n,s=!0)=>{const a=time.now();this.updatedAt!==a&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(n),this.current!==this.prev&&this.events.change&&this.events.change.notify(this.current),s&&this.events.renderRequest&&this.events.renderRequest.notify(this.current)},this.hasAnimated=!1,this.setCurrent(t),this.owner=i.owner}setCurrent(t){this.current=t,this.updatedAt=time.now(),this.canTrackVelocity===null&&t!==void 0&&(this.canTrackVelocity=isFloat(this.current))}setPrevFrameValue(t=this.current){this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt}onChange(t){return process.env.NODE_ENV!=="production"&&warnOnce(!1,'value.onChange(callback) is deprecated. Switch to value.on("change", callback).'),this.on("change",t)}on(t,i){this.events[t]||(this.events[t]=new SubscriptionManager);const n=this.events[t].add(i);return t==="change"?()=>{n(),frame.read(()=>{this.events.change.getSize()||this.stop()})}:n}clearListeners(){for(const t in this.events)this.events[t].clear()}attach(t,i){this.passiveEffect=t,this.stopPassiveEffect=i}set(t,i=!0){!i||!this.passiveEffect?this.updateAndNotify(t,i):this.passiveEffect(t,this.updateAndNotify)}setWithVelocity(t,i,n){this.set(i),this.prev=void 0,this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt-n}jump(t,i=!0){this.updateAndNotify(t),this.prev=t,this.prevUpdatedAt=this.prevFrameValue=void 0,i&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}get(){return collectMotionValues.current&&collectMotionValues.current.push(this),this.current}getPrevious(){return this.prev}getVelocity(){const t=time.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||t-this.updatedAt>MAX_VELOCITY_DELTA)return 0;const i=Math.min(this.updatedAt-this.prevUpdatedAt,MAX_VELOCITY_DELTA);return velocityPerSecond(parseFloat(this.current)-parseFloat(this.prevFrameValue),i)}start(t){return this.stop(),new Promise(i=>{this.hasAnimated=!0,this.animation=t(i),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function motionValue(e,t){return new MotionValue(e,t)}function setMotionValue(e,t,i){e.hasValue(t)?e.getValue(t).set(i):e.addValue(t,motionValue(i))}function setTarget(e,t){const i=resolveVariant(e,t);let{transitionEnd:n={},transition:s={},...a}=i||{};a={...a,...n};for(const o in a){const l=resolveFinalValueInKeyframes(a[o]);setMotionValue(e,o,l)}}function isWillChangeMotionValue(e){return!!(isMotionValue(e)&&e.add)}function addValueToWillChange(e,t){const i=e.getValue("willChange");if(isWillChangeMotionValue(i))return i.add(t)}function getOptimisedAppearId(e){return e.props[optimizedAppearDataAttribute]}const calcBezier=(e,t,i)=>(((1-3*i+3*t)*e+(3*i-6*t))*e+3*t)*e,subdivisionPrecision=1e-7,subdivisionMaxIterations=12;function binarySubdivide(e,t,i,n,s){let a,o,l=0;do o=t+(i-t)/2,a=calcBezier(o,n,s)-e,a>0?i=o:t=o;while(Math.abs(a)>subdivisionPrecision&&++l<subdivisionMaxIterations);return o}function cubicBezier(e,t,i,n){if(e===t&&i===n)return noop;const s=a=>binarySubdivide(a,0,1,e,i);return a=>a===0||a===1?a:calcBezier(s(a),t,n)}const mirrorEasing=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,reverseEasing=e=>t=>1-e(1-t),backOut=cubicBezier(.33,1.53,.69,.99),backIn=reverseEasing(backOut),backInOut=mirrorEasing(backIn),anticipate=e=>(e*=2)<1?.5*backIn(e):.5*(2-Math.pow(2,-10*(e-1))),circIn=e=>1-Math.sin(Math.acos(e)),circOut=reverseEasing(circIn),circInOut=mirrorEasing(circIn),isZeroValueString=e=>/^0[^.\s]+$/u.test(e);function isNone(e){return typeof e=="number"?e===0:e!==null?e==="none"||e==="0"||isZeroValueString(e):!0}const sanitize=e=>Math.round(e*1e5)/1e5,floatRegex=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function isNullish(e){return e==null}const singleColorRegex=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,isColorString=(e,t)=>i=>!!(typeof i=="string"&&singleColorRegex.test(i)&&i.startsWith(e)||t&&!isNullish(i)&&Object.prototype.hasOwnProperty.call(i,t)),splitColor=(e,t,i)=>n=>{if(typeof n!="string")return n;const[s,a,o,l]=n.match(floatRegex);return{[e]:parseFloat(s),[t]:parseFloat(a),[i]:parseFloat(o),alpha:l!==void 0?parseFloat(l):1}},clampRgbUnit=e=>clamp(0,255,e),rgbUnit={...number,transform:e=>Math.round(clampRgbUnit(e))},rgba={test:isColorString("rgb","red"),parse:splitColor("red","green","blue"),transform:({red:e,green:t,blue:i,alpha:n=1})=>"rgba("+rgbUnit.transform(e)+", "+rgbUnit.transform(t)+", "+rgbUnit.transform(i)+", "+sanitize(alpha.transform(n))+")"};function parseHex(e){let t="",i="",n="",s="";return e.length>5?(t=e.substring(1,3),i=e.substring(3,5),n=e.substring(5,7),s=e.substring(7,9)):(t=e.substring(1,2),i=e.substring(2,3),n=e.substring(3,4),s=e.substring(4,5),t+=t,i+=i,n+=n,s+=s),{red:parseInt(t,16),green:parseInt(i,16),blue:parseInt(n,16),alpha:s?parseInt(s,16)/255:1}}const hex={test:isColorString("#"),parse:parseHex,transform:rgba.transform},hsla={test:isColorString("hsl","hue"),parse:splitColor("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:i,alpha:n=1})=>"hsla("+Math.round(e)+", "+percent.transform(sanitize(t))+", "+percent.transform(sanitize(i))+", "+sanitize(alpha.transform(n))+")"},color={test:e=>rgba.test(e)||hex.test(e)||hsla.test(e),parse:e=>rgba.test(e)?rgba.parse(e):hsla.test(e)?hsla.parse(e):hex.parse(e),transform:e=>typeof e=="string"?e:e.hasOwnProperty("red")?rgba.transform(e):hsla.transform(e)},colorRegex=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function test(e){var t,i;return isNaN(e)&&typeof e=="string"&&(((t=e.match(floatRegex))===null||t===void 0?void 0:t.length)||0)+(((i=e.match(colorRegex))===null||i===void 0?void 0:i.length)||0)>0}const NUMBER_TOKEN="number",COLOR_TOKEN="color",VAR_TOKEN="var",VAR_FUNCTION_TOKEN="var(",SPLIT_TOKEN="${}",complexRegex=/var\s*\(\s*--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)|#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\)|-?(?:\d+(?:\.\d+)?|\.\d+)/giu;function analyseComplexValue(e){const t=e.toString(),i=[],n={color:[],number:[],var:[]},s=[];let a=0;const l=t.replace(complexRegex,c=>(color.test(c)?(n.color.push(a),s.push(COLOR_TOKEN),i.push(color.parse(c))):c.startsWith(VAR_FUNCTION_TOKEN)?(n.var.push(a),s.push(VAR_TOKEN),i.push(c)):(n.number.push(a),s.push(NUMBER_TOKEN),i.push(parseFloat(c))),++a,SPLIT_TOKEN)).split(SPLIT_TOKEN);return{values:i,split:l,indexes:n,types:s}}function parseComplexValue(e){return analyseComplexValue(e).values}function createTransformer(e){const{split:t,types:i}=analyseComplexValue(e),n=t.length;return s=>{let a="";for(let o=0;o<n;o++)if(a+=t[o],s[o]!==void 0){const l=i[o];l===NUMBER_TOKEN?a+=sanitize(s[o]):l===COLOR_TOKEN?a+=color.transform(s[o]):a+=s[o]}return a}}const convertNumbersToZero=e=>typeof e=="number"?0:e;function getAnimatableNone$1(e){const t=parseComplexValue(e);return createTransformer(e)(t.map(convertNumbersToZero))}const complex={test,parse:parseComplexValue,createTransformer,getAnimatableNone:getAnimatableNone$1},maxDefaults=new Set(["brightness","contrast","saturate","opacity"]);function applyDefaultFilter(e){const[t,i]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[n]=i.match(floatRegex)||[];if(!n)return e;const s=i.replace(n,"");let a=maxDefaults.has(t)?1:0;return n!==i&&(a*=100),t+"("+a+s+")"}const functionRegex=/\b([a-z-]*)\(.*?\)/gu,filter={...complex,getAnimatableNone:e=>{const t=e.match(functionRegex);return t?t.map(applyDefaultFilter).join(" "):e}},defaultValueTypes={...numberValueTypes,color,backgroundColor:color,outlineColor:color,fill:color,stroke:color,borderColor:color,borderTopColor:color,borderRightColor:color,borderBottomColor:color,borderLeftColor:color,filter,WebkitFilter:filter},getDefaultValueType=e=>defaultValueTypes[e];function getAnimatableNone(e,t){let i=getDefaultValueType(e);return i!==filter&&(i=complex),i.getAnimatableNone?i.getAnimatableNone(t):void 0}const invalidTemplates=new Set(["auto","none","0"]);function makeNoneKeyframesAnimatable(e,t,i){let n=0,s;for(;n<e.length&&!s;){const a=e[n];typeof a=="string"&&!invalidTemplates.has(a)&&analyseComplexValue(a).values.length&&(s=e[n]),n++}if(s&&i)for(const a of t)e[a]=getAnimatableNone(i,s)}const isNumOrPxType=e=>e===number||e===px,getPosFromMatrix=(e,t)=>parseFloat(e.split(", ")[t]),getTranslateFromMatrix=(e,t)=>(i,{transform:n})=>{if(n==="none"||!n)return 0;const s=n.match(/^matrix3d\((.+)\)$/u);if(s)return getPosFromMatrix(s[1],t);{const a=n.match(/^matrix\((.+)\)$/u);return a?getPosFromMatrix(a[1],e):0}},transformKeys=new Set(["x","y","z"]),nonTranslationalTransformKeys=transformPropOrder.filter(e=>!transformKeys.has(e));function removeNonTranslationalTransform(e){const t=[];return nonTranslationalTransformKeys.forEach(i=>{const n=e.getValue(i);n!==void 0&&(t.push([i,n.get()]),n.set(i.startsWith("scale")?1:0))}),t}const positionalValues={width:({x:e},{paddingLeft:t="0",paddingRight:i="0"})=>e.max-e.min-parseFloat(t)-parseFloat(i),height:({y:e},{paddingTop:t="0",paddingBottom:i="0"})=>e.max-e.min-parseFloat(t)-parseFloat(i),top:(e,{top:t})=>parseFloat(t),left:(e,{left:t})=>parseFloat(t),bottom:({y:e},{top:t})=>parseFloat(t)+(e.max-e.min),right:({x:e},{left:t})=>parseFloat(t)+(e.max-e.min),x:getTranslateFromMatrix(4,13),y:getTranslateFromMatrix(5,14)};positionalValues.translateX=positionalValues.x,positionalValues.translateY=positionalValues.y;const toResolve=new Set;let isScheduled=!1,anyNeedsMeasurement=!1;function measureAllKeyframes(){if(anyNeedsMeasurement){const e=Array.from(toResolve).filter(n=>n.needsMeasurement),t=new Set(e.map(n=>n.element)),i=new Map;t.forEach(n=>{const s=removeNonTranslationalTransform(n);s.length&&(i.set(n,s),n.render())}),e.forEach(n=>n.measureInitialState()),t.forEach(n=>{n.render();const s=i.get(n);s&&s.forEach(([a,o])=>{var l;(l=n.getValue(a))===null||l===void 0||l.set(o)})}),e.forEach(n=>n.measureEndState()),e.forEach(n=>{n.suspendedScrollY!==void 0&&window.scrollTo(0,n.suspendedScrollY)})}anyNeedsMeasurement=!1,isScheduled=!1,toResolve.forEach(e=>e.complete()),toResolve.clear()}function readAllKeyframes(){toResolve.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(anyNeedsMeasurement=!0)})}function flushKeyframeResolvers(){readAllKeyframes(),measureAllKeyframes()}class KeyframeResolver{constructor(t,i,n,s,a,o=!1){this.isComplete=!1,this.isAsync=!1,this.needsMeasurement=!1,this.isScheduled=!1,this.unresolvedKeyframes=[...t],this.onComplete=i,this.name=n,this.motionValue=s,this.element=a,this.isAsync=o}scheduleResolve(){this.isScheduled=!0,this.isAsync?(toResolve.add(this),isScheduled||(isScheduled=!0,frame.read(readAllKeyframes),frame.resolveKeyframes(measureAllKeyframes))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:t,name:i,element:n,motionValue:s}=this;for(let a=0;a<t.length;a++)if(t[a]===null)if(a===0){const o=s==null?void 0:s.get(),l=t[t.length-1];if(o!==void 0)t[0]=o;else if(n&&i){const c=n.readValue(i,l);c!=null&&(t[0]=c)}t[0]===void 0&&(t[0]=l),s&&o===void 0&&s.set(t[0])}else t[a]=t[a-1]}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(){this.isComplete=!0,this.onComplete(this.unresolvedKeyframes,this.finalKeyframe),toResolve.delete(this)}cancel(){this.isComplete||(this.isScheduled=!1,toResolve.delete(this))}resume(){this.isComplete||this.scheduleResolve()}}const isNumericalString=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e),splitCSSVariableRegex=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function parseCSSVariable(e){const t=splitCSSVariableRegex.exec(e);if(!t)return[,];const[,i,n,s]=t;return[`--${i??n}`,s]}const maxDepth=4;function getVariableValue(e,t,i=1){invariant(i<=maxDepth,`Max CSS variable fallback depth detected in property "${e}". This may indicate a circular fallback dependency.`);const[n,s]=parseCSSVariable(e);if(!n)return;const a=window.getComputedStyle(t).getPropertyValue(n);if(a){const o=a.trim();return isNumericalString(o)?parseFloat(o):o}return isCSSVariableToken(s)?getVariableValue(s,t,i+1):s}const testValueType=e=>t=>t.test(e),auto={test:e=>e==="auto",parse:e=>e},dimensionValueTypes=[number,px,percent,degrees,vw,vh,auto],findDimensionValueType=e=>dimensionValueTypes.find(testValueType(e));class DOMKeyframesResolver extends KeyframeResolver{constructor(t,i,n,s,a){super(t,i,n,s,a,!0)}readKeyframes(){const{unresolvedKeyframes:t,element:i,name:n}=this;if(!i||!i.current)return;super.readKeyframes();for(let c=0;c<t.length;c++){let u=t[c];if(typeof u=="string"&&(u=u.trim(),isCSSVariableToken(u))){const f=getVariableValue(u,i.current);f!==void 0&&(t[c]=f),c===t.length-1&&(this.finalKeyframe=u)}}if(this.resolveNoneKeyframes(),!positionalKeys.has(n)||t.length!==2)return;const[s,a]=t,o=findDimensionValueType(s),l=findDimensionValueType(a);if(o!==l)if(isNumOrPxType(o)&&isNumOrPxType(l))for(let c=0;c<t.length;c++){const u=t[c];typeof u=="string"&&(t[c]=parseFloat(u))}else this.needsMeasurement=!0}resolveNoneKeyframes(){const{unresolvedKeyframes:t,name:i}=this,n=[];for(let s=0;s<t.length;s++)isNone(t[s])&&n.push(s);n.length&&makeNoneKeyframesAnimatable(t,n,i)}measureInitialState(){const{element:t,unresolvedKeyframes:i,name:n}=this;if(!t||!t.current)return;n==="height"&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=positionalValues[n](t.measureViewportBox(),window.getComputedStyle(t.current)),i[0]=this.measuredOrigin;const s=i[i.length-1];s!==void 0&&t.getValue(n,s).jump(s,!1)}measureEndState(){var t;const{element:i,name:n,unresolvedKeyframes:s}=this;if(!i||!i.current)return;const a=i.getValue(n);a&&a.jump(this.measuredOrigin,!1);const o=s.length-1,l=s[o];s[o]=positionalValues[n](i.measureViewportBox(),window.getComputedStyle(i.current)),l!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=l),!((t=this.removedTransforms)===null||t===void 0)&&t.length&&this.removedTransforms.forEach(([c,u])=>{i.getValue(c).set(u)}),this.resolveNoneKeyframes()}}const isAnimatable=(e,t)=>t==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&(complex.test(e)||e==="0")&&!e.startsWith("url("));function hasKeyframesChanged(e){const t=e[0];if(e.length===1)return!0;for(let i=0;i<e.length;i++)if(e[i]!==t)return!0}function canAnimate(e,t,i,n){const s=e[0];if(s===null)return!1;if(t==="display"||t==="visibility")return!0;const a=e[e.length-1],o=isAnimatable(s,t),l=isAnimatable(a,t);return warning(o===l,`You are trying to animate ${t} from "${s}" to "${a}". ${s} is not an animatable value - to enable this animation set ${s} to a value animatable to ${a} via the \`style\` property.`),!o||!l?!1:hasKeyframesChanged(e)||(i==="spring"||isGenerator(i))&&n}const isNotNull=e=>e!==null;function getFinalKeyframe(e,{repeat:t,repeatType:i="loop"},n){const s=e.filter(isNotNull),a=t&&i!=="loop"&&t%2===1?0:s.length-1;return!a||n===void 0?s[a]:n}const MAX_RESOLVE_DELAY=40;class BaseAnimation{constructor({autoplay:t=!0,delay:i=0,type:n="keyframes",repeat:s=0,repeatDelay:a=0,repeatType:o="loop",...l}){this.isStopped=!1,this.hasAttemptedResolve=!1,this.createdAt=time.now(),this.options={autoplay:t,delay:i,type:n,repeat:s,repeatDelay:a,repeatType:o,...l},this.updateFinishedPromise()}calcStartTime(){return this.resolvedAt?this.resolvedAt-this.createdAt>MAX_RESOLVE_DELAY?this.resolvedAt:this.createdAt:this.createdAt}get resolved(){return!this._resolved&&!this.hasAttemptedResolve&&flushKeyframeResolvers(),this._resolved}onKeyframesResolved(t,i){this.resolvedAt=time.now(),this.hasAttemptedResolve=!0;const{name:n,type:s,velocity:a,delay:o,onComplete:l,onUpdate:c,isGenerator:u}=this.options;if(!u&&!canAnimate(t,n,s,a))if(o)this.options.duration=0;else{c&&c(getFinalKeyframe(t,this.options,i)),l&&l(),this.resolveFinishedPromise();return}const f=this.initPlayback(t,i);f!==!1&&(this._resolved={keyframes:t,finalKeyframe:i,...f},this.onPostResolved())}onPostResolved(){}then(t,i){return this.currentFinishedPromise.then(t,i)}flatten(){this.options.type="keyframes",this.options.ease="linear"}updateFinishedPromise(){this.currentFinishedPromise=new Promise(t=>{this.resolveFinishedPromise=t})}}const mixNumber$1=(e,t,i)=>e+(t-e)*i;function hueToRgb(e,t,i){return i<0&&(i+=1),i>1&&(i-=1),i<1/6?e+(t-e)*6*i:i<1/2?t:i<2/3?e+(t-e)*(2/3-i)*6:e}function hslaToRgba({hue:e,saturation:t,lightness:i,alpha:n}){e/=360,t/=100,i/=100;let s=0,a=0,o=0;if(!t)s=a=o=i;else{const l=i<.5?i*(1+t):i+t-i*t,c=2*i-l;s=hueToRgb(c,l,e+1/3),a=hueToRgb(c,l,e),o=hueToRgb(c,l,e-1/3)}return{red:Math.round(s*255),green:Math.round(a*255),blue:Math.round(o*255),alpha:n}}function mixImmediate(e,t){return i=>i>0?t:e}const mixLinearColor=(e,t,i)=>{const n=e*e,s=i*(t*t-n)+n;return s<0?0:Math.sqrt(s)},colorTypes=[hex,rgba,hsla],getColorType=e=>colorTypes.find(t=>t.test(e));function asRGBA(e){const t=getColorType(e);if(warning(!!t,`'${e}' is not an animatable color. Use the equivalent color code instead.`),!t)return!1;let i=t.parse(e);return t===hsla&&(i=hslaToRgba(i)),i}const mixColor=(e,t)=>{const i=asRGBA(e),n=asRGBA(t);if(!i||!n)return mixImmediate(e,t);const s={...i};return a=>(s.red=mixLinearColor(i.red,n.red,a),s.green=mixLinearColor(i.green,n.green,a),s.blue=mixLinearColor(i.blue,n.blue,a),s.alpha=mixNumber$1(i.alpha,n.alpha,a),rgba.transform(s))},combineFunctions=(e,t)=>i=>t(e(i)),pipe=(...e)=>e.reduce(combineFunctions),invisibleValues=new Set(["none","hidden"]);function mixVisibility(e,t){return invisibleValues.has(e)?i=>i<=0?e:t:i=>i>=1?t:e}function mixNumber(e,t){return i=>mixNumber$1(e,t,i)}function getMixer$1(e){return typeof e=="number"?mixNumber:typeof e=="string"?isCSSVariableToken(e)?mixImmediate:color.test(e)?mixColor:mixComplex:Array.isArray(e)?mixArray:typeof e=="object"?color.test(e)?mixColor:mixObject:mixImmediate}function mixArray(e,t){const i=[...e],n=i.length,s=e.map((a,o)=>getMixer$1(a)(a,t[o]));return a=>{for(let o=0;o<n;o++)i[o]=s[o](a);return i}}function mixObject(e,t){const i={...e,...t},n={};for(const s in i)e[s]!==void 0&&t[s]!==void 0&&(n[s]=getMixer$1(e[s])(e[s],t[s]));return s=>{for(const a in n)i[a]=n[a](s);return i}}function matchOrder(e,t){var i;const n=[],s={color:0,var:0,number:0};for(let a=0;a<t.values.length;a++){const o=t.types[a],l=e.indexes[o][s[o]],c=(i=e.values[l])!==null&&i!==void 0?i:0;n[a]=c,s[o]++}return n}const mixComplex=(e,t)=>{const i=complex.createTransformer(t),n=analyseComplexValue(e),s=analyseComplexValue(t);return n.indexes.var.length===s.indexes.var.length&&n.indexes.color.length===s.indexes.color.length&&n.indexes.number.length>=s.indexes.number.length?invisibleValues.has(e)&&!s.values.length||invisibleValues.has(t)&&!n.values.length?mixVisibility(e,t):pipe(mixArray(matchOrder(n,s),s.values),i):(warning(!0,`Complex values '${e}' and '${t}' too different to mix. Ensure all colors are of the same type, and that each contains the same quantity of number and color values. Falling back to instant transition.`),mixImmediate(e,t))};function mix(e,t,i){return typeof e=="number"&&typeof t=="number"&&typeof i=="number"?mixNumber$1(e,t,i):getMixer$1(e)(e,t)}const velocitySampleDuration=5;function calcGeneratorVelocity(e,t,i){const n=Math.max(t-velocitySampleDuration,0);return velocityPerSecond(i-e(n),t-n)}const springDefaults={stiffness:100,damping:10,mass:1,velocity:0,duration:800,bounce:.3,visualDuration:.3,restSpeed:{granular:.01,default:2},restDelta:{granular:.005,default:.5},minDuration:.01,maxDuration:10,minDamping:.05,maxDamping:1},safeMin=.001;function findSpring({duration:e=springDefaults.duration,bounce:t=springDefaults.bounce,velocity:i=springDefaults.velocity,mass:n=springDefaults.mass}){let s,a;warning(e<=secondsToMilliseconds(springDefaults.maxDuration),"Spring duration must be 10 seconds or less");let o=1-t;o=clamp(springDefaults.minDamping,springDefaults.maxDamping,o),e=clamp(springDefaults.minDuration,springDefaults.maxDuration,millisecondsToSeconds(e)),o<1?(s=u=>{const f=u*o,d=f*e,p=f-i,b=calcAngularFreq(u,o),y=Math.exp(-d);return safeMin-p/b*y},a=u=>{const d=u*o*e,p=d*i+i,b=Math.pow(o,2)*Math.pow(u,2)*e,y=Math.exp(-d),g=calcAngularFreq(Math.pow(u,2),o);return(-s(u)+safeMin>0?-1:1)*((p-b)*y)/g}):(s=u=>{const f=Math.exp(-u*e),d=(u-i)*e+1;return-safeMin+f*d},a=u=>{const f=Math.exp(-u*e),d=(i-u)*(e*e);return f*d});const l=5/e,c=approximateRoot(s,a,l);if(e=secondsToMilliseconds(e),isNaN(c))return{stiffness:springDefaults.stiffness,damping:springDefaults.damping,duration:e};{const u=Math.pow(c,2)*n;return{stiffness:u,damping:o*2*Math.sqrt(n*u),duration:e}}}const rootIterations=12;function approximateRoot(e,t,i){let n=i;for(let s=1;s<rootIterations;s++)n=n-e(n)/t(n);return n}function calcAngularFreq(e,t){return e*Math.sqrt(1-t*t)}const durationKeys=["duration","bounce"],physicsKeys=["stiffness","damping","mass"];function isSpringType(e,t){return t.some(i=>e[i]!==void 0)}function getSpringOptions(e){let t={velocity:springDefaults.velocity,stiffness:springDefaults.stiffness,damping:springDefaults.damping,mass:springDefaults.mass,isResolvedFromDuration:!1,...e};if(!isSpringType(e,physicsKeys)&&isSpringType(e,durationKeys))if(e.visualDuration){const i=e.visualDuration,n=2*Math.PI/(i*1.2),s=n*n,a=2*clamp(.05,1,1-(e.bounce||0))*Math.sqrt(s);t={...t,mass:springDefaults.mass,stiffness:s,damping:a}}else{const i=findSpring(e);t={...t,...i,mass:springDefaults.mass},t.isResolvedFromDuration=!0}return t}function spring(e=springDefaults.visualDuration,t=springDefaults.bounce){const i=typeof e!="object"?{visualDuration:e,keyframes:[0,1],bounce:t}:e;let{restSpeed:n,restDelta:s}=i;const a=i.keyframes[0],o=i.keyframes[i.keyframes.length-1],l={done:!1,value:a},{stiffness:c,damping:u,mass:f,duration:d,velocity:p,isResolvedFromDuration:b}=getSpringOptions({...i,velocity:-millisecondsToSeconds(i.velocity||0)}),y=p||0,g=u/(2*Math.sqrt(c*f)),P=o-a,m=millisecondsToSeconds(Math.sqrt(c/f)),x=Math.abs(P)<5;n||(n=x?springDefaults.restSpeed.granular:springDefaults.restSpeed.default),s||(s=x?springDefaults.restDelta.granular:springDefaults.restDelta.default);let C;if(g<1){const E=calcAngularFreq(m,g);C=T=>{const L=Math.exp(-g*m*T);return o-L*((y+g*m*P)/E*Math.sin(E*T)+P*Math.cos(E*T))}}else if(g===1)C=E=>o-Math.exp(-m*E)*(P+(y+m*P)*E);else{const E=m*Math.sqrt(g*g-1);C=T=>{const L=Math.exp(-g*m*T),_=Math.min(E*T,300);return o-L*((y+g*m*P)*Math.sinh(_)+E*P*Math.cosh(_))/E}}const S={calculatedDuration:b&&d||null,next:E=>{const T=C(E);if(b)l.done=E>=d;else{let L=0;g<1&&(L=E===0?secondsToMilliseconds(y):calcGeneratorVelocity(C,E,T));const _=Math.abs(L)<=n,k=Math.abs(o-T)<=s;l.done=_&&k}return l.value=l.done?o:T,l},toString:()=>{const E=Math.min(calcGeneratorDuration(S),maxGeneratorDuration),T=generateLinearEasing(L=>S.next(E*L).value,E,30);return E+"ms "+T}};return S}function inertia({keyframes:e,velocity:t=0,power:i=.8,timeConstant:n=325,bounceDamping:s=10,bounceStiffness:a=500,modifyTarget:o,min:l,max:c,restDelta:u=.5,restSpeed:f}){const d=e[0],p={done:!1,value:d},b=_=>l!==void 0&&_<l||c!==void 0&&_>c,y=_=>l===void 0?c:c===void 0||Math.abs(l-_)<Math.abs(c-_)?l:c;let g=i*t;const P=d+g,m=o===void 0?P:o(P);m!==P&&(g=m-d);const x=_=>-g*Math.exp(-_/n),C=_=>m+x(_),S=_=>{const k=x(_),Z=C(_);p.done=Math.abs(k)<=u,p.value=p.done?m:Z};let E,T;const L=_=>{b(p.value)&&(E=_,T=spring({keyframes:[p.value,y(p.value)],velocity:calcGeneratorVelocity(C,_,p.value),damping:s,stiffness:a,restDelta:u,restSpeed:f}))};return L(0),{calculatedDuration:null,next:_=>{let k=!1;return!T&&E===void 0&&(k=!0,S(_),L(_)),E!==void 0&&_>=E?T.next(_-E):(!k&&S(_),p)}}}const easeIn=cubicBezier(.42,0,1,1),easeOut=cubicBezier(0,0,.58,1),easeInOut=cubicBezier(.42,0,.58,1),isEasingArray=e=>Array.isArray(e)&&typeof e[0]!="number",easingLookup={linear:noop,easeIn,easeInOut,easeOut,circIn,circInOut,circOut,backIn,backInOut,backOut,anticipate},easingDefinitionToFunction=e=>{if(isBezierDefinition(e)){invariant(e.length===4,"Cubic bezier arrays must contain four numerical values.");const[t,i,n,s]=e;return cubicBezier(t,i,n,s)}else if(typeof e=="string")return invariant(easingLookup[e]!==void 0,`Invalid easing type '${e}'`),easingLookup[e];return e};function createMixers(e,t,i){const n=[],s=i||mix,a=e.length-1;for(let o=0;o<a;o++){let l=s(e[o],e[o+1]);if(t){const c=Array.isArray(t)?t[o]||noop:t;l=pipe(c,l)}n.push(l)}return n}function interpolate(e,t,{clamp:i=!0,ease:n,mixer:s}={}){const a=e.length;if(invariant(a===t.length,"Both input and output ranges must be the same length"),a===1)return()=>t[0];if(a===2&&t[0]===t[1])return()=>t[1];const o=e[0]===e[1];e[0]>e[a-1]&&(e=[...e].reverse(),t=[...t].reverse());const l=createMixers(t,n,s),c=l.length,u=f=>{if(o&&f<e[0])return t[0];let d=0;if(c>1)for(;d<e.length-2&&!(f<e[d+1]);d++);const p=progress(e[d],e[d+1],f);return l[d](p)};return i?f=>u(clamp(e[0],e[a-1],f)):u}function fillOffset(e,t){const i=e[e.length-1];for(let n=1;n<=t;n++){const s=progress(0,t,n);e.push(mixNumber$1(i,1,s))}}function defaultOffset(e){const t=[0];return fillOffset(t,e.length-1),t}function convertOffsetToTimes(e,t){return e.map(i=>i*t)}function defaultEasing(e,t){return e.map(()=>t||easeInOut).splice(0,e.length-1)}function keyframes({duration:e=300,keyframes:t,times:i,ease:n="easeInOut"}){const s=isEasingArray(n)?n.map(easingDefinitionToFunction):easingDefinitionToFunction(n),a={done:!1,value:t[0]},o=convertOffsetToTimes(i&&i.length===t.length?i:defaultOffset(t),e),l=interpolate(o,t,{ease:Array.isArray(s)?s:defaultEasing(t,s)});return{calculatedDuration:e,next:c=>(a.value=l(c),a.done=c>=e,a)}}const frameloopDriver=e=>{const t=({timestamp:i})=>e(i);return{start:()=>frame.update(t,!0),stop:()=>cancelFrame(t),now:()=>frameData.isProcessing?frameData.timestamp:time.now()}},generators={decay:inertia,inertia,tween:keyframes,keyframes,spring},percentToProgress=e=>e/100;class MainThreadAnimation extends BaseAnimation{constructor(t){super(t),this.holdTime=null,this.cancelTime=null,this.currentTime=0,this.playbackSpeed=1,this.pendingPlayState="running",this.startTime=null,this.state="idle",this.stop=()=>{if(this.resolver.cancel(),this.isStopped=!0,this.state==="idle")return;this.teardown();const{onStop:c}=this.options;c&&c()};const{name:i,motionValue:n,element:s,keyframes:a}=this.options,o=(s==null?void 0:s.KeyframeResolver)||KeyframeResolver,l=(c,u)=>this.onKeyframesResolved(c,u);this.resolver=new o(a,l,i,n,s),this.resolver.scheduleResolve()}flatten(){super.flatten(),this._resolved&&Object.assign(this._resolved,this.initPlayback(this._resolved.keyframes))}initPlayback(t){const{type:i="keyframes",repeat:n=0,repeatDelay:s=0,repeatType:a,velocity:o=0}=this.options,l=isGenerator(i)?i:generators[i]||keyframes;let c,u;l!==keyframes&&typeof t[0]!="number"&&(process.env.NODE_ENV!=="production"&&invariant(t.length===2,`Only two keyframes currently supported with spring and inertia animations. Trying to animate ${t}`),c=pipe(percentToProgress,mix(t[0],t[1])),t=[0,100]);const f=l({...this.options,keyframes:t});a==="mirror"&&(u=l({...this.options,keyframes:[...t].reverse(),velocity:-o})),f.calculatedDuration===null&&(f.calculatedDuration=calcGeneratorDuration(f));const{calculatedDuration:d}=f,p=d+s,b=p*(n+1)-s;return{generator:f,mirroredGenerator:u,mapPercentToKeyframes:c,calculatedDuration:d,resolvedDuration:p,totalDuration:b}}onPostResolved(){const{autoplay:t=!0}=this.options;this.play(),this.pendingPlayState==="paused"||!t?this.pause():this.state=this.pendingPlayState}tick(t,i=!1){const{resolved:n}=this;if(!n){const{keyframes:_}=this.options;return{done:!0,value:_[_.length-1]}}const{finalKeyframe:s,generator:a,mirroredGenerator:o,mapPercentToKeyframes:l,keyframes:c,calculatedDuration:u,totalDuration:f,resolvedDuration:d}=n;if(this.startTime===null)return a.next(0);const{delay:p,repeat:b,repeatType:y,repeatDelay:g,onUpdate:P}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,t):this.speed<0&&(this.startTime=Math.min(t-f/this.speed,this.startTime)),i?this.currentTime=t:this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=Math.round(t-this.startTime)*this.speed;const m=this.currentTime-p*(this.speed>=0?1:-1),x=this.speed>=0?m<0:m>f;this.currentTime=Math.max(m,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=f);let C=this.currentTime,S=a;if(b){const _=Math.min(this.currentTime,f)/d;let k=Math.floor(_),Z=_%1;!Z&&_>=1&&(Z=1),Z===1&&k--,k=Math.min(k,b+1),!!(k%2)&&(y==="reverse"?(Z=1-Z,g&&(Z-=g/d)):y==="mirror"&&(S=o)),C=clamp(0,1,Z)*d}const E=x?{done:!1,value:c[0]}:S.next(C);l&&(E.value=l(E.value));let{done:T}=E;!x&&u!==null&&(T=this.speed>=0?this.currentTime>=f:this.currentTime<=0);const L=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&T);return L&&s!==void 0&&(E.value=getFinalKeyframe(c,this.options,s)),P&&P(E.value),L&&this.finish(),E}get duration(){const{resolved:t}=this;return t?millisecondsToSeconds(t.calculatedDuration):0}get time(){return millisecondsToSeconds(this.currentTime)}set time(t){t=secondsToMilliseconds(t),this.currentTime=t,this.holdTime!==null||this.speed===0?this.holdTime=t:this.driver&&(this.startTime=this.driver.now()-t/this.speed)}get speed(){return this.playbackSpeed}set speed(t){const i=this.playbackSpeed!==t;this.playbackSpeed=t,i&&(this.time=millisecondsToSeconds(this.currentTime))}play(){if(this.resolver.isScheduled||this.resolver.resume(),!this._resolved){this.pendingPlayState="running";return}if(this.isStopped)return;const{driver:t=frameloopDriver,onPlay:i,startTime:n}=this.options;this.driver||(this.driver=t(a=>this.tick(a))),i&&i();const s=this.driver.now();this.holdTime!==null?this.startTime=s-this.holdTime:this.startTime?this.state==="finished"&&(this.startTime=s):this.startTime=n??this.calcStartTime(),this.state==="finished"&&this.updateFinishedPromise(),this.cancelTime=this.startTime,this.holdTime=null,this.state="running",this.driver.start()}pause(){var t;if(!this._resolved){this.pendingPlayState="paused";return}this.state="paused",this.holdTime=(t=this.currentTime)!==null&&t!==void 0?t:0}complete(){this.state!=="running"&&this.play(),this.pendingPlayState=this.state="finished",this.holdTime=null}finish(){this.teardown(),this.state="finished";const{onComplete:t}=this.options;t&&t()}cancel(){this.cancelTime!==null&&this.tick(this.cancelTime),this.teardown(),this.updateFinishedPromise()}teardown(){this.state="idle",this.stopDriver(),this.resolveFinishedPromise(),this.updateFinishedPromise(),this.startTime=this.cancelTime=null,this.resolver.cancel()}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(t){return this.startTime=0,this.tick(t,!0)}}const acceleratedValues=new Set(["opacity","clipPath","filter","transform"]);function startWaapiAnimation(e,t,i,{delay:n=0,duration:s=300,repeat:a=0,repeatType:o="loop",ease:l="easeInOut",times:c}={}){const u={[t]:i};c&&(u.offset=c);const f=mapEasingToNativeEasing(l,s);return Array.isArray(f)&&(u.easing=f),e.animate(u,{delay:n,duration:s,easing:Array.isArray(f)?"linear":f,fill:"both",iterations:a+1,direction:o==="reverse"?"alternate":"normal"})}const supportsWaapi=memo(()=>Object.hasOwnProperty.call(Element.prototype,"animate")),sampleDelta=10,maxDuration=2e4;function requiresPregeneratedKeyframes(e){return isGenerator(e.type)||e.type==="spring"||!isWaapiSupportedEasing(e.ease)}function pregenerateKeyframes(e,t){const i=new MainThreadAnimation({...t,keyframes:e,repeat:0,delay:0,isGenerator:!0});let n={done:!1,value:e[0]};const s=[];let a=0;for(;!n.done&&a<maxDuration;)n=i.sample(a),s.push(n.value),a+=sampleDelta;return{times:void 0,keyframes:s,duration:a-sampleDelta,ease:"linear"}}const unsupportedEasingFunctions={anticipate,backInOut,circInOut};function isUnsupportedEase(e){return e in unsupportedEasingFunctions}class AcceleratedAnimation extends BaseAnimation{constructor(t){super(t);const{name:i,motionValue:n,element:s,keyframes:a}=this.options;this.resolver=new DOMKeyframesResolver(a,(o,l)=>this.onKeyframesResolved(o,l),i,n,s),this.resolver.scheduleResolve()}initPlayback(t,i){let{duration:n=300,times:s,ease:a,type:o,motionValue:l,name:c,startTime:u}=this.options;if(!l.owner||!l.owner.current)return!1;if(typeof a=="string"&&supportsLinearEasing()&&isUnsupportedEase(a)&&(a=unsupportedEasingFunctions[a]),requiresPregeneratedKeyframes(this.options)){const{onComplete:d,onUpdate:p,motionValue:b,element:y,...g}=this.options,P=pregenerateKeyframes(t,g);t=P.keyframes,t.length===1&&(t[1]=t[0]),n=P.duration,s=P.times,a=P.ease,o="keyframes"}const f=startWaapiAnimation(l.owner.current,c,t,{...this.options,duration:n,times:s,ease:a});return f.startTime=u??this.calcStartTime(),this.pendingTimeline?(attachTimeline(f,this.pendingTimeline),this.pendingTimeline=void 0):f.onfinish=()=>{const{onComplete:d}=this.options;l.set(getFinalKeyframe(t,this.options,i)),d&&d(),this.cancel(),this.resolveFinishedPromise()},{animation:f,duration:n,times:s,type:o,ease:a,keyframes:t}}get duration(){const{resolved:t}=this;if(!t)return 0;const{duration:i}=t;return millisecondsToSeconds(i)}get time(){const{resolved:t}=this;if(!t)return 0;const{animation:i}=t;return millisecondsToSeconds(i.currentTime||0)}set time(t){const{resolved:i}=this;if(!i)return;const{animation:n}=i;n.currentTime=secondsToMilliseconds(t)}get speed(){const{resolved:t}=this;if(!t)return 1;const{animation:i}=t;return i.playbackRate}set speed(t){const{resolved:i}=this;if(!i)return;const{animation:n}=i;n.playbackRate=t}get state(){const{resolved:t}=this;if(!t)return"idle";const{animation:i}=t;return i.playState}get startTime(){const{resolved:t}=this;if(!t)return null;const{animation:i}=t;return i.startTime}attachTimeline(t){if(!this._resolved)this.pendingTimeline=t;else{const{resolved:i}=this;if(!i)return noop;const{animation:n}=i;attachTimeline(n,t)}return noop}play(){if(this.isStopped)return;const{resolved:t}=this;if(!t)return;const{animation:i}=t;i.playState==="finished"&&this.updateFinishedPromise(),i.play()}pause(){const{resolved:t}=this;if(!t)return;const{animation:i}=t;i.pause()}stop(){if(this.resolver.cancel(),this.isStopped=!0,this.state==="idle")return;this.resolveFinishedPromise(),this.updateFinishedPromise();const{resolved:t}=this;if(!t)return;const{animation:i,keyframes:n,duration:s,type:a,ease:o,times:l}=t;if(i.playState==="idle"||i.playState==="finished")return;if(this.time){const{motionValue:u,onUpdate:f,onComplete:d,element:p,...b}=this.options,y=new MainThreadAnimation({...b,keyframes:n,duration:s,type:a,ease:o,times:l,isGenerator:!0}),g=secondsToMilliseconds(this.time);u.setWithVelocity(y.sample(g-sampleDelta).value,y.sample(g).value,sampleDelta)}const{onStop:c}=this.options;c&&c(),this.cancel()}complete(){const{resolved:t}=this;t&&t.animation.finish()}cancel(){const{resolved:t}=this;t&&t.animation.cancel()}static supports(t){const{motionValue:i,name:n,repeatDelay:s,repeatType:a,damping:o,type:l}=t;if(!i||!i.owner||!(i.owner.current instanceof HTMLElement))return!1;const{onUpdate:c,transformTemplate:u}=i.owner.getProps();return supportsWaapi()&&n&&acceleratedValues.has(n)&&!c&&!u&&!s&&a!=="mirror"&&o!==0&&l!=="inertia"}}const underDampedSpring={type:"spring",stiffness:500,damping:25,restSpeed:10},criticallyDampedSpring=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),keyframesTransition={type:"keyframes",duration:.8},ease={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},getDefaultTransition=(e,{keyframes:t})=>t.length>2?keyframesTransition:transformProps.has(e)?e.startsWith("scale")?criticallyDampedSpring(t[1]):underDampedSpring:ease;function isTransitionDefined({when:e,delay:t,delayChildren:i,staggerChildren:n,staggerDirection:s,repeat:a,repeatType:o,repeatDelay:l,from:c,elapsed:u,...f}){return!!Object.keys(f).length}const animateMotionValue=(e,t,i,n={},s,a)=>o=>{const l=getValueTransition$1(n,e)||{},c=l.delay||n.delay||0;let{elapsed:u=0}=n;u=u-secondsToMilliseconds(c);let f={keyframes:Array.isArray(i)?i:[null,i],ease:"easeOut",velocity:t.getVelocity(),...l,delay:-u,onUpdate:p=>{t.set(p),l.onUpdate&&l.onUpdate(p)},onComplete:()=>{o(),l.onComplete&&l.onComplete()},name:e,motionValue:t,element:a?void 0:s};isTransitionDefined(l)||(f={...f,...getDefaultTransition(e,f)}),f.duration&&(f.duration=secondsToMilliseconds(f.duration)),f.repeatDelay&&(f.repeatDelay=secondsToMilliseconds(f.repeatDelay)),f.from!==void 0&&(f.keyframes[0]=f.from);let d=!1;if((f.type===!1||f.duration===0&&!f.repeatDelay)&&(f.duration=0,f.delay===0&&(d=!0)),d&&!a&&t.get()!==void 0){const p=getFinalKeyframe(f.keyframes,l);if(p!==void 0)return frame.update(()=>{f.onUpdate(p),f.onComplete()}),new GroupPlaybackControls([])}return!a&&AcceleratedAnimation.supports(f)?new AcceleratedAnimation(f):new MainThreadAnimation(f)};function shouldBlockAnimation({protectedKeys:e,needsAnimating:t},i){const n=e.hasOwnProperty(i)&&t[i]!==!0;return t[i]=!1,n}function animateTarget(e,t,{delay:i=0,transitionOverride:n,type:s}={}){var a;let{transition:o=e.getDefaultTransition(),transitionEnd:l,...c}=t;n&&(o=n);const u=[],f=s&&e.animationState&&e.animationState.getState()[s];for(const d in c){const p=e.getValue(d,(a=e.latestValues[d])!==null&&a!==void 0?a:null),b=c[d];if(b===void 0||f&&shouldBlockAnimation(f,d))continue;const y={delay:i,...getValueTransition$1(o||{},d)};let g=!1;if(window.MotionHandoffAnimation){const m=getOptimisedAppearId(e);if(m){const x=window.MotionHandoffAnimation(m,d,frame);x!==null&&(y.startTime=x,g=!0)}}addValueToWillChange(e,d),p.start(animateMotionValue(d,p,b,e.shouldReduceMotion&&positionalKeys.has(d)?{type:!1}:y,e,g));const P=p.animation;P&&u.push(P)}return l&&Promise.all(u).then(()=>{frame.update(()=>{l&&setTarget(e,l)})}),u}function animateVariant(e,t,i={}){var n;const s=resolveVariant(e,t,i.type==="exit"?(n=e.presenceContext)===null||n===void 0?void 0:n.custom:void 0);let{transition:a=e.getDefaultTransition()||{}}=s||{};i.transitionOverride&&(a=i.transitionOverride);const o=s?()=>Promise.all(animateTarget(e,s,i)):()=>Promise.resolve(),l=e.variantChildren&&e.variantChildren.size?(u=0)=>{const{delayChildren:f=0,staggerChildren:d,staggerDirection:p}=a;return animateChildren(e,t,f+u,d,p,i)}:()=>Promise.resolve(),{when:c}=a;if(c){const[u,f]=c==="beforeChildren"?[o,l]:[l,o];return u().then(()=>f())}else return Promise.all([o(),l(i.delay)])}function animateChildren(e,t,i=0,n=0,s=1,a){const o=[],l=(e.variantChildren.size-1)*n,c=s===1?(u=0)=>u*n:(u=0)=>l-u*n;return Array.from(e.variantChildren).sort(sortByTreeOrder).forEach((u,f)=>{u.notify("AnimationStart",t),o.push(animateVariant(u,t,{...a,delay:i+c(f)}).then(()=>u.notify("AnimationComplete",t)))}),Promise.all(o)}function sortByTreeOrder(e,t){return e.sortNodePosition(t)}function animateVisualElement(e,t,i={}){e.notify("AnimationStart",t);let n;if(Array.isArray(t)){const s=t.map(a=>animateVariant(e,a,i));n=Promise.all(s)}else if(typeof t=="string")n=animateVariant(e,t,i);else{const s=typeof t=="function"?resolveVariant(e,t,i.custom):t;n=Promise.all(animateTarget(e,s,i))}return n.then(()=>{e.notify("AnimationComplete",t)})}const numVariantProps=variantProps.length;function getVariantContext(e){if(!e)return;if(!e.isControllingVariants){const i=e.parent?getVariantContext(e.parent)||{}:{};return e.props.initial!==void 0&&(i.initial=e.props.initial),i}const t={};for(let i=0;i<numVariantProps;i++){const n=variantProps[i],s=e.props[n];(isVariantLabel(s)||s===!1)&&(t[n]=s)}return t}const reversePriorityOrder=[...variantPriorityOrder].reverse(),numAnimationTypes=variantPriorityOrder.length;function animateList(e){return t=>Promise.all(t.map(({animation:i,options:n})=>animateVisualElement(e,i,n)))}function createAnimationState(e){let t=animateList(e),i=createState(),n=!0;const s=c=>(u,f)=>{var d;const p=resolveVariant(e,f,c==="exit"?(d=e.presenceContext)===null||d===void 0?void 0:d.custom:void 0);if(p){const{transition:b,transitionEnd:y,...g}=p;u={...u,...g,...y}}return u};function a(c){t=c(e)}function o(c){const{props:u}=e,f=getVariantContext(e.parent)||{},d=[],p=new Set;let b={},y=1/0;for(let P=0;P<numAnimationTypes;P++){const m=reversePriorityOrder[P],x=i[m],C=u[m]!==void 0?u[m]:f[m],S=isVariantLabel(C),E=m===c?x.isActive:null;E===!1&&(y=P);let T=C===f[m]&&C!==u[m]&&S;if(T&&n&&e.manuallyAnimateOnMount&&(T=!1),x.protectedKeys={...b},!x.isActive&&E===null||!C&&!x.prevProp||isAnimationControls(C)||typeof C=="boolean")continue;const L=checkVariantsDidChange(x.prevProp,C);let _=L||m===c&&x.isActive&&!T&&S||P>y&&S,k=!1;const Z=Array.isArray(C)?C:[C];let B=Z.reduce(s(m),{});E===!1&&(B={});const{prevResolvedValues:D={}}=x,H={...D,...B},z=A=>{_=!0,p.has(A)&&(k=!0,p.delete(A)),x.needsAnimating[A]=!0;const R=e.getValue(A);R&&(R.liveStyle=!1)};for(const A in H){const R=B[A],M=D[A];if(b.hasOwnProperty(A))continue;let I=!1;isKeyframesTarget(R)&&isKeyframesTarget(M)?I=!shallowCompare(R,M):I=R!==M,I?R!=null?z(A):p.add(A):R!==void 0&&p.has(A)?z(A):x.protectedKeys[A]=!0}x.prevProp=C,x.prevResolvedValues=B,x.isActive&&(b={...b,...B}),n&&e.blockInitialAnimation&&(_=!1),_&&(!(T&&L)||k)&&d.push(...Z.map(A=>({animation:A,options:{type:m}})))}if(p.size){const P={};p.forEach(m=>{const x=e.getBaseTarget(m),C=e.getValue(m);C&&(C.liveStyle=!0),P[m]=x??null}),d.push({animation:P})}let g=!!d.length;return n&&(u.initial===!1||u.initial===u.animate)&&!e.manuallyAnimateOnMount&&(g=!1),n=!1,g?t(d):Promise.resolve()}function l(c,u){var f;if(i[c].isActive===u)return Promise.resolve();(f=e.variantChildren)===null||f===void 0||f.forEach(p=>{var b;return(b=p.animationState)===null||b===void 0?void 0:b.setActive(c,u)}),i[c].isActive=u;const d=o(c);for(const p in i)i[p].protectedKeys={};return d}return{animateChanges:o,setActive:l,setAnimateFunction:a,getState:()=>i,reset:()=>{i=createState(),n=!0}}}function checkVariantsDidChange(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!shallowCompare(t,e):!1}function createTypeState(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function createState(){return{animate:createTypeState(!0),whileInView:createTypeState(),whileHover:createTypeState(),whileTap:createTypeState(),whileDrag:createTypeState(),whileFocus:createTypeState(),exit:createTypeState()}}class Feature{constructor(t){this.isMounted=!1,this.node=t}update(){}}class AnimationFeature extends Feature{constructor(t){super(t),t.animationState||(t.animationState=createAnimationState(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();isAnimationControls(t)&&(this.unmountControls=t.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:t}=this.node.getProps(),{animate:i}=this.node.prevProps||{};t!==i&&this.updateAnimationControlsSubscription()}unmount(){var t;this.node.animationState.reset(),(t=this.unmountControls)===null||t===void 0||t.call(this)}}let id$1=0;class ExitAnimationFeature extends Feature{constructor(){super(...arguments),this.id=id$1++}update(){if(!this.node.presenceContext)return;const{isPresent:t,onExitComplete:i}=this.node.presenceContext,{isPresent:n}=this.node.prevPresenceContext||{};if(!this.node.animationState||t===n)return;const s=this.node.animationState.setActive("exit",!t);i&&!t&&s.then(()=>i(this.id))}mount(){const{register:t}=this.node.presenceContext||{};t&&(this.unmount=t(this.id))}unmount(){}}const animations={animation:{Feature:AnimationFeature},exit:{Feature:ExitAnimationFeature}};function addDomEvent(e,t,i,n={passive:!0}){return e.addEventListener(t,i,n),()=>e.removeEventListener(t,i)}function extractEventInfo(e){return{point:{x:e.pageX,y:e.pageY}}}const addPointerInfo=e=>t=>isPrimaryPointer(t)&&e(t,extractEventInfo(t));function addPointerEvent(e,t,i,n){return addDomEvent(e,t,addPointerInfo(i),n)}const distance=(e,t)=>Math.abs(e-t);function distance2D(e,t){const i=distance(e.x,t.x),n=distance(e.y,t.y);return Math.sqrt(i**2+n**2)}class PanSession{constructor(t,i,{transformPagePoint:n,contextWindow:s,dragSnapToOrigin:a=!1}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const d=getPanInfo(this.lastMoveEventInfo,this.history),p=this.startEvent!==null,b=distance2D(d.offset,{x:0,y:0})>=3;if(!p&&!b)return;const{point:y}=d,{timestamp:g}=frameData;this.history.push({...y,timestamp:g});const{onStart:P,onMove:m}=this.handlers;p||(P&&P(this.lastMoveEvent,d),this.startEvent=this.lastMoveEvent),m&&m(this.lastMoveEvent,d)},this.handlePointerMove=(d,p)=>{this.lastMoveEvent=d,this.lastMoveEventInfo=transformPoint(p,this.transformPagePoint),frame.update(this.updatePoint,!0)},this.handlePointerUp=(d,p)=>{this.end();const{onEnd:b,onSessionEnd:y,resumeAnimation:g}=this.handlers;if(this.dragSnapToOrigin&&g&&g(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const P=getPanInfo(d.type==="pointercancel"?this.lastMoveEventInfo:transformPoint(p,this.transformPagePoint),this.history);this.startEvent&&b&&b(d,P),y&&y(d,P)},!isPrimaryPointer(t))return;this.dragSnapToOrigin=a,this.handlers=i,this.transformPagePoint=n,this.contextWindow=s||window;const o=extractEventInfo(t),l=transformPoint(o,this.transformPagePoint),{point:c}=l,{timestamp:u}=frameData;this.history=[{...c,timestamp:u}];const{onSessionStart:f}=i;f&&f(t,getPanInfo(l,this.history)),this.removeListeners=pipe(addPointerEvent(this.contextWindow,"pointermove",this.handlePointerMove),addPointerEvent(this.contextWindow,"pointerup",this.handlePointerUp),addPointerEvent(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),cancelFrame(this.updatePoint)}}function transformPoint(e,t){return t?{point:t(e.point)}:e}function subtractPoint(e,t){return{x:e.x-t.x,y:e.y-t.y}}function getPanInfo({point:e},t){return{point:e,delta:subtractPoint(e,lastDevicePoint(t)),offset:subtractPoint(e,startDevicePoint(t)),velocity:getVelocity(t,.1)}}function startDevicePoint(e){return e[0]}function lastDevicePoint(e){return e[e.length-1]}function getVelocity(e,t){if(e.length<2)return{x:0,y:0};let i=e.length-1,n=null;const s=lastDevicePoint(e);for(;i>=0&&(n=e[i],!(s.timestamp-n.timestamp>secondsToMilliseconds(t)));)i--;if(!n)return{x:0,y:0};const a=millisecondsToSeconds(s.timestamp-n.timestamp);if(a===0)return{x:0,y:0};const o={x:(s.x-n.x)/a,y:(s.y-n.y)/a};return o.x===1/0&&(o.x=0),o.y===1/0&&(o.y=0),o}const SCALE_PRECISION=1e-4,SCALE_MIN=1-SCALE_PRECISION,SCALE_MAX=1+SCALE_PRECISION,TRANSLATE_PRECISION=.01,TRANSLATE_MIN=0-TRANSLATE_PRECISION,TRANSLATE_MAX=0+TRANSLATE_PRECISION;function calcLength(e){return e.max-e.min}function isNear(e,t,i){return Math.abs(e-t)<=i}function calcAxisDelta(e,t,i,n=.5){e.origin=n,e.originPoint=mixNumber$1(t.min,t.max,e.origin),e.scale=calcLength(i)/calcLength(t),e.translate=mixNumber$1(i.min,i.max,e.origin)-e.originPoint,(e.scale>=SCALE_MIN&&e.scale<=SCALE_MAX||isNaN(e.scale))&&(e.scale=1),(e.translate>=TRANSLATE_MIN&&e.translate<=TRANSLATE_MAX||isNaN(e.translate))&&(e.translate=0)}function calcBoxDelta(e,t,i,n){calcAxisDelta(e.x,t.x,i.x,n?n.originX:void 0),calcAxisDelta(e.y,t.y,i.y,n?n.originY:void 0)}function calcRelativeAxis(e,t,i){e.min=i.min+t.min,e.max=e.min+calcLength(t)}function calcRelativeBox(e,t,i){calcRelativeAxis(e.x,t.x,i.x),calcRelativeAxis(e.y,t.y,i.y)}function calcRelativeAxisPosition(e,t,i){e.min=t.min-i.min,e.max=e.min+calcLength(t)}function calcRelativePosition(e,t,i){calcRelativeAxisPosition(e.x,t.x,i.x),calcRelativeAxisPosition(e.y,t.y,i.y)}function applyConstraints(e,{min:t,max:i},n){return t!==void 0&&e<t?e=n?mixNumber$1(t,e,n.min):Math.max(e,t):i!==void 0&&e>i&&(e=n?mixNumber$1(i,e,n.max):Math.min(e,i)),e}function calcRelativeAxisConstraints(e,t,i){return{min:t!==void 0?e.min+t:void 0,max:i!==void 0?e.max+i-(e.max-e.min):void 0}}function calcRelativeConstraints(e,{top:t,left:i,bottom:n,right:s}){return{x:calcRelativeAxisConstraints(e.x,i,s),y:calcRelativeAxisConstraints(e.y,t,n)}}function calcViewportAxisConstraints(e,t){let i=t.min-e.min,n=t.max-e.max;return t.max-t.min<e.max-e.min&&([i,n]=[n,i]),{min:i,max:n}}function calcViewportConstraints(e,t){return{x:calcViewportAxisConstraints(e.x,t.x),y:calcViewportAxisConstraints(e.y,t.y)}}function calcOrigin(e,t){let i=.5;const n=calcLength(e),s=calcLength(t);return s>n?i=progress(t.min,t.max-n,e.min):n>s&&(i=progress(e.min,e.max-s,t.min)),clamp(0,1,i)}function rebaseAxisConstraints(e,t){const i={};return t.min!==void 0&&(i.min=t.min-e.min),t.max!==void 0&&(i.max=t.max-e.min),i}const defaultElastic=.35;function resolveDragElastic(e=defaultElastic){return e===!1?e=0:e===!0&&(e=defaultElastic),{x:resolveAxisElastic(e,"left","right"),y:resolveAxisElastic(e,"top","bottom")}}function resolveAxisElastic(e,t,i){return{min:resolvePointElastic(e,t),max:resolvePointElastic(e,i)}}function resolvePointElastic(e,t){return typeof e=="number"?e:e[t]||0}const createAxisDelta=()=>({translate:0,scale:1,origin:0,originPoint:0}),createDelta=()=>({x:createAxisDelta(),y:createAxisDelta()}),createAxis=()=>({min:0,max:0}),createBox=()=>({x:createAxis(),y:createAxis()});function eachAxis(e){return[e("x"),e("y")]}function convertBoundingBoxToBox({top:e,left:t,right:i,bottom:n}){return{x:{min:t,max:i},y:{min:e,max:n}}}function convertBoxToBoundingBox({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function transformBoxPoints(e,t){if(!t)return e;const i=t({x:e.left,y:e.top}),n=t({x:e.right,y:e.bottom});return{top:i.y,left:i.x,bottom:n.y,right:n.x}}function isIdentityScale(e){return e===void 0||e===1}function hasScale({scale:e,scaleX:t,scaleY:i}){return!isIdentityScale(e)||!isIdentityScale(t)||!isIdentityScale(i)}function hasTransform(e){return hasScale(e)||has2DTranslate(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function has2DTranslate(e){return is2DTranslate(e.x)||is2DTranslate(e.y)}function is2DTranslate(e){return e&&e!=="0%"}function scalePoint(e,t,i){const n=e-i,s=t*n;return i+s}function applyPointDelta(e,t,i,n,s){return s!==void 0&&(e=scalePoint(e,s,n)),scalePoint(e,i,n)+t}function applyAxisDelta(e,t=0,i=1,n,s){e.min=applyPointDelta(e.min,t,i,n,s),e.max=applyPointDelta(e.max,t,i,n,s)}function applyBoxDelta(e,{x:t,y:i}){applyAxisDelta(e.x,t.translate,t.scale,t.originPoint),applyAxisDelta(e.y,i.translate,i.scale,i.originPoint)}const TREE_SCALE_SNAP_MIN=.999999999999,TREE_SCALE_SNAP_MAX=1.0000000000001;function applyTreeDeltas(e,t,i,n=!1){const s=i.length;if(!s)return;t.x=t.y=1;let a,o;for(let l=0;l<s;l++){a=i[l],o=a.projectionDelta;const{visualElement:c}=a.options;c&&c.props.style&&c.props.style.display==="contents"||(n&&a.options.layoutScroll&&a.scroll&&a!==a.root&&transformBox(e,{x:-a.scroll.offset.x,y:-a.scroll.offset.y}),o&&(t.x*=o.x.scale,t.y*=o.y.scale,applyBoxDelta(e,o)),n&&hasTransform(a.latestValues)&&transformBox(e,a.latestValues))}t.x<TREE_SCALE_SNAP_MAX&&t.x>TREE_SCALE_SNAP_MIN&&(t.x=1),t.y<TREE_SCALE_SNAP_MAX&&t.y>TREE_SCALE_SNAP_MIN&&(t.y=1)}function translateAxis(e,t){e.min=e.min+t,e.max=e.max+t}function transformAxis(e,t,i,n,s=.5){const a=mixNumber$1(e.min,e.max,s);applyAxisDelta(e,t,i,a,n)}function transformBox(e,t){transformAxis(e.x,t.x,t.scaleX,t.scale,t.originX),transformAxis(e.y,t.y,t.scaleY,t.scale,t.originY)}function measureViewportBox(e,t){return convertBoundingBoxToBox(transformBoxPoints(e.getBoundingClientRect(),t))}function measurePageBox(e,t,i){const n=measureViewportBox(e,i),{scroll:s}=t;return s&&(translateAxis(n.x,s.offset.x),translateAxis(n.y,s.offset.y)),n}const getContextWindow=({current:e})=>e?e.ownerDocument.defaultView:null,elementDragControls=new WeakMap;class VisualElementDragControls{constructor(t){this.openDragLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=createBox(),this.visualElement=t}start(t,{snapToCursor:i=!1}={}){const{presenceContext:n}=this.visualElement;if(n&&n.isPresent===!1)return;const s=f=>{const{dragSnapToOrigin:d}=this.getProps();d?this.pauseAnimation():this.stopAnimation(),i&&this.snapToCursor(extractEventInfo(f).point)},a=(f,d)=>{const{drag:p,dragPropagation:b,onDragStart:y}=this.getProps();if(p&&!b&&(this.openDragLock&&this.openDragLock(),this.openDragLock=setDragLock(p),!this.openDragLock))return;this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),eachAxis(P=>{let m=this.getAxisMotionValue(P).get()||0;if(percent.test(m)){const{projection:x}=this.visualElement;if(x&&x.layout){const C=x.layout.layoutBox[P];C&&(m=calcLength(C)*(parseFloat(m)/100))}}this.originPoint[P]=m}),y&&frame.postRender(()=>y(f,d)),addValueToWillChange(this.visualElement,"transform");const{animationState:g}=this.visualElement;g&&g.setActive("whileDrag",!0)},o=(f,d)=>{const{dragPropagation:p,dragDirectionLock:b,onDirectionLock:y,onDrag:g}=this.getProps();if(!p&&!this.openDragLock)return;const{offset:P}=d;if(b&&this.currentDirection===null){this.currentDirection=getCurrentDirection(P),this.currentDirection!==null&&y&&y(this.currentDirection);return}this.updateAxis("x",d.point,P),this.updateAxis("y",d.point,P),this.visualElement.render(),g&&g(f,d)},l=(f,d)=>this.stop(f,d),c=()=>eachAxis(f=>{var d;return this.getAnimationState(f)==="paused"&&((d=this.getAxisMotionValue(f).animation)===null||d===void 0?void 0:d.play())}),{dragSnapToOrigin:u}=this.getProps();this.panSession=new PanSession(t,{onSessionStart:s,onStart:a,onMove:o,onSessionEnd:l,resumeAnimation:c},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:u,contextWindow:getContextWindow(this.visualElement)})}stop(t,i){const n=this.isDragging;if(this.cancel(),!n)return;const{velocity:s}=i;this.startAnimation(s);const{onDragEnd:a}=this.getProps();a&&frame.postRender(()=>a(t,i))}cancel(){this.isDragging=!1;const{projection:t,animationState:i}=this.visualElement;t&&(t.isAnimationBlocked=!1),this.panSession&&this.panSession.end(),this.panSession=void 0;const{dragPropagation:n}=this.getProps();!n&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),i&&i.setActive("whileDrag",!1)}updateAxis(t,i,n){const{drag:s}=this.getProps();if(!n||!shouldDrag(t,s,this.currentDirection))return;const a=this.getAxisMotionValue(t);let o=this.originPoint[t]+n[t];this.constraints&&this.constraints[t]&&(o=applyConstraints(o,this.constraints[t],this.elastic[t])),a.set(o)}resolveConstraints(){var t;const{dragConstraints:i,dragElastic:n}=this.getProps(),s=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):(t=this.visualElement.projection)===null||t===void 0?void 0:t.layout,a=this.constraints;i&&isRefObject(i)?this.constraints||(this.constraints=this.resolveRefConstraints()):i&&s?this.constraints=calcRelativeConstraints(s.layoutBox,i):this.constraints=!1,this.elastic=resolveDragElastic(n),a!==this.constraints&&s&&this.constraints&&!this.hasMutatedConstraints&&eachAxis(o=>{this.constraints!==!1&&this.getAxisMotionValue(o)&&(this.constraints[o]=rebaseAxisConstraints(s.layoutBox[o],this.constraints[o]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:i}=this.getProps();if(!t||!isRefObject(t))return!1;const n=t.current;invariant(n!==null,"If `dragConstraints` is set as a React ref, that ref must be passed to another component's `ref` prop.");const{projection:s}=this.visualElement;if(!s||!s.layout)return!1;const a=measurePageBox(n,s.root,this.visualElement.getTransformPagePoint());let o=calcViewportConstraints(s.layout.layoutBox,a);if(i){const l=i(convertBoxToBoundingBox(o));this.hasMutatedConstraints=!!l,l&&(o=convertBoundingBoxToBox(l))}return o}startAnimation(t){const{drag:i,dragMomentum:n,dragElastic:s,dragTransition:a,dragSnapToOrigin:o,onDragTransitionEnd:l}=this.getProps(),c=this.constraints||{},u=eachAxis(f=>{if(!shouldDrag(f,i,this.currentDirection))return;let d=c&&c[f]||{};o&&(d={min:0,max:0});const p=s?200:1e6,b=s?40:1e7,y={type:"inertia",velocity:n?t[f]:0,bounceStiffness:p,bounceDamping:b,timeConstant:750,restDelta:1,restSpeed:10,...a,...d};return this.startAxisValueAnimation(f,y)});return Promise.all(u).then(l)}startAxisValueAnimation(t,i){const n=this.getAxisMotionValue(t);return addValueToWillChange(this.visualElement,t),n.start(animateMotionValue(t,n,0,i,this.visualElement,!1))}stopAnimation(){eachAxis(t=>this.getAxisMotionValue(t).stop())}pauseAnimation(){eachAxis(t=>{var i;return(i=this.getAxisMotionValue(t).animation)===null||i===void 0?void 0:i.pause()})}getAnimationState(t){var i;return(i=this.getAxisMotionValue(t).animation)===null||i===void 0?void 0:i.state}getAxisMotionValue(t){const i=`_drag${t.toUpperCase()}`,n=this.visualElement.getProps(),s=n[i];return s||this.visualElement.getValue(t,(n.initial?n.initial[t]:void 0)||0)}snapToCursor(t){eachAxis(i=>{const{drag:n}=this.getProps();if(!shouldDrag(i,n,this.currentDirection))return;const{projection:s}=this.visualElement,a=this.getAxisMotionValue(i);if(s&&s.layout){const{min:o,max:l}=s.layout.layoutBox[i];a.set(t[i]-mixNumber$1(o,l,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:i}=this.getProps(),{projection:n}=this.visualElement;if(!isRefObject(i)||!n||!this.constraints)return;this.stopAnimation();const s={x:0,y:0};eachAxis(o=>{const l=this.getAxisMotionValue(o);if(l&&this.constraints!==!1){const c=l.get();s[o]=calcOrigin({min:c,max:c},this.constraints[o])}});const{transformTemplate:a}=this.visualElement.getProps();this.visualElement.current.style.transform=a?a({},""):"none",n.root&&n.root.updateScroll(),n.updateLayout(),this.resolveConstraints(),eachAxis(o=>{if(!shouldDrag(o,t,null))return;const l=this.getAxisMotionValue(o),{min:c,max:u}=this.constraints[o];l.set(mixNumber$1(c,u,s[o]))})}addListeners(){if(!this.visualElement.current)return;elementDragControls.set(this.visualElement,this);const t=this.visualElement.current,i=addPointerEvent(t,"pointerdown",c=>{const{drag:u,dragListener:f=!0}=this.getProps();u&&f&&this.start(c)}),n=()=>{const{dragConstraints:c}=this.getProps();isRefObject(c)&&c.current&&(this.constraints=this.resolveRefConstraints())},{projection:s}=this.visualElement,a=s.addEventListener("measure",n);s&&!s.layout&&(s.root&&s.root.updateScroll(),s.updateLayout()),frame.read(n);const o=addDomEvent(window,"resize",()=>this.scalePositionWithinConstraints()),l=s.addEventListener("didUpdate",({delta:c,hasLayoutChanged:u})=>{this.isDragging&&u&&(eachAxis(f=>{const d=this.getAxisMotionValue(f);d&&(this.originPoint[f]+=c[f].translate,d.set(d.get()+c[f].translate))}),this.visualElement.render())});return()=>{o(),i(),a(),l&&l()}}getProps(){const t=this.visualElement.getProps(),{drag:i=!1,dragDirectionLock:n=!1,dragPropagation:s=!1,dragConstraints:a=!1,dragElastic:o=defaultElastic,dragMomentum:l=!0}=t;return{...t,drag:i,dragDirectionLock:n,dragPropagation:s,dragConstraints:a,dragElastic:o,dragMomentum:l}}}function shouldDrag(e,t,i){return(t===!0||t===e)&&(i===null||i===e)}function getCurrentDirection(e,t=10){let i=null;return Math.abs(e.y)>t?i="y":Math.abs(e.x)>t&&(i="x"),i}class DragGesture extends Feature{constructor(t){super(t),this.removeGroupControls=noop,this.removeListeners=noop,this.controls=new VisualElementDragControls(t)}mount(){const{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||noop}unmount(){this.removeGroupControls(),this.removeListeners()}}const asyncHandler=e=>(t,i)=>{e&&frame.postRender(()=>e(t,i))};class PanGesture extends Feature{constructor(){super(...arguments),this.removePointerDownListener=noop}onPointerDown(t){this.session=new PanSession(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:getContextWindow(this.node)})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:i,onPan:n,onPanEnd:s}=this.node.getProps();return{onSessionStart:asyncHandler(t),onStart:asyncHandler(i),onMove:n,onEnd:(a,o)=>{delete this.session,s&&frame.postRender(()=>s(a,o))}}}mount(){this.removePointerDownListener=addPointerEvent(this.node.current,"pointerdown",t=>this.onPointerDown(t))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}const globalProjectionState={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function pixelsToPercent(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const correctBorderRadius={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if(px.test(e))e=parseFloat(e);else return e;const i=pixelsToPercent(e,t.target.x),n=pixelsToPercent(e,t.target.y);return`${i}% ${n}%`}},correctBoxShadow={correct:(e,{treeScale:t,projectionDelta:i})=>{const n=e,s=complex.parse(e);if(s.length>5)return n;const a=complex.createTransformer(e),o=typeof s[0]!="number"?1:0,l=i.x.scale*t.x,c=i.y.scale*t.y;s[0+o]/=l,s[1+o]/=c;const u=mixNumber$1(l,c,.5);return typeof s[2+o]=="number"&&(s[2+o]/=u),typeof s[3+o]=="number"&&(s[3+o]/=u),a(s)}};class MeasureLayoutWithContext extends React.Component{componentDidMount(){const{visualElement:t,layoutGroup:i,switchLayoutGroup:n,layoutId:s}=this.props,{projection:a}=t;addScaleCorrector(defaultScaleCorrectors),a&&(i.group&&i.group.add(a),n&&n.register&&s&&n.register(a),a.root.didUpdate(),a.addEventListener("animationComplete",()=>{this.safeToRemove()}),a.setOptions({...a.options,onExitComplete:()=>this.safeToRemove()})),globalProjectionState.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){const{layoutDependency:i,visualElement:n,drag:s,isPresent:a}=this.props,o=n.projection;return o&&(o.isPresent=a,s||t.layoutDependency!==i||i===void 0?o.willUpdate():this.safeToRemove(),t.isPresent!==a&&(a?o.promote():o.relegate()||frame.postRender(()=>{const l=o.getStack();(!l||!l.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:t}=this.props.visualElement;t&&(t.root.didUpdate(),microtask.postRender(()=>{!t.currentAnimation&&t.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:t,layoutGroup:i,switchLayoutGroup:n}=this.props,{projection:s}=t;s&&(s.scheduleCheckAfterUnmount(),i&&i.group&&i.group.remove(s),n&&n.deregister&&n.deregister(s))}safeToRemove(){const{safeToRemove:t}=this.props;t&&t()}render(){return null}}function MeasureLayout(e){const[t,i]=usePresence(),n=React.useContext(LayoutGroupContext);return jsxRuntime.jsx(MeasureLayoutWithContext,{...e,layoutGroup:n,switchLayoutGroup:React.useContext(SwitchLayoutGroupContext),isPresent:t,safeToRemove:i})}const defaultScaleCorrectors={borderRadius:{...correctBorderRadius,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:correctBorderRadius,borderTopRightRadius:correctBorderRadius,borderBottomLeftRadius:correctBorderRadius,borderBottomRightRadius:correctBorderRadius,boxShadow:correctBoxShadow};function animateSingleValue(e,t,i){const n=isMotionValue(e)?e:motionValue(e);return n.start(animateMotionValue("",n,t,i)),n.animation}function isSVGElement(e){return e instanceof SVGElement&&e.tagName!=="svg"}const compareByDepth=(e,t)=>e.depth-t.depth;class FlatTree{constructor(){this.children=[],this.isDirty=!1}add(t){addUniqueItem(this.children,t),this.isDirty=!0}remove(t){removeItem(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(compareByDepth),this.isDirty=!1,this.children.forEach(t)}}function delay(e,t){const i=time.now(),n=({timestamp:s})=>{const a=s-i;a>=t&&(cancelFrame(n),e(a-t))};return frame.read(n,!0),()=>cancelFrame(n)}const borders=["TopLeft","TopRight","BottomLeft","BottomRight"],numBorders=borders.length,asNumber=e=>typeof e=="string"?parseFloat(e):e,isPx=e=>typeof e=="number"||px.test(e);function mixValues(e,t,i,n,s,a){s?(e.opacity=mixNumber$1(0,i.opacity!==void 0?i.opacity:1,easeCrossfadeIn(n)),e.opacityExit=mixNumber$1(t.opacity!==void 0?t.opacity:1,0,easeCrossfadeOut(n))):a&&(e.opacity=mixNumber$1(t.opacity!==void 0?t.opacity:1,i.opacity!==void 0?i.opacity:1,n));for(let o=0;o<numBorders;o++){const l=`border${borders[o]}Radius`;let c=getRadius(t,l),u=getRadius(i,l);if(c===void 0&&u===void 0)continue;c||(c=0),u||(u=0),c===0||u===0||isPx(c)===isPx(u)?(e[l]=Math.max(mixNumber$1(asNumber(c),asNumber(u),n),0),(percent.test(u)||percent.test(c))&&(e[l]+="%")):e[l]=u}(t.rotate||i.rotate)&&(e.rotate=mixNumber$1(t.rotate||0,i.rotate||0,n))}function getRadius(e,t){return e[t]!==void 0?e[t]:e.borderRadius}const easeCrossfadeIn=compress(0,.5,circOut),easeCrossfadeOut=compress(.5,.95,noop);function compress(e,t,i){return n=>n<e?0:n>t?1:i(progress(e,t,n))}function copyAxisInto(e,t){e.min=t.min,e.max=t.max}function copyBoxInto(e,t){copyAxisInto(e.x,t.x),copyAxisInto(e.y,t.y)}function copyAxisDeltaInto(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}function removePointDelta(e,t,i,n,s){return e-=t,e=scalePoint(e,1/i,n),s!==void 0&&(e=scalePoint(e,1/s,n)),e}function removeAxisDelta(e,t=0,i=1,n=.5,s,a=e,o=e){if(percent.test(t)&&(t=parseFloat(t),t=mixNumber$1(o.min,o.max,t/100)-o.min),typeof t!="number")return;let l=mixNumber$1(a.min,a.max,n);e===a&&(l-=t),e.min=removePointDelta(e.min,t,i,l,s),e.max=removePointDelta(e.max,t,i,l,s)}function removeAxisTransforms(e,t,[i,n,s],a,o){removeAxisDelta(e,t[i],t[n],t[s],t.scale,a,o)}const xKeys=["x","scaleX","originX"],yKeys=["y","scaleY","originY"];function removeBoxTransforms(e,t,i,n){removeAxisTransforms(e.x,t,xKeys,i?i.x:void 0,n?n.x:void 0),removeAxisTransforms(e.y,t,yKeys,i?i.y:void 0,n?n.y:void 0)}function isAxisDeltaZero(e){return e.translate===0&&e.scale===1}function isDeltaZero(e){return isAxisDeltaZero(e.x)&&isAxisDeltaZero(e.y)}function axisEquals(e,t){return e.min===t.min&&e.max===t.max}function boxEquals(e,t){return axisEquals(e.x,t.x)&&axisEquals(e.y,t.y)}function axisEqualsRounded(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function boxEqualsRounded(e,t){return axisEqualsRounded(e.x,t.x)&&axisEqualsRounded(e.y,t.y)}function aspectRatio(e){return calcLength(e.x)/calcLength(e.y)}function axisDeltaEquals(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}class NodeStack{constructor(){this.members=[]}add(t){addUniqueItem(this.members,t),t.scheduleRender()}remove(t){if(removeItem(this.members,t),t===this.prevLead&&(this.prevLead=void 0),t===this.lead){const i=this.members[this.members.length-1];i&&this.promote(i)}}relegate(t){const i=this.members.findIndex(s=>t===s);if(i===0)return!1;let n;for(let s=i;s>=0;s--){const a=this.members[s];if(a.isPresent!==!1){n=a;break}}return n?(this.promote(n),!0):!1}promote(t,i){const n=this.lead;if(t!==n&&(this.prevLead=n,this.lead=t,t.show(),n)){n.instance&&n.scheduleRender(),t.scheduleRender(),t.resumeFrom=n,i&&(t.resumeFrom.preserveOpacity=!0),n.snapshot&&(t.snapshot=n.snapshot,t.snapshot.latestValues=n.animationValues||n.latestValues),t.root&&t.root.isUpdating&&(t.isLayoutDirty=!0);const{crossfade:s}=t.options;s===!1&&n.hide()}}exitAnimationComplete(){this.members.forEach(t=>{const{options:i,resumingFrom:n}=t;i.onExitComplete&&i.onExitComplete(),n&&n.options.onExitComplete&&n.options.onExitComplete()})}scheduleRender(){this.members.forEach(t=>{t.instance&&t.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}function buildProjectionTransform(e,t,i){let n="";const s=e.x.translate/t.x,a=e.y.translate/t.y,o=(i==null?void 0:i.z)||0;if((s||a||o)&&(n=`translate3d(${s}px, ${a}px, ${o}px) `),(t.x!==1||t.y!==1)&&(n+=`scale(${1/t.x}, ${1/t.y}) `),i){const{transformPerspective:u,rotate:f,rotateX:d,rotateY:p,skewX:b,skewY:y}=i;u&&(n=`perspective(${u}px) ${n}`),f&&(n+=`rotate(${f}deg) `),d&&(n+=`rotateX(${d}deg) `),p&&(n+=`rotateY(${p}deg) `),b&&(n+=`skewX(${b}deg) `),y&&(n+=`skewY(${y}deg) `)}const l=e.x.scale*t.x,c=e.y.scale*t.y;return(l!==1||c!==1)&&(n+=`scale(${l}, ${c})`),n||"none"}const metrics={type:"projectionFrame",totalNodes:0,resolvedTargetDeltas:0,recalculatedProjection:0},isDebug=typeof window<"u"&&window.MotionDebug!==void 0,transformAxes=["","X","Y","Z"],hiddenVisibility={visibility:"hidden"},animationTarget=1e3;let id=0;function resetDistortingTransform(e,t,i,n){const{latestValues:s}=t;s[e]&&(i[e]=s[e],t.setStaticValue(e,0),n&&(n[e]=0))}function cancelTreeOptimisedTransformAnimations(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;const{visualElement:t}=e.options;if(!t)return;const i=getOptimisedAppearId(t);if(window.MotionHasOptimisedAnimation(i,"transform")){const{layout:s,layoutId:a}=e.options;window.MotionCancelOptimisedAnimation(i,"transform",frame,!(s||a))}const{parent:n}=e;n&&!n.hasCheckedOptimisedAppear&&cancelTreeOptimisedTransformAnimations(n)}function createProjectionNode({attachResizeListener:e,defaultParent:t,measureScroll:i,checkIsScrollRoot:n,resetTransform:s}){return class{constructor(o={},l=t==null?void 0:t()){this.id=id++,this.animationId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.hasCheckedOptimisedAppear=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,isDebug&&(metrics.totalNodes=metrics.resolvedTargetDeltas=metrics.recalculatedProjection=0),this.nodes.forEach(propagateDirtyNodes),this.nodes.forEach(resolveTargetDelta),this.nodes.forEach(calcProjection),this.nodes.forEach(cleanDirtyNodes),isDebug&&window.MotionDebug.record(metrics)},this.resolvedRelativeTargetAt=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=o,this.root=l?l.root||l:this,this.path=l?[...l.path,l]:[],this.parent=l,this.depth=l?l.depth+1:0;for(let c=0;c<this.path.length;c++)this.path[c].shouldResetTransform=!0;this.root===this&&(this.nodes=new FlatTree)}addEventListener(o,l){return this.eventHandlers.has(o)||this.eventHandlers.set(o,new SubscriptionManager),this.eventHandlers.get(o).add(l)}notifyListeners(o,...l){const c=this.eventHandlers.get(o);c&&c.notify(...l)}hasListeners(o){return this.eventHandlers.has(o)}mount(o,l=this.root.hasTreeAnimated){if(this.instance)return;this.isSVG=isSVGElement(o),this.instance=o;const{layoutId:c,layout:u,visualElement:f}=this.options;if(f&&!f.current&&f.mount(o),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),l&&(u||c)&&(this.isLayoutDirty=!0),e){let d;const p=()=>this.root.updateBlockedByResize=!1;e(o,()=>{this.root.updateBlockedByResize=!0,d&&d(),d=delay(p,250),globalProjectionState.hasAnimatedSinceResize&&(globalProjectionState.hasAnimatedSinceResize=!1,this.nodes.forEach(finishAnimation))})}c&&this.root.registerSharedNode(c,this),this.options.animate!==!1&&f&&(c||u)&&this.addEventListener("didUpdate",({delta:d,hasLayoutChanged:p,hasRelativeTargetChanged:b,layout:y})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const g=this.options.transition||f.getDefaultTransition()||defaultLayoutTransition,{onLayoutAnimationStart:P,onLayoutAnimationComplete:m}=f.getProps(),x=!this.targetLayout||!boxEqualsRounded(this.targetLayout,y)||b,C=!p&&b;if(this.options.layoutRoot||this.resumeFrom&&this.resumeFrom.instance||C||p&&(x||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0),this.setAnimationOrigin(d,C);const S={...getValueTransition$1(g,"layout"),onPlay:P,onComplete:m};(f.shouldReduceMotion||this.options.layoutRoot)&&(S.delay=0,S.type=!1),this.startAnimation(S)}else p||finishAnimation(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=y})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const o=this.getStack();o&&o.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,cancelFrame(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){return this.isAnimationBlocked||this.parent&&this.parent.isTreeAnimationBlocked()||!1}startUpdate(){this.isUpdateBlocked()||(this.isUpdating=!0,this.nodes&&this.nodes.forEach(resetSkewAndRotation),this.animationId++)}getTransformTemplate(){const{visualElement:o}=this.options;return o&&o.getProps().transformTemplate}willUpdate(o=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&cancelTreeOptimisedTransformAnimations(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let f=0;f<this.path.length;f++){const d=this.path[f];d.shouldResetTransform=!0,d.updateScroll("snapshot"),d.options.layoutRoot&&d.willUpdate(!1)}const{layoutId:l,layout:c}=this.options;if(l===void 0&&!c)return;const u=this.getTransformTemplate();this.prevTransformTemplateValue=u?u(this.latestValues,""):void 0,this.updateSnapshot(),o&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){this.unblockUpdate(),this.clearAllSnapshots(),this.nodes.forEach(clearMeasurements);return}this.isUpdating||this.nodes.forEach(clearIsLayoutDirty),this.isUpdating=!1,this.nodes.forEach(resetTransformStyle),this.nodes.forEach(updateLayout),this.nodes.forEach(notifyLayoutUpdate),this.clearAllSnapshots();const l=time.now();frameData.delta=clamp(0,1e3/60,l-frameData.timestamp),frameData.timestamp=l,frameData.isProcessing=!0,frameSteps.update.process(frameData),frameSteps.preRender.process(frameData),frameSteps.render.process(frameData),frameData.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,microtask.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(clearSnapshot),this.sharedNodes.forEach(removeLeadSnapshots)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,frame.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){frame.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure())}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let c=0;c<this.path.length;c++)this.path[c].updateScroll();const o=this.layout;this.layout=this.measure(!1),this.layoutCorrected=createBox(),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:l}=this.options;l&&l.notify("LayoutMeasure",this.layout.layoutBox,o?o.layoutBox:void 0)}updateScroll(o="measure"){let l=!!(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===o&&(l=!1),l){const c=n(this.instance);this.scroll={animationId:this.root.animationId,phase:o,isRoot:c,offset:i(this.instance),wasRoot:this.scroll?this.scroll.isRoot:c}}}resetTransform(){if(!s)return;const o=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,l=this.projectionDelta&&!isDeltaZero(this.projectionDelta),c=this.getTransformTemplate(),u=c?c(this.latestValues,""):void 0,f=u!==this.prevTransformTemplateValue;o&&(l||hasTransform(this.latestValues)||f)&&(s(this.instance,u),this.shouldResetTransform=!1,this.scheduleRender())}measure(o=!0){const l=this.measurePageBox();let c=this.removeElementScroll(l);return o&&(c=this.removeTransform(c)),roundBox(c),{animationId:this.root.animationId,measuredBox:l,layoutBox:c,latestValues:{},source:this.id}}measurePageBox(){var o;const{visualElement:l}=this.options;if(!l)return createBox();const c=l.measureViewportBox();if(!(((o=this.scroll)===null||o===void 0?void 0:o.wasRoot)||this.path.some(checkNodeWasScrollRoot))){const{scroll:f}=this.root;f&&(translateAxis(c.x,f.offset.x),translateAxis(c.y,f.offset.y))}return c}removeElementScroll(o){var l;const c=createBox();if(copyBoxInto(c,o),!((l=this.scroll)===null||l===void 0)&&l.wasRoot)return c;for(let u=0;u<this.path.length;u++){const f=this.path[u],{scroll:d,options:p}=f;f!==this.root&&d&&p.layoutScroll&&(d.wasRoot&©BoxInto(c,o),translateAxis(c.x,d.offset.x),translateAxis(c.y,d.offset.y))}return c}applyTransform(o,l=!1){const c=createBox();copyBoxInto(c,o);for(let u=0;u<this.path.length;u++){const f=this.path[u];!l&&f.options.layoutScroll&&f.scroll&&f!==f.root&&transformBox(c,{x:-f.scroll.offset.x,y:-f.scroll.offset.y}),hasTransform(f.latestValues)&&transformBox(c,f.latestValues)}return hasTransform(this.latestValues)&&transformBox(c,this.latestValues),c}removeTransform(o){const l=createBox();copyBoxInto(l,o);for(let c=0;c<this.path.length;c++){const u=this.path[c];if(!u.instance||!hasTransform(u.latestValues))continue;hasScale(u.latestValues)&&u.updateSnapshot();const f=createBox(),d=u.measurePageBox();copyBoxInto(f,d),removeBoxTransforms(l,u.latestValues,u.snapshot?u.snapshot.layoutBox:void 0,f)}return hasTransform(this.latestValues)&&removeBoxTransforms(l,this.latestValues),l}setTargetDelta(o){this.targetDelta=o,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(o){this.options={...this.options,...o,crossfade:o.crossfade!==void 0?o.crossfade:!0}}clearMeasurements(){this.scroll=void 0,this.layout=void 0,this.snapshot=void 0,this.prevTransformTemplateValue=void 0,this.targetDelta=void 0,this.target=void 0,this.isLayoutDirty=!1}forceRelativeParentToResolveTarget(){this.relativeParent&&this.relativeParent.resolvedRelativeTargetAt!==frameData.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(o=!1){var l;const c=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=c.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=c.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=c.isSharedProjectionDirty);const u=!!this.resumingFrom||this!==c;if(!(o||u&&this.isSharedProjectionDirty||this.isProjectionDirty||!((l=this.parent)===null||l===void 0)&&l.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:d,layoutId:p}=this.options;if(!(!this.layout||!(d||p))){if(this.resolvedRelativeTargetAt=frameData.timestamp,!this.targetDelta&&!this.relativeTarget){const b=this.getClosestProjectingParent();b&&b.layout&&this.animationProgress!==1?(this.relativeParent=b,this.forceRelativeParentToResolveTarget(),this.relativeTarget=createBox(),this.relativeTargetOrigin=createBox(),calcRelativePosition(this.relativeTargetOrigin,this.layout.layoutBox,b.layout.layoutBox),copyBoxInto(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}if(!(!this.relativeTarget&&!this.targetDelta)){if(this.target||(this.target=createBox(),this.targetWithTransforms=createBox()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),calcRelativeBox(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):copyBoxInto(this.target,this.layout.layoutBox),applyBoxDelta(this.target,this.targetDelta)):copyBoxInto(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget){this.attemptToResolveRelativeTarget=!1;const b=this.getClosestProjectingParent();b&&!!b.resumingFrom==!!this.resumingFrom&&!b.options.layoutScroll&&b.target&&this.animationProgress!==1?(this.relativeParent=b,this.forceRelativeParentToResolveTarget(),this.relativeTarget=createBox(),this.relativeTargetOrigin=createBox(),calcRelativePosition(this.relativeTargetOrigin,this.target,b.target),copyBoxInto(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}isDebug&&metrics.resolvedTargetDeltas++}}}getClosestProjectingParent(){if(!(!this.parent||hasScale(this.parent.latestValues)||has2DTranslate(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}calcProjection(){var o;const l=this.getLead(),c=!!this.resumingFrom||this!==l;let u=!0;if((this.isProjectionDirty||!((o=this.parent)===null||o===void 0)&&o.isProjectionDirty)&&(u=!1),c&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(u=!1),this.resolvedRelativeTargetAt===frameData.timestamp&&(u=!1),u)return;const{layout:f,layoutId:d}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(f||d))return;copyBoxInto(this.layoutCorrected,this.layout.layoutBox);const p=this.treeScale.x,b=this.treeScale.y;applyTreeDeltas(this.layoutCorrected,this.treeScale,this.path,c),l.layout&&!l.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(l.target=l.layout.layoutBox,l.targetWithTransforms=createBox());const{target:y}=l;if(!y){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(copyAxisDeltaInto(this.prevProjectionDelta.x,this.projectionDelta.x),copyAxisDeltaInto(this.prevProjectionDelta.y,this.projectionDelta.y)),calcBoxDelta(this.projectionDelta,this.layoutCorrected,y,this.latestValues),(this.treeScale.x!==p||this.treeScale.y!==b||!axisDeltaEquals(this.projectionDelta.x,this.prevProjectionDelta.x)||!axisDeltaEquals(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",y)),isDebug&&metrics.recalculatedProjection++}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(o=!0){var l;if((l=this.options.visualElement)===null||l===void 0||l.scheduleRender(),o){const c=this.getStack();c&&c.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=createDelta(),this.projectionDelta=createDelta(),this.projectionDeltaWithTransform=createDelta()}setAnimationOrigin(o,l=!1){const c=this.snapshot,u=c?c.latestValues:{},f={...this.latestValues},d=createDelta();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!l;const p=createBox(),b=c?c.source:void 0,y=this.layout?this.layout.source:void 0,g=b!==y,P=this.getStack(),m=!P||P.members.length<=1,x=!!(g&&!m&&this.options.crossfade===!0&&!this.path.some(hasOpacityCrossfade));this.animationProgress=0;let C;this.mixTargetDelta=S=>{const E=S/1e3;mixAxisDelta(d.x,o.x,E),mixAxisDelta(d.y,o.y,E),this.setTargetDelta(d),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(calcRelativePosition(p,this.layout.layoutBox,this.relativeParent.layout.layoutBox),mixBox(this.relativeTarget,this.relativeTargetOrigin,p,E),C&&boxEquals(this.relativeTarget,C)&&(this.isProjectionDirty=!1),C||(C=createBox()),copyBoxInto(C,this.relativeTarget)),g&&(this.animationValues=f,mixValues(f,u,this.latestValues,E,x,m)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=E},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(o){this.notifyListeners("animationStart"),this.currentAnimation&&this.currentAnimation.stop(),this.resumingFrom&&this.resumingFrom.currentAnimation&&this.resumingFrom.currentAnimation.stop(),this.pendingAnimation&&(cancelFrame(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=frame.update(()=>{globalProjectionState.hasAnimatedSinceResize=!0,this.currentAnimation=animateSingleValue(0,animationTarget,{...o,onUpdate:l=>{this.mixTargetDelta(l),o.onUpdate&&o.onUpdate(l)},onComplete:()=>{o.onComplete&&o.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);const o=this.getStack();o&&o.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(animationTarget),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const o=this.getLead();let{targetWithTransforms:l,target:c,layout:u,latestValues:f}=o;if(!(!l||!c||!u)){if(this!==o&&this.layout&&u&&shouldAnimatePositionOnly(this.options.animationType,this.layout.layoutBox,u.layoutBox)){c=this.target||createBox();const d=calcLength(this.layout.layoutBox.x);c.x.min=o.target.x.min,c.x.max=c.x.min+d;const p=calcLength(this.layout.layoutBox.y);c.y.min=o.target.y.min,c.y.max=c.y.min+p}copyBoxInto(l,c),transformBox(l,f),calcBoxDelta(this.projectionDeltaWithTransform,this.layoutCorrected,l,f)}}registerSharedNode(o,l){this.sharedNodes.has(o)||this.sharedNodes.set(o,new NodeStack),this.sharedNodes.get(o).add(l);const u=l.options.initialPromotionConfig;l.promote({transition:u?u.transition:void 0,preserveFollowOpacity:u&&u.shouldPreserveFollowOpacity?u.shouldPreserveFollowOpacity(l):void 0})}isLead(){const o=this.getStack();return o?o.lead===this:!0}getLead(){var o;const{layoutId:l}=this.options;return l?((o=this.getStack())===null||o===void 0?void 0:o.lead)||this:this}getPrevLead(){var o;const{layoutId:l}=this.options;return l?(o=this.getStack())===null||o===void 0?void 0:o.prevLead:void 0}getStack(){const{layoutId:o}=this.options;if(o)return this.root.sharedNodes.get(o)}promote({needsReset:o,transition:l,preserveFollowOpacity:c}={}){const u=this.getStack();u&&u.promote(this,c),o&&(this.projectionDelta=void 0,this.needsReset=!0),l&&this.setOptions({transition:l})}relegate(){const o=this.getStack();return o?o.relegate(this):!1}resetSkewAndRotation(){const{visualElement:o}=this.options;if(!o)return;let l=!1;const{latestValues:c}=o;if((c.z||c.rotate||c.rotateX||c.rotateY||c.rotateZ||c.skewX||c.skewY)&&(l=!0),!l)return;const u={};c.z&&resetDistortingTransform("z",o,u,this.animationValues);for(let f=0;f<transformAxes.length;f++)resetDistortingTransform(`rotate${transformAxes[f]}`,o,u,this.animationValues),resetDistortingTransform(`skew${transformAxes[f]}`,o,u,this.animationValues);o.render();for(const f in u)o.setStaticValue(f,u[f]),this.animationValues&&(this.animationValues[f]=u[f]);o.scheduleRender()}getProjectionStyles(o){var l,c;if(!this.instance||this.isSVG)return;if(!this.isVisible)return hiddenVisibility;const u={visibility:""},f=this.getTransformTemplate();if(this.needsReset)return this.needsReset=!1,u.opacity="",u.pointerEvents=resolveMotionValue(o==null?void 0:o.pointerEvents)||"",u.transform=f?f(this.latestValues,""):"none",u;const d=this.getLead();if(!this.projectionDelta||!this.layout||!d.target){const g={};return this.options.layoutId&&(g.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,g.pointerEvents=resolveMotionValue(o==null?void 0:o.pointerEvents)||""),this.hasProjected&&!hasTransform(this.latestValues)&&(g.transform=f?f({},""):"none",this.hasProjected=!1),g}const p=d.animationValues||d.latestValues;this.applyTransformsToTarget(),u.transform=buildProjectionTransform(this.projectionDeltaWithTransform,this.treeScale,p),f&&(u.transform=f(p,u.transform));const{x:b,y}=this.projectionDelta;u.transformOrigin=`${b.origin*100}% ${y.origin*100}% 0`,d.animationValues?u.opacity=d===this?(c=(l=p.opacity)!==null&&l!==void 0?l:this.latestValues.opacity)!==null&&c!==void 0?c:1:this.preserveOpacity?this.latestValues.opacity:p.opacityExit:u.opacity=d===this?p.opacity!==void 0?p.opacity:"":p.opacityExit!==void 0?p.opacityExit:0;for(const g in scaleCorrectors){if(p[g]===void 0)continue;const{correct:P,applyTo:m}=scaleCorrectors[g],x=u.transform==="none"?p[g]:P(p[g],d);if(m){const C=m.length;for(let S=0;S<C;S++)u[m[S]]=x}else u[g]=x}return this.options.layoutId&&(u.pointerEvents=d===this?resolveMotionValue(o==null?void 0:o.pointerEvents)||"":"none"),u}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(o=>{var l;return(l=o.currentAnimation)===null||l===void 0?void 0:l.stop()}),this.root.nodes.forEach(clearMeasurements),this.root.sharedNodes.clear()}}}function updateLayout(e){e.updateLayout()}function notifyLayoutUpdate(e){var t;const i=((t=e.resumeFrom)===null||t===void 0?void 0:t.snapshot)||e.snapshot;if(e.isLead()&&e.layout&&i&&e.hasListeners("didUpdate")){const{layoutBox:n,measuredBox:s}=e.layout,{animationType:a}=e.options,o=i.source!==e.layout.source;a==="size"?eachAxis(d=>{const p=o?i.measuredBox[d]:i.layoutBox[d],b=calcLength(p);p.min=n[d].min,p.max=p.min+b}):shouldAnimatePositionOnly(a,i.layoutBox,n)&&eachAxis(d=>{const p=o?i.measuredBox[d]:i.layoutBox[d],b=calcLength(n[d]);p.max=p.min+b,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[d].max=e.relativeTarget[d].min+b)});const l=createDelta();calcBoxDelta(l,n,i.layoutBox);const c=createDelta();o?calcBoxDelta(c,e.applyTransform(s,!0),i.measuredBox):calcBoxDelta(c,n,i.layoutBox);const u=!isDeltaZero(l);let f=!1;if(!e.resumeFrom){const d=e.getClosestProjectingParent();if(d&&!d.resumeFrom){const{snapshot:p,layout:b}=d;if(p&&b){const y=createBox();calcRelativePosition(y,i.layoutBox,p.layoutBox);const g=createBox();calcRelativePosition(g,n,b.layoutBox),boxEqualsRounded(y,g)||(f=!0),d.options.layoutRoot&&(e.relativeTarget=g,e.relativeTargetOrigin=y,e.relativeParent=d)}}}e.notifyListeners("didUpdate",{layout:n,snapshot:i,delta:c,layoutDelta:l,hasLayoutChanged:u,hasRelativeTargetChanged:f})}else if(e.isLead()){const{onExitComplete:n}=e.options;n&&n()}e.options.transition=void 0}function propagateDirtyNodes(e){isDebug&&metrics.totalNodes++,e.parent&&(e.isProjecting()||(e.isProjectionDirty=e.parent.isProjectionDirty),e.isSharedProjectionDirty||(e.isSharedProjectionDirty=!!(e.isProjectionDirty||e.parent.isProjectionDirty||e.parent.isSharedProjectionDirty)),e.isTransformDirty||(e.isTransformDirty=e.parent.isTransformDirty))}function cleanDirtyNodes(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function clearSnapshot(e){e.clearSnapshot()}function clearMeasurements(e){e.clearMeasurements()}function clearIsLayoutDirty(e){e.isLayoutDirty=!1}function resetTransformStyle(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function finishAnimation(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function resolveTargetDelta(e){e.resolveTargetDelta()}function calcProjection(e){e.calcProjection()}function resetSkewAndRotation(e){e.resetSkewAndRotation()}function removeLeadSnapshots(e){e.removeLeadSnapshot()}function mixAxisDelta(e,t,i){e.translate=mixNumber$1(t.translate,0,i),e.scale=mixNumber$1(t.scale,1,i),e.origin=t.origin,e.originPoint=t.originPoint}function mixAxis(e,t,i,n){e.min=mixNumber$1(t.min,i.min,n),e.max=mixNumber$1(t.max,i.max,n)}function mixBox(e,t,i,n){mixAxis(e.x,t.x,i.x,n),mixAxis(e.y,t.y,i.y,n)}function hasOpacityCrossfade(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}const defaultLayoutTransition={duration:.45,ease:[.4,0,.1,1]},userAgentContains=e=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),roundPoint=userAgentContains("applewebkit/")&&!userAgentContains("chrome/")?Math.round:noop;function roundAxis(e){e.min=roundPoint(e.min),e.max=roundPoint(e.max)}function roundBox(e){roundAxis(e.x),roundAxis(e.y)}function shouldAnimatePositionOnly(e,t,i){return e==="position"||e==="preserve-aspect"&&!isNear(aspectRatio(t),aspectRatio(i),.2)}function checkNodeWasScrollRoot(e){var t;return e!==e.root&&((t=e.scroll)===null||t===void 0?void 0:t.wasRoot)}const DocumentProjectionNode=createProjectionNode({attachResizeListener:(e,t)=>addDomEvent(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),rootProjectionNode={current:void 0},HTMLProjectionNode=createProjectionNode({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!rootProjectionNode.current){const e=new DocumentProjectionNode({});e.mount(window),e.setOptions({layoutScroll:!0}),rootProjectionNode.current=e}return rootProjectionNode.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:e=>window.getComputedStyle(e).position==="fixed"}),drag={pan:{Feature:PanGesture},drag:{Feature:DragGesture,ProjectionNode:HTMLProjectionNode,MeasureLayout}};function handleHoverEvent(e,t,i){const{props:n}=e;e.animationState&&n.whileHover&&e.animationState.setActive("whileHover",i==="Start");const s="onHover"+i,a=n[s];a&&frame.postRender(()=>a(t,extractEventInfo(t)))}class HoverGesture extends Feature{mount(){const{current:t}=this.node;t&&(this.unmount=hover(t,i=>(handleHoverEvent(this.node,i,"Start"),n=>handleHoverEvent(this.node,n,"End"))))}unmount(){}}class FocusGesture extends Feature{constructor(){super(...arguments),this.isActive=!1}onFocus(){let t=!1;try{t=this.node.current.matches(":focus-visible")}catch{t=!0}!t||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){!this.isActive||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=pipe(addDomEvent(this.node.current,"focus",()=>this.onFocus()),addDomEvent(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}function handlePressEvent(e,t,i){const{props:n}=e;e.animationState&&n.whileTap&&e.animationState.setActive("whileTap",i==="Start");const s="onTap"+(i==="End"?"":i),a=n[s];a&&frame.postRender(()=>a(t,extractEventInfo(t)))}class PressGesture extends Feature{mount(){const{current:t}=this.node;t&&(this.unmount=press(t,i=>(handlePressEvent(this.node,i,"Start"),(n,{success:s})=>handlePressEvent(this.node,n,s?"End":"Cancel")),{useGlobalTarget:this.node.props.globalTapTarget}))}unmount(){}}const observerCallbacks=new WeakMap,observers=new WeakMap,fireObserverCallback=e=>{const t=observerCallbacks.get(e.target);t&&t(e)},fireAllObserverCallbacks=e=>{e.forEach(fireObserverCallback)};function initIntersectionObserver({root:e,...t}){const i=e||document;observers.has(i)||observers.set(i,{});const n=observers.get(i),s=JSON.stringify(t);return n[s]||(n[s]=new IntersectionObserver(fireAllObserverCallbacks,{root:e,...t})),n[s]}function observeIntersection(e,t,i){const n=initIntersectionObserver(t);return observerCallbacks.set(e,i),n.observe(e),()=>{observerCallbacks.delete(e),n.unobserve(e)}}const thresholdNames={some:0,all:1};class InViewFeature extends Feature{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:t={}}=this.node.getProps(),{root:i,margin:n,amount:s="some",once:a}=t,o={root:i?i.current:void 0,rootMargin:n,threshold:typeof s=="number"?s:thresholdNames[s]},l=c=>{const{isIntersecting:u}=c;if(this.isInView===u||(this.isInView=u,a&&!u&&this.hasEnteredView))return;u&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",u);const{onViewportEnter:f,onViewportLeave:d}=this.node.getProps(),p=u?f:d;p&&p(c)};return observeIntersection(this.node.current,o,l)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:t,prevProps:i}=this.node;["amount","margin","root"].some(hasViewportOptionChanged(t,i))&&this.startObserver()}unmount(){}}function hasViewportOptionChanged({viewport:e={}},{viewport:t={}}={}){return i=>e[i]!==t[i]}const gestureAnimations={inView:{Feature:InViewFeature},tap:{Feature:PressGesture},focus:{Feature:FocusGesture},hover:{Feature:HoverGesture}},layout={layout:{ProjectionNode:HTMLProjectionNode,MeasureLayout}},prefersReducedMotion={current:null},hasReducedMotionListener={current:!1};function initPrefersReducedMotion(){if(hasReducedMotionListener.current=!0,!!isBrowser)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>prefersReducedMotion.current=e.matches;e.addListener(t),t()}else prefersReducedMotion.current=!1}const valueTypes=[...dimensionValueTypes,color,complex],findValueType=e=>valueTypes.find(testValueType(e)),visualElementStore=new WeakMap;function updateMotionValuesFromProps(e,t,i){for(const n in t){const s=t[n],a=i[n];if(isMotionValue(s))e.addValue(n,s),process.env.NODE_ENV==="development"&&warnOnce(s.version==="11.18.2",`Attempting to mix Motion versions ${s.version} with 11.18.2 may not work as expected.`);else if(isMotionValue(a))e.addValue(n,motionValue(s,{owner:e}));else if(a!==s)if(e.hasValue(n)){const o=e.getValue(n);o.liveStyle===!0?o.jump(s):o.hasAnimated||o.set(s)}else{const o=e.getStaticValue(n);e.addValue(n,motionValue(o!==void 0?o:s,{owner:e}))}}for(const n in i)t[n]===void 0&&e.removeValue(n);return t}const propEventHandlers=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];class VisualElement{scrapeMotionValuesFromProps(t,i,n){return{}}constructor({parent:t,props:i,presenceContext:n,reducedMotionConfig:s,blockInitialAnimation:a,visualState:o},l={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.KeyframeResolver=KeyframeResolver,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{const b=time.now();this.renderScheduledAt<b&&(this.renderScheduledAt=b,frame.render(this.render,!1,!0))};const{latestValues:c,renderState:u,onUpdate:f}=o;this.onUpdate=f,this.latestValues=c,this.baseTarget={...c},this.initialValues=i.initial?{...c}:{},this.renderState=u,this.parent=t,this.props=i,this.presenceContext=n,this.depth=t?t.depth+1:0,this.reducedMotionConfig=s,this.options=l,this.blockInitialAnimation=!!a,this.isControllingVariants=isControllingVariants(i),this.isVariantNode=isVariantNode(i),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(t&&t.current);const{willChange:d,...p}=this.scrapeMotionValuesFromProps(i,{},this);for(const b in p){const y=p[b];c[b]!==void 0&&isMotionValue(y)&&y.set(c[b],!1)}}mount(t){this.current=t,visualElementStore.set(t,this),this.projection&&!this.projection.instance&&this.projection.mount(t),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((i,n)=>this.bindToMotionValue(n,i)),hasReducedMotionListener.current||initPrefersReducedMotion(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:prefersReducedMotion.current,process.env.NODE_ENV!=="production"&&warnOnce(this.shouldReduceMotion!==!0,"You have Reduced Motion enabled on your device. Animations may not appear as expected."),this.parent&&this.parent.children.add(this),this.update(this.props,this.presenceContext)}unmount(){visualElementStore.delete(this.current),this.projection&&this.projection.unmount(),cancelFrame(this.notifyUpdate),cancelFrame(this.render),this.valueSubscriptions.forEach(t=>t()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent&&this.parent.children.delete(this);for(const t in this.events)this.events[t].clear();for(const t in this.features){const i=this.features[t];i&&(i.unmount(),i.isMounted=!1)}this.current=null}bindToMotionValue(t,i){this.valueSubscriptions.has(t)&&this.valueSubscriptions.get(t)();const n=transformProps.has(t),s=i.on("change",l=>{this.latestValues[t]=l,this.props.onUpdate&&frame.preRender(this.notifyUpdate),n&&this.projection&&(this.projection.isTransformDirty=!0)}),a=i.on("renderRequest",this.scheduleRender);let o;window.MotionCheckAppearSync&&(o=window.MotionCheckAppearSync(this,t,i)),this.valueSubscriptions.set(t,()=>{s(),a(),o&&o(),i.owner&&i.stop()})}sortNodePosition(t){return!this.current||!this.sortInstanceNodePosition||this.type!==t.type?0:this.sortInstanceNodePosition(this.current,t.current)}updateFeatures(){let t="animation";for(t in featureDefinitions){const i=featureDefinitions[t];if(!i)continue;const{isEnabled:n,Feature:s}=i;if(!this.features[t]&&s&&n(this.props)&&(this.features[t]=new s(this)),this.features[t]){const a=this.features[t];a.isMounted?a.update():(a.mount(),a.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):createBox()}getStaticValue(t){return this.latestValues[t]}setStaticValue(t,i){this.latestValues[t]=i}update(t,i){(t.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=t,this.prevPresenceContext=this.presenceContext,this.presenceContext=i;for(let n=0;n<propEventHandlers.length;n++){const s=propEventHandlers[n];this.propEventSubscriptions[s]&&(this.propEventSubscriptions[s](),delete this.propEventSubscriptions[s]);const a="on"+s,o=t[a];o&&(this.propEventSubscriptions[s]=this.on(s,o))}this.prevMotionValues=updateMotionValuesFromProps(this,this.scrapeMotionValuesFromProps(t,this.prevProps,this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue(),this.onUpdate&&this.onUpdate(this)}getProps(){return this.props}getVariant(t){return this.props.variants?this.props.variants[t]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}addVariantChild(t){const i=this.getClosestVariantNode();if(i)return i.variantChildren&&i.variantChildren.add(t),()=>i.variantChildren.delete(t)}addValue(t,i){const n=this.values.get(t);i!==n&&(n&&this.removeValue(t),this.bindToMotionValue(t,i),this.values.set(t,i),this.latestValues[t]=i.get())}removeValue(t){this.values.delete(t);const i=this.valueSubscriptions.get(t);i&&(i(),this.valueSubscriptions.delete(t)),delete this.latestValues[t],this.removeValueFromRenderState(t,this.renderState)}hasValue(t){return this.values.has(t)}getValue(t,i){if(this.props.values&&this.props.values[t])return this.props.values[t];let n=this.values.get(t);return n===void 0&&i!==void 0&&(n=motionValue(i===null?void 0:i,{owner:this}),this.addValue(t,n)),n}readValue(t,i){var n;let s=this.latestValues[t]!==void 0||!this.current?this.latestValues[t]:(n=this.getBaseTargetFromProps(this.props,t))!==null&&n!==void 0?n:this.readValueFromInstance(this.current,t,this.options);return s!=null&&(typeof s=="string"&&(isNumericalString(s)||isZeroValueString(s))?s=parseFloat(s):!findValueType(s)&&complex.test(i)&&(s=getAnimatableNone(t,i)),this.setBaseTarget(t,isMotionValue(s)?s.get():s)),isMotionValue(s)?s.get():s}setBaseTarget(t,i){this.baseTarget[t]=i}getBaseTarget(t){var i;const{initial:n}=this.props;let s;if(typeof n=="string"||typeof n=="object"){const o=resolveVariantFromProps(this.props,n,(i=this.presenceContext)===null||i===void 0?void 0:i.custom);o&&(s=o[t])}if(n&&s!==void 0)return s;const a=this.getBaseTargetFromProps(this.props,t);return a!==void 0&&!isMotionValue(a)?a:this.initialValues[t]!==void 0&&s===void 0?void 0:this.baseTarget[t]}on(t,i){return this.events[t]||(this.events[t]=new SubscriptionManager),this.events[t].add(i)}notify(t,...i){this.events[t]&&this.events[t].notify(...i)}}class DOMVisualElement extends VisualElement{constructor(){super(...arguments),this.KeyframeResolver=DOMKeyframesResolver}sortInstanceNodePosition(t,i){return t.compareDocumentPosition(i)&2?1:-1}getBaseTargetFromProps(t,i){return t.style?t.style[i]:void 0}removeValueFromRenderState(t,{vars:i,style:n}){delete i[t],delete n[t]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:t}=this.props;isMotionValue(t)&&(this.childSubscription=t.on("change",i=>{this.current&&(this.current.textContent=`${i}`)}))}}function getComputedStyle$1(e){return window.getComputedStyle(e)}class HTMLVisualElement extends DOMVisualElement{constructor(){super(...arguments),this.type="html",this.renderInstance=renderHTML}readValueFromInstance(t,i){if(transformProps.has(i)){const n=getDefaultValueType(i);return n&&n.default||0}else{const n=getComputedStyle$1(t),s=(isCSSVariableName(i)?n.getPropertyValue(i):n[i])||0;return typeof s=="string"?s.trim():s}}measureInstanceViewportBox(t,{transformPagePoint:i}){return measureViewportBox(t,i)}build(t,i,n){buildHTMLStyles(t,i,n.transformTemplate)}scrapeMotionValuesFromProps(t,i,n){return scrapeMotionValuesFromProps$1(t,i,n)}}class SVGVisualElement extends DOMVisualElement{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=createBox}getBaseTargetFromProps(t,i){return t[i]}readValueFromInstance(t,i){if(transformProps.has(i)){const n=getDefaultValueType(i);return n&&n.default||0}return i=camelCaseAttributes.has(i)?i:camelToDash(i),t.getAttribute(i)}scrapeMotionValuesFromProps(t,i,n){return scrapeMotionValuesFromProps(t,i,n)}build(t,i,n){buildSVGAttrs(t,i,this.isSVGTag,n.transformTemplate)}renderInstance(t,i,n,s){renderSVG(t,i,n,s)}mount(t){this.isSVGTag=isSVGTag(t.tagName),super.mount(t)}}const createDomVisualElement=(e,t)=>isSVGComponent(e)?new SVGVisualElement(t):new HTMLVisualElement(t,{allowProjection:e!==React.Fragment}),createMotionComponent=createMotionComponentFactory({...animations,...gestureAnimations,...drag,...layout},createDomVisualElement),motion=createDOMMotionComponentProxy(createMotionComponent);function useMotionValue(e){const t=useConstant(()=>motionValue(e)),{isStatic:i}=React.useContext(MotionConfigContext);if(i){const[,n]=React.useState(e);React.useEffect(()=>t.on("change",n),[])}return t}function useCombineMotionValues(e,t){const i=useMotionValue(t()),n=()=>i.set(t());return n(),useIsomorphicLayoutEffect(()=>{const s=()=>frame.preRender(n,!1,!0),a=e.map(o=>o.on("change",s));return()=>{a.forEach(o=>o()),cancelFrame(n)}}),i}const isCustomValueType=e=>e&&typeof e=="object"&&e.mix,getMixer=e=>isCustomValueType(e)?e.mix:void 0;function transform(...e){const t=!Array.isArray(e[0]),i=t?0:-1,n=e[0+i],s=e[1+i],a=e[2+i],o=e[3+i],l=interpolate(s,a,{mixer:getMixer(a[0]),...o});return t?l(n):l}function useComputed(e){collectMotionValues.current=[],e();const t=useCombineMotionValues(collectMotionValues.current,e);return collectMotionValues.current=void 0,t}function useTransform(e,t,i,n){if(typeof e=="function")return useComputed(e);const s=typeof t=="function"?t:transform(t,i,n);return Array.isArray(e)?useListTransform(e,s):useListTransform([e],([a])=>s(a))}function useListTransform(e,t){const i=useConstant(()=>[]);return useCombineMotionValues(e,()=>{i.length=0;const n=e.length;for(let s=0;s<n;s++)i[s]=e[s].get();return t(i)})}function useUnmountEffect(e){return React.useEffect(()=>()=>e(),[])}const wrap=(e,t,i)=>{const n=t-e;return((i-e)%n+n)%n+e};function getEasingForSegment(e,t){return isEasingArray(e)?e[wrap(0,e.length,t)]:e}function isDOMKeyframes(e){return typeof e=="object"&&!Array.isArray(e)}function resolveSubjects(e,t,i,n){return typeof e=="string"&&isDOMKeyframes(t)?resolveElements(e,i,n):e instanceof NodeList?Array.from(e):Array.isArray(e)?e:[e]}function calculateRepeatDuration(e,t,i){return e*(t+1)}function calcNextTime(e,t,i,n){var s;return typeof t=="number"?t:t.startsWith("-")||t.startsWith("+")?Math.max(0,e+parseFloat(t)):t==="<"?i:(s=n.get(t))!==null&&s!==void 0?s:e}function eraseKeyframes(e,t,i){for(let n=0;n<e.length;n++){const s=e[n];s.at>t&&s.at<i&&(removeItem(e,s),n--)}}function addKeyframes(e,t,i,n,s,a){eraseKeyframes(e,s,a);for(let o=0;o<t.length;o++)e.push({value:t[o],at:mixNumber$1(s,a,n[o]),easing:getEasingForSegment(i,o)})}function normalizeTimes(e,t){for(let i=0;i<e.length;i++)e[i]=e[i]/(t+1)}function compareByTime(e,t){return e.at===t.at?e.value===null?1:t.value===null?-1:0:e.at-t.at}const defaultSegmentEasing="easeInOut",MAX_REPEAT=20;function createAnimationsFromSequence(e,{defaultTransition:t={},...i}={},n,s){const a=t.duration||.3,o=new Map,l=new Map,c={},u=new Map;let f=0,d=0,p=0;for(let b=0;b<e.length;b++){const y=e[b];if(typeof y=="string"){u.set(y,d);continue}else if(!Array.isArray(y)){u.set(y.name,calcNextTime(d,y.at,f,u));continue}let[g,P,m={}]=y;m.at!==void 0&&(d=calcNextTime(d,m.at,f,u));let x=0;const C=(S,E,T,L=0,_=0)=>{const k=keyframesAsList(S),{delay:Z=0,times:B=defaultOffset(k),type:D="keyframes",repeat:H,repeatType:z,repeatDelay:O=0,...V}=E;let{ease:A=t.ease||"easeOut",duration:R}=E;const M=typeof Z=="function"?Z(L,_):Z,I=k.length,j=isGenerator(D)?D:s==null?void 0:s[D];if(I<=2&&j){let te=100;if(I===2&&isNumberKeyframesArray(k)){const de=k[1]-k[0];te=Math.abs(de)}const ie={...V};R!==void 0&&(ie.duration=secondsToMilliseconds(R));const pe=createGeneratorEasing(ie,te,j);A=pe.ease,R=pe.duration}R??(R=a);const G=d+M;B.length===1&&B[0]===0&&(B[1]=1);const U=B.length-k.length;if(U>0&&fillOffset(B,U),k.length===1&&k.unshift(null),H){invariant(H<MAX_REPEAT,"Repeat count too high, must be less than 20"),R=calculateRepeatDuration(R,H);const te=[...k],ie=[...B];A=Array.isArray(A)?[...A]:[A];const pe=[...A];for(let de=0;de<H;de++){k.push(...te);for(let ve=0;ve<te.length;ve++)B.push(ie[ve]+(de+1)),A.push(ve===0?"linear":getEasingForSegment(pe,ve-1))}normalizeTimes(B,H)}const Y=G+R;addKeyframes(T,k,A,B,G,Y),x=Math.max(M+R,x),p=Math.max(Y,p)};if(isMotionValue(g)){const S=getSubjectSequence(g,l);C(P,m,getValueSequence("default",S))}else{const S=resolveSubjects(g,P,n,c),E=S.length;for(let T=0;T<E;T++){P=P,m=m;const L=S[T],_=getSubjectSequence(L,l);for(const k in P)C(P[k],getValueTransition(m,k),getValueSequence(k,_),T,E)}}f=d,d+=x}return l.forEach((b,y)=>{for(const g in b){const P=b[g];P.sort(compareByTime);const m=[],x=[],C=[];for(let E=0;E<P.length;E++){const{at:T,value:L,easing:_}=P[E];m.push(L),x.push(progress(0,p,T)),C.push(_||"easeOut")}x[0]!==0&&(x.unshift(0),m.unshift(m[0]),C.unshift(defaultSegmentEasing)),x[x.length-1]!==1&&(x.push(1),m.push(null)),o.has(y)||o.set(y,{keyframes:{},transition:{}});const S=o.get(y);S.keyframes[g]=m,S.transition[g]={...t,duration:p,ease:C,times:x,...i}}}),o}function getSubjectSequence(e,t){return!t.has(e)&&t.set(e,{}),t.get(e)}function getValueSequence(e,t){return t[e]||(t[e]=[]),t[e]}function keyframesAsList(e){return Array.isArray(e)?e:[e]}function getValueTransition(e,t){return e&&e[t]?{...e,...e[t]}:{...e}}const isNumber=e=>typeof e=="number",isNumberKeyframesArray=e=>e.every(isNumber);function isObjectKey(e,t){return e in t}class ObjectVisualElement extends VisualElement{constructor(){super(...arguments),this.type="object"}readValueFromInstance(t,i){if(isObjectKey(i,t)){const n=t[i];if(typeof n=="string"||typeof n=="number")return n}}getBaseTargetFromProps(){}removeValueFromRenderState(t,i){delete i.output[t]}measureInstanceViewportBox(){return createBox()}build(t,i){Object.assign(t.output,i)}renderInstance(t,{output:i}){Object.assign(t,i)}sortInstanceNodePosition(){return 0}}function createDOMVisualElement(e){const t={presenceContext:null,props:{},visualState:{renderState:{transform:{},transformOrigin:{},style:{},vars:{},attrs:{}},latestValues:{}}},i=isSVGElement(e)?new SVGVisualElement(t):new HTMLVisualElement(t);i.mount(e),visualElementStore.set(e,i)}function createObjectVisualElement(e){const t={presenceContext:null,props:{},visualState:{renderState:{output:{}},latestValues:{}}},i=new ObjectVisualElement(t);i.mount(e),visualElementStore.set(e,i)}function isSingleValue(e,t){return isMotionValue(e)||typeof e=="number"||typeof e=="string"&&!isDOMKeyframes(t)}function animateSubject(e,t,i,n){const s=[];if(isSingleValue(e,t))s.push(animateSingleValue(e,isDOMKeyframes(t)&&t.default||t,i&&(i.default||i)));else{const a=resolveSubjects(e,t,n),o=a.length;invariant(!!o,"No valid elements provided.");for(let l=0;l<o;l++){const c=a[l],u=c instanceof Element?createDOMVisualElement:createObjectVisualElement;visualElementStore.has(c)||u(c);const f=visualElementStore.get(c),d={...i};"delay"in d&&typeof d.delay=="function"&&(d.delay=d.delay(l,o)),s.push(...animateTarget(f,{...t,transition:d},{}))}}return s}function animateSequence(e,t,i){const n=[];return createAnimationsFromSequence(e,t,i,{spring}).forEach(({keyframes:a,transition:o},l)=>{n.push(...animateSubject(l,a,o))}),n}function isSequence(e){return Array.isArray(e)&&e.some(Array.isArray)}function createScopedAnimate(e){function t(i,n,s){let a=[];isSequence(i)?a=animateSequence(i,n,e):a=animateSubject(i,n,s,e);const o=new GroupPlaybackControls(a);return e&&e.animations.push(o),o}return t}function useAnimate(){const e=useConstant(()=>({current:null,animations:[]})),t=useConstant(()=>createScopedAnimate(e));return useUnmountEffect(()=>{e.animations.forEach(i=>i.stop())}),[e,t]}function getOriginIndex(e,t){if(e==="first")return 0;{const i=t-1;return e==="last"?i:i/2}}function stagger(e=.1,{startDelay:t=0,from:i=0,ease:n}={}){return(s,a)=>{const o=typeof i=="number"?i:getOriginIndex(i,a),l=Math.abs(o-s);let c=e*l;if(n){const u=a*e;c=easingDefinitionToFunction(n)(c/u)*u}return t+c}}const FooterBackgroundAnimation=({isMobile:e,isLogoHovered:t,maskUrl:i})=>{const[n]=React.useState("https://garden-bucket-cdn.s3.eu-central-1.amazonaws.com/flowers_bg.mp4"),[s,a]=React.useState("initial"),o=React.useRef(null),l=React.useRef(null),c=useMotionValue(45),u=useTransform(c,f=>`${f}% center`);return React.useEffect(()=>{if(t)a("visible");else{a("exit");const f=setTimeout(()=>{a("initial")},800);return()=>clearTimeout(f)}},[t]),jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx("video",{ref:o,src:n,autoPlay:!0,loop:!0,muted:!0,controls:!1,preload:"metadata",playsInline:!0,className:"gf-pointer-events-none gf-absolute gf-left-0 gf-top-0 gf-z-0 gf-h-full gf-w-screen gf-object-cover gf-opacity-0"},"video-flowers"),jsxRuntime.jsx(AnimatePresence,{mode:"wait",children:jsxRuntime.jsx(motion.div,{animate:s,variants:{initial:{maskPosition:"45%",opacity:0},visible:{maskPosition:"10%",opacity:1},exit:{maskPosition:"-60%",opacity:0,transition:{duration:1.2,ease:[0,.77,.3,1],opacity:{delay:.4}}}},transition:{duration:1,ease:[.22,.68,.88,.96],delay:.15,opacity:{times:[0,1,1,1]}},style:{maskImage:`linear-gradient(black, black), url('${i}')`,maskComposite:"exclude",maskSize:e?"1200% 200%":"820% 600%",maskPosition:u},className:"gf-pointer-events-none gf-absolute gf-left-0 gf-top-0 gf-z-0 gf-h-full gf-w-full gf-overflow-hidden gf-opacity-0",children:jsxRuntime.jsx("video",{ref:l,src:n,autoPlay:!0,loop:!0,muted:!0,controls:!1,preload:"metadata",playsInline:!0,className:"gf-pointer-events-none gf-h-full gf-w-screen gf-object-cover",onCanPlayThrough:()=>{l.current&&l.current.play().catch(console.error)},onLoadStart:()=>{l.current&&l.current.play().catch(console.error)}},"video-flowers-animated")},"hovered")})]})},ScaleY=({children:e,triggerAnimation:t})=>{const i={animation:{scaleY:[0,1],opacity:[0,1],transition:{duration:.5,ease:cubicBezier(.84,0,.16,1),opacity:{duration:.2,ease:"easeInOut"},once:!0}},idle:{scaleY:1,opacity:1}};return jsxRuntime.jsx(motion.div,{animate:t?"animation":"idle",variants:i,style:{transformOrigin:"bottom"},children:e})},Shine=({children:e})=>jsxRuntime.jsx(motion.div,{className:"gf-relative gf-inline-block gf-overflow-hidden gf-rounded-xl gf-w-[300px] before:gf-z-50 before:gf-absolute before:gf-bg-gradient-to-r before:gf-from-transparent before:gf-via-white/50 before:gf-via-50% before:gf-to-transparent before:gf-top-0 before:gf-left-0 before:gf-w-[168px] before:gf-h-full before:gf-animate-shine before:gf-opacity-0",children:e}),RollingText=React.forwardRef(({value:e,isHovered:t,className:i,delay:n},s)=>{const a=e.split(""),[o,l]=useAnimate(),c=()=>{l([[".gf-letter",{y:"-100%"},{duration:.5,delay:n?stagger(.014,{startDelay:n}):stagger(.014),ease:[.76,0,.24,1]}]])},u=()=>{l([[".gf-letter",{y:"0%"},{duration:.5,delay:n?stagger(.014,{startDelay:n}):stagger(.014),ease:[.76,0,.24,1]}]])};return React.useImperativeHandle(s,()=>({startAnimation:c,stopAnimation:u})),React.useEffect(()=>{t?c():u()},[t]),React.useEffect(()=>{const f=()=>{t||c()},d=()=>{t||u()},p=o.current;if(p)return p.addEventListener("mouseenter",f),p.addEventListener("mouseleave",d),()=>{p.removeEventListener("mouseenter",f),p.removeEventListener("mouseleave",d)}},[o,t]),jsxRuntime.jsx("div",{ref:o,children:jsxRuntime.jsx("span",{className:cn("gf-flex gf-h-5 gf-items-center gf-justify-start gf-overflow-hidden gf-pr-0.5",i),children:a.map((f,d)=>jsxRuntime.jsx("span",{"data-letter":f,className:"gf-letter gf-relative gf-h-5 gf-whitespace-pre gf-leading-5 after:gf-absolute after:gf-left-0 after:gf-top-full after:gf-h-5 after:gf-leading-5 after:gf-content-[attr(data-letter)]",children:f},`${f}-${d}`))})})});RollingText.displayName="RollingText";const FooterLinks=({title:e,links:t,hoveredIndex:i,onHover:n,className:s="gf-flex gf-w-full gf-flex-col gf-gap-3 md:gf-w-fit",listClassName:a="gf-flex gf-flex-col gf-gap-1",isRoutes:o=!1})=>jsxRuntime.jsxs("div",{className:s,children:[jsxRuntime.jsx(Typography,{size:"h4",weight:"medium",className:"gf-flex gf-items-center gf-gap-2 gf-transition-all gf-duration-500 gf-ease-in-out gf-text-inherit",children:jsxRuntime.jsx("span",{children:e})}),jsxRuntime.jsx("ul",{className:a,children:Object.values(t).map((l,c)=>l.link&&jsxRuntime.jsx("li",{className:o?"gf-w-fit":"",onMouseEnter:()=>{n==null||n(c)},onMouseLeave:()=>{n==null||n(null)},children:jsxRuntime.jsxs(Typography,{as:"a",href:l.link,target:"_blank",size:"h4",weight:"regular",className:`gf-cursor-pointer gf-transition-all gf-duration-500 gf-ease-in-out gf-text-inherit ${o?"gf-flex gf-w-fit gf-gap-0.5 gf-items-end gf-transition-colors gf-duration-500 gf-ease-in-out":""}`,children:[l.inputAsset&&jsxRuntime.jsx(RollingText,{delay:.2,value:l.inputAsset||"",isHovered:i===c}),o&&l.inputChain&&jsxRuntime.jsx(RollingText,{delay:.3,className:"gf-text-xs gf-italic gf-translate-y-[0.6px]",value:l.inputChain,isHovered:i===c}),jsxRuntime.jsx(RollingText,{delay:.35,value:l.title,isHovered:i===c}),o&&l.chain&&jsxRuntime.jsx(RollingText,{delay:.5,className:"gf-text-xs gf-italic gf-translate-y-[0.6px] -gf-translate-x-[2px]",value:l.chain,isHovered:i===c})]})},c))})]}),MaskURL="data:image/svg+xml,%3csvg%20width='3956'%20height='906'%20viewBox='0%200%203956%20906'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3crect%20width='3956'%20height='906'%20fill='url(%23paint0_linear_579_2)'/%3e%3cdefs%3e%3clinearGradient%20id='paint0_linear_579_2'%20x1='1465.5'%20y1='731.406'%20x2='2604.91'%20y2='227.235'%20gradientUnits='userSpaceOnUse'%3e%3cstop%20stop-opacity='0'/%3e%3cstop%20offset='0.115385'/%3e%3cstop%20offset='0.88'/%3e%3cstop%20offset='1'%20stop-opacity='0'/%3e%3c/linearGradient%3e%3c/defs%3e%3c/svg%3e",Footer=({className:e,network:t="mainnet",maskUrl:i=MaskURL,...n})=>{const[s,a]=React.useState(!1),[o,l]=React.useState(null),c=useClientOnly(),u=React.useRef(null);React.useEffect(()=>()=>{u.current&&clearTimeout(u.current)},[]);const f=t&&t==="testnet"?"https://testnet.garden.finance":"https://app.garden.finance",d="https://garden.finance",p={Products:{swap:{title:"Swap",link:t&&t==="testnet"?`${f}/?input-chain=bitcoin_testnet&input-asset=BTC`:`${f}/?input-chain=bitcoin&input-asset=BTC`,isExternal:!0},stake:{title:"Stake",link:t&&t==="testnet"?void 0:`${f}/stake`,isExternal:!0},explorer:{title:"Explorer",link:t&&t==="testnet"?"https://testnet-explorer.garden.finance/":"https://explorer.garden.finance/",isExternal:!0}},Resources:{blog:{title:"Blog",link:`${d}/blog`,isExternal:!0},routes:{title:"Routes",link:`${d}/routes`,isExternal:!0},faq:{title:"FAQs",link:`${d}/faq`,isExternal:!0},brandKit:{title:"Brand kit",link:`${d}/brand-kit`,isExternal:!0},analytics:{title:"Analytics",link:"https://dune.com/garden_finance/gardenfinance",isExternal:!0},Governance:{title:"Governance",link:"https://docs.garden.finance/home/governance",isExternal:!0}},Developers:{docs:{title:"Docs",link:"https://docs.garden.finance/",isExternal:!0},api:{title:"API",link:"https://docs.garden.finance/developers/api/overview",isExternal:!0},sdk:{title:"SDK",link:"https://docs.garden.finance/developers/sdk/overview",isExternal:!0},security:{title:"Security",link:`${d}/security`,isExternal:!0}}},b={btcToSol:{title:"BTC to SOL",link:d+"/routes/bridge-btc-to-sol",chain:"Solana",isExternal:!0},btcToEth:{title:"BTC to ETH",link:d+"/routes/bridge-btc-to-eth",chain:"Ethereum",isExternal:!0},btcToUsdc:{title:"BTC to USDC",link:d+"/routes/bridge-btc-to-usdc-arbitrum",chain:"Arbitrum",isExternal:!0},btctoUsdcEth:{title:"BTC to USDC",link:d+"/routes/bridge-btc-to-usdc-ethereum",chain:"Ethereum",isExternal:!0},btcToWbtc:{title:"BTC to WBTC",link:d+"/routes/bridge-btc-to-wbtc-ethereum",chain:"Ethereum",isExternal:!0},btcTocbBtc:{title:"BTC to cbBTC",link:d+"/routes/bridge-btc-to-cbbtc-base",chain:"Base",isExternal:!0},btcToSui:{title:"BTC to SUI",link:d+"/routes/bridge-btc-to-sui",chain:"Sui",isExternal:!0},btcToBnb:{title:"BTC to BNB",link:d+"/routes/bridge-btc-to-bnb",chain:"BNB Chain",isExternal:!0},btcToMon:{title:"BTC to MON",link:d+"/routes/bridge-btc-to-mon",chain:"Monad",isExternal:!0},cbBtcBaseTocbBtcSolana:{title:" to cbBTC",link:d+"/routes/bridge-cbbtc-base-to-cbbtc-solana",inputAsset:"cbBTC",inputChain:"Base",chain:"Solana",isExternal:!0},usdcBnbToBtc:{title:" to BTC",link:d+"/routes/bridge-usdc-bnb-to-btc",inputAsset:"USDC",inputChain:"BNB Chain",isExternal:!0},btcToUsdtEthereum:{title:" to USDT",link:d+"/routes/bridge-btc-to-usdt-ethereum",inputAsset:"BTC",chain:"Ethereum",isExternal:!0},usdtEthereumToBtc:{title:" to BTC",link:d+"/routes/bridge-usdt-to-btc",inputAsset:"USDT",isExternal:!0},btcToUsdcSolana:{title:" to USDC",link:d+"/routes/bridge-btc-to-usdc-solana",inputAsset:"BTC",chain:"Solana",isExternal:!0},usdcEthereumToBtc:{title:" to BTC",link:d+"/routes/bridge-usdc-ethereum-to-btc",inputAsset:"USDC",inputChain:"Ethereum",isExternal:!0},solToBtc:{title:" to BTC",link:d+"/routes/bridge-sol-to-btc",inputAsset:"SOL",inputChain:"Solana",isExternal:!0},usdcEthereumToUsdcBase:{title:" to USDC",link:d+"/routes/bridge-usdc-ethereum-to-usdc-base",inputAsset:"USDC",inputChain:"Ethereum",chain:"Base",isExternal:!0}},y={discord:"https://discord.gg/7feudTFMXB",x:"https://x.com/gardenfi"},{Products:g,Resources:P,Developers:m}=p;return jsxRuntime.jsxs("footer",{className:cn("gf-z-10 gf-relative gf-mx-auto gf-flex gf-w-full gf-flex-col gf-items-center gf-justify-center gf-bg-white gf-px-6 gf-pb-10 gf-pt-20 md:gf-px-10",e,s?"gf-text-white":"gf-text-dark-grey"),...n,children:[jsxRuntime.jsxs("div",{className:"gf-z-30 gf-w-full gf-max-w-screen-2xl",children:[jsxRuntime.jsxs("div",{className:"gf-mx-auto gf-flex gf-w-full gf-flex-col gf-items-start gf-justify-between gf-gap-8",children:[jsxRuntime.jsxs("div",{className:"gf-flex gf-w-full gf-items-center gf-justify-between gf-gap-6",children:[jsxRuntime.jsx(GardenIcon,{onMouseEnter:()=>{u.current&&clearTimeout(u.current),u.current=setTimeout(()=>{a(!0)},300)},onMouseLeave:()=>{u.current&&(clearTimeout(u.current),u.current=null),a(!1)},className:"gf-h-8 gf-w-8 gf-cursor-pointer gf-duration-500 gf-ease-in-out",onClick:x=>x.preventDefault()}),jsxRuntime.jsxs("div",{className:"gf-flex gf-items-center gf-gap-4",children:[jsxRuntime.jsx(XIcon,{onClick:()=>{c&&window.open(y.x,"_blank")},className:"gf-cursor-pointer gf-duration-500 gf-ease-in-out"}),jsxRuntime.jsx(DiscordIcon,{onClick:()=>{c&&window.open(y.discord,"_blank")},className:"gf-cursor-pointer gf-duration-500 gf-ease-in-out"})]})]}),jsxRuntime.jsxs("div",{className:"gf-flex gf-w-full gf-max-w-screen-2xl gf-flex-col-reverse gf-items-start gf-justify-between gf-gap-6 md:gf-flex-row",children:[jsxRuntime.jsxs("div",{className:"gf-flex gf-w-full gf-flex-col sm:gf-flex-row gf-gap-6 gf-items-start gf-justify-between sm:gf-gap-3 md:gf-w-fit",children:[jsxRuntime.jsx("div",{className:"gf-w-full md:gf-hidden",children:jsxRuntime.jsx(FooterLinks,{title:"Resources",links:P,className:"gf-flex gf-w-full gf-flex-col gf-gap-3",listClassName:"gf-flex gf-flex-col gf-gap-2"})}),jsxRuntime.jsx("div",{className:"gf-flex gf-w-full gf-max-w-[400px] gf-flex-col gf-gap-3 md:gf-w-fit",children:jsxRuntime.jsx(FooterLinks,{title:"Routes",links:b,hoveredIndex:o,onHover:l,className:"gf-flex gf-w-full gf-max-w-[400px] gf-flex-col gf-gap-3 md:gf-w-fit",listClassName:"gf-grid gf-w-full gf-grid-cols-1 gf-gap-1 gf-gap-x-8 md:gf-grid-cols-2 md:gf-grid-rows-2",isRoutes:!0})})]}),jsxRuntime.jsxs("div",{className:"gf-flex gf-w-full gf-items-start gf-justify-between gf-gap-3 md:gf-w-fit md:gf-gap-16",children:[jsxRuntime.jsx(FooterLinks,{title:"Products",links:g,className:"gf-flex gf-w-full gf-flex-col gf-gap-3 md:gf-w-fit",listClassName:"gf-flex gf-w-fit gf-flex-col gf-gap-1 gf-gap-x-6"}),jsxRuntime.jsx(FooterLinks,{title:"Developers",links:m,className:"gf-flex gf-w-full gf-flex-col gf-gap-3 md:gf-w-fit",listClassName:"gf-flex gf-flex-col gf-gap-1"}),jsxRuntime.jsx("div",{className:"gf-hidden md:gf-flex",children:jsxRuntime.jsx(FooterLinks,{title:"Resources",links:P,className:"gf-flex gf-w-full gf-flex-col gf-gap-3",listClassName:"gf-flex gf-flex-col gf-gap-1"})})]})]})]}),jsxRuntime.jsxs("div",{className:"gf-relative gf-mt-6 gf-flex gf-w-full gf-max-w-screen-2xl gf-items-center gf-justify-center",children:[jsxRuntime.jsx("div",{className:`gf-absolute gf-left-0 gf-top-0 gf-h-[1px] gf-w-full gf-transition-all gf-duration-500 gf-ease-in-out ${s?"gf-bg-white":"gf-bg-dark-grey"}`}),jsxRuntime.jsxs("div",{className:"gf-z-10 gf-my-6 gf-flex gf-w-full gf-items-center gf-justify-between gf-gap-4",children:[jsxRuntime.jsx("div",{className:"gf-flex gf-w-fit gf-items-center gf-justify-start gf-gap-6",children:jsxRuntime.jsxs(Typography,{size:"h5",className:"gf-flex gf-items-center gf-gap-1 gf-transition-all gf-duration-500 gf-ease-in-out gf-text-inherit",weight:"regular",children:[jsxRuntime.jsx(CopyrightsIcon,{}),jsxRuntime.jsx("span",{children:"Garden"}),jsxRuntime.jsx("span",{children:"2026"})]})}),jsxRuntime.jsxs("div",{className:"gf-flex gf-w-fit gf-items-center gf-justify-end gf-gap-6",children:[jsxRuntime.jsx(Typography,{size:"h5",as:"a",className:"gf-cursor-pointer gf-underline-offset-2 gf-transition-all gf-duration-500 gf-ease-in-out gf-hover:underline gf-text-inherit",weight:"regular",href:"https://garden.finance/privacy.pdf",target:"_blank",children:"Privacy Policy"}),jsxRuntime.jsx(Typography,{as:"a",size:"h5",className:"gf-cursor-pointer gf-underline-offset-2 gf-transition-all gf-duration-500 gf-ease-in-out gf-hover:underline gf-text-inherit",weight:"regular",href:"https://garden.finance/terms.pdf",target:"_blank",children:"Terms of Service"})]})]})]})]}),jsxRuntime.jsx(FooterBackgroundAnimation,{isMobile:!1,isLogoHovered:s,maskUrl:i})]})};var commonjsGlobal=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function getDefaultExportFromCjs(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var build={exports:{}};(()=>{var e={296:(s,a,o)=>{var l=/^\s+|\s+$/g,c=/^[-+]0x[0-9a-f]+$/i,u=/^0b[01]+$/i,f=/^0o[0-7]+$/i,d=parseInt,p=typeof o.g=="object"&&o.g&&o.g.Object===Object&&o.g,b=typeof self=="object"&&self&&self.Object===Object&&self,y=p||b||Function("return this")(),g=Object.prototype.toString,P=Math.max,m=Math.min,x=function(){return y.Date.now()};function C(E){var T=typeof E;return!!E&&(T=="object"||T=="function")}function S(E){if(typeof E=="number")return E;if(function(_){return typeof _=="symbol"||function(k){return!!k&&typeof k=="object"}(_)&&g.call(_)=="[object Symbol]"}(E))return NaN;if(C(E)){var T=typeof E.valueOf=="function"?E.valueOf():E;E=C(T)?T+"":T}if(typeof E!="string")return E===0?E:+E;E=E.replace(l,"");var L=u.test(E);return L||f.test(E)?d(E.slice(2),L?2:8):c.test(E)?NaN:+E}s.exports=function(E,T,L){var _,k,Z,B,D,H,z=0,O=!1,V=!1,A=!0;if(typeof E!="function")throw new TypeError("Expected a function");function R(U){var Y=_,te=k;return _=k=void 0,z=U,B=E.apply(te,Y)}function M(U){var Y=U-H;return H===void 0||Y>=T||Y<0||V&&U-z>=Z}function I(){var U=x();if(M(U))return j(U);D=setTimeout(I,function(Y){var te=T-(Y-H);return V?m(te,Z-(Y-z)):te}(U))}function j(U){return D=void 0,A&&_?R(U):(_=k=void 0,B)}function G(){var U=x(),Y=M(U);if(_=arguments,k=this,H=U,Y){if(D===void 0)return function(te){return z=te,D=setTimeout(I,T),O?R(te):B}(H);if(V)return D=setTimeout(I,T),R(H)}return D===void 0&&(D=setTimeout(I,T)),B}return T=S(T)||0,C(L)&&(O=!!L.leading,Z=(V="maxWait"in L)?P(S(L.maxWait)||0,T):Z,A="trailing"in L?!!L.trailing:A),G.cancel=function(){D!==void 0&&clearTimeout(D),z=0,_=H=k=D=void 0},G.flush=function(){return D===void 0?B:j(x())},G}},96:(s,a,o)=>{var l="Expected a function",c=NaN,u="[object Symbol]",f=/^\s+|\s+$/g,d=/^[-+]0x[0-9a-f]+$/i,p=/^0b[01]+$/i,b=/^0o[0-7]+$/i,y=parseInt,g=typeof o.g=="object"&&o.g&&o.g.Object===Object&&o.g,P=typeof self=="object"&&self&&self.Object===Object&&self,m=g||P||Function("return this")(),x=Object.prototype.toString,C=Math.max,S=Math.min,E=function(){return m.Date.now()};function T(_){var k=typeof _;return!!_&&(k=="object"||k=="function")}function L(_){if(typeof _=="number")return _;if(function(B){return typeof B=="symbol"||function(D){return!!D&&typeof D=="object"}(B)&&x.call(B)==u}(_))return c;if(T(_)){var k=typeof _.valueOf=="function"?_.valueOf():_;_=T(k)?k+"":k}if(typeof _!="string")return _===0?_:+_;_=_.replace(f,"");var Z=p.test(_);return Z||b.test(_)?y(_.slice(2),Z?2:8):d.test(_)?c:+_}s.exports=function(_,k,Z){var B=!0,D=!0;if(typeof _!="function")throw new TypeError(l);return T(Z)&&(B="leading"in Z?!!Z.leading:B,D="trailing"in Z?!!Z.trailing:D),function(H,z,O){var V,A,R,M,I,j,G=0,U=!1,Y=!1,te=!0;if(typeof H!="function")throw new TypeError(l);function ie(ue){var ge=V,ae=A;return V=A=void 0,G=ue,M=H.apply(ae,ge)}function pe(ue){var ge=ue-j;return j===void 0||ge>=z||ge<0||Y&&ue-G>=R}function de(){var ue=E();if(pe(ue))return ve(ue);I=setTimeout(de,function(ge){var ae=z-(ge-j);return Y?S(ae,R-(ge-G)):ae}(ue))}function ve(ue){return I=void 0,te&&V?ie(ue):(V=A=void 0,M)}function Ce(){var ue=E(),ge=pe(ue);if(V=arguments,A=this,j=ue,ge){if(I===void 0)return function(ae){return G=ae,I=setTimeout(de,z),U?ie(ae):M}(j);if(Y)return I=setTimeout(de,z),ie(j)}return I===void 0&&(I=setTimeout(de,z)),M}return z=L(z)||0,T(O)&&(U=!!O.leading,R=(Y="maxWait"in O)?C(L(O.maxWait)||0,z):R,te="trailing"in O?!!O.trailing:te),Ce.cancel=function(){I!==void 0&&clearTimeout(I),G=0,V=j=A=I=void 0},Ce.flush=function(){return I===void 0?M:ve(E())},Ce}(_,k,{leading:B,maxWait:k,trailing:D})}},703:(s,a,o)=>{var l=o(414);function c(){}function u(){}u.resetWarningCache=c,s.exports=function(){function f(b,y,g,P,m,x){if(x!==l){var C=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw C.name="Invariant Violation",C}}function d(){return f}f.isRequired=f;var p={array:f,bigint:f,bool:f,func:f,number:f,object:f,string:f,symbol:f,any:f,arrayOf:d,element:f,elementType:f,instanceOf:d,node:f,objectOf:d,oneOf:d,oneOfType:d,shape:d,exact:d,checkPropTypes:u,resetWarningCache:c};return p.PropTypes=p,p}},697:(s,a,o)=>{s.exports=o(703)()},414:s=>{s.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"}},t={};function i(s){var a=t[s];if(a!==void 0)return a.exports;var o=t[s]={exports:{}};return e[s](o,o.exports,i),o.exports}i.n=s=>{var a=s&&s.__esModule?()=>s.default:()=>s;return i.d(a,{a}),a},i.d=(s,a)=>{for(var o in a)i.o(a,o)&&!i.o(s,o)&&Object.defineProperty(s,o,{enumerable:!0,get:a[o]})},i.g=function(){if(typeof globalThis=="object")return globalThis;try{return this||new Function("return this")()}catch{if(typeof window=="object")return window}}(),i.o=(s,a)=>Object.prototype.hasOwnProperty.call(s,a),i.r=s=>{typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(s,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(s,"__esModule",{value:!0})};var n={};(()=>{i.r(n),i.d(n,{LazyLoadComponent:()=>ge,LazyLoadImage:()=>Le,trackWindowScroll:()=>M});const s=React;var a=i.n(s),o=i(697);function l(){return typeof window<"u"&&"IntersectionObserver"in window&&"isIntersecting"in window.IntersectionObserverEntry.prototype}function c(W){return c=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(F){return typeof F}:function(F){return F&&typeof Symbol=="function"&&F.constructor===Symbol&&F!==Symbol.prototype?"symbol":typeof F},c(W)}function u(W,F){var q=Object.keys(W);if(Object.getOwnPropertySymbols){var X=Object.getOwnPropertySymbols(W);F&&(X=X.filter(function(oe){return Object.getOwnPropertyDescriptor(W,oe).enumerable})),q.push.apply(q,X)}return q}function f(W,F,q){return(F=p(F))in W?Object.defineProperty(W,F,{value:q,enumerable:!0,configurable:!0,writable:!0}):W[F]=q,W}function d(W,F){for(var q=0;q<F.length;q++){var X=F[q];X.enumerable=X.enumerable||!1,X.configurable=!0,"value"in X&&(X.writable=!0),Object.defineProperty(W,p(X.key),X)}}function p(W){var F=function(q,X){if(c(q)!=="object"||q===null)return q;var oe=q[Symbol.toPrimitive];if(oe!==void 0){var le=oe.call(q,"string");if(c(le)!=="object")return le;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(q)}(W);return c(F)==="symbol"?F:String(F)}function b(W,F){return b=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(q,X){return q.__proto__=X,q},b(W,F)}function y(W){return y=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(F){return F.__proto__||Object.getPrototypeOf(F)},y(W)}var g=function(W){W.forEach(function(F){F.isIntersecting&&F.target.onVisible()})},P={},m=function(W){(function(N,$){if(typeof $!="function"&&$!==null)throw new TypeError("Super expression must either be null or a function");N.prototype=Object.create($&&$.prototype,{constructor:{value:N,writable:!0,configurable:!0}}),Object.defineProperty(N,"prototype",{writable:!1}),$&&b(N,$)})(me,W);var F,q,X,oe,le=(X=me,oe=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}(),function(){var N,$=y(X);if(oe){var re=y(this).constructor;N=Reflect.construct($,arguments,re)}else N=$.apply(this,arguments);return function(ee,Q){if(Q&&(c(Q)==="object"||typeof Q=="function"))return Q;if(Q!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(he){if(he===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return he}(ee)}(this,N)});function me(N){var $;if(function(ee,Q){if(!(ee instanceof Q))throw new TypeError("Cannot call a class as a function")}(this,me),($=le.call(this,N)).supportsObserver=!N.scrollPosition&&N.useIntersectionObserver&&l(),$.supportsObserver){var re=N.threshold;$.observer=function(ee){return P[ee]=P[ee]||new IntersectionObserver(g,{rootMargin:ee+"px"}),P[ee]}(re)}return $}return F=me,q=[{key:"componentDidMount",value:function(){this.placeholder&&this.observer&&(this.placeholder.onVisible=this.props.onVisible,this.observer.observe(this.placeholder)),this.supportsObserver||this.updateVisibility()}},{key:"componentWillUnmount",value:function(){this.observer&&this.placeholder&&this.observer.unobserve(this.placeholder)}},{key:"componentDidUpdate",value:function(){this.supportsObserver||this.updateVisibility()}},{key:"getPlaceholderBoundingBox",value:function(){var N=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.props.scrollPosition,$=this.placeholder.getBoundingClientRect(),re=this.placeholder.style,ee=parseInt(re.getPropertyValue("margin-left"),10)||0,Q=parseInt(re.getPropertyValue("margin-top"),10)||0;return{bottom:N.y+$.bottom+Q,left:N.x+$.left+ee,right:N.x+$.right+ee,top:N.y+$.top+Q}}},{key:"isPlaceholderInViewport",value:function(){if(typeof window>"u"||!this.placeholder)return!1;var N=this.props,$=N.scrollPosition,re=N.threshold,ee=this.getPlaceholderBoundingBox($),Q=$.y+window.innerHeight,he=$.x,ye=$.x+window.innerWidth,J=$.y;return J-re<=ee.bottom&&Q+re>=ee.top&&he-re<=ee.right&&ye+re>=ee.left}},{key:"updateVisibility",value:function(){this.isPlaceholderInViewport()&&this.props.onVisible()}},{key:"render",value:function(){var N=this,$=this.props,re=$.className,ee=$.height,Q=$.placeholder,he=$.style,ye=$.width;if(Q&&typeof Q.type!="function")return a().cloneElement(Q,{ref:function(ne){return N.placeholder=ne}});var J=function(ne){for(var ce=1;ce<arguments.length;ce++){var se=arguments[ce]!=null?arguments[ce]:{};ce%2?u(Object(se),!0).forEach(function(fe){f(ne,fe,se[fe])}):Object.getOwnPropertyDescriptors?Object.defineProperties(ne,Object.getOwnPropertyDescriptors(se)):u(Object(se)).forEach(function(fe){Object.defineProperty(ne,fe,Object.getOwnPropertyDescriptor(se,fe))})}return ne}({display:"inline-block"},he);return ye!==void 0&&(J.width=ye),ee!==void 0&&(J.height=ee),a().createElement("span",{className:re,ref:function(ne){return N.placeholder=ne},style:J},Q)}}],q&&d(F.prototype,q),Object.defineProperty(F,"prototype",{writable:!1}),me}(a().Component);m.propTypes={onVisible:o.PropTypes.func.isRequired,className:o.PropTypes.string,height:o.PropTypes.oneOfType([o.PropTypes.number,o.PropTypes.string]),placeholder:o.PropTypes.element,threshold:o.PropTypes.number,useIntersectionObserver:o.PropTypes.bool,scrollPosition:o.PropTypes.shape({x:o.PropTypes.number.isRequired,y:o.PropTypes.number.isRequired}),width:o.PropTypes.oneOfType([o.PropTypes.number,o.PropTypes.string])},m.defaultProps={className:"",placeholder:null,threshold:100,useIntersectionObserver:!0};const x=m;var C=i(296),S=i.n(C),E=i(96),T=i.n(E),L=function(W){var F=getComputedStyle(W,null);return F.getPropertyValue("overflow")+F.getPropertyValue("overflow-y")+F.getPropertyValue("overflow-x")};const _=function(W){if(!(W instanceof HTMLElement))return window;for(var F=W;F&&F instanceof HTMLElement;){if(/(scroll|auto)/.test(L(F)))return F;F=F.parentNode}return window};function k(W){return k=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(F){return typeof F}:function(F){return F&&typeof Symbol=="function"&&F.constructor===Symbol&&F!==Symbol.prototype?"symbol":typeof F},k(W)}var Z=["delayMethod","delayTime"];function B(){return B=Object.assign?Object.assign.bind():function(W){for(var F=1;F<arguments.length;F++){var q=arguments[F];for(var X in q)Object.prototype.hasOwnProperty.call(q,X)&&(W[X]=q[X])}return W},B.apply(this,arguments)}function D(W,F){for(var q=0;q<F.length;q++){var X=F[q];X.enumerable=X.enumerable||!1,X.configurable=!0,"value"in X&&(X.writable=!0),Object.defineProperty(W,(oe=function(le,me){if(k(le)!=="object"||le===null)return le;var N=le[Symbol.toPrimitive];if(N!==void 0){var $=N.call(le,"string");if(k($)!=="object")return $;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(le)}(X.key),k(oe)==="symbol"?oe:String(oe)),X)}var oe}function H(W,F){return H=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(q,X){return q.__proto__=X,q},H(W,F)}function z(W,F){if(F&&(k(F)==="object"||typeof F=="function"))return F;if(F!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return O(W)}function O(W){if(W===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return W}function V(W){return V=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(F){return F.__proto__||Object.getPrototypeOf(F)},V(W)}var A=function(){return typeof window>"u"?0:window.scrollX||window.pageXOffset},R=function(){return typeof window>"u"?0:window.scrollY||window.pageYOffset};const M=function(W){var F=function(q){(function(re,ee){if(typeof ee!="function"&&ee!==null)throw new TypeError("Super expression must either be null or a function");re.prototype=Object.create(ee&&ee.prototype,{constructor:{value:re,writable:!0,configurable:!0}}),Object.defineProperty(re,"prototype",{writable:!1}),ee&&H(re,ee)})($,q);var X,oe,le,me,N=(le=$,me=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}(),function(){var re,ee=V(le);if(me){var Q=V(this).constructor;re=Reflect.construct(ee,arguments,Q)}else re=ee.apply(this,arguments);return z(this,re)});function $(re){var ee;if(function(he,ye){if(!(he instanceof ye))throw new TypeError("Cannot call a class as a function")}(this,$),(ee=N.call(this,re)).useIntersectionObserver=re.useIntersectionObserver&&l(),ee.useIntersectionObserver)return z(ee);var Q=ee.onChangeScroll.bind(O(ee));return re.delayMethod==="debounce"?ee.delayedScroll=S()(Q,re.delayTime):re.delayMethod==="throttle"&&(ee.delayedScroll=T()(Q,re.delayTime)),ee.state={scrollPosition:{x:A(),y:R()}},ee.baseComponentRef=a().createRef(),ee}return X=$,(oe=[{key:"componentDidMount",value:function(){this.addListeners()}},{key:"componentWillUnmount",value:function(){this.removeListeners()}},{key:"componentDidUpdate",value:function(){typeof window>"u"||this.useIntersectionObserver||_(this.baseComponentRef.current)!==this.scrollElement&&(this.removeListeners(),this.addListeners())}},{key:"addListeners",value:function(){typeof window>"u"||this.useIntersectionObserver||(this.scrollElement=_(this.baseComponentRef.current),this.scrollElement.addEventListener("scroll",this.delayedScroll,{passive:!0}),window.addEventListener("resize",this.delayedScroll,{passive:!0}),this.scrollElement!==window&&window.addEventListener("scroll",this.delayedScroll,{passive:!0}))}},{key:"removeListeners",value:function(){typeof window>"u"||this.useIntersectionObserver||(this.scrollElement.removeEventListener("scroll",this.delayedScroll),window.removeEventListener("resize",this.delayedScroll),this.scrollElement!==window&&window.removeEventListener("scroll",this.delayedScroll))}},{key:"onChangeScroll",value:function(){this.useIntersectionObserver||this.setState({scrollPosition:{x:A(),y:R()}})}},{key:"render",value:function(){var re=this.props,ee=(re.delayMethod,re.delayTime,function(he,ye){if(he==null)return{};var J,ne,ce=function(fe,we){if(fe==null)return{};var xe,je,Ve={},ke=Object.keys(fe);for(je=0;je<ke.length;je++)xe=ke[je],we.indexOf(xe)>=0||(Ve[xe]=fe[xe]);return Ve}(he,ye);if(Object.getOwnPropertySymbols){var se=Object.getOwnPropertySymbols(he);for(ne=0;ne<se.length;ne++)J=se[ne],ye.indexOf(J)>=0||Object.prototype.propertyIsEnumerable.call(he,J)&&(ce[J]=he[J])}return ce}(re,Z)),Q=this.useIntersectionObserver?null:this.state.scrollPosition;return a().createElement(W,B({forwardRef:this.baseComponentRef,scrollPosition:Q},ee))}}])&&D(X.prototype,oe),Object.defineProperty(X,"prototype",{writable:!1}),$}(a().Component);return F.propTypes={delayMethod:o.PropTypes.oneOf(["debounce","throttle"]),delayTime:o.PropTypes.number,useIntersectionObserver:o.PropTypes.bool},F.defaultProps={delayMethod:"throttle",delayTime:300,useIntersectionObserver:!0},F};function I(W){return I=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(F){return typeof F}:function(F){return F&&typeof Symbol=="function"&&F.constructor===Symbol&&F!==Symbol.prototype?"symbol":typeof F},I(W)}function j(W,F){for(var q=0;q<F.length;q++){var X=F[q];X.enumerable=X.enumerable||!1,X.configurable=!0,"value"in X&&(X.writable=!0),Object.defineProperty(W,(oe=function(le,me){if(I(le)!=="object"||le===null)return le;var N=le[Symbol.toPrimitive];if(N!==void 0){var $=N.call(le,"string");if(I($)!=="object")return $;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(le)}(X.key),I(oe)==="symbol"?oe:String(oe)),X)}var oe}function G(W,F){return G=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(q,X){return q.__proto__=X,q},G(W,F)}function U(W){return U=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(F){return F.__proto__||Object.getPrototypeOf(F)},U(W)}var Y=function(W){(function(N,$){if(typeof $!="function"&&$!==null)throw new TypeError("Super expression must either be null or a function");N.prototype=Object.create($&&$.prototype,{constructor:{value:N,writable:!0,configurable:!0}}),Object.defineProperty(N,"prototype",{writable:!1}),$&&G(N,$)})(me,W);var F,q,X,oe,le=(X=me,oe=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}(),function(){var N,$=U(X);if(oe){var re=U(this).constructor;N=Reflect.construct($,arguments,re)}else N=$.apply(this,arguments);return function(ee,Q){if(Q&&(I(Q)==="object"||typeof Q=="function"))return Q;if(Q!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(he){if(he===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return he}(ee)}(this,N)});function me(N){return function($,re){if(!($ instanceof re))throw new TypeError("Cannot call a class as a function")}(this,me),le.call(this,N)}return F=me,(q=[{key:"render",value:function(){return a().createElement(x,this.props)}}])&&j(F.prototype,q),Object.defineProperty(F,"prototype",{writable:!1}),me}(a().Component);const te=M(Y);function ie(W){return ie=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(F){return typeof F}:function(F){return F&&typeof Symbol=="function"&&F.constructor===Symbol&&F!==Symbol.prototype?"symbol":typeof F},ie(W)}function pe(W,F){for(var q=0;q<F.length;q++){var X=F[q];X.enumerable=X.enumerable||!1,X.configurable=!0,"value"in X&&(X.writable=!0),Object.defineProperty(W,(oe=function(le,me){if(ie(le)!=="object"||le===null)return le;var N=le[Symbol.toPrimitive];if(N!==void 0){var $=N.call(le,"string");if(ie($)!=="object")return $;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(le)}(X.key),ie(oe)==="symbol"?oe:String(oe)),X)}var oe}function de(W,F){return de=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(q,X){return q.__proto__=X,q},de(W,F)}function ve(W){if(W===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return W}function Ce(W){return Ce=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(F){return F.__proto__||Object.getPrototypeOf(F)},Ce(W)}var ue=function(W){(function(N,$){if(typeof $!="function"&&$!==null)throw new TypeError("Super expression must either be null or a function");N.prototype=Object.create($&&$.prototype,{constructor:{value:N,writable:!0,configurable:!0}}),Object.defineProperty(N,"prototype",{writable:!1}),$&&de(N,$)})(me,W);var F,q,X,oe,le=(X=me,oe=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}(),function(){var N,$=Ce(X);if(oe){var re=Ce(this).constructor;N=Reflect.construct($,arguments,re)}else N=$.apply(this,arguments);return function(ee,Q){if(Q&&(ie(Q)==="object"||typeof Q=="function"))return Q;if(Q!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return ve(ee)}(this,N)});function me(N){var $;(function(ye,J){if(!(ye instanceof J))throw new TypeError("Cannot call a class as a function")})(this,me),$=le.call(this,N);var re=N.afterLoad,ee=N.beforeLoad,Q=N.scrollPosition,he=N.visibleByDefault;return $.state={visible:he},he&&(ee(),re()),$.onVisible=$.onVisible.bind(ve($)),$.isScrollTracked=!!(Q&&Number.isFinite(Q.x)&&Q.x>=0&&Number.isFinite(Q.y)&&Q.y>=0),$}return F=me,(q=[{key:"componentDidUpdate",value:function(N,$){$.visible!==this.state.visible&&this.props.afterLoad()}},{key:"onVisible",value:function(){this.props.beforeLoad(),this.setState({visible:!0})}},{key:"render",value:function(){if(this.state.visible)return this.props.children;var N=this.props,$=N.className,re=N.delayMethod,ee=N.delayTime,Q=N.height,he=N.placeholder,ye=N.scrollPosition,J=N.style,ne=N.threshold,ce=N.useIntersectionObserver,se=N.width;return this.isScrollTracked||ce&&l()?a().createElement(x,{className:$,height:Q,onVisible:this.onVisible,placeholder:he,scrollPosition:ye,style:J,threshold:ne,useIntersectionObserver:ce,width:se}):a().createElement(te,{className:$,delayMethod:re,delayTime:ee,height:Q,onVisible:this.onVisible,placeholder:he,style:J,threshold:ne,width:se})}}])&&pe(F.prototype,q),Object.defineProperty(F,"prototype",{writable:!1}),me}(a().Component);ue.propTypes={afterLoad:o.PropTypes.func,beforeLoad:o.PropTypes.func,useIntersectionObserver:o.PropTypes.bool,visibleByDefault:o.PropTypes.bool},ue.defaultProps={afterLoad:function(){return{}},beforeLoad:function(){return{}},useIntersectionObserver:!0,visibleByDefault:!1};const ge=ue;function ae(W){return ae=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(F){return typeof F}:function(F){return F&&typeof Symbol=="function"&&F.constructor===Symbol&&F!==Symbol.prototype?"symbol":typeof F},ae(W)}var K=["afterLoad","beforeLoad","delayMethod","delayTime","effect","placeholder","placeholderSrc","scrollPosition","threshold","useIntersectionObserver","visibleByDefault","wrapperClassName","wrapperProps"];function Ee(W,F){var q=Object.keys(W);if(Object.getOwnPropertySymbols){var X=Object.getOwnPropertySymbols(W);F&&(X=X.filter(function(oe){return Object.getOwnPropertyDescriptor(W,oe).enumerable})),q.push.apply(q,X)}return q}function _e(W){for(var F=1;F<arguments.length;F++){var q=arguments[F]!=null?arguments[F]:{};F%2?Ee(Object(q),!0).forEach(function(X){Me(W,X,q[X])}):Object.getOwnPropertyDescriptors?Object.defineProperties(W,Object.getOwnPropertyDescriptors(q)):Ee(Object(q)).forEach(function(X){Object.defineProperty(W,X,Object.getOwnPropertyDescriptor(q,X))})}return W}function Me(W,F,q){return(F=Se(F))in W?Object.defineProperty(W,F,{value:q,enumerable:!0,configurable:!0,writable:!0}):W[F]=q,W}function Pe(){return Pe=Object.assign?Object.assign.bind():function(W){for(var F=1;F<arguments.length;F++){var q=arguments[F];for(var X in q)Object.prototype.hasOwnProperty.call(q,X)&&(W[X]=q[X])}return W},Pe.apply(this,arguments)}function Ae(W,F){for(var q=0;q<F.length;q++){var X=F[q];X.enumerable=X.enumerable||!1,X.configurable=!0,"value"in X&&(X.writable=!0),Object.defineProperty(W,Se(X.key),X)}}function Se(W){var F=function(q,X){if(ae(q)!=="object"||q===null)return q;var oe=q[Symbol.toPrimitive];if(oe!==void 0){var le=oe.call(q,"string");if(ae(le)!=="object")return le;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(q)}(W);return ae(F)==="symbol"?F:String(F)}function be(W,F){return be=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(q,X){return q.__proto__=X,q},be(W,F)}function Te(W){return Te=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(F){return F.__proto__||Object.getPrototypeOf(F)},Te(W)}var Re=function(W){(function(N,$){if(typeof $!="function"&&$!==null)throw new TypeError("Super expression must either be null or a function");N.prototype=Object.create($&&$.prototype,{constructor:{value:N,writable:!0,configurable:!0}}),Object.defineProperty(N,"prototype",{writable:!1}),$&&be(N,$)})(me,W);var F,q,X,oe,le=(X=me,oe=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}(),function(){var N,$=Te(X);if(oe){var re=Te(this).constructor;N=Reflect.construct($,arguments,re)}else N=$.apply(this,arguments);return function(ee,Q){if(Q&&(ae(Q)==="object"||typeof Q=="function"))return Q;if(Q!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(he){if(he===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return he}(ee)}(this,N)});function me(N){var $;return function(re,ee){if(!(re instanceof ee))throw new TypeError("Cannot call a class as a function")}(this,me),($=le.call(this,N)).state={loaded:!1},$}return F=me,(q=[{key:"onImageLoad",value:function(){var N=this;return this.state.loaded?null:function($){N.props.onLoad($),N.props.afterLoad(),N.setState({loaded:!0})}}},{key:"getImg",value:function(){var N=this.props,$=(N.afterLoad,N.beforeLoad,N.delayMethod,N.delayTime,N.effect,N.placeholder,N.placeholderSrc,N.scrollPosition,N.threshold,N.useIntersectionObserver,N.visibleByDefault,N.wrapperClassName,N.wrapperProps,function(re,ee){if(re==null)return{};var Q,he,ye=function(ne,ce){if(ne==null)return{};var se,fe,we={},xe=Object.keys(ne);for(fe=0;fe<xe.length;fe++)se=xe[fe],ce.indexOf(se)>=0||(we[se]=ne[se]);return we}(re,ee);if(Object.getOwnPropertySymbols){var J=Object.getOwnPropertySymbols(re);for(he=0;he<J.length;he++)Q=J[he],ee.indexOf(Q)>=0||Object.prototype.propertyIsEnumerable.call(re,Q)&&(ye[Q]=re[Q])}return ye}(N,K));return a().createElement("img",Pe({},$,{onLoad:this.onImageLoad()}))}},{key:"getLazyLoadImage",value:function(){var N=this.props,$=N.beforeLoad,re=N.className,ee=N.delayMethod,Q=N.delayTime,he=N.height,ye=N.placeholder,J=N.scrollPosition,ne=N.style,ce=N.threshold,se=N.useIntersectionObserver,fe=N.visibleByDefault,we=N.width;return a().createElement(ge,{beforeLoad:$,className:re,delayMethod:ee,delayTime:Q,height:he,placeholder:ye,scrollPosition:J,style:ne,threshold:ce,useIntersectionObserver:se,visibleByDefault:fe,width:we},this.getImg())}},{key:"getWrappedLazyLoadImage",value:function(N){var $=this.props,re=$.effect,ee=$.height,Q=$.placeholderSrc,he=$.width,ye=$.wrapperClassName,J=$.wrapperProps,ne=this.state.loaded,ce=ne?" lazy-load-image-loaded":"",se=ne||!Q?{}:{backgroundImage:"url(".concat(Q,")"),backgroundSize:"100% 100%"};return a().createElement("span",Pe({className:ye+" lazy-load-image-background "+re+ce,style:_e(_e({},se),{},{color:"transparent",display:"inline-block",height:ee,width:he})},J),N)}},{key:"render",value:function(){var N=this.props,$=N.effect,re=N.placeholderSrc,ee=N.visibleByDefault,Q=N.wrapperClassName,he=N.wrapperProps,ye=this.getLazyLoadImage();return($||re)&&!ee||Q||he?this.getWrappedLazyLoadImage(ye):ye}}])&&Ae(F.prototype,q),Object.defineProperty(F,"prototype",{writable:!1}),me}(a().Component);Re.propTypes={onLoad:o.PropTypes.func,afterLoad:o.PropTypes.func,beforeLoad:o.PropTypes.func,delayMethod:o.PropTypes.string,delayTime:o.PropTypes.number,effect:o.PropTypes.string,placeholderSrc:o.PropTypes.string,threshold:o.PropTypes.number,useIntersectionObserver:o.PropTypes.bool,visibleByDefault:o.PropTypes.bool,wrapperClassName:o.PropTypes.string,wrapperProps:o.PropTypes.object},Re.defaultProps={onLoad:function(){},afterLoad:function(){return{}},beforeLoad:function(){return{}},delayMethod:"throttle",delayTime:300,effect:"",placeholderSrc:null,threshold:100,useIntersectionObserver:!0,visibleByDefault:!1,wrapperClassName:""};const Le=Re})(),build.exports=n})();var buildExports=build.exports;const placeholderUrl="data:image/svg+xml,%3csvg%20width='384'%20height='216'%20viewBox='0%200%20384%20216'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20clip-path='url(%23clip0_11648_9381)'%3e%3crect%20width='384'%20height='216'%20fill='%2359BB99'/%3e%3ccircle%20cx='-7'%20cy='184'%20r='87'%20fill='url(%23paint0_radial_11648_9381)'/%3e%3ccircle%20cx='368'%20cy='33'%20r='87'%20fill='url(%23paint1_radial_11648_9381)'/%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M136%2078C141.959%2078%20146.986%2081.9942%20148.548%2087.4516C154.006%2089.014%20158%2094.0405%20158%2099.9999C158%20105.959%20154.006%20110.986%20148.548%20112.548C146.986%20118.006%20141.959%20122%20136%20122C130.04%20122%20125.014%20118.006%20123.452%20112.548C117.994%20110.986%20114%20105.959%20114%2099.9999C114%2094.0406%20117.994%2089.0142%20123.452%2087.4517C125.014%2081.9943%20130.04%2078%20136%2078Z'%20fill='%23F7CFDB'/%3e%3cpath%20d='M139.954%2095.3616C139.923%2097.884%20135.962%2097.5421%20134.7%2097.5267L134.755%2093.063C136.016%2093.0784%20139.985%2092.7277%20139.954%2095.3616ZM140.906%20102.316C140.874%20105.09%20136.128%20104.716%20134.611%20104.698L134.688%2099.7811C136.2%2099.8017%20140.958%2099.4226%20140.922%20102.32L140.906%20102.316ZM144.148%2094.4178C143.928%2091.7661%20141.653%2090.8548%20138.771%2090.5621L138.816%2086.8898L136.578%2086.8608L136.533%2090.4382C135.948%2090.4302%20135.347%2090.4347%20134.75%2090.4401L134.775%2086.845L132.543%2086.8093L132.499%2090.4777C132.013%2090.4841%20131.538%2090.4848%20131.075%2090.4809L127.993%2090.4406L127.964%2092.8313C127.964%2092.8313%20129.621%2092.8205%20129.584%2092.8518C130.21%2092.7802%20130.777%2093.2229%20130.86%2093.8471L130.822%2098.0175C130.901%2098.0184%20130.979%2098.0242%20131.057%2098.035L130.822%2098.034L130.737%20103.891C130.7%20104.329%20130.317%20104.655%20129.88%20104.621C129.914%20104.63%20128.256%20104.6%20128.256%20104.6L127.778%20107.263L130.688%20107.298L132.289%20107.314L132.246%20111.024L134.48%20111.052L134.512%20107.397C135.106%20107.419%20135.702%20107.43%20136.296%20107.436L136.25%20111.096L138.484%20111.124L138.535%20107.416C142.302%20107.247%20144.938%20106.332%20145.307%20102.809C145.601%2099.9679%20144.29%2098.6862%20142.168%2098.1466C143.474%2097.504%20144.303%2096.3533%20144.132%2094.4136L144.148%2094.4178Z'%20fill='%23DB6A93'/%3e%3cpath%20d='M170%2098.8577C170%2094.4242%20172.859%2090.9544%20177.421%2090.9544C179.959%2090.9544%20181.919%2092.111%20182.915%2094.0708L183.14%2091.4042H185.839V106.472C185.839%20111.42%20182.787%20114.568%20177.968%20114.568C173.695%20114.568%20170.771%20112.158%20170.193%20108.175H173.213C173.598%20110.488%20175.333%20111.837%20177.968%20111.837C180.923%20111.837%20182.851%20109.91%20182.851%20106.922V103.773C181.823%20105.604%20179.767%20106.697%20177.293%20106.697C172.827%20106.697%20170%20103.259%20170%2098.8577ZM173.02%2098.7935C173.02%20101.749%20174.851%20104.062%20177.807%20104.062C180.859%20104.062%20182.722%20101.878%20182.722%2098.7935C182.722%2095.7735%20180.923%2093.5889%20177.839%2093.5889C174.819%2093.5889%20173.02%2095.902%20173.02%2098.7935Z'%20fill='white'/%3e%3cpath%20d='M194.791%20107.5C191.418%20107.5%20189.426%20105.604%20189.426%20102.745C189.426%2099.8537%20191.579%2098.0545%20195.273%2097.7654L200.221%2097.3799V96.9301C200.221%2094.2957%20198.647%2093.364%20196.526%2093.364C193.988%2093.364%20192.542%2094.4884%20192.542%2096.3839H189.908C189.908%2093.1069%20192.607%2090.9544%20196.655%2090.9544C200.542%2090.9544%20203.176%2093.0106%20203.176%2097.2514V107.114H200.606L200.285%20104.576C199.482%20106.376%20197.329%20107.5%20194.791%20107.5ZM195.659%20105.155C198.518%20105.155%20200.253%20103.291%20200.253%20100.336V99.5003L196.237%2099.8216C193.57%20100.079%20192.478%20101.107%20192.478%20102.649C192.478%20104.319%20193.699%20105.155%20195.659%20105.155Z'%20fill='white'/%3e%3cpath%20d='M216.354%2091.2757V94.0386H215.005C212.146%2094.0386%20210.379%2095.7735%20210.379%2098.7935V107.114H207.359V91.4363H210.186L210.379%2093.8137C211.021%2092.1753%20212.596%2091.0829%20214.748%2091.0829C215.294%2091.0829%20215.744%2091.1472%20216.354%2091.2757Z'%20fill='white'/%3e%3cpath%20d='M224.919%20107.5C220.357%20107.5%20217.594%20104.094%20217.594%2099.3075C217.594%2094.4884%20220.389%2090.9544%20225.048%2090.9544C227.457%2090.9544%20229.481%2092.0146%20230.541%2093.9423V83.4688H233.529V107.114H230.831L230.574%20104.255C229.545%20106.408%20227.425%20107.5%20224.919%20107.5ZM225.53%20104.769C228.614%20104.769%20230.509%20102.488%20230.509%2099.2111C230.509%2095.9984%20228.614%2093.6852%20225.53%2093.6852C222.445%2093.6852%20220.646%2095.9984%20220.646%2099.2111C220.646%20102.456%20222.445%20104.769%20225.53%20104.769Z'%20fill='white'/%3e%3cpath%20d='M244.665%20107.5C240.039%20107.5%20236.858%20104.159%20236.858%2099.2754C236.858%2094.3599%20239.974%2090.9544%20244.536%2090.9544C249.002%2090.9544%20251.926%2094.0386%20251.926%2098.6971V99.8216L239.782%2099.8537C240.006%20103.163%20241.741%20104.994%20244.729%20104.994C247.074%20104.994%20248.617%20104.03%20249.131%20102.231H251.958C251.187%20105.604%20248.552%20107.5%20244.665%20107.5ZM244.536%2093.4925C241.902%2093.4925%20240.231%2095.0667%20239.846%2097.8297H248.906C248.906%2095.2273%20247.203%2093.4925%20244.536%2093.4925Z'%20fill='white'/%3e%3cpath%20d='M258.319%20107.114H255.299V91.4042H258.03L258.351%2093.8137C259.347%2092.0146%20261.339%2090.9544%20263.555%2090.9544C267.7%2090.9544%20269.595%2093.4925%20269.595%2097.5084V107.114H266.575V98.1831C266.575%2095.0025%20265.098%2093.7174%20262.784%2093.7174C259.957%2093.7174%20258.319%2095.7414%20258.319%2098.7935V107.114Z'%20fill='white'/%3e%3c/g%3e%3cdefs%3e%3cradialGradient%20id='paint0_radial_11648_9381'%20cx='0'%20cy='0'%20r='1'%20gradientUnits='userSpaceOnUse'%20gradientTransform='translate(-7%20184)%20rotate(90)%20scale(87)'%3e%3cstop%20offset='0.380208'%20stop-color='%239BC8FF'/%3e%3cstop%20offset='1'%20stop-color='%239BC8FF'%20stop-opacity='0.2'/%3e%3c/radialGradient%3e%3cradialGradient%20id='paint1_radial_11648_9381'%20cx='0'%20cy='0'%20r='1'%20gradientUnits='userSpaceOnUse'%20gradientTransform='translate(368%2033)%20rotate(90)%20scale(87)'%3e%3cstop%20offset='0.380208'%20stop-color='%239BC8FF'/%3e%3cstop%20offset='1'%20stop-color='%239BC8FF'%20stop-opacity='0.2'/%3e%3c/radialGradient%3e%3cclipPath%20id='clip0_11648_9381'%3e%3crect%20width='384'%20height='216'%20fill='white'/%3e%3c/clipPath%3e%3c/defs%3e%3c/svg%3e",BlogCard=({thumbnail:e,category:t,date:i,title:n,className:s,thumbnailClassName:a})=>{const[o,l]=React.useState(!1),[c,u]=React.useState(e??placeholderUrl);React.useEffect(()=>{u(e??placeholderUrl)},[e]);const f=()=>{u(placeholderUrl)};return jsxRuntime.jsx(Opacity,{level:"semi-dark",className:"gf-rounded-2xl h-full",children:jsxRuntime.jsxs("div",{className:cn(s,"gf-overflow-hidden gf-rounded-2xl"),children:[jsxRuntime.jsx("div",{className:cn(a,`${o?"":"gf-filter gf-blur-md"}`),children:jsxRuntime.jsx(buildExports.LazyLoadImage,{alt:n,effect:"blur",src:c,onLoad:()=>l(!0),onError:f})}),jsxRuntime.jsxs("div",{className:"gf-px-4 gf-pt-4 gf-pb-5 gf-md:px-5 gf-md:pb-11",children:[jsxRuntime.jsxs("div",{className:"gf-flex gf-justify-between gf-mb-3",children:[jsxRuntime.jsx(Typography,{size:"h5",weight:"medium",className:"gf-bg-rose gf-px-3 gf-py-1 gf-rounded-full",children:t}),jsxRuntime.jsx(Typography,{size:"h5",weight:"medium",className:"gf-px-3 gf-py-1",children:i})]}),jsxRuntime.jsx(Typography,{size:"h3",weight:"bold",children:n})]})]})})},questCardStyles=cva(["gf-w-full gf-max-w-96 gf-p-4 gf-pb-5 md:gf-p-6 md:gf-pb-8 gf-rounded-2xl"],{variants:{variant:{locked:"gf-bg-white gf-bg-opacity-25",default:"gf-bg-white gf-bg-opacity-50"}},defaultVariants:{variant:"locked"}}),QuestCard=({variant:e,title:t,description:i,chipContent:n,logo:s})=>jsxRuntime.jsxs("div",{className:cn(questCardStyles({variant:e})),children:[jsxRuntime.jsxs("div",{className:"gf-flex gf-justify-between gf-items-center gf-mb-4",children:[jsxRuntime.jsxs(Chip,{className:"gf-cursor-pointer gf-px-2 gf-py-1",children:[jsxRuntime.jsx(Chip.Logo,{children:s}),t,jsxRuntime.jsx(Chip.CheckBox,{checked:!1})]}),e==="default"?jsxRuntime.jsx(OpenInFullIcon,{className:"gf-cursor-pointer",height:"20px",width:"20px"}):jsxRuntime.jsx(LockIcon,{className:"gf-cursor-pointer",height:"20px",width:"20px"})]}),jsxRuntime.jsx("div",{className:"gf-mb-3 md:gf-mb-8",children:jsxRuntime.jsx(Typography,{size:"h3",weight:"medium",children:i})}),jsxRuntime.jsxs("div",{className:"gf-flex gf-justify-end gf-space-x-2",children:[jsxRuntime.jsxs(Chip,{className:"gf-pl-3 gf-pr-2 gf-py-1",children:[jsxRuntime.jsx(Typography,{size:"h4",weight:"medium",children:"Quest Access"}),jsxRuntime.jsx(Chip.CheckBox,{checked:!1})]}),jsxRuntime.jsxs(Chip,{className:"gf-pl-3 gf-pr-2 gf-py-1",children:[jsxRuntime.jsx(Typography,{size:"h4",weight:"medium",children:n}),jsxRuntime.jsx(Chip.CheckBox,{checked:!1})]})]})]});var lottie$1={exports:{}};(function(module,exports$1){typeof document<"u"&&typeof navigator<"u"&&function(e,t){module.exports=t()}(commonjsGlobal,function(){var svgNS="http://www.w3.org/2000/svg",locationHref="",_useWebWorker=!1,initialDefaultFrame=-999999,setWebWorker=function(t){_useWebWorker=!!t},getWebWorker=function(){return _useWebWorker},setLocationHref=function(t){locationHref=t},getLocationHref=function(){return locationHref};function createTag(e){return document.createElement(e)}function extendPrototype(e,t){var i,n=e.length,s;for(i=0;i<n;i+=1){s=e[i].prototype;for(var a in s)Object.prototype.hasOwnProperty.call(s,a)&&(t.prototype[a]=s[a])}}function getDescriptor(e,t){return Object.getOwnPropertyDescriptor(e,t)}function createProxyFunction(e){function t(){}return t.prototype=e,t}var audioControllerFactory=function(){function e(t){this.audios=[],this.audioFactory=t,this._volume=1,this._isMuted=!1}return e.prototype={addAudio:function(i){this.audios.push(i)},pause:function(){var i,n=this.audios.length;for(i=0;i<n;i+=1)this.audios[i].pause()},resume:function(){var i,n=this.audios.length;for(i=0;i<n;i+=1)this.audios[i].resume()},setRate:function(i){var n,s=this.audios.length;for(n=0;n<s;n+=1)this.audios[n].setRate(i)},createAudio:function(i){return this.audioFactory?this.audioFactory(i):window.Howl?new window.Howl({src:[i]}):{isPlaying:!1,play:function(){this.isPlaying=!0},seek:function(){this.isPlaying=!1},playing:function(){},rate:function(){},setVolume:function(){}}},setAudioFactory:function(i){this.audioFactory=i},setVolume:function(i){this._volume=i,this._updateVolume()},mute:function(){this._isMuted=!0,this._updateVolume()},unmute:function(){this._isMuted=!1,this._updateVolume()},getVolume:function(){return this._volume},_updateVolume:function(){var i,n=this.audios.length;for(i=0;i<n;i+=1)this.audios[i].volume(this._volume*(this._isMuted?0:1))}},function(){return new e}}(),createTypedArray=function(){function e(i,n){var s=0,a=[],o;switch(i){case"int16":case"uint8c":o=1;break;default:o=1.1;break}for(s=0;s<n;s+=1)a.push(o);return a}function t(i,n){return i==="float32"?new Float32Array(n):i==="int16"?new Int16Array(n):i==="uint8c"?new Uint8ClampedArray(n):e(i,n)}return typeof Uint8ClampedArray=="function"&&typeof Float32Array=="function"?t:e}();function createSizedArray(e){return Array.apply(null,{length:e})}function _typeof$6(e){"@babel/helpers - typeof";return _typeof$6=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},_typeof$6(e)}var subframeEnabled=!0,expressionsPlugin=null,expressionsInterfaces=null,idPrefix$1="",isSafari=/^((?!chrome|android).)*safari/i.test(navigator.userAgent),bmPow=Math.pow,bmSqrt=Math.sqrt,bmFloor=Math.floor,bmMax=Math.max,bmMin=Math.min,BMMath={};(function(){var e=["abs","acos","acosh","asin","asinh","atan","atanh","atan2","ceil","cbrt","expm1","clz32","cos","cosh","exp","floor","fround","hypot","imul","log","log1p","log2","log10","max","min","pow","random","round","sign","sin","sinh","sqrt","tan","tanh","trunc","E","LN10","LN2","LOG10E","LOG2E","PI","SQRT1_2","SQRT2"],t,i=e.length;for(t=0;t<i;t+=1)BMMath[e[t]]=Math[e[t]]})(),BMMath.random=Math.random,BMMath.abs=function(e){var t=_typeof$6(e);if(t==="object"&&e.length){var i=createSizedArray(e.length),n,s=e.length;for(n=0;n<s;n+=1)i[n]=Math.abs(e[n]);return i}return Math.abs(e)};var defaultCurveSegments=150,degToRads=Math.PI/180,roundCorner=.5519;function styleDiv(e){e.style.position="absolute",e.style.top=0,e.style.left=0,e.style.display="block",e.style.transformOrigin="0 0",e.style.webkitTransformOrigin="0 0",e.style.backfaceVisibility="visible",e.style.webkitBackfaceVisibility="visible",e.style.transformStyle="preserve-3d",e.style.webkitTransformStyle="preserve-3d",e.style.mozTransformStyle="preserve-3d"}function BMEnterFrameEvent(e,t,i,n){this.type=e,this.currentTime=t,this.totalTime=i,this.direction=n<0?-1:1}function BMCompleteEvent(e,t){this.type=e,this.direction=t<0?-1:1}function BMCompleteLoopEvent(e,t,i,n){this.type=e,this.currentLoop=i,this.totalLoops=t,this.direction=n<0?-1:1}function BMSegmentStartEvent(e,t,i){this.type=e,this.firstFrame=t,this.totalFrames=i}function BMDestroyEvent(e,t){this.type=e,this.target=t}function BMRenderFrameErrorEvent(e,t){this.type="renderFrameError",this.nativeError=e,this.currentTime=t}function BMConfigErrorEvent(e){this.type="configError",this.nativeError=e}var createElementID=function(){var e=0;return function(){return e+=1,idPrefix$1+"__lottie_element_"+e}}();function HSVtoRGB(e,t,i){var n,s,a,o,l,c,u,f;switch(o=Math.floor(e*6),l=e*6-o,c=i*(1-t),u=i*(1-l*t),f=i*(1-(1-l)*t),o%6){case 0:n=i,s=f,a=c;break;case 1:n=u,s=i,a=c;break;case 2:n=c,s=i,a=f;break;case 3:n=c,s=u,a=i;break;case 4:n=f,s=c,a=i;break;case 5:n=i,s=c,a=u;break}return[n,s,a]}function RGBtoHSV(e,t,i){var n=Math.max(e,t,i),s=Math.min(e,t,i),a=n-s,o,l=n===0?0:a/n,c=n/255;switch(n){case s:o=0;break;case e:o=t-i+a*(t<i?6:0),o/=6*a;break;case t:o=i-e+a*2,o/=6*a;break;case i:o=e-t+a*4,o/=6*a;break}return[o,l,c]}function addSaturationToRGB(e,t){var i=RGBtoHSV(e[0]*255,e[1]*255,e[2]*255);return i[1]+=t,i[1]>1?i[1]=1:i[1]<=0&&(i[1]=0),HSVtoRGB(i[0],i[1],i[2])}function addBrightnessToRGB(e,t){var i=RGBtoHSV(e[0]*255,e[1]*255,e[2]*255);return i[2]+=t,i[2]>1?i[2]=1:i[2]<0&&(i[2]=0),HSVtoRGB(i[0],i[1],i[2])}function addHueToRGB(e,t){var i=RGBtoHSV(e[0]*255,e[1]*255,e[2]*255);return i[0]+=t/360,i[0]>1?i[0]-=1:i[0]<0&&(i[0]+=1),HSVtoRGB(i[0],i[1],i[2])}var rgbToHex=function(){var e=[],t,i;for(t=0;t<256;t+=1)i=t.toString(16),e[t]=i.length===1?"0"+i:i;return function(n,s,a){return n<0&&(n=0),s<0&&(s=0),a<0&&(a=0),"#"+e[n]+e[s]+e[a]}}(),setSubframeEnabled=function(t){subframeEnabled=!!t},getSubframeEnabled=function(){return subframeEnabled},setExpressionsPlugin=function(t){expressionsPlugin=t},getExpressionsPlugin=function(){return expressionsPlugin},setExpressionInterfaces=function(t){expressionsInterfaces=t},getExpressionInterfaces=function(){return expressionsInterfaces},setDefaultCurveSegments=function(t){defaultCurveSegments=t},getDefaultCurveSegments=function(){return defaultCurveSegments},setIdPrefix=function(t){idPrefix$1=t};function createNS(e){return document.createElementNS(svgNS,e)}function _typeof$5(e){"@babel/helpers - typeof";return _typeof$5=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},_typeof$5(e)}var dataManager=function(){var e=1,t=[],i,n,s={onmessage:function(){},postMessage:function(b){i({data:b})}},a={postMessage:function(b){s.onmessage({data:b})}};function o(p){if(window.Worker&&window.Blob&&getWebWorker()){var b=new Blob(["var _workerSelf = self; self.onmessage = ",p.toString()],{type:"text/javascript"}),y=URL.createObjectURL(b);return new Worker(y)}return i=p,s}function l(){n||(n=o(function(b){function y(){function P(O,V){var A,R,M=O.length,I,j,G,U;for(R=0;R<M;R+=1)if(A=O[R],"ks"in A&&!A.completed){if(A.completed=!0,A.hasMask){var Y=A.masksProperties;for(j=Y.length,I=0;I<j;I+=1)if(Y[I].pt.k.i)E(Y[I].pt.k);else for(U=Y[I].pt.k.length,G=0;G<U;G+=1)Y[I].pt.k[G].s&&E(Y[I].pt.k[G].s[0]),Y[I].pt.k[G].e&&E(Y[I].pt.k[G].e[0])}A.ty===0?(A.layers=C(A.refId,V),P(A.layers,V)):A.ty===4?S(A.shapes):A.ty===5&&H(A)}}function m(O,V){if(O){var A=0,R=O.length;for(A=0;A<R;A+=1)O[A].t===1&&(O[A].data.layers=C(O[A].data.refId,V),P(O[A].data.layers,V))}}function x(O,V){for(var A=0,R=V.length;A<R;){if(V[A].id===O)return V[A];A+=1}return null}function C(O,V){var A=x(O,V);return A?A.layers.__used?JSON.parse(JSON.stringify(A.layers)):(A.layers.__used=!0,A.layers):null}function S(O){var V,A=O.length,R,M;for(V=A-1;V>=0;V-=1)if(O[V].ty==="sh")if(O[V].ks.k.i)E(O[V].ks.k);else for(M=O[V].ks.k.length,R=0;R<M;R+=1)O[V].ks.k[R].s&&E(O[V].ks.k[R].s[0]),O[V].ks.k[R].e&&E(O[V].ks.k[R].e[0]);else O[V].ty==="gr"&&S(O[V].it)}function E(O){var V,A=O.i.length;for(V=0;V<A;V+=1)O.i[V][0]+=O.v[V][0],O.i[V][1]+=O.v[V][1],O.o[V][0]+=O.v[V][0],O.o[V][1]+=O.v[V][1]}function T(O,V){var A=V?V.split("."):[100,100,100];return O[0]>A[0]?!0:A[0]>O[0]?!1:O[1]>A[1]?!0:A[1]>O[1]?!1:O[2]>A[2]?!0:A[2]>O[2]?!1:null}var L=function(){var O=[4,4,14];function V(R){var M=R.t.d;R.t.d={k:[{s:M,t:0}]}}function A(R){var M,I=R.length;for(M=0;M<I;M+=1)R[M].ty===5&&V(R[M])}return function(R){if(T(O,R.v)&&(A(R.layers),R.assets)){var M,I=R.assets.length;for(M=0;M<I;M+=1)R.assets[M].layers&&A(R.assets[M].layers)}}}(),_=function(){var O=[4,7,99];return function(V){if(V.chars&&!T(O,V.v)){var A,R=V.chars.length;for(A=0;A<R;A+=1){var M=V.chars[A];M.data&&M.data.shapes&&(S(M.data.shapes),M.data.ip=0,M.data.op=99999,M.data.st=0,M.data.sr=1,M.data.ks={p:{k:[0,0],a:0},s:{k:[100,100],a:0},a:{k:[0,0],a:0},r:{k:0,a:0},o:{k:100,a:0}},V.chars[A].t||(M.data.shapes.push({ty:"no"}),M.data.shapes[0].it.push({p:{k:[0,0],a:0},s:{k:[100,100],a:0},a:{k:[0,0],a:0},r:{k:0,a:0},o:{k:100,a:0},sk:{k:0,a:0},sa:{k:0,a:0},ty:"tr"})))}}}}(),k=function(){var O=[5,7,15];function V(R){var M=R.t.p;typeof M.a=="number"&&(M.a={a:0,k:M.a}),typeof M.p=="number"&&(M.p={a:0,k:M.p}),typeof M.r=="number"&&(M.r={a:0,k:M.r})}function A(R){var M,I=R.length;for(M=0;M<I;M+=1)R[M].ty===5&&V(R[M])}return function(R){if(T(O,R.v)&&(A(R.layers),R.assets)){var M,I=R.assets.length;for(M=0;M<I;M+=1)R.assets[M].layers&&A(R.assets[M].layers)}}}(),Z=function(){var O=[4,1,9];function V(R){var M,I=R.length,j,G;for(M=0;M<I;M+=1)if(R[M].ty==="gr")V(R[M].it);else if(R[M].ty==="fl"||R[M].ty==="st")if(R[M].c.k&&R[M].c.k[0].i)for(G=R[M].c.k.length,j=0;j<G;j+=1)R[M].c.k[j].s&&(R[M].c.k[j].s[0]/=255,R[M].c.k[j].s[1]/=255,R[M].c.k[j].s[2]/=255,R[M].c.k[j].s[3]/=255),R[M].c.k[j].e&&(R[M].c.k[j].e[0]/=255,R[M].c.k[j].e[1]/=255,R[M].c.k[j].e[2]/=255,R[M].c.k[j].e[3]/=255);else R[M].c.k[0]/=255,R[M].c.k[1]/=255,R[M].c.k[2]/=255,R[M].c.k[3]/=255}function A(R){var M,I=R.length;for(M=0;M<I;M+=1)R[M].ty===4&&V(R[M].shapes)}return function(R){if(T(O,R.v)&&(A(R.layers),R.assets)){var M,I=R.assets.length;for(M=0;M<I;M+=1)R.assets[M].layers&&A(R.assets[M].layers)}}}(),B=function(){var O=[4,4,18];function V(R){var M,I=R.length,j,G;for(M=I-1;M>=0;M-=1)if(R[M].ty==="sh")if(R[M].ks.k.i)R[M].ks.k.c=R[M].closed;else for(G=R[M].ks.k.length,j=0;j<G;j+=1)R[M].ks.k[j].s&&(R[M].ks.k[j].s[0].c=R[M].closed),R[M].ks.k[j].e&&(R[M].ks.k[j].e[0].c=R[M].closed);else R[M].ty==="gr"&&V(R[M].it)}function A(R){var M,I,j=R.length,G,U,Y,te;for(I=0;I<j;I+=1){if(M=R[I],M.hasMask){var ie=M.masksProperties;for(U=ie.length,G=0;G<U;G+=1)if(ie[G].pt.k.i)ie[G].pt.k.c=ie[G].cl;else for(te=ie[G].pt.k.length,Y=0;Y<te;Y+=1)ie[G].pt.k[Y].s&&(ie[G].pt.k[Y].s[0].c=ie[G].cl),ie[G].pt.k[Y].e&&(ie[G].pt.k[Y].e[0].c=ie[G].cl)}M.ty===4&&V(M.shapes)}}return function(R){if(T(O,R.v)&&(A(R.layers),R.assets)){var M,I=R.assets.length;for(M=0;M<I;M+=1)R.assets[M].layers&&A(R.assets[M].layers)}}}();function D(O){O.__complete||(Z(O),L(O),_(O),k(O),B(O),P(O.layers,O.assets),m(O.chars,O.assets),O.__complete=!0)}function H(O){O.t.a.length===0&&"m"in O.t.p}var z={};return z.completeData=D,z.checkColors=Z,z.checkChars=_,z.checkPathProperties=k,z.checkShapes=B,z.completeLayers=P,z}if(a.dataManager||(a.dataManager=y()),a.assetLoader||(a.assetLoader=function(){function P(x){var C=x.getResponseHeader("content-type");return C&&x.responseType==="json"&&C.indexOf("json")!==-1||x.response&&_typeof$5(x.response)==="object"?x.response:x.response&&typeof x.response=="string"?JSON.parse(x.response):x.responseText?JSON.parse(x.responseText):null}function m(x,C,S,E){var T,L=new XMLHttpRequest;try{L.responseType="json"}catch{}L.onreadystatechange=function(){if(L.readyState===4)if(L.status===200)T=P(L),S(T);else try{T=P(L),S(T)}catch(_){E&&E(_)}};try{L.open(["G","E","T"].join(""),x,!0)}catch{L.open(["G","E","T"].join(""),C+"/"+x,!0)}L.send()}return{load:m}}()),b.data.type==="loadAnimation")a.assetLoader.load(b.data.path,b.data.fullPath,function(P){a.dataManager.completeData(P),a.postMessage({id:b.data.id,payload:P,status:"success"})},function(){a.postMessage({id:b.data.id,status:"error"})});else if(b.data.type==="complete"){var g=b.data.animation;a.dataManager.completeData(g),a.postMessage({id:b.data.id,payload:g,status:"success"})}else b.data.type==="loadData"&&a.assetLoader.load(b.data.path,b.data.fullPath,function(P){a.postMessage({id:b.data.id,payload:P,status:"success"})},function(){a.postMessage({id:b.data.id,status:"error"})})}),n.onmessage=function(p){var b=p.data,y=b.id,g=t[y];t[y]=null,b.status==="success"?g.onComplete(b.payload):g.onError&&g.onError()})}function c(p,b){e+=1;var y="processId_"+e;return t[y]={onComplete:p,onError:b},y}function u(p,b,y){l();var g=c(b,y);n.postMessage({type:"loadAnimation",path:p,fullPath:window.location.origin+window.location.pathname,id:g})}function f(p,b,y){l();var g=c(b,y);n.postMessage({type:"loadData",path:p,fullPath:window.location.origin+window.location.pathname,id:g})}function d(p,b,y){l();var g=c(b,y);n.postMessage({type:"complete",animation:p,id:g})}return{loadAnimation:u,loadData:f,completeAnimation:d}}(),ImagePreloader=function(){var e=function(){var m=createTag("canvas");m.width=1,m.height=1;var x=m.getContext("2d");return x.fillStyle="rgba(0,0,0,0)",x.fillRect(0,0,1,1),m}();function t(){this.loadedAssets+=1,this.loadedAssets===this.totalImages&&this.loadedFootagesCount===this.totalFootages&&this.imagesLoadedCb&&this.imagesLoadedCb(null)}function i(){this.loadedFootagesCount+=1,this.loadedAssets===this.totalImages&&this.loadedFootagesCount===this.totalFootages&&this.imagesLoadedCb&&this.imagesLoadedCb(null)}function n(m,x,C){var S="";if(m.e)S=m.p;else if(x){var E=m.p;E.indexOf("images/")!==-1&&(E=E.split("/")[1]),S=x+E}else S=C,S+=m.u?m.u:"",S+=m.p;return S}function s(m){var x=0,C=setInterval((function(){var S=m.getBBox();(S.width||x>500)&&(this._imageLoaded(),clearInterval(C)),x+=1}).bind(this),50)}function a(m){var x=n(m,this.assetsPath,this.path),C=createNS("image");isSafari?this.testImageLoaded(C):C.addEventListener("load",this._imageLoaded,!1),C.addEventListener("error",(function(){S.img=e,this._imageLoaded()}).bind(this),!1),C.setAttributeNS("http://www.w3.org/1999/xlink","href",x),this._elementHelper.append?this._elementHelper.append(C):this._elementHelper.appendChild(C);var S={img:C,assetData:m};return S}function o(m){var x=n(m,this.assetsPath,this.path),C=createTag("img");C.crossOrigin="anonymous",C.addEventListener("load",this._imageLoaded,!1),C.addEventListener("error",(function(){S.img=e,this._imageLoaded()}).bind(this),!1),C.src=x;var S={img:C,assetData:m};return S}function l(m){var x={assetData:m},C=n(m,this.assetsPath,this.path);return dataManager.loadData(C,(function(S){x.img=S,this._footageLoaded()}).bind(this),(function(){x.img={},this._footageLoaded()}).bind(this)),x}function c(m,x){this.imagesLoadedCb=x;var C,S=m.length;for(C=0;C<S;C+=1)m[C].layers||(!m[C].t||m[C].t==="seq"?(this.totalImages+=1,this.images.push(this._createImageData(m[C]))):m[C].t===3&&(this.totalFootages+=1,this.images.push(this.createFootageData(m[C]))))}function u(m){this.path=m||""}function f(m){this.assetsPath=m||""}function d(m){for(var x=0,C=this.images.length;x<C;){if(this.images[x].assetData===m)return this.images[x].img;x+=1}return null}function p(){this.imagesLoadedCb=null,this.images.length=0}function b(){return this.totalImages===this.loadedAssets}function y(){return this.totalFootages===this.loadedFootagesCount}function g(m,x){m==="svg"?(this._elementHelper=x,this._createImageData=this.createImageData.bind(this)):this._createImageData=this.createImgData.bind(this)}function P(){this._imageLoaded=t.bind(this),this._footageLoaded=i.bind(this),this.testImageLoaded=s.bind(this),this.createFootageData=l.bind(this),this.assetsPath="",this.path="",this.totalImages=0,this.totalFootages=0,this.loadedAssets=0,this.loadedFootagesCount=0,this.imagesLoadedCb=null,this.images=[]}return P.prototype={loadAssets:c,setAssetsPath:f,setPath:u,loadedImages:b,loadedFootages:y,destroy:p,getAsset:d,createImgData:o,createImageData:a,imageLoaded:t,footageLoaded:i,setCacheType:g},P}();function BaseEvent(){}BaseEvent.prototype={triggerEvent:function(t,i){if(this._cbs[t])for(var n=this._cbs[t],s=0;s<n.length;s+=1)n[s](i)},addEventListener:function(t,i){return this._cbs[t]||(this._cbs[t]=[]),this._cbs[t].push(i),(function(){this.removeEventListener(t,i)}).bind(this)},removeEventListener:function(t,i){if(!i)this._cbs[t]=null;else if(this._cbs[t]){for(var n=0,s=this._cbs[t].length;n<s;)this._cbs[t][n]===i&&(this._cbs[t].splice(n,1),n-=1,s-=1),n+=1;this._cbs[t].length||(this._cbs[t]=null)}}};var markerParser=function(){function e(t){for(var i=t.split(`\r
|
|
66
66
|
`),n={},s,a=0,o=0;o<i.length;o+=1)s=i[o].split(":"),s.length===2&&(n[s[0]]=s[1].trim(),a+=1);if(a===0)throw new Error;return n}return function(t){for(var i=[],n=0;n<t.length;n+=1){var s=t[n],a={time:s.tm,duration:s.dr};try{a.payload=JSON.parse(t[n].cm)}catch{try{a.payload=e(t[n].cm)}catch{a.payload={name:t[n].cm}}}i.push(a)}return i}}(),ProjectInterface=function(){function e(t){this.compositions.push(t)}return function(){function t(i){for(var n=0,s=this.compositions.length;n<s;){if(this.compositions[n].data&&this.compositions[n].data.nm===i)return this.compositions[n].prepareFrame&&this.compositions[n].data.xt&&this.compositions[n].prepareFrame(this.currentFrame),this.compositions[n].compInterface;n+=1}return null}return t.compositions=[],t.currentFrame=0,t.registerComposition=e,t}}(),renderers={},registerRenderer=function(t,i){renderers[t]=i};function getRenderer(e){return renderers[e]}function getRegisteredRenderer(){if(renderers.canvas)return"canvas";for(var e in renderers)if(renderers[e])return e;return""}function _typeof$4(e){"@babel/helpers - typeof";return _typeof$4=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},_typeof$4(e)}var AnimationItem=function(){this._cbs=[],this.name="",this.path="",this.isLoaded=!1,this.currentFrame=0,this.currentRawFrame=0,this.firstFrame=0,this.totalFrames=0,this.frameRate=0,this.frameMult=0,this.playSpeed=1,this.playDirection=1,this.playCount=0,this.animationData={},this.assets=[],this.isPaused=!0,this.autoplay=!1,this.loop=!0,this.renderer=null,this.animationID=createElementID(),this.assetsPath="",this.timeCompleted=0,this.segmentPos=0,this.isSubframeEnabled=getSubframeEnabled(),this.segments=[],this._idle=!0,this._completedLoop=!1,this.projectInterface=ProjectInterface(),this.imagePreloader=new ImagePreloader,this.audioController=audioControllerFactory(),this.markers=[],this.configAnimation=this.configAnimation.bind(this),this.onSetupError=this.onSetupError.bind(this),this.onSegmentComplete=this.onSegmentComplete.bind(this),this.drawnFrameEvent=new BMEnterFrameEvent("drawnFrame",0,0,0),this.expressionsPlugin=getExpressionsPlugin()};extendPrototype([BaseEvent],AnimationItem),AnimationItem.prototype.setParams=function(e){(e.wrapper||e.container)&&(this.wrapper=e.wrapper||e.container);var t="svg";e.animType?t=e.animType:e.renderer&&(t=e.renderer);var i=getRenderer(t);this.renderer=new i(this,e.rendererSettings),this.imagePreloader.setCacheType(t,this.renderer.globalData.defs),this.renderer.setProjectInterface(this.projectInterface),this.animType=t,e.loop===""||e.loop===null||e.loop===void 0||e.loop===!0?this.loop=!0:e.loop===!1?this.loop=!1:this.loop=parseInt(e.loop,10),this.autoplay="autoplay"in e?e.autoplay:!0,this.name=e.name?e.name:"",this.autoloadSegments=Object.prototype.hasOwnProperty.call(e,"autoloadSegments")?e.autoloadSegments:!0,this.assetsPath=e.assetsPath,this.initialSegment=e.initialSegment,e.audioFactory&&this.audioController.setAudioFactory(e.audioFactory),e.animationData?this.setupAnimation(e.animationData):e.path&&(e.path.lastIndexOf("\\")!==-1?this.path=e.path.substr(0,e.path.lastIndexOf("\\")+1):this.path=e.path.substr(0,e.path.lastIndexOf("/")+1),this.fileName=e.path.substr(e.path.lastIndexOf("/")+1),this.fileName=this.fileName.substr(0,this.fileName.lastIndexOf(".json")),dataManager.loadAnimation(e.path,this.configAnimation,this.onSetupError))},AnimationItem.prototype.onSetupError=function(){this.trigger("data_failed")},AnimationItem.prototype.setupAnimation=function(e){dataManager.completeAnimation(e,this.configAnimation)},AnimationItem.prototype.setData=function(e,t){t&&_typeof$4(t)!=="object"&&(t=JSON.parse(t));var i={wrapper:e,animationData:t},n=e.attributes;i.path=n.getNamedItem("data-animation-path")?n.getNamedItem("data-animation-path").value:n.getNamedItem("data-bm-path")?n.getNamedItem("data-bm-path").value:n.getNamedItem("bm-path")?n.getNamedItem("bm-path").value:"",i.animType=n.getNamedItem("data-anim-type")?n.getNamedItem("data-anim-type").value:n.getNamedItem("data-bm-type")?n.getNamedItem("data-bm-type").value:n.getNamedItem("bm-type")?n.getNamedItem("bm-type").value:n.getNamedItem("data-bm-renderer")?n.getNamedItem("data-bm-renderer").value:n.getNamedItem("bm-renderer")?n.getNamedItem("bm-renderer").value:getRegisteredRenderer()||"canvas";var s=n.getNamedItem("data-anim-loop")?n.getNamedItem("data-anim-loop").value:n.getNamedItem("data-bm-loop")?n.getNamedItem("data-bm-loop").value:n.getNamedItem("bm-loop")?n.getNamedItem("bm-loop").value:"";s==="false"?i.loop=!1:s==="true"?i.loop=!0:s!==""&&(i.loop=parseInt(s,10));var a=n.getNamedItem("data-anim-autoplay")?n.getNamedItem("data-anim-autoplay").value:n.getNamedItem("data-bm-autoplay")?n.getNamedItem("data-bm-autoplay").value:n.getNamedItem("bm-autoplay")?n.getNamedItem("bm-autoplay").value:!0;i.autoplay=a!=="false",i.name=n.getNamedItem("data-name")?n.getNamedItem("data-name").value:n.getNamedItem("data-bm-name")?n.getNamedItem("data-bm-name").value:n.getNamedItem("bm-name")?n.getNamedItem("bm-name").value:"";var o=n.getNamedItem("data-anim-prerender")?n.getNamedItem("data-anim-prerender").value:n.getNamedItem("data-bm-prerender")?n.getNamedItem("data-bm-prerender").value:n.getNamedItem("bm-prerender")?n.getNamedItem("bm-prerender").value:"";o==="false"&&(i.prerender=!1),i.path?this.setParams(i):this.trigger("destroy")},AnimationItem.prototype.includeLayers=function(e){e.op>this.animationData.op&&(this.animationData.op=e.op,this.totalFrames=Math.floor(e.op-this.animationData.ip));var t=this.animationData.layers,i,n=t.length,s=e.layers,a,o=s.length;for(a=0;a<o;a+=1)for(i=0;i<n;){if(t[i].id===s[a].id){t[i]=s[a];break}i+=1}if((e.chars||e.fonts)&&(this.renderer.globalData.fontManager.addChars(e.chars),this.renderer.globalData.fontManager.addFonts(e.fonts,this.renderer.globalData.defs)),e.assets)for(n=e.assets.length,i=0;i<n;i+=1)this.animationData.assets.push(e.assets[i]);this.animationData.__complete=!1,dataManager.completeAnimation(this.animationData,this.onSegmentComplete)},AnimationItem.prototype.onSegmentComplete=function(e){this.animationData=e;var t=getExpressionsPlugin();t&&t.initExpressions(this),this.loadNextSegment()},AnimationItem.prototype.loadNextSegment=function(){var e=this.animationData.segments;if(!e||e.length===0||!this.autoloadSegments){this.trigger("data_ready"),this.timeCompleted=this.totalFrames;return}var t=e.shift();this.timeCompleted=t.time*this.frameRate;var i=this.path+this.fileName+"_"+this.segmentPos+".json";this.segmentPos+=1,dataManager.loadData(i,this.includeLayers.bind(this),(function(){this.trigger("data_failed")}).bind(this))},AnimationItem.prototype.loadSegments=function(){var e=this.animationData.segments;e||(this.timeCompleted=this.totalFrames),this.loadNextSegment()},AnimationItem.prototype.imagesLoaded=function(){this.trigger("loaded_images"),this.checkLoaded()},AnimationItem.prototype.preloadImages=function(){this.imagePreloader.setAssetsPath(this.assetsPath),this.imagePreloader.setPath(this.path),this.imagePreloader.loadAssets(this.animationData.assets,this.imagesLoaded.bind(this))},AnimationItem.prototype.configAnimation=function(e){if(this.renderer)try{this.animationData=e,this.initialSegment?(this.totalFrames=Math.floor(this.initialSegment[1]-this.initialSegment[0]),this.firstFrame=Math.round(this.initialSegment[0])):(this.totalFrames=Math.floor(this.animationData.op-this.animationData.ip),this.firstFrame=Math.round(this.animationData.ip)),this.renderer.configAnimation(e),e.assets||(e.assets=[]),this.assets=this.animationData.assets,this.frameRate=this.animationData.fr,this.frameMult=this.animationData.fr/1e3,this.renderer.searchExtraCompositions(e.assets),this.markers=markerParser(e.markers||[]),this.trigger("config_ready"),this.preloadImages(),this.loadSegments(),this.updaFrameModifier(),this.waitForFontsLoaded(),this.isPaused&&this.audioController.pause()}catch(t){this.triggerConfigError(t)}},AnimationItem.prototype.waitForFontsLoaded=function(){this.renderer&&(this.renderer.globalData.fontManager.isLoaded?this.checkLoaded():setTimeout(this.waitForFontsLoaded.bind(this),20))},AnimationItem.prototype.checkLoaded=function(){if(!this.isLoaded&&this.renderer.globalData.fontManager.isLoaded&&(this.imagePreloader.loadedImages()||this.renderer.rendererType!=="canvas")&&this.imagePreloader.loadedFootages()){this.isLoaded=!0;var e=getExpressionsPlugin();e&&e.initExpressions(this),this.renderer.initItems(),setTimeout((function(){this.trigger("DOMLoaded")}).bind(this),0),this.gotoFrame(),this.autoplay&&this.play()}},AnimationItem.prototype.resize=function(e,t){var i=typeof e=="number"?e:void 0,n=typeof t=="number"?t:void 0;this.renderer.updateContainerSize(i,n)},AnimationItem.prototype.setSubframe=function(e){this.isSubframeEnabled=!!e},AnimationItem.prototype.gotoFrame=function(){this.currentFrame=this.isSubframeEnabled?this.currentRawFrame:~~this.currentRawFrame,this.timeCompleted!==this.totalFrames&&this.currentFrame>this.timeCompleted&&(this.currentFrame=this.timeCompleted),this.trigger("enterFrame"),this.renderFrame(),this.trigger("drawnFrame")},AnimationItem.prototype.renderFrame=function(){if(!(this.isLoaded===!1||!this.renderer))try{this.expressionsPlugin&&this.expressionsPlugin.resetFrame(),this.renderer.renderFrame(this.currentFrame+this.firstFrame)}catch(e){this.triggerRenderFrameError(e)}},AnimationItem.prototype.play=function(e){e&&this.name!==e||this.isPaused===!0&&(this.isPaused=!1,this.trigger("_play"),this.audioController.resume(),this._idle&&(this._idle=!1,this.trigger("_active")))},AnimationItem.prototype.pause=function(e){e&&this.name!==e||this.isPaused===!1&&(this.isPaused=!0,this.trigger("_pause"),this._idle=!0,this.trigger("_idle"),this.audioController.pause())},AnimationItem.prototype.togglePause=function(e){e&&this.name!==e||(this.isPaused===!0?this.play():this.pause())},AnimationItem.prototype.stop=function(e){e&&this.name!==e||(this.pause(),this.playCount=0,this._completedLoop=!1,this.setCurrentRawFrameValue(0))},AnimationItem.prototype.getMarkerData=function(e){for(var t,i=0;i<this.markers.length;i+=1)if(t=this.markers[i],t.payload&&t.payload.name===e)return t;return null},AnimationItem.prototype.goToAndStop=function(e,t,i){if(!(i&&this.name!==i)){var n=Number(e);if(isNaN(n)){var s=this.getMarkerData(e);s&&this.goToAndStop(s.time,!0)}else t?this.setCurrentRawFrameValue(e):this.setCurrentRawFrameValue(e*this.frameModifier);this.pause()}},AnimationItem.prototype.goToAndPlay=function(e,t,i){if(!(i&&this.name!==i)){var n=Number(e);if(isNaN(n)){var s=this.getMarkerData(e);s&&(s.duration?this.playSegments([s.time,s.time+s.duration],!0):this.goToAndStop(s.time,!0))}else this.goToAndStop(n,t,i);this.play()}},AnimationItem.prototype.advanceTime=function(e){if(!(this.isPaused===!0||this.isLoaded===!1)){var t=this.currentRawFrame+e*this.frameModifier,i=!1;t>=this.totalFrames-1&&this.frameModifier>0?!this.loop||this.playCount===this.loop?this.checkSegments(t>this.totalFrames?t%this.totalFrames:0)||(i=!0,t=this.totalFrames-1):t>=this.totalFrames?(this.playCount+=1,this.checkSegments(t%this.totalFrames)||(this.setCurrentRawFrameValue(t%this.totalFrames),this._completedLoop=!0,this.trigger("loopComplete"))):this.setCurrentRawFrameValue(t):t<0?this.checkSegments(t%this.totalFrames)||(this.loop&&!(this.playCount--<=0&&this.loop!==!0)?(this.setCurrentRawFrameValue(this.totalFrames+t%this.totalFrames),this._completedLoop?this.trigger("loopComplete"):this._completedLoop=!0):(i=!0,t=0)):this.setCurrentRawFrameValue(t),i&&(this.setCurrentRawFrameValue(t),this.pause(),this.trigger("complete"))}},AnimationItem.prototype.adjustSegment=function(e,t){this.playCount=0,e[1]<e[0]?(this.frameModifier>0&&(this.playSpeed<0?this.setSpeed(-this.playSpeed):this.setDirection(-1)),this.totalFrames=e[0]-e[1],this.timeCompleted=this.totalFrames,this.firstFrame=e[1],this.setCurrentRawFrameValue(this.totalFrames-.001-t)):e[1]>e[0]&&(this.frameModifier<0&&(this.playSpeed<0?this.setSpeed(-this.playSpeed):this.setDirection(1)),this.totalFrames=e[1]-e[0],this.timeCompleted=this.totalFrames,this.firstFrame=e[0],this.setCurrentRawFrameValue(.001+t)),this.trigger("segmentStart")},AnimationItem.prototype.setSegment=function(e,t){var i=-1;this.isPaused&&(this.currentRawFrame+this.firstFrame<e?i=e:this.currentRawFrame+this.firstFrame>t&&(i=t-e)),this.firstFrame=e,this.totalFrames=t-e,this.timeCompleted=this.totalFrames,i!==-1&&this.goToAndStop(i,!0)},AnimationItem.prototype.playSegments=function(e,t){if(t&&(this.segments.length=0),_typeof$4(e[0])==="object"){var i,n=e.length;for(i=0;i<n;i+=1)this.segments.push(e[i])}else this.segments.push(e);this.segments.length&&t&&this.adjustSegment(this.segments.shift(),0),this.isPaused&&this.play()},AnimationItem.prototype.resetSegments=function(e){this.segments.length=0,this.segments.push([this.animationData.ip,this.animationData.op]),e&&this.checkSegments(0)},AnimationItem.prototype.checkSegments=function(e){return this.segments.length?(this.adjustSegment(this.segments.shift(),e),!0):!1},AnimationItem.prototype.destroy=function(e){e&&this.name!==e||!this.renderer||(this.renderer.destroy(),this.imagePreloader.destroy(),this.trigger("destroy"),this._cbs=null,this.onEnterFrame=null,this.onLoopComplete=null,this.onComplete=null,this.onSegmentStart=null,this.onDestroy=null,this.renderer=null,this.expressionsPlugin=null,this.imagePreloader=null,this.projectInterface=null)},AnimationItem.prototype.setCurrentRawFrameValue=function(e){this.currentRawFrame=e,this.gotoFrame()},AnimationItem.prototype.setSpeed=function(e){this.playSpeed=e,this.updaFrameModifier()},AnimationItem.prototype.setDirection=function(e){this.playDirection=e<0?-1:1,this.updaFrameModifier()},AnimationItem.prototype.setLoop=function(e){this.loop=e},AnimationItem.prototype.setVolume=function(e,t){t&&this.name!==t||this.audioController.setVolume(e)},AnimationItem.prototype.getVolume=function(){return this.audioController.getVolume()},AnimationItem.prototype.mute=function(e){e&&this.name!==e||this.audioController.mute()},AnimationItem.prototype.unmute=function(e){e&&this.name!==e||this.audioController.unmute()},AnimationItem.prototype.updaFrameModifier=function(){this.frameModifier=this.frameMult*this.playSpeed*this.playDirection,this.audioController.setRate(this.playSpeed*this.playDirection)},AnimationItem.prototype.getPath=function(){return this.path},AnimationItem.prototype.getAssetsPath=function(e){var t="";if(e.e)t=e.p;else if(this.assetsPath){var i=e.p;i.indexOf("images/")!==-1&&(i=i.split("/")[1]),t=this.assetsPath+i}else t=this.path,t+=e.u?e.u:"",t+=e.p;return t},AnimationItem.prototype.getAssetData=function(e){for(var t=0,i=this.assets.length;t<i;){if(e===this.assets[t].id)return this.assets[t];t+=1}return null},AnimationItem.prototype.hide=function(){this.renderer.hide()},AnimationItem.prototype.show=function(){this.renderer.show()},AnimationItem.prototype.getDuration=function(e){return e?this.totalFrames:this.totalFrames/this.frameRate},AnimationItem.prototype.updateDocumentData=function(e,t,i){try{var n=this.renderer.getElementByPath(e);n.updateDocumentData(t,i)}catch{}},AnimationItem.prototype.trigger=function(e){if(this._cbs&&this._cbs[e])switch(e){case"enterFrame":this.triggerEvent(e,new BMEnterFrameEvent(e,this.currentFrame,this.totalFrames,this.frameModifier));break;case"drawnFrame":this.drawnFrameEvent.currentTime=this.currentFrame,this.drawnFrameEvent.totalTime=this.totalFrames,this.drawnFrameEvent.direction=this.frameModifier,this.triggerEvent(e,this.drawnFrameEvent);break;case"loopComplete":this.triggerEvent(e,new BMCompleteLoopEvent(e,this.loop,this.playCount,this.frameMult));break;case"complete":this.triggerEvent(e,new BMCompleteEvent(e,this.frameMult));break;case"segmentStart":this.triggerEvent(e,new BMSegmentStartEvent(e,this.firstFrame,this.totalFrames));break;case"destroy":this.triggerEvent(e,new BMDestroyEvent(e,this));break;default:this.triggerEvent(e)}e==="enterFrame"&&this.onEnterFrame&&this.onEnterFrame.call(this,new BMEnterFrameEvent(e,this.currentFrame,this.totalFrames,this.frameMult)),e==="loopComplete"&&this.onLoopComplete&&this.onLoopComplete.call(this,new BMCompleteLoopEvent(e,this.loop,this.playCount,this.frameMult)),e==="complete"&&this.onComplete&&this.onComplete.call(this,new BMCompleteEvent(e,this.frameMult)),e==="segmentStart"&&this.onSegmentStart&&this.onSegmentStart.call(this,new BMSegmentStartEvent(e,this.firstFrame,this.totalFrames)),e==="destroy"&&this.onDestroy&&this.onDestroy.call(this,new BMDestroyEvent(e,this))},AnimationItem.prototype.triggerRenderFrameError=function(e){var t=new BMRenderFrameErrorEvent(e,this.currentFrame);this.triggerEvent("error",t),this.onError&&this.onError.call(this,t)},AnimationItem.prototype.triggerConfigError=function(e){var t=new BMConfigErrorEvent(e,this.currentFrame);this.triggerEvent("error",t),this.onError&&this.onError.call(this,t)};var animationManager=function(){var e={},t=[],i=0,n=0,s=0,a=!0,o=!1;function l(V){for(var A=0,R=V.target;A<n;)t[A].animation===R&&(t.splice(A,1),A-=1,n-=1,R.isPaused||d()),A+=1}function c(V,A){if(!V)return null;for(var R=0;R<n;){if(t[R].elem===V&&t[R].elem!==null)return t[R].animation;R+=1}var M=new AnimationItem;return p(M,V),M.setData(V,A),M}function u(){var V,A=t.length,R=[];for(V=0;V<A;V+=1)R.push(t[V].animation);return R}function f(){s+=1,Z()}function d(){s-=1}function p(V,A){V.addEventListener("destroy",l),V.addEventListener("_active",f),V.addEventListener("_idle",d),t.push({elem:A,animation:V}),n+=1}function b(V){var A=new AnimationItem;return p(A,null),A.setParams(V),A}function y(V,A){var R;for(R=0;R<n;R+=1)t[R].animation.setSpeed(V,A)}function g(V,A){var R;for(R=0;R<n;R+=1)t[R].animation.setDirection(V,A)}function P(V){var A;for(A=0;A<n;A+=1)t[A].animation.play(V)}function m(V){var A=V-i,R;for(R=0;R<n;R+=1)t[R].animation.advanceTime(A);i=V,s&&!o?window.requestAnimationFrame(m):a=!0}function x(V){i=V,window.requestAnimationFrame(m)}function C(V){var A;for(A=0;A<n;A+=1)t[A].animation.pause(V)}function S(V,A,R){var M;for(M=0;M<n;M+=1)t[M].animation.goToAndStop(V,A,R)}function E(V){var A;for(A=0;A<n;A+=1)t[A].animation.stop(V)}function T(V){var A;for(A=0;A<n;A+=1)t[A].animation.togglePause(V)}function L(V){var A;for(A=n-1;A>=0;A-=1)t[A].animation.destroy(V)}function _(V,A,R){var M=[].concat([].slice.call(document.getElementsByClassName("lottie")),[].slice.call(document.getElementsByClassName("bodymovin"))),I,j=M.length;for(I=0;I<j;I+=1)R&&M[I].setAttribute("data-bm-type",R),c(M[I],V);if(A&&j===0){R||(R="svg");var G=document.getElementsByTagName("body")[0];G.innerText="";var U=createTag("div");U.style.width="100%",U.style.height="100%",U.setAttribute("data-bm-type",R),G.appendChild(U),c(U,V)}}function k(){var V;for(V=0;V<n;V+=1)t[V].animation.resize()}function Z(){!o&&s&&a&&(window.requestAnimationFrame(x),a=!1)}function B(){o=!0}function D(){o=!1,Z()}function H(V,A){var R;for(R=0;R<n;R+=1)t[R].animation.setVolume(V,A)}function z(V){var A;for(A=0;A<n;A+=1)t[A].animation.mute(V)}function O(V){var A;for(A=0;A<n;A+=1)t[A].animation.unmute(V)}return e.registerAnimation=c,e.loadAnimation=b,e.setSpeed=y,e.setDirection=g,e.play=P,e.pause=C,e.stop=E,e.togglePause=T,e.searchAnimations=_,e.resize=k,e.goToAndStop=S,e.destroy=L,e.freeze=B,e.unfreeze=D,e.setVolume=H,e.mute=z,e.unmute=O,e.getRegisteredAnimations=u,e}(),BezierFactory=function(){var e={};e.getBezierEasing=i;var t={};function i(x,C,S,E,T){var L=T||("bez_"+x+"_"+C+"_"+S+"_"+E).replace(/\./g,"p");if(t[L])return t[L];var _=new m([x,C,S,E]);return t[L]=_,_}var n=4,s=.001,a=1e-7,o=10,l=11,c=1/(l-1),u=typeof Float32Array=="function";function f(x,C){return 1-3*C+3*x}function d(x,C){return 3*C-6*x}function p(x){return 3*x}function b(x,C,S){return((f(C,S)*x+d(C,S))*x+p(C))*x}function y(x,C,S){return 3*f(C,S)*x*x+2*d(C,S)*x+p(C)}function g(x,C,S,E,T){var L,_,k=0;do _=C+(S-C)/2,L=b(_,E,T)-x,L>0?S=_:C=_;while(Math.abs(L)>a&&++k<o);return _}function P(x,C,S,E){for(var T=0;T<n;++T){var L=y(C,S,E);if(L===0)return C;var _=b(C,S,E)-x;C-=_/L}return C}function m(x){this._p=x,this._mSampleValues=u?new Float32Array(l):new Array(l),this._precomputed=!1,this.get=this.get.bind(this)}return m.prototype={get:function(C){var S=this._p[0],E=this._p[1],T=this._p[2],L=this._p[3];return this._precomputed||this._precompute(),S===E&&T===L?C:C===0?0:C===1?1:b(this._getTForX(C),E,L)},_precompute:function(){var C=this._p[0],S=this._p[1],E=this._p[2],T=this._p[3];this._precomputed=!0,(C!==S||E!==T)&&this._calcSampleValues()},_calcSampleValues:function(){for(var C=this._p[0],S=this._p[2],E=0;E<l;++E)this._mSampleValues[E]=b(E*c,C,S)},_getTForX:function(C){for(var S=this._p[0],E=this._p[2],T=this._mSampleValues,L=0,_=1,k=l-1;_!==k&&T[_]<=C;++_)L+=c;--_;var Z=(C-T[_])/(T[_+1]-T[_]),B=L+Z*c,D=y(B,S,E);return D>=s?P(C,B,S,E):D===0?B:g(C,L,L+c,S,E)}},e}(),pooling=function(){function e(t){return t.concat(createSizedArray(t.length))}return{double:e}}(),poolFactory=function(){return function(e,t,i){var n=0,s=e,a=createSizedArray(s),o={newElement:l,release:c};function l(){var u;return n?(n-=1,u=a[n]):u=t(),u}function c(u){n===s&&(a=pooling.double(a),s*=2),i&&i(u),a[n]=u,n+=1}return o}}(),bezierLengthPool=function(){function e(){return{addedLength:0,percents:createTypedArray("float32",getDefaultCurveSegments()),lengths:createTypedArray("float32",getDefaultCurveSegments())}}return poolFactory(8,e)}(),segmentsLengthPool=function(){function e(){return{lengths:[],totalLength:0}}function t(i){var n,s=i.lengths.length;for(n=0;n<s;n+=1)bezierLengthPool.release(i.lengths[n]);i.lengths.length=0}return poolFactory(8,e,t)}();function bezFunction(){var e=Math;function t(p,b,y,g,P,m){var x=p*g+b*P+y*m-P*g-m*p-y*b;return x>-.001&&x<.001}function i(p,b,y,g,P,m,x,C,S){if(y===0&&m===0&&S===0)return t(p,b,g,P,x,C);var E=e.sqrt(e.pow(g-p,2)+e.pow(P-b,2)+e.pow(m-y,2)),T=e.sqrt(e.pow(x-p,2)+e.pow(C-b,2)+e.pow(S-y,2)),L=e.sqrt(e.pow(x-g,2)+e.pow(C-P,2)+e.pow(S-m,2)),_;return E>T?E>L?_=E-T-L:_=L-T-E:L>T?_=L-T-E:_=T-E-L,_>-1e-4&&_<1e-4}var n=function(){return function(p,b,y,g){var P=getDefaultCurveSegments(),m,x,C,S,E,T=0,L,_=[],k=[],Z=bezierLengthPool.newElement();for(C=y.length,m=0;m<P;m+=1){for(E=m/(P-1),L=0,x=0;x<C;x+=1)S=bmPow(1-E,3)*p[x]+3*bmPow(1-E,2)*E*y[x]+3*(1-E)*bmPow(E,2)*g[x]+bmPow(E,3)*b[x],_[x]=S,k[x]!==null&&(L+=bmPow(_[x]-k[x],2)),k[x]=_[x];L&&(L=bmSqrt(L),T+=L),Z.percents[m]=E,Z.lengths[m]=T}return Z.addedLength=T,Z}}();function s(p){var b=segmentsLengthPool.newElement(),y=p.c,g=p.v,P=p.o,m=p.i,x,C=p._length,S=b.lengths,E=0;for(x=0;x<C-1;x+=1)S[x]=n(g[x],g[x+1],P[x],m[x+1]),E+=S[x].addedLength;return y&&C&&(S[x]=n(g[x],g[0],P[x],m[0]),E+=S[x].addedLength),b.totalLength=E,b}function a(p){this.segmentLength=0,this.points=new Array(p)}function o(p,b){this.partialLength=p,this.point=b}var l=function(){var p={};return function(b,y,g,P){var m=(b[0]+"_"+b[1]+"_"+y[0]+"_"+y[1]+"_"+g[0]+"_"+g[1]+"_"+P[0]+"_"+P[1]).replace(/\./g,"p");if(!p[m]){var x=getDefaultCurveSegments(),C,S,E,T,L,_=0,k,Z,B=null;b.length===2&&(b[0]!==y[0]||b[1]!==y[1])&&t(b[0],b[1],y[0],y[1],b[0]+g[0],b[1]+g[1])&&t(b[0],b[1],y[0],y[1],y[0]+P[0],y[1]+P[1])&&(x=2);var D=new a(x);for(E=g.length,C=0;C<x;C+=1){for(Z=createSizedArray(E),L=C/(x-1),k=0,S=0;S<E;S+=1)T=bmPow(1-L,3)*b[S]+3*bmPow(1-L,2)*L*(b[S]+g[S])+3*(1-L)*bmPow(L,2)*(y[S]+P[S])+bmPow(L,3)*y[S],Z[S]=T,B!==null&&(k+=bmPow(Z[S]-B[S],2));k=bmSqrt(k),_+=k,D.points[C]=new o(k,Z),B=Z}D.segmentLength=_,p[m]=D}return p[m]}}();function c(p,b){var y=b.percents,g=b.lengths,P=y.length,m=bmFloor((P-1)*p),x=p*b.addedLength,C=0;if(m===P-1||m===0||x===g[m])return y[m];for(var S=g[m]>x?-1:1,E=!0;E;)if(g[m]<=x&&g[m+1]>x?(C=(x-g[m])/(g[m+1]-g[m]),E=!1):m+=S,m<0||m>=P-1){if(m===P-1)return y[m];E=!1}return y[m]+(y[m+1]-y[m])*C}function u(p,b,y,g,P,m){var x=c(P,m),C=1-x,S=e.round((C*C*C*p[0]+(x*C*C+C*x*C+C*C*x)*y[0]+(x*x*C+C*x*x+x*C*x)*g[0]+x*x*x*b[0])*1e3)/1e3,E=e.round((C*C*C*p[1]+(x*C*C+C*x*C+C*C*x)*y[1]+(x*x*C+C*x*x+x*C*x)*g[1]+x*x*x*b[1])*1e3)/1e3;return[S,E]}var f=createTypedArray("float32",8);function d(p,b,y,g,P,m,x){P<0?P=0:P>1&&(P=1);var C=c(P,x);m=m>1?1:m;var S=c(m,x),E,T=p.length,L=1-C,_=1-S,k=L*L*L,Z=C*L*L*3,B=C*C*L*3,D=C*C*C,H=L*L*_,z=C*L*_+L*C*_+L*L*S,O=C*C*_+L*C*S+C*L*S,V=C*C*S,A=L*_*_,R=C*_*_+L*S*_+L*_*S,M=C*S*_+L*S*S+C*_*S,I=C*S*S,j=_*_*_,G=S*_*_+_*S*_+_*_*S,U=S*S*_+_*S*S+S*_*S,Y=S*S*S;for(E=0;E<T;E+=1)f[E*4]=e.round((k*p[E]+Z*y[E]+B*g[E]+D*b[E])*1e3)/1e3,f[E*4+1]=e.round((H*p[E]+z*y[E]+O*g[E]+V*b[E])*1e3)/1e3,f[E*4+2]=e.round((A*p[E]+R*y[E]+M*g[E]+I*b[E])*1e3)/1e3,f[E*4+3]=e.round((j*p[E]+G*y[E]+U*g[E]+Y*b[E])*1e3)/1e3;return f}return{getSegmentsLength:s,getNewSegment:d,getPointInSegment:u,buildBezierData:l,pointOnLine2D:t,pointOnLine3D:i}}var bez=bezFunction(),initFrame=initialDefaultFrame,mathAbs=Math.abs;function interpolateValue(e,t){var i=this.offsetTime,n;this.propType==="multidimensional"&&(n=createTypedArray("float32",this.pv.length));for(var s=t.lastIndex,a=s,o=this.keyframes.length-1,l=!0,c,u,f;l;){if(c=this.keyframes[a],u=this.keyframes[a+1],a===o-1&&e>=u.t-i){c.h&&(c=u),s=0;break}if(u.t-i>e){s=a;break}a<o-1?a+=1:(s=0,l=!1)}f=this.keyframesMetadata[a]||{};var d,p,b,y,g,P,m=u.t-i,x=c.t-i,C;if(c.to){f.bezierData||(f.bezierData=bez.buildBezierData(c.s,u.s||c.e,c.to,c.ti));var S=f.bezierData;if(e>=m||e<x){var E=e>=m?S.points.length-1:0;for(p=S.points[E].point.length,d=0;d<p;d+=1)n[d]=S.points[E].point[d]}else{f.__fnct?P=f.__fnct:(P=BezierFactory.getBezierEasing(c.o.x,c.o.y,c.i.x,c.i.y,c.n).get,f.__fnct=P),b=P((e-x)/(m-x));var T=S.segmentLength*b,L,_=t.lastFrame<e&&t._lastKeyframeIndex===a?t._lastAddedLength:0;for(g=t.lastFrame<e&&t._lastKeyframeIndex===a?t._lastPoint:0,l=!0,y=S.points.length;l;){if(_+=S.points[g].partialLength,T===0||b===0||g===S.points.length-1){for(p=S.points[g].point.length,d=0;d<p;d+=1)n[d]=S.points[g].point[d];break}else if(T>=_&&T<_+S.points[g+1].partialLength){for(L=(T-_)/S.points[g+1].partialLength,p=S.points[g].point.length,d=0;d<p;d+=1)n[d]=S.points[g].point[d]+(S.points[g+1].point[d]-S.points[g].point[d])*L;break}g<y-1?g+=1:l=!1}t._lastPoint=g,t._lastAddedLength=_-S.points[g].partialLength,t._lastKeyframeIndex=a}}else{var k,Z,B,D,H;if(o=c.s.length,C=u.s||c.e,this.sh&&c.h!==1)if(e>=m)n[0]=C[0],n[1]=C[1],n[2]=C[2];else if(e<=x)n[0]=c.s[0],n[1]=c.s[1],n[2]=c.s[2];else{var z=createQuaternion(c.s),O=createQuaternion(C),V=(e-x)/(m-x);quaternionToEuler(n,slerp(z,O,V))}else for(a=0;a<o;a+=1)c.h!==1&&(e>=m?b=1:e<x?b=0:(c.o.x.constructor===Array?(f.__fnct||(f.__fnct=[]),f.__fnct[a]?P=f.__fnct[a]:(k=c.o.x[a]===void 0?c.o.x[0]:c.o.x[a],Z=c.o.y[a]===void 0?c.o.y[0]:c.o.y[a],B=c.i.x[a]===void 0?c.i.x[0]:c.i.x[a],D=c.i.y[a]===void 0?c.i.y[0]:c.i.y[a],P=BezierFactory.getBezierEasing(k,Z,B,D).get,f.__fnct[a]=P)):f.__fnct?P=f.__fnct:(k=c.o.x,Z=c.o.y,B=c.i.x,D=c.i.y,P=BezierFactory.getBezierEasing(k,Z,B,D).get,c.keyframeMetadata=P),b=P((e-x)/(m-x)))),C=u.s||c.e,H=c.h===1?c.s[a]:c.s[a]+(C[a]-c.s[a])*b,this.propType==="multidimensional"?n[a]=H:n=H}return t.lastIndex=s,n}function slerp(e,t,i){var n=[],s=e[0],a=e[1],o=e[2],l=e[3],c=t[0],u=t[1],f=t[2],d=t[3],p,b,y,g,P;return b=s*c+a*u+o*f+l*d,b<0&&(b=-b,c=-c,u=-u,f=-f,d=-d),1-b>1e-6?(p=Math.acos(b),y=Math.sin(p),g=Math.sin((1-i)*p)/y,P=Math.sin(i*p)/y):(g=1-i,P=i),n[0]=g*s+P*c,n[1]=g*a+P*u,n[2]=g*o+P*f,n[3]=g*l+P*d,n}function quaternionToEuler(e,t){var i=t[0],n=t[1],s=t[2],a=t[3],o=Math.atan2(2*n*a-2*i*s,1-2*n*n-2*s*s),l=Math.asin(2*i*n+2*s*a),c=Math.atan2(2*i*a-2*n*s,1-2*i*i-2*s*s);e[0]=o/degToRads,e[1]=l/degToRads,e[2]=c/degToRads}function createQuaternion(e){var t=e[0]*degToRads,i=e[1]*degToRads,n=e[2]*degToRads,s=Math.cos(t/2),a=Math.cos(i/2),o=Math.cos(n/2),l=Math.sin(t/2),c=Math.sin(i/2),u=Math.sin(n/2),f=s*a*o-l*c*u,d=l*c*o+s*a*u,p=l*a*o+s*c*u,b=s*c*o-l*a*u;return[d,p,b,f]}function getValueAtCurrentTime(){var e=this.comp.renderedFrame-this.offsetTime,t=this.keyframes[0].t-this.offsetTime,i=this.keyframes[this.keyframes.length-1].t-this.offsetTime;if(!(e===this._caching.lastFrame||this._caching.lastFrame!==initFrame&&(this._caching.lastFrame>=i&&e>=i||this._caching.lastFrame<t&&e<t))){this._caching.lastFrame>=e&&(this._caching._lastKeyframeIndex=-1,this._caching.lastIndex=0);var n=this.interpolateValue(e,this._caching);this.pv=n}return this._caching.lastFrame=e,this.pv}function setVValue(e){var t;if(this.propType==="unidimensional")t=e*this.mult,mathAbs(this.v-t)>1e-5&&(this.v=t,this._mdf=!0);else for(var i=0,n=this.v.length;i<n;)t=e[i]*this.mult,mathAbs(this.v[i]-t)>1e-5&&(this.v[i]=t,this._mdf=!0),i+=1}function processEffectsSequence(){if(!(this.elem.globalData.frameId===this.frameId||!this.effectsSequence.length)){if(this.lock){this.setVValue(this.pv);return}this.lock=!0,this._mdf=this._isFirstFrame;var e,t=this.effectsSequence.length,i=this.kf?this.pv:this.data.k;for(e=0;e<t;e+=1)i=this.effectsSequence[e](i);this.setVValue(i),this._isFirstFrame=!1,this.lock=!1,this.frameId=this.elem.globalData.frameId}}function addEffect(e){this.effectsSequence.push(e),this.container.addDynamicProperty(this)}function ValueProperty(e,t,i,n){this.propType="unidimensional",this.mult=i||1,this.data=t,this.v=i?t.k*i:t.k,this.pv=t.k,this._mdf=!1,this.elem=e,this.container=n,this.comp=e.comp,this.k=!1,this.kf=!1,this.vel=0,this.effectsSequence=[],this._isFirstFrame=!0,this.getValue=processEffectsSequence,this.setVValue=setVValue,this.addEffect=addEffect}function MultiDimensionalProperty(e,t,i,n){this.propType="multidimensional",this.mult=i||1,this.data=t,this._mdf=!1,this.elem=e,this.container=n,this.comp=e.comp,this.k=!1,this.kf=!1,this.frameId=-1;var s,a=t.k.length;for(this.v=createTypedArray("float32",a),this.pv=createTypedArray("float32",a),this.vel=createTypedArray("float32",a),s=0;s<a;s+=1)this.v[s]=t.k[s]*this.mult,this.pv[s]=t.k[s];this._isFirstFrame=!0,this.effectsSequence=[],this.getValue=processEffectsSequence,this.setVValue=setVValue,this.addEffect=addEffect}function KeyframedValueProperty(e,t,i,n){this.propType="unidimensional",this.keyframes=t.k,this.keyframesMetadata=[],this.offsetTime=e.data.st,this.frameId=-1,this._caching={lastFrame:initFrame,lastIndex:0,value:0,_lastKeyframeIndex:-1},this.k=!0,this.kf=!0,this.data=t,this.mult=i||1,this.elem=e,this.container=n,this.comp=e.comp,this.v=initFrame,this.pv=initFrame,this._isFirstFrame=!0,this.getValue=processEffectsSequence,this.setVValue=setVValue,this.interpolateValue=interpolateValue,this.effectsSequence=[getValueAtCurrentTime.bind(this)],this.addEffect=addEffect}function KeyframedMultidimensionalProperty(e,t,i,n){this.propType="multidimensional";var s,a=t.k.length,o,l,c,u;for(s=0;s<a-1;s+=1)t.k[s].to&&t.k[s].s&&t.k[s+1]&&t.k[s+1].s&&(o=t.k[s].s,l=t.k[s+1].s,c=t.k[s].to,u=t.k[s].ti,(o.length===2&&!(o[0]===l[0]&&o[1]===l[1])&&bez.pointOnLine2D(o[0],o[1],l[0],l[1],o[0]+c[0],o[1]+c[1])&&bez.pointOnLine2D(o[0],o[1],l[0],l[1],l[0]+u[0],l[1]+u[1])||o.length===3&&!(o[0]===l[0]&&o[1]===l[1]&&o[2]===l[2])&&bez.pointOnLine3D(o[0],o[1],o[2],l[0],l[1],l[2],o[0]+c[0],o[1]+c[1],o[2]+c[2])&&bez.pointOnLine3D(o[0],o[1],o[2],l[0],l[1],l[2],l[0]+u[0],l[1]+u[1],l[2]+u[2]))&&(t.k[s].to=null,t.k[s].ti=null),o[0]===l[0]&&o[1]===l[1]&&c[0]===0&&c[1]===0&&u[0]===0&&u[1]===0&&(o.length===2||o[2]===l[2]&&c[2]===0&&u[2]===0)&&(t.k[s].to=null,t.k[s].ti=null));this.effectsSequence=[getValueAtCurrentTime.bind(this)],this.data=t,this.keyframes=t.k,this.keyframesMetadata=[],this.offsetTime=e.data.st,this.k=!0,this.kf=!0,this._isFirstFrame=!0,this.mult=i||1,this.elem=e,this.container=n,this.comp=e.comp,this.getValue=processEffectsSequence,this.setVValue=setVValue,this.interpolateValue=interpolateValue,this.frameId=-1;var f=t.k[0].s.length;for(this.v=createTypedArray("float32",f),this.pv=createTypedArray("float32",f),s=0;s<f;s+=1)this.v[s]=initFrame,this.pv[s]=initFrame;this._caching={lastFrame:initFrame,lastIndex:0,value:createTypedArray("float32",f)},this.addEffect=addEffect}var PropertyFactory=function(){function e(i,n,s,a,o){n.sid&&(n=i.globalData.slotManager.getProp(n));var l;if(!n.k.length)l=new ValueProperty(i,n,a,o);else if(typeof n.k[0]=="number")l=new MultiDimensionalProperty(i,n,a,o);else switch(s){case 0:l=new KeyframedValueProperty(i,n,a,o);break;case 1:l=new KeyframedMultidimensionalProperty(i,n,a,o);break}return l.effectsSequence.length&&o.addDynamicProperty(l),l}var t={getProp:e};return t}();function DynamicPropertyContainer(){}DynamicPropertyContainer.prototype={addDynamicProperty:function(t){this.dynamicProperties.indexOf(t)===-1&&(this.dynamicProperties.push(t),this.container.addDynamicProperty(this),this._isAnimated=!0)},iterateDynamicProperties:function(){this._mdf=!1;var t,i=this.dynamicProperties.length;for(t=0;t<i;t+=1)this.dynamicProperties[t].getValue(),this.dynamicProperties[t]._mdf&&(this._mdf=!0)},initDynamicPropertyContainer:function(t){this.container=t,this.dynamicProperties=[],this._mdf=!1,this._isAnimated=!1}};var pointPool=function(){function e(){return createTypedArray("float32",2)}return poolFactory(8,e)}();function ShapePath(){this.c=!1,this._length=0,this._maxLength=8,this.v=createSizedArray(this._maxLength),this.o=createSizedArray(this._maxLength),this.i=createSizedArray(this._maxLength)}ShapePath.prototype.setPathData=function(e,t){this.c=e,this.setLength(t);for(var i=0;i<t;)this.v[i]=pointPool.newElement(),this.o[i]=pointPool.newElement(),this.i[i]=pointPool.newElement(),i+=1},ShapePath.prototype.setLength=function(e){for(;this._maxLength<e;)this.doubleArrayLength();this._length=e},ShapePath.prototype.doubleArrayLength=function(){this.v=this.v.concat(createSizedArray(this._maxLength)),this.i=this.i.concat(createSizedArray(this._maxLength)),this.o=this.o.concat(createSizedArray(this._maxLength)),this._maxLength*=2},ShapePath.prototype.setXYAt=function(e,t,i,n,s){var a;switch(this._length=Math.max(this._length,n+1),this._length>=this._maxLength&&this.doubleArrayLength(),i){case"v":a=this.v;break;case"i":a=this.i;break;case"o":a=this.o;break;default:a=[];break}(!a[n]||a[n]&&!s)&&(a[n]=pointPool.newElement()),a[n][0]=e,a[n][1]=t},ShapePath.prototype.setTripleAt=function(e,t,i,n,s,a,o,l){this.setXYAt(e,t,"v",o,l),this.setXYAt(i,n,"o",o,l),this.setXYAt(s,a,"i",o,l)},ShapePath.prototype.reverse=function(){var e=new ShapePath;e.setPathData(this.c,this._length);var t=this.v,i=this.o,n=this.i,s=0;this.c&&(e.setTripleAt(t[0][0],t[0][1],n[0][0],n[0][1],i[0][0],i[0][1],0,!1),s=1);var a=this._length-1,o=this._length,l;for(l=s;l<o;l+=1)e.setTripleAt(t[a][0],t[a][1],n[a][0],n[a][1],i[a][0],i[a][1],l,!1),a-=1;return e},ShapePath.prototype.length=function(){return this._length};var shapePool=function(){function e(){return new ShapePath}function t(s){var a=s._length,o;for(o=0;o<a;o+=1)pointPool.release(s.v[o]),pointPool.release(s.i[o]),pointPool.release(s.o[o]),s.v[o]=null,s.i[o]=null,s.o[o]=null;s._length=0,s.c=!1}function i(s){var a=n.newElement(),o,l=s._length===void 0?s.v.length:s._length;for(a.setLength(l),a.c=s.c,o=0;o<l;o+=1)a.setTripleAt(s.v[o][0],s.v[o][1],s.o[o][0],s.o[o][1],s.i[o][0],s.i[o][1],o);return a}var n=poolFactory(4,e,t);return n.clone=i,n}();function ShapeCollection(){this._length=0,this._maxLength=4,this.shapes=createSizedArray(this._maxLength)}ShapeCollection.prototype.addShape=function(e){this._length===this._maxLength&&(this.shapes=this.shapes.concat(createSizedArray(this._maxLength)),this._maxLength*=2),this.shapes[this._length]=e,this._length+=1},ShapeCollection.prototype.releaseShapes=function(){var e;for(e=0;e<this._length;e+=1)shapePool.release(this.shapes[e]);this._length=0};var shapeCollectionPool=function(){var e={newShapeCollection:s,release:a},t=0,i=4,n=createSizedArray(i);function s(){var o;return t?(t-=1,o=n[t]):o=new ShapeCollection,o}function a(o){var l,c=o._length;for(l=0;l<c;l+=1)shapePool.release(o.shapes[l]);o._length=0,t===i&&(n=pooling.double(n),i*=2),n[t]=o,t+=1}return e}(),ShapePropertyFactory=function(){var e=-999999;function t(m,x,C){var S=C.lastIndex,E,T,L,_,k,Z,B,D,H,z=this.keyframes;if(m<z[0].t-this.offsetTime)E=z[0].s[0],L=!0,S=0;else if(m>=z[z.length-1].t-this.offsetTime)E=z[z.length-1].s?z[z.length-1].s[0]:z[z.length-2].e[0],L=!0;else{for(var O=S,V=z.length-1,A=!0,R,M,I;A&&(R=z[O],M=z[O+1],!(M.t-this.offsetTime>m));)O<V-1?O+=1:A=!1;if(I=this.keyframesMetadata[O]||{},L=R.h===1,S=O,!L){if(m>=M.t-this.offsetTime)D=1;else if(m<R.t-this.offsetTime)D=0;else{var j;I.__fnct?j=I.__fnct:(j=BezierFactory.getBezierEasing(R.o.x,R.o.y,R.i.x,R.i.y).get,I.__fnct=j),D=j((m-(R.t-this.offsetTime))/(M.t-this.offsetTime-(R.t-this.offsetTime)))}T=M.s?M.s[0]:R.e[0]}E=R.s[0]}for(Z=x._length,B=E.i[0].length,C.lastIndex=S,_=0;_<Z;_+=1)for(k=0;k<B;k+=1)H=L?E.i[_][k]:E.i[_][k]+(T.i[_][k]-E.i[_][k])*D,x.i[_][k]=H,H=L?E.o[_][k]:E.o[_][k]+(T.o[_][k]-E.o[_][k])*D,x.o[_][k]=H,H=L?E.v[_][k]:E.v[_][k]+(T.v[_][k]-E.v[_][k])*D,x.v[_][k]=H}function i(){var m=this.comp.renderedFrame-this.offsetTime,x=this.keyframes[0].t-this.offsetTime,C=this.keyframes[this.keyframes.length-1].t-this.offsetTime,S=this._caching.lastFrame;return S!==e&&(S<x&&m<x||S>C&&m>C)||(this._caching.lastIndex=S<m?this._caching.lastIndex:0,this.interpolateShape(m,this.pv,this._caching)),this._caching.lastFrame=m,this.pv}function n(){this.paths=this.localShapeCollection}function s(m,x){if(m._length!==x._length||m.c!==x.c)return!1;var C,S=m._length;for(C=0;C<S;C+=1)if(m.v[C][0]!==x.v[C][0]||m.v[C][1]!==x.v[C][1]||m.o[C][0]!==x.o[C][0]||m.o[C][1]!==x.o[C][1]||m.i[C][0]!==x.i[C][0]||m.i[C][1]!==x.i[C][1])return!1;return!0}function a(m){s(this.v,m)||(this.v=shapePool.clone(m),this.localShapeCollection.releaseShapes(),this.localShapeCollection.addShape(this.v),this._mdf=!0,this.paths=this.localShapeCollection)}function o(){if(this.elem.globalData.frameId!==this.frameId){if(!this.effectsSequence.length){this._mdf=!1;return}if(this.lock){this.setVValue(this.pv);return}this.lock=!0,this._mdf=!1;var m;this.kf?m=this.pv:this.data.ks?m=this.data.ks.k:m=this.data.pt.k;var x,C=this.effectsSequence.length;for(x=0;x<C;x+=1)m=this.effectsSequence[x](m);this.setVValue(m),this.lock=!1,this.frameId=this.elem.globalData.frameId}}function l(m,x,C){this.propType="shape",this.comp=m.comp,this.container=m,this.elem=m,this.data=x,this.k=!1,this.kf=!1,this._mdf=!1;var S=C===3?x.pt.k:x.ks.k;this.v=shapePool.clone(S),this.pv=shapePool.clone(this.v),this.localShapeCollection=shapeCollectionPool.newShapeCollection(),this.paths=this.localShapeCollection,this.paths.addShape(this.v),this.reset=n,this.effectsSequence=[]}function c(m){this.effectsSequence.push(m),this.container.addDynamicProperty(this)}l.prototype.interpolateShape=t,l.prototype.getValue=o,l.prototype.setVValue=a,l.prototype.addEffect=c;function u(m,x,C){this.propType="shape",this.comp=m.comp,this.elem=m,this.container=m,this.offsetTime=m.data.st,this.keyframes=C===3?x.pt.k:x.ks.k,this.keyframesMetadata=[],this.k=!0,this.kf=!0;var S=this.keyframes[0].s[0].i.length;this.v=shapePool.newElement(),this.v.setPathData(this.keyframes[0].s[0].c,S),this.pv=shapePool.clone(this.v),this.localShapeCollection=shapeCollectionPool.newShapeCollection(),this.paths=this.localShapeCollection,this.paths.addShape(this.v),this.lastFrame=e,this.reset=n,this._caching={lastFrame:e,lastIndex:0},this.effectsSequence=[i.bind(this)]}u.prototype.getValue=o,u.prototype.interpolateShape=t,u.prototype.setVValue=a,u.prototype.addEffect=c;var f=function(){var m=roundCorner;function x(C,S){this.v=shapePool.newElement(),this.v.setPathData(!0,4),this.localShapeCollection=shapeCollectionPool.newShapeCollection(),this.paths=this.localShapeCollection,this.localShapeCollection.addShape(this.v),this.d=S.d,this.elem=C,this.comp=C.comp,this.frameId=-1,this.initDynamicPropertyContainer(C),this.p=PropertyFactory.getProp(C,S.p,1,0,this),this.s=PropertyFactory.getProp(C,S.s,1,0,this),this.dynamicProperties.length?this.k=!0:(this.k=!1,this.convertEllToPath())}return x.prototype={reset:n,getValue:function(){this.elem.globalData.frameId!==this.frameId&&(this.frameId=this.elem.globalData.frameId,this.iterateDynamicProperties(),this._mdf&&this.convertEllToPath())},convertEllToPath:function(){var S=this.p.v[0],E=this.p.v[1],T=this.s.v[0]/2,L=this.s.v[1]/2,_=this.d!==3,k=this.v;k.v[0][0]=S,k.v[0][1]=E-L,k.v[1][0]=_?S+T:S-T,k.v[1][1]=E,k.v[2][0]=S,k.v[2][1]=E+L,k.v[3][0]=_?S-T:S+T,k.v[3][1]=E,k.i[0][0]=_?S-T*m:S+T*m,k.i[0][1]=E-L,k.i[1][0]=_?S+T:S-T,k.i[1][1]=E-L*m,k.i[2][0]=_?S+T*m:S-T*m,k.i[2][1]=E+L,k.i[3][0]=_?S-T:S+T,k.i[3][1]=E+L*m,k.o[0][0]=_?S+T*m:S-T*m,k.o[0][1]=E-L,k.o[1][0]=_?S+T:S-T,k.o[1][1]=E+L*m,k.o[2][0]=_?S-T*m:S+T*m,k.o[2][1]=E+L,k.o[3][0]=_?S-T:S+T,k.o[3][1]=E-L*m}},extendPrototype([DynamicPropertyContainer],x),x}(),d=function(){function m(x,C){this.v=shapePool.newElement(),this.v.setPathData(!0,0),this.elem=x,this.comp=x.comp,this.data=C,this.frameId=-1,this.d=C.d,this.initDynamicPropertyContainer(x),C.sy===1?(this.ir=PropertyFactory.getProp(x,C.ir,0,0,this),this.is=PropertyFactory.getProp(x,C.is,0,.01,this),this.convertToPath=this.convertStarToPath):this.convertToPath=this.convertPolygonToPath,this.pt=PropertyFactory.getProp(x,C.pt,0,0,this),this.p=PropertyFactory.getProp(x,C.p,1,0,this),this.r=PropertyFactory.getProp(x,C.r,0,degToRads,this),this.or=PropertyFactory.getProp(x,C.or,0,0,this),this.os=PropertyFactory.getProp(x,C.os,0,.01,this),this.localShapeCollection=shapeCollectionPool.newShapeCollection(),this.localShapeCollection.addShape(this.v),this.paths=this.localShapeCollection,this.dynamicProperties.length?this.k=!0:(this.k=!1,this.convertToPath())}return m.prototype={reset:n,getValue:function(){this.elem.globalData.frameId!==this.frameId&&(this.frameId=this.elem.globalData.frameId,this.iterateDynamicProperties(),this._mdf&&this.convertToPath())},convertStarToPath:function(){var C=Math.floor(this.pt.v)*2,S=Math.PI*2/C,E=!0,T=this.or.v,L=this.ir.v,_=this.os.v,k=this.is.v,Z=2*Math.PI*T/(C*2),B=2*Math.PI*L/(C*2),D,H,z,O,V=-Math.PI/2;V+=this.r.v;var A=this.data.d===3?-1:1;for(this.v._length=0,D=0;D<C;D+=1){H=E?T:L,z=E?_:k,O=E?Z:B;var R=H*Math.cos(V),M=H*Math.sin(V),I=R===0&&M===0?0:M/Math.sqrt(R*R+M*M),j=R===0&&M===0?0:-R/Math.sqrt(R*R+M*M);R+=+this.p.v[0],M+=+this.p.v[1],this.v.setTripleAt(R,M,R-I*O*z*A,M-j*O*z*A,R+I*O*z*A,M+j*O*z*A,D,!0),E=!E,V+=S*A}},convertPolygonToPath:function(){var C=Math.floor(this.pt.v),S=Math.PI*2/C,E=this.or.v,T=this.os.v,L=2*Math.PI*E/(C*4),_,k=-Math.PI*.5,Z=this.data.d===3?-1:1;for(k+=this.r.v,this.v._length=0,_=0;_<C;_+=1){var B=E*Math.cos(k),D=E*Math.sin(k),H=B===0&&D===0?0:D/Math.sqrt(B*B+D*D),z=B===0&&D===0?0:-B/Math.sqrt(B*B+D*D);B+=+this.p.v[0],D+=+this.p.v[1],this.v.setTripleAt(B,D,B-H*L*T*Z,D-z*L*T*Z,B+H*L*T*Z,D+z*L*T*Z,_,!0),k+=S*Z}this.paths.length=0,this.paths[0]=this.v}},extendPrototype([DynamicPropertyContainer],m),m}(),p=function(){function m(x,C){this.v=shapePool.newElement(),this.v.c=!0,this.localShapeCollection=shapeCollectionPool.newShapeCollection(),this.localShapeCollection.addShape(this.v),this.paths=this.localShapeCollection,this.elem=x,this.comp=x.comp,this.frameId=-1,this.d=C.d,this.initDynamicPropertyContainer(x),this.p=PropertyFactory.getProp(x,C.p,1,0,this),this.s=PropertyFactory.getProp(x,C.s,1,0,this),this.r=PropertyFactory.getProp(x,C.r,0,0,this),this.dynamicProperties.length?this.k=!0:(this.k=!1,this.convertRectToPath())}return m.prototype={convertRectToPath:function(){var C=this.p.v[0],S=this.p.v[1],E=this.s.v[0]/2,T=this.s.v[1]/2,L=bmMin(E,T,this.r.v),_=L*(1-roundCorner);this.v._length=0,this.d===2||this.d===1?(this.v.setTripleAt(C+E,S-T+L,C+E,S-T+L,C+E,S-T+_,0,!0),this.v.setTripleAt(C+E,S+T-L,C+E,S+T-_,C+E,S+T-L,1,!0),L!==0?(this.v.setTripleAt(C+E-L,S+T,C+E-L,S+T,C+E-_,S+T,2,!0),this.v.setTripleAt(C-E+L,S+T,C-E+_,S+T,C-E+L,S+T,3,!0),this.v.setTripleAt(C-E,S+T-L,C-E,S+T-L,C-E,S+T-_,4,!0),this.v.setTripleAt(C-E,S-T+L,C-E,S-T+_,C-E,S-T+L,5,!0),this.v.setTripleAt(C-E+L,S-T,C-E+L,S-T,C-E+_,S-T,6,!0),this.v.setTripleAt(C+E-L,S-T,C+E-_,S-T,C+E-L,S-T,7,!0)):(this.v.setTripleAt(C-E,S+T,C-E+_,S+T,C-E,S+T,2),this.v.setTripleAt(C-E,S-T,C-E,S-T+_,C-E,S-T,3))):(this.v.setTripleAt(C+E,S-T+L,C+E,S-T+_,C+E,S-T+L,0,!0),L!==0?(this.v.setTripleAt(C+E-L,S-T,C+E-L,S-T,C+E-_,S-T,1,!0),this.v.setTripleAt(C-E+L,S-T,C-E+_,S-T,C-E+L,S-T,2,!0),this.v.setTripleAt(C-E,S-T+L,C-E,S-T+L,C-E,S-T+_,3,!0),this.v.setTripleAt(C-E,S+T-L,C-E,S+T-_,C-E,S+T-L,4,!0),this.v.setTripleAt(C-E+L,S+T,C-E+L,S+T,C-E+_,S+T,5,!0),this.v.setTripleAt(C+E-L,S+T,C+E-_,S+T,C+E-L,S+T,6,!0),this.v.setTripleAt(C+E,S+T-L,C+E,S+T-L,C+E,S+T-_,7,!0)):(this.v.setTripleAt(C-E,S-T,C-E+_,S-T,C-E,S-T,1,!0),this.v.setTripleAt(C-E,S+T,C-E,S+T-_,C-E,S+T,2,!0),this.v.setTripleAt(C+E,S+T,C+E-_,S+T,C+E,S+T,3,!0)))},getValue:function(){this.elem.globalData.frameId!==this.frameId&&(this.frameId=this.elem.globalData.frameId,this.iterateDynamicProperties(),this._mdf&&this.convertRectToPath())},reset:n},extendPrototype([DynamicPropertyContainer],m),m}();function b(m,x,C){var S;if(C===3||C===4){var E=C===3?x.pt:x.ks,T=E.k;T.length?S=new u(m,x,C):S=new l(m,x,C)}else C===5?S=new p(m,x):C===6?S=new f(m,x):C===7&&(S=new d(m,x));return S.k&&m.addDynamicProperty(S),S}function y(){return l}function g(){return u}var P={};return P.getShapeProp=b,P.getConstructorFunction=y,P.getKeyframedConstructorFunction=g,P}();/*!
|
|
67
67
|
Transformation Matrix v2.0
|
|
68
68
|
(c) Epistemex 2014-2015
|