quantum-component-library 1.4.45-qa.2 → 1.4.45-qa.4

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.
Files changed (31) hide show
  1. package/dist/components.cjs +1 -1
  2. package/dist/components.js +13 -13
  3. package/dist/{dnd-core-vendor-DqnJnuNT.cjs → dnd-core-vendor-DFyhudg3.cjs} +1 -1
  4. package/dist/{dnd-core-vendor-D0LYcGmm.js → dnd-core-vendor-GeFJIrqw.js} +2 -2
  5. package/dist/framer-motion-vendor-BpR8WNZk.js +2945 -0
  6. package/dist/framer-motion-vendor-DmZv69_a.cjs +9 -0
  7. package/dist/{graphql-DiUes2Np.js → graphql-DZp5ePcc.js} +6 -6
  8. package/dist/graphql-vendor-Bp1AYkpN.cjs +19 -0
  9. package/dist/graphql-vendor-D5ETG7wB.js +1285 -0
  10. package/dist/hooks.cjs +1 -1
  11. package/dist/hooks.js +11 -12
  12. package/dist/providers.cjs +1 -1
  13. package/dist/providers.js +5 -5
  14. package/dist/{react-dnd-vendor-DyqEbdFL.cjs → react-dnd-vendor-CQ6n_Iry.cjs} +1 -1
  15. package/dist/{react-dnd-vendor-DYGSQgr6.js → react-dnd-vendor-bl4guadi.js} +11 -11
  16. package/dist/{react-select-vendor-B1OQPh8Y.js → react-select-vendor-CM41In8Q.js} +2 -2
  17. package/dist/{react-select-vendor-Dcon15oq.cjs → react-select-vendor-qYWfPIoq.cjs} +1 -1
  18. package/dist/services.cjs +1 -1
  19. package/dist/services.js +1 -1
  20. package/dist/ui-vendor-CDpwLSe-.cjs +294 -0
  21. package/dist/{ui-vendor-C8K-cPdW.js → ui-vendor-CTkR2JkD.js} +34 -33
  22. package/dist/utils.cjs +1 -1
  23. package/dist/utils.js +1 -1
  24. package/dist/vendor-D0fSwmdY.cjs +90 -0
  25. package/dist/vendor-DxZbxm3m.js +13085 -0
  26. package/package.json +4 -4
  27. package/dist/graphql-vendor-CPuTFvxJ.cjs +0 -14
  28. package/dist/graphql-vendor-Dj6F1QIU.js +0 -669
  29. package/dist/ui-vendor-D_H9hnvk.cjs +0 -294
  30. package/dist/vendor-DIPzo8rL.js +0 -15069
  31. package/dist/vendor-Dmlu4NZO.cjs +0 -90
@@ -0,0 +1,9 @@
1
+ "use strict";const c=require("./vendor-D0fSwmdY.cjs"),g=require("react");function bn(t){const e=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const n in t)if(n!=="default"){const i=Object.getOwnPropertyDescriptor(t,n);Object.defineProperty(e,n,i.get?i:{enumerable:!0,get:()=>t[n]})}}return e.default=t,Object.freeze(e)}const Mt=bn(g),bt=g.createContext({});function Rt(t){const e=g.useRef(null);return e.current===null&&(e.current=t()),e.current}const Et=typeof window<"u",Ne=Et?g.useLayoutEffect:g.useEffect,tt=g.createContext(null),Lt=g.createContext({transformPagePoint:t=>t,isStatic:!1,reducedMotion:"never"});class Rn extends Mt.Component{getSnapshotBeforeUpdate(e){const n=this.props.childRef.current;if(n&&e.isPresent&&!this.props.isPresent){const i=n.offsetParent,o=c.isHTMLElement(i)&&i.offsetWidth||0,r=this.props.sizeRef.current;r.height=n.offsetHeight||0,r.width=n.offsetWidth||0,r.top=n.offsetTop,r.left=n.offsetLeft,r.right=o-r.width-r.left}return null}componentDidUpdate(){}render(){return this.props.children}}function En({children:t,isPresent:e,anchorX:n,root:i}){const o=g.useId(),r=g.useRef(null),s=g.useRef({width:0,height:0,top:0,left:0,right:0}),{nonce:a}=g.useContext(Lt);return g.useInsertionEffect(()=>{const{width:l,height:h,top:u,left:f,right:d}=s.current;if(e||!r.current||!l||!h)return;const m=n==="left"?`left: ${f}`:`right: ${d}`;r.current.dataset.motionPopId=o;const p=document.createElement("style");a&&(p.nonce=a);const P=i??document.head;return P.appendChild(p),p.sheet&&p.sheet.insertRule(`
2
+ [data-motion-pop-id="${o}"] {
3
+ position: absolute !important;
4
+ width: ${l}px !important;
5
+ height: ${h}px !important;
6
+ ${m}px !important;
7
+ top: ${u}px !important;
8
+ }
9
+ `),()=>{P.contains(p)&&P.removeChild(p)}},[e]),c.jsxRuntimeExports.jsx(Rn,{isPresent:e,childRef:r,sizeRef:s,children:Mt.cloneElement(t,{ref:r})})}const Ln=({children:t,initial:e,isPresent:n,onExitComplete:i,custom:o,presenceAffectsLayout:r,mode:s,anchorX:a,root:l})=>{const h=Rt(jn),u=g.useId();let f=!0,d=g.useMemo(()=>(f=!1,{id:u,initial:e,isPresent:n,custom:o,onExitComplete:m=>{h.set(m,!0);for(const p of h.values())if(!p)return;i&&i()},register:m=>(h.set(m,!1),()=>h.delete(m))}),[n,h,i]);return r&&f&&(d={...d}),g.useMemo(()=>{h.forEach((m,p)=>h.set(p,!1))},[n]),Mt.useEffect(()=>{!n&&!h.size&&i&&i()},[n]),s==="popLayout"&&(t=c.jsxRuntimeExports.jsx(En,{isPresent:n,anchorX:a,root:l,children:t})),c.jsxRuntimeExports.jsx(tt.Provider,{value:d,children:t})};function jn(){return new Map}function jt(t=!0){const e=g.useContext(tt);if(e===null)return[!0,null];const{isPresent:n,onExitComplete:i,register:o}=e,r=g.useId();g.useEffect(()=>{if(t)return o(r)},[t]);const s=g.useCallback(()=>t&&i&&i(r),[r,i,t]);return!n&&i?[!1,s]:[!0]}function Bn(){return In(g.useContext(tt))}function In(t){return t===null?!0:t.isPresent}const nt=t=>t.key||"";function _t(t){const e=[];return g.Children.forEach(t,n=>{g.isValidElement(n)&&e.push(n)}),e}const kn=({children:t,custom:e,initial:n=!0,onExitComplete:i,presenceAffectsLayout:o=!0,mode:r="sync",propagate:s=!1,anchorX:a="left",root:l})=>{const[h,u]=jt(s),f=g.useMemo(()=>_t(t),[t]),d=s&&!h?[]:f.map(nt),m=g.useRef(!0),p=g.useRef(f),P=Rt(()=>new Map),[V,v]=g.useState(f),[y,x]=g.useState(f);Ne(()=>{m.current=!1,p.current=f;for(let w=0;w<y.length;w++){const C=nt(y[w]);d.includes(C)?P.delete(C):P.get(C)!==!0&&P.set(C,!1)}},[y,d.length,d.join("-")]);const S=[];if(f!==V){let w=[...f];for(let C=0;C<y.length;C++){const L=y[C],F=nt(L);d.includes(F)||(w.splice(C,0,L),S.push(L))}return r==="wait"&&S.length&&(w=S),x(_t(w)),v(f),null}process.env.NODE_ENV!=="production"&&r==="wait"&&y.length>1&&console.warn(`You're attempting to animate multiple children within AnimatePresence, but its mode is set to "wait". This will lead to odd visual behaviour.`);const{forceRender:M}=g.useContext(bt);return c.jsxRuntimeExports.jsx(c.jsxRuntimeExports.Fragment,{children:y.map(w=>{const C=nt(w),L=s&&!h?!1:f===y||d.includes(C),F=()=>{if(P.has(C))P.set(C,!0);else return;let _=!0;P.forEach(B=>{B||(_=!1)}),_&&(M?.(),x(p.current),s&&u?.(),i&&i())};return c.jsxRuntimeExports.jsx(Ln,{isPresent:L,initial:!m.current||n?void 0:!1,custom:e,presenceAffectsLayout:o,mode:r,root:l,onExitComplete:L?void 0:F,anchorX:a,children:w},C)})})},Ue=g.createContext({strict:!1}),Kt={animation:["animate","variants","whileHover","whileTap","exit","whileInView","whileFocus","whileDrag"],exit:["exit"],drag:["drag","dragControls"],focus:["whileFocus"],hover:["whileHover","onHoverStart","onHoverEnd"],tap:["whileTap","onTap","onTapStart","onTapCancel"],pan:["onPan","onPanStart","onPanSessionStart","onPanEnd"],inView:["whileInView","onViewportEnter","onViewportLeave"],layout:["layout","layoutId"]},z={};for(const t in Kt)z[t]={isEnabled:e=>Kt[t].some(n=>!!e[n])};function On(t){for(const e in t)z[e]={...z[e],...t[e]}}const Fn=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","custom","inherit","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","globalTapTarget","ignoreStrict","viewport"]);function rt(t){return t.startsWith("while")||t.startsWith("drag")&&t!=="draggable"||t.startsWith("layout")||t.startsWith("onTap")||t.startsWith("onPan")||t.startsWith("onLayout")||Fn.has(t)}let We=t=>!rt(t);function Nn(t){typeof t=="function"&&(We=e=>e.startsWith("on")?!rt(e):t(e))}try{Nn(require("@emotion/is-prop-valid").default)}catch{}function Un(t,e,n){const i={};for(const o in t)o==="values"&&typeof t.values=="object"||(We(o)||n===!0&&rt(o)||!e&&!rt(o)||t.draggable&&o.startsWith("onDrag"))&&(i[o]=t[o]);return i}const lt=g.createContext({});function ut(t){return t!==null&&typeof t=="object"&&typeof t.start=="function"}function Z(t){return typeof t=="string"||Array.isArray(t)}const Bt=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],It=["initial",...Bt];function ct(t){return ut(t.animate)||It.some(e=>Z(t[e]))}function $e(t){return!!(ct(t)||t.variants)}function Wn(t,e){if(ct(t)){const{initial:n,animate:i}=t;return{initial:n===!1||Z(n)?n:void 0,animate:Z(i)?i:void 0}}return t.inherit!==!1?e:{}}function $n(t){const{initial:e,animate:n}=Wn(t,g.useContext(lt));return g.useMemo(()=>({initial:e,animate:n}),[Xt(e),Xt(n)])}function Xt(t){return Array.isArray(t)?t.join(" "):t}const J={};function Hn(t){for(const e in t)J[e]=t[e],c.isCSSVariableName(e)&&(J[e].isCSSVariable=!0)}function He(t,{layout:e,layoutId:n}){return c.transformProps.has(t)||t.startsWith("origin")||(e||n!==void 0)&&(!!J[t]||t==="opacity")}const Gn={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},zn=c.transformPropOrder.length;function _n(t,e,n){let i="",o=!0;for(let r=0;r<zn;r++){const s=c.transformPropOrder[r],a=t[s];if(a===void 0)continue;let l=!0;if(typeof a=="number"?l=a===(s.startsWith("scale")?1:0):l=parseFloat(a)===0,!l||n){const h=c.getValueAsType(a,c.numberValueTypes[s]);if(!l){o=!1;const u=Gn[s]||s;i+=`${u}(${h}) `}n&&(e[s]=h)}}return i=i.trim(),n?i=n(e,o?"":i):o&&(i="none"),i}function kt(t,e,n){const{style:i,vars:o,transformOrigin:r}=t;let s=!1,a=!1;for(const l in e){const h=e[l];if(c.transformProps.has(l)){s=!0;continue}else if(c.isCSSVariableName(l)){o[l]=h;continue}else{const u=c.getValueAsType(h,c.numberValueTypes[l]);l.startsWith("origin")?(a=!0,r[l]=u):i[l]=u}}if(e.transform||(s||n?i.transform=_n(e,t.transform,n):i.transform&&(i.transform="none")),a){const{originX:l="50%",originY:h="50%",originZ:u=0}=r;i.transformOrigin=`${l} ${h} ${u}`}}const Ot=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function Ge(t,e,n){for(const i in e)!c.isMotionValue(e[i])&&!He(i,n)&&(t[i]=e[i])}function Kn({transformTemplate:t},e){return g.useMemo(()=>{const n=Ot();return kt(n,e,t),Object.assign({},n.vars,n.style)},[e])}function Xn(t,e){const n=t.style||{},i={};return Ge(i,n,t),Object.assign(i,Kn(t,e)),i}function Yn(t,e){const n={},i=Xn(t,e);return t.drag&&t.dragListener!==!1&&(n.draggable=!1,i.userSelect=i.WebkitUserSelect=i.WebkitTouchCallout="none",i.touchAction=t.drag===!0?"none":`pan-${t.drag==="x"?"y":"x"}`),t.tabIndex===void 0&&(t.onTap||t.onTapStart||t.whileTap)&&(n.tabIndex=0),n.style=i,n}const qn={offset:"stroke-dashoffset",array:"stroke-dasharray"},Zn={offset:"strokeDashoffset",array:"strokeDasharray"};function Jn(t,e,n=1,i=0,o=!0){t.pathLength=1;const r=o?qn:Zn;t[r.offset]=c.px.transform(-i);const s=c.px.transform(e),a=c.px.transform(n);t[r.array]=`${s} ${a}`}function ze(t,{attrX:e,attrY:n,attrScale:i,pathLength:o,pathSpacing:r=1,pathOffset:s=0,...a},l,h,u){if(kt(t,a,h),l){t.style.viewBox&&(t.attrs.viewBox=t.style.viewBox);return}t.attrs=t.style,t.style={};const{attrs:f,style:d}=t;f.transform&&(d.transform=f.transform,delete f.transform),(d.transform||f.transformOrigin)&&(d.transformOrigin=f.transformOrigin??"50% 50%",delete f.transformOrigin),d.transform&&(d.transformBox=u?.transformBox??"fill-box",delete f.transformBox),e!==void 0&&(f.x=e),n!==void 0&&(f.y=n),i!==void 0&&(f.scale=i),o!==void 0&&Jn(f,o,r,s,!1)}const _e=()=>({...Ot(),attrs:{}}),Ke=t=>typeof t=="string"&&t.toLowerCase()==="svg";function Qn(t,e,n,i){const o=g.useMemo(()=>{const r=_e();return ze(r,e,Ke(i),t.transformTemplate,t.style),{...r.attrs,style:{...r.style}}},[e]);if(t.style){const r={};Ge(r,t.style,t),o.style={...r,...o.style}}return o}const ti=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","switch","symbol","svg","text","tspan","use","view"];function Ft(t){return typeof t!="string"||t.includes("-")?!1:!!(ti.indexOf(t)>-1||/[A-Z]/u.test(t))}function ei(t,e,n,{latestValues:i},o,r=!1){const a=(Ft(t)?Qn:Yn)(e,i,o,t),l=Un(e,typeof t=="string",r),h=t!==g.Fragment?{...l,...a,ref:n}:{},{children:u}=e,f=g.useMemo(()=>c.isMotionValue(u)?u.get():u,[u]);return g.createElement(t,{...h,children:f})}function Yt(t){const e=[{},{}];return t?.values.forEach((n,i)=>{e[0][i]=n.get(),e[1][i]=n.getVelocity()}),e}function Nt(t,e,n,i){if(typeof e=="function"){const[o,r]=Yt(i);e=e(n!==void 0?n:t.custom,o,r)}if(typeof e=="string"&&(e=t.variants&&t.variants[e]),typeof e=="function"){const[o,r]=Yt(i);e=e(n!==void 0?n:t.custom,o,r)}return e}function st(t){return c.isMotionValue(t)?t.get():t}function ni({scrapeMotionValuesFromProps:t,createRenderState:e},n,i,o){return{latestValues:ii(n,i,o,t),renderState:e()}}function ii(t,e,n,i){const o={},r=i(t,{});for(const d in r)o[d]=st(r[d]);let{initial:s,animate:a}=t;const l=ct(t),h=$e(t);e&&h&&!l&&t.inherit!==!1&&(s===void 0&&(s=e.initial),a===void 0&&(a=e.animate));let u=n?n.initial===!1:!1;u=u||s===!1;const f=u?a:s;if(f&&typeof f!="boolean"&&!ut(f)){const d=Array.isArray(f)?f:[f];for(let m=0;m<d.length;m++){const p=Nt(t,d[m]);if(p){const{transitionEnd:P,transition:V,...v}=p;for(const y in v){let x=v[y];if(Array.isArray(x)){const S=u?x.length-1:0;x=x[S]}x!==null&&(o[y]=x)}for(const y in P)o[y]=P[y]}}}return o}const Xe=t=>(e,n)=>{const i=g.useContext(lt),o=g.useContext(tt),r=()=>ni(t,e,i,o);return n?r():Rt(r)};function Ut(t,e,n){const{style:i}=t,o={};for(const r in i)(c.isMotionValue(i[r])||e.style&&c.isMotionValue(e.style[r])||He(r,t)||n?.getValue(r)?.liveStyle!==void 0)&&(o[r]=i[r]);return o}const si=Xe({scrapeMotionValuesFromProps:Ut,createRenderState:Ot});function Ye(t,e,n){const i=Ut(t,e,n);for(const o in t)if(c.isMotionValue(t[o])||c.isMotionValue(e[o])){const r=c.transformPropOrder.indexOf(o)!==-1?"attr"+o.charAt(0).toUpperCase()+o.substring(1):o;i[r]=t[o]}return i}const oi=Xe({scrapeMotionValuesFromProps:Ye,createRenderState:_e}),ri=Symbol.for("motionComponentSymbol");function U(t){return t&&typeof t=="object"&&Object.prototype.hasOwnProperty.call(t,"current")}function ai(t,e,n){return g.useCallback(i=>{i&&t.onMount&&t.onMount(i),e&&(i?e.mount(i):e.unmount()),n&&(typeof n=="function"?n(i):U(n)&&(n.current=i))},[e])}const Wt=t=>t.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),li="framerAppearId",qe="data-"+Wt(li),Ze=g.createContext({});function ui(t,e,n,i,o){const{visualElement:r}=g.useContext(lt),s=g.useContext(Ue),a=g.useContext(tt),l=g.useContext(Lt).reducedMotion,h=g.useRef(null);i=i||s.renderer,!h.current&&i&&(h.current=i(t,{visualState:e,parent:r,props:n,presenceContext:a,blockInitialAnimation:a?a.initial===!1:!1,reducedMotionConfig:l}));const u=h.current,f=g.useContext(Ze);u&&!u.projection&&o&&(u.type==="html"||u.type==="svg")&&ci(h.current,n,o,f);const d=g.useRef(!1);g.useInsertionEffect(()=>{u&&d.current&&u.update(n,a)});const m=n[qe],p=g.useRef(!!m&&!window.MotionHandoffIsComplete?.(m)&&window.MotionHasOptimisedAnimation?.(m));return Ne(()=>{u&&(d.current=!0,window.MotionIsMounted=!0,u.updateFeatures(),u.scheduleRenderMicrotask(),p.current&&u.animationState&&u.animationState.animateChanges())}),g.useEffect(()=>{u&&(!p.current&&u.animationState&&u.animationState.animateChanges(),p.current&&(queueMicrotask(()=>{window.MotionHandoffMarkAsComplete?.(m)}),p.current=!1),u.enteringChildren=void 0)}),u}function ci(t,e,n,i){const{layoutId:o,layout:r,drag:s,dragConstraints:a,layoutScroll:l,layoutRoot:h,layoutCrossfade:u}=e;t.projection=new n(t.latestValues,e["data-framer-portal-id"]?void 0:Je(t.parent)),t.projection.setOptions({layoutId:o,layout:r,alwaysMeasureLayout:!!s||a&&U(a),visualElement:t,animationType:typeof r=="string"?r:"both",initialPromotionConfig:i,crossfade:u,layoutScroll:l,layoutRoot:h})}function Je(t){if(t)return t.options.allowProjection!==!1?t.projection:Je(t.parent)}function ht(t,{forwardMotionProps:e=!1}={},n,i){n&&On(n);const o=Ft(t)?oi:si;function r(a,l){let h;const u={...g.useContext(Lt),...a,layoutId:hi(a)},{isStatic:f}=u,d=$n(a),m=o(a,f);if(!f&&Et){fi(u,n);const p=di(u);h=p.MeasureLayout,d.visualElement=ui(t,m,u,i,p.ProjectionNode)}return c.jsxRuntimeExports.jsxs(lt.Provider,{value:d,children:[h&&d.visualElement?c.jsxRuntimeExports.jsx(h,{visualElement:d.visualElement,...u}):null,ei(t,a,ai(m,d.visualElement,l),m,f,e)]})}r.displayName=`motion.${typeof t=="string"?t:`create(${t.displayName??t.name??""})`}`;const s=g.forwardRef(r);return s[ri]=t,s}function hi({layoutId:t}){const e=g.useContext(bt).id;return e&&t!==void 0?e+"-"+t:t}function fi(t,e){const n=g.useContext(Ue).strict;if(process.env.NODE_ENV!=="production"&&e&&n){const i="You have rendered a `motion` component within a `LazyMotion` component. This will break tree shaking. Import and render a `m` component instead.";t.ignoreStrict?c.warning(!1,i,"lazy-strict-mode"):c.invariant(!1,i,"lazy-strict-mode")}}function di(t){const{drag:e,layout:n}=z;if(!e&&!n)return{};const i={...e,...n};return{MeasureLayout:e?.isEnabled(t)||n?.isEnabled(t)?i.MeasureLayout:void 0,ProjectionNode:i.ProjectionNode}}function mi(t,e){if(typeof Proxy>"u")return ht;const n=new Map,i=(r,s)=>ht(r,s,t,e),o=(r,s)=>(process.env.NODE_ENV!=="production"&&c.warnOnce(!1,"motion() is deprecated. Use motion.create() instead."),i(r,s));return new Proxy(o,{get:(r,s)=>s==="create"?i:(n.has(s)||n.set(s,ht(s,void 0,t,e)),n.get(s))})}function Qe({top:t,left:e,right:n,bottom:i}){return{x:{min:e,max:n},y:{min:t,max:i}}}function pi({x:t,y:e}){return{top:e.min,right:t.max,bottom:e.max,left:t.min}}function gi(t,e){if(!e)return t;const n=e({x:t.left,y:t.top}),i=e({x:t.right,y:t.bottom});return{top:n.y,left:n.x,bottom:i.y,right:i.x}}function ft(t){return t===void 0||t===1}function Pt({scale:t,scaleX:e,scaleY:n}){return!ft(t)||!ft(e)||!ft(n)}function O(t){return Pt(t)||tn(t)||t.z||t.rotate||t.rotateX||t.rotateY||t.skewX||t.skewY}function tn(t){return qt(t.x)||qt(t.y)}function qt(t){return t&&t!=="0%"}function at(t,e,n){const i=t-n,o=e*i;return n+o}function Zt(t,e,n,i,o){return o!==void 0&&(t=at(t,o,i)),at(t,n,i)+e}function Vt(t,e=0,n=1,i,o){t.min=Zt(t.min,e,n,i,o),t.max=Zt(t.max,e,n,i,o)}function en(t,{x:e,y:n}){Vt(t.x,e.translate,e.scale,e.originPoint),Vt(t.y,n.translate,n.scale,n.originPoint)}const Jt=.999999999999,Qt=1.0000000000001;function yi(t,e,n,i=!1){const o=n.length;if(!o)return;e.x=e.y=1;let r,s;for(let a=0;a<o;a++){r=n[a],s=r.projectionDelta;const{visualElement:l}=r.options;l&&l.props.style&&l.props.style.display==="contents"||(i&&r.options.layoutScroll&&r.scroll&&r!==r.root&&$(t,{x:-r.scroll.offset.x,y:-r.scroll.offset.y}),s&&(e.x*=s.x.scale,e.y*=s.y.scale,en(t,s)),i&&O(r.latestValues)&&$(t,r.latestValues))}e.x<Qt&&e.x>Jt&&(e.x=1),e.y<Qt&&e.y>Jt&&(e.y=1)}function W(t,e){t.min=t.min+e,t.max=t.max+e}function te(t,e,n,i,o=.5){const r=c.mixNumber(t.min,t.max,o);Vt(t,e,n,r,i)}function $(t,e){te(t.x,e.x,e.scaleX,e.scale,e.originX),te(t.y,e.y,e.scaleY,e.scale,e.originY)}function nn(t,e){return Qe(gi(t.getBoundingClientRect(),e))}function vi(t,e,n){const i=nn(t,n),{scroll:o}=e;return o&&(W(i.x,o.offset.x),W(i.y,o.offset.y)),i}const ee=()=>({translate:0,scale:1,origin:0,originPoint:0}),H=()=>({x:ee(),y:ee()}),ne=()=>({min:0,max:0}),T=()=>({x:ne(),y:ne()}),Tt={current:null},sn={current:!1};function xi(){if(sn.current=!0,!!Et)if(window.matchMedia){const t=window.matchMedia("(prefers-reduced-motion)"),e=()=>Tt.current=t.matches;t.addEventListener("change",e),e()}else Tt.current=!1}const Pi=new WeakMap;function Vi(t,e,n){for(const i in e){const o=e[i],r=n[i];if(c.isMotionValue(o))t.addValue(i,o);else if(c.isMotionValue(r))t.addValue(i,c.motionValue(o,{owner:t}));else if(r!==o)if(t.hasValue(i)){const s=t.getValue(i);s.liveStyle===!0?s.jump(o):s.hasAnimated||s.set(o)}else{const s=t.getStaticValue(i);t.addValue(i,c.motionValue(s!==void 0?s:o,{owner:t}))}}for(const i in n)e[i]===void 0&&t.removeValue(i);return e}const ie=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];class Ti{scrapeMotionValuesFromProps(e,n,i){return{}}constructor({parent:e,props:n,presenceContext:i,reducedMotionConfig:o,blockInitialAnimation:r,visualState:s},a={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.KeyframeResolver=c.KeyframeResolver,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{const d=c.time.now();this.renderScheduledAt<d&&(this.renderScheduledAt=d,c.frame.render(this.render,!1,!0))};const{latestValues:l,renderState:h}=s;this.latestValues=l,this.baseTarget={...l},this.initialValues=n.initial?{...l}:{},this.renderState=h,this.parent=e,this.props=n,this.presenceContext=i,this.depth=e?e.depth+1:0,this.reducedMotionConfig=o,this.options=a,this.blockInitialAnimation=!!r,this.isControllingVariants=ct(n),this.isVariantNode=$e(n),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(e&&e.current);const{willChange:u,...f}=this.scrapeMotionValuesFromProps(n,{},this);for(const d in f){const m=f[d];l[d]!==void 0&&c.isMotionValue(m)&&m.set(l[d])}}mount(e){this.current=e,Pi.set(e,this),this.projection&&!this.projection.instance&&this.projection.mount(e),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((n,i)=>this.bindToMotionValue(i,n)),sn.current||xi(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:Tt.current,process.env.NODE_ENV!=="production"&&c.warnOnce(this.shouldReduceMotion!==!0,"You have Reduced Motion enabled on your device. Animations may not appear as expected.","reduced-motion-disabled"),this.parent?.addChild(this),this.update(this.props,this.presenceContext)}unmount(){this.projection&&this.projection.unmount(),c.cancelFrame(this.notifyUpdate),c.cancelFrame(this.render),this.valueSubscriptions.forEach(e=>e()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent?.removeChild(this);for(const e in this.events)this.events[e].clear();for(const e in this.features){const n=this.features[e];n&&(n.unmount(),n.isMounted=!1)}this.current=null}addChild(e){this.children.add(e),this.enteringChildren??(this.enteringChildren=new Set),this.enteringChildren.add(e)}removeChild(e){this.children.delete(e),this.enteringChildren&&this.enteringChildren.delete(e)}bindToMotionValue(e,n){this.valueSubscriptions.has(e)&&this.valueSubscriptions.get(e)();const i=c.transformProps.has(e);i&&this.onBindTransform&&this.onBindTransform();const o=n.on("change",s=>{this.latestValues[e]=s,this.props.onUpdate&&c.frame.preRender(this.notifyUpdate),i&&this.projection&&(this.projection.isTransformDirty=!0),this.scheduleRender()});let r;window.MotionCheckAppearSync&&(r=window.MotionCheckAppearSync(this,e,n)),this.valueSubscriptions.set(e,()=>{o(),r&&r(),n.owner&&n.stop()})}sortNodePosition(e){return!this.current||!this.sortInstanceNodePosition||this.type!==e.type?0:this.sortInstanceNodePosition(this.current,e.current)}updateFeatures(){let e="animation";for(e in z){const n=z[e];if(!n)continue;const{isEnabled:i,Feature:o}=n;if(!this.features[e]&&o&&i(this.props)&&(this.features[e]=new o(this)),this.features[e]){const r=this.features[e];r.isMounted?r.update():(r.mount(),r.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):T()}getStaticValue(e){return this.latestValues[e]}setStaticValue(e,n){this.latestValues[e]=n}update(e,n){(e.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=e,this.prevPresenceContext=this.presenceContext,this.presenceContext=n;for(let i=0;i<ie.length;i++){const o=ie[i];this.propEventSubscriptions[o]&&(this.propEventSubscriptions[o](),delete this.propEventSubscriptions[o]);const r="on"+o,s=e[r];s&&(this.propEventSubscriptions[o]=this.on(o,s))}this.prevMotionValues=Vi(this,this.scrapeMotionValuesFromProps(e,this.prevProps,this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}getProps(){return this.props}getVariant(e){return this.props.variants?this.props.variants[e]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}addVariantChild(e){const n=this.getClosestVariantNode();if(n)return n.variantChildren&&n.variantChildren.add(e),()=>n.variantChildren.delete(e)}addValue(e,n){const i=this.values.get(e);n!==i&&(i&&this.removeValue(e),this.bindToMotionValue(e,n),this.values.set(e,n),this.latestValues[e]=n.get())}removeValue(e){this.values.delete(e);const n=this.valueSubscriptions.get(e);n&&(n(),this.valueSubscriptions.delete(e)),delete this.latestValues[e],this.removeValueFromRenderState(e,this.renderState)}hasValue(e){return this.values.has(e)}getValue(e,n){if(this.props.values&&this.props.values[e])return this.props.values[e];let i=this.values.get(e);return i===void 0&&n!==void 0&&(i=c.motionValue(n===null?void 0:n,{owner:this}),this.addValue(e,i)),i}readValue(e,n){let i=this.latestValues[e]!==void 0||!this.current?this.latestValues[e]:this.getBaseTargetFromProps(this.props,e)??this.readValueFromInstance(this.current,e,this.options);return i!=null&&(typeof i=="string"&&(c.isNumericalString(i)||c.isZeroValueString(i))?i=parseFloat(i):!c.findValueType(i)&&c.complex.test(n)&&(i=c.getAnimatableNone(e,n)),this.setBaseTarget(e,c.isMotionValue(i)?i.get():i)),c.isMotionValue(i)?i.get():i}setBaseTarget(e,n){this.baseTarget[e]=n}getBaseTarget(e){const{initial:n}=this.props;let i;if(typeof n=="string"||typeof n=="object"){const r=Nt(this.props,n,this.presenceContext?.custom);r&&(i=r[e])}if(n&&i!==void 0)return i;const o=this.getBaseTargetFromProps(this.props,e);return o!==void 0&&!c.isMotionValue(o)?o:this.initialValues[e]!==void 0&&i===void 0?void 0:this.baseTarget[e]}on(e,n){return this.events[e]||(this.events[e]=new c.SubscriptionManager),this.events[e].add(n)}notify(e,...n){this.events[e]&&this.events[e].notify(...n)}scheduleRenderMicrotask(){c.microtask.render(this.render)}}class on extends Ti{constructor(){super(...arguments),this.KeyframeResolver=c.DOMKeyframesResolver}sortInstanceNodePosition(e,n){return e.compareDocumentPosition(n)&2?1:-1}getBaseTargetFromProps(e,n){return e.style?e.style[n]:void 0}removeValueFromRenderState(e,{vars:n,style:i}){delete n[e],delete i[e]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:e}=this.props;c.isMotionValue(e)&&(this.childSubscription=e.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}}function rn(t,{style:e,vars:n},i,o){const r=t.style;let s;for(s in e)r[s]=e[s];o?.applyProjectionStyles(r,i);for(s in n)r.setProperty(s,n[s])}function Si(t){return window.getComputedStyle(t)}class Ci extends on{constructor(){super(...arguments),this.type="html",this.renderInstance=rn}readValueFromInstance(e,n){if(c.transformProps.has(n))return this.projection?.isProjecting?c.defaultTransformValue(n):c.readTransformValue(e,n);{const i=Si(e),o=(c.isCSSVariableName(n)?i.getPropertyValue(n):i[n])||0;return typeof o=="string"?o.trim():o}}measureInstanceViewportBox(e,{transformPagePoint:n}){return nn(e,n)}build(e,n,i){kt(e,n,i.transformTemplate)}scrapeMotionValuesFromProps(e,n,i){return Ut(e,n,i)}}const an=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength","startOffset","textLength","lengthAdjust"]);function Ai(t,e,n,i){rn(t,e,void 0,i);for(const o in e.attrs)t.setAttribute(an.has(o)?o:Wt(o),e.attrs[o])}class wi extends on{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=T}getBaseTargetFromProps(e,n){return e[n]}readValueFromInstance(e,n){if(c.transformProps.has(n)){const i=c.getDefaultValueType(n);return i&&i.default||0}return n=an.has(n)?n:Wt(n),e.getAttribute(n)}scrapeMotionValuesFromProps(e,n,i){return Ye(e,n,i)}build(e,n,i){ze(e,n,this.isSVGTag,i.transformTemplate,i.style)}renderInstance(e,n,i,o){Ai(e,n,i,o)}mount(e){this.isSVGTag=Ke(e.tagName),super.mount(e)}}const Di=(t,e)=>Ft(t)?new wi(e):new Ci(e,{allowProjection:t!==g.Fragment});function G(t,e,n){const i=t.getProps();return Nt(i,e,n!==void 0?n:i.custom,t)}const St=t=>Array.isArray(t);function Mi(t,e,n){t.hasValue(e)?t.getValue(e).set(n):t.addValue(e,c.motionValue(n))}function bi(t){return St(t)?t[t.length-1]||0:t}function Ri(t,e){const n=G(t,e);let{transitionEnd:i={},transition:o={},...r}=n||{};r={...r,...i};for(const s in r){const a=bi(r[s]);Mi(t,s,a)}}function Ei(t){return!!(c.isMotionValue(t)&&t.add)}function Ct(t,e){const n=t.getValue("willChange");if(Ei(n))return n.add(e);if(!n&&c.MotionGlobalConfig.WillChange){const i=new c.MotionGlobalConfig.WillChange("auto");t.addValue("willChange",i),i.add(e)}}function ln(t){return t.props[qe]}const Li=t=>t!==null;function ji(t,{repeat:e,repeatType:n="loop"},i){const o=t.filter(Li),r=e&&n!=="loop"&&e%2===1?0:o.length-1;return o[r]}const Bi={type:"spring",stiffness:500,damping:25,restSpeed:10},Ii=t=>({type:"spring",stiffness:550,damping:t===0?2*Math.sqrt(550):30,restSpeed:10}),ki={type:"keyframes",duration:.8},Oi={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},Fi=(t,{keyframes:e})=>e.length>2?ki:c.transformProps.has(t)?t.startsWith("scale")?Ii(e[1]):Bi:Oi;function Ni({when:t,delay:e,delayChildren:n,staggerChildren:i,staggerDirection:o,repeat:r,repeatType:s,repeatDelay:a,from:l,elapsed:h,...u}){return!!Object.keys(u).length}const $t=(t,e,n,i={},o,r)=>s=>{const a=c.getValueTransition(i,t)||{},l=a.delay||i.delay||0;let{elapsed:h=0}=i;h=h-c.secondsToMilliseconds(l);const u={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:e.getVelocity(),...a,delay:-h,onUpdate:d=>{e.set(d),a.onUpdate&&a.onUpdate(d)},onComplete:()=>{s(),a.onComplete&&a.onComplete()},name:t,motionValue:e,element:r?void 0:o};Ni(a)||Object.assign(u,Fi(t,u)),u.duration&&(u.duration=c.secondsToMilliseconds(u.duration)),u.repeatDelay&&(u.repeatDelay=c.secondsToMilliseconds(u.repeatDelay)),u.from!==void 0&&(u.keyframes[0]=u.from);let f=!1;if((u.type===!1||u.duration===0&&!u.repeatDelay)&&(c.makeAnimationInstant(u),u.delay===0&&(f=!0)),(c.MotionGlobalConfig.instantAnimations||c.MotionGlobalConfig.skipAnimations)&&(f=!0,c.makeAnimationInstant(u),u.delay=0),u.allowFlatten=!a.type&&!a.ease,f&&!r&&e.get()!==void 0){const d=ji(u.keyframes,a);if(d!==void 0){c.frame.update(()=>{u.onUpdate(d),u.onComplete()});return}}return a.isSync?new c.JSAnimation(u):new c.AsyncMotionValueAnimation(u)};function Ui({protectedKeys:t,needsAnimating:e},n){const i=t.hasOwnProperty(n)&&e[n]!==!0;return e[n]=!1,i}function un(t,e,{delay:n=0,transitionOverride:i,type:o}={}){let{transition:r=t.getDefaultTransition(),transitionEnd:s,...a}=e;i&&(r=i);const l=[],h=o&&t.animationState&&t.animationState.getState()[o];for(const u in a){const f=t.getValue(u,t.latestValues[u]??null),d=a[u];if(d===void 0||h&&Ui(h,u))continue;const m={delay:n,...c.getValueTransition(r||{},u)},p=f.get();if(p!==void 0&&!f.isAnimating&&!Array.isArray(d)&&d===p&&!m.velocity)continue;let P=!1;if(window.MotionHandoffAnimation){const v=ln(t);if(v){const y=window.MotionHandoffAnimation(v,u,c.frame);y!==null&&(m.startTime=y,P=!0)}}Ct(t,u),f.start($t(u,f,d,t.shouldReduceMotion&&c.positionalKeys.has(u)?{type:!1}:m,t,P));const V=f.animation;V&&l.push(V)}return s&&Promise.all(l).then(()=>{c.frame.update(()=>{s&&Ri(t,s)})}),l}function cn(t,e,n,i=0,o=1){const r=Array.from(t).sort((h,u)=>h.sortNodePosition(u)).indexOf(e),s=t.size,a=(s-1)*i;return typeof n=="function"?n(r,s):o===1?r*i:a-r*i}function At(t,e,n={}){const i=G(t,e,n.type==="exit"?t.presenceContext?.custom:void 0);let{transition:o=t.getDefaultTransition()||{}}=i||{};n.transitionOverride&&(o=n.transitionOverride);const r=i?()=>Promise.all(un(t,i,n)):()=>Promise.resolve(),s=t.variantChildren&&t.variantChildren.size?(l=0)=>{const{delayChildren:h=0,staggerChildren:u,staggerDirection:f}=o;return Wi(t,e,l,h,u,f,n)}:()=>Promise.resolve(),{when:a}=o;if(a){const[l,h]=a==="beforeChildren"?[r,s]:[s,r];return l().then(()=>h())}else return Promise.all([r(),s(n.delay)])}function Wi(t,e,n=0,i=0,o=0,r=1,s){const a=[];for(const l of t.variantChildren)l.notify("AnimationStart",e),a.push(At(l,e,{...s,delay:n+(typeof i=="function"?0:i)+cn(t.variantChildren,l,i,o,r)}).then(()=>l.notify("AnimationComplete",e)));return Promise.all(a)}function $i(t,e,n={}){t.notify("AnimationStart",e);let i;if(Array.isArray(e)){const o=e.map(r=>At(t,r,n));i=Promise.all(o)}else if(typeof e=="string")i=At(t,e,n);else{const o=typeof e=="function"?G(t,e,n.custom):e;i=Promise.all(un(t,o,n))}return i.then(()=>{t.notify("AnimationComplete",e)})}function hn(t,e){if(!Array.isArray(e))return!1;const n=e.length;if(n!==t.length)return!1;for(let i=0;i<n;i++)if(e[i]!==t[i])return!1;return!0}const Hi=It.length;function fn(t){if(!t)return;if(!t.isControllingVariants){const n=t.parent?fn(t.parent)||{}:{};return t.props.initial!==void 0&&(n.initial=t.props.initial),n}const e={};for(let n=0;n<Hi;n++){const i=It[n],o=t.props[i];(Z(o)||o===!1)&&(e[i]=o)}return e}const Gi=[...Bt].reverse(),zi=Bt.length;function _i(t){return e=>Promise.all(e.map(({animation:n,options:i})=>$i(t,n,i)))}function Ki(t){let e=_i(t),n=se(),i=!0;const o=l=>(h,u)=>{const f=G(t,u,l==="exit"?t.presenceContext?.custom:void 0);if(f){const{transition:d,transitionEnd:m,...p}=f;h={...h,...p,...m}}return h};function r(l){e=l(t)}function s(l){const{props:h}=t,u=fn(t.parent)||{},f=[],d=new Set;let m={},p=1/0;for(let V=0;V<zi;V++){const v=Gi[V],y=n[v],x=h[v]!==void 0?h[v]:u[v],S=Z(x),M=v===l?y.isActive:null;M===!1&&(p=V);let w=x===u[v]&&x!==h[v]&&S;if(w&&i&&t.manuallyAnimateOnMount&&(w=!1),y.protectedKeys={...m},!y.isActive&&M===null||!x&&!y.prevProp||ut(x)||typeof x=="boolean")continue;const C=Xi(y.prevProp,x);let L=C||v===l&&y.isActive&&!w&&S||V>p&&S,F=!1;const _=Array.isArray(x)?x:[x];let B=_.reduce(o(v),{});M===!1&&(B={});const{prevResolvedValues:Ht={}}=y,Dn={...Ht,...B},Gt=A=>{L=!0,d.has(A)&&(F=!0,d.delete(A)),y.needsAnimating[A]=!0;const b=t.getValue(A);b&&(b.liveStyle=!1)};for(const A in Dn){const b=B[A],I=Ht[A];if(m.hasOwnProperty(A))continue;let N=!1;St(b)&&St(I)?N=!hn(b,I):N=b!==I,N?b!=null?Gt(A):d.add(A):b!==void 0&&d.has(A)?Gt(A):y.protectedKeys[A]=!0}y.prevProp=x,y.prevResolvedValues=B,y.isActive&&(m={...m,...B}),i&&t.blockInitialAnimation&&(L=!1);const zt=w&&C;L&&(!zt||F)&&f.push(..._.map(A=>{const b={type:v};if(typeof A=="string"&&i&&!zt&&t.manuallyAnimateOnMount&&t.parent){const{parent:I}=t,N=G(I,A);if(I.enteringChildren&&N){const{delayChildren:Mn}=N.transition||{};b.delay=cn(I.enteringChildren,t,Mn)}}return{animation:A,options:b}}))}if(d.size){const V={};if(typeof h.initial!="boolean"){const v=G(t,Array.isArray(h.initial)?h.initial[0]:h.initial);v&&v.transition&&(V.transition=v.transition)}d.forEach(v=>{const y=t.getBaseTarget(v),x=t.getValue(v);x&&(x.liveStyle=!0),V[v]=y??null}),f.push({animation:V})}let P=!!f.length;return i&&(h.initial===!1||h.initial===h.animate)&&!t.manuallyAnimateOnMount&&(P=!1),i=!1,P?e(f):Promise.resolve()}function a(l,h){if(n[l].isActive===h)return Promise.resolve();t.variantChildren?.forEach(f=>f.animationState?.setActive(l,h)),n[l].isActive=h;const u=s(l);for(const f in n)n[f].protectedKeys={};return u}return{animateChanges:s,setActive:a,setAnimateFunction:r,getState:()=>n,reset:()=>{n=se(),i=!0}}}function Xi(t,e){return typeof e=="string"?e!==t:Array.isArray(e)?!hn(e,t):!1}function k(t=!1){return{isActive:t,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function se(){return{animate:k(!0),whileInView:k(),whileHover:k(),whileTap:k(),whileDrag:k(),whileFocus:k(),exit:k()}}class j{constructor(e){this.isMounted=!1,this.node=e}update(){}}class Yi extends j{constructor(e){super(e),e.animationState||(e.animationState=Ki(e))}updateAnimationControlsSubscription(){const{animate:e}=this.node.getProps();ut(e)&&(this.unmountControls=e.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:e}=this.node.getProps(),{animate:n}=this.node.prevProps||{};e!==n&&this.updateAnimationControlsSubscription()}unmount(){this.node.animationState.reset(),this.unmountControls?.()}}let qi=0;class Zi extends j{constructor(){super(...arguments),this.id=qi++}update(){if(!this.node.presenceContext)return;const{isPresent:e,onExitComplete:n}=this.node.presenceContext,{isPresent:i}=this.node.prevPresenceContext||{};if(!this.node.animationState||e===i)return;const o=this.node.animationState.setActive("exit",!e);n&&!e&&o.then(()=>{n(this.id)})}mount(){const{register:e,onExitComplete:n}=this.node.presenceContext||{};n&&n(this.id),e&&(this.unmount=e(this.id))}unmount(){}}const Ji={animation:{Feature:Yi},exit:{Feature:Zi}};function Q(t,e,n,i={passive:!0}){return t.addEventListener(e,n,i),()=>t.removeEventListener(e,n)}function et(t){return{point:{x:t.pageX,y:t.pageY}}}const Qi=t=>e=>c.isPrimaryPointer(e)&&t(e,et(e));function X(t,e,n,i){return Q(t,e,Qi(n),i)}const dn=1e-4,ts=1-dn,es=1+dn,mn=.01,ns=0-mn,is=0+mn;function D(t){return t.max-t.min}function ss(t,e,n){return Math.abs(t-e)<=n}function oe(t,e,n,i=.5){t.origin=i,t.originPoint=c.mixNumber(e.min,e.max,t.origin),t.scale=D(n)/D(e),t.translate=c.mixNumber(n.min,n.max,t.origin)-t.originPoint,(t.scale>=ts&&t.scale<=es||isNaN(t.scale))&&(t.scale=1),(t.translate>=ns&&t.translate<=is||isNaN(t.translate))&&(t.translate=0)}function Y(t,e,n,i){oe(t.x,e.x,n.x,i?i.originX:void 0),oe(t.y,e.y,n.y,i?i.originY:void 0)}function re(t,e,n){t.min=n.min+e.min,t.max=t.min+D(e)}function os(t,e,n){re(t.x,e.x,n.x),re(t.y,e.y,n.y)}function ae(t,e,n){t.min=e.min-n.min,t.max=t.min+D(e)}function q(t,e,n){ae(t.x,e.x,n.x),ae(t.y,e.y,n.y)}function E(t){return[t("x"),t("y")]}const pn=({current:t})=>t?t.ownerDocument.defaultView:null,le=(t,e)=>Math.abs(t-e);function rs(t,e){const n=le(t.x,e.x),i=le(t.y,e.y);return Math.sqrt(n**2+i**2)}class gn{constructor(e,n,{transformPagePoint:i,contextWindow:o=window,dragSnapToOrigin:r=!1,distanceThreshold:s=3}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const d=mt(this.lastMoveEventInfo,this.history),m=this.startEvent!==null,p=rs(d.offset,{x:0,y:0})>=this.distanceThreshold;if(!m&&!p)return;const{point:P}=d,{timestamp:V}=c.frameData;this.history.push({...P,timestamp:V});const{onStart:v,onMove:y}=this.handlers;m||(v&&v(this.lastMoveEvent,d),this.startEvent=this.lastMoveEvent),y&&y(this.lastMoveEvent,d)},this.handlePointerMove=(d,m)=>{this.lastMoveEvent=d,this.lastMoveEventInfo=dt(m,this.transformPagePoint),c.frame.update(this.updatePoint,!0)},this.handlePointerUp=(d,m)=>{this.end();const{onEnd:p,onSessionEnd:P,resumeAnimation:V}=this.handlers;if(this.dragSnapToOrigin&&V&&V(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const v=mt(d.type==="pointercancel"?this.lastMoveEventInfo:dt(m,this.transformPagePoint),this.history);this.startEvent&&p&&p(d,v),P&&P(d,v)},!c.isPrimaryPointer(e))return;this.dragSnapToOrigin=r,this.handlers=n,this.transformPagePoint=i,this.distanceThreshold=s,this.contextWindow=o||window;const a=et(e),l=dt(a,this.transformPagePoint),{point:h}=l,{timestamp:u}=c.frameData;this.history=[{...h,timestamp:u}];const{onSessionStart:f}=n;f&&f(e,mt(l,this.history)),this.removeListeners=c.pipe(X(this.contextWindow,"pointermove",this.handlePointerMove),X(this.contextWindow,"pointerup",this.handlePointerUp),X(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(e){this.handlers=e}end(){this.removeListeners&&this.removeListeners(),c.cancelFrame(this.updatePoint)}}function dt(t,e){return e?{point:e(t.point)}:t}function ue(t,e){return{x:t.x-e.x,y:t.y-e.y}}function mt({point:t},e){return{point:t,delta:ue(t,yn(e)),offset:ue(t,as(e)),velocity:ls(e,.1)}}function as(t){return t[0]}function yn(t){return t[t.length-1]}function ls(t,e){if(t.length<2)return{x:0,y:0};let n=t.length-1,i=null;const o=yn(t);for(;n>=0&&(i=t[n],!(o.timestamp-i.timestamp>c.secondsToMilliseconds(e)));)n--;if(!i)return{x:0,y:0};const r=c.millisecondsToSeconds(o.timestamp-i.timestamp);if(r===0)return{x:0,y:0};const s={x:(o.x-i.x)/r,y:(o.y-i.y)/r};return s.x===1/0&&(s.x=0),s.y===1/0&&(s.y=0),s}function us(t,{min:e,max:n},i){return e!==void 0&&t<e?t=i?c.mixNumber(e,t,i.min):Math.max(t,e):n!==void 0&&t>n&&(t=i?c.mixNumber(n,t,i.max):Math.min(t,n)),t}function ce(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 cs(t,{top:e,left:n,bottom:i,right:o}){return{x:ce(t.x,n,o),y:ce(t.y,e,i)}}function he(t,e){let n=e.min-t.min,i=e.max-t.max;return e.max-e.min<t.max-t.min&&([n,i]=[i,n]),{min:n,max:i}}function hs(t,e){return{x:he(t.x,e.x),y:he(t.y,e.y)}}function fs(t,e){let n=.5;const i=D(t),o=D(e);return o>i?n=c.progress(e.min,e.max-i,t.min):i>o&&(n=c.progress(t.min,t.max-o,e.min)),c.clamp(0,1,n)}function ds(t,e){const n={};return e.min!==void 0&&(n.min=e.min-t.min),e.max!==void 0&&(n.max=e.max-t.min),n}const wt=.35;function ms(t=wt){return t===!1?t=0:t===!0&&(t=wt),{x:fe(t,"left","right"),y:fe(t,"top","bottom")}}function fe(t,e,n){return{min:de(t,e),max:de(t,n)}}function de(t,e){return typeof t=="number"?t:t[e]||0}const ps=new WeakMap;class gs{constructor(e){this.openDragLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=T(),this.latestPointerEvent=null,this.latestPanInfo=null,this.visualElement=e}start(e,{snapToCursor:n=!1,distanceThreshold:i}={}){const{presenceContext:o}=this.visualElement;if(o&&o.isPresent===!1)return;const r=f=>{const{dragSnapToOrigin:d}=this.getProps();d?this.pauseAnimation():this.stopAnimation(),n&&this.snapToCursor(et(f).point)},s=(f,d)=>{const{drag:m,dragPropagation:p,onDragStart:P}=this.getProps();if(m&&!p&&(this.openDragLock&&this.openDragLock(),this.openDragLock=c.setDragLock(m),!this.openDragLock))return;this.latestPointerEvent=f,this.latestPanInfo=d,this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),E(v=>{let y=this.getAxisMotionValue(v).get()||0;if(c.percent.test(y)){const{projection:x}=this.visualElement;if(x&&x.layout){const S=x.layout.layoutBox[v];S&&(y=D(S)*(parseFloat(y)/100))}}this.originPoint[v]=y}),P&&c.frame.postRender(()=>P(f,d)),Ct(this.visualElement,"transform");const{animationState:V}=this.visualElement;V&&V.setActive("whileDrag",!0)},a=(f,d)=>{this.latestPointerEvent=f,this.latestPanInfo=d;const{dragPropagation:m,dragDirectionLock:p,onDirectionLock:P,onDrag:V}=this.getProps();if(!m&&!this.openDragLock)return;const{offset:v}=d;if(p&&this.currentDirection===null){this.currentDirection=ys(v),this.currentDirection!==null&&P&&P(this.currentDirection);return}this.updateAxis("x",d.point,v),this.updateAxis("y",d.point,v),this.visualElement.render(),V&&V(f,d)},l=(f,d)=>{this.latestPointerEvent=f,this.latestPanInfo=d,this.stop(f,d),this.latestPointerEvent=null,this.latestPanInfo=null},h=()=>E(f=>this.getAnimationState(f)==="paused"&&this.getAxisMotionValue(f).animation?.play()),{dragSnapToOrigin:u}=this.getProps();this.panSession=new gn(e,{onSessionStart:r,onStart:s,onMove:a,onSessionEnd:l,resumeAnimation:h},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:u,distanceThreshold:i,contextWindow:pn(this.visualElement)})}stop(e,n){const i=e||this.latestPointerEvent,o=n||this.latestPanInfo,r=this.isDragging;if(this.cancel(),!r||!o||!i)return;const{velocity:s}=o;this.startAnimation(s);const{onDragEnd:a}=this.getProps();a&&c.frame.postRender(()=>a(i,o))}cancel(){this.isDragging=!1;const{projection:e,animationState:n}=this.visualElement;e&&(e.isAnimationBlocked=!1),this.panSession&&this.panSession.end(),this.panSession=void 0;const{dragPropagation:i}=this.getProps();!i&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),n&&n.setActive("whileDrag",!1)}updateAxis(e,n,i){const{drag:o}=this.getProps();if(!i||!it(e,o,this.currentDirection))return;const r=this.getAxisMotionValue(e);let s=this.originPoint[e]+i[e];this.constraints&&this.constraints[e]&&(s=us(s,this.constraints[e],this.elastic[e])),r.set(s)}resolveConstraints(){const{dragConstraints:e,dragElastic:n}=this.getProps(),i=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):this.visualElement.projection?.layout,o=this.constraints;e&&U(e)?this.constraints||(this.constraints=this.resolveRefConstraints()):e&&i?this.constraints=cs(i.layoutBox,e):this.constraints=!1,this.elastic=ms(n),o!==this.constraints&&i&&this.constraints&&!this.hasMutatedConstraints&&E(r=>{this.constraints!==!1&&this.getAxisMotionValue(r)&&(this.constraints[r]=ds(i.layoutBox[r],this.constraints[r]))})}resolveRefConstraints(){const{dragConstraints:e,onMeasureDragConstraints:n}=this.getProps();if(!e||!U(e))return!1;const i=e.current;c.invariant(i!==null,"If `dragConstraints` is set as a React ref, that ref must be passed to another component's `ref` prop.","drag-constraints-ref");const{projection:o}=this.visualElement;if(!o||!o.layout)return!1;const r=vi(i,o.root,this.visualElement.getTransformPagePoint());let s=hs(o.layout.layoutBox,r);if(n){const a=n(pi(s));this.hasMutatedConstraints=!!a,a&&(s=Qe(a))}return s}startAnimation(e){const{drag:n,dragMomentum:i,dragElastic:o,dragTransition:r,dragSnapToOrigin:s,onDragTransitionEnd:a}=this.getProps(),l=this.constraints||{},h=E(u=>{if(!it(u,n,this.currentDirection))return;let f=l&&l[u]||{};s&&(f={min:0,max:0});const d=o?200:1e6,m=o?40:1e7,p={type:"inertia",velocity:i?e[u]:0,bounceStiffness:d,bounceDamping:m,timeConstant:750,restDelta:1,restSpeed:10,...r,...f};return this.startAxisValueAnimation(u,p)});return Promise.all(h).then(a)}startAxisValueAnimation(e,n){const i=this.getAxisMotionValue(e);return Ct(this.visualElement,e),i.start($t(e,i,0,n,this.visualElement,!1))}stopAnimation(){E(e=>this.getAxisMotionValue(e).stop())}pauseAnimation(){E(e=>this.getAxisMotionValue(e).animation?.pause())}getAnimationState(e){return this.getAxisMotionValue(e).animation?.state}getAxisMotionValue(e){const n=`_drag${e.toUpperCase()}`,i=this.visualElement.getProps(),o=i[n];return o||this.visualElement.getValue(e,(i.initial?i.initial[e]:void 0)||0)}snapToCursor(e){E(n=>{const{drag:i}=this.getProps();if(!it(n,i,this.currentDirection))return;const{projection:o}=this.visualElement,r=this.getAxisMotionValue(n);if(o&&o.layout){const{min:s,max:a}=o.layout.layoutBox[n];r.set(e[n]-c.mixNumber(s,a,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:e,dragConstraints:n}=this.getProps(),{projection:i}=this.visualElement;if(!U(n)||!i||!this.constraints)return;this.stopAnimation();const o={x:0,y:0};E(s=>{const a=this.getAxisMotionValue(s);if(a&&this.constraints!==!1){const l=a.get();o[s]=fs({min:l,max:l},this.constraints[s])}});const{transformTemplate:r}=this.visualElement.getProps();this.visualElement.current.style.transform=r?r({},""):"none",i.root&&i.root.updateScroll(),i.updateLayout(),this.resolveConstraints(),E(s=>{if(!it(s,e,null))return;const a=this.getAxisMotionValue(s),{min:l,max:h}=this.constraints[s];a.set(c.mixNumber(l,h,o[s]))})}addListeners(){if(!this.visualElement.current)return;ps.set(this.visualElement,this);const e=this.visualElement.current,n=X(e,"pointerdown",l=>{const{drag:h,dragListener:u=!0}=this.getProps();h&&u&&this.start(l)}),i=()=>{const{dragConstraints:l}=this.getProps();U(l)&&l.current&&(this.constraints=this.resolveRefConstraints())},{projection:o}=this.visualElement,r=o.addEventListener("measure",i);o&&!o.layout&&(o.root&&o.root.updateScroll(),o.updateLayout()),c.frame.read(i);const s=Q(window,"resize",()=>this.scalePositionWithinConstraints()),a=o.addEventListener("didUpdate",(({delta:l,hasLayoutChanged:h})=>{this.isDragging&&h&&(E(u=>{const f=this.getAxisMotionValue(u);f&&(this.originPoint[u]+=l[u].translate,f.set(f.get()+l[u].translate))}),this.visualElement.render())}));return()=>{s(),n(),r(),a&&a()}}getProps(){const e=this.visualElement.getProps(),{drag:n=!1,dragDirectionLock:i=!1,dragPropagation:o=!1,dragConstraints:r=!1,dragElastic:s=wt,dragMomentum:a=!0}=e;return{...e,drag:n,dragDirectionLock:i,dragPropagation:o,dragConstraints:r,dragElastic:s,dragMomentum:a}}}function it(t,e,n){return(e===!0||e===t)&&(n===null||n===t)}function ys(t,e=10){let n=null;return Math.abs(t.y)>e?n="y":Math.abs(t.x)>e&&(n="x"),n}class vs extends j{constructor(e){super(e),this.removeGroupControls=c.noop,this.removeListeners=c.noop,this.controls=new gs(e)}mount(){const{dragControls:e}=this.node.getProps();e&&(this.removeGroupControls=e.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||c.noop}unmount(){this.removeGroupControls(),this.removeListeners()}}const me=t=>(e,n)=>{t&&c.frame.postRender(()=>t(e,n))};class xs extends j{constructor(){super(...arguments),this.removePointerDownListener=c.noop}onPointerDown(e){this.session=new gn(e,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:pn(this.node)})}createPanHandlers(){const{onPanSessionStart:e,onPanStart:n,onPan:i,onPanEnd:o}=this.node.getProps();return{onSessionStart:me(e),onStart:me(n),onMove:i,onEnd:(r,s)=>{delete this.session,o&&c.frame.postRender(()=>o(r,s))}}}mount(){this.removePointerDownListener=X(this.node.current,"pointerdown",e=>this.onPointerDown(e))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}const ot={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function pe(t,e){return e.max===e.min?0:t/(e.max-e.min)*100}const K={correct:(t,e)=>{if(!e.target)return t;if(typeof t=="string")if(c.px.test(t))t=parseFloat(t);else return t;const n=pe(t,e.target.x),i=pe(t,e.target.y);return`${n}% ${i}%`}},Ps={correct:(t,{treeScale:e,projectionDelta:n})=>{const i=t,o=c.complex.parse(t);if(o.length>5)return i;const r=c.complex.createTransformer(t),s=typeof o[0]!="number"?1:0,a=n.x.scale*e.x,l=n.y.scale*e.y;o[0+s]/=a,o[1+s]/=l;const h=c.mixNumber(a,l,.5);return typeof o[2+s]=="number"&&(o[2+s]/=h),typeof o[3+s]=="number"&&(o[3+s]/=h),r(o)}};let pt=!1;class Vs extends g.Component{componentDidMount(){const{visualElement:e,layoutGroup:n,switchLayoutGroup:i,layoutId:o}=this.props,{projection:r}=e;Hn(Ts),r&&(n.group&&n.group.add(r),i&&i.register&&o&&i.register(r),pt&&r.root.didUpdate(),r.addEventListener("animationComplete",()=>{this.safeToRemove()}),r.setOptions({...r.options,onExitComplete:()=>this.safeToRemove()})),ot.hasEverUpdated=!0}getSnapshotBeforeUpdate(e){const{layoutDependency:n,visualElement:i,drag:o,isPresent:r}=this.props,{projection:s}=i;return s&&(s.isPresent=r,pt=!0,o||e.layoutDependency!==n||n===void 0||e.isPresent!==r?s.willUpdate():this.safeToRemove(),e.isPresent!==r&&(r?s.promote():s.relegate()||c.frame.postRender(()=>{const a=s.getStack();(!a||!a.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:e}=this.props.visualElement;e&&(e.root.didUpdate(),c.microtask.postRender(()=>{!e.currentAnimation&&e.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:e,layoutGroup:n,switchLayoutGroup:i}=this.props,{projection:o}=e;pt=!0,o&&(o.scheduleCheckAfterUnmount(),n&&n.group&&n.group.remove(o),i&&i.deregister&&i.deregister(o))}safeToRemove(){const{safeToRemove:e}=this.props;e&&e()}render(){return null}}function vn(t){const[e,n]=jt(),i=g.useContext(bt);return c.jsxRuntimeExports.jsx(Vs,{...t,layoutGroup:i,switchLayoutGroup:g.useContext(Ze),isPresent:e,safeToRemove:n})}const Ts={borderRadius:{...K,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:K,borderTopRightRadius:K,borderBottomLeftRadius:K,borderBottomRightRadius:K,boxShadow:Ps};function Ss(t,e,n){const i=c.isMotionValue(t)?t:c.motionValue(t);return i.start($t("",i,e,n)),i.animation}const Cs=(t,e)=>t.depth-e.depth;class As{constructor(){this.children=[],this.isDirty=!1}add(e){c.addUniqueItem(this.children,e),this.isDirty=!0}remove(e){c.removeItem(this.children,e),this.isDirty=!0}forEach(e){this.isDirty&&this.children.sort(Cs),this.isDirty=!1,this.children.forEach(e)}}function ws(t,e){const n=c.time.now(),i=({timestamp:o})=>{const r=o-n;r>=e&&(c.cancelFrame(i),t(r-e))};return c.frame.setup(i,!0),()=>c.cancelFrame(i)}const xn=["TopLeft","TopRight","BottomLeft","BottomRight"],Ds=xn.length,ge=t=>typeof t=="string"?parseFloat(t):t,ye=t=>typeof t=="number"||c.px.test(t);function Ms(t,e,n,i,o,r){o?(t.opacity=c.mixNumber(0,n.opacity??1,bs(i)),t.opacityExit=c.mixNumber(e.opacity??1,0,Rs(i))):r&&(t.opacity=c.mixNumber(e.opacity??1,n.opacity??1,i));for(let s=0;s<Ds;s++){const a=`border${xn[s]}Radius`;let l=ve(e,a),h=ve(n,a);if(l===void 0&&h===void 0)continue;l||(l=0),h||(h=0),l===0||h===0||ye(l)===ye(h)?(t[a]=Math.max(c.mixNumber(ge(l),ge(h),i),0),(c.percent.test(h)||c.percent.test(l))&&(t[a]+="%")):t[a]=h}(e.rotate||n.rotate)&&(t.rotate=c.mixNumber(e.rotate||0,n.rotate||0,i))}function ve(t,e){return t[e]!==void 0?t[e]:t.borderRadius}const bs=Pn(0,.5,c.circOut),Rs=Pn(.5,.95,c.noop);function Pn(t,e,n){return i=>i<t?0:i>e?1:n(c.progress(t,e,i))}function xe(t,e){t.min=e.min,t.max=e.max}function R(t,e){xe(t.x,e.x),xe(t.y,e.y)}function Pe(t,e){t.translate=e.translate,t.scale=e.scale,t.originPoint=e.originPoint,t.origin=e.origin}function Ve(t,e,n,i,o){return t-=e,t=at(t,1/n,i),o!==void 0&&(t=at(t,1/o,i)),t}function Es(t,e=0,n=1,i=.5,o,r=t,s=t){if(c.percent.test(e)&&(e=parseFloat(e),e=c.mixNumber(s.min,s.max,e/100)-s.min),typeof e!="number")return;let a=c.mixNumber(r.min,r.max,i);t===r&&(a-=e),t.min=Ve(t.min,e,n,a,o),t.max=Ve(t.max,e,n,a,o)}function Te(t,e,[n,i,o],r,s){Es(t,e[n],e[i],e[o],e.scale,r,s)}const Ls=["x","scaleX","originX"],js=["y","scaleY","originY"];function Se(t,e,n,i){Te(t.x,e,Ls,n?n.x:void 0,i?i.x:void 0),Te(t.y,e,js,n?n.y:void 0,i?i.y:void 0)}function Ce(t){return t.translate===0&&t.scale===1}function Vn(t){return Ce(t.x)&&Ce(t.y)}function Ae(t,e){return t.min===e.min&&t.max===e.max}function Bs(t,e){return Ae(t.x,e.x)&&Ae(t.y,e.y)}function we(t,e){return Math.round(t.min)===Math.round(e.min)&&Math.round(t.max)===Math.round(e.max)}function Tn(t,e){return we(t.x,e.x)&&we(t.y,e.y)}function De(t){return D(t.x)/D(t.y)}function Me(t,e){return t.translate===e.translate&&t.scale===e.scale&&t.originPoint===e.originPoint}class Is{constructor(){this.members=[]}add(e){c.addUniqueItem(this.members,e),e.scheduleRender()}remove(e){if(c.removeItem(this.members,e),e===this.prevLead&&(this.prevLead=void 0),e===this.lead){const n=this.members[this.members.length-1];n&&this.promote(n)}}relegate(e){const n=this.members.findIndex(o=>e===o);if(n===0)return!1;let i;for(let o=n;o>=0;o--){const r=this.members[o];if(r.isPresent!==!1){i=r;break}}return i?(this.promote(i),!0):!1}promote(e,n){const i=this.lead;if(e!==i&&(this.prevLead=i,this.lead=e,e.show(),i)){i.instance&&i.scheduleRender(),e.scheduleRender(),e.resumeFrom=i,n&&(e.resumeFrom.preserveOpacity=!0),i.snapshot&&(e.snapshot=i.snapshot,e.snapshot.latestValues=i.animationValues||i.latestValues),e.root&&e.root.isUpdating&&(e.isLayoutDirty=!0);const{crossfade:o}=e.options;o===!1&&i.hide()}}exitAnimationComplete(){this.members.forEach(e=>{const{options:n,resumingFrom:i}=e;n.onExitComplete&&n.onExitComplete(),i&&i.options.onExitComplete&&i.options.onExitComplete()})}scheduleRender(){this.members.forEach(e=>{e.instance&&e.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}function ks(t,e,n){let i="";const o=t.x.translate/e.x,r=t.y.translate/e.y,s=n?.z||0;if((o||r||s)&&(i=`translate3d(${o}px, ${r}px, ${s}px) `),(e.x!==1||e.y!==1)&&(i+=`scale(${1/e.x}, ${1/e.y}) `),n){const{transformPerspective:h,rotate:u,rotateX:f,rotateY:d,skewX:m,skewY:p}=n;h&&(i=`perspective(${h}px) ${i}`),u&&(i+=`rotate(${u}deg) `),f&&(i+=`rotateX(${f}deg) `),d&&(i+=`rotateY(${d}deg) `),m&&(i+=`skewX(${m}deg) `),p&&(i+=`skewY(${p}deg) `)}const a=t.x.scale*e.x,l=t.y.scale*e.y;return(a!==1||l!==1)&&(i+=`scale(${a}, ${l})`),i||"none"}const gt=["","X","Y","Z"],Os=1e3;let Fs=0;function yt(t,e,n,i){const{latestValues:o}=e;o[t]&&(n[t]=o[t],e.setStaticValue(t,0),i&&(i[t]=0))}function Sn(t){if(t.hasCheckedOptimisedAppear=!0,t.root===t)return;const{visualElement:e}=t.options;if(!e)return;const n=ln(e);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:o,layoutId:r}=t.options;window.MotionCancelOptimisedAnimation(n,"transform",c.frame,!(o||r))}const{parent:i}=t;i&&!i.hasCheckedOptimisedAppear&&Sn(i)}function Cn({attachResizeListener:t,defaultParent:e,measureScroll:n,checkIsScrollRoot:i,resetTransform:o}){return class{constructor(s={},a=e?.()){this.id=Fs++,this.animationId=0,this.animationCommitId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.hasCheckedOptimisedAppear=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,this.nodes.forEach(Ws),this.nodes.forEach(zs),this.nodes.forEach(_s),this.nodes.forEach($s)},this.resolvedRelativeTargetAt=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=s,this.root=a?a.root||a:this,this.path=a?[...a.path,a]:[],this.parent=a,this.depth=a?a.depth+1:0;for(let l=0;l<this.path.length;l++)this.path[l].shouldResetTransform=!0;this.root===this&&(this.nodes=new As)}addEventListener(s,a){return this.eventHandlers.has(s)||this.eventHandlers.set(s,new c.SubscriptionManager),this.eventHandlers.get(s).add(a)}notifyListeners(s,...a){const l=this.eventHandlers.get(s);l&&l.notify(...a)}hasListeners(s){return this.eventHandlers.has(s)}mount(s){if(this.instance)return;this.isSVG=c.isSVGElement(s)&&!c.isSVGSVGElement(s),this.instance=s;const{layoutId:a,layout:l,visualElement:h}=this.options;if(h&&!h.current&&h.mount(s),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),this.root.hasTreeAnimated&&(l||a)&&(this.isLayoutDirty=!0),t){let u,f=0;const d=()=>this.root.updateBlockedByResize=!1;c.frame.read(()=>{f=window.innerWidth}),t(s,()=>{const m=window.innerWidth;m!==f&&(f=m,this.root.updateBlockedByResize=!0,u&&u(),u=ws(d,250),ot.hasAnimatedSinceResize&&(ot.hasAnimatedSinceResize=!1,this.nodes.forEach(Ee)))})}a&&this.root.registerSharedNode(a,this),this.options.animate!==!1&&h&&(a||l)&&this.addEventListener("didUpdate",({delta:u,hasLayoutChanged:f,hasRelativeLayoutChanged:d,layout:m})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const p=this.options.transition||h.getDefaultTransition()||Zs,{onLayoutAnimationStart:P,onLayoutAnimationComplete:V}=h.getProps(),v=!this.targetLayout||!Tn(this.targetLayout,m),y=!f&&d;if(this.options.layoutRoot||this.resumeFrom||y||f&&(v||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);const x={...c.getValueTransition(p,"layout"),onPlay:P,onComplete:V};(h.shouldReduceMotion||this.options.layoutRoot)&&(x.delay=0,x.type=!1),this.startAnimation(x),this.setAnimationOrigin(u,y)}else f||Ee(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=m})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const s=this.getStack();s&&s.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,this.eventHandlers.clear(),c.cancelFrame(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){return this.isAnimationBlocked||this.parent&&this.parent.isTreeAnimationBlocked()||!1}startUpdate(){this.isUpdateBlocked()||(this.isUpdating=!0,this.nodes&&this.nodes.forEach(Ks),this.animationId++)}getTransformTemplate(){const{visualElement:s}=this.options;return s&&s.getProps().transformTemplate}willUpdate(s=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&Sn(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let u=0;u<this.path.length;u++){const f=this.path[u];f.shouldResetTransform=!0,f.updateScroll("snapshot"),f.options.layoutRoot&&f.willUpdate(!1)}const{layoutId:a,layout:l}=this.options;if(a===void 0&&!l)return;const h=this.getTransformTemplate();this.prevTransformTemplateValue=h?h(this.latestValues,""):void 0,this.updateSnapshot(),s&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){this.unblockUpdate(),this.clearAllSnapshots(),this.nodes.forEach(be);return}if(this.animationId<=this.animationCommitId){this.nodes.forEach(Re);return}this.animationCommitId=this.animationId,this.isUpdating?(this.isUpdating=!1,this.nodes.forEach(Gs),this.nodes.forEach(Ns),this.nodes.forEach(Us)):this.nodes.forEach(Re),this.clearAllSnapshots();const a=c.time.now();c.frameData.delta=c.clamp(0,1e3/60,a-c.frameData.timestamp),c.frameData.timestamp=a,c.frameData.isProcessing=!0,c.frameSteps.update.process(c.frameData),c.frameSteps.preRender.process(c.frameData),c.frameSteps.render.process(c.frameData),c.frameData.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,c.microtask.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(Hs),this.sharedNodes.forEach(Xs)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,c.frame.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){c.frame.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure(),this.snapshot&&!D(this.snapshot.measuredBox.x)&&!D(this.snapshot.measuredBox.y)&&(this.snapshot=void 0))}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let l=0;l<this.path.length;l++)this.path[l].updateScroll();const s=this.layout;this.layout=this.measure(!1),this.layoutCorrected=T(),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:a}=this.options;a&&a.notify("LayoutMeasure",this.layout.layoutBox,s?s.layoutBox:void 0)}updateScroll(s="measure"){let a=!!(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===s&&(a=!1),a&&this.instance){const l=i(this.instance);this.scroll={animationId:this.root.animationId,phase:s,isRoot:l,offset:n(this.instance),wasRoot:this.scroll?this.scroll.isRoot:l}}}resetTransform(){if(!o)return;const s=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,a=this.projectionDelta&&!Vn(this.projectionDelta),l=this.getTransformTemplate(),h=l?l(this.latestValues,""):void 0,u=h!==this.prevTransformTemplateValue;s&&this.instance&&(a||O(this.latestValues)||u)&&(o(this.instance,h),this.shouldResetTransform=!1,this.scheduleRender())}measure(s=!0){const a=this.measurePageBox();let l=this.removeElementScroll(a);return s&&(l=this.removeTransform(l)),Js(l),{animationId:this.root.animationId,measuredBox:a,layoutBox:l,latestValues:{},source:this.id}}measurePageBox(){const{visualElement:s}=this.options;if(!s)return T();const a=s.measureViewportBox();if(!(this.scroll?.wasRoot||this.path.some(Qs))){const{scroll:h}=this.root;h&&(W(a.x,h.offset.x),W(a.y,h.offset.y))}return a}removeElementScroll(s){const a=T();if(R(a,s),this.scroll?.wasRoot)return a;for(let l=0;l<this.path.length;l++){const h=this.path[l],{scroll:u,options:f}=h;h!==this.root&&u&&f.layoutScroll&&(u.wasRoot&&R(a,s),W(a.x,u.offset.x),W(a.y,u.offset.y))}return a}applyTransform(s,a=!1){const l=T();R(l,s);for(let h=0;h<this.path.length;h++){const u=this.path[h];!a&&u.options.layoutScroll&&u.scroll&&u!==u.root&&$(l,{x:-u.scroll.offset.x,y:-u.scroll.offset.y}),O(u.latestValues)&&$(l,u.latestValues)}return O(this.latestValues)&&$(l,this.latestValues),l}removeTransform(s){const a=T();R(a,s);for(let l=0;l<this.path.length;l++){const h=this.path[l];if(!h.instance||!O(h.latestValues))continue;Pt(h.latestValues)&&h.updateSnapshot();const u=T(),f=h.measurePageBox();R(u,f),Se(a,h.latestValues,h.snapshot?h.snapshot.layoutBox:void 0,u)}return O(this.latestValues)&&Se(a,this.latestValues),a}setTargetDelta(s){this.targetDelta=s,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(s){this.options={...this.options,...s,crossfade:s.crossfade!==void 0?s.crossfade:!0}}clearMeasurements(){this.scroll=void 0,this.layout=void 0,this.snapshot=void 0,this.prevTransformTemplateValue=void 0,this.targetDelta=void 0,this.target=void 0,this.isLayoutDirty=!1}forceRelativeParentToResolveTarget(){this.relativeParent&&this.relativeParent.resolvedRelativeTargetAt!==c.frameData.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(s=!1){const a=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=a.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=a.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=a.isSharedProjectionDirty);const l=!!this.resumingFrom||this!==a;if(!(s||l&&this.isSharedProjectionDirty||this.isProjectionDirty||this.parent?.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:u,layoutId:f}=this.options;if(!(!this.layout||!(u||f))){if(this.resolvedRelativeTargetAt=c.frameData.timestamp,!this.targetDelta&&!this.relativeTarget){const d=this.getClosestProjectingParent();d&&d.layout&&this.animationProgress!==1?(this.relativeParent=d,this.forceRelativeParentToResolveTarget(),this.relativeTarget=T(),this.relativeTargetOrigin=T(),q(this.relativeTargetOrigin,this.layout.layoutBox,d.layout.layoutBox),R(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}if(!(!this.relativeTarget&&!this.targetDelta)&&(this.target||(this.target=T(),this.targetWithTransforms=T()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),os(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):R(this.target,this.layout.layoutBox),en(this.target,this.targetDelta)):R(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget)){this.attemptToResolveRelativeTarget=!1;const d=this.getClosestProjectingParent();d&&!!d.resumingFrom==!!this.resumingFrom&&!d.options.layoutScroll&&d.target&&this.animationProgress!==1?(this.relativeParent=d,this.forceRelativeParentToResolveTarget(),this.relativeTarget=T(),this.relativeTargetOrigin=T(),q(this.relativeTargetOrigin,this.target,d.target),R(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}}}getClosestProjectingParent(){if(!(!this.parent||Pt(this.parent.latestValues)||tn(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}calcProjection(){const s=this.getLead(),a=!!this.resumingFrom||this!==s;let l=!0;if((this.isProjectionDirty||this.parent?.isProjectionDirty)&&(l=!1),a&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(l=!1),this.resolvedRelativeTargetAt===c.frameData.timestamp&&(l=!1),l)return;const{layout:h,layoutId:u}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(h||u))return;R(this.layoutCorrected,this.layout.layoutBox);const f=this.treeScale.x,d=this.treeScale.y;yi(this.layoutCorrected,this.treeScale,this.path,a),s.layout&&!s.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(s.target=s.layout.layoutBox,s.targetWithTransforms=T());const{target:m}=s;if(!m){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(Pe(this.prevProjectionDelta.x,this.projectionDelta.x),Pe(this.prevProjectionDelta.y,this.projectionDelta.y)),Y(this.projectionDelta,this.layoutCorrected,m,this.latestValues),(this.treeScale.x!==f||this.treeScale.y!==d||!Me(this.projectionDelta.x,this.prevProjectionDelta.x)||!Me(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",m))}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(s=!0){if(this.options.visualElement?.scheduleRender(),s){const a=this.getStack();a&&a.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=H(),this.projectionDelta=H(),this.projectionDeltaWithTransform=H()}setAnimationOrigin(s,a=!1){const l=this.snapshot,h=l?l.latestValues:{},u={...this.latestValues},f=H();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!a;const d=T(),m=l?l.source:void 0,p=this.layout?this.layout.source:void 0,P=m!==p,V=this.getStack(),v=!V||V.members.length<=1,y=!!(P&&!v&&this.options.crossfade===!0&&!this.path.some(qs));this.animationProgress=0;let x;this.mixTargetDelta=S=>{const M=S/1e3;Le(f.x,s.x,M),Le(f.y,s.y,M),this.setTargetDelta(f),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(q(d,this.layout.layoutBox,this.relativeParent.layout.layoutBox),Ys(this.relativeTarget,this.relativeTargetOrigin,d,M),x&&Bs(this.relativeTarget,x)&&(this.isProjectionDirty=!1),x||(x=T()),R(x,this.relativeTarget)),P&&(this.animationValues=u,Ms(u,h,this.latestValues,M,y,v)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=M},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(s){this.notifyListeners("animationStart"),this.currentAnimation?.stop(),this.resumingFrom?.currentAnimation?.stop(),this.pendingAnimation&&(c.cancelFrame(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=c.frame.update(()=>{ot.hasAnimatedSinceResize=!0,this.motionValue||(this.motionValue=c.motionValue(0)),this.currentAnimation=Ss(this.motionValue,[0,1e3],{...s,velocity:0,isSync:!0,onUpdate:a=>{this.mixTargetDelta(a),s.onUpdate&&s.onUpdate(a)},onStop:()=>{},onComplete:()=>{s.onComplete&&s.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);const s=this.getStack();s&&s.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(Os),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const s=this.getLead();let{targetWithTransforms:a,target:l,layout:h,latestValues:u}=s;if(!(!a||!l||!h)){if(this!==s&&this.layout&&h&&An(this.options.animationType,this.layout.layoutBox,h.layoutBox)){l=this.target||T();const f=D(this.layout.layoutBox.x);l.x.min=s.target.x.min,l.x.max=l.x.min+f;const d=D(this.layout.layoutBox.y);l.y.min=s.target.y.min,l.y.max=l.y.min+d}R(a,l),$(a,u),Y(this.projectionDeltaWithTransform,this.layoutCorrected,a,u)}}registerSharedNode(s,a){this.sharedNodes.has(s)||this.sharedNodes.set(s,new Is),this.sharedNodes.get(s).add(a);const h=a.options.initialPromotionConfig;a.promote({transition:h?h.transition:void 0,preserveFollowOpacity:h&&h.shouldPreserveFollowOpacity?h.shouldPreserveFollowOpacity(a):void 0})}isLead(){const s=this.getStack();return s?s.lead===this:!0}getLead(){const{layoutId:s}=this.options;return s?this.getStack()?.lead||this:this}getPrevLead(){const{layoutId:s}=this.options;return s?this.getStack()?.prevLead:void 0}getStack(){const{layoutId:s}=this.options;if(s)return this.root.sharedNodes.get(s)}promote({needsReset:s,transition:a,preserveFollowOpacity:l}={}){const h=this.getStack();h&&h.promote(this,l),s&&(this.projectionDelta=void 0,this.needsReset=!0),a&&this.setOptions({transition:a})}relegate(){const s=this.getStack();return s?s.relegate(this):!1}resetSkewAndRotation(){const{visualElement:s}=this.options;if(!s)return;let a=!1;const{latestValues:l}=s;if((l.z||l.rotate||l.rotateX||l.rotateY||l.rotateZ||l.skewX||l.skewY)&&(a=!0),!a)return;const h={};l.z&&yt("z",s,h,this.animationValues);for(let u=0;u<gt.length;u++)yt(`rotate${gt[u]}`,s,h,this.animationValues),yt(`skew${gt[u]}`,s,h,this.animationValues);s.render();for(const u in h)s.setStaticValue(u,h[u]),this.animationValues&&(this.animationValues[u]=h[u]);s.scheduleRender()}applyProjectionStyles(s,a){if(!this.instance||this.isSVG)return;if(!this.isVisible){s.visibility="hidden";return}const l=this.getTransformTemplate();if(this.needsReset){this.needsReset=!1,s.visibility="",s.opacity="",s.pointerEvents=st(a?.pointerEvents)||"",s.transform=l?l(this.latestValues,""):"none";return}const h=this.getLead();if(!this.projectionDelta||!this.layout||!h.target){this.options.layoutId&&(s.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,s.pointerEvents=st(a?.pointerEvents)||""),this.hasProjected&&!O(this.latestValues)&&(s.transform=l?l({},""):"none",this.hasProjected=!1);return}s.visibility="";const u=h.animationValues||h.latestValues;this.applyTransformsToTarget();let f=ks(this.projectionDeltaWithTransform,this.treeScale,u);l&&(f=l(u,f)),s.transform=f;const{x:d,y:m}=this.projectionDelta;s.transformOrigin=`${d.origin*100}% ${m.origin*100}% 0`,h.animationValues?s.opacity=h===this?u.opacity??this.latestValues.opacity??1:this.preserveOpacity?this.latestValues.opacity:u.opacityExit:s.opacity=h===this?u.opacity!==void 0?u.opacity:"":u.opacityExit!==void 0?u.opacityExit:0;for(const p in J){if(u[p]===void 0)continue;const{correct:P,applyTo:V,isCSSVariable:v}=J[p],y=f==="none"?u[p]:P(u[p],h);if(V){const x=V.length;for(let S=0;S<x;S++)s[V[S]]=y}else v?this.options.visualElement.renderState.vars[p]=y:s[p]=y}this.options.layoutId&&(s.pointerEvents=h===this?st(a?.pointerEvents)||"":"none")}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(s=>s.currentAnimation?.stop()),this.root.nodes.forEach(be),this.root.sharedNodes.clear()}}}function Ns(t){t.updateLayout()}function Us(t){const e=t.resumeFrom?.snapshot||t.snapshot;if(t.isLead()&&t.layout&&e&&t.hasListeners("didUpdate")){const{layoutBox:n,measuredBox:i}=t.layout,{animationType:o}=t.options,r=e.source!==t.layout.source;o==="size"?E(u=>{const f=r?e.measuredBox[u]:e.layoutBox[u],d=D(f);f.min=n[u].min,f.max=f.min+d}):An(o,e.layoutBox,n)&&E(u=>{const f=r?e.measuredBox[u]:e.layoutBox[u],d=D(n[u]);f.max=f.min+d,t.relativeTarget&&!t.currentAnimation&&(t.isProjectionDirty=!0,t.relativeTarget[u].max=t.relativeTarget[u].min+d)});const s=H();Y(s,n,e.layoutBox);const a=H();r?Y(a,t.applyTransform(i,!0),e.measuredBox):Y(a,n,e.layoutBox);const l=!Vn(s);let h=!1;if(!t.resumeFrom){const u=t.getClosestProjectingParent();if(u&&!u.resumeFrom){const{snapshot:f,layout:d}=u;if(f&&d){const m=T();q(m,e.layoutBox,f.layoutBox);const p=T();q(p,n,d.layoutBox),Tn(m,p)||(h=!0),u.options.layoutRoot&&(t.relativeTarget=p,t.relativeTargetOrigin=m,t.relativeParent=u)}}}t.notifyListeners("didUpdate",{layout:n,snapshot:e,delta:a,layoutDelta:s,hasLayoutChanged:l,hasRelativeLayoutChanged:h})}else if(t.isLead()){const{onExitComplete:n}=t.options;n&&n()}t.options.transition=void 0}function Ws(t){t.parent&&(t.isProjecting()||(t.isProjectionDirty=t.parent.isProjectionDirty),t.isSharedProjectionDirty||(t.isSharedProjectionDirty=!!(t.isProjectionDirty||t.parent.isProjectionDirty||t.parent.isSharedProjectionDirty)),t.isTransformDirty||(t.isTransformDirty=t.parent.isTransformDirty))}function $s(t){t.isProjectionDirty=t.isSharedProjectionDirty=t.isTransformDirty=!1}function Hs(t){t.clearSnapshot()}function be(t){t.clearMeasurements()}function Re(t){t.isLayoutDirty=!1}function Gs(t){const{visualElement:e}=t.options;e&&e.getProps().onBeforeLayoutMeasure&&e.notify("BeforeLayoutMeasure"),t.resetTransform()}function Ee(t){t.finishAnimation(),t.targetDelta=t.relativeTarget=t.target=void 0,t.isProjectionDirty=!0}function zs(t){t.resolveTargetDelta()}function _s(t){t.calcProjection()}function Ks(t){t.resetSkewAndRotation()}function Xs(t){t.removeLeadSnapshot()}function Le(t,e,n){t.translate=c.mixNumber(e.translate,0,n),t.scale=c.mixNumber(e.scale,1,n),t.origin=e.origin,t.originPoint=e.originPoint}function je(t,e,n,i){t.min=c.mixNumber(e.min,n.min,i),t.max=c.mixNumber(e.max,n.max,i)}function Ys(t,e,n,i){je(t.x,e.x,n.x,i),je(t.y,e.y,n.y,i)}function qs(t){return t.animationValues&&t.animationValues.opacityExit!==void 0}const Zs={duration:.45,ease:[.4,0,.1,1]},Be=t=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(t),Ie=Be("applewebkit/")&&!Be("chrome/")?Math.round:c.noop;function ke(t){t.min=Ie(t.min),t.max=Ie(t.max)}function Js(t){ke(t.x),ke(t.y)}function An(t,e,n){return t==="position"||t==="preserve-aspect"&&!ss(De(e),De(n),.2)}function Qs(t){return t!==t.root&&t.scroll?.wasRoot}const to=Cn({attachResizeListener:(t,e)=>Q(t,"resize",e),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),vt={current:void 0},wn=Cn({measureScroll:t=>({x:t.scrollLeft,y:t.scrollTop}),defaultParent:()=>{if(!vt.current){const t=new to({});t.mount(window),t.setOptions({layoutScroll:!0}),vt.current=t}return vt.current},resetTransform:(t,e)=>{t.style.transform=e!==void 0?e:"none"},checkIsScrollRoot:t=>window.getComputedStyle(t).position==="fixed"}),eo={pan:{Feature:xs},drag:{Feature:vs,ProjectionNode:wn,MeasureLayout:vn}};function Oe(t,e,n){const{props:i}=t;t.animationState&&i.whileHover&&t.animationState.setActive("whileHover",n==="Start");const o="onHover"+n,r=i[o];r&&c.frame.postRender(()=>r(e,et(e)))}class no extends j{mount(){const{current:e}=this.node;e&&(this.unmount=c.hover(e,(n,i)=>(Oe(this.node,i,"Start"),o=>Oe(this.node,o,"End"))))}unmount(){}}class io extends j{constructor(){super(...arguments),this.isActive=!1}onFocus(){let e=!1;try{e=this.node.current.matches(":focus-visible")}catch{e=!0}!e||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){!this.isActive||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=c.pipe(Q(this.node.current,"focus",()=>this.onFocus()),Q(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}function Fe(t,e,n){const{props:i}=t;if(t.current instanceof HTMLButtonElement&&t.current.disabled)return;t.animationState&&i.whileTap&&t.animationState.setActive("whileTap",n==="Start");const o="onTap"+(n==="End"?"":n),r=i[o];r&&c.frame.postRender(()=>r(e,et(e)))}class so extends j{mount(){const{current:e}=this.node;e&&(this.unmount=c.press(e,(n,i)=>(Fe(this.node,i,"Start"),(o,{success:r})=>Fe(this.node,o,r?"End":"Cancel")),{useGlobalTarget:this.node.props.globalTapTarget}))}unmount(){}}const Dt=new WeakMap,xt=new WeakMap,oo=t=>{const e=Dt.get(t.target);e&&e(t)},ro=t=>{t.forEach(oo)};function ao({root:t,...e}){const n=t||document;xt.has(n)||xt.set(n,{});const i=xt.get(n),o=JSON.stringify(e);return i[o]||(i[o]=new IntersectionObserver(ro,{root:t,...e})),i[o]}function lo(t,e,n){const i=ao(e);return Dt.set(t,n),i.observe(t),()=>{Dt.delete(t),i.unobserve(t)}}const uo={some:0,all:1};class co extends j{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:e={}}=this.node.getProps(),{root:n,margin:i,amount:o="some",once:r}=e,s={root:n?n.current:void 0,rootMargin:i,threshold:typeof o=="number"?o:uo[o]},a=l=>{const{isIntersecting:h}=l;if(this.isInView===h||(this.isInView=h,r&&!h&&this.hasEnteredView))return;h&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",h);const{onViewportEnter:u,onViewportLeave:f}=this.node.getProps(),d=h?u:f;d&&d(l)};return lo(this.node.current,s,a)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:e,prevProps:n}=this.node;["amount","margin","root"].some(ho(e,n))&&this.startObserver()}unmount(){}}function ho({viewport:t={}},{viewport:e={}}={}){return n=>t[n]!==e[n]}const fo={inView:{Feature:co},tap:{Feature:so},focus:{Feature:io},hover:{Feature:no}},mo={layout:{ProjectionNode:wn,MeasureLayout:vn}},po={...Ji,...fo,...eo,...mo},go=mi(po,Di);exports.AnimatePresence=kn;exports.motion=go;exports.useIsPresent=Bn;exports.usePresence=jt;
@@ -721,12 +721,12 @@ export {
721
721
  d as U,
722
722
  g as a,
723
723
  a as b,
724
- M as c,
725
- m as d,
726
- n as e,
727
- r as f,
728
- p as g,
729
- A as h,
724
+ n as c,
725
+ r as d,
726
+ M as e,
727
+ m as f,
728
+ A as g,
729
+ p as h,
730
730
  u as i,
731
731
  l as j,
732
732
  I as k,
@@ -0,0 +1,19 @@
1
+ "use strict";const c=require("./vendor-D0fSwmdY.cjs"),Ee=require("react");function Ne(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const r in e)if(r!=="default"){const n=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(t,r,n.get?n:{enumerable:!0,get:()=>e[r]})}}return t.default=e,Object.freeze(t)}const q=Ne(Ee);var xe={OPERATION_DEFINITION:"OperationDefinition"};class ne extends Error{constructor(t,r,n,i,a,o,v){super(t),this.name="GraphQLError",this.message=t,a&&(this.path=a),r&&(this.nodes=Array.isArray(r)?r:[r]),n&&(this.source=n),i&&(this.positions=i),o&&(this.originalError=o);var h=v;if(!h&&o){var k=o.extensions;k&&typeof k=="object"&&(h=k)}this.extensions=h||{}}toJSON(){return{...this,message:this.message}}toString(){return this.message}get[Symbol.toStringTag](){return"GraphQLError"}}var l,s;function C(e){return new ne(`Syntax Error: Unexpected token at ${s} in ${e}`)}function le(e){if(e.lastIndex=s,e.test(l))return l.slice(s,s=e.lastIndex)}var Q=/ +(?=[^\s])/y;function Se(e){for(var t=e.split(`
2
+ `),r="",n=0,i=0,a=t.length-1,o=0;o<t.length;o++)Q.lastIndex=0,Q.test(t[o])&&(o&&(!n||Q.lastIndex<n)&&(n=Q.lastIndex),i=i||o,a=o);for(var v=i;v<=a;v++)v!==i&&(r+=`
3
+ `),r+=t[v].slice(n).replace(/\\"""/g,'"""');return r}function x(){for(var e=0|l.charCodeAt(s++);e===9||e===10||e===13||e===32||e===35||e===44||e===65279;e=0|l.charCodeAt(s++))if(e===35)for(;(e=0|l.charCodeAt(s++))&&e!==10&&e!==13;);s--}function oe(){for(var e=s,t=0|l.charCodeAt(s++);t>=48&&t<=57||t>=65&&t<=90||t===95||t>=97&&t<=122;t=0|l.charCodeAt(s++));if(e===s-1)throw C("Name");var r=l.slice(e,--s);return x(),r}function V(){return{kind:"Name",value:oe()}}var Ce=/(?:"""|(?:[\s\S]*?[^\\])""")/y,De=/(?:(?:\.\d+)?[eE][+-]?\d+|\.\d+)/y;function $(e){var t;switch(l.charCodeAt(s)){case 91:s++,x();for(var r=[];l.charCodeAt(s)!==93;)r.push($(e));return s++,x(),{kind:"ListValue",values:r};case 123:s++,x();for(var n=[];l.charCodeAt(s)!==125;){var i=V();if(l.charCodeAt(s++)!==58)throw C("ObjectField");x(),n.push({kind:"ObjectField",name:i,value:$(e)})}return s++,x(),{kind:"ObjectValue",fields:n};case 36:if(e)throw C("Variable");return s++,{kind:"Variable",name:V()};case 34:if(l.charCodeAt(s+1)===34&&l.charCodeAt(s+2)===34){if(s+=3,(t=le(Ce))==null)throw C("StringValue");return x(),{kind:"StringValue",value:Se(t.slice(0,-3)),block:!0}}else{var a=s,o;s++;var v=!1;for(o=0|l.charCodeAt(s++);o===92&&(s++,v=!0)||o!==10&&o!==13&&o!==34&&o;o=0|l.charCodeAt(s++));if(o!==34)throw C("StringValue");return t=l.slice(a,s),x(),{kind:"StringValue",value:v?JSON.parse(t):t.slice(1,-1),block:!1}}case 45:case 48:case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:for(var h=s++,k;(k=0|l.charCodeAt(s++))>=48&&k<=57;);var y=l.slice(h,--s);if((k=l.charCodeAt(s))===46||k===69||k===101){if((t=le(De))==null)throw C("FloatValue");return x(),{kind:"FloatValue",value:y+t}}else return x(),{kind:"IntValue",value:y};case 110:if(l.charCodeAt(s+1)===117&&l.charCodeAt(s+2)===108&&l.charCodeAt(s+3)===108)return s+=4,x(),{kind:"NullValue"};break;case 116:if(l.charCodeAt(s+1)===114&&l.charCodeAt(s+2)===117&&l.charCodeAt(s+3)===101)return s+=4,x(),{kind:"BooleanValue",value:!0};break;case 102:if(l.charCodeAt(s+1)===97&&l.charCodeAt(s+2)===108&&l.charCodeAt(s+3)===115&&l.charCodeAt(s+4)===101)return s+=5,x(),{kind:"BooleanValue",value:!1};break}return{kind:"EnumValue",value:oe()}}function be(e){if(l.charCodeAt(s)===40){var t=[];s++,x();do{var r=V();if(l.charCodeAt(s++)!==58)throw C("Argument");x(),t.push({kind:"Argument",name:r,value:$(e)})}while(l.charCodeAt(s)!==41);return s++,x(),t}}function I(e){if(l.charCodeAt(s)===64){var t=[];do s++,t.push({kind:"Directive",name:V(),arguments:be(e)});while(l.charCodeAt(s)===64);return t}}function _e(){for(var e=0;l.charCodeAt(s)===91;)e++,s++,x();var t={kind:"NamedType",name:V()};do if(l.charCodeAt(s)===33&&(s++,x(),t={kind:"NonNullType",type:t}),e){if(l.charCodeAt(s++)!==93)throw C("NamedType");x(),t={kind:"ListType",type:t}}while(e--);return t}function G(){if(l.charCodeAt(s++)!==123)throw C("SelectionSet");return x(),U()}function U(){var e=[];do if(l.charCodeAt(s)===46){if(l.charCodeAt(++s)!==46||l.charCodeAt(++s)!==46)throw C("SelectionSet");switch(s++,x(),l.charCodeAt(s)){case 64:e.push({kind:"InlineFragment",typeCondition:void 0,directives:I(!1),selectionSet:G()});break;case 111:l.charCodeAt(s+1)===110?(s+=2,x(),e.push({kind:"InlineFragment",typeCondition:{kind:"NamedType",name:V()},directives:I(!1),selectionSet:G()})):e.push({kind:"FragmentSpread",name:V(),directives:I(!1)});break;case 123:s++,x(),e.push({kind:"InlineFragment",typeCondition:void 0,directives:void 0,selectionSet:U()});break;default:e.push({kind:"FragmentSpread",name:V(),directives:I(!1)})}}else{var t=V(),r=void 0;l.charCodeAt(s)===58&&(s++,x(),r=t,t=V());var n=be(!1),i=I(!1),a=void 0;l.charCodeAt(s)===123&&(s++,x(),a=U()),e.push({kind:"Field",alias:r,name:t,arguments:n,directives:i,selectionSet:a})}while(l.charCodeAt(s)!==125);return s++,x(),{kind:"SelectionSet",selections:e}}function qe(){if(x(),l.charCodeAt(s)===40){var e=[];s++,x();do{var t=void 0;if(l.charCodeAt(s)===34&&(t=$(!0)),l.charCodeAt(s++)!==36)throw C("Variable");var r=V();if(l.charCodeAt(s++)!==58)throw C("VariableDefinition");x();var n=_e(),i=void 0;l.charCodeAt(s)===61&&(s++,x(),i=$(!0)),x();var a={kind:"VariableDefinition",variable:{kind:"Variable",name:r},type:n,defaultValue:i,directives:I(!0)};t&&(a.description=t),e.push(a)}while(l.charCodeAt(s)!==41);return s++,x(),e}}function Ve(e){var t=V();if(l.charCodeAt(s++)!==111||l.charCodeAt(s++)!==110)throw C("FragmentDefinition");x();var r={kind:"FragmentDefinition",name:t,typeCondition:{kind:"NamedType",name:V()},directives:I(!1),selectionSet:G()};return e&&(r.description=e),r}function fe(){var e=[];do{var t=void 0;if(l.charCodeAt(s)===34&&(t=$(!0)),l.charCodeAt(s)===123){if(t)throw C("Document");s++,x(),e.push({kind:"OperationDefinition",operation:"query",name:void 0,variableDefinitions:void 0,directives:void 0,selectionSet:U()})}else{var r=oe();switch(r){case"fragment":e.push(Ve(t));break;case"query":case"mutation":case"subscription":var n,i=void 0;(n=l.charCodeAt(s))!==40&&n!==64&&n!==123&&(i=V());var a={kind:"OperationDefinition",operation:r,name:i,variableDefinitions:qe(),directives:I(!1),selectionSet:G()};t&&(a.description=t),e.push(a);break;default:throw C("Document")}}}while(s<l.length);return e}function Pe(e,t){return l=e.body?e.body:e,s=0,x(),t&&t.noLocation?{kind:"Document",definitions:fe()}:{kind:"Document",definitions:fe(),loc:{start:0,end:l.length,startToken:void 0,endToken:void 0,source:{body:l,name:"graphql.web",locationOffset:{line:1,column:1}}}}}function _(e,t,r){for(var n="",i=0;i<e.length;i++)i&&(n+=t),n+=r(e[i]);return n}function je(e){return JSON.stringify(e)}function Ie(e){return`"""
4
+ `+e.replace(/"""/g,'\\"""')+`
5
+ """`}var P=`
6
+ `,E={OperationDefinition(e){var t="";e.description&&(t+=E.StringValue(e.description)+`
7
+ `),t+=e.operation,e.name&&(t+=" "+e.name.value),e.variableDefinitions&&e.variableDefinitions.length&&(e.name||(t+=" "),t+="("+_(e.variableDefinitions,", ",E.VariableDefinition)+")"),e.directives&&e.directives.length&&(t+=" "+_(e.directives," ",E.Directive));var r=E.SelectionSet(e.selectionSet);return t!=="query"?t+" "+r:r},VariableDefinition(e){var t="";return e.description&&(t+=E.StringValue(e.description)+" "),t+=E.Variable(e.variable)+": "+j(e.type),e.defaultValue&&(t+=" = "+j(e.defaultValue)),e.directives&&e.directives.length&&(t+=" "+_(e.directives," ",E.Directive)),t},Field(e){var t=e.alias?e.alias.value+": "+e.name.value:e.name.value;if(e.arguments&&e.arguments.length){var r=_(e.arguments,", ",E.Argument);t.length+r.length+2>80?t+="("+(P+=" ")+_(e.arguments,P,E.Argument)+(P=P.slice(0,-2))+")":t+="("+r+")"}return e.directives&&e.directives.length&&(t+=" "+_(e.directives," ",E.Directive)),e.selectionSet&&e.selectionSet.selections.length&&(t+=" "+E.SelectionSet(e.selectionSet)),t},StringValue(e){return e.block?Ie(e.value).replace(/\n/g,P):je(e.value)},BooleanValue:e=>""+e.value,NullValue:e=>"null",IntValue:e=>e.value,FloatValue:e=>e.value,EnumValue:e=>e.value,Name:e=>e.value,Variable:e=>"$"+e.name.value,ListValue:e=>"["+_(e.values,", ",j)+"]",ObjectValue:e=>"{"+_(e.fields,", ",E.ObjectField)+"}",ObjectField:e=>e.name.value+": "+j(e.value),Document(e){return!e.definitions||!e.definitions.length?"":_(e.definitions,`
8
+
9
+ `,j)},SelectionSet:e=>"{"+(P+=" ")+_(e.selections,P,j)+(P=P.slice(0,-2))+"}",Argument:e=>e.name.value+": "+j(e.value),FragmentSpread(e){var t="..."+e.name.value;return e.directives&&e.directives.length&&(t+=" "+_(e.directives," ",E.Directive)),t},InlineFragment(e){var t="...";return e.typeCondition&&(t+=" on "+e.typeCondition.name.value),e.directives&&e.directives.length&&(t+=" "+_(e.directives," ",E.Directive)),t+=" "+E.SelectionSet(e.selectionSet)},FragmentDefinition(e){var t="";return e.description&&(t+=E.StringValue(e.description)+`
10
+ `),t+="fragment "+e.name.value,t+=" on "+e.typeCondition.name.value,e.directives&&e.directives.length&&(t+=" "+_(e.directives," ",E.Directive)),t+" "+E.SelectionSet(e.selectionSet)},Directive(e){var t="@"+e.name.value;return e.arguments&&e.arguments.length&&(t+="("+_(e.arguments,", ",E.Argument)+")"),t},NamedType:e=>e.name.value,ListType:e=>"["+j(e.type)+"]",NonNullType:e=>j(e.type)+"!"},j=e=>E[e.kind](e);function Re(e){return P=`
11
+ `,E[e.kind]?E[e.kind](e):""}var Te=e=>e&&typeof e.message=="string"&&(e.extensions||e.name==="GraphQLError")?e:typeof e=="object"&&typeof e.message=="string"?new ne(e.message,e.nodes,e.source,e.positions,e.path,e,e.extensions||{}):new ne(e);class se extends Error{constructor(t){var r=(t.graphQLErrors||[]).map(Te),n=((i,a)=>{var o="";if(i)return`[Network] ${i.message}`;if(a)for(var v=0,h=a.length;v<h;v++)o&&(o+=`
12
+ `),o+=`[GraphQL] ${a[v].message}`;return o})(t.networkError,r);super(n),this.name="CombinedError",this.message=n,this.graphQLErrors=r,this.networkError=t.networkError,this.response=t.response}toString(){return this.message}}var J=(e,t)=>{for(var r=0|(t||5381),n=0,i=0|e.length;n<i;n++)r=(r<<5)+r+e.charCodeAt(n);return r},R=new Set,de=new WeakMap,F=(e,t)=>{if(e===null||R.has(e))return"null";if(typeof e!="object")return JSON.stringify(e)||"";if(e.toJSON)return F(e.toJSON(),t);if(Array.isArray(e)){for(var r="[",n=0,i=e.length;n<i;n++)r.length>1&&(r+=","),r+=F(e[n],t)||"null";return r+="]"}else if(!t&&(W!==L&&e instanceof W||Y!==L&&e instanceof Y))return"null";var a=Object.keys(e).sort();if(!a.length&&e.constructor&&Object.getPrototypeOf(e).constructor!==Object.prototype.constructor){var o=de.get(e)||Math.random().toString(36).slice(2);return de.set(e,o),F({__key:o},t)}R.add(e);for(var v="{",h=0,k=a.length;h<k;h++){var y=F(e[a[h]],t);y&&(v.length>1&&(v+=","),v+=F(a[h],t)+":"+y)}return R.delete(e),v+="}"},ae=(e,t,r)=>{if(!(r==null||typeof r!="object"||r.toJSON||R.has(r)))if(Array.isArray(r))for(var n=0,i=r.length;n<i;n++)ae(e,`${t}.${n}`,r[n]);else if(r instanceof W||r instanceof Y)e.set(t,r);else{R.add(r);for(var a in r)ae(e,`${t}.${a}`,r[a])}},z=(e,t)=>(R.clear(),F(e,t||!1));class L{}var W=typeof File<"u"?File:L,Y=typeof Blob<"u"?Blob:L,Fe=/("{3}[\s\S]*"{3}|"(?:\\.|[^"])*")/g,Me=/(?:#[^\n\r]+)?(?:[\r\n]+|$)/g,$e=(e,t)=>t%2==0?e.replace(Me,`
13
+ `):e,ve=e=>e.split(Fe).map($e).join("").trim(),he=new Map,B=new Map,ue=e=>{var t;return typeof e=="string"?t=ve(e):e.loc&&B.get(e.__key)===e?t=e.loc.source.body:(t=he.get(e)||ve(Re(e)),he.set(e,t)),typeof e!="string"&&!e.loc&&(e.loc={start:0,end:t.length,source:{body:t,name:"gql",locationOffset:{line:1,column:1}}}),t},pe=e=>{var t;if(e.documentId)t=J(e.documentId);else if(t=J(ue(e)),e.definitions){var r=we(e);r&&(t=J(`
14
+ # ${r}`,t))}return t},Le=e=>{var t,r;return typeof e=="string"?(t=pe(e),r=B.get(t)||Pe(e,{noLocation:!0})):(t=e.__key||pe(e),r=B.get(t)||e),r.loc||ue(r),r.__key=t,B.set(t,r),r},M=(e,t,r)=>{var n=t||{},i=Le(e),a=z(n,!0),o=i.__key;return a!=="{}"&&(o=J(a,o)),{key:o,query:i,variables:n,extensions:r}},we=e=>{for(var t=0,r=e.definitions.length;t<r;t++){var n=e.definitions[t];if(n.kind===xe.OPERATION_DEFINITION)return n.name?n.name.value:void 0}},Qe=e=>{for(var t=0,r=e.definitions.length;t<r;t++){var n=e.definitions[t];if(n.kind===xe.OPERATION_DEFINITION)return n.operation}},ye=(e,t,r)=>{if(!("data"in t||"errors"in t&&Array.isArray(t.errors)))throw new Error("No Content");var n=e.kind==="subscription";return{operation:e,data:t.data,error:Array.isArray(t.errors)?new se({graphQLErrors:t.errors,response:r}):void 0,extensions:t.extensions?{...t.extensions}:void 0,hasNext:t.hasNext==null?n:t.hasNext,stale:!1}},H=(e,t)=>{if(typeof e=="object"&&e!=null){if(Array.isArray(e)){e=[...e];for(var r=0,n=t.length;r<n;r++)e[r]=H(e[r],t[r]);return e}if(!e.constructor||e.constructor===Object){e={...e};for(var i in t)e[i]=H(e[i],t[i]);return e}}return t},Je=(e,t,r,n)=>{var i=e.error?e.error.graphQLErrors:[],a=!!e.extensions||!!(t.payload||t).extensions,o={...e.extensions,...(t.payload||t).extensions},v=t.incremental;"path"in t&&(v=[t]);var h={data:e.data};if(v)for(var k=function(){var m=v[y];Array.isArray(m.errors)&&i.push(...m.errors),m.extensions&&(Object.assign(o,m.extensions),a=!0);var b="data",p=h,w=[];if(m.path)w=m.path;else if(n){var S=n.find((d=>d.id===m.id));m.subPath?w=[...S.path,...m.subPath]:w=S.path}for(var f=0,A=w.length;f<A;b=w[f++])p=p[b]=Array.isArray(p[b])?[...p[b]]:{...p[b]};if(m.items)for(var N=+b>=0?b:0,u=0,g=m.items.length;u<g;u++)p[N+u]=H(p[N+u],m.items[u]);else m.data!==void 0&&(p[b]=H(p[b],m.data))},y=0,O=v.length;y<O;y++)k();else h.data=(t.payload||t).data||e.data,i=t.errors||t.payload&&t.payload.errors||i;return{operation:e.operation,data:h.data,error:i.length?new se({graphQLErrors:i,response:r}):void 0,extensions:a?o:void 0,hasNext:t.hasNext!=null?t.hasNext:e.hasNext,stale:!1}},Oe=(e,t,r)=>({operation:e,data:void 0,error:new se({networkError:t,response:r}),extensions:void 0,hasNext:!1,stale:!1});function Be(e){var t={query:void 0,documentId:void 0,operationName:we(e.query),variables:e.variables||void 0,extensions:e.extensions};return"documentId"in e.query&&e.query.documentId&&(!e.query.definitions||!e.query.definitions.length)?t.documentId=e.query.documentId:(!e.extensions||!e.extensions.persistedQuery||e.extensions.persistedQuery.miss)&&(t.query=ue(e.query)),t}var Ge=(e,t)=>{var r=e.kind==="query"&&e.context.preferGetMethod;if(!r||!t)return e.context.url;var n=Ue(e.context.url);for(var i in t){var a=t[i];a&&n[1].set(i,typeof a=="object"?z(a):a)}var o=n.join("?");return o.length>2047&&r!=="force"?(e.context.preferGetMethod=!1,e.context.url):o},Ue=e=>{var t=e.indexOf("?");return t>-1?[e.slice(0,t),new URLSearchParams(e.slice(t+1))]:[e,new URLSearchParams]},ze=(e,t)=>{if(t&&!(e.kind==="query"&&e.context.preferGetMethod)){var r=z(t),n=(v=>{var h=new Map;return(W!==L||Y!==L)&&(R.clear(),ae(h,"variables",v)),h})(t.variables);if(n.size){var i=new FormData;i.append("operations",r),i.append("map",z({...[...n.keys()].map((v=>[v]))}));var a=0;for(var o of n.values())i.append(""+a++,o);return i}return r}},We=(e,t)=>{var r={accept:e.kind==="subscription"?"text/event-stream, multipart/mixed":"application/graphql-response+json, application/graphql+json, application/json, text/event-stream, multipart/mixed"},n=(typeof e.context.fetchOptions=="function"?e.context.fetchOptions():e.context.fetchOptions)||{};if(n.headers)if((o=>"has"in o&&!Object.keys(o).length)(n.headers))n.headers.forEach(((o,v)=>{r[v]=o}));else if(Array.isArray(n.headers))n.headers.forEach(((o,v)=>{Array.isArray(o)?r[o[0]]?r[o[0]]=`${r[o[0]]},${o[1]}`:r[o[0]]=o[1]:r[v]=o}));else for(var i in n.headers)r[i.toLowerCase()]=n.headers[i];var a=ze(e,t);return typeof a=="string"&&!r["content-type"]&&(r["content-type"]="application/json"),{...n,method:a?"POST":"GET",body:a,headers:r}},Ye=/boundary="?([^=";]+)"?/i,He=/data: ?([^\n]+)/;async function*me(e){if(e.body[Symbol.asyncIterator])for await(var t of e.body)yield t;else{var r=e.body.getReader(),n;try{for(;!(n=await r.read()).done;)yield n.value}finally{r.cancel()}}}async function*ge(e,t){var r=typeof TextDecoder<"u"?new TextDecoder:null,n="",i;for await(var a of e)for(n+=a.constructor.name==="Buffer"?a.toString():r.decode(a,{stream:!0});(i=n.indexOf(t))>-1;)yield n.slice(0,i),n=n.slice(i+t.length)}async function*Ke(e,t,r){var n=!0,i=null,a;try{yield await Promise.resolve();var o=(a=await(e.context.fetch||fetch)(t,r)).headers.get("Content-Type")||"",v;/multipart\/mixed/i.test(o)?v=(async function*(O,m){var b=O.match(Ye),p="--"+(b?b[1]:"-"),w=!0,S;for await(var f of ge(me(m),`\r
15
+ `+p)){if(w){w=!1;var A=f.indexOf(p);if(A>-1)f=f.slice(A+p.length);else continue}try{yield S=JSON.parse(f.slice(f.indexOf(`\r
16
+ \r
17
+ `)+4))}catch(N){if(!S)throw N}if(S&&S.hasNext===!1)break}S&&S.hasNext!==!1&&(yield{hasNext:!1})})(o,a):/text\/event-stream/i.test(o)?v=(async function*(O){var m;for await(var b of ge(me(O),`
18
+
19
+ `)){var p=b.match(He);if(p){var w=p[1];try{yield m=JSON.parse(w)}catch(S){if(!m)throw S}if(m&&m.hasNext===!1)break}}m&&m.hasNext!==!1&&(yield{hasNext:!1})})(a):/text\//i.test(o)?v=(async function*(O){var m=await O.text();try{var b=JSON.parse(m);process.env.NODE_ENV!=="production"&&console.warn('Found response with content-type "text/plain" but it had a valid "application/json" response.'),yield b}catch{throw new Error(m)}})(a):v=(async function*(O){yield JSON.parse(await O.text())})(a);var h;for await(var k of v)k.pending&&!i?h=k.pending:k.pending&&(h=[...h,...k.pending]),i=i?Je(i,k,a,h):ye(e,k,a),n=!1,yield i,n=!0;i||(yield i=ye(e,{},a))}catch(y){if(!n)throw y;yield Oe(e,a&&(a.status<200||a.status>=300)&&a.statusText?new Error(a.statusText):y,a)}}function Xe(e,t,r){var n;return typeof AbortController<"u"&&(r.signal=(n=new AbortController).signal),c.onEnd((()=>{n&&n.abort()}))(c.filter((i=>!!i))(c.fromAsyncIterable(Ke(e,t,r))))}function ke(e){var t=r=>e(r);return t.toPromise=()=>c.toPromise(c.take(1)(c.filter((r=>!r.stale&&!r.hasNext))(t))),t.then=(r,n)=>t.toPromise().then(r,n),t.subscribe=r=>c.subscribe(r)(t),t}function K(e,t,r){return{...t,kind:e,context:t.context?{...t.context,...r}:r||t.context}}var Ze=()=>{},et=({forward:e,dispatchDebug:t})=>r=>{var n=c.mergeMap((a=>{var o=Be(a),v=Ge(a,o),h=We(a,o);process.env.NODE_ENV!=="production"&&t({type:"fetchRequest",message:"A fetch request is being executed.",operation:a,data:{url:v,fetchOptions:h},source:"fetchExchange"});var k=c.takeUntil(c.filter((y=>y.kind==="teardown"&&y.key===a.key))(r))(Xe(a,v,h));return process.env.NODE_ENV!=="production"?c.onPush((y=>{var O=y.data?void 0:y.error;process.env.NODE_ENV!=="production"&&t({type:O?"fetchError":"fetchSuccess",message:`A ${O?"failed":"successful"} fetch response has been returned.`,operation:a,data:{url:v,fetchOptions:h,value:O||y},source:"fetchExchange"})}))(k):k}))(c.filter((a=>a.kind!=="teardown"&&(a.kind!=="subscription"||!!a.context.fetchSubscriptions)))(r)),i=e(c.filter((a=>a.kind==="teardown"||a.kind==="subscription"&&!a.context.fetchSubscriptions))(r));return c.merge([n,i])},tt=e=>({client:t,forward:r,dispatchDebug:n})=>e.reduceRight(((i,a)=>{var o=!1;return a({client:t,forward(v){if(process.env.NODE_ENV!=="production"){if(o)throw new Error("forward() must only be called once in each Exchange.");o=!0}return c.share(i(c.share(v)))},dispatchDebug(v){process.env.NODE_ENV!=="production"&&n({timestamp:Date.now(),source:a.name,...v})}})}),r),rt=({dispatchDebug:e})=>t=>(process.env.NODE_ENV!=="production"&&(t=c.onPush((r=>{if(r.kind!=="teardown"&&process.env.NODE_ENV!=="production"){var n=`No exchange has handled operations of kind "${r.kind}". Check whether you've added an exchange responsible for these operations.`;process.env.NODE_ENV!=="production"&&e({type:"fallbackCatch",message:n,operation:r,source:"fallbackExchange"}),console.warn(n)}}))(t)),c.filter((r=>!1))(t)),nt=function e(t){if(process.env.NODE_ENV!=="production"&&!t.url)throw new Error("You are creating an urql-client without a url.");var r=0,n=new Map,i=new Map,a=new Set,o=[],v={url:t.url,fetchSubscriptions:t.fetchSubscriptions,fetchOptions:t.fetchOptions,fetch:t.fetch,preferGetMethod:t.preferGetMethod,requestPolicy:t.requestPolicy||"cache-first"},h=c.makeSubject();function k(u){(u.kind==="mutation"||u.kind==="teardown"||!a.has(u.key))&&(u.kind==="teardown"?a.delete(u.key):u.kind!=="mutation"&&a.add(u.key),h.next(u))}var y=!1;function O(u){if(u&&k(u),!y){for(y=!0;y&&(u=o.shift());)k(u);y=!1}}var m=u=>{var g=c.takeUntil(c.filter((d=>d.kind==="teardown"&&d.key===u.key))(h.source))(c.filter((d=>d.operation.kind===u.kind&&d.operation.key===u.key&&(!d.operation.context._instance||d.operation.context._instance===u.context._instance)))(N));return u.kind!=="query"?g=c.takeWhile((d=>!!d.hasNext),!0)(g):g=c.switchMap((d=>{var D=c.fromValue(d);return d.stale||d.hasNext?D:c.merge([D,c.map((()=>(d.stale=!0,d)))(c.take(1)(c.filter((T=>T.key===u.key))(h.source)))])}))(g),u.kind!=="mutation"?g=c.onEnd((()=>{a.delete(u.key),n.delete(u.key),i.delete(u.key),y=!1;for(var d=o.length-1;d>=0;d--)o[d].key===u.key&&o.splice(d,1);k(K("teardown",u,u.context))}))(c.onPush((d=>{if(d.stale)if(!d.hasNext)a.delete(u.key);else for(var D=0;D<o.length;D++){var T=o[D];if(T.key===d.operation.key){a.delete(T.key);break}}else d.hasNext||a.delete(u.key);n.set(u.key,d)}))(g)):g=c.onStart((()=>{k(u)}))(g),c.share(g)},b=this instanceof e?this:Object.create(e.prototype),p=Object.assign(b,{suspense:!!t.suspense,operations$:h.source,reexecuteOperation(u){if(u.kind==="teardown")O(u);else if(u.kind==="mutation")o.push(u),Promise.resolve().then(O);else if(i.has(u.key)){for(var g=!1,d=0;d<o.length;d++)o[d].key===u.key&&(o[d]=u,g=!0);g||a.has(u.key)&&u.context.requestPolicy!=="network-only"?(a.delete(u.key),Promise.resolve().then(O)):(o.push(u),Promise.resolve().then(O))}},createRequestOperation(u,g,d){d||(d={});var D;if(process.env.NODE_ENV!=="production"&&u!=="teardown"&&(D=Qe(g.query))!==u)throw new Error(`Expected operation of type "${u}" but found "${D}"`);return K(u,g,{_instance:u==="mutation"?r=r+1|0:void 0,...v,...d,requestPolicy:d.requestPolicy||v.requestPolicy,suspense:d.suspense||d.suspense!==!1&&p.suspense})},executeRequestOperation(u){return u.kind==="mutation"?ke(m(u)):ke(c.lazy((()=>{var g=i.get(u.key);g||i.set(u.key,g=m(u)),g=c.onStart((()=>{O(u)}))(g);var d=n.get(u.key);return u.kind==="query"&&d&&(d.stale||d.hasNext)?c.switchMap(c.fromValue)(c.merge([g,c.filter((D=>D===n.get(u.key)))(c.fromValue(d))])):g})))},executeQuery(u,g){var d=p.createRequestOperation("query",u,g);return p.executeRequestOperation(d)},executeSubscription(u,g){var d=p.createRequestOperation("subscription",u,g);return p.executeRequestOperation(d)},executeMutation(u,g){var d=p.createRequestOperation("mutation",u,g);return p.executeRequestOperation(d)},readQuery(u,g,d){var D=null;return c.subscribe((T=>{D=T}))(p.query(u,g,d)).unsubscribe(),D},query:(u,g,d)=>p.executeQuery(M(u,g),d),subscription:(u,g,d)=>p.executeSubscription(M(u,g),d),mutation:(u,g,d)=>p.executeMutation(M(u,g),d)}),w=Ze;if(process.env.NODE_ENV!=="production"){var{next:S,source:f}=c.makeSubject();p.subscribeToDebugTarget=u=>c.subscribe(u)(f),w=S}var A=tt(t.exchanges),N=c.share(A({client:p,dispatchDebug:w,forward:rt({dispatchDebug:w})})(h.source));return c.publish(N),p},Ae={},Z=q.createContext(Ae),at=Z.Provider;Z.Consumer;Z.displayName="UrqlContext";var ce=()=>{var e=q.useContext(Z);if(e===Ae&&process.env.NODE_ENV!=="production"){var t="No client has been specified using urql's Provider. please create a client and add a Provider.";throw console.error(t),new Error(t)}return e},ie={fetching:!1,stale:!1,hasNext:!1,error:void 0,data:void 0,extensions:void 0,operation:void 0},it=(e,t)=>e===t||!(!e||!t||e.key!==t.key),ee=(e,t)=>{var r={...e,...t,data:t.data!==void 0||t.error?t.data:e.data,fetching:!!t.fetching,stale:!!t.stale};return((n,i)=>{for(var a in n)if(!(a in i))return!0;for(var o in i)if(o==="operation"?!it(n[o],i[o]):n[o]!==i[o])return!0;return!1})(e,r)?r:e},ot=(e,t)=>{for(var r=0,n=t.length;r<n;r++)if(e[r]!==t[r])return!0;return!1},te=q.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function X(e,t){process.env.NODE_ENV!=="production"&&te&&te.ReactCurrentOwner&&te.ReactCurrentOwner.current?Promise.resolve(t).then(e):e(t)}function st(e){var t=q.useRef(!0),r=ce(),[n,i]=q.useState(ie),a=q.useCallback(((o,v)=>(X(i,{...ie,fetching:!0}),c.toPromise(c.take(1)(c.filter((h=>!h.hasNext))(c.onPush((h=>{t.current&&X(i,{fetching:!1,stale:h.stale,data:h.data,error:h.error,extensions:h.extensions,operation:h.operation,hasNext:h.hasNext})}))(r.executeMutation(M(e,o),v||{}))))))),[r,e,i]);return q.useEffect((()=>(t.current=!0,()=>{t.current=!1})),[]),[n,a]}function ut(e,t){var r=q.useRef(void 0);return q.useMemo((()=>{var n=M(e,t);return r.current!==void 0&&r.current.key===n.key?r.current:(r.current=n,n)}),[e,t])}var ct=e=>{if(!e._react){var t=new Set,r=new Map;e.operations$&&c.subscribe((n=>{n.kind==="teardown"&&t.has(n.key)&&(t.delete(n.key),r.delete(n.key))}))(e.operations$),e._react={get:n=>r.get(n),set(n,i){t.delete(n),r.set(n,i)},dispose(n){t.add(n)}}}return e._react},lt=(e,t)=>t&&t.suspense!==void 0?!!t.suspense:e.suspense;function ft(e){var t=ce(),r=ct(t),n=lt(t,e.context),i=ut(e.query,e.variables),a=q.useMemo((()=>{if(e.pause)return null;var m=t.executeQuery(i,{requestPolicy:e.requestPolicy,...e.context});return n?c.onPush((b=>{r.set(i.key,b)}))(m):m}),[r,t,i,n,e.pause,e.requestPolicy,e.context]),o=q.useCallback(((m,b)=>{if(!m)return{fetching:!1};var p=r.get(i.key);if(p){if(b&&p!=null&&"then"in p)throw p}else{var w,S=c.subscribe((A=>{p=A,w&&w(p)}))(c.takeWhile((()=>b&&!w||!p||"hasNext"in p&&p.hasNext))(m));if(p==null&&b){var f=new Promise((A=>{w=A}));throw r.set(i.key,f),f}else S.unsubscribe()}return p||{fetching:!0}}),[r,i]),v=[t,i,e.requestPolicy,e.context,e.pause],[h,k]=q.useState((()=>[a,ee(ie,o(a,n)),v])),y=h[1];a!==h[0]&&ot(h[2],v)&&k([a,y=ee(h[1],o(a,n)),v]),q.useEffect((()=>{var m=h[0],b=h[2][1],p=!1,w=f=>{p=!0,X(k,(A=>{var N=ee(A[1],f);return A[1]!==N?[A[0],N,A[2]]:A}))};if(m){var S=c.subscribe(w)(c.onEnd((()=>{w({fetching:!1})}))(m));return p||w({fetching:!0}),()=>{r.dispose(b.key),S.unsubscribe()}}else w({fetching:!1})}),[r,h[0],h[2][1]]);var O=q.useCallback((m=>{var b={requestPolicy:e.requestPolicy,...e.context,...m};X(k,(p=>[n?c.onPush((w=>{r.set(i.key,w)}))(t.executeQuery(i,b)):t.executeQuery(i,b),p[1],v]))}),[t,r,i,n,e.requestPolicy,e.context,e.pause]);return[y,O]}var re=(e,t)=>K(e.kind,e,{...e.context,authAttempt:t});function dt(e){return({client:t,forward:r})=>{var n=new Set,i=c.makeSubject(),a=c.makeSubject(),o=new Map;function v(){k=void 0;var O=o;o=new Map,O.forEach(i.next)}function h(O){k=void 0;var m=o;o=new Map,m.forEach((b=>{a.next(Oe(b,O))}))}var k,y=null;return O=>{function m(){k=Promise.resolve().then((()=>e({mutate(f,A,N){var u=t.createRequestOperation("mutation",M(f,A),N);return c.toPromise(c.take(1)(c.filter((g=>g.operation.key===u.key&&u.context._instance===g.operation.context._instance))(c.onStart((()=>{var g=p(u);n.add(g.context._instance),i.next(g)}))(S))))},appendHeaders(f,A){var N=typeof f.context.fetchOptions=="function"?f.context.fetchOptions():f.context.fetchOptions||{};return K(f.kind,f,{...f.context,fetchOptions:{...N,headers:{...N.headers,...A}}})}}))).then((f=>{f&&(y=f),v()})).catch((f=>{process.env.NODE_ENV!=="production"&&console.warn("authExchange()’s initialization function has failed, which is unexpected.\nIf your initialization function is expected to throw/reject, catch this error and handle it explicitly.\nUnless this error is handled it’ll be passed onto any `OperationResult` instantly and authExchange() will block further operations and retry.",f),h(f)}))}m();function b(f){o.set(f.key,re(f,!0)),y&&!k&&(k=y.refreshAuth().then(v).catch(h))}function p(f){return y?y.addAuthToOperation(f):f}var w=c.filter(Boolean)(c.map((f=>f.kind==="teardown"?(o.delete(f.key),f):f.context._instance&&n.has(f.context._instance)?f:f.context.authAttempt?p(f):k||!y?(k||m(),o.has(f.key)||o.set(f.key,re(f,!1)),null):(function(N){return!N.context.authAttempt&&y&&y.willAuthError&&y.willAuthError(N)})(f)?(b(f),null):p(re(f,!1))))(c.merge([i.source,O]))),S=r(w);return c.merge([a.source,c.filter((f=>!n.has(f.operation.context._instance)&&f.error&&(function(N){return y&&y.didAuthError&&y.didAuthError(N.error,N.operation)})(f)&&!f.operation.context.authAttempt?(b(f.operation),!1):(n.has(f.operation.context._instance)&&n.delete(f.operation.context._instance),!0)))(S)])}}}exports.C=nt;exports.authExchange=dt;exports.f=at;exports.fetchExchange=et;exports.useClient=ce;exports.useMutation=st;exports.useQuery=ft;