@maycolem/stories 21.0.0 → 23.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.cjs.js CHANGED
@@ -1,6 +1,6 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const y=require("react/jsx-runtime"),m=require("react"),Pa=require("react-dom");function _a(t){const e=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const n in t)if(n!=="default"){const r=Object.getOwnPropertyDescriptor(t,n);Object.defineProperty(e,n,r.get?r:{enumerable:!0,get:()=>t[n]})}}return e.default=t,Object.freeze(e)}const Sn=_a(m),wa="_ScrollMenu_hnfum_9",Ta="_scrollContainerClassName_hnfum_16",Ca="_itemClassName_hnfum_28",Je={ScrollMenu:wa,scrollContainerClassName:Ta,itemClassName:Ca},Ea="_ProfileStory_bmzly_1",Va="_ProfileStoryWrap_bmzly_12",Ia="_ProfileStory__wrapImage_bmzly_26",Aa="_ProfileStory__image_bmzly_35",Ma="_ProfileStory__title_bmzly_50",Ra="_hasSeenAllStories_bmzly_59",kt={ProfileStory:Ea,ProfileStoryWrap:Va,ProfileStory__wrapImage:Ia,ProfileStory__image:Aa,ProfileStory__title:Ma,hasSeenAllStories:Ra};function Bo(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var Qe={exports:{}};/*!
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const y=require("react/jsx-runtime"),h=require("react"),Pa=require("react-dom");function wa(t){const e=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const n in t)if(n!=="default"){const r=Object.getOwnPropertyDescriptor(t,n);Object.defineProperty(e,n,r.get?r:{enumerable:!0,get:()=>t[n]})}}return e.default=t,Object.freeze(e)}const bn=wa(h),_a="_ScrollMenu_hnfum_9",Ca="_scrollContainerClassName_hnfum_16",Ta="_itemClassName_hnfum_28",Je={ScrollMenu:_a,scrollContainerClassName:Ca,itemClassName:Ta},Ea="_ProfileStory_bmzly_1",Va="_ProfileStoryWrap_bmzly_12",Aa="_ProfileStory__wrapImage_bmzly_26",Ma="_ProfileStory__image_bmzly_35",Ia="_ProfileStory__title_bmzly_50",Ra="_hasSeenAllStories_bmzly_59",Ft={ProfileStory:Ea,ProfileStoryWrap:Va,ProfileStory__wrapImage:Aa,ProfileStory__image:Ma,ProfileStory__title:Ia,hasSeenAllStories:Ra};function Lo(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var Qe={exports:{}};/*!
2
2
  Copyright (c) 2018 Jed Watson.
3
3
  Licensed under the MIT License (MIT), see
4
4
  http://jedwatson.github.io/classnames
5
- */var dr;function ja(){return dr||(dr=1,function(t){(function(){var e={}.hasOwnProperty;function n(){for(var a="",i=0;i<arguments.length;i++){var s=arguments[i];s&&(a=o(a,r(s)))}return a}function r(a){if(typeof a=="string"||typeof a=="number")return a;if(typeof a!="object")return"";if(Array.isArray(a))return n.apply(null,a);if(a.toString!==Object.prototype.toString&&!a.toString.toString().includes("[native code]"))return a.toString();var i="";for(var s in a)e.call(a,s)&&a[s]&&(i=o(i,s));return i}function o(a,i){return i?a?a+" "+i:a+i:a}t.exports?(n.default=n,t.exports=n):window.classNames=n})()}(Qe)),Qe.exports}var La=ja();const Nt=Bo(La);function Ba(){const[t,e]=m.useState({width:0,height:0}),n=m.useRef();return[m.useCallback(o=>{n.current&&n.current.disconnect(),o&&(n.current=new ResizeObserver(a=>{const i=a[0];if(!i)return;const{width:s,height:u}=i.contentRect;s&&u&&e({width:s,height:u})}),n.current.observe(o))},[]),t]}var tn,vr;function Oa(){return vr||(vr=1,tn={hexToRGB:r=>{let o=r;return o.length===4&&(o=o[0]+o[1]+o[1]+o[2]+o[2]+o[3]+o[3]),{r:parseInt(o.substring(1,3),16),g:parseInt(o.substring(3,5),16),b:parseInt(o.substring(5,7),16)}},formatRGB:({r,g:o,b:a})=>`rgb(${r},${o},${a})`,formatRGBA:({r,g:o,b:a},i)=>`rgba(${r},${o},${a},${i})`}),tn}var en,pr;function Da(){if(pr)return en;pr=1;const{hexToRGB:t,formatRGB:e,formatRGBA:n}=Oa();return en=(o,a)=>{const i=t(o);return typeof a=="number"&&a>=0&&a<=1?n(i,a):e(i)},en}var Na=Da();const Fa=Bo(Na),Un=({image:t,title:e,color:n,className:r,onProfileClick:o,width:a,hasSeenAllStories:i})=>{const[s,{width:u,height:l}]=Ba();return y.jsx("div",{ref:s,children:y.jsxs("div",{className:Nt(kt.ProfileStory,r,{[kt.hasSeenAllStories]:i}),onClick:o,style:{"--story-color":n,"--story-color-alpha":n&&Fa(n,.7),"--story-width":a??`${u}px`},children:[y.jsx("div",{className:kt.ProfileStoryWrap,children:y.jsx("div",{className:kt.ProfileStory__wrapImage,children:y.jsx("div",{className:kt.ProfileStory__image,children:y.jsx("img",{src:t,alt:"",draggable:!1})})})}),e&&y.jsx("div",{className:kt.ProfileStory__title,children:e})]})})},jt="react-horizontal-scrolling-menu",ka=`${jt}--item`,Ua=`${jt}--scroll-container`,Wa=`${jt}--wrapper`,$a=`${jt}--inner-wrapper`,Ha=`${jt}--header`,za=`${jt}--arrow-left`,Ga=`${jt}--arrow-right`,Ka=`${jt}--footer`,qa="itemId",Oo="data-key",Do="data-index",ht={first:"first",last:"last",onInit:"onInit",onUpdate:"onUpdate"},ct="",Ya={current:null};let Xa=class{constructor(){this.subscribe=(e,n)=>{this.observers.set(e,(this.observers.get(e)||[]).concat(n))},this.unsubscribe=(e,n)=>{const r=(this.observers.get(e)||[]).filter(o=>o!==n);r.length?this.observers.set(e,r):this.observers.delete(e)},this.emitUpdates=(e,n)=>{const r=this.observers.get(e)||[];r==null||r.forEach(o=>o(n))},this.updateBatch=(e,n=!0)=>{e.length&&(e.forEach(([r,o])=>this.emitUpdates(r,o)),n&&this.emitUpdates(ht.onUpdate))},this.update=(e,n)=>{this.emitUpdates(e,n),this.emitUpdates(ht.onUpdate)},this.observers=new Map}},Za=class extends Map{constructor(){super(),this.subscribe=(e,n)=>this.observer.subscribe(e,n),this.unsubscribe=(e,n)=>this.observer.unsubscribe(e,n),this.isEdgeItem=({key:e,value:n,first:r=this.first(),last:o=this.last()})=>{const a=[];return e===(r==null?void 0:r.key)?a.push([ht.first,n]):e===(o==null?void 0:o.key)&&a.push([ht.last,n]),a},this.edgeItemsCheck=e=>{const n=this.first(),r=this.last(),o=e.find(([s])=>s===(n==null?void 0:n.key)),a=[];o&&a.push([ht.first,o[1]]);const i=e.find(([s])=>s===(r==null?void 0:r.key));return i&&a.push([ht.last,i[1]]),a},this.toArr=()=>this.sort([...this]),this.toItems=()=>this.toArr().map(([e])=>e),this.sort=e=>e.sort(([,n],[,r])=>+n.index-+r.index),this.set=(e,n)=>{const r=String(e),o=[[r,n]];return super.set(r,n),o.push(...this.isEdgeItem({key:r,value:n,first:this.first(),last:this.last()})),this.observer.updateBatch(o),this},this.setBatch=e=>{this.firstRun&&this.observer.update(ht.onInit);const n=[...e];return this.sort(n).forEach(([r,o])=>{super.set(String(r),o)}),n.push(...this.edgeItemsCheck(n)),this.observer.updateBatch(n,!this.firstRun),this.firstRun=!1,this},this.first=()=>{var e;return(e=this.toArr()[0])===null||e===void 0?void 0:e[1]},this.last=()=>{var e,n;return(n=(e=this.toArr().slice(-1))===null||e===void 0?void 0:e[0])===null||n===void 0?void 0:n[1]},this.filter=e=>this.toArr().filter(e),this.find=e=>this.toArr().find(e),this.findIndex=e=>this.toArr().findIndex(e),this.getCurrentPos=e=>{const n=this.toArr(),r=n.findIndex(([o,a])=>o===e||a===e);return[n,r]},this.prev=e=>{var n;const[r,o]=this.getCurrentPos(e);return o!==-1?(n=r[o-1])===null||n===void 0?void 0:n[1]:void 0},this.next=e=>{var n;const[r,o]=this.getCurrentPos(e);return o!==-1?(n=r[o+1])===null||n===void 0?void 0:n[1]:void 0},this.getVisible=()=>this.filter(e=>e[1].visible),this.observer=new Xa,this.firstRun=!0}};const mr=t=>typeof t=="object"&&t!=null&&t.nodeType===1,hr=(t,e)=>(!e||t!=="hidden")&&t!=="visible"&&t!=="clip",nn=(t,e)=>{if(t.clientHeight<t.scrollHeight||t.clientWidth<t.scrollWidth){const n=getComputedStyle(t,null);return hr(n.overflowY,e)||hr(n.overflowX,e)||(r=>{const o=(a=>{if(!a.ownerDocument||!a.ownerDocument.defaultView)return null;try{return a.ownerDocument.defaultView.frameElement}catch{return null}})(r);return!!o&&(o.clientHeight<r.scrollHeight||o.clientWidth<r.scrollWidth)})(t)}return!1},be=(t,e,n,r,o,a,i,s)=>a<t&&i>e||a>t&&i<e?0:a<=t&&s<=n||i>=e&&s>=n?a-t-r:i>e&&s<n||a<t&&s>n?i-e+o:0,Ja=t=>{const e=t.parentElement;return e??(t.getRootNode().host||null)},gr=(t,e)=>{var n,r,o,a;if(typeof document>"u")return[];const{scrollMode:i,block:s,inline:u,boundary:l,skipOverflowHiddenElements:c}=e,f=typeof l=="function"?l:X=>X!==l;if(!mr(t))throw new TypeError("Invalid target");const d=document.scrollingElement||document.documentElement,p=[];let v=t;for(;mr(v)&&f(v);){if(v=Ja(v),v===d){p.push(v);break}v!=null&&v===document.body&&nn(v)&&!nn(document.documentElement)||v!=null&&nn(v,c)&&p.push(v)}const h=(r=(n=window.visualViewport)==null?void 0:n.width)!=null?r:innerWidth,b=(a=(o=window.visualViewport)==null?void 0:o.height)!=null?a:innerHeight,{scrollX:g,scrollY:x}=window,{height:S,width:_,top:T,right:C,bottom:R,left:B}=t.getBoundingClientRect(),{top:V,right:N,bottom:Y,left:k}=(X=>{const M=window.getComputedStyle(X);return{top:parseFloat(M.scrollMarginTop)||0,right:parseFloat(M.scrollMarginRight)||0,bottom:parseFloat(M.scrollMarginBottom)||0,left:parseFloat(M.scrollMarginLeft)||0}})(t);let F=s==="start"||s==="nearest"?T-V:s==="end"?R+Y:T+S/2-V+Y,I=u==="center"?B+_/2-k+N:u==="end"?C+N:B-k;const z=[];for(let X=0;X<p.length;X++){const M=p[X],{height:nt,width:rt,top:ot,right:U,bottom:q,left:O}=M.getBoundingClientRect();if(i==="if-needed"&&T>=0&&B>=0&&R<=b&&C<=h&&T>=ot&&R<=q&&B>=O&&C<=U)return z;const w=getComputedStyle(M),E=parseInt(w.borderLeftWidth,10),L=parseInt(w.borderTopWidth,10),j=parseInt(w.borderRightWidth,10),D=parseInt(w.borderBottomWidth,10);let W=0,tt=0;const et="offsetWidth"in M?M.offsetWidth-M.clientWidth-E-j:0,J="offsetHeight"in M?M.offsetHeight-M.clientHeight-L-D:0,xt="offsetWidth"in M?M.offsetWidth===0?0:rt/M.offsetWidth:0,Yt="offsetHeight"in M?M.offsetHeight===0?0:nt/M.offsetHeight:0;if(d===M)W=s==="start"?F:s==="end"?F-b:s==="nearest"?be(x,x+b,b,L,D,x+F,x+F+S,S):F-b/2,tt=u==="start"?I:u==="center"?I-h/2:u==="end"?I-h:be(g,g+h,h,E,j,g+I,g+I+_,_),W=Math.max(0,W+x),tt=Math.max(0,tt+g);else{W=s==="start"?F-ot-L:s==="end"?F-q+D+J:s==="nearest"?be(ot,q,nt,L,D+J,F,F+S,S):F-(ot+nt/2)+J/2,tt=u==="start"?I-O-E:u==="center"?I-(O+rt/2)+et/2:u==="end"?I-U+j+et:be(O,U,rt,E,j+et,I,I+_,_);const{scrollLeft:Xt,scrollTop:Zt}=M;W=Yt===0?0:Math.max(0,Math.min(Zt+W/Yt,M.scrollHeight-nt/Yt+J)),tt=xt===0?0:Math.max(0,Math.min(Xt+tt/xt,M.scrollWidth-rt/xt+et)),F+=Zt-W,I+=Xt-tt}z.push({el:M,top:W,left:tt})}return z};function yr(t,e){if(!t.isConnected||!(o=>{let a=o;for(;a&&a.parentNode;){if(a.parentNode===document)return!0;a=a.parentNode instanceof ShadowRoot?a.parentNode.host:a.parentNode}return!1})(t))return;const n=(o=>{const a=window.getComputedStyle(o);return{top:parseFloat(a.scrollMarginTop)||0,right:parseFloat(a.scrollMarginRight)||0,bottom:parseFloat(a.scrollMarginBottom)||0,left:parseFloat(a.scrollMarginLeft)||0}})(t);if((o=>typeof o=="object"&&typeof o.behavior=="function")(e))return e.behavior(gr(t,e));const r=typeof e=="boolean"||e==null?void 0:e.behavior;for(const{el:o,top:a,left:i}of gr(t,(s=>s===!1?{block:"end",inline:"nearest"}:(u=>u===Object(u)&&Object.keys(u).length!==0)(s)?s:{block:"start",inline:"nearest"})(e))){const s=a-n.top+n.bottom,u=i-n.left+n.right;o.scroll({top:s,left:u,behavior:r})}}let rn;const No=()=>(rn||(rn="performance"in window?performance.now.bind(performance):Date.now),rn());function Fo(t){const e=No(),n=Math.min((e-t.startTime)/t.duration,1),r=t.ease(n),o=t.startX+(t.x-t.startX)*r,a=t.startY+(t.y-t.startY)*r;t.method(o,a,n,r),o!==t.x||a!==t.y?requestAnimationFrame(()=>Fo(t)):t.cb()}function Qa(t,e,n){let r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:600,o=arguments.length>4&&arguments[4]!==void 0?arguments[4]:c=>1+--c*c*c*c*c,a=arguments.length>5?arguments[5]:void 0,i=arguments.length>6?arguments[6]:void 0;const s=t,u=t.scrollLeft,l=t.scrollTop;Fo({scrollable:s,method:(c,f,d,p)=>{const v=Math.ceil(c),h=Math.ceil(f);t.scrollLeft=v,t.scrollTop=h,i==null||i({target:t,elapsed:d,value:p,left:v,top:h})},startTime:No(),startX:u,startY:l,x:e,y:n,duration:r,ease:o,cb:a})}const ts=function(t,e){const n=e||{};return(r=>r&&!r.behavior||r.behavior==="smooth")(n)?yr(t,{block:n.block,inline:n.inline,scrollMode:n.scrollMode,boundary:n.boundary,skipOverflowHiddenElements:n.skipOverflowHiddenElements,behavior:r=>Promise.all(r.reduce((o,a)=>{let{el:i,left:s,top:u}=a;const l=i.scrollLeft,c=i.scrollTop;return l===s&&c===u?o:[...o,new Promise(f=>Qa(i,s,u,n.duration,n.ease,()=>f({el:i,left:[l,s],top:[c,u]}),n.onScrollChange))]},[]))}):Promise.resolve(yr(t,e))},es=t=>Object.values(t).map(e=>e.current).filter(Boolean);function on(t,e,n,r,o,a){var i;const s=((i=t==null?void 0:t.entry)===null||i===void 0?void 0:i.target)||t;if(!s)return;const u={behavior:e||"smooth",inline:n||"end",block:r||"nearest"};return a?s.scrollIntoView(u):ts(s,Object.assign(Object.assign({},o),u))}const ns=t=>document.querySelector(`[${Oo}='${t}']`),rs=t=>document.querySelector(`[${Do}='${t}']`);function xe(t){return m.isValidElement(t)&&t||typeof t=="function"&&m.createElement(t,null)||!!t&&typeof t=="object"&&m.createElement(t,null)||null}const ko=t=>{var e;return String(((e=t==null?void 0:t.props)===null||e===void 0?void 0:e[qa])||String((t==null?void 0:t.key)||ct).replace(/^\.\$/,ct))};function bn(t){return!!t&&Object.prototype.hasOwnProperty.call(t,"current")}var os=m.memo(function({children:t,className:e,id:n,index:r,refs:o}){const a=m.useRef(null);return o[String(r)]=a,m.createElement("div",{className:e,[Oo]:n,[Do]:r,ref:a},t)});function is({children:t,itemClassName:e=ct,refs:n}){const r=m.Children.toArray(t).filter(Boolean),o=m.useMemo(()=>`${ka} ${e}`,[e]);return r.map((a,i)=>{const s=ko(a);return m.createElement(os,{className:o,id:s,key:s,refs:n,index:i},a)})}function as({className:t=ct,children:e,onScroll:n=()=>{},scrollRef:r,containerRef:o}){const a=m.useMemo(()=>`${Ua} ${t}`,[t]),i=m.useCallback(s=>{bn(r)?r.current=s:r(s),bn(o)?o.current=s:o(s)},[r,o]);return m.createElement("div",{className:a,onScroll:n,ref:i},e)}const ss=m.createContext({}),us=typeof window<"u"?m.useLayoutEffect:m.useEffect;function ls({items:t,itemsChanged:e,refs:n,options:r}){const o=m.useRef(),a=m.useCallback(i=>{t.setBatch(function(s,u){return[...s].map(l=>{var c,f,d,p;const v=l.target,h=String((f=(c=v==null?void 0:v.dataset)===null||c===void 0?void 0:c.key)!==null&&f!==void 0?f:ct);return[h,{index:String((p=(d=v==null?void 0:v.dataset)===null||d===void 0?void 0:d.index)!==null&&p!==void 0?p:ct),key:h,entry:l,visible:l.intersectionRatio>=u.ratio}]})}(i,r))},[t,r]);us(()=>{const i=es(n),s=o.current||new IntersectionObserver(a,r);return o.current=s,i.forEach(u=>s.observe(u)),()=>{s.disconnect(),o.current=void 0}},[a,e,r,n])}const cs=t=>m.Children.toArray(t).map(ko).filter(Boolean),Sr={ratio:.9,rootMargin:"5px",threshold:[.05,.5,.75,.95]},fs={current:{}},Pe=()=>{};function ds({LeftArrow:t,RightArrow:e,children:n,Header:r,Footer:o,transitionDuration:a=500,transitionBehavior:i,onInit:s=Pe,onUpdate:u=Pe,onMouseDown:l,onMouseLeave:c,onMouseUp:f,onMouseMove:d,onScroll:p=Pe,onTouchMove:v,onTouchStart:h,onTouchEnd:b,onWheel:g=Pe,options:x=Sr,scrollContainerClassName:S=ct,containerRef:_=Ya,itemClassName:T=ct,wrapperClassName:C=ct,apiRef:R=fs,RTL:B,noPolyfill:V}){const N=xe(t),Y=xe(e),k=xe(r),F=xe(o),I=m.useRef(null),[z]=m.useState({}),X=m.useMemo(()=>Object.assign(Object.assign(Object.assign({},Sr),x),{root:I.current}),[x]),M=m.useRef(new Za).current,nt=function(j,D){const[W,tt]=m.useState(ct),et=m.useMemo(()=>cs(j),[j]);return m.useEffect(()=>{const J=et.filter(Boolean).join(ct);D.toItems().filter(xt=>!et.includes(xt)).forEach(xt=>{D.delete(xt)}),tt(J)},[et,D]),W}(n,M);ls(m.useMemo(()=>({items:M,itemsChanged:nt,options:X,refs:z}),[M,nt,z,X]));const rt=m.useMemo(()=>function(j,D,W){var tt,et,J;const xt=!!(!((tt=j.first())===null||tt===void 0)&&tt.visible),Yt=!!(!((et=j.last())===null||et===void 0)&&et.visible),Xt=$=>{var G;return(G=j.find(st=>st[1].key===String($)))===null||G===void 0?void 0:G[1]},Zt=()=>{var $,G;const st=(G=($=j.getVisible())===null||$===void 0?void 0:$[0])===null||G===void 0?void 0:G[1];return st?j.prev(st):void 0},fr=()=>{var $;const G=($=j.getVisible().findLast(()=>!0))===null||$===void 0?void 0:$[1];return G?j.next(G):void 0},Ze=(J=D==null?void 0:D.boundary)===null||J===void 0?void 0:J.current;return{getItemById:Xt,getItemElementById:ns,getItemByIndex:$=>{var G;return(G=j.find(st=>String(st[1].index)===String($)))===null||G===void 0?void 0:G[1]},getItemElementByIndex:rs,getNextElement:fr,getPrevElement:Zt,isFirstItemVisible:xt,isItemVisible:$=>j.getVisible().map(G=>G[0]).includes(String($)),isLastItem:$=>j.last()===Xt($),isLastItemVisible:Yt,scrollNext:($,G,st,{duration:Pt,boundary:vt=Ze}={})=>{const gt=$??(D==null?void 0:D.behavior);return on(fr(),gt,G||"start",st||"nearest",{boundary:vt,duration:Pt??(D==null?void 0:D.duration)},W)},scrollPrev:($,G,st,{duration:Pt,boundary:vt=Ze}={})=>{const gt=$??(D==null?void 0:D.behavior);return on(Zt(),gt,G||"end",st||"nearest",{boundary:vt,duration:Pt??(D==null?void 0:D.duration)},W)},useIsVisible:($,G=!1)=>{const[st,Pt]=m.useState(G),vt=m.useCallback(gt=>{Pt(!!(gt!=null&&gt.visible))},[]);return m.useEffect(()=>(j.subscribe($,vt),()=>{j.unsubscribe($,vt)}),[$,vt]),st},scrollToItem:($,G,st,Pt,vt)=>{var gt;return on($,G??(D==null?void 0:D.behavior),st,Pt,Object.assign(Object.assign({boundary:Ze},vt),{duration:(gt=vt==null?void 0:vt.duration)!==null&&gt!==void 0?gt:D==null?void 0:D.duration}),W)}}}(M,{duration:a,behavior:i,boundary:I},V),[M,a,i,V]),ot=m.useCallback(()=>Object.assign(Object.assign({},rt),{items:M,scrollContainer:I}),[rt,M,I]),[U,q]=m.useState(()=>ot());(({context:j,onInit:D,onUpdate:W})=>{const tt=m.useCallback(()=>D(j),[D,j]),et=m.useCallback(()=>W(j),[W,j]),{items:J}=j;m.useEffect(()=>(J.subscribe(ht.onInit,tt),J.subscribe(ht.onUpdate,et),()=>{J.unsubscribe(ht.onInit,tt),J.unsubscribe(ht.onUpdate,et)}),[J,tt,et])})({context:U,onInit:s,onUpdate:u}),m.useEffect(()=>q(ot()),[ot]),m.useEffect(()=>{bn(R)?R.current=U:R(U)},[U,R]);const O=m.useCallback(j=>p(U,j),[p,U]),w=m.useCallback(j=>g(U,j),[g,U]),E=m.useMemo(()=>`${Wa} ${C}`,[C]),L=m.useMemo(()=>`${S}${B?" rtl":ct}`,[B,S]);return m.createElement("div",{className:E,onWheel:w,onMouseDown:l==null?void 0:l(U),onMouseLeave:c==null?void 0:c(U),onMouseUp:f==null?void 0:f(U),onMouseMove:d==null?void 0:d(U),onTouchStart:h==null?void 0:h(U),onTouchMove:v==null?void 0:v(U),onTouchEnd:b==null?void 0:b(U)},m.createElement(ss.Provider,{value:U},m.createElement("div",{className:Ha},k),m.createElement("div",{className:$a},m.createElement("div",{className:za},N),m.createElement(as,{className:L,onScroll:O,scrollRef:I,containerRef:_},m.createElement(is,{refs:z,itemClassName:T},n)),m.createElement("div",{className:Ga},Y)),m.createElement("div",{className:Ka},F)))}const vs="_StoryPlayer_om2md_1",ps="_Overlay_om2md_15",ms="_StoryPlayer__Wrap_om2md_25",hs="_progressContainer_om2md_37",gs="_CloseIcon_om2md_41",ys="_inline_om2md_57",Ss="_progressBarContainer_om2md_75",bs="_progressBar_om2md_75",Et={StoryPlayer:vs,Overlay:ps,StoryPlayer__Wrap:ms,progressContainer:hs,CloseIcon:gs,inline:ys,progressBarContainer:Ss,progressBar:bs};var K=function(){return K=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var o in e=arguments[n])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t},K.apply(this,arguments)},Uo=m.createContext({stories:[],width:"100%",height:"100%",defaultDuration:1e4,isPaused:!1}),an=Object.freeze({LEFT:"left",RIGHT:"right"}),xs="Actions-styles_left__eky50",Ps="Actions-styles_right__zguoH";function _s(t){var e=t.onNextClick,n=t.onPrevClick,r=t.onPause,o=t.onResume,a=m.useState(!1),i=a[0],s=a[1],u=m.useRef(null);function l(d){d.stopPropagation(),d.preventDefault(),clearTimeout(u.current),u.current=setTimeout(function(){r(),s(!0)},200)}function c(d,p){if(p.stopPropagation(),p.preventDefault(),clearTimeout(u.current),i)return o(),void s(!1);o(),d!=an.LEFT?e():n()}function f(d){return{onMouseUp:function(p){return c(d,p)},onTouchEnd:function(p){return c(d,p)},onTouchStart:function(p){return l(p)},onMouseDown:function(p){return l(p)}}}return y.jsxs(m.Fragment,{children:[y.jsx("div",K({className:xs},f(an.LEFT))),y.jsx("div",K({className:Ps},f(an.RIGHT)))]})}function We(){return m.useContext(Uo)}var ws="ProgressBar-styles_wrapper__oqUCo",Ts="ProgressBar-styles_bar__x0O50",br=0,xr=.1;function Cs(t){var e,n,r,o,a,i=We(),s=i.defaultDuration,u=i.classNames,l=m.useRef(null),c=m.useRef(null),f=m.useState(!1),d=f[0],p=f[1];return m.useEffect(function(){!t.isPaused&&t.isActive&&t.isActive?p(!0):p(!1)},[t.isActive,t.isPaused]),m.useEffect(function(){var v;l.current&&(t.hasStoryPassed?l.current.style.width="".concat((v=c==null?void 0:c.current)===null||v===void 0?void 0:v.offsetWidth,"px"):l.current.style.width="0px")},[t.hasStoryPassed,t.isActive]),e=function(v){var h;l.current&&c.current&&((br=Number((l.current.style.width||"1px").slice(0,l.current.style.width.length-2))||0)>c.current.offsetWidth?p(!1):(xr=((h=c==null?void 0:c.current)===null||h===void 0?void 0:h.offsetWidth)/((t.story.duration||s)/v),l.current.style.width="".concat(br+xr,"px")))},n=d,r=m.useRef(),o=m.useRef(),a=m.useRef(e),m.useEffect(function(){a.current=e},[e]),m.useEffect(function(){return n!==!1?(r.current=requestAnimationFrame(function v(h){if(o.current!=null){var b=h-o.current;a.current(b)}o.current=h,r.current=requestAnimationFrame(v)}),function(){cancelAnimationFrame(r.current),r.current=null,o.current=null}):function(){r.current&&(r.current=null),cancelAnimationFrame(r.current),o.current=null}},[n]),y.jsx("div",K({className:"".concat(ws," ").concat((u==null?void 0:u.progressBarContainer)||""),ref:c},{children:y.jsx("div",{className:"".concat(Ts," ").concat((u==null?void 0:u.progressBar)||""),ref:l})}))}var Es="progress-styles_wrapper__qQPyW";function Vs(t){var e=We(),n=e.stories,r=e.classNames;return y.jsx("div",K({className:"".concat(Es," ").concat((r==null?void 0:r.progressContainer)||""),style:{gridTemplateColumns:"repeat(".concat(n.length,",1fr)")}},{children:n.map(function(o){return y.jsx(Cs,{hasStoryPassed:o.index<t.activeStoryIndex,isActive:o.index===t.activeStoryIndex,story:o,isPaused:o.index===t.activeStoryIndex&&t.isPaused},o.index)})}))}var sn=Object.freeze({IMAGE:"image",VIDEO:"video",COMPONENT:"component"}),Is="Story-styles_wrapper__oJP7j",As="Story-styles_header__-rnWL",Ms="Image-styles_image__gnfW1";function Rs(t){return m.useEffect(function(){t.onPause()},[]),y.jsx("img",{className:Ms,src:t.story.url,alt:"story",onLoad:function(){setTimeout(function(){t.onResume()},4)}})}var un,js="Video-styles_video__BykuO",Ls="Video-styles_loaderWrapper__TqVWk",Bs="Video-styles_loader__FxxSV",Os="Video-styles_soundIcon__ZvYXE";function Ds(t){return t.type==="off"?y.jsx("svg",K({xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24",fill:"white"},{children:y.jsx("path",{d:"M3 9v6h-1v-6h1zm13-7l-9 5v2.288l7-3.889v13.202l-7-3.889v2.288l9 5v-20zm-11 5h-5v10h5v-10zm17.324 4.993l1.646-1.659-1.324-1.324-1.651 1.67-1.665-1.648-1.316 1.318 1.67 1.657-1.65 1.669 1.318 1.317 1.658-1.672 1.666 1.653 1.324-1.325-1.676-1.656z"})})):y.jsx("svg",K({xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24",fill:"white"},{children:y.jsx("path",{d:"M22 0v24l-11-6v-2.278l9 4.909v-17.262l-9 4.91v-2.279l11-6zm-13 6v12h-7v-12h7zm-2 2h-3v8h3v-8z"})}))}var xn="RSIsMute",Ut=typeof window>"u"?{}:window;function Ns(t){var e,n=We().isPaused,r=m.useState(((e=Ut==null?void 0:Ut.localStorage)===null||e===void 0?void 0:e.getItem(xn))==="true"),o=r[0],a=r[1],i=m.useState(!1),s=i[0],u=i[1],l=m.useRef(null);function c(f){var d;(d=Ut==null?void 0:Ut.localStorage)===null||d===void 0||d.setItem(xn,String(f)),a(f)}return m.useEffect(function(){t.onPause(),u(!0)},[]),m.useEffect(function(){l.current&&(!n||l.current.paused?l.current.play().catch(function(){var f;c(!0),(f=l.current)===null||f===void 0||f.play()}):l.current.pause())},[n]),y.jsxs(m.Fragment,{children:[y.jsxs("video",K({className:js,ref:l,playsInline:!0,"webkit-playsinline":"",controls:!1,src:t.story.url,onLoadedData:function(){setTimeout(function(){t.onResume(),u(!1)},4)},muted:o},{children:[y.jsx("source",{src:t.story.url,type:"video/mp4"}),y.jsx("source",{src:t.story.url,type:"video/webm"}),y.jsx("source",{src:t.story.url,type:"video/ogg"}),y.jsx("p",{children:"Video not supported"})]})),y.jsx("div",K({className:Os,onClick:function(){return c(!o)}},{children:y.jsx(Ds,{type:o?"off":"on"})})),s&&y.jsx("div",K({className:Ls},{children:y.jsx("div",{className:Bs})}))]})}(un=Ut==null?void 0:Ut.localStorage)===null||un===void 0||un.setItem(xn,"true");var Fs="CustomComponents-styles_component__w87Wx";function ks(t){return y.jsx("div",K({className:Fs},{children:y.jsx(t.story.component,{pause:t.onPause,resume:t.onResume,story:t.story,isPaused:t.isPaused})}))}var Us="SeeMore-styles_seeMoreWrapper__kwjif",Ws="SeeMore-styles_defaultSeeMore__-B1QW";function $s(t){return t.story.seeMore?y.jsx("button",K({type:"button",onClick:function(){t.onSeeMoreClick()},className:Us},{children:function(){var e=t.story.seeMore,n=typeof e;if(["string","boolean"].includes(n)){var r=n==="string"?e:"See More";return y.jsxs("div",K({className:Ws},{children:[y.jsx("span",{children:"^"}),y.jsx("p",{children:r})]}))}return n==="function"?y.jsx(t.story.seeMore,{}):t.story.seeMore}()})):null}var Hs="SeeMoreComponent-styles_seeMoreComponentWrapper__0T6Ap",zs="SeeMoreComponent-styles_closeIcon__LMm3b";function Gs(t){return t.story.seeMore&&t.story.seeMoreComponent?y.jsxs("div",K({className:Hs},{children:[y.jsx("button",K({className:zs,onClick:t.onClose},{children:"✕"})),typeof t.story.seeMoreComponent=="function"?y.jsx(t.story.seeMoreComponent,{}):t.story.seeMoreComponent]})):null}function Ks(t){var e=m.useState(!1),n=e[0],r=e[1],o=We().classNames;return m.useEffect(function(){r(!1)},[t.story]),y.jsxs("div",K({className:"".concat(Is," ").concat((o==null?void 0:o.storyContainer)||"")},{children:[t.story.type===sn.IMAGE?y.jsx(Rs,K({},t)):t.story.type===sn.VIDEO?y.jsx(Ns,K({},t)):t.story.type===sn.COMPONENT?y.jsx(ks,K({},t)):null,t.story.header&&y.jsx("div",K({className:As},{children:typeof t.story.header=="function"?y.jsx(t.story.header,{}):t.story.header})),y.jsx($s,{onSeeMoreClick:function(){var a,i;t.onPause(),r(!0),(i=(a=t.story).onSeeMoreClick)===null||i===void 0||i.call(a,t.story.index)},story:t.story}),n&&y.jsx(Gs,{story:t.story,onClose:function(){t.onResume(),r(!1)}})]}))}var qs="styles_main__-0FEu";function Pr(t){return t===void 0&&(t=4),Number(Math.random().toFixed(t))}function Ys(t){var e,n,r,o,a,i,s,u=t.stories,l=u===void 0?[]:u,c=t.width,f=c===void 0?"100%":c,d=t.height,p=d===void 0?"100%":d,v=t.onStoryChange,h=v===void 0?function(){}:v,b=t.currentIndex,g=b===void 0?0:b,x=t.defaultDuration,S=x===void 0?1e4:x,_=t.onAllStoriesEnd,T=_===void 0?function(){}:_,C=t.onStoriesStart,R=C===void 0?function(){}:C,B=t.classNames,V=B===void 0?{}:B,N=t.pauseStoryWhenInActiveWindow,Y=N===void 0||N,k=m.useMemo(function(){return function(L,j){var D=0;return L.map(function(W,tt){var et=W.duration||j,J=et+Pr();return J===D&&(J=et+Pr(6)),D=J,K(K({},W),{index:tt,calculatedDuration:J})})}(l,S)},[l,S]),F=m.useState(),I=F[0],z=F[1],X=l.length-1,M=m.useState(!1),nt=M[0],rt=M[1],ot=m.useRef(!1),U=m.useRef(!1);function q(){ot.current||(I==null?void 0:I.index)!==X||(T(),ot.current=!0),(I==null?void 0:I.index)!==X&&z(function(L){if(!L)return k[0];var j=(L==null?void 0:L.index)+1;return k[j]})}function O(){rt(!0)}function w(){rt(!1)}m.useEffect(function(){U.current||(U.current=!0,R())},[R]),m.useEffect(function(){var L=k[g];L&&z(L)},[g,l]),m.useEffect(function(){I&&h(I.index)},[I]),n=function(){q()},r=(e=I==null?void 0:I.calculatedDuration)!==null&&e!==void 0?e:null,o=nt,a=m.useRef(),i=m.useRef(r),s=m.useRef(Date.now()),m.useEffect(function(){a.current=n},[n]),m.useEffect(function(){i.current=r},[r]),m.useEffect(function(){if(r!==null&&o===!1){s.current=Date.now();var L=setTimeout(function(){a.current()},i.current);return function(){clearTimeout(L)}}return function(){}},[r,o]),m.useEffect(function(){o&&(i.current=i.current-(Date.now()-s.current))},[o]),function(L){var j=m.useRef(L);m.useEffect(function(){j.current=L},[L]),m.useEffect(function(){function D(){j.current(!0)}function W(){j.current(!1)}return window.addEventListener("focus",D),window.addEventListener("blur",W),function(){window.removeEventListener("focus",D),window.removeEventListener("blur",W)}},[])}(function(L){Y&&rt(!L)});var E={stories:k,width:f,height:p,defaultDuration:S,isPaused:nt,classNames:V};return I?y.jsx(Uo.Provider,K({value:E},{children:y.jsxs("div",K({className:"".concat(qs," ").concat(V.main||""),style:{width:f,height:p}},{children:[y.jsx(Vs,{activeStoryIndex:I.index,isPaused:nt}),y.jsx(Ks,{onPause:O,onResume:w,story:I,isPaused:nt},I.index),y.jsx(_s,{onNextClick:q,onPrevClick:function(){(I==null?void 0:I.index)!==0&&z(function(L){if(!L)return k[0];var j=(L==null?void 0:L.index)-1;return k[j]})},onPause:O,onResume:w})]}))})):null}var Pn=function(t,e){return Pn=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,r){n.__proto__=r}||function(n,r){for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(n[o]=r[o])},Pn(t,e)};function Wo(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");Pn(t,e);function n(){this.constructor=t}t.prototype=e===null?Object.create(e):(n.prototype=e.prototype,new n)}var P=function(){return P=Object.assign||function(e){for(var n,r=1,o=arguments.length;r<o;r++){n=arguments[r];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e},P.apply(this,arguments)};function dt(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,r=Object.getOwnPropertySymbols(t);o<r.length;o++)e.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(t,r[o])&&(n[r[o]]=t[r[o]]);return n}function Q(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var r=n.call(t),o,a=[],i;try{for(;(e===void 0||e-- >0)&&!(o=r.next()).done;)a.push(o.value)}catch(s){i={error:s}}finally{try{o&&!o.done&&(n=r.return)&&n.call(r)}finally{if(i)throw i.error}}return a}function ft(t,e,n){if(n||arguments.length===2)for(var r=0,o=e.length,a;r<o;r++)(a||!(r in e))&&(a||(a=Array.prototype.slice.call(e,0,r)),a[r]=e[r]);return t.concat(a||Array.prototype.slice.call(e))}var _r="production",$o=typeof process>"u"||process.env===void 0?_r:process.env.NODE_ENV||_r,_t=function(t){return{isEnabled:function(e){return t.some(function(n){return!!e[n]})}}},ue={measureLayout:_t(["layout","layoutId","drag"]),animation:_t(["animate","exit","variants","whileHover","whileTap","whileFocus","whileDrag","whileInView"]),exit:_t(["exit"]),drag:_t(["drag","dragControls"]),focus:_t(["whileFocus"]),hover:_t(["whileHover","onHoverStart","onHoverEnd"]),tap:_t(["whileTap","onTap","onTapStart","onTapCancel"]),pan:_t(["onPan","onPanStart","onPanSessionStart","onPanEnd"]),inView:_t(["whileInView","onViewportEnter","onViewportLeave"])};function Xs(t){for(var e in t)t[e]!==null&&(e==="projectionNodeConstructor"?ue.projectionNodeConstructor=t[e]:ue[e].Component=t[e])}var pe=function(){},lt=function(){};process.env.NODE_ENV!=="production"&&(pe=function(t,e){!t&&typeof console<"u"&&console.warn(e)},lt=function(t,e){if(!t)throw new Error(e)});var Ho=m.createContext({strict:!1}),zo=Object.keys(ue),Zs=zo.length;function Js(t,e,n){var r=[],o=m.useContext(Ho);if(!e)return null;$o!=="production"&&n&&o.strict&&lt(!1,"You have rendered a `motion` component within a `LazyMotion` component. This will break tree shaking. Import and render a `m` component instead.");for(var a=0;a<Zs;a++){var i=zo[a],s=ue[i],u=s.isEnabled,l=s.Component;u(t)&&l&&r.push(Sn.createElement(l,P({key:i},t,{visualElement:e})))}return r}var Wn=m.createContext({transformPagePoint:function(t){return t},isStatic:!1,reducedMotion:"never"}),$e=m.createContext({});function Qs(){return m.useContext($e).visualElement}var He=m.createContext(null),qt=typeof document<"u",wr=qt?m.useLayoutEffect:m.useEffect,_n={current:null},Go=!1;function tu(){if(Go=!0,!!qt)if(window.matchMedia){var t=window.matchMedia("(prefers-reduced-motion)"),e=function(){return _n.current=t.matches};t.addListener(e),e()}else _n.current=!1}function eu(){!Go&&tu();var t=Q(m.useState(_n.current),1),e=t[0];return e}function nu(){var t=eu(),e=m.useContext(Wn).reducedMotion;return e==="never"?!1:e==="always"?!0:t}function ru(t,e,n,r){var o=m.useContext(Ho),a=Qs(),i=m.useContext(He),s=nu(),u=m.useRef(void 0);r||(r=o.renderer),!u.current&&r&&(u.current=r(t,{visualState:e,parent:a,props:n,presenceId:i==null?void 0:i.id,blockInitialAnimation:(i==null?void 0:i.initial)===!1,shouldReduceMotion:s}));var l=u.current;return wr(function(){l==null||l.syncRender()}),m.useEffect(function(){var c;(c=l==null?void 0:l.animationState)===null||c===void 0||c.animateChanges()}),wr(function(){return function(){return l==null?void 0:l.notifyUnmount()}},[]),l}function Wt(t){return typeof t=="object"&&Object.prototype.hasOwnProperty.call(t,"current")}function ou(t,e,n){return m.useCallback(function(r){var o;r&&((o=t.mount)===null||o===void 0||o.call(t,r)),e&&(r?e.mount(r):e.unmount()),n&&(typeof n=="function"?n(r):Wt(n)&&(n.current=r))},[e])}function Ko(t){return Array.isArray(t)}function mt(t){return typeof t=="string"||Ko(t)}function iu(t){var e={};return t.forEachValue(function(n,r){return e[r]=n.get()}),e}function au(t){var e={};return t.forEachValue(function(n,r){return e[r]=n.getVelocity()}),e}function qo(t,e,n,r,o){var a;return r===void 0&&(r={}),o===void 0&&(o={}),typeof e=="function"&&(e=e(n??t.custom,r,o)),typeof e=="string"&&(e=(a=t.variants)===null||a===void 0?void 0:a[e]),typeof e=="function"&&(e=e(n??t.custom,r,o)),e}function ze(t,e,n){var r=t.getProps();return qo(r,e,n??r.custom,iu(t),au(t))}function Ge(t){var e;return typeof((e=t.animate)===null||e===void 0?void 0:e.start)=="function"||mt(t.initial)||mt(t.animate)||mt(t.whileHover)||mt(t.whileDrag)||mt(t.whileTap)||mt(t.whileFocus)||mt(t.exit)}function Yo(t){return!!(Ge(t)||t.variants)}function su(t,e){if(Ge(t)){var n=t.initial,r=t.animate;return{initial:n===!1||mt(n)?n:void 0,animate:mt(r)?r:void 0}}return t.inherit!==!1?e:{}}function uu(t){var e=su(t,m.useContext($e)),n=e.initial,r=e.animate;return m.useMemo(function(){return{initial:n,animate:r}},[Tr(n),Tr(r)])}function Tr(t){return Array.isArray(t)?t.join(" "):t}function me(t){var e=m.useRef(null);return e.current===null&&(e.current=t()),e.current}var te={hasAnimatedSinceResize:!0,hasEverUpdated:!1},lu=1;function cu(){return me(function(){if(te.hasEverUpdated)return lu++})}var Xo=m.createContext({}),Zo=m.createContext({});function fu(t,e,n,r){var o,a=e.layoutId,i=e.layout,s=e.drag,u=e.dragConstraints,l=e.layoutScroll,c=m.useContext(Zo);!r||!n||n!=null&&n.projection||(n.projection=new r(t,n.getLatestValues(),(o=n.parent)===null||o===void 0?void 0:o.projection),n.projection.setOptions({layoutId:a,layout:i,alwaysMeasureLayout:!!s||u&&Wt(u),visualElement:n,scheduleRender:function(){return n.scheduleRender()},animationType:typeof i=="string"?i:"both",initialPromotionConfig:c,layoutScroll:l}))}var du=function(t){Wo(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.getSnapshotBeforeUpdate=function(){return this.updateProps(),null},e.prototype.componentDidUpdate=function(){},e.prototype.updateProps=function(){var n=this.props,r=n.visualElement,o=n.props;r&&r.setProps(o)},e.prototype.render=function(){return this.props.children},e}(m.Component);function vu(t){var e=t.preloadedFeatures,n=t.createVisualElement,r=t.projectionNodeConstructor,o=t.useRender,a=t.useVisualState,i=t.Component;e&&Xs(e);function s(u,l){var c=pu(u);u=P(P({},u),{layoutId:c});var f=m.useContext(Wn),d=null,p=uu(u),v=f.isStatic?void 0:cu(),h=a(u,f.isStatic);return!f.isStatic&&qt&&(p.visualElement=ru(i,h,P(P({},f),u),n),fu(v,u,p.visualElement,r||ue.projectionNodeConstructor),d=Js(u,p.visualElement,e)),Sn.createElement(du,{visualElement:p.visualElement,props:P(P({},f),u)},d,Sn.createElement($e.Provider,{value:p},o(i,u,v,ou(h,p.visualElement,l),h,f.isStatic,p.visualElement)))}return m.forwardRef(s)}function pu(t){var e,n=t.layoutId,r=(e=m.useContext(Xo))===null||e===void 0?void 0:e.id;return r&&n!==void 0?r+"-"+n:n}function mu(t){function e(r,o){return o===void 0&&(o={}),vu(t(r,o))}if(typeof Proxy>"u")return e;var n=new Map;return new Proxy(e,{get:function(r,o){return n.has(o)||n.set(o,e(o)),n.get(o)}})}var hu=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","svg","switch","symbol","text","tspan","use","view"];function $n(t){return typeof t!="string"||t.includes("-")?!1:!!(hu.indexOf(t)>-1||/[A-Z]/.test(t))}var je={};function gu(t){Object.assign(je,t)}var wn=["","X","Y","Z"],yu=["translate","scale","rotate","skew"],le=["transformPerspective","x","y","z"];yu.forEach(function(t){return wn.forEach(function(e){return le.push(t+e)})});function Su(t,e){return le.indexOf(t)-le.indexOf(e)}var bu=new Set(le);function he(t){return bu.has(t)}var xu=new Set(["originX","originY","originZ"]);function Jo(t){return xu.has(t)}function Qo(t,e){var n=e.layout,r=e.layoutId;return he(t)||Jo(t)||(n||r!==void 0)&&(!!je[t]||t==="opacity")}var wt=function(t){return!!(t!==null&&typeof t=="object"&&t.getVelocity)},Pu={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"};function _u(t,e,n,r){var o=t.transform,a=t.transformKeys,i=e.enableHardwareAcceleration,s=i===void 0?!0:i,u=e.allowTransformNone,l=u===void 0?!0:u,c="";a.sort(Su);for(var f=!1,d=a.length,p=0;p<d;p++){var v=a[p];c+="".concat(Pu[v]||v,"(").concat(o[v],") "),v==="z"&&(f=!0)}return!f&&s?c+="translateZ(0)":c=c.trim(),r?c=r(o,n?"":c):l&&n&&(c="none"),c}function wu(t){var e=t.originX,n=e===void 0?"50%":e,r=t.originY,o=r===void 0?"50%":r,a=t.originZ,i=a===void 0?0:a;return"".concat(n," ").concat(o," ").concat(i)}function ti(t){return t.startsWith("--")}var Tu=function(t,e){return e&&typeof t=="number"?e.transform(t):t};const ei=(t,e)=>n=>Math.max(Math.min(n,e),t),ee=t=>t%1?Number(t.toFixed(5)):t,ce=/(-)?([\d]*\.?[\d])+/g,Tn=/(#[0-9a-f]{6}|#[0-9a-f]{3}|#(?:[0-9a-f]{2}){2,4}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2,3}\s*\/*\s*[\d\.]+%?\))/gi,Cu=/^(#[0-9a-f]{3}|#(?:[0-9a-f]{2}){2,4}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2,3}\s*\/*\s*[\d\.]+%?\))$/i;function ge(t){return typeof t=="string"}const Ft={test:t=>typeof t=="number",parse:parseFloat,transform:t=>t},ne=Object.assign(Object.assign({},Ft),{transform:ei(0,1)}),_e=Object.assign(Object.assign({},Ft),{default:1}),ye=t=>({test:e=>ge(e)&&e.endsWith(t)&&e.split(" ").length===1,parse:parseFloat,transform:e=>`${e}${t}`}),Vt=ye("deg"),St=ye("%"),A=ye("px"),Eu=ye("vh"),Vu=ye("vw"),Cr=Object.assign(Object.assign({},St),{parse:t=>St.parse(t)/100,transform:t=>St.transform(t*100)}),Hn=(t,e)=>n=>!!(ge(n)&&Cu.test(n)&&n.startsWith(t)||e&&Object.prototype.hasOwnProperty.call(n,e)),ni=(t,e,n)=>r=>{if(!ge(r))return r;const[o,a,i,s]=r.match(ce);return{[t]:parseFloat(o),[e]:parseFloat(a),[n]:parseFloat(i),alpha:s!==void 0?parseFloat(s):1}},Dt={test:Hn("hsl","hue"),parse:ni("hue","saturation","lightness"),transform:({hue:t,saturation:e,lightness:n,alpha:r=1})=>"hsla("+Math.round(t)+", "+St.transform(ee(e))+", "+St.transform(ee(n))+", "+ee(ne.transform(r))+")"},Iu=ei(0,255),ln=Object.assign(Object.assign({},Ft),{transform:t=>Math.round(Iu(t))}),Mt={test:Hn("rgb","red"),parse:ni("red","green","blue"),transform:({red:t,green:e,blue:n,alpha:r=1})=>"rgba("+ln.transform(t)+", "+ln.transform(e)+", "+ln.transform(n)+", "+ee(ne.transform(r))+")"};function Au(t){let e="",n="",r="",o="";return t.length>5?(e=t.substr(1,2),n=t.substr(3,2),r=t.substr(5,2),o=t.substr(7,2)):(e=t.substr(1,1),n=t.substr(2,1),r=t.substr(3,1),o=t.substr(4,1),e+=e,n+=n,r+=r,o+=o),{red:parseInt(e,16),green:parseInt(n,16),blue:parseInt(r,16),alpha:o?parseInt(o,16)/255:1}}const Cn={test:Hn("#"),parse:Au,transform:Mt.transform},at={test:t=>Mt.test(t)||Cn.test(t)||Dt.test(t),parse:t=>Mt.test(t)?Mt.parse(t):Dt.test(t)?Dt.parse(t):Cn.parse(t),transform:t=>ge(t)?t:t.hasOwnProperty("red")?Mt.transform(t):Dt.transform(t)},ri="${c}",oi="${n}";function Mu(t){var e,n,r,o;return isNaN(t)&&ge(t)&&((n=(e=t.match(ce))===null||e===void 0?void 0:e.length)!==null&&n!==void 0?n:0)+((o=(r=t.match(Tn))===null||r===void 0?void 0:r.length)!==null&&o!==void 0?o:0)>0}function ii(t){typeof t=="number"&&(t=`${t}`);const e=[];let n=0;const r=t.match(Tn);r&&(n=r.length,t=t.replace(Tn,ri),e.push(...r.map(at.parse)));const o=t.match(ce);return o&&(t=t.replace(ce,oi),e.push(...o.map(Ft.parse))),{values:e,numColors:n,tokenised:t}}function ai(t){return ii(t).values}function si(t){const{values:e,numColors:n,tokenised:r}=ii(t),o=e.length;return a=>{let i=r;for(let s=0;s<o;s++)i=i.replace(s<n?ri:oi,s<n?at.transform(a[s]):ee(a[s]));return i}}const Ru=t=>typeof t=="number"?0:t;function ju(t){const e=ai(t);return si(t)(e.map(Ru))}const Tt={test:Mu,parse:ai,createTransformer:si,getAnimatableNone:ju},Lu=new Set(["brightness","contrast","saturate","opacity"]);function Bu(t){let[e,n]=t.slice(0,-1).split("(");if(e==="drop-shadow")return t;const[r]=n.match(ce)||[];if(!r)return t;const o=n.replace(r,"");let a=Lu.has(e)?1:0;return r!==n&&(a*=100),e+"("+a+o+")"}const Ou=/([a-z-]*)\(.*?\)/g,En=Object.assign(Object.assign({},Tt),{getAnimatableNone:t=>{const e=t.match(Ou);return e?e.map(Bu).join(" "):t}});var Er=P(P({},Ft),{transform:Math.round}),ui={borderWidth:A,borderTopWidth:A,borderRightWidth:A,borderBottomWidth:A,borderLeftWidth:A,borderRadius:A,radius:A,borderTopLeftRadius:A,borderTopRightRadius:A,borderBottomRightRadius:A,borderBottomLeftRadius:A,width:A,maxWidth:A,height:A,maxHeight:A,size:A,top:A,right:A,bottom:A,left:A,padding:A,paddingTop:A,paddingRight:A,paddingBottom:A,paddingLeft:A,margin:A,marginTop:A,marginRight:A,marginBottom:A,marginLeft:A,rotate:Vt,rotateX:Vt,rotateY:Vt,rotateZ:Vt,scale:_e,scaleX:_e,scaleY:_e,scaleZ:_e,skew:Vt,skewX:Vt,skewY:Vt,distance:A,translateX:A,translateY:A,translateZ:A,x:A,y:A,z:A,perspective:A,transformPerspective:A,opacity:ne,originX:Cr,originY:Cr,originZ:A,zIndex:Er,fillOpacity:ne,strokeOpacity:ne,numOctaves:Er};function zn(t,e,n,r){var o,a=t.style,i=t.vars,s=t.transform,u=t.transformKeys,l=t.transformOrigin;u.length=0;var c=!1,f=!1,d=!0;for(var p in e){var v=e[p];if(ti(p)){i[p]=v;continue}var h=ui[p],b=Tu(v,h);if(he(p)){if(c=!0,s[p]=b,u.push(p),!d)continue;v!==((o=h.default)!==null&&o!==void 0?o:0)&&(d=!1)}else Jo(p)?(l[p]=b,f=!0):a[p]=b}c?a.transform=_u(t,n,d,r):r?a.transform=r({},""):!e.transform&&a.transform&&(a.transform="none"),f&&(a.transformOrigin=wu(l))}var Gn=function(){return{style:{},transform:{},transformKeys:[],transformOrigin:{},vars:{}}};function li(t,e,n){for(var r in e)!wt(e[r])&&!Qo(r,n)&&(t[r]=e[r])}function Du(t,e,n){var r=t.transformTemplate;return m.useMemo(function(){var o=Gn();zn(o,e,{enableHardwareAcceleration:!n},r);var a=o.vars,i=o.style;return P(P({},a),i)},[e])}function Nu(t,e,n){var r=t.style||{},o={};return li(o,r,t),Object.assign(o,Du(t,e,n)),t.transformValues&&(o=t.transformValues(o)),o}function Fu(t,e,n){var r={},o=Nu(t,e,n);return t.drag&&t.dragListener!==!1&&(r.draggable=!1,o.userSelect=o.WebkitUserSelect=o.WebkitTouchCallout="none",o.touchAction=t.drag===!0?"none":"pan-".concat(t.drag==="x"?"y":"x")),r.style=o,r}var ku=new Set(["initial","animate","exit","style","variants","transition","transformTemplate","transformValues","custom","inherit","layout","layoutId","layoutDependency","onLayoutAnimationStart","onLayoutAnimationComplete","onLayoutMeasure","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","drag","dragControls","dragListener","dragConstraints","dragDirectionLock","dragSnapToOrigin","_dragX","_dragY","dragElastic","dragMomentum","dragPropagation","dragTransition","whileDrag","onPan","onPanStart","onPanEnd","onPanSessionStart","onTap","onTapStart","onTapCancel","onHoverStart","onHoverEnd","whileFocus","whileTap","whileHover","whileInView","onViewportEnter","onViewportLeave","viewport","layoutScroll"]);function Le(t){return ku.has(t)}var ci=function(t){return!Le(t)};function Uu(t){t&&(ci=function(e){return e.startsWith("on")?!Le(e):t(e)})}try{Uu(require("@emotion/is-prop-valid").default)}catch{}function Wu(t,e,n){var r={};for(var o in t)(ci(o)||n===!0&&Le(o)||!e&&!Le(o)||t.draggable&&o.startsWith("onDrag"))&&(r[o]=t[o]);return r}function Vr(t,e,n){return typeof t=="string"?t:A.transform(e+n*t)}function $u(t,e,n){var r=Vr(e,t.x,t.width),o=Vr(n,t.y,t.height);return"".concat(r," ").concat(o)}var Hu={offset:"strokeDashoffset",array:"strokeDasharray"};function zu(t,e,n,r,o){n===void 0&&(n=1),r===void 0&&(r=0),t.pathLength=1;var a=Hu;t[a.offset]=A.transform(-r);var i=A.transform(e),s=A.transform(n);t[a.array]="".concat(i," ").concat(s)}function Kn(t,e,n,r){var o=e.attrX,a=e.attrY,i=e.originX,s=e.originY,u=e.pathLength,l=e.pathSpacing,c=l===void 0?1:l,f=e.pathOffset,d=f===void 0?0:f,p=dt(e,["attrX","attrY","originX","originY","pathLength","pathSpacing","pathOffset"]);zn(t,p,n,r),t.attrs=t.style,t.style={};var v=t.attrs,h=t.style,b=t.dimensions;v.transform&&(b&&(h.transform=v.transform),delete v.transform),b&&(i!==void 0||s!==void 0||h.transform)&&(h.transformOrigin=$u(b,i!==void 0?i:.5,s!==void 0?s:.5)),o!==void 0&&(v.x=o),a!==void 0&&(v.y=a),u!==void 0&&zu(v,u,c,d)}var fi=function(){return P(P({},Gn()),{attrs:{}})};function Gu(t,e){var n=m.useMemo(function(){var o=fi();return Kn(o,e,{enableHardwareAcceleration:!1},t.transformTemplate),P(P({},o.attrs),{style:P({},o.style)})},[e]);if(t.style){var r={};li(r,t.style,t),n.style=P(P({},r),n.style)}return n}function Ku(t){t===void 0&&(t=!1);var e=function(n,r,o,a,i,s){var u=i.latestValues,l=$n(n)?Gu:Fu,c=l(r,u,s),f=Wu(r,typeof n=="string",t),d=P(P(P({},f),c),{ref:a});return o&&(d["data-projection-id"]=o),m.createElement(n,d)};return e}var qu=/([a-z])([A-Z])/g,Yu="$1-$2",di=function(t){return t.replace(qu,Yu).toLowerCase()};function vi(t,e,n,r){var o=e.style,a=e.vars;Object.assign(t.style,o,r&&r.getProjectionStyles(n));for(var i in a)t.style.setProperty(i,a[i])}var pi=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength"]);function mi(t,e,n,r){vi(t,e,void 0,r);for(var o in e.attrs)t.setAttribute(pi.has(o)?o:di(o),e.attrs[o])}function qn(t){var e=t.style,n={};for(var r in e)(wt(e[r])||Qo(r,t))&&(n[r]=e[r]);return n}function hi(t){var e=qn(t);for(var n in t)if(wt(t[n])){var r=n==="x"||n==="y"?"attr"+n.toUpperCase():n;e[r]=t[n]}return e}function Yn(t){return typeof t=="object"&&typeof t.start=="function"}var fe=function(t){return Array.isArray(t)},Xu=function(t){return!!(t&&typeof t=="object"&&t.mix&&t.toValue)},gi=function(t){return fe(t)?t[t.length-1]||0:t};function Ae(t){var e=wt(t)?t.get():t;return Xu(e)?e.toValue():e}function Ir(t,e,n,r){var o=t.scrapeMotionValuesFromProps,a=t.createRenderState,i=t.onMount,s={latestValues:Zu(e,n,r,o),renderState:a()};return i&&(s.mount=function(u){return i(e,u,s)}),s}var yi=function(t){return function(e,n){var r=m.useContext($e),o=m.useContext(He);return n?Ir(t,e,r,o):me(function(){return Ir(t,e,r,o)})}};function Zu(t,e,n,r){var o={},a=(n==null?void 0:n.initial)===!1,i=r(t);for(var s in i)o[s]=Ae(i[s]);var u=t.initial,l=t.animate,c=Ge(t),f=Yo(t);e&&f&&!c&&t.inherit!==!1&&(u??(u=e.initial),l??(l=e.animate));var d=a||u===!1,p=d?l:u;if(p&&typeof p!="boolean"&&!Yn(p)){var v=Array.isArray(p)?p:[p];v.forEach(function(h){var b=qo(t,h);if(b){var g=b.transitionEnd;b.transition;var x=dt(b,["transitionEnd","transition"]);for(var S in x){var _=x[S];if(Array.isArray(_)){var T=d?_.length-1:0;_=_[T]}_!==null&&(o[S]=_)}for(var S in g)o[S]=g[S]}})}return o}var Ju={useVisualState:yi({scrapeMotionValuesFromProps:hi,createRenderState:fi,onMount:function(t,e,n){var r=n.renderState,o=n.latestValues;try{r.dimensions=typeof e.getBBox=="function"?e.getBBox():e.getBoundingClientRect()}catch{r.dimensions={x:0,y:0,width:0,height:0}}Kn(r,o,{enableHardwareAcceleration:!1},t.transformTemplate),mi(e,r)}})},Qu={useVisualState:yi({scrapeMotionValuesFromProps:qn,createRenderState:Gn})};function tl(t,e,n,r,o){var a=e.forwardMotionProps,i=a===void 0?!1:a,s=$n(t)?Ju:Qu;return P(P({},s),{preloadedFeatures:n,useRender:Ku(i),createVisualElement:r,projectionNodeConstructor:o,Component:t})}var H;(function(t){t.Animate="animate",t.Hover="whileHover",t.Tap="whileTap",t.Drag="whileDrag",t.Focus="whileFocus",t.InView="whileInView",t.Exit="exit"})(H||(H={}));function Ke(t,e,n,r){return r===void 0&&(r={passive:!0}),t.addEventListener(e,n,r),function(){return t.removeEventListener(e,n)}}function Vn(t,e,n,r){m.useEffect(function(){var o=t.current;if(n&&o)return Ke(o,e,n,r)},[t,e,n,r])}function el(t){var e=t.whileFocus,n=t.visualElement,r=function(){var a;(a=n.animationState)===null||a===void 0||a.setActive(H.Focus,!0)},o=function(){var a;(a=n.animationState)===null||a===void 0||a.setActive(H.Focus,!1)};Vn(n,"focus",e?r:void 0),Vn(n,"blur",e?o:void 0)}function Si(t){return typeof PointerEvent<"u"&&t instanceof PointerEvent?t.pointerType==="mouse":t instanceof MouseEvent}function bi(t){var e=!!t.touches;return e}function nl(t){return function(e){var n=e instanceof MouseEvent,r=!n||n&&e.button===0;r&&t(e)}}var rl={pageX:0,pageY:0};function ol(t,e){e===void 0&&(e="page");var n=t.touches[0]||t.changedTouches[0],r=n||rl;return{x:r[e+"X"],y:r[e+"Y"]}}function il(t,e){return e===void 0&&(e="page"),{x:t[e+"X"],y:t[e+"Y"]}}function Xn(t,e){return e===void 0&&(e="page"),{point:bi(t)?ol(t,e):il(t,e)}}var xi=function(t,e){e===void 0&&(e=!1);var n=function(r){return t(r,Xn(r))};return e?nl(n):n},al=function(){return qt&&window.onpointerdown===null},sl=function(){return qt&&window.ontouchstart===null},ul=function(){return qt&&window.onmousedown===null},ll={pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointercancel:"mousecancel",pointerover:"mouseover",pointerout:"mouseout",pointerenter:"mouseenter",pointerleave:"mouseleave"},cl={pointerdown:"touchstart",pointermove:"touchmove",pointerup:"touchend",pointercancel:"touchcancel"};function Pi(t){return al()?t:sl()?cl[t]:ul()?ll[t]:t}function Ht(t,e,n,r){return Ke(t,Pi(e),xi(n,e==="pointerdown"),r)}function Be(t,e,n,r){return Vn(t,Pi(e),n&&xi(n,e==="pointerdown"),r)}function _i(t){var e=null;return function(){var n=function(){e=null};return e===null?(e=t,n):!1}}var Ar=_i("dragHorizontal"),Mr=_i("dragVertical");function wi(t){var e=!1;if(t==="y")e=Mr();else if(t==="x")e=Ar();else{var n=Ar(),r=Mr();n&&r?e=function(){n(),r()}:(n&&n(),r&&r())}return e}function Ti(){var t=wi(!0);return t?(t(),!1):!0}function Rr(t,e,n){return function(r,o){var a;!Si(r)||Ti()||((a=t.animationState)===null||a===void 0||a.setActive(H.Hover,e),n==null||n(r,o))}}function fl(t){var e=t.onHoverStart,n=t.onHoverEnd,r=t.whileHover,o=t.visualElement;Be(o,"pointerenter",e||r?Rr(o,!0,e):void 0,{passive:!e}),Be(o,"pointerleave",n||r?Rr(o,!1,n):void 0,{passive:!n})}var Ci=function(t,e){return e?t===e?!0:Ci(t,e.parentElement):!1};function Ei(t){return m.useEffect(function(){return function(){return t()}},[])}const Oe=(t,e,n)=>Math.min(Math.max(n,t),e),jr=.001,dl=.01,Lr=10,vl=.05,pl=1;function ml({duration:t=800,bounce:e=.25,velocity:n=0,mass:r=1}){let o,a;pe(t<=Lr*1e3,"Spring duration must be 10 seconds or less");let i=1-e;i=Oe(vl,pl,i),t=Oe(dl,Lr,t/1e3),i<1?(o=l=>{const c=l*i,f=c*t,d=c-n,p=In(l,i),v=Math.exp(-f);return jr-d/p*v},a=l=>{const f=l*i*t,d=f*n+n,p=Math.pow(i,2)*Math.pow(l,2)*t,v=Math.exp(-f),h=In(Math.pow(l,2),i);return(-o(l)+jr>0?-1:1)*((d-p)*v)/h}):(o=l=>{const c=Math.exp(-l*t),f=(l-n)*t+1;return-.001+c*f},a=l=>{const c=Math.exp(-l*t),f=(n-l)*(t*t);return c*f});const s=5/t,u=gl(o,a,s);if(t=t*1e3,isNaN(u))return{stiffness:100,damping:10,duration:t};{const l=Math.pow(u,2)*r;return{stiffness:l,damping:i*2*Math.sqrt(r*l),duration:t}}}const hl=12;function gl(t,e,n){let r=n;for(let o=1;o<hl;o++)r=r-t(r)/e(r);return r}function In(t,e){return t*Math.sqrt(1-e*e)}const yl=["duration","bounce"],Sl=["stiffness","damping","mass"];function Br(t,e){return e.some(n=>t[n]!==void 0)}function bl(t){let e=Object.assign({velocity:0,stiffness:100,damping:10,mass:1,isResolvedFromDuration:!1},t);if(!Br(t,Sl)&&Br(t,yl)){const n=ml(t);e=Object.assign(Object.assign(Object.assign({},e),n),{velocity:0,mass:1}),e.isResolvedFromDuration=!0}return e}function Zn(t){var{from:e=0,to:n=1,restSpeed:r=2,restDelta:o}=t,a=dt(t,["from","to","restSpeed","restDelta"]);const i={done:!1,value:e};let{stiffness:s,damping:u,mass:l,velocity:c,duration:f,isResolvedFromDuration:d}=bl(a),p=Or,v=Or;function h(){const b=c?-(c/1e3):0,g=n-e,x=u/(2*Math.sqrt(s*l)),S=Math.sqrt(s/l)/1e3;if(o===void 0&&(o=Math.min(Math.abs(n-e)/100,.4)),x<1){const _=In(S,x);p=T=>{const C=Math.exp(-x*S*T);return n-C*((b+x*S*g)/_*Math.sin(_*T)+g*Math.cos(_*T))},v=T=>{const C=Math.exp(-x*S*T);return x*S*C*(Math.sin(_*T)*(b+x*S*g)/_+g*Math.cos(_*T))-C*(Math.cos(_*T)*(b+x*S*g)-_*g*Math.sin(_*T))}}else if(x===1)p=_=>n-Math.exp(-S*_)*(g+(b+S*g)*_);else{const _=S*Math.sqrt(x*x-1);p=T=>{const C=Math.exp(-x*S*T),R=Math.min(_*T,300);return n-C*((b+x*S*g)*Math.sinh(R)+_*g*Math.cosh(R))/_}}}return h(),{next:b=>{const g=p(b);if(d)i.done=b>=f;else{const x=v(b)*1e3,S=Math.abs(x)<=r,_=Math.abs(n-g)<=o;i.done=S&&_}return i.value=i.done?n:g,i},flipTarget:()=>{c=-c,[e,n]=[n,e],h()}}}Zn.needsInterpolation=(t,e)=>typeof t=="string"||typeof e=="string";const Or=t=>0,de=(t,e,n)=>{const r=e-t;return r===0?1:(n-t)/r},Z=(t,e,n)=>-n*t+n*e+t;function cn(t,e,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?t+(e-t)*6*n:n<1/2?e:n<2/3?t+(e-t)*(2/3-n)*6:t}function Dr({hue:t,saturation:e,lightness:n,alpha:r}){t/=360,e/=100,n/=100;let o=0,a=0,i=0;if(!e)o=a=i=n;else{const s=n<.5?n*(1+e):n+e-n*e,u=2*n-s;o=cn(u,s,t+1/3),a=cn(u,s,t),i=cn(u,s,t-1/3)}return{red:Math.round(o*255),green:Math.round(a*255),blue:Math.round(i*255),alpha:r}}const xl=(t,e,n)=>{const r=t*t,o=e*e;return Math.sqrt(Math.max(0,n*(o-r)+r))},Pl=[Cn,Mt,Dt],Nr=t=>Pl.find(e=>e.test(t)),Fr=t=>`'${t}' is not an animatable color. Use the equivalent color code instead.`,Vi=(t,e)=>{let n=Nr(t),r=Nr(e);lt(!!n,Fr(t)),lt(!!r,Fr(e));let o=n.parse(t),a=r.parse(e);n===Dt&&(o=Dr(o),n=Mt),r===Dt&&(a=Dr(a),r=Mt);const i=Object.assign({},o);return s=>{for(const u in i)u!=="alpha"&&(i[u]=xl(o[u],a[u],s));return i.alpha=Z(o.alpha,a.alpha,s),n.transform(i)}},An=t=>typeof t=="number",_l=(t,e)=>n=>e(t(n)),qe=(...t)=>t.reduce(_l);function Ii(t,e){return An(t)?n=>Z(t,e,n):at.test(t)?Vi(t,e):Mi(t,e)}const Ai=(t,e)=>{const n=[...t],r=n.length,o=t.map((a,i)=>Ii(a,e[i]));return a=>{for(let i=0;i<r;i++)n[i]=o[i](a);return n}},wl=(t,e)=>{const n=Object.assign(Object.assign({},t),e),r={};for(const o in n)t[o]!==void 0&&e[o]!==void 0&&(r[o]=Ii(t[o],e[o]));return o=>{for(const a in r)n[a]=r[a](o);return n}};function kr(t){const e=Tt.parse(t),n=e.length;let r=0,o=0,a=0;for(let i=0;i<n;i++)r||typeof e[i]=="number"?r++:e[i].hue!==void 0?a++:o++;return{parsed:e,numNumbers:r,numRGB:o,numHSL:a}}const Mi=(t,e)=>{const n=Tt.createTransformer(e),r=kr(t),o=kr(e);return r.numHSL===o.numHSL&&r.numRGB===o.numRGB&&r.numNumbers>=o.numNumbers?qe(Ai(r.parsed,o.parsed),n):(pe(!0,`Complex values '${t}' and '${e}' 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.`),i=>`${i>0?e:t}`)},Tl=(t,e)=>n=>Z(t,e,n);function Cl(t){if(typeof t=="number")return Tl;if(typeof t=="string")return at.test(t)?Vi:Mi;if(Array.isArray(t))return Ai;if(typeof t=="object")return wl}function El(t,e,n){const r=[],o=n||Cl(t[0]),a=t.length-1;for(let i=0;i<a;i++){let s=o(t[i],t[i+1]);if(e){const u=Array.isArray(e)?e[i]:e;s=qe(u,s)}r.push(s)}return r}function Vl([t,e],[n]){return r=>n(de(t,e,r))}function Il(t,e){const n=t.length,r=n-1;return o=>{let a=0,i=!1;if(o<=t[0]?i=!0:o>=t[r]&&(a=r-1,i=!0),!i){let u=1;for(;u<n&&!(t[u]>o||u===r);u++);a=u-1}const s=de(t[a],t[a+1],o);return e[a](s)}}function Ri(t,e,{clamp:n=!0,ease:r,mixer:o}={}){const a=t.length;lt(a===e.length,"Both input and output ranges must be the same length"),lt(!r||!Array.isArray(r)||r.length===a-1,"Array of easing functions must be of length `input.length - 1`, as it applies to the transitions **between** the defined values."),t[0]>t[a-1]&&(t=[].concat(t),e=[].concat(e),t.reverse(),e.reverse());const i=El(e,r,o),s=a===2?Vl(t,i):Il(t,i);return n?u=>s(Oe(t[0],t[a-1],u)):s}const Ye=t=>e=>1-t(1-e),Jn=t=>e=>e<=.5?t(2*e)/2:(2-t(2*(1-e)))/2,Al=t=>e=>Math.pow(e,t),ji=t=>e=>e*e*((t+1)*e-t),Ml=t=>{const e=ji(t);return n=>(n*=2)<1?.5*e(n):.5*(2-Math.pow(2,-10*(n-1)))},Li=1.525,Rl=4/11,jl=8/11,Ll=9/10,Qn=t=>t,tr=Al(2),Bl=Ye(tr),Bi=Jn(tr),Oi=t=>1-Math.sin(Math.acos(t)),er=Ye(Oi),Ol=Jn(er),nr=ji(Li),Dl=Ye(nr),Nl=Jn(nr),Fl=Ml(Li),kl=4356/361,Ul=35442/1805,Wl=16061/1805,De=t=>{if(t===1||t===0)return t;const e=t*t;return t<Rl?7.5625*e:t<jl?9.075*e-9.9*t+3.4:t<Ll?kl*e-Ul*t+Wl:10.8*t*t-20.52*t+10.72},$l=Ye(De),Hl=t=>t<.5?.5*(1-De(1-t*2)):.5*De(t*2-1)+.5;function zl(t,e){return t.map(()=>e||Bi).splice(0,t.length-1)}function Gl(t){const e=t.length;return t.map((n,r)=>r!==0?r/(e-1):0)}function Kl(t,e){return t.map(n=>n*e)}function Me({from:t=0,to:e=1,ease:n,offset:r,duration:o=300}){const a={done:!1,value:t},i=Array.isArray(e)?e:[t,e],s=Kl(r&&r.length===i.length?r:Gl(i),o);function u(){return Ri(s,i,{ease:Array.isArray(n)?n:zl(i,n)})}let l=u();return{next:c=>(a.value=l(c),a.done=c>=o,a),flipTarget:()=>{i.reverse(),l=u()}}}function ql({velocity:t=0,from:e=0,power:n=.8,timeConstant:r=350,restDelta:o=.5,modifyTarget:a}){const i={done:!1,value:e};let s=n*t;const u=e+s,l=a===void 0?u:a(u);return l!==u&&(s=l-e),{next:c=>{const f=-s*Math.exp(-c/r);return i.done=!(f>o||f<-o),i.value=i.done?l:l+f,i},flipTarget:()=>{}}}const Ur={keyframes:Me,spring:Zn,decay:ql};function Yl(t){if(Array.isArray(t.to))return Me;if(Ur[t.type])return Ur[t.type];const e=new Set(Object.keys(t));return e.has("ease")||e.has("duration")&&!e.has("dampingRatio")?Me:e.has("dampingRatio")||e.has("stiffness")||e.has("mass")||e.has("damping")||e.has("restSpeed")||e.has("restDelta")?Zn:Me}const Di=1/60*1e3,Xl=typeof performance<"u"?()=>performance.now():()=>Date.now(),Ni=typeof window<"u"?t=>window.requestAnimationFrame(t):t=>setTimeout(()=>t(Xl()),Di);function Zl(t){let e=[],n=[],r=0,o=!1,a=!1;const i=new WeakSet,s={schedule:(u,l=!1,c=!1)=>{const f=c&&o,d=f?e:n;return l&&i.add(u),d.indexOf(u)===-1&&(d.push(u),f&&o&&(r=e.length)),u},cancel:u=>{const l=n.indexOf(u);l!==-1&&n.splice(l,1),i.delete(u)},process:u=>{if(o){a=!0;return}if(o=!0,[e,n]=[n,e],n.length=0,r=e.length,r)for(let l=0;l<r;l++){const c=e[l];c(u),i.has(c)&&(s.schedule(c),t())}o=!1,a&&(a=!1,s.process(u))}};return s}const Jl=40;let Mn=!0,ve=!1,Rn=!1;const zt={delta:0,timestamp:0},Se=["read","update","preRender","render","postRender"],Xe=Se.reduce((t,e)=>(t[e]=Zl(()=>ve=!0),t),{}),bt=Se.reduce((t,e)=>{const n=Xe[e];return t[e]=(r,o=!1,a=!1)=>(ve||tc(),n.schedule(r,o,a)),t},{}),Gt=Se.reduce((t,e)=>(t[e]=Xe[e].cancel,t),{}),fn=Se.reduce((t,e)=>(t[e]=()=>Xe[e].process(zt),t),{}),Ql=t=>Xe[t].process(zt),Fi=t=>{ve=!1,zt.delta=Mn?Di:Math.max(Math.min(t-zt.timestamp,Jl),1),zt.timestamp=t,Rn=!0,Se.forEach(Ql),Rn=!1,ve&&(Mn=!1,Ni(Fi))},tc=()=>{ve=!0,Mn=!0,Rn||Ni(Fi)},Ne=()=>zt;function ki(t,e,n=0){return t-e-n}function ec(t,e,n=0,r=!0){return r?ki(e+-t,e,n):e-(t-e)+n}function nc(t,e,n,r){return r?t>=e+n:t<=-n}const rc=t=>{const e=({delta:n})=>t(n);return{start:()=>bt.update(e,!0),stop:()=>Gt.update(e)}};function Ui(t){var e,n,{from:r,autoplay:o=!0,driver:a=rc,elapsed:i=0,repeat:s=0,repeatType:u="loop",repeatDelay:l=0,onPlay:c,onStop:f,onComplete:d,onRepeat:p,onUpdate:v}=t,h=dt(t,["from","autoplay","driver","elapsed","repeat","repeatType","repeatDelay","onPlay","onStop","onComplete","onRepeat","onUpdate"]);let{to:b}=h,g,x=0,S=h.duration,_,T=!1,C=!0,R;const B=Yl(h);!((n=(e=B).needsInterpolation)===null||n===void 0)&&n.call(e,r,b)&&(R=Ri([0,100],[r,b],{clamp:!1}),r=0,b=100);const V=B(Object.assign(Object.assign({},h),{from:r,to:b}));function N(){x++,u==="reverse"?(C=x%2===0,i=ec(i,S,l,C)):(i=ki(i,S,l),u==="mirror"&&V.flipTarget()),T=!1,p&&p()}function Y(){g.stop(),d&&d()}function k(I){if(C||(I=-I),i+=I,!T){const z=V.next(Math.max(0,i));_=z.value,R&&(_=R(_)),T=C?z.done:i<=0}v==null||v(_),T&&(x===0&&(S??(S=i)),x<s?nc(i,S,l,C)&&N():Y())}function F(){c==null||c(),g=a(k),g.start()}return o&&F(),{stop:()=>{f==null||f(),g.stop()}}}function Wi(t,e){return e?t*(1e3/e):0}function oc({from:t=0,velocity:e=0,min:n,max:r,power:o=.8,timeConstant:a=750,bounceStiffness:i=500,bounceDamping:s=10,restDelta:u=1,modifyTarget:l,driver:c,onUpdate:f,onComplete:d,onStop:p}){let v;function h(S){return n!==void 0&&S<n||r!==void 0&&S>r}function b(S){return n===void 0?r:r===void 0||Math.abs(n-S)<Math.abs(r-S)?n:r}function g(S){v==null||v.stop(),v=Ui(Object.assign(Object.assign({},S),{driver:c,onUpdate:_=>{var T;f==null||f(_),(T=S.onUpdate)===null||T===void 0||T.call(S,_)},onComplete:d,onStop:p}))}function x(S){g(Object.assign({type:"spring",stiffness:i,damping:s,restDelta:u},S))}if(h(t))x({from:t,velocity:e,to:b(t)});else{let S=o*e+t;typeof l<"u"&&(S=l(S));const _=b(S),T=_===n?-1:1;let C,R;const B=V=>{C=R,R=V,e=Wi(V-C,Ne().delta),(T===1&&V>_||T===-1&&V<_)&&x({from:V,to:_,velocity:e})};g({type:"decay",from:t,velocity:e,timeConstant:a,power:o,restDelta:u,modifyTarget:l,onUpdate:h(S)?B:void 0})}return{stop:()=>v==null?void 0:v.stop()}}const jn=t=>t.hasOwnProperty("x")&&t.hasOwnProperty("y"),Wr=t=>jn(t)&&t.hasOwnProperty("z"),we=(t,e)=>Math.abs(t-e);function $i(t,e){if(An(t)&&An(e))return we(t,e);if(jn(t)&&jn(e)){const n=we(t.x,e.x),r=we(t.y,e.y),o=Wr(t)&&Wr(e)?we(t.z,e.z):0;return Math.sqrt(Math.pow(n,2)+Math.pow(r,2)+Math.pow(o,2))}}const Hi=(t,e)=>1-3*e+3*t,zi=(t,e)=>3*e-6*t,Gi=t=>3*t,Fe=(t,e,n)=>((Hi(e,n)*t+zi(e,n))*t+Gi(e))*t,Ki=(t,e,n)=>3*Hi(e,n)*t*t+2*zi(e,n)*t+Gi(e),ic=1e-7,ac=10;function sc(t,e,n,r,o){let a,i,s=0;do i=e+(n-e)/2,a=Fe(i,r,o)-t,a>0?n=i:e=i;while(Math.abs(a)>ic&&++s<ac);return i}const uc=8,lc=.001;function cc(t,e,n,r){for(let o=0;o<uc;++o){const a=Ki(e,n,r);if(a===0)return e;const i=Fe(e,n,r)-t;e-=i/a}return e}const Re=11,Te=1/(Re-1);function fc(t,e,n,r){if(t===e&&n===r)return Qn;const o=new Float32Array(Re);for(let i=0;i<Re;++i)o[i]=Fe(i*Te,t,n);function a(i){let s=0,u=1;const l=Re-1;for(;u!==l&&o[u]<=i;++u)s+=Te;--u;const c=(i-o[u])/(o[u+1]-o[u]),f=s+c*Te,d=Ki(f,t,n);return d>=lc?cc(i,f,t,n):d===0?f:sc(i,s,s+Te,t,n)}return i=>i===0||i===1?i:Fe(a(i),e,r)}function dc(t){var e=t.onTap,n=t.onTapStart,r=t.onTapCancel,o=t.whileTap,a=t.visualElement,i=e||n||r||o,s=m.useRef(!1),u=m.useRef(null),l={passive:!(n||e||r||v)};function c(){var h;(h=u.current)===null||h===void 0||h.call(u),u.current=null}function f(){var h;return c(),s.current=!1,(h=a.animationState)===null||h===void 0||h.setActive(H.Tap,!1),!Ti()}function d(h,b){f()&&(Ci(a.getInstance(),h.target)?e==null||e(h,b):r==null||r(h,b))}function p(h,b){f()&&(r==null||r(h,b))}function v(h,b){var g;c(),!s.current&&(s.current=!0,u.current=qe(Ht(window,"pointerup",d,l),Ht(window,"pointercancel",p,l)),(g=a.animationState)===null||g===void 0||g.setActive(H.Tap,!0),n==null||n(h,b))}Be(a,"pointerdown",i?v:void 0,l),Ei(c)}var $r=new Set;function qi(t,e,n){t||$r.has(e)||(console.warn(e),$r.add(e))}var Ln=new WeakMap,dn=new WeakMap,vc=function(t){var e;(e=Ln.get(t.target))===null||e===void 0||e(t)},pc=function(t){t.forEach(vc)};function mc(t){var e=t.root,n=dt(t,["root"]),r=e||document;dn.has(r)||dn.set(r,{});var o=dn.get(r),a=JSON.stringify(n);return o[a]||(o[a]=new IntersectionObserver(pc,P({root:e},n))),o[a]}function hc(t,e,n){var r=mc(e);return Ln.set(t,n),r.observe(t),function(){Ln.delete(t),r.unobserve(t)}}function gc(t){var e=t.visualElement,n=t.whileInView,r=t.onViewportEnter,o=t.onViewportLeave,a=t.viewport,i=a===void 0?{}:a,s=m.useRef({hasEnteredView:!1,isInView:!1}),u=!!(n||r||o);i.once&&s.current.hasEnteredView&&(u=!1);var l=typeof IntersectionObserver>"u"?bc:Sc;l(u,s.current,e,i)}var yc={some:0,all:1};function Sc(t,e,n,r){var o=r.root,a=r.margin,i=r.amount,s=i===void 0?"some":i,u=r.once;m.useEffect(function(){if(t){var l={root:o==null?void 0:o.current,rootMargin:a,threshold:typeof s=="number"?s:yc[s]},c=function(f){var d,p=f.isIntersecting;if(e.isInView!==p&&(e.isInView=p,!(u&&!p&&e.hasEnteredView))){p&&(e.hasEnteredView=!0),(d=n.animationState)===null||d===void 0||d.setActive(H.InView,p);var v=n.getProps(),h=p?v.onViewportEnter:v.onViewportLeave;h==null||h(f)}};return hc(n.getInstance(),l,c)}},[t,o,a,s])}function bc(t,e,n,r){var o=r.fallback,a=o===void 0?!0:o;m.useEffect(function(){!t||!a||($o!=="production"&&qi(!1,"IntersectionObserver not available on this device. whileInView animations will trigger on mount."),requestAnimationFrame(function(){var i;e.hasEnteredView=!0;var s=n.getProps().onViewportEnter;s==null||s(null),(i=n.animationState)===null||i===void 0||i.setActive(H.InView,!0)}))},[t])}var Rt=function(t){return function(e){return t(e),null}},xc={inView:Rt(gc),tap:Rt(dc),focus:Rt(el),hover:Rt(fl)},Pc=0,_c=function(){return Pc++},wc=function(){return me(_c)};function Yi(){var t=m.useContext(He);if(t===null)return[!0,null];var e=t.isPresent,n=t.onExitComplete,r=t.register,o=wc();m.useEffect(function(){return r(o)},[]);var a=function(){return n==null?void 0:n(o)};return!e&&n?[!1,a]:[!0]}function Xi(t,e){if(!Array.isArray(e))return!1;var n=e.length;if(n!==t.length)return!1;for(var r=0;r<n;r++)if(e[r]!==t[r])return!1;return!0}var ke=function(t){return t*1e3},Hr={linear:Qn,easeIn:tr,easeInOut:Bi,easeOut:Bl,circIn:Oi,circInOut:Ol,circOut:er,backIn:nr,backInOut:Nl,backOut:Dl,anticipate:Fl,bounceIn:$l,bounceInOut:Hl,bounceOut:De},zr=function(t){if(Array.isArray(t)){lt(t.length===4,"Cubic bezier arrays must contain four numerical values.");var e=Q(t,4),n=e[0],r=e[1],o=e[2],a=e[3];return fc(n,r,o,a)}else if(typeof t=="string")return lt(Hr[t]!==void 0,"Invalid easing type '".concat(t,"'")),Hr[t];return t},Tc=function(t){return Array.isArray(t)&&typeof t[0]!="number"},Gr=function(t,e){return t==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&Tt.test(e)&&!e.startsWith("url("))},Lt=function(){return{type:"spring",stiffness:500,damping:25,restSpeed:10}},Ce=function(t){return{type:"spring",stiffness:550,damping:t===0?2*Math.sqrt(550):30,restSpeed:10}},vn=function(){return{type:"keyframes",ease:"linear",duration:.3}},Cc=function(t){return{type:"keyframes",duration:.8,values:t}},Kr={x:Lt,y:Lt,z:Lt,rotate:Lt,rotateX:Lt,rotateY:Lt,rotateZ:Lt,scaleX:Ce,scaleY:Ce,scale:Ce,opacity:vn,backgroundColor:vn,color:vn,default:Ce},Ec=function(t,e){var n;return fe(e)?n=Cc:n=Kr[t]||Kr.default,P({to:e},n(e))},Vc=P(P({},ui),{color:at,backgroundColor:at,outlineColor:at,fill:at,stroke:at,borderColor:at,borderTopColor:at,borderRightColor:at,borderBottomColor:at,borderLeftColor:at,filter:En,WebkitFilter:En}),rr=function(t){return Vc[t]};function or(t,e){var n,r=rr(t);return r!==En&&(r=Tt),(n=r.getAnimatableNone)===null||n===void 0?void 0:n.call(r,e)}function Ic(t){t.when,t.delay,t.delayChildren,t.staggerChildren,t.staggerDirection,t.repeat,t.repeatType,t.repeatDelay,t.from;var e=dt(t,["when","delay","delayChildren","staggerChildren","staggerDirection","repeat","repeatType","repeatDelay","from"]);return!!Object.keys(e).length}var qr=!1;function Ac(t){var e=t.ease,n=t.times,r=t.yoyo,o=t.flip,a=t.loop,i=dt(t,["ease","times","yoyo","flip","loop"]),s=P({},i);return n&&(s.offset=n),i.duration&&(s.duration=ke(i.duration)),i.repeatDelay&&(s.repeatDelay=ke(i.repeatDelay)),e&&(s.ease=Tc(e)?e.map(zr):zr(e)),i.type==="tween"&&(s.type="keyframes"),(r||a||o)&&(pe(!qr,"yoyo, loop and flip have been removed from the API. Replace with repeat and repeatType options."),qr=!0,r?s.repeatType="reverse":a?s.repeatType="loop":o&&(s.repeatType="mirror"),s.repeat=a||r||o||i.repeat),i.type!=="spring"&&(s.type="keyframes"),s}function Mc(t,e){var n,r,o=ir(t,e)||{};return(r=(n=o.delay)!==null&&n!==void 0?n:t.delay)!==null&&r!==void 0?r:0}function Rc(t){return Array.isArray(t.to)&&t.to[0]===null&&(t.to=ft([],Q(t.to),!1),t.to[0]=t.from),t}function jc(t,e,n){var r;return Array.isArray(e.to)&&((r=t.duration)!==null&&r!==void 0||(t.duration=.8)),Rc(e),Ic(t)||(t=P(P({},t),Ec(n,e.to))),P(P({},e),Ac(t))}function Lc(t,e,n,r,o){var a,i=ir(r,t),s=(a=i.from)!==null&&a!==void 0?a:e.get(),u=Gr(t,n);s==="none"&&u&&typeof n=="string"?s=or(t,n):Yr(s)&&typeof n=="string"?s=Xr(n):!Array.isArray(n)&&Yr(n)&&typeof s=="string"&&(n=Xr(s));var l=Gr(t,s);pe(l===u,"You are trying to animate ".concat(t,' from "').concat(s,'" to "').concat(n,'". ').concat(s," is not an animatable value - to enable this animation set ").concat(s," to a value animatable to ").concat(n," via the `style` property."));function c(){var d={from:s,to:n,velocity:e.getVelocity(),onComplete:o,onUpdate:function(p){return e.set(p)}};return i.type==="inertia"||i.type==="decay"?oc(P(P({},d),i)):Ui(P(P({},jc(i,d,t)),{onUpdate:function(p){var v;d.onUpdate(p),(v=i.onUpdate)===null||v===void 0||v.call(i,p)},onComplete:function(){var p;d.onComplete(),(p=i.onComplete)===null||p===void 0||p.call(i)}}))}function f(){var d,p,v=gi(n);return e.set(v),o(),(d=i==null?void 0:i.onUpdate)===null||d===void 0||d.call(i,v),(p=i==null?void 0:i.onComplete)===null||p===void 0||p.call(i),{stop:function(){}}}return!l||!u||i.type===!1?f:c}function Yr(t){return t===0||typeof t=="string"&&parseFloat(t)===0&&t.indexOf(" ")===-1}function Xr(t){return typeof t=="number"?0:or("",t)}function ir(t,e){return t[e]||t.default||t}function ar(t,e,n,r){return r===void 0&&(r={}),e.start(function(o){var a,i,s=Lc(t,e,n,r,o),u=Mc(r,t),l=function(){return i=s()};return u?a=window.setTimeout(l,ke(u)):l(),function(){clearTimeout(a),i==null||i.stop()}})}var Bc=function(t){return/^\-?\d*\.?\d+$/.test(t)},Oc=function(t){return/^0[^.\s]+$/.test(t)};function sr(t,e){t.indexOf(e)===-1&&t.push(e)}function ur(t,e){var n=t.indexOf(e);n>-1&&t.splice(n,1)}var re=function(){function t(){this.subscriptions=[]}return t.prototype.add=function(e){var n=this;return sr(this.subscriptions,e),function(){return ur(n.subscriptions,e)}},t.prototype.notify=function(e,n,r){var o=this.subscriptions.length;if(o)if(o===1)this.subscriptions[0](e,n,r);else for(var a=0;a<o;a++){var i=this.subscriptions[a];i&&i(e,n,r)}},t.prototype.getSize=function(){return this.subscriptions.length},t.prototype.clear=function(){this.subscriptions.length=0},t}(),Dc=function(t){return!isNaN(parseFloat(t))},Nc=function(){function t(e){var n=this;this.version="6.5.1",this.timeDelta=0,this.lastUpdated=0,this.updateSubscribers=new re,this.velocityUpdateSubscribers=new re,this.renderSubscribers=new re,this.canTrackVelocity=!1,this.updateAndNotify=function(r,o){o===void 0&&(o=!0),n.prev=n.current,n.current=r;var a=Ne(),i=a.delta,s=a.timestamp;n.lastUpdated!==s&&(n.timeDelta=i,n.lastUpdated=s,bt.postRender(n.scheduleVelocityCheck)),n.prev!==n.current&&n.updateSubscribers.notify(n.current),n.velocityUpdateSubscribers.getSize()&&n.velocityUpdateSubscribers.notify(n.getVelocity()),o&&n.renderSubscribers.notify(n.current)},this.scheduleVelocityCheck=function(){return bt.postRender(n.velocityCheck)},this.velocityCheck=function(r){var o=r.timestamp;o!==n.lastUpdated&&(n.prev=n.current,n.velocityUpdateSubscribers.notify(n.getVelocity()))},this.hasAnimated=!1,this.prev=this.current=e,this.canTrackVelocity=Dc(this.current)}return t.prototype.onChange=function(e){return this.updateSubscribers.add(e)},t.prototype.clearListeners=function(){this.updateSubscribers.clear()},t.prototype.onRenderRequest=function(e){return e(this.get()),this.renderSubscribers.add(e)},t.prototype.attach=function(e){this.passiveEffect=e},t.prototype.set=function(e,n){n===void 0&&(n=!0),!n||!this.passiveEffect?this.updateAndNotify(e,n):this.passiveEffect(e,this.updateAndNotify)},t.prototype.get=function(){return this.current},t.prototype.getPrevious=function(){return this.prev},t.prototype.getVelocity=function(){return this.canTrackVelocity?Wi(parseFloat(this.current)-parseFloat(this.prev),this.timeDelta):0},t.prototype.start=function(e){var n=this;return this.stop(),new Promise(function(r){n.hasAnimated=!0,n.stopAnimation=e(r)}).then(function(){return n.clearAnimation()})},t.prototype.stop=function(){this.stopAnimation&&this.stopAnimation(),this.clearAnimation()},t.prototype.isAnimating=function(){return!!this.stopAnimation},t.prototype.clearAnimation=function(){this.stopAnimation=null},t.prototype.destroy=function(){this.updateSubscribers.clear(),this.renderSubscribers.clear(),this.stop()},t}();function Kt(t){return new Nc(t)}var Zi=function(t){return function(e){return e.test(t)}},Fc={test:function(t){return t==="auto"},parse:function(t){return t}},Ji=[Ft,A,St,Vt,Vu,Eu,Fc],Jt=function(t){return Ji.find(Zi(t))},kc=ft(ft([],Q(Ji),!1),[at,Tt],!1),Uc=function(t){return kc.find(Zi(t))};function Wc(t,e,n){t.hasValue(e)?t.getValue(e).set(n):t.addValue(e,Kt(n))}function lr(t,e){var n=ze(t,e),r=n?t.makeTargetAnimatable(n,!1):{},o=r.transitionEnd,a=o===void 0?{}:o;r.transition;var i=dt(r,["transitionEnd","transition"]);i=P(P({},i),a);for(var s in i){var u=gi(i[s]);Wc(t,s,u)}}function Bn(t,e){var n=ft([],Q(e),!1).reverse();n.forEach(function(r){var o,a=t.getVariant(r);a&&lr(t,a),(o=t.variantChildren)===null||o===void 0||o.forEach(function(i){Bn(i,e)})})}function $c(t,e){if(Array.isArray(e))return Bn(t,e);if(typeof e=="string")return Bn(t,[e]);lr(t,e)}function Hc(t,e,n){var r,o,a,i,s=Object.keys(e).filter(function(p){return!t.hasValue(p)}),u=s.length;if(u)for(var l=0;l<u;l++){var c=s[l],f=e[c],d=null;Array.isArray(f)&&(d=f[0]),d===null&&(d=(o=(r=n[c])!==null&&r!==void 0?r:t.readValue(c))!==null&&o!==void 0?o:e[c]),d!=null&&(typeof d=="string"&&(Bc(d)||Oc(d))?d=parseFloat(d):!Uc(d)&&Tt.test(f)&&(d=or(c,f)),t.addValue(c,Kt(d)),(a=(i=n)[c])!==null&&a!==void 0||(i[c]=d),t.setBaseTarget(c,d))}}function zc(t,e){if(e){var n=e[t]||e.default||e;return n.from}}function Gc(t,e,n){var r,o,a={};for(var i in t)a[i]=(r=zc(i,e))!==null&&r!==void 0?r:(o=n.getValue(i))===null||o===void 0?void 0:o.get();return a}function Qi(t,e,n){n===void 0&&(n={}),t.notifyAnimationStart(e);var r;if(Array.isArray(e)){var o=e.map(function(i){return On(t,i,n)});r=Promise.all(o)}else if(typeof e=="string")r=On(t,e,n);else{var a=typeof e=="function"?ze(t,e,n.custom):e;r=ta(t,a,n)}return r.then(function(){return t.notifyAnimationComplete(e)})}function On(t,e,n){var r;n===void 0&&(n={});var o=ze(t,e,n.custom),a=(o||{}).transition,i=a===void 0?t.getDefaultTransition()||{}:a;n.transitionOverride&&(i=n.transitionOverride);var s=o?function(){return ta(t,o,n)}:function(){return Promise.resolve()},u=!((r=t.variantChildren)===null||r===void 0)&&r.size?function(p){p===void 0&&(p=0);var v=i.delayChildren,h=v===void 0?0:v,b=i.staggerChildren,g=i.staggerDirection;return Kc(t,e,h+p,b,g,n)}:function(){return Promise.resolve()},l=i.when;if(l){var c=Q(l==="beforeChildren"?[s,u]:[u,s],2),f=c[0],d=c[1];return f().then(d)}else return Promise.all([s(),u(n.delay)])}function ta(t,e,n){var r,o=n===void 0?{}:n,a=o.delay,i=a===void 0?0:a,s=o.transitionOverride,u=o.type,l=t.makeTargetAnimatable(e),c=l.transition,f=c===void 0?t.getDefaultTransition():c,d=l.transitionEnd,p=dt(l,["transition","transitionEnd"]);s&&(f=s);var v=[],h=u&&((r=t.animationState)===null||r===void 0?void 0:r.getState()[u]);for(var b in p){var g=t.getValue(b),x=p[b];if(!(!g||x===void 0||h&&Xc(h,b))){var S=P({delay:i},f);t.shouldReduceMotion&&he(b)&&(S=P(P({},S),{type:!1,delay:0}));var _=ar(b,g,x,S);v.push(_)}}return Promise.all(v).then(function(){d&&lr(t,d)})}function Kc(t,e,n,r,o,a){n===void 0&&(n=0),r===void 0&&(r=0),o===void 0&&(o=1);var i=[],s=(t.variantChildren.size-1)*r,u=o===1?function(l){return l===void 0&&(l=0),l*r}:function(l){return l===void 0&&(l=0),s-l*r};return Array.from(t.variantChildren).sort(Yc).forEach(function(l,c){i.push(On(l,e,P(P({},a),{delay:n+u(c)})).then(function(){return l.notifyAnimationComplete(e)}))}),Promise.all(i)}function qc(t){t.forEachValue(function(e){return e.stop()})}function Yc(t,e){return t.sortNodePosition(e)}function Xc(t,e){var n=t.protectedKeys,r=t.needsAnimating,o=n.hasOwnProperty(e)&&r[e]!==!0;return r[e]=!1,o}var cr=[H.Animate,H.InView,H.Focus,H.Hover,H.Tap,H.Drag,H.Exit],Zc=ft([],Q(cr),!1).reverse(),Jc=cr.length;function Qc(t){return function(e){return Promise.all(e.map(function(n){var r=n.animation,o=n.options;return Qi(t,r,o)}))}}function tf(t){var e=Qc(t),n=nf(),r={},o=!0,a=function(c,f){var d=ze(t,f);if(d){d.transition;var p=d.transitionEnd,v=dt(d,["transition","transitionEnd"]);c=P(P(P({},c),v),p)}return c};function i(c){return r[c]!==void 0}function s(c){e=c(t)}function u(c,f){for(var d,p=t.getProps(),v=t.getVariantContext(!0)||{},h=[],b=new Set,g={},x=1/0,S=function(R){var B=Zc[R],V=n[B],N=(d=p[B])!==null&&d!==void 0?d:v[B],Y=mt(N),k=B===f?V.isActive:null;k===!1&&(x=R);var F=N===v[B]&&N!==p[B]&&Y;if(F&&o&&t.manuallyAnimateOnMount&&(F=!1),V.protectedKeys=P({},g),!V.isActive&&k===null||!N&&!V.prevProp||Yn(N)||typeof N=="boolean")return"continue";var I=ef(V.prevProp,N),z=I||B===f&&V.isActive&&!F&&Y||R>x&&Y,X=Array.isArray(N)?N:[N],M=X.reduce(a,{});k===!1&&(M={});var nt=V.prevResolvedValues,rt=nt===void 0?{}:nt,ot=P(P({},rt),M),U=function(E){z=!0,b.delete(E),V.needsAnimating[E]=!0};for(var q in ot){var O=M[q],w=rt[q];g.hasOwnProperty(q)||(O!==w?fe(O)&&fe(w)?!Xi(O,w)||I?U(q):V.protectedKeys[q]=!0:O!==void 0?U(q):b.add(q):O!==void 0&&b.has(q)?U(q):V.protectedKeys[q]=!0)}V.prevProp=N,V.prevResolvedValues=M,V.isActive&&(g=P(P({},g),M)),o&&t.blockInitialAnimation&&(z=!1),z&&!F&&h.push.apply(h,ft([],Q(X.map(function(E){return{animation:E,options:P({type:B},c)}})),!1))},_=0;_<Jc;_++)S(_);if(r=P({},g),b.size){var T={};b.forEach(function(R){var B=t.getBaseTarget(R);B!==void 0&&(T[R]=B)}),h.push({animation:T})}var C=!!h.length;return o&&p.initial===!1&&!t.manuallyAnimateOnMount&&(C=!1),o=!1,C?e(h):Promise.resolve()}function l(c,f,d){var p;if(n[c].isActive===f)return Promise.resolve();(p=t.variantChildren)===null||p===void 0||p.forEach(function(b){var g;return(g=b.animationState)===null||g===void 0?void 0:g.setActive(c,f)}),n[c].isActive=f;var v=u(d,c);for(var h in n)n[h].protectedKeys={};return v}return{isAnimated:i,animateChanges:u,setActive:l,setAnimateFunction:s,getState:function(){return n}}}function ef(t,e){return typeof e=="string"?e!==t:Ko(e)?!Xi(e,t):!1}function Bt(t){return t===void 0&&(t=!1),{isActive:t,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function nf(){var t;return t={},t[H.Animate]=Bt(!0),t[H.InView]=Bt(),t[H.Hover]=Bt(),t[H.Tap]=Bt(),t[H.Drag]=Bt(),t[H.Focus]=Bt(),t[H.Exit]=Bt(),t}var rf={animation:Rt(function(t){var e=t.visualElement,n=t.animate;e.animationState||(e.animationState=tf(e)),Yn(n)&&m.useEffect(function(){return n.subscribe(e)},[n])}),exit:Rt(function(t){var e=t.custom,n=t.visualElement,r=Q(Yi(),2),o=r[0],a=r[1],i=m.useContext(He);m.useEffect(function(){var s,u;n.isPresent=o;var l=(s=n.animationState)===null||s===void 0?void 0:s.setActive(H.Exit,!o,{custom:(u=i==null?void 0:i.custom)!==null&&u!==void 0?u:e});!o&&(l==null||l.then(a))},[o])})},ea=function(){function t(e,n,r){var o=this,a=r===void 0?{}:r,i=a.transformPagePoint;if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.updatePoint=function(){if(o.lastMoveEvent&&o.lastMoveEventInfo){var d=mn(o.lastMoveEventInfo,o.history),p=o.startEvent!==null,v=$i(d.offset,{x:0,y:0})>=3;if(!(!p&&!v)){var h=d.point,b=Ne().timestamp;o.history.push(P(P({},h),{timestamp:b}));var g=o.handlers,x=g.onStart,S=g.onMove;p||(x&&x(o.lastMoveEvent,d),o.startEvent=o.lastMoveEvent),S&&S(o.lastMoveEvent,d)}}},this.handlePointerMove=function(d,p){if(o.lastMoveEvent=d,o.lastMoveEventInfo=pn(p,o.transformPagePoint),Si(d)&&d.buttons===0){o.handlePointerUp(d,p);return}bt.update(o.updatePoint,!0)},this.handlePointerUp=function(d,p){o.end();var v=o.handlers,h=v.onEnd,b=v.onSessionEnd,g=mn(pn(p,o.transformPagePoint),o.history);o.startEvent&&h&&h(d,g),b&&b(d,g)},!(bi(e)&&e.touches.length>1)){this.handlers=n,this.transformPagePoint=i;var s=Xn(e),u=pn(s,this.transformPagePoint),l=u.point,c=Ne().timestamp;this.history=[P(P({},l),{timestamp:c})];var f=n.onSessionStart;f&&f(e,mn(u,this.history)),this.removeListeners=qe(Ht(window,"pointermove",this.handlePointerMove),Ht(window,"pointerup",this.handlePointerUp),Ht(window,"pointercancel",this.handlePointerUp))}}return t.prototype.updateHandlers=function(e){this.handlers=e},t.prototype.end=function(){this.removeListeners&&this.removeListeners(),Gt.update(this.updatePoint)},t}();function pn(t,e){return e?{point:e(t.point)}:t}function Zr(t,e){return{x:t.x-e.x,y:t.y-e.y}}function mn(t,e){var n=t.point;return{point:n,delta:Zr(n,na(e)),offset:Zr(n,of(e)),velocity:af(e,.1)}}function of(t){return t[0]}function na(t){return t[t.length-1]}function af(t,e){if(t.length<2)return{x:0,y:0};for(var n=t.length-1,r=null,o=na(t);n>=0&&(r=t[n],!(o.timestamp-r.timestamp>ke(e)));)n--;if(!r)return{x:0,y:0};var a=(o.timestamp-r.timestamp)/1e3;if(a===0)return{x:0,y:0};var i={x:(o.x-r.x)/a,y:(o.y-r.y)/a};return i.x===1/0&&(i.x=0),i.y===1/0&&(i.y=0),i}function Ct(t){return t.max-t.min}function Jr(t,e,n){return e===void 0&&(e=0),n===void 0&&(n=.01),$i(t,e)<n}function Qr(t,e,n,r){r===void 0&&(r=.5),t.origin=r,t.originPoint=Z(e.min,e.max,t.origin),t.scale=Ct(n)/Ct(e),(Jr(t.scale,1,1e-4)||isNaN(t.scale))&&(t.scale=1),t.translate=Z(n.min,n.max,t.origin)-t.originPoint,(Jr(t.translate)||isNaN(t.translate))&&(t.translate=0)}function oe(t,e,n,r){Qr(t.x,e.x,n.x,r==null?void 0:r.originX),Qr(t.y,e.y,n.y,r==null?void 0:r.originY)}function to(t,e,n){t.min=n.min+e.min,t.max=t.min+Ct(e)}function sf(t,e,n){to(t.x,e.x,n.x),to(t.y,e.y,n.y)}function eo(t,e,n){t.min=e.min-n.min,t.max=t.min+Ct(e)}function ie(t,e,n){eo(t.x,e.x,n.x),eo(t.y,e.y,n.y)}function uf(t,e,n){var r=e.min,o=e.max;return r!==void 0&&t<r?t=n?Z(r,t,n.min):Math.max(t,r):o!==void 0&&t>o&&(t=n?Z(o,t,n.max):Math.min(t,o)),t}function no(t,e,n){return{min:e!==void 0?t.min+e:void 0,max:n!==void 0?t.max+n-(t.max-t.min):void 0}}function lf(t,e){var n=e.top,r=e.left,o=e.bottom,a=e.right;return{x:no(t.x,r,a),y:no(t.y,n,o)}}function ro(t,e){var n,r=e.min-t.min,o=e.max-t.max;return e.max-e.min<t.max-t.min&&(n=Q([o,r],2),r=n[0],o=n[1]),{min:r,max:o}}function cf(t,e){return{x:ro(t.x,e.x),y:ro(t.y,e.y)}}function ff(t,e){var n=.5,r=Ct(t),o=Ct(e);return o>r?n=de(e.min,e.max-r,t.min):r>o&&(n=de(t.min,t.max-o,e.min)),Oe(0,1,n)}function df(t,e){var n={};return e.min!==void 0&&(n.min=e.min-t.min),e.max!==void 0&&(n.max=e.max-t.min),n}var Dn=.35;function vf(t){return t===void 0&&(t=Dn),t===!1?t=0:t===!0&&(t=Dn),{x:oo(t,"left","right"),y:oo(t,"top","bottom")}}function oo(t,e,n){return{min:io(t,e),max:io(t,n)}}function io(t,e){var n;return typeof t=="number"?t:(n=t[e])!==null&&n!==void 0?n:0}var ao=function(){return{translate:0,scale:1,origin:0,originPoint:0}},ae=function(){return{x:ao(),y:ao()}},so=function(){return{min:0,max:0}},it=function(){return{x:so(),y:so()}};function yt(t){return[t("x"),t("y")]}function ra(t){var e=t.top,n=t.left,r=t.right,o=t.bottom;return{x:{min:n,max:r},y:{min:e,max:o}}}function pf(t){var e=t.x,n=t.y;return{top:n.min,right:e.max,bottom:n.max,left:e.min}}function mf(t,e){if(!e)return t;var n=e({x:t.left,y:t.top}),r=e({x:t.right,y:t.bottom});return{top:n.y,left:n.x,bottom:r.y,right:r.x}}function hn(t){return t===void 0||t===1}function oa(t){var e=t.scale,n=t.scaleX,r=t.scaleY;return!hn(e)||!hn(n)||!hn(r)}function It(t){return oa(t)||uo(t.x)||uo(t.y)||t.z||t.rotate||t.rotateX||t.rotateY}function uo(t){return t&&t!=="0%"}function Ue(t,e,n){var r=t-n,o=e*r;return n+o}function lo(t,e,n,r,o){return o!==void 0&&(t=Ue(t,o,r)),Ue(t,n,r)+e}function Nn(t,e,n,r,o){e===void 0&&(e=0),n===void 0&&(n=1),t.min=lo(t.min,e,n,r,o),t.max=lo(t.max,e,n,r,o)}function ia(t,e){var n=e.x,r=e.y;Nn(t.x,n.translate,n.scale,n.originPoint),Nn(t.y,r.translate,r.scale,r.originPoint)}function hf(t,e,n,r){var o,a;r===void 0&&(r=!1);var i=n.length;if(i){e.x=e.y=1;for(var s,u,l=0;l<i;l++)s=n[l],u=s.projectionDelta,((a=(o=s.instance)===null||o===void 0?void 0:o.style)===null||a===void 0?void 0:a.display)!=="contents"&&(r&&s.options.layoutScroll&&s.scroll&&s!==s.root&&$t(t,{x:-s.scroll.x,y:-s.scroll.y}),u&&(e.x*=u.x.scale,e.y*=u.y.scale,ia(t,u)),r&&It(s.latestValues)&&$t(t,s.latestValues))}}function At(t,e){t.min=t.min+e,t.max=t.max+e}function co(t,e,n){var r=Q(n,3),o=r[0],a=r[1],i=r[2],s=e[i]!==void 0?e[i]:.5,u=Z(t.min,t.max,s);Nn(t,e[o],e[a],u,e.scale)}var gf=["x","scaleX","originX"],yf=["y","scaleY","originY"];function $t(t,e){co(t.x,e,gf),co(t.y,e,yf)}function aa(t,e){return ra(mf(t.getBoundingClientRect(),e))}function Sf(t,e,n){var r=aa(t,n),o=e.scroll;return o&&(At(r.x,o.x),At(r.y,o.y)),r}var bf=new WeakMap,xf=function(){function t(e){this.openGlobalLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=it(),this.visualElement=e}return t.prototype.start=function(e,n){var r=this,o=n===void 0?{}:n,a=o.snapToCursor,i=a===void 0?!1:a;if(this.visualElement.isPresent!==!1){var s=function(f){r.stopAnimation(),i&&r.snapToCursor(Xn(f,"page").point)},u=function(f,d){var p,v=r.getProps(),h=v.drag,b=v.dragPropagation,g=v.onDragStart;h&&!b&&(r.openGlobalLock&&r.openGlobalLock(),r.openGlobalLock=wi(h),!r.openGlobalLock)||(r.isDragging=!0,r.currentDirection=null,r.resolveConstraints(),r.visualElement.projection&&(r.visualElement.projection.isAnimationBlocked=!0,r.visualElement.projection.target=void 0),yt(function(x){var S,_,T=r.getAxisMotionValue(x).get()||0;if(St.test(T)){var C=(_=(S=r.visualElement.projection)===null||S===void 0?void 0:S.layout)===null||_===void 0?void 0:_.actual[x];if(C){var R=Ct(C);T=R*(parseFloat(T)/100)}}r.originPoint[x]=T}),g==null||g(f,d),(p=r.visualElement.animationState)===null||p===void 0||p.setActive(H.Drag,!0))},l=function(f,d){var p=r.getProps(),v=p.dragPropagation,h=p.dragDirectionLock,b=p.onDirectionLock,g=p.onDrag;if(!(!v&&!r.openGlobalLock)){var x=d.offset;if(h&&r.currentDirection===null){r.currentDirection=Pf(x),r.currentDirection!==null&&(b==null||b(r.currentDirection));return}r.updateAxis("x",d.point,x),r.updateAxis("y",d.point,x),r.visualElement.syncRender(),g==null||g(f,d)}},c=function(f,d){return r.stop(f,d)};this.panSession=new ea(e,{onSessionStart:s,onStart:u,onMove:l,onSessionEnd:c},{transformPagePoint:this.visualElement.getTransformPagePoint()})}},t.prototype.stop=function(e,n){var r=this.isDragging;if(this.cancel(),!!r){var o=n.velocity;this.startAnimation(o);var a=this.getProps().onDragEnd;a==null||a(e,n)}},t.prototype.cancel=function(){var e,n;this.isDragging=!1,this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!1),(e=this.panSession)===null||e===void 0||e.end(),this.panSession=void 0;var r=this.getProps().dragPropagation;!r&&this.openGlobalLock&&(this.openGlobalLock(),this.openGlobalLock=null),(n=this.visualElement.animationState)===null||n===void 0||n.setActive(H.Drag,!1)},t.prototype.updateAxis=function(e,n,r){var o=this.getProps().drag;if(!(!r||!Ee(e,o,this.currentDirection))){var a=this.getAxisMotionValue(e),i=this.originPoint[e]+r[e];this.constraints&&this.constraints[e]&&(i=uf(i,this.constraints[e],this.elastic[e])),a.set(i)}},t.prototype.resolveConstraints=function(){var e=this,n=this.getProps(),r=n.dragConstraints,o=n.dragElastic,a=(this.visualElement.projection||{}).layout,i=this.constraints;r&&Wt(r)?this.constraints||(this.constraints=this.resolveRefConstraints()):r&&a?this.constraints=lf(a.actual,r):this.constraints=!1,this.elastic=vf(o),i!==this.constraints&&a&&this.constraints&&!this.hasMutatedConstraints&&yt(function(s){e.getAxisMotionValue(s)&&(e.constraints[s]=df(a.actual[s],e.constraints[s]))})},t.prototype.resolveRefConstraints=function(){var e=this.getProps(),n=e.dragConstraints,r=e.onMeasureDragConstraints;if(!n||!Wt(n))return!1;var o=n.current;lt(o!==null,"If `dragConstraints` is set as a React ref, that ref must be passed to another component's `ref` prop.");var a=this.visualElement.projection;if(!a||!a.layout)return!1;var i=Sf(o,a.root,this.visualElement.getTransformPagePoint()),s=cf(a.layout.actual,i);if(r){var u=r(pf(s));this.hasMutatedConstraints=!!u,u&&(s=ra(u))}return s},t.prototype.startAnimation=function(e){var n=this,r=this.getProps(),o=r.drag,a=r.dragMomentum,i=r.dragElastic,s=r.dragTransition,u=r.dragSnapToOrigin,l=r.onDragTransitionEnd,c=this.constraints||{},f=yt(function(d){var p;if(Ee(d,o,n.currentDirection)){var v=(p=c==null?void 0:c[d])!==null&&p!==void 0?p:{};u&&(v={min:0,max:0});var h=i?200:1e6,b=i?40:1e7,g=P(P({type:"inertia",velocity:a?e[d]:0,bounceStiffness:h,bounceDamping:b,timeConstant:750,restDelta:1,restSpeed:10},s),v);return n.startAxisValueAnimation(d,g)}});return Promise.all(f).then(l)},t.prototype.startAxisValueAnimation=function(e,n){var r=this.getAxisMotionValue(e);return ar(e,r,0,n)},t.prototype.stopAnimation=function(){var e=this;yt(function(n){return e.getAxisMotionValue(n).stop()})},t.prototype.getAxisMotionValue=function(e){var n,r,o="_drag"+e.toUpperCase(),a=this.visualElement.getProps()[o];return a||this.visualElement.getValue(e,(r=(n=this.visualElement.getProps().initial)===null||n===void 0?void 0:n[e])!==null&&r!==void 0?r:0)},t.prototype.snapToCursor=function(e){var n=this;yt(function(r){var o=n.getProps().drag;if(Ee(r,o,n.currentDirection)){var a=n.visualElement.projection,i=n.getAxisMotionValue(r);if(a&&a.layout){var s=a.layout.actual[r],u=s.min,l=s.max;i.set(e[r]-Z(u,l,.5))}}})},t.prototype.scalePositionWithinConstraints=function(){var e=this,n,r=this.getProps(),o=r.drag,a=r.dragConstraints,i=this.visualElement.projection;if(!(!Wt(a)||!i||!this.constraints)){this.stopAnimation();var s={x:0,y:0};yt(function(l){var c=e.getAxisMotionValue(l);if(c){var f=c.get();s[l]=ff({min:f,max:f},e.constraints[l])}});var u=this.visualElement.getProps().transformTemplate;this.visualElement.getInstance().style.transform=u?u({},""):"none",(n=i.root)===null||n===void 0||n.updateScroll(),i.updateLayout(),this.resolveConstraints(),yt(function(l){if(Ee(l,o,null)){var c=e.getAxisMotionValue(l),f=e.constraints[l],d=f.min,p=f.max;c.set(Z(d,p,s[l]))}})}},t.prototype.addListeners=function(){var e=this,n;bf.set(this.visualElement,this);var r=this.visualElement.getInstance(),o=Ht(r,"pointerdown",function(l){var c=e.getProps(),f=c.drag,d=c.dragListener,p=d===void 0?!0:d;f&&p&&e.start(l)}),a=function(){var l=e.getProps().dragConstraints;Wt(l)&&(e.constraints=e.resolveRefConstraints())},i=this.visualElement.projection,s=i.addEventListener("measure",a);i&&!i.layout&&((n=i.root)===null||n===void 0||n.updateScroll(),i.updateLayout()),a();var u=Ke(window,"resize",function(){return e.scalePositionWithinConstraints()});return i.addEventListener("didUpdate",function(l){var c=l.delta,f=l.hasLayoutChanged;e.isDragging&&f&&(yt(function(d){var p=e.getAxisMotionValue(d);p&&(e.originPoint[d]+=c[d].translate,p.set(p.get()+c[d].translate))}),e.visualElement.syncRender())}),function(){u(),o(),s()}},t.prototype.getProps=function(){var e=this.visualElement.getProps(),n=e.drag,r=n===void 0?!1:n,o=e.dragDirectionLock,a=o===void 0?!1:o,i=e.dragPropagation,s=i===void 0?!1:i,u=e.dragConstraints,l=u===void 0?!1:u,c=e.dragElastic,f=c===void 0?Dn:c,d=e.dragMomentum,p=d===void 0?!0:d;return P(P({},e),{drag:r,dragDirectionLock:a,dragPropagation:s,dragConstraints:l,dragElastic:f,dragMomentum:p})},t}();function Ee(t,e,n){return(e===!0||e===t)&&(n===null||n===t)}function Pf(t,e){e===void 0&&(e=10);var n=null;return Math.abs(t.y)>e?n="y":Math.abs(t.x)>e&&(n="x"),n}function _f(t){var e=t.dragControls,n=t.visualElement,r=me(function(){return new xf(n)});m.useEffect(function(){return e&&e.subscribe(r)},[r,e]),m.useEffect(function(){return r.addListeners()},[r])}function wf(t){var e=t.onPan,n=t.onPanStart,r=t.onPanEnd,o=t.onPanSessionStart,a=t.visualElement,i=e||n||r||o,s=m.useRef(null),u=m.useContext(Wn).transformPagePoint,l={onSessionStart:o,onStart:n,onMove:e,onEnd:function(f,d){s.current=null,r&&r(f,d)}};m.useEffect(function(){s.current!==null&&s.current.updateHandlers(l)});function c(f){s.current=new ea(f,l,{transformPagePoint:u})}Be(a,"pointerdown",i&&c),Ei(function(){return s.current&&s.current.end()})}var Tf={pan:Rt(wf),drag:Rt(_f)},Ve=["LayoutMeasure","BeforeLayoutMeasure","LayoutUpdate","ViewportBoxUpdate","Update","Render","AnimationComplete","LayoutAnimationComplete","AnimationStart","LayoutAnimationStart","SetAxisTarget","Unmount"];function Cf(){var t=Ve.map(function(){return new re}),e={},n={clearAllListeners:function(){return t.forEach(function(r){return r.clear()})},updatePropListeners:function(r){Ve.forEach(function(o){var a,i="on"+o,s=r[i];(a=e[o])===null||a===void 0||a.call(e),s&&(e[o]=n[i](s))})}};return t.forEach(function(r,o){n["on"+Ve[o]]=function(a){return r.add(a)},n["notify"+Ve[o]]=function(){for(var a=[],i=0;i<arguments.length;i++)a[i]=arguments[i];return r.notify.apply(r,ft([],Q(a),!1))}}),n}function Ef(t,e,n){var r;for(var o in e){var a=e[o],i=n[o];if(wt(a))t.addValue(o,a),process.env.NODE_ENV==="development"&&qi(a.version==="6.5.1","Attempting to mix Framer Motion versions ".concat(a.version," with 6.5.1 may not work as expected."));else if(wt(i))t.addValue(o,Kt(a));else if(i!==a)if(t.hasValue(o)){var s=t.getValue(o);!s.hasAnimated&&s.set(a)}else t.addValue(o,Kt((r=t.getStaticValue(o))!==null&&r!==void 0?r:a))}for(var o in n)e[o]===void 0&&t.removeValue(o);return e}var sa=function(t){var e=t.treeType,n=e===void 0?"":e,r=t.build,o=t.getBaseTarget,a=t.makeTargetAnimatable,i=t.measureViewportBox,s=t.render,u=t.readValueFromInstance,l=t.removeValueFromRenderState,c=t.sortNodePosition,f=t.scrapeMotionValuesFromProps;return function(d,p){var v=d.parent,h=d.props,b=d.presenceId,g=d.blockInitialAnimation,x=d.visualState,S=d.shouldReduceMotion;p===void 0&&(p={});var _=!1,T=x.latestValues,C=x.renderState,R,B=Cf(),V=new Map,N=new Map,Y={},k=P({},T),F;function I(){!R||!_||(z(),s(R,C,h.style,O.projection))}function z(){r(O,C,T,p,h)}function X(){B.notifyUpdate(T)}function M(w,E){var L=E.onChange(function(D){T[w]=D,h.onUpdate&&bt.update(X,!1,!0)}),j=E.onRenderRequest(O.scheduleRender);N.set(w,function(){L(),j()})}var nt=f(h);for(var rt in nt){var ot=nt[rt];T[rt]!==void 0&&wt(ot)&&ot.set(T[rt],!1)}var U=Ge(h),q=Yo(h),O=P(P({treeType:n,current:null,depth:v?v.depth+1:0,parent:v,children:new Set,presenceId:b,shouldReduceMotion:S,variantChildren:q?new Set:void 0,isVisible:void 0,manuallyAnimateOnMount:!!(v!=null&&v.isMounted()),blockInitialAnimation:g,isMounted:function(){return!!R},mount:function(w){_=!0,R=O.current=w,O.projection&&O.projection.mount(w),q&&v&&!U&&(F=v==null?void 0:v.addVariantChild(O)),V.forEach(function(E,L){return M(L,E)}),v==null||v.children.add(O),O.setProps(h)},unmount:function(){var w;(w=O.projection)===null||w===void 0||w.unmount(),Gt.update(X),Gt.render(I),N.forEach(function(E){return E()}),F==null||F(),v==null||v.children.delete(O),B.clearAllListeners(),R=void 0,_=!1},addVariantChild:function(w){var E,L=O.getClosestVariantNode();if(L)return(E=L.variantChildren)===null||E===void 0||E.add(w),function(){return L.variantChildren.delete(w)}},sortNodePosition:function(w){return!c||n!==w.treeType?0:c(O.getInstance(),w.getInstance())},getClosestVariantNode:function(){return q?O:v==null?void 0:v.getClosestVariantNode()},getLayoutId:function(){return h.layoutId},getInstance:function(){return R},getStaticValue:function(w){return T[w]},setStaticValue:function(w,E){return T[w]=E},getLatestValues:function(){return T},setVisibility:function(w){O.isVisible!==w&&(O.isVisible=w,O.scheduleRender())},makeTargetAnimatable:function(w,E){return E===void 0&&(E=!0),a(O,w,h,E)},measureViewportBox:function(){return i(R,h)},addValue:function(w,E){O.hasValue(w)&&O.removeValue(w),V.set(w,E),T[w]=E.get(),M(w,E)},removeValue:function(w){var E;V.delete(w),(E=N.get(w))===null||E===void 0||E(),N.delete(w),delete T[w],l(w,C)},hasValue:function(w){return V.has(w)},getValue:function(w,E){var L=V.get(w);return L===void 0&&E!==void 0&&(L=Kt(E),O.addValue(w,L)),L},forEachValue:function(w){return V.forEach(w)},readValue:function(w){var E;return(E=T[w])!==null&&E!==void 0?E:u(R,w,p)},setBaseTarget:function(w,E){k[w]=E},getBaseTarget:function(w){if(o){var E=o(h,w);if(E!==void 0&&!wt(E))return E}return k[w]}},B),{build:function(){return z(),C},scheduleRender:function(){bt.render(I,!1,!0)},syncRender:I,setProps:function(w){(w.transformTemplate||h.transformTemplate)&&O.scheduleRender(),h=w,B.updatePropListeners(w),Y=Ef(O,f(h),Y)},getProps:function(){return h},getVariant:function(w){var E;return(E=h.variants)===null||E===void 0?void 0:E[w]},getDefaultTransition:function(){return h.transition},getTransformPagePoint:function(){return h.transformPagePoint},getVariantContext:function(w){if(w===void 0&&(w=!1),w)return v==null?void 0:v.getVariantContext();if(!U){var E=(v==null?void 0:v.getVariantContext())||{};return h.initial!==void 0&&(E.initial=h.initial),E}for(var L={},j=0;j<Vf;j++){var D=ua[j],W=h[D];(mt(W)||W===!1)&&(L[D]=W)}return L}});return O}},ua=ft(["initial"],Q(cr),!1),Vf=ua.length;function Fn(t){return typeof t=="string"&&t.startsWith("var(--")}var la=/var\((--[a-zA-Z0-9-_]+),? ?([a-zA-Z0-9 ()%#.,-]+)?\)/;function If(t){var e=la.exec(t);if(!e)return[,];var n=Q(e,3),r=n[1],o=n[2];return[r,o]}var Af=4;function kn(t,e,n){n===void 0&&(n=1),lt(n<=Af,'Max CSS variable fallback depth detected in property "'.concat(t,'". This may indicate a circular fallback dependency.'));var r=Q(If(t),2),o=r[0],a=r[1];if(o){var i=window.getComputedStyle(e).getPropertyValue(o);return i?i.trim():Fn(a)?kn(a,e,n+1):a}}function Mf(t,e,n){var r,o=dt(e,[]),a=t.getInstance();if(!(a instanceof Element))return{target:o,transitionEnd:n};n&&(n=P({},n)),t.forEachValue(function(l){var c=l.get();if(Fn(c)){var f=kn(c,a);f&&l.set(f)}});for(var i in o){var s=o[i];if(Fn(s)){var u=kn(s,a);u&&(o[i]=u,n&&((r=n[i])!==null&&r!==void 0||(n[i]=s)))}}return{target:o,transitionEnd:n}}var Rf=new Set(["width","height","top","left","right","bottom","x","y"]),ca=function(t){return Rf.has(t)},jf=function(t){return Object.keys(t).some(ca)},fa=function(t,e){t.set(e,!1),t.set(e)},Ie=function(t){return t===Ft||t===A},fo;(function(t){t.width="width",t.height="height",t.left="left",t.right="right",t.top="top",t.bottom="bottom"})(fo||(fo={}));var vo=function(t,e){return parseFloat(t.split(", ")[e])},po=function(t,e){return function(n,r){var o=r.transform;if(o==="none"||!o)return 0;var a=o.match(/^matrix3d\((.+)\)$/);if(a)return vo(a[1],e);var i=o.match(/^matrix\((.+)\)$/);return i?vo(i[1],t):0}},Lf=new Set(["x","y","z"]),Bf=le.filter(function(t){return!Lf.has(t)});function Of(t){var e=[];return Bf.forEach(function(n){var r=t.getValue(n);r!==void 0&&(e.push([n,r.get()]),r.set(n.startsWith("scale")?1:0))}),e.length&&t.syncRender(),e}var mo={width:function(t,e){var n=t.x,r=e.paddingLeft,o=r===void 0?"0":r,a=e.paddingRight,i=a===void 0?"0":a;return n.max-n.min-parseFloat(o)-parseFloat(i)},height:function(t,e){var n=t.y,r=e.paddingTop,o=r===void 0?"0":r,a=e.paddingBottom,i=a===void 0?"0":a;return n.max-n.min-parseFloat(o)-parseFloat(i)},top:function(t,e){var n=e.top;return parseFloat(n)},left:function(t,e){var n=e.left;return parseFloat(n)},bottom:function(t,e){var n=t.y,r=e.top;return parseFloat(r)+(n.max-n.min)},right:function(t,e){var n=t.x,r=e.left;return parseFloat(r)+(n.max-n.min)},x:po(4,13),y:po(5,14)},Df=function(t,e,n){var r=e.measureViewportBox(),o=e.getInstance(),a=getComputedStyle(o),i=a.display,s={};i==="none"&&e.setStaticValue("display",t.display||"block"),n.forEach(function(l){s[l]=mo[l](r,a)}),e.syncRender();var u=e.measureViewportBox();return n.forEach(function(l){var c=e.getValue(l);fa(c,s[l]),t[l]=mo[l](u,a)}),t},Nf=function(t,e,n,r){n===void 0&&(n={}),r===void 0&&(r={}),e=P({},e),r=P({},r);var o=Object.keys(e).filter(ca),a=[],i=!1,s=[];if(o.forEach(function(c){var f=t.getValue(c);if(t.hasValue(c)){var d=n[c],p=Jt(d),v=e[c],h;if(fe(v)){var b=v.length,g=v[0]===null?1:0;d=v[g],p=Jt(d);for(var x=g;x<b;x++)h?lt(Jt(v[x])===h,"All keyframes must be of the same type"):(h=Jt(v[x]),lt(h===p||Ie(p)&&Ie(h),"Keyframes must be of the same dimension as the current value"))}else h=Jt(v);if(p!==h)if(Ie(p)&&Ie(h)){var S=f.get();typeof S=="string"&&f.set(parseFloat(S)),typeof v=="string"?e[c]=parseFloat(v):Array.isArray(v)&&h===A&&(e[c]=v.map(parseFloat))}else p!=null&&p.transform&&(h!=null&&h.transform)&&(d===0||v===0)?d===0?f.set(h.transform(d)):e[c]=p.transform(v):(i||(a=Of(t),i=!0),s.push(c),r[c]=r[c]!==void 0?r[c]:e[c],fa(f,v))}}),s.length){var u=s.indexOf("height")>=0?window.pageYOffset:null,l=Df(e,t,s);return a.length&&a.forEach(function(c){var f=Q(c,2),d=f[0],p=f[1];t.getValue(d).set(p)}),t.syncRender(),u!==null&&window.scrollTo({top:u}),{target:l,transitionEnd:r}}else return{target:e,transitionEnd:r}};function Ff(t,e,n,r){return jf(e)?Nf(t,e,n,r):{target:e,transitionEnd:r}}var kf=function(t,e,n,r){var o=Mf(t,e,r);return e=o.target,r=o.transitionEnd,Ff(t,e,n,r)};function Uf(t){return window.getComputedStyle(t)}var da={treeType:"dom",readValueFromInstance:function(t,e){if(he(e)){var n=rr(e);return n&&n.default||0}else{var r=Uf(t);return(ti(e)?r.getPropertyValue(e):r[e])||0}},sortNodePosition:function(t,e){return t.compareDocumentPosition(e)&2?1:-1},getBaseTarget:function(t,e){var n;return(n=t.style)===null||n===void 0?void 0:n[e]},measureViewportBox:function(t,e){var n=e.transformPagePoint;return aa(t,n)},resetTransform:function(t,e,n){var r=n.transformTemplate;e.style.transform=r?r({},""):"none",t.scheduleRender()},restoreTransform:function(t,e){t.style.transform=e.style.transform},removeValueFromRenderState:function(t,e){var n=e.vars,r=e.style;delete n[t],delete r[t]},makeTargetAnimatable:function(t,e,n,r){var o=n.transformValues;r===void 0&&(r=!0);var a=e.transition,i=e.transitionEnd,s=dt(e,["transition","transitionEnd"]),u=Gc(s,a||{},t);if(o&&(i&&(i=o(i)),s&&(s=o(s)),u&&(u=o(u))),r){Hc(t,s,u);var l=kf(t,s,u,i);i=l.transitionEnd,s=l.target}return P({transition:a,transitionEnd:i},s)},scrapeMotionValuesFromProps:qn,build:function(t,e,n,r,o){t.isVisible!==void 0&&(e.style.visibility=t.isVisible?"visible":"hidden"),zn(e,n,r,o.transformTemplate)},render:vi},Wf=sa(da),$f=sa(P(P({},da),{getBaseTarget:function(t,e){return t[e]},readValueFromInstance:function(t,e){var n;return he(e)?((n=rr(e))===null||n===void 0?void 0:n.default)||0:(e=pi.has(e)?e:di(e),t.getAttribute(e))},scrapeMotionValuesFromProps:hi,build:function(t,e,n,r,o){Kn(e,n,r,o.transformTemplate)},render:mi})),Hf=function(t,e){return $n(t)?$f(e,{enableHardwareAcceleration:!1}):Wf(e,{enableHardwareAcceleration:!0})};function ho(t,e){return e.max===e.min?0:t/(e.max-e.min)*100}var Qt={correct:function(t,e){if(!e.target)return t;if(typeof t=="string")if(A.test(t))t=parseFloat(t);else return t;var n=ho(t,e.target.x),r=ho(t,e.target.y);return"".concat(n,"% ").concat(r,"%")}},go="_$css",zf={correct:function(t,e){var n=e.treeScale,r=e.projectionDelta,o=t,a=t.includes("var("),i=[];a&&(t=t.replace(la,function(h){return i.push(h),go}));var s=Tt.parse(t);if(s.length>5)return o;var u=Tt.createTransformer(t),l=typeof s[0]!="number"?1:0,c=r.x.scale*n.x,f=r.y.scale*n.y;s[0+l]/=c,s[1+l]/=f;var d=Z(c,f,.5);typeof s[2+l]=="number"&&(s[2+l]/=d),typeof s[3+l]=="number"&&(s[3+l]/=d);var p=u(s);if(a){var v=0;p=p.replace(go,function(){var h=i[v];return v++,h})}return p}},Gf=function(t){Wo(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.componentDidMount=function(){var n=this,r=this.props,o=r.visualElement,a=r.layoutGroup,i=r.switchLayoutGroup,s=r.layoutId,u=o.projection;gu(qf),u&&(a!=null&&a.group&&a.group.add(u),i!=null&&i.register&&s&&i.register(u),u.root.didUpdate(),u.addEventListener("animationComplete",function(){n.safeToRemove()}),u.setOptions(P(P({},u.options),{onExitComplete:function(){return n.safeToRemove()}}))),te.hasEverUpdated=!0},e.prototype.getSnapshotBeforeUpdate=function(n){var r=this,o=this.props,a=o.layoutDependency,i=o.visualElement,s=o.drag,u=o.isPresent,l=i.projection;return l&&(l.isPresent=u,s||n.layoutDependency!==a||a===void 0?l.willUpdate():this.safeToRemove(),n.isPresent!==u&&(u?l.promote():l.relegate()||bt.postRender(function(){var c;!((c=l.getStack())===null||c===void 0)&&c.members.length||r.safeToRemove()}))),null},e.prototype.componentDidUpdate=function(){var n=this.props.visualElement.projection;n&&(n.root.didUpdate(),!n.currentAnimation&&n.isLead()&&this.safeToRemove())},e.prototype.componentWillUnmount=function(){var n=this.props,r=n.visualElement,o=n.layoutGroup,a=n.switchLayoutGroup,i=r.projection;i&&(i.scheduleCheckAfterUnmount(),o!=null&&o.group&&o.group.remove(i),a!=null&&a.deregister&&a.deregister(i))},e.prototype.safeToRemove=function(){var n=this.props.safeToRemove;n==null||n()},e.prototype.render=function(){return null},e}(m.Component);function Kf(t){var e=Q(Yi(),2),n=e[0],r=e[1],o=m.useContext(Xo);return m.createElement(Gf,P({},t,{layoutGroup:o,switchLayoutGroup:m.useContext(Zo),isPresent:n,safeToRemove:r}))}var qf={borderRadius:P(P({},Qt),{applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]}),borderTopLeftRadius:Qt,borderTopRightRadius:Qt,borderBottomLeftRadius:Qt,borderBottomRightRadius:Qt,boxShadow:zf},Yf={measureLayout:Kf};function Xf(t,e,n){n===void 0&&(n={});var r=wt(t)?t:Kt(t);return ar("",r,e,n),{stop:function(){return r.stop()},isAnimating:function(){return r.isAnimating()}}}var va=["TopLeft","TopRight","BottomLeft","BottomRight"],Zf=va.length,yo=function(t){return typeof t=="string"?parseFloat(t):t},So=function(t){return typeof t=="number"||A.test(t)};function Jf(t,e,n,r,o,a){var i,s,u,l;o?(t.opacity=Z(0,(i=n.opacity)!==null&&i!==void 0?i:1,Qf(r)),t.opacityExit=Z((s=e.opacity)!==null&&s!==void 0?s:1,0,td(r))):a&&(t.opacity=Z((u=e.opacity)!==null&&u!==void 0?u:1,(l=n.opacity)!==null&&l!==void 0?l:1,r));for(var c=0;c<Zf;c++){var f="border".concat(va[c],"Radius"),d=bo(e,f),p=bo(n,f);if(!(d===void 0&&p===void 0)){d||(d=0),p||(p=0);var v=d===0||p===0||So(d)===So(p);v?(t[f]=Math.max(Z(yo(d),yo(p),r),0),(St.test(p)||St.test(d))&&(t[f]+="%")):t[f]=p}}(e.rotate||n.rotate)&&(t.rotate=Z(e.rotate||0,n.rotate||0,r))}function bo(t,e){var n;return(n=t[e])!==null&&n!==void 0?n:t.borderRadius}var Qf=pa(0,.5,er),td=pa(.5,.95,Qn);function pa(t,e,n){return function(r){return r<t?0:r>e?1:n(de(t,e,r))}}function xo(t,e){t.min=e.min,t.max=e.max}function pt(t,e){xo(t.x,e.x),xo(t.y,e.y)}function Po(t,e,n,r,o){return t-=e,t=Ue(t,1/n,r),o!==void 0&&(t=Ue(t,1/o,r)),t}function ed(t,e,n,r,o,a,i){if(e===void 0&&(e=0),n===void 0&&(n=1),r===void 0&&(r=.5),a===void 0&&(a=t),i===void 0&&(i=t),St.test(e)){e=parseFloat(e);var s=Z(i.min,i.max,e/100);e=s-i.min}if(typeof e=="number"){var u=Z(a.min,a.max,r);t===a&&(u-=e),t.min=Po(t.min,e,n,u,o),t.max=Po(t.max,e,n,u,o)}}function _o(t,e,n,r,o){var a=Q(n,3),i=a[0],s=a[1],u=a[2];ed(t,e[i],e[s],e[u],e.scale,r,o)}var nd=["x","scaleX","originX"],rd=["y","scaleY","originY"];function wo(t,e,n,r){_o(t.x,e,nd,n==null?void 0:n.x,r==null?void 0:r.x),_o(t.y,e,rd,n==null?void 0:n.y,r==null?void 0:r.y)}function To(t){return t.translate===0&&t.scale===1}function ma(t){return To(t.x)&&To(t.y)}function ha(t,e){return t.x.min===e.x.min&&t.x.max===e.x.max&&t.y.min===e.y.min&&t.y.max===e.y.max}var od=function(){function t(){this.members=[]}return t.prototype.add=function(e){sr(this.members,e),e.scheduleRender()},t.prototype.remove=function(e){if(ur(this.members,e),e===this.prevLead&&(this.prevLead=void 0),e===this.lead){var n=this.members[this.members.length-1];n&&this.promote(n)}},t.prototype.relegate=function(e){var n=this.members.findIndex(function(i){return e===i});if(n===0)return!1;for(var r,o=n;o>=0;o--){var a=this.members[o];if(a.isPresent!==!1){r=a;break}}return r?(this.promote(r),!0):!1},t.prototype.promote=function(e,n){var r,o=this.lead;if(e!==o&&(this.prevLead=o,this.lead=e,e.show(),o)){o.instance&&o.scheduleRender(),e.scheduleRender(),e.resumeFrom=o,n&&(e.resumeFrom.preserveOpacity=!0),o.snapshot&&(e.snapshot=o.snapshot,e.snapshot.latestValues=o.animationValues||o.latestValues,e.snapshot.isShared=!0),!((r=e.root)===null||r===void 0)&&r.isUpdating&&(e.isLayoutDirty=!0);var a=e.options.crossfade;a===!1&&o.hide()}},t.prototype.exitAnimationComplete=function(){this.members.forEach(function(e){var n,r,o,a,i;(r=(n=e.options).onExitComplete)===null||r===void 0||r.call(n),(i=(o=e.resumingFrom)===null||o===void 0?void 0:(a=o.options).onExitComplete)===null||i===void 0||i.call(a)})},t.prototype.scheduleRender=function(){this.members.forEach(function(e){e.instance&&e.scheduleRender(!1)})},t.prototype.removeLeadSnapshot=function(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)},t}(),id="translate3d(0px, 0px, 0) scale(1, 1) scale(1, 1)";function Co(t,e,n){var r=t.x.translate/e.x,o=t.y.translate/e.y,a="translate3d(".concat(r,"px, ").concat(o,"px, 0) ");if(a+="scale(".concat(1/e.x,", ").concat(1/e.y,") "),n){var i=n.rotate,s=n.rotateX,u=n.rotateY;i&&(a+="rotate(".concat(i,"deg) ")),s&&(a+="rotateX(".concat(s,"deg) ")),u&&(a+="rotateY(".concat(u,"deg) "))}var l=t.x.scale*e.x,c=t.y.scale*e.y;return a+="scale(".concat(l,", ").concat(c,")"),a===id?"none":a}var ad=function(t,e){return t.depth-e.depth},sd=function(){function t(){this.children=[],this.isDirty=!1}return t.prototype.add=function(e){sr(this.children,e),this.isDirty=!0},t.prototype.remove=function(e){ur(this.children,e),this.isDirty=!0},t.prototype.forEach=function(e){this.isDirty&&this.children.sort(ad),this.isDirty=!1,this.children.forEach(e)},t}(),Eo=1e3;function ga(t){var e=t.attachResizeListener,n=t.defaultParent,r=t.measureScroll,o=t.checkIsScrollRoot,a=t.resetTransform;return function(){function i(s,u,l){var c=this;u===void 0&&(u={}),l===void 0&&(l=n==null?void 0:n()),this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.potentialNodes=new Map,this.checkUpdateFailed=function(){c.isUpdating&&(c.isUpdating=!1,c.clearAllSnapshots())},this.updateProjection=function(){c.nodes.forEach(vd),c.nodes.forEach(pd)},this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.id=s,this.latestValues=u,this.root=l?l.root||l:this,this.path=l?ft(ft([],Q(l.path),!1),[l],!1):[],this.parent=l,this.depth=l?l.depth+1:0,s&&this.root.registerPotentialNode(s,this);for(var f=0;f<this.path.length;f++)this.path[f].shouldResetTransform=!0;this.root===this&&(this.nodes=new sd)}return i.prototype.addEventListener=function(s,u){return this.eventHandlers.has(s)||this.eventHandlers.set(s,new re),this.eventHandlers.get(s).add(u)},i.prototype.notifyListeners=function(s){for(var u=[],l=1;l<arguments.length;l++)u[l-1]=arguments[l];var c=this.eventHandlers.get(s);c==null||c.notify.apply(c,ft([],Q(u),!1))},i.prototype.hasListeners=function(s){return this.eventHandlers.has(s)},i.prototype.registerPotentialNode=function(s,u){this.potentialNodes.set(s,u)},i.prototype.mount=function(s,u){var l=this,c;if(u===void 0&&(u=!1),!this.instance){this.isSVG=s instanceof SVGElement&&s.tagName!=="svg",this.instance=s;var f=this.options,d=f.layoutId,p=f.layout,v=f.visualElement;if(v&&!v.getInstance()&&v.mount(s),this.root.nodes.add(this),(c=this.parent)===null||c===void 0||c.children.add(this),this.id&&this.root.potentialNodes.delete(this.id),u&&(p||d)&&(this.isLayoutDirty=!0),e){var h,b=function(){return l.root.updateBlockedByResize=!1};e(s,function(){l.root.updateBlockedByResize=!0,clearTimeout(h),h=window.setTimeout(b,250),te.hasAnimatedSinceResize&&(te.hasAnimatedSinceResize=!1,l.nodes.forEach(dd))})}d&&this.root.registerSharedNode(d,this),this.options.animate!==!1&&v&&(d||p)&&this.addEventListener("didUpdate",function(g){var x,S,_,T,C,R=g.delta,B=g.hasLayoutChanged,V=g.hasRelativeTargetChanged,N=g.layout;if(l.isTreeAnimationBlocked()){l.target=void 0,l.relativeTarget=void 0;return}var Y=(S=(x=l.options.transition)!==null&&x!==void 0?x:v.getDefaultTransition())!==null&&S!==void 0?S:Sd,k=v.getProps(),F=k.onLayoutAnimationStart,I=k.onLayoutAnimationComplete,z=!l.targetLayout||!ha(l.targetLayout,N)||V,X=!B&&V;if(!((_=l.resumeFrom)===null||_===void 0)&&_.instance||X||B&&(z||!l.currentAnimation)){l.resumeFrom&&(l.resumingFrom=l.resumeFrom,l.resumingFrom.resumingFrom=void 0),l.setAnimationOrigin(R,X);var M=P(P({},ir(Y,"layout")),{onPlay:F,onComplete:I});v.shouldReduceMotion&&(M.delay=0,M.type=!1),l.startAnimation(M)}else!B&&l.animationProgress===0&&l.finishAnimation(),l.isLead()&&((C=(T=l.options).onExitComplete)===null||C===void 0||C.call(T));l.targetLayout=N})}},i.prototype.unmount=function(){var s,u;this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this),(s=this.getStack())===null||s===void 0||s.remove(this),(u=this.parent)===null||u===void 0||u.children.delete(this),this.instance=void 0,Gt.preRender(this.updateProjection)},i.prototype.blockUpdate=function(){this.updateManuallyBlocked=!0},i.prototype.unblockUpdate=function(){this.updateManuallyBlocked=!1},i.prototype.isUpdateBlocked=function(){return this.updateManuallyBlocked||this.updateBlockedByResize},i.prototype.isTreeAnimationBlocked=function(){var s;return this.isAnimationBlocked||((s=this.parent)===null||s===void 0?void 0:s.isTreeAnimationBlocked())||!1},i.prototype.startUpdate=function(){var s;this.isUpdateBlocked()||(this.isUpdating=!0,(s=this.nodes)===null||s===void 0||s.forEach(md))},i.prototype.willUpdate=function(s){var u,l,c;if(s===void 0&&(s=!0),this.root.isUpdateBlocked()){(l=(u=this.options).onExitComplete)===null||l===void 0||l.call(u);return}if(!this.root.isUpdating&&this.root.startUpdate(),!this.isLayoutDirty){this.isLayoutDirty=!0;for(var f=0;f<this.path.length;f++){var d=this.path[f];d.shouldResetTransform=!0,d.updateScroll()}var p=this.options,v=p.layoutId,h=p.layout;if(!(v===void 0&&!h)){var b=(c=this.options.visualElement)===null||c===void 0?void 0:c.getProps().transformTemplate;this.prevTransformTemplateValue=b==null?void 0:b(this.latestValues,""),this.updateSnapshot(),s&&this.notifyListeners("willUpdate")}}},i.prototype.didUpdate=function(){var s=this.isUpdateBlocked();if(s){this.unblockUpdate(),this.clearAllSnapshots(),this.nodes.forEach(Vo);return}this.isUpdating&&(this.isUpdating=!1,this.potentialNodes.size&&(this.potentialNodes.forEach(bd),this.potentialNodes.clear()),this.nodes.forEach(fd),this.nodes.forEach(ud),this.nodes.forEach(ld),this.clearAllSnapshots(),fn.update(),fn.preRender(),fn.render())},i.prototype.clearAllSnapshots=function(){this.nodes.forEach(cd),this.sharedNodes.forEach(hd)},i.prototype.scheduleUpdateProjection=function(){bt.preRender(this.updateProjection,!1,!0)},i.prototype.scheduleCheckAfterUnmount=function(){var s=this;bt.postRender(function(){s.isLayoutDirty?s.root.didUpdate():s.root.checkUpdateFailed()})},i.prototype.updateSnapshot=function(){if(!(this.snapshot||!this.instance)){var s=this.measure(),u=this.removeTransform(this.removeElementScroll(s));Ro(u),this.snapshot={measured:s,layout:u,latestValues:{}}}},i.prototype.updateLayout=function(){var s;if(this.instance&&(this.updateScroll(),!(!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))){if(this.resumeFrom&&!this.resumeFrom.instance)for(var u=0;u<this.path.length;u++){var l=this.path[u];l.updateScroll()}var c=this.measure();Ro(c);var f=this.layout;this.layout={measured:c,actual:this.removeElementScroll(c)},this.layoutCorrected=it(),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.actual),(s=this.options.visualElement)===null||s===void 0||s.notifyLayoutMeasure(this.layout.actual,f==null?void 0:f.actual)}},i.prototype.updateScroll=function(){this.options.layoutScroll&&this.instance&&(this.isScrollRoot=o(this.instance),this.scroll=r(this.instance))},i.prototype.resetTransform=function(){var s;if(a){var u=this.isLayoutDirty||this.shouldResetTransform,l=this.projectionDelta&&!ma(this.projectionDelta),c=(s=this.options.visualElement)===null||s===void 0?void 0:s.getProps().transformTemplate,f=c==null?void 0:c(this.latestValues,""),d=f!==this.prevTransformTemplateValue;u&&(l||It(this.latestValues)||d)&&(a(this.instance,f),this.shouldResetTransform=!1,this.scheduleRender())}},i.prototype.measure=function(){var s=this.options.visualElement;if(!s)return it();var u=s.measureViewportBox(),l=this.root.scroll;return l&&(At(u.x,l.x),At(u.y,l.y)),u},i.prototype.removeElementScroll=function(s){var u=it();pt(u,s);for(var l=0;l<this.path.length;l++){var c=this.path[l],f=c.scroll,d=c.options,p=c.isScrollRoot;if(c!==this.root&&f&&d.layoutScroll){if(p){pt(u,s);var v=this.root.scroll;v&&(At(u.x,-v.x),At(u.y,-v.y))}At(u.x,f.x),At(u.y,f.y)}}return u},i.prototype.applyTransform=function(s,u){u===void 0&&(u=!1);var l=it();pt(l,s);for(var c=0;c<this.path.length;c++){var f=this.path[c];!u&&f.options.layoutScroll&&f.scroll&&f!==f.root&&$t(l,{x:-f.scroll.x,y:-f.scroll.y}),It(f.latestValues)&&$t(l,f.latestValues)}return It(this.latestValues)&&$t(l,this.latestValues),l},i.prototype.removeTransform=function(s){var u,l=it();pt(l,s);for(var c=0;c<this.path.length;c++){var f=this.path[c];if(f.instance&&It(f.latestValues)){oa(f.latestValues)&&f.updateSnapshot();var d=it(),p=f.measure();pt(d,p),wo(l,f.latestValues,(u=f.snapshot)===null||u===void 0?void 0:u.layout,d)}}return It(this.latestValues)&&wo(l,this.latestValues),l},i.prototype.setTargetDelta=function(s){this.targetDelta=s,this.root.scheduleUpdateProjection()},i.prototype.setOptions=function(s){var u;this.options=P(P(P({},this.options),s),{crossfade:(u=s.crossfade)!==null&&u!==void 0?u:!0})},i.prototype.clearMeasurements=function(){this.scroll=void 0,this.layout=void 0,this.snapshot=void 0,this.prevTransformTemplateValue=void 0,this.targetDelta=void 0,this.target=void 0,this.isLayoutDirty=!1},i.prototype.resolveTargetDelta=function(){var s,u=this.options,l=u.layout,c=u.layoutId;!this.layout||!(l||c)||(!this.targetDelta&&!this.relativeTarget&&(this.relativeParent=this.getClosestProjectingParent(),this.relativeParent&&this.relativeParent.layout&&(this.relativeTarget=it(),this.relativeTargetOrigin=it(),ie(this.relativeTargetOrigin,this.layout.actual,this.relativeParent.layout.actual),pt(this.relativeTarget,this.relativeTargetOrigin))),!(!this.relativeTarget&&!this.targetDelta)&&(this.target||(this.target=it(),this.targetWithTransforms=it()),this.relativeTarget&&this.relativeTargetOrigin&&(!((s=this.relativeParent)===null||s===void 0)&&s.target)?sf(this.target,this.relativeTarget,this.relativeParent.target):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.actual):pt(this.target,this.layout.actual),ia(this.target,this.targetDelta)):pt(this.target,this.layout.actual),this.attemptToResolveRelativeTarget&&(this.attemptToResolveRelativeTarget=!1,this.relativeParent=this.getClosestProjectingParent(),this.relativeParent&&!!this.relativeParent.resumingFrom==!!this.resumingFrom&&!this.relativeParent.options.layoutScroll&&this.relativeParent.target&&(this.relativeTarget=it(),this.relativeTargetOrigin=it(),ie(this.relativeTargetOrigin,this.target,this.relativeParent.target),pt(this.relativeTarget,this.relativeTargetOrigin)))))},i.prototype.getClosestProjectingParent=function(){if(!(!this.parent||It(this.parent.latestValues)))return(this.parent.relativeTarget||this.parent.targetDelta)&&this.parent.layout?this.parent:this.parent.getClosestProjectingParent()},i.prototype.calcProjection=function(){var s,u=this.options,l=u.layout,c=u.layoutId;if(this.isTreeAnimating=!!(!((s=this.parent)===null||s===void 0)&&s.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!(!this.layout||!(l||c))){var f=this.getLead();pt(this.layoutCorrected,this.layout.actual),hf(this.layoutCorrected,this.treeScale,this.path,!!this.resumingFrom||this!==f);var d=f.target;if(d){this.projectionDelta||(this.projectionDelta=ae(),this.projectionDeltaWithTransform=ae());var p=this.treeScale.x,v=this.treeScale.y,h=this.projectionTransform;oe(this.projectionDelta,this.layoutCorrected,d,this.latestValues),this.projectionTransform=Co(this.projectionDelta,this.treeScale),(this.projectionTransform!==h||this.treeScale.x!==p||this.treeScale.y!==v)&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",d))}}},i.prototype.hide=function(){this.isVisible=!1},i.prototype.show=function(){this.isVisible=!0},i.prototype.scheduleRender=function(s){var u,l,c;s===void 0&&(s=!0),(l=(u=this.options).scheduleRender)===null||l===void 0||l.call(u),s&&((c=this.getStack())===null||c===void 0||c.scheduleRender()),this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)},i.prototype.setAnimationOrigin=function(s,u){var l=this,c;u===void 0&&(u=!1);var f=this.snapshot,d=(f==null?void 0:f.latestValues)||{},p=P({},this.latestValues),v=ae();this.relativeTarget=this.relativeTargetOrigin=void 0,this.attemptToResolveRelativeTarget=!u;var h=it(),b=f==null?void 0:f.isShared,g=(((c=this.getStack())===null||c===void 0?void 0:c.members.length)||0)<=1,x=!!(b&&!g&&this.options.crossfade===!0&&!this.path.some(yd));this.animationProgress=0,this.mixTargetDelta=function(S){var _,T=S/1e3;Io(v.x,s.x,T),Io(v.y,s.y,T),l.setTargetDelta(v),l.relativeTarget&&l.relativeTargetOrigin&&l.layout&&(!((_=l.relativeParent)===null||_===void 0)&&_.layout)&&(ie(h,l.layout.actual,l.relativeParent.layout.actual),gd(l.relativeTarget,l.relativeTargetOrigin,h,T)),b&&(l.animationValues=p,Jf(p,d,l.latestValues,T,x,g)),l.root.scheduleUpdateProjection(),l.scheduleRender(),l.animationProgress=T},this.mixTargetDelta(0)},i.prototype.startAnimation=function(s){var u=this,l,c;this.notifyListeners("animationStart"),(l=this.currentAnimation)===null||l===void 0||l.stop(),this.resumingFrom&&((c=this.resumingFrom.currentAnimation)===null||c===void 0||c.stop()),this.pendingAnimation&&(Gt.update(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=bt.update(function(){te.hasAnimatedSinceResize=!0,u.currentAnimation=Xf(0,Eo,P(P({},s),{onUpdate:function(f){var d;u.mixTargetDelta(f),(d=s.onUpdate)===null||d===void 0||d.call(s,f)},onComplete:function(){var f;(f=s.onComplete)===null||f===void 0||f.call(s),u.completeAnimation()}})),u.resumingFrom&&(u.resumingFrom.currentAnimation=u.currentAnimation),u.pendingAnimation=void 0})},i.prototype.completeAnimation=function(){var s;this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0),(s=this.getStack())===null||s===void 0||s.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")},i.prototype.finishAnimation=function(){var s;this.currentAnimation&&((s=this.mixTargetDelta)===null||s===void 0||s.call(this,Eo),this.currentAnimation.stop()),this.completeAnimation()},i.prototype.applyTransformsToTarget=function(){var s=this.getLead(),u=s.targetWithTransforms,l=s.target,c=s.layout,f=s.latestValues;!u||!l||!c||(pt(u,l),$t(u,f),oe(this.projectionDeltaWithTransform,this.layoutCorrected,u,f))},i.prototype.registerSharedNode=function(s,u){var l,c,f;this.sharedNodes.has(s)||this.sharedNodes.set(s,new od);var d=this.sharedNodes.get(s);d.add(u),u.promote({transition:(l=u.options.initialPromotionConfig)===null||l===void 0?void 0:l.transition,preserveFollowOpacity:(f=(c=u.options.initialPromotionConfig)===null||c===void 0?void 0:c.shouldPreserveFollowOpacity)===null||f===void 0?void 0:f.call(c,u)})},i.prototype.isLead=function(){var s=this.getStack();return s?s.lead===this:!0},i.prototype.getLead=function(){var s,u=this.options.layoutId;return u?((s=this.getStack())===null||s===void 0?void 0:s.lead)||this:this},i.prototype.getPrevLead=function(){var s,u=this.options.layoutId;return u?(s=this.getStack())===null||s===void 0?void 0:s.prevLead:void 0},i.prototype.getStack=function(){var s=this.options.layoutId;if(s)return this.root.sharedNodes.get(s)},i.prototype.promote=function(s){var u=s===void 0?{}:s,l=u.needsReset,c=u.transition,f=u.preserveFollowOpacity,d=this.getStack();d&&d.promote(this,f),l&&(this.projectionDelta=void 0,this.needsReset=!0),c&&this.setOptions({transition:c})},i.prototype.relegate=function(){var s=this.getStack();return s?s.relegate(this):!1},i.prototype.resetRotation=function(){var s=this.options.visualElement;if(s){for(var u=!1,l={},c=0;c<wn.length;c++){var f=wn[c],d="rotate"+f;s.getStaticValue(d)&&(u=!0,l[d]=s.getStaticValue(d),s.setStaticValue(d,0))}if(u){s==null||s.syncRender();for(var d in l)s.setStaticValue(d,l[d]);s.scheduleRender()}}},i.prototype.getProjectionStyles=function(s){var u,l,c,f,d,p;s===void 0&&(s={});var v={};if(!this.instance||this.isSVG)return v;if(this.isVisible)v.visibility="";else return{visibility:"hidden"};var h=(u=this.options.visualElement)===null||u===void 0?void 0:u.getProps().transformTemplate;if(this.needsReset)return this.needsReset=!1,v.opacity="",v.pointerEvents=Ae(s.pointerEvents)||"",v.transform=h?h(this.latestValues,""):"none",v;var b=this.getLead();if(!this.projectionDelta||!this.layout||!b.target){var g={};return this.options.layoutId&&(g.opacity=(l=this.latestValues.opacity)!==null&&l!==void 0?l:1,g.pointerEvents=Ae(s.pointerEvents)||""),this.hasProjected&&!It(this.latestValues)&&(g.transform=h?h({},""):"none",this.hasProjected=!1),g}var x=b.animationValues||b.latestValues;this.applyTransformsToTarget(),v.transform=Co(this.projectionDeltaWithTransform,this.treeScale,x),h&&(v.transform=h(x,v.transform));var S=this.projectionDelta,_=S.x,T=S.y;v.transformOrigin="".concat(_.origin*100,"% ").concat(T.origin*100,"% 0"),b.animationValues?v.opacity=b===this?(f=(c=x.opacity)!==null&&c!==void 0?c:this.latestValues.opacity)!==null&&f!==void 0?f:1:this.preserveOpacity?this.latestValues.opacity:x.opacityExit:v.opacity=b===this?(d=x.opacity)!==null&&d!==void 0?d:"":(p=x.opacityExit)!==null&&p!==void 0?p:0;for(var C in je)if(x[C]!==void 0){var R=je[C],B=R.correct,V=R.applyTo,N=B(x[C],b);if(V)for(var Y=V.length,k=0;k<Y;k++)v[V[k]]=N;else v[C]=N}return this.options.layoutId&&(v.pointerEvents=b===this?Ae(s.pointerEvents)||"":"none"),v},i.prototype.clearSnapshot=function(){this.resumeFrom=this.snapshot=void 0},i.prototype.resetTree=function(){this.root.nodes.forEach(function(s){var u;return(u=s.currentAnimation)===null||u===void 0?void 0:u.stop()}),this.root.nodes.forEach(Vo),this.root.sharedNodes.clear()},i}()}function ud(t){t.updateLayout()}function ld(t){var e,n,r,o,a=(n=(e=t.resumeFrom)===null||e===void 0?void 0:e.snapshot)!==null&&n!==void 0?n:t.snapshot;if(t.isLead()&&t.layout&&a&&t.hasListeners("didUpdate")){var i=t.layout,s=i.actual,u=i.measured;t.options.animationType==="size"?yt(function(x){var S=a.isShared?a.measured[x]:a.layout[x],_=Ct(S);S.min=s[x].min,S.max=S.min+_}):t.options.animationType==="position"&&yt(function(x){var S=a.isShared?a.measured[x]:a.layout[x],_=Ct(s[x]);S.max=S.min+_});var l=ae();oe(l,s,a.layout);var c=ae();a.isShared?oe(c,t.applyTransform(u,!0),a.measured):oe(c,s,a.layout);var f=!ma(l),d=!1;if(!t.resumeFrom&&(t.relativeParent=t.getClosestProjectingParent(),t.relativeParent&&!t.relativeParent.resumeFrom)){var p=t.relativeParent,v=p.snapshot,h=p.layout;if(v&&h){var b=it();ie(b,a.layout,v.layout);var g=it();ie(g,s,h.actual),ha(b,g)||(d=!0)}}t.notifyListeners("didUpdate",{layout:s,snapshot:a,delta:c,layoutDelta:l,hasLayoutChanged:f,hasRelativeTargetChanged:d})}else t.isLead()&&((o=(r=t.options).onExitComplete)===null||o===void 0||o.call(r));t.options.transition=void 0}function cd(t){t.clearSnapshot()}function Vo(t){t.clearMeasurements()}function fd(t){var e=t.options.visualElement;e!=null&&e.getProps().onBeforeLayoutMeasure&&e.notifyBeforeLayoutMeasure(),t.resetTransform()}function dd(t){t.finishAnimation(),t.targetDelta=t.relativeTarget=t.target=void 0}function vd(t){t.resolveTargetDelta()}function pd(t){t.calcProjection()}function md(t){t.resetRotation()}function hd(t){t.removeLeadSnapshot()}function Io(t,e,n){t.translate=Z(e.translate,0,n),t.scale=Z(e.scale,1,n),t.origin=e.origin,t.originPoint=e.originPoint}function Ao(t,e,n,r){t.min=Z(e.min,n.min,r),t.max=Z(e.max,n.max,r)}function gd(t,e,n,r){Ao(t.x,e.x,n.x,r),Ao(t.y,e.y,n.y,r)}function yd(t){return t.animationValues&&t.animationValues.opacityExit!==void 0}var Sd={duration:.45,ease:[.4,0,.1,1]};function bd(t,e){for(var n=t.root,r=t.path.length-1;r>=0;r--)if(t.path[r].instance){n=t.path[r];break}var o=n&&n!==t.root?n.instance:document,a=o.querySelector('[data-projection-id="'.concat(e,'"]'));a&&t.mount(a,!0)}function Mo(t){t.min=Math.round(t.min),t.max=Math.round(t.max)}function Ro(t){Mo(t.x),Mo(t.y)}var xd=ga({attachResizeListener:function(t,e){return Ke(t,"resize",e)},measureScroll:function(){return{x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}},checkIsScrollRoot:function(){return!0}}),gn={current:void 0},Pd=ga({measureScroll:function(t){return{x:t.scrollLeft,y:t.scrollTop}},defaultParent:function(){if(!gn.current){var t=new xd(0,{});t.mount(window),t.setOptions({layoutScroll:!0}),gn.current=t}return gn.current},resetTransform:function(t,e){t.style.transform=e??"none"},checkIsScrollRoot:function(t){return window.getComputedStyle(t).position==="fixed"}}),_d=P(P(P(P({},rf),xc),Tf),Yf),wd=mu(function(t,e){return tl(t,e,_d,Hf,Pd)});function Td(){var t=!1,e=[],n=new Set,r={subscribe:function(o){return n.add(o),function(){return void n.delete(o)}},start:function(o,a){if(t){var i=[];return n.forEach(function(s){i.push(Qi(s,o,{transitionOverride:a}))}),Promise.all(i)}else return new Promise(function(s){e.push({animation:[o,a],resolve:s})})},set:function(o){return lt(t,"controls.set() should only be called after a component has mounted. Consider calling within a useEffect hook."),n.forEach(function(a){$c(a,o)})},stop:function(){n.forEach(function(o){qc(o)})},mount:function(){return t=!0,e.forEach(function(o){var a=o.animation,i=o.resolve;r.start.apply(r,ft([],Q(a),!1)).then(i)}),function(){t=!1,r.stop()}}};return r}function Cd(){var t=me(Td);return m.useEffect(t.mount,[]),t}var Ed=Cd;const Vd=({onClose:t,threshold:e=.08,children:n})=>{const r=m.useRef(null),o=Ed(),a=(i,s)=>{const u=r.current;if(!u)return;const l=u.getBoundingClientRect().height;s.offset.y>l*e?t():o.start({y:0,transition:{type:"spring",stiffness:300,damping:30}})};return y.jsx(wd.div,{ref:r,style:{height:"100%",width:"100%"},drag:"y",dragConstraints:{top:0},dragMomentum:!1,dragElastic:0,animate:o,initial:{y:0},onDragEnd:a,children:n})},Id=({width:t="100%",height:e="100%",fill:n="white",...r})=>y.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:t,height:e,fill:"none",viewBox:"0 0 24 24",...r,children:y.jsx("path",{fill:n,fillRule:"evenodd",d:"M19.207 6.207a1 1 0 0 0-1.414-1.414L12 10.586 6.207 4.793a1 1 0 0 0-1.414 1.414L10.586 12l-5.793 5.793a1 1 0 1 0 1.414 1.414L12 13.414l5.793 5.793a1 1 0 0 0 1.414-1.414L13.414 12l5.793-5.793z",clipRule:"evenodd"})}),ya=({stories:t,currentIndex:e,onAllStoriesEnd:n,onOverlayClick:r,onStoryChange:o,inline:a,loop:i,onClose:s,className:u=""})=>{const[l,c]=m.useState(0),f=()=>{c(v=>v+1)},d=()=>{n&&n(),i&&f()};if((t==null?void 0:t.length)==0)return y.jsx(y.Fragment,{});const p=a?({children:v})=>v:Vd;return y.jsxs("div",{className:Nt(Et.StoryPlayer,u,{[Et.inline]:a}),children:[y.jsx("div",{className:Et.Overlay,onClick:r}),y.jsx("div",{className:Et.StoryPlayer__Wrap,children:y.jsxs(p,{onClose:s,children:[y.jsx("div",{className:Et.CloseIcon,onClick:s,children:y.jsx(Id,{})}),y.jsx(Ys,{onStoryChange:o,currentIndex:e,stories:t,width:"100%",height:"100%",onAllStoriesEnd:d,classNames:{progressContainer:Et.progressContainer,progressBar:Et.progressBar,progressBarContainer:Et.progressBarContainer}},l)]})})]})},Ad="_story_1f9eg_1",Md="_BetSlip_Wrapper_1f9eg_13",Rd="_BetSlip_ButtonWrap_1f9eg_25",se={story:Ad,BetSlip_Wrapper:Md,BetSlip_ButtonWrap:Rd},jd="es-PE";function Ld(t,e=jd){const n=new Date(t),r=n.toLocaleDateString(e,{day:"2-digit",month:"2-digit"}),o=n.toLocaleTimeString(e,{hour:"2-digit",minute:"2-digit",hour12:!1});return`${r} • ${o}`}class Bd{static fromRaw(e){var i,s,u;const n=((s=(i=e==null?void 0:e.stakes)==null?void 0:i.find(l=>l.isEnabled))==null?void 0:s.preciseValue)??0,r=(u=e==null?void 0:e.selections)==null?void 0:u.map(l=>{var b,g,x,S,_,T;const c=parseFloat((g=(b=l==null?void 0:l.odd)==null?void 0:b.price)==null?void 0:g.toFixed(2)),f=Ld((x=l==null?void 0:l.event)==null?void 0:x.startDate),d=(_=(S=l==null?void 0:l.odd)==null?void 0:S.offers)==null?void 0:_.find(C=>C.type===0),v=l.market.name,h=(T=l==null?void 0:l.bbSelections)==null?void 0:T.map(C=>{var N,Y,k,F,I;const R=(N=C==null?void 0:C.odd)==null?void 0:N.price,B=parseFloat(R.toFixed(2)),V=(k=(Y=C==null?void 0:C.odd)==null?void 0:Y.offers)==null?void 0:k.find(z=>z.type===0);return{marketName:(F=C==null?void 0:C.market)==null?void 0:F.name,name:(I=C==null?void 0:C.odd)==null?void 0:I.name,cuota:B,hasPA:!!V,paParam:V==null?void 0:V.parameter}});return{name:l.odd.name,cuota:c,event:l.event.name,fechaHora:f,hasPA:!!d,paParam:d==null?void 0:d.parameter,marketName:v,subSelections:h}}),o=parseFloat(r==null?void 0:r.reduce((l,c)=>l*(c==null?void 0:c.cuota),1).toFixed(2)),a=parseFloat((n*o).toFixed(2));return{selections:r,stake:n,cuotaTotal:o,gananciaTotal:a}}}const Od="_BetSlip_z8bgq_1",Dd="_BetSlip_Title_z8bgq_14",Nd="_SelectionItemWrap_z8bgq_21",Fd="_BetSlip_ButtonWrap_z8bgq_35",kd="_BetSlip_BtnText_z8bgq_52",Ud="_BetSlip_BtnText__Text_z8bgq_62",Wd="_BetSlip__NextIcon_z8bgq_65",Ot={BetSlip:Od,BetSlip_Title:Dd,SelectionItemWrap:Nd,BetSlip_ButtonWrap:Fd,BetSlip_BtnText:kd,BetSlip_BtnText__Text:Ud,BetSlip__NextIcon:Wd},$d="_SelectionItem_1ut02_1",Hd="_SelectionItemGrid_1ut02_11",zd="_SelectionItem_name_1ut02_17",Gd="_SelectionItem_marketName_1ut02_21",Kd="_SelectionItem_hasPA_1ut02_28",qd="_SelectionItem_fechahora_1ut02_37",Yd="_SelectionItem__Wrap_1ut02_42",Xd="_SelectionItem__BB_1ut02_47",Zd="_SelectionItem__BB__mn_1ut02_80",ut={SelectionItem:$d,SelectionItemGrid:Hd,SelectionItem_name:zd,SelectionItem_marketName:Gd,SelectionItem_hasPA:Kd,SelectionItem_fechahora:qd,SelectionItem__Wrap:Yd,SelectionItem__BB:Xd,SelectionItem__BB__mn:Zd},Jd=({selection:t})=>{var e,n;return y.jsxs("div",{className:ut.SelectionItem,children:[y.jsxs("div",{className:ut.SelectionItemGrid,children:[y.jsx("div",{className:ut.SelectionItem_name,children:t!=null&&t.subSelections?"Crear Apuesta":t.name}),y.jsx("div",{className:ut.SelectionItem_sc,children:t.cuota.toFixed(2)})]}),t!=null&&t.subSelections?null:y.jsx("div",{className:ut.SelectionItemGrid,children:y.jsxs("div",{className:ut.SelectionItem_marketName,children:[y.jsx("div",{children:t.marketName}),t.hasPA&&y.jsx("div",{className:ut.SelectionItem_hasPA,children:"PA"})]})}),y.jsxs("div",{className:ut.SelectionItemGrid,children:[y.jsx("div",{className:ut.SelectionItem_event,children:t.event}),y.jsx("div",{className:ut.SelectionItem_fechahora,children:t.fechaHora})]}),t!=null&&t.subSelections&&((e=t==null?void 0:t.subSelections)==null?void 0:e.length)>0?y.jsx("div",{className:ut.SelectionItem__Wrap,children:(n=t.subSelections)==null?void 0:n.map((r,o)=>y.jsxs("div",{className:ut.SelectionItem__BB,children:[y.jsx("div",{className:ut.SelectionItem__BB__mn,children:r==null?void 0:r.marketName}),y.jsx("div",{children:r==null?void 0:r.name})]},o))}):y.jsx(y.Fragment,{})]})},Qd="_PulseButton_1o75u_1",tv="_PulseButton_BG_1o75u_10",jo={PulseButton:Qd,PulseButton_BG:tv},ev="_Button_hwpwf_1",nv={Button:ev},Sa=({children:t,href:e})=>y.jsxs("div",{className:jo.PulseButton,children:[y.jsx("div",{className:jo.PulseButton_BG}),y.jsx("a",{className:nv.Button,href:e,children:t})]}),rv=({width:t="100%",height:e="100%",fill:n="white",...r})=>y.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:t,height:e,fill:n,...r,children:y.jsx("path",{fill:"#fff",d:"M5.77 1.86A1 1 0 1 0 4.23 3.14l4.47 5.36-4.47 5.36a1 1 0 1 0 1.538 1.28l5-6a1 1 0 0 0 0-1.28l-5-6Z"})}),ov=({slip:t,title:e})=>{var n;return y.jsxs("div",{className:Ot.BetSlip,children:[y.jsxs("div",{className:Ot.SelectionItemWrap,children:[e?y.jsx("div",{className:Ot.BetSlip_Title,children:e}):null,(n=t==null?void 0:t.selections)==null?void 0:n.map((r,o)=>y.jsx(Jd,{selection:r},`${Date.now()}-${o}`))]}),y.jsx("div",{className:Nt(Ot.BetSlip_ButtonWrap),children:y.jsx(Sa,{href:"https://www.apuestatotal.com/apuestas-deportivas/?reservationCode=HHHH",children:y.jsxs("div",{className:Ot.BetSlip_BtnText,children:[y.jsx("div",{className:Ot.BetSlip_BtnText__Text,children:t==null?void 0:t.cuotaTotal}),y.jsx("div",{className:Ot.BetSlip__NextIcon,children:y.jsx(rv,{})})]})})})]})},iv={stakes:[{value:10,type:3,isEnabled:!0,isHighlighted:!1,preciseValue:10,useEachWay:!1}],selections:[{odd:{typeId:2,price:5.5,isMB:!1,oddStatus:0,id:2536330510,name:"Empate",shouldUpdate:!1},event:{liveTime:"30'",lst:"2025-06-12T17:01:07Z",score:[1,0],marketIds:[1052552653,1053189570,1052552650,1052552647,1052552618,1052552652],isBooked:!0,isParlay:!1,offers:[{type:6}],code:281,hasStream:!1,extId:"fp16_bg:match:11876047",sc:205,rc:!1,pId:16,et:0,competitorIds:[86267,93625],sportId:66,catId:602,champId:11347,status:1,startDate:"2025-06-12T17:00:00Z",id:11817354,name:"Motala AIF vs. IFK Kumla FK"},status:0,isBanker:!1,isEnabled:!0,sport:{catIds:[1133,602,544,517,820,717,707,598,561,495,515],typeId:1,iconName:"soccer",hasLiveEvents:!1,id:66,name:"Fútbol"},category:{champIds:[11347,11327],iso:"SWE",hasLiveEvents:!1,id:602,name:"Suecia"},competitors:[{id:86267,name:"Motala AIF"},{id:93625,name:"IFK Kumla FK"}],championship:{offers:[{type:6}],hasLiveEvents:!1,id:11347,name:"Division 2, Norrland",category:{champIds:[11347,11327],iso:"SWE",hasLiveEvents:!1,id:602,name:"Suecia"},sport:{catIds:[1133,602,544,517,820,717,707,598,561,495,515],typeId:1,iconName:"soccer",hasLiveEvents:!1,id:66,name:"Fútbol"}},market:{oddIds:[2536330509,2536330510,2536330511],typeId:1,isMB:!1,sportMarketId:70472,id:1052552653,name:"1x2"},widgetInfo:{widget:26,page:9,tabIndex:null,tipsterId:null}},{odd:{typeId:7,price:5,isMB:!1,oddStatus:0,id:2538213113,name:"Ninguno",shouldUpdate:!1},event:{liveTime:"46'",lst:"2025-06-12T16:45:08Z",score:[4,1],marketIds:[2538213111,1053170209,1050857555,1053149260],isBooked:!0,isParlay:!1,offers:[{type:6}],code:346,hasStream:!1,extId:"fp32_ar:match:283508",sc:343,rc:!1,pId:32,et:0,competitorIds:[48214,48227],sportId:66,catId:602,champId:11347,status:1,startDate:"2025-06-12T16:30:00Z",id:11826451,name:"Tvaakers IF vs. BK Astrio"},status:0,isBanker:!1,isEnabled:!0,sport:{catIds:[1133,602,544,517,820,717,707,598,561,495,515],typeId:1,iconName:"soccer",hasLiveEvents:!1,id:66,name:"Fútbol"},category:{champIds:[11347,11327],iso:"SWE",hasLiveEvents:!1,id:602,name:"Suecia"},competitors:[{id:48214,name:"Tvaakers IF"},{id:48227,name:"BK Astrio"}],championship:{offers:[{type:6}],hasLiveEvents:!1,id:11347,name:"Division 2, Norrland",category:{champIds:[11347,11327],iso:"SWE",hasLiveEvents:!1,id:602,name:"Suecia"},sport:{catIds:[1133,602,544,517,820,717,707,598,561,495,515],typeId:1,iconName:"soccer",hasLiveEvents:!1,id:66,name:"Fútbol"}},market:{oddIds:[2538213111,2538213113,2538213112],isAlt:!0,typeId:1,isMB:!1,sportMarketId:70472,id:2538213111,name:"Sexto gol"},widgetInfo:{widget:26,page:9,tabIndex:null,tipsterId:null}}],betType:1,stakeAdjustment:{type:0,value:0},fullCoverData:{type:1,label:null}},ba=({story:t})=>{let e=Lo;return(t==null?void 0:t.type)=="promo"&&(e=Lo),(t==null?void 0:t.type)=="betting"&&(e=av),y.jsx(e,{story:t})},Lo=({story:t})=>y.jsxs("div",{className:Nt(se.story),children:[y.jsx("img",{src:t==null?void 0:t.image,alt:""}),t!=null&&t.btn_text&&(t!=null&&t.btn_url)?y.jsx("div",{className:Nt(se.BetSlip_Wrapper),children:y.jsx("div",{className:se.BetSlip_ButtonWrap,children:y.jsxs(Sa,{href:t==null?void 0:t.btn_url,children:[" ",t==null?void 0:t.btn_text]})})}):null]}),av=({story:t})=>{const e=iv;return y.jsxs("div",{className:Nt(se.story),children:[y.jsx("img",{src:t==null?void 0:t.image,alt:""}),y.jsx("div",{className:se.BetSlip_Wrapper,children:y.jsx(ov,{slip:Bd.fromRaw(e),title:t==null?void 0:t.coupon_title})})]})},sv="_StoryHeaderPlayer_1oqtd_1",uv="_StoryHeaderPlayer__ProfileStory_1oqtd_18",lv="_StoryHeaderPlayer__title_1oqtd_24",yn={StoryHeaderPlayer:sv,StoryHeaderPlayer__ProfileStory:uv,StoryHeaderPlayer__title:lv},xa=({story:t,onProfileClick:e=()=>null,color:n,image:r})=>y.jsxs("div",{className:yn.StoryHeaderPlayer,children:[y.jsx(Un,{className:yn.StoryHeaderPlayer__ProfileStory,onProfileClick:e,color:n,image:r}),y.jsx("div",{className:yn.StoryHeaderPlayer__title,children:t==null?void 0:t.title})]}),cv=({container:t="HOME"}={})=>{const e="apuestotal-stories-"+t;function n(){const u=localStorage.getItem(e);if(!u)return{};try{const l=JSON.parse(u),c={};for(const f in l)c[f]={seenStoryIds:new Set(l[f].seenStoryIds)};return c}catch(l){return console.warn("No se pudo parsear seenStoriesMap de localStorage:",l),{}}}function r(u){const l={};for(const c in u)l[c]={seenStoryIds:Array.from(u[c].seenStoryIds)};localStorage.setItem(e,JSON.stringify(l))}function o(u,l){const c=n();c[u]||(c[u]={seenStoryIds:new Set}),c[u].seenStoryIds.add(l),r(c)}function a(u){const c=n()[u==null?void 0:u.id];return c?u.stories.every(f=>c.seenStoryIds.has(f==null?void 0:f.id)):!1}function i(u){const c=n()[u.id];if(!c)return 0;for(let f=0;f<u.stories.length;f++)if(!c.seenStoryIds.has(u.stories[f].id))return f;return 0}function s(u){const l=[],c=[];for(const f of u)a(f)?c.push(f):l.push(f);return[...l,...c]}return{markStorySeen:o,hasSeenAllStories:a,getNextUnseenStoryIndex:i,sortProfilesBySeenStatus:s}};function fv(t,e){const n=m.useCallback(()=>{e()},[e]);m.useEffect(()=>{if(!t)return;window.history.pushState({storiesOpen:!0},"");const r=a=>{(a.key==="Escape"||a.key==="Esc")&&n()},o=()=>{n()};return window.addEventListener("keydown",r),window.addEventListener("popstate",o),()=>{window.removeEventListener("keydown",r),window.removeEventListener("popstate",o)}},[t,n])}function dv({scroll:t,targets:e}){const n=m.useRef([]),r=m.useCallback(a=>{n.current.forEach(({el:i,originalOverflow:s})=>{i.style.overflow=s}),n.current=[],a.forEach(i=>{if(typeof i=="string"){const s=document.getElementById(i);s?(n.current.push({target:i,el:s,originalOverflow:s.style.overflow}),s.style.overflow="hidden"):console.warn(`useScrollLock: no se encontró elemento con id "${i}"`)}else i===window||i===document?[document.body,document.documentElement].forEach(s=>{n.current.push({target:i,el:s,originalOverflow:s.style.overflow}),s.style.overflow="hidden"}):console.warn("useScrollLock: target no soportado",i)})},[]),o=m.useCallback(()=>{n.current.forEach(({el:a,originalOverflow:i})=>{a.style.overflow=i}),n.current=[]},[]);return m.useEffect(()=>{switch(t){case"ON":o();break;case"OFF":r(e);break}},[t]),{disableScroll:r,enableScroll:o}}const vv=({className:t="",data:e,isPortal:n=!0})=>{var b;const[r,o]=m.useState(null),a=g=>o(g),{markStorySeen:i,hasSeenAllStories:s,getNextUnseenStoryIndex:u,sortProfilesBySeenStatus:l}=cv(),c=l(e==null?void 0:e.filter(g=>g.stories.length)),f=m.useRef(c);m.useEffect(()=>{f.current=c},[c]);const d=e==null?void 0:e.find(g=>(g==null?void 0:g.id)==r),p=((b=e==null?void 0:e.find(g=>(g==null?void 0:g.id)==r))==null?void 0:b.stories)??[];fv(r,()=>o(null)),dv({targets:[document],scroll:r?"OFF":"ON"});const v=()=>{o(null),f.current=c},h=()=>{if(!r)return null;const g=p.map(S=>({type:"component",component:({pause:_,resume:T,story:C,isPaused:R})=>(i(d==null?void 0:d.id,S.id),y.jsx(ba,{story:S})),duration:S!=null&&S.duration?(S==null?void 0:S.duration)*1e3:7e3,header:()=>y.jsx(xa,{color:d==null?void 0:d.color,image:d==null?void 0:d.avatar,story:S},S==null?void 0:S.id)})),x=y.jsx(ya,{onClose:v,onOverlayClick:v,onStoryChange:S=>{},onAllStoriesEnd:async()=>{var T;const S=f.current.findIndex(C=>C.id==r),_=f.current.filter(C=>C.id!==r);f.current=_,(T=f.current[S])!=null&&T.id?o(f.current[S].id):(o(null),f.current=c)},currentIndex:d?u(d):0,stories:g},r);return n?Pa.createPortal(x,document.body):x};return y.jsxs(y.Fragment,{children:[y.jsx(ds,{wrapperClassName:Nt(Je.ScrollMenu,t),scrollContainerClassName:Je.scrollContainerClassName,itemClassName:Je.itemClassName,children:c.map((g,x)=>y.jsx(Un,{hasSeenAllStories:s(g),onProfileClick:()=>a(g==null?void 0:g.id),color:g==null?void 0:g.color,image:g==null?void 0:g.avatar,title:g==null?void 0:g.name},g==null?void 0:g.id))}),r!=null&&h()]})};exports.ManagmentStoryComponent=ba;exports.ProfileStories=vv;exports.ProfileStory=Un;exports.StoryHeaderPlayer=xa;exports.StoryPlayer=ya;
5
+ */var vr;function ja(){return vr||(vr=1,function(t){(function(){var e={}.hasOwnProperty;function n(){for(var a="",i=0;i<arguments.length;i++){var s=arguments[i];s&&(a=o(a,r(s)))}return a}function r(a){if(typeof a=="string"||typeof a=="number")return a;if(typeof a!="object")return"";if(Array.isArray(a))return n.apply(null,a);if(a.toString!==Object.prototype.toString&&!a.toString.toString().includes("[native code]"))return a.toString();var i="";for(var s in a)e.call(a,s)&&a[s]&&(i=o(i,s));return i}function o(a,i){return i?a?a+" "+i:a+i:a}t.exports?(n.default=n,t.exports=n):window.classNames=n})()}(Qe)),Qe.exports}var Oa=ja();const Bt=Lo(Oa);function La(){const[t,e]=h.useState({width:0,height:0}),n=h.useRef();return[h.useCallback(o=>{n.current&&n.current.disconnect(),o&&(n.current=new ResizeObserver(a=>{const i=a[0];if(!i)return;const{width:s,height:u}=i.contentRect;s&&u&&e({width:s,height:u})}),n.current.observe(o))},[]),t]}var tn,pr;function Da(){return pr||(pr=1,tn={hexToRGB:r=>{let o=r;return o.length===4&&(o=o[0]+o[1]+o[1]+o[2]+o[2]+o[3]+o[3]),{r:parseInt(o.substring(1,3),16),g:parseInt(o.substring(3,5),16),b:parseInt(o.substring(5,7),16)}},formatRGB:({r,g:o,b:a})=>`rgb(${r},${o},${a})`,formatRGBA:({r,g:o,b:a},i)=>`rgba(${r},${o},${a},${i})`}),tn}var en,hr;function Ba(){if(hr)return en;hr=1;const{hexToRGB:t,formatRGB:e,formatRGBA:n}=Da();return en=(o,a)=>{const i=t(o);return typeof a=="number"&&a>=0&&a<=1?n(i,a):e(i)},en}var Na=Ba();const Fa=Lo(Na),$n=({image:t,title:e,color:n,className:r,onProfileClick:o,width:a,hasSeenAllStories:i})=>{const[s,{width:u,height:l}]=La();return y.jsx("div",{ref:s,children:y.jsxs("div",{className:Bt(Ft.ProfileStory,r,{[Ft.hasSeenAllStories]:i}),onClick:o,style:{"--story-color":n,"--story-color-alpha":n&&Fa(n,.7),"--story-width":a??`${u}px`},children:[y.jsx("div",{className:Ft.ProfileStoryWrap,children:y.jsx("div",{className:Ft.ProfileStory__wrapImage,children:y.jsx("div",{className:Ft.ProfileStory__image,children:y.jsx("img",{src:t,alt:"",draggable:!1})})})}),e&&y.jsx("div",{className:Ft.ProfileStory__title,children:e})]})})},jt="react-horizontal-scrolling-menu",ka=`${jt}--item`,Ua=`${jt}--scroll-container`,$a=`${jt}--wrapper`,Ha=`${jt}--inner-wrapper`,Wa=`${jt}--header`,za=`${jt}--arrow-left`,Ga=`${jt}--arrow-right`,Ka=`${jt}--footer`,Ya="itemId",Do="data-key",Bo="data-index",mt={first:"first",last:"last",onInit:"onInit",onUpdate:"onUpdate"},ct="",qa={current:null};let Xa=class{constructor(){this.subscribe=(e,n)=>{this.observers.set(e,(this.observers.get(e)||[]).concat(n))},this.unsubscribe=(e,n)=>{const r=(this.observers.get(e)||[]).filter(o=>o!==n);r.length?this.observers.set(e,r):this.observers.delete(e)},this.emitUpdates=(e,n)=>{const r=this.observers.get(e)||[];r==null||r.forEach(o=>o(n))},this.updateBatch=(e,n=!0)=>{e.length&&(e.forEach(([r,o])=>this.emitUpdates(r,o)),n&&this.emitUpdates(mt.onUpdate))},this.update=(e,n)=>{this.emitUpdates(e,n),this.emitUpdates(mt.onUpdate)},this.observers=new Map}},Za=class extends Map{constructor(){super(),this.subscribe=(e,n)=>this.observer.subscribe(e,n),this.unsubscribe=(e,n)=>this.observer.unsubscribe(e,n),this.isEdgeItem=({key:e,value:n,first:r=this.first(),last:o=this.last()})=>{const a=[];return e===(r==null?void 0:r.key)?a.push([mt.first,n]):e===(o==null?void 0:o.key)&&a.push([mt.last,n]),a},this.edgeItemsCheck=e=>{const n=this.first(),r=this.last(),o=e.find(([s])=>s===(n==null?void 0:n.key)),a=[];o&&a.push([mt.first,o[1]]);const i=e.find(([s])=>s===(r==null?void 0:r.key));return i&&a.push([mt.last,i[1]]),a},this.toArr=()=>this.sort([...this]),this.toItems=()=>this.toArr().map(([e])=>e),this.sort=e=>e.sort(([,n],[,r])=>+n.index-+r.index),this.set=(e,n)=>{const r=String(e),o=[[r,n]];return super.set(r,n),o.push(...this.isEdgeItem({key:r,value:n,first:this.first(),last:this.last()})),this.observer.updateBatch(o),this},this.setBatch=e=>{this.firstRun&&this.observer.update(mt.onInit);const n=[...e];return this.sort(n).forEach(([r,o])=>{super.set(String(r),o)}),n.push(...this.edgeItemsCheck(n)),this.observer.updateBatch(n,!this.firstRun),this.firstRun=!1,this},this.first=()=>{var e;return(e=this.toArr()[0])===null||e===void 0?void 0:e[1]},this.last=()=>{var e,n;return(n=(e=this.toArr().slice(-1))===null||e===void 0?void 0:e[0])===null||n===void 0?void 0:n[1]},this.filter=e=>this.toArr().filter(e),this.find=e=>this.toArr().find(e),this.findIndex=e=>this.toArr().findIndex(e),this.getCurrentPos=e=>{const n=this.toArr(),r=n.findIndex(([o,a])=>o===e||a===e);return[n,r]},this.prev=e=>{var n;const[r,o]=this.getCurrentPos(e);return o!==-1?(n=r[o-1])===null||n===void 0?void 0:n[1]:void 0},this.next=e=>{var n;const[r,o]=this.getCurrentPos(e);return o!==-1?(n=r[o+1])===null||n===void 0?void 0:n[1]:void 0},this.getVisible=()=>this.filter(e=>e[1].visible),this.observer=new Xa,this.firstRun=!0}};const mr=t=>typeof t=="object"&&t!=null&&t.nodeType===1,gr=(t,e)=>(!e||t!=="hidden")&&t!=="visible"&&t!=="clip",nn=(t,e)=>{if(t.clientHeight<t.scrollHeight||t.clientWidth<t.scrollWidth){const n=getComputedStyle(t,null);return gr(n.overflowY,e)||gr(n.overflowX,e)||(r=>{const o=(a=>{if(!a.ownerDocument||!a.ownerDocument.defaultView)return null;try{return a.ownerDocument.defaultView.frameElement}catch{return null}})(r);return!!o&&(o.clientHeight<r.scrollHeight||o.clientWidth<r.scrollWidth)})(t)}return!1},Se=(t,e,n,r,o,a,i,s)=>a<t&&i>e||a>t&&i<e?0:a<=t&&s<=n||i>=e&&s>=n?a-t-r:i>e&&s<n||a<t&&s>n?i-e+o:0,Ja=t=>{const e=t.parentElement;return e??(t.getRootNode().host||null)},yr=(t,e)=>{var n,r,o,a;if(typeof document>"u")return[];const{scrollMode:i,block:s,inline:u,boundary:l,skipOverflowHiddenElements:c}=e,f=typeof l=="function"?l:X=>X!==l;if(!mr(t))throw new TypeError("Invalid target");const d=document.scrollingElement||document.documentElement,p=[];let v=t;for(;mr(v)&&f(v);){if(v=Ja(v),v===d){p.push(v);break}v!=null&&v===document.body&&nn(v)&&!nn(document.documentElement)||v!=null&&nn(v,c)&&p.push(v)}const m=(r=(n=window.visualViewport)==null?void 0:n.width)!=null?r:innerWidth,b=(a=(o=window.visualViewport)==null?void 0:o.height)!=null?a:innerHeight,{scrollX:g,scrollY:x}=window,{height:S,width:w,top:C,right:T,bottom:R,left:L}=t.getBoundingClientRect(),{top:V,right:N,bottom:q,left:k}=(X=>{const I=window.getComputedStyle(X);return{top:parseFloat(I.scrollMarginTop)||0,right:parseFloat(I.scrollMarginRight)||0,bottom:parseFloat(I.scrollMarginBottom)||0,left:parseFloat(I.scrollMarginLeft)||0}})(t);let F=s==="start"||s==="nearest"?C-V:s==="end"?R+q:C+S/2-V+q,A=u==="center"?L+w/2-k+N:u==="end"?T+N:L-k;const z=[];for(let X=0;X<p.length;X++){const I=p[X],{height:nt,width:rt,top:ot,right:U,bottom:Y,left:D}=I.getBoundingClientRect();if(i==="if-needed"&&C>=0&&L>=0&&R<=b&&T<=m&&C>=ot&&R<=Y&&L>=D&&T<=U)return z;const _=getComputedStyle(I),E=parseInt(_.borderLeftWidth,10),O=parseInt(_.borderTopWidth,10),j=parseInt(_.borderRightWidth,10),B=parseInt(_.borderBottomWidth,10);let $=0,tt=0;const et="offsetWidth"in I?I.offsetWidth-I.clientWidth-E-j:0,J="offsetHeight"in I?I.offsetHeight-I.clientHeight-O-B:0,xt="offsetWidth"in I?I.offsetWidth===0?0:rt/I.offsetWidth:0,Yt="offsetHeight"in I?I.offsetHeight===0?0:nt/I.offsetHeight:0;if(d===I)$=s==="start"?F:s==="end"?F-b:s==="nearest"?Se(x,x+b,b,O,B,x+F,x+F+S,S):F-b/2,tt=u==="start"?A:u==="center"?A-m/2:u==="end"?A-m:Se(g,g+m,m,E,j,g+A,g+A+w,w),$=Math.max(0,$+x),tt=Math.max(0,tt+g);else{$=s==="start"?F-ot-O:s==="end"?F-Y+B+J:s==="nearest"?Se(ot,Y,nt,O,B+J,F,F+S,S):F-(ot+nt/2)+J/2,tt=u==="start"?A-D-E:u==="center"?A-(D+rt/2)+et/2:u==="end"?A-U+j+et:Se(D,U,rt,E,j+et,A,A+w,w);const{scrollLeft:qt,scrollTop:Xt}=I;$=Yt===0?0:Math.max(0,Math.min(Xt+$/Yt,I.scrollHeight-nt/Yt+J)),tt=xt===0?0:Math.max(0,Math.min(qt+tt/xt,I.scrollWidth-rt/xt+et)),F+=Xt-$,A+=qt-tt}z.push({el:I,top:$,left:tt})}return z};function Sr(t,e){if(!t.isConnected||!(o=>{let a=o;for(;a&&a.parentNode;){if(a.parentNode===document)return!0;a=a.parentNode instanceof ShadowRoot?a.parentNode.host:a.parentNode}return!1})(t))return;const n=(o=>{const a=window.getComputedStyle(o);return{top:parseFloat(a.scrollMarginTop)||0,right:parseFloat(a.scrollMarginRight)||0,bottom:parseFloat(a.scrollMarginBottom)||0,left:parseFloat(a.scrollMarginLeft)||0}})(t);if((o=>typeof o=="object"&&typeof o.behavior=="function")(e))return e.behavior(yr(t,e));const r=typeof e=="boolean"||e==null?void 0:e.behavior;for(const{el:o,top:a,left:i}of yr(t,(s=>s===!1?{block:"end",inline:"nearest"}:(u=>u===Object(u)&&Object.keys(u).length!==0)(s)?s:{block:"start",inline:"nearest"})(e))){const s=a-n.top+n.bottom,u=i-n.left+n.right;o.scroll({top:s,left:u,behavior:r})}}let rn;const No=()=>(rn||(rn="performance"in window?performance.now.bind(performance):Date.now),rn());function Fo(t){const e=No(),n=Math.min((e-t.startTime)/t.duration,1),r=t.ease(n),o=t.startX+(t.x-t.startX)*r,a=t.startY+(t.y-t.startY)*r;t.method(o,a,n,r),o!==t.x||a!==t.y?requestAnimationFrame(()=>Fo(t)):t.cb()}function Qa(t,e,n){let r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:600,o=arguments.length>4&&arguments[4]!==void 0?arguments[4]:c=>1+--c*c*c*c*c,a=arguments.length>5?arguments[5]:void 0,i=arguments.length>6?arguments[6]:void 0;const s=t,u=t.scrollLeft,l=t.scrollTop;Fo({scrollable:s,method:(c,f,d,p)=>{const v=Math.ceil(c),m=Math.ceil(f);t.scrollLeft=v,t.scrollTop=m,i==null||i({target:t,elapsed:d,value:p,left:v,top:m})},startTime:No(),startX:u,startY:l,x:e,y:n,duration:r,ease:o,cb:a})}const ts=function(t,e){const n=e||{};return(r=>r&&!r.behavior||r.behavior==="smooth")(n)?Sr(t,{block:n.block,inline:n.inline,scrollMode:n.scrollMode,boundary:n.boundary,skipOverflowHiddenElements:n.skipOverflowHiddenElements,behavior:r=>Promise.all(r.reduce((o,a)=>{let{el:i,left:s,top:u}=a;const l=i.scrollLeft,c=i.scrollTop;return l===s&&c===u?o:[...o,new Promise(f=>Qa(i,s,u,n.duration,n.ease,()=>f({el:i,left:[l,s],top:[c,u]}),n.onScrollChange))]},[]))}):Promise.resolve(Sr(t,e))},es=t=>Object.values(t).map(e=>e.current).filter(Boolean);function on(t,e,n,r,o,a){var i;const s=((i=t==null?void 0:t.entry)===null||i===void 0?void 0:i.target)||t;if(!s)return;const u={behavior:e||"smooth",inline:n||"end",block:r||"nearest"};return a?s.scrollIntoView(u):ts(s,Object.assign(Object.assign({},o),u))}const ns=t=>document.querySelector(`[${Do}='${t}']`),rs=t=>document.querySelector(`[${Bo}='${t}']`);function be(t){return h.isValidElement(t)&&t||typeof t=="function"&&h.createElement(t,null)||!!t&&typeof t=="object"&&h.createElement(t,null)||null}const ko=t=>{var e;return String(((e=t==null?void 0:t.props)===null||e===void 0?void 0:e[Ya])||String((t==null?void 0:t.key)||ct).replace(/^\.\$/,ct))};function xn(t){return!!t&&Object.prototype.hasOwnProperty.call(t,"current")}var os=h.memo(function({children:t,className:e,id:n,index:r,refs:o}){const a=h.useRef(null);return o[String(r)]=a,h.createElement("div",{className:e,[Do]:n,[Bo]:r,ref:a},t)});function is({children:t,itemClassName:e=ct,refs:n}){const r=h.Children.toArray(t).filter(Boolean),o=h.useMemo(()=>`${ka} ${e}`,[e]);return r.map((a,i)=>{const s=ko(a);return h.createElement(os,{className:o,id:s,key:s,refs:n,index:i},a)})}function as({className:t=ct,children:e,onScroll:n=()=>{},scrollRef:r,containerRef:o}){const a=h.useMemo(()=>`${Ua} ${t}`,[t]),i=h.useCallback(s=>{xn(r)?r.current=s:r(s),xn(o)?o.current=s:o(s)},[r,o]);return h.createElement("div",{className:a,onScroll:n,ref:i},e)}const ss=h.createContext({}),us=typeof window<"u"?h.useLayoutEffect:h.useEffect;function ls({items:t,itemsChanged:e,refs:n,options:r}){const o=h.useRef(),a=h.useCallback(i=>{t.setBatch(function(s,u){return[...s].map(l=>{var c,f,d,p;const v=l.target,m=String((f=(c=v==null?void 0:v.dataset)===null||c===void 0?void 0:c.key)!==null&&f!==void 0?f:ct);return[m,{index:String((p=(d=v==null?void 0:v.dataset)===null||d===void 0?void 0:d.index)!==null&&p!==void 0?p:ct),key:m,entry:l,visible:l.intersectionRatio>=u.ratio}]})}(i,r))},[t,r]);us(()=>{const i=es(n),s=o.current||new IntersectionObserver(a,r);return o.current=s,i.forEach(u=>s.observe(u)),()=>{s.disconnect(),o.current=void 0}},[a,e,r,n])}const cs=t=>h.Children.toArray(t).map(ko).filter(Boolean),br={ratio:.9,rootMargin:"5px",threshold:[.05,.5,.75,.95]},fs={current:{}},xe=()=>{};function ds({LeftArrow:t,RightArrow:e,children:n,Header:r,Footer:o,transitionDuration:a=500,transitionBehavior:i,onInit:s=xe,onUpdate:u=xe,onMouseDown:l,onMouseLeave:c,onMouseUp:f,onMouseMove:d,onScroll:p=xe,onTouchMove:v,onTouchStart:m,onTouchEnd:b,onWheel:g=xe,options:x=br,scrollContainerClassName:S=ct,containerRef:w=qa,itemClassName:C=ct,wrapperClassName:T=ct,apiRef:R=fs,RTL:L,noPolyfill:V}){const N=be(t),q=be(e),k=be(r),F=be(o),A=h.useRef(null),[z]=h.useState({}),X=h.useMemo(()=>Object.assign(Object.assign(Object.assign({},br),x),{root:A.current}),[x]),I=h.useRef(new Za).current,nt=function(j,B){const[$,tt]=h.useState(ct),et=h.useMemo(()=>cs(j),[j]);return h.useEffect(()=>{const J=et.filter(Boolean).join(ct);B.toItems().filter(xt=>!et.includes(xt)).forEach(xt=>{B.delete(xt)}),tt(J)},[et,B]),$}(n,I);ls(h.useMemo(()=>({items:I,itemsChanged:nt,options:X,refs:z}),[I,nt,z,X]));const rt=h.useMemo(()=>function(j,B,$){var tt,et,J;const xt=!!(!((tt=j.first())===null||tt===void 0)&&tt.visible),Yt=!!(!((et=j.last())===null||et===void 0)&&et.visible),qt=H=>{var G;return(G=j.find(st=>st[1].key===String(H)))===null||G===void 0?void 0:G[1]},Xt=()=>{var H,G;const st=(G=(H=j.getVisible())===null||H===void 0?void 0:H[0])===null||G===void 0?void 0:G[1];return st?j.prev(st):void 0},dr=()=>{var H;const G=(H=j.getVisible().findLast(()=>!0))===null||H===void 0?void 0:H[1];return G?j.next(G):void 0},Ze=(J=B==null?void 0:B.boundary)===null||J===void 0?void 0:J.current;return{getItemById:qt,getItemElementById:ns,getItemByIndex:H=>{var G;return(G=j.find(st=>String(st[1].index)===String(H)))===null||G===void 0?void 0:G[1]},getItemElementByIndex:rs,getNextElement:dr,getPrevElement:Xt,isFirstItemVisible:xt,isItemVisible:H=>j.getVisible().map(G=>G[0]).includes(String(H)),isLastItem:H=>j.last()===qt(H),isLastItemVisible:Yt,scrollNext:(H,G,st,{duration:Pt,boundary:vt=Ze}={})=>{const gt=H??(B==null?void 0:B.behavior);return on(dr(),gt,G||"start",st||"nearest",{boundary:vt,duration:Pt??(B==null?void 0:B.duration)},$)},scrollPrev:(H,G,st,{duration:Pt,boundary:vt=Ze}={})=>{const gt=H??(B==null?void 0:B.behavior);return on(Xt(),gt,G||"end",st||"nearest",{boundary:vt,duration:Pt??(B==null?void 0:B.duration)},$)},useIsVisible:(H,G=!1)=>{const[st,Pt]=h.useState(G),vt=h.useCallback(gt=>{Pt(!!(gt!=null&&gt.visible))},[]);return h.useEffect(()=>(j.subscribe(H,vt),()=>{j.unsubscribe(H,vt)}),[H,vt]),st},scrollToItem:(H,G,st,Pt,vt)=>{var gt;return on(H,G??(B==null?void 0:B.behavior),st,Pt,Object.assign(Object.assign({boundary:Ze},vt),{duration:(gt=vt==null?void 0:vt.duration)!==null&&gt!==void 0?gt:B==null?void 0:B.duration}),$)}}}(I,{duration:a,behavior:i,boundary:A},V),[I,a,i,V]),ot=h.useCallback(()=>Object.assign(Object.assign({},rt),{items:I,scrollContainer:A}),[rt,I,A]),[U,Y]=h.useState(()=>ot());(({context:j,onInit:B,onUpdate:$})=>{const tt=h.useCallback(()=>B(j),[B,j]),et=h.useCallback(()=>$(j),[$,j]),{items:J}=j;h.useEffect(()=>(J.subscribe(mt.onInit,tt),J.subscribe(mt.onUpdate,et),()=>{J.unsubscribe(mt.onInit,tt),J.unsubscribe(mt.onUpdate,et)}),[J,tt,et])})({context:U,onInit:s,onUpdate:u}),h.useEffect(()=>Y(ot()),[ot]),h.useEffect(()=>{xn(R)?R.current=U:R(U)},[U,R]);const D=h.useCallback(j=>p(U,j),[p,U]),_=h.useCallback(j=>g(U,j),[g,U]),E=h.useMemo(()=>`${$a} ${T}`,[T]),O=h.useMemo(()=>`${S}${L?" rtl":ct}`,[L,S]);return h.createElement("div",{className:E,onWheel:_,onMouseDown:l==null?void 0:l(U),onMouseLeave:c==null?void 0:c(U),onMouseUp:f==null?void 0:f(U),onMouseMove:d==null?void 0:d(U),onTouchStart:m==null?void 0:m(U),onTouchMove:v==null?void 0:v(U),onTouchEnd:b==null?void 0:b(U)},h.createElement(ss.Provider,{value:U},h.createElement("div",{className:Wa},k),h.createElement("div",{className:Ha},h.createElement("div",{className:za},N),h.createElement(as,{className:O,onScroll:D,scrollRef:A,containerRef:w},h.createElement(is,{refs:z,itemClassName:C},n)),h.createElement("div",{className:Ga},q)),h.createElement("div",{className:Ka},F)))}const vs="_StoryPlayer_v4m0s_1",ps="_Overlay_v4m0s_15",hs="_StoryPlayer__Wrap_v4m0s_25",ms="_progressContainer_v4m0s_37",gs="_CloseIcon_v4m0s_41",ys="_inline_v4m0s_57",Ss="_progressBarContainer_v4m0s_75",bs="_progressBar_v4m0s_75",Et={StoryPlayer:vs,Overlay:ps,StoryPlayer__Wrap:hs,progressContainer:ms,CloseIcon:gs,inline:ys,progressBarContainer:Ss,progressBar:bs};var K=function(){return K=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var o in e=arguments[n])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t},K.apply(this,arguments)},Uo=h.createContext({stories:[],width:"100%",height:"100%",defaultDuration:1e4,isPaused:!1}),an=Object.freeze({LEFT:"left",RIGHT:"right"}),xs="Actions-styles_left__eky50",Ps="Actions-styles_right__zguoH";function ws(t){var e=t.onNextClick,n=t.onPrevClick,r=t.onPause,o=t.onResume,a=h.useState(!1),i=a[0],s=a[1],u=h.useRef(null);function l(d){d.stopPropagation(),d.preventDefault(),clearTimeout(u.current),u.current=setTimeout(function(){r(),s(!0)},200)}function c(d,p){if(p.stopPropagation(),p.preventDefault(),clearTimeout(u.current),i)return o(),void s(!1);o(),d!=an.LEFT?e():n()}function f(d){return{onMouseUp:function(p){return c(d,p)},onTouchEnd:function(p){return c(d,p)},onTouchStart:function(p){return l(p)},onMouseDown:function(p){return l(p)}}}return y.jsxs(h.Fragment,{children:[y.jsx("div",K({className:xs},f(an.LEFT))),y.jsx("div",K({className:Ps},f(an.RIGHT)))]})}function $e(){return h.useContext(Uo)}var _s="ProgressBar-styles_wrapper__oqUCo",Cs="ProgressBar-styles_bar__x0O50",xr=0,Pr=.1;function Ts(t){var e,n,r,o,a,i=$e(),s=i.defaultDuration,u=i.classNames,l=h.useRef(null),c=h.useRef(null),f=h.useState(!1),d=f[0],p=f[1];return h.useEffect(function(){!t.isPaused&&t.isActive&&t.isActive?p(!0):p(!1)},[t.isActive,t.isPaused]),h.useEffect(function(){var v;l.current&&(t.hasStoryPassed?l.current.style.width="".concat((v=c==null?void 0:c.current)===null||v===void 0?void 0:v.offsetWidth,"px"):l.current.style.width="0px")},[t.hasStoryPassed,t.isActive]),e=function(v){var m;l.current&&c.current&&((xr=Number((l.current.style.width||"1px").slice(0,l.current.style.width.length-2))||0)>c.current.offsetWidth?p(!1):(Pr=((m=c==null?void 0:c.current)===null||m===void 0?void 0:m.offsetWidth)/((t.story.duration||s)/v),l.current.style.width="".concat(xr+Pr,"px")))},n=d,r=h.useRef(),o=h.useRef(),a=h.useRef(e),h.useEffect(function(){a.current=e},[e]),h.useEffect(function(){return n!==!1?(r.current=requestAnimationFrame(function v(m){if(o.current!=null){var b=m-o.current;a.current(b)}o.current=m,r.current=requestAnimationFrame(v)}),function(){cancelAnimationFrame(r.current),r.current=null,o.current=null}):function(){r.current&&(r.current=null),cancelAnimationFrame(r.current),o.current=null}},[n]),y.jsx("div",K({className:"".concat(_s," ").concat((u==null?void 0:u.progressBarContainer)||""),ref:c},{children:y.jsx("div",{className:"".concat(Cs," ").concat((u==null?void 0:u.progressBar)||""),ref:l})}))}var Es="progress-styles_wrapper__qQPyW";function Vs(t){var e=$e(),n=e.stories,r=e.classNames;return y.jsx("div",K({className:"".concat(Es," ").concat((r==null?void 0:r.progressContainer)||""),style:{gridTemplateColumns:"repeat(".concat(n.length,",1fr)")}},{children:n.map(function(o){return y.jsx(Ts,{hasStoryPassed:o.index<t.activeStoryIndex,isActive:o.index===t.activeStoryIndex,story:o,isPaused:o.index===t.activeStoryIndex&&t.isPaused},o.index)})}))}var sn=Object.freeze({IMAGE:"image",VIDEO:"video",COMPONENT:"component"}),As="Story-styles_wrapper__oJP7j",Ms="Story-styles_header__-rnWL",Is="Image-styles_image__gnfW1";function Rs(t){return h.useEffect(function(){t.onPause()},[]),y.jsx("img",{className:Is,src:t.story.url,alt:"story",onLoad:function(){setTimeout(function(){t.onResume()},4)}})}var un,js="Video-styles_video__BykuO",Os="Video-styles_loaderWrapper__TqVWk",Ls="Video-styles_loader__FxxSV",Ds="Video-styles_soundIcon__ZvYXE";function Bs(t){return t.type==="off"?y.jsx("svg",K({xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24",fill:"white"},{children:y.jsx("path",{d:"M3 9v6h-1v-6h1zm13-7l-9 5v2.288l7-3.889v13.202l-7-3.889v2.288l9 5v-20zm-11 5h-5v10h5v-10zm17.324 4.993l1.646-1.659-1.324-1.324-1.651 1.67-1.665-1.648-1.316 1.318 1.67 1.657-1.65 1.669 1.318 1.317 1.658-1.672 1.666 1.653 1.324-1.325-1.676-1.656z"})})):y.jsx("svg",K({xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24",fill:"white"},{children:y.jsx("path",{d:"M22 0v24l-11-6v-2.278l9 4.909v-17.262l-9 4.91v-2.279l11-6zm-13 6v12h-7v-12h7zm-2 2h-3v8h3v-8z"})}))}var Pn="RSIsMute",kt=typeof window>"u"?{}:window;function Ns(t){var e,n=$e().isPaused,r=h.useState(((e=kt==null?void 0:kt.localStorage)===null||e===void 0?void 0:e.getItem(Pn))==="true"),o=r[0],a=r[1],i=h.useState(!1),s=i[0],u=i[1],l=h.useRef(null);function c(f){var d;(d=kt==null?void 0:kt.localStorage)===null||d===void 0||d.setItem(Pn,String(f)),a(f)}return h.useEffect(function(){t.onPause(),u(!0)},[]),h.useEffect(function(){l.current&&(!n||l.current.paused?l.current.play().catch(function(){var f;c(!0),(f=l.current)===null||f===void 0||f.play()}):l.current.pause())},[n]),y.jsxs(h.Fragment,{children:[y.jsxs("video",K({className:js,ref:l,playsInline:!0,"webkit-playsinline":"",controls:!1,src:t.story.url,onLoadedData:function(){setTimeout(function(){t.onResume(),u(!1)},4)},muted:o},{children:[y.jsx("source",{src:t.story.url,type:"video/mp4"}),y.jsx("source",{src:t.story.url,type:"video/webm"}),y.jsx("source",{src:t.story.url,type:"video/ogg"}),y.jsx("p",{children:"Video not supported"})]})),y.jsx("div",K({className:Ds,onClick:function(){return c(!o)}},{children:y.jsx(Bs,{type:o?"off":"on"})})),s&&y.jsx("div",K({className:Os},{children:y.jsx("div",{className:Ls})}))]})}(un=kt==null?void 0:kt.localStorage)===null||un===void 0||un.setItem(Pn,"true");var Fs="CustomComponents-styles_component__w87Wx";function ks(t){return y.jsx("div",K({className:Fs},{children:y.jsx(t.story.component,{pause:t.onPause,resume:t.onResume,story:t.story,isPaused:t.isPaused})}))}var Us="SeeMore-styles_seeMoreWrapper__kwjif",$s="SeeMore-styles_defaultSeeMore__-B1QW";function Hs(t){return t.story.seeMore?y.jsx("button",K({type:"button",onClick:function(){t.onSeeMoreClick()},className:Us},{children:function(){var e=t.story.seeMore,n=typeof e;if(["string","boolean"].includes(n)){var r=n==="string"?e:"See More";return y.jsxs("div",K({className:$s},{children:[y.jsx("span",{children:"^"}),y.jsx("p",{children:r})]}))}return n==="function"?y.jsx(t.story.seeMore,{}):t.story.seeMore}()})):null}var Ws="SeeMoreComponent-styles_seeMoreComponentWrapper__0T6Ap",zs="SeeMoreComponent-styles_closeIcon__LMm3b";function Gs(t){return t.story.seeMore&&t.story.seeMoreComponent?y.jsxs("div",K({className:Ws},{children:[y.jsx("button",K({className:zs,onClick:t.onClose},{children:"✕"})),typeof t.story.seeMoreComponent=="function"?y.jsx(t.story.seeMoreComponent,{}):t.story.seeMoreComponent]})):null}function Ks(t){var e=h.useState(!1),n=e[0],r=e[1],o=$e().classNames;return h.useEffect(function(){r(!1)},[t.story]),y.jsxs("div",K({className:"".concat(As," ").concat((o==null?void 0:o.storyContainer)||"")},{children:[t.story.type===sn.IMAGE?y.jsx(Rs,K({},t)):t.story.type===sn.VIDEO?y.jsx(Ns,K({},t)):t.story.type===sn.COMPONENT?y.jsx(ks,K({},t)):null,t.story.header&&y.jsx("div",K({className:Ms},{children:typeof t.story.header=="function"?y.jsx(t.story.header,{}):t.story.header})),y.jsx(Hs,{onSeeMoreClick:function(){var a,i;t.onPause(),r(!0),(i=(a=t.story).onSeeMoreClick)===null||i===void 0||i.call(a,t.story.index)},story:t.story}),n&&y.jsx(Gs,{story:t.story,onClose:function(){t.onResume(),r(!1)}})]}))}var Ys="styles_main__-0FEu";function wr(t){return t===void 0&&(t=4),Number(Math.random().toFixed(t))}function qs(t){var e,n,r,o,a,i,s,u=t.stories,l=u===void 0?[]:u,c=t.width,f=c===void 0?"100%":c,d=t.height,p=d===void 0?"100%":d,v=t.onStoryChange,m=v===void 0?function(){}:v,b=t.currentIndex,g=b===void 0?0:b,x=t.defaultDuration,S=x===void 0?1e4:x,w=t.onAllStoriesEnd,C=w===void 0?function(){}:w,T=t.onStoriesStart,R=T===void 0?function(){}:T,L=t.classNames,V=L===void 0?{}:L,N=t.pauseStoryWhenInActiveWindow,q=N===void 0||N,k=h.useMemo(function(){return function(O,j){var B=0;return O.map(function($,tt){var et=$.duration||j,J=et+wr();return J===B&&(J=et+wr(6)),B=J,K(K({},$),{index:tt,calculatedDuration:J})})}(l,S)},[l,S]),F=h.useState(),A=F[0],z=F[1],X=l.length-1,I=h.useState(!1),nt=I[0],rt=I[1],ot=h.useRef(!1),U=h.useRef(!1);function Y(){ot.current||(A==null?void 0:A.index)!==X||(C(),ot.current=!0),(A==null?void 0:A.index)!==X&&z(function(O){if(!O)return k[0];var j=(O==null?void 0:O.index)+1;return k[j]})}function D(){rt(!0)}function _(){rt(!1)}h.useEffect(function(){U.current||(U.current=!0,R())},[R]),h.useEffect(function(){var O=k[g];O&&z(O)},[g,l]),h.useEffect(function(){A&&m(A.index)},[A]),n=function(){Y()},r=(e=A==null?void 0:A.calculatedDuration)!==null&&e!==void 0?e:null,o=nt,a=h.useRef(),i=h.useRef(r),s=h.useRef(Date.now()),h.useEffect(function(){a.current=n},[n]),h.useEffect(function(){i.current=r},[r]),h.useEffect(function(){if(r!==null&&o===!1){s.current=Date.now();var O=setTimeout(function(){a.current()},i.current);return function(){clearTimeout(O)}}return function(){}},[r,o]),h.useEffect(function(){o&&(i.current=i.current-(Date.now()-s.current))},[o]),function(O){var j=h.useRef(O);h.useEffect(function(){j.current=O},[O]),h.useEffect(function(){function B(){j.current(!0)}function $(){j.current(!1)}return window.addEventListener("focus",B),window.addEventListener("blur",$),function(){window.removeEventListener("focus",B),window.removeEventListener("blur",$)}},[])}(function(O){q&&rt(!O)});var E={stories:k,width:f,height:p,defaultDuration:S,isPaused:nt,classNames:V};return A?y.jsx(Uo.Provider,K({value:E},{children:y.jsxs("div",K({className:"".concat(Ys," ").concat(V.main||""),style:{width:f,height:p}},{children:[y.jsx(Vs,{activeStoryIndex:A.index,isPaused:nt}),y.jsx(Ks,{onPause:D,onResume:_,story:A,isPaused:nt},A.index),y.jsx(ws,{onNextClick:Y,onPrevClick:function(){(A==null?void 0:A.index)!==0&&z(function(O){if(!O)return k[0];var j=(O==null?void 0:O.index)-1;return k[j]})},onPause:D,onResume:_})]}))})):null}var wn=function(t,e){return wn=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,r){n.__proto__=r}||function(n,r){for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(n[o]=r[o])},wn(t,e)};function $o(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");wn(t,e);function n(){this.constructor=t}t.prototype=e===null?Object.create(e):(n.prototype=e.prototype,new n)}var P=function(){return P=Object.assign||function(e){for(var n,r=1,o=arguments.length;r<o;r++){n=arguments[r];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e},P.apply(this,arguments)};function dt(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,r=Object.getOwnPropertySymbols(t);o<r.length;o++)e.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(t,r[o])&&(n[r[o]]=t[r[o]]);return n}function Q(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var r=n.call(t),o,a=[],i;try{for(;(e===void 0||e-- >0)&&!(o=r.next()).done;)a.push(o.value)}catch(s){i={error:s}}finally{try{o&&!o.done&&(n=r.return)&&n.call(r)}finally{if(i)throw i.error}}return a}function ft(t,e,n){if(n||arguments.length===2)for(var r=0,o=e.length,a;r<o;r++)(a||!(r in e))&&(a||(a=Array.prototype.slice.call(e,0,r)),a[r]=e[r]);return t.concat(a||Array.prototype.slice.call(e))}var _r="production",Ho=typeof process>"u"||process.env===void 0?_r:process.env.NODE_ENV||_r,wt=function(t){return{isEnabled:function(e){return t.some(function(n){return!!e[n]})}}},se={measureLayout:wt(["layout","layoutId","drag"]),animation:wt(["animate","exit","variants","whileHover","whileTap","whileFocus","whileDrag","whileInView"]),exit:wt(["exit"]),drag:wt(["drag","dragControls"]),focus:wt(["whileFocus"]),hover:wt(["whileHover","onHoverStart","onHoverEnd"]),tap:wt(["whileTap","onTap","onTapStart","onTapCancel"]),pan:wt(["onPan","onPanStart","onPanSessionStart","onPanEnd"]),inView:wt(["whileInView","onViewportEnter","onViewportLeave"])};function Xs(t){for(var e in t)t[e]!==null&&(e==="projectionNodeConstructor"?se.projectionNodeConstructor=t[e]:se[e].Component=t[e])}var ve=function(){},lt=function(){};process.env.NODE_ENV!=="production"&&(ve=function(t,e){!t&&typeof console<"u"&&console.warn(e)},lt=function(t,e){if(!t)throw new Error(e)});var Wo=h.createContext({strict:!1}),zo=Object.keys(se),Zs=zo.length;function Js(t,e,n){var r=[],o=h.useContext(Wo);if(!e)return null;Ho!=="production"&&n&&o.strict&&lt(!1,"You have rendered a `motion` component within a `LazyMotion` component. This will break tree shaking. Import and render a `m` component instead.");for(var a=0;a<Zs;a++){var i=zo[a],s=se[i],u=s.isEnabled,l=s.Component;u(t)&&l&&r.push(bn.createElement(l,P({key:i},t,{visualElement:e})))}return r}var Hn=h.createContext({transformPagePoint:function(t){return t},isStatic:!1,reducedMotion:"never"}),He=h.createContext({});function Qs(){return h.useContext(He).visualElement}var We=h.createContext(null),Kt=typeof document<"u",Cr=Kt?h.useLayoutEffect:h.useEffect,_n={current:null},Go=!1;function tu(){if(Go=!0,!!Kt)if(window.matchMedia){var t=window.matchMedia("(prefers-reduced-motion)"),e=function(){return _n.current=t.matches};t.addListener(e),e()}else _n.current=!1}function eu(){!Go&&tu();var t=Q(h.useState(_n.current),1),e=t[0];return e}function nu(){var t=eu(),e=h.useContext(Hn).reducedMotion;return e==="never"?!1:e==="always"?!0:t}function ru(t,e,n,r){var o=h.useContext(Wo),a=Qs(),i=h.useContext(We),s=nu(),u=h.useRef(void 0);r||(r=o.renderer),!u.current&&r&&(u.current=r(t,{visualState:e,parent:a,props:n,presenceId:i==null?void 0:i.id,blockInitialAnimation:(i==null?void 0:i.initial)===!1,shouldReduceMotion:s}));var l=u.current;return Cr(function(){l==null||l.syncRender()}),h.useEffect(function(){var c;(c=l==null?void 0:l.animationState)===null||c===void 0||c.animateChanges()}),Cr(function(){return function(){return l==null?void 0:l.notifyUnmount()}},[]),l}function Ut(t){return typeof t=="object"&&Object.prototype.hasOwnProperty.call(t,"current")}function ou(t,e,n){return h.useCallback(function(r){var o;r&&((o=t.mount)===null||o===void 0||o.call(t,r)),e&&(r?e.mount(r):e.unmount()),n&&(typeof n=="function"?n(r):Ut(n)&&(n.current=r))},[e])}function Ko(t){return Array.isArray(t)}function ht(t){return typeof t=="string"||Ko(t)}function iu(t){var e={};return t.forEachValue(function(n,r){return e[r]=n.get()}),e}function au(t){var e={};return t.forEachValue(function(n,r){return e[r]=n.getVelocity()}),e}function Yo(t,e,n,r,o){var a;return r===void 0&&(r={}),o===void 0&&(o={}),typeof e=="function"&&(e=e(n??t.custom,r,o)),typeof e=="string"&&(e=(a=t.variants)===null||a===void 0?void 0:a[e]),typeof e=="function"&&(e=e(n??t.custom,r,o)),e}function ze(t,e,n){var r=t.getProps();return Yo(r,e,n??r.custom,iu(t),au(t))}function Ge(t){var e;return typeof((e=t.animate)===null||e===void 0?void 0:e.start)=="function"||ht(t.initial)||ht(t.animate)||ht(t.whileHover)||ht(t.whileDrag)||ht(t.whileTap)||ht(t.whileFocus)||ht(t.exit)}function qo(t){return!!(Ge(t)||t.variants)}function su(t,e){if(Ge(t)){var n=t.initial,r=t.animate;return{initial:n===!1||ht(n)?n:void 0,animate:ht(r)?r:void 0}}return t.inherit!==!1?e:{}}function uu(t){var e=su(t,h.useContext(He)),n=e.initial,r=e.animate;return h.useMemo(function(){return{initial:n,animate:r}},[Tr(n),Tr(r)])}function Tr(t){return Array.isArray(t)?t.join(" "):t}function pe(t){var e=h.useRef(null);return e.current===null&&(e.current=t()),e.current}var Qt={hasAnimatedSinceResize:!0,hasEverUpdated:!1},lu=1;function cu(){return pe(function(){if(Qt.hasEverUpdated)return lu++})}var Xo=h.createContext({}),Zo=h.createContext({});function fu(t,e,n,r){var o,a=e.layoutId,i=e.layout,s=e.drag,u=e.dragConstraints,l=e.layoutScroll,c=h.useContext(Zo);!r||!n||n!=null&&n.projection||(n.projection=new r(t,n.getLatestValues(),(o=n.parent)===null||o===void 0?void 0:o.projection),n.projection.setOptions({layoutId:a,layout:i,alwaysMeasureLayout:!!s||u&&Ut(u),visualElement:n,scheduleRender:function(){return n.scheduleRender()},animationType:typeof i=="string"?i:"both",initialPromotionConfig:c,layoutScroll:l}))}var du=function(t){$o(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.getSnapshotBeforeUpdate=function(){return this.updateProps(),null},e.prototype.componentDidUpdate=function(){},e.prototype.updateProps=function(){var n=this.props,r=n.visualElement,o=n.props;r&&r.setProps(o)},e.prototype.render=function(){return this.props.children},e}(h.Component);function vu(t){var e=t.preloadedFeatures,n=t.createVisualElement,r=t.projectionNodeConstructor,o=t.useRender,a=t.useVisualState,i=t.Component;e&&Xs(e);function s(u,l){var c=pu(u);u=P(P({},u),{layoutId:c});var f=h.useContext(Hn),d=null,p=uu(u),v=f.isStatic?void 0:cu(),m=a(u,f.isStatic);return!f.isStatic&&Kt&&(p.visualElement=ru(i,m,P(P({},f),u),n),fu(v,u,p.visualElement,r||se.projectionNodeConstructor),d=Js(u,p.visualElement,e)),bn.createElement(du,{visualElement:p.visualElement,props:P(P({},f),u)},d,bn.createElement(He.Provider,{value:p},o(i,u,v,ou(m,p.visualElement,l),m,f.isStatic,p.visualElement)))}return h.forwardRef(s)}function pu(t){var e,n=t.layoutId,r=(e=h.useContext(Xo))===null||e===void 0?void 0:e.id;return r&&n!==void 0?r+"-"+n:n}function hu(t){function e(r,o){return o===void 0&&(o={}),vu(t(r,o))}if(typeof Proxy>"u")return e;var n=new Map;return new Proxy(e,{get:function(r,o){return n.has(o)||n.set(o,e(o)),n.get(o)}})}var mu=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","svg","switch","symbol","text","tspan","use","view"];function Wn(t){return typeof t!="string"||t.includes("-")?!1:!!(mu.indexOf(t)>-1||/[A-Z]/.test(t))}var je={};function gu(t){Object.assign(je,t)}var Cn=["","X","Y","Z"],yu=["translate","scale","rotate","skew"],ue=["transformPerspective","x","y","z"];yu.forEach(function(t){return Cn.forEach(function(e){return ue.push(t+e)})});function Su(t,e){return ue.indexOf(t)-ue.indexOf(e)}var bu=new Set(ue);function he(t){return bu.has(t)}var xu=new Set(["originX","originY","originZ"]);function Jo(t){return xu.has(t)}function Qo(t,e){var n=e.layout,r=e.layoutId;return he(t)||Jo(t)||(n||r!==void 0)&&(!!je[t]||t==="opacity")}var _t=function(t){return!!(t!==null&&typeof t=="object"&&t.getVelocity)},Pu={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"};function wu(t,e,n,r){var o=t.transform,a=t.transformKeys,i=e.enableHardwareAcceleration,s=i===void 0?!0:i,u=e.allowTransformNone,l=u===void 0?!0:u,c="";a.sort(Su);for(var f=!1,d=a.length,p=0;p<d;p++){var v=a[p];c+="".concat(Pu[v]||v,"(").concat(o[v],") "),v==="z"&&(f=!0)}return!f&&s?c+="translateZ(0)":c=c.trim(),r?c=r(o,n?"":c):l&&n&&(c="none"),c}function _u(t){var e=t.originX,n=e===void 0?"50%":e,r=t.originY,o=r===void 0?"50%":r,a=t.originZ,i=a===void 0?0:a;return"".concat(n," ").concat(o," ").concat(i)}function ti(t){return t.startsWith("--")}var Cu=function(t,e){return e&&typeof t=="number"?e.transform(t):t};const ei=(t,e)=>n=>Math.max(Math.min(n,e),t),te=t=>t%1?Number(t.toFixed(5)):t,le=/(-)?([\d]*\.?[\d])+/g,Tn=/(#[0-9a-f]{6}|#[0-9a-f]{3}|#(?:[0-9a-f]{2}){2,4}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2,3}\s*\/*\s*[\d\.]+%?\))/gi,Tu=/^(#[0-9a-f]{3}|#(?:[0-9a-f]{2}){2,4}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2,3}\s*\/*\s*[\d\.]+%?\))$/i;function me(t){return typeof t=="string"}const Nt={test:t=>typeof t=="number",parse:parseFloat,transform:t=>t},ee=Object.assign(Object.assign({},Nt),{transform:ei(0,1)}),Pe=Object.assign(Object.assign({},Nt),{default:1}),ge=t=>({test:e=>me(e)&&e.endsWith(t)&&e.split(" ").length===1,parse:parseFloat,transform:e=>`${e}${t}`}),Vt=ge("deg"),St=ge("%"),M=ge("px"),Eu=ge("vh"),Vu=ge("vw"),Er=Object.assign(Object.assign({},St),{parse:t=>St.parse(t)/100,transform:t=>St.transform(t*100)}),zn=(t,e)=>n=>!!(me(n)&&Tu.test(n)&&n.startsWith(t)||e&&Object.prototype.hasOwnProperty.call(n,e)),ni=(t,e,n)=>r=>{if(!me(r))return r;const[o,a,i,s]=r.match(le);return{[t]:parseFloat(o),[e]:parseFloat(a),[n]:parseFloat(i),alpha:s!==void 0?parseFloat(s):1}},Dt={test:zn("hsl","hue"),parse:ni("hue","saturation","lightness"),transform:({hue:t,saturation:e,lightness:n,alpha:r=1})=>"hsla("+Math.round(t)+", "+St.transform(te(e))+", "+St.transform(te(n))+", "+te(ee.transform(r))+")"},Au=ei(0,255),ln=Object.assign(Object.assign({},Nt),{transform:t=>Math.round(Au(t))}),It={test:zn("rgb","red"),parse:ni("red","green","blue"),transform:({red:t,green:e,blue:n,alpha:r=1})=>"rgba("+ln.transform(t)+", "+ln.transform(e)+", "+ln.transform(n)+", "+te(ee.transform(r))+")"};function Mu(t){let e="",n="",r="",o="";return t.length>5?(e=t.substr(1,2),n=t.substr(3,2),r=t.substr(5,2),o=t.substr(7,2)):(e=t.substr(1,1),n=t.substr(2,1),r=t.substr(3,1),o=t.substr(4,1),e+=e,n+=n,r+=r,o+=o),{red:parseInt(e,16),green:parseInt(n,16),blue:parseInt(r,16),alpha:o?parseInt(o,16)/255:1}}const En={test:zn("#"),parse:Mu,transform:It.transform},at={test:t=>It.test(t)||En.test(t)||Dt.test(t),parse:t=>It.test(t)?It.parse(t):Dt.test(t)?Dt.parse(t):En.parse(t),transform:t=>me(t)?t:t.hasOwnProperty("red")?It.transform(t):Dt.transform(t)},ri="${c}",oi="${n}";function Iu(t){var e,n,r,o;return isNaN(t)&&me(t)&&((n=(e=t.match(le))===null||e===void 0?void 0:e.length)!==null&&n!==void 0?n:0)+((o=(r=t.match(Tn))===null||r===void 0?void 0:r.length)!==null&&o!==void 0?o:0)>0}function ii(t){typeof t=="number"&&(t=`${t}`);const e=[];let n=0;const r=t.match(Tn);r&&(n=r.length,t=t.replace(Tn,ri),e.push(...r.map(at.parse)));const o=t.match(le);return o&&(t=t.replace(le,oi),e.push(...o.map(Nt.parse))),{values:e,numColors:n,tokenised:t}}function ai(t){return ii(t).values}function si(t){const{values:e,numColors:n,tokenised:r}=ii(t),o=e.length;return a=>{let i=r;for(let s=0;s<o;s++)i=i.replace(s<n?ri:oi,s<n?at.transform(a[s]):te(a[s]));return i}}const Ru=t=>typeof t=="number"?0:t;function ju(t){const e=ai(t);return si(t)(e.map(Ru))}const Ct={test:Iu,parse:ai,createTransformer:si,getAnimatableNone:ju},Ou=new Set(["brightness","contrast","saturate","opacity"]);function Lu(t){let[e,n]=t.slice(0,-1).split("(");if(e==="drop-shadow")return t;const[r]=n.match(le)||[];if(!r)return t;const o=n.replace(r,"");let a=Ou.has(e)?1:0;return r!==n&&(a*=100),e+"("+a+o+")"}const Du=/([a-z-]*)\(.*?\)/g,Vn=Object.assign(Object.assign({},Ct),{getAnimatableNone:t=>{const e=t.match(Du);return e?e.map(Lu).join(" "):t}});var Vr=P(P({},Nt),{transform:Math.round}),ui={borderWidth:M,borderTopWidth:M,borderRightWidth:M,borderBottomWidth:M,borderLeftWidth:M,borderRadius:M,radius:M,borderTopLeftRadius:M,borderTopRightRadius:M,borderBottomRightRadius:M,borderBottomLeftRadius:M,width:M,maxWidth:M,height:M,maxHeight:M,size:M,top:M,right:M,bottom:M,left:M,padding:M,paddingTop:M,paddingRight:M,paddingBottom:M,paddingLeft:M,margin:M,marginTop:M,marginRight:M,marginBottom:M,marginLeft:M,rotate:Vt,rotateX:Vt,rotateY:Vt,rotateZ:Vt,scale:Pe,scaleX:Pe,scaleY:Pe,scaleZ:Pe,skew:Vt,skewX:Vt,skewY:Vt,distance:M,translateX:M,translateY:M,translateZ:M,x:M,y:M,z:M,perspective:M,transformPerspective:M,opacity:ee,originX:Er,originY:Er,originZ:M,zIndex:Vr,fillOpacity:ee,strokeOpacity:ee,numOctaves:Vr};function Gn(t,e,n,r){var o,a=t.style,i=t.vars,s=t.transform,u=t.transformKeys,l=t.transformOrigin;u.length=0;var c=!1,f=!1,d=!0;for(var p in e){var v=e[p];if(ti(p)){i[p]=v;continue}var m=ui[p],b=Cu(v,m);if(he(p)){if(c=!0,s[p]=b,u.push(p),!d)continue;v!==((o=m.default)!==null&&o!==void 0?o:0)&&(d=!1)}else Jo(p)?(l[p]=b,f=!0):a[p]=b}c?a.transform=wu(t,n,d,r):r?a.transform=r({},""):!e.transform&&a.transform&&(a.transform="none"),f&&(a.transformOrigin=_u(l))}var Kn=function(){return{style:{},transform:{},transformKeys:[],transformOrigin:{},vars:{}}};function li(t,e,n){for(var r in e)!_t(e[r])&&!Qo(r,n)&&(t[r]=e[r])}function Bu(t,e,n){var r=t.transformTemplate;return h.useMemo(function(){var o=Kn();Gn(o,e,{enableHardwareAcceleration:!n},r);var a=o.vars,i=o.style;return P(P({},a),i)},[e])}function Nu(t,e,n){var r=t.style||{},o={};return li(o,r,t),Object.assign(o,Bu(t,e,n)),t.transformValues&&(o=t.transformValues(o)),o}function Fu(t,e,n){var r={},o=Nu(t,e,n);return t.drag&&t.dragListener!==!1&&(r.draggable=!1,o.userSelect=o.WebkitUserSelect=o.WebkitTouchCallout="none",o.touchAction=t.drag===!0?"none":"pan-".concat(t.drag==="x"?"y":"x")),r.style=o,r}var ku=new Set(["initial","animate","exit","style","variants","transition","transformTemplate","transformValues","custom","inherit","layout","layoutId","layoutDependency","onLayoutAnimationStart","onLayoutAnimationComplete","onLayoutMeasure","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","drag","dragControls","dragListener","dragConstraints","dragDirectionLock","dragSnapToOrigin","_dragX","_dragY","dragElastic","dragMomentum","dragPropagation","dragTransition","whileDrag","onPan","onPanStart","onPanEnd","onPanSessionStart","onTap","onTapStart","onTapCancel","onHoverStart","onHoverEnd","whileFocus","whileTap","whileHover","whileInView","onViewportEnter","onViewportLeave","viewport","layoutScroll"]);function Oe(t){return ku.has(t)}var ci=function(t){return!Oe(t)};function Uu(t){t&&(ci=function(e){return e.startsWith("on")?!Oe(e):t(e)})}try{Uu(require("@emotion/is-prop-valid").default)}catch{}function $u(t,e,n){var r={};for(var o in t)(ci(o)||n===!0&&Oe(o)||!e&&!Oe(o)||t.draggable&&o.startsWith("onDrag"))&&(r[o]=t[o]);return r}function Ar(t,e,n){return typeof t=="string"?t:M.transform(e+n*t)}function Hu(t,e,n){var r=Ar(e,t.x,t.width),o=Ar(n,t.y,t.height);return"".concat(r," ").concat(o)}var Wu={offset:"strokeDashoffset",array:"strokeDasharray"};function zu(t,e,n,r,o){n===void 0&&(n=1),r===void 0&&(r=0),t.pathLength=1;var a=Wu;t[a.offset]=M.transform(-r);var i=M.transform(e),s=M.transform(n);t[a.array]="".concat(i," ").concat(s)}function Yn(t,e,n,r){var o=e.attrX,a=e.attrY,i=e.originX,s=e.originY,u=e.pathLength,l=e.pathSpacing,c=l===void 0?1:l,f=e.pathOffset,d=f===void 0?0:f,p=dt(e,["attrX","attrY","originX","originY","pathLength","pathSpacing","pathOffset"]);Gn(t,p,n,r),t.attrs=t.style,t.style={};var v=t.attrs,m=t.style,b=t.dimensions;v.transform&&(b&&(m.transform=v.transform),delete v.transform),b&&(i!==void 0||s!==void 0||m.transform)&&(m.transformOrigin=Hu(b,i!==void 0?i:.5,s!==void 0?s:.5)),o!==void 0&&(v.x=o),a!==void 0&&(v.y=a),u!==void 0&&zu(v,u,c,d)}var fi=function(){return P(P({},Kn()),{attrs:{}})};function Gu(t,e){var n=h.useMemo(function(){var o=fi();return Yn(o,e,{enableHardwareAcceleration:!1},t.transformTemplate),P(P({},o.attrs),{style:P({},o.style)})},[e]);if(t.style){var r={};li(r,t.style,t),n.style=P(P({},r),n.style)}return n}function Ku(t){t===void 0&&(t=!1);var e=function(n,r,o,a,i,s){var u=i.latestValues,l=Wn(n)?Gu:Fu,c=l(r,u,s),f=$u(r,typeof n=="string",t),d=P(P(P({},f),c),{ref:a});return o&&(d["data-projection-id"]=o),h.createElement(n,d)};return e}var Yu=/([a-z])([A-Z])/g,qu="$1-$2",di=function(t){return t.replace(Yu,qu).toLowerCase()};function vi(t,e,n,r){var o=e.style,a=e.vars;Object.assign(t.style,o,r&&r.getProjectionStyles(n));for(var i in a)t.style.setProperty(i,a[i])}var pi=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength"]);function hi(t,e,n,r){vi(t,e,void 0,r);for(var o in e.attrs)t.setAttribute(pi.has(o)?o:di(o),e.attrs[o])}function qn(t){var e=t.style,n={};for(var r in e)(_t(e[r])||Qo(r,t))&&(n[r]=e[r]);return n}function mi(t){var e=qn(t);for(var n in t)if(_t(t[n])){var r=n==="x"||n==="y"?"attr"+n.toUpperCase():n;e[r]=t[n]}return e}function Xn(t){return typeof t=="object"&&typeof t.start=="function"}var ce=function(t){return Array.isArray(t)},Xu=function(t){return!!(t&&typeof t=="object"&&t.mix&&t.toValue)},gi=function(t){return ce(t)?t[t.length-1]||0:t};function Me(t){var e=_t(t)?t.get():t;return Xu(e)?e.toValue():e}function Mr(t,e,n,r){var o=t.scrapeMotionValuesFromProps,a=t.createRenderState,i=t.onMount,s={latestValues:Zu(e,n,r,o),renderState:a()};return i&&(s.mount=function(u){return i(e,u,s)}),s}var yi=function(t){return function(e,n){var r=h.useContext(He),o=h.useContext(We);return n?Mr(t,e,r,o):pe(function(){return Mr(t,e,r,o)})}};function Zu(t,e,n,r){var o={},a=(n==null?void 0:n.initial)===!1,i=r(t);for(var s in i)o[s]=Me(i[s]);var u=t.initial,l=t.animate,c=Ge(t),f=qo(t);e&&f&&!c&&t.inherit!==!1&&(u??(u=e.initial),l??(l=e.animate));var d=a||u===!1,p=d?l:u;if(p&&typeof p!="boolean"&&!Xn(p)){var v=Array.isArray(p)?p:[p];v.forEach(function(m){var b=Yo(t,m);if(b){var g=b.transitionEnd;b.transition;var x=dt(b,["transitionEnd","transition"]);for(var S in x){var w=x[S];if(Array.isArray(w)){var C=d?w.length-1:0;w=w[C]}w!==null&&(o[S]=w)}for(var S in g)o[S]=g[S]}})}return o}var Ju={useVisualState:yi({scrapeMotionValuesFromProps:mi,createRenderState:fi,onMount:function(t,e,n){var r=n.renderState,o=n.latestValues;try{r.dimensions=typeof e.getBBox=="function"?e.getBBox():e.getBoundingClientRect()}catch{r.dimensions={x:0,y:0,width:0,height:0}}Yn(r,o,{enableHardwareAcceleration:!1},t.transformTemplate),hi(e,r)}})},Qu={useVisualState:yi({scrapeMotionValuesFromProps:qn,createRenderState:Kn})};function tl(t,e,n,r,o){var a=e.forwardMotionProps,i=a===void 0?!1:a,s=Wn(t)?Ju:Qu;return P(P({},s),{preloadedFeatures:n,useRender:Ku(i),createVisualElement:r,projectionNodeConstructor:o,Component:t})}var W;(function(t){t.Animate="animate",t.Hover="whileHover",t.Tap="whileTap",t.Drag="whileDrag",t.Focus="whileFocus",t.InView="whileInView",t.Exit="exit"})(W||(W={}));function Ke(t,e,n,r){return r===void 0&&(r={passive:!0}),t.addEventListener(e,n,r),function(){return t.removeEventListener(e,n)}}function An(t,e,n,r){h.useEffect(function(){var o=t.current;if(n&&o)return Ke(o,e,n,r)},[t,e,n,r])}function el(t){var e=t.whileFocus,n=t.visualElement,r=function(){var a;(a=n.animationState)===null||a===void 0||a.setActive(W.Focus,!0)},o=function(){var a;(a=n.animationState)===null||a===void 0||a.setActive(W.Focus,!1)};An(n,"focus",e?r:void 0),An(n,"blur",e?o:void 0)}function Si(t){return typeof PointerEvent<"u"&&t instanceof PointerEvent?t.pointerType==="mouse":t instanceof MouseEvent}function bi(t){var e=!!t.touches;return e}function nl(t){return function(e){var n=e instanceof MouseEvent,r=!n||n&&e.button===0;r&&t(e)}}var rl={pageX:0,pageY:0};function ol(t,e){e===void 0&&(e="page");var n=t.touches[0]||t.changedTouches[0],r=n||rl;return{x:r[e+"X"],y:r[e+"Y"]}}function il(t,e){return e===void 0&&(e="page"),{x:t[e+"X"],y:t[e+"Y"]}}function Zn(t,e){return e===void 0&&(e="page"),{point:bi(t)?ol(t,e):il(t,e)}}var xi=function(t,e){e===void 0&&(e=!1);var n=function(r){return t(r,Zn(r))};return e?nl(n):n},al=function(){return Kt&&window.onpointerdown===null},sl=function(){return Kt&&window.ontouchstart===null},ul=function(){return Kt&&window.onmousedown===null},ll={pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointercancel:"mousecancel",pointerover:"mouseover",pointerout:"mouseout",pointerenter:"mouseenter",pointerleave:"mouseleave"},cl={pointerdown:"touchstart",pointermove:"touchmove",pointerup:"touchend",pointercancel:"touchcancel"};function Pi(t){return al()?t:sl()?cl[t]:ul()?ll[t]:t}function Ht(t,e,n,r){return Ke(t,Pi(e),xi(n,e==="pointerdown"),r)}function Le(t,e,n,r){return An(t,Pi(e),n&&xi(n,e==="pointerdown"),r)}function wi(t){var e=null;return function(){var n=function(){e=null};return e===null?(e=t,n):!1}}var Ir=wi("dragHorizontal"),Rr=wi("dragVertical");function _i(t){var e=!1;if(t==="y")e=Rr();else if(t==="x")e=Ir();else{var n=Ir(),r=Rr();n&&r?e=function(){n(),r()}:(n&&n(),r&&r())}return e}function Ci(){var t=_i(!0);return t?(t(),!1):!0}function jr(t,e,n){return function(r,o){var a;!Si(r)||Ci()||((a=t.animationState)===null||a===void 0||a.setActive(W.Hover,e),n==null||n(r,o))}}function fl(t){var e=t.onHoverStart,n=t.onHoverEnd,r=t.whileHover,o=t.visualElement;Le(o,"pointerenter",e||r?jr(o,!0,e):void 0,{passive:!e}),Le(o,"pointerleave",n||r?jr(o,!1,n):void 0,{passive:!n})}var Ti=function(t,e){return e?t===e?!0:Ti(t,e.parentElement):!1};function Ei(t){return h.useEffect(function(){return function(){return t()}},[])}const De=(t,e,n)=>Math.min(Math.max(n,t),e),Or=.001,dl=.01,Lr=10,vl=.05,pl=1;function hl({duration:t=800,bounce:e=.25,velocity:n=0,mass:r=1}){let o,a;ve(t<=Lr*1e3,"Spring duration must be 10 seconds or less");let i=1-e;i=De(vl,pl,i),t=De(dl,Lr,t/1e3),i<1?(o=l=>{const c=l*i,f=c*t,d=c-n,p=Mn(l,i),v=Math.exp(-f);return Or-d/p*v},a=l=>{const f=l*i*t,d=f*n+n,p=Math.pow(i,2)*Math.pow(l,2)*t,v=Math.exp(-f),m=Mn(Math.pow(l,2),i);return(-o(l)+Or>0?-1:1)*((d-p)*v)/m}):(o=l=>{const c=Math.exp(-l*t),f=(l-n)*t+1;return-.001+c*f},a=l=>{const c=Math.exp(-l*t),f=(n-l)*(t*t);return c*f});const s=5/t,u=gl(o,a,s);if(t=t*1e3,isNaN(u))return{stiffness:100,damping:10,duration:t};{const l=Math.pow(u,2)*r;return{stiffness:l,damping:i*2*Math.sqrt(r*l),duration:t}}}const ml=12;function gl(t,e,n){let r=n;for(let o=1;o<ml;o++)r=r-t(r)/e(r);return r}function Mn(t,e){return t*Math.sqrt(1-e*e)}const yl=["duration","bounce"],Sl=["stiffness","damping","mass"];function Dr(t,e){return e.some(n=>t[n]!==void 0)}function bl(t){let e=Object.assign({velocity:0,stiffness:100,damping:10,mass:1,isResolvedFromDuration:!1},t);if(!Dr(t,Sl)&&Dr(t,yl)){const n=hl(t);e=Object.assign(Object.assign(Object.assign({},e),n),{velocity:0,mass:1}),e.isResolvedFromDuration=!0}return e}function Jn(t){var{from:e=0,to:n=1,restSpeed:r=2,restDelta:o}=t,a=dt(t,["from","to","restSpeed","restDelta"]);const i={done:!1,value:e};let{stiffness:s,damping:u,mass:l,velocity:c,duration:f,isResolvedFromDuration:d}=bl(a),p=Br,v=Br;function m(){const b=c?-(c/1e3):0,g=n-e,x=u/(2*Math.sqrt(s*l)),S=Math.sqrt(s/l)/1e3;if(o===void 0&&(o=Math.min(Math.abs(n-e)/100,.4)),x<1){const w=Mn(S,x);p=C=>{const T=Math.exp(-x*S*C);return n-T*((b+x*S*g)/w*Math.sin(w*C)+g*Math.cos(w*C))},v=C=>{const T=Math.exp(-x*S*C);return x*S*T*(Math.sin(w*C)*(b+x*S*g)/w+g*Math.cos(w*C))-T*(Math.cos(w*C)*(b+x*S*g)-w*g*Math.sin(w*C))}}else if(x===1)p=w=>n-Math.exp(-S*w)*(g+(b+S*g)*w);else{const w=S*Math.sqrt(x*x-1);p=C=>{const T=Math.exp(-x*S*C),R=Math.min(w*C,300);return n-T*((b+x*S*g)*Math.sinh(R)+w*g*Math.cosh(R))/w}}}return m(),{next:b=>{const g=p(b);if(d)i.done=b>=f;else{const x=v(b)*1e3,S=Math.abs(x)<=r,w=Math.abs(n-g)<=o;i.done=S&&w}return i.value=i.done?n:g,i},flipTarget:()=>{c=-c,[e,n]=[n,e],m()}}}Jn.needsInterpolation=(t,e)=>typeof t=="string"||typeof e=="string";const Br=t=>0,fe=(t,e,n)=>{const r=e-t;return r===0?1:(n-t)/r},Z=(t,e,n)=>-n*t+n*e+t;function cn(t,e,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?t+(e-t)*6*n:n<1/2?e:n<2/3?t+(e-t)*(2/3-n)*6:t}function Nr({hue:t,saturation:e,lightness:n,alpha:r}){t/=360,e/=100,n/=100;let o=0,a=0,i=0;if(!e)o=a=i=n;else{const s=n<.5?n*(1+e):n+e-n*e,u=2*n-s;o=cn(u,s,t+1/3),a=cn(u,s,t),i=cn(u,s,t-1/3)}return{red:Math.round(o*255),green:Math.round(a*255),blue:Math.round(i*255),alpha:r}}const xl=(t,e,n)=>{const r=t*t,o=e*e;return Math.sqrt(Math.max(0,n*(o-r)+r))},Pl=[En,It,Dt],Fr=t=>Pl.find(e=>e.test(t)),kr=t=>`'${t}' is not an animatable color. Use the equivalent color code instead.`,Vi=(t,e)=>{let n=Fr(t),r=Fr(e);lt(!!n,kr(t)),lt(!!r,kr(e));let o=n.parse(t),a=r.parse(e);n===Dt&&(o=Nr(o),n=It),r===Dt&&(a=Nr(a),r=It);const i=Object.assign({},o);return s=>{for(const u in i)u!=="alpha"&&(i[u]=xl(o[u],a[u],s));return i.alpha=Z(o.alpha,a.alpha,s),n.transform(i)}},In=t=>typeof t=="number",wl=(t,e)=>n=>e(t(n)),Ye=(...t)=>t.reduce(wl);function Ai(t,e){return In(t)?n=>Z(t,e,n):at.test(t)?Vi(t,e):Ii(t,e)}const Mi=(t,e)=>{const n=[...t],r=n.length,o=t.map((a,i)=>Ai(a,e[i]));return a=>{for(let i=0;i<r;i++)n[i]=o[i](a);return n}},_l=(t,e)=>{const n=Object.assign(Object.assign({},t),e),r={};for(const o in n)t[o]!==void 0&&e[o]!==void 0&&(r[o]=Ai(t[o],e[o]));return o=>{for(const a in r)n[a]=r[a](o);return n}};function Ur(t){const e=Ct.parse(t),n=e.length;let r=0,o=0,a=0;for(let i=0;i<n;i++)r||typeof e[i]=="number"?r++:e[i].hue!==void 0?a++:o++;return{parsed:e,numNumbers:r,numRGB:o,numHSL:a}}const Ii=(t,e)=>{const n=Ct.createTransformer(e),r=Ur(t),o=Ur(e);return r.numHSL===o.numHSL&&r.numRGB===o.numRGB&&r.numNumbers>=o.numNumbers?Ye(Mi(r.parsed,o.parsed),n):(ve(!0,`Complex values '${t}' and '${e}' 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.`),i=>`${i>0?e:t}`)},Cl=(t,e)=>n=>Z(t,e,n);function Tl(t){if(typeof t=="number")return Cl;if(typeof t=="string")return at.test(t)?Vi:Ii;if(Array.isArray(t))return Mi;if(typeof t=="object")return _l}function El(t,e,n){const r=[],o=n||Tl(t[0]),a=t.length-1;for(let i=0;i<a;i++){let s=o(t[i],t[i+1]);if(e){const u=Array.isArray(e)?e[i]:e;s=Ye(u,s)}r.push(s)}return r}function Vl([t,e],[n]){return r=>n(fe(t,e,r))}function Al(t,e){const n=t.length,r=n-1;return o=>{let a=0,i=!1;if(o<=t[0]?i=!0:o>=t[r]&&(a=r-1,i=!0),!i){let u=1;for(;u<n&&!(t[u]>o||u===r);u++);a=u-1}const s=fe(t[a],t[a+1],o);return e[a](s)}}function Ri(t,e,{clamp:n=!0,ease:r,mixer:o}={}){const a=t.length;lt(a===e.length,"Both input and output ranges must be the same length"),lt(!r||!Array.isArray(r)||r.length===a-1,"Array of easing functions must be of length `input.length - 1`, as it applies to the transitions **between** the defined values."),t[0]>t[a-1]&&(t=[].concat(t),e=[].concat(e),t.reverse(),e.reverse());const i=El(e,r,o),s=a===2?Vl(t,i):Al(t,i);return n?u=>s(De(t[0],t[a-1],u)):s}const qe=t=>e=>1-t(1-e),Qn=t=>e=>e<=.5?t(2*e)/2:(2-t(2*(1-e)))/2,Ml=t=>e=>Math.pow(e,t),ji=t=>e=>e*e*((t+1)*e-t),Il=t=>{const e=ji(t);return n=>(n*=2)<1?.5*e(n):.5*(2-Math.pow(2,-10*(n-1)))},Oi=1.525,Rl=4/11,jl=8/11,Ol=9/10,tr=t=>t,er=Ml(2),Ll=qe(er),Li=Qn(er),Di=t=>1-Math.sin(Math.acos(t)),nr=qe(Di),Dl=Qn(nr),rr=ji(Oi),Bl=qe(rr),Nl=Qn(rr),Fl=Il(Oi),kl=4356/361,Ul=35442/1805,$l=16061/1805,Be=t=>{if(t===1||t===0)return t;const e=t*t;return t<Rl?7.5625*e:t<jl?9.075*e-9.9*t+3.4:t<Ol?kl*e-Ul*t+$l:10.8*t*t-20.52*t+10.72},Hl=qe(Be),Wl=t=>t<.5?.5*(1-Be(1-t*2)):.5*Be(t*2-1)+.5;function zl(t,e){return t.map(()=>e||Li).splice(0,t.length-1)}function Gl(t){const e=t.length;return t.map((n,r)=>r!==0?r/(e-1):0)}function Kl(t,e){return t.map(n=>n*e)}function Ie({from:t=0,to:e=1,ease:n,offset:r,duration:o=300}){const a={done:!1,value:t},i=Array.isArray(e)?e:[t,e],s=Kl(r&&r.length===i.length?r:Gl(i),o);function u(){return Ri(s,i,{ease:Array.isArray(n)?n:zl(i,n)})}let l=u();return{next:c=>(a.value=l(c),a.done=c>=o,a),flipTarget:()=>{i.reverse(),l=u()}}}function Yl({velocity:t=0,from:e=0,power:n=.8,timeConstant:r=350,restDelta:o=.5,modifyTarget:a}){const i={done:!1,value:e};let s=n*t;const u=e+s,l=a===void 0?u:a(u);return l!==u&&(s=l-e),{next:c=>{const f=-s*Math.exp(-c/r);return i.done=!(f>o||f<-o),i.value=i.done?l:l+f,i},flipTarget:()=>{}}}const $r={keyframes:Ie,spring:Jn,decay:Yl};function ql(t){if(Array.isArray(t.to))return Ie;if($r[t.type])return $r[t.type];const e=new Set(Object.keys(t));return e.has("ease")||e.has("duration")&&!e.has("dampingRatio")?Ie:e.has("dampingRatio")||e.has("stiffness")||e.has("mass")||e.has("damping")||e.has("restSpeed")||e.has("restDelta")?Jn:Ie}const Bi=1/60*1e3,Xl=typeof performance<"u"?()=>performance.now():()=>Date.now(),Ni=typeof window<"u"?t=>window.requestAnimationFrame(t):t=>setTimeout(()=>t(Xl()),Bi);function Zl(t){let e=[],n=[],r=0,o=!1,a=!1;const i=new WeakSet,s={schedule:(u,l=!1,c=!1)=>{const f=c&&o,d=f?e:n;return l&&i.add(u),d.indexOf(u)===-1&&(d.push(u),f&&o&&(r=e.length)),u},cancel:u=>{const l=n.indexOf(u);l!==-1&&n.splice(l,1),i.delete(u)},process:u=>{if(o){a=!0;return}if(o=!0,[e,n]=[n,e],n.length=0,r=e.length,r)for(let l=0;l<r;l++){const c=e[l];c(u),i.has(c)&&(s.schedule(c),t())}o=!1,a&&(a=!1,s.process(u))}};return s}const Jl=40;let Rn=!0,de=!1,jn=!1;const Wt={delta:0,timestamp:0},ye=["read","update","preRender","render","postRender"],Xe=ye.reduce((t,e)=>(t[e]=Zl(()=>de=!0),t),{}),bt=ye.reduce((t,e)=>{const n=Xe[e];return t[e]=(r,o=!1,a=!1)=>(de||tc(),n.schedule(r,o,a)),t},{}),zt=ye.reduce((t,e)=>(t[e]=Xe[e].cancel,t),{}),fn=ye.reduce((t,e)=>(t[e]=()=>Xe[e].process(Wt),t),{}),Ql=t=>Xe[t].process(Wt),Fi=t=>{de=!1,Wt.delta=Rn?Bi:Math.max(Math.min(t-Wt.timestamp,Jl),1),Wt.timestamp=t,jn=!0,ye.forEach(Ql),jn=!1,de&&(Rn=!1,Ni(Fi))},tc=()=>{de=!0,Rn=!0,jn||Ni(Fi)},Ne=()=>Wt;function ki(t,e,n=0){return t-e-n}function ec(t,e,n=0,r=!0){return r?ki(e+-t,e,n):e-(t-e)+n}function nc(t,e,n,r){return r?t>=e+n:t<=-n}const rc=t=>{const e=({delta:n})=>t(n);return{start:()=>bt.update(e,!0),stop:()=>zt.update(e)}};function Ui(t){var e,n,{from:r,autoplay:o=!0,driver:a=rc,elapsed:i=0,repeat:s=0,repeatType:u="loop",repeatDelay:l=0,onPlay:c,onStop:f,onComplete:d,onRepeat:p,onUpdate:v}=t,m=dt(t,["from","autoplay","driver","elapsed","repeat","repeatType","repeatDelay","onPlay","onStop","onComplete","onRepeat","onUpdate"]);let{to:b}=m,g,x=0,S=m.duration,w,C=!1,T=!0,R;const L=ql(m);!((n=(e=L).needsInterpolation)===null||n===void 0)&&n.call(e,r,b)&&(R=Ri([0,100],[r,b],{clamp:!1}),r=0,b=100);const V=L(Object.assign(Object.assign({},m),{from:r,to:b}));function N(){x++,u==="reverse"?(T=x%2===0,i=ec(i,S,l,T)):(i=ki(i,S,l),u==="mirror"&&V.flipTarget()),C=!1,p&&p()}function q(){g.stop(),d&&d()}function k(A){if(T||(A=-A),i+=A,!C){const z=V.next(Math.max(0,i));w=z.value,R&&(w=R(w)),C=T?z.done:i<=0}v==null||v(w),C&&(x===0&&(S??(S=i)),x<s?nc(i,S,l,T)&&N():q())}function F(){c==null||c(),g=a(k),g.start()}return o&&F(),{stop:()=>{f==null||f(),g.stop()}}}function $i(t,e){return e?t*(1e3/e):0}function oc({from:t=0,velocity:e=0,min:n,max:r,power:o=.8,timeConstant:a=750,bounceStiffness:i=500,bounceDamping:s=10,restDelta:u=1,modifyTarget:l,driver:c,onUpdate:f,onComplete:d,onStop:p}){let v;function m(S){return n!==void 0&&S<n||r!==void 0&&S>r}function b(S){return n===void 0?r:r===void 0||Math.abs(n-S)<Math.abs(r-S)?n:r}function g(S){v==null||v.stop(),v=Ui(Object.assign(Object.assign({},S),{driver:c,onUpdate:w=>{var C;f==null||f(w),(C=S.onUpdate)===null||C===void 0||C.call(S,w)},onComplete:d,onStop:p}))}function x(S){g(Object.assign({type:"spring",stiffness:i,damping:s,restDelta:u},S))}if(m(t))x({from:t,velocity:e,to:b(t)});else{let S=o*e+t;typeof l<"u"&&(S=l(S));const w=b(S),C=w===n?-1:1;let T,R;const L=V=>{T=R,R=V,e=$i(V-T,Ne().delta),(C===1&&V>w||C===-1&&V<w)&&x({from:V,to:w,velocity:e})};g({type:"decay",from:t,velocity:e,timeConstant:a,power:o,restDelta:u,modifyTarget:l,onUpdate:m(S)?L:void 0})}return{stop:()=>v==null?void 0:v.stop()}}const On=t=>t.hasOwnProperty("x")&&t.hasOwnProperty("y"),Hr=t=>On(t)&&t.hasOwnProperty("z"),we=(t,e)=>Math.abs(t-e);function Hi(t,e){if(In(t)&&In(e))return we(t,e);if(On(t)&&On(e)){const n=we(t.x,e.x),r=we(t.y,e.y),o=Hr(t)&&Hr(e)?we(t.z,e.z):0;return Math.sqrt(Math.pow(n,2)+Math.pow(r,2)+Math.pow(o,2))}}const Wi=(t,e)=>1-3*e+3*t,zi=(t,e)=>3*e-6*t,Gi=t=>3*t,Fe=(t,e,n)=>((Wi(e,n)*t+zi(e,n))*t+Gi(e))*t,Ki=(t,e,n)=>3*Wi(e,n)*t*t+2*zi(e,n)*t+Gi(e),ic=1e-7,ac=10;function sc(t,e,n,r,o){let a,i,s=0;do i=e+(n-e)/2,a=Fe(i,r,o)-t,a>0?n=i:e=i;while(Math.abs(a)>ic&&++s<ac);return i}const uc=8,lc=.001;function cc(t,e,n,r){for(let o=0;o<uc;++o){const a=Ki(e,n,r);if(a===0)return e;const i=Fe(e,n,r)-t;e-=i/a}return e}const Re=11,_e=1/(Re-1);function fc(t,e,n,r){if(t===e&&n===r)return tr;const o=new Float32Array(Re);for(let i=0;i<Re;++i)o[i]=Fe(i*_e,t,n);function a(i){let s=0,u=1;const l=Re-1;for(;u!==l&&o[u]<=i;++u)s+=_e;--u;const c=(i-o[u])/(o[u+1]-o[u]),f=s+c*_e,d=Ki(f,t,n);return d>=lc?cc(i,f,t,n):d===0?f:sc(i,s,s+_e,t,n)}return i=>i===0||i===1?i:Fe(a(i),e,r)}function dc(t){var e=t.onTap,n=t.onTapStart,r=t.onTapCancel,o=t.whileTap,a=t.visualElement,i=e||n||r||o,s=h.useRef(!1),u=h.useRef(null),l={passive:!(n||e||r||v)};function c(){var m;(m=u.current)===null||m===void 0||m.call(u),u.current=null}function f(){var m;return c(),s.current=!1,(m=a.animationState)===null||m===void 0||m.setActive(W.Tap,!1),!Ci()}function d(m,b){f()&&(Ti(a.getInstance(),m.target)?e==null||e(m,b):r==null||r(m,b))}function p(m,b){f()&&(r==null||r(m,b))}function v(m,b){var g;c(),!s.current&&(s.current=!0,u.current=Ye(Ht(window,"pointerup",d,l),Ht(window,"pointercancel",p,l)),(g=a.animationState)===null||g===void 0||g.setActive(W.Tap,!0),n==null||n(m,b))}Le(a,"pointerdown",i?v:void 0,l),Ei(c)}var Wr=new Set;function Yi(t,e,n){t||Wr.has(e)||(console.warn(e),Wr.add(e))}var Ln=new WeakMap,dn=new WeakMap,vc=function(t){var e;(e=Ln.get(t.target))===null||e===void 0||e(t)},pc=function(t){t.forEach(vc)};function hc(t){var e=t.root,n=dt(t,["root"]),r=e||document;dn.has(r)||dn.set(r,{});var o=dn.get(r),a=JSON.stringify(n);return o[a]||(o[a]=new IntersectionObserver(pc,P({root:e},n))),o[a]}function mc(t,e,n){var r=hc(e);return Ln.set(t,n),r.observe(t),function(){Ln.delete(t),r.unobserve(t)}}function gc(t){var e=t.visualElement,n=t.whileInView,r=t.onViewportEnter,o=t.onViewportLeave,a=t.viewport,i=a===void 0?{}:a,s=h.useRef({hasEnteredView:!1,isInView:!1}),u=!!(n||r||o);i.once&&s.current.hasEnteredView&&(u=!1);var l=typeof IntersectionObserver>"u"?bc:Sc;l(u,s.current,e,i)}var yc={some:0,all:1};function Sc(t,e,n,r){var o=r.root,a=r.margin,i=r.amount,s=i===void 0?"some":i,u=r.once;h.useEffect(function(){if(t){var l={root:o==null?void 0:o.current,rootMargin:a,threshold:typeof s=="number"?s:yc[s]},c=function(f){var d,p=f.isIntersecting;if(e.isInView!==p&&(e.isInView=p,!(u&&!p&&e.hasEnteredView))){p&&(e.hasEnteredView=!0),(d=n.animationState)===null||d===void 0||d.setActive(W.InView,p);var v=n.getProps(),m=p?v.onViewportEnter:v.onViewportLeave;m==null||m(f)}};return mc(n.getInstance(),l,c)}},[t,o,a,s])}function bc(t,e,n,r){var o=r.fallback,a=o===void 0?!0:o;h.useEffect(function(){!t||!a||(Ho!=="production"&&Yi(!1,"IntersectionObserver not available on this device. whileInView animations will trigger on mount."),requestAnimationFrame(function(){var i;e.hasEnteredView=!0;var s=n.getProps().onViewportEnter;s==null||s(null),(i=n.animationState)===null||i===void 0||i.setActive(W.InView,!0)}))},[t])}var Rt=function(t){return function(e){return t(e),null}},xc={inView:Rt(gc),tap:Rt(dc),focus:Rt(el),hover:Rt(fl)},Pc=0,wc=function(){return Pc++},_c=function(){return pe(wc)};function qi(){var t=h.useContext(We);if(t===null)return[!0,null];var e=t.isPresent,n=t.onExitComplete,r=t.register,o=_c();h.useEffect(function(){return r(o)},[]);var a=function(){return n==null?void 0:n(o)};return!e&&n?[!1,a]:[!0]}function Xi(t,e){if(!Array.isArray(e))return!1;var n=e.length;if(n!==t.length)return!1;for(var r=0;r<n;r++)if(e[r]!==t[r])return!1;return!0}var ke=function(t){return t*1e3},zr={linear:tr,easeIn:er,easeInOut:Li,easeOut:Ll,circIn:Di,circInOut:Dl,circOut:nr,backIn:rr,backInOut:Nl,backOut:Bl,anticipate:Fl,bounceIn:Hl,bounceInOut:Wl,bounceOut:Be},Gr=function(t){if(Array.isArray(t)){lt(t.length===4,"Cubic bezier arrays must contain four numerical values.");var e=Q(t,4),n=e[0],r=e[1],o=e[2],a=e[3];return fc(n,r,o,a)}else if(typeof t=="string")return lt(zr[t]!==void 0,"Invalid easing type '".concat(t,"'")),zr[t];return t},Cc=function(t){return Array.isArray(t)&&typeof t[0]!="number"},Kr=function(t,e){return t==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&Ct.test(e)&&!e.startsWith("url("))},Ot=function(){return{type:"spring",stiffness:500,damping:25,restSpeed:10}},Ce=function(t){return{type:"spring",stiffness:550,damping:t===0?2*Math.sqrt(550):30,restSpeed:10}},vn=function(){return{type:"keyframes",ease:"linear",duration:.3}},Tc=function(t){return{type:"keyframes",duration:.8,values:t}},Yr={x:Ot,y:Ot,z:Ot,rotate:Ot,rotateX:Ot,rotateY:Ot,rotateZ:Ot,scaleX:Ce,scaleY:Ce,scale:Ce,opacity:vn,backgroundColor:vn,color:vn,default:Ce},Ec=function(t,e){var n;return ce(e)?n=Tc:n=Yr[t]||Yr.default,P({to:e},n(e))},Vc=P(P({},ui),{color:at,backgroundColor:at,outlineColor:at,fill:at,stroke:at,borderColor:at,borderTopColor:at,borderRightColor:at,borderBottomColor:at,borderLeftColor:at,filter:Vn,WebkitFilter:Vn}),or=function(t){return Vc[t]};function ir(t,e){var n,r=or(t);return r!==Vn&&(r=Ct),(n=r.getAnimatableNone)===null||n===void 0?void 0:n.call(r,e)}function Ac(t){t.when,t.delay,t.delayChildren,t.staggerChildren,t.staggerDirection,t.repeat,t.repeatType,t.repeatDelay,t.from;var e=dt(t,["when","delay","delayChildren","staggerChildren","staggerDirection","repeat","repeatType","repeatDelay","from"]);return!!Object.keys(e).length}var qr=!1;function Mc(t){var e=t.ease,n=t.times,r=t.yoyo,o=t.flip,a=t.loop,i=dt(t,["ease","times","yoyo","flip","loop"]),s=P({},i);return n&&(s.offset=n),i.duration&&(s.duration=ke(i.duration)),i.repeatDelay&&(s.repeatDelay=ke(i.repeatDelay)),e&&(s.ease=Cc(e)?e.map(Gr):Gr(e)),i.type==="tween"&&(s.type="keyframes"),(r||a||o)&&(ve(!qr,"yoyo, loop and flip have been removed from the API. Replace with repeat and repeatType options."),qr=!0,r?s.repeatType="reverse":a?s.repeatType="loop":o&&(s.repeatType="mirror"),s.repeat=a||r||o||i.repeat),i.type!=="spring"&&(s.type="keyframes"),s}function Ic(t,e){var n,r,o=ar(t,e)||{};return(r=(n=o.delay)!==null&&n!==void 0?n:t.delay)!==null&&r!==void 0?r:0}function Rc(t){return Array.isArray(t.to)&&t.to[0]===null&&(t.to=ft([],Q(t.to),!1),t.to[0]=t.from),t}function jc(t,e,n){var r;return Array.isArray(e.to)&&((r=t.duration)!==null&&r!==void 0||(t.duration=.8)),Rc(e),Ac(t)||(t=P(P({},t),Ec(n,e.to))),P(P({},e),Mc(t))}function Oc(t,e,n,r,o){var a,i=ar(r,t),s=(a=i.from)!==null&&a!==void 0?a:e.get(),u=Kr(t,n);s==="none"&&u&&typeof n=="string"?s=ir(t,n):Xr(s)&&typeof n=="string"?s=Zr(n):!Array.isArray(n)&&Xr(n)&&typeof s=="string"&&(n=Zr(s));var l=Kr(t,s);ve(l===u,"You are trying to animate ".concat(t,' from "').concat(s,'" to "').concat(n,'". ').concat(s," is not an animatable value - to enable this animation set ").concat(s," to a value animatable to ").concat(n," via the `style` property."));function c(){var d={from:s,to:n,velocity:e.getVelocity(),onComplete:o,onUpdate:function(p){return e.set(p)}};return i.type==="inertia"||i.type==="decay"?oc(P(P({},d),i)):Ui(P(P({},jc(i,d,t)),{onUpdate:function(p){var v;d.onUpdate(p),(v=i.onUpdate)===null||v===void 0||v.call(i,p)},onComplete:function(){var p;d.onComplete(),(p=i.onComplete)===null||p===void 0||p.call(i)}}))}function f(){var d,p,v=gi(n);return e.set(v),o(),(d=i==null?void 0:i.onUpdate)===null||d===void 0||d.call(i,v),(p=i==null?void 0:i.onComplete)===null||p===void 0||p.call(i),{stop:function(){}}}return!l||!u||i.type===!1?f:c}function Xr(t){return t===0||typeof t=="string"&&parseFloat(t)===0&&t.indexOf(" ")===-1}function Zr(t){return typeof t=="number"?0:ir("",t)}function ar(t,e){return t[e]||t.default||t}function sr(t,e,n,r){return r===void 0&&(r={}),e.start(function(o){var a,i,s=Oc(t,e,n,r,o),u=Ic(r,t),l=function(){return i=s()};return u?a=window.setTimeout(l,ke(u)):l(),function(){clearTimeout(a),i==null||i.stop()}})}var Lc=function(t){return/^\-?\d*\.?\d+$/.test(t)},Dc=function(t){return/^0[^.\s]+$/.test(t)};function ur(t,e){t.indexOf(e)===-1&&t.push(e)}function lr(t,e){var n=t.indexOf(e);n>-1&&t.splice(n,1)}var ne=function(){function t(){this.subscriptions=[]}return t.prototype.add=function(e){var n=this;return ur(this.subscriptions,e),function(){return lr(n.subscriptions,e)}},t.prototype.notify=function(e,n,r){var o=this.subscriptions.length;if(o)if(o===1)this.subscriptions[0](e,n,r);else for(var a=0;a<o;a++){var i=this.subscriptions[a];i&&i(e,n,r)}},t.prototype.getSize=function(){return this.subscriptions.length},t.prototype.clear=function(){this.subscriptions.length=0},t}(),Bc=function(t){return!isNaN(parseFloat(t))},Nc=function(){function t(e){var n=this;this.version="6.5.1",this.timeDelta=0,this.lastUpdated=0,this.updateSubscribers=new ne,this.velocityUpdateSubscribers=new ne,this.renderSubscribers=new ne,this.canTrackVelocity=!1,this.updateAndNotify=function(r,o){o===void 0&&(o=!0),n.prev=n.current,n.current=r;var a=Ne(),i=a.delta,s=a.timestamp;n.lastUpdated!==s&&(n.timeDelta=i,n.lastUpdated=s,bt.postRender(n.scheduleVelocityCheck)),n.prev!==n.current&&n.updateSubscribers.notify(n.current),n.velocityUpdateSubscribers.getSize()&&n.velocityUpdateSubscribers.notify(n.getVelocity()),o&&n.renderSubscribers.notify(n.current)},this.scheduleVelocityCheck=function(){return bt.postRender(n.velocityCheck)},this.velocityCheck=function(r){var o=r.timestamp;o!==n.lastUpdated&&(n.prev=n.current,n.velocityUpdateSubscribers.notify(n.getVelocity()))},this.hasAnimated=!1,this.prev=this.current=e,this.canTrackVelocity=Bc(this.current)}return t.prototype.onChange=function(e){return this.updateSubscribers.add(e)},t.prototype.clearListeners=function(){this.updateSubscribers.clear()},t.prototype.onRenderRequest=function(e){return e(this.get()),this.renderSubscribers.add(e)},t.prototype.attach=function(e){this.passiveEffect=e},t.prototype.set=function(e,n){n===void 0&&(n=!0),!n||!this.passiveEffect?this.updateAndNotify(e,n):this.passiveEffect(e,this.updateAndNotify)},t.prototype.get=function(){return this.current},t.prototype.getPrevious=function(){return this.prev},t.prototype.getVelocity=function(){return this.canTrackVelocity?$i(parseFloat(this.current)-parseFloat(this.prev),this.timeDelta):0},t.prototype.start=function(e){var n=this;return this.stop(),new Promise(function(r){n.hasAnimated=!0,n.stopAnimation=e(r)}).then(function(){return n.clearAnimation()})},t.prototype.stop=function(){this.stopAnimation&&this.stopAnimation(),this.clearAnimation()},t.prototype.isAnimating=function(){return!!this.stopAnimation},t.prototype.clearAnimation=function(){this.stopAnimation=null},t.prototype.destroy=function(){this.updateSubscribers.clear(),this.renderSubscribers.clear(),this.stop()},t}();function Gt(t){return new Nc(t)}var Zi=function(t){return function(e){return e.test(t)}},Fc={test:function(t){return t==="auto"},parse:function(t){return t}},Ji=[Nt,M,St,Vt,Vu,Eu,Fc],Zt=function(t){return Ji.find(Zi(t))},kc=ft(ft([],Q(Ji),!1),[at,Ct],!1),Uc=function(t){return kc.find(Zi(t))};function $c(t,e,n){t.hasValue(e)?t.getValue(e).set(n):t.addValue(e,Gt(n))}function cr(t,e){var n=ze(t,e),r=n?t.makeTargetAnimatable(n,!1):{},o=r.transitionEnd,a=o===void 0?{}:o;r.transition;var i=dt(r,["transitionEnd","transition"]);i=P(P({},i),a);for(var s in i){var u=gi(i[s]);$c(t,s,u)}}function Dn(t,e){var n=ft([],Q(e),!1).reverse();n.forEach(function(r){var o,a=t.getVariant(r);a&&cr(t,a),(o=t.variantChildren)===null||o===void 0||o.forEach(function(i){Dn(i,e)})})}function Hc(t,e){if(Array.isArray(e))return Dn(t,e);if(typeof e=="string")return Dn(t,[e]);cr(t,e)}function Wc(t,e,n){var r,o,a,i,s=Object.keys(e).filter(function(p){return!t.hasValue(p)}),u=s.length;if(u)for(var l=0;l<u;l++){var c=s[l],f=e[c],d=null;Array.isArray(f)&&(d=f[0]),d===null&&(d=(o=(r=n[c])!==null&&r!==void 0?r:t.readValue(c))!==null&&o!==void 0?o:e[c]),d!=null&&(typeof d=="string"&&(Lc(d)||Dc(d))?d=parseFloat(d):!Uc(d)&&Ct.test(f)&&(d=ir(c,f)),t.addValue(c,Gt(d)),(a=(i=n)[c])!==null&&a!==void 0||(i[c]=d),t.setBaseTarget(c,d))}}function zc(t,e){if(e){var n=e[t]||e.default||e;return n.from}}function Gc(t,e,n){var r,o,a={};for(var i in t)a[i]=(r=zc(i,e))!==null&&r!==void 0?r:(o=n.getValue(i))===null||o===void 0?void 0:o.get();return a}function Qi(t,e,n){n===void 0&&(n={}),t.notifyAnimationStart(e);var r;if(Array.isArray(e)){var o=e.map(function(i){return Bn(t,i,n)});r=Promise.all(o)}else if(typeof e=="string")r=Bn(t,e,n);else{var a=typeof e=="function"?ze(t,e,n.custom):e;r=ta(t,a,n)}return r.then(function(){return t.notifyAnimationComplete(e)})}function Bn(t,e,n){var r;n===void 0&&(n={});var o=ze(t,e,n.custom),a=(o||{}).transition,i=a===void 0?t.getDefaultTransition()||{}:a;n.transitionOverride&&(i=n.transitionOverride);var s=o?function(){return ta(t,o,n)}:function(){return Promise.resolve()},u=!((r=t.variantChildren)===null||r===void 0)&&r.size?function(p){p===void 0&&(p=0);var v=i.delayChildren,m=v===void 0?0:v,b=i.staggerChildren,g=i.staggerDirection;return Kc(t,e,m+p,b,g,n)}:function(){return Promise.resolve()},l=i.when;if(l){var c=Q(l==="beforeChildren"?[s,u]:[u,s],2),f=c[0],d=c[1];return f().then(d)}else return Promise.all([s(),u(n.delay)])}function ta(t,e,n){var r,o=n===void 0?{}:n,a=o.delay,i=a===void 0?0:a,s=o.transitionOverride,u=o.type,l=t.makeTargetAnimatable(e),c=l.transition,f=c===void 0?t.getDefaultTransition():c,d=l.transitionEnd,p=dt(l,["transition","transitionEnd"]);s&&(f=s);var v=[],m=u&&((r=t.animationState)===null||r===void 0?void 0:r.getState()[u]);for(var b in p){var g=t.getValue(b),x=p[b];if(!(!g||x===void 0||m&&Xc(m,b))){var S=P({delay:i},f);t.shouldReduceMotion&&he(b)&&(S=P(P({},S),{type:!1,delay:0}));var w=sr(b,g,x,S);v.push(w)}}return Promise.all(v).then(function(){d&&cr(t,d)})}function Kc(t,e,n,r,o,a){n===void 0&&(n=0),r===void 0&&(r=0),o===void 0&&(o=1);var i=[],s=(t.variantChildren.size-1)*r,u=o===1?function(l){return l===void 0&&(l=0),l*r}:function(l){return l===void 0&&(l=0),s-l*r};return Array.from(t.variantChildren).sort(qc).forEach(function(l,c){i.push(Bn(l,e,P(P({},a),{delay:n+u(c)})).then(function(){return l.notifyAnimationComplete(e)}))}),Promise.all(i)}function Yc(t){t.forEachValue(function(e){return e.stop()})}function qc(t,e){return t.sortNodePosition(e)}function Xc(t,e){var n=t.protectedKeys,r=t.needsAnimating,o=n.hasOwnProperty(e)&&r[e]!==!0;return r[e]=!1,o}var fr=[W.Animate,W.InView,W.Focus,W.Hover,W.Tap,W.Drag,W.Exit],Zc=ft([],Q(fr),!1).reverse(),Jc=fr.length;function Qc(t){return function(e){return Promise.all(e.map(function(n){var r=n.animation,o=n.options;return Qi(t,r,o)}))}}function tf(t){var e=Qc(t),n=nf(),r={},o=!0,a=function(c,f){var d=ze(t,f);if(d){d.transition;var p=d.transitionEnd,v=dt(d,["transition","transitionEnd"]);c=P(P(P({},c),v),p)}return c};function i(c){return r[c]!==void 0}function s(c){e=c(t)}function u(c,f){for(var d,p=t.getProps(),v=t.getVariantContext(!0)||{},m=[],b=new Set,g={},x=1/0,S=function(R){var L=Zc[R],V=n[L],N=(d=p[L])!==null&&d!==void 0?d:v[L],q=ht(N),k=L===f?V.isActive:null;k===!1&&(x=R);var F=N===v[L]&&N!==p[L]&&q;if(F&&o&&t.manuallyAnimateOnMount&&(F=!1),V.protectedKeys=P({},g),!V.isActive&&k===null||!N&&!V.prevProp||Xn(N)||typeof N=="boolean")return"continue";var A=ef(V.prevProp,N),z=A||L===f&&V.isActive&&!F&&q||R>x&&q,X=Array.isArray(N)?N:[N],I=X.reduce(a,{});k===!1&&(I={});var nt=V.prevResolvedValues,rt=nt===void 0?{}:nt,ot=P(P({},rt),I),U=function(E){z=!0,b.delete(E),V.needsAnimating[E]=!0};for(var Y in ot){var D=I[Y],_=rt[Y];g.hasOwnProperty(Y)||(D!==_?ce(D)&&ce(_)?!Xi(D,_)||A?U(Y):V.protectedKeys[Y]=!0:D!==void 0?U(Y):b.add(Y):D!==void 0&&b.has(Y)?U(Y):V.protectedKeys[Y]=!0)}V.prevProp=N,V.prevResolvedValues=I,V.isActive&&(g=P(P({},g),I)),o&&t.blockInitialAnimation&&(z=!1),z&&!F&&m.push.apply(m,ft([],Q(X.map(function(E){return{animation:E,options:P({type:L},c)}})),!1))},w=0;w<Jc;w++)S(w);if(r=P({},g),b.size){var C={};b.forEach(function(R){var L=t.getBaseTarget(R);L!==void 0&&(C[R]=L)}),m.push({animation:C})}var T=!!m.length;return o&&p.initial===!1&&!t.manuallyAnimateOnMount&&(T=!1),o=!1,T?e(m):Promise.resolve()}function l(c,f,d){var p;if(n[c].isActive===f)return Promise.resolve();(p=t.variantChildren)===null||p===void 0||p.forEach(function(b){var g;return(g=b.animationState)===null||g===void 0?void 0:g.setActive(c,f)}),n[c].isActive=f;var v=u(d,c);for(var m in n)n[m].protectedKeys={};return v}return{isAnimated:i,animateChanges:u,setActive:l,setAnimateFunction:s,getState:function(){return n}}}function ef(t,e){return typeof e=="string"?e!==t:Ko(e)?!Xi(e,t):!1}function Lt(t){return t===void 0&&(t=!1),{isActive:t,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function nf(){var t;return t={},t[W.Animate]=Lt(!0),t[W.InView]=Lt(),t[W.Hover]=Lt(),t[W.Tap]=Lt(),t[W.Drag]=Lt(),t[W.Focus]=Lt(),t[W.Exit]=Lt(),t}var rf={animation:Rt(function(t){var e=t.visualElement,n=t.animate;e.animationState||(e.animationState=tf(e)),Xn(n)&&h.useEffect(function(){return n.subscribe(e)},[n])}),exit:Rt(function(t){var e=t.custom,n=t.visualElement,r=Q(qi(),2),o=r[0],a=r[1],i=h.useContext(We);h.useEffect(function(){var s,u;n.isPresent=o;var l=(s=n.animationState)===null||s===void 0?void 0:s.setActive(W.Exit,!o,{custom:(u=i==null?void 0:i.custom)!==null&&u!==void 0?u:e});!o&&(l==null||l.then(a))},[o])})},ea=function(){function t(e,n,r){var o=this,a=r===void 0?{}:r,i=a.transformPagePoint;if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.updatePoint=function(){if(o.lastMoveEvent&&o.lastMoveEventInfo){var d=hn(o.lastMoveEventInfo,o.history),p=o.startEvent!==null,v=Hi(d.offset,{x:0,y:0})>=3;if(!(!p&&!v)){var m=d.point,b=Ne().timestamp;o.history.push(P(P({},m),{timestamp:b}));var g=o.handlers,x=g.onStart,S=g.onMove;p||(x&&x(o.lastMoveEvent,d),o.startEvent=o.lastMoveEvent),S&&S(o.lastMoveEvent,d)}}},this.handlePointerMove=function(d,p){if(o.lastMoveEvent=d,o.lastMoveEventInfo=pn(p,o.transformPagePoint),Si(d)&&d.buttons===0){o.handlePointerUp(d,p);return}bt.update(o.updatePoint,!0)},this.handlePointerUp=function(d,p){o.end();var v=o.handlers,m=v.onEnd,b=v.onSessionEnd,g=hn(pn(p,o.transformPagePoint),o.history);o.startEvent&&m&&m(d,g),b&&b(d,g)},!(bi(e)&&e.touches.length>1)){this.handlers=n,this.transformPagePoint=i;var s=Zn(e),u=pn(s,this.transformPagePoint),l=u.point,c=Ne().timestamp;this.history=[P(P({},l),{timestamp:c})];var f=n.onSessionStart;f&&f(e,hn(u,this.history)),this.removeListeners=Ye(Ht(window,"pointermove",this.handlePointerMove),Ht(window,"pointerup",this.handlePointerUp),Ht(window,"pointercancel",this.handlePointerUp))}}return t.prototype.updateHandlers=function(e){this.handlers=e},t.prototype.end=function(){this.removeListeners&&this.removeListeners(),zt.update(this.updatePoint)},t}();function pn(t,e){return e?{point:e(t.point)}:t}function Jr(t,e){return{x:t.x-e.x,y:t.y-e.y}}function hn(t,e){var n=t.point;return{point:n,delta:Jr(n,na(e)),offset:Jr(n,of(e)),velocity:af(e,.1)}}function of(t){return t[0]}function na(t){return t[t.length-1]}function af(t,e){if(t.length<2)return{x:0,y:0};for(var n=t.length-1,r=null,o=na(t);n>=0&&(r=t[n],!(o.timestamp-r.timestamp>ke(e)));)n--;if(!r)return{x:0,y:0};var a=(o.timestamp-r.timestamp)/1e3;if(a===0)return{x:0,y:0};var i={x:(o.x-r.x)/a,y:(o.y-r.y)/a};return i.x===1/0&&(i.x=0),i.y===1/0&&(i.y=0),i}function Tt(t){return t.max-t.min}function Qr(t,e,n){return e===void 0&&(e=0),n===void 0&&(n=.01),Hi(t,e)<n}function to(t,e,n,r){r===void 0&&(r=.5),t.origin=r,t.originPoint=Z(e.min,e.max,t.origin),t.scale=Tt(n)/Tt(e),(Qr(t.scale,1,1e-4)||isNaN(t.scale))&&(t.scale=1),t.translate=Z(n.min,n.max,t.origin)-t.originPoint,(Qr(t.translate)||isNaN(t.translate))&&(t.translate=0)}function re(t,e,n,r){to(t.x,e.x,n.x,r==null?void 0:r.originX),to(t.y,e.y,n.y,r==null?void 0:r.originY)}function eo(t,e,n){t.min=n.min+e.min,t.max=t.min+Tt(e)}function sf(t,e,n){eo(t.x,e.x,n.x),eo(t.y,e.y,n.y)}function no(t,e,n){t.min=e.min-n.min,t.max=t.min+Tt(e)}function oe(t,e,n){no(t.x,e.x,n.x),no(t.y,e.y,n.y)}function uf(t,e,n){var r=e.min,o=e.max;return r!==void 0&&t<r?t=n?Z(r,t,n.min):Math.max(t,r):o!==void 0&&t>o&&(t=n?Z(o,t,n.max):Math.min(t,o)),t}function ro(t,e,n){return{min:e!==void 0?t.min+e:void 0,max:n!==void 0?t.max+n-(t.max-t.min):void 0}}function lf(t,e){var n=e.top,r=e.left,o=e.bottom,a=e.right;return{x:ro(t.x,r,a),y:ro(t.y,n,o)}}function oo(t,e){var n,r=e.min-t.min,o=e.max-t.max;return e.max-e.min<t.max-t.min&&(n=Q([o,r],2),r=n[0],o=n[1]),{min:r,max:o}}function cf(t,e){return{x:oo(t.x,e.x),y:oo(t.y,e.y)}}function ff(t,e){var n=.5,r=Tt(t),o=Tt(e);return o>r?n=fe(e.min,e.max-r,t.min):r>o&&(n=fe(t.min,t.max-o,e.min)),De(0,1,n)}function df(t,e){var n={};return e.min!==void 0&&(n.min=e.min-t.min),e.max!==void 0&&(n.max=e.max-t.min),n}var Nn=.35;function vf(t){return t===void 0&&(t=Nn),t===!1?t=0:t===!0&&(t=Nn),{x:io(t,"left","right"),y:io(t,"top","bottom")}}function io(t,e,n){return{min:ao(t,e),max:ao(t,n)}}function ao(t,e){var n;return typeof t=="number"?t:(n=t[e])!==null&&n!==void 0?n:0}var so=function(){return{translate:0,scale:1,origin:0,originPoint:0}},ie=function(){return{x:so(),y:so()}},uo=function(){return{min:0,max:0}},it=function(){return{x:uo(),y:uo()}};function yt(t){return[t("x"),t("y")]}function ra(t){var e=t.top,n=t.left,r=t.right,o=t.bottom;return{x:{min:n,max:r},y:{min:e,max:o}}}function pf(t){var e=t.x,n=t.y;return{top:n.min,right:e.max,bottom:n.max,left:e.min}}function hf(t,e){if(!e)return t;var n=e({x:t.left,y:t.top}),r=e({x:t.right,y:t.bottom});return{top:n.y,left:n.x,bottom:r.y,right:r.x}}function mn(t){return t===void 0||t===1}function oa(t){var e=t.scale,n=t.scaleX,r=t.scaleY;return!mn(e)||!mn(n)||!mn(r)}function At(t){return oa(t)||lo(t.x)||lo(t.y)||t.z||t.rotate||t.rotateX||t.rotateY}function lo(t){return t&&t!=="0%"}function Ue(t,e,n){var r=t-n,o=e*r;return n+o}function co(t,e,n,r,o){return o!==void 0&&(t=Ue(t,o,r)),Ue(t,n,r)+e}function Fn(t,e,n,r,o){e===void 0&&(e=0),n===void 0&&(n=1),t.min=co(t.min,e,n,r,o),t.max=co(t.max,e,n,r,o)}function ia(t,e){var n=e.x,r=e.y;Fn(t.x,n.translate,n.scale,n.originPoint),Fn(t.y,r.translate,r.scale,r.originPoint)}function mf(t,e,n,r){var o,a;r===void 0&&(r=!1);var i=n.length;if(i){e.x=e.y=1;for(var s,u,l=0;l<i;l++)s=n[l],u=s.projectionDelta,((a=(o=s.instance)===null||o===void 0?void 0:o.style)===null||a===void 0?void 0:a.display)!=="contents"&&(r&&s.options.layoutScroll&&s.scroll&&s!==s.root&&$t(t,{x:-s.scroll.x,y:-s.scroll.y}),u&&(e.x*=u.x.scale,e.y*=u.y.scale,ia(t,u)),r&&At(s.latestValues)&&$t(t,s.latestValues))}}function Mt(t,e){t.min=t.min+e,t.max=t.max+e}function fo(t,e,n){var r=Q(n,3),o=r[0],a=r[1],i=r[2],s=e[i]!==void 0?e[i]:.5,u=Z(t.min,t.max,s);Fn(t,e[o],e[a],u,e.scale)}var gf=["x","scaleX","originX"],yf=["y","scaleY","originY"];function $t(t,e){fo(t.x,e,gf),fo(t.y,e,yf)}function aa(t,e){return ra(hf(t.getBoundingClientRect(),e))}function Sf(t,e,n){var r=aa(t,n),o=e.scroll;return o&&(Mt(r.x,o.x),Mt(r.y,o.y)),r}var bf=new WeakMap,xf=function(){function t(e){this.openGlobalLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=it(),this.visualElement=e}return t.prototype.start=function(e,n){var r=this,o=n===void 0?{}:n,a=o.snapToCursor,i=a===void 0?!1:a;if(this.visualElement.isPresent!==!1){var s=function(f){r.stopAnimation(),i&&r.snapToCursor(Zn(f,"page").point)},u=function(f,d){var p,v=r.getProps(),m=v.drag,b=v.dragPropagation,g=v.onDragStart;m&&!b&&(r.openGlobalLock&&r.openGlobalLock(),r.openGlobalLock=_i(m),!r.openGlobalLock)||(r.isDragging=!0,r.currentDirection=null,r.resolveConstraints(),r.visualElement.projection&&(r.visualElement.projection.isAnimationBlocked=!0,r.visualElement.projection.target=void 0),yt(function(x){var S,w,C=r.getAxisMotionValue(x).get()||0;if(St.test(C)){var T=(w=(S=r.visualElement.projection)===null||S===void 0?void 0:S.layout)===null||w===void 0?void 0:w.actual[x];if(T){var R=Tt(T);C=R*(parseFloat(C)/100)}}r.originPoint[x]=C}),g==null||g(f,d),(p=r.visualElement.animationState)===null||p===void 0||p.setActive(W.Drag,!0))},l=function(f,d){var p=r.getProps(),v=p.dragPropagation,m=p.dragDirectionLock,b=p.onDirectionLock,g=p.onDrag;if(!(!v&&!r.openGlobalLock)){var x=d.offset;if(m&&r.currentDirection===null){r.currentDirection=Pf(x),r.currentDirection!==null&&(b==null||b(r.currentDirection));return}r.updateAxis("x",d.point,x),r.updateAxis("y",d.point,x),r.visualElement.syncRender(),g==null||g(f,d)}},c=function(f,d){return r.stop(f,d)};this.panSession=new ea(e,{onSessionStart:s,onStart:u,onMove:l,onSessionEnd:c},{transformPagePoint:this.visualElement.getTransformPagePoint()})}},t.prototype.stop=function(e,n){var r=this.isDragging;if(this.cancel(),!!r){var o=n.velocity;this.startAnimation(o);var a=this.getProps().onDragEnd;a==null||a(e,n)}},t.prototype.cancel=function(){var e,n;this.isDragging=!1,this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!1),(e=this.panSession)===null||e===void 0||e.end(),this.panSession=void 0;var r=this.getProps().dragPropagation;!r&&this.openGlobalLock&&(this.openGlobalLock(),this.openGlobalLock=null),(n=this.visualElement.animationState)===null||n===void 0||n.setActive(W.Drag,!1)},t.prototype.updateAxis=function(e,n,r){var o=this.getProps().drag;if(!(!r||!Te(e,o,this.currentDirection))){var a=this.getAxisMotionValue(e),i=this.originPoint[e]+r[e];this.constraints&&this.constraints[e]&&(i=uf(i,this.constraints[e],this.elastic[e])),a.set(i)}},t.prototype.resolveConstraints=function(){var e=this,n=this.getProps(),r=n.dragConstraints,o=n.dragElastic,a=(this.visualElement.projection||{}).layout,i=this.constraints;r&&Ut(r)?this.constraints||(this.constraints=this.resolveRefConstraints()):r&&a?this.constraints=lf(a.actual,r):this.constraints=!1,this.elastic=vf(o),i!==this.constraints&&a&&this.constraints&&!this.hasMutatedConstraints&&yt(function(s){e.getAxisMotionValue(s)&&(e.constraints[s]=df(a.actual[s],e.constraints[s]))})},t.prototype.resolveRefConstraints=function(){var e=this.getProps(),n=e.dragConstraints,r=e.onMeasureDragConstraints;if(!n||!Ut(n))return!1;var o=n.current;lt(o!==null,"If `dragConstraints` is set as a React ref, that ref must be passed to another component's `ref` prop.");var a=this.visualElement.projection;if(!a||!a.layout)return!1;var i=Sf(o,a.root,this.visualElement.getTransformPagePoint()),s=cf(a.layout.actual,i);if(r){var u=r(pf(s));this.hasMutatedConstraints=!!u,u&&(s=ra(u))}return s},t.prototype.startAnimation=function(e){var n=this,r=this.getProps(),o=r.drag,a=r.dragMomentum,i=r.dragElastic,s=r.dragTransition,u=r.dragSnapToOrigin,l=r.onDragTransitionEnd,c=this.constraints||{},f=yt(function(d){var p;if(Te(d,o,n.currentDirection)){var v=(p=c==null?void 0:c[d])!==null&&p!==void 0?p:{};u&&(v={min:0,max:0});var m=i?200:1e6,b=i?40:1e7,g=P(P({type:"inertia",velocity:a?e[d]:0,bounceStiffness:m,bounceDamping:b,timeConstant:750,restDelta:1,restSpeed:10},s),v);return n.startAxisValueAnimation(d,g)}});return Promise.all(f).then(l)},t.prototype.startAxisValueAnimation=function(e,n){var r=this.getAxisMotionValue(e);return sr(e,r,0,n)},t.prototype.stopAnimation=function(){var e=this;yt(function(n){return e.getAxisMotionValue(n).stop()})},t.prototype.getAxisMotionValue=function(e){var n,r,o="_drag"+e.toUpperCase(),a=this.visualElement.getProps()[o];return a||this.visualElement.getValue(e,(r=(n=this.visualElement.getProps().initial)===null||n===void 0?void 0:n[e])!==null&&r!==void 0?r:0)},t.prototype.snapToCursor=function(e){var n=this;yt(function(r){var o=n.getProps().drag;if(Te(r,o,n.currentDirection)){var a=n.visualElement.projection,i=n.getAxisMotionValue(r);if(a&&a.layout){var s=a.layout.actual[r],u=s.min,l=s.max;i.set(e[r]-Z(u,l,.5))}}})},t.prototype.scalePositionWithinConstraints=function(){var e=this,n,r=this.getProps(),o=r.drag,a=r.dragConstraints,i=this.visualElement.projection;if(!(!Ut(a)||!i||!this.constraints)){this.stopAnimation();var s={x:0,y:0};yt(function(l){var c=e.getAxisMotionValue(l);if(c){var f=c.get();s[l]=ff({min:f,max:f},e.constraints[l])}});var u=this.visualElement.getProps().transformTemplate;this.visualElement.getInstance().style.transform=u?u({},""):"none",(n=i.root)===null||n===void 0||n.updateScroll(),i.updateLayout(),this.resolveConstraints(),yt(function(l){if(Te(l,o,null)){var c=e.getAxisMotionValue(l),f=e.constraints[l],d=f.min,p=f.max;c.set(Z(d,p,s[l]))}})}},t.prototype.addListeners=function(){var e=this,n;bf.set(this.visualElement,this);var r=this.visualElement.getInstance(),o=Ht(r,"pointerdown",function(l){var c=e.getProps(),f=c.drag,d=c.dragListener,p=d===void 0?!0:d;f&&p&&e.start(l)}),a=function(){var l=e.getProps().dragConstraints;Ut(l)&&(e.constraints=e.resolveRefConstraints())},i=this.visualElement.projection,s=i.addEventListener("measure",a);i&&!i.layout&&((n=i.root)===null||n===void 0||n.updateScroll(),i.updateLayout()),a();var u=Ke(window,"resize",function(){return e.scalePositionWithinConstraints()});return i.addEventListener("didUpdate",function(l){var c=l.delta,f=l.hasLayoutChanged;e.isDragging&&f&&(yt(function(d){var p=e.getAxisMotionValue(d);p&&(e.originPoint[d]+=c[d].translate,p.set(p.get()+c[d].translate))}),e.visualElement.syncRender())}),function(){u(),o(),s()}},t.prototype.getProps=function(){var e=this.visualElement.getProps(),n=e.drag,r=n===void 0?!1:n,o=e.dragDirectionLock,a=o===void 0?!1:o,i=e.dragPropagation,s=i===void 0?!1:i,u=e.dragConstraints,l=u===void 0?!1:u,c=e.dragElastic,f=c===void 0?Nn:c,d=e.dragMomentum,p=d===void 0?!0:d;return P(P({},e),{drag:r,dragDirectionLock:a,dragPropagation:s,dragConstraints:l,dragElastic:f,dragMomentum:p})},t}();function Te(t,e,n){return(e===!0||e===t)&&(n===null||n===t)}function Pf(t,e){e===void 0&&(e=10);var n=null;return Math.abs(t.y)>e?n="y":Math.abs(t.x)>e&&(n="x"),n}function wf(t){var e=t.dragControls,n=t.visualElement,r=pe(function(){return new xf(n)});h.useEffect(function(){return e&&e.subscribe(r)},[r,e]),h.useEffect(function(){return r.addListeners()},[r])}function _f(t){var e=t.onPan,n=t.onPanStart,r=t.onPanEnd,o=t.onPanSessionStart,a=t.visualElement,i=e||n||r||o,s=h.useRef(null),u=h.useContext(Hn).transformPagePoint,l={onSessionStart:o,onStart:n,onMove:e,onEnd:function(f,d){s.current=null,r&&r(f,d)}};h.useEffect(function(){s.current!==null&&s.current.updateHandlers(l)});function c(f){s.current=new ea(f,l,{transformPagePoint:u})}Le(a,"pointerdown",i&&c),Ei(function(){return s.current&&s.current.end()})}var Cf={pan:Rt(_f),drag:Rt(wf)},Ee=["LayoutMeasure","BeforeLayoutMeasure","LayoutUpdate","ViewportBoxUpdate","Update","Render","AnimationComplete","LayoutAnimationComplete","AnimationStart","LayoutAnimationStart","SetAxisTarget","Unmount"];function Tf(){var t=Ee.map(function(){return new ne}),e={},n={clearAllListeners:function(){return t.forEach(function(r){return r.clear()})},updatePropListeners:function(r){Ee.forEach(function(o){var a,i="on"+o,s=r[i];(a=e[o])===null||a===void 0||a.call(e),s&&(e[o]=n[i](s))})}};return t.forEach(function(r,o){n["on"+Ee[o]]=function(a){return r.add(a)},n["notify"+Ee[o]]=function(){for(var a=[],i=0;i<arguments.length;i++)a[i]=arguments[i];return r.notify.apply(r,ft([],Q(a),!1))}}),n}function Ef(t,e,n){var r;for(var o in e){var a=e[o],i=n[o];if(_t(a))t.addValue(o,a),process.env.NODE_ENV==="development"&&Yi(a.version==="6.5.1","Attempting to mix Framer Motion versions ".concat(a.version," with 6.5.1 may not work as expected."));else if(_t(i))t.addValue(o,Gt(a));else if(i!==a)if(t.hasValue(o)){var s=t.getValue(o);!s.hasAnimated&&s.set(a)}else t.addValue(o,Gt((r=t.getStaticValue(o))!==null&&r!==void 0?r:a))}for(var o in n)e[o]===void 0&&t.removeValue(o);return e}var sa=function(t){var e=t.treeType,n=e===void 0?"":e,r=t.build,o=t.getBaseTarget,a=t.makeTargetAnimatable,i=t.measureViewportBox,s=t.render,u=t.readValueFromInstance,l=t.removeValueFromRenderState,c=t.sortNodePosition,f=t.scrapeMotionValuesFromProps;return function(d,p){var v=d.parent,m=d.props,b=d.presenceId,g=d.blockInitialAnimation,x=d.visualState,S=d.shouldReduceMotion;p===void 0&&(p={});var w=!1,C=x.latestValues,T=x.renderState,R,L=Tf(),V=new Map,N=new Map,q={},k=P({},C),F;function A(){!R||!w||(z(),s(R,T,m.style,D.projection))}function z(){r(D,T,C,p,m)}function X(){L.notifyUpdate(C)}function I(_,E){var O=E.onChange(function(B){C[_]=B,m.onUpdate&&bt.update(X,!1,!0)}),j=E.onRenderRequest(D.scheduleRender);N.set(_,function(){O(),j()})}var nt=f(m);for(var rt in nt){var ot=nt[rt];C[rt]!==void 0&&_t(ot)&&ot.set(C[rt],!1)}var U=Ge(m),Y=qo(m),D=P(P({treeType:n,current:null,depth:v?v.depth+1:0,parent:v,children:new Set,presenceId:b,shouldReduceMotion:S,variantChildren:Y?new Set:void 0,isVisible:void 0,manuallyAnimateOnMount:!!(v!=null&&v.isMounted()),blockInitialAnimation:g,isMounted:function(){return!!R},mount:function(_){w=!0,R=D.current=_,D.projection&&D.projection.mount(_),Y&&v&&!U&&(F=v==null?void 0:v.addVariantChild(D)),V.forEach(function(E,O){return I(O,E)}),v==null||v.children.add(D),D.setProps(m)},unmount:function(){var _;(_=D.projection)===null||_===void 0||_.unmount(),zt.update(X),zt.render(A),N.forEach(function(E){return E()}),F==null||F(),v==null||v.children.delete(D),L.clearAllListeners(),R=void 0,w=!1},addVariantChild:function(_){var E,O=D.getClosestVariantNode();if(O)return(E=O.variantChildren)===null||E===void 0||E.add(_),function(){return O.variantChildren.delete(_)}},sortNodePosition:function(_){return!c||n!==_.treeType?0:c(D.getInstance(),_.getInstance())},getClosestVariantNode:function(){return Y?D:v==null?void 0:v.getClosestVariantNode()},getLayoutId:function(){return m.layoutId},getInstance:function(){return R},getStaticValue:function(_){return C[_]},setStaticValue:function(_,E){return C[_]=E},getLatestValues:function(){return C},setVisibility:function(_){D.isVisible!==_&&(D.isVisible=_,D.scheduleRender())},makeTargetAnimatable:function(_,E){return E===void 0&&(E=!0),a(D,_,m,E)},measureViewportBox:function(){return i(R,m)},addValue:function(_,E){D.hasValue(_)&&D.removeValue(_),V.set(_,E),C[_]=E.get(),I(_,E)},removeValue:function(_){var E;V.delete(_),(E=N.get(_))===null||E===void 0||E(),N.delete(_),delete C[_],l(_,T)},hasValue:function(_){return V.has(_)},getValue:function(_,E){var O=V.get(_);return O===void 0&&E!==void 0&&(O=Gt(E),D.addValue(_,O)),O},forEachValue:function(_){return V.forEach(_)},readValue:function(_){var E;return(E=C[_])!==null&&E!==void 0?E:u(R,_,p)},setBaseTarget:function(_,E){k[_]=E},getBaseTarget:function(_){if(o){var E=o(m,_);if(E!==void 0&&!_t(E))return E}return k[_]}},L),{build:function(){return z(),T},scheduleRender:function(){bt.render(A,!1,!0)},syncRender:A,setProps:function(_){(_.transformTemplate||m.transformTemplate)&&D.scheduleRender(),m=_,L.updatePropListeners(_),q=Ef(D,f(m),q)},getProps:function(){return m},getVariant:function(_){var E;return(E=m.variants)===null||E===void 0?void 0:E[_]},getDefaultTransition:function(){return m.transition},getTransformPagePoint:function(){return m.transformPagePoint},getVariantContext:function(_){if(_===void 0&&(_=!1),_)return v==null?void 0:v.getVariantContext();if(!U){var E=(v==null?void 0:v.getVariantContext())||{};return m.initial!==void 0&&(E.initial=m.initial),E}for(var O={},j=0;j<Vf;j++){var B=ua[j],$=m[B];(ht($)||$===!1)&&(O[B]=$)}return O}});return D}},ua=ft(["initial"],Q(fr),!1),Vf=ua.length;function kn(t){return typeof t=="string"&&t.startsWith("var(--")}var la=/var\((--[a-zA-Z0-9-_]+),? ?([a-zA-Z0-9 ()%#.,-]+)?\)/;function Af(t){var e=la.exec(t);if(!e)return[,];var n=Q(e,3),r=n[1],o=n[2];return[r,o]}var Mf=4;function Un(t,e,n){n===void 0&&(n=1),lt(n<=Mf,'Max CSS variable fallback depth detected in property "'.concat(t,'". This may indicate a circular fallback dependency.'));var r=Q(Af(t),2),o=r[0],a=r[1];if(o){var i=window.getComputedStyle(e).getPropertyValue(o);return i?i.trim():kn(a)?Un(a,e,n+1):a}}function If(t,e,n){var r,o=dt(e,[]),a=t.getInstance();if(!(a instanceof Element))return{target:o,transitionEnd:n};n&&(n=P({},n)),t.forEachValue(function(l){var c=l.get();if(kn(c)){var f=Un(c,a);f&&l.set(f)}});for(var i in o){var s=o[i];if(kn(s)){var u=Un(s,a);u&&(o[i]=u,n&&((r=n[i])!==null&&r!==void 0||(n[i]=s)))}}return{target:o,transitionEnd:n}}var Rf=new Set(["width","height","top","left","right","bottom","x","y"]),ca=function(t){return Rf.has(t)},jf=function(t){return Object.keys(t).some(ca)},fa=function(t,e){t.set(e,!1),t.set(e)},Ve=function(t){return t===Nt||t===M},vo;(function(t){t.width="width",t.height="height",t.left="left",t.right="right",t.top="top",t.bottom="bottom"})(vo||(vo={}));var po=function(t,e){return parseFloat(t.split(", ")[e])},ho=function(t,e){return function(n,r){var o=r.transform;if(o==="none"||!o)return 0;var a=o.match(/^matrix3d\((.+)\)$/);if(a)return po(a[1],e);var i=o.match(/^matrix\((.+)\)$/);return i?po(i[1],t):0}},Of=new Set(["x","y","z"]),Lf=ue.filter(function(t){return!Of.has(t)});function Df(t){var e=[];return Lf.forEach(function(n){var r=t.getValue(n);r!==void 0&&(e.push([n,r.get()]),r.set(n.startsWith("scale")?1:0))}),e.length&&t.syncRender(),e}var mo={width:function(t,e){var n=t.x,r=e.paddingLeft,o=r===void 0?"0":r,a=e.paddingRight,i=a===void 0?"0":a;return n.max-n.min-parseFloat(o)-parseFloat(i)},height:function(t,e){var n=t.y,r=e.paddingTop,o=r===void 0?"0":r,a=e.paddingBottom,i=a===void 0?"0":a;return n.max-n.min-parseFloat(o)-parseFloat(i)},top:function(t,e){var n=e.top;return parseFloat(n)},left:function(t,e){var n=e.left;return parseFloat(n)},bottom:function(t,e){var n=t.y,r=e.top;return parseFloat(r)+(n.max-n.min)},right:function(t,e){var n=t.x,r=e.left;return parseFloat(r)+(n.max-n.min)},x:ho(4,13),y:ho(5,14)},Bf=function(t,e,n){var r=e.measureViewportBox(),o=e.getInstance(),a=getComputedStyle(o),i=a.display,s={};i==="none"&&e.setStaticValue("display",t.display||"block"),n.forEach(function(l){s[l]=mo[l](r,a)}),e.syncRender();var u=e.measureViewportBox();return n.forEach(function(l){var c=e.getValue(l);fa(c,s[l]),t[l]=mo[l](u,a)}),t},Nf=function(t,e,n,r){n===void 0&&(n={}),r===void 0&&(r={}),e=P({},e),r=P({},r);var o=Object.keys(e).filter(ca),a=[],i=!1,s=[];if(o.forEach(function(c){var f=t.getValue(c);if(t.hasValue(c)){var d=n[c],p=Zt(d),v=e[c],m;if(ce(v)){var b=v.length,g=v[0]===null?1:0;d=v[g],p=Zt(d);for(var x=g;x<b;x++)m?lt(Zt(v[x])===m,"All keyframes must be of the same type"):(m=Zt(v[x]),lt(m===p||Ve(p)&&Ve(m),"Keyframes must be of the same dimension as the current value"))}else m=Zt(v);if(p!==m)if(Ve(p)&&Ve(m)){var S=f.get();typeof S=="string"&&f.set(parseFloat(S)),typeof v=="string"?e[c]=parseFloat(v):Array.isArray(v)&&m===M&&(e[c]=v.map(parseFloat))}else p!=null&&p.transform&&(m!=null&&m.transform)&&(d===0||v===0)?d===0?f.set(m.transform(d)):e[c]=p.transform(v):(i||(a=Df(t),i=!0),s.push(c),r[c]=r[c]!==void 0?r[c]:e[c],fa(f,v))}}),s.length){var u=s.indexOf("height")>=0?window.pageYOffset:null,l=Bf(e,t,s);return a.length&&a.forEach(function(c){var f=Q(c,2),d=f[0],p=f[1];t.getValue(d).set(p)}),t.syncRender(),u!==null&&window.scrollTo({top:u}),{target:l,transitionEnd:r}}else return{target:e,transitionEnd:r}};function Ff(t,e,n,r){return jf(e)?Nf(t,e,n,r):{target:e,transitionEnd:r}}var kf=function(t,e,n,r){var o=If(t,e,r);return e=o.target,r=o.transitionEnd,Ff(t,e,n,r)};function Uf(t){return window.getComputedStyle(t)}var da={treeType:"dom",readValueFromInstance:function(t,e){if(he(e)){var n=or(e);return n&&n.default||0}else{var r=Uf(t);return(ti(e)?r.getPropertyValue(e):r[e])||0}},sortNodePosition:function(t,e){return t.compareDocumentPosition(e)&2?1:-1},getBaseTarget:function(t,e){var n;return(n=t.style)===null||n===void 0?void 0:n[e]},measureViewportBox:function(t,e){var n=e.transformPagePoint;return aa(t,n)},resetTransform:function(t,e,n){var r=n.transformTemplate;e.style.transform=r?r({},""):"none",t.scheduleRender()},restoreTransform:function(t,e){t.style.transform=e.style.transform},removeValueFromRenderState:function(t,e){var n=e.vars,r=e.style;delete n[t],delete r[t]},makeTargetAnimatable:function(t,e,n,r){var o=n.transformValues;r===void 0&&(r=!0);var a=e.transition,i=e.transitionEnd,s=dt(e,["transition","transitionEnd"]),u=Gc(s,a||{},t);if(o&&(i&&(i=o(i)),s&&(s=o(s)),u&&(u=o(u))),r){Wc(t,s,u);var l=kf(t,s,u,i);i=l.transitionEnd,s=l.target}return P({transition:a,transitionEnd:i},s)},scrapeMotionValuesFromProps:qn,build:function(t,e,n,r,o){t.isVisible!==void 0&&(e.style.visibility=t.isVisible?"visible":"hidden"),Gn(e,n,r,o.transformTemplate)},render:vi},$f=sa(da),Hf=sa(P(P({},da),{getBaseTarget:function(t,e){return t[e]},readValueFromInstance:function(t,e){var n;return he(e)?((n=or(e))===null||n===void 0?void 0:n.default)||0:(e=pi.has(e)?e:di(e),t.getAttribute(e))},scrapeMotionValuesFromProps:mi,build:function(t,e,n,r,o){Yn(e,n,r,o.transformTemplate)},render:hi})),Wf=function(t,e){return Wn(t)?Hf(e,{enableHardwareAcceleration:!1}):$f(e,{enableHardwareAcceleration:!0})};function go(t,e){return e.max===e.min?0:t/(e.max-e.min)*100}var Jt={correct:function(t,e){if(!e.target)return t;if(typeof t=="string")if(M.test(t))t=parseFloat(t);else return t;var n=go(t,e.target.x),r=go(t,e.target.y);return"".concat(n,"% ").concat(r,"%")}},yo="_$css",zf={correct:function(t,e){var n=e.treeScale,r=e.projectionDelta,o=t,a=t.includes("var("),i=[];a&&(t=t.replace(la,function(m){return i.push(m),yo}));var s=Ct.parse(t);if(s.length>5)return o;var u=Ct.createTransformer(t),l=typeof s[0]!="number"?1:0,c=r.x.scale*n.x,f=r.y.scale*n.y;s[0+l]/=c,s[1+l]/=f;var d=Z(c,f,.5);typeof s[2+l]=="number"&&(s[2+l]/=d),typeof s[3+l]=="number"&&(s[3+l]/=d);var p=u(s);if(a){var v=0;p=p.replace(yo,function(){var m=i[v];return v++,m})}return p}},Gf=function(t){$o(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.componentDidMount=function(){var n=this,r=this.props,o=r.visualElement,a=r.layoutGroup,i=r.switchLayoutGroup,s=r.layoutId,u=o.projection;gu(Yf),u&&(a!=null&&a.group&&a.group.add(u),i!=null&&i.register&&s&&i.register(u),u.root.didUpdate(),u.addEventListener("animationComplete",function(){n.safeToRemove()}),u.setOptions(P(P({},u.options),{onExitComplete:function(){return n.safeToRemove()}}))),Qt.hasEverUpdated=!0},e.prototype.getSnapshotBeforeUpdate=function(n){var r=this,o=this.props,a=o.layoutDependency,i=o.visualElement,s=o.drag,u=o.isPresent,l=i.projection;return l&&(l.isPresent=u,s||n.layoutDependency!==a||a===void 0?l.willUpdate():this.safeToRemove(),n.isPresent!==u&&(u?l.promote():l.relegate()||bt.postRender(function(){var c;!((c=l.getStack())===null||c===void 0)&&c.members.length||r.safeToRemove()}))),null},e.prototype.componentDidUpdate=function(){var n=this.props.visualElement.projection;n&&(n.root.didUpdate(),!n.currentAnimation&&n.isLead()&&this.safeToRemove())},e.prototype.componentWillUnmount=function(){var n=this.props,r=n.visualElement,o=n.layoutGroup,a=n.switchLayoutGroup,i=r.projection;i&&(i.scheduleCheckAfterUnmount(),o!=null&&o.group&&o.group.remove(i),a!=null&&a.deregister&&a.deregister(i))},e.prototype.safeToRemove=function(){var n=this.props.safeToRemove;n==null||n()},e.prototype.render=function(){return null},e}(h.Component);function Kf(t){var e=Q(qi(),2),n=e[0],r=e[1],o=h.useContext(Xo);return h.createElement(Gf,P({},t,{layoutGroup:o,switchLayoutGroup:h.useContext(Zo),isPresent:n,safeToRemove:r}))}var Yf={borderRadius:P(P({},Jt),{applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]}),borderTopLeftRadius:Jt,borderTopRightRadius:Jt,borderBottomLeftRadius:Jt,borderBottomRightRadius:Jt,boxShadow:zf},qf={measureLayout:Kf};function Xf(t,e,n){n===void 0&&(n={});var r=_t(t)?t:Gt(t);return sr("",r,e,n),{stop:function(){return r.stop()},isAnimating:function(){return r.isAnimating()}}}var va=["TopLeft","TopRight","BottomLeft","BottomRight"],Zf=va.length,So=function(t){return typeof t=="string"?parseFloat(t):t},bo=function(t){return typeof t=="number"||M.test(t)};function Jf(t,e,n,r,o,a){var i,s,u,l;o?(t.opacity=Z(0,(i=n.opacity)!==null&&i!==void 0?i:1,Qf(r)),t.opacityExit=Z((s=e.opacity)!==null&&s!==void 0?s:1,0,td(r))):a&&(t.opacity=Z((u=e.opacity)!==null&&u!==void 0?u:1,(l=n.opacity)!==null&&l!==void 0?l:1,r));for(var c=0;c<Zf;c++){var f="border".concat(va[c],"Radius"),d=xo(e,f),p=xo(n,f);if(!(d===void 0&&p===void 0)){d||(d=0),p||(p=0);var v=d===0||p===0||bo(d)===bo(p);v?(t[f]=Math.max(Z(So(d),So(p),r),0),(St.test(p)||St.test(d))&&(t[f]+="%")):t[f]=p}}(e.rotate||n.rotate)&&(t.rotate=Z(e.rotate||0,n.rotate||0,r))}function xo(t,e){var n;return(n=t[e])!==null&&n!==void 0?n:t.borderRadius}var Qf=pa(0,.5,nr),td=pa(.5,.95,tr);function pa(t,e,n){return function(r){return r<t?0:r>e?1:n(fe(t,e,r))}}function Po(t,e){t.min=e.min,t.max=e.max}function pt(t,e){Po(t.x,e.x),Po(t.y,e.y)}function wo(t,e,n,r,o){return t-=e,t=Ue(t,1/n,r),o!==void 0&&(t=Ue(t,1/o,r)),t}function ed(t,e,n,r,o,a,i){if(e===void 0&&(e=0),n===void 0&&(n=1),r===void 0&&(r=.5),a===void 0&&(a=t),i===void 0&&(i=t),St.test(e)){e=parseFloat(e);var s=Z(i.min,i.max,e/100);e=s-i.min}if(typeof e=="number"){var u=Z(a.min,a.max,r);t===a&&(u-=e),t.min=wo(t.min,e,n,u,o),t.max=wo(t.max,e,n,u,o)}}function _o(t,e,n,r,o){var a=Q(n,3),i=a[0],s=a[1],u=a[2];ed(t,e[i],e[s],e[u],e.scale,r,o)}var nd=["x","scaleX","originX"],rd=["y","scaleY","originY"];function Co(t,e,n,r){_o(t.x,e,nd,n==null?void 0:n.x,r==null?void 0:r.x),_o(t.y,e,rd,n==null?void 0:n.y,r==null?void 0:r.y)}function To(t){return t.translate===0&&t.scale===1}function ha(t){return To(t.x)&&To(t.y)}function ma(t,e){return t.x.min===e.x.min&&t.x.max===e.x.max&&t.y.min===e.y.min&&t.y.max===e.y.max}var od=function(){function t(){this.members=[]}return t.prototype.add=function(e){ur(this.members,e),e.scheduleRender()},t.prototype.remove=function(e){if(lr(this.members,e),e===this.prevLead&&(this.prevLead=void 0),e===this.lead){var n=this.members[this.members.length-1];n&&this.promote(n)}},t.prototype.relegate=function(e){var n=this.members.findIndex(function(i){return e===i});if(n===0)return!1;for(var r,o=n;o>=0;o--){var a=this.members[o];if(a.isPresent!==!1){r=a;break}}return r?(this.promote(r),!0):!1},t.prototype.promote=function(e,n){var r,o=this.lead;if(e!==o&&(this.prevLead=o,this.lead=e,e.show(),o)){o.instance&&o.scheduleRender(),e.scheduleRender(),e.resumeFrom=o,n&&(e.resumeFrom.preserveOpacity=!0),o.snapshot&&(e.snapshot=o.snapshot,e.snapshot.latestValues=o.animationValues||o.latestValues,e.snapshot.isShared=!0),!((r=e.root)===null||r===void 0)&&r.isUpdating&&(e.isLayoutDirty=!0);var a=e.options.crossfade;a===!1&&o.hide()}},t.prototype.exitAnimationComplete=function(){this.members.forEach(function(e){var n,r,o,a,i;(r=(n=e.options).onExitComplete)===null||r===void 0||r.call(n),(i=(o=e.resumingFrom)===null||o===void 0?void 0:(a=o.options).onExitComplete)===null||i===void 0||i.call(a)})},t.prototype.scheduleRender=function(){this.members.forEach(function(e){e.instance&&e.scheduleRender(!1)})},t.prototype.removeLeadSnapshot=function(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)},t}(),id="translate3d(0px, 0px, 0) scale(1, 1) scale(1, 1)";function Eo(t,e,n){var r=t.x.translate/e.x,o=t.y.translate/e.y,a="translate3d(".concat(r,"px, ").concat(o,"px, 0) ");if(a+="scale(".concat(1/e.x,", ").concat(1/e.y,") "),n){var i=n.rotate,s=n.rotateX,u=n.rotateY;i&&(a+="rotate(".concat(i,"deg) ")),s&&(a+="rotateX(".concat(s,"deg) ")),u&&(a+="rotateY(".concat(u,"deg) "))}var l=t.x.scale*e.x,c=t.y.scale*e.y;return a+="scale(".concat(l,", ").concat(c,")"),a===id?"none":a}var ad=function(t,e){return t.depth-e.depth},sd=function(){function t(){this.children=[],this.isDirty=!1}return t.prototype.add=function(e){ur(this.children,e),this.isDirty=!0},t.prototype.remove=function(e){lr(this.children,e),this.isDirty=!0},t.prototype.forEach=function(e){this.isDirty&&this.children.sort(ad),this.isDirty=!1,this.children.forEach(e)},t}(),Vo=1e3;function ga(t){var e=t.attachResizeListener,n=t.defaultParent,r=t.measureScroll,o=t.checkIsScrollRoot,a=t.resetTransform;return function(){function i(s,u,l){var c=this;u===void 0&&(u={}),l===void 0&&(l=n==null?void 0:n()),this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.potentialNodes=new Map,this.checkUpdateFailed=function(){c.isUpdating&&(c.isUpdating=!1,c.clearAllSnapshots())},this.updateProjection=function(){c.nodes.forEach(vd),c.nodes.forEach(pd)},this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.id=s,this.latestValues=u,this.root=l?l.root||l:this,this.path=l?ft(ft([],Q(l.path),!1),[l],!1):[],this.parent=l,this.depth=l?l.depth+1:0,s&&this.root.registerPotentialNode(s,this);for(var f=0;f<this.path.length;f++)this.path[f].shouldResetTransform=!0;this.root===this&&(this.nodes=new sd)}return i.prototype.addEventListener=function(s,u){return this.eventHandlers.has(s)||this.eventHandlers.set(s,new ne),this.eventHandlers.get(s).add(u)},i.prototype.notifyListeners=function(s){for(var u=[],l=1;l<arguments.length;l++)u[l-1]=arguments[l];var c=this.eventHandlers.get(s);c==null||c.notify.apply(c,ft([],Q(u),!1))},i.prototype.hasListeners=function(s){return this.eventHandlers.has(s)},i.prototype.registerPotentialNode=function(s,u){this.potentialNodes.set(s,u)},i.prototype.mount=function(s,u){var l=this,c;if(u===void 0&&(u=!1),!this.instance){this.isSVG=s instanceof SVGElement&&s.tagName!=="svg",this.instance=s;var f=this.options,d=f.layoutId,p=f.layout,v=f.visualElement;if(v&&!v.getInstance()&&v.mount(s),this.root.nodes.add(this),(c=this.parent)===null||c===void 0||c.children.add(this),this.id&&this.root.potentialNodes.delete(this.id),u&&(p||d)&&(this.isLayoutDirty=!0),e){var m,b=function(){return l.root.updateBlockedByResize=!1};e(s,function(){l.root.updateBlockedByResize=!0,clearTimeout(m),m=window.setTimeout(b,250),Qt.hasAnimatedSinceResize&&(Qt.hasAnimatedSinceResize=!1,l.nodes.forEach(dd))})}d&&this.root.registerSharedNode(d,this),this.options.animate!==!1&&v&&(d||p)&&this.addEventListener("didUpdate",function(g){var x,S,w,C,T,R=g.delta,L=g.hasLayoutChanged,V=g.hasRelativeTargetChanged,N=g.layout;if(l.isTreeAnimationBlocked()){l.target=void 0,l.relativeTarget=void 0;return}var q=(S=(x=l.options.transition)!==null&&x!==void 0?x:v.getDefaultTransition())!==null&&S!==void 0?S:Sd,k=v.getProps(),F=k.onLayoutAnimationStart,A=k.onLayoutAnimationComplete,z=!l.targetLayout||!ma(l.targetLayout,N)||V,X=!L&&V;if(!((w=l.resumeFrom)===null||w===void 0)&&w.instance||X||L&&(z||!l.currentAnimation)){l.resumeFrom&&(l.resumingFrom=l.resumeFrom,l.resumingFrom.resumingFrom=void 0),l.setAnimationOrigin(R,X);var I=P(P({},ar(q,"layout")),{onPlay:F,onComplete:A});v.shouldReduceMotion&&(I.delay=0,I.type=!1),l.startAnimation(I)}else!L&&l.animationProgress===0&&l.finishAnimation(),l.isLead()&&((T=(C=l.options).onExitComplete)===null||T===void 0||T.call(C));l.targetLayout=N})}},i.prototype.unmount=function(){var s,u;this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this),(s=this.getStack())===null||s===void 0||s.remove(this),(u=this.parent)===null||u===void 0||u.children.delete(this),this.instance=void 0,zt.preRender(this.updateProjection)},i.prototype.blockUpdate=function(){this.updateManuallyBlocked=!0},i.prototype.unblockUpdate=function(){this.updateManuallyBlocked=!1},i.prototype.isUpdateBlocked=function(){return this.updateManuallyBlocked||this.updateBlockedByResize},i.prototype.isTreeAnimationBlocked=function(){var s;return this.isAnimationBlocked||((s=this.parent)===null||s===void 0?void 0:s.isTreeAnimationBlocked())||!1},i.prototype.startUpdate=function(){var s;this.isUpdateBlocked()||(this.isUpdating=!0,(s=this.nodes)===null||s===void 0||s.forEach(hd))},i.prototype.willUpdate=function(s){var u,l,c;if(s===void 0&&(s=!0),this.root.isUpdateBlocked()){(l=(u=this.options).onExitComplete)===null||l===void 0||l.call(u);return}if(!this.root.isUpdating&&this.root.startUpdate(),!this.isLayoutDirty){this.isLayoutDirty=!0;for(var f=0;f<this.path.length;f++){var d=this.path[f];d.shouldResetTransform=!0,d.updateScroll()}var p=this.options,v=p.layoutId,m=p.layout;if(!(v===void 0&&!m)){var b=(c=this.options.visualElement)===null||c===void 0?void 0:c.getProps().transformTemplate;this.prevTransformTemplateValue=b==null?void 0:b(this.latestValues,""),this.updateSnapshot(),s&&this.notifyListeners("willUpdate")}}},i.prototype.didUpdate=function(){var s=this.isUpdateBlocked();if(s){this.unblockUpdate(),this.clearAllSnapshots(),this.nodes.forEach(Ao);return}this.isUpdating&&(this.isUpdating=!1,this.potentialNodes.size&&(this.potentialNodes.forEach(bd),this.potentialNodes.clear()),this.nodes.forEach(fd),this.nodes.forEach(ud),this.nodes.forEach(ld),this.clearAllSnapshots(),fn.update(),fn.preRender(),fn.render())},i.prototype.clearAllSnapshots=function(){this.nodes.forEach(cd),this.sharedNodes.forEach(md)},i.prototype.scheduleUpdateProjection=function(){bt.preRender(this.updateProjection,!1,!0)},i.prototype.scheduleCheckAfterUnmount=function(){var s=this;bt.postRender(function(){s.isLayoutDirty?s.root.didUpdate():s.root.checkUpdateFailed()})},i.prototype.updateSnapshot=function(){if(!(this.snapshot||!this.instance)){var s=this.measure(),u=this.removeTransform(this.removeElementScroll(s));jo(u),this.snapshot={measured:s,layout:u,latestValues:{}}}},i.prototype.updateLayout=function(){var s;if(this.instance&&(this.updateScroll(),!(!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))){if(this.resumeFrom&&!this.resumeFrom.instance)for(var u=0;u<this.path.length;u++){var l=this.path[u];l.updateScroll()}var c=this.measure();jo(c);var f=this.layout;this.layout={measured:c,actual:this.removeElementScroll(c)},this.layoutCorrected=it(),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.actual),(s=this.options.visualElement)===null||s===void 0||s.notifyLayoutMeasure(this.layout.actual,f==null?void 0:f.actual)}},i.prototype.updateScroll=function(){this.options.layoutScroll&&this.instance&&(this.isScrollRoot=o(this.instance),this.scroll=r(this.instance))},i.prototype.resetTransform=function(){var s;if(a){var u=this.isLayoutDirty||this.shouldResetTransform,l=this.projectionDelta&&!ha(this.projectionDelta),c=(s=this.options.visualElement)===null||s===void 0?void 0:s.getProps().transformTemplate,f=c==null?void 0:c(this.latestValues,""),d=f!==this.prevTransformTemplateValue;u&&(l||At(this.latestValues)||d)&&(a(this.instance,f),this.shouldResetTransform=!1,this.scheduleRender())}},i.prototype.measure=function(){var s=this.options.visualElement;if(!s)return it();var u=s.measureViewportBox(),l=this.root.scroll;return l&&(Mt(u.x,l.x),Mt(u.y,l.y)),u},i.prototype.removeElementScroll=function(s){var u=it();pt(u,s);for(var l=0;l<this.path.length;l++){var c=this.path[l],f=c.scroll,d=c.options,p=c.isScrollRoot;if(c!==this.root&&f&&d.layoutScroll){if(p){pt(u,s);var v=this.root.scroll;v&&(Mt(u.x,-v.x),Mt(u.y,-v.y))}Mt(u.x,f.x),Mt(u.y,f.y)}}return u},i.prototype.applyTransform=function(s,u){u===void 0&&(u=!1);var l=it();pt(l,s);for(var c=0;c<this.path.length;c++){var f=this.path[c];!u&&f.options.layoutScroll&&f.scroll&&f!==f.root&&$t(l,{x:-f.scroll.x,y:-f.scroll.y}),At(f.latestValues)&&$t(l,f.latestValues)}return At(this.latestValues)&&$t(l,this.latestValues),l},i.prototype.removeTransform=function(s){var u,l=it();pt(l,s);for(var c=0;c<this.path.length;c++){var f=this.path[c];if(f.instance&&At(f.latestValues)){oa(f.latestValues)&&f.updateSnapshot();var d=it(),p=f.measure();pt(d,p),Co(l,f.latestValues,(u=f.snapshot)===null||u===void 0?void 0:u.layout,d)}}return At(this.latestValues)&&Co(l,this.latestValues),l},i.prototype.setTargetDelta=function(s){this.targetDelta=s,this.root.scheduleUpdateProjection()},i.prototype.setOptions=function(s){var u;this.options=P(P(P({},this.options),s),{crossfade:(u=s.crossfade)!==null&&u!==void 0?u:!0})},i.prototype.clearMeasurements=function(){this.scroll=void 0,this.layout=void 0,this.snapshot=void 0,this.prevTransformTemplateValue=void 0,this.targetDelta=void 0,this.target=void 0,this.isLayoutDirty=!1},i.prototype.resolveTargetDelta=function(){var s,u=this.options,l=u.layout,c=u.layoutId;!this.layout||!(l||c)||(!this.targetDelta&&!this.relativeTarget&&(this.relativeParent=this.getClosestProjectingParent(),this.relativeParent&&this.relativeParent.layout&&(this.relativeTarget=it(),this.relativeTargetOrigin=it(),oe(this.relativeTargetOrigin,this.layout.actual,this.relativeParent.layout.actual),pt(this.relativeTarget,this.relativeTargetOrigin))),!(!this.relativeTarget&&!this.targetDelta)&&(this.target||(this.target=it(),this.targetWithTransforms=it()),this.relativeTarget&&this.relativeTargetOrigin&&(!((s=this.relativeParent)===null||s===void 0)&&s.target)?sf(this.target,this.relativeTarget,this.relativeParent.target):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.actual):pt(this.target,this.layout.actual),ia(this.target,this.targetDelta)):pt(this.target,this.layout.actual),this.attemptToResolveRelativeTarget&&(this.attemptToResolveRelativeTarget=!1,this.relativeParent=this.getClosestProjectingParent(),this.relativeParent&&!!this.relativeParent.resumingFrom==!!this.resumingFrom&&!this.relativeParent.options.layoutScroll&&this.relativeParent.target&&(this.relativeTarget=it(),this.relativeTargetOrigin=it(),oe(this.relativeTargetOrigin,this.target,this.relativeParent.target),pt(this.relativeTarget,this.relativeTargetOrigin)))))},i.prototype.getClosestProjectingParent=function(){if(!(!this.parent||At(this.parent.latestValues)))return(this.parent.relativeTarget||this.parent.targetDelta)&&this.parent.layout?this.parent:this.parent.getClosestProjectingParent()},i.prototype.calcProjection=function(){var s,u=this.options,l=u.layout,c=u.layoutId;if(this.isTreeAnimating=!!(!((s=this.parent)===null||s===void 0)&&s.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!(!this.layout||!(l||c))){var f=this.getLead();pt(this.layoutCorrected,this.layout.actual),mf(this.layoutCorrected,this.treeScale,this.path,!!this.resumingFrom||this!==f);var d=f.target;if(d){this.projectionDelta||(this.projectionDelta=ie(),this.projectionDeltaWithTransform=ie());var p=this.treeScale.x,v=this.treeScale.y,m=this.projectionTransform;re(this.projectionDelta,this.layoutCorrected,d,this.latestValues),this.projectionTransform=Eo(this.projectionDelta,this.treeScale),(this.projectionTransform!==m||this.treeScale.x!==p||this.treeScale.y!==v)&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",d))}}},i.prototype.hide=function(){this.isVisible=!1},i.prototype.show=function(){this.isVisible=!0},i.prototype.scheduleRender=function(s){var u,l,c;s===void 0&&(s=!0),(l=(u=this.options).scheduleRender)===null||l===void 0||l.call(u),s&&((c=this.getStack())===null||c===void 0||c.scheduleRender()),this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)},i.prototype.setAnimationOrigin=function(s,u){var l=this,c;u===void 0&&(u=!1);var f=this.snapshot,d=(f==null?void 0:f.latestValues)||{},p=P({},this.latestValues),v=ie();this.relativeTarget=this.relativeTargetOrigin=void 0,this.attemptToResolveRelativeTarget=!u;var m=it(),b=f==null?void 0:f.isShared,g=(((c=this.getStack())===null||c===void 0?void 0:c.members.length)||0)<=1,x=!!(b&&!g&&this.options.crossfade===!0&&!this.path.some(yd));this.animationProgress=0,this.mixTargetDelta=function(S){var w,C=S/1e3;Mo(v.x,s.x,C),Mo(v.y,s.y,C),l.setTargetDelta(v),l.relativeTarget&&l.relativeTargetOrigin&&l.layout&&(!((w=l.relativeParent)===null||w===void 0)&&w.layout)&&(oe(m,l.layout.actual,l.relativeParent.layout.actual),gd(l.relativeTarget,l.relativeTargetOrigin,m,C)),b&&(l.animationValues=p,Jf(p,d,l.latestValues,C,x,g)),l.root.scheduleUpdateProjection(),l.scheduleRender(),l.animationProgress=C},this.mixTargetDelta(0)},i.prototype.startAnimation=function(s){var u=this,l,c;this.notifyListeners("animationStart"),(l=this.currentAnimation)===null||l===void 0||l.stop(),this.resumingFrom&&((c=this.resumingFrom.currentAnimation)===null||c===void 0||c.stop()),this.pendingAnimation&&(zt.update(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=bt.update(function(){Qt.hasAnimatedSinceResize=!0,u.currentAnimation=Xf(0,Vo,P(P({},s),{onUpdate:function(f){var d;u.mixTargetDelta(f),(d=s.onUpdate)===null||d===void 0||d.call(s,f)},onComplete:function(){var f;(f=s.onComplete)===null||f===void 0||f.call(s),u.completeAnimation()}})),u.resumingFrom&&(u.resumingFrom.currentAnimation=u.currentAnimation),u.pendingAnimation=void 0})},i.prototype.completeAnimation=function(){var s;this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0),(s=this.getStack())===null||s===void 0||s.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")},i.prototype.finishAnimation=function(){var s;this.currentAnimation&&((s=this.mixTargetDelta)===null||s===void 0||s.call(this,Vo),this.currentAnimation.stop()),this.completeAnimation()},i.prototype.applyTransformsToTarget=function(){var s=this.getLead(),u=s.targetWithTransforms,l=s.target,c=s.layout,f=s.latestValues;!u||!l||!c||(pt(u,l),$t(u,f),re(this.projectionDeltaWithTransform,this.layoutCorrected,u,f))},i.prototype.registerSharedNode=function(s,u){var l,c,f;this.sharedNodes.has(s)||this.sharedNodes.set(s,new od);var d=this.sharedNodes.get(s);d.add(u),u.promote({transition:(l=u.options.initialPromotionConfig)===null||l===void 0?void 0:l.transition,preserveFollowOpacity:(f=(c=u.options.initialPromotionConfig)===null||c===void 0?void 0:c.shouldPreserveFollowOpacity)===null||f===void 0?void 0:f.call(c,u)})},i.prototype.isLead=function(){var s=this.getStack();return s?s.lead===this:!0},i.prototype.getLead=function(){var s,u=this.options.layoutId;return u?((s=this.getStack())===null||s===void 0?void 0:s.lead)||this:this},i.prototype.getPrevLead=function(){var s,u=this.options.layoutId;return u?(s=this.getStack())===null||s===void 0?void 0:s.prevLead:void 0},i.prototype.getStack=function(){var s=this.options.layoutId;if(s)return this.root.sharedNodes.get(s)},i.prototype.promote=function(s){var u=s===void 0?{}:s,l=u.needsReset,c=u.transition,f=u.preserveFollowOpacity,d=this.getStack();d&&d.promote(this,f),l&&(this.projectionDelta=void 0,this.needsReset=!0),c&&this.setOptions({transition:c})},i.prototype.relegate=function(){var s=this.getStack();return s?s.relegate(this):!1},i.prototype.resetRotation=function(){var s=this.options.visualElement;if(s){for(var u=!1,l={},c=0;c<Cn.length;c++){var f=Cn[c],d="rotate"+f;s.getStaticValue(d)&&(u=!0,l[d]=s.getStaticValue(d),s.setStaticValue(d,0))}if(u){s==null||s.syncRender();for(var d in l)s.setStaticValue(d,l[d]);s.scheduleRender()}}},i.prototype.getProjectionStyles=function(s){var u,l,c,f,d,p;s===void 0&&(s={});var v={};if(!this.instance||this.isSVG)return v;if(this.isVisible)v.visibility="";else return{visibility:"hidden"};var m=(u=this.options.visualElement)===null||u===void 0?void 0:u.getProps().transformTemplate;if(this.needsReset)return this.needsReset=!1,v.opacity="",v.pointerEvents=Me(s.pointerEvents)||"",v.transform=m?m(this.latestValues,""):"none",v;var b=this.getLead();if(!this.projectionDelta||!this.layout||!b.target){var g={};return this.options.layoutId&&(g.opacity=(l=this.latestValues.opacity)!==null&&l!==void 0?l:1,g.pointerEvents=Me(s.pointerEvents)||""),this.hasProjected&&!At(this.latestValues)&&(g.transform=m?m({},""):"none",this.hasProjected=!1),g}var x=b.animationValues||b.latestValues;this.applyTransformsToTarget(),v.transform=Eo(this.projectionDeltaWithTransform,this.treeScale,x),m&&(v.transform=m(x,v.transform));var S=this.projectionDelta,w=S.x,C=S.y;v.transformOrigin="".concat(w.origin*100,"% ").concat(C.origin*100,"% 0"),b.animationValues?v.opacity=b===this?(f=(c=x.opacity)!==null&&c!==void 0?c:this.latestValues.opacity)!==null&&f!==void 0?f:1:this.preserveOpacity?this.latestValues.opacity:x.opacityExit:v.opacity=b===this?(d=x.opacity)!==null&&d!==void 0?d:"":(p=x.opacityExit)!==null&&p!==void 0?p:0;for(var T in je)if(x[T]!==void 0){var R=je[T],L=R.correct,V=R.applyTo,N=L(x[T],b);if(V)for(var q=V.length,k=0;k<q;k++)v[V[k]]=N;else v[T]=N}return this.options.layoutId&&(v.pointerEvents=b===this?Me(s.pointerEvents)||"":"none"),v},i.prototype.clearSnapshot=function(){this.resumeFrom=this.snapshot=void 0},i.prototype.resetTree=function(){this.root.nodes.forEach(function(s){var u;return(u=s.currentAnimation)===null||u===void 0?void 0:u.stop()}),this.root.nodes.forEach(Ao),this.root.sharedNodes.clear()},i}()}function ud(t){t.updateLayout()}function ld(t){var e,n,r,o,a=(n=(e=t.resumeFrom)===null||e===void 0?void 0:e.snapshot)!==null&&n!==void 0?n:t.snapshot;if(t.isLead()&&t.layout&&a&&t.hasListeners("didUpdate")){var i=t.layout,s=i.actual,u=i.measured;t.options.animationType==="size"?yt(function(x){var S=a.isShared?a.measured[x]:a.layout[x],w=Tt(S);S.min=s[x].min,S.max=S.min+w}):t.options.animationType==="position"&&yt(function(x){var S=a.isShared?a.measured[x]:a.layout[x],w=Tt(s[x]);S.max=S.min+w});var l=ie();re(l,s,a.layout);var c=ie();a.isShared?re(c,t.applyTransform(u,!0),a.measured):re(c,s,a.layout);var f=!ha(l),d=!1;if(!t.resumeFrom&&(t.relativeParent=t.getClosestProjectingParent(),t.relativeParent&&!t.relativeParent.resumeFrom)){var p=t.relativeParent,v=p.snapshot,m=p.layout;if(v&&m){var b=it();oe(b,a.layout,v.layout);var g=it();oe(g,s,m.actual),ma(b,g)||(d=!0)}}t.notifyListeners("didUpdate",{layout:s,snapshot:a,delta:c,layoutDelta:l,hasLayoutChanged:f,hasRelativeTargetChanged:d})}else t.isLead()&&((o=(r=t.options).onExitComplete)===null||o===void 0||o.call(r));t.options.transition=void 0}function cd(t){t.clearSnapshot()}function Ao(t){t.clearMeasurements()}function fd(t){var e=t.options.visualElement;e!=null&&e.getProps().onBeforeLayoutMeasure&&e.notifyBeforeLayoutMeasure(),t.resetTransform()}function dd(t){t.finishAnimation(),t.targetDelta=t.relativeTarget=t.target=void 0}function vd(t){t.resolveTargetDelta()}function pd(t){t.calcProjection()}function hd(t){t.resetRotation()}function md(t){t.removeLeadSnapshot()}function Mo(t,e,n){t.translate=Z(e.translate,0,n),t.scale=Z(e.scale,1,n),t.origin=e.origin,t.originPoint=e.originPoint}function Io(t,e,n,r){t.min=Z(e.min,n.min,r),t.max=Z(e.max,n.max,r)}function gd(t,e,n,r){Io(t.x,e.x,n.x,r),Io(t.y,e.y,n.y,r)}function yd(t){return t.animationValues&&t.animationValues.opacityExit!==void 0}var Sd={duration:.45,ease:[.4,0,.1,1]};function bd(t,e){for(var n=t.root,r=t.path.length-1;r>=0;r--)if(t.path[r].instance){n=t.path[r];break}var o=n&&n!==t.root?n.instance:document,a=o.querySelector('[data-projection-id="'.concat(e,'"]'));a&&t.mount(a,!0)}function Ro(t){t.min=Math.round(t.min),t.max=Math.round(t.max)}function jo(t){Ro(t.x),Ro(t.y)}var xd=ga({attachResizeListener:function(t,e){return Ke(t,"resize",e)},measureScroll:function(){return{x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}},checkIsScrollRoot:function(){return!0}}),gn={current:void 0},Pd=ga({measureScroll:function(t){return{x:t.scrollLeft,y:t.scrollTop}},defaultParent:function(){if(!gn.current){var t=new xd(0,{});t.mount(window),t.setOptions({layoutScroll:!0}),gn.current=t}return gn.current},resetTransform:function(t,e){t.style.transform=e??"none"},checkIsScrollRoot:function(t){return window.getComputedStyle(t).position==="fixed"}}),wd=P(P(P(P({},rf),xc),Cf),qf),_d=hu(function(t,e){return tl(t,e,wd,Wf,Pd)});function Cd(){var t=!1,e=[],n=new Set,r={subscribe:function(o){return n.add(o),function(){return void n.delete(o)}},start:function(o,a){if(t){var i=[];return n.forEach(function(s){i.push(Qi(s,o,{transitionOverride:a}))}),Promise.all(i)}else return new Promise(function(s){e.push({animation:[o,a],resolve:s})})},set:function(o){return lt(t,"controls.set() should only be called after a component has mounted. Consider calling within a useEffect hook."),n.forEach(function(a){Hc(a,o)})},stop:function(){n.forEach(function(o){Yc(o)})},mount:function(){return t=!0,e.forEach(function(o){var a=o.animation,i=o.resolve;r.start.apply(r,ft([],Q(a),!1)).then(i)}),function(){t=!1,r.stop()}}};return r}function Td(){var t=pe(Cd);return h.useEffect(t.mount,[]),t}var Ed=Td;const Vd=({onClose:t,threshold:e=.08,children:n})=>{const r=h.useRef(null),o=Ed(),a=(i,s)=>{const u=r.current;if(!u)return;const l=u.getBoundingClientRect().height;s.offset.y>l*e?t():o.start({y:0,transition:{type:"spring",stiffness:300,damping:30}})};return y.jsx(_d.div,{ref:r,style:{height:"100%",width:"100%"},drag:"y",dragConstraints:{top:0},dragMomentum:!1,dragElastic:0,animate:o,initial:{y:0},onDragEnd:a,children:n})},Ad=({width:t="100%",height:e="100%",fill:n="white",...r})=>y.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:t,height:e,fill:"none",viewBox:"0 0 24 24",...r,children:y.jsx("path",{fill:n,fillRule:"evenodd",d:"M19.207 6.207a1 1 0 0 0-1.414-1.414L12 10.586 6.207 4.793a1 1 0 0 0-1.414 1.414L10.586 12l-5.793 5.793a1 1 0 1 0 1.414 1.414L12 13.414l5.793 5.793a1 1 0 0 0 1.414-1.414L13.414 12l5.793-5.793z",clipRule:"evenodd"})}),ya=({stories:t,currentIndex:e,onAllStoriesEnd:n,onOverlayClick:r,onStoryChange:o,inline:a,loop:i,onClose:s,className:u=""})=>{const[l,c]=h.useState(0),f=()=>{c(v=>v+1)},d=()=>{n&&n(),i&&f()};if((t==null?void 0:t.length)==0)return y.jsx(y.Fragment,{});const p=a?({children:v})=>v:Vd;return y.jsxs("div",{className:Bt(Et.StoryPlayer,u,{[Et.inline]:a}),children:[y.jsx("div",{className:Et.Overlay,onClick:r}),y.jsx("div",{className:Et.StoryPlayer__Wrap,children:y.jsxs(p,{onClose:s,children:[y.jsx("div",{className:Et.CloseIcon,onClick:s,children:y.jsx(Ad,{})}),y.jsx(qs,{onStoryChange:o,currentIndex:e,stories:t,width:"100%",height:"100%",onAllStoriesEnd:d,classNames:{progressContainer:Et.progressContainer,progressBar:Et.progressBar,progressBarContainer:Et.progressBarContainer}},l)]})})]})},Md="_story_1f9eg_1",Id="_BetSlip_Wrapper_1f9eg_13",Rd="_BetSlip_ButtonWrap_1f9eg_25",ae={story:Md,BetSlip_Wrapper:Id,BetSlip_ButtonWrap:Rd},jd="es-PE";function Od(t,e=jd){const n=new Date(t),r=n.toLocaleDateString(e,{day:"2-digit",month:"2-digit"}),o=n.toLocaleTimeString(e,{hour:"2-digit",minute:"2-digit",hour12:!1});return`${r} • ${o}`}class Ld{static fromRaw(e){var i,s,u;const n=((s=(i=e==null?void 0:e.stakes)==null?void 0:i.find(l=>l.isEnabled))==null?void 0:s.preciseValue)??0,r=(u=e==null?void 0:e.selections)==null?void 0:u.map(l=>{var b,g,x,S,w,C;const c=parseFloat((g=(b=l==null?void 0:l.odd)==null?void 0:b.price)==null?void 0:g.toFixed(2)),f=Od((x=l==null?void 0:l.event)==null?void 0:x.startDate),d=(w=(S=l==null?void 0:l.odd)==null?void 0:S.offers)==null?void 0:w.find(T=>T.type===0),v=l.market.name,m=(C=l==null?void 0:l.bbSelections)==null?void 0:C.map(T=>{var N,q,k,F,A;const R=(N=T==null?void 0:T.odd)==null?void 0:N.price,L=parseFloat(R.toFixed(2)),V=(k=(q=T==null?void 0:T.odd)==null?void 0:q.offers)==null?void 0:k.find(z=>z.type===0);return{marketName:(F=T==null?void 0:T.market)==null?void 0:F.name,name:(A=T==null?void 0:T.odd)==null?void 0:A.name,cuota:L,hasPA:!!V,paParam:V==null?void 0:V.parameter}});return{name:l.odd.name,cuota:c,event:l.event.name,fechaHora:f,hasPA:!!d,paParam:d==null?void 0:d.parameter,marketName:v,subSelections:m}}),o=parseFloat(r==null?void 0:r.reduce((l,c)=>l*(c==null?void 0:c.cuota),1).toFixed(2)),a=parseFloat((n*o).toFixed(2));return{selections:r,stake:n,cuotaTotal:o,gananciaTotal:a}}}const Dd="_BetSlip_1q2rd_1",Bd="_BetSlip_Title_1q2rd_14",Nd="_SelectionItemWrap_1q2rd_21",Fd="_BetSlip_ButtonWrap_1q2rd_35",Ae={BetSlip:Dd,BetSlip_Title:Bd,SelectionItemWrap:Nd,BetSlip_ButtonWrap:Fd},kd="_SelectionItem_1ut02_1",Ud="_SelectionItemGrid_1ut02_11",$d="_SelectionItem_name_1ut02_17",Hd="_SelectionItem_marketName_1ut02_21",Wd="_SelectionItem_hasPA_1ut02_28",zd="_SelectionItem_fechahora_1ut02_37",Gd="_SelectionItem__Wrap_1ut02_42",Kd="_SelectionItem__BB_1ut02_47",Yd="_SelectionItem__BB__mn_1ut02_80",ut={SelectionItem:kd,SelectionItemGrid:Ud,SelectionItem_name:$d,SelectionItem_marketName:Hd,SelectionItem_hasPA:Wd,SelectionItem_fechahora:zd,SelectionItem__Wrap:Gd,SelectionItem__BB:Kd,SelectionItem__BB__mn:Yd},qd=({selection:t})=>{var e,n;return y.jsxs("div",{className:ut.SelectionItem,children:[y.jsxs("div",{className:ut.SelectionItemGrid,children:[y.jsx("div",{className:ut.SelectionItem_name,children:t!=null&&t.subSelections?"Crear Apuesta":t.name}),y.jsx("div",{className:ut.SelectionItem_sc,children:t.cuota.toFixed(2)})]}),t!=null&&t.subSelections?null:y.jsx("div",{className:ut.SelectionItemGrid,children:y.jsxs("div",{className:ut.SelectionItem_marketName,children:[y.jsx("div",{children:t.marketName}),t.hasPA&&y.jsx("div",{className:ut.SelectionItem_hasPA,children:"PA"})]})}),y.jsxs("div",{className:ut.SelectionItemGrid,children:[y.jsx("div",{className:ut.SelectionItem_event,children:t.event}),y.jsx("div",{className:ut.SelectionItem_fechahora,children:t.fechaHora})]}),t!=null&&t.subSelections&&((e=t==null?void 0:t.subSelections)==null?void 0:e.length)>0?y.jsx("div",{className:ut.SelectionItem__Wrap,children:(n=t.subSelections)==null?void 0:n.map((r,o)=>y.jsxs("div",{className:ut.SelectionItem__BB,children:[y.jsx("div",{className:ut.SelectionItem__BB__mn,children:r==null?void 0:r.marketName}),y.jsx("div",{children:r==null?void 0:r.name})]},o))}):y.jsx(y.Fragment,{})]})},Xd="_PulseButton_1sl45_1",Zd="_PulseButton_BG_1sl45_10",Jd="_BetSlip__NextIcon_1sl45_21",yn={PulseButton:Xd,PulseButton_BG:Zd,BetSlip__NextIcon:Jd},Qd="_Button_1nr6o_1",tv={Button:Qd},ev=({width:t="100%",height:e="100%",fill:n="white",...r})=>y.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:t,height:e,fill:n,...r,children:y.jsx("path",{fill:"#fff",d:"M5.77 1.86A1 1 0 1 0 4.23 3.14l4.47 5.36-4.47 5.36a1 1 0 1 0 1.538 1.28l5-6a1 1 0 0 0 0-1.28l-5-6Z"})}),Sa=({children:t,href:e})=>y.jsxs("div",{className:yn.PulseButton,children:[y.jsx("div",{className:yn.PulseButton_BG}),y.jsxs("a",{className:tv.Button,href:e,children:[t,y.jsx("div",{className:yn.BetSlip__NextIcon,children:y.jsx(ev,{})})]})]}),nv=({slip:t,title:e})=>{var n;return y.jsxs("div",{className:Ae.BetSlip,children:[y.jsxs("div",{className:Ae.SelectionItemWrap,children:[e?y.jsx("div",{className:Ae.BetSlip_Title,children:e}):null,(n=t==null?void 0:t.selections)==null?void 0:n.map((r,o)=>y.jsx(qd,{selection:r},`${Date.now()}-${o}`))]}),y.jsx("div",{className:Bt(Ae.BetSlip_ButtonWrap),children:y.jsx(Sa,{href:"https://www.apuestatotal.com/apuestas-deportivas/?reservationCode=HHHH",children:t==null?void 0:t.cuotaTotal})})]})},ba=({story:t})=>{let e=Oo;return(t==null?void 0:t.type)=="promo"&&(e=Oo),(t==null?void 0:t.type)=="betting"&&(e=rv),y.jsx(e,{story:t})},Oo=({story:t})=>y.jsxs("div",{className:Bt(ae.story),children:[y.jsx("img",{src:t==null?void 0:t.image,alt:""}),t!=null&&t.btn_text&&(t!=null&&t.btn_url)?y.jsx("div",{className:Bt(ae.BetSlip_Wrapper),children:y.jsx("div",{className:ae.BetSlip_ButtonWrap,children:y.jsxs(Sa,{href:t==null?void 0:t.btn_url,children:[" ",t==null?void 0:t.btn_text]})})}):null]}),rv=({story:t})=>{const e=JSON.parse((t==null?void 0:t.coupon_result)??"{}");return y.jsxs("div",{className:Bt(ae.story),children:[y.jsx("img",{src:t==null?void 0:t.image,alt:""}),y.jsx("div",{className:ae.BetSlip_Wrapper,children:y.jsx(nv,{slip:Ld.fromRaw(e),title:t==null?void 0:t.coupon_title})})]})},ov="_StoryHeaderPlayer_1oqtd_1",iv="_StoryHeaderPlayer__ProfileStory_1oqtd_18",av="_StoryHeaderPlayer__title_1oqtd_24",Sn={StoryHeaderPlayer:ov,StoryHeaderPlayer__ProfileStory:iv,StoryHeaderPlayer__title:av},xa=({story:t,onProfileClick:e=()=>null,color:n,image:r})=>y.jsxs("div",{className:Sn.StoryHeaderPlayer,children:[y.jsx($n,{className:Sn.StoryHeaderPlayer__ProfileStory,onProfileClick:e,color:n,image:r}),y.jsx("div",{className:Sn.StoryHeaderPlayer__title,children:t==null?void 0:t.title})]}),sv=({container:t="HOME"}={})=>{const e="apuestotal-stories-"+t;function n(){const u=localStorage.getItem(e);if(!u)return{};try{const l=JSON.parse(u),c={};for(const f in l)c[f]={seenStoryIds:new Set(l[f].seenStoryIds)};return c}catch(l){return console.warn("No se pudo parsear seenStoriesMap de localStorage:",l),{}}}function r(u){const l={};for(const c in u)l[c]={seenStoryIds:Array.from(u[c].seenStoryIds)};localStorage.setItem(e,JSON.stringify(l))}function o(u,l){const c=n();c[u]||(c[u]={seenStoryIds:new Set}),c[u].seenStoryIds.add(l),r(c)}function a(u){const c=n()[u==null?void 0:u.id];return c?u.stories.every(f=>c.seenStoryIds.has(f==null?void 0:f.id)):!1}function i(u){const c=n()[u.id];if(!c)return 0;for(let f=0;f<u.stories.length;f++)if(!c.seenStoryIds.has(u.stories[f].id))return f;return 0}function s(u){const l=[],c=[];for(const f of u)a(f)?c.push(f):l.push(f);return[...l,...c]}return{markStorySeen:o,hasSeenAllStories:a,getNextUnseenStoryIndex:i,sortProfilesBySeenStatus:s}};function uv(t,e){const n=h.useCallback(()=>{e()},[e]);h.useEffect(()=>{if(!t)return;window.history.pushState({storiesOpen:!0},"");const r=a=>{(a.key==="Escape"||a.key==="Esc")&&n()},o=()=>{n()};return window.addEventListener("keydown",r),window.addEventListener("popstate",o),()=>{window.removeEventListener("keydown",r),window.removeEventListener("popstate",o)}},[t,n])}function lv({scroll:t,targets:e}){const n=h.useRef([]),r=h.useCallback(a=>{n.current.forEach(({el:i,originalOverflow:s})=>{i.style.overflow=s}),n.current=[],a.forEach(i=>{if(typeof i=="string"){const s=document.getElementById(i);s?(n.current.push({target:i,el:s,originalOverflow:s.style.overflow}),s.style.overflow="hidden"):console.warn(`useScrollLock: no se encontró elemento con id "${i}"`)}else i===window||i===document?[document.body,document.documentElement].forEach(s=>{n.current.push({target:i,el:s,originalOverflow:s.style.overflow}),s.style.overflow="hidden"}):console.warn("useScrollLock: target no soportado",i)})},[]),o=h.useCallback(()=>{n.current.forEach(({el:a,originalOverflow:i})=>{a.style.overflow=i}),n.current=[]},[]);return h.useEffect(()=>{switch(t){case"ON":o();break;case"OFF":r(e);break}},[t]),{disableScroll:r,enableScroll:o}}const cv=({className:t="",data:e,isPortal:n=!0})=>{var b;const[r,o]=h.useState(null),a=g=>o(g),{markStorySeen:i,hasSeenAllStories:s,getNextUnseenStoryIndex:u,sortProfilesBySeenStatus:l}=sv(),c=l(e==null?void 0:e.filter(g=>g.stories.length)),f=h.useRef(c);h.useEffect(()=>{f.current=c},[c]);const d=e==null?void 0:e.find(g=>(g==null?void 0:g.id)==r),p=((b=e==null?void 0:e.find(g=>(g==null?void 0:g.id)==r))==null?void 0:b.stories)??[];uv(r,()=>o(null)),lv({targets:[document],scroll:r?"OFF":"ON"});const v=()=>{o(null),f.current=c},m=()=>{if(!r)return null;const g=p.map(S=>({type:"component",component:({pause:w,resume:C,story:T,isPaused:R})=>(i(d==null?void 0:d.id,S.id),y.jsx(ba,{story:S})),duration:S!=null&&S.duration?(S==null?void 0:S.duration)*1e3:7e3,header:()=>y.jsx(xa,{color:d==null?void 0:d.color,image:d==null?void 0:d.avatar,story:S},S==null?void 0:S.id)})),x=y.jsx(ya,{onClose:v,onOverlayClick:v,onStoryChange:S=>{},onAllStoriesEnd:async()=>{var C;const S=f.current.findIndex(T=>T.id==r),w=f.current.filter(T=>T.id!==r);f.current=w,(C=f.current[S])!=null&&C.id?o(f.current[S].id):(o(null),f.current=c)},currentIndex:d?u(d):0,stories:g},r);return n?Pa.createPortal(x,document.body):x};return y.jsxs(y.Fragment,{children:[y.jsx(ds,{wrapperClassName:Bt(Je.ScrollMenu,t),scrollContainerClassName:Je.scrollContainerClassName,itemClassName:Je.itemClassName,children:c.map((g,x)=>y.jsx($n,{hasSeenAllStories:s(g),onProfileClick:()=>a(g==null?void 0:g.id),color:g==null?void 0:g.color,image:g==null?void 0:g.avatar,title:g==null?void 0:g.name},g==null?void 0:g.id))}),r!=null&&m()]})};exports.ManagmentStoryComponent=ba;exports.ProfileStories=cv;exports.ProfileStory=$n;exports.StoryHeaderPlayer=xa;exports.StoryPlayer=ya;
6
6
  //# sourceMappingURL=index.cjs.js.map